diff --git a/README.md b/README.md index 35275080e2a6f25dbc744790d49d1cf64c50accc..385447d943467df4c5c71690868e562e3dad5c54 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A retro-styled Spaced Repetition System (SRS) for mastering Data Structures & Al ## 🌟 Features -- **SRS Review Queue**: Leitner 5-box spaced repetition algorithm with AI critique and hints. +- **SRS Review Queue**: Free Spaced Repetition Scheduler (FSRS) algorithm with AI critique and hints. - **Expedition Trail Map**: Hand-drawn vintage cartography map visualizing progress along the LeetCode 150 path. - **Interactive Sandboxes**: Python algorithm practice and SQLite sandbox with real-time validation. - **File Explorer & Exporter**: Tag, manage, and export DSA solutions as `.py` archives. diff --git a/algospaced-ui/dist/assets/Auth-DHdm5r3r.js b/algospaced-ui/dist/assets/Auth-CphacI2S.js similarity index 86% rename from algospaced-ui/dist/assets/Auth-DHdm5r3r.js rename to algospaced-ui/dist/assets/Auth-CphacI2S.js index 125f5156102260cf95638491a1be34ab46a5796b..36bcbd4dc39e19673282e68dc3b622de5f88c7fc 100644 --- a/algospaced-ui/dist/assets/Auth-DHdm5r3r.js +++ b/algospaced-ui/dist/assets/Auth-CphacI2S.js @@ -1 +1 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,Bt as n,Rt as r,Tt as i,U as a,V as o,o as s,q as c,x as l,yt as u}from"./vendor-react-CIO8MTK1.js";import{t as d}from"./firebaseClient-DZobvwSx.js";var f=e(n(),1),p=r();function m(){let[e,n]=(0,f.useState)(!1),[r,m]=(0,f.useState)(``),[h,g]=(0,f.useState)(``),[_,v]=(0,f.useState)(``),[y,b]=(0,f.useState)(!1),[x,S]=(0,f.useState)(!1),[C,w]=(0,f.useState)(null),T=h.length>=8,E=/[A-Z]/.test(h),D=/[a-z]/.test(h),O=/[0-9]/.test(h),k=/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~`]/.test(h),A=h.length>0&&h===_,j=T&&E&&D&&O&&k;return(0,p.jsxs)(`div`,{className:`fixed inset-0 w-full h-full max-h-[100dvh] overflow-y-auto overscroll-contain custom-scrollbar flex flex-col items-center px-3 pt-3 pb-8 sm:px-4 sm:py-6 md:p-8 relative isolate selection:bg-highlight-pink selection:text-white`,children:[(0,p.jsx)(`div`,{className:`fixed inset-0 w-full h-full bg-cover bg-center z-0 saturate-150 contrast-125 pointer-events-none`,style:{backgroundImage:`url('/wallpapers/default.webp')`}}),(0,p.jsxs)(`div`,{className:`w-full max-w-md bg-paper-white border-[4px] border-ink-black window-shadow z-10 flex flex-col overflow-hidden shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] relative my-auto shrink-0`,children:[(0,p.jsx)(`div`,{className:`bg-[#0ea5e9] border-b-[4px] border-ink-black px-3 sm:px-4 py-2 sm:py-2.5 flex justify-between items-center text-ink-black select-none`,children:(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(`span`,{className:`material-symbols-outlined select-none text-base sm:text-xl`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,p.jsx)(`span`,{className:`font-window-title text-xs sm:text-base font-bold tracking-wide`,children:`System_Setup.exe`})]})}),(0,p.jsxs)(`div`,{className:`p-4 sm:p-6 bg-[#fdf8e1] flex-1 flex flex-col`,children:[typeof window<`u`&&window.self!==window.top&&(0,p.jsxs)(`div`,{className:`mb-4 sm:mb-5 p-3 sm:p-3.5 border-[3px] border-[#ea580c] bg-[#ffedd5] text-[#9a3412] text-xs font-bold font-arcade leading-relaxed shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[`⚠️ RUNNING INSIDE IFRAME`,(0,p.jsx)(`p`,{className:`mt-1 font-sans text-[11px] font-normal text-ink-black normal-case leading-normal`,children:`If Google Sign-In popup is restricted inside Hugging Face wrapper, open the standalone link below:`}),(0,p.jsx)(`a`,{href:`https://iamfebin-algospaced-dsa.hf.space/`,target:`_top`,className:`mt-2.5 inline-block w-full text-center bg-[#ea580c] hover:bg-[#c2410c] text-white border-[2.5px] border-ink-black py-1.5 px-3 rounded-lg font-window-title text-xs font-bold transition-all shadow-[1.5px_1.5px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:`OPEN FULLSCREEN / DIRECT SITE`})]}),(0,p.jsxs)(`div`,{className:`flex flex-col items-center mb-4 sm:mb-6`,children:[(0,p.jsx)(`div`,{className:`w-12 h-12 sm:w-16 sm:h-16 bg-paper-white border-[3px] border-ink-black flex items-center justify-center gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] mb-2.5 sm:mb-4`,children:(0,p.jsx)(l,{className:`w-7 h-7 sm:w-9 sm:h-9 text-primary`})}),(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold tracking-tight text-ink-black font-headline-md leading-none m-0`,children:`AlgoSpaced`}),(0,p.jsx)(`span`,{className:`text-[9px] sm:text-[10px] font-arcade bg-[#facc15] text-ink-black font-extrabold px-1.5 sm:px-2 py-0.5 border-[2px] border-ink-black shadow-[2px_2px_0px_0px_#1E293B] uppercase rotate-[-3deg]`,children:`BETA`})]}),(0,p.jsx)(`p`,{className:`text-[10px] sm:text-xs font-arcade text-trash-gray mt-1.5 sm:mt-2 tracking-wide uppercase text-center`,children:`Spaced Repetition for DSA`})]}),(0,p.jsxs)(`div`,{className:`flex gap-2 mb-4 sm:mb-6 font-arcade text-[9px] sm:text-[10px]`,children:[(0,p.jsx)(`button`,{onClick:()=>{n(!1),w(null)},className:`flex-1 py-2 sm:py-2.5 border-[3px] border-ink-black cursor-pointer font-bold tracking-wider outline-none transition-all shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none active:translate-y-0.5 ${e?`bg-white text-slate-700 hover:bg-surface-container`:`bg-secondary-container text-ink-black translate-y-0.5 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`}`,children:`SIGN IN`}),(0,p.jsx)(`button`,{onClick:()=>{n(!0),w(null)},className:`flex-1 py-2 sm:py-2.5 border-[3px] border-ink-black cursor-pointer font-bold tracking-wider outline-none transition-all shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none active:translate-y-0.5 ${e?`bg-secondary-container text-ink-black translate-y-0.5 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`:`bg-white text-slate-700 hover:bg-surface-container`}`,children:`CREATE ACCOUNT`})]}),C&&(0,p.jsxs)(`div`,{className:`mb-4 sm:mb-6 p-3 sm:p-4 border-[3px] border-ink-black text-xs font-arcade leading-relaxed ${C.type===`error`?`bg-red-100 border-red-500 text-error shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:C.type===`unverified`?`bg-amber-100 border-amber-500 text-amber-900 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:`bg-emerald-100 border-emerald-500 text-emerald-700 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`}`,children:[(0,p.jsx)(`p`,{children:C.text}),C.type===`unverified`&&(0,p.jsxs)(`button`,{type:`button`,onClick:async()=>{if(!r.trim()||!h){w({type:`error`,text:`Please enter your email and password above to resend the verification link.`});return}try{S(!0),await d.resendVerificationEmail(r.trim(),h),w({type:`success`,text:`Verification email resent to ${r.trim()}! Please check your inbox and spam folder.`})}catch(e){w({type:`error`,text:e.message||`Failed to resend verification email. Check your credentials.`})}finally{S(!1)}},disabled:x,className:`mt-3 w-full bg-amber-500 hover:bg-amber-600 text-white font-window-title text-xs font-bold py-2 px-3 border-[2px] border-ink-black rounded flex items-center justify-center gap-2 cursor-pointer shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none uppercase disabled:opacity-50`,children:[(0,p.jsx)(t,{className:`w-3.5 h-3.5 ${x?`animate-spin`:``}`}),x?`SENDING LINK...`:`RESEND VERIFICATION EMAIL`]})]}),(0,p.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault(),b(!0),w(null);let i=r.trim();if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)){w({type:`error`,text:`Please enter a valid email address.`}),b(!1);return}if(e){if(!j){w({type:`error`,text:`Password does not meet the security criteria. Please check the requirements below.`}),b(!1);return}if(h!==_){w({type:`error`,text:`Passwords do not match. Please re-enter.`}),b(!1);return}try{await d.signUpWithEmail(i,h),w({type:`success`,text:`Registration successful! A verification link has been sent to your email. Please verify your email before logging in.`}),n(!1),g(``),v(``)}catch(e){let t=e,n=t.message||`An error occurred during registration.`;t.code===`auth/email-already-in-use`?n=`This email address is already registered. Please sign in instead.`:t.code===`auth/invalid-email`?n=`The email address format is invalid.`:t.code===`auth/weak-password`&&(n=`Firebase requires a stronger password.`),w({type:`error`,text:n})}finally{b(!1)}}else try{await d.signInWithEmail(i,h)}catch(e){let t=e;if(t.code===`auth/email-not-verified`)w({type:`unverified`,text:`Your email address is not verified yet. Please check your inbox for the activation link.`});else{let e=t.message||`An error occurred during sign in.`;t.code===`auth/invalid-credential`||t.code===`auth/user-not-found`||t.code===`auth/wrong-password`?e=`Invalid email or password. Please check your credentials.`:t.code===`auth/too-many-requests`&&(e=`Access temporarily locked due to many failed attempts. Try again later or reset password.`),w({type:`error`,text:e})}}finally{b(!1)}},className:`space-y-3 sm:space-y-4`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`auth-email`,className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Email Address`}),(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(o,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,p.jsx)(`input`,{id:`auth-email`,type:`email`,required:!0,value:r,onChange:e=>m(e.target.value),placeholder:`name@arcade.com`,"aria-label":`Email Address`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`auth-password`,className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Password`}),(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(a,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,p.jsx)(`input`,{id:`auth-password`,type:`password`,required:!0,value:h,onChange:e=>g(e.target.value),placeholder:`••••••••`,"aria-label":`Password`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),e&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`auth-confirm-password`,className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Confirm Password`}),(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(c,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,p.jsx)(`input`,{id:`auth-confirm-password`,type:`password`,required:!0,value:_,onChange:e=>v(e.target.value),placeholder:`••••••••`,"aria-label":`Confirm Password`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),(0,p.jsxs)(`div`,{className:`p-2.5 sm:p-3 bg-white border-[2px] border-ink-black rounded-lg text-[9px] sm:text-[10px] font-code-mono space-y-1 shadow-[inset_1px_1px_0px_rgba(0,0,0,0.05)]`,children:[(0,p.jsx)(`div`,{className:`font-bold font-arcade uppercase text-[8px] sm:text-[9px] text-trash-gray mb-1 sm:mb-1.5`,children:`Password Security Requirements:`}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${T?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[T?(0,p.jsx)(u,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(s,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`Minimum 8 characters`})]}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${E&&D?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[E&&D?(0,p.jsx)(u,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(s,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`Uppercase & lowercase letters (A-Z, a-z)`})]}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${O?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[O?(0,p.jsx)(u,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(s,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`At least 1 number (0-9)`})]}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${k?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[k?(0,p.jsx)(u,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(s,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`At least 1 special character (!@#$%^&*...)`})]}),_.length>0&&(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${A?`text-emerald-700 font-bold`:`text-red-600 font-bold`}`,children:[A?(0,p.jsx)(u,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(s,{className:`w-3 h-3 text-red-500 shrink-0 stroke-[3]`}),(0,p.jsx)(`span`,{children:A?`Passwords match`:`Passwords do not match`})]})]})]}),(0,p.jsxs)(`button`,{type:`submit`,disabled:y||e&&(!j||!A),className:`w-full bg-[#ffcc00] hover:bg-yellow-400 border-[3px] sm:border-[4px] border-ink-black rounded-xl py-2.5 sm:py-3.5 font-window-title text-sm sm:text-base text-ink-black arcade-btn cursor-pointer disabled:opacity-50 flex items-center justify-center gap-2 uppercase font-bold tracking-wide transition-all shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none`,children:[y?`PROCESSING...`:e?`CREATE ACCOUNT`:`SIGN IN`,!y&&(0,p.jsx)(i,{className:`w-4 h-4 stroke-[3px]`})]})]}),(0,p.jsxs)(`div`,{className:`relative my-3.5 sm:my-5 select-none`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,p.jsx)(`div`,{className:`w-full border-t-[3px] border-ink-black border-dashed`})}),(0,p.jsx)(`div`,{className:`relative flex justify-center text-[9px] sm:text-[10px] uppercase font-arcade`,children:(0,p.jsx)(`span`,{className:`bg-[#fdf8e1] px-2 sm:px-3 text-trash-gray font-bold`,children:`OR CONTINUE WITH`})})]}),(0,p.jsxs)(`button`,{onClick:async()=>{try{b(!0),w(null),await d.signInWithGoogle()}catch(e){w({type:`error`,text:e.message||`Google Sign-In failed to initialize`}),b(!1)}},disabled:y,className:`w-full bg-white hover:bg-slate-100 border-[3px] border-ink-black text-ink-black font-bold py-2.5 sm:py-3 px-3 sm:px-4 rounded-xl flex items-center justify-center gap-2.5 sm:gap-3 transition-all text-[11px] sm:text-xs cursor-pointer shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none`,children:[(0,p.jsxs)(`svg`,{className:`w-4 h-4 shrink-0`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,p.jsx)(`path`,{d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`,fill:`#4285F4`}),(0,p.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`}),(0,p.jsx)(`path`,{d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z`,fill:`#FBBC05`}),(0,p.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.06l3.66 2.84c.87-2.6 3.3-4.52 6.16-4.52z`,fill:`#EA4335`})]}),`SIGN IN WITH GOOGLE`]}),(0,p.jsxs)(`button`,{onClick:()=>{d.enterSandbox()},disabled:y,className:`mt-2.5 sm:mt-3 w-full bg-[#10b981] hover:bg-emerald-600 text-white font-window-title py-2.5 sm:py-3 px-3 sm:px-4 border-[3px] border-ink-black rounded-xl flex items-center justify-center gap-2 cursor-pointer shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none uppercase font-bold text-[11px] sm:text-xs`,children:[(0,p.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`sports_esports`}),`Enter Sandbox Mode (No Login)`]})]})]})]})}export{m as default}; \ No newline at end of file +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,C as n,G as r,Ht as i,M as a,Ot as o,St as s,U as c,Y as l,o as u}from"./vendor-react-hnaVBnLv.js";import{t as d}from"./firebaseClient-DZobvwSx.js";var f=e(i(),1),p=t();function m(){let[e,t]=(0,f.useState)(!1),[i,m]=(0,f.useState)(``),[h,g]=(0,f.useState)(``),[_,v]=(0,f.useState)(``),[y,b]=(0,f.useState)(!1),[x,S]=(0,f.useState)(!1),[C,w]=(0,f.useState)(null),T=h.length>=8,E=/[A-Z]/.test(h),D=/[a-z]/.test(h),O=/[0-9]/.test(h),k=/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~`]/.test(h),A=h.length>0&&h===_,j=T&&E&&D&&O&&k;return(0,p.jsxs)(`div`,{className:`fixed inset-0 w-full h-full max-h-[100dvh] overflow-y-auto overscroll-contain custom-scrollbar flex flex-col items-center px-3 pt-3 pb-8 sm:px-4 sm:py-6 md:p-8 relative isolate selection:bg-highlight-pink selection:text-white`,children:[(0,p.jsx)(`div`,{className:`fixed inset-0 w-full h-full bg-cover bg-center z-0 saturate-150 contrast-125 pointer-events-none`,style:{backgroundImage:`url('/wallpapers/default.webp')`}}),(0,p.jsxs)(`div`,{className:`w-full max-w-md bg-paper-white border-[4px] border-ink-black window-shadow z-10 flex flex-col overflow-hidden shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] relative my-auto shrink-0`,children:[(0,p.jsx)(`div`,{className:`bg-[#0ea5e9] border-b-[4px] border-ink-black px-3 sm:px-4 py-2 sm:py-2.5 flex justify-between items-center text-ink-black select-none`,children:(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(`span`,{className:`material-symbols-outlined select-none text-base sm:text-xl`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,p.jsx)(`span`,{className:`font-window-title text-xs sm:text-base font-bold tracking-wide`,children:`System_Setup.exe`})]})}),(0,p.jsxs)(`div`,{className:`p-4 sm:p-6 bg-[#fdf8e1] flex-1 flex flex-col`,children:[typeof window<`u`&&window.self!==window.top&&(0,p.jsxs)(`div`,{className:`mb-4 sm:mb-5 p-3 sm:p-3.5 border-[3px] border-[#ea580c] bg-[#ffedd5] text-[#9a3412] text-xs font-bold font-arcade leading-relaxed shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[`⚠️ RUNNING INSIDE IFRAME`,(0,p.jsx)(`p`,{className:`mt-1 font-sans text-[11px] font-normal text-ink-black normal-case leading-normal`,children:`If Google Sign-In popup is restricted inside Hugging Face wrapper, open the standalone link below:`}),(0,p.jsx)(`a`,{href:`https://iamfebin-algospaced-dsa.hf.space/`,target:`_top`,className:`mt-2.5 inline-block w-full text-center bg-[#ea580c] hover:bg-[#c2410c] text-white border-[2.5px] border-ink-black py-1.5 px-3 rounded-lg font-window-title text-xs font-bold transition-all shadow-[1.5px_1.5px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:`OPEN FULLSCREEN / DIRECT SITE`})]}),(0,p.jsxs)(`div`,{className:`flex flex-col items-center mb-4 sm:mb-6`,children:[(0,p.jsx)(`div`,{className:`w-12 h-12 sm:w-16 sm:h-16 bg-paper-white border-[3px] border-ink-black flex items-center justify-center gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] mb-2.5 sm:mb-4`,children:(0,p.jsx)(n,{className:`w-7 h-7 sm:w-9 sm:h-9 text-primary`})}),(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,p.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold tracking-tight text-ink-black font-headline-md leading-none m-0`,children:`AlgoSpaced`}),(0,p.jsx)(`span`,{className:`text-[9px] sm:text-[10px] font-arcade bg-[#facc15] text-ink-black font-extrabold px-1.5 sm:px-2 py-0.5 border-[2px] border-ink-black shadow-[2px_2px_0px_0px_#1E293B] uppercase rotate-[-3deg]`,children:`BETA`})]}),(0,p.jsx)(`p`,{className:`text-[10px] sm:text-xs font-arcade text-trash-gray mt-1.5 sm:mt-2 tracking-wide uppercase text-center`,children:`Spaced Repetition for DSA`})]}),(0,p.jsxs)(`div`,{className:`flex gap-2 mb-4 sm:mb-6 font-arcade text-[9px] sm:text-[10px]`,children:[(0,p.jsx)(`button`,{onClick:()=>{t(!1),w(null)},className:`flex-1 py-2 sm:py-2.5 border-[3px] border-ink-black cursor-pointer font-bold tracking-wider outline-none transition-all shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none active:translate-y-0.5 ${e?`bg-white text-slate-700 hover:bg-surface-container`:`bg-secondary-container text-ink-black translate-y-0.5 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`}`,children:`SIGN IN`}),(0,p.jsx)(`button`,{onClick:()=>{t(!0),w(null)},className:`flex-1 py-2 sm:py-2.5 border-[3px] border-ink-black cursor-pointer font-bold tracking-wider outline-none transition-all shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none active:translate-y-0.5 ${e?`bg-secondary-container text-ink-black translate-y-0.5 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`:`bg-white text-slate-700 hover:bg-surface-container`}`,children:`CREATE ACCOUNT`})]}),C&&(0,p.jsxs)(`div`,{className:`mb-4 sm:mb-6 p-3 sm:p-4 border-[3px] border-ink-black text-xs font-arcade leading-relaxed ${C.type===`error`?`bg-red-100 border-red-500 text-error shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:C.type===`unverified`?`bg-amber-100 border-amber-500 text-amber-900 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:`bg-emerald-100 border-emerald-500 text-emerald-700 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`}`,children:[(0,p.jsx)(`p`,{children:C.text}),C.type===`unverified`&&(0,p.jsxs)(`button`,{type:`button`,onClick:async()=>{if(!i.trim()||!h){w({type:`error`,text:`Please enter your email and password above to resend the verification link.`});return}try{S(!0),await d.resendVerificationEmail(i.trim(),h),w({type:`success`,text:`Verification email resent to ${i.trim()}! Please check your inbox and spam folder.`})}catch(e){w({type:`error`,text:e.message||`Failed to resend verification email. Check your credentials.`})}finally{S(!1)}},disabled:x,className:`mt-3 w-full bg-amber-500 hover:bg-amber-600 text-white font-window-title text-xs font-bold py-2 px-3 border-[2px] border-ink-black rounded flex items-center justify-center gap-2 cursor-pointer shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none uppercase disabled:opacity-50`,children:[(0,p.jsx)(a,{className:`w-3.5 h-3.5 ${x?`animate-spin`:``}`}),x?`SENDING LINK...`:`RESEND VERIFICATION EMAIL`]})]}),(0,p.jsxs)(`form`,{onSubmit:async n=>{n.preventDefault(),b(!0),w(null);let r=i.trim();if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)){w({type:`error`,text:`Please enter a valid email address.`}),b(!1);return}if(e){if(!j){w({type:`error`,text:`Password does not meet the security criteria. Please check the requirements below.`}),b(!1);return}if(h!==_){w({type:`error`,text:`Passwords do not match. Please re-enter.`}),b(!1);return}try{await d.signUpWithEmail(r,h),w({type:`success`,text:`Registration successful! A verification link has been sent to your email. Please verify your email before logging in.`}),t(!1),g(``),v(``)}catch(e){let t=e,n=t.message||`An error occurred during registration.`;t.code===`auth/email-already-in-use`?n=`This email address is already registered. Please sign in instead.`:t.code===`auth/invalid-email`?n=`The email address format is invalid.`:t.code===`auth/weak-password`&&(n=`Firebase requires a stronger password.`),w({type:`error`,text:n})}finally{b(!1)}}else try{await d.signInWithEmail(r,h)}catch(e){let t=e;if(t.code===`auth/email-not-verified`)w({type:`unverified`,text:`Your email address is not verified yet. Please check your inbox for the activation link.`});else{let e=t.message||`An error occurred during sign in.`;t.code===`auth/invalid-credential`||t.code===`auth/user-not-found`||t.code===`auth/wrong-password`?e=`Invalid email or password. Please check your credentials.`:t.code===`auth/too-many-requests`&&(e=`Access temporarily locked due to many failed attempts. Try again later or reset password.`),w({type:`error`,text:e})}}finally{b(!1)}},className:`space-y-3 sm:space-y-4`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`auth-email`,className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Email Address`}),(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(c,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,p.jsx)(`input`,{id:`auth-email`,type:`email`,required:!0,value:i,onChange:e=>m(e.target.value),placeholder:`name@arcade.com`,"aria-label":`Email Address`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`auth-password`,className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Password`}),(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(r,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,p.jsx)(`input`,{id:`auth-password`,type:`password`,required:!0,value:h,onChange:e=>g(e.target.value),placeholder:`••••••••`,"aria-label":`Password`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),e&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`auth-confirm-password`,className:`block text-[11px] sm:text-xs font-bold text-ink-black uppercase tracking-wider mb-1.5 sm:mb-2 font-headline-md`,children:`Confirm Password`}),(0,p.jsxs)(`div`,{className:`relative`,children:[(0,p.jsx)(l,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 sm:w-4 sm:h-4 text-ink-black`}),(0,p.jsx)(`input`,{id:`auth-confirm-password`,type:`password`,required:!0,value:_,onChange:e=>v(e.target.value),placeholder:`••••••••`,"aria-label":`Confirm Password`,className:`w-full bg-white border-[3px] border-ink-black rounded-lg py-2 sm:py-2.5 pl-9 sm:pl-10 pr-3 sm:pr-4 text-ink-black placeholder-trash-gray focus:outline-none focus:bg-white text-xs sm:text-sm font-code-mono shadow-[inset_2px_2px_0px_rgba(0,0,0,0.1)]`})]})]}),(0,p.jsxs)(`div`,{className:`p-2.5 sm:p-3 bg-white border-[2px] border-ink-black rounded-lg text-[9px] sm:text-[10px] font-code-mono space-y-1 shadow-[inset_1px_1px_0px_rgba(0,0,0,0.05)]`,children:[(0,p.jsx)(`div`,{className:`font-bold font-arcade uppercase text-[8px] sm:text-[9px] text-trash-gray mb-1 sm:mb-1.5`,children:`Password Security Requirements:`}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${T?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[T?(0,p.jsx)(s,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(u,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`Minimum 8 characters`})]}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${E&&D?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[E&&D?(0,p.jsx)(s,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(u,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`Uppercase & lowercase letters (A-Z, a-z)`})]}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${O?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[O?(0,p.jsx)(s,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(u,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`At least 1 number (0-9)`})]}),(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${k?`text-emerald-700 font-bold`:`text-slate-500`}`,children:[k?(0,p.jsx)(s,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(u,{className:`w-3 h-3 text-slate-400 shrink-0`}),(0,p.jsx)(`span`,{children:`At least 1 special character (!@#$%^&*...)`})]}),_.length>0&&(0,p.jsxs)(`div`,{className:`flex items-center gap-1.5 ${A?`text-emerald-700 font-bold`:`text-red-600 font-bold`}`,children:[A?(0,p.jsx)(s,{className:`w-3 h-3 text-emerald-600 shrink-0 stroke-[3]`}):(0,p.jsx)(u,{className:`w-3 h-3 text-red-500 shrink-0 stroke-[3]`}),(0,p.jsx)(`span`,{children:A?`Passwords match`:`Passwords do not match`})]})]})]}),(0,p.jsxs)(`button`,{type:`submit`,disabled:y||e&&(!j||!A),className:`w-full bg-[#ffcc00] hover:bg-yellow-400 border-[3px] sm:border-[4px] border-ink-black rounded-xl py-2.5 sm:py-3.5 font-window-title text-sm sm:text-base text-ink-black arcade-btn cursor-pointer disabled:opacity-50 flex items-center justify-center gap-2 uppercase font-bold tracking-wide transition-all shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none`,children:[y?`PROCESSING...`:e?`CREATE ACCOUNT`:`SIGN IN`,!y&&(0,p.jsx)(o,{className:`w-4 h-4 stroke-[3px]`})]})]}),(0,p.jsxs)(`div`,{className:`relative my-3.5 sm:my-5 select-none`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,p.jsx)(`div`,{className:`w-full border-t-[3px] border-ink-black border-dashed`})}),(0,p.jsx)(`div`,{className:`relative flex justify-center text-[9px] sm:text-[10px] uppercase font-arcade`,children:(0,p.jsx)(`span`,{className:`bg-[#fdf8e1] px-2 sm:px-3 text-trash-gray font-bold`,children:`OR CONTINUE WITH`})})]}),(0,p.jsxs)(`button`,{onClick:async()=>{try{b(!0),w(null),await d.signInWithGoogle()}catch(e){w({type:`error`,text:e.message||`Google Sign-In failed to initialize`}),b(!1)}},disabled:y,className:`w-full bg-white hover:bg-slate-100 border-[3px] border-ink-black text-ink-black font-bold py-2.5 sm:py-3 px-3 sm:px-4 rounded-xl flex items-center justify-center gap-2.5 sm:gap-3 transition-all text-[11px] sm:text-xs cursor-pointer shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none`,children:[(0,p.jsxs)(`svg`,{className:`w-4 h-4 shrink-0`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,p.jsx)(`path`,{d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`,fill:`#4285F4`}),(0,p.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`}),(0,p.jsx)(`path`,{d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z`,fill:`#FBBC05`}),(0,p.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.06l3.66 2.84c.87-2.6 3.3-4.52 6.16-4.52z`,fill:`#EA4335`})]}),`SIGN IN WITH GOOGLE`]}),(0,p.jsxs)(`button`,{onClick:()=>{d.enterSandbox()},disabled:y,className:`mt-2.5 sm:mt-3 w-full bg-[#10b981] hover:bg-emerald-600 text-white font-window-title py-2.5 sm:py-3 px-3 sm:px-4 border-[3px] border-ink-black rounded-xl flex items-center justify-center gap-2 cursor-pointer shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none uppercase font-bold text-[11px] sm:text-xs`,children:[(0,p.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,children:`sports_esports`}),`Enter Sandbox Mode (No Login)`]})]})]})]})}export{m as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/CardManager-BEhyd34f.js b/algospaced-ui/dist/assets/CardManager-BEhyd34f.js new file mode 100644 index 0000000000000000000000000000000000000000..17879c34417592e60f2f7f1660823e88950931f7 --- /dev/null +++ b/algospaced-ui/dist/assets/CardManager-BEhyd34f.js @@ -0,0 +1 @@ +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,A as n,Bt as r,Dt as i,Ht as a,M as o,P as s,St as c,T as l,X as u,a as ee,b as te,h as ne,mt as re,ot as ie,p as d,q as ae,v as f,x as oe,y as se}from"./vendor-react-hnaVBnLv.js";import{s as p}from"./firebaseClient-DZobvwSx.js";import{i as ce,l as m}from"./index-DVWZ15xt.js";var h=e(a(),1);async function g(){try{let{data:{session:e}}=await p.auth.getSession();return e?e.access_token:`sandbox`}catch{return`sandbox`}}function _(e){return e.toLowerCase().replace(/\s*-\s*method.*$/i,``).replace(/[^a-z0-9]+/g,``)}function v(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return}return e??void 0}async function le(){let e=await g(),t=ce(),n=[];try{let t=await fetch(`/api/explorer/problems`,{headers:{Authorization:`Bearer ${e}`}});t.ok&&(n=await t.json())}catch{n=[]}let r=new Map,i=new Map,a=new Set;for(let e of n)e.problem_number!==void 0&&e.problem_number!==null&&r.set(e.problem_number,e),i.set(_(e.name),e);let o=new Date,s=[];for(let e of t){let t=r.get(e.problem_number)||i.get(_(e.name));if(t){a.add(t.id);let n=t.next_review!==null&&t.next_review!==void 0||t.fsrs_state!==null&&t.fsrs_state!==void 0,r=t.next_review?new Date(t.next_review):null,i=n&&r!==null?r<=o:!1,c=v(t.solutions),l=v(t.examples),u=v(t.constraints);s.push({id:t.id,problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,description:t.description||e.description,reference_code:t.reference_code||e.reference_solution,starter_code:t.starter_code||e.starter_code,optimal_time:t.optimal_time||e.time_complexity,optimal_space:t.optimal_space||e.space_complexity,how_to_solve:t.how_to_solve||``,examples:l&&(!Array.isArray(l)||l.length>0)?l:e.examples,constraints:u&&(!Array.isArray(u)||u.length>0)?u:e.constraints,solutions:c,leetcode_url:e.leetcode_url,is_enrolled:n,is_custom:!1,fsrs_state:t.fsrs_state??(n?0:null),fsrs_step:t.fsrs_step??0,fsrs_stability:t.fsrs_stability??0,fsrs_difficulty:t.fsrs_difficulty??0,fsrs_elapsed_days:t.fsrs_elapsed_days??0,fsrs_scheduled_days:t.fsrs_scheduled_days??0,fsrs_reps:t.fsrs_reps??0,fsrs_lapses:t.fsrs_lapses??0,next_review:t.next_review??null,last_reviewed:t.last_reviewed??null,times_correct:t.times_correct??0,total_attempts:t.total_attempts??0,is_due:i,catalogProblem:e})}else s.push({id:e.id,problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,description:e.description,reference_code:e.reference_solution,starter_code:e.starter_code,optimal_time:e.time_complexity,optimal_space:e.space_complexity,how_to_solve:``,examples:e.examples,constraints:e.constraints,leetcode_url:e.leetcode_url,is_enrolled:!1,is_custom:!1,fsrs_state:null,fsrs_step:0,fsrs_stability:0,fsrs_difficulty:0,fsrs_elapsed_days:0,fsrs_scheduled_days:0,fsrs_reps:0,fsrs_lapses:0,next_review:null,last_reviewed:null,times_correct:0,total_attempts:0,is_due:!1,catalogProblem:e})}for(let e of n)if(!a.has(e.id)){let t=e.next_review!==null&&e.next_review!==void 0||e.fsrs_state!==null&&e.fsrs_state!==void 0,n=e.next_review?new Date(e.next_review):null,r=t&&n!==null?n<=o:!1,i=v(e.solutions),a=v(e.examples)||[],c=v(e.constraints)||[];s.push({id:e.id,problem_number:e.problem_number,name:e.name,pattern:e.pattern||`General`,difficulty:e.difficulty||`Medium`,description:e.description||``,reference_code:e.reference_code||``,starter_code:e.starter_code||``,optimal_time:e.optimal_time||`O(N)`,optimal_space:e.optimal_space||`O(1)`,how_to_solve:e.how_to_solve||``,examples:a,constraints:c,solutions:i,is_enrolled:t,is_custom:!0,fsrs_state:e.fsrs_state??(t?0:null),fsrs_step:e.fsrs_step??0,fsrs_stability:e.fsrs_stability??0,fsrs_difficulty:e.fsrs_difficulty??0,fsrs_elapsed_days:e.fsrs_elapsed_days??0,fsrs_scheduled_days:e.fsrs_scheduled_days??0,fsrs_reps:e.fsrs_reps??0,fsrs_lapses:e.fsrs_lapses??0,next_review:e.next_review??null,last_reviewed:e.last_reviewed??null,times_correct:e.times_correct??0,total_attempts:e.total_attempts??0,is_due:r})}return s}async function y(e){if(e.length===0)return!0;let t=await g(),n=await fetch(`/api/reviews/reset`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({problem_ids:e})});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to reset reviews`}));throw Error(e.detail||`Failed to reset reviews`)}return!0}async function b(e){let t=await g(),n=await fetch(`/api/explorer/problems/${e}`,{method:`DELETE`,headers:{Authorization:`Bearer ${t}`}});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to delete problem`}));throw Error(e.detail||`Failed to delete problem`)}return!0}async function ue(e){let t=0;for(let n of e)try{await b(n),t++}catch{}return t}async function x(e){return e.length===0?0:(await m(e)).enrolled_count}var S=r();function C({onOpenQueue:e,onOpenCreateProblem:r,onOpenEditProblem:a,onSelectProblemForReview:p,refreshTrigger:ce,onRefreshExplorer:m}){let[g,_]=(0,h.useState)([]),[v,C]=(0,h.useState)(!0),[de,w]=(0,h.useState)(null),[T,fe]=(0,h.useState)(``),[E,D]=(0,h.useState)(`all`),[O,pe]=(0,h.useState)(`ALL`),[k,me]=(0,h.useState)(`ALL`),[A,he]=(0,h.useState)(`number`),[j,M]=(0,h.useState)(`asc`),[N,P]=(0,h.useState)(new Set),[F,I]=(0,h.useState)(null),[L,R]=(0,h.useState)(`front`),[z,B]=(0,h.useState)(!1),[V,H]=(0,h.useState)(!1),[ge,U]=(0,h.useState)(null),[W,G]=(0,h.useState)(`table`),K=(0,h.useCallback)(async()=>{C(!0),w(null);try{let e=await le();_(e),e.length>0&&!F&&I(e[0].id)}catch(e){let t=e instanceof Error?e.message:`Failed to load card database`;w(t)}finally{C(!1)}},[F]);(0,h.useEffect)(()=>{K()},[K,ce]);let q=(0,h.useMemo)(()=>{let e=0,t=0,n=0,r=0,i=0,a=0;for(let o of g)if(o.is_enrolled){t++,o.is_due&&e++;let n=o.fsrs_state??0;n===1?r++:n===2?i++:n===3&&a++}else n++;return{total:g.length,due:e,enrolled:t,newCards:n,learning:r,reviewing:i,relearning:a}},[g]),_e=(0,h.useMemo)(()=>{let e=new Map;for(let t of g)e.set(t.pattern,(e.get(t.pattern)||0)+1);let t=Array.from(e.entries()).map(([e,t])=>({pattern:e,count:t}));return t.sort((e,t)=>e.pattern.localeCompare(t.pattern)),t},[g]),ve=(0,h.useMemo)(()=>{let e=T.trim().toLowerCase();return g.filter(t=>{if(E===`due`&&!t.is_due||E===`enrolled`&&!t.is_enrolled||E===`new`&&t.is_enrolled||E===`learning`&&(!t.is_enrolled||t.fsrs_state!==1)||E===`reviewing`&&(!t.is_enrolled||t.fsrs_state!==2)||E===`relearning`&&(!t.is_enrolled||t.fsrs_state!==3)||O!==`ALL`&&t.pattern!==O||k!==`ALL`&&t.difficulty!==k)return!1;if(e){let n=t.problem_number?String(t.problem_number).includes(e):!1,r=t.name.toLowerCase().includes(e),i=t.pattern.toLowerCase().includes(e),a=t.difficulty.toLowerCase().includes(e);if(!n&&!r&&!i&&!a)return!1}return!0})},[g,E,O,k,T]),J=(0,h.useMemo)(()=>{let e=[...ve];return e.sort((e,t)=>{let n=0;switch(A){case`number`:n=(e.problem_number??999999)-(t.problem_number??999999);break;case`name`:n=e.name.localeCompare(t.name);break;case`pattern`:n=e.pattern.localeCompare(t.pattern);break;case`difficulty`:{let r={Easy:1,Medium:2,Hard:3};n=(r[e.difficulty]||2)-(r[t.difficulty]||2);break}case`state`:n=(e.fsrs_state??-1)-(t.fsrs_state??-1);break;case`due`:n=(e.next_review?new Date(e.next_review).getTime():9999999999999)-(t.next_review?new Date(t.next_review).getTime():9999999999999);break;case`retention`:n=(e.total_attempts>0?e.times_correct/e.total_attempts:0)-(t.total_attempts>0?t.times_correct/t.total_attempts:0)}return j===`asc`?n:-n}),e},[ve,A,j]),Y=(0,h.useMemo)(()=>!F&&J.length>0?J[0]:g.find(e=>e.id===F)||J[0]||null,[g,F,J]),X=e=>{A===e?M(e=>e===`asc`?`desc`:`asc`):(he(e),M(`asc`))},ye=(e,t)=>{t.stopPropagation(),P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},be=(0,h.useMemo)(()=>J.length>0&&J.every(e=>N.has(e.id)),[J,N]),xe=()=>{P(e=>{let t=new Set(e);if(be)for(let e of J)t.delete(e.id);else for(let e of J)t.add(e.id);return t})},Z=(0,h.useMemo)(()=>g.filter(e=>N.has(e.id)&&e.is_custom),[g,N]),Se=async()=>{if(Z.length!==0&&confirm(`Are you sure you want to delete ${Z.length} custom cards?`)){H(!0);try{let e=await ue(Z.map(e=>e.id));U(`Deleted ${e} custom cards.`),P(e=>{let t=new Set(e);for(let e of Z)t.delete(e.id);return t}),await K(),m?.()}catch(e){let t=e instanceof Error?e.message:`Batch delete failed`;w(t)}finally{H(!1),setTimeout(()=>U(null),3500)}}},Ce=async()=>{let e=g.filter(e=>N.has(e.id)&&!e.is_enrolled&&e.catalogProblem);if(e.length===0){U(`No unenrolled catalog cards in current selection.`),setTimeout(()=>U(null),3e3);return}H(!0);try{let t=await x(e.map(e=>e.catalogProblem));U(`Enrolled ${t} cards into Daily Queue!`),P(new Set),await K(),m?.()}catch(e){let t=e instanceof Error?e.message:`Enrollment failed`;w(t)}finally{H(!1),setTimeout(()=>U(null),3500)}},we=async()=>{let e=g.filter(e=>N.has(e.id)&&e.is_enrolled);if(e.length===0){U(`No active cards in selection to reset.`),setTimeout(()=>U(null),3e3);return}H(!0);try{await y(e.map(e=>e.id)),U(`Reset ${e.length} cards to initial FSRS state due today!`),P(new Set),await K(),m?.()}catch(e){let t=e instanceof Error?e.message:`Reset failed`;w(t)}finally{H(!1),setTimeout(()=>U(null),3500)}},Te=async e=>{H(!0);try{await y([e.id]),U(`Reset #${e.problem_number??`—`} ${e.name} for FSRS!`),await K(),m?.()}catch(e){let t=e instanceof Error?e.message:`Reset failed`;w(t)}finally{H(!1),setTimeout(()=>U(null),3500)}},Ee=async e=>{if(e.catalogProblem){H(!0);try{await x([e.catalogProblem]),U(`Enrolled #${e.problem_number??`—`} ${e.name} into review queue!`),await K(),m?.()}catch(e){let t=e instanceof Error?e.message:`Enrollment failed`;w(t)}finally{H(!1),setTimeout(()=>U(null),3500)}}},De=async e=>{if(confirm(`Are you sure you want to delete custom card "${e.name}"?`)){H(!0);try{await b(e.id),U(`Deleted custom card "${e.name}"`),await K(),m?.()}catch(e){let t=e instanceof Error?e.message:`Delete failed`;w(t)}finally{H(!1),setTimeout(()=>U(null),3500)}}},Q=(0,h.useCallback)(t=>{p(t.id),e()},[p,e]),$=e=>{a({id:e.id,name:e.name,problem_number:e.problem_number,pattern:e.pattern,difficulty:e.difficulty,description:e.description,examples:e.examples,constraints:e.constraints,optimal_time:e.optimal_time,optimal_space:e.optimal_space,starter_code:e.starter_code,reference_code:e.reference_code,how_to_solve:e.how_to_solve,solutions:e.solutions})},Oe=()=>{Y?.reference_code&&(navigator.clipboard.writeText(Y.reference_code),B(!0),setTimeout(()=>B(!1),2e3))},ke=(e,t,n)=>{if(!n)return`Not enrolled`;if(!e)return`Due now`;if(t)return`Due today`;let r=new Date(e),i=new Date,a=Math.ceil((r.getTime()-i.getTime())/864e5);return a<=1?`Tomorrow`:`In ${a}d`};return(0,h.useEffect)(()=>{let e=e=>{let t=e.target;if(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable||J.length===0)return;let n=J.findIndex(e=>e.id===Y?.id);if(e.key===`ArrowDown`){e.preventDefault();let t=n0?n-1:J.length-1;I(J[t].id)}else e.key===` `||e.code===`Space`?(e.preventDefault(),R(e=>e===`front`?`back`:`front`)):e.key===`Enter`&&Y?.is_enrolled&&(e.preventDefault(),Q(Y))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[J,Y,Q]),(0,S.jsxs)(`div`,{className:`w-full h-full flex flex-col bg-[#fdf8e1] font-sans text-ink-black select-none overflow-hidden`,children:[(0,S.jsxs)(`div`,{className:`bg-slate-900 text-white border-b-[3px] border-ink-black px-4 py-2.5 flex flex-wrap items-center justify-between gap-3 shrink-0`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,S.jsx)(`div`,{className:`w-8 h-8 rounded bg-sky-500 border-2 border-white flex items-center justify-center shadow-[2px_2px_0px_0px_rgba(0,0,0,0.5)]`,children:(0,S.jsx)(ae,{className:`w-5 h-5 text-white stroke-[2.5]`})}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h1`,{className:`font-arcade text-xs sm:text-sm font-bold tracking-wider text-amber-300 uppercase flex items-center gap-1.5`,children:`MANAGE FSRS`}),(0,S.jsx)(`p`,{className:`text-[10px] text-slate-300 font-mono`,children:`Browse, filter, and reschedule spaced-repetition cards`})]})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 flex-wrap text-[10px] font-mono`,children:[(0,S.jsxs)(`button`,{onClick:()=>D(`all`),className:`px-2 py-0.5 border border-slate-700 rounded transition-colors cursor-pointer ${E===`all`?`bg-sky-500 text-white font-bold`:`bg-slate-800 text-slate-300 hover:bg-slate-700`}`,children:[`Total: `,(0,S.jsx)(`span`,{className:`font-bold`,children:q.total})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`due`),className:`px-2 py-0.5 border border-slate-700 rounded transition-colors cursor-pointer ${E===`due`?`bg-rose-500 text-white font-bold`:`bg-slate-800 text-rose-300 hover:bg-slate-700`}`,children:[`Due Today: `,(0,S.jsx)(`span`,{className:`font-bold`,children:q.due})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`enrolled`),className:`px-2 py-0.5 border border-slate-700 rounded transition-colors cursor-pointer ${E===`enrolled`?`bg-emerald-600 text-white font-bold`:`bg-slate-800 text-emerald-300 hover:bg-slate-700`}`,children:[`In Review: `,(0,S.jsx)(`span`,{className:`font-bold`,children:q.enrolled})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`learning`),className:`px-2 py-0.5 border border-slate-700 rounded transition-colors cursor-pointer ${E===`learning`?`bg-amber-500 text-slate-900 font-bold`:`bg-slate-800 text-amber-300 hover:bg-slate-700`}`,children:[`Learning: `,(0,S.jsx)(`span`,{className:`font-bold`,children:q.learning})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`reviewing`),className:`px-2 py-0.5 border border-slate-700 rounded transition-colors cursor-pointer ${E===`reviewing`?`bg-emerald-600 text-white font-bold`:`bg-slate-800 text-emerald-300 hover:bg-slate-700`}`,children:[`Review: `,(0,S.jsx)(`span`,{className:`font-bold`,children:q.reviewing})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`relearning`),className:`px-2 py-0.5 border border-slate-700 rounded transition-colors cursor-pointer ${E===`relearning`?`bg-rose-600 text-white font-bold`:`bg-slate-800 text-rose-300 hover:bg-slate-700`}`,children:[`Relearning: `,(0,S.jsx)(`span`,{className:`font-bold`,children:q.relearning})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`new`),className:`px-2 py-0.5 border border-slate-700 rounded transition-colors cursor-pointer ${E===`new`?`bg-indigo-600 text-white font-bold`:`bg-slate-800 text-indigo-300 hover:bg-slate-700`}`,children:[`Unenrolled: `,(0,S.jsx)(`span`,{className:`font-bold`,children:q.newCards})]})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`button`,{onClick:r,className:`px-2.5 py-1 bg-grass-green hover:bg-emerald-400 text-ink-black border-2 border-white rounded font-arcade text-[9px] font-bold shadow-[2px_2px_0px_0px_rgba(0,0,0,0.5)] active:translate-y-0.5 cursor-pointer flex items-center gap-1`,children:[(0,S.jsx)(re,{className:`w-3.5 h-3.5`}),(0,S.jsx)(`span`,{children:`ADD CARD`})]}),(0,S.jsx)(`button`,{onClick:K,disabled:v,className:`p-1 bg-slate-800 hover:bg-slate-700 text-slate-200 border border-slate-600 rounded cursor-pointer disabled:opacity-50`,title:`Refresh Deck`,children:(0,S.jsx)(o,{className:`w-3.5 h-3.5 ${v?`animate-spin`:``}`})})]})]}),ge&&(0,S.jsxs)(`div`,{className:`bg-amber-300 border-b-2 border-ink-black px-4 py-1.5 text-xs font-bold text-ink-black flex items-center justify-between shrink-0`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(oe,{className:`w-4 h-4 text-amber-800`}),(0,S.jsx)(`span`,{children:ge})]}),(0,S.jsx)(`button`,{onClick:()=>U(null),className:`text-xs hover:opacity-75 cursor-pointer`,children:`✕`})]}),de&&(0,S.jsxs)(`div`,{className:`bg-rose-100 border-b-2 border-rose-400 px-4 py-1.5 text-xs font-semibold text-rose-800 flex items-center justify-between shrink-0`,children:[(0,S.jsx)(`span`,{children:de}),(0,S.jsx)(`button`,{onClick:()=>w(null),className:`text-xs hover:opacity-75 cursor-pointer`,children:`✕`})]}),(0,S.jsxs)(`div`,{className:`sm:hidden flex border-b-2 border-ink-black bg-white shrink-0`,children:[(0,S.jsxs)(`button`,{onClick:()=>G(`table`),className:`flex-1 py-2 font-arcade text-[10px] font-bold text-center border-r border-ink-black ${W===`table`?`bg-amber-300 text-ink-black`:`text-slate-600`}`,children:[`CARDS LIST (`,J.length,`)`]}),(0,S.jsxs)(`button`,{onClick:()=>G(`inspector`),className:`flex-1 py-2 font-arcade text-[10px] font-bold text-center ${W===`inspector`?`bg-amber-300 text-ink-black`:`text-slate-600`}`,children:[`INSPECTOR `,Y?`#${Y.problem_number??``}`:``]})]}),(0,S.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,S.jsxs)(`aside`,{className:`w-56 bg-[#f7f0cf] border-r-[3px] border-ink-black flex flex-col shrink-0 overflow-y-auto custom-scrollbar hidden md:flex`,children:[(0,S.jsx)(`div`,{className:`p-3 border-b-2 border-ink-black/20`,children:(0,S.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase tracking-wider flex items-center gap-1.5`,children:[(0,S.jsx)(t,{className:`w-3.5 h-3.5 text-amber-700`}),` DECKS & STATES`]})}),(0,S.jsxs)(`div`,{className:`p-2 space-y-1 text-xs`,children:[(0,S.jsxs)(`button`,{onClick:()=>D(`all`),className:`w-full text-left px-2.5 py-1.5 rounded flex items-center justify-between cursor-pointer transition-colors ${E===`all`?`bg-ink-black text-amber-300 font-bold`:`hover:bg-amber-200/60 text-ink-black font-semibold`}`,children:[(0,S.jsx)(`span`,{children:`📁 All Cards`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80`,children:q.total})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`due`),className:`w-full text-left px-2.5 py-1.5 rounded flex items-center justify-between cursor-pointer transition-colors ${E===`due`?`bg-ink-black text-rose-300 font-bold`:`hover:bg-amber-200/60 text-rose-900 font-semibold`}`,children:[(0,S.jsx)(`span`,{className:`flex items-center gap-1`,children:`⏰ Due Today`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] font-bold text-rose-600`,children:q.due})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`enrolled`),className:`w-full text-left px-2.5 py-1.5 rounded flex items-center justify-between cursor-pointer transition-colors ${E===`enrolled`?`bg-ink-black text-emerald-300 font-bold`:`hover:bg-amber-200/60 text-ink-black font-semibold`}`,children:[(0,S.jsx)(`span`,{children:`📥 In Review`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80`,children:q.enrolled})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`new`),className:`w-full text-left px-2.5 py-1.5 rounded flex items-center justify-between cursor-pointer transition-colors ${E===`new`?`bg-ink-black text-sky-300 font-bold`:`hover:bg-amber-200/60 text-ink-black font-semibold`}`,children:[(0,S.jsx)(`span`,{children:`🆕 Unenrolled (Catalog)`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80`,children:q.newCards})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`learning`),className:`w-full text-left px-2.5 py-1.5 rounded flex items-center justify-between cursor-pointer transition-colors ${E===`learning`?`bg-ink-black text-amber-300 font-bold`:`hover:bg-amber-200/60 text-ink-black font-semibold`}`,children:[(0,S.jsx)(`span`,{children:`🔄 Learning (State 1)`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80`,children:q.learning})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`reviewing`),className:`w-full text-left px-2.5 py-1.5 rounded flex items-center justify-between cursor-pointer transition-colors ${E===`reviewing`?`bg-ink-black text-emerald-300 font-bold`:`hover:bg-amber-200/60 text-ink-black font-semibold`}`,children:[(0,S.jsx)(`span`,{children:`📈 Review (State 2)`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80`,children:q.reviewing})]}),(0,S.jsxs)(`button`,{onClick:()=>D(`relearning`),className:`w-full text-left px-2.5 py-1.5 rounded flex items-center justify-between cursor-pointer transition-colors ${E===`relearning`?`bg-ink-black text-rose-300 font-bold`:`hover:bg-amber-200/60 text-ink-black font-semibold`}`,children:[(0,S.jsx)(`span`,{children:`🔁 Relearning (State 3)`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80`,children:q.relearning})]})]}),(0,S.jsx)(`div`,{className:`p-3 border-t-2 border-ink-black/20`,children:(0,S.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase tracking-wider flex items-center gap-1.5`,children:[(0,S.jsx)(ne,{className:`w-3.5 h-3.5 text-purple-700`}),` PATTERNS (TAGS)`]})}),(0,S.jsxs)(`div`,{className:`p-2 space-y-0.5 text-xs flex-1`,children:[(0,S.jsxs)(`button`,{onClick:()=>pe(`ALL`),className:`w-full text-left px-2.5 py-1 rounded flex items-center justify-between cursor-pointer transition-colors ${O===`ALL`?`bg-purple-900 text-white font-bold`:`hover:bg-purple-100 text-ink-black font-semibold`}`,children:[(0,S.jsx)(`span`,{children:`All Patterns`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80`,children:g.length})]}),_e.map(({pattern:e,count:t})=>(0,S.jsxs)(`button`,{onClick:()=>pe(e),className:`w-full text-left px-2.5 py-1 rounded flex items-center justify-between cursor-pointer transition-colors text-[11px] ${O===e?`bg-purple-900 text-white font-bold`:`hover:bg-purple-100 text-ink-black`}`,children:[(0,S.jsx)(`span`,{className:`truncate`,children:e}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] opacity-80 shrink-0 ml-1`,children:t})]},e))]})]}),(0,S.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 bg-white border-r-[3px] border-ink-black ${W===`inspector`?`hidden sm:flex`:`flex`}`,children:[(0,S.jsxs)(`div`,{className:`p-3 bg-[#fdf8e1] border-b-2 border-ink-black flex flex-wrap items-center justify-between gap-2 shrink-0`,children:[(0,S.jsxs)(`div`,{className:`relative flex-1 min-w-[200px]`,children:[(0,S.jsx)(l,{className:`w-4 h-4 absolute left-2.5 top-2.5 text-slate-500`}),(0,S.jsx)(`input`,{type:`text`,value:T,onChange:e=>fe(e.target.value),placeholder:`Search by card #, title, pattern, or keyword...`,className:`w-full pl-8 pr-3 py-1.5 bg-white border-2 border-ink-black text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-sky-500 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`}),T&&(0,S.jsx)(`button`,{onClick:()=>fe(``),className:`absolute right-2.5 top-2 text-slate-400 hover:text-ink-black text-xs cursor-pointer`,children:`✕`})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`select`,{"aria-label":`Filter cards by difficulty`,value:k,onChange:e=>me(e.target.value),className:`px-2.5 py-1.5 bg-white border-2 border-ink-black text-xs font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] cursor-pointer`,children:[(0,S.jsx)(`option`,{value:`ALL`,children:`All Difficulties`}),(0,S.jsx)(`option`,{value:`Easy`,children:`Easy`}),(0,S.jsx)(`option`,{value:`Medium`,children:`Medium`}),(0,S.jsx)(`option`,{value:`Hard`,children:`Hard`})]}),(0,S.jsxs)(`span`,{className:`text-[11px] font-mono text-slate-600 font-semibold hidden lg:inline`,children:[J.length,` matching cards`]})]})]}),N.size>0&&(0,S.jsxs)(`div`,{className:`bg-sky-100 border-b-2 border-ink-black px-3 py-2 flex items-center justify-between gap-2 shrink-0 animate-in fade-in flex-wrap`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`span`,{className:`font-arcade text-[10px] font-bold text-sky-900 uppercase`,children:[N.size,` SELECTED`,Z.length>0&&` (${Z.length} custom)`]}),(0,S.jsx)(`button`,{onClick:()=>P(new Set),className:`text-xs text-sky-800 underline hover:text-sky-950 cursor-pointer`,children:`Clear`})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,S.jsxs)(`button`,{onClick:Ce,disabled:V,className:`px-3 py-1 bg-grass-green hover:bg-emerald-400 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1 disabled:opacity-50`,children:[(0,S.jsx)(ee,{className:`w-3.5 h-3.5 text-amber-900`}),(0,S.jsx)(`span`,{children:`ADD TO QUEUE`})]}),(0,S.jsxs)(`button`,{onClick:we,disabled:V,className:`px-3 py-1 bg-amber-300 hover:bg-amber-400 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1 disabled:opacity-50`,children:[(0,S.jsx)(n,{className:`w-3.5 h-3.5`}),(0,S.jsx)(`span`,{children:`RESET PROGRESS`})]}),Z.length>0&&(0,S.jsxs)(`button`,{onClick:Se,disabled:V,className:`px-3 py-1 bg-rose-200 hover:bg-rose-300 text-rose-950 font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1 disabled:opacity-50`,children:[(0,S.jsx)(d,{className:`w-3.5 h-3.5 text-rose-700`}),(0,S.jsxs)(`span`,{children:[`DELETE CUSTOM (`,Z.length,`)`]})]})]})]}),(0,S.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,S.jsxs)(`table`,{className:`w-full text-left border-collapse text-xs`,children:[(0,S.jsx)(`thead`,{className:`sticky top-0 bg-[#f4ebd0] border-b-2 border-ink-black font-arcade text-[9px] font-bold text-ink-black z-10 select-none`,children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{className:`p-2 w-8 text-center border-r border-ink-black/20`,children:(0,S.jsx)(`button`,{onClick:xe,className:`cursor-pointer flex items-center justify-center mx-auto text-ink-black`,title:`Select all matching cards`,children:be?(0,S.jsx)(te,{className:`w-4 h-4 text-sky-700`}):(0,S.jsx)(f,{className:`w-4 h-4`})})}),(0,S.jsx)(`th`,{onClick:()=>X(`number`),className:`p-2 w-16 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{children:`#`}),(0,S.jsx)(i,{className:`w-3 h-3 opacity-60`})]})}),(0,S.jsx)(`th`,{onClick:()=>X(`name`),className:`p-2 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{children:`CARD TITLE`}),(0,S.jsx)(i,{className:`w-3 h-3 opacity-60`})]})}),(0,S.jsx)(`th`,{onClick:()=>X(`pattern`),className:`p-2 hidden md:table-cell cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{children:`DECK / PATTERN`}),(0,S.jsx)(i,{className:`w-3 h-3 opacity-60`})]})}),(0,S.jsx)(`th`,{onClick:()=>X(`difficulty`),className:`p-2 w-20 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{children:`DIFF`}),(0,S.jsx)(i,{className:`w-3 h-3 opacity-60`})]})}),(0,S.jsx)(`th`,{onClick:()=>X(`state`),className:`p-2 w-24 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{children:`FSRS STATE`}),(0,S.jsx)(i,{className:`w-3 h-3 opacity-60`})]})}),(0,S.jsx)(`th`,{onClick:()=>X(`due`),className:`p-2 w-24 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{children:`DUE`}),(0,S.jsx)(i,{className:`w-3 h-3 opacity-60`})]})}),(0,S.jsx)(`th`,{onClick:()=>X(`retention`),className:`p-2 w-20 hidden lg:table-cell cursor-pointer hover:bg-amber-200/50`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{children:`RETENTION`}),(0,S.jsx)(i,{className:`w-3 h-3 opacity-60`})]})})]})}),(0,S.jsx)(`tbody`,{className:`divide-y divide-slate-200`,children:J.length===0?(0,S.jsx)(`tr`,{children:(0,S.jsx)(`td`,{colSpan:8,className:`p-8 text-center text-trash-gray font-mono`,children:`No cards match current filter criteria.`})}):J.map(e=>{let t=N.has(e.id),n=Y?.id===e.id;return(0,S.jsxs)(`tr`,{onClick:()=>{I(e.id),G(`inspector`)},onDoubleClick:()=>{e.is_enrolled?Q(e):$(e)},className:`cursor-pointer transition-colors ${n?`bg-sky-100 font-semibold`:t?`bg-amber-50`:`hover:bg-slate-50`}`,children:[(0,S.jsx)(`td`,{className:`p-2 text-center`,onClick:t=>ye(e.id,t),children:t?(0,S.jsx)(te,{className:`w-4 h-4 text-sky-600 mx-auto`}):(0,S.jsx)(f,{className:`w-4 h-4 text-slate-400 mx-auto`})}),(0,S.jsx)(`td`,{className:`p-2 font-mono text-[11px] font-bold text-slate-700`,children:e.problem_number?`#${e.problem_number}`:`—`}),(0,S.jsx)(`td`,{className:`p-2`,children:(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsx)(`span`,{className:`font-semibold text-ink-black truncate`,children:e.name}),e.is_custom&&(0,S.jsx)(`span`,{className:`px-1.5 py-0.2 rounded bg-purple-100 text-purple-800 border border-purple-300 text-[8px] font-bold uppercase shrink-0`,children:`CUSTOM`})]})}),(0,S.jsx)(`td`,{className:`p-2 hidden md:table-cell text-slate-600 text-[11px] truncate`,children:e.pattern}),(0,S.jsx)(`td`,{className:`p-2`,children:(0,S.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-arcade text-[8px] font-bold uppercase text-white ${e.difficulty===`Easy`?`bg-emerald-600`:e.difficulty===`Medium`?`bg-amber-600`:`bg-rose-600`}`,children:e.difficulty})}),(0,S.jsx)(`td`,{className:`p-2`,children:e.is_enrolled?(0,S.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-mono text-[10px] font-bold text-slate-800`,children:[(0,S.jsx)(`span`,{className:`w-2 h-2 rounded-full ${(e.fsrs_state??0)===2?`bg-emerald-500`:(e.fsrs_state??0)===1?`bg-amber-500`:(e.fsrs_state??0)===3?`bg-rose-500`:`bg-blue-500`}`}),(e.fsrs_state??0)===0?`New`:(e.fsrs_state??0)===1?`Learning`:(e.fsrs_state??0)===2?`Review`:`Relearning`]}):(0,S.jsx)(`span`,{className:`text-[10px] font-mono text-slate-400 uppercase font-semibold`,children:`Unenrolled`})}),(0,S.jsx)(`td`,{className:`p-2 font-mono text-[10px]`,children:(0,S.jsx)(`span`,{className:e.is_due?`text-rose-600 font-bold bg-rose-50 px-1 py-0.5 rounded border border-rose-200`:`text-slate-600`,children:ke(e.next_review,e.is_due,e.is_enrolled)})}),(0,S.jsx)(`td`,{className:`p-2 hidden lg:table-cell font-mono text-[10px] text-slate-600`,children:e.total_attempts>0?(0,S.jsxs)(`span`,{children:[e.times_correct,`/`,e.total_attempts,` `,(0,S.jsxs)(`span`,{className:`text-[9px] text-slate-400`,children:[`(`,Math.round(e.times_correct/e.total_attempts*100),`%)`]})]}):(0,S.jsx)(`span`,{className:`text-slate-400`,children:`—`})})]},e.id)})})]})})]}),(0,S.jsx)(`aside`,{className:`w-full sm:w-80 lg:w-96 bg-[#fdf8e1] flex flex-col shrink-0 overflow-hidden ${W===`table`?`hidden sm:flex`:`flex`}`,children:Y?(0,S.jsxs)(`div`,{className:`flex-1 flex flex-col h-full overflow-hidden`,children:[(0,S.jsxs)(`div`,{className:`p-4 bg-[#f8efcd] border-b-2 border-ink-black space-y-2 shrink-0`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-amber-900 uppercase flex items-center gap-1`,children:[(0,S.jsx)(u,{className:`w-3.5 h-3.5 text-amber-700`}),` CARD INSPECTOR`]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,S.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-arcade text-[8px] font-bold uppercase text-white ${Y.difficulty===`Easy`?`bg-emerald-600`:Y.difficulty===`Medium`?`bg-amber-600`:`bg-rose-600`}`,children:Y.difficulty}),(0,S.jsx)(`span`,{className:`font-mono text-[10px] font-bold px-1.5 py-0.5 bg-white border border-ink-black rounded`,children:Y.problem_number?`#${Y.problem_number}`:`Custom`})]})]}),(0,S.jsx)(`h3`,{className:`font-headline-md text-base font-extrabold text-ink-black leading-tight`,children:Y.name}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap text-[10px] font-mono text-slate-700`,children:[(0,S.jsx)(`span`,{className:`bg-purple-100 text-purple-900 px-2 py-0.5 rounded border border-purple-200 font-semibold`,children:Y.pattern}),Y.optimal_time&&(0,S.jsxs)(`span`,{className:`bg-slate-100 px-1.5 py-0.5 rounded border border-slate-300`,children:[`T: `,Y.optimal_time]}),Y.optimal_space&&(0,S.jsxs)(`span`,{className:`bg-slate-100 px-1.5 py-0.5 rounded border border-slate-300`,children:[`S: `,Y.optimal_space]})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 pt-2 flex-wrap`,children:[Y.is_enrolled?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{onClick:()=>Q(Y),className:`px-2.5 py-1 bg-grass-green hover:bg-emerald-400 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1`,children:[(0,S.jsx)(s,{className:`w-3 h-3 fill-ink-black`}),(0,S.jsx)(`span`,{children:`REVIEW NOW`})]}),(0,S.jsxs)(`button`,{onClick:()=>Te(Y),disabled:V,className:`px-2 py-1 bg-amber-200 hover:bg-amber-300 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1 disabled:opacity-50`,title:`Reset interval to initial FSRS state due today`,children:[(0,S.jsx)(n,{className:`w-3 h-3`}),(0,S.jsx)(`span`,{children:`RESET`})]})]}):(0,S.jsxs)(`button`,{onClick:()=>Ee(Y),disabled:V||!Y.catalogProblem,className:`px-2.5 py-1 bg-sky-400 hover:bg-sky-300 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1 disabled:opacity-50`,children:[(0,S.jsx)(re,{className:`w-3 h-3`}),(0,S.jsx)(`span`,{children:`ENROLL CARD`})]}),(0,S.jsxs)(`button`,{onClick:()=>$(Y),className:`px-2 py-1 bg-white hover:bg-slate-100 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1`,children:[(0,S.jsx)(se,{className:`w-3 h-3`}),(0,S.jsx)(`span`,{children:`EDIT`})]}),Y.is_custom&&(0,S.jsxs)(`button`,{onClick:()=>De(Y),disabled:V,className:`px-2 py-1 bg-rose-200 hover:bg-rose-300 text-rose-950 font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 cursor-pointer flex items-center gap-1 disabled:opacity-50`,children:[(0,S.jsx)(d,{className:`w-3 h-3 text-rose-700`}),(0,S.jsx)(`span`,{children:`DELETE`})]})]})]}),(0,S.jsxs)(`div`,{className:`flex border-b-2 border-ink-black bg-white shrink-0`,children:[(0,S.jsx)(`button`,{onClick:()=>R(`front`),className:`flex-1 py-1.5 font-arcade text-[9px] font-bold text-center border-r border-ink-black/20 cursor-pointer ${L===`front`?`bg-amber-300 text-ink-black`:`text-slate-600 hover:bg-slate-50`}`,children:`QUESTION`}),(0,S.jsx)(`button`,{onClick:()=>R(`back`),className:`flex-1 py-1.5 font-arcade text-[9px] font-bold text-center border-r border-ink-black/20 cursor-pointer ${L===`back`?`bg-amber-300 text-ink-black`:`text-slate-600 hover:bg-slate-50`}`,children:`SHOW ANSWER`}),(0,S.jsx)(`button`,{onClick:()=>R(`stats`),className:`flex-1 py-1.5 font-arcade text-[9px] font-bold text-center cursor-pointer ${L===`stats`?`bg-amber-300 text-ink-black`:`text-slate-600 hover:bg-slate-50`}`,children:`SRS INFO`})]}),(0,S.jsxs)(`div`,{className:`flex-1 p-4 overflow-y-auto custom-scrollbar space-y-4`,children:[L===`front`&&(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-trash-gray uppercase block mb-1`,children:`PROBLEM DESCRIPTION`}),(0,S.jsx)(`div`,{className:`p-3 bg-white border-2 border-ink-black text-xs font-semibold leading-relaxed shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] whitespace-pre-wrap`,children:Y.description||`No description provided.`})]}),Y.examples&&(!Array.isArray(Y.examples)||Y.examples.length>0)&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-trash-gray uppercase block mb-1`,children:`EXAMPLES`}),(0,S.jsx)(`div`,{className:`space-y-1.5`,children:Array.isArray(Y.examples)?Y.examples.map((e,t)=>typeof e==`string`?(0,S.jsx)(`div`,{className:`p-2 bg-white border border-slate-300 text-[11px] font-mono`,children:e},t):(0,S.jsxs)(`div`,{className:`p-2 bg-white border border-slate-300 text-[11px] font-mono space-y-0.5`,children:[e.input&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-bold text-slate-700`,children:`Input:`}),` `,e.input]}),e.output&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-bold text-slate-700`,children:`Output:`}),` `,e.output]}),e.explanation&&(0,S.jsx)(`div`,{className:`text-slate-500 italic text-[10px]`,children:e.explanation})]},t)):(0,S.jsx)(`div`,{className:`p-2 bg-white border border-slate-300 text-[11px] font-mono`,children:String(Y.examples)})})]}),Y.constraints&&(!Array.isArray(Y.constraints)||Y.constraints.length>0)&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-trash-gray uppercase block mb-1`,children:`CONSTRAINTS`}),(0,S.jsx)(`div`,{className:`p-2.5 bg-slate-50 border border-slate-300 text-[11px] font-mono space-y-1 text-slate-700`,children:Array.isArray(Y.constraints)?Y.constraints.map((e,t)=>(0,S.jsxs)(`div`,{children:[`• `,e]},t)):(0,S.jsxs)(`div`,{children:[`• `,String(Y.constraints)]})})]})]}),L===`back`&&(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-trash-gray uppercase`,children:`REFERENCE SOLUTION (PYTHON)`}),Y.reference_code&&(0,S.jsxs)(`button`,{onClick:Oe,className:`px-2 py-0.5 bg-white hover:bg-slate-100 text-ink-black border border-ink-black text-[9px] font-bold rounded flex items-center gap-1 cursor-pointer`,children:[z?(0,S.jsx)(c,{className:`w-3 h-3 text-emerald-600`}):(0,S.jsx)(ie,{className:`w-3 h-3`}),(0,S.jsx)(`span`,{children:z?`COPIED!`:`COPY`})]})]}),(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsx)(`pre`,{className:`p-3 bg-slate-900 text-emerald-400 font-mono text-[11px] rounded border-2 border-ink-black overflow-x-auto shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:(0,S.jsx)(`code`,{children:Y.reference_code||`# No reference code available.`})})}),Y.how_to_solve&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-trash-gray uppercase block mb-1`,children:`HOW TO SOLVE & STRATEGY`}),(0,S.jsx)(`div`,{className:`p-2.5 bg-white border border-slate-300 text-xs font-semibold leading-relaxed`,children:Y.how_to_solve})]})]}),L===`stats`&&(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(`div`,{className:`p-3 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-2`,children:[(0,S.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase block border-b pb-1`,children:`FSRS REVIEW STATE`}),(0,S.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-xs`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-[10px] text-trash-gray font-semibold`,children:`Current State`}),(0,S.jsx)(`div`,{className:`font-arcade text-base font-bold text-sky-700`,children:Y.is_enrolled?(Y.fsrs_state??0)===0?`New (0)`:(Y.fsrs_state??0)===1?`Learning (1)`:(Y.fsrs_state??0)===2?`Review (2)`:`Relearning (3)`:`Unenrolled`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-[10px] text-trash-gray font-semibold`,children:`Status`}),(0,S.jsx)(`div`,{className:`font-arcade text-xs font-bold text-emerald-700`,children:Y.is_due?`Due Today`:Y.is_enrolled?`Scheduled`:`Catalog New`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-[10px] text-trash-gray font-semibold`,children:`Stability`}),(0,S.jsx)(`div`,{className:`font-mono text-sm font-bold text-slate-800`,children:Y.fsrs_stability===void 0?`0.0d`:`${Y.fsrs_stability.toFixed(1)}d`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-[10px] text-trash-gray font-semibold`,children:`Difficulty`}),(0,S.jsx)(`div`,{className:`font-mono text-sm font-bold text-amber-700`,children:Y.fsrs_difficulty===void 0?`0.0/10`:`${Y.fsrs_difficulty.toFixed(1)}/10`})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-[10px] text-trash-gray font-semibold`,children:`Total Attempts`}),(0,S.jsx)(`div`,{className:`font-mono text-sm font-bold text-slate-800`,children:Y.total_attempts})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`text-[10px] text-trash-gray font-semibold`,children:`Times Correct`}),(0,S.jsx)(`div`,{className:`font-mono text-sm font-bold text-emerald-600`,children:Y.times_correct})]}),(0,S.jsxs)(`div`,{className:`col-span-2 pt-1 border-t border-slate-200`,children:[(0,S.jsx)(`div`,{className:`text-[10px] text-trash-gray font-semibold`,children:`Retention Success Rate`}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,S.jsx)(`div`,{className:`flex-1 h-3 bg-slate-200 rounded-full overflow-hidden border border-slate-300`,children:(0,S.jsx)(`div`,{className:`h-full bg-emerald-500 rounded-full`,style:{width:`${Y.total_attempts>0?Math.round(Y.times_correct/Y.total_attempts*100):0}%`}})}),(0,S.jsx)(`span`,{className:`font-mono text-xs font-bold text-slate-800`,children:Y.total_attempts>0?`${Math.round(Y.times_correct/Y.total_attempts*100)}%`:`0%`})]})]})]})]}),(0,S.jsxs)(`div`,{className:`p-3 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-1.5 text-xs`,children:[(0,S.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase block border-b pb-1`,children:`TIMESTAMPS`}),(0,S.jsxs)(`div`,{className:`flex items-center justify-between text-slate-700`,children:[(0,S.jsx)(`span`,{className:`text-[11px] font-semibold`,children:`Next Review:`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px]`,children:Y.next_review?new Date(Y.next_review).toLocaleString():`Not scheduled`})]}),(0,S.jsxs)(`div`,{className:`flex items-center justify-between text-slate-700`,children:[(0,S.jsx)(`span`,{className:`text-[11px] font-semibold`,children:`Last Reviewed:`}),(0,S.jsx)(`span`,{className:`font-mono text-[10px]`,children:Y.last_reviewed?new Date(Y.last_reviewed).toLocaleString():`Never`})]})]})]})]})]}):(0,S.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-6 text-center text-trash-gray font-mono text-xs`,children:`Select a card to view its Front, Back, and SRS details.`})})]})]})}export{C as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/CreateProblemForm-Cej3QR08.js b/algospaced-ui/dist/assets/CreateProblemForm-Ccz3TNzp.js similarity index 99% rename from algospaced-ui/dist/assets/CreateProblemForm-Cej3QR08.js rename to algospaced-ui/dist/assets/CreateProblemForm-Ccz3TNzp.js index 44bc15557fd65826d8b6ae3ada5d4961a666ed3e..ed57a8c72782c9a8e932f8eecebd6366fd3a83ef 100644 --- a/algospaced-ui/dist/assets/CreateProblemForm-Cej3QR08.js +++ b/algospaced-ui/dist/assets/CreateProblemForm-Ccz3TNzp.js @@ -1,4 +1,4 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Rt as n}from"./vendor-react-CIO8MTK1.js";import{s as r}from"./firebaseClient-DZobvwSx.js";var i=e(t(),1),a=n(),o=[`Arrays & Hashing`,`Two Pointers`,`Sliding Window`,`Stack`,`Binary Search`,`Linked List`,`Trees`,`Tries`,`Heap / Priority Queue`,`Backtracking`,`Graphs`,`Advanced Graphs`,`1-D Dynamic Programming`,`2-D Dynamic Programming`,`Greedy`,`Intervals`,`Math & Geometry`,`Bit Manipulation`];function s(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`sol-${crypto.randomUUID()}`:`sol-${Date.now()}`}function c({onClose:e,onSuccess:t,initialProblem:n,mode:c=n?`edit`:`create`}){let l=c===`edit`||!!n,[u,d]=(0,i.useState)(`form`),[f,p]=(0,i.useState)(``),[ee,m]=(0,i.useState)(!1),[h,g]=(0,i.useState)(()=>{if(n?.name)return n.name;try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).name||``}catch{}return``}),[_,v]=(0,i.useState)(()=>n?.problem_number!==void 0&&n?.problem_number!==null?n.problem_number:``),[y,b]=(0,i.useState)(()=>{if(n?.pattern)return n.pattern;try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).pattern||``}catch{}return`Arrays & Hashing`}),[x,S]=(0,i.useState)(()=>n?.difficulty===`Easy`||n?.difficulty===`Medium`||n?.difficulty===`Hard`?n.difficulty:`Medium`),[C,w]=(0,i.useState)(()=>n?.optimal_time||`O(N)`),[T,E]=(0,i.useState)(()=>n?.optimal_space||`O(1)`),[D,O]=(0,i.useState)(()=>n?.description||``),[k,A]=(0,i.useState)(()=>n?.examples&&Array.isArray(n.examples)&&n.examples.length>0?n.examples.map(e=>typeof e==`string`?{input:e,output:``,explanation:``}:{input:String(e?.input??``),output:String(e?.output??``),explanation:e?.explanation||``}):[{input:``,output:``,explanation:``}]),[j,M]=(0,i.useState)(()=>n?.constraints?Array.isArray(n.constraints)?n.constraints.join(` +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Ht as n}from"./vendor-react-hnaVBnLv.js";import{s as r}from"./firebaseClient-DZobvwSx.js";var i=e(n(),1),a=t(),o=[`Arrays & Hashing`,`Two Pointers`,`Sliding Window`,`Stack`,`Binary Search`,`Linked List`,`Trees`,`Tries`,`Heap / Priority Queue`,`Backtracking`,`Graphs`,`Advanced Graphs`,`1-D Dynamic Programming`,`2-D Dynamic Programming`,`Greedy`,`Intervals`,`Math & Geometry`,`Bit Manipulation`];function s(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`sol-${crypto.randomUUID()}`:`sol-${Date.now()}`}function c({onClose:e,onSuccess:t,initialProblem:n,mode:c=n?`edit`:`create`}){let l=c===`edit`||!!n,[u,d]=(0,i.useState)(`form`),[f,p]=(0,i.useState)(``),[ee,m]=(0,i.useState)(!1),[h,g]=(0,i.useState)(()=>{if(n?.name)return n.name;try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).name||``}catch{}return``}),[_,v]=(0,i.useState)(()=>n?.problem_number!==void 0&&n?.problem_number!==null?n.problem_number:``),[y,b]=(0,i.useState)(()=>{if(n?.pattern)return n.pattern;try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).pattern||``}catch{}return`Arrays & Hashing`}),[x,S]=(0,i.useState)(()=>n?.difficulty===`Easy`||n?.difficulty===`Medium`||n?.difficulty===`Hard`?n.difficulty:`Medium`),[C,w]=(0,i.useState)(()=>n?.optimal_time||`O(N)`),[T,E]=(0,i.useState)(()=>n?.optimal_space||`O(1)`),[D,O]=(0,i.useState)(()=>n?.description||``),[k,A]=(0,i.useState)(()=>n?.examples&&Array.isArray(n.examples)&&n.examples.length>0?n.examples.map(e=>typeof e==`string`?{input:e,output:``,explanation:``}:{input:String(e?.input??``),output:String(e?.output??``),explanation:e?.explanation||``}):[{input:``,output:``,explanation:``}]),[j,M]=(0,i.useState)(()=>n?.constraints?Array.isArray(n.constraints)?n.constraints.join(` `):String(n.constraints):``),[te,ne]=(0,i.useState)(()=>n?.how_to_solve||``),[N,P]=(0,i.useState)(()=>{if(n?.reference_code)return n.reference_code;try{let e=localStorage.getItem(`algospaced_prefill_draft`);if(e)return JSON.parse(e).code||``}catch{}return``}),[F,I]=(0,i.useState)(()=>{if(n?.solutions&&Array.isArray(n.solutions)&&n.solutions.length>0)return n.solutions.map((e,t)=>({id:e.id||`sol-${t+1}`,name:e.name||`Method ${t+1}`,pattern:e.pattern||n.pattern||`Arrays & Hashing`,time_complexity:e.time_complexity||n.optimal_time||`O(N)`,space_complexity:e.space_complexity||n.optimal_space||`O(1)`,code:e.code||``,explanation:e.explanation||``,is_optimal:e.is_optimal??t===0}));let e=n?.reference_code||``,t=n?.pattern||`Arrays & Hashing`;try{let n=localStorage.getItem(`algospaced_prefill_draft`);if(n){let r=JSON.parse(n);r.code&&!e&&(e=r.code),r.pattern&&!t&&(t=r.pattern)}}catch{}return[{id:`sol-1`,name:`Optimal Method`,pattern:t,time_complexity:n?.optimal_time||`O(N)`,space_complexity:n?.optimal_space||`O(1)`,code:e,explanation:n?.how_to_solve||``,is_optimal:!0}]}),[L,R]=(0,i.useState)(0),z=F[L]||F[0]||{id:`sol-1`,name:`Method 1`,pattern:`Arrays & Hashing`,time_complexity:`O(N)`,space_complexity:`O(1)`,code:``,explanation:``,is_optimal:!0},B=e=>{I(t=>{let n=[...t],r=L{t!==r&&(e.is_optimal=!1)}),n[r].time_complexity&&w(n[r].time_complexity),n[r].space_complexity&&E(n[r].space_complexity),n[r].pattern&&b(n[r].pattern)),n})},re=()=>{let e=F.length+1,t={id:s(),name:`Method ${e}`,pattern:y||`Arrays & Hashing`,time_complexity:`O(N)`,space_complexity:`O(1)`,code:``,explanation:``,is_optimal:F.length===0};I(e=>[...e,t]),R(F.length)},ie=e=>{F.length<=1||(I(t=>{let n=t.filter((t,n)=>n!==e);return n.some(e=>e.is_optimal)||(n[0].is_optimal=!0),n}),L>=F.length-1&&R(Math.max(0,F.length-2)))},[V,ae]=(0,i.useState)(!0),[H,U]=(0,i.useState)(``),[W,G]=(0,i.useState)(``),[K,q]=(0,i.useState)(!1),[J,Y]=(0,i.useState)(!1),[X,Z]=(0,i.useState)(!1),[oe,se]=(0,i.useState)(!1);i.useEffect(()=>{l||localStorage.removeItem(`algospaced_prefill_draft`)},[l]);let Q=async()=>{let{data:{session:e}}=await r.auth.getSession(),t=e?e.access_token:`sandbox`,n=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,i=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`,a={"Content-Type":`application/json`,Authorization:`Bearer ${t}`};return i&&i!=="default"&&n&&n.trim()&&(a[`x-custom-api-key`]=n.trim(),a[`x-gemini-api-key`]=n.trim(),a[`x-ai-provider`]=i),a},ce=async()=>{if(f.trim()){m(!0),U(``);try{let e=await Q(),t=await fetch(`/api/explorer/problems/fetch-leetcode`,{method:`POST`,headers:e,body:JSON.stringify({query:f.trim()})});if(t.ok){let e=await t.json();e.problem_number!==void 0&&e.problem_number!==null&&v(e.problem_number),e.title&&g(e.title),e.difficulty&&S(e.difficulty),e.pattern&&b(e.pattern),e.optimal_time&&w(e.optimal_time),e.optimal_space&&E(e.optimal_space),e.description&&O(e.description),e.how_to_solve&&ne(e.how_to_solve),e.starter_code&&!N.trim()&&P(e.starter_code),I(t=>{let n=[...t],r={...n[L]};return e.pattern&&(r.pattern=e.pattern),e.optimal_time&&(r.time_complexity=e.optimal_time),e.optimal_space&&(r.space_complexity=e.optimal_space),e.how_to_solve&&(r.explanation=e.how_to_solve),e.starter_code&&!r.code?.trim()&&(r.code=e.starter_code),n[L]=r,n}),Array.isArray(e.examples)&&e.examples.length>0&&A(e.examples),Array.isArray(e.constraints)?M(e.constraints.join(` `)):typeof e.constraints==`string`&&M(e.constraints)}else{let e=await t.json();U(e.detail||`Failed to fetch LeetCode problem data.`)}}catch{U(`Fetch request failed due to connection error.`)}finally{m(!1)}}},le=async()=>{let e=z.code||N;if(h.trim()||e.trim()){se(!0),U(``);try{let t=await Q(),n=await fetch(`/api/explorer/problems/prefill`,{method:`POST`,headers:t,body:JSON.stringify({name:h,code:e})});if(n.ok){let t=await n.json();t.problem_number!==void 0&&t.problem_number!==null&&v(t.problem_number),t.title&&!h&&g(t.title),t.pattern&&b(t.pattern),t.difficulty&&S(t.difficulty),t.optimal_time&&w(t.optimal_time),t.optimal_space&&E(t.optimal_space),t.description&&O(t.description),t.reference_code&&!e.trim()&&P(t.reference_code),I(e=>{let n=[...e],r={...n[L]};return t.pattern&&(r.pattern=t.pattern),t.optimal_time&&(r.time_complexity=t.optimal_time),t.optimal_space&&(r.space_complexity=t.optimal_space),t.reference_code&&!r.code?.trim()&&(r.code=t.reference_code),n[L]=r,n})}else{let e=await n.json();U(e.detail||`Prefill failed.`)}}catch{U(`Prefill request failed due to connection error.`)}finally{se(!1)}}},ue=async()=>{let e=z.code||N;if(!h.trim()&&!e.trim()){U(`Please enter a problem name or code first.`);return}Y(!0),U(``);try{let t=await Q(),n=await fetch(`/api/explorer/problems/assist-field`,{method:`POST`,headers:t,body:JSON.stringify({field:`intuition`,title:h,code:e,description:D})});if(n.ok){let e=await n.json();e.how_to_solve&&(ne(e.how_to_solve),B({explanation:e.how_to_solve}))}else{let e=await n.json();U(e.detail||`Failed to generate intuition.`)}}catch{U(`Intuition generator failed due to connection error.`)}finally{Y(!1)}},de=async()=>{let e=z.code||N;if(!e.trim()){U(`Please enter some Python code to format.`);return}Z(!0),U(``);try{let t=await Q(),n=await fetch(`/api/explorer/problems/assist-field`,{method:`POST`,headers:t,body:JSON.stringify({field:`comments`,title:h,code:e})});if(n.ok){let e=await n.json();e.formatted_code&&(P(e.formatted_code),B({code:e.formatted_code}))}else{let e=await n.json();U(e.detail||`Failed to format code.`)}}catch{U(`Code formatter failed due to connection error.`)}finally{Z(!1)}},fe=async r=>{if(r.preventDefault(),!h.trim()){U(`Problem name cannot be empty`);return}q(!0),U(``),G(``);try{let r=await Q(),i=j.split(` `).map(e=>e.trim()).filter(Boolean),a=F.find(e=>e.is_optimal)||F[0],o=a?.pattern||y.trim()||`General`,s=a?.code||N,c=a?.explanation||te,u=C||a?.time_complexity||`O(N)`,d=T||a?.space_complexity||`O(1)`,f;if(l&&n){let e=n.id||(n.problem_number?String(n.problem_number):``)||h.trim();f=await fetch(`/api/explorer/problems/${encodeURIComponent(e)}`,{method:`PUT`,headers:r,body:JSON.stringify({name:h.trim(),pattern:o,difficulty:x,reference_code:s,description:D,problem_number:_===``?null:Number(_),optimal_time:u,optimal_space:d,examples:k.filter(e=>e.input.trim()||e.output.trim()),constraints:i,how_to_solve:c,solutions:F})})}else f=await fetch(`/api/explorer/problems/create`,{method:`POST`,headers:r,body:JSON.stringify({name:h.trim(),pattern:o,difficulty:x,reference_code:s,description:D,problem_number:_===``?null:Number(_),optimal_time:u,optimal_space:d,examples:k.filter(e=>e.input.trim()||e.output.trim()),constraints:i,how_to_solve:c,sync_to_gdoc:V,solutions:F})});let p=await f.json();f.ok&&(p.success||p.problem_id)?(G(l?`Problem updated successfully!`:`Problem saved and synced successfully!`),setTimeout(()=>{t(),e()},1e3)):U(p.detail||(l?`Failed to update problem.`:`Failed to create problem.`))}catch{U(`Connection timed out.`)}finally{q(!1)}},pe=()=>{A([...k,{input:``,output:``,explanation:``}])},me=e=>{k.length<=1||A(k.filter((t,n)=>n!==e))},$=(e,t,n)=>{let r=[...k];r[e]={...r[e],[t]:n},A(r)};return(0,a.jsxs)(`form`,{onSubmit:fe,className:`flex flex-col h-full bg-[#fdf8e1] text-ink-black font-sans overflow-hidden`,children:[(0,a.jsxs)(`div`,{className:`bg-[#f0e6c8] p-2.5 border-b-2 border-ink-black flex flex-col gap-2 shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`font-arcade text-xs text-primary-purple`,children:`✦`}),(0,a.jsx)(`h2`,{className:`text-xs font-bold font-arcade tracking-tight uppercase`,children:l?`Edit Problem Specification`:`Problem & Note Studio`}),l&&(0,a.jsx)(`span`,{className:`text-[9px] bg-primary-purple/10 text-primary-purple font-mono px-1.5 py-0.5 rounded border border-primary-purple/30 font-bold`,children:`EDIT MODE`})]}),(0,a.jsxs)(`div`,{className:`flex border-2 border-ink-black bg-white rounded overflow-hidden shadow-[1px_1px_0px_#1E293B]`,children:[(0,a.jsx)(`button`,{type:`button`,onClick:()=>d(`form`),className:`px-3 py-1 text-[10px] font-bold uppercase transition-colors ${u===`form`?`bg-primary-purple text-white`:`hover:bg-slate-100`}`,children:`✏️ Editor`}),(0,a.jsx)(`button`,{type:`button`,onClick:()=>d(`preview`),className:`px-3 py-1 text-[10px] font-bold uppercase transition-colors ${u===`preview`?`bg-primary-purple text-white`:`hover:bg-slate-100`}`,children:`📄 Doc Preview`})]})]}),(0,a.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,a.jsx)(`input`,{type:`text`,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),ce())},placeholder:`Paste LeetCode URL (e.g. https://leetcode.com/problems/two-sum/) or Title...`,className:`flex-1 bg-white border-2 border-ink-black px-2 py-1 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-medium`}),(0,a.jsxs)(`button`,{type:`button`,onClick:ce,disabled:ee||!f.trim(),className:`bg-[#ffe24c] hover:bg-yellow-300 disabled:opacity-50 text-ink-black font-arcade text-[9px] font-bold px-2.5 py-1.5 border-2 border-ink-black shadow-[1px_1px_0px_#1E293B] active:translate-y-0.5 cursor-pointer flex items-center gap-1 shrink-0`,children:[(0,a.jsx)(`span`,{children:`⚡`}),` `,ee?`FETCHING...`:`FETCH LEETCODE`]})]})]}),H&&(0,a.jsxs)(`div`,{className:`mx-3 mt-2 p-2 border-2 border-red-500 bg-red-50 text-red-800 text-[11px] font-mono leading-relaxed shrink-0`,children:[`⚠️ `,H]}),W&&(0,a.jsxs)(`div`,{className:`mx-3 mt-2 p-2 border-2 border-green-500 bg-green-50 text-green-800 text-[11px] font-mono leading-relaxed shrink-0`,children:[`✅ `,W]}),(0,a.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar p-3 space-y-3`,children:u===`form`?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`div`,{className:`grid grid-cols-12 gap-2`,children:[(0,a.jsxs)(`div`,{className:`col-span-3 flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Problem #:`}),(0,a.jsx)(`input`,{type:`number`,value:_,onChange:e=>v(e.target.value===``?``:Number(e.target.value)),placeholder:`e.g. 1`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-bold`})]}),(0,a.jsxs)(`div`,{className:`col-span-6 flex flex-col gap-1`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Title:`}),(0,a.jsxs)(`button`,{type:`button`,onClick:le,disabled:oe||!h.trim()&&!z.code?.trim(),className:`text-[8px] font-arcade font-bold px-1.5 py-0.5 border border-ink-black bg-[#ffe24c] hover:bg-yellow-300 disabled:opacity-50 flex items-center gap-1 cursor-pointer`,children:[(0,a.jsx)(`span`,{children:`✦`}),` `,oe?`...`:`AUTO-FILL`]})]}),(0,a.jsx)(`input`,{type:`text`,required:!0,value:h,onChange:e=>g(e.target.value),placeholder:`e.g. Two Sum`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-bold`})]}),(0,a.jsxs)(`div`,{className:`col-span-3 flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Difficulty:`}),(0,a.jsxs)(`select`,{value:x,onChange:e=>S(e.target.value),className:`border-2 border-ink-black p-1.5 text-xs font-bold outline-none cursor-pointer ${x===`Easy`?`bg-emerald-100 text-emerald-900`:x===`Medium`?`bg-amber-100 text-amber-900`:`bg-rose-100 text-rose-900`}`,children:[(0,a.jsx)(`option`,{value:`Easy`,children:`Easy`}),(0,a.jsx)(`option`,{value:`Medium`,children:`Medium`}),(0,a.jsx)(`option`,{value:`Hard`,children:`Hard`})]})]})]}),(0,a.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 bg-[#f6edd2] p-2 border-2 border-ink-black rounded`,children:[(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,a.jsxs)(`label`,{className:`text-[10px] font-bold text-slate-700 uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`⏱️`}),` Target Optimal Time:`]}),(0,a.jsx)(`span`,{className:`text-[8px] font-mono text-slate-500`,children:`(hidden behind spoiler on review)`})]}),(0,a.jsx)(`input`,{type:`text`,value:C,onChange:e=>w(e.target.value),placeholder:`e.g. O(N)`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-mono font-bold`})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,a.jsxs)(`label`,{className:`text-[10px] font-bold text-slate-700 uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`📦`}),` Target Optimal Space:`]}),(0,a.jsx)(`span`,{className:`text-[8px] font-mono text-slate-500`,children:`(hidden behind spoiler on review)`})]}),(0,a.jsx)(`input`,{type:`text`,value:T,onChange:e=>E(e.target.value),placeholder:`e.g. O(1)`,className:`bg-white border-2 border-ink-black p-1.5 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-mono font-bold`})]})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Problem Description:`}),(0,a.jsx)(`textarea`,{value:D,onChange:e=>O(e.target.value),placeholder:`Given an array of integers nums and an integer target...`,className:`bg-white border-2 border-ink-black p-2 text-xs outline-none focus:ring-1 focus:ring-primary-purple font-sans h-20 resize-y leading-relaxed`})]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1.5 bg-[#f6edd2] p-2.5 border-2 border-ink-black rounded`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsxs)(`label`,{className:`text-[10px] font-bold text-slate-700 uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`🧪`}),` Examples (`,k.length,`)`]}),(0,a.jsx)(`button`,{type:`button`,onClick:pe,className:`text-[9px] font-bold px-2 py-0.5 border border-ink-black bg-white hover:bg-slate-100 cursor-pointer shadow-[1px_1px_0px_#1E293B]`,children:`+ Add Example`})]}),k.map((e,t)=>(0,a.jsxs)(`div`,{className:`bg-white border border-ink-black p-2 space-y-1.5 rounded relative text-xs`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,a.jsxs)(`span`,{className:`font-bold text-[10px] text-slate-500`,children:[`Example `,t+1,`:`]}),k.length>1&&(0,a.jsx)(`button`,{type:`button`,onClick:()=>me(t),className:`text-[10px] text-red-600 hover:text-red-800 font-bold cursor-pointer`,children:`✕`})]}),(0,a.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,a.jsx)(`input`,{type:`text`,value:e.input,onChange:e=>$(t,`input`,e.target.value),placeholder:`Input: nums = [2,7,11,15], target = 9`,className:`bg-slate-50 border border-slate-300 p-1 text-[11px] font-mono outline-none`}),(0,a.jsx)(`input`,{type:`text`,value:e.output,onChange:e=>$(t,`output`,e.target.value),placeholder:`Output: [0,1]`,className:`bg-slate-50 border border-slate-300 p-1 text-[11px] font-mono outline-none`})]}),(0,a.jsx)(`input`,{type:`text`,value:e.explanation||``,onChange:e=>$(t,`explanation`,e.target.value),placeholder:`Explanation (Optional): Because nums[0] + nums[1] == 9, we return [0, 1].`,className:`bg-slate-50 border border-slate-300 p-1 text-[11px] outline-none w-full`})]},t))]}),(0,a.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,a.jsx)(`label`,{className:`text-[10px] font-bold text-slate-600 uppercase`,children:`Constraints (1 per line):`}),(0,a.jsx)(`textarea`,{value:j,onChange:e=>M(e.target.value),placeholder:`2 <= nums.length <= 10^4 diff --git a/algospaced-ui/dist/assets/FileExplorer-CJE9LlAj.js b/algospaced-ui/dist/assets/FileExplorer-CJE9LlAj.js deleted file mode 100644 index f0097193f9dfb283ba66a2e2023b61b22dff7116..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/FileExplorer-CJE9LlAj.js +++ /dev/null @@ -1,3 +0,0 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Rt as n}from"./vendor-react-CIO8MTK1.js";import{s as r}from"./firebaseClient-DZobvwSx.js";var i=e(t(),1),a=n(),o=[{name:`Retro Arcade Grid.img`,url:`/wallpapers/default.webp`,desc:`Default AlgoSpaced purple grid and pixel theme background.`},{name:`Classic Board Logo.img`,url:`/icons/computer.webp`,desc:`System info and arcade machine diagram wallpaper.`},{name:`Terminal Console Icon.img`,url:`/icons/terminal.webp`,desc:`Dark retro CRT terminal screen layout.`},{name:`Synthwave Sunset Grid.img`,url:`https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=1000&auto=format&fit=crop`,desc:`Glowing neon grids and vector mountains styling.`},{name:`Matrix Code Rain.img`,url:`https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?q=80&w=1000&auto=format&fit=crop`,desc:`Falling green digital characters rain.`}];function s({onSetWallpaper:e,activeWallpaperUrl:t,onOpenCreateProblem:n,onOpenQueue:s,onOpenJourney:c,refreshTrigger:l}){let[u,d]=(0,i.useState)([`C:`]),[f,p]=(0,i.useState)([]),[m,h]=(0,i.useState)(!0),[g,_]=(0,i.useState)(null),v=i.useMemo(()=>{let e=[...o],t=localStorage.getItem(`customWallpaperUrl`),n=localStorage.getItem(`customWallpaperName`)||`Custom Wallpaper.img`;return t&&(e.some(e=>e.url===t)||e.push({name:n,url:t,desc:`User uploaded custom background wallpaper.`})),e},[t]),[y,ee]=(0,i.useState)(``),[b,te]=(0,i.useState)(`All`),[x,S]=(0,i.useState)(`All`),[C,w]=(0,i.useState)(!1),[ne,T]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),[O,k]=(0,i.useState)(``),[A,j]=(0,i.useState)(``),re=async e=>{let t=e.target.files;if(!t||t.length===0)return;let n=t[0];e.target.value=``,D(!0),k(``),j(``);try{let{data:{session:e}}=await r.auth.getSession(),t=e?e.access_token:`sandbox`,i=new FormData;i.append(`file`,n);let a=await fetch(`/api/explorer/import`,{method:`POST`,headers:{Authorization:`Bearer ${t}`},body:i}),o=await a.json();a.ok?(j(o.message||`Problems imported successfully!`),setTimeout(()=>{q()},500),setTimeout(()=>{T(!1),j(``)},2e3)):k(o.detail||`Import failed. Verify the file format.`)}catch{k(`Import failed due to a network error.`)}finally{D(!1)}},[M,N]=(0,i.useState)(null),[P,F]=(0,i.useState)(`description`),[I,L]=(0,i.useState)(!1),[R,z]=(0,i.useState)(``),[B,V]=(0,i.useState)(``),[H,U]=(0,i.useState)(!1),[W,G]=(0,i.useState)(!1),[ie,K]=(0,i.useState)(!1),q=async()=>{h(!0);try{let{data:{session:e}}=await r.auth.getSession();if(!e)return;let t=await fetch(`/api/explorer/problems`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();p(e)}}catch(e){console.error(`Failed to fetch explorer files:`,e)}finally{h(!1)}};(0,i.useEffect)(()=>{q()},[l]);let J=e=>{d([`C:`,e]),_(null)},ae=()=>{u.length>1&&(d([`C:`]),_(null))},oe=async()=>{try{let{data:{session:e}}=await r.auth.getSession();if(!e)return;let t=await fetch(`/api/explorer/export`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.blob(),n=window.URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=`algospaced_solutions.zip`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}}catch(e){console.error(`Failed to download solutions ZIP:`,e)}},se=async()=>{if(M){U(!0),G(!1);try{let{data:{session:e}}=await r.auth.getSession();if(!e)return;if((await fetch(`/api/explorer/problems/${M.id}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({name:M.name,pattern:M.pattern,difficulty:M.difficulty,reference_code:R,description:B})})).ok){G(!0),L(!1);let e=f.map(e=>e.id===M.id?{...e,reference_code:R,description:B}:e);p(e),N({...M,reference_code:R,description:B}),setTimeout(()=>G(!1),2e3)}}catch(e){console.error(`Failed to update solution code:`,e)}finally{U(!1)}}},ce=e=>{e.preventDefault(),w(!0)},le=()=>{w(!1)},ue=async e=>{e.preventDefault(),w(!1);let t=e.dataTransfer.files;if(t.length>0){let e=t[0];if(e.name.endsWith(`.py`))try{let t=await e.text(),r=e.name.replace(`.py`,``).replace(/_/g,` `).replace(/-/g,` `),i=`General`,a=`Medium`,o=t.match(/#\s*Pattern:\s*(.+)/i);o&&(i=o[1].trim());let s=t.match(/#\s*Difficulty:\s*(.+)/i);if(s){let e=s[1].trim();[`Easy`,`Medium`,`Hard`].includes(e)&&(a=e)}let c=t.split(` -`),l=[];for(let e of c){let t=e.trim();if(t.startsWith(`#`)){if(t.match(/#\s*(Pattern|Difficulty|Problem|Description):/i))continue;l.push(t.replace(/^#\s*/,``))}else if(t!==``)break}let u=l.join(` -`).trim();localStorage.setItem(`algospaced_prefill_draft`,JSON.stringify({name:r,pattern:i,difficulty:a,code:t,description:u})),n&&n()}catch(e){console.error(`Failed to parse uploaded script:`,e)}}},de=e=>{navigator.clipboard.writeText(e),K(!0),setTimeout(()=>K(!1),2e3)},Y=u.length>1?u[1]:`root`,X=f.length,fe=f.filter(e=>e.reference_code&&e.reference_code.trim()).length,Z=X>0?Math.round(fe/X*100):0,Q={1:0,2:0,3:0,4:0,5:0};f.forEach(e=>{if(e.box_level!==null&&e.box_level!==void 0){let t=e.box_level;t>=1&&t<=5&&Q[t]++}});let pe=Array.from(new Set(f.map(e=>e.pattern).filter(Boolean))),$=f.filter(e=>{let t=e.name.toLowerCase().includes(y.toLowerCase()),n=b===`All`||e.difficulty===b,r=x===`All`||e.pattern===x;return t&&n&&r});return(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm font-sans select-none`,children:[(0,a.jsxs)(`div`,{className:`bg-slate-200 border-b-[3px] border-ink-black p-2 flex items-center justify-between shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-2 flex-1`,children:[(0,a.jsx)(`button`,{onClick:ae,disabled:u.length===1,className:`w-7 h-7 bg-white border-2 border-ink-black flex items-center justify-center hover:bg-slate-100 disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer active:translate-y-0.5`,title:`Up One Folder`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[16px] font-bold`,children:`arrow_upward`})}),(0,a.jsx)(`div`,{className:`bg-white border-2 border-ink-black px-3 py-1 font-mono text-[10px] flex-1 max-w-[280px] truncate`,children:u.join(`\\`)})]}),(0,a.jsxs)(`div`,{className:`flex gap-3 text-[10px] font-bold pr-2 font-mono items-center`,children:[Y===`Database_Codes`&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`button`,{onClick:()=>n&&n(),className:`text-blue-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`add_box`}),`NEW FILE`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`}),(0,a.jsxs)(`button`,{onClick:()=>T(!0),className:`text-indigo-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`upload`}),`IMPORT (.CSV / .DB)`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`}),(0,a.jsxs)(`button`,{onClick:oe,className:`text-purple-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`downloadzip`}),`BACKUP (.ZIP)`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`})]}),(0,a.jsx)(`span`,{className:`text-slate-500`,children:Y===`root`?`2 Folder(s)`:Y===`Database_Codes`?`${$.length} of ${f.length} item(s)`:`${v.length} image(s)`})]})]}),(0,a.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,a.jsxs)(`aside`,{className:`w-1/3 border-r-[3px] border-ink-black bg-[#fdf8e1] p-3 overflow-y-auto custom-scrollbar flex flex-col gap-4 shrink-0`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-500 block uppercase mb-1.5`,children:`Folders`}),(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsxs)(`button`,{onClick:()=>d([`C:`]),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${u.length===1?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[#855400] text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`desktop_windows`}),(0,a.jsx)(`span`,{children:`C: (Root)`})]}),(0,a.jsxs)(`div`,{className:`pl-4 space-y-1`,children:[(0,a.jsxs)(`button`,{onClick:()=>J(`Database_Codes`),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${Y===`Database_Codes`?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-yellow-600 text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`truncate`,children:`Database_Codes`})]}),(0,a.jsxs)(`button`,{onClick:()=>J(`Wallpapers`),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${Y===`Wallpapers`?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-yellow-600 text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`truncate`,children:`Wallpapers`})]})]})]})]}),(0,a.jsxs)(`div`,{className:`border-t-2 border-dashed border-slate-300 pt-3`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-500 block uppercase mb-2`,children:`System Statistics`}),(0,a.jsxs)(`div`,{className:`space-y-3 font-sans text-[11px] font-bold text-slate-700`,children:[(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between text-[10px]`,children:[(0,a.jsx)(`span`,{children:`CODE COMPLETION:`}),(0,a.jsxs)(`span`,{className:`font-mono text-emerald-600`,children:[Z,`%`]})]}),(0,a.jsx)(`div`,{className:`w-full h-4 bg-white border-2 border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{style:{width:`${Z}%`},className:`h-full bg-emerald-500 border-r-2 border-ink-black transition-all duration-500`})})]}),(0,a.jsxs)(`div`,{className:`space-y-1.5 mt-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] uppercase text-slate-500 block`,children:`Leitner Distribution:`}),[1,2,3,4,5].map(e=>{let t=Q[e],n=Math.max(...Object.values(Q),1),r=Math.max(8,Math.round(t/n*100));return(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsxs)(`span`,{className:`w-9 font-mono text-[10px] text-slate-400`,children:[`Box `,e,`:`]}),(0,a.jsx)(`div`,{className:`flex-1 h-3 bg-white border border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{style:{width:`${r}%`},className:`h-full bg-[#0ea5e9] border-r border-ink-black transition-all`})}),(0,a.jsx)(`span`,{className:`w-4 text-right font-mono text-[10px] text-slate-600`,children:t})]},e)})]})]})]})]}),(0,a.jsxs)(`main`,{onDragOver:ce,onDragLeave:le,onDrop:ue,className:`flex-1 bg-white p-4 overflow-y-auto custom-scrollbar flex flex-col relative transition-all ${C?`bg-blue-50 border-4 border-dashed border-blue-500 m-2`:``}`,children:[C&&(0,a.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-blue-800 bg-white/80 pointer-events-none select-none z-[10] gap-2 font-sans font-bold`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl animate-bounce`,children:`upload_file`}),(0,a.jsx)(`div`,{className:`text-sm`,children:`DROP SOLUTIONS PYTHON SCRIPT (.PY) HERE`}),(0,a.jsx)(`p`,{className:`text-[10px] text-slate-400`,children:`Will load and parse file metadata for import`})]}),m?(0,a.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center font-arcade text-[8px] animate-pulse`,children:`READING SYSTEM DISK...`}):(0,a.jsxs)(a.Fragment,{children:[Y===`Database_Codes`&&(0,a.jsxs)(`div`,{className:`mb-4 bg-slate-50 border-[2px] border-ink-black p-2 flex flex-col gap-2 shrink-0 select-none`,children:[(0,a.jsx)(`div`,{className:`flex gap-2`,children:(0,a.jsxs)(`div`,{className:`flex-1 bg-white border border-slate-300 rounded px-2 py-1 flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-slate-400 text-sm`,children:`search`}),(0,a.jsx)(`input`,{type:`text`,value:y,onChange:e=>ee(e.target.value),className:`w-full bg-transparent outline-none border-none p-0 text-[11px] focus:ring-0 font-sans`,placeholder:`Search codes by name...`})]})}),(0,a.jsxs)(`div`,{className:`flex gap-3 text-[10px] font-bold text-slate-600`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`Diff:`}),(0,a.jsxs)(`select`,{value:b,onChange:e=>te(e.target.value),className:`bg-white border border-slate-300 p-0.5 text-[9px] rounded font-sans cursor-pointer focus:ring-1 outline-none`,children:[(0,a.jsx)(`option`,{value:`All`,children:`All`}),(0,a.jsx)(`option`,{value:`Easy`,children:`Easy`}),(0,a.jsx)(`option`,{value:`Medium`,children:`Medium`}),(0,a.jsx)(`option`,{value:`Hard`,children:`Hard`})]})]}),(0,a.jsxs)(`div`,{className:`flex items-center gap-1 flex-1`,children:[(0,a.jsx)(`span`,{children:`Pattern:`}),(0,a.jsxs)(`select`,{value:x,onChange:e=>S(e.target.value),className:`bg-white border border-slate-300 p-0.5 text-[9px] rounded font-sans cursor-pointer max-w-[120px] focus:ring-1 outline-none truncate`,children:[(0,a.jsx)(`option`,{value:`All`,children:`All`}),pe.map(e=>(0,a.jsx)(`option`,{value:e,children:e},e))]})]})]})]}),Y===`root`&&(0,a.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4`,children:[(0,a.jsxs)(`div`,{onDoubleClick:()=>s&&s(),onClick:()=>_(`queue_app`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`queue_app`?`bg-green-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-grass-green border-2 border-ink-black flex items-center justify-center shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-ink-black`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`})}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Daily_Queue.exe`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Spaced Repetition Review`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>c&&c(),onClick:()=>_(`journey_app`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`journey_app`?`bg-blue-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-[#0ea5e9] border-2 border-ink-black flex items-center justify-center shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-white`,style:{fontVariationSettings:`'FILL' 1`},children:`route`})}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Journey_Path.exe`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`NeetCode 150 Road`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>J(`Database_Codes`),onClick:()=>_(`codes`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`codes`?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl text-yellow-500`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Database_Codes`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Synced solution files`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>J(`Wallpapers`),onClick:()=>_(`wallpapers`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`wallpapers`?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl text-yellow-500`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Wallpapers`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Desktop wallpaper images`})]})]}),Y===`Database_Codes`&&($.length===0?(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center text-slate-400 p-6 italic select-none`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl mb-1`,children:`drafts`}),`No matching files found. Drag and drop a .py script to upload/create!`]}):(0,a.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:$.map(e=>{let t=`${e.name.replace(/\s+/g,`_`)}.py`,n=g===e.id;return(0,a.jsxs)(`div`,{onClick:()=>_(e.id),onDoubleClick:()=>{N(e),z(e.reference_code||``),V(e.description||``),F(`description`),L(!1)},className:`flex flex-col items-center p-2 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none text-center ${n?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-emerald-600`,children:`article`}),(0,a.jsx)(`span`,{className:`font-bold text-[10px] truncate w-full mt-1.5 leading-tight`,children:t}),(0,a.jsx)(`span`,{className:`text-[8px] text-slate-400 font-bold uppercase mt-0.5`,children:e.difficulty})]},e.id)})})),Y===`Wallpapers`&&(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-3 select-none`,children:v.map(n=>{let r=g===n.name,i=t===n.url;return(0,a.jsxs)(`div`,{onClick:()=>_(n.name),className:`border-[3px] p-2 flex flex-col cursor-pointer bg-slate-50 relative hover:bg-slate-100 ${r?`border-ink-black bg-yellow-50 shadow-[2px_2px_0_0_#1E293B]`:`border-slate-300`}`,children:[(0,a.jsxs)(`div`,{className:`aspect-video w-full border border-slate-300 overflow-hidden bg-black shrink-0 relative`,children:[(0,a.jsx)(`img`,{src:n.url,alt:n.name,className:`w-full h-full object-cover select-none`}),i&&(0,a.jsx)(`div`,{className:`absolute top-1 right-1 bg-green-500 text-white rounded-full w-5 h-5 flex items-center justify-center border border-white`,title:`Active Wallpaper`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-extrabold`,children:`check`})})]}),(0,a.jsx)(`span`,{className:`font-bold text-[10px] mt-1.5 truncate`,children:n.name}),(0,a.jsx)(`p`,{className:`text-[8px] text-slate-400 font-sans leading-tight mt-0.5 line-clamp-2`,children:n.desc}),r&&(0,a.jsx)(`button`,{onClick:t=>{t.stopPropagation(),e(n.url),localStorage.setItem(`desktopWallpaperUrl`,n.url)},className:`mt-2 w-full py-1 bg-highlight-pink text-white border-2 border-ink-black font-window-title font-bold text-[9px] hover:bg-pink-400 shadow-[1px_1px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none transition-all text-center cursor-pointer`,children:`APPLY BACKGROUND`})]},n.name)})})]})]})]}),M&&(0,a.jsx)(`div`,{className:`absolute inset-0 bg-black/60 z-[999] flex items-center justify-center p-4`,children:(0,a.jsxs)(`div`,{className:`w-[90%] h-[90%] bg-paper-white border-[4px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden animate-scale-up text-ink-black`,children:[(0,a.jsxs)(`div`,{className:`bg-emerald-600 text-white p-2 border-b-[3px] border-ink-black flex justify-between items-center shrink-0 select-none`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`article`}),(0,a.jsxs)(`span`,{className:`font-window-title font-bold text-xs`,children:[M.name.replace(/\s+/g,`_`),`.py`]})]}),(0,a.jsx)(`button`,{onClick:()=>N(null),className:`bg-white text-ink-black border-[2px] border-ink-black w-5 h-5 flex items-center justify-center font-bold hover:bg-red-500 hover:text-white cursor-pointer`,children:`X`})]}),(0,a.jsxs)(`div`,{className:`bg-slate-200 border-b-2 border-ink-black flex shrink-0 select-none`,children:[(0,a.jsx)(`button`,{onClick:()=>F(`description`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`description`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`PROBLEM DESCRIPTION`}),(0,a.jsx)(`button`,{onClick:()=>F(`code`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`code`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`CODE VIEW & EDIT`}),(0,a.jsx)(`button`,{onClick:()=>F(`properties`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`properties`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`LEITNER PROPERTIES`})]}),P===`description`&&(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden bg-slate-900 relative`,children:[I?(0,a.jsx)(`textarea`,{value:B,onChange:e=>V(e.target.value),className:`flex-1 w-full bg-slate-950 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,placeholder:`Enter problem description / question body here...`,spellCheck:`false`}):(0,a.jsx)(`div`,{className:`flex-1 p-4 bg-slate-900 text-[#4ADE80] font-sans text-xs leading-relaxed overflow-y-auto custom-scrollbar select-text`,children:(0,a.jsx)(`div`,{className:`whitespace-pre-wrap font-semibold`,children:M.description||`No description provided for this problem.`})}),I&&(0,a.jsx)(`div`,{className:`absolute top-2 right-2 bg-yellow-400 text-ink-black border border-ink-black px-2 py-0.5 text-[9px] font-bold select-none animate-pulse`,children:`EDIT MODE ACTIVE`})]}),P===`code`&&(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden bg-slate-900 relative`,children:[I?(0,a.jsx)(`textarea`,{value:R,onChange:e=>z(e.target.value),className:`flex-1 w-full bg-slate-950 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,spellCheck:`false`}):(0,a.jsx)(`textarea`,{readOnly:!0,value:M.reference_code||`# Write your solution here.`,className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,spellCheck:`false`}),I&&(0,a.jsx)(`div`,{className:`absolute top-2 right-2 bg-yellow-400 text-ink-black border border-ink-black px-2 py-0.5 text-[9px] font-bold select-none animate-pulse`,children:`EDIT MODE ACTIVE`})]}),P===`properties`&&(0,a.jsxs)(`div`,{className:`flex-1 p-6 overflow-y-auto custom-scrollbar bg-slate-50 font-sans leading-relaxed select-text flex flex-col gap-4`,children:[(0,a.jsx)(`h3`,{className:`font-arcade text-[10px] border-b border-slate-300 pb-1 text-slate-500`,children:`Card Diagnostics`}),(0,a.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-[#0ea5e9] block`,children:`Scheduling Status`}),(0,a.jsxs)(`div`,{children:[`Leitner Combo Box: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-lg text-sky-600`,children:M.box_level||`N/A (Box 1)`})]}),(0,a.jsxs)(`div`,{children:[`Next Review Date: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.next_review?new Date(M.next_review).toLocaleString():`N/A (Due)`})]}),(0,a.jsxs)(`div`,{children:[`Last Reviewed: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.last_reviewed?new Date(M.last_reviewed).toLocaleDateString():`Never`})]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-emerald-600 block`,children:`Performance History`}),(0,a.jsxs)(`div`,{children:[`Total Attempts: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm`,children:M.total_attempts})]}),(0,a.jsxs)(`div`,{children:[`Times Correct: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm text-green-600`,children:M.times_correct})]}),(0,a.jsxs)(`div`,{children:[`Success Ratio: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm text-purple-700`,children:M.total_attempts>0?`${Math.round(M.times_correct/M.total_attempts*100)}%`:`0%`})]})]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-1.5 text-xs font-semibold`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-400 block`,children:`Properties`}),(0,a.jsxs)(`div`,{children:[`File ID: `,(0,a.jsx)(`span`,{className:`font-mono text-[10px] text-slate-500`,children:M.id})]}),(0,a.jsxs)(`div`,{children:[`Logical Pattern: `,(0,a.jsx)(`span`,{className:`text-blue-600`,children:M.pattern})]}),(0,a.jsxs)(`div`,{children:[`Difficulty Tag: `,(0,a.jsx)(`span`,{className:`uppercase`,children:M.difficulty})]})]})]}),(0,a.jsxs)(`div`,{className:`p-3 bg-slate-100 border-t-[3px] border-ink-black flex justify-between items-center shrink-0 select-none`,children:[(0,a.jsx)(`div`,{children:W&&(0,a.jsx)(`span`,{className:`text-green-600 font-bold text-xs animate-pulse`,children:`✓ Solution saved!`})}),(0,a.jsxs)(`div`,{className:`flex gap-2`,children:[(P===`code`||P===`description`)&&(I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`button`,{onClick:()=>{z(M.reference_code||``),V(M.description||``),L(!1)},className:`px-3 py-1.5 bg-white hover:bg-slate-50 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer`,children:`CANCEL`}),(0,a.jsx)(`button`,{disabled:H,onClick:se,className:`px-3 py-1.5 bg-[#4ADE80] hover:bg-emerald-400 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:H?`SAVING...`:`SAVE CHANGES`})]}):(0,a.jsxs)(`button`,{onClick:()=>L(!0),className:`px-3 py-1.5 bg-yellow-400 hover:bg-yellow-300 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`edit`}),`EDIT FILE`]})),(0,a.jsxs)(`button`,{onClick:()=>de(I?R:M.reference_code),className:`px-3 py-1.5 bg-[#ffcc00] hover:bg-yellow-300 text-ink-black border-2 border-ink-black font-bold text-xs shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none cursor-pointer flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`content_copy`}),ie?`COPIED!`:`COPY CODE`]}),(0,a.jsx)(`button`,{onClick:()=>N(null),className:`px-3 py-1.5 bg-white hover:bg-slate-50 text-ink-black border-2 border-ink-black font-bold text-xs shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`CLOSE`})]})]})]})}),ne&&(0,a.jsx)(`div`,{className:`absolute inset-0 bg-black/60 z-[999] flex items-center justify-center p-4 select-none`,children:(0,a.jsxs)(`div`,{className:`w-[80%] max-w-[400px] bg-paper-white border-[4px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden animate-scale-up text-ink-black font-sans`,children:[(0,a.jsxs)(`div`,{className:`bg-indigo-700 text-white p-2.5 border-b-[3px] border-ink-black flex justify-between items-center font-bold`,children:[(0,a.jsx)(`span`,{className:`font-window-title text-xs`,children:`IMPORT PROBLEMS`}),(0,a.jsx)(`button`,{onClick:()=>{T(!1),k(``),j(``)},className:`bg-white text-ink-black border-[2px] border-ink-black w-5 h-5 flex items-center justify-center font-bold hover:bg-red-500 hover:text-white cursor-pointer`,children:`X`})]}),(0,a.jsxs)(`div`,{className:`p-6 space-y-4`,children:[O&&(0,a.jsx)(`div`,{className:`p-2 border-2 border-red-500 bg-red-50 text-red-800 text-[10px] font-mono leading-relaxed`,children:O}),A&&(0,a.jsx)(`div`,{className:`p-2 border-2 border-green-500 bg-green-50 text-green-800 text-[10px] font-mono leading-relaxed`,children:A}),(0,a.jsxs)(`div`,{className:`flex flex-col items-center justify-center border-4 border-dashed border-ink-black p-6 relative ${E?`bg-indigo-50 cursor-wait`:`bg-slate-50 hover:bg-slate-100 cursor-pointer`}`,children:[E?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-indigo-700 mb-2 animate-bounce`,children:`cloud_upload`}),(0,a.jsx)(`span`,{className:`text-xs font-bold text-indigo-800 text-center`,children:`UPLOADING & PROCESSING...`}),(0,a.jsx)(`span`,{className:`text-[9px] text-indigo-600 mt-1 uppercase font-semibold text-center`,children:`Please wait, this might take a moment`})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-indigo-700 mb-2`,children:`upload_file`}),(0,a.jsx)(`span`,{className:`text-xs font-bold text-ink-black text-center`,children:`SELECT A CSV OR SQLite (.DB) FILE`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-1 uppercase font-semibold text-center`,children:`Imports problems & solution notes`})]}),(0,a.jsx)(`input`,{type:`file`,accept:`.csv,.db`,disabled:E,onChange:re,className:`absolute inset-0 opacity-0 cursor-pointer w-full h-full disabled:cursor-wait`})]}),(0,a.jsxs)(`div`,{className:`text-[9px] text-slate-400 font-medium leading-normal space-y-1 font-sans`,children:[(0,a.jsxs)(`p`,{children:[`• `,(0,a.jsx)(`b`,{children:`CSV File:`}),` Must have a `,(0,a.jsx)(`code`,{children:`name`}),` column. Optional: `,(0,a.jsx)(`code`,{children:`problem_number`}),`, `,(0,a.jsx)(`code`,{children:`pattern`}),`, `,(0,a.jsx)(`code`,{children:`difficulty`}),`, `,(0,a.jsx)(`code`,{children:`optimal_time`}),`, `,(0,a.jsx)(`code`,{children:`optimal_space`}),`, `,(0,a.jsx)(`code`,{children:`reference_code`}),`, `,(0,a.jsx)(`code`,{children:`description`}),`.`]}),(0,a.jsxs)(`p`,{children:[`• `,(0,a.jsx)(`b`,{children:`SQLite DB File:`}),` Must be a standard database backup containing a `,(0,a.jsx)(`code`,{children:`problems`}),` table matching AlgoSpaced design.`]})]})]})]})})]})}export{s as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/FileExplorer-D3FrJW-x.js b/algospaced-ui/dist/assets/FileExplorer-D3FrJW-x.js new file mode 100644 index 0000000000000000000000000000000000000000..cc2dd525dc6bf8cd56f203a91278a595f53af261 --- /dev/null +++ b/algospaced-ui/dist/assets/FileExplorer-D3FrJW-x.js @@ -0,0 +1,3 @@ +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Ht as n}from"./vendor-react-hnaVBnLv.js";import{s as r}from"./firebaseClient-DZobvwSx.js";var i=e(n(),1),a=t(),o=[{name:`Retro Arcade Grid.img`,url:`/wallpapers/default.webp`,desc:`Default AlgoSpaced purple grid and pixel theme background.`},{name:`Classic Board Logo.img`,url:`/icons/computer.webp`,desc:`System info and arcade machine diagram wallpaper.`},{name:`Terminal Console Icon.img`,url:`/icons/terminal.webp`,desc:`Dark retro CRT terminal screen layout.`},{name:`Synthwave Sunset Grid.img`,url:`https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=1000&auto=format&fit=crop`,desc:`Glowing neon grids and vector mountains styling.`},{name:`Matrix Code Rain.img`,url:`https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?q=80&w=1000&auto=format&fit=crop`,desc:`Falling green digital characters rain.`}];function s({onSetWallpaper:e,activeWallpaperUrl:t,onOpenCreateProblem:n,onOpenQueue:s,onOpenJourney:c,refreshTrigger:l}){let[u,d]=(0,i.useState)([`C:`]),[f,p]=(0,i.useState)([]),[m,h]=(0,i.useState)(!0),[g,_]=(0,i.useState)(null),v=i.useMemo(()=>{let e=[...o],t=localStorage.getItem(`customWallpaperUrl`),n=localStorage.getItem(`customWallpaperName`)||`Custom Wallpaper.img`;return t&&(e.some(e=>e.url===t)||e.push({name:n,url:t,desc:`User uploaded custom background wallpaper.`})),e},[t]),[y,ee]=(0,i.useState)(``),[b,te]=(0,i.useState)(`All`),[x,S]=(0,i.useState)(`All`),[C,w]=(0,i.useState)(!1),[ne,T]=(0,i.useState)(!1),[E,D]=(0,i.useState)(!1),[O,k]=(0,i.useState)(``),[A,j]=(0,i.useState)(``),re=async e=>{let t=e.target.files;if(!t||t.length===0)return;let n=t[0];e.target.value=``,D(!0),k(``),j(``);try{let{data:{session:e}}=await r.auth.getSession(),t=e?e.access_token:`sandbox`,i=new FormData;i.append(`file`,n);let a=await fetch(`/api/explorer/import`,{method:`POST`,headers:{Authorization:`Bearer ${t}`},body:i}),o=await a.json();a.ok?(j(o.message||`Problems imported successfully!`),setTimeout(()=>{q()},500),setTimeout(()=>{T(!1),j(``)},2e3)):k(o.detail||`Import failed. Verify the file format.`)}catch{k(`Import failed due to a network error.`)}finally{D(!1)}},[M,N]=(0,i.useState)(null),[P,F]=(0,i.useState)(`description`),[I,L]=(0,i.useState)(!1),[R,z]=(0,i.useState)(``),[B,V]=(0,i.useState)(``),[H,U]=(0,i.useState)(!1),[W,G]=(0,i.useState)(!1),[ie,K]=(0,i.useState)(!1),q=async()=>{h(!0);try{let{data:{session:e}}=await r.auth.getSession();if(!e)return;let t=await fetch(`/api/explorer/problems`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();p(e)}}catch(e){console.error(`Failed to fetch explorer files:`,e)}finally{h(!1)}};(0,i.useEffect)(()=>{q()},[l]);let J=e=>{d([`C:`,e]),_(null)},ae=()=>{u.length>1&&(d([`C:`]),_(null))},oe=async()=>{try{let{data:{session:e}}=await r.auth.getSession();if(!e)return;let t=await fetch(`/api/explorer/export`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.blob(),n=window.URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=`algospaced_solutions.zip`,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)}}catch(e){console.error(`Failed to download solutions ZIP:`,e)}},se=async()=>{if(M){U(!0),G(!1);try{let{data:{session:e}}=await r.auth.getSession();if(!e)return;if((await fetch(`/api/explorer/problems/${M.id}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({name:M.name,pattern:M.pattern,difficulty:M.difficulty,reference_code:R,description:B})})).ok){G(!0),L(!1);let e=f.map(e=>e.id===M.id?{...e,reference_code:R,description:B}:e);p(e),N({...M,reference_code:R,description:B}),setTimeout(()=>G(!1),2e3)}}catch(e){console.error(`Failed to update solution code:`,e)}finally{U(!1)}}},ce=e=>{e.preventDefault(),w(!0)},le=()=>{w(!1)},ue=async e=>{e.preventDefault(),w(!1);let t=e.dataTransfer.files;if(t.length>0){let e=t[0];if(e.name.endsWith(`.py`))try{let t=await e.text(),r=e.name.replace(`.py`,``).replace(/_/g,` `).replace(/-/g,` `),i=`General`,a=`Medium`,o=t.match(/#\s*Pattern:\s*(.+)/i);o&&(i=o[1].trim());let s=t.match(/#\s*Difficulty:\s*(.+)/i);if(s){let e=s[1].trim();[`Easy`,`Medium`,`Hard`].includes(e)&&(a=e)}let c=t.split(` +`),l=[];for(let e of c){let t=e.trim();if(t.startsWith(`#`)){if(t.match(/#\s*(Pattern|Difficulty|Problem|Description):/i))continue;l.push(t.replace(/^#\s*/,``))}else if(t!==``)break}let u=l.join(` +`).trim();localStorage.setItem(`algospaced_prefill_draft`,JSON.stringify({name:r,pattern:i,difficulty:a,code:t,description:u})),n&&n()}catch(e){console.error(`Failed to parse uploaded script:`,e)}}},de=e=>{navigator.clipboard.writeText(e),K(!0),setTimeout(()=>K(!1),2e3)},Y=u.length>1?u[1]:`root`,X=f.length,fe=f.filter(e=>e.reference_code&&e.reference_code.trim()).length,Z=X>0?Math.round(fe/X*100):0,Q={0:0,1:0,2:0,3:0};f.forEach(e=>{if(e.fsrs_state!==null&&e.fsrs_state!==void 0){let t=e.fsrs_state;t>=0&&t<=3&&Q[t]++}});let pe=Array.from(new Set(f.map(e=>e.pattern).filter(Boolean))),$=f.filter(e=>{let t=e.name.toLowerCase().includes(y.toLowerCase()),n=b===`All`||e.difficulty===b,r=x===`All`||e.pattern===x;return t&&n&&r});return(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm font-sans select-none`,children:[(0,a.jsxs)(`div`,{className:`bg-slate-200 border-b-[3px] border-ink-black p-2 flex items-center justify-between shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-2 flex-1`,children:[(0,a.jsx)(`button`,{onClick:ae,disabled:u.length===1,className:`w-7 h-7 bg-white border-2 border-ink-black flex items-center justify-center hover:bg-slate-100 disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer active:translate-y-0.5`,title:`Up One Folder`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[16px] font-bold`,children:`arrow_upward`})}),(0,a.jsx)(`div`,{className:`bg-white border-2 border-ink-black px-3 py-1 font-mono text-[10px] flex-1 max-w-[280px] truncate`,children:u.join(`\\`)})]}),(0,a.jsxs)(`div`,{className:`flex gap-3 text-[10px] font-bold pr-2 font-mono items-center`,children:[Y===`Database_Codes`&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`button`,{onClick:()=>n&&n(),className:`text-blue-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`add_box`}),`NEW FILE`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`}),(0,a.jsxs)(`button`,{onClick:()=>T(!0),className:`text-indigo-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`upload`}),`IMPORT (.CSV / .DB)`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`}),(0,a.jsxs)(`button`,{onClick:oe,className:`text-purple-700 hover:underline cursor-pointer flex items-center gap-0.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-bold`,children:`downloadzip`}),`BACKUP (.ZIP)`]}),(0,a.jsx)(`span`,{className:`text-slate-400`,children:`|`})]}),(0,a.jsx)(`span`,{className:`text-slate-500`,children:Y===`root`?`2 Folder(s)`:Y===`Database_Codes`?`${$.length} of ${f.length} item(s)`:`${v.length} image(s)`})]})]}),(0,a.jsxs)(`div`,{className:`flex-1 flex overflow-hidden`,children:[(0,a.jsxs)(`aside`,{className:`w-1/3 border-r-[3px] border-ink-black bg-[#fdf8e1] p-3 overflow-y-auto custom-scrollbar flex flex-col gap-4 shrink-0`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-500 block uppercase mb-1.5`,children:`Folders`}),(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsxs)(`button`,{onClick:()=>d([`C:`]),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${u.length===1?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[#855400] text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`desktop_windows`}),(0,a.jsx)(`span`,{children:`C: (Root)`})]}),(0,a.jsxs)(`div`,{className:`pl-4 space-y-1`,children:[(0,a.jsxs)(`button`,{onClick:()=>J(`Database_Codes`),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${Y===`Database_Codes`?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-yellow-600 text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`truncate`,children:`Database_Codes`})]}),(0,a.jsxs)(`button`,{onClick:()=>J(`Wallpapers`),className:`w-full text-left p-1.5 flex items-center gap-1.5 font-semibold border-2 border-transparent hover:bg-slate-100 rounded ${Y===`Wallpapers`?`bg-white border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-yellow-600 text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`truncate`,children:`Wallpapers`})]})]})]})]}),(0,a.jsxs)(`div`,{className:`border-t-2 border-dashed border-slate-300 pt-3`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-500 block uppercase mb-2`,children:`System Statistics`}),(0,a.jsxs)(`div`,{className:`space-y-3 font-sans text-[11px] font-bold text-slate-700`,children:[(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between text-[10px]`,children:[(0,a.jsx)(`span`,{children:`CODE COMPLETION:`}),(0,a.jsxs)(`span`,{className:`font-mono text-emerald-600`,children:[Z,`%`]})]}),(0,a.jsx)(`div`,{className:`w-full h-4 bg-white border-2 border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{style:{width:`${Z}%`},className:`h-full bg-emerald-500 border-r-2 border-ink-black transition-all duration-500`})})]}),(0,a.jsxs)(`div`,{className:`space-y-1.5 mt-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] uppercase text-slate-500 block`,children:`FSRS Distribution:`}),[{state:0,label:`New`,color:`#3b82f6`},{state:1,label:`Learn`,color:`#f59e0b`},{state:2,label:`Review`,color:`#10b981`},{state:3,label:`Relearn`,color:`#ef4444`}].map(e=>{let t=Q[e.state],n=Math.max(...Object.values(Q),1),r=Math.max(8,Math.round(t/n*100));return(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsxs)(`span`,{className:`w-12 font-mono text-[10px] text-slate-400`,children:[e.label,`:`]}),(0,a.jsx)(`div`,{className:`flex-1 h-3 bg-white border border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{style:{width:`${r}%`,backgroundColor:e.color},className:`h-full border-r border-ink-black transition-all`})}),(0,a.jsx)(`span`,{className:`w-4 text-right font-mono text-[10px] text-slate-600`,children:t})]},e.state)})]})]})]})]}),(0,a.jsxs)(`main`,{onDragOver:ce,onDragLeave:le,onDrop:ue,className:`flex-1 bg-white p-4 overflow-y-auto custom-scrollbar flex flex-col relative transition-all ${C?`bg-blue-50 border-4 border-dashed border-blue-500 m-2`:``}`,children:[C&&(0,a.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-blue-800 bg-white/80 pointer-events-none select-none z-[10] gap-2 font-sans font-bold`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl animate-bounce`,children:`upload_file`}),(0,a.jsx)(`div`,{className:`text-sm`,children:`DROP SOLUTIONS PYTHON SCRIPT (.PY) HERE`}),(0,a.jsx)(`p`,{className:`text-[10px] text-slate-400`,children:`Will load and parse file metadata for import`})]}),m?(0,a.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center font-arcade text-[8px] animate-pulse`,children:`READING SYSTEM DISK...`}):(0,a.jsxs)(a.Fragment,{children:[Y===`Database_Codes`&&(0,a.jsxs)(`div`,{className:`mb-4 bg-slate-50 border-[2px] border-ink-black p-2 flex flex-col gap-2 shrink-0 select-none`,children:[(0,a.jsx)(`div`,{className:`flex gap-2`,children:(0,a.jsxs)(`div`,{className:`flex-1 bg-white border border-slate-300 rounded px-2 py-1 flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-slate-400 text-sm`,children:`search`}),(0,a.jsx)(`input`,{type:`text`,value:y,onChange:e=>ee(e.target.value),className:`w-full bg-transparent outline-none border-none p-0 text-[11px] focus:ring-0 font-sans`,placeholder:`Search codes by name...`})]})}),(0,a.jsxs)(`div`,{className:`flex gap-3 text-[10px] font-bold text-slate-600`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,a.jsx)(`span`,{children:`Diff:`}),(0,a.jsxs)(`select`,{value:b,onChange:e=>te(e.target.value),className:`bg-white border border-slate-300 p-0.5 text-[9px] rounded font-sans cursor-pointer focus:ring-1 outline-none`,children:[(0,a.jsx)(`option`,{value:`All`,children:`All`}),(0,a.jsx)(`option`,{value:`Easy`,children:`Easy`}),(0,a.jsx)(`option`,{value:`Medium`,children:`Medium`}),(0,a.jsx)(`option`,{value:`Hard`,children:`Hard`})]})]}),(0,a.jsxs)(`div`,{className:`flex items-center gap-1 flex-1`,children:[(0,a.jsx)(`span`,{children:`Pattern:`}),(0,a.jsxs)(`select`,{value:x,onChange:e=>S(e.target.value),className:`bg-white border border-slate-300 p-0.5 text-[9px] rounded font-sans cursor-pointer max-w-[120px] focus:ring-1 outline-none truncate`,children:[(0,a.jsx)(`option`,{value:`All`,children:`All`}),pe.map(e=>(0,a.jsx)(`option`,{value:e,children:e},e))]})]})]})]}),Y===`root`&&(0,a.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-4`,children:[(0,a.jsxs)(`div`,{onDoubleClick:()=>s&&s(),onClick:()=>_(`queue_app`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`queue_app`?`bg-green-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-grass-green border-2 border-ink-black flex items-center justify-center shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-ink-black`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`})}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Daily_Queue.exe`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Spaced Repetition Review`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>c&&c(),onClick:()=>_(`journey_app`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`journey_app`?`bg-blue-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-[#0ea5e9] border-2 border-ink-black flex items-center justify-center shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-white`,style:{fontVariationSettings:`'FILL' 1`},children:`route`})}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Journey_Path.exe`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`NeetCode 150 Road`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>J(`Database_Codes`),onClick:()=>_(`codes`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`codes`?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl text-yellow-500`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Database_Codes`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Synced solution files`})]}),(0,a.jsxs)(`div`,{onDoubleClick:()=>J(`Wallpapers`),onClick:()=>_(`wallpapers`),className:`flex flex-col items-center justify-center p-3 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none ${g===`wallpapers`?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-5xl text-yellow-500`,style:{fontVariationSettings:`'FILL' 1`},children:`folder`}),(0,a.jsx)(`span`,{className:`font-bold text-center mt-2 text-xs`,children:`Wallpapers`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-0.5`,children:`Desktop wallpaper images`})]})]}),Y===`Database_Codes`&&($.length===0?(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center text-slate-400 p-6 italic select-none`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl mb-1`,children:`drafts`}),`No matching files found. Drag and drop a .py script to upload/create!`]}):(0,a.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:$.map(e=>{let t=`${e.name.replace(/\s+/g,`_`)}.py`,n=g===e.id;return(0,a.jsxs)(`div`,{onClick:()=>_(e.id),onDoubleClick:()=>{N(e),z(e.reference_code||``),V(e.description||``),F(`description`),L(!1)},className:`flex flex-col items-center p-2 border-[3px] border-transparent hover:bg-slate-50 cursor-pointer rounded select-none text-center ${n?`bg-yellow-50 border-dashed border-ink-black`:``}`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-emerald-600`,children:`article`}),(0,a.jsx)(`span`,{className:`font-bold text-[10px] truncate w-full mt-1.5 leading-tight`,children:t}),(0,a.jsx)(`span`,{className:`text-[8px] text-slate-400 font-bold uppercase mt-0.5`,children:e.difficulty})]},e.id)})})),Y===`Wallpapers`&&(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-3 select-none`,children:v.map(n=>{let r=g===n.name,i=t===n.url;return(0,a.jsxs)(`div`,{onClick:()=>_(n.name),className:`border-[3px] p-2 flex flex-col cursor-pointer bg-slate-50 relative hover:bg-slate-100 ${r?`border-ink-black bg-yellow-50 shadow-[2px_2px_0_0_#1E293B]`:`border-slate-300`}`,children:[(0,a.jsxs)(`div`,{className:`aspect-video w-full border border-slate-300 overflow-hidden bg-black shrink-0 relative`,children:[(0,a.jsx)(`img`,{src:n.url,alt:n.name,className:`w-full h-full object-cover select-none`}),i&&(0,a.jsx)(`div`,{className:`absolute top-1 right-1 bg-green-500 text-white rounded-full w-5 h-5 flex items-center justify-center border border-white`,title:`Active Wallpaper`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px] font-extrabold`,children:`check`})})]}),(0,a.jsx)(`span`,{className:`font-bold text-[10px] mt-1.5 truncate`,children:n.name}),(0,a.jsx)(`p`,{className:`text-[8px] text-slate-400 font-sans leading-tight mt-0.5 line-clamp-2`,children:n.desc}),r&&(0,a.jsx)(`button`,{onClick:t=>{t.stopPropagation(),e(n.url),localStorage.setItem(`desktopWallpaperUrl`,n.url)},className:`mt-2 w-full py-1 bg-highlight-pink text-white border-2 border-ink-black font-window-title font-bold text-[9px] hover:bg-pink-400 shadow-[1px_1px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none transition-all text-center cursor-pointer`,children:`APPLY BACKGROUND`})]},n.name)})})]})]})]}),M&&(0,a.jsx)(`div`,{className:`absolute inset-0 bg-black/60 z-[999] flex items-center justify-center p-4`,children:(0,a.jsxs)(`div`,{className:`w-[90%] h-[90%] bg-paper-white border-[4px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden animate-scale-up text-ink-black`,children:[(0,a.jsxs)(`div`,{className:`bg-emerald-600 text-white p-2 border-b-[3px] border-ink-black flex justify-between items-center shrink-0 select-none`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`article`}),(0,a.jsxs)(`span`,{className:`font-window-title font-bold text-xs`,children:[M.name.replace(/\s+/g,`_`),`.py`]})]}),(0,a.jsx)(`button`,{onClick:()=>N(null),className:`bg-white text-ink-black border-[2px] border-ink-black w-5 h-5 flex items-center justify-center font-bold hover:bg-red-500 hover:text-white cursor-pointer`,children:`X`})]}),(0,a.jsxs)(`div`,{className:`bg-slate-200 border-b-2 border-ink-black flex shrink-0 select-none`,children:[(0,a.jsx)(`button`,{onClick:()=>F(`description`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`description`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`PROBLEM DESCRIPTION`}),(0,a.jsx)(`button`,{onClick:()=>F(`code`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`code`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`CODE VIEW & EDIT`}),(0,a.jsx)(`button`,{onClick:()=>F(`properties`),className:`px-4 py-2 border-r-2 border-ink-black font-bold text-[11px] cursor-pointer ${P===`properties`?`bg-white translate-y-[2px]`:`bg-slate-300 hover:bg-slate-100`}`,children:`FSRS PROPERTIES`})]}),P===`description`&&(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden bg-slate-900 relative`,children:[I?(0,a.jsx)(`textarea`,{value:B,onChange:e=>V(e.target.value),className:`flex-1 w-full bg-slate-950 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,placeholder:`Enter problem description / question body here...`,spellCheck:`false`}):(0,a.jsx)(`div`,{className:`flex-1 p-4 bg-slate-900 text-[#4ADE80] font-sans text-xs leading-relaxed overflow-y-auto custom-scrollbar select-text`,children:(0,a.jsx)(`div`,{className:`whitespace-pre-wrap font-semibold`,children:M.description||`No description provided for this problem.`})}),I&&(0,a.jsx)(`div`,{className:`absolute top-2 right-2 bg-yellow-400 text-ink-black border border-ink-black px-2 py-0.5 text-[9px] font-bold select-none animate-pulse`,children:`EDIT MODE ACTIVE`})]}),P===`code`&&(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden bg-slate-900 relative`,children:[I?(0,a.jsx)(`textarea`,{value:R,onChange:e=>z(e.target.value),className:`flex-1 w-full bg-slate-950 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,spellCheck:`false`}):(0,a.jsx)(`textarea`,{readOnly:!0,value:M.reference_code||`# Write your solution here.`,className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-4 outline-none border-none text-xs leading-relaxed resize-none custom-scrollbar`,spellCheck:`false`}),I&&(0,a.jsx)(`div`,{className:`absolute top-2 right-2 bg-yellow-400 text-ink-black border border-ink-black px-2 py-0.5 text-[9px] font-bold select-none animate-pulse`,children:`EDIT MODE ACTIVE`})]}),P===`properties`&&(0,a.jsxs)(`div`,{className:`flex-1 p-6 overflow-y-auto custom-scrollbar bg-slate-50 font-sans leading-relaxed select-text flex flex-col gap-4`,children:[(0,a.jsx)(`h3`,{className:`font-arcade text-[10px] border-b border-slate-300 pb-1 text-slate-500`,children:`Card Diagnostics`}),(0,a.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-[#0ea5e9] block`,children:`Scheduling Status`}),(0,a.jsxs)(`div`,{children:[`FSRS State: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm text-sky-600`,children:M.fsrs_state!==null&&M.fsrs_state!==void 0?M.fsrs_state===0?`New (0)`:M.fsrs_state===1?`Learning (1)`:M.fsrs_state===2?`Review (2)`:`Relearning (3)`:`Unenrolled`})]}),(0,a.jsxs)(`div`,{children:[`Stability: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.fsrs_stability===void 0?`0.0 days`:`${M.fsrs_stability.toFixed(1)} days`})]}),(0,a.jsxs)(`div`,{children:[`Difficulty: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.fsrs_difficulty===void 0?`0.0/10`:`${M.fsrs_difficulty.toFixed(1)}/10`})]}),(0,a.jsxs)(`div`,{children:[`Next Review Date: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.next_review?new Date(M.next_review).toLocaleString():`N/A (Due)`})]}),(0,a.jsxs)(`div`,{children:[`Last Reviewed: `,(0,a.jsx)(`span`,{className:`font-mono text-xs font-semibold`,children:M.last_reviewed?new Date(M.last_reviewed).toLocaleDateString():`Never`})]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-2`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-emerald-600 block`,children:`Performance History`}),(0,a.jsxs)(`div`,{children:[`Total Attempts: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm`,children:M.total_attempts})]}),(0,a.jsxs)(`div`,{children:[`Times Correct: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm text-green-600`,children:M.times_correct})]}),(0,a.jsxs)(`div`,{children:[`Success Ratio: `,(0,a.jsx)(`span`,{className:`font-mono font-bold text-sm text-purple-700`,children:M.total_attempts>0?`${Math.round(M.times_correct/M.total_attempts*100)}%`:`0%`})]})]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 space-y-1.5 text-xs font-semibold`,children:[(0,a.jsx)(`span`,{className:`text-[9px] font-arcade text-slate-400 block`,children:`Properties`}),(0,a.jsxs)(`div`,{children:[`File ID: `,(0,a.jsx)(`span`,{className:`font-mono text-[10px] text-slate-500`,children:M.id})]}),(0,a.jsxs)(`div`,{children:[`Logical Pattern: `,(0,a.jsx)(`span`,{className:`text-blue-600`,children:M.pattern})]}),(0,a.jsxs)(`div`,{children:[`Difficulty Tag: `,(0,a.jsx)(`span`,{className:`uppercase`,children:M.difficulty})]})]})]}),(0,a.jsxs)(`div`,{className:`p-3 bg-slate-100 border-t-[3px] border-ink-black flex justify-between items-center shrink-0 select-none`,children:[(0,a.jsx)(`div`,{children:W&&(0,a.jsx)(`span`,{className:`text-green-600 font-bold text-xs animate-pulse`,children:`✓ Solution saved!`})}),(0,a.jsxs)(`div`,{className:`flex gap-2`,children:[(P===`code`||P===`description`)&&(I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`button`,{onClick:()=>{z(M.reference_code||``),V(M.description||``),L(!1)},className:`px-3 py-1.5 bg-white hover:bg-slate-50 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer`,children:`CANCEL`}),(0,a.jsx)(`button`,{disabled:H,onClick:se,className:`px-3 py-1.5 bg-[#4ADE80] hover:bg-emerald-400 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:H?`SAVING...`:`SAVE CHANGES`})]}):(0,a.jsxs)(`button`,{onClick:()=>L(!0),className:`px-3 py-1.5 bg-yellow-400 hover:bg-yellow-300 text-ink-black border-2 border-ink-black font-bold text-xs cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`edit`}),`EDIT FILE`]})),(0,a.jsxs)(`button`,{onClick:()=>de(I?R:M.reference_code),className:`px-3 py-1.5 bg-[#ffcc00] hover:bg-yellow-300 text-ink-black border-2 border-ink-black font-bold text-xs shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none cursor-pointer flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`content_copy`}),ie?`COPIED!`:`COPY CODE`]}),(0,a.jsx)(`button`,{onClick:()=>N(null),className:`px-3 py-1.5 bg-white hover:bg-slate-50 text-ink-black border-2 border-ink-black font-bold text-xs shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`CLOSE`})]})]})]})}),ne&&(0,a.jsx)(`div`,{className:`absolute inset-0 bg-black/60 z-[999] flex items-center justify-center p-4 select-none`,children:(0,a.jsxs)(`div`,{className:`w-[80%] max-w-[400px] bg-paper-white border-[4px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden animate-scale-up text-ink-black font-sans`,children:[(0,a.jsxs)(`div`,{className:`bg-indigo-700 text-white p-2.5 border-b-[3px] border-ink-black flex justify-between items-center font-bold`,children:[(0,a.jsx)(`span`,{className:`font-window-title text-xs`,children:`IMPORT PROBLEMS`}),(0,a.jsx)(`button`,{onClick:()=>{T(!1),k(``),j(``)},className:`bg-white text-ink-black border-[2px] border-ink-black w-5 h-5 flex items-center justify-center font-bold hover:bg-red-500 hover:text-white cursor-pointer`,children:`X`})]}),(0,a.jsxs)(`div`,{className:`p-6 space-y-4`,children:[O&&(0,a.jsx)(`div`,{className:`p-2 border-2 border-red-500 bg-red-50 text-red-800 text-[10px] font-mono leading-relaxed`,children:O}),A&&(0,a.jsx)(`div`,{className:`p-2 border-2 border-green-500 bg-green-50 text-green-800 text-[10px] font-mono leading-relaxed`,children:A}),(0,a.jsxs)(`div`,{className:`flex flex-col items-center justify-center border-4 border-dashed border-ink-black p-6 relative ${E?`bg-indigo-50 cursor-wait`:`bg-slate-50 hover:bg-slate-100 cursor-pointer`}`,children:[E?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-indigo-700 mb-2 animate-bounce`,children:`cloud_upload`}),(0,a.jsx)(`span`,{className:`text-xs font-bold text-indigo-800 text-center`,children:`UPLOADING & PROCESSING...`}),(0,a.jsx)(`span`,{className:`text-[9px] text-indigo-600 mt-1 uppercase font-semibold text-center`,children:`Please wait, this might take a moment`})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-indigo-700 mb-2`,children:`upload_file`}),(0,a.jsx)(`span`,{className:`text-xs font-bold text-ink-black text-center`,children:`SELECT A CSV OR SQLite (.DB) FILE`}),(0,a.jsx)(`span`,{className:`text-[9px] text-slate-400 mt-1 uppercase font-semibold text-center`,children:`Imports problems & solution notes`})]}),(0,a.jsx)(`input`,{type:`file`,accept:`.csv,.db`,disabled:E,onChange:re,className:`absolute inset-0 opacity-0 cursor-pointer w-full h-full disabled:cursor-wait`})]}),(0,a.jsxs)(`div`,{className:`text-[9px] text-slate-400 font-medium leading-normal space-y-1 font-sans`,children:[(0,a.jsxs)(`p`,{children:[`• `,(0,a.jsx)(`b`,{children:`CSV File:`}),` Must have a `,(0,a.jsx)(`code`,{children:`name`}),` column. Optional: `,(0,a.jsx)(`code`,{children:`problem_number`}),`, `,(0,a.jsx)(`code`,{children:`pattern`}),`, `,(0,a.jsx)(`code`,{children:`difficulty`}),`, `,(0,a.jsx)(`code`,{children:`optimal_time`}),`, `,(0,a.jsx)(`code`,{children:`optimal_space`}),`, `,(0,a.jsx)(`code`,{children:`reference_code`}),`, `,(0,a.jsx)(`code`,{children:`description`}),`.`]}),(0,a.jsxs)(`p`,{children:[`• `,(0,a.jsx)(`b`,{children:`SQLite DB File:`}),` Must be a standard database backup containing a `,(0,a.jsx)(`code`,{children:`problems`}),` table matching AlgoSpaced design.`]})]})]})]})})]})}export{s as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/GitHubSyncWindow-CrRFKIeu.js b/algospaced-ui/dist/assets/GitHubSyncWindow-CrRFKIeu.js new file mode 100644 index 0000000000000000000000000000000000000000..6126b9483b4b296294697d6f5f91c26a905063eb --- /dev/null +++ b/algospaced-ui/dist/assets/GitHubSyncWindow-CrRFKIeu.js @@ -0,0 +1 @@ +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Ht as n,M as r,Q as i,St as a,W as o,Z as s,_t as c,a as l,et as u,ht as d,it as f,nt as p,rt as m,ut as h}from"./vendor-react-hnaVBnLv.js";import{a as g,c as _,i as v,l as y,n as b,o as x,r as S,s as C,t as w}from"./githubSyncService-x0Mm_uEl.js";var T=e(n(),1),E=t(),D=({onClose:e,currentProblem:t})=>{let[n,D]=(0,T.useState)(()=>S()),[O,k]=(0,T.useState)(()=>v()),[A,j]=(0,T.useState)(``),[M,N]=(0,T.useState)(!1),[P,F]=(0,T.useState)(!1),[I,L]=(0,T.useState)(!1),[R,z]=(0,T.useState)(!1),[B,V]=(0,T.useState)(!1),[H,U]=(0,T.useState)(!1),[W,G]=(0,T.useState)(!1),[K,q]=(0,T.useState)(null),J=!!(n.token&&(n.username||O?.login));(0,T.useEffect)(()=>{n.token&&!O&&y(n.token).then(e=>{e.valid&&e.user&&(k(e.user),C({username:e.user.login},e.user))})},[n.token,O]);let Y=async()=>{L(!0),q(null);try{let{token:e,user:t}=await b();k(t);let n=S();D(n);try{await g(e,n.repoName,n.isPrivate)}catch{}q({type:`success`,text:`Connected successfully to GitHub as @${t.login}!`,linkUrl:t.html_url})}catch(e){q({type:`error`,text:e.message||`GitHub OAuth authorization failed.`})}finally{L(!1)}},X=async()=>{let e=A.trim();if(!e){q({type:`error`,text:`Please enter a valid GitHub token.`});return}z(!0),q(null);try{let t=await y(e);if(t.valid&&t.user){k(t.user),C({token:e,username:t.user.login},t.user),D(S());try{await g(e,n.repoName,n.isPrivate)}catch{}j(``),N(!1),q({type:`success`,text:`Verified and connected as @${t.user.login}!`,linkUrl:t.user.html_url})}else q({type:`error`,text:t.error||`Token verification failed. Please check permissions.`})}catch(e){q({type:`error`,text:e.message||`Failed to connect with token.`})}finally{z(!1)}},Z=async()=>{if(n.token){V(!0),q(null);try{let e=await g(n.token,n.repoName,n.isPrivate);C({repoName:n.repoName}),q({type:`success`,text:e.created?`Created new repository ${e.full_name} on GitHub!`:`Connected to existing repository ${e.full_name}!`,linkUrl:e.html_url})}catch(e){q({type:`error`,text:e.message||`Failed to initialize repository.`})}finally{V(!1)}}},Q=async()=>{if(n.token&&n.repoName){U(!0),q(null);try{let e=await _(n.token,n.repoName,n.branch);q({type:`success`,text:e.message||`Synced ${e.synced_count} solutions to ${n.repoName}!`,linkUrl:e.repo_url})}catch(e){q({type:`error`,text:e.message||`Batch sync failed.`})}finally{U(!1)}}},$=async()=>{if(!t||!n.token)return;let e=t.code||t.reference_code;if(!e||!e.trim()){q({type:`error`,text:`Current problem has no code to push. Write or save code first!`});return}G(!0),q(null);try{let r={token:n.token,repo:n.repoName,branch:n.branch,problem_number:t.problem_number,problem_name:t.name||`Algorithm Problem`,difficulty:t.difficulty||`Medium`,pattern:t.pattern||`Algorithms`,optimal_time:t.optimal_time||`O(N)`,optimal_space:t.optimal_space||`O(1)`,description:t.description||``,code:e},i=await x(r);q({type:`success`,text:`Committed ${t.name} to GitHub!`,linkUrl:i.html_url})}catch(e){q({type:`error`,text:e.message||`Failed to push current solution.`})}finally{G(!1)}},ee=e=>{C({autoCommit:e}),D(t=>({...t,autoCommit:e})),q({type:`info`,text:e?`Auto-commit ENABLED: Solutions will sync automatically on submission.`:`Auto-commit DISABLED: You can still push manually any time.`})};return(0,E.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-4 sm:p-6 flex flex-col justify-between select-none font-sans text-ink-black overflow-y-auto custom-scrollbar`,children:[(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between border-b-[3px] border-ink-black pb-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(`div`,{className:`w-9 h-9 bg-ink-black rounded border-2 border-ink-black flex items-center justify-center text-white shadow-[2px_2px_0px_0px_rgba(0,0,0,0.15)]`,children:(0,E.jsx)(`svg`,{className:`w-5 h-5 fill-white`,viewBox:`0 0 19 19`,children:(0,E.jsx)(`path`,{fillRule:`evenodd`,d:`M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844`,clipRule:`evenodd`})})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{className:`font-headline-md font-bold text-sm uppercase m-0 flex items-center gap-2`,children:`GitHub Solutions Station`}),(0,E.jsx)(`p`,{className:`text-[11px] text-trash-gray font-semibold m-0`,children:`Sync algorithm solutions & auto-commit to your personal portfolio repository`})]})]}),(0,E.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,E.jsx)(`span`,{className:`px-2.5 py-1 text-[9px] font-bold font-arcade uppercase border-2 border-ink-black ${J?`bg-emerald-300 text-emerald-950`:`bg-amber-200 text-amber-950`}`,children:J?`CONNECTED`:`DISCONNECTED`})})]}),J?(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[O?.avatar_url?(0,E.jsx)(`img`,{src:O.avatar_url,alt:O.login,className:`w-10 h-10 rounded-full border-2 border-ink-black shadow-[1px_1px_0px_0px_#1E293B]`}):(0,E.jsx)(`div`,{className:`w-10 h-10 bg-slate-200 rounded-full border-2 border-ink-black flex items-center justify-center font-bold`,children:`GH`}),(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,E.jsx)(`span`,{className:`font-bold text-xs text-ink-black`,children:O?.name||O?.login||n.username}),(0,E.jsxs)(`span`,{className:`text-[10px] text-trash-gray font-mono`,children:[`(@`,O?.login||n.username,`)`]})]}),(0,E.jsxs)(`div`,{className:`text-[11px] text-slate-600 font-medium flex items-center gap-1 mt-0.5`,children:[(0,E.jsx)(u,{className:`w-3.5 h-3.5 text-blue-600 shrink-0`}),(0,E.jsxs)(`span`,{className:`font-semibold text-ink-black`,children:[n.username||O?.login,`/`,n.repoName]}),(0,E.jsxs)(`span`,{className:`text-slate-400`,children:[`(`,n.branch,`)`]})]})]})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxs)(`a`,{href:`https://github.com/${n.username||O?.login}/${n.repoName}`,target:`_blank`,rel:`noopener noreferrer`,className:`px-3 py-1.5 bg-slate-50 hover:bg-slate-100 border-2 border-ink-black text-xs font-bold text-ink-black flex items-center gap-1 shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none no-underline cursor-pointer`,children:[(0,E.jsx)(f,{className:`w-3.5 h-3.5`}),(0,E.jsx)(`span`,{children:`View Repo`})]}),(0,E.jsxs)(`button`,{onClick:()=>{window.confirm(`Disconnect your GitHub account from AlgoSpaced?`)&&(w(),D(S()),k(null),q({type:`info`,text:`Disconnected from GitHub.`}))},className:`px-3 py-1.5 bg-white hover:bg-rose-50 border-2 border-rose-300 text-rose-700 text-xs font-bold flex items-center gap-1 cursor-pointer transition-all`,title:`Disconnect GitHub`,children:[(0,E.jsx)(o,{className:`w-3 h-3`}),(0,E.jsx)(`span`,{children:`Disconnect`})]})]})]}),(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-2 border-slate-200`,children:[(0,E.jsxs)(`span`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black flex items-center gap-1.5`,children:[(0,E.jsx)(i,{className:`w-3.5 h-3.5 text-ink-black`}),`Target Repository & Branch`]}),(0,E.jsxs)(`button`,{onClick:Z,disabled:B,className:`px-2.5 py-1 bg-yellow-100 hover:bg-yellow-200 border border-ink-black text-[10px] font-bold text-ink-black flex items-center gap-1 cursor-pointer disabled:opacity-50 shadow-[1px_1px_0px_0px_#1E293B]`,children:[B?(0,E.jsx)(r,{className:`w-3 h-3 animate-spin`}):(0,E.jsx)(a,{className:`w-3 h-3 text-emerald-700`}),(0,E.jsx)(`span`,{children:`Verify / Init Repo`})]})]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`block text-[10px] font-bold text-trash-gray uppercase mb-1`,children:`Repository Name`}),(0,E.jsx)(`input`,{type:`text`,value:n.repoName,onChange:e=>{let t=e.target.value;D(e=>({...e,repoName:t})),C({repoName:t})},placeholder:`algospaced-solutions`,className:`w-full bg-slate-50 border-2 border-ink-black rounded py-1.5 px-2.5 text-xs font-mono font-medium focus:outline-none focus:bg-white`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`block text-[10px] font-bold text-trash-gray uppercase mb-1`,children:`Branch Name`}),(0,E.jsx)(`input`,{type:`text`,value:n.branch,onChange:e=>{let t=e.target.value;D(e=>({...e,branch:t})),C({branch:t})},placeholder:`main`,className:`w-full bg-slate-50 border-2 border-ink-black rounded py-1.5 px-2.5 text-xs font-mono font-medium focus:outline-none focus:bg-white`})]})]}),(0,E.jsxs)(`div`,{className:`pt-2 border-t border-slate-100 flex items-center justify-between`,children:[(0,E.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,E.jsx)(l,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`span`,{className:`text-xs font-bold text-ink-black block`,children:`Auto-commit on every submission`}),(0,E.jsx)(`span`,{className:`text-[10px] text-trash-gray font-medium`,children:`Automatically push code to your repo when grading a review card or saving a solution.`})]})]}),(0,E.jsxs)(`label`,{className:`relative inline-flex items-center cursor-pointer select-none`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:n.autoCommit,onChange:e=>ee(e.target.checked),className:`sr-only peer`}),(0,E.jsx)(`div`,{className:`w-9 h-5 bg-slate-300 peer-focus:outline-none border-2 border-ink-black rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-2 after:border-ink-black after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-emerald-500`})]})]})]}),(0,E.jsxs)(`div`,{className:`bg-[#fffdf0] border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,E.jsxs)(`span`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black flex items-center gap-1.5`,children:[(0,E.jsx)(h,{className:`w-3.5 h-3.5 text-ink-black`}),`Manual Push & Sync Operations`]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,E.jsxs)(`button`,{onClick:$,disabled:W||!t,className:`p-3 bg-white hover:bg-emerald-50 border-2 border-ink-black text-left flex flex-col justify-between gap-1 shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer transition-all disabled:opacity-50`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,E.jsxs)(`span`,{className:`font-bold text-xs text-ink-black font-headline-md flex items-center gap-1.5`,children:[W?(0,E.jsx)(r,{className:`w-3.5 h-3.5 animate-spin text-emerald-600`}):(0,E.jsx)(s,{className:`w-3.5 h-3.5 text-emerald-600`}),`Push Active Problem`]}),t?.problem_number&&(0,E.jsxs)(`span`,{className:`text-[9px] font-mono px-1.5 py-0.5 bg-emerald-100 text-emerald-800 rounded font-bold`,children:[`#`,t.problem_number]})]}),(0,E.jsx)(`span`,{className:`text-[10px] text-slate-500 line-clamp-1`,children:t?.name||`No active problem open in review`})]}),(0,E.jsxs)(`button`,{onClick:Q,disabled:H,className:`p-3 bg-[#ffe24c] hover:bg-yellow-300 border-2 border-ink-black text-left flex flex-col justify-between gap-1 shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer transition-all disabled:opacity-50`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,E.jsxs)(`span`,{className:`font-bold text-xs text-ink-black font-headline-md flex items-center gap-1.5`,children:[H?(0,E.jsx)(r,{className:`w-3.5 h-3.5 animate-spin text-ink-black`}):(0,E.jsx)(u,{className:`w-3.5 h-3.5 text-ink-black`}),`Sync Entire Library`]}),(0,E.jsx)(`span`,{className:`text-[8px] font-arcade uppercase font-bold bg-white px-1.5 py-0.5 border border-ink-black`,children:`BATCH`})]}),(0,E.jsx)(`span`,{className:`text-[10px] text-slate-700`,children:`Push all solved problems + generate root README index`})]})]})]})]}):(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-5 sm:p-6 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] text-center space-y-4`,children:[(0,E.jsxs)(`div`,{className:`max-w-md mx-auto space-y-2`,children:[(0,E.jsx)(`h4`,{className:`font-headline-md font-bold text-sm uppercase text-ink-black m-0`,children:`Connect Your GitHub Account`}),(0,E.jsx)(`p`,{className:`text-xs text-trash-gray font-medium leading-relaxed m-0`,children:`Sync all your DSA solutions directly to your GitHub repository. Commit automatically on review completion or push anytime with 1-click.`})]}),(0,E.jsxs)(`div`,{className:`pt-2 flex flex-col items-center`,children:[(0,E.jsx)(`button`,{onClick:Y,disabled:I,className:`w-full sm:w-auto px-6 py-3 bg-[#24292e] hover:bg-black text-white font-bold text-xs uppercase font-headline-md border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none flex items-center justify-center gap-2.5 transition-all cursor-pointer disabled:opacity-50`,children:I?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{className:`w-4 h-4 animate-spin text-yellow-300`}),(0,E.jsx)(`span`,{children:`AUTHORIZING WITH GITHUB...`})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`svg`,{className:`w-4 h-4 fill-white`,viewBox:`0 0 19 19`,children:(0,E.jsx)(`path`,{fillRule:`evenodd`,d:`M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844`,clipRule:`evenodd`})}),(0,E.jsx)(`span`,{children:`CONNECT WITH GITHUB (1-CLICK)`})]})}),(0,E.jsxs)(`span`,{className:`text-[10px] text-trash-gray mt-2`,children:[`Direct 1-click OAuth (works for guest and signed-in users). Requests `,(0,E.jsx)(`code`,{children:`repo`}),` access.`]})]})]}),(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)]`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>N(!M),className:`w-full flex items-center justify-between text-left text-xs font-bold text-ink-black font-headline-md uppercase cursor-pointer bg-transparent border-0 p-0`,children:[(0,E.jsx)(`span`,{children:`Or connect via Personal Access Token (PAT)`}),(0,E.jsx)(`span`,{className:`text-slate-500`,children:M?`▲ Hide`:`▼ Show`})]}),M&&(0,E.jsxs)(`div`,{className:`mt-3 pt-3 border-t border-slate-200 space-y-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between text-[11px]`,children:[(0,E.jsx)(`span`,{className:`font-semibold text-slate-700`,children:`Personal Access Token:`}),(0,E.jsxs)(`a`,{href:`https://github.com/settings/tokens/new?scopes=repo&description=AlgoSpaced%20Solutions%20Sync`,target:`_blank`,rel:`noopener noreferrer`,className:`text-blue-600 hover:text-blue-800 font-bold flex items-center gap-1 no-underline text-[10px]`,children:[(0,E.jsx)(`span`,{children:`Generate token with repo scope`}),(0,E.jsx)(f,{className:`w-3 h-3`})]})]}),(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(`input`,{type:P?`text`:`password`,value:A,onChange:e=>j(e.target.value),placeholder:`ghp_... or github_pat_...`,className:`w-full bg-slate-50 border-2 border-ink-black rounded py-2 pl-3 pr-9 text-xs font-mono focus:outline-none focus:bg-white`}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>F(!P),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-ink-black cursor-pointer bg-transparent border-0 p-1`,children:P?(0,E.jsx)(m,{className:`w-3.5 h-3.5`}):(0,E.jsx)(p,{className:`w-3.5 h-3.5`})})]}),(0,E.jsx)(`button`,{onClick:X,disabled:R||!A.trim(),className:`px-4 py-2 bg-[#ffe24c] hover:bg-yellow-300 text-ink-black font-bold text-xs uppercase border-2 border-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer disabled:opacity-50 flex items-center gap-1.5`,children:R?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(r,{className:`w-3.5 h-3.5 animate-spin`}),(0,E.jsx)(`span`,{children:`VERIFYING TOKEN...`})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(a,{className:`w-3.5 h-3.5`}),(0,E.jsx)(`span`,{children:`SAVE & CONNECT TOKEN`})]})})]})]})]}),K&&(0,E.jsxs)(`div`,{className:`p-3 border-[2px] border-ink-black text-xs font-semibold rounded flex items-center justify-between gap-2 ${K.type===`success`?`bg-emerald-100 text-emerald-900 border-emerald-600`:K.type===`error`?`bg-rose-100 text-rose-900 border-rose-600`:`bg-sky-100 text-sky-900 border-sky-600`}`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[K.type===`success`?(0,E.jsx)(d,{className:`w-4 h-4 shrink-0`}):(0,E.jsx)(c,{className:`w-4 h-4 shrink-0`}),(0,E.jsx)(`span`,{children:K.text})]}),K.linkUrl&&(0,E.jsxs)(`a`,{href:K.linkUrl,target:`_blank`,rel:`noopener noreferrer`,className:`px-2 py-0.5 bg-white border border-ink-black text-[10px] font-bold text-ink-black hover:bg-slate-50 no-underline shrink-0 flex items-center gap-1`,children:[(0,E.jsx)(`span`,{children:`Open`}),(0,E.jsx)(f,{className:`w-3 h-3`})]})]})]}),(0,E.jsx)(`div`,{className:`pt-4 border-t border-slate-300 flex justify-end`,children:(0,E.jsx)(`button`,{onClick:e,className:`px-4 py-2 bg-white hover:bg-slate-100 border-[2px] border-ink-black text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer uppercase`,children:`CLOSE`})})]})};export{D as GitHubSyncWindow,D as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/GitHubSyncWindow-DHS56rys.js b/algospaced-ui/dist/assets/GitHubSyncWindow-DHS56rys.js deleted file mode 100644 index 84b3d8f7dff5813682f4f6130c87af1882f9412b..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/GitHubSyncWindow-DHS56rys.js +++ /dev/null @@ -1 +0,0 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,A as n,Bt as r,H as i,Rt as a,X as o,Y as s,Z as c,a as l,et as u,ft as d,mt as f,st as p,tt as m,yt as h}from"./vendor-react-CIO8MTK1.js";import{a as g,c as _,i as v,l as y,n as b,o as x,r as S,s as C,t as w}from"./githubSyncService-x0Mm_uEl.js";var T=e(r(),1),E=a(),D=({onClose:e,currentProblem:r})=>{let[a,D]=(0,T.useState)(()=>S()),[O,k]=(0,T.useState)(()=>v()),[A,j]=(0,T.useState)(``),[M,N]=(0,T.useState)(!1),[P,F]=(0,T.useState)(!1),[I,L]=(0,T.useState)(!1),[R,z]=(0,T.useState)(!1),[B,V]=(0,T.useState)(!1),[H,U]=(0,T.useState)(!1),[W,G]=(0,T.useState)(!1),[K,q]=(0,T.useState)(null),J=!!(a.token&&(a.username||O?.login));(0,T.useEffect)(()=>{a.token&&!O&&y(a.token).then(e=>{e.valid&&e.user&&(k(e.user),C({username:e.user.login},e.user))})},[a.token,O]);let Y=async()=>{L(!0),q(null);try{let{token:e,user:t}=await b();k(t);let n=S();D(n);try{await g(e,n.repoName,n.isPrivate)}catch{}q({type:`success`,text:`Connected successfully to GitHub as @${t.login}!`,linkUrl:t.html_url})}catch(e){q({type:`error`,text:e.message||`GitHub OAuth authorization failed.`})}finally{L(!1)}},X=async()=>{let e=A.trim();if(!e){q({type:`error`,text:`Please enter a valid GitHub token.`});return}z(!0),q(null);try{let t=await y(e);if(t.valid&&t.user){k(t.user),C({token:e,username:t.user.login},t.user),D(S());try{await g(e,a.repoName,a.isPrivate)}catch{}j(``),N(!1),q({type:`success`,text:`Verified and connected as @${t.user.login}!`,linkUrl:t.user.html_url})}else q({type:`error`,text:t.error||`Token verification failed. Please check permissions.`})}catch(e){q({type:`error`,text:e.message||`Failed to connect with token.`})}finally{z(!1)}},Z=async()=>{if(a.token){V(!0),q(null);try{let e=await g(a.token,a.repoName,a.isPrivate);C({repoName:a.repoName}),q({type:`success`,text:e.created?`Created new repository ${e.full_name} on GitHub!`:`Connected to existing repository ${e.full_name}!`,linkUrl:e.html_url})}catch(e){q({type:`error`,text:e.message||`Failed to initialize repository.`})}finally{V(!1)}}},Q=async()=>{if(a.token&&a.repoName){U(!0),q(null);try{let e=await _(a.token,a.repoName,a.branch);q({type:`success`,text:e.message||`Synced ${e.synced_count} solutions to ${a.repoName}!`,linkUrl:e.repo_url})}catch(e){q({type:`error`,text:e.message||`Batch sync failed.`})}finally{U(!1)}}},$=async()=>{if(!r||!a.token)return;let e=r.code||r.reference_code;if(!e||!e.trim()){q({type:`error`,text:`Current problem has no code to push. Write or save code first!`});return}G(!0),q(null);try{let t={token:a.token,repo:a.repoName,branch:a.branch,problem_number:r.problem_number,problem_name:r.name||`Algorithm Problem`,difficulty:r.difficulty||`Medium`,pattern:r.pattern||`Algorithms`,optimal_time:r.optimal_time||`O(N)`,optimal_space:r.optimal_space||`O(1)`,description:r.description||``,code:e},n=await x(t);q({type:`success`,text:`Committed ${r.name} to GitHub!`,linkUrl:n.html_url})}catch(e){q({type:`error`,text:e.message||`Failed to push current solution.`})}finally{G(!1)}},ee=e=>{C({autoCommit:e}),D(t=>({...t,autoCommit:e})),q({type:`info`,text:e?`Auto-commit ENABLED: Solutions will sync automatically on submission.`:`Auto-commit DISABLED: You can still push manually any time.`})};return(0,E.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-4 sm:p-6 flex flex-col justify-between select-none font-sans text-ink-black overflow-y-auto custom-scrollbar`,children:[(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between border-b-[3px] border-ink-black pb-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(`div`,{className:`w-9 h-9 bg-ink-black rounded border-2 border-ink-black flex items-center justify-center text-white shadow-[2px_2px_0px_0px_rgba(0,0,0,0.15)]`,children:(0,E.jsx)(`svg`,{className:`w-5 h-5 fill-white`,viewBox:`0 0 19 19`,children:(0,E.jsx)(`path`,{fillRule:`evenodd`,d:`M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844`,clipRule:`evenodd`})})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{className:`font-headline-md font-bold text-sm uppercase m-0 flex items-center gap-2`,children:`GitHub Solutions Station`}),(0,E.jsx)(`p`,{className:`text-[11px] text-trash-gray font-semibold m-0`,children:`Sync algorithm solutions & auto-commit to your personal portfolio repository`})]})]}),(0,E.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,E.jsx)(`span`,{className:`px-2.5 py-1 text-[9px] font-bold font-arcade uppercase border-2 border-ink-black ${J?`bg-emerald-300 text-emerald-950`:`bg-amber-200 text-amber-950`}`,children:J?`CONNECTED`:`DISCONNECTED`})})]}),J?(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[O?.avatar_url?(0,E.jsx)(`img`,{src:O.avatar_url,alt:O.login,className:`w-10 h-10 rounded-full border-2 border-ink-black shadow-[1px_1px_0px_0px_#1E293B]`}):(0,E.jsx)(`div`,{className:`w-10 h-10 bg-slate-200 rounded-full border-2 border-ink-black flex items-center justify-center font-bold`,children:`GH`}),(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,E.jsx)(`span`,{className:`font-bold text-xs text-ink-black`,children:O?.name||O?.login||a.username}),(0,E.jsxs)(`span`,{className:`text-[10px] text-trash-gray font-mono`,children:[`(@`,O?.login||a.username,`)`]})]}),(0,E.jsxs)(`div`,{className:`text-[11px] text-slate-600 font-medium flex items-center gap-1 mt-0.5`,children:[(0,E.jsx)(c,{className:`w-3.5 h-3.5 text-blue-600 shrink-0`}),(0,E.jsxs)(`span`,{className:`font-semibold text-ink-black`,children:[a.username||O?.login,`/`,a.repoName]}),(0,E.jsxs)(`span`,{className:`text-slate-400`,children:[`(`,a.branch,`)`]})]})]})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxs)(`a`,{href:`https://github.com/${a.username||O?.login}/${a.repoName}`,target:`_blank`,rel:`noopener noreferrer`,className:`px-3 py-1.5 bg-slate-50 hover:bg-slate-100 border-2 border-ink-black text-xs font-bold text-ink-black flex items-center gap-1 shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none no-underline cursor-pointer`,children:[(0,E.jsx)(m,{className:`w-3.5 h-3.5`}),(0,E.jsx)(`span`,{children:`View Repo`})]}),(0,E.jsxs)(`button`,{onClick:()=>{window.confirm(`Disconnect your GitHub account from AlgoSpaced?`)&&(w(),D(S()),k(null),q({type:`info`,text:`Disconnected from GitHub.`}))},className:`px-3 py-1.5 bg-white hover:bg-rose-50 border-2 border-rose-300 text-rose-700 text-xs font-bold flex items-center gap-1 cursor-pointer transition-all`,title:`Disconnect GitHub`,children:[(0,E.jsx)(i,{className:`w-3 h-3`}),(0,E.jsx)(`span`,{children:`Disconnect`})]})]})]}),(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between border-b pb-2 border-slate-200`,children:[(0,E.jsxs)(`span`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black flex items-center gap-1.5`,children:[(0,E.jsx)(o,{className:`w-3.5 h-3.5 text-ink-black`}),`Target Repository & Branch`]}),(0,E.jsxs)(`button`,{onClick:Z,disabled:B,className:`px-2.5 py-1 bg-yellow-100 hover:bg-yellow-200 border border-ink-black text-[10px] font-bold text-ink-black flex items-center gap-1 cursor-pointer disabled:opacity-50 shadow-[1px_1px_0px_0px_#1E293B]`,children:[B?(0,E.jsx)(n,{className:`w-3 h-3 animate-spin`}):(0,E.jsx)(h,{className:`w-3 h-3 text-emerald-700`}),(0,E.jsx)(`span`,{children:`Verify / Init Repo`})]})]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`block text-[10px] font-bold text-trash-gray uppercase mb-1`,children:`Repository Name`}),(0,E.jsx)(`input`,{type:`text`,value:a.repoName,onChange:e=>{let t=e.target.value;D(e=>({...e,repoName:t})),C({repoName:t})},placeholder:`algospaced-solutions`,className:`w-full bg-slate-50 border-2 border-ink-black rounded py-1.5 px-2.5 text-xs font-mono font-medium focus:outline-none focus:bg-white`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`block text-[10px] font-bold text-trash-gray uppercase mb-1`,children:`Branch Name`}),(0,E.jsx)(`input`,{type:`text`,value:a.branch,onChange:e=>{let t=e.target.value;D(e=>({...e,branch:t})),C({branch:t})},placeholder:`main`,className:`w-full bg-slate-50 border-2 border-ink-black rounded py-1.5 px-2.5 text-xs font-mono font-medium focus:outline-none focus:bg-white`})]})]}),(0,E.jsxs)(`div`,{className:`pt-2 border-t border-slate-100 flex items-center justify-between`,children:[(0,E.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,E.jsx)(l,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`span`,{className:`text-xs font-bold text-ink-black block`,children:`Auto-commit on every submission`}),(0,E.jsx)(`span`,{className:`text-[10px] text-trash-gray font-medium`,children:`Automatically push code to your repo when grading a review card or saving a solution.`})]})]}),(0,E.jsxs)(`label`,{className:`relative inline-flex items-center cursor-pointer select-none`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:a.autoCommit,onChange:e=>ee(e.target.checked),className:`sr-only peer`}),(0,E.jsx)(`div`,{className:`w-9 h-5 bg-slate-300 peer-focus:outline-none border-2 border-ink-black rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-2 after:border-ink-black after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-emerald-500`})]})]})]}),(0,E.jsxs)(`div`,{className:`bg-[#fffdf0] border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,E.jsxs)(`span`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black flex items-center gap-1.5`,children:[(0,E.jsx)(p,{className:`w-3.5 h-3.5 text-ink-black`}),`Manual Push & Sync Operations`]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,E.jsxs)(`button`,{onClick:$,disabled:W||!r,className:`p-3 bg-white hover:bg-emerald-50 border-2 border-ink-black text-left flex flex-col justify-between gap-1 shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer transition-all disabled:opacity-50`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,E.jsxs)(`span`,{className:`font-bold text-xs text-ink-black font-headline-md flex items-center gap-1.5`,children:[W?(0,E.jsx)(n,{className:`w-3.5 h-3.5 animate-spin text-emerald-600`}):(0,E.jsx)(s,{className:`w-3.5 h-3.5 text-emerald-600`}),`Push Active Problem`]}),r?.problem_number&&(0,E.jsxs)(`span`,{className:`text-[9px] font-mono px-1.5 py-0.5 bg-emerald-100 text-emerald-800 rounded font-bold`,children:[`#`,r.problem_number]})]}),(0,E.jsx)(`span`,{className:`text-[10px] text-slate-500 line-clamp-1`,children:r?.name||`No active problem open in review`})]}),(0,E.jsxs)(`button`,{onClick:Q,disabled:H,className:`p-3 bg-[#ffe24c] hover:bg-yellow-300 border-2 border-ink-black text-left flex flex-col justify-between gap-1 shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer transition-all disabled:opacity-50`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,E.jsxs)(`span`,{className:`font-bold text-xs text-ink-black font-headline-md flex items-center gap-1.5`,children:[H?(0,E.jsx)(n,{className:`w-3.5 h-3.5 animate-spin text-ink-black`}):(0,E.jsx)(c,{className:`w-3.5 h-3.5 text-ink-black`}),`Sync Entire Library`]}),(0,E.jsx)(`span`,{className:`text-[8px] font-arcade uppercase font-bold bg-white px-1.5 py-0.5 border border-ink-black`,children:`BATCH`})]}),(0,E.jsx)(`span`,{className:`text-[10px] text-slate-700`,children:`Push all solved problems + generate root README index`})]})]})]})]}):(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-5 sm:p-6 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] text-center space-y-4`,children:[(0,E.jsxs)(`div`,{className:`max-w-md mx-auto space-y-2`,children:[(0,E.jsx)(`h4`,{className:`font-headline-md font-bold text-sm uppercase text-ink-black m-0`,children:`Connect Your GitHub Account`}),(0,E.jsx)(`p`,{className:`text-xs text-trash-gray font-medium leading-relaxed m-0`,children:`Sync all your DSA solutions directly to your GitHub repository. Commit automatically on review completion or push anytime with 1-click.`})]}),(0,E.jsxs)(`div`,{className:`pt-2 flex flex-col items-center`,children:[(0,E.jsx)(`button`,{onClick:Y,disabled:I,className:`w-full sm:w-auto px-6 py-3 bg-[#24292e] hover:bg-black text-white font-bold text-xs uppercase font-headline-md border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none flex items-center justify-center gap-2.5 transition-all cursor-pointer disabled:opacity-50`,children:I?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(n,{className:`w-4 h-4 animate-spin text-yellow-300`}),(0,E.jsx)(`span`,{children:`AUTHORIZING WITH GITHUB...`})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`svg`,{className:`w-4 h-4 fill-white`,viewBox:`0 0 19 19`,children:(0,E.jsx)(`path`,{fillRule:`evenodd`,d:`M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844`,clipRule:`evenodd`})}),(0,E.jsx)(`span`,{children:`CONNECT WITH GITHUB (1-CLICK)`})]})}),(0,E.jsxs)(`span`,{className:`text-[10px] text-trash-gray mt-2`,children:[`Direct 1-click OAuth (works for guest and signed-in users). Requests `,(0,E.jsx)(`code`,{children:`repo`}),` access.`]})]})]}),(0,E.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)]`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>N(!M),className:`w-full flex items-center justify-between text-left text-xs font-bold text-ink-black font-headline-md uppercase cursor-pointer bg-transparent border-0 p-0`,children:[(0,E.jsx)(`span`,{children:`Or connect via Personal Access Token (PAT)`}),(0,E.jsx)(`span`,{className:`text-slate-500`,children:M?`▲ Hide`:`▼ Show`})]}),M&&(0,E.jsxs)(`div`,{className:`mt-3 pt-3 border-t border-slate-200 space-y-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between text-[11px]`,children:[(0,E.jsx)(`span`,{className:`font-semibold text-slate-700`,children:`Personal Access Token:`}),(0,E.jsxs)(`a`,{href:`https://github.com/settings/tokens/new?scopes=repo&description=AlgoSpaced%20Solutions%20Sync`,target:`_blank`,rel:`noopener noreferrer`,className:`text-blue-600 hover:text-blue-800 font-bold flex items-center gap-1 no-underline text-[10px]`,children:[(0,E.jsx)(`span`,{children:`Generate token with repo scope`}),(0,E.jsx)(m,{className:`w-3 h-3`})]})]}),(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(`input`,{type:P?`text`:`password`,value:A,onChange:e=>j(e.target.value),placeholder:`ghp_... or github_pat_...`,className:`w-full bg-slate-50 border-2 border-ink-black rounded py-2 pl-3 pr-9 text-xs font-mono focus:outline-none focus:bg-white`}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>F(!P),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-slate-400 hover:text-ink-black cursor-pointer bg-transparent border-0 p-1`,children:P?(0,E.jsx)(u,{className:`w-3.5 h-3.5`}):(0,E.jsx)(t,{className:`w-3.5 h-3.5`})})]}),(0,E.jsx)(`button`,{onClick:X,disabled:R||!A.trim(),className:`px-4 py-2 bg-[#ffe24c] hover:bg-yellow-300 text-ink-black font-bold text-xs uppercase border-2 border-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer disabled:opacity-50 flex items-center gap-1.5`,children:R?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(n,{className:`w-3.5 h-3.5 animate-spin`}),(0,E.jsx)(`span`,{children:`VERIFYING TOKEN...`})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(h,{className:`w-3.5 h-3.5`}),(0,E.jsx)(`span`,{children:`SAVE & CONNECT TOKEN`})]})})]})]})]}),K&&(0,E.jsxs)(`div`,{className:`p-3 border-[2px] border-ink-black text-xs font-semibold rounded flex items-center justify-between gap-2 ${K.type===`success`?`bg-emerald-100 text-emerald-900 border-emerald-600`:K.type===`error`?`bg-rose-100 text-rose-900 border-rose-600`:`bg-sky-100 text-sky-900 border-sky-600`}`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[K.type===`success`?(0,E.jsx)(d,{className:`w-4 h-4 shrink-0`}):(0,E.jsx)(f,{className:`w-4 h-4 shrink-0`}),(0,E.jsx)(`span`,{children:K.text})]}),K.linkUrl&&(0,E.jsxs)(`a`,{href:K.linkUrl,target:`_blank`,rel:`noopener noreferrer`,className:`px-2 py-0.5 bg-white border border-ink-black text-[10px] font-bold text-ink-black hover:bg-slate-50 no-underline shrink-0 flex items-center gap-1`,children:[(0,E.jsx)(`span`,{children:`Open`}),(0,E.jsx)(m,{className:`w-3 h-3`})]})]})]}),(0,E.jsx)(`div`,{className:`pt-4 border-t border-slate-300 flex justify-end`,children:(0,E.jsx)(`button`,{onClick:e,className:`px-4 py-2 bg-white hover:bg-slate-100 border-[2px] border-ink-black text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer uppercase`,children:`CLOSE`})})]})};export{D as GitHubSyncWindow,D as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/JourneyPath-BhAvKOiu.js b/algospaced-ui/dist/assets/JourneyPath-BhAvKOiu.js new file mode 100644 index 0000000000000000000000000000000000000000..22b47f0f63463b7b32b54083266532b2f5d368e3 --- /dev/null +++ b/algospaced-ui/dist/assets/JourneyPath-BhAvKOiu.js @@ -0,0 +1,67 @@ +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,B as n,Bt as r,Dt as i,E as a,H as o,Ht as s,K as c,L as l,M as u,S as d,St as f,T as p,V as m,X as h,_ as g,a as _,bt as v,c as y,ft as b,g as x,gt as S,ht as C,i as w,it as T,k as E,l as D,m as O,o as k,pt as A,q as j,r as M,st as ee,tt as te,u as ne,vt as re,x as ie,xt as ae,yt as N}from"./vendor-react-hnaVBnLv.js";import{s as P}from"./firebaseClient-DZobvwSx.js";import{a as oe,c as se,o as F}from"./index-DVWZ15xt.js";import{t as ce}from"./confetti.module-Uxh4CK4s.js";var I=e(s(),1),L=2600,R=1500,z=[{tMax:.15,name:`The Whispering Coast & Lowlands`,biome:`coast`},{tMax:.32,name:`The Elderwood Deep Forest`,biome:`forest`},{tMax:.48,name:`River Elden & The Twin Fords`,biome:`river`},{tMax:.68,name:`The Dragon Tooth Mountains & Passes`,biome:`mountain`},{tMax:.83,name:`The Misty Glade & Highland Woods`,biome:`forest`},{tMax:.93,name:`The Roaring Gorge & Cataracts`,biome:`river`},{tMax:1,name:`The Sunstone Peaks & Ancient Citadel`,biome:`ancient_ruins`}],B=[`Pencil marks still visible from the cartographer’s first survey.`,`A calm breeze sweeps through the grass, carrying the scent of pine.`,`Wooden planks creak underfoot as the river roars below.`,`Craggy pencil hatchings reveal steep, unforgiving granite slopes.`,`Ancient roots break through the worn gravel pathway.`,`The sound of rushing water echoes across the canyon walls.`,`A solitary stone marker inscribed with early explorer symbols.`,`Golden light filters softly through the sketched canopy.`,`Distant mountain ridges frame the expanding horizon.`,`A tranquil haven where wanderers rest before the mountain climb.`];function le(e=[],t={}){let n=[],r=e.length>0?e.length:150,i=[{t:0,x:220,y:1320,elev:10},{t:.08,x:380,y:1140,elev:45},{t:.16,x:580,y:980,elev:120},{t:.24,x:820,y:1120,elev:90},{t:.32,x:940,y:860,elev:180},{t:.4,x:720,y:640,elev:320},{t:.48,x:1050,y:520,elev:580},{t:.56,x:1320,y:720,elev:890},{t:.64,x:1540,y:480,elev:1250},{t:.72,x:1780,y:680,elev:920},{t:.8,x:1980,y:920,elev:460},{t:.88,x:2220,y:760,elev:750},{t:.94,x:2180,y:480,elev:1180},{t:1,x:2420,y:240,elev:1620}];for(let a=0;a1?a/(r-1):0,s=0;for(;so<=e.tMax)||z[z.length-1],D=e.length>0?e[a]:a+1,O=t[D]||(D<0?`Custom Challenge ${a+1}`:`LeetCode #${D}`),k=B[a%B.length];n.push({id:D,sequenceIndex:a,x,y:S,name:O,biome:E.biome,regionName:E.name,elevation:Math.max(10,T),lore:k})}return n}var V=[{id:`wm-bg1`,x:380,y:310,size:70,height:85,ridgeShift:-4,hasSnow:!1,layer:0,elevation:840,rangeName:`Western Crags`},{id:`wm-bg2`,x:490,y:280,size:85,height:105,ridgeShift:6,hasSnow:!0,layer:0,elevation:1120,name:`Peak of the North Wind`,rangeName:`Western Crags`},{id:`wm-bg3`,x:620,y:300,size:75,height:95,ridgeShift:-3,hasSnow:!1,layer:0,elevation:960,rangeName:`Western Crags`},{id:`wm-bg4`,x:730,y:320,size:65,height:80,ridgeShift:4,hasSnow:!1,layer:0,elevation:780,rangeName:`Western Crags`},{id:`m1`,x:430,y:375,size:80,height:105,ridgeShift:5,hasSnow:!0,elevation:1240,name:`Crag of the Mist`,rangeName:`Western Crags`},{id:`m2`,x:530,y:345,size:95,height:125,ridgeShift:-7,hasSnow:!0,elevation:1480,name:`Peak of Solitude`,rangeName:`Western Crags`},{id:`m3`,x:630,y:365,size:85,height:110,ridgeShift:3,hasSnow:!0,elevation:1310,name:`Shadowhorn`,rangeName:`Western Crags`},{id:`m4`,x:720,y:385,size:70,height:90,ridgeShift:-4,hasSnow:!1,elevation:990,rangeName:`Western Crags`},{id:`m5`,x:370,y:430,size:55,height:65,ridgeShift:4,hasSnow:!1,layer:2,elevation:620,rangeName:`Western Crags`},{id:`m6`,x:470,y:425,size:68,height:80,ridgeShift:-3,hasSnow:!1,layer:2,elevation:760,name:`Gullwing Bluff`,rangeName:`Western Crags`},{id:`m6b`,x:575,y:420,size:72,height:88,ridgeShift:3,hasSnow:!1,layer:2,elevation:850,rangeName:`Western Crags`},{id:`m6c`,x:670,y:435,size:58,height:70,ridgeShift:-2,hasSnow:!1,layer:2,elevation:680,rangeName:`Western Crags`},{id:`dt-bg1`,x:1130,y:260,size:90,height:120,ridgeShift:-6,hasSnow:!0,layer:0,elevation:1850,rangeName:`Dragon's Tooth Range`},{id:`dt-bg2`,x:1250,y:225,size:115,height:150,ridgeShift:8,hasSnow:!0,layer:0,elevation:2180,name:`Crown of the North`,rangeName:`Dragon's Tooth Range`},{id:`dt-bg3`,x:1380,y:210,size:130,height:175,ridgeShift:-10,hasSnow:!0,layer:0,elevation:2450,name:`Apex of Clouds`,rangeName:`Dragon's Tooth Range`},{id:`dt-bg4`,x:1510,y:240,size:110,height:145,ridgeShift:7,hasSnow:!0,layer:0,elevation:2020,rangeName:`Dragon's Tooth Range`},{id:`dt-bg5`,x:1640,y:280,size:90,height:115,ridgeShift:-5,hasSnow:!0,layer:0,elevation:1690,rangeName:`Dragon's Tooth Range`},{id:`m7`,x:1190,y:325,size:105,height:140,ridgeShift:-8,hasSnow:!0,elevation:1980,name:`The Dragon's Crest`,rangeName:`Dragon's Tooth Range`},{id:`m8`,x:1310,y:295,size:125,height:165,ridgeShift:10,hasSnow:!0,elevation:2360,name:`Frostcrag Pinnacle`,rangeName:`Dragon's Tooth Range`},{id:`m9`,x:1435,y:320,size:115,height:150,ridgeShift:-6,hasSnow:!0,elevation:2120,name:`Thunderhorn Peak`,rangeName:`Dragon's Tooth Range`},{id:`m10`,x:1560,y:355,size:98,height:125,ridgeShift:7,hasSnow:!0,elevation:1780,name:`Screaming Ridge`,rangeName:`Dragon's Tooth Range`},{id:`m10b`,x:1680,y:375,size:85,height:105,ridgeShift:-4,hasSnow:!1,elevation:1420,rangeName:`Dragon's Tooth Range`},{id:`m11`,x:1260,y:415,size:90,height:115,ridgeShift:-5,hasSnow:!0,elevation:1560,name:`Ironhorn Needle`,rangeName:`Dragon's Tooth Range`},{id:`m12`,x:1375,y:405,size:100,height:130,ridgeShift:6,hasSnow:!0,elevation:1720,name:`Shadowcrevasse Crag`,rangeName:`Dragon's Tooth Range`},{id:`m13`,x:1490,y:440,size:88,height:110,ridgeShift:-4,hasSnow:!0,elevation:1490,rangeName:`Dragon's Tooth Range`},{id:`m14`,x:1610,y:435,size:82,height:100,ridgeShift:5,hasSnow:!1,elevation:1320,rangeName:`Dragon's Tooth Range`},{id:`m15`,x:1160,y:590,size:80,height:100,ridgeShift:5,hasSnow:!1,elevation:1180,name:`Wanderer's Bluff`,rangeName:`Mid-Pass Gorge`},{id:`m16`,x:1390,y:610,size:90,height:115,ridgeShift:-6,hasSnow:!0,elevation:1390,name:`Eagle Eye Ridge`,rangeName:`Mid-Pass Gorge`},{id:`m17`,x:1510,y:585,size:95,height:120,ridgeShift:5,hasSnow:!0,elevation:1520,name:`Razorback Spine`,rangeName:`Mid-Pass Gorge`},{id:`m18`,x:1630,y:565,size:85,height:105,ridgeShift:-4,hasSnow:!1,elevation:1280,rangeName:`Mid-Pass Gorge`},{id:`m18b`,x:1740,y:580,size:75,height:90,ridgeShift:3,hasSnow:!1,elevation:1050,rangeName:`Mid-Pass Gorge`},{id:`es-bg1`,x:1980,y:310,size:88,height:115,ridgeShift:-5,hasSnow:!0,layer:0,elevation:1650,rangeName:`Sunstone Highlands`},{id:`es-bg2`,x:2110,y:245,size:105,height:140,ridgeShift:6,hasSnow:!0,layer:0,elevation:1980,name:`Sun Pillar`,rangeName:`Sunstone Highlands`},{id:`es-bg3`,x:2260,y:160,size:135,height:180,ridgeShift:-8,hasSnow:!0,layer:0,elevation:2580,name:`Crown of the Heavens`,rangeName:`Sunstone Highlands`},{id:`es-bg4`,x:2410,y:210,size:115,height:150,ridgeShift:7,hasSnow:!0,layer:0,elevation:2240,rangeName:`Sunstone Highlands`},{id:`m19`,x:2040,y:375,size:98,height:128,ridgeShift:6,hasSnow:!0,elevation:1720,name:`Sunstone Spire`,rangeName:`Sunstone Highlands`},{id:`m20`,x:2170,y:315,size:115,height:150,ridgeShift:-7,hasSnow:!0,elevation:2080,name:`Sanctuary Peak`,rangeName:`Sunstone Highlands`},{id:`m21`,x:2310,y:220,size:130,height:170,ridgeShift:8,hasSnow:!0,elevation:2390,name:`Pinnacle of the Ancients`,rangeName:`Sunstone Highlands`},{id:`m22`,x:2440,y:360,size:90,height:115,ridgeShift:-5,hasSnow:!0,elevation:1610,name:`Falcon Perch`,rangeName:`Sunstone Highlands`},{id:`m23`,x:2260,y:405,size:82,height:98,ridgeShift:4,hasSnow:!1,elevation:1250,name:`Altar Crag`,rangeName:`Sunstone Highlands`},{id:`m24`,x:2380,y:420,size:76,height:88,ridgeShift:-3,hasSnow:!1,elevation:1120,rangeName:`Sunstone Highlands`},{id:`m25`,x:2140,y:450,size:70,height:80,ridgeShift:3,hasSnow:!1,elevation:980,rangeName:`Sunstone Highlands`}],H=[{id:`river-elden`,name:`River Elden`,d:`M 1340,290 C 1310,380 1260,460 1210,540 C 1140,640 1020,700 960,820 C 900,940 930,1060 880,1180 C 840,1280 760,1360 690,1480`,width:14,hasBridges:[{x:945,y:855,angle:-35},{x:890,y:1160,angle:25}]},{id:`river-silver`,name:`Silver Meander`,d:`M 580,410 C 650,490 730,550 780,660 C 830,760 910,810 960,820`,width:8,hasBridges:[{x:740,y:620,angle:45}]},{id:`river-cataract`,name:`Highland Torrent`,d:`M 2150,320 C 2100,450 2050,600 2020,760 C 1990,920 1920,1050 1840,1180 C 1760,1310 1710,1420 1660,1500`,width:11,hasBridges:[{x:2010,y:810,angle:-20}]}],U=[{id:`f1`,name:`The Whispering Pines`,cx:580,cy:1040,rx:230,ry:160,treeCount:42,trees:W(580,1040,210,140,42,`pines`)},{id:`f2`,name:`Elderwood Deep`,cx:820,cy:1140,rx:250,ry:180,treeCount:52,trees:W(820,1140,230,160,52,`oaks`)},{id:`f3`,name:`Mistwood Valley`,cx:860,cy:620,rx:190,ry:140,treeCount:36,trees:W(860,620,170,120,36,`willows`)},{id:`f4`,name:`Highland Spruces`,cx:1760,cy:740,rx:210,ry:155,treeCount:38,trees:W(1760,740,190,135,38,`highland_spruce`)},{id:`f5`,name:`Verdant Basin`,cx:1960,cy:980,rx:200,ry:150,treeCount:38,trees:W(1960,980,180,130,38,`mixed`)},{id:`f6`,name:`Shadowglen Copse`,cx:390,cy:690,rx:140,ry:100,treeCount:22,trees:W(390,690,120,80,22,`pines`)},{id:`f7`,name:`Sunstone Grove`,cx:2360,cy:580,rx:150,ry:110,treeCount:24,trees:W(2360,580,130,90,24,`mixed`)}];function W(e,t,n,r,i,a){let o=[];for(let s=0;s{setTimeout(()=>{if(!this.ctx)return;let t=this.ctx.currentTime,n=this.ctx.createOscillator(),r=this.ctx.createGain();n.type=`sine`,n.frequency.setValueAtTime(e,t),r.gain.setValueAtTime(.001,t),r.gain.linearRampToValueAtTime(.15,t+.05),r.gain.exponentialRampToValueAtTime(1e-4,t+1.2),n.connect(r),r.connect(this.ctx.destination),n.start(t),n.stop(t+1.3)},t*120)}))}},J=r();function Y(e){let t=Math.sin(e*12.9898+78.233)*43758.5453;return t-Math.floor(t)}var de=({mountain:e,theme:t})=>{let n=t.id!==`parchment`,r=t.pencilColor,i=t.pencilShade,{id:a,x:o,y:s,size:c,height:l,ridgeShift:u=0,hasSnow:d=l>95}=e,f=(0,I.useMemo)(()=>{let e=0;for(let t=0;t.65?l*.035:0;f.push({x:Math.round(o+u),y:Math.round(s+d)})}let p=[{x:t,y:n}];for(let r=1;r<=6;r++){let a=r/6,o=t+(i-t)*a**.92,s=n+l*a,u=(Y(e+r*43)-.48)*(c*.14)*Math.sin(a*Math.PI),d=Y(e+r*59)>.65?l*.035:0;p.push({x:Math.round(o+u),y:Math.round(s+d)})}let m=[{x:t,y:n}];for(let r=1;r<=7;r++){let i=r/7,a=t+(o+u*.25+(Y(e+101)-.5)*(c*.18)-t)*i**1.15,s=n+l*i,d=Math.sin(i*Math.PI*2.2+Y(e+113))*(c*.09);m.push({x:Math.round(a+d),y:Math.round(s)})}let h=[],g=m[2];if(g){let t=o+c*.52+(Y(e+201)-.5)*14,n=s-l*.16,r=(g.x+t)/2+10,i=(g.y+n)/2-5;h.push({d:`M ${g.x},${g.y} Q ${r},${i} ${t},${n}`,side:`right`})}let _=m[3];if(_){let t=o-c*.55+(Y(e+301)-.5)*14,n=s-l*.14,r=(_.x+t)/2-8,i=(_.y+n)/2-4;h.push({d:`M ${_.x},${_.y} Q ${r},${i} ${t},${n}`,side:`left`})}let v=[],y=Math.max(12,Math.round(l/5.2));for(let r=1;r<=y;r++){let a=r/(y+1),o=m[Math.min(m.length-1,Math.max(0,Math.round(a*(m.length-1))))],c=n+l*a,u=p[Math.min(p.length-1,Math.max(0,Math.round(a*(p.length-1))))]||{x:t+(i-t)*a,y:c},d=o.x+(u.x-o.x)*.05,f=c+(Y(e+r*71)-.5)*2,h=r%3==0?.88:r%2==0?.68:.48,g=d+(u.x-d)*h,_=(c-n)*.18+(u.y-c)*.3,b=Math.min(s+2,f+_+(Y(e+r*83)-.5)*3);v.push({x1:Math.round(d),y1:Math.round(f),x2:Math.round(g),y2:Math.round(b),width:r<4?.85:1.15,opacity:(1-a*.35)*.8})}let b=[],x=Math.max(4,Math.round(l/20));for(let i=1;i<=x;i++){let a=(i+.25)/(x+1),o=n+l*a,s=m[Math.min(m.length-1,Math.round(a*(m.length-1)))],c=f[Math.min(f.length-1,Math.round(a*(f.length-1)))]||{x:t-(t-r)*a,y:o},u=s.x-(s.x-c.x)*.12,d=o+1,p=s.x-(s.x-c.x)*(.45+Y(e+i*97)*.25),h=o+6+Y(e+i*103)*5,g=(u+p)/2-3,_=(d+h)/2+2;b.push({d:`M ${Math.round(u)},${Math.round(d)} Q ${Math.round(g)},${Math.round(_)} ${Math.round(p)},${Math.round(h)}`,width:.85})}let S=``;if(d){let e=f[2]||f[1],r=m[2]||m[1],i=p[2]||p[1];S=`M ${t},${n} + L ${f[1].x},${f[1].y} + L ${e.x},${e.y} + Q ${(e.x+r.x)/2},${e.y-5} ${r.x},${r.y+3} + Q ${(r.x+i.x)/2},${i.y-4} ${i.x},${i.y} + L ${p[1].x},${p[1].y} + Z`}let C=[...[...f].reverse().map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`),...p.slice(1).map(e=>`L ${e.x},${e.y}`)].join(` `),w=f[f.length-1],T=p[p.length-1],E=m[m.length-1],D=`${C} Q ${o},${s+10} ${w.x},${w.y} Z`,O=[...m.map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`),`Q ${(E.x+T.x)/2},${s+6} ${T.x},${T.y}`,...[...p].reverse().slice(1).map(e=>`L ${e.x},${e.y}`),`Z`].join(` `),k=m.map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `),A=[],j=Math.round(c/9);for(let t=0;t(0,J.jsx)(`path`,{d:e.d,fill:`none`,strokeWidth:e.width},t))}),(0,J.jsx)(`g`,{id:`hachures-${a}`,stroke:i,strokeLinecap:`round`,children:f.hachures.map((e,t)=>(0,J.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:e.width,opacity:e.opacity},t))}),(0,J.jsx)(`g`,{id:`spurs-${a}`,children:f.spurs.map((e,t)=>(0,J.jsx)(`path`,{d:e.d,fill:`none`,stroke:e.side===`right`?r:i,strokeWidth:e.side===`right`?1.5:1.15,strokeLinecap:`round`,opacity:.85},t))}),(0,J.jsx)(`path`,{d:f.openSlopesStrokePath,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:f.ridgePathStr,fill:`none`,stroke:r,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,J.jsx)(`g`,{id:`scree-${a}`,fill:r,opacity:n?.45:.55,children:f.screeStipples.map((e,t)=>(0,J.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r},t))})]})},fe=({tree:e,theme:t})=>{let{x:n,y:r,scale:i=1,type:a=`pine`}=e,o=t.id!==`parchment`,s=t.pencilColor,c=t.pencilShade,l=o?`#1e281c`:`#d8d4bf`,u=o?`#242a1e`:`#ded6bf`,d=o?`#2e251d`:`#cca98a`,f=o?`#1f2920`:`#d5dcc2`,p=o?`#293222`:`#e2dbcb`;return(0,J.jsx)(`g`,{id:`tree-${n}-${r}`,className:`realistic-tree`,children:(()=>{switch(a){case`pine`:case`spruce`:{let e=a===`spruce`?14:17,t=a===`spruce`?32:28;return(0,J.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,J.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:e*.75,ry:`3`,fill:s,opacity:o?.25:.2}),(0,J.jsx)(`path`,{d:`M -1.8,2 L -1,-6 L 1,-6 L 1.8,2 Z`,fill:d,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M 0,-10 + Q ${e*.55},-7 ${e*.95},-3 + Q ${e*.6},0 0, -2 + Q ${-e*.6},0 ${-e*.95},-3 + Q ${-e*.55},-7 0,-10 Z`,fill:l,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M 1,-6 Q ${e*.5},-4 ${e*.85},-3 Q ${e*.4},-1 0,-2 Z`,fill:s,opacity:o?.4:.3}),(0,J.jsx)(`line`,{x1:`2`,y1:`-7`,x2:e*.75,y2:`-4`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`line`,{x1:`1`,y1:`-4`,x2:e*.65,y2:`-2`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`path`,{d:`M 0,-18 + Q ${e*.45},-15 ${e*.8},-11 + Q ${e*.5},-8 0, -10 + Q ${-e*.5},-8 ${-e*.8},-11 + Q ${-e*.45},-15 0,-18 Z`,fill:l,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M 1,-14 Q ${e*.45},-12 ${e*.7},-11 Q ${e*.35},-9 0,-10 Z`,fill:s,opacity:o?.4:.3}),(0,J.jsx)(`line`,{x1:`1`,y1:`-15`,x2:e*.6,y2:`-12`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`path`,{d:`M 0,-25 + Q ${e*.35},-22 ${e*.55},-18 + Q ${e*.3},-16 0, -17 + Q ${-e*.3},-16 ${-e*.55},-18 + Q ${-e*.35},-22 0,-25 Z`,fill:l,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M 0,-${t} L ${e*.35},-${t-9} Q 0,-${t-8} -${e*.35},-${t-9} Z`,fill:l,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M 0,-${t} L ${e*.35},-${t-9} Q 0,-${t-8} 0,-${t-9} Z`,fill:s,opacity:o?.4:.35}),(0,J.jsx)(`path`,{d:`M -5,1 L -3,3 M 3,2 L 5,0 M -1,3 L 0,1`,stroke:s,strokeWidth:`0.8`,strokeLinecap:`round`})]})}case`ancient_oak`:case`oak`:{let e=a===`ancient_oak`,t=e?22:18,l=e?24:20;return(0,J.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,J.jsx)(`ellipse`,{cx:`2`,cy:`2`,rx:t*.8,ry:`4`,fill:s,opacity:o?.3:.22}),(0,J.jsx)(`path`,{d:`M -4,2 Q -3,-4 -2,-8 Q -6,-12 -8,-14 M 4,2 Q 3,-4 2,-8 Q 6,-12 9,-13 M -1,-8 L 0,-15`,fill:`none`,stroke:s,strokeWidth:`1.8`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M -3.5,2 L -1.5,-8 L 1.5,-8 L 3.5,2 Z`,fill:d,stroke:s,strokeWidth:`1`}),(0,J.jsx)(`line`,{x1:`-0.8`,y1:`0`,x2:`-0.8`,y2:`-6`,stroke:c,strokeWidth:`0.75`}),(0,J.jsx)(`line`,{x1:`0.8`,y1:`1`,x2:`0.8`,y2:`-5`,stroke:c,strokeWidth:`0.75`}),(0,J.jsx)(`ellipse`,{cx:`6`,cy:`-14`,rx:t*.45,ry:l*.4,fill:s,opacity:.25}),(0,J.jsx)(`ellipse`,{cx:`2`,cy:`-8`,rx:t*.55,ry:l*.35,fill:s,opacity:.25}),(0,J.jsx)(`path`,{d:`M -${t*.85},-10 + C -${t*1.05},-16 -${t*.8},-23 -${t*.45},-24 + C -${t*.25},-30 ${t*.35},-31 ${t*.65},-25 + C ${t*1.05},-24 ${t*1.15},-16 ${t*.9},-10 + C ${t*1.05},-4 ${t*.65},0 0,-1 + C -${t*.55},0 -${t*.95},-4 -${t*.85},-10 Z`,fill:u,stroke:s,strokeWidth:`1.35`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -${t*.5},-18 Q -${t*.2},-24 ${t*.2},-22 Q ${t*.45},-18 ${t*.3},-14`,fill:`none`,stroke:s,strokeWidth:`1`}),(0,J.jsx)(`path`,{d:`M 1,-12 Q ${t*.5},-15 ${t*.8},-9 Q ${t*.45},-4 1,-6`,fill:s,opacity:o?.35:.28}),(0,J.jsx)(`path`,{d:`M -${t*.65},-10 Q -${t*.3},-13 -${t*.1},-8`,fill:`none`,stroke:s,strokeWidth:`1`}),(0,J.jsx)(`line`,{x1:t*.15,y1:`-17`,x2:t*.55,y2:`-14`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`line`,{x1:t*.25,y1:`-12`,x2:t*.7,y2:`-9`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`line`,{x1:t*.1,y1:`-7`,x2:t*.55,y2:`-4`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`path`,{d:`M -6,1 L -3,2 M 3,2 L 6,1 M -2,3 L -1,1 M 2,3 L 1,1`,stroke:s,strokeWidth:`0.9`,strokeLinecap:`round`})]})}case`willow`:return(0,J.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,J.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:14.4,ry:`3.5`,fill:s,opacity:o?.28:.2}),(0,J.jsx)(`path`,{d:`M -3,2 Q -1,-4 -2,-9 Q -5,-14 -7,-17 M 3,2 Q 2,-4 3,-9 Q 5,-14 8,-16`,fill:`none`,stroke:s,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M -2.5,2 L -1.5,-9 L 2,-9 L 2.5,2 Z`,fill:d,stroke:s,strokeWidth:`0.9`}),(0,J.jsx)(`path`,{d:`M -${18*.85},-12 + C -${18*.95},-20 -9,-27 0,-26 + C 9,-27 ${18*.95},-20 ${18*.85},-12 + C ${18*.6},-7 0,-8 -${18*.85},-12 Z`,fill:f,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -13.5,-12 Q -${18*.85},-4 -12.6,0 M -9.9,-14 Q -${18*.65},-3 -8.1,1 M -6.3,-15 Q -8.1,-1 -4.5,2`,fill:`none`,stroke:s,strokeWidth:`1.1`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M -${18*.15},-16 Q -${18*.15},-2 0,1 M 1.8,-16 Q ${18*.15},-3 3.6,0`,fill:`none`,stroke:s,strokeWidth:`1.1`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M 6.3,-15 Q 9,-2 7.2,2 M ${18*.6},-14 Q 13.5,-2 ${18*.65},1 M ${18*.78},-12 Q 16.2,-3 14.4,0`,fill:`none`,stroke:s,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M 1,-23 Q ${18*.6},-20 13.5,-12 Q 7.2,-10 0,-14 Z`,fill:s,opacity:o?.35:.25}),(0,J.jsx)(`path`,{d:`M -7,2 Q -5,-2 -4,0 M -5,2 Q -3,-3 -2,0 M 4,2 Q 6,-2 7,0 M 6,2 Q 8,-1 9,1`,stroke:s,strokeWidth:`0.8`,fill:`none`})]});default:return(0,J.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,J.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:12*.6,ry:`3`,fill:s,opacity:.25}),(0,J.jsx)(`path`,{d:`M -1.2,2 L -0.6,-16 L 0.6,-16 L 1.2,2 Z`,fill:d,stroke:s,strokeWidth:`1`}),(0,J.jsx)(`line`,{x1:`-1`,y1:`-4`,x2:`0`,y2:`-4`,stroke:s,strokeWidth:`0.9`}),(0,J.jsx)(`line`,{x1:`0`,y1:`-8`,x2:`1`,y2:`-8`,stroke:s,strokeWidth:`0.9`}),(0,J.jsx)(`line`,{x1:`-0.8`,y1:`-12`,x2:`0.2`,y2:`-12`,stroke:s,strokeWidth:`0.9`}),(0,J.jsx)(`path`,{d:`M 0,-26 + C ${12*.7},-22 ${12*.8},-10.4 5.4,-5.2 + C 0,-3.9 -5.4,-5.2 -${12*.8},-10.4 + C -${12*.8},-10.4 -${12*.7},-22 0,-26 Z`,fill:p,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M 0,-26 C ${12*.7},-22 ${12*.8},-10.4 5.4,-5.2 C 0,-3.9 0,-10.4 0,-26 Z`,fill:s,opacity:o?.35:.25}),(0,J.jsx)(`line`,{x1:`1`,y1:`-16`,x2:12*.55,y2:`-13`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`line`,{x1:`1`,y1:`-10`,x2:6,y2:`-7`,stroke:c,strokeWidth:`0.8`}),(0,J.jsx)(`line`,{x1:`-3`,y1:`2`,x2:`-1`,y2:`0`,stroke:s,strokeWidth:`0.8`}),(0,J.jsx)(`line`,{x1:`2`,y1:`2`,x2:`4`,y2:`0`,stroke:s,strokeWidth:`0.8`})]})}})()})},pe=({river:e,theme:t,showLabels:n})=>{let r=t.id!==`parchment`,i=t.pencilColor,a=t.pencilShade,o=r?`#1e2b2e`:`#b8c5be`,s=r?`#d8c8b0`:`#f2e6ce`,c=(0,I.useMemo)(()=>e.id===`river-elden`?{riverPoly:`M 1348,365 + C 1322,410 1274,465 1222,535 + C 1152,635 1032,695 972,815 + C 910,935 942,1055 892,1175 + C 850,1275 770,1355 698,1480 + L 668,1480 + C 745,1355 825,1275 865,1175 + C 915,1055 885,935 948,815 + C 1008,695 1132,635 1205,535 + C 1258,465 1314,410 1348,365 + Z`,leftBank:`M 1348,365 C 1314,410 1258,465 1205,535 C 1132,635 1008,695 948,815 C 885,935 915,1055 865,1175 C 825,1275 745,1355 668,1480`,rightBank:`M 1348,365 C 1322,410 1274,465 1222,535 C 1152,635 1032,695 972,815 C 910,935 942,1055 892,1175 C 850,1275 770,1355 698,1480`,labelPos:{x:1035,y:980,rot:-55},islands:[{cx:958,cy:960,rx:13,ry:6,angle:-45,name:`Elden Ait`},{cx:770,cy:1330,rx:16,ry:7,angle:-50,name:`Otter Shoal`}],waterfall:{x:1214,y:538,width:24,height:20,angle:-38,name:`The Elden Cascades`},rapids:[{x:1140,y:660,angle:-40},{x:920,y:1020,angle:60}],sandbars:[{cx:995,cy:750,rx:11,ry:4.5,angle:30},{cx:900,cy:1110,rx:13,ry:5,angle:-25}],bridges:e.hasBridges||[{x:945,y:855,angle:-35,type:`stone_arch`,name:`Highbridge`},{x:890,y:1160,angle:25,type:`timber_trestle`,name:`Lower Toll Bridge`}]}:e.id===`river-silver`?{riverPoly:`M 585,395 + C 645,478 730,545 782,656 + C 832,756 912,806 962,816 + L 955,826 + C 904,816 824,766 774,664 + C 724,554 642,484 585,395 + Z`,leftBank:`M 585,395 C 642,484 724,554 774,664 C 824,766 904,816 955,826`,rightBank:`M 585,395 C 645,478 730,545 782,656 C 832,756 912,806 962,816`,labelPos:{x:740,y:710,rot:35},islands:[{cx:710,cy:535,rx:9,ry:4.5,angle:35,name:`Willow Islet`}],waterfall:{x:625,y:452,width:18,height:15,angle:45,name:`Silver Falls`},rapids:[{x:810,y:710,angle:50}],sandbars:[{cx:755,cy:610,rx:8,ry:3.5,angle:40}],bridges:e.hasBridges||[{x:740,y:620,angle:45,type:`stone_arch`,name:`Silver Arch`}]}:{riverPoly:`M 2125,420 + C 2065,500 2095,610 2025,720 + C 1955,830 2015,960 1915,1080 + C 1815,1200 1755,1340 1668,1500 + L 1638,1500 + C 1730,1340 1792,1200 1895,1080 + C 1995,960 1938,830 2012,720 + C 2082,610 2058,500 2125,420 + Z`,leftBank:`M 2125,420 C 2058,500 2082,610 2012,720 C 1938,830 1995,960 1895,1080 C 1792,1200 1730,1340 1638,1500`,rightBank:`M 2125,420 C 2065,500 2095,610 2025,720 C 1955,830 2015,960 1915,1080 C 1815,1200 1755,1340 1668,1500`,labelPos:{x:1935,y:1020,rot:-52},islands:[{cx:1850,cy:1155,rx:11,ry:5,angle:-52,name:`Crag Islet`}],waterfall:{x:2048,y:660,width:20,height:18,angle:-35,name:`The Great Cataract`},rapids:[{x:1975,y:860,angle:-55}],sandbars:[{cx:1945,cy:990,rx:10,ry:4.5,angle:-50}],bridges:e.hasBridges||[{x:1982,y:785,angle:-28,type:`stone_arch`,name:`Highland Span`}]},[e.id,e.hasBridges]),l=r?`#3d3425`:`#e6dcbf`,u=r?`#263422`:`#d2d8ba`;return(0,J.jsxs)(`g`,{id:`realistic-${e.id}`,className:`realistic-river-group select-none`,children:[(0,J.jsx)(`path`,{d:c.riverPoly,fill:o,opacity:r?.75:.65}),(0,J.jsx)(`path`,{d:c.leftBank,fill:`none`,stroke:i,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:c.rightBank,fill:`none`,stroke:i,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:c.leftBank,fill:`none`,stroke:a,strokeWidth:`0.7`,opacity:.6,transform:`translate(2, 1)`}),(0,J.jsx)(`path`,{d:c.rightBank,fill:`none`,stroke:a,strokeWidth:`0.7`,opacity:.6,transform:`translate(-2, -1)`}),(0,J.jsx)(`path`,{d:c.leftBank,fill:`none`,stroke:a,strokeWidth:`0.9`,strokeDasharray:`18 28 10 34`,strokeLinecap:`round`,opacity:.55,transform:`translate(5, 2)`}),c.sandbars.map((e,t)=>(0,J.jsxs)(`g`,{transform:`translate(${e.cx}, ${e.cy}) rotate(${e.angle})`,children:[(0,J.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:l,stroke:i,strokeWidth:`1`}),(0,J.jsx)(`circle`,{cx:`-3`,cy:`-1`,r:`0.6`,fill:i}),(0,J.jsx)(`circle`,{cx:`2`,cy:`1`,r:`0.7`,fill:i})]},t)),c.rapids.map((e,t)=>(0,J.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,J.jsx)(`path`,{d:`M -10,-5 Q -5,-7 0,-5 Q 5,-3 10,-5 M -8,0 Q -3,-2 2,0 Q 7,2 9,0`,fill:`none`,stroke:i,strokeWidth:`1.1`,strokeLinecap:`round`,opacity:.7}),(0,J.jsx)(`circle`,{cx:`-4`,cy:`-2`,r:`1.6`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`0.8`}),(0,J.jsx)(`circle`,{cx:`5`,cy:`2`,r:`1.4`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`0.8`})]},t)),c.islands.map((e,a)=>(0,J.jsxs)(`g`,{transform:`translate(${e.cx}, ${e.cy}) rotate(${e.angle})`,children:[(0,J.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:u,stroke:i,strokeWidth:`1.3`}),(0,J.jsx)(`g`,{transform:`scale(${e.rx>14?.55:.42})`,children:(0,J.jsx)(fe,{tree:{x:0,y:-1,scale:.65,type:`willow`,seed:a*99+42},theme:t})}),n&&e.name&&e.rx>12&&(0,J.jsx)(`text`,{x:`0`,y:e.ry+10,textAnchor:`middle`,fill:r?`#d4bfa1`:`#57422f`,className:`font-garamond italic text-[10px] font-semibold select-none`,children:e.name})]},a)),c.waterfall&&(0,J.jsxs)(`g`,{id:`waterfall-${e.id}`,transform:`translate(${c.waterfall.x}, ${c.waterfall.y}) rotate(${c.waterfall.angle})`,children:[(0,J.jsx)(`path`,{d:`M ${-c.waterfall.width/2},-2 Q 0,-5 ${c.waterfall.width/2},-2`,fill:`none`,stroke:i,strokeWidth:`2.2`,strokeLinecap:`round`}),(0,J.jsxs)(`g`,{stroke:i,strokeWidth:`1`,opacity:.75,children:[(0,J.jsx)(`line`,{x1:-c.waterfall.width*.35,y1:`0`,x2:-c.waterfall.width*.35,y2:c.waterfall.height}),(0,J.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:c.waterfall.height+2,strokeWidth:`1.3`}),(0,J.jsx)(`line`,{x1:c.waterfall.width*.35,y1:`0`,x2:c.waterfall.width*.35,y2:c.waterfall.height})]}),(0,J.jsx)(`ellipse`,{cx:`0`,cy:c.waterfall.height+3,rx:c.waterfall.width*.6,ry:`4.5`,fill:s,stroke:i,strokeWidth:`1`,strokeDasharray:`3 2 5 2`,opacity:.85}),n&&c.waterfall.name&&(0,J.jsx)(`text`,{x:`-14`,y:`-8`,textAnchor:`end`,fill:r?`#e4caa0`:`#3d2817`,stroke:r?`#1a1510`:`#f4ead5`,strokeWidth:`3`,style:{paintOrder:`stroke`},className:`font-cinzel text-[10px] font-bold tracking-wider select-none`,children:c.waterfall.name})]}),c.bridges.map((t,a)=>(0,J.jsxs)(`g`,{id:`bridge-${e.id}-${a}`,transform:`translate(${t.x}, ${t.y}) rotate(${t.angle})`,children:[(0,J.jsx)(`rect`,{x:`-22`,y:`-9`,width:`7`,height:`18`,rx:`1`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1.2`}),(0,J.jsx)(`rect`,{x:`15`,y:`-9`,width:`7`,height:`18`,rx:`1`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1.2`}),(0,J.jsx)(`rect`,{x:`-18`,y:`-7`,width:`36`,height:`14`,rx:`2`,fill:r?`#3d3126`:`#d8c7a8`,stroke:i,strokeWidth:`1.6`}),(0,J.jsx)(`line`,{x1:`-10`,y1:`-7`,x2:`-10`,y2:`7`,stroke:i,strokeWidth:`1`}),(0,J.jsx)(`line`,{x1:`0`,y1:`-7`,x2:`0`,y2:`7`,stroke:i,strokeWidth:`1.3`}),(0,J.jsx)(`line`,{x1:`10`,y1:`-7`,x2:`10`,y2:`7`,stroke:i,strokeWidth:`1`}),n&&t.name&&(0,J.jsx)(`text`,{x:`0`,y:`17`,textAnchor:`middle`,fill:r?`#d4bfa1`:`#4a3726`,stroke:r?`#1a1510`:`#f4ead5`,strokeWidth:`2.5`,style:{paintOrder:`stroke`},className:`font-garamond italic text-[10px] font-semibold select-none`,children:t.name})]},a)),n&&(0,J.jsxs)(`text`,{x:c.labelPos.x,y:c.labelPos.y,fill:r?`#e4caa0`:`#4a3420`,stroke:r?`#1a1510`:`#f4ead5`,strokeWidth:`3.5`,style:{paintOrder:`stroke`},className:`font-cinzel italic text-[14px] font-bold tracking-widest select-none`,opacity:.92,transform:`rotate(${c.labelPos.rot} ${c.labelPos.x} ${c.labelPos.y})`,children:[`~ `,e.name,` ~`]})]})},me=({forest:e,theme:t,showLabels:n})=>{let r=t.id!==`parchment`,i=t.pencilColor,a=t.pencilShade,{id:o,name:s,cx:c,cy:l,rx:u,ry:d,trees:f}=e,p=(0,I.useMemo)(()=>[...f].sort((e,t)=>e.y-t.y),[f]),m=(0,I.useMemo)(()=>{let e=[],t=[],n=[],r=c*13+l*19;for(let i=0;i<6;i++){let a=(i*1.8+r*.1)%(Math.PI*2),o=c+u*.7*Math.cos(a),s=l+d*.7*Math.sin(a);i%2==0?e.push({x:Math.round(o),y:Math.round(s),rx:5+i%3*2,ry:3+i%2*1.5,angle:i*35%60-30}):t.push({x:Math.round(o),y:Math.round(s),length:12+i%4*3,angle:i*45%90-45}),n.push({x:Math.round(c+Math.cos(a+.5)*(u*.5)),y:Math.round(l+Math.sin(a+.5)*(d*.5))})}return{boulders:e,fallenLogs:t,fernClusters:n}},[c,l,u,d]),h=(0,I.useMemo)(()=>{let e=[];for(let t=0;t<16;t++){let n=t/16*Math.PI*2,r=1+Math.sin(n*4+c*.05)*.08+Math.cos(n*3+l*.05)*.06,i=c+u*r*Math.cos(n),a=l+d*r*Math.sin(n);e.push({x:Math.round(i),y:Math.round(a)})}return e.map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `)+` Z`},[c,l,u,d]);return(0,J.jsxs)(`g`,{id:`forest-zone-${o}`,className:`realistic-forest-group select-none`,children:[(0,J.jsx)(`path`,{d:h,fill:r?`rgba(32, 42, 26, 0.35)`:`rgba(195, 208, 175, 0.22)`,stroke:a,strokeWidth:`0.85`,strokeDasharray:`5 7 2 7`,opacity:.8}),(0,J.jsx)(`g`,{id:`boulders-${o}`,stroke:i,strokeWidth:`1`,children:m.boulders.map((e,t)=>(0,J.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,J.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:r?`#2b241c`:`#c4b69c`}),(0,J.jsx)(`path`,{d:`M 0,-${e.ry} Q ${e.rx*.6},0 0,${e.ry} Q ${e.rx*.2},0 0,-${e.ry}`,fill:i,opacity:.3})]},t))}),(0,J.jsx)(`g`,{id:`logs-${o}`,stroke:i,strokeWidth:`1.2`,children:m.fallenLogs.map((e,t)=>(0,J.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,J.jsx)(`line`,{x1:-e.length/2,y1:`0`,x2:e.length/2,y2:`0`,strokeLinecap:`round`,strokeWidth:`2.2`}),(0,J.jsx)(`circle`,{cx:-e.length/2,cy:`0`,r:`1.2`,fill:i}),(0,J.jsx)(`circle`,{cx:`2`,cy:`-1.5`,r:`0.8`,fill:r?`#d4bfa1`:`#f0e6d2`})]},t))}),(0,J.jsx)(`g`,{id:`ferns-${o}`,stroke:a,strokeWidth:`0.8`,fill:`none`,children:m.fernClusters.map((e,t)=>(0,J.jsx)(`g`,{transform:`translate(${e.x}, ${e.y})`,children:(0,J.jsx)(`path`,{d:`M 0,0 Q -4,-5 -7,-4 M 0,0 Q -2,-7 -2,-10 M 0,0 Q 3,-6 6,-4`})},t))}),(0,J.jsx)(`g`,{id:`trees-${o}`,children:p.map((e,n)=>(0,J.jsx)(fe,{tree:e,theme:t},n))}),n&&s&&(0,J.jsxs)(`g`,{transform:`translate(${c}, ${l-d-12})`,children:[(0,J.jsx)(`rect`,{x:`-90`,y:`-14`,width:`180`,height:`18`,rx:`3`,fill:r?`#1a1510`:`#f2e8d3`,stroke:a,strokeWidth:`0.75`,opacity:.85}),(0,J.jsxs)(`text`,{x:`0`,y:`0`,textAnchor:`middle`,fill:r?`#d8c2a3`:`#453525`,className:`font-garamond italic font-bold text-[13px] tracking-widest select-none drop-shadow-sm`,children:[`❖ `,s,` ❖`]})]})]})},he=[{x:420,y:780},{x:480,y:830},{x:350,y:920},{x:640,y:1120},{x:710,y:1180},{x:840,y:620},{x:1120,y:840},{x:1180,y:910},{x:1480,y:680},{x:1550,y:740},{x:1620,y:880},{x:1420,y:1150},{x:1510,y:1220},{x:1790,y:640},{x:1860,y:710},{x:2140,y:940},{x:2220,y:890},{x:2080,y:1260}],ge=[`M 780,460 Q 825,435 870,460 M 845,468 Q 885,445 925,468`,`M 1580,520 Q 1630,492 1680,520 M 1650,530 Q 1695,505 1740,530`,`M 1760,440 Q 1810,412 1860,440 M 1835,450 Q 1875,428 1915,450`,`M 1050,620 Q 1095,595 1140,620`,`M 1360,960 Q 1410,932 1460,960 M 1435,970 Q 1475,948 1515,970`,`M 2180,680 Q 2230,652 2280,680`],_e=({theme:e,showLabels:t,finalNode:n,completedCount:r=0,totalNodes:i=1})=>{let a=e.id!==`parchment`,o=e.pencilColor,s=e.pencilShade,c=e.riverColor,l=a?`#1a1510`:`#f4ead5`,u=i>0?Math.min(1,r/i):0,d=u>=.5,f=i>0&&r>=i,p=(0,I.useMemo)(()=>[...V].sort((e,t)=>{let n=e.layer??1,r=t.layer??1;return n===r?e.y-t.y:n-r}),[]);return(0,J.jsxs)(`g`,{id:`terrain-layer`,className:`select-none pointer-events-none`,filter:`url(#quillInk)`,style:{mixBlendMode:a?`normal`:`multiply`},children:[(0,J.jsxs)(`g`,{id:`rhumb-lines`,opacity:a?.1:.14,stroke:o,strokeWidth:`0.75`,children:[(0,J.jsx)(`line`,{x1:`0`,y1:`0`,x2:`2600`,y2:`1500`}),(0,J.jsx)(`line`,{x1:`0`,y1:`1500`,x2:`2600`,y2:`0`}),(0,J.jsx)(`line`,{x1:`1300`,y1:`0`,x2:`1300`,y2:`1500`}),(0,J.jsx)(`line`,{x1:`0`,y1:`750`,x2:`2600`,y2:`750`}),(0,J.jsx)(`line`,{x1:`2360`,y1:`1180`,x2:`0`,y2:`350`,strokeDasharray:`8 6`}),(0,J.jsx)(`line`,{x1:`2360`,y1:`1180`,x2:`900`,y2:`0`,strokeDasharray:`8 6`}),(0,J.jsx)(`circle`,{cx:`500`,cy:`400`,r:`300`,fill:`none`,strokeWidth:`0.55`}),(0,J.jsx)(`circle`,{cx:`2100`,cy:`1100`,r:`350`,fill:`none`,strokeWidth:`0.55`}),(0,J.jsx)(`circle`,{cx:`1300`,cy:`750`,r:`450`,fill:`none`,strokeWidth:`0.65`,strokeDasharray:`4 6`})]}),(0,J.jsxs)(`g`,{id:`coastlines`,stroke:o,fill:`none`,children:[(0,J.jsx)(`path`,{d:`M 0,1180 Q 140,1220 200,1320 T 320,1500 L 0,1500 Z`,fill:a?`#1e2b2e`:`#b8c5be`,opacity:a?.25:.35,stroke:`none`}),(0,J.jsx)(`path`,{d:`M 0,1180 Q 140,1220 200,1320 T 320,1500`,strokeWidth:`2.6`,strokeLinecap:`round`}),[{offset:8,width:1.4,opacity:.75},{offset:16,width:1.1,opacity:.55},{offset:25,width:.9,opacity:.4},{offset:36,width:.75,opacity:.28},{offset:49,width:.6,opacity:.16}].map((e,t)=>(0,J.jsx)(`path`,{d:`M 0,${1180+e.offset} Q ${140-e.offset*.4},${1220+e.offset} ${200-e.offset*.6},${1320+e.offset*.7} T ${320-e.offset*.8},1500`,strokeWidth:e.width,opacity:e.opacity,strokeLinecap:`round`},`waterline-${t}`)),(0,J.jsxs)(`g`,{id:`islands`,strokeWidth:`1.5`,children:[(0,J.jsx)(`path`,{d:`M 80,1390 Q 110,1370 140,1395 Q 120,1420 80,1390 Z`,fill:a?`#231d17`:`#e6d8be`}),(0,J.jsx)(`path`,{d:`M 74,1390 Q 110,1363 146,1395 Q 120,1427 74,1390 Z`,strokeWidth:`0.8`,opacity:`0.55`}),(0,J.jsx)(`path`,{d:`M 68,1390 Q 110,1356 152,1395 Q 120,1434 68,1390 Z`,strokeWidth:`0.6`,opacity:`0.3`}),(0,J.jsx)(`path`,{d:`M 160,1440 Q 185,1425 210,1445 Q 190,1465 160,1440 Z`,fill:a?`#231d17`:`#e6d8be`}),(0,J.jsx)(`path`,{d:`M 154,1440 Q 185,1419 216,1445 Q 190,1471 154,1440 Z`,strokeWidth:`0.8`,opacity:`0.5`})]})]}),(0,J.jsxs)(`g`,{id:`plains-detail`,stroke:s,fill:`none`,opacity:a?.45:.55,children:[ge.map((e,t)=>(0,J.jsx)(`path`,{d:e,strokeWidth:`1.3`,strokeLinecap:`round`},`foothill-${t}`)),he.map((e,t)=>(0,J.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y})`,strokeWidth:`1.1`,strokeLinecap:`round`,children:[(0,J.jsx)(`path`,{d:`M -6,0 Q -8,-6 -11,-8 M -2,0 Q -2,-8 -3,-11 M 2,0 Q 4,-7 7,-9 M -8,1 L 6,1`}),(0,J.jsx)(`path`,{d:`M 12,5 Q 10,0 8,-2 M 15,5 Q 15,-1 15,-4 M 18,5 Q 20,0 22,-2`,opacity:`0.75`})]},`grass-${t}`))]}),(0,J.jsx)(`g`,{id:`rivers-layer`,children:H.map(n=>(0,J.jsx)(pe,{river:n,theme:e,showLabels:t},n.id))}),(0,J.jsx)(`g`,{id:`forests-layer`,children:U.map(n=>(0,J.jsx)(me,{forest:n,theme:e,showLabels:t},n.id))}),(0,J.jsxs)(`g`,{id:`mountains-layer`,children:[(0,J.jsxs)(`g`,{id:`distant-mountain-ridgelines`,opacity:a?.35:.45,stroke:s,fill:`none`,children:[(0,J.jsx)(`path`,{d:`M 330,330 Q 380,290 440,310 T 540,280 T 650,300 T 760,330`,strokeWidth:`1.2`,strokeDasharray:`4 4`}),(0,J.jsx)(`path`,{d:`M 1080,270 Q 1190,210 1310,195 T 1450,220 T 1580,245 T 1720,290`,strokeWidth:`1.4`,strokeDasharray:`5 4`}),(0,J.jsx)(`path`,{d:`M 1940,320 Q 2060,240 2200,180 T 2350,150 T 2480,230`,strokeWidth:`1.4`,strokeDasharray:`5 4`})]}),(0,J.jsxs)(`g`,{id:`alpine-tarns`,children:[(0,J.jsxs)(`g`,{id:`tarn-dragons-eye`,children:[(0,J.jsx)(`ellipse`,{cx:`1350`,cy:`365`,rx:`22`,ry:`12`,fill:c,stroke:o,strokeWidth:`1.4`,opacity:.85}),(0,J.jsx)(`path`,{d:`M 1335,363 Q 1350,361 1365,363 M 1340,367 Q 1350,369 1360,367`,stroke:o,strokeWidth:`0.7`,fill:`none`,opacity:.55}),t&&(0,J.jsx)(`text`,{x:`1350`,y:`348`,textAnchor:`middle`,fill:a?`#c5b597`:`#57422f`,stroke:l,strokeWidth:`3`,style:{paintOrder:`stroke`},className:`font-garamond italic text-[11px] font-semibold select-none`,children:`Dragon's Eye Tarn`})]}),(0,J.jsx)(`g`,{id:`tarn-sunstone`,children:(0,J.jsx)(`ellipse`,{cx:`2210`,cy:`275`,rx:`18`,ry:`10`,fill:c,stroke:o,strokeWidth:`1.3`,opacity:.85})}),(0,J.jsx)(`g`,{id:`tarn-mistwood`,children:(0,J.jsx)(`ellipse`,{cx:`585`,cy:`395`,rx:`16`,ry:`9`,fill:c,stroke:o,strokeWidth:`1.2`,opacity:.85})})]}),p.map(t=>(0,J.jsx)(de,{mountain:t,theme:e},t.id))]}),(0,J.jsxs)(`g`,{id:`sea-monsters`,opacity:a?.72:.85,children:[(0,J.jsxs)(`g`,{transform:`translate(140, 1260) scale(0.85)`,stroke:o,fill:`none`,children:[(0,J.jsx)(`path`,{d:`M 10,20 Q 30,-15 50,20 Q 70,-20 90,20 Q 110,-10 125,20`,strokeWidth:`2.2`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M 10,20 Q -5,10 0,-5 Q 10,-15 18,-5 Q 12,5 10,20 Z`,strokeWidth:`2`,fill:a?`#231e18`:`#e0d3b6`}),(0,J.jsx)(`circle`,{cx:`6`,cy:`-6`,r:`1.5`,fill:o}),(0,J.jsx)(`path`,{d:`M -2,-4 L -10,-7 L -7,-3`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,J.jsx)(`line`,{x1:`30`,y1:`-8`,x2:`33`,y2:`-18`,strokeWidth:`1.5`}),(0,J.jsx)(`line`,{x1:`70`,y1:`-12`,x2:`73`,y2:`-22`,strokeWidth:`1.5`}),(0,J.jsx)(`line`,{x1:`108`,y1:`-4`,x2:`111`,y2:`-14`,strokeWidth:`1.5`}),(0,J.jsx)(`path`,{d:`M -15,22 Q 30,28 70,22 Q 110,28 145,22`,strokeWidth:`1.2`,strokeDasharray:`4 6`}),t&&(0,J.jsx)(`text`,{x:`70`,y:`44`,textAnchor:`middle`,fill:a?`#a89476`:`#6b543b`,className:`font-garamond italic text-[12px]`,children:`“Hic Sunt Dracones”`})]}),(0,J.jsxs)(`g`,{transform:`translate(360, 1420) scale(0.65)`,stroke:o,fill:`none`,children:[(0,J.jsx)(`path`,{d:`M -30,10 Q 0,16 35,10 Q 40,0 30,-5 L -35,-5 Q -40,0 -30,10 Z`,strokeWidth:`1.8`,fill:a?`#2a221b`:`#ded1b4`}),(0,J.jsx)(`line`,{x1:`-15`,y1:`-5`,x2:`-15`,y2:`-45`,strokeWidth:`1.8`}),(0,J.jsx)(`line`,{x1:`10`,y1:`-5`,x2:`10`,y2:`-52`,strokeWidth:`1.8`}),(0,J.jsx)(`line`,{x1:`28`,y1:`-5`,x2:`28`,y2:`-36`,strokeWidth:`1.4`}),(0,J.jsx)(`path`,{d:`M -28,-38 Q -15,-44 -2,-38 Q -15,-26 -28,-38 Z`,strokeWidth:`1.3`,fill:a?`#3d3429`:`#f0e6ce`}),(0,J.jsx)(`path`,{d:`M -4,-44 Q 10,-50 24,-44 Q 10,-32 -4,-44 Z`,strokeWidth:`1.3`,fill:a?`#3d3429`:`#f0e6ce`}),(0,J.jsx)(`path`,{d:`M -4,-28 Q 10,-34 24,-28 Q 10,-18 -4,-28 Z`,strokeWidth:`1.3`,fill:a?`#3d3429`:`#f0e6ce`}),(0,J.jsx)(`line`,{x1:`-15`,y1:`-45`,x2:`-35`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,J.jsx)(`line`,{x1:`10`,y1:`-52`,x2:`-20`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,J.jsx)(`line`,{x1:`10`,y1:`-52`,x2:`35`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,J.jsx)(`line`,{x1:`-48`,y1:`12`,x2:`-20`,y2:`12`,strokeWidth:`1`,strokeDasharray:`3 5`})]})]}),(0,J.jsxs)(`g`,{transform:`translate(2360, 1180)`,id:`compass-rose`,children:[(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`78`,fill:a?`rgba(30,25,20,0.85)`:`rgba(239,227,201,0.85)`,stroke:o,strokeWidth:`2`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`68`,fill:`none`,stroke:o,strokeWidth:`1`,strokeDasharray:`2 4`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`48`,fill:`none`,stroke:o,strokeWidth:`1.2`}),(0,J.jsx)(`path`,{d:`M 0,-86 L -5,-74 L 0,-78 L 5,-74 Z`,fill:o}),(0,J.jsx)(`polygon`,{points:`0,-72 6,-20 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`0,-72 -6,-20 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`1`}),(0,J.jsx)(`polygon`,{points:`0,72 -6,20 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`0,72 6,20 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`1`}),(0,J.jsx)(`polygon`,{points:`72,0 20,6 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`72,0 20,-6 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`1`}),(0,J.jsx)(`polygon`,{points:`-72,0 -20,-6 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`-72,0 -20,6 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`1`}),(0,J.jsx)(`polygon`,{points:`45,-45 14,-5 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`45,-45 5,-14 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`0.8`}),(0,J.jsx)(`polygon`,{points:`-45,-45 -5,-14 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`-45,-45 -14,-5 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`0.8`}),(0,J.jsx)(`polygon`,{points:`45,45 5,14 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`45,45 14,5 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`0.8`}),(0,J.jsx)(`polygon`,{points:`-45,45 -14,5 0,0`,fill:o}),(0,J.jsx)(`polygon`,{points:`-45,45 -5,14 0,0`,fill:a?`#4a3f33`:`#cebe9f`,stroke:o,strokeWidth:`0.8`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`7`,fill:a?`#d4af37`:`#99732d`,stroke:o,strokeWidth:`1.5`}),(0,J.jsx)(`text`,{x:`0`,y:`-90`,textAnchor:`middle`,fill:a?`#f4d27a`:`#7c2d12`,className:`font-cinzel-dec font-bold text-[18px]`,children:`N`}),(0,J.jsx)(`text`,{x:`0`,y:`94`,textAnchor:`middle`,fill:a?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`S`}),(0,J.jsx)(`text`,{x:`88`,y:`5`,textAnchor:`middle`,fill:a?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`E`}),(0,J.jsx)(`text`,{x:`-88`,y:`5`,textAnchor:`middle`,fill:a?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`W`})]}),(0,J.jsxs)(`g`,{transform:`translate(820, 122)`,id:`map-cartouche`,children:[(0,J.jsx)(`path`,{d:`M -210,-18 L -275,-6 L -252,18 L -275,38 L -195,28 Z`,fill:a?`#1a1510`:`#d8c7a6`,stroke:o,strokeWidth:`2`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M 210,-18 L 275,-6 L 252,18 L 275,38 L 195,28 Z`,fill:a?`#1a1510`:`#d8c7a6`,stroke:o,strokeWidth:`2`,strokeLinejoin:`round`}),(0,J.jsx)(`polygon`,{points:`-225,22 -195,28 -210,12`,fill:o,opacity:`0.65`}),(0,J.jsx)(`polygon`,{points:`225,22 195,28 210,12`,fill:o,opacity:`0.65`}),(0,J.jsx)(`path`,{d:`M -225,-34\r + C -110,-52 110,-52 225,-34\r + C 232,-6 232,12 225,24\r + C 110,6 -110,6 -225,24\r + C -232,12 -232,-6 -225,-34 Z`,fill:a?`#251f18`:`#efe3c8`,stroke:o,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -215,-28 C -105,-45 105,-45 215,-28 M -215,17 C -105,-1 105,-1 215,17`,fill:`none`,stroke:s,strokeWidth:`1`}),(0,J.jsx)(`ellipse`,{cx:`-225`,cy:`-5`,rx:`6`,ry:`29`,fill:a?`#1c1712`:`#dfd0b1`,stroke:o,strokeWidth:`1.8`}),(0,J.jsx)(`ellipse`,{cx:`225`,cy:`-5`,rx:`6`,ry:`29`,fill:a?`#1c1712`:`#dfd0b1`,stroke:o,strokeWidth:`1.8`}),(0,J.jsx)(`text`,{x:`0`,y:`-13`,textAnchor:`middle`,fill:a?`#f4d27a`:`#5a2211`,className:`font-cinzel-dec font-bold text-[21px] tracking-widest`,children:`THE EXPEDITION TRAIL`}),(0,J.jsxs)(`text`,{x:`0`,y:`8`,textAnchor:`middle`,fill:a?`#d2c2a5`:`#5c4530`,className:`font-garamond italic font-semibold text-[14px] tracking-wide`,children:[`~ Chart of the Algorithmic Citadel (`,r,` of `,i,` Solved) ~`]})]}),n&&(0,J.jsxs)(`g`,{id:`huge-stone-tower`,transform:`translate(${n.x}, ${n.y}) scale(0.82)`,children:[f&&(0,J.jsxs)(`g`,{id:`citadel-victory-beacon`,children:[(0,J.jsx)(`circle`,{cx:`0`,cy:`-228`,r:`55`,fill:`url(#beaconGlow)`}),(0,J.jsx)(`path`,{d:`M -16,-210 C -22,-235 -6,-248 0,-268 C 8,-248 22,-235 16,-210 Z`,fill:`#f59e0b`,stroke:`#991b1b`,strokeWidth:`1.5`}),(0,J.jsx)(`path`,{d:`M -8,-210 C -10,-228 -3,-238 0,-252 C 4,-238 10,-228 8,-210 Z`,fill:`#fef3c7`})]}),(0,J.jsx)(`path`,{d:`M -65,10 Q 0,25 65,10 L 55,-10 Q 0,5 -55,-10 Z`,fill:a?`#1e1a14`:`#d2c4a7`,stroke:o,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -50,-10 L -32,-190 L 32,-190 L 50,-10 Z`,fill:a?`#231e17`:`#e6d7bc`,stroke:o,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -47,-30 Q 0,-20 47,-30 M -43,-70 Q 0,-60 43,-70 M -39,-110 Q 0,-100 39,-110 M -35,-150 Q 0,-140 35,-150`,fill:`none`,stroke:s,strokeWidth:`1.5`,strokeDasharray:`12 6`,opacity:`0.8`}),(0,J.jsxs)(`g`,{stroke:s,strokeWidth:`1.2`,opacity:`0.75`,strokeLinecap:`round`,children:[(0,J.jsx)(`line`,{x1:`-48`,y1:`-20`,x2:`-25`,y2:`-30`}),(0,J.jsx)(`line`,{x1:`-47`,y1:`-40`,x2:`-24`,y2:`-50`}),(0,J.jsx)(`line`,{x1:`-45`,y1:`-60`,x2:`-22`,y2:`-70`}),(0,J.jsx)(`line`,{x1:`-44`,y1:`-80`,x2:`-21`,y2:`-90`}),(0,J.jsx)(`line`,{x1:`-42`,y1:`-100`,x2:`-19`,y2:`-110`}),(0,J.jsx)(`line`,{x1:`-41`,y1:`-120`,x2:`-18`,y2:`-130`}),(0,J.jsx)(`line`,{x1:`-39`,y1:`-140`,x2:`-16`,y2:`-150`}),(0,J.jsx)(`line`,{x1:`-38`,y1:`-160`,x2:`-15`,y2:`-170`}),(0,J.jsx)(`line`,{x1:`-36`,y1:`-180`,x2:`-13`,y2:`-190`})]}),(0,J.jsx)(`path`,{d:`M -18,0 L -18,-35 C -18,-55 18,-55 18,-35 L 18,0 Z`,fill:f?`#d97706`:a?`#0f0c09`:`#33271c`,stroke:o,strokeWidth:`2.5`}),(0,J.jsx)(`path`,{d:`M -10,0 L -10,-44 M 0,0 L 0,-48 M 10,0 L 10,-44 M -17,-15 L 17,-15 M -17,-30 L 17,-30`,stroke:o,strokeWidth:`1.2`}),(0,J.jsx)(`rect`,{x:`-6`,y:`-80`,width:`12`,height:`25`,rx:`5`,fill:u>=.25?`#d97706`:a?`#0f0c09`:`#33271c`,stroke:o,strokeWidth:`1.5`}),(0,J.jsx)(`rect`,{x:`-22`,y:`-130`,width:`8`,height:`20`,rx:`3`,fill:d?`#d97706`:a?`#0f0c09`:`#33271c`,stroke:o,strokeWidth:`1.5`}),(0,J.jsx)(`rect`,{x:`14`,y:`-130`,width:`8`,height:`20`,rx:`3`,fill:d?`#d97706`:a?`#0f0c09`:`#33271c`,stroke:o,strokeWidth:`1.5`}),(0,J.jsx)(`rect`,{x:`-6`,y:`-170`,width:`12`,height:`25`,rx:`5`,fill:u>=.75?`#f59e0b`:a?`#0f0c09`:`#33271c`,stroke:o,strokeWidth:`1.5`}),(0,J.jsx)(`path`,{d:`M -36,-190 L -36,-210 L -21,-210 L -21,-190 L -6,-190 L -6,-210 L 9,-210 L 9,-190 L 24,-190 L 24,-210 L 39,-210 L 39,-190 Z`,fill:a?`#1e1a14`:`#d2c4a7`,stroke:o,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -45,-40 L -30,-30 L -25,-45 L -10,-40 M 35,-150 L 25,-140 L 30,-120`,fill:`none`,stroke:o,strokeWidth:`1.5`}),(0,J.jsx)(`path`,{d:`M 50,-10 Q 40,-30 45,-50 T 35,-80 T 42,-110 T 30,-130`,fill:`none`,stroke:a?`#3a4a2c`:`#5a6b42`,strokeWidth:`2.5`,strokeLinecap:`round`}),!d&&(0,J.jsxs)(`g`,{id:`citadel-cloud-wisps`,stroke:o,strokeWidth:`1.4`,fill:`none`,opacity:.75,children:[(0,J.jsx)(`path`,{d:`M -75,-105 Q -55,-118 -35,-108 Q -15,-122 10,-106 M -60,-102 L 20,-102`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M -10,-152 Q 15,-166 40,-154 Q 60,-164 78,-150 M 0,-149 L 68,-149`,strokeLinecap:`round`})]}),t&&(0,J.jsx)(`text`,{x:`0`,y:`-222`,textAnchor:`middle`,fill:a?`#e0caa9`:`#3d2e1e`,stroke:l,strokeWidth:`4`,style:{paintOrder:`stroke`},className:`font-cinzel text-[17px] font-bold tracking-widest select-none`,children:`THE ANCIENT CITADEL`})]}),t&&(0,J.jsxs)(`g`,{id:`mountain-range-banners`,className:`select-none pointer-events-none`,children:[(0,J.jsxs)(`g`,{transform:`translate(1380, 165)`,children:[(0,J.jsx)(`text`,{x:`0`,y:`0`,textAnchor:`middle`,fill:a?`#e4caa0`:`#3d2514`,stroke:l,strokeWidth:`4.5`,style:{paintOrder:`stroke`},className:`font-cinzel-dec font-bold text-[18px] tracking-widest`,children:`THE DRAGON TOOTH MOUNTAINS`}),(0,J.jsx)(`text`,{x:`0`,y:`17`,textAnchor:`middle`,fill:a?`#c5b08e`:`#5a3d24`,stroke:l,strokeWidth:`3.5`,style:{paintOrder:`stroke`},className:`font-garamond italic font-bold text-[12px] tracking-wider`,children:`~ Dynamic Programming, Heaps & Backtracking ~`})]}),(0,J.jsxs)(`g`,{transform:`translate(530, 240)`,children:[(0,J.jsx)(`text`,{x:`0`,y:`0`,textAnchor:`middle`,fill:a?`#d0b996`:`#3d2514`,stroke:l,strokeWidth:`4`,style:{paintOrder:`stroke`},className:`font-cinzel font-bold text-[14px] tracking-widest`,children:`~ THE WESTERN CRAGS ~`}),(0,J.jsx)(`text`,{x:`0`,y:`15`,textAnchor:`middle`,fill:a?`#c5b08e`:`#5a3d24`,stroke:l,strokeWidth:`3`,style:{paintOrder:`stroke`},className:`font-garamond italic font-bold text-[11px] tracking-wider`,children:`Arrays, Hashing & Binary Search`})]}),(0,J.jsxs)(`g`,{transform:`translate(2060, 125)`,children:[(0,J.jsx)(`text`,{x:`0`,y:`0`,textAnchor:`middle`,fill:a?`#e4caa0`:`#3d2514`,stroke:l,strokeWidth:`4.5`,style:{paintOrder:`stroke`},className:`font-cinzel-dec font-bold text-[16px] tracking-widest`,children:`SUNSTONE CITADEL PEAKS`}),(0,J.jsx)(`text`,{x:`0`,y:`16`,textAnchor:`middle`,fill:a?`#c5b08e`:`#5a3d24`,stroke:l,strokeWidth:`3.5`,style:{paintOrder:`stroke`},className:`font-garamond italic font-bold text-[12px] tracking-wider`,children:`~ Graphs, Tries & Grandmaster Trials ~`})]})]})]})},ve=({theme:e,showGrid:t})=>{let n=e.id!==`parchment`,r=e.pencilColor,i=e.pencilShade,a=n?`#2e261f`:`#3d2f21`;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`defs`,{children:[(0,J.jsxs)(`filter`,{id:`quillInk`,x:`-2%`,y:`-2%`,width:`104%`,height:`104%`,children:[(0,J.jsx)(`feTurbulence`,{type:`fractalNoise`,baseFrequency:`0.038`,numOctaves:`2`,seed:`14`,result:`paperFiber`}),(0,J.jsx)(`feDisplacementMap`,{in:`SourceGraphic`,in2:`paperFiber`,scale:`1.7`,xChannelSelector:`R`,yChannelSelector:`G`,result:`wobbledInk`})]}),(0,J.jsxs)(`filter`,{id:`vellumGrain`,x:`0%`,y:`0%`,width:`100%`,height:`100%`,children:[(0,J.jsx)(`feTurbulence`,{type:`fractalNoise`,baseFrequency:`0.04`,numOctaves:`4`,seed:`5`,result:`fineNoise`}),(0,J.jsx)(`feColorMatrix`,{type:`matrix`,values:n?`0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0 0.04 0 0 0 0.14 0`:`0 0 0 0 0.52 0 0 0 0 0.38 0 0 0 0 0.22 0 0 0 0.09 0`})]}),(0,J.jsxs)(`filter`,{id:`goldenGlow`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`,children:[(0,J.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`2.5`,result:`blur1`}),(0,J.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`6`,result:`blur2`}),(0,J.jsx)(`feColorMatrix`,{in:`blur2`,type:`matrix`,values:`\r + 1 0 0 0 0.85\r + 0 0.65 0 0 0.45\r + 0 0 0.15 0 0.05\r + 0 0 0 0.9 0`,result:`warmAura`}),(0,J.jsxs)(`feMerge`,{children:[(0,J.jsx)(`feMergeNode`,{in:`warmAura`}),(0,J.jsx)(`feMergeNode`,{in:`blur1`}),(0,J.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,J.jsx)(`filter`,{id:`nodeGlow`,x:`-60%`,y:`-60%`,width:`220%`,height:`220%`,children:(0,J.jsx)(`feDropShadow`,{dx:`0.8`,dy:`1.5`,stdDeviation:`1.4`,floodColor:n?`#000000`:`#2b1d0e`,floodOpacity:`0.45`})}),(0,J.jsxs)(`linearGradient`,{id:`goldPathGradient`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#92400e`,stopOpacity:`0.95`}),(0,J.jsx)(`stop`,{offset:`45%`,stopColor:`#d97706`,stopOpacity:`1`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#f59e0b`,stopOpacity:`1`})]}),(0,J.jsxs)(`radialGradient`,{id:`waxSealGradient`,cx:`35%`,cy:`35%`,r:`65%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#dc2626`}),(0,J.jsx)(`stop`,{offset:`55%`,stopColor:`#991b1b`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#5c1111`})]}),(0,J.jsxs)(`radialGradient`,{id:`brassNodeGradient`,cx:`35%`,cy:`35%`,r:`65%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#fcd34d`}),(0,J.jsx)(`stop`,{offset:`60%`,stopColor:`#d97706`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#78350f`})]}),(0,J.jsxs)(`radialGradient`,{id:`beaconGlow`,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#fef3c7`,stopOpacity:`0.85`}),(0,J.jsx)(`stop`,{offset:`45%`,stopColor:`#d97706`,stopOpacity:`0.45`}),(0,J.jsx)(`stop`,{offset:`80%`,stopColor:`#92400e`,stopOpacity:`0.15`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#78350f`,stopOpacity:`0`})]}),(0,J.jsxs)(`radialGradient`,{id:`parchmentEdgeBurn`,cx:`50%`,cy:`50%`,r:`55%`,children:[(0,J.jsx)(`stop`,{offset:`0%`,stopColor:`#8c6239`,stopOpacity:`0`}),(0,J.jsx)(`stop`,{offset:`82%`,stopColor:`#8c6239`,stopOpacity:n?`0.05`:`0.08`}),(0,J.jsx)(`stop`,{offset:`100%`,stopColor:`#4a2c11`,stopOpacity:n?`0.28`:`0.25`})]})]}),(0,J.jsxs)(`g`,{id:`parchment-aging-artifacts`,pointerEvents:`none`,children:[(0,J.jsx)(`rect`,{x:`0`,y:`0`,width:L,height:R,filter:`url(#vellumGrain)`}),(0,J.jsx)(`rect`,{x:`0`,y:`0`,width:L,height:R,fill:`url(#parchmentEdgeBurn)`}),(0,J.jsxs)(`g`,{opacity:n?.14:.18,filter:`url(#quillInk)`,children:[[650,1300,1950].map(e=>(0,J.jsxs)(I.Fragment,{children:[(0,J.jsx)(`line`,{x1:e,y1:`38`,x2:e,y2:R-38,stroke:r,strokeWidth:`1`,strokeDasharray:`24 6 42 8`}),(0,J.jsx)(`line`,{x1:e+1.5,y1:`38`,x2:e+1.5,y2:R-38,stroke:n?`#f5ebd6`:`#ffffff`,strokeWidth:`0.8`,opacity:`0.45`})]},`fold-v-${e}`)),(0,J.jsx)(`line`,{x1:`38`,y1:R/2,x2:L-38,y2:R/2,stroke:r,strokeWidth:`1`,strokeDasharray:`28 6 48 8`}),(0,J.jsx)(`line`,{x1:`38`,y1:R/2+1.5,x2:L-38,y2:R/2+1.5,stroke:n?`#f5ebd6`:`#ffffff`,strokeWidth:`0.8`,opacity:`0.45`})]})]}),t&&(0,J.jsxs)(`g`,{id:`grid-lines`,stroke:r,strokeWidth:`0.7`,strokeDasharray:`4 6`,opacity:n?.16:.24,pointerEvents:`none`,children:[Array.from({length:13}).map((e,t)=>{let n=(t+1)*200;return(0,J.jsx)(`line`,{x1:n,y1:`38`,x2:n,y2:1462},`gx-${t}`)}),Array.from({length:7}).map((e,t)=>{let n=(t+1)*200;return(0,J.jsx)(`line`,{x1:`38`,y1:n,x2:2562,y2:n},`gy-${t}`)})]}),(0,J.jsxs)(`g`,{id:`map-border`,pointerEvents:`none`,filter:`url(#quillInk)`,children:[(0,J.jsx)(`rect`,{x:`12`,y:`12`,width:L-24,height:R-24,fill:`none`,stroke:r,strokeWidth:`5.5`}),(0,J.jsx)(`rect`,{x:`20`,y:`20`,width:L-40,height:`14`,fill:n?`#231e17`:`#e9dec5`,stroke:r,strokeWidth:`1.5`}),(0,J.jsx)(`rect`,{x:`20`,y:R-34,width:L-40,height:`14`,fill:n?`#231e17`:`#e9dec5`,stroke:r,strokeWidth:`1.5`}),(0,J.jsx)(`rect`,{x:`20`,y:`20`,width:`14`,height:R-40,fill:n?`#231e17`:`#e9dec5`,stroke:r,strokeWidth:`1.5`}),(0,J.jsx)(`rect`,{x:L-34,y:`20`,width:`14`,height:R-40,fill:n?`#231e17`:`#e9dec5`,stroke:r,strokeWidth:`1.5`}),Array.from({length:32}).map((e,t)=>{if(t%2==0)return null;let n=(L-40)/32;return(0,J.jsxs)(I.Fragment,{children:[(0,J.jsx)(`rect`,{x:20+t*n,y:`20`,width:n,height:`14`,fill:a}),(0,J.jsx)(`rect`,{x:20+t*n,y:R-34,width:n,height:`14`,fill:a})]},`ruler-h-${t}`)}),Array.from({length:18}).map((e,t)=>{if(t%2==0)return null;let n=(R-40)/18;return(0,J.jsxs)(I.Fragment,{children:[(0,J.jsx)(`rect`,{x:`20`,y:20+t*n,width:`14`,height:n,fill:a}),(0,J.jsx)(`rect`,{x:L-34,y:20+t*n,width:`14`,height:n,fill:a})]},`ruler-v-${t}`)}),(0,J.jsx)(`rect`,{x:`38`,y:`38`,width:L-76,height:R-76,fill:`none`,stroke:r,strokeWidth:`2.2`}),(0,J.jsx)(`rect`,{x:`43`,y:`43`,width:L-86,height:R-86,fill:`none`,stroke:i,strokeWidth:`0.9`}),[{tx:38,ty:38,sx:1,sy:1},{tx:L-38,ty:38,sx:-1,sy:1},{tx:38,ty:R-38,sx:1,sy:-1},{tx:L-38,ty:R-38,sx:-1,sy:-1}].map((e,t)=>(0,J.jsxs)(`g`,{transform:`translate(${e.tx}, ${e.ty}) scale(${e.sx}, ${e.sy})`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,J.jsx)(`path`,{d:`M 0,0 L 62,0 C 36,18 18,36 0,62 Z`,fill:n?`#2a221a`:`#dfd0b2`}),(0,J.jsx)(`path`,{d:`M 0,0 L 48,0 C 28,14 14,28 0,48 Z`,fill:`none`,strokeWidth:`1`}),(0,J.jsx)(`circle`,{cx:`18`,cy:`18`,r:`4.5`,fill:r}),(0,J.jsx)(`circle`,{cx:`18`,cy:`18`,r:`8`,fill:`none`,strokeWidth:`0.9`}),(0,J.jsx)(`line`,{x1:`0`,y1:`0`,x2:`46`,y2:`46`})]},`corner-${t}`)),(0,J.jsxs)(`g`,{transform:`translate(480, 1442)`,stroke:r,children:[(0,J.jsx)(`path`,{d:`M 90,-34 L 78,-12 M 90,-34 L 102,-12`,strokeWidth:`1.6`,fill:`none`}),(0,J.jsx)(`circle`,{cx:`90`,cy:`-36`,r:`3`,fill:r}),(0,J.jsx)(`rect`,{x:`0`,y:`0`,width:`180`,height:`8`,fill:n?`#1e1914`:`#f3e8d2`,strokeWidth:`1.4`}),(0,J.jsx)(`rect`,{x:`0`,y:`0`,width:`45`,height:`8`,fill:r}),(0,J.jsx)(`rect`,{x:`90`,y:`0`,width:`45`,height:`8`,fill:r}),(0,J.jsx)(`line`,{x1:`0`,y1:`4`,x2:`180`,y2:`4`,strokeWidth:`0.7`}),(0,J.jsx)(`text`,{x:`0`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`0`}),(0,J.jsx)(`text`,{x:`45`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`25`}),(0,J.jsx)(`text`,{x:`90`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`50`}),(0,J.jsx)(`text`,{x:`180`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`100 Leagues`})]})]})]})},X=({nodes:e,activeNodeIndex:t,completions:n,theme:r,showNodeNumbers:i,onNodeClick:a,hoveredNodeIndex:o,setHoveredNodeIndex:s})=>{let c=r.id!==`parchment`,l=e.reduce((e,t,r)=>n.has(t.id)?Math.max(e,r):e,-1),u=Math.max(t,l),d=G(e),f=K(e,u),p=t>=0&&t{if(t===e.length-1)return null;let a=r.pencilColor,o=i?`#b91c1c`:n?`#d97706`:c?`#2c241b`:`#dfd1b4`;if(t===0)return(0,J.jsxs)(`g`,{transform:`translate(0, -10)`,pointerEvents:`none`,children:[(0,J.jsx)(`path`,{d:`M -11,4 L 0,-11 L 11,4 Z`,fill:o,stroke:a,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -3,4 L 0,-3 L 3,4 Z`,fill:a}),(0,J.jsx)(`line`,{x1:`0`,y1:`-11`,x2:`0`,y2:`-17`,stroke:a,strokeWidth:`1.3`}),(0,J.jsx)(`polygon`,{points:`0,-17 7,-14 0,-11`,fill:i?`#991b1b`:`#d97706`})]});let s=Math.round((t+1)/25)%3;return s===1?(0,J.jsxs)(`g`,{transform:`translate(0, -9)`,pointerEvents:`none`,children:[(0,J.jsx)(`line`,{x1:`-8`,y1:`3`,x2:`8`,y2:`-1`,stroke:a,strokeWidth:`2`,strokeLinecap:`round`}),(0,J.jsx)(`line`,{x1:`-8`,y1:`-1`,x2:`8`,y2:`3`,stroke:a,strokeWidth:`2`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M -5,0 C -6,-7 -1,-9 0,-14 C 2,-9 6,-7 5,0 Z`,fill:n||i?`#ea580c`:o,stroke:a,strokeWidth:`1.2`})]}):s===2?(0,J.jsxs)(`g`,{transform:`translate(0, -9)`,pointerEvents:`none`,children:[(0,J.jsx)(`path`,{d:`M -7,3 L -5,-12 L 5,-12 L 7,3 Z`,fill:o,stroke:a,strokeWidth:`1.5`}),(0,J.jsx)(`path`,{d:`M -7,-12 L -7,-16 L -3,-16 L -3,-12 L 3,-12 L 3,-16 L 7,-16 L 7,-12 Z`,fill:o,stroke:a,strokeWidth:`1.3`})]}):(0,J.jsx)(`g`,{transform:`translate(0, -9)`,pointerEvents:`none`,children:(0,J.jsx)(`path`,{d:`M -9,3 L -9,-12 L 9,-12 L 9,3 L 4,3 L 4,-5 C 4,-9 -4,-9 -4,-5 L -4,3 Z`,fill:o,stroke:a,strokeWidth:`1.5`,strokeLinejoin:`round`})})};return(0,J.jsxs)(`g`,{id:`curvy-path-nodes-layer`,children:[(0,J.jsxs)(`g`,{id:`unlit-path`,filter:`url(#quillInk)`,children:[(0,J.jsx)(`path`,{d,fill:`none`,stroke:r.pencilShade,strokeWidth:`4.2`,strokeDasharray:`2 8`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.45}),(0,J.jsx)(`path`,{d,fill:`none`,stroke:r.pencilColor,strokeWidth:`2.2`,strokeDasharray:`7 6`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.85})]}),u>0&&f&&(0,J.jsxs)(`g`,{id:`lit-path`,children:[(0,J.jsx)(`path`,{d:f,fill:`none`,stroke:`#d97706`,strokeWidth:`10`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.28,filter:`url(#goldenGlow)`}),(0,J.jsx)(`path`,{d:f,fill:`none`,stroke:r.pencilColor,strokeWidth:`6.8`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.85}),(0,J.jsx)(`path`,{d:f,fill:`none`,stroke:`url(#goldPathGradient)`,strokeWidth:`4.2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:f,fill:`none`,stroke:`#fef3c7`,strokeWidth:`1.3`,strokeDasharray:`12 6`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.8})]}),(0,J.jsx)(`g`,{id:`nodes-collection`,children:e.map((l,d)=>{let f=n.has(l.id),p=d<=u||f,h=d===t,g=o===d,_=(d+1)%25==0||d===0||d===e.length-1;return(0,J.jsxs)(`g`,{id:`node-${l.id}`,transform:`translate(${l.x}, ${l.y})`,className:`cursor-pointer transition-transform duration-200`,onClick:e=>{e.stopPropagation(),a(d)},onMouseEnter:()=>s(d),onMouseLeave:()=>s(null),children:[(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`18`,fill:`transparent`}),_&&m(d,p,f),!p&&!f&&(0,J.jsxs)(`g`,{children:[(0,J.jsx)(`circle`,{cx:`0.8`,cy:`1.2`,r:_?7.5:4.5,fill:r.pencilShade,opacity:.35}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:_?7:4.2,fill:c?`#28221b`:`#efe3c9`,stroke:r.pencilColor,strokeWidth:_?2:1.5}),_?(0,J.jsx)(`path`,{d:`M -3,-3 L 3,3 M -3,3 L 3,-3`,stroke:r.pencilColor,strokeWidth:`1.6`,strokeLinecap:`round`}):(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`1.3`,fill:r.pencilColor})]}),p&&!h&&(0,J.jsxs)(`g`,{filter:`url(#nodeGlow)`,children:[(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:_?9:6,fill:f?`url(#waxSealGradient)`:`url(#brassNodeGradient)`,stroke:r.pencilColor,strokeWidth:`1.5`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:_?6.2:3.8,fill:`none`,stroke:`#fef3c7`,strokeWidth:`0.9`,opacity:.75}),_?(0,J.jsx)(`polygon`,{points:`0,-4.5 1.3,-1.3 4.5,0 1.3,1.3 0,4.5 -1.3,1.3 -4.5,0 -1.3,-1.3`,fill:`#fef3c7`}):(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`1.6`,fill:`#fef3c7`})]}),h&&(0,J.jsxs)(`g`,{id:`active-node-beacon`,children:[(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`13`,fill:`none`,stroke:`#b45309`,strokeWidth:`2`,className:`beacon-wave`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`13`,fill:`none`,stroke:`#d97706`,strokeWidth:`1.5`,className:`beacon-wave-delayed`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`22`,fill:`url(#beaconGlow)`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`9.5`,fill:f?`url(#waxSealGradient)`:`url(#brassNodeGradient)`,stroke:r.pencilColor,strokeWidth:`2.2`,filter:`url(#nodeGlow)`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`6.5`,fill:`none`,stroke:`#fef3c7`,strokeWidth:`1`}),(0,J.jsx)(`polygon`,{points:`0,-4.5 1.4,-1.4 4.5,0 1.4,1.4 0,4.5 -1.4,1.4 -4.5,0 -1.4,-1.4`,fill:`#fef3c7`}),(0,J.jsxs)(`g`,{transform:`translate(0, -19)`,filter:`url(#nodeGlow)`,children:[(0,J.jsx)(`line`,{x1:`0`,y1:`-12`,x2:`0`,y2:`11`,stroke:r.pencilColor,strokeWidth:`2.2`,strokeLinecap:`round`}),(0,J.jsx)(`path`,{d:`M 0,-12 L 15,-7 L 11,-3 L 15,1 L 0,-2 Z`,fill:f?`#991b1b`:`#b45309`,stroke:`#fef3c7`,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,J.jsx)(`circle`,{cx:`0`,cy:`-13`,r:`2`,fill:`#fbbf24`,stroke:r.pencilColor,strokeWidth:`0.9`})]})]}),g&&!h&&(0,J.jsx)(`circle`,{cx:`0`,cy:`0`,r:`13`,fill:`none`,stroke:f?`#991b1b`:`#b45309`,strokeWidth:`1.8`,strokeDasharray:`4 3`}),(i||_||g)&&(0,J.jsx)(`text`,{x:`0`,y:_?19:-10,textAnchor:`middle`,fill:f?c?`#fca5a5`:`#7f1d1d`:p?c?`#fcd34d`:`#92400e`:r.pencilColor,className:`font-pencil font-bold select-none ${_?`text-[12px]`:`text-[10px]`}`,opacity:p?1:.78,children:l.id<0?`P${d+1}`:l.id})]},l.id)})}),p&&(0,J.jsxs)(`g`,{transform:`translate(${p.x}, ${p.y-46})`,className:`pointer-events-none select-none transition-all duration-300`,filter:`url(#nodeGlow)`,children:[(0,J.jsx)(`path`,{d:`M -88,-24\r + Q 0,-28 88,-24\r + L 81,-7\r + L 88,10\r + Q 0,14 -88,10\r + L -81,-7 Z`,fill:c?`#221b14`:`#f4e8cf`,stroke:r.pencilColor,strokeWidth:`1.8`,strokeLinejoin:`round`}),(0,J.jsx)(`path`,{d:`M -78,-20 Q 0,-24 78,-20 M -78,6 Q 0,10 78,6`,fill:`none`,stroke:r.pencilShade,strokeWidth:`0.8`}),(0,J.jsx)(`polygon`,{points:`-6,10 6,10 0,17`,fill:c?`#221b14`:`#f4e8cf`,stroke:r.pencilColor,strokeWidth:`1.6`}),(0,J.jsxs)(`text`,{x:`0`,y:`-9`,textAnchor:`middle`,fill:c?`#fbbf24`:`#7c2d12`,className:`font-cinzel font-bold text-[11px] tracking-wider`,children:[`WAYPOINT `,p.sequenceIndex+1,` OF `,e.length]}),(0,J.jsx)(`text`,{x:`0`,y:`4`,textAnchor:`middle`,fill:c?`#f4ebd9`:`#2c1d11`,className:`font-garamond italic font-bold text-[12px]`,children:p.name.length>22?p.name.substring(0,20)+`…`:p.name})]})]})},ye=({nodes:e,activeNodeIndex:t,completions:n,theme:r,showLabels:i,showGrid:a,showNodeNumbers:o,autoCenterOnActive:s,onNodeClick:c,hoveredNodeIndex:l,setHoveredNodeIndex:u,transform:d,setTransform:f})=>{let p=(0,I.useRef)(null),m=(0,I.useRef)(!1),h=(0,I.useRef)({x:0,y:0}),g=(0,I.useRef)(null),_=(0,I.useRef)(null),[v,y]=(0,I.useState)(!1),b=(0,I.useRef)(d);b.current=d;let x=(0,I.useCallback)(t=>{if(!p.current||t<0||t>=e.length)return;let n=e[t],{clientWidth:r,clientHeight:i}=p.current,a=b.current.scale,o=Math.max(a,.9);f({x:r/2-n.x*o,y:i/2-n.y*o,scale:o})},[e,f]);(0,I.useEffect)(()=>{s&&t>=0&&x(t)},[t,s,x]),(0,I.useEffect)(()=>{if(p.current&&(!s||t<0)){let{clientWidth:e,clientHeight:t}=p.current,n=e/L,r=t/R,i=Math.min(n,r)*.9;f({x:(e-L*i)/2,y:(t-R*i)/2,scale:Math.max(i,.08)})}},[f,s,t]);let S=e=>{if(e.preventDefault(),!p.current)return;y(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>y(!1),140);let t=p.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=e.deltaY<0?1.15:.85,a=Math.min(Math.max(d.scale*i,.08),3.5);f({x:n-(n-d.x)/d.scale*a,y:r-(r-d.y)/d.scale*a,scale:a})},C=e=>{e.button===0&&(m.current=!0,y(!0),h.current={x:e.clientX-d.x,y:e.clientY-d.y})},w=e=>{m.current&&f(t=>({...t,x:e.clientX-h.current.x,y:e.clientY-h.current.y}))},T=()=>{m.current=!1,y(!1)},E=e=>{if(y(!0),e.touches.length===1)m.current=!0,h.current={x:e.touches[0].clientX-d.x,y:e.touches[0].clientY-d.y};else if(e.touches.length===2){m.current=!1;let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY;g.current=Math.hypot(t,n)}},D=e=>{if(e.touches.length===1&&m.current)f(t=>({...t,x:e.touches[0].clientX-h.current.x,y:e.touches[0].clientY-h.current.y}));else if(e.touches.length===2&&g.current&&p.current){let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY,r=Math.hypot(t,n),i=r/g.current;g.current=r;let a=p.current.getBoundingClientRect(),o=(e.touches[0].clientX+e.touches[1].clientX)/2-a.left,s=(e.touches[0].clientY+e.touches[1].clientY)/2-a.top;f(e=>{let t=Math.min(Math.max(e.scale*i,.08),3.5);return{scale:t,x:o-(o-e.x)/e.scale*t,y:s-(s-e.y)/e.scale*t}})}},O=()=>{m.current=!1,g.current=null,y(!1)},k=r.id!==`parchment`;return(0,J.jsxs)(`div`,{id:`pencil-map-container`,ref:p,className:`relative w-full h-full overflow-hidden canvas-interactive select-none ${k?`parchment-dark-bg`:`parchment-bg`}`,onWheel:S,onMouseDown:C,onMouseMove:w,onMouseUp:T,onMouseLeave:T,onTouchStart:E,onTouchMove:D,onTouchEnd:O,children:[(0,J.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 ${k?`map-dark-vignette`:`map-vignette`}`}),(0,J.jsxs)(`svg`,{id:`pencil-map-svg`,viewBox:`0 0 ${L} ${R}`,width:L,height:R,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${d.scale})`,transformOrigin:`0 0`,transition:v?`none`:`transform 0.4s cubic-bezier(0.16, 1, 0.3, 1)`},className:`absolute top-0 left-0`,children:[(0,J.jsx)(ve,{theme:r,showGrid:a}),(0,J.jsx)(_e,{theme:r,showLabels:i,finalNode:e[e.length-1],completedCount:n.size,totalNodes:e.length}),(0,J.jsx)(X,{nodes:e,activeNodeIndex:t,completions:n,theme:r,showNodeNumbers:o,onNodeClick:c,hoveredNodeIndex:l,setHoveredNodeIndex:u})]})]})},be=({theme:e,soundEnabled:t,autoCenterOnActive:r,showLabels:i,showGrid:a,showNodeNumbers:o,tracks:s,activeTrack:c,onTrackChange:u,onToggleSound:d,onToggleAutoCenter:f,onToggleLabels:p,onToggleGrid:m,onToggleNodeNumbers:h,onToggleTheme:g,onZoomIn:_,onZoomOut:v,onResetZoom:b,onCenterActiveNode:S})=>{let C=e.id!==`parchment`,T=e=>e?`bg-[#2a2017]/90 border-amber-500/70 text-amber-300 shadow-md`:`bg-[#1c1610]/75 border-stone-700/70 text-stone-300 hover:text-amber-200 hover:bg-[#2a2017]/85 shadow-md`;return(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 px-1 text-xs select-none`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[s&&s.length>0&&u&&(0,J.jsxs)(`div`,{className:`flex items-center gap-1.5 bg-[#1c1610]/85 backdrop-blur-md px-3 py-1.5 rounded-xl border border-amber-500/40 shadow-md`,children:[(0,J.jsx)(E,{className:`w-3.5 h-3.5 text-amber-400`}),(0,J.jsx)(`span`,{className:`font-cinzel text-[10px] font-bold tracking-wider text-amber-400 uppercase hidden sm:inline`,children:`Track:`}),(0,J.jsx)(`select`,{value:c,onChange:e=>u(e.target.value),className:`bg-transparent border-none text-xs font-cinzel font-bold text-amber-200 cursor-pointer focus:outline-none`,children:s.map(e=>(0,J.jsx)(`option`,{value:e.id,className:`bg-stone-900 text-stone-200`,children:e.name},e.id))})]}),(0,J.jsxs)(`button`,{id:`toggle-sound-btn`,onClick:d,title:t?`Mute Audio`:`Enable Audio`,className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border backdrop-blur-md transition-all cursor-pointer ${T(t)}`,children:[t?(0,J.jsx)(D,{className:`w-3.5 h-3.5 text-amber-400`}):(0,J.jsx)(y,{className:`w-3.5 h-3.5 text-stone-400`}),(0,J.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Audio`})]}),(0,J.jsxs)(`button`,{id:`toggle-autocenter-btn`,onClick:f,title:`Auto-Center on Active Node`,className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border backdrop-blur-md transition-all cursor-pointer ${T(r)}`,children:[(0,J.jsx)(ee,{className:`w-3.5 h-3.5 ${r?`text-amber-400`:`text-stone-400`}`}),(0,J.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Auto-Track`})]}),(0,J.jsxs)(`button`,{id:`toggle-labels-btn`,onClick:p,title:`Toggle Geographical Labels`,className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border backdrop-blur-md transition-all cursor-pointer ${T(i)}`,children:[(0,J.jsx)(j,{className:`w-3.5 h-3.5 ${i?`text-amber-400`:`text-stone-400`}`}),(0,J.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Labels`})]}),(0,J.jsx)(`button`,{id:`toggle-grid-btn`,onClick:m,title:`Toggle Coordinate Grid`,className:`px-2.5 py-1.5 rounded-xl border backdrop-blur-md font-garamond font-semibold transition-all cursor-pointer ${T(a)}`,children:`Grid`}),(0,J.jsx)(`button`,{id:`toggle-numbers-btn`,onClick:h,title:`Toggle All Node Numbers`,className:`px-2.5 py-1.5 rounded-xl border backdrop-blur-md font-garamond font-semibold transition-all cursor-pointer ${T(o)}`,children:`#s`}),(0,J.jsxs)(`button`,{id:`toggle-theme-btn`,onClick:g,title:`Switch Map Lighting Style`,className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border backdrop-blur-md bg-[#1c1610]/85 border-stone-700/70 text-amber-200 hover:border-amber-500/60 shadow-md transition-all cursor-pointer`,children:[C?(0,J.jsx)(x,{className:`w-3.5 h-3.5 text-amber-400`}):(0,J.jsx)(l,{className:`w-3.5 h-3.5 text-amber-400`}),(0,J.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:C?`Day`:`Night`})]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-1 bg-[#1c1610]/85 backdrop-blur-md p-1 rounded-xl border border-stone-700/70 shadow-md`,children:[(0,J.jsx)(`button`,{id:`zoom-in-btn`,onClick:_,title:`Zoom In`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-200 cursor-pointer`,children:(0,J.jsx)(w,{className:`w-4 h-4`})}),(0,J.jsx)(`button`,{id:`zoom-out-btn`,onClick:v,title:`Zoom Out`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-200 cursor-pointer`,children:(0,J.jsx)(M,{className:`w-4 h-4`})}),(0,J.jsx)(`button`,{id:`center-active-btn`,onClick:S,title:`Focus Active Node`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-200 cursor-pointer`,children:(0,J.jsx)(ee,{className:`w-4 h-4 text-amber-400`})}),(0,J.jsx)(`button`,{id:`reset-zoom-btn`,onClick:b,title:`Fit Entire Map`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-200 cursor-pointer`,children:(0,J.jsx)(n,{className:`w-4 h-4`})})]})]})},xe=({node:e,activeNodeIndex:t,totalNodes:n,theme:r,onAdvance:i,onRetreat:a,details:o,modalLoading:s,isCompleted:c,toggleLoading:l,onToggleCompletion:d,onSelectProblemForReview:m})=>{let[y,b]=(0,I.useState)(!1),[x,C]=(0,I.useState)(!1);if(!e)return null;let w=r.id!==`parchment`,E=o.length>0,D=F(e.id);return(0,J.jsxs)(`div`,{id:`node-detail-card`,className:`relative p-4 rounded-2xl border-2 shadow-2xl backdrop-blur-md transition-all duration-300 max-h-[calc(100vh-180px)] overflow-y-auto custom-scrollbar select-none ${w?`bg-[#1c1813]/95 border-[#594634] text-[#f2e6d5]`:`bg-[#fbf5e8]/98 border-[#cbb38e] text-[#2c1d11]`}`,children:[(0,J.jsx)(`div`,{className:`absolute top-2 left-2 w-2.5 h-2.5 border-t-2 border-l-2 border-amber-600/70 pointer-events-none`}),(0,J.jsx)(`div`,{className:`absolute top-2 right-2 w-2.5 h-2.5 border-t-2 border-r-2 border-amber-600/70 pointer-events-none`}),(0,J.jsx)(`div`,{className:`absolute bottom-2 left-2 w-2.5 h-2.5 border-b-2 border-l-2 border-amber-600/70 pointer-events-none`}),(0,J.jsx)(`div`,{className:`absolute bottom-2 right-2 w-2.5 h-2.5 border-b-2 border-r-2 border-amber-600/70 pointer-events-none`}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b pb-2 mb-3 ${w?`border-amber-900/40`:`border-amber-900/15`}`,children:[(0,J.jsxs)(`span`,{className:`font-cinzel text-xs font-bold tracking-wider uppercase ${w?`text-amber-400`:`text-amber-800`}`,children:[`Node `,t+1,` / `,n]}),c&&(0,J.jsx)(`span`,{className:`text-[10px] font-cinzel font-bold px-2 py-0.5 rounded border ${w?`bg-emerald-500/20 text-emerald-400 border-emerald-500/40`:`bg-emerald-600/15 text-emerald-800 border-emerald-600/30`}`,children:`✓ Solved`})]}),s?(0,J.jsxs)(`div`,{className:`py-6 flex flex-col items-center justify-center gap-2`,children:[(0,J.jsx)(u,{className:`w-5 h-5 text-amber-500 animate-spin`}),(0,J.jsx)(`span`,{className:`text-[10px] font-cinzel font-bold opacity-75 uppercase`,children:`Loading Problem Details...`})]}):E?(0,J.jsx)(`div`,{className:`space-y-3.5`,children:o.map(t=>(0,J.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,J.jsxs)(`div`,{className:`flex justify-between items-start gap-2`,children:[(0,J.jsxs)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${w?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:[e.id>0?`${e.id}. `:``,t.name]}),(0,J.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-2 py-0.5 rounded border shrink-0 ${t.difficulty===`Easy`?w?`bg-emerald-950/90 text-emerald-300 border-emerald-500/40`:`bg-emerald-100 text-emerald-900 border-emerald-400`:t.difficulty===`Medium`?w?`bg-amber-950/90 text-amber-300 border-amber-500/40`:`bg-amber-100 text-amber-900 border-amber-400`:w?`bg-rose-950/90 text-rose-300 border-rose-500/40`:`bg-rose-100 text-rose-900 border-rose-400`}`,children:t.difficulty?.toUpperCase()||`MEDIUM`})]}),(0,J.jsxs)(`div`,{className:`text-xs font-garamond font-semibold ${w?`text-amber-300`:`text-amber-900`}`,children:[`Pattern: `,(0,J.jsx)(`span`,{className:`italic font-bold`,children:t.pattern||`General`})]}),(0,J.jsxs)(`div`,{className:`flex gap-4 text-xs font-semibold ${w?`text-stone-300`:`text-stone-800`}`,children:[(0,J.jsxs)(`div`,{children:[`Time:`,` `,(0,J.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${w?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:t.optimal_time||`O(N)`})]}),(0,J.jsxs)(`div`,{children:[`Space:`,` `,(0,J.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${w?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:t.optimal_space||`O(1)`})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2 pt-1 border-t ${w?`border-amber-900/30`:`border-amber-900/10`}`,children:[t.google_doc_url&&(0,J.jsxs)(`a`,{href:t.google_doc_url,target:`_blank`,rel:`noreferrer`,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl border text-xs font-cinzel font-semibold transition-all cursor-pointer text-center ${w?`border-amber-500/30 bg-amber-500/10 hover:bg-amber-500/20 text-amber-200`:`border-amber-900/20 bg-amber-900/5 hover:bg-amber-900/10 text-amber-900`}`,children:[(0,J.jsx)(T,{className:`w-3.5 h-3.5`}),(0,J.jsx)(`span`,{children:`Google Doc`})]}),(0,J.jsxs)(`button`,{onClick:()=>m(t.id),className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white text-xs font-cinzel font-bold shadow transition-all active:scale-95 cursor-pointer text-center`,children:[(0,J.jsx)(g,{className:`w-3.5 h-3.5`}),(0,J.jsx)(`span`,{children:`Review Problem`})]})]})]},t.id))}):D?(0,J.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,J.jsxs)(`div`,{className:`flex justify-between items-start gap-2`,children:[(0,J.jsxs)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${w?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:[`LC #`,D.problem_number,`. `,D.name]}),(0,J.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-2 py-0.5 rounded border shrink-0 ${D.difficulty===`Easy`?w?`bg-emerald-950/90 text-emerald-300 border-emerald-500/40`:`bg-emerald-100 text-emerald-900 border-emerald-400`:D.difficulty===`Medium`?w?`bg-amber-950/90 text-amber-300 border-amber-500/40`:`bg-amber-100 text-amber-900 border-amber-400`:w?`bg-rose-950/90 text-rose-300 border-rose-500/40`:`bg-rose-100 text-rose-900 border-rose-400`}`,children:D.difficulty?.toUpperCase()||`MEDIUM`})]}),(0,J.jsxs)(`div`,{className:`text-xs font-garamond font-semibold ${w?`text-amber-300`:`text-amber-900`}`,children:[`Pattern: `,(0,J.jsx)(`span`,{className:`italic font-bold`,children:D.pattern})]}),(0,J.jsxs)(`div`,{className:`flex gap-4 text-xs font-semibold ${w?`text-stone-300`:`text-stone-800`}`,children:[(0,J.jsxs)(`div`,{children:[`Time:`,` `,(0,J.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${w?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:D.time_complexity})]}),(0,J.jsxs)(`div`,{children:[`Space:`,` `,(0,J.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${w?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:D.space_complexity})]})]}),D.description&&(0,J.jsx)(`div`,{className:`p-2.5 rounded-xl border text-xs leading-relaxed ${w?`bg-[#252019] border-[#5a4836] text-stone-200`:`bg-white/80 border-[#cbb38e] text-stone-800`}`,children:D.description}),(0,J.jsxs)(`div`,{className:`space-y-2 pt-1 border-t border-amber-900/20`,children:[(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.jsxs)(`button`,{onClick:async()=>{if(D&&!y){b(!0);try{await se(D),C(!0),c||d(e.id),setTimeout(()=>C(!1),3e3)}catch(e){console.error(`Failed to activate problem:`,e)}finally{b(!1)}}},disabled:y,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl border text-xs font-cinzel font-bold shadow-sm transition-all active:scale-95 cursor-pointer disabled:opacity-50 ${x?`bg-emerald-600 text-white border-emerald-400`:w?`bg-amber-500/15 border-amber-500/40 hover:bg-amber-500/25 text-amber-300`:`bg-amber-900/10 border-amber-900/30 hover:bg-amber-900/20 text-amber-900`}`,children:[y?(0,J.jsx)(u,{className:`w-3.5 h-3.5 animate-spin`}):x?(0,J.jsx)(f,{className:`w-3.5 h-3.5`}):(0,J.jsx)(_,{className:`w-3.5 h-3.5 text-amber-500`}),(0,J.jsx)(`span`,{children:x?`Enrolled in Queue!`:`Learned Today`})]}),(0,J.jsxs)(`button`,{onClick:async()=>{if(D&&!y){b(!0);try{let t=await se(D);c||d(e.id),m(t.problem_id)}catch(e){console.error(`Failed to launch problem:`,e)}finally{b(!1)}}},disabled:y,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white text-xs font-cinzel font-bold shadow transition-all active:scale-95 cursor-pointer disabled:opacity-50`,children:[(0,J.jsx)(g,{className:`w-3.5 h-3.5`}),(0,J.jsx)(`span`,{children:`Solve / Review`})]})]}),(0,J.jsxs)(`a`,{href:D.leetcode_url,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-center gap-1.5 p-1.5 rounded-xl border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${w?`border-amber-500/20 hover:bg-amber-500/10 text-stone-300`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:[(0,J.jsx)(T,{className:`w-3 h-3 text-emerald-500`}),(0,J.jsx)(`span`,{children:`Open on LeetCode.com`})]})]})]}):(0,J.jsxs)(`div`,{className:`space-y-3`,children:[(0,J.jsx)(`div`,{children:(0,J.jsx)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${w?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:e.name})}),(0,J.jsxs)(`div`,{className:`p-3 rounded-xl border space-y-2 text-xs ${w?`bg-[#252019] border-[#5a4836] text-stone-200`:`bg-white/90 border-[#cbb38e] text-stone-800`}`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,J.jsx)(h,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h4`,{className:`font-bold text-xs m-0`,children:`No Local Note Synced`}),(0,J.jsxs)(`p`,{className:`text-[10px] opacity-75 mt-0.5 leading-normal`,children:[`Sync Google Drive or create a note for problem #`,e.id,`.`]})]})]}),(0,J.jsxs)(`div`,{className:`space-y-1.5 pt-1 border-t ${w?`border-amber-900/20`:`border-amber-900/10`}`,children:[(0,J.jsx)(`a`,{href:`https://leetcode.com/problemset/?search=${e.id}`,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-between p-1.5 rounded-lg border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${w?`border-amber-500/20 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,J.jsx)(T,{className:`w-3 h-3 text-emerald-500`}),`Search LeetCode #`,e.id]})}),(0,J.jsx)(`a`,{href:`https://www.google.com/search?q=leetcode+${e.id}`,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-between p-1.5 rounded-lg border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${w?`border-amber-500/20 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:(0,J.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,J.jsx)(p,{className:`w-3 h-3 text-amber-500`}),`Search Google Solution`]})})]})]})]}),(0,J.jsx)(`div`,{className:`pt-3 mt-3 border-t ${w?`border-amber-900/40`:`border-amber-900/15`}`,children:(0,J.jsx)(`button`,{onClick:()=>d(e.id),disabled:l,className:`w-full py-2.5 rounded-xl font-cinzel text-xs font-bold tracking-wider uppercase flex items-center justify-center gap-2 cursor-pointer transition-all border shadow-sm active:scale-95 disabled:opacity-50 ${c?w?`bg-rose-500/15 border-rose-500/40 text-rose-400 hover:bg-rose-500/25`:`bg-rose-600/10 border-rose-600/30 text-rose-800 hover:bg-rose-600/20`:w?`bg-emerald-500/15 border-emerald-500/40 text-emerald-400 hover:bg-emerald-500/25`:`bg-emerald-600/10 border-emerald-600/30 text-emerald-800 hover:bg-emerald-600/20`}`,children:c?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(A,{className:`w-4 h-4`}),(0,J.jsx)(`span`,{children:`Unmark As Completed`})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(S,{className:`w-4 h-4`}),(0,J.jsx)(`span`,{children:`Mark As Completed`})]})})}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2 pt-2.5 mt-2.5 border-t ${w?`border-amber-900/40`:`border-amber-900/15`}`,children:[(0,J.jsxs)(`button`,{onClick:a,disabled:t<=0,className:`flex items-center gap-1 text-[11px] font-cinzel font-semibold px-2.5 py-1.5 rounded-lg border transition-all disabled:opacity-30 cursor-pointer ${w?`border-amber-500/30 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:[(0,J.jsx)(v,{className:`w-3 h-3`}),(0,J.jsx)(`span`,{children:`Prev`})]}),(0,J.jsxs)(`span`,{className:`text-[10px] font-garamond italic font-semibold ${w?`text-stone-400`:`text-stone-600`}`,children:[`Waypoint `,t+1]}),(0,J.jsxs)(`button`,{onClick:i,disabled:t>=n-1,className:`flex items-center gap-1 text-[11px] font-cinzel font-semibold px-2.5 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 text-white transition-all disabled:opacity-30 cursor-pointer shadow`,children:[(0,J.jsx)(`span`,{children:`Next`}),(0,J.jsx)(N,{className:`w-3 h-3`})]})]})]})},Se=({isOpen:e,onClose:n,nodes:r,theme:i,onReset:a})=>{if(!e)return null;let o=i.id!==`parchment`,s=r.length;return(0,J.jsx)(`div`,{className:`fixed inset-0 z-[120] flex items-center justify-center p-4 bg-black/70 backdrop-blur-sm animate-fade-in select-none`,children:(0,J.jsxs)(`div`,{id:`expedition-complete-modal`,className:`relative w-full max-w-lg p-6 rounded-2xl border-2 shadow-2xl transition-all ${o?`bg-[#1c1813] border-[#594634] text-[#f2e6d5]`:`bg-[#f7efe0] border-[#c8b28f] text-[#332415]`}`,children:[(0,J.jsx)(`button`,{onClick:n,className:`absolute top-4 right-4 p-1.5 rounded-lg opacity-60 hover:opacity-100 hover:bg-black/10 cursor-pointer`,children:(0,J.jsx)(k,{className:`w-5 h-5`})}),(0,J.jsxs)(`div`,{className:`text-center mb-6`,children:[(0,J.jsx)(`div`,{className:`inline-flex p-3 rounded-2xl bg-amber-500/20 border border-amber-500/40 text-amber-500 mb-3 shadow-lg shadow-amber-500/20`,children:(0,J.jsx)(ne,{className:`w-10 h-10 animate-bounce`})}),(0,J.jsx)(`h2`,{className:`font-cinzel-dec font-bold text-2xl md:text-3xl text-amber-600 dark:text-amber-400`,children:`Expedition Completed!`}),(0,J.jsxs)(`p`,{className:`font-garamond italic text-sm md:text-base opacity-80 mt-1`,children:[`All `,s,` Waypoints and the entire ancient trail are now fully illuminated.`]})]}),(0,J.jsxs)(`div`,{className:`grid grid-cols-3 gap-3 mb-6`,children:[(0,J.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,J.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:s}),(0,J.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Nodes Solved`})]}),(0,J.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,J.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:`7`}),(0,J.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Biomes Crossed`})]}),(0,J.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,J.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:`1,620m`}),(0,J.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Peak Citadel`})]})]}),(0,J.jsxs)(`div`,{className:`space-y-2 mb-6 max-h-48 overflow-y-auto custom-scrollbar pr-1`,children:[r.length>0&&(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,J.jsx)(C,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,J.jsx)(`span`,{className:`font-bold`,children:`Waypoint 1:`}),(0,J.jsx)(`span`,{children:r[0].name})]}),r.length>25&&(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,J.jsx)(C,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,J.jsx)(`span`,{className:`font-bold`,children:`Waypoint 25:`}),(0,J.jsx)(`span`,{children:r[24].name})]}),r.length>50&&(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,J.jsx)(C,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,J.jsx)(`span`,{className:`font-bold`,children:`Waypoint 50:`}),(0,J.jsx)(`span`,{children:r[49].name})]}),r.length>75&&(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,J.jsx)(C,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,J.jsx)(`span`,{className:`font-bold`,children:`Waypoint 75:`}),(0,J.jsx)(`span`,{children:r[74].name})]}),r.length>0&&(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,J.jsx)(C,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,J.jsx)(`span`,{className:`font-bold`,children:`Final Milestone:`}),(0,J.jsx)(`span`,{className:`text-amber-600 dark:text-amber-300 font-bold`,children:r[r.length-1].name})]})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsxs)(`button`,{onClick:()=>{a(),n()},className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 px-4 rounded-xl border border-stone-400 dark:border-stone-700 font-cinzel font-semibold text-xs transition-all hover:bg-stone-500/10 cursor-pointer`,children:[(0,J.jsx)(t,{className:`w-4 h-4`}),(0,J.jsx)(`span`,{children:`Retrace From Start`})]}),(0,J.jsxs)(`button`,{onClick:n,className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 px-4 rounded-xl bg-amber-600 hover:bg-amber-500 text-white font-cinzel font-bold text-xs shadow-lg transition-all cursor-pointer`,children:[(0,J.jsx)(ie,{className:`w-4 h-4`}),(0,J.jsx)(`span`,{children:`Admire Map`})]})]})]})})},Ce=``,we=({nodes:e,activeNodeIndex:t,setActiveNodeIndex:n,completions:r,theme:a,onToggleCompletion:s,onSelectProblemForReview:c,onSwitchToMap:l,tracks:f,activeTrack:m,onTrackChange:h})=>{let _=a.id!==`parchment`,[v,y]=(0,I.useState)(``),[x,S]=(0,I.useState)(`all`),[w,D]=(0,I.useState)(`all`),[A,j]=(0,I.useState)(`all`),[M,ee]=(0,I.useState)(`sequence`),[ne,ie]=(0,I.useState)(null),[N,ce]=(0,I.useState)(null),L=(0,I.useRef)(null),R=(0,I.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let n=F(e.id);n?.pattern&&t.add(n.pattern)}),t.size===0&&oe().forEach(e=>t.add(e)),Array.from(t)},[e]),z=e.length,B=(0,I.useMemo)(()=>e.filter(e=>r.has(e.id)).length,[e,r]),le=z>0?Math.round(B/z*100):0,V=(0,I.useMemo)(()=>{let t=v.trim().toLowerCase(),n=t.replace(/^#/,``);return e.filter(e=>{let i=r.has(e.id);if(x===`solved`&&!i||x===`unsolved`&&i)return!1;let a=F(e.id);if(w!==`all`&&a?.pattern!==w||A!==`all`&&a?.difficulty!==A)return!1;if(t){let r=String(e.id).includes(n),i=String(e.sequenceIndex+1)===n,o=e.name.toLowerCase().includes(t),s=a?.pattern?.toLowerCase().includes(t)??!1,c=a?.difficulty?.toLowerCase().includes(t)??!1;if(!r&&!i&&!o&&!s&&!c)return!1}return!0}).sort((e,t)=>{switch(M){case`number_asc`:return e.id-t.id;case`number_desc`:return t.id-e.id;case`name`:return e.name.localeCompare(t.name);default:return e.sequenceIndex-t.sequenceIndex}})},[e,r,x,w,A,v,M]),H=async e=>{if(N===null){ce(e.id);try{let{data:{session:t}}=await P.auth.getSession(),n={Authorization:`Bearer ${t?t.access_token:`sandbox`}`},r=await fetch(`${Ce}/api/reviews/problems/${e.id}`,{headers:n});if(r.ok){let e=await r.json().catch(()=>[]);if(Array.isArray(e)&&e.length>0&&e[0]?.id){c(e[0].id);return}}let i=F(e.id);if(i){let e=await se(i);if(e?.problem_id){c(e.problem_id);return}}c(String(e.id))}catch(t){console.error(`Failed to prepare problem for review:`,t),c(String(e.id))}finally{ce(null)}}};return(0,I.useEffect)(()=>{if(t>=0&&!v&&x===`all`&&w===`all`&&A===`all`){let e=setTimeout(()=>{let e=document.getElementById(`problem-item-${t}`);e&&e.scrollIntoView({behavior:`auto`,block:`center`})},80);return()=>clearTimeout(e)}},[t,v,x,w,A]),(0,J.jsxs)(`div`,{className:`relative w-full h-full flex flex-col overflow-hidden select-none transition-colors duration-300 ${_?`parchment-dark-bg text-[#f4ebd9]`:`parchment-bg text-[#2c2014]`}`,children:[(0,J.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 ${_?`map-dark-vignette`:`map-vignette`}`}),(0,J.jsx)(`div`,{className:`relative z-20 px-4 pt-16 pb-3 border-b backdrop-blur-md transition-colors ${_?`bg-[#1a1612]/90 border-[#4a392b]`:`bg-[#f7efe0]/90 border-[#c8b28f]`}`,children:(0,J.jsxs)(`div`,{className:`max-w-6xl mx-auto space-y-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2.5 items-stretch sm:items-center justify-between`,children:[(0,J.jsxs)(`div`,{className:`relative flex-1`,children:[(0,J.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none`,children:(0,J.jsx)(p,{className:`w-4 h-4 text-amber-600 dark:text-amber-400`})}),(0,J.jsx)(`input`,{id:`journey-search-input`,type:`text`,value:v,onChange:e=>y(e.target.value),placeholder:`Search problem title, #number, or pattern (e.g. 1, Two Sum, Two Pointers)...`,className:`w-full pl-9 pr-8 py-2 rounded-xl text-xs md:text-sm font-garamond font-semibold border-2 shadow-inner focus:outline-none transition-all ${_?`bg-[#231e18] border-[#5a4836] text-[#f4ebd9] placeholder-stone-500 focus:border-amber-500/70`:`bg-[#fcf7ee] border-[#cfbc9c] text-[#2c2014] placeholder-stone-500 focus:border-amber-700/60`}`}),v&&(0,J.jsx)(`button`,{onClick:()=>y(``),title:`Clear search`,className:`absolute inset-y-0 right-0 pr-2.5 flex items-center text-stone-400 hover:text-amber-600 cursor-pointer`,children:(0,J.jsx)(k,{className:`w-4 h-4`})})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[f&&f.length>0&&h&&(0,J.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border text-xs font-cinzel font-bold shadow-sm ${_?`bg-[#231e18] border-[#5a4836] text-amber-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-amber-900`}`,children:[(0,J.jsx)(E,{className:`w-3.5 h-3.5 text-amber-500 shrink-0`}),(0,J.jsx)(`span`,{className:`text-[10px] uppercase opacity-75 hidden md:inline`,children:`Track:`}),(0,J.jsx)(`select`,{value:m,onChange:e=>h(e.target.value),className:`bg-transparent border-none text-xs font-cinzel font-bold cursor-pointer focus:outline-none`,children:f.map(e=>(0,J.jsx)(`option`,{value:e.id,className:`bg-stone-900 text-stone-200`,children:e.name},e.id))})]}),(0,J.jsxs)(`button`,{onClick:()=>{let e=document.getElementById(`problem-item-${t}`);e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),q.playPencilScratch())},title:`Scroll to active problem in list`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border text-xs font-cinzel font-bold transition-all shadow-sm active:scale-95 cursor-pointer ${_?`bg-amber-500/20 border-amber-500/40 text-amber-300 hover:bg-amber-500/30`:`bg-amber-600/15 border-amber-600/30 text-amber-900 hover:bg-amber-600/25`}`,children:[(0,J.jsx)(O,{className:`w-3.5 h-3.5 text-amber-500`}),(0,J.jsx)(`span`,{className:`hidden sm:inline`,children:`Current Problem`}),(0,J.jsxs)(`span`,{className:`font-mono text-[11px]`,children:[`#`,t+1]})]})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2.5 pt-1 text-xs`,children:[(0,J.jsx)(`div`,{className:`flex items-center gap-1`,children:[`all`,`solved`,`unsolved`].map(e=>{let t=x===e,n=e===`all`?z:e===`solved`?B:z-B;return(0,J.jsxs)(`button`,{onClick:()=>S(e),className:`px-2.5 py-1 rounded-lg font-cinzel text-xs font-bold capitalize transition-all cursor-pointer border ${t?`bg-amber-600 border-amber-500 text-white shadow-sm`:_?`bg-[#231e18] border-[#4a392b] text-stone-400 hover:text-stone-200`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-600 hover:text-stone-900`}`,children:[e,` `,(0,J.jsxs)(`span`,{className:`text-[10px] opacity-80`,children:[`(`,n,`)`]})]},e)})}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${_?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,J.jsx)(d,{className:`w-3 h-3 text-amber-500`}),(0,J.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Pattern:`}),(0,J.jsxs)(`select`,{value:w,onChange:e=>D(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none max-w-[150px] truncate`,children:[(0,J.jsxs)(`option`,{value:`all`,className:`bg-stone-900 text-stone-200`,children:[`All Patterns (`,R.length,`)`]}),R.map(e=>(0,J.jsx)(`option`,{value:e,className:`bg-stone-900 text-stone-200`,children:e},e))]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${_?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,J.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Diff:`}),(0,J.jsxs)(`select`,{value:A,onChange:e=>j(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none`,children:[(0,J.jsx)(`option`,{value:`all`,className:`bg-stone-900 text-stone-200`,children:`All`}),(0,J.jsx)(`option`,{value:`Easy`,className:`bg-stone-900 text-stone-200`,children:`Easy`}),(0,J.jsx)(`option`,{value:`Medium`,className:`bg-stone-900 text-stone-200`,children:`Medium`}),(0,J.jsx)(`option`,{value:`Hard`,className:`bg-stone-900 text-stone-200`,children:`Hard`})]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${_?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,J.jsx)(i,{className:`w-3 h-3 text-amber-500`}),(0,J.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Sort:`}),(0,J.jsxs)(`select`,{value:M,onChange:e=>ee(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none`,children:[(0,J.jsx)(`option`,{value:`sequence`,className:`bg-stone-900 text-stone-200`,children:`Track Sequence`}),(0,J.jsx)(`option`,{value:`number_asc`,className:`bg-stone-900 text-stone-200`,children:`Problem # (Asc)`}),(0,J.jsx)(`option`,{value:`number_desc`,className:`bg-stone-900 text-stone-200`,children:`Problem # (Desc)`}),(0,J.jsx)(`option`,{value:`name`,className:`bg-stone-900 text-stone-200`,children:`Title (A-Z)`})]})]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsxs)(`span`,{className:`font-garamond italic text-xs opacity-80`,children:[`Showing `,V.length,` of `,z]}),(0,J.jsx)(`div`,{className:`w-20 sm:w-28 h-2 rounded-full bg-black/20 overflow-hidden border border-amber-900/20`,children:(0,J.jsx)(`div`,{className:`h-full bg-gradient-to-r from-amber-500 to-emerald-500 transition-all duration-500`,style:{width:`${le}%`}})}),(0,J.jsxs)(`span`,{className:`font-cinzel text-[10px] font-bold text-emerald-600 dark:text-emerald-400`,children:[le,`%`]})]})]})]})}),(0,J.jsx)(`div`,{ref:L,className:`relative z-20 flex-1 overflow-y-auto px-4 py-4 custom-scrollbar`,children:(0,J.jsx)(`div`,{className:`max-w-6xl mx-auto space-y-2.5 pb-8`,children:V.length===0?(0,J.jsxs)(`div`,{className:`p-10 text-center rounded-2xl border-2 border-dashed my-8 transition-colors ${_?`border-amber-900/40 bg-[#1e1914]/60 text-stone-400`:`border-amber-900/20 bg-[#f9f2e3]/80 text-stone-600`}`,children:[(0,J.jsx)(te,{className:`w-10 h-10 mx-auto mb-3 text-amber-500 opacity-60`}),(0,J.jsx)(`h3`,{className:`font-cinzel font-bold text-base text-amber-700 dark:text-amber-400 mb-1`,children:`No Problems Found`}),(0,J.jsxs)(`p`,{className:`font-garamond italic text-sm max-w-md mx-auto mb-4`,children:[`No problems matched "`,v||`the current filter settings`,`". Try adjusting your search keywords or filter criteria.`]}),(v||x!==`all`||w!==`all`||A!==`all`)&&(0,J.jsx)(`button`,{onClick:()=>{y(``),S(`all`),D(`all`),j(`all`)},className:`px-4 py-1.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white font-cinzel text-xs font-bold transition-all shadow cursor-pointer`,children:`Clear All Filters`})]}):V.map(e=>{let i=r.has(e.id),a=e.sequenceIndex===t,c=ne===e.id,d=F(e.id),f=d?.difficulty,p=d?.pattern;return(0,J.jsxs)(`div`,{id:`problem-item-${e.sequenceIndex}`,className:`group relative rounded-xl border-2 transition-all duration-200 shadow-md ${a?_?`bg-[#2c2217] border-amber-500/80 shadow-amber-500/20 shadow-lg ring-1 ring-amber-500/40`:`bg-[#fffaf0] border-amber-700 shadow-amber-700/20 shadow-lg ring-1 ring-amber-700/30`:_?`bg-[#1f1a14]/90 border-[#4a392b] hover:border-amber-600/50 hover:bg-[#251f18]`:`bg-[#fcf8ef]/95 border-[#c8b28f] hover:border-amber-700/60 hover:bg-[#fcf5e6]`}`,children:[a&&(0,J.jsxs)(`div`,{className:`absolute -top-2.5 left-4 px-2 py-0.5 rounded-md bg-amber-600 text-white font-cinzel text-[9px] font-bold tracking-wider uppercase flex items-center gap-1 shadow`,children:[(0,J.jsx)(O,{className:`w-2.5 h-2.5 text-amber-200`}),`Current Problem`]}),(0,J.jsxs)(`div`,{className:`p-3 sm:p-3.5 flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-start sm:items-center gap-3 min-w-0 flex-1`,children:[(0,J.jsx)(`button`,{onClick:()=>{s(e.id)},title:i?`Mark as Unsolved`:`Mark as Solved`,className:`mt-0.5 sm:mt-0 p-1 rounded-lg hover:bg-black/10 dark:hover:bg-white/10 transition-colors cursor-pointer shrink-0`,children:i?(0,J.jsx)(C,{className:`w-5 h-5 text-emerald-500 transition-transform active:scale-125`}):(0,J.jsx)(b,{className:`w-5 h-5 text-stone-400 hover:text-amber-600 transition-colors`})}),(0,J.jsxs)(`div`,{className:`px-2 py-1 rounded-lg border font-cinzel text-[11px] font-bold text-center shrink-0 min-w-[54px] ${a?`bg-amber-500/20 border-amber-500 text-amber-500`:_?`bg-black/30 border-[#4a392b] text-stone-400`:`bg-amber-900/5 border-[#c8b28f] text-stone-600`}`,children:[(0,J.jsx)(`span`,{className:`text-[9px] block uppercase opacity-75 leading-none`,children:`Seq`}),(0,J.jsxs)(`span`,{children:[`#`,e.sequenceIndex+1]})]}),(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,J.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-mono text-[10px] font-bold ${_?`bg-[#2d251d] text-amber-400 border border-amber-900/50`:`bg-amber-900/10 text-amber-900 border border-amber-900/20`}`,children:e.id>0?`LC #${e.id}`:`Custom`}),f&&(0,J.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-cinzel text-[9px] font-bold uppercase tracking-wider border ${f===`Easy`?`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/30`:f===`Medium`?`bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/30`:`bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/30`}`,children:f}),p&&(0,J.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-cinzel text-[9px] font-medium border ${_?`bg-purple-950/30 text-purple-300 border-purple-800/40`:`bg-purple-50 text-purple-800 border-purple-200`}`,children:p}),(0,J.jsx)(`h4`,{onClick:()=>{n(e.sequenceIndex),q.playNodeLightUp(e.sequenceIndex,z)},className:`font-garamond font-bold text-sm sm:text-base leading-tight truncate cursor-pointer hover:underline ${a?`text-amber-700 dark:text-amber-300 font-bold`:_?`text-stone-200 hover:text-amber-300`:`text-stone-900 hover:text-amber-800`}`,children:e.name}),i&&(0,J.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 border border-emerald-500/30`,children:`✓ Solved`})]}),(d?.time_complexity||d?.space_complexity)&&(0,J.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap mt-1 text-[11px] font-mono`,children:[d.time_complexity&&(0,J.jsxs)(`span`,{className:`opacity-80`,children:[`Time:`,` `,(0,J.jsx)(`span`,{className:`text-amber-600 dark:text-amber-400 font-semibold`,children:d.time_complexity})]}),d.space_complexity&&(0,J.jsxs)(`span`,{className:`opacity-80`,children:[`Space:`,` `,(0,J.jsx)(`span`,{className:`text-purple-600 dark:text-purple-400 font-semibold`,children:d.space_complexity})]})]})]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0 self-end sm:self-center pl-10 sm:pl-0`,children:[(0,J.jsxs)(`button`,{onClick:()=>{n(e.sequenceIndex),q.playNodeLightUp(e.sequenceIndex,z),l(e.sequenceIndex)},title:`View Problem on Hand-Drawn Map`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg border text-xs font-cinzel font-bold transition-all shadow-sm active:scale-95 cursor-pointer ${_?`bg-amber-500/15 border-amber-500/40 text-amber-300 hover:bg-amber-500/25`:`bg-amber-700/10 border-amber-700/30 text-amber-900 hover:bg-amber-700/20`}`,children:[(0,J.jsx)(o,{className:`w-3.5 h-3.5 text-amber-500`}),(0,J.jsx)(`span`,{className:`hidden md:inline`,children:`Map`})]}),(0,J.jsxs)(`button`,{onClick:()=>H(e),disabled:N===e.id,title:`Launch Spaced Repetition Review for this problem`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 disabled:opacity-50 text-white text-xs font-cinzel font-bold shadow-sm transition-all active:scale-95 cursor-pointer`,children:[N===e.id?(0,J.jsx)(u,{className:`w-3.5 h-3.5 animate-spin`}):(0,J.jsx)(g,{className:`w-3.5 h-3.5`}),(0,J.jsx)(`span`,{className:`hidden md:inline`,children:N===e.id?`Loading...`:`Review`})]}),(0,J.jsx)(`a`,{href:d?.leetcode_url||(e.id>0?`https://leetcode.com/problemset/?search=${e.id}`:`https://www.google.com/search?q=${encodeURIComponent(e.name)}`),target:`_blank`,rel:`noreferrer`,title:`Open Problem on LeetCode`,className:`p-1.5 rounded-lg border transition-all cursor-pointer ${_?`border-stone-700 text-stone-400 hover:text-stone-200 hover:bg-white/5`:`border-stone-300 text-stone-600 hover:text-stone-900 hover:bg-black/5`}`,children:(0,J.jsx)(T,{className:`w-3.5 h-3.5`})}),(0,J.jsx)(`button`,{onClick:()=>{ie(c?null:e.id),c||n(e.sequenceIndex)},title:c?`Hide Problem Details`:`View Problem Details`,className:`p-1.5 rounded-lg border transition-all cursor-pointer ${c?`bg-amber-600/20 border-amber-500 text-amber-500`:_?`border-stone-700 text-stone-400 hover:text-stone-200`:`border-stone-300 text-stone-600 hover:text-stone-900`}`,children:c?(0,J.jsx)(re,{className:`w-3.5 h-3.5`}):(0,J.jsx)(ae,{className:`w-3.5 h-3.5`})})]})]}),c&&(0,J.jsx)(`div`,{className:`px-4 py-3 border-t text-xs font-garamond animate-fade-in ${_?`border-amber-900/40 bg-black/20 text-stone-300`:`border-amber-900/15 bg-amber-950/5 text-stone-700`}`,children:(0,J.jsxs)(`div`,{className:`space-y-3`,children:[d?.description?(0,J.jsxs)(`div`,{className:`p-3 rounded border border-amber-900/20 bg-amber-900/5 dark:bg-black/30 font-sans text-xs sm:text-[13px] leading-relaxed whitespace-pre-line text-stone-700 dark:text-stone-300`,children:[(0,J.jsx)(`div`,{className:`font-cinzel font-bold text-amber-600 dark:text-amber-400 text-[10px] uppercase mb-1 tracking-wider`,children:`Canonical Problem Description`}),d.description]}):(0,J.jsx)(`p`,{className:`italic text-stone-500`,children:`Review this problem in CodeStudio to access the full starter code, test suites, and review queue.`}),d?.examples&&d.examples.length>0&&(0,J.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,J.jsx)(`div`,{className:`font-cinzel font-bold text-amber-600 dark:text-amber-400 text-[10px] uppercase tracking-wider`,children:`Examples`}),(0,J.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-2`,children:d.examples.map((e,t)=>(0,J.jsxs)(`div`,{className:`p-2.5 rounded border border-stone-300/40 dark:border-stone-700/50 bg-black/5 dark:bg-black/30 font-mono text-[11px] space-y-1`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`span`,{className:`text-stone-500`,children:`Input: `}),(0,J.jsx)(`span`,{className:`font-semibold text-amber-700 dark:text-amber-300`,children:e.input})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`span`,{className:`text-stone-500`,children:`Output: `}),(0,J.jsx)(`span`,{className:`font-semibold text-emerald-600 dark:text-emerald-400`,children:e.output})]}),e.explanation&&(0,J.jsx)(`div`,{className:`text-[10px] text-stone-500 italic font-sans pt-0.5`,children:e.explanation})]},t))})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-4 text-[11px] pt-1 opacity-85 flex-wrap border-t border-stone-400/20 dark:border-stone-700/30`,children:[p&&(0,J.jsxs)(`span`,{children:[`Pattern: `,(0,J.jsx)(`strong`,{className:`font-cinzel text-amber-600 dark:text-amber-400`,children:p})]}),f&&(0,J.jsxs)(`span`,{children:[`Difficulty: `,(0,J.jsx)(`strong`,{children:f})]}),d?.time_complexity&&(0,J.jsxs)(`span`,{children:[`Time: `,(0,J.jsx)(`strong`,{className:`font-mono text-amber-600 dark:text-amber-400`,children:d.time_complexity})]}),d?.space_complexity&&(0,J.jsxs)(`span`,{children:[`Space: `,(0,J.jsx)(`strong`,{className:`font-mono text-purple-600 dark:text-purple-400`,children:d.space_complexity})]}),d?.constraints&&d.constraints.length>0&&(0,J.jsxs)(`span`,{children:[`Constraints: `,(0,J.jsx)(`strong`,{className:`font-mono text-[10px]`,children:d.constraints.join(` • `)})]})]})]})})]},e.id)})})})]})},Z=``;async function Q(e,t){if(!e.ok||!(e.headers.get(`content-type`)||``).includes(`application/json`))return t;try{return await e.json()}catch{return t}}function Te({onSelectProblemForReview:e}){let[t,n]=(0,I.useState)(new Set),[r,i]=(0,I.useState)({}),[o,s]=(0,I.useState)([]),[l,d]=(0,I.useState)([]),[f,p]=(0,I.useState)(()=>localStorage.getItem(`algospaced_active_track`)||`leetcode-150`),[h,g]=(0,I.useState)(!0),[_,v]=(0,I.useState)(0),[y,b]=(0,I.useState)(null),[x,S]=(0,I.useState)([]),[C,w]=(0,I.useState)(!1),[T,E]=(0,I.useState)(!1),[D,O]=(0,I.useState)(`parchment`),[k,A]=(0,I.useState)(`map`),[j,M]=(0,I.useState)(!0),[te,ne]=(0,I.useState)(!0),[re,ie]=(0,I.useState)(!0),[ae,N]=(0,I.useState)(!1),[oe,se]=(0,I.useState)(!1),[F,z]=(0,I.useState)(!1),[B,V]=(0,I.useState)(!0),H=ue[D]||ue.parchment,[U,W]=(0,I.useState)({x:0,y:0,scale:.5}),G=(0,I.useMemo)(()=>le(o,r),[o,r]),K=G.length,Y=_>=0&&_{q.setEnabled(j)},[j]);let de=async()=>{try{let{data:{session:e}}=await P.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},r=localStorage.getItem(`algospaced_active_track`)||`leetcode-150`,[a,o,c,l]=await Promise.all([fetch(`${Z}/api/journey-progress`,{headers:t}),fetch(`${Z}/api/journey-progress/titles`,{headers:t}),fetch(`${Z}/api/journey-progress/sequences`,{headers:t}),fetch(`${Z}/api/journey-progress/sequence/${r}`,{headers:t})]),[u,f,p,m]=await Promise.all([Q(a,[]),Q(o,{}),Q(c,[]),Q(l,[])]),h=new Set(u);n(h),i(f),d(p),s(m);let g=m.findIndex(e=>!h.has(e));v(g>=0?g:0)}catch(e){console.error(`Error fetching journey data:`,e)}finally{g(!1)}};(0,I.useEffect)(()=>{de()},[]);let fe=(0,I.useCallback)(async e=>{S([]),w(!0);try{let{data:{session:t}}=await P.auth.getSession(),n=t?t.access_token:`sandbox`,r=await Q(await fetch(`${Z}/api/reviews/problems/${e}`,{headers:{Authorization:`Bearer ${n}`}}),[]);S(r)}catch(e){console.error(`Error fetching problem details:`,e)}finally{w(!1)}},[]);(0,I.useEffect)(()=>{Y&&fe(Y.id)},[Y?.id,fe]);let pe=async e=>{g(!0),p(e),localStorage.setItem(`algospaced_active_track`,e);try{let{data:{session:n}}=await P.auth.getSession(),r={Authorization:`Bearer ${n?n.access_token:`sandbox`}`},i=await Q(await fetch(`${Z}/api/journey-progress/sequence/${e}`,{headers:r}),[]);if(i.length>0){s(i);let e=i.findIndex(e=>!t.has(e));v(e>=0?e:0)}}catch(e){console.error(`Error switching track:`,e)}finally{g(!1)}},me=(0,I.useCallback)(()=>{v(e=>{if(e{v(e=>e>0?(q.playPencilScratch(),e-1):0)},[]),ge=(0,I.useCallback)(e=>{let t=Math.max(0,Math.min(K-1,e));v(t),q.playNodeLightUp(t,K),t===K-1&&q.playVictoryChime()},[K]),_e=(0,I.useCallback)(()=>{v(0),q.playPencilScratch()},[]),ve=async e=>{E(!0);try{let{data:{session:r}}=await P.auth.getSession(),i=r?r.access_token:`sandbox`;if((await fetch(`${Z}/api/journey-progress/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${i}`},body:JSON.stringify({problem_number:e})})).ok){let r=new Set(t);r.has(e)?(r.delete(e),q.playPencilScratch()):(r.add(e),q.playNodeLightUp(_,K),o.every(e=>r.has(e))&&(q.playVictoryChime(),ce({particleCount:130,spread:85,origin:{y:.6},colors:[`#10b981`,`#34d399`,`#f59e0b`,`#ffffff`]}),z(!0))),n(r)}}catch(e){console.error(`Error toggling progress:`,e)}finally{E(!1)}};(0,I.useEffect)(()=>{let e=e=>{let t=e.target;[`INPUT`,`TEXTAREA`,`SELECT`].includes(t?.tagName)||t?.isContentEditable||k===`map`&&(e.code===`Space`||e.code===`ArrowRight`||e.code===`ArrowDown`?(e.preventDefault(),me()):e.code===`ArrowLeft`||e.code===`ArrowUp`?(e.preventDefault(),he()):e.code===`KeyR`&&(e.preventDefault(),_e()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[me,he,_e,k]);let X=(0,I.useRef)(null),Ce=(0,I.useCallback)(()=>{let e=X.current?.clientWidth||window.innerWidth,t=X.current?.clientHeight||window.innerHeight,n=e/2,r=t/2;W(e=>{let t=Math.min(e.scale*1.25,3.5);return{scale:t,x:n-(n-e.x)/e.scale*t,y:r-(r-e.y)/e.scale*t}})},[]),Te=(0,I.useCallback)(()=>{let e=X.current?.clientWidth||window.innerWidth,t=X.current?.clientHeight||window.innerHeight,n=e/2,r=t/2;W(e=>{let t=Math.max(e.scale*.8,.08);return{scale:t,x:n-(n-e.x)/e.scale*t,y:r-(r-e.y)/e.scale*t}})},[]),Ee=(0,I.useCallback)(()=>{let e=X.current?.clientWidth||window.innerWidth,t=X.current?.clientHeight||window.innerHeight,n=e/L,r=t/R,i=Math.min(n,r)*.9;W({x:(e-L*i)/2,y:(t-R*i)/2,scale:i})},[]),De=(0,I.useCallback)(()=>{if(!Y)return;let e=X.current?.clientWidth||window.innerWidth,t=X.current?.clientHeight||window.innerHeight,n=Math.max(U.scale,.95);W({x:e/2-Y.x*n,y:t/2-Y.y*n,scale:n})},[Y,U.scale]),Oe=(0,I.useCallback)(e=>{if(A(`map`),typeof e==`number`&&e>=0&&eA(`map`),title:`Hand-Drawn Cartography Map`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg font-cinzel text-xs font-bold transition-all cursor-pointer ${k===`map`?`bg-amber-600 text-white shadow-sm`:$?`text-stone-400 hover:text-stone-200`:`text-stone-600 hover:text-stone-900`}`,children:[(0,J.jsx)(m,{className:`w-3.5 h-3.5`}),(0,J.jsx)(`span`,{children:`Map`})]}),(0,J.jsxs)(`button`,{id:`view-mode-list-btn`,onClick:()=>A(`list`),title:`Problem List View`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg font-cinzel text-xs font-bold transition-all cursor-pointer ${k===`list`?`bg-amber-600 text-white shadow-sm`:$?`text-stone-400 hover:text-stone-200`:`text-stone-600 hover:text-stone-900`}`,children:[(0,J.jsx)(c,{className:`w-3.5 h-3.5`}),(0,J.jsx)(`span`,{children:`List`})]})]}),k===`map`&&(0,J.jsxs)(`button`,{id:`toggle-journal-btn`,onClick:()=>V(e=>!e),title:`Toggle Explorer Field Notes Journal`,className:`flex items-center gap-1.5 px-3 py-2 rounded-xl border-2 shadow-lg backdrop-blur-md font-cinzel text-xs font-bold transition-all cursor-pointer ${B?`bg-amber-600 border-amber-400 text-white`:$?`bg-[#1a1612]/90 border-[#4a392b] text-[#e2d5c2]`:`bg-[#f7efe0]/95 border-[#c8b28f] text-[#332415]`}`,children:[(0,J.jsx)(a,{className:`w-4 h-4`}),(0,J.jsx)(`span`,{className:`hidden sm:inline`,children:`Journal`})]})]})]}),k===`map`?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`main`,{ref:X,className:`relative flex-1 w-full h-full`,children:[(0,J.jsx)(ye,{nodes:G,activeNodeIndex:_,completions:t,theme:H,showLabels:re,showGrid:ae,showNodeNumbers:oe,autoCenterOnActive:te,onNodeClick:ge,hoveredNodeIndex:y,setHoveredNodeIndex:b,transform:U,setTransform:W}),B&&(0,J.jsx)(`aside`,{className:`absolute top-16 left-2.5 z-30 w-72 md:w-84 pointer-events-auto transition-all animate-fade-in`,children:(0,J.jsx)(xe,{node:Y,activeNodeIndex:_,totalNodes:K,theme:H,onAdvance:me,onRetreat:he,details:x,modalLoading:C,isCompleted:Y?t.has(Y.id):!1,toggleLoading:T,onToggleCompletion:ve,onSelectProblemForReview:e})})]}),(0,J.jsx)(`footer`,{className:`absolute bottom-2.5 left-2.5 right-2.5 z-30 pointer-events-auto max-w-5xl mx-auto w-[calc(100%-1.25rem)]`,children:(0,J.jsx)(be,{theme:H,soundEnabled:j,autoCenterOnActive:te,showLabels:re,showGrid:ae,showNodeNumbers:oe,tracks:l,activeTrack:f,onTrackChange:pe,onToggleSound:()=>M(e=>!e),onToggleAutoCenter:()=>ne(e=>!e),onToggleLabels:()=>ie(e=>!e),onToggleGrid:()=>N(e=>!e),onToggleNodeNumbers:()=>se(e=>!e),onToggleTheme:()=>O(e=>e===`parchment`?`dark_parchment`:`parchment`),onZoomIn:Ce,onZoomOut:Te,onResetZoom:Ee,onCenterActiveNode:De})})]}):(0,J.jsx)(`main`,{className:`relative flex-1 w-full h-full overflow-hidden`,children:(0,J.jsx)(we,{nodes:G,activeNodeIndex:_,setActiveNodeIndex:v,completions:t,theme:H,onToggleCompletion:ve,onSelectProblemForReview:e,onSwitchToMap:Oe,tracks:l,activeTrack:f,onTrackChange:pe,onToggleTheme:()=>O(e=>e===`parchment`?`dark_parchment`:`parchment`)})}),(0,J.jsx)(Se,{isOpen:F,onClose:()=>z(!1),nodes:G,theme:H,onReset:_e})]})}export{Te as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/JourneyPath-Dpd3IPxF.js b/algospaced-ui/dist/assets/JourneyPath-Dpd3IPxF.js deleted file mode 100644 index 4f38c8ea43597e50c957bb4cafa4fdf6677d7f12..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/JourneyPath-Dpd3IPxF.js +++ /dev/null @@ -1,65 +0,0 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,B as n,Bt as r,C as i,D as a,F as o,G as s,J as c,O as l,Q as u,R as d,Rt as f,W as p,_t as m,a as h,b as g,c as _,ft as v,g as y,gt as b,h as x,ht as S,i as C,it as w,l as T,lt as E,m as D,o as O,pt as k,r as A,tt as j,u as M,ut as N,vt as ee,w as te,wt as ne,y as re,yt as ie,z as P}from"./vendor-react-CIO8MTK1.js";import{s as F}from"./firebaseClient-DZobvwSx.js";import{a as ae,c as oe,o as I}from"./index-DnK6BACV.js";import{t as se}from"./confetti.module-Uxh4CK4s.js";var L=e(r(),1),R=2600,z=1500,B=[{tMax:.15,name:`The Whispering Coast & Lowlands`,biome:`coast`},{tMax:.32,name:`The Elderwood Deep Forest`,biome:`forest`},{tMax:.48,name:`River Elden & The Twin Fords`,biome:`river`},{tMax:.68,name:`The Dragon Tooth Mountains & Passes`,biome:`mountain`},{tMax:.83,name:`The Misty Glade & Highland Woods`,biome:`forest`},{tMax:.93,name:`The Roaring Gorge & Cataracts`,biome:`river`},{tMax:1,name:`The Sunstone Peaks & Ancient Citadel`,biome:`ancient_ruins`}],V=[`Pencil marks still visible from the cartographer’s first survey.`,`A calm breeze sweeps through the grass, carrying the scent of pine.`,`Wooden planks creak underfoot as the river roars below.`,`Craggy pencil hatchings reveal steep, unforgiving granite slopes.`,`Ancient roots break through the worn gravel pathway.`,`The sound of rushing water echoes across the canyon walls.`,`A solitary stone marker inscribed with early explorer symbols.`,`Golden light filters softly through the sketched canopy.`,`Distant mountain ridges frame the expanding horizon.`,`A tranquil haven where wanderers rest before the mountain climb.`];function ce(e=[],t={}){let n=[],r=e.length>0?e.length:150,i=[{t:0,x:220,y:1320,elev:10},{t:.08,x:380,y:1140,elev:45},{t:.16,x:580,y:980,elev:120},{t:.24,x:820,y:1120,elev:90},{t:.32,x:940,y:860,elev:180},{t:.4,x:720,y:640,elev:320},{t:.48,x:1050,y:520,elev:580},{t:.56,x:1320,y:720,elev:890},{t:.64,x:1540,y:480,elev:1250},{t:.72,x:1780,y:680,elev:920},{t:.8,x:1980,y:920,elev:460},{t:.88,x:2220,y:760,elev:750},{t:.94,x:2180,y:480,elev:1180},{t:1,x:2420,y:240,elev:1620}];for(let a=0;a1?a/(r-1):0,s=0;for(;so<=e.tMax)||B[B.length-1],D=e.length>0?e[a]:a+1,O=t[D]||(D<0?`Custom Challenge ${a+1}`:`LeetCode #${D}`),k=V[a%V.length];n.push({id:D,sequenceIndex:a,x,y:S,name:O,biome:E.biome,regionName:E.name,elevation:Math.max(10,T),lore:k})}return n}var H=[{id:`wm-bg1`,x:380,y:310,size:70,height:85,ridgeShift:-4,hasSnow:!1,layer:0,elevation:840,rangeName:`Western Crags`},{id:`wm-bg2`,x:490,y:280,size:85,height:105,ridgeShift:6,hasSnow:!0,layer:0,elevation:1120,name:`Peak of the North Wind`,rangeName:`Western Crags`},{id:`wm-bg3`,x:620,y:300,size:75,height:95,ridgeShift:-3,hasSnow:!1,layer:0,elevation:960,rangeName:`Western Crags`},{id:`wm-bg4`,x:730,y:320,size:65,height:80,ridgeShift:4,hasSnow:!1,layer:0,elevation:780,rangeName:`Western Crags`},{id:`m1`,x:430,y:375,size:80,height:105,ridgeShift:5,hasSnow:!0,elevation:1240,name:`Crag of the Mist`,rangeName:`Western Crags`},{id:`m2`,x:530,y:345,size:95,height:125,ridgeShift:-7,hasSnow:!0,elevation:1480,name:`Peak of Solitude`,rangeName:`Western Crags`},{id:`m3`,x:630,y:365,size:85,height:110,ridgeShift:3,hasSnow:!0,elevation:1310,name:`Shadowhorn`,rangeName:`Western Crags`},{id:`m4`,x:720,y:385,size:70,height:90,ridgeShift:-4,hasSnow:!1,elevation:990,rangeName:`Western Crags`},{id:`m5`,x:370,y:430,size:55,height:65,ridgeShift:4,hasSnow:!1,layer:2,elevation:620,rangeName:`Western Crags`},{id:`m6`,x:470,y:425,size:68,height:80,ridgeShift:-3,hasSnow:!1,layer:2,elevation:760,name:`Gullwing Bluff`,rangeName:`Western Crags`},{id:`m6b`,x:575,y:420,size:72,height:88,ridgeShift:3,hasSnow:!1,layer:2,elevation:850,rangeName:`Western Crags`},{id:`m6c`,x:670,y:435,size:58,height:70,ridgeShift:-2,hasSnow:!1,layer:2,elevation:680,rangeName:`Western Crags`},{id:`dt-bg1`,x:1130,y:260,size:90,height:120,ridgeShift:-6,hasSnow:!0,layer:0,elevation:1850,rangeName:`Dragon's Tooth Range`},{id:`dt-bg2`,x:1250,y:225,size:115,height:150,ridgeShift:8,hasSnow:!0,layer:0,elevation:2180,name:`Crown of the North`,rangeName:`Dragon's Tooth Range`},{id:`dt-bg3`,x:1380,y:210,size:130,height:175,ridgeShift:-10,hasSnow:!0,layer:0,elevation:2450,name:`Apex of Clouds`,rangeName:`Dragon's Tooth Range`},{id:`dt-bg4`,x:1510,y:240,size:110,height:145,ridgeShift:7,hasSnow:!0,layer:0,elevation:2020,rangeName:`Dragon's Tooth Range`},{id:`dt-bg5`,x:1640,y:280,size:90,height:115,ridgeShift:-5,hasSnow:!0,layer:0,elevation:1690,rangeName:`Dragon's Tooth Range`},{id:`m7`,x:1190,y:325,size:105,height:140,ridgeShift:-8,hasSnow:!0,elevation:1980,name:`The Dragon's Crest`,rangeName:`Dragon's Tooth Range`},{id:`m8`,x:1310,y:295,size:125,height:165,ridgeShift:10,hasSnow:!0,elevation:2360,name:`Frostcrag Pinnacle`,rangeName:`Dragon's Tooth Range`},{id:`m9`,x:1435,y:320,size:115,height:150,ridgeShift:-6,hasSnow:!0,elevation:2120,name:`Thunderhorn Peak`,rangeName:`Dragon's Tooth Range`},{id:`m10`,x:1560,y:355,size:98,height:125,ridgeShift:7,hasSnow:!0,elevation:1780,name:`Screaming Ridge`,rangeName:`Dragon's Tooth Range`},{id:`m10b`,x:1680,y:375,size:85,height:105,ridgeShift:-4,hasSnow:!1,elevation:1420,rangeName:`Dragon's Tooth Range`},{id:`m11`,x:1260,y:415,size:90,height:115,ridgeShift:-5,hasSnow:!0,elevation:1560,name:`Ironhorn Needle`,rangeName:`Dragon's Tooth Range`},{id:`m12`,x:1375,y:405,size:100,height:130,ridgeShift:6,hasSnow:!0,elevation:1720,name:`Shadowcrevasse Crag`,rangeName:`Dragon's Tooth Range`},{id:`m13`,x:1490,y:440,size:88,height:110,ridgeShift:-4,hasSnow:!0,elevation:1490,rangeName:`Dragon's Tooth Range`},{id:`m14`,x:1610,y:435,size:82,height:100,ridgeShift:5,hasSnow:!1,elevation:1320,rangeName:`Dragon's Tooth Range`},{id:`m15`,x:1160,y:590,size:80,height:100,ridgeShift:5,hasSnow:!1,elevation:1180,name:`Wanderer's Bluff`,rangeName:`Mid-Pass Gorge`},{id:`m16`,x:1390,y:610,size:90,height:115,ridgeShift:-6,hasSnow:!0,elevation:1390,name:`Eagle Eye Ridge`,rangeName:`Mid-Pass Gorge`},{id:`m17`,x:1510,y:585,size:95,height:120,ridgeShift:5,hasSnow:!0,elevation:1520,name:`Razorback Spine`,rangeName:`Mid-Pass Gorge`},{id:`m18`,x:1630,y:565,size:85,height:105,ridgeShift:-4,hasSnow:!1,elevation:1280,rangeName:`Mid-Pass Gorge`},{id:`m18b`,x:1740,y:580,size:75,height:90,ridgeShift:3,hasSnow:!1,elevation:1050,rangeName:`Mid-Pass Gorge`},{id:`es-bg1`,x:1980,y:310,size:88,height:115,ridgeShift:-5,hasSnow:!0,layer:0,elevation:1650,rangeName:`Sunstone Highlands`},{id:`es-bg2`,x:2110,y:245,size:105,height:140,ridgeShift:6,hasSnow:!0,layer:0,elevation:1980,name:`Sun Pillar`,rangeName:`Sunstone Highlands`},{id:`es-bg3`,x:2260,y:160,size:135,height:180,ridgeShift:-8,hasSnow:!0,layer:0,elevation:2580,name:`Crown of the Heavens`,rangeName:`Sunstone Highlands`},{id:`es-bg4`,x:2410,y:210,size:115,height:150,ridgeShift:7,hasSnow:!0,layer:0,elevation:2240,rangeName:`Sunstone Highlands`},{id:`m19`,x:2040,y:375,size:98,height:128,ridgeShift:6,hasSnow:!0,elevation:1720,name:`Sunstone Spire`,rangeName:`Sunstone Highlands`},{id:`m20`,x:2170,y:315,size:115,height:150,ridgeShift:-7,hasSnow:!0,elevation:2080,name:`Sanctuary Peak`,rangeName:`Sunstone Highlands`},{id:`m21`,x:2310,y:220,size:130,height:170,ridgeShift:8,hasSnow:!0,elevation:2390,name:`Pinnacle of the Ancients`,rangeName:`Sunstone Highlands`},{id:`m22`,x:2440,y:360,size:90,height:115,ridgeShift:-5,hasSnow:!0,elevation:1610,name:`Falcon Perch`,rangeName:`Sunstone Highlands`},{id:`m23`,x:2260,y:405,size:82,height:98,ridgeShift:4,hasSnow:!1,elevation:1250,name:`Altar Crag`,rangeName:`Sunstone Highlands`},{id:`m24`,x:2380,y:420,size:76,height:88,ridgeShift:-3,hasSnow:!1,elevation:1120,rangeName:`Sunstone Highlands`},{id:`m25`,x:2140,y:450,size:70,height:80,ridgeShift:3,hasSnow:!1,elevation:980,rangeName:`Sunstone Highlands`}],U=[{id:`river-elden`,name:`River Elden`,d:`M 1340,290 C 1310,380 1260,460 1210,540 C 1140,640 1020,700 960,820 C 900,940 930,1060 880,1180 C 840,1280 760,1360 690,1480`,width:14,hasBridges:[{x:945,y:855,angle:-35},{x:890,y:1160,angle:25}]},{id:`river-silver`,name:`Silver Meander`,d:`M 580,410 C 650,490 730,550 780,660 C 830,760 910,810 960,820`,width:8,hasBridges:[{x:740,y:620,angle:45}]},{id:`river-cataract`,name:`Highland Torrent`,d:`M 2150,320 C 2100,450 2050,600 2020,760 C 1990,920 1920,1050 1840,1180 C 1760,1310 1710,1420 1660,1500`,width:11,hasBridges:[{x:2010,y:810,angle:-20}]}],W=[{id:`f1`,name:`The Whispering Pines`,cx:580,cy:1040,rx:230,ry:160,treeCount:42,trees:G(580,1040,210,140,42,`pines`)},{id:`f2`,name:`Elderwood Deep`,cx:820,cy:1140,rx:250,ry:180,treeCount:52,trees:G(820,1140,230,160,52,`oaks`)},{id:`f3`,name:`Mistwood Valley`,cx:860,cy:620,rx:190,ry:140,treeCount:36,trees:G(860,620,170,120,36,`willows`)},{id:`f4`,name:`Highland Spruces`,cx:1760,cy:740,rx:210,ry:155,treeCount:38,trees:G(1760,740,190,135,38,`highland_spruce`)},{id:`f5`,name:`Verdant Basin`,cx:1960,cy:980,rx:200,ry:150,treeCount:38,trees:G(1960,980,180,130,38,`mixed`)},{id:`f6`,name:`Shadowglen Copse`,cx:390,cy:690,rx:140,ry:100,treeCount:22,trees:G(390,690,120,80,22,`pines`)},{id:`f7`,name:`Sunstone Grove`,cx:2360,cy:580,rx:150,ry:110,treeCount:24,trees:G(2360,580,130,90,24,`mixed`)}];function G(e,t,n,r,i,a){let o=[];for(let s=0;s{setTimeout(()=>{if(!this.ctx)return;let t=this.ctx.currentTime,n=this.ctx.createOscillator(),r=this.ctx.createGain();n.type=`sine`,n.frequency.setValueAtTime(e,t),r.gain.setValueAtTime(.001,t),r.gain.linearRampToValueAtTime(.15,t+.05),r.gain.exponentialRampToValueAtTime(1e-4,t+1.2),n.connect(r),r.connect(this.ctx.destination),n.start(t),n.stop(t+1.3)},t*120)}))}},Y=f();function X(e){let t=Math.sin(e*12.9898+78.233)*43758.5453;return t-Math.floor(t)}var ue=({mountain:e,theme:t})=>{let n=t.id!==`parchment`,r=t.pencilColor,i=t.pencilShade,{id:a,x:o,y:s,size:c,height:l,ridgeShift:u=0,hasSnow:d=l>95}=e,f=(0,L.useMemo)(()=>{let e=0;for(let t=0;t.65?l*.04:0;f.push({x:Math.round(o+u),y:Math.round(s+d)})}let p=[];for(let r=1;r<=6;r++){let a=r/6,o=t+(i-t)*a,s=n+l*a,u=(X(e+r*43)-.48)*(c*.14)*Math.sin(a*Math.PI),d=X(e+r*59)>.65?l*.04:0;p.push({x:Math.round(o+u),y:Math.round(s+d)})}let m=[{x:t,y:n}];for(let r=1;r<=7;r++){let i=r/7,a=t+(o+u*.25+(X(e+101)-.5)*(c*.15)-t)*i**1.2,s=n+l*i,d=Math.sin(i*Math.PI*2.2+X(e+113))*(c*.1);m.push({x:Math.round(a+d),y:Math.round(s)})}let h=[],g=m[Math.min(m.length-1,2)];if(g){let t=o+c*.55+(X(e+201)-.5)*15,n=s-l*.12,r=(g.x+t)/2+12,i=(g.y+n)/2-6;h.push({d:`M ${g.x},${g.y} Q ${r},${i} ${t},${n}`,side:`right`})}let _=m[Math.min(m.length-1,5)];if(_){let t=o+c*.85+(X(e+209)-.5)*15,n=s,r=(_.x+t)/2+10,i=(_.y+n)/2-4;h.push({d:`M ${_.x},${_.y} Q ${r},${i} ${t},${n}`,side:`right`})}let v=m[Math.min(m.length-1,3)];if(v){let t=o-c*.6+(X(e+301)-.5)*15,n=s-l*.15,r=(v.x+t)/2-10,i=(v.y+n)/2-5;h.push({d:`M ${v.x},${v.y} Q ${r},${i} ${t},${n}`,side:`left`})}let y=[],b=Math.max(14,Math.round(l/4.8));for(let r=1;r<=b;r++){let a=r/(b+1),o=m[Math.min(m.length-1,Math.max(0,Math.round(a*(m.length-1))))],s=n+l*a,c=p[Math.min(p.length-1,Math.max(0,Math.round(a*(p.length-1))))]||{x:t+(i-t)*a,y:s},u=o.x+(c.x-o.x)*.08,d=s+(X(e+r*71)-.5)*3,f=r%3==0?.92:r%2==0?.75:.6,h=u+(c.x-u)*f,g=d+((s-n)*.22+(c.y-s)*.35)+(X(e+r*83)-.5)*4;y.push({x1:Math.round(u),y1:Math.round(d),x2:Math.round(h),y2:Math.round(g),width:r<4?.9:1.25,opacity:r<3?.6:.85}),r>4&&r%2==0&&y.push({x1:Math.round(u+(h-u)*.3),y1:Math.round(d+(g-d)*.3),x2:Math.round(u+(h-u)*.75),y2:Math.round(d+(g-d)*.15),width:.75,opacity:.55})}let x=[],S=Math.max(4,Math.round(l/18));for(let i=1;i<=S;i++){let a=(i+.3)/(S+1),o=n+l*a,s=m[Math.min(m.length-1,Math.round(a*(m.length-1)))],c=f[Math.min(f.length-1,Math.round(a*(f.length-1)))]||{x:t-(t-r)*a,y:o},u=s.x-(s.x-c.x)*.25,d=o+2,p=s.x-(s.x-c.x)*(.6+X(e+i*97)*.3),h=o+8+X(e+i*103)*6,g=(u+p)/2-4,_=(d+h)/2+3;if(x.push({d:`M ${Math.round(u)},${Math.round(d)} Q ${Math.round(g)},${Math.round(_)} ${Math.round(p)},${Math.round(h)}`,width:.9}),i%2==1){let e=u-6,t=d+3;x.push({d:`M ${Math.round(e)},${Math.round(t)} L ${Math.round(e-8)},${Math.round(t+10)}`,width:.75})}}let C=``,w=``;if(d){let e=n+l*.32,a=t-(t-r)*.32,o=t+(i-t)*.32,s=m[Math.min(m.length-1,2)]||{x:t,y:e},c={x:t-(t-r)*.16,y:e-4},u={x:t-(t-r)*.26,y:e+6},d={x:t+(i-t)*.14,y:e+3},h={x:t+(i-t)*.24,y:e-2};C=`M ${t},${n} - L ${f[1].x},${f[1].y} - L ${a},${e} - Q ${u.x},${u.y} ${c.x},${c.y} - L ${s.x},${s.y} - Q ${d.x},${d.y} ${h.x},${h.y} - L ${o},${e} - L ${p[1].x},${p[1].y} - Z`,w=`M ${t},${n} - L ${s.x},${s.y} - Q ${d.x},${d.y} ${h.x},${h.y} - L ${o},${e} - L ${p[1].x},${p[1].y} - Z`}let T=[],E=[],D=Math.round(c/8);for(let t=0;tt===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `),k=p.map(e=>`L ${e.x},${e.y}`).join(` `),A=m.map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `),j=`${O} ${k} Z`,M=p[p.length-1];return{peakX:t,peakY:n,leftX:r,rightX:i,fullPerimeterPath:j,shadedFacePath:`${A} L ${M.x},${M.y} ${p.slice().reverse().map(e=>`L ${e.x},${e.y}`).join(` `)} Z`,ridgePathStr:A,spurs:h,hachures:y,westStrata:x,snowCapPath:C,snowShadePath:w,screeStipples:T,screeLines:E}},[a,o,s,c,l,u,d]),p=n?`#231d17`:`#ded1b4`,m=n?`#1c1712`:`#cdbe9e`,h=n?`#ddd4c5`:`#fcfbf7`,g=n?`#a89c89`:`#e4d8c3`;return(0,Y.jsxs)(`g`,{id:`mountain-${a}`,className:`realistic-mountain-group transition-all duration-300 select-none`,children:[(0,Y.jsx)(`path`,{d:f.fullPerimeterPath,fill:p,stroke:r,strokeWidth:`1.8`,strokeLinejoin:`round`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:f.shadedFacePath,fill:m,opacity:n?.7:.55}),d&&f.snowCapPath&&(0,Y.jsxs)(`g`,{id:`snowcap-${a}`,children:[(0,Y.jsx)(`path`,{d:f.snowCapPath,fill:h,stroke:r,strokeWidth:`1.1`,strokeLinejoin:`round`,opacity:n?.85:.95}),f.snowShadePath&&(0,Y.jsx)(`path`,{d:f.snowShadePath,fill:g,opacity:.65})]}),(0,Y.jsx)(`g`,{id:`strata-${a}`,stroke:r,strokeLinecap:`round`,opacity:n?.65:.75,children:f.westStrata.map((e,t)=>(0,Y.jsx)(`path`,{d:e.d,fill:`none`,strokeWidth:e.width},t))}),(0,Y.jsx)(`g`,{id:`hachures-${a}`,stroke:i,strokeLinecap:`round`,children:f.hachures.map((e,t)=>(0,Y.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:e.width,opacity:e.opacity},t))}),(0,Y.jsx)(`g`,{id:`spurs-${a}`,children:f.spurs.map((e,t)=>(0,Y.jsx)(`path`,{d:e.d,fill:`none`,stroke:e.side===`right`?r:i,strokeWidth:e.side===`right`?1.6:1.2,strokeLinecap:`round`,opacity:.85},t))}),(0,Y.jsx)(`path`,{d:f.ridgePathStr,fill:`none`,stroke:r,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Y.jsxs)(`g`,{id:`scree-${a}`,fill:r,stroke:i,opacity:n?.45:.6,children:[f.screeStipples.map((e,t)=>(0,Y.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r},t)),f.screeLines.map((e,t)=>(0,Y.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:`0.8`,strokeLinecap:`round`},t))]})]})},de=({tree:e,theme:t})=>{let{x:n,y:r,scale:i=1,type:a=`pine`}=e,o=t.id!==`parchment`,s=t.pencilColor,c=t.pencilShade,l=o?`#1e281c`:`#d8d4bf`,u=o?`#242a1e`:`#ded6bf`,d=o?`#2e251d`:`#cca98a`,f=o?`#1f2920`:`#d5dcc2`,p=o?`#293222`:`#e2dbcb`;return(0,Y.jsx)(`g`,{id:`tree-${n}-${r}`,className:`realistic-tree`,children:(()=>{switch(a){case`pine`:case`spruce`:{let e=a===`spruce`?14:17,t=a===`spruce`?32:28;return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:e*.75,ry:`3`,fill:s,opacity:o?.25:.2}),(0,Y.jsx)(`path`,{d:`M -1.8,2 L -1,-6 L 1,-6 L 1.8,2 Z`,fill:d,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-10 - Q ${e*.55},-7 ${e*.95},-3 - Q ${e*.6},0 0, -2 - Q ${-e*.6},0 ${-e*.95},-3 - Q ${-e*.55},-7 0,-10 Z`,fill:l,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 1,-6 Q ${e*.5},-4 ${e*.85},-3 Q ${e*.4},-1 0,-2 Z`,fill:s,opacity:o?.4:.3}),(0,Y.jsx)(`line`,{x1:`2`,y1:`-7`,x2:e*.75,y2:`-4`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-4`,x2:e*.65,y2:`-2`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`path`,{d:`M 0,-18 - Q ${e*.45},-15 ${e*.8},-11 - Q ${e*.5},-8 0, -10 - Q ${-e*.5},-8 ${-e*.8},-11 - Q ${-e*.45},-15 0,-18 Z`,fill:l,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 1,-14 Q ${e*.45},-12 ${e*.7},-11 Q ${e*.35},-9 0,-10 Z`,fill:s,opacity:o?.4:.3}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-15`,x2:e*.6,y2:`-12`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`path`,{d:`M 0,-25 - Q ${e*.35},-22 ${e*.55},-18 - Q ${e*.3},-16 0, -17 - Q ${-e*.3},-16 ${-e*.55},-18 - Q ${-e*.35},-22 0,-25 Z`,fill:l,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-${t} L ${e*.35},-${t-9} Q 0,-${t-8} -${e*.35},-${t-9} Z`,fill:l,stroke:s,strokeWidth:`1.1`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-${t} L ${e*.35},-${t-9} Q 0,-${t-8} 0,-${t-9} Z`,fill:s,opacity:o?.4:.35}),(0,Y.jsx)(`path`,{d:`M -5,1 L -3,3 M 3,2 L 5,0 M -1,3 L 0,1`,stroke:s,strokeWidth:`0.8`,strokeLinecap:`round`})]})}case`ancient_oak`:case`oak`:{let e=a===`ancient_oak`,t=e?22:18,l=e?24:20;return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`2`,cy:`2`,rx:t*.8,ry:`4`,fill:s,opacity:o?.3:.22}),(0,Y.jsx)(`path`,{d:`M -4,2 Q -3,-4 -2,-8 Q -6,-12 -8,-14 M 4,2 Q 3,-4 2,-8 Q 6,-12 9,-13 M -1,-8 L 0,-15`,fill:`none`,stroke:s,strokeWidth:`1.8`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -3.5,2 L -1.5,-8 L 1.5,-8 L 3.5,2 Z`,fill:d,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`-0.8`,y1:`0`,x2:`-0.8`,y2:`-6`,stroke:c,strokeWidth:`0.75`}),(0,Y.jsx)(`line`,{x1:`0.8`,y1:`1`,x2:`0.8`,y2:`-5`,stroke:c,strokeWidth:`0.75`}),(0,Y.jsx)(`ellipse`,{cx:`6`,cy:`-14`,rx:t*.45,ry:l*.4,fill:s,opacity:.25}),(0,Y.jsx)(`ellipse`,{cx:`2`,cy:`-8`,rx:t*.55,ry:l*.35,fill:s,opacity:.25}),(0,Y.jsx)(`path`,{d:`M -${t*.85},-10 - C -${t*1.05},-16 -${t*.8},-23 -${t*.45},-24 - C -${t*.25},-30 ${t*.35},-31 ${t*.65},-25 - C ${t*1.05},-24 ${t*1.15},-16 ${t*.9},-10 - C ${t*1.05},-4 ${t*.65},0 0,-1 - C -${t*.55},0 -${t*.95},-4 -${t*.85},-10 Z`,fill:u,stroke:s,strokeWidth:`1.35`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -${t*.5},-18 Q -${t*.2},-24 ${t*.2},-22 Q ${t*.45},-18 ${t*.3},-14`,fill:`none`,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`path`,{d:`M 1,-12 Q ${t*.5},-15 ${t*.8},-9 Q ${t*.45},-4 1,-6`,fill:s,opacity:o?.35:.28}),(0,Y.jsx)(`path`,{d:`M -${t*.65},-10 Q -${t*.3},-13 -${t*.1},-8`,fill:`none`,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:t*.15,y1:`-17`,x2:t*.55,y2:`-14`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:t*.25,y1:`-12`,x2:t*.7,y2:`-9`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:t*.1,y1:`-7`,x2:t*.55,y2:`-4`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`path`,{d:`M -6,1 L -3,2 M 3,2 L 6,1 M -2,3 L -1,1 M 2,3 L 1,1`,stroke:s,strokeWidth:`0.9`,strokeLinecap:`round`})]})}case`willow`:return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:14.4,ry:`3.5`,fill:s,opacity:o?.28:.2}),(0,Y.jsx)(`path`,{d:`M -3,2 Q -1,-4 -2,-9 Q -5,-14 -7,-17 M 3,2 Q 2,-4 3,-9 Q 5,-14 8,-16`,fill:`none`,stroke:s,strokeWidth:`1.6`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -2.5,2 L -1.5,-9 L 2,-9 L 2.5,2 Z`,fill:d,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`path`,{d:`M -${18*.85},-12 - C -${18*.95},-20 -9,-27 0,-26 - C 9,-27 ${18*.95},-20 ${18*.85},-12 - C ${18*.6},-7 0,-8 -${18*.85},-12 Z`,fill:f,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -13.5,-12 Q -${18*.85},-4 -12.6,0 M -9.9,-14 Q -${18*.65},-3 -8.1,1 M -6.3,-15 Q -8.1,-1 -4.5,2`,fill:`none`,stroke:s,strokeWidth:`1.1`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -${18*.15},-16 Q -${18*.15},-2 0,1 M 1.8,-16 Q ${18*.15},-3 3.6,0`,fill:`none`,stroke:s,strokeWidth:`1.1`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 6.3,-15 Q 9,-2 7.2,2 M ${18*.6},-14 Q 13.5,-2 ${18*.65},1 M ${18*.78},-12 Q 16.2,-3 14.4,0`,fill:`none`,stroke:s,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 1,-23 Q ${18*.6},-20 13.5,-12 Q 7.2,-10 0,-14 Z`,fill:s,opacity:o?.35:.25}),(0,Y.jsx)(`path`,{d:`M -7,2 Q -5,-2 -4,0 M -5,2 Q -3,-3 -2,0 M 4,2 Q 6,-2 7,0 M 6,2 Q 8,-1 9,1`,stroke:s,strokeWidth:`0.8`,fill:`none`})]});default:return(0,Y.jsxs)(`g`,{transform:`translate(${n}, ${r}) scale(${i})`,children:[(0,Y.jsx)(`ellipse`,{cx:`1`,cy:`2`,rx:12*.6,ry:`3`,fill:s,opacity:.25}),(0,Y.jsx)(`path`,{d:`M -1.2,2 L -0.6,-16 L 0.6,-16 L 1.2,2 Z`,fill:d,stroke:s,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`-1`,y1:`-4`,x2:`0`,y2:`-4`,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`-8`,x2:`1`,y2:`-8`,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`line`,{x1:`-0.8`,y1:`-12`,x2:`0.2`,y2:`-12`,stroke:s,strokeWidth:`0.9`}),(0,Y.jsx)(`path`,{d:`M 0,-26 - C ${12*.7},-22 ${12*.8},-10.4 5.4,-5.2 - C 0,-3.9 -5.4,-5.2 -${12*.8},-10.4 - C -${12*.8},-10.4 -${12*.7},-22 0,-26 Z`,fill:p,stroke:s,strokeWidth:`1.2`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M 0,-26 C ${12*.7},-22 ${12*.8},-10.4 5.4,-5.2 C 0,-3.9 0,-10.4 0,-26 Z`,fill:s,opacity:o?.35:.25}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-16`,x2:12*.55,y2:`-13`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`1`,y1:`-10`,x2:6,y2:`-7`,stroke:c,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`-3`,y1:`2`,x2:`-1`,y2:`0`,stroke:s,strokeWidth:`0.8`}),(0,Y.jsx)(`line`,{x1:`2`,y1:`2`,x2:`4`,y2:`0`,stroke:s,strokeWidth:`0.8`})]})}})()})},fe=({river:e,theme:t,showLabels:n})=>{let r=t.id!==`parchment`,i=t.pencilColor,a=t.riverColor,o=(0,L.useMemo)(()=>e.id===`river-elden`?{riverPoly:`M 1340,290 - C 1318,375 1272,455 1222,535 - C 1152,635 1032,695 972,815 - C 910,935 942,1055 892,1175 - C 850,1275 770,1355 695,1480 - L 670,1480 - C 745,1355 825,1275 865,1175 - C 915,1055 885,935 945,815 - C 1005,695 1125,635 1195,535 - C 1245,455 1295,375 1335,290 - Z`,leftBank:`M 1335,290 C 1295,375 1245,455 1195,535 C 1125,635 1005,695 945,815 C 885,935 915,1055 865,1175 C 825,1275 745,1355 670,1480`,rightBank:`M 1345,290 C 1320,375 1275,455 1225,535 C 1155,635 1035,695 975,815 C 915,935 945,1055 895,1175 C 855,1275 775,1355 700,1480`,labelPos:{x:1040,y:980,rot:-55},islands:[{cx:960,cy:960,rx:14,ry:7,angle:-45,name:`Elden Ait`},{cx:770,cy:1330,rx:18,ry:8,angle:-50,name:`Otter Shoal`}],waterfall:{x:1215,y:540,width:32,height:24,angle:-38,name:`The Elden Cascades`},rapids:[{x:1140,y:660,angle:-40},{x:920,y:1020,angle:60}],sandbars:[{cx:995,cy:750,rx:12,ry:5,angle:30},{cx:900,cy:1110,rx:14,ry:6,angle:-25}],bridges:e.hasBridges||[{x:945,y:855,angle:-35,type:`stone_arch`,name:`Highbridge`},{x:890,y:1160,angle:25,type:`timber_trestle`,name:`Lower Toll Bridge`}]}:e.id===`river-silver`?{riverPoly:`M 580,410 - C 650,488 730,548 780,658 - C 830,758 910,808 960,818 - L 960,824 - C 908,814 828,764 778,664 - C 728,554 648,494 578,414 - Z`,leftBank:`M 578,412 C 648,492 728,552 778,662 C 828,762 908,812 958,822`,rightBank:`M 582,408 C 652,488 732,548 782,658 C 832,758 912,808 962,818`,labelPos:{x:740,y:710,rot:35},islands:[{cx:710,cy:535,rx:10,ry:5,angle:35,name:`Willow Islet`}],waterfall:{x:620,y:450,width:22,height:18,angle:45,name:`Silver Falls`},rapids:[{x:810,y:710,angle:50}],sandbars:[{cx:755,cy:610,rx:9,ry:4,angle:40}],bridges:e.hasBridges||[{x:740,y:620,angle:45,type:`stone_arch`,name:`Silver Arch`}]}:{riverPoly:`M 2150,320 - C 2100,450 2050,600 2020,760 - C 1990,920 1920,1050 1840,1180 - C 1760,1310 1710,1420 1660,1500 - L 1640,1500 - C 1690,1420 1740,1310 1820,1180 - C 1900,1050 1970,920 2000,760 - C 2030,600 2080,450 2130,320 - Z`,leftBank:`M 2130,320 C 2080,450 2030,600 2000,760 C 1970,920 1900,1050 1820,1180 C 1740,1310 1690,1420 1640,1500`,rightBank:`M 2150,320 C 2100,450 2050,600 2020,760 C 1990,920 1920,1050 1840,1180 C 1760,1310 1710,1420 1660,1500`,labelPos:{x:1920,y:1080,rot:-65},islands:[{cx:1890,cy:1100,rx:12,ry:6,angle:-60,name:`Crag Islet`}],waterfall:{x:2070,y:520,width:28,height:22,angle:-30,name:`The Great Cataract`},rapids:[{x:1980,y:880,angle:-65}],sandbars:[{cx:1950,cy:980,rx:11,ry:5,angle:-55}],bridges:e.hasBridges||[{x:2010,y:810,angle:-20,type:`stone_arch`,name:`Highland Span`}]},[e.id,e.hasBridges]),s=a,c=r?`#3d3425`:`#e6dcbf`,l=r?`#263422`:`#d2d8ba`;return(0,Y.jsxs)(`g`,{id:`realistic-${e.id}`,className:`realistic-river-group select-none`,children:[(0,Y.jsx)(`path`,{d:o.riverPoly,fill:s,opacity:.88}),(0,Y.jsx)(`path`,{d:o.leftBank,fill:`none`,stroke:i,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:o.rightBank,fill:`none`,stroke:i,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:o.leftBank,fill:`none`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.8`,strokeDasharray:`14 18 8 22`,opacity:.65,transform:`translate(-2, -1)`}),(0,Y.jsx)(`path`,{d:o.rightBank,fill:`none`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.8`,strokeDasharray:`16 20 10 24`,opacity:.65,transform:`translate(2, 1)`}),(0,Y.jsx)(`path`,{d:e.d,fill:`none`,stroke:r?`#5a4632`:`#7d6952`,strokeWidth:`1.2`,strokeDasharray:`24 32 14 36`,strokeLinecap:`round`,opacity:.7}),(0,Y.jsx)(`path`,{d:e.d,fill:`none`,stroke:r?`#e8dcbe`:`#ffffff`,strokeWidth:`0.8`,strokeDasharray:`10 40 18 35`,strokeLinecap:`round`,opacity:.6,transform:`translate(1.5, -1)`}),o.sandbars.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.cx}, ${e.cy}) rotate(${e.angle})`,children:[(0,Y.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:c,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`circle`,{cx:`-3`,cy:`-1`,r:`0.6`,fill:i}),(0,Y.jsx)(`circle`,{cx:`2`,cy:`1`,r:`0.7`,fill:i}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`0.5`,fill:i})]},t)),o.rapids.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,Y.jsx)(`path`,{d:`M -12,-6 Q -6,-8 0,-6 Q 6,-4 12,-6 M -10,0 Q -4,-2 2,0 Q 8,2 10,0 M -8,6 Q -2,4 4,6`,fill:`none`,stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`1.4`,strokeLinecap:`round`,opacity:.9}),(0,Y.jsx)(`circle`,{cx:`-5`,cy:`-2`,r:`1.8`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`circle`,{cx:`6`,cy:`3`,r:`1.5`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`0.8`})]},t)),o.islands.map((e,a)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.cx}, ${e.cy}) rotate(${e.angle})`,children:[(0,Y.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:l,stroke:i,strokeWidth:`1.4`}),(0,Y.jsx)(`path`,{d:`M -${e.rx},0 Q -${e.rx+8},-2 -${e.rx+14},0 Q -${e.rx+8},2 -${e.rx},0`,fill:c,stroke:i,strokeWidth:`0.9`}),(0,Y.jsx)(`g`,{transform:`scale(${e.rx>15?.6:.45})`,children:(0,Y.jsx)(de,{tree:{x:0,y:-1,scale:.65,type:`willow`,seed:a*99+42},theme:t})}),n&&e.name&&e.rx>13&&(0,Y.jsx)(`text`,{x:`0`,y:e.ry+10,textAnchor:`middle`,fill:r?`#d4bfa1`:`#57422f`,className:`font-garamond italic text-[10px] font-semibold select-none`,children:e.name})]},a)),o.waterfall&&(0,Y.jsxs)(`g`,{id:`waterfall-${e.id}`,transform:`translate(${o.waterfall.x}, ${o.waterfall.y}) rotate(${o.waterfall.angle})`,children:[(0,Y.jsx)(`rect`,{x:-o.waterfall.width/2,y:`-4`,width:o.waterfall.width,height:`6`,rx:`2`,fill:r?`#2e251b`:`#6b5742`,stroke:i,strokeWidth:`1.4`}),(0,Y.jsxs)(`g`,{stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`1.2`,opacity:.95,children:[(0,Y.jsx)(`line`,{x1:-o.waterfall.width*.4,y1:`2`,x2:-o.waterfall.width*.4,y2:o.waterfall.height}),(0,Y.jsx)(`line`,{x1:-o.waterfall.width*.2,y1:`2`,x2:-o.waterfall.width*.2,y2:o.waterfall.height+2,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`2`,x2:`0`,y2:o.waterfall.height+3,strokeWidth:`1.6`}),(0,Y.jsx)(`line`,{x1:o.waterfall.width*.2,y1:`2`,x2:o.waterfall.width*.2,y2:o.waterfall.height+2,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:o.waterfall.width*.4,y1:`2`,x2:o.waterfall.width*.4,y2:o.waterfall.height})]}),(0,Y.jsx)(`ellipse`,{cx:`0`,cy:o.waterfall.height+4,rx:o.waterfall.width*.65,ry:`6`,fill:`none`,stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`1.2`,strokeDasharray:`4 3 6 2`,opacity:.9}),n&&o.waterfall.name&&(0,Y.jsxs)(`text`,{x:`0`,y:-10,textAnchor:`middle`,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel text-[11px] font-bold tracking-wider select-none drop-shadow-sm`,children:[`❖ `,o.waterfall.name,` ❖`]})]}),o.bridges.map((t,a)=>(0,Y.jsxs)(`g`,{id:`bridge-${e.id}-${a}`,transform:`translate(${t.x}, ${t.y}) rotate(${t.angle})`,children:[(0,Y.jsx)(`rect`,{x:`-24`,y:`-10`,width:`8`,height:`20`,rx:`1`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1.2`}),(0,Y.jsx)(`rect`,{x:`16`,y:`-10`,width:`8`,height:`20`,rx:`1`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1.2`}),(0,Y.jsx)(`rect`,{x:`-20`,y:`-8`,width:`40`,height:`16`,rx:`2`,fill:r?`#3d3126`:`#d8c7a8`,stroke:i,strokeWidth:`1.8`}),(0,Y.jsx)(`line`,{x1:`-20`,y1:`-8`,x2:`20`,y2:`-8`,stroke:i,strokeWidth:`1.4`}),(0,Y.jsx)(`line`,{x1:`-20`,y1:`8`,x2:`20`,y2:`8`,stroke:i,strokeWidth:`1.4`}),(0,Y.jsx)(`line`,{x1:`-12`,y1:`-8`,x2:`-12`,y2:`8`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`-6`,y1:`-8`,x2:`-6`,y2:`8`,stroke:i,strokeWidth:`1.1`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`-8`,x2:`0`,y2:`8`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`6`,y1:`-8`,x2:`6`,y2:`8`,stroke:i,strokeWidth:`1.1`}),(0,Y.jsx)(`line`,{x1:`12`,y1:`-8`,x2:`12`,y2:`8`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`path`,{d:`M 0,-8 L -4,-13 L 4,-13 Z`,fill:r?`#2e251b`:`#9c876b`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`path`,{d:`M -6,-14 Q 0,-18 6,-14`,fill:`none`,stroke:r?`#f4eedd`:`#ffffff`,strokeWidth:`0.8`,opacity:.8}),n&&t.name&&(0,Y.jsx)(`text`,{x:`0`,y:`18`,textAnchor:`middle`,fill:r?`#d4bfa1`:`#4a3726`,className:`font-garamond italic text-[10px] font-semibold select-none`,children:t.name})]},a)),n&&(0,Y.jsxs)(`text`,{x:o.labelPos.x,y:o.labelPos.y,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel italic text-[15px] font-bold tracking-widest select-none drop-shadow-sm`,opacity:.9,transform:`rotate(${o.labelPos.rot} ${o.labelPos.x} ${o.labelPos.y})`,children:[`~ `,e.name,` ~`]})]})},pe=({forest:e,theme:t,showLabels:n})=>{let r=t.id!==`parchment`,i=t.pencilColor,a=t.pencilShade,{id:o,name:s,cx:c,cy:l,rx:u,ry:d,trees:f}=e,p=(0,L.useMemo)(()=>[...f].sort((e,t)=>e.y-t.y),[f]),m=(0,L.useMemo)(()=>{let e=[],t=[],n=[],r=c*13+l*19;for(let i=0;i<6;i++){let a=(i*1.8+r*.1)%(Math.PI*2),o=c+u*.7*Math.cos(a),s=l+d*.7*Math.sin(a);i%2==0?e.push({x:Math.round(o),y:Math.round(s),rx:5+i%3*2,ry:3+i%2*1.5,angle:i*35%60-30}):t.push({x:Math.round(o),y:Math.round(s),length:12+i%4*3,angle:i*45%90-45}),n.push({x:Math.round(c+Math.cos(a+.5)*(u*.5)),y:Math.round(l+Math.sin(a+.5)*(d*.5))})}return{boulders:e,fallenLogs:t,fernClusters:n}},[c,l,u,d]),h=(0,L.useMemo)(()=>{let e=[];for(let t=0;t<16;t++){let n=t/16*Math.PI*2,r=1+Math.sin(n*4+c*.05)*.08+Math.cos(n*3+l*.05)*.06,i=c+u*r*Math.cos(n),a=l+d*r*Math.sin(n);e.push({x:Math.round(i),y:Math.round(a)})}return e.map((e,t)=>t===0?`M ${e.x},${e.y}`:`L ${e.x},${e.y}`).join(` `)+` Z`},[c,l,u,d]);return(0,Y.jsxs)(`g`,{id:`forest-zone-${o}`,className:`realistic-forest-group select-none`,children:[(0,Y.jsx)(`path`,{d:h,fill:r?`rgba(32, 42, 26, 0.35)`:`rgba(195, 208, 175, 0.22)`,stroke:a,strokeWidth:`0.85`,strokeDasharray:`5 7 2 7`,opacity:.8}),(0,Y.jsx)(`g`,{id:`boulders-${o}`,stroke:i,strokeWidth:`1`,children:m.boulders.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,Y.jsx)(`ellipse`,{cx:`0`,cy:`0`,rx:e.rx,ry:e.ry,fill:r?`#2b241c`:`#c4b69c`}),(0,Y.jsx)(`path`,{d:`M 0,-${e.ry} Q ${e.rx*.6},0 0,${e.ry} Q ${e.rx*.2},0 0,-${e.ry}`,fill:i,opacity:.3})]},t))}),(0,Y.jsx)(`g`,{id:`logs-${o}`,stroke:i,strokeWidth:`1.2`,children:m.fallenLogs.map((e,t)=>(0,Y.jsxs)(`g`,{transform:`translate(${e.x}, ${e.y}) rotate(${e.angle})`,children:[(0,Y.jsx)(`line`,{x1:-e.length/2,y1:`0`,x2:e.length/2,y2:`0`,strokeLinecap:`round`,strokeWidth:`2.2`}),(0,Y.jsx)(`circle`,{cx:-e.length/2,cy:`0`,r:`1.2`,fill:i}),(0,Y.jsx)(`circle`,{cx:`2`,cy:`-1.5`,r:`0.8`,fill:r?`#d4bfa1`:`#f0e6d2`})]},t))}),(0,Y.jsx)(`g`,{id:`ferns-${o}`,stroke:a,strokeWidth:`0.8`,fill:`none`,children:m.fernClusters.map((e,t)=>(0,Y.jsx)(`g`,{transform:`translate(${e.x}, ${e.y})`,children:(0,Y.jsx)(`path`,{d:`M 0,0 Q -4,-5 -7,-4 M 0,0 Q -2,-7 -2,-10 M 0,0 Q 3,-6 6,-4`})},t))}),(0,Y.jsx)(`g`,{id:`trees-${o}`,children:p.map((e,n)=>(0,Y.jsx)(de,{tree:e,theme:t},n))}),n&&s&&(0,Y.jsxs)(`g`,{transform:`translate(${c}, ${l-d-12})`,children:[(0,Y.jsx)(`rect`,{x:`-90`,y:`-14`,width:`180`,height:`18`,rx:`3`,fill:r?`#1a1510`:`#f2e8d3`,stroke:a,strokeWidth:`0.75`,opacity:.85}),(0,Y.jsxs)(`text`,{x:`0`,y:`0`,textAnchor:`middle`,fill:r?`#d8c2a3`:`#453525`,className:`font-garamond italic font-bold text-[13px] tracking-widest select-none drop-shadow-sm`,children:[`❖ `,s,` ❖`]})]})]})},me=({theme:e,showLabels:t,finalNode:n})=>{let r=e.id!==`parchment`,i=e.pencilColor,a=e.pencilShade,o=e.riverColor,s=(0,L.useMemo)(()=>[...H].sort((e,t)=>{let n=e.layer??1,r=t.layer??1;return n===r?e.y-t.y:n-r}),[]);return(0,Y.jsxs)(`g`,{id:`terrain-layer`,className:`select-none pointer-events-none`,children:[(0,Y.jsxs)(`g`,{id:`rhumb-lines`,opacity:r?.08:.12,stroke:i,strokeWidth:`0.8`,strokeDasharray:`6 8`,children:[(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`2600`,y2:`1500`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`1500`,x2:`2600`,y2:`0`}),(0,Y.jsx)(`line`,{x1:`1300`,y1:`0`,x2:`1300`,y2:`1500`}),(0,Y.jsx)(`line`,{x1:`0`,y1:`750`,x2:`2600`,y2:`750`}),(0,Y.jsx)(`circle`,{cx:`500`,cy:`400`,r:`300`,fill:`none`,strokeWidth:`0.5`}),(0,Y.jsx)(`circle`,{cx:`2100`,cy:`1100`,r:`350`,fill:`none`,strokeWidth:`0.5`}),(0,Y.jsx)(`circle`,{cx:`1300`,cy:`750`,r:`450`,fill:`none`,strokeWidth:`0.6`,strokeDasharray:`3 6`})]}),(0,Y.jsxs)(`g`,{id:`coastlines`,stroke:i,children:[(0,Y.jsx)(`path`,{d:`M 0,1180 Q 140,1220 200,1320 T 320,1500`,fill:`none`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 0,1200 Q 150,1240 215,1340 T 340,1500`,fill:`none`,strokeWidth:`1.2`,strokeDasharray:`12 8 4 8`,opacity:.65}),(0,Y.jsx)(`path`,{d:`M 0,1225 Q 160,1265 230,1365 T 365,1500`,fill:`none`,strokeWidth:`0.8`,strokeDasharray:`6 10`,opacity:.4}),(0,Y.jsxs)(`g`,{id:`islands`,strokeWidth:`1.5`,children:[(0,Y.jsx)(`path`,{d:`M 80,1390 Q 110,1370 140,1395 Q 120,1420 80,1390 Z`,fill:r?`#231d17`:`#e6d8be`}),(0,Y.jsx)(`path`,{d:`M 160,1440 Q 185,1425 210,1445 Q 190,1465 160,1440 Z`,fill:r?`#231d17`:`#e6d8be`}),(0,Y.jsx)(`line`,{x1:`105`,y1:`1385`,x2:`110`,y2:`1375`,strokeWidth:`1`}),(0,Y.jsx)(`line`,{x1:`115`,y1:`1388`,x2:`122`,y2:`1378`,strokeWidth:`1`})]})]}),(0,Y.jsx)(`g`,{id:`rivers-layer`,children:U.map(n=>(0,Y.jsx)(fe,{river:n,theme:e,showLabels:t},n.id))}),(0,Y.jsx)(`g`,{id:`forests-layer`,children:W.map(n=>(0,Y.jsx)(pe,{forest:n,theme:e,showLabels:t},n.id))}),(0,Y.jsxs)(`g`,{id:`mountains-layer`,children:[(0,Y.jsxs)(`g`,{id:`distant-mountain-ridgelines`,opacity:r?.35:.45,stroke:a,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 330,330 Q 380,290 440,310 T 540,280 T 650,300 T 760,330`,strokeWidth:`1.2`,strokeDasharray:`4 4`}),(0,Y.jsx)(`path`,{d:`M 1080,270 Q 1190,210 1310,195 T 1450,220 T 1580,245 T 1720,290`,strokeWidth:`1.4`,strokeDasharray:`5 4`}),(0,Y.jsx)(`path`,{d:`M 1940,320 Q 2060,240 2200,180 T 2350,150 T 2480,230`,strokeWidth:`1.4`,strokeDasharray:`5 4`})]}),(0,Y.jsxs)(`g`,{id:`alpine-tarns`,children:[(0,Y.jsxs)(`g`,{id:`tarn-dragons-eye`,children:[(0,Y.jsx)(`ellipse`,{cx:`1350`,cy:`365`,rx:`22`,ry:`12`,fill:o,stroke:i,strokeWidth:`1.4`,opacity:.9}),(0,Y.jsx)(`path`,{d:`M 1335,363 Q 1350,361 1365,363 M 1340,367 Q 1350,369 1360,367`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.8`,fill:`none`,opacity:.7}),(0,Y.jsx)(`path`,{d:`M 1350,377 Q 1345,395 1335,410 T 1320,430`,fill:`none`,stroke:o,strokeWidth:`2`,strokeDasharray:`3 2`,opacity:.8}),t&&(0,Y.jsx)(`text`,{x:`1350`,y:`350`,textAnchor:`middle`,fill:r?`#c5b597`:`#57422f`,className:`font-garamond italic text-[11px] font-semibold select-none`,children:`Dragon's Eye Tarn`})]}),(0,Y.jsxs)(`g`,{id:`tarn-sunstone`,children:[(0,Y.jsx)(`ellipse`,{cx:`2210`,cy:`275`,rx:`18`,ry:`10`,fill:o,stroke:i,strokeWidth:`1.3`,opacity:.9}),(0,Y.jsx)(`path`,{d:`M 2198,274 Q 2210,272 2222,274`,stroke:r?`#e0d2bd`:`#ffffff`,strokeWidth:`0.75`,fill:`none`,opacity:.7})]}),(0,Y.jsx)(`g`,{id:`tarn-mistwood`,children:(0,Y.jsx)(`ellipse`,{cx:`585`,cy:`395`,rx:`16`,ry:`9`,fill:o,stroke:i,strokeWidth:`1.2`,opacity:.9})})]}),s.map(t=>(0,Y.jsx)(ue,{mountain:t,theme:e},t.id)),t&&(0,Y.jsxs)(`g`,{id:`mountain-range-banners`,className:`select-none pointer-events-none`,children:[(0,Y.jsx)(`text`,{x:`1380`,y:`180`,textAnchor:`middle`,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel-dec font-bold text-[18px] tracking-widest drop-shadow-sm`,opacity:.9,children:`❖ THE DRAGON TOOTH MOUNTAINS ❖`}),(0,Y.jsx)(`text`,{x:`530`,y:`255`,textAnchor:`middle`,fill:r?`#d0b996`:`#523c28`,className:`font-cinzel font-bold text-[14px] tracking-widest`,opacity:.85,children:`~ THE WESTERN CRAGS ~`}),(0,Y.jsx)(`text`,{x:`2260`,y:`135`,textAnchor:`middle`,fill:r?`#e4caa0`:`#4a3420`,className:`font-cinzel-dec font-bold text-[16px] tracking-widest drop-shadow-sm`,opacity:.9,children:`❖ SUNSTONE CITADEL PEAKS ❖`})]})]}),(0,Y.jsxs)(`g`,{id:`sea-monsters`,opacity:r?.7:.85,children:[(0,Y.jsxs)(`g`,{transform:`translate(140, 1260) scale(0.85)`,stroke:i,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 10,20 Q 30,-15 50,20 Q 70,-20 90,20 Q 110,-10 125,20`,strokeWidth:`2.2`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M 10,20 Q -5,10 0,-5 Q 10,-15 18,-5 Q 12,5 10,20 Z`,strokeWidth:`2`,fill:r?`#231e18`:`#e0d3b6`}),(0,Y.jsx)(`circle`,{cx:`6`,cy:`-6`,r:`1.5`,fill:i}),(0,Y.jsx)(`path`,{d:`M -2,-4 L -10,-7 L -7,-3`,strokeWidth:`1.2`,strokeLinecap:`round`}),(0,Y.jsx)(`line`,{x1:`30`,y1:`-8`,x2:`33`,y2:`-18`,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`70`,y1:`-12`,x2:`73`,y2:`-22`,strokeWidth:`1.5`}),(0,Y.jsx)(`line`,{x1:`108`,y1:`-4`,x2:`111`,y2:`-14`,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M -15,22 Q 30,28 70,22 Q 110,28 145,22`,strokeWidth:`1.2`,strokeDasharray:`4 6`}),t&&(0,Y.jsx)(`text`,{x:`70`,y:`44`,textAnchor:`middle`,fill:r?`#a89476`:`#6b543b`,className:`font-garamond italic text-[12px]`,children:`"Hic Sunt Dracones"`})]}),(0,Y.jsxs)(`g`,{transform:`translate(360, 1420) scale(0.65)`,stroke:i,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M -30,10 Q 0,16 35,10 Q 40,0 30,-5 L -35,-5 Q -40,0 -30,10 Z`,strokeWidth:`1.8`,fill:r?`#2a221b`:`#ded1b4`}),(0,Y.jsx)(`line`,{x1:`-15`,y1:`-5`,x2:`-15`,y2:`-45`,strokeWidth:`1.8`}),(0,Y.jsx)(`line`,{x1:`10`,y1:`-5`,x2:`10`,y2:`-52`,strokeWidth:`1.8`}),(0,Y.jsx)(`line`,{x1:`28`,y1:`-5`,x2:`28`,y2:`-36`,strokeWidth:`1.4`}),(0,Y.jsx)(`path`,{d:`M -28,-38 Q -15,-44 -2,-38 Q -15,-26 -28,-38 Z`,strokeWidth:`1.3`,fill:r?`#3d3429`:`#f0e6ce`}),(0,Y.jsx)(`path`,{d:`M -4,-44 Q 10,-50 24,-44 Q 10,-32 -4,-44 Z`,strokeWidth:`1.3`,fill:r?`#3d3429`:`#f0e6ce`}),(0,Y.jsx)(`path`,{d:`M -4,-28 Q 10,-34 24,-28 Q 10,-18 -4,-28 Z`,strokeWidth:`1.3`,fill:r?`#3d3429`:`#f0e6ce`}),(0,Y.jsx)(`line`,{x1:`-15`,y1:`-45`,x2:`-35`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,Y.jsx)(`line`,{x1:`10`,y1:`-52`,x2:`-20`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,Y.jsx)(`line`,{x1:`10`,y1:`-52`,x2:`35`,y2:`-5`,strokeWidth:`0.8`,strokeDasharray:`3 3`}),(0,Y.jsx)(`line`,{x1:`-48`,y1:`12`,x2:`-20`,y2:`12`,strokeWidth:`1`,strokeDasharray:`3 5`})]})]}),(0,Y.jsxs)(`g`,{transform:`translate(2360, 1180)`,id:`compass-rose`,children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`75`,fill:r?`rgba(30,25,20,0.85)`:`rgba(245,236,215,0.85)`,stroke:i,strokeWidth:`2`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`66`,fill:`none`,stroke:i,strokeWidth:`1`,strokeDasharray:`2 4`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`48`,fill:`none`,stroke:i,strokeWidth:`1.2`}),(0,Y.jsx)(`polygon`,{points:`0,-72 6,-20 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`0,-72 -6,-20 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`0,72 -6,20 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`0,72 6,20 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`72,0 20,6 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`72,0 20,-6 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`-72,0 -20,-6 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`-72,0 -20,6 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`1`}),(0,Y.jsx)(`polygon`,{points:`45,-45 14,-5 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`45,-45 5,-14 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`polygon`,{points:`-45,-45 -5,-14 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`-45,-45 -14,-5 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`polygon`,{points:`45,45 5,14 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`45,45 14,5 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`polygon`,{points:`-45,45 -14,5 0,0`,fill:i}),(0,Y.jsx)(`polygon`,{points:`-45,45 -5,14 0,0`,fill:r?`#4a3f33`:`#cebe9f`,stroke:i,strokeWidth:`0.8`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`7`,fill:r?`#d4af37`:`#99732d`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`text`,{x:`0`,y:`-80`,textAnchor:`middle`,fill:r?`#f4d27a`:`#852e18`,className:`font-cinzel-dec font-bold text-[18px]`,children:`N`}),(0,Y.jsx)(`text`,{x:`0`,y:`94`,textAnchor:`middle`,fill:r?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`S`}),(0,Y.jsx)(`text`,{x:`88`,y:`5`,textAnchor:`middle`,fill:r?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`E`}),(0,Y.jsx)(`text`,{x:`-88`,y:`5`,textAnchor:`middle`,fill:r?`#d4caa9`:`#3d2e1e`,className:`font-cinzel font-bold text-[14px]`,children:`W`})]}),(0,Y.jsxs)(`g`,{transform:`translate(820, 120)`,id:`map-cartouche`,children:[(0,Y.jsx)(`rect`,{x:`-220`,y:`-45`,width:`440`,height:`85`,rx:`6`,fill:r?`#231e17`:`#f5ebd3`,stroke:i,strokeWidth:`2.5`}),(0,Y.jsx)(`rect`,{x:`-214`,y:`-39`,width:`428`,height:`73`,rx:`4`,fill:`none`,stroke:i,strokeWidth:`1`,strokeDasharray:`4 2`}),(0,Y.jsx)(`path`,{d:`M -210,-30 Q -195,-30 -195,-15 M 210,-30 Q 195,-30 195,-15`,stroke:i,strokeWidth:`1.2`,fill:`none`}),(0,Y.jsx)(`path`,{d:`M -210,25 Q -195,25 -195,10 M 210,25 Q 195,25 195,10`,stroke:i,strokeWidth:`1.2`,fill:`none`}),(0,Y.jsx)(`text`,{x:`0`,y:`-12`,textAnchor:`middle`,fill:r?`#f4d27a`:`#5a2211`,className:`font-cinzel-dec font-bold text-[22px] tracking-widest`,children:`THE EXPEDITION TRAIL`}),(0,Y.jsx)(`text`,{x:`0`,y:`15`,textAnchor:`middle`,fill:r?`#d2c2a5`:`#5c4530`,className:`font-garamond italic font-semibold text-[14px] tracking-wide`,children:`Path to the tower.`})]}),n&&(0,Y.jsxs)(`g`,{id:`huge-stone-tower`,transform:`translate(${n.x}, ${n.y})`,children:[(0,Y.jsx)(`path`,{d:`M -65,10 Q 0,25 65,10 L 55,-10 Q 0,5 -55,-10 Z`,fill:r?`#1e1a14`:`#d2c4a7`,stroke:i,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -50,-10 L -32,-190 L 32,-190 L 50,-10 Z`,fill:r?`#231e17`:`#e6d7bc`,stroke:i,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -47,-30 Q 0,-20 47,-30 M -43,-70 Q 0,-60 43,-70 M -39,-110 Q 0,-100 39,-110 M -35,-150 Q 0,-140 35,-150`,fill:`none`,stroke:a,strokeWidth:`1.5`,strokeDasharray:`12 6`,opacity:`0.8`}),(0,Y.jsxs)(`g`,{stroke:a,strokeWidth:`1.2`,opacity:`0.75`,strokeLinecap:`round`,children:[(0,Y.jsx)(`line`,{x1:`-48`,y1:`-20`,x2:`-25`,y2:`-30`}),(0,Y.jsx)(`line`,{x1:`-47`,y1:`-40`,x2:`-24`,y2:`-50`}),(0,Y.jsx)(`line`,{x1:`-45`,y1:`-60`,x2:`-22`,y2:`-70`}),(0,Y.jsx)(`line`,{x1:`-44`,y1:`-80`,x2:`-21`,y2:`-90`}),(0,Y.jsx)(`line`,{x1:`-42`,y1:`-100`,x2:`-19`,y2:`-110`}),(0,Y.jsx)(`line`,{x1:`-41`,y1:`-120`,x2:`-18`,y2:`-130`}),(0,Y.jsx)(`line`,{x1:`-39`,y1:`-140`,x2:`-16`,y2:`-150`}),(0,Y.jsx)(`line`,{x1:`-38`,y1:`-160`,x2:`-15`,y2:`-170`}),(0,Y.jsx)(`line`,{x1:`-36`,y1:`-180`,x2:`-13`,y2:`-190`})]}),(0,Y.jsx)(`path`,{d:`M -18,0 L -18,-35 C -18,-55 18,-55 18,-35 L 18,0 Z`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`2.5`}),(0,Y.jsx)(`rect`,{x:`-6`,y:`-80`,width:`12`,height:`25`,rx:`5`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`-22`,y:`-130`,width:`8`,height:`20`,rx:`3`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`14`,y:`-130`,width:`8`,height:`20`,rx:`3`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`-6`,y:`-170`,width:`12`,height:`25`,rx:`5`,fill:r?`#0f0c09`:`#33271c`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M -36,-190 L -36,-210 L -21,-210 L -21,-190 L -6,-190 L -6,-210 L 9,-210 L 9,-190 L 24,-190 L 24,-210 L 39,-210 L 39,-190 Z`,fill:r?`#1e1a14`:`#d2c4a7`,stroke:i,strokeWidth:`2.5`,strokeLinejoin:`round`}),(0,Y.jsx)(`path`,{d:`M -45,-40 L -30,-30 L -25,-45 L -10,-40 M 35,-150 L 25,-140 L 30,-120`,fill:`none`,stroke:i,strokeWidth:`1.5`}),(0,Y.jsx)(`path`,{d:`M 50,-10 Q 40,-30 45,-50 T 35,-80 T 42,-110 T 30,-130`,fill:`none`,stroke:r?`#3a4a2c`:`#5a6b42`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,Y.jsx)(`path`,{d:`M -50,-15 Q -40,-25 -45,-45 T -35,-75`,fill:`none`,stroke:r?`#3a4a2c`:`#5a6b42`,strokeWidth:`2`,strokeLinecap:`round`}),t&&(0,Y.jsx)(`text`,{x:`0`,y:`-235`,textAnchor:`middle`,fill:r?`#e0caa9`:`#3d2e1e`,className:`font-cinzel text-[16px] font-bold tracking-widest select-none drop-shadow-sm`,children:`THE ANCIENT CITADEL`})]})]})},he=({theme:e,showGrid:t})=>{let n=e.id!==`parchment`,r=e.pencilColor,i=n?`#2e261f`:`#3d2f21`;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`defs`,{children:[(0,Y.jsxs)(`filter`,{id:`goldenGlow`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`4`,result:`blur1`}),(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`10`,result:`blur2`}),(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`22`,result:`blur3`}),(0,Y.jsx)(`feColorMatrix`,{in:`blur3`,type:`matrix`,values:`\r - 1 0 0 0 1\r - 0 0.8 0 0 0.7\r - 0 0 0.2 0 0\r - 0 0 0 1.8 0`,result:`coloredBlur`}),(0,Y.jsxs)(`feMerge`,{children:[(0,Y.jsx)(`feMergeNode`,{in:`coloredBlur`}),(0,Y.jsx)(`feMergeNode`,{in:`blur2`}),(0,Y.jsx)(`feMergeNode`,{in:`blur1`}),(0,Y.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,Y.jsxs)(`filter`,{id:`nodeGlow`,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`,children:[(0,Y.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:`6`,result:`blur`}),(0,Y.jsxs)(`feMerge`,{children:[(0,Y.jsx)(`feMergeNode`,{in:`blur`}),(0,Y.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,Y.jsxs)(`linearGradient`,{id:`goldPathGradient`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,Y.jsx)(`stop`,{offset:`0%`,stopColor:`#f59e0b`,stopOpacity:`0.95`}),(0,Y.jsx)(`stop`,{offset:`50%`,stopColor:`#fbbf24`,stopOpacity:`1`}),(0,Y.jsx)(`stop`,{offset:`100%`,stopColor:`#fef08a`,stopOpacity:`1`})]}),(0,Y.jsxs)(`radialGradient`,{id:`beaconGlow`,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,Y.jsx)(`stop`,{offset:`0%`,stopColor:`#fffbeb`,stopOpacity:`1`}),(0,Y.jsx)(`stop`,{offset:`40%`,stopColor:`#f59e0b`,stopOpacity:`0.8`}),(0,Y.jsx)(`stop`,{offset:`75%`,stopColor:`#d97706`,stopOpacity:`0.3`}),(0,Y.jsx)(`stop`,{offset:`100%`,stopColor:`#b45309`,stopOpacity:`0`})]})]}),t&&(0,Y.jsxs)(`g`,{id:`grid-lines`,stroke:r,strokeWidth:`0.6`,strokeDasharray:`3 7`,opacity:n?.15:.22,children:[Array.from({length:13}).map((e,t)=>{let n=(t+1)*200;return(0,Y.jsx)(`line`,{x1:n,y1:`0`,x2:n,y2:1500},`gx-${t}`)}),Array.from({length:7}).map((e,t)=>{let n=(t+1)*200;return(0,Y.jsx)(`line`,{x1:`0`,y1:n,x2:2600,y2:n},`gy-${t}`)})]}),(0,Y.jsxs)(`g`,{id:`map-border`,pointerEvents:`none`,children:[(0,Y.jsx)(`rect`,{x:`12`,y:`12`,width:R-24,height:z-24,fill:`none`,stroke:r,strokeWidth:`6`}),(0,Y.jsx)(`rect`,{x:`20`,y:`20`,width:R-40,height:`14`,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`20`,y:z-34,width:R-40,height:`14`,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:`20`,y:`20`,width:`14`,height:z-40,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),(0,Y.jsx)(`rect`,{x:R-34,y:`20`,width:`14`,height:z-40,fill:n?`#231e17`:`#eee2ca`,stroke:r,strokeWidth:`1.5`}),Array.from({length:32}).map((e,t)=>{if(t%2==0)return null;let n=(R-40)/32;return(0,Y.jsxs)(L.Fragment,{children:[(0,Y.jsx)(`rect`,{x:20+t*n,y:`20`,width:n,height:`14`,fill:i}),(0,Y.jsx)(`rect`,{x:20+t*n,y:z-34,width:n,height:`14`,fill:i})]},`ruler-h-${t}`)}),(0,Y.jsx)(`rect`,{x:`38`,y:`38`,width:R-76,height:z-76,fill:`none`,stroke:r,strokeWidth:`2`}),(0,Y.jsxs)(`g`,{transform:`translate(38, 38)`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L 45,0 C 25,25 25,25 0,45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`20`,cy:`20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`40`,y2:`40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(${R-38}, 38)`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L -45,0 C -25,25 -25,25 0,45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`-20`,cy:`20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`-40`,y2:`40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(38, ${z-38})`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L 45,0 C 25,-25 25,-25 0,-45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`20`,cy:`-20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`40`,y2:`-40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(${R-38}, ${z-38})`,stroke:r,strokeWidth:`1.6`,fill:`none`,children:[(0,Y.jsx)(`path`,{d:`M 0,0 L -45,0 C -25,-25 -25,-25 0,-45 Z`,fill:n?`#2f271f`:`#e6d7bc`}),(0,Y.jsx)(`circle`,{cx:`-20`,cy:`-20`,r:`4`,fill:r}),(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`-40`,y2:`-40`})]}),(0,Y.jsxs)(`g`,{transform:`translate(480, 1445)`,stroke:r,children:[(0,Y.jsx)(`rect`,{x:`0`,y:`0`,width:`180`,height:`8`,fill:`none`,strokeWidth:`1.2`}),(0,Y.jsx)(`rect`,{x:`0`,y:`0`,width:`45`,height:`8`,fill:r}),(0,Y.jsx)(`rect`,{x:`90`,y:`0`,width:`45`,height:`8`,fill:r}),(0,Y.jsx)(`text`,{x:`0`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`0`}),(0,Y.jsx)(`text`,{x:`45`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`25`}),(0,Y.jsx)(`text`,{x:`90`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`50`}),(0,Y.jsx)(`text`,{x:`180`,y:`-5`,textAnchor:`middle`,fill:n?`#d4c2a5`:`#4d3926`,className:`font-garamond text-[12px] font-bold`,children:`100 Leagues`})]})]})]})},ge=({nodes:e,activeNodeIndex:t,completions:n,theme:r,showNodeNumbers:i,onNodeClick:a,hoveredNodeIndex:o,setHoveredNodeIndex:s})=>{let c=e.reduce((e,t,r)=>n.has(t.id)?Math.max(e,r):e,-1),l=Math.max(t,c),u=K(e),d=q(e,l),f=t>=0&&t0&&d&&(0,Y.jsxs)(`g`,{id:`lit-path`,children:[(0,Y.jsx)(`path`,{d,fill:`none`,stroke:`#f59e0b`,strokeWidth:`14`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.35,filter:`url(#goldenGlow)`}),(0,Y.jsx)(`path`,{d,fill:`none`,stroke:`url(#goldPathGradient)`,strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,filter:`url(#goldenGlow)`}),(0,Y.jsx)(`path`,{d,fill:`none`,stroke:`#fffbeb`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:.95})]}),(0,Y.jsx)(`g`,{id:`nodes-collection`,children:e.map((c,u)=>{let d=n.has(c.id),f=u<=l||d,p=u===t,m=o===u,h=(u+1)%25==0||u===0||u===e.length-1;return(0,Y.jsxs)(`g`,{id:`node-${c.id}`,transform:`translate(${c.x}, ${c.y})`,className:`cursor-pointer transition-transform duration-200`,onClick:e=>{e.stopPropagation(),a(u)},onMouseEnter:()=>s(u),onMouseLeave:()=>s(null),children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`18`,fill:`transparent`}),!f&&!d&&(0,Y.jsxs)(`g`,{children:[(0,Y.jsx)(`circle`,{cx:`1`,cy:`1.5`,r:h?6.5:4.5,fill:r.pencilShade,opacity:.4}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?6:4,fill:r.id===`parchment`?`#f0e5ce`:`#28221b`,stroke:r.pencilColor,strokeWidth:h?2:1.4}),h&&(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`2`,fill:r.pencilColor})]}),f&&!p&&(0,Y.jsxs)(`g`,{filter:`url(#nodeGlow)`,children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?10:7,fill:d?`#10b981`:`#f59e0b`,opacity:.4}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?7:5,fill:d?`#34d399`:`#fbbf24`,stroke:`#fffbeb`,strokeWidth:`1.6`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:h?2.5:1.8,fill:`#ffffff`})]}),p&&(0,Y.jsxs)(`g`,{id:`active-node-beacon`,children:[(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`12`,fill:`none`,stroke:`#f59e0b`,strokeWidth:`2.5`,className:`beacon-wave`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`12`,fill:`none`,stroke:`#fbbf24`,strokeWidth:`2`,className:`beacon-wave-delayed`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`20`,fill:`url(#beaconGlow)`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`9.5`,fill:d?`#10b981`:`#f59e0b`,stroke:`#ffffff`,strokeWidth:`2.4`,filter:`url(#goldenGlow)`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`4.5`,fill:`#ffffff`}),(0,Y.jsxs)(`g`,{transform:`translate(0, -18)`,children:[(0,Y.jsx)(`line`,{x1:`0`,y1:`0`,x2:`0`,y2:`10`,stroke:`#f59e0b`,strokeWidth:`2.2`}),(0,Y.jsx)(`polygon`,{points:`0,-10 7,-4 0,2 -7,-4`,fill:d?`#10b981`:`#ef4444`,stroke:`#ffffff`,strokeWidth:`1.5`,filter:`url(#nodeGlow)`}),(0,Y.jsx)(`circle`,{cx:`0`,cy:`-4`,r:`2`,fill:`#ffffff`})]})]}),m&&!p&&(0,Y.jsx)(`circle`,{cx:`0`,cy:`0`,r:`13`,fill:`none`,stroke:`#f59e0b`,strokeWidth:`2`,strokeDasharray:`3 3`}),(i||h||m)&&(0,Y.jsx)(`text`,{x:`0`,y:h?-13:-10,textAnchor:`middle`,fill:d?`#059669`:f?`#d97706`:r.pencilColor,className:`font-pencil font-bold select-none ${h?`text-[13px]`:`text-[10px]`}`,opacity:f?1:.75,children:c.id<0?`P${u+1}`:c.id})]},c.id)})}),f&&(0,Y.jsxs)(`g`,{transform:`translate(${f.x}, ${f.y-42})`,className:`pointer-events-none select-none transition-all duration-300`,children:[(0,Y.jsx)(`rect`,{x:`-80`,y:`-24`,width:`160`,height:`32`,rx:`6`,fill:r.id===`parchment`?`#2a221b`:`#14120f`,stroke:`#f59e0b`,strokeWidth:`1.8`,filter:`url(#nodeGlow)`}),(0,Y.jsx)(`polygon`,{points:`-6,8 6,8 0,14`,fill:r.id===`parchment`?`#2a221b`:`#14120f`,stroke:`#f59e0b`,strokeWidth:`1.8`}),(0,Y.jsxs)(`text`,{x:`0`,y:`-8`,textAnchor:`middle`,fill:`#fef08a`,className:`font-cinzel font-bold text-[12px] tracking-wider`,children:[`NODE `,f.sequenceIndex+1,` / `,e.length]}),(0,Y.jsx)(`text`,{x:`0`,y:`4`,textAnchor:`middle`,fill:`#ffffff`,className:`font-garamond italic font-semibold text-[11px]`,children:f.name.length>20?f.name.substring(0,18)+`…`:f.name})]})]})},_e=({nodes:e,activeNodeIndex:t,completions:n,theme:r,showLabels:i,showGrid:a,showNodeNumbers:o,autoCenterOnActive:s,onNodeClick:c,hoveredNodeIndex:l,setHoveredNodeIndex:u,transform:d,setTransform:f})=>{let p=(0,L.useRef)(null),m=(0,L.useRef)(!1),h=(0,L.useRef)({x:0,y:0}),g=(0,L.useRef)(null),_=(0,L.useRef)(null),[v,y]=(0,L.useState)(!1),b=(0,L.useRef)(d);b.current=d;let x=(0,L.useCallback)(t=>{if(!p.current||t<0||t>=e.length)return;let n=e[t],{clientWidth:r,clientHeight:i}=p.current,a=b.current.scale,o=Math.max(a,.9);f({x:r/2-n.x*o,y:i/2-n.y*o,scale:o})},[e,f]);(0,L.useEffect)(()=>{s&&t>=0&&x(t)},[t,s,x]),(0,L.useEffect)(()=>{if(p.current&&(!s||t<0)){let{clientWidth:e,clientHeight:t}=p.current,n=e/R,r=t/z,i=Math.min(n,r)*.9;f({x:(e-R*i)/2,y:(t-z*i)/2,scale:Math.max(i,.08)})}},[f,s,t]);let S=e=>{if(e.preventDefault(),!p.current)return;y(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>y(!1),140);let t=p.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=e.deltaY<0?1.15:.85,a=Math.min(Math.max(d.scale*i,.08),3.5);f({x:n-(n-d.x)/d.scale*a,y:r-(r-d.y)/d.scale*a,scale:a})},C=e=>{e.button===0&&(m.current=!0,y(!0),h.current={x:e.clientX-d.x,y:e.clientY-d.y})},w=e=>{m.current&&f(t=>({...t,x:e.clientX-h.current.x,y:e.clientY-h.current.y}))},T=()=>{m.current=!1,y(!1)},E=e=>{if(y(!0),e.touches.length===1)m.current=!0,h.current={x:e.touches[0].clientX-d.x,y:e.touches[0].clientY-d.y};else if(e.touches.length===2){m.current=!1;let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY;g.current=Math.hypot(t,n)}},D=e=>{if(e.touches.length===1&&m.current)f(t=>({...t,x:e.touches[0].clientX-h.current.x,y:e.touches[0].clientY-h.current.y}));else if(e.touches.length===2&&g.current&&p.current){let t=e.touches[0].clientX-e.touches[1].clientX,n=e.touches[0].clientY-e.touches[1].clientY,r=Math.hypot(t,n),i=r/g.current;g.current=r;let a=p.current.getBoundingClientRect(),o=(e.touches[0].clientX+e.touches[1].clientX)/2-a.left,s=(e.touches[0].clientY+e.touches[1].clientY)/2-a.top;f(e=>{let t=Math.min(Math.max(e.scale*i,.08),3.5);return{scale:t,x:o-(o-e.x)/e.scale*t,y:s-(s-e.y)/e.scale*t}})}},O=()=>{m.current=!1,g.current=null,y(!1)},k=r.id!==`parchment`;return(0,Y.jsxs)(`div`,{id:`pencil-map-container`,ref:p,className:`relative w-full h-full overflow-hidden canvas-interactive select-none ${k?`parchment-dark-bg`:`parchment-bg`}`,onWheel:S,onMouseDown:C,onMouseMove:w,onMouseUp:T,onMouseLeave:T,onTouchStart:E,onTouchMove:D,onTouchEnd:O,children:[(0,Y.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 ${k?`map-dark-vignette`:`map-vignette`}`}),(0,Y.jsxs)(`svg`,{id:`pencil-map-svg`,viewBox:`0 0 ${R} ${z}`,width:R,height:z,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${d.scale})`,transformOrigin:`0 0`,transition:v?`none`:`transform 0.4s cubic-bezier(0.16, 1, 0.3, 1)`},className:`absolute top-0 left-0`,children:[(0,Y.jsx)(he,{theme:r,showGrid:a}),(0,Y.jsx)(me,{theme:r,showLabels:i,finalNode:e[e.length-1]}),(0,Y.jsx)(ge,{nodes:e,activeNodeIndex:t,completions:n,theme:r,showNodeNumbers:o,onNodeClick:c,hoveredNodeIndex:l,setHoveredNodeIndex:u})]})]})},ve=({theme:e,soundEnabled:t,autoCenterOnActive:n,showLabels:r,showGrid:i,showNodeNumbers:c,tracks:l,activeTrack:u,onTrackChange:f,onToggleSound:p,onToggleAutoCenter:m,onToggleLabels:h,onToggleGrid:g,onToggleNodeNumbers:v,onToggleTheme:y,onZoomIn:b,onZoomOut:S,onResetZoom:E,onCenterActiveNode:D})=>{let O=e.id!==`parchment`;return(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 px-1 text-xs select-none`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[l&&l.length>0&&f&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 bg-black/30 backdrop-blur-md px-2.5 py-1.5 rounded-xl border border-black/20 shadow-md`,children:[(0,Y.jsx)(a,{className:`w-3.5 h-3.5 text-amber-500`}),(0,Y.jsx)(`span`,{className:`font-cinzel text-[10px] font-bold tracking-wider text-amber-600 dark:text-amber-400 uppercase hidden sm:inline`,children:`Track:`}),(0,Y.jsx)(`select`,{value:u,onChange:e=>f(e.target.value),className:`bg-transparent border-none text-xs font-cinzel font-bold text-amber-700 dark:text-amber-300 cursor-pointer focus:outline-none`,children:l.map(e=>(0,Y.jsx)(`option`,{value:e.id,className:`bg-stone-900 text-stone-200`,children:e.name},e.id))})]}),(0,Y.jsxs)(`button`,{id:`toggle-sound-btn`,onClick:p,title:t?`Mute Audio`:`Enable Audio`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${t?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:[t?(0,Y.jsx)(T,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(_,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Audio`})]}),(0,Y.jsxs)(`button`,{id:`toggle-autocenter-btn`,onClick:m,title:`Auto-Center on Active Node`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${n?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:[(0,Y.jsx)(w,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Auto-Track`})]}),(0,Y.jsxs)(`button`,{id:`toggle-labels-btn`,onClick:h,title:`Toggle Geographical Labels`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${r?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:[(0,Y.jsx)(s,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:`Labels`})]}),(0,Y.jsx)(`button`,{id:`toggle-grid-btn`,onClick:g,title:`Toggle Coordinate Grid`,className:`px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md font-garamond font-semibold transition-all cursor-pointer ${i?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:`Grid`}),(0,Y.jsx)(`button`,{id:`toggle-numbers-btn`,onClick:v,title:`Toggle All Node Numbers`,className:`px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md font-garamond font-semibold transition-all cursor-pointer ${c?`bg-amber-500/20 border-amber-500/50 text-amber-600 dark:text-amber-400`:`bg-black/20 border-black/10 text-stone-500`}`,children:`#s`}),(0,Y.jsxs)(`button`,{id:`toggle-theme-btn`,onClick:y,title:`Switch Map Lighting Style`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-xl border backdrop-blur-md shadow-md transition-all cursor-pointer ${O?`bg-amber-500/20 border-amber-500/50 text-amber-300`:`bg-amber-900/10 border-amber-900/20 text-amber-900`}`,children:[O?(0,Y.jsx)(x,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(o,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`font-garamond font-semibold hidden sm:inline`,children:O?`Day`:`Night`})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 bg-black/30 backdrop-blur-md p-1 rounded-xl border border-black/20 shadow-md`,children:[(0,Y.jsx)(`button`,{id:`zoom-in-btn`,onClick:b,title:`Zoom In`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(C,{className:`w-4 h-4`})}),(0,Y.jsx)(`button`,{id:`zoom-out-btn`,onClick:S,title:`Zoom Out`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(A,{className:`w-4 h-4`})}),(0,Y.jsx)(`button`,{id:`center-active-btn`,onClick:D,title:`Focus Active Node`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(w,{className:`w-4 h-4 text-amber-400`})}),(0,Y.jsx)(`button`,{id:`reset-zoom-btn`,onClick:E,title:`Fit Entire Map`,className:`p-1.5 rounded-lg hover:bg-white/10 text-stone-300 cursor-pointer`,children:(0,Y.jsx)(d,{className:`w-4 h-4`})})]})]})},ye=({node:e,activeNodeIndex:n,totalNodes:r,theme:a,onAdvance:o,onRetreat:s,details:l,modalLoading:u,isCompleted:d,toggleLoading:f,onToggleCompletion:p,onSelectProblemForReview:g})=>{let[_,v]=(0,L.useState)(!1),[x,S]=(0,L.useState)(!1);if(!e)return null;let C=a.id!==`parchment`,w=l.length>0,T=I(e.id);return(0,Y.jsxs)(`div`,{id:`node-detail-card`,className:`relative p-4 rounded-2xl border-2 shadow-2xl backdrop-blur-md transition-all duration-300 max-h-[calc(100vh-180px)] overflow-y-auto custom-scrollbar select-none ${C?`bg-[#1c1813]/95 border-[#594634] text-[#f2e6d5]`:`bg-[#fbf5e8]/98 border-[#cbb38e] text-[#2c1d11]`}`,children:[(0,Y.jsx)(`div`,{className:`absolute top-2 left-2 w-2.5 h-2.5 border-t-2 border-l-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsx)(`div`,{className:`absolute top-2 right-2 w-2.5 h-2.5 border-t-2 border-r-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsx)(`div`,{className:`absolute bottom-2 left-2 w-2.5 h-2.5 border-b-2 border-l-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsx)(`div`,{className:`absolute bottom-2 right-2 w-2.5 h-2.5 border-b-2 border-r-2 border-amber-600/70 pointer-events-none`}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b pb-2 mb-3 ${C?`border-amber-900/40`:`border-amber-900/15`}`,children:[(0,Y.jsxs)(`span`,{className:`font-cinzel text-xs font-bold tracking-wider uppercase ${C?`text-amber-400`:`text-amber-800`}`,children:[`Node `,n+1,` / `,r]}),d&&(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel font-bold px-2 py-0.5 rounded border ${C?`bg-emerald-500/20 text-emerald-400 border-emerald-500/40`:`bg-emerald-600/15 text-emerald-800 border-emerald-600/30`}`,children:`✓ Solved`})]}),u?(0,Y.jsxs)(`div`,{className:`py-6 flex flex-col items-center justify-center gap-2`,children:[(0,Y.jsx)(t,{className:`w-5 h-5 text-amber-500 animate-spin`}),(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel font-bold opacity-75 uppercase`,children:`Loading Problem Details...`})]}):w?(0,Y.jsx)(`div`,{className:`space-y-3.5`,children:l.map(t=>(0,Y.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Y.jsxs)(`div`,{className:`flex justify-between items-start gap-2`,children:[(0,Y.jsxs)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${C?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:[e.id>0?`${e.id}. `:``,t.name]}),(0,Y.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-2 py-0.5 rounded border shrink-0 ${t.difficulty===`Easy`?C?`bg-emerald-950/90 text-emerald-300 border-emerald-500/40`:`bg-emerald-100 text-emerald-900 border-emerald-400`:t.difficulty===`Medium`?C?`bg-amber-950/90 text-amber-300 border-amber-500/40`:`bg-amber-100 text-amber-900 border-amber-400`:C?`bg-rose-950/90 text-rose-300 border-rose-500/40`:`bg-rose-100 text-rose-900 border-rose-400`}`,children:t.difficulty?.toUpperCase()||`MEDIUM`})]}),(0,Y.jsxs)(`div`,{className:`text-xs font-garamond font-semibold ${C?`text-amber-300`:`text-amber-900`}`,children:[`Pattern: `,(0,Y.jsx)(`span`,{className:`italic font-bold`,children:t.pattern||`General`})]}),(0,Y.jsxs)(`div`,{className:`flex gap-4 text-xs font-semibold ${C?`text-stone-300`:`text-stone-800`}`,children:[(0,Y.jsxs)(`div`,{children:[`Time:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${C?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:t.optimal_time||`O(N)`})]}),(0,Y.jsxs)(`div`,{children:[`Space:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${C?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:t.optimal_space||`O(1)`})]})]}),(0,Y.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2 pt-1 border-t ${C?`border-amber-900/30`:`border-amber-900/10`}`,children:[t.google_doc_url&&(0,Y.jsxs)(`a`,{href:t.google_doc_url,target:`_blank`,rel:`noreferrer`,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl border text-xs font-cinzel font-semibold transition-all cursor-pointer text-center ${C?`border-amber-500/30 bg-amber-500/10 hover:bg-amber-500/20 text-amber-200`:`border-amber-900/20 bg-amber-900/5 hover:bg-amber-900/10 text-amber-900`}`,children:[(0,Y.jsx)(j,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Google Doc`})]}),(0,Y.jsxs)(`button`,{onClick:()=>g(t.id),className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white text-xs font-cinzel font-bold shadow transition-all active:scale-95 cursor-pointer text-center`,children:[(0,Y.jsx)(y,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Review Problem`})]})]})]},t.id))}):T?(0,Y.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,Y.jsxs)(`div`,{className:`flex justify-between items-start gap-2`,children:[(0,Y.jsxs)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${C?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:[`LC #`,T.problem_number,`. `,T.name]}),(0,Y.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-2 py-0.5 rounded border shrink-0 ${T.difficulty===`Easy`?C?`bg-emerald-950/90 text-emerald-300 border-emerald-500/40`:`bg-emerald-100 text-emerald-900 border-emerald-400`:T.difficulty===`Medium`?C?`bg-amber-950/90 text-amber-300 border-amber-500/40`:`bg-amber-100 text-amber-900 border-amber-400`:C?`bg-rose-950/90 text-rose-300 border-rose-500/40`:`bg-rose-100 text-rose-900 border-rose-400`}`,children:T.difficulty?.toUpperCase()||`MEDIUM`})]}),(0,Y.jsxs)(`div`,{className:`text-xs font-garamond font-semibold ${C?`text-amber-300`:`text-amber-900`}`,children:[`Pattern: `,(0,Y.jsx)(`span`,{className:`italic font-bold`,children:T.pattern})]}),(0,Y.jsxs)(`div`,{className:`flex gap-4 text-xs font-semibold ${C?`text-stone-300`:`text-stone-800`}`,children:[(0,Y.jsxs)(`div`,{children:[`Time:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${C?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:T.time_complexity})]}),(0,Y.jsxs)(`div`,{children:[`Space:`,` `,(0,Y.jsx)(`code`,{className:`px-1.5 py-0.5 rounded font-mono text-[11px] font-bold ${C?`bg-black/50 text-emerald-300`:`bg-amber-950/10 text-emerald-800`}`,children:T.space_complexity})]})]}),T.description&&(0,Y.jsx)(`div`,{className:`p-2.5 rounded-xl border text-xs leading-relaxed ${C?`bg-[#252019] border-[#5a4836] text-stone-200`:`bg-white/80 border-[#cbb38e] text-stone-800`}`,children:T.description}),(0,Y.jsxs)(`div`,{className:`space-y-2 pt-1 border-t border-amber-900/20`,children:[(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsxs)(`button`,{onClick:async()=>{if(T&&!_){v(!0);try{await oe(T),S(!0),d||p(e.id),setTimeout(()=>S(!1),3e3)}catch(e){console.error(`Failed to activate problem:`,e)}finally{v(!1)}}},disabled:_,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl border text-xs font-cinzel font-bold shadow-sm transition-all active:scale-95 cursor-pointer disabled:opacity-50 ${x?`bg-emerald-600 text-white border-emerald-400`:C?`bg-amber-500/15 border-amber-500/40 hover:bg-amber-500/25 text-amber-300`:`bg-amber-900/10 border-amber-900/30 hover:bg-amber-900/20 text-amber-900`}`,children:[_?(0,Y.jsx)(t,{className:`w-3.5 h-3.5 animate-spin`}):x?(0,Y.jsx)(ie,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(h,{className:`w-3.5 h-3.5 text-amber-500`}),(0,Y.jsx)(`span`,{children:x?`Added to Box 1!`:`Learned Today`})]}),(0,Y.jsxs)(`button`,{onClick:async()=>{if(T&&!_){v(!0);try{let t=await oe(T);d||p(e.id),g(t.problem_id)}catch(e){console.error(`Failed to launch problem:`,e)}finally{v(!1)}}},disabled:_,className:`flex-1 flex items-center justify-center gap-1.5 py-2 px-2.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white text-xs font-cinzel font-bold shadow transition-all active:scale-95 cursor-pointer disabled:opacity-50`,children:[(0,Y.jsx)(y,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Solve / Review`})]})]}),(0,Y.jsxs)(`a`,{href:T.leetcode_url,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-center gap-1.5 p-1.5 rounded-xl border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${C?`border-amber-500/20 hover:bg-amber-500/10 text-stone-300`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:[(0,Y.jsx)(j,{className:`w-3 h-3 text-emerald-500`}),(0,Y.jsx)(`span`,{children:`Open on LeetCode.com`})]})]})]}):(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[(0,Y.jsx)(`div`,{children:(0,Y.jsx)(`h3`,{className:`font-bold font-headline-md text-base leading-snug m-0 ${C?`text-[#fef3c7]`:`text-[#1c120c]`}`,children:e.name})}),(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl border space-y-2 text-xs ${C?`bg-[#252019] border-[#5a4836] text-stone-200`:`bg-white/90 border-[#cbb38e] text-stone-800`}`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Y.jsx)(c,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h4`,{className:`font-bold text-xs m-0`,children:`No Local Note Synced`}),(0,Y.jsxs)(`p`,{className:`text-[10px] opacity-75 mt-0.5 leading-normal`,children:[`Sync Google Drive or create a note for problem #`,e.id,`.`]})]})]}),(0,Y.jsxs)(`div`,{className:`space-y-1.5 pt-1 border-t ${C?`border-amber-900/20`:`border-amber-900/10`}`,children:[(0,Y.jsx)(`a`,{href:`https://leetcode.com/problemset/?search=${e.id}`,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-between p-1.5 rounded-lg border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${C?`border-amber-500/20 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:(0,Y.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(j,{className:`w-3 h-3 text-emerald-500`}),`Search LeetCode #`,e.id]})}),(0,Y.jsx)(`a`,{href:`https://www.google.com/search?q=leetcode+${e.id}`,target:`_blank`,rel:`noreferrer`,className:`w-full flex items-center justify-between p-1.5 rounded-lg border text-[11px] font-garamond font-semibold transition-all cursor-pointer ${C?`border-amber-500/20 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:(0,Y.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(i,{className:`w-3 h-3 text-amber-500`}),`Search Google Solution`]})})]})]})]}),(0,Y.jsx)(`div`,{className:`pt-3 mt-3 border-t ${C?`border-amber-900/40`:`border-amber-900/15`}`,children:(0,Y.jsx)(`button`,{onClick:()=>p(e.id),disabled:f,className:`w-full py-2.5 rounded-xl font-cinzel text-xs font-bold tracking-wider uppercase flex items-center justify-center gap-2 cursor-pointer transition-all border shadow-sm active:scale-95 disabled:opacity-50 ${d?C?`bg-rose-500/15 border-rose-500/40 text-rose-400 hover:bg-rose-500/25`:`bg-rose-600/10 border-rose-600/30 text-rose-800 hover:bg-rose-600/20`:C?`bg-emerald-500/15 border-emerald-500/40 text-emerald-400 hover:bg-emerald-500/25`:`bg-emerald-600/10 border-emerald-600/30 text-emerald-800 hover:bg-emerald-600/20`}`,children:d?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(N,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Unmark As Completed`})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(k,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Mark As Completed`})]})})}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-2 pt-2.5 mt-2.5 border-t ${C?`border-amber-900/40`:`border-amber-900/15`}`,children:[(0,Y.jsxs)(`button`,{onClick:s,disabled:n<=0,className:`flex items-center gap-1 text-[11px] font-cinzel font-semibold px-2.5 py-1.5 rounded-lg border transition-all disabled:opacity-30 cursor-pointer ${C?`border-amber-500/30 hover:bg-amber-500/10 text-stone-200`:`border-amber-900/20 hover:bg-amber-900/5 text-stone-800`}`,children:[(0,Y.jsx)(m,{className:`w-3 h-3`}),(0,Y.jsx)(`span`,{children:`Prev`})]}),(0,Y.jsxs)(`span`,{className:`text-[10px] font-garamond italic font-semibold ${C?`text-stone-400`:`text-stone-600`}`,children:[`Waypoint `,n+1]}),(0,Y.jsxs)(`button`,{onClick:o,disabled:n>=r-1,className:`flex items-center gap-1 text-[11px] font-cinzel font-semibold px-2.5 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 text-white transition-all disabled:opacity-30 cursor-pointer shadow`,children:[(0,Y.jsx)(`span`,{children:`Next`}),(0,Y.jsx)(b,{className:`w-3 h-3`})]})]})]})},be=({isOpen:e,onClose:t,nodes:n,theme:r,onReset:i})=>{if(!e)return null;let a=r.id!==`parchment`,o=n.length;return(0,Y.jsx)(`div`,{className:`fixed inset-0 z-[120] flex items-center justify-center p-4 bg-black/70 backdrop-blur-sm animate-fade-in select-none`,children:(0,Y.jsxs)(`div`,{id:`expedition-complete-modal`,className:`relative w-full max-w-lg p-6 rounded-2xl border-2 shadow-2xl transition-all ${a?`bg-[#1c1813] border-[#594634] text-[#f2e6d5]`:`bg-[#f7efe0] border-[#c8b28f] text-[#332415]`}`,children:[(0,Y.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-1.5 rounded-lg opacity-60 hover:opacity-100 hover:bg-black/10 cursor-pointer`,children:(0,Y.jsx)(O,{className:`w-5 h-5`})}),(0,Y.jsxs)(`div`,{className:`text-center mb-6`,children:[(0,Y.jsx)(`div`,{className:`inline-flex p-3 rounded-2xl bg-amber-500/20 border border-amber-500/40 text-amber-500 mb-3 shadow-lg shadow-amber-500/20`,children:(0,Y.jsx)(M,{className:`w-10 h-10 animate-bounce`})}),(0,Y.jsx)(`h2`,{className:`font-cinzel-dec font-bold text-2xl md:text-3xl text-amber-600 dark:text-amber-400`,children:`Expedition Completed!`}),(0,Y.jsxs)(`p`,{className:`font-garamond italic text-sm md:text-base opacity-80 mt-1`,children:[`All `,o,` Waypoints and the entire ancient trail are now fully illuminated.`]})]}),(0,Y.jsxs)(`div`,{className:`grid grid-cols-3 gap-3 mb-6`,children:[(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,Y.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:o}),(0,Y.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Nodes Solved`})]}),(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,Y.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:`7`}),(0,Y.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Biomes Crossed`})]}),(0,Y.jsxs)(`div`,{className:`p-3 rounded-xl bg-amber-500/10 border border-amber-900/15 text-center`,children:[(0,Y.jsx)(`span`,{className:`block font-cinzel font-bold text-xl text-amber-600 dark:text-amber-300`,children:`1,620m`}),(0,Y.jsx)(`span`,{className:`font-garamond text-xs opacity-75`,children:`Peak Citadel`})]})]}),(0,Y.jsxs)(`div`,{className:`space-y-2 mb-6 max-h-48 overflow-y-auto custom-scrollbar pr-1`,children:[n.length>0&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(v,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 1:`}),(0,Y.jsx)(`span`,{children:n[0].name})]}),n.length>25&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(v,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 25:`}),(0,Y.jsx)(`span`,{children:n[24].name})]}),n.length>50&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(v,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 50:`}),(0,Y.jsx)(`span`,{children:n[49].name})]}),n.length>75&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(v,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Waypoint 75:`}),(0,Y.jsx)(`span`,{children:n[74].name})]}),n.length>0&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-garamond`,children:[(0,Y.jsx)(v,{className:`w-4 h-4 text-emerald-500 flex-shrink-0`}),(0,Y.jsx)(`span`,{className:`font-bold`,children:`Final Milestone:`}),(0,Y.jsx)(`span`,{className:`text-amber-600 dark:text-amber-300 font-bold`,children:n[n.length-1].name})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsxs)(`button`,{onClick:()=>{i(),t()},className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 px-4 rounded-xl border border-stone-400 dark:border-stone-700 font-cinzel font-semibold text-xs transition-all hover:bg-stone-500/10 cursor-pointer`,children:[(0,Y.jsx)(l,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Retrace From Start`})]}),(0,Y.jsxs)(`button`,{onClick:t,className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 px-4 rounded-xl bg-amber-600 hover:bg-amber-500 text-white font-cinzel font-bold text-xs shadow-lg transition-all cursor-pointer`,children:[(0,Y.jsx)(re,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{children:`Admire Map`})]})]})]})})},xe=``,Se=({nodes:e,activeNodeIndex:r,setActiveNodeIndex:o,completions:s,theme:c,onToggleCompletion:l,onSelectProblemForReview:d,onSwitchToMap:f,tracks:p,activeTrack:m,onTrackChange:h})=>{let _=c.id!==`parchment`,[b,x]=(0,L.useState)(``),[C,w]=(0,L.useState)(`all`),[T,k]=(0,L.useState)(`all`),[A,M]=(0,L.useState)(`all`),[N,te]=(0,L.useState)(`sequence`),[re,ie]=(0,L.useState)(null),[P,se]=(0,L.useState)(null),R=(0,L.useRef)(null),z=(0,L.useMemo)(()=>{let t=new Set;return e.forEach(e=>{let n=I(e.id);n?.pattern&&t.add(n.pattern)}),t.size===0&&ae().forEach(e=>t.add(e)),Array.from(t)},[e]),B=e.length,V=(0,L.useMemo)(()=>e.filter(e=>s.has(e.id)).length,[e,s]),ce=B>0?Math.round(V/B*100):0,H=(0,L.useMemo)(()=>{let t=b.trim().toLowerCase(),n=t.replace(/^#/,``);return e.filter(e=>{let r=s.has(e.id);if(C===`solved`&&!r||C===`unsolved`&&r)return!1;let i=I(e.id);if(T!==`all`&&i?.pattern!==T||A!==`all`&&i?.difficulty!==A)return!1;if(t){let r=String(e.id).includes(n),a=String(e.sequenceIndex+1)===n,o=e.name.toLowerCase().includes(t),s=i?.pattern?.toLowerCase().includes(t)??!1,c=i?.difficulty?.toLowerCase().includes(t)??!1;if(!r&&!a&&!o&&!s&&!c)return!1}return!0}).sort((e,t)=>{switch(N){case`number_asc`:return e.id-t.id;case`number_desc`:return t.id-e.id;case`name`:return e.name.localeCompare(t.name);default:return e.sequenceIndex-t.sequenceIndex}})},[e,s,C,T,A,b,N]),U=async e=>{if(P===null){se(e.id);try{let{data:{session:t}}=await F.auth.getSession(),n={Authorization:`Bearer ${t?t.access_token:`sandbox`}`},r=await fetch(`${xe}/api/reviews/problems/${e.id}`,{headers:n});if(r.ok){let e=await r.json().catch(()=>[]);if(Array.isArray(e)&&e.length>0&&e[0]?.id){d(e[0].id);return}}let i=I(e.id);if(i){let e=await oe(i);if(e?.problem_id){d(e.problem_id);return}}d(String(e.id))}catch(t){console.error(`Failed to prepare problem for review:`,t),d(String(e.id))}finally{se(null)}}};return(0,L.useEffect)(()=>{if(r>=0&&!b&&C===`all`&&T===`all`&&A===`all`){let e=setTimeout(()=>{let e=document.getElementById(`problem-item-${r}`);e&&e.scrollIntoView({behavior:`auto`,block:`center`})},80);return()=>clearTimeout(e)}},[r,b,C,T,A]),(0,Y.jsxs)(`div`,{className:`relative w-full h-full flex flex-col overflow-hidden select-none transition-colors duration-300 ${_?`parchment-dark-bg text-[#f4ebd9]`:`parchment-bg text-[#2c2014]`}`,children:[(0,Y.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 ${_?`map-dark-vignette`:`map-vignette`}`}),(0,Y.jsx)(`div`,{className:`relative z-20 px-4 pt-16 pb-3 border-b backdrop-blur-md transition-colors ${_?`bg-[#1a1612]/90 border-[#4a392b]`:`bg-[#f7efe0]/90 border-[#c8b28f]`}`,children:(0,Y.jsxs)(`div`,{className:`max-w-6xl mx-auto space-y-3`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2.5 items-stretch sm:items-center justify-between`,children:[(0,Y.jsxs)(`div`,{className:`relative flex-1`,children:[(0,Y.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none`,children:(0,Y.jsx)(i,{className:`w-4 h-4 text-amber-600 dark:text-amber-400`})}),(0,Y.jsx)(`input`,{id:`journey-search-input`,type:`text`,value:b,onChange:e=>x(e.target.value),placeholder:`Search problem title, #number, or pattern (e.g. 1, Two Sum, Two Pointers)...`,className:`w-full pl-9 pr-8 py-2 rounded-xl text-xs md:text-sm font-garamond font-semibold border-2 shadow-inner focus:outline-none transition-all ${_?`bg-[#231e18] border-[#5a4836] text-[#f4ebd9] placeholder-stone-500 focus:border-amber-500/70`:`bg-[#fcf7ee] border-[#cfbc9c] text-[#2c2014] placeholder-stone-500 focus:border-amber-700/60`}`}),b&&(0,Y.jsx)(`button`,{onClick:()=>x(``),title:`Clear search`,className:`absolute inset-y-0 right-0 pr-2.5 flex items-center text-stone-400 hover:text-amber-600 cursor-pointer`,children:(0,Y.jsx)(O,{className:`w-4 h-4`})})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[p&&p.length>0&&h&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-xl border text-xs font-cinzel font-bold shadow-sm ${_?`bg-[#231e18] border-[#5a4836] text-amber-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-amber-900`}`,children:[(0,Y.jsx)(a,{className:`w-3.5 h-3.5 text-amber-500 shrink-0`}),(0,Y.jsx)(`span`,{className:`text-[10px] uppercase opacity-75 hidden md:inline`,children:`Track:`}),(0,Y.jsx)(`select`,{value:m,onChange:e=>h(e.target.value),className:`bg-transparent border-none text-xs font-cinzel font-bold cursor-pointer focus:outline-none`,children:p.map(e=>(0,Y.jsx)(`option`,{value:e.id,className:`bg-stone-900 text-stone-200`,children:e.name},e.id))})]}),(0,Y.jsxs)(`button`,{onClick:()=>{let e=document.getElementById(`problem-item-${r}`);e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),J.playPencilScratch())},title:`Scroll to active problem in list`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl border text-xs font-cinzel font-bold transition-all shadow-sm active:scale-95 cursor-pointer ${_?`bg-amber-500/20 border-amber-500/40 text-amber-300 hover:bg-amber-500/30`:`bg-amber-600/15 border-amber-600/30 text-amber-900 hover:bg-amber-600/25`}`,children:[(0,Y.jsx)(D,{className:`w-3.5 h-3.5 text-amber-500`}),(0,Y.jsx)(`span`,{className:`hidden sm:inline`,children:`Current Problem`}),(0,Y.jsxs)(`span`,{className:`font-mono text-[11px]`,children:[`#`,r+1]})]})]})]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2.5 pt-1 text-xs`,children:[(0,Y.jsx)(`div`,{className:`flex items-center gap-1`,children:[`all`,`solved`,`unsolved`].map(e=>{let t=C===e,n=e===`all`?B:e===`solved`?V:B-V;return(0,Y.jsxs)(`button`,{onClick:()=>w(e),className:`px-2.5 py-1 rounded-lg font-cinzel text-xs font-bold capitalize transition-all cursor-pointer border ${t?`bg-amber-600 border-amber-500 text-white shadow-sm`:_?`bg-[#231e18] border-[#4a392b] text-stone-400 hover:text-stone-200`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-600 hover:text-stone-900`}`,children:[e,` `,(0,Y.jsxs)(`span`,{className:`text-[10px] opacity-80`,children:[`(`,n,`)`]})]},e)})}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${_?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,Y.jsx)(g,{className:`w-3 h-3 text-amber-500`}),(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Pattern:`}),(0,Y.jsxs)(`select`,{value:T,onChange:e=>k(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none max-w-[150px] truncate`,children:[(0,Y.jsxs)(`option`,{value:`all`,className:`bg-stone-900 text-stone-200`,children:[`All Patterns (`,z.length,`)`]}),z.map(e=>(0,Y.jsx)(`option`,{value:e,className:`bg-stone-900 text-stone-200`,children:e},e))]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${_?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Diff:`}),(0,Y.jsxs)(`select`,{value:A,onChange:e=>M(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none`,children:[(0,Y.jsx)(`option`,{value:`all`,className:`bg-stone-900 text-stone-200`,children:`All`}),(0,Y.jsx)(`option`,{value:`Easy`,className:`bg-stone-900 text-stone-200`,children:`Easy`}),(0,Y.jsx)(`option`,{value:`Medium`,className:`bg-stone-900 text-stone-200`,children:`Medium`}),(0,Y.jsx)(`option`,{value:`Hard`,className:`bg-stone-900 text-stone-200`,children:`Hard`})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-1 rounded-lg border text-xs font-garamond font-semibold ${_?`bg-[#231e18] border-[#4a392b] text-stone-300`:`bg-[#fcf7ee] border-[#cfbc9c] text-stone-800`}`,children:[(0,Y.jsx)(ne,{className:`w-3 h-3 text-amber-500`}),(0,Y.jsx)(`span`,{className:`text-[10px] font-cinzel uppercase opacity-75`,children:`Sort:`}),(0,Y.jsxs)(`select`,{value:N,onChange:e=>te(e.target.value),className:`bg-transparent border-none text-xs font-garamond font-bold cursor-pointer focus:outline-none`,children:[(0,Y.jsx)(`option`,{value:`sequence`,className:`bg-stone-900 text-stone-200`,children:`Track Sequence`}),(0,Y.jsx)(`option`,{value:`number_asc`,className:`bg-stone-900 text-stone-200`,children:`Problem # (Asc)`}),(0,Y.jsx)(`option`,{value:`number_desc`,className:`bg-stone-900 text-stone-200`,children:`Problem # (Desc)`}),(0,Y.jsx)(`option`,{value:`name`,className:`bg-stone-900 text-stone-200`,children:`Title (A-Z)`})]})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsxs)(`span`,{className:`font-garamond italic text-xs opacity-80`,children:[`Showing `,H.length,` of `,B]}),(0,Y.jsx)(`div`,{className:`w-20 sm:w-28 h-2 rounded-full bg-black/20 overflow-hidden border border-amber-900/20`,children:(0,Y.jsx)(`div`,{className:`h-full bg-gradient-to-r from-amber-500 to-emerald-500 transition-all duration-500`,style:{width:`${ce}%`}})}),(0,Y.jsxs)(`span`,{className:`font-cinzel text-[10px] font-bold text-emerald-600 dark:text-emerald-400`,children:[ce,`%`]})]})]})]})}),(0,Y.jsx)(`div`,{ref:R,className:`relative z-20 flex-1 overflow-y-auto px-4 py-4 custom-scrollbar`,children:(0,Y.jsx)(`div`,{className:`max-w-6xl mx-auto space-y-2.5 pb-8`,children:H.length===0?(0,Y.jsxs)(`div`,{className:`p-10 text-center rounded-2xl border-2 border-dashed my-8 transition-colors ${_?`border-amber-900/40 bg-[#1e1914]/60 text-stone-400`:`border-amber-900/20 bg-[#f9f2e3]/80 text-stone-600`}`,children:[(0,Y.jsx)(u,{className:`w-10 h-10 mx-auto mb-3 text-amber-500 opacity-60`}),(0,Y.jsx)(`h3`,{className:`font-cinzel font-bold text-base text-amber-700 dark:text-amber-400 mb-1`,children:`No Problems Found`}),(0,Y.jsxs)(`p`,{className:`font-garamond italic text-sm max-w-md mx-auto mb-4`,children:[`No problems matched "`,b||`the current filter settings`,`". Try adjusting your search keywords or filter criteria.`]}),(b||C!==`all`||T!==`all`||A!==`all`)&&(0,Y.jsx)(`button`,{onClick:()=>{x(``),w(`all`),k(`all`),M(`all`)},className:`px-4 py-1.5 rounded-xl bg-amber-600 hover:bg-amber-500 text-white font-cinzel text-xs font-bold transition-all shadow cursor-pointer`,children:`Clear All Filters`})]}):H.map(e=>{let i=s.has(e.id),a=e.sequenceIndex===r,c=re===e.id,u=I(e.id),d=u?.difficulty,p=u?.pattern;return(0,Y.jsxs)(`div`,{id:`problem-item-${e.sequenceIndex}`,className:`group relative rounded-xl border-2 transition-all duration-200 shadow-md ${a?_?`bg-[#2c2217] border-amber-500/80 shadow-amber-500/20 shadow-lg ring-1 ring-amber-500/40`:`bg-[#fffaf0] border-amber-700 shadow-amber-700/20 shadow-lg ring-1 ring-amber-700/30`:_?`bg-[#1f1a14]/90 border-[#4a392b] hover:border-amber-600/50 hover:bg-[#251f18]`:`bg-[#fcf8ef]/95 border-[#c8b28f] hover:border-amber-700/60 hover:bg-[#fcf5e6]`}`,children:[a&&(0,Y.jsxs)(`div`,{className:`absolute -top-2.5 left-4 px-2 py-0.5 rounded-md bg-amber-600 text-white font-cinzel text-[9px] font-bold tracking-wider uppercase flex items-center gap-1 shadow`,children:[(0,Y.jsx)(D,{className:`w-2.5 h-2.5 text-amber-200`}),`Current Problem`]}),(0,Y.jsxs)(`div`,{className:`p-3 sm:p-3.5 flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start sm:items-center gap-3 min-w-0 flex-1`,children:[(0,Y.jsx)(`button`,{onClick:()=>{l(e.id)},title:i?`Mark as Unsolved`:`Mark as Solved`,className:`mt-0.5 sm:mt-0 p-1 rounded-lg hover:bg-black/10 dark:hover:bg-white/10 transition-colors cursor-pointer shrink-0`,children:i?(0,Y.jsx)(v,{className:`w-5 h-5 text-emerald-500 transition-transform active:scale-125`}):(0,Y.jsx)(E,{className:`w-5 h-5 text-stone-400 hover:text-amber-600 transition-colors`})}),(0,Y.jsxs)(`div`,{className:`px-2 py-1 rounded-lg border font-cinzel text-[11px] font-bold text-center shrink-0 min-w-[54px] ${a?`bg-amber-500/20 border-amber-500 text-amber-500`:_?`bg-black/30 border-[#4a392b] text-stone-400`:`bg-amber-900/5 border-[#c8b28f] text-stone-600`}`,children:[(0,Y.jsx)(`span`,{className:`text-[9px] block uppercase opacity-75 leading-none`,children:`Seq`}),(0,Y.jsxs)(`span`,{children:[`#`,e.sequenceIndex+1]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-mono text-[10px] font-bold ${_?`bg-[#2d251d] text-amber-400 border border-amber-900/50`:`bg-amber-900/10 text-amber-900 border border-amber-900/20`}`,children:e.id>0?`LC #${e.id}`:`Custom`}),d&&(0,Y.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-cinzel text-[9px] font-bold uppercase tracking-wider border ${d===`Easy`?`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/30`:d===`Medium`?`bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/30`:`bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/30`}`,children:d}),p&&(0,Y.jsx)(`span`,{className:`px-1.5 py-0.5 rounded font-cinzel text-[9px] font-medium border ${_?`bg-purple-950/30 text-purple-300 border-purple-800/40`:`bg-purple-50 text-purple-800 border-purple-200`}`,children:p}),(0,Y.jsx)(`h4`,{onClick:()=>{o(e.sequenceIndex),J.playNodeLightUp(e.sequenceIndex,B)},className:`font-garamond font-bold text-sm sm:text-base leading-tight truncate cursor-pointer hover:underline ${a?`text-amber-700 dark:text-amber-300 font-bold`:_?`text-stone-200 hover:text-amber-300`:`text-stone-900 hover:text-amber-800`}`,children:e.name}),i&&(0,Y.jsx)(`span`,{className:`text-[9px] font-cinzel font-bold px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 border border-emerald-500/30`,children:`✓ Solved`})]}),(u?.time_complexity||u?.space_complexity)&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap mt-1 text-[11px] font-mono`,children:[u.time_complexity&&(0,Y.jsxs)(`span`,{className:`opacity-80`,children:[`Time:`,` `,(0,Y.jsx)(`span`,{className:`text-amber-600 dark:text-amber-400 font-semibold`,children:u.time_complexity})]}),u.space_complexity&&(0,Y.jsxs)(`span`,{className:`opacity-80`,children:[`Space:`,` `,(0,Y.jsx)(`span`,{className:`text-purple-600 dark:text-purple-400 font-semibold`,children:u.space_complexity})]})]})]})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0 self-end sm:self-center pl-10 sm:pl-0`,children:[(0,Y.jsxs)(`button`,{onClick:()=>{o(e.sequenceIndex),J.playNodeLightUp(e.sequenceIndex,B),f(e.sequenceIndex)},title:`View Problem on Hand-Drawn Map`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg border text-xs font-cinzel font-bold transition-all shadow-sm active:scale-95 cursor-pointer ${_?`bg-amber-500/15 border-amber-500/40 text-amber-300 hover:bg-amber-500/25`:`bg-amber-700/10 border-amber-700/30 text-amber-900 hover:bg-amber-700/20`}`,children:[(0,Y.jsx)(n,{className:`w-3.5 h-3.5 text-amber-500`}),(0,Y.jsx)(`span`,{className:`hidden md:inline`,children:`Map`})]}),(0,Y.jsxs)(`button`,{onClick:()=>U(e),disabled:P===e.id,title:`Launch Spaced Repetition Review for this problem`,className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg bg-amber-600 hover:bg-amber-500 disabled:opacity-50 text-white text-xs font-cinzel font-bold shadow-sm transition-all active:scale-95 cursor-pointer`,children:[P===e.id?(0,Y.jsx)(t,{className:`w-3.5 h-3.5 animate-spin`}):(0,Y.jsx)(y,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{className:`hidden md:inline`,children:P===e.id?`Loading...`:`Review`})]}),(0,Y.jsx)(`a`,{href:u?.leetcode_url||(e.id>0?`https://leetcode.com/problemset/?search=${e.id}`:`https://www.google.com/search?q=${encodeURIComponent(e.name)}`),target:`_blank`,rel:`noreferrer`,title:`Open Problem on LeetCode`,className:`p-1.5 rounded-lg border transition-all cursor-pointer ${_?`border-stone-700 text-stone-400 hover:text-stone-200 hover:bg-white/5`:`border-stone-300 text-stone-600 hover:text-stone-900 hover:bg-black/5`}`,children:(0,Y.jsx)(j,{className:`w-3.5 h-3.5`})}),(0,Y.jsx)(`button`,{onClick:()=>{ie(c?null:e.id),c||o(e.sequenceIndex)},title:c?`Hide Problem Details`:`View Problem Details`,className:`p-1.5 rounded-lg border transition-all cursor-pointer ${c?`bg-amber-600/20 border-amber-500 text-amber-500`:_?`border-stone-700 text-stone-400 hover:text-stone-200`:`border-stone-300 text-stone-600 hover:text-stone-900`}`,children:c?(0,Y.jsx)(S,{className:`w-3.5 h-3.5`}):(0,Y.jsx)(ee,{className:`w-3.5 h-3.5`})})]})]}),c&&(0,Y.jsx)(`div`,{className:`px-4 py-3 border-t text-xs font-garamond animate-fade-in ${_?`border-amber-900/40 bg-black/20 text-stone-300`:`border-amber-900/15 bg-amber-950/5 text-stone-700`}`,children:(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[u?.description?(0,Y.jsxs)(`div`,{className:`p-3 rounded border border-amber-900/20 bg-amber-900/5 dark:bg-black/30 font-sans text-xs sm:text-[13px] leading-relaxed whitespace-pre-line text-stone-700 dark:text-stone-300`,children:[(0,Y.jsx)(`div`,{className:`font-cinzel font-bold text-amber-600 dark:text-amber-400 text-[10px] uppercase mb-1 tracking-wider`,children:`Canonical Problem Description`}),u.description]}):(0,Y.jsx)(`p`,{className:`italic text-stone-500`,children:`Review this problem in CodeStudio to access the full starter code, test suites, and review queue.`}),u?.examples&&u.examples.length>0&&(0,Y.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Y.jsx)(`div`,{className:`font-cinzel font-bold text-amber-600 dark:text-amber-400 text-[10px] uppercase tracking-wider`,children:`Examples`}),(0,Y.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-2`,children:u.examples.map((e,t)=>(0,Y.jsxs)(`div`,{className:`p-2.5 rounded border border-stone-300/40 dark:border-stone-700/50 bg-black/5 dark:bg-black/30 font-mono text-[11px] space-y-1`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`span`,{className:`text-stone-500`,children:`Input: `}),(0,Y.jsx)(`span`,{className:`font-semibold text-amber-700 dark:text-amber-300`,children:e.input})]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`span`,{className:`text-stone-500`,children:`Output: `}),(0,Y.jsx)(`span`,{className:`font-semibold text-emerald-600 dark:text-emerald-400`,children:e.output})]}),e.explanation&&(0,Y.jsx)(`div`,{className:`text-[10px] text-stone-500 italic font-sans pt-0.5`,children:e.explanation})]},t))})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-4 text-[11px] pt-1 opacity-85 flex-wrap border-t border-stone-400/20 dark:border-stone-700/30`,children:[p&&(0,Y.jsxs)(`span`,{children:[`Pattern: `,(0,Y.jsx)(`strong`,{className:`font-cinzel text-amber-600 dark:text-amber-400`,children:p})]}),d&&(0,Y.jsxs)(`span`,{children:[`Difficulty: `,(0,Y.jsx)(`strong`,{children:d})]}),u?.time_complexity&&(0,Y.jsxs)(`span`,{children:[`Time: `,(0,Y.jsx)(`strong`,{className:`font-mono text-amber-600 dark:text-amber-400`,children:u.time_complexity})]}),u?.space_complexity&&(0,Y.jsxs)(`span`,{children:[`Space: `,(0,Y.jsx)(`strong`,{className:`font-mono text-purple-600 dark:text-purple-400`,children:u.space_complexity})]}),u?.constraints&&u.constraints.length>0&&(0,Y.jsxs)(`span`,{children:[`Constraints: `,(0,Y.jsx)(`strong`,{className:`font-mono text-[10px]`,children:u.constraints.join(` • `)})]})]})]})})]},e.id)})})})]})},Z=``;async function Q(e,t){if(!e.ok||!(e.headers.get(`content-type`)||``).includes(`application/json`))return t;try{return await e.json()}catch{return t}}function $({onSelectProblemForReview:e}){let[n,r]=(0,L.useState)(new Set),[i,a]=(0,L.useState)({}),[o,s]=(0,L.useState)([]),[c,l]=(0,L.useState)([]),[u,d]=(0,L.useState)(()=>localStorage.getItem(`algospaced_active_track`)||`leetcode-150`),[f,m]=(0,L.useState)(!0),[h,g]=(0,L.useState)(0),[_,v]=(0,L.useState)(null),[y,b]=(0,L.useState)([]),[x,S]=(0,L.useState)(!1),[C,T]=(0,L.useState)(!1),[E,D]=(0,L.useState)(`parchment`),[O,k]=(0,L.useState)(`map`),[A,j]=(0,L.useState)(!0),[M,N]=(0,L.useState)(!0),[ee,ne]=(0,L.useState)(!0),[re,ie]=(0,L.useState)(!1),[ae,oe]=(0,L.useState)(!1),[I,B]=(0,L.useState)(!1),[V,H]=(0,L.useState)(!0),U=le[E]||le.parchment,[W,G]=(0,L.useState)({x:0,y:0,scale:.5}),K=(0,L.useMemo)(()=>ce(o,i),[o,i]),q=K.length,X=h>=0&&h{J.setEnabled(A)},[A]);let ue=async()=>{try{let{data:{session:e}}=await F.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},n=localStorage.getItem(`algospaced_active_track`)||`leetcode-150`,[i,o,c,u]=await Promise.all([fetch(`${Z}/api/journey-progress`,{headers:t}),fetch(`${Z}/api/journey-progress/titles`,{headers:t}),fetch(`${Z}/api/journey-progress/sequences`,{headers:t}),fetch(`${Z}/api/journey-progress/sequence/${n}`,{headers:t})]),[d,f,p,m]=await Promise.all([Q(i,[]),Q(o,{}),Q(c,[]),Q(u,[])]),h=new Set(d);r(h),a(f),l(p),s(m);let _=m.findIndex(e=>!h.has(e));g(_>=0?_:0)}catch(e){console.error(`Error fetching journey data:`,e)}finally{m(!1)}};(0,L.useEffect)(()=>{ue()},[]);let de=(0,L.useCallback)(async e=>{b([]),S(!0);try{let{data:{session:t}}=await F.auth.getSession(),n=t?t.access_token:`sandbox`,r=await Q(await fetch(`${Z}/api/reviews/problems/${e}`,{headers:{Authorization:`Bearer ${n}`}}),[]);b(r)}catch(e){console.error(`Error fetching problem details:`,e)}finally{S(!1)}},[]);(0,L.useEffect)(()=>{X&&de(X.id)},[X?.id,de]);let fe=async e=>{m(!0),d(e),localStorage.setItem(`algospaced_active_track`,e);try{let{data:{session:t}}=await F.auth.getSession(),r={Authorization:`Bearer ${t?t.access_token:`sandbox`}`},i=await Q(await fetch(`${Z}/api/journey-progress/sequence/${e}`,{headers:r}),[]);if(i.length>0){s(i);let e=i.findIndex(e=>!n.has(e));g(e>=0?e:0)}}catch(e){console.error(`Error switching track:`,e)}finally{m(!1)}},pe=(0,L.useCallback)(()=>{g(e=>{if(e{g(e=>e>0?(J.playPencilScratch(),e-1):0)},[]),he=(0,L.useCallback)(e=>{let t=Math.max(0,Math.min(q-1,e));g(t),J.playNodeLightUp(t,q),t===q-1&&J.playVictoryChime()},[q]),ge=(0,L.useCallback)(()=>{g(0),J.playPencilScratch()},[]),xe=async e=>{T(!0);try{let{data:{session:t}}=await F.auth.getSession(),i=t?t.access_token:`sandbox`;if((await fetch(`${Z}/api/journey-progress/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${i}`},body:JSON.stringify({problem_number:e})})).ok){let t=new Set(n);t.has(e)?(t.delete(e),J.playPencilScratch()):(t.add(e),J.playNodeLightUp(h,q),o.every(e=>t.has(e))&&(J.playVictoryChime(),se({particleCount:130,spread:85,origin:{y:.6},colors:[`#10b981`,`#34d399`,`#f59e0b`,`#ffffff`]}),B(!0))),r(t)}}catch(e){console.error(`Error toggling progress:`,e)}finally{T(!1)}};(0,L.useEffect)(()=>{let e=e=>{let t=e.target;[`INPUT`,`TEXTAREA`,`SELECT`].includes(t?.tagName)||t?.isContentEditable||O===`map`&&(e.code===`Space`||e.code===`ArrowRight`||e.code===`ArrowDown`?(e.preventDefault(),pe()):e.code===`ArrowLeft`||e.code===`ArrowUp`?(e.preventDefault(),me()):e.code===`KeyR`&&(e.preventDefault(),ge()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[pe,me,ge,O]);let $=(0,L.useRef)(null),Ce=(0,L.useCallback)(()=>{let e=$.current?.clientWidth||window.innerWidth,t=$.current?.clientHeight||window.innerHeight,n=e/2,r=t/2;G(e=>{let t=Math.min(e.scale*1.25,3.5);return{scale:t,x:n-(n-e.x)/e.scale*t,y:r-(r-e.y)/e.scale*t}})},[]),we=(0,L.useCallback)(()=>{let e=$.current?.clientWidth||window.innerWidth,t=$.current?.clientHeight||window.innerHeight,n=e/2,r=t/2;G(e=>{let t=Math.max(e.scale*.8,.08);return{scale:t,x:n-(n-e.x)/e.scale*t,y:r-(r-e.y)/e.scale*t}})},[]),Te=(0,L.useCallback)(()=>{let e=$.current?.clientWidth||window.innerWidth,t=$.current?.clientHeight||window.innerHeight,n=e/R,r=t/z,i=Math.min(n,r)*.9;G({x:(e-R*i)/2,y:(t-z*i)/2,scale:i})},[]),Ee=(0,L.useCallback)(()=>{if(!X)return;let e=$.current?.clientWidth||window.innerWidth,t=$.current?.clientHeight||window.innerHeight,n=Math.max(W.scale,.95);G({x:e/2-X.x*n,y:t/2-X.y*n,scale:n})},[X,W.scale]),De=(0,L.useCallback)(e=>{if(k(`map`),typeof e==`number`&&e>=0&&ek(`map`),title:`Hand-Drawn Cartography Map`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg font-cinzel text-xs font-bold transition-all cursor-pointer ${O===`map`?`bg-amber-600 text-white shadow-sm`:Oe?`text-stone-400 hover:text-stone-200`:`text-stone-600 hover:text-stone-900`}`,children:[(0,Y.jsx)(P,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`Map`})]}),(0,Y.jsxs)(`button`,{id:`view-mode-list-btn`,onClick:()=>k(`list`),title:`Problem List View`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg font-cinzel text-xs font-bold transition-all cursor-pointer ${O===`list`?`bg-amber-600 text-white shadow-sm`:Oe?`text-stone-400 hover:text-stone-200`:`text-stone-600 hover:text-stone-900`}`,children:[(0,Y.jsx)(p,{className:`w-3.5 h-3.5`}),(0,Y.jsx)(`span`,{children:`List`})]})]}),O===`map`&&(0,Y.jsxs)(`button`,{id:`toggle-journal-btn`,onClick:()=>H(e=>!e),title:`Toggle Explorer Field Notes Journal`,className:`flex items-center gap-1.5 px-3 py-2 rounded-xl border-2 shadow-lg backdrop-blur-md font-cinzel text-xs font-bold transition-all cursor-pointer ${V?`bg-amber-600 border-amber-400 text-white`:Oe?`bg-[#1a1612]/90 border-[#4a392b] text-[#e2d5c2]`:`bg-[#f7efe0]/95 border-[#c8b28f] text-[#332415]`}`,children:[(0,Y.jsx)(te,{className:`w-4 h-4`}),(0,Y.jsx)(`span`,{className:`hidden sm:inline`,children:`Journal`})]})]})]}),O===`map`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`main`,{ref:$,className:`relative flex-1 w-full h-full`,children:[(0,Y.jsx)(_e,{nodes:K,activeNodeIndex:h,completions:n,theme:U,showLabels:ee,showGrid:re,showNodeNumbers:ae,autoCenterOnActive:M,onNodeClick:he,hoveredNodeIndex:_,setHoveredNodeIndex:v,transform:W,setTransform:G}),V&&(0,Y.jsx)(`aside`,{className:`absolute top-16 left-2.5 z-30 w-72 md:w-84 pointer-events-auto transition-all animate-fade-in`,children:(0,Y.jsx)(ye,{node:X,activeNodeIndex:h,totalNodes:q,theme:U,onAdvance:pe,onRetreat:me,details:y,modalLoading:x,isCompleted:X?n.has(X.id):!1,toggleLoading:C,onToggleCompletion:xe,onSelectProblemForReview:e})})]}),(0,Y.jsx)(`footer`,{className:`absolute bottom-2.5 left-2.5 right-2.5 z-30 pointer-events-auto max-w-5xl mx-auto w-[calc(100%-1.25rem)]`,children:(0,Y.jsx)(ve,{theme:U,soundEnabled:A,autoCenterOnActive:M,showLabels:ee,showGrid:re,showNodeNumbers:ae,tracks:c,activeTrack:u,onTrackChange:fe,onToggleSound:()=>j(e=>!e),onToggleAutoCenter:()=>N(e=>!e),onToggleLabels:()=>ne(e=>!e),onToggleGrid:()=>ie(e=>!e),onToggleNodeNumbers:()=>oe(e=>!e),onToggleTheme:()=>D(e=>e===`parchment`?`dark_parchment`:`parchment`),onZoomIn:Ce,onZoomOut:we,onResetZoom:Te,onCenterActiveNode:Ee})})]}):(0,Y.jsx)(`main`,{className:`relative flex-1 w-full h-full overflow-hidden`,children:(0,Y.jsx)(Se,{nodes:K,activeNodeIndex:h,setActiveNodeIndex:g,completions:n,theme:U,onToggleCompletion:xe,onSelectProblemForReview:e,onSwitchToMap:De,tracks:c,activeTrack:u,onTrackChange:fe,onToggleTheme:()=>D(e=>e===`parchment`?`dark_parchment`:`parchment`)})}),(0,Y.jsx)(be,{isOpen:I,onClose:()=>B(!1),nodes:K,theme:U,onReset:ge})]})}export{$ as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/KatexRenderer-HIhDCm0G.js b/algospaced-ui/dist/assets/KatexRenderer-DVt2cqHc.js similarity index 65% rename from algospaced-ui/dist/assets/KatexRenderer-HIhDCm0G.js rename to algospaced-ui/dist/assets/KatexRenderer-DVt2cqHc.js index 590d3a98ef7f0de0d9b6c0c04cd2d4c8c5c6c860..be1e9224b9b1b880faa459796e99697acd4af562 100644 --- a/algospaced-ui/dist/assets/KatexRenderer-HIhDCm0G.js +++ b/algospaced-ui/dist/assets/KatexRenderer-DVt2cqHc.js @@ -1 +1 @@ -import"./rolldown-runtime-hePW80VL.js";import{Bt as e,Rt as t}from"./vendor-react-CIO8MTK1.js";import{t as n}from"./vendor-katex-Balf574a.js";e();var r=t(),i=({math:e,displayMode:t=!1,className:i=``})=>{let a=``;try{a=n.renderToString(e.trim(),{displayMode:t,throwOnError:!1,output:`html`})}catch{a=`${e.replace(/&/g,`&`).replace(//g,`>`)}`}return(0,r.jsx)(`span`,{className:i,dangerouslySetInnerHTML:{__html:a}})};export{i as KatexRenderer,i as default}; \ No newline at end of file +import"./rolldown-runtime-hePW80VL.js";import{Bt as e,Ht as t}from"./vendor-react-hnaVBnLv.js";import{t as n}from"./vendor-katex-Balf574a.js";t();var r=e(),i=({math:e,displayMode:t=!1,className:i=``})=>{let a=``;try{a=n.renderToString(e.trim(),{displayMode:t,throwOnError:!1,output:`html`})}catch{a=`${e.replace(/&/g,`&`).replace(//g,`>`)}`}return(0,r.jsx)(`span`,{className:i,dangerouslySetInnerHTML:{__html:a}})};export{i as KatexRenderer,i as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/MarkdownRenderer-BMZIn30p.js b/algospaced-ui/dist/assets/MarkdownRenderer-D8UdFpnD.js similarity index 95% rename from algospaced-ui/dist/assets/MarkdownRenderer-BMZIn30p.js rename to algospaced-ui/dist/assets/MarkdownRenderer-D8UdFpnD.js index 0df551399f9e3c6e79ea20e731946f8235d13629..2dab37262bd2da73a3580b2ed74d4bcf879adbd8 100644 --- a/algospaced-ui/dist/assets/MarkdownRenderer-BMZIn30p.js +++ b/algospaced-ui/dist/assets/MarkdownRenderer-D8UdFpnD.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/KatexRenderer-HIhDCm0G.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-react-CIO8MTK1.js","assets/vendor-codemirror-By0wlJeM.js","assets/vendor-katex-Balf574a.js","assets/vendor-katex-DtkCqjBQ.css"])))=>i.map(i=>d[i]); -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Rt as n}from"./vendor-react-CIO8MTK1.js";import{t as r}from"./index-DnK6BACV.js";var i=e(t(),1),a=n(),o=(0,i.lazy)(()=>r(()=>import(`./KatexRenderer-HIhDCm0G.js`),__vite__mapDeps([0,1,2,3,4,5])));function s(e){return e?e.split(/(\$\$[\s\S]*?\$\$|\\\[[\s\S]*?\\\]|\\\([\s\S]*?\\\)|\$(?:\\\$|[^$\n])+?\$|`[^`\n]+`|\*\*[^*\n]+\*\*|__[^_\n]+__|(?{if(!e)return null;if(e.startsWith(`$$`)&&e.endsWith(`$$`)&&e.length>=4){let n=e.slice(2,-2);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!0,className:`inline-block my-1 px-1 overflow-x-auto align-middle`})},t):e}if(e.startsWith(`\\[`)&&e.endsWith(`\\]`)&&e.length>=4){let n=e.slice(2,-2);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!0,className:`inline-block my-1 px-1 overflow-x-auto align-middle`})},t):e}if(e.startsWith(`\\(`)&&e.endsWith(`\\)`)&&e.length>=4){let n=e.slice(2,-2);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!1,className:`inline-katex px-0.5 align-baseline`})},t):e}if(e.startsWith(`$`)&&e.endsWith(`$`)&&e.length>=2){let n=e.slice(1,-1);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!1,className:`inline-katex px-0.5 align-baseline`})},t):e}if(e.startsWith("`")&&e.endsWith("`")&&e.length>=2)return(0,a.jsx)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] px-1.5 py-0.5 rounded text-[11px] font-mono border border-ink-black shadow-[1px_1px_0px_0px_#000]`,children:e.slice(1,-1)},t);if(e.startsWith(`**`)&&e.endsWith(`**`)&&e.length>=4||e.startsWith(`__`)&&e.endsWith(`__`)&&e.length>=4)return(0,a.jsx)(`strong`,{className:`text-ink-black font-extrabold`,children:s(e.slice(2,-2))},t);if(e.startsWith(`*`)&&e.endsWith(`*`)&&e.length>=2||e.startsWith(`_`)&&e.endsWith(`_`)&&e.length>=2)return(0,a.jsx)(`em`,{className:`italic text-slate-800`,children:s(e.slice(1,-1))},t);let n=e.match(/^\[([^\]]+)\]\(([^)]+)\)$/);return n?(0,a.jsx)(`a`,{href:n[2],target:`_blank`,rel:`noopener noreferrer`,className:`text-primary underline hover:text-primary/80 font-bold`,children:n[1]},t):e}):[]}var c=(0,i.lazy)(()=>r(()=>import(`./KatexRenderer-HIhDCm0G.js`),__vite__mapDeps([0,1,2,3,4,5]))),l=({content:e,className:t=``})=>{if(!e)return null;let n=e.split(/(```[\s\S]*?```|\$\$[\s\S]*?\$\$|\\\[[\s\S]*?\\\])/g);return(0,a.jsx)(`div`,{className:`markdown-content space-y-2.5 text-ink-black text-xs leading-relaxed font-sans ${t}`,children:n.map((e,t)=>{if(!e)return null;let n=e.trim();if(n.startsWith("```")&&n.endsWith("```")&&n.length>=6){let e=n.indexOf(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/KatexRenderer-DVt2cqHc.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-react-hnaVBnLv.js","assets/vendor-codemirror-By0wlJeM.js","assets/vendor-katex-Balf574a.js","assets/vendor-katex-DtkCqjBQ.css"])))=>i.map(i=>d[i]); +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Ht as n}from"./vendor-react-hnaVBnLv.js";import{t as r}from"./index-DVWZ15xt.js";var i=e(n(),1),a=t(),o=(0,i.lazy)(()=>r(()=>import(`./KatexRenderer-DVt2cqHc.js`),__vite__mapDeps([0,1,2,3,4,5])));function s(e){return e?e.split(/(\$\$[\s\S]*?\$\$|\\\[[\s\S]*?\\\]|\\\([\s\S]*?\\\)|\$(?:\\\$|[^$\n])+?\$|`[^`\n]+`|\*\*[^*\n]+\*\*|__[^_\n]+__|(?{if(!e)return null;if(e.startsWith(`$$`)&&e.endsWith(`$$`)&&e.length>=4){let n=e.slice(2,-2);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!0,className:`inline-block my-1 px-1 overflow-x-auto align-middle`})},t):e}if(e.startsWith(`\\[`)&&e.endsWith(`\\]`)&&e.length>=4){let n=e.slice(2,-2);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!0,className:`inline-block my-1 px-1 overflow-x-auto align-middle`})},t):e}if(e.startsWith(`\\(`)&&e.endsWith(`\\)`)&&e.length>=4){let n=e.slice(2,-2);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!1,className:`inline-katex px-0.5 align-baseline`})},t):e}if(e.startsWith(`$`)&&e.endsWith(`$`)&&e.length>=2){let n=e.slice(1,-1);return n.trim()?(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:n}),children:(0,a.jsx)(o,{math:n,displayMode:!1,className:`inline-katex px-0.5 align-baseline`})},t):e}if(e.startsWith("`")&&e.endsWith("`")&&e.length>=2)return(0,a.jsx)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] px-1.5 py-0.5 rounded text-[11px] font-mono border border-ink-black shadow-[1px_1px_0px_0px_#000]`,children:e.slice(1,-1)},t);if(e.startsWith(`**`)&&e.endsWith(`**`)&&e.length>=4||e.startsWith(`__`)&&e.endsWith(`__`)&&e.length>=4)return(0,a.jsx)(`strong`,{className:`text-ink-black font-extrabold`,children:s(e.slice(2,-2))},t);if(e.startsWith(`*`)&&e.endsWith(`*`)&&e.length>=2||e.startsWith(`_`)&&e.endsWith(`_`)&&e.length>=2)return(0,a.jsx)(`em`,{className:`italic text-slate-800`,children:s(e.slice(1,-1))},t);let n=e.match(/^\[([^\]]+)\]\(([^)]+)\)$/);return n?(0,a.jsx)(`a`,{href:n[2],target:`_blank`,rel:`noopener noreferrer`,className:`text-primary underline hover:text-primary/80 font-bold`,children:n[1]},t):e}):[]}var c=(0,i.lazy)(()=>r(()=>import(`./KatexRenderer-DVt2cqHc.js`),__vite__mapDeps([0,1,2,3,4,5]))),l=({content:e,className:t=``})=>{if(!e)return null;let n=e.split(/(```[\s\S]*?```|\$\$[\s\S]*?\$\$|\\\[[\s\S]*?\\\])/g);return(0,a.jsx)(`div`,{className:`markdown-content space-y-2.5 text-ink-black text-xs leading-relaxed font-sans ${t}`,children:n.map((e,t)=>{if(!e)return null;let n=e.trim();if(n.startsWith("```")&&n.endsWith("```")&&n.length>=6){let e=n.indexOf(` `),r=e===-1?``:n.slice(3,e).trim(),i=e===-1?n.slice(3,-3).trim():n.slice(e+1,-3).trimEnd();return(0,a.jsxs)(`div`,{className:`my-3 rounded-md overflow-hidden border-[2px] border-ink-black shadow-[3px_3px_0px_0px_#1E293B] bg-[#1E293B]`,children:[r&&(0,a.jsxs)(`div`,{className:`bg-slate-800 text-slate-400 px-3 py-1 text-[9px] font-arcade uppercase tracking-wider border-b border-slate-700 flex justify-between items-center`,children:[(0,a.jsx)(`span`,{children:r}),(0,a.jsx)(`span`,{className:`text-[8px] opacity-70`,children:`SNIPPET`})]}),(0,a.jsx)(`pre`,{className:`p-3 overflow-x-auto font-mono text-[11px] text-[#4ADE80] leading-relaxed custom-scrollbar selection:bg-[#4ADE80] selection:text-[#1E293B]`,children:(0,a.jsx)(`code`,{children:i})})]},`code-${t}`)}if(n.startsWith(`$$`)&&n.endsWith(`$$`)&&n.length>=4||n.startsWith(`\\[`)&&n.endsWith(`\\]`)&&n.length>=4){let e=n.slice(2,-2);return(0,a.jsx)(`div`,{className:`my-3 p-3 bg-slate-50 border-2 border-ink-black rounded overflow-x-auto text-center shadow-[2px_2px_0px_0px_rgba(30,41,59,0.3)] custom-scrollbar`,children:(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(`span`,{className:`font-mono text-xs opacity-75`,children:e}),children:(0,a.jsx)(c,{math:e,displayMode:!0})})},`math-${t}`)}let r=e.split(` `),o=[],l=0;for(;l=2){let t=e[0].slice(1,-1).split(`|`).map(e=>e.trim()),n=e.slice(2).map(e=>e.slice(1,-1).split(`|`).map(e=>e.trim()));o.push((0,a.jsx)(`div`,{className:`my-3 overflow-x-auto border-2 border-ink-black rounded shadow-[2px_2px_0px_0px_#1E293B]`,children:(0,a.jsxs)(`table`,{className:`w-full text-left border-collapse text-xs`,children:[(0,a.jsx)(`thead`,{children:(0,a.jsx)(`tr`,{className:`bg-slate-200 border-b-2 border-ink-black`,children:t.map((e,t)=>(0,a.jsx)(`th`,{className:`p-2 font-bold font-headline-md border-r last:border-r-0 border-ink-black`,children:s(e)},t))})}),(0,a.jsx)(`tbody`,{children:n.map((e,t)=>(0,a.jsx)(`tr`,{className:`border-b border-slate-300 last:border-b-0 ${t%2==1?`bg-slate-50`:`bg-white`}`,children:e.map((e,t)=>(0,a.jsx)(`td`,{className:`p-2 border-r last:border-r-0 border-slate-200 font-medium`,children:s(e)},t))},t))})]})},`table-${i}`));continue}}if(n.startsWith(`#### `)){o.push((0,a.jsx)(`h4`,{className:`text-xs font-bold text-ink-black mt-3 mb-1 font-headline-md`,children:s(n.substring(5))},i)),l++;continue}if(n.startsWith(`### `)){o.push((0,a.jsxs)(`h3`,{className:`text-xs font-bold text-primary mt-4 mb-1.5 uppercase font-arcade tracking-wide flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`w-2 h-2 bg-primary inline-block rounded-xs`}),s(n.substring(4))]},i)),l++;continue}if(n.startsWith(`## `)){o.push((0,a.jsx)(`h2`,{className:`text-sm font-extrabold text-ink-black mt-4 mb-2 font-headline-md border-b-2 border-ink-black pb-1`,children:s(n.substring(3))},i)),l++;continue}if(n.startsWith(`# `)){o.push((0,a.jsx)(`h1`,{className:`text-base font-black text-ink-black mt-5 mb-2 font-headline-md`,children:s(n.substring(2))},i)),l++;continue}if(n===`---`||n===`***`||n===`___`){o.push((0,a.jsx)(`hr`,{className:`my-3 border-t-2 border-dashed border-slate-300`},i)),l++;continue}if(e.trim().startsWith(`>`)){o.push((0,a.jsx)(`blockquote`,{className:`border-l-4 border-primary pl-3 py-1 my-2 bg-slate-50 italic text-slate-700`,children:s(e.trim().substring(1).trim())},i)),l++;continue}if(n.startsWith(`- `)||n.startsWith(`* `)||n.startsWith(`+ `)){let t=e.search(/\S/)>=2?`pl-6`:`pl-2`;o.push((0,a.jsxs)(`div`,{className:`flex items-start gap-2 my-1 ${t}`,children:[(0,a.jsx)(`span`,{className:`text-primary font-bold mt-0.5 shrink-0`,children:`•`}),(0,a.jsx)(`div`,{className:`text-ink-black leading-relaxed flex-1 font-medium`,children:s(n.substring(2))})]},i)),l++;continue}let c=n.match(/^(\d+)\.\s+(.*)$/);if(c){let t=e.search(/\S/)>=2?`pl-6`:`pl-2`;o.push((0,a.jsxs)(`div`,{className:`flex items-start gap-2 my-1 ${t}`,children:[(0,a.jsx)(`span`,{className:`text-primary font-arcade text-[9px] font-bold mt-1 shrink-0 px-1 py-0.2 bg-slate-100 border border-ink-black rounded-xs`,children:c[1]}),(0,a.jsx)(`div`,{className:`text-ink-black leading-relaxed flex-1 font-medium`,children:s(c[2])})]},i)),l++;continue}o.push((0,a.jsx)(`p`,{className:`text-ink-black my-1 font-medium leading-relaxed`,children:s(e)},i)),l++}return(0,a.jsx)(i.Fragment,{children:o},`block-${t}`)})})};export{s as n,l as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/MySQLPlayground-CDRacqFf.js b/algospaced-ui/dist/assets/MySQLPlayground-iGzsbjAa.js similarity index 98% rename from algospaced-ui/dist/assets/MySQLPlayground-CDRacqFf.js rename to algospaced-ui/dist/assets/MySQLPlayground-iGzsbjAa.js index d0dc343a5c27c36dd78f6bf2f4d470e211ba9cd6..7adb11398d958106ec84f0b0057b2427b186f0a8 100644 --- a/algospaced-ui/dist/assets/MySQLPlayground-CDRacqFf.js +++ b/algospaced-ui/dist/assets/MySQLPlayground-iGzsbjAa.js @@ -1 +1 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Rt as n}from"./vendor-react-CIO8MTK1.js";import{s as r}from"./firebaseClient-DZobvwSx.js";var i=e(t(),1),a=n();function o(){let[e,t]=(0,i.useState)(null),[n,o]=(0,i.useState)(``),[s,c]=(0,i.useState)(!1),[l,u]=(0,i.useState)(!0),[d,f]=(0,i.useState)(``),[p,m]=(0,i.useState)(null),h=async()=>{u(!0),f(``);try{let{data:{session:e}}=await r.auth.getSession();if(!e){f(`Unauthenticated session`);return}let n=await fetch(`/api/challenges/mysql/status`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(n.ok){let e=await n.json();e.active?t(e):t(null)}else f(`Failed to fetch playground status.`)}catch{f(`Connection timed out.`)}finally{u(!1)}},g=async(e=!1)=>{u(!0),f(``),m(null);try{let{data:{session:n}}=await r.auth.getSession();if(!n){f(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/mysql/init${e?`?refresh=true`:``}`,{method:`POST`,headers:{Authorization:`Bearer ${n.access_token}`}});if(i.ok){let e=await i.json();t({active:!0,title:e.title,objective:e.objective,points:e.points,schema:e.schema,challenge_type:e.challenge_type,completed:!1,total_score:e.total_score})}else f(`Failed to initialize mock database playground.`)}catch{f(`Server connection error.`)}finally{u(!1)}};return(0,i.useEffect)(()=>{h()},[]),l?(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-arcade text-[10px]`,children:[(0,a.jsx)(`div`,{className:`animate-bounce mb-2`,children:`INITIALIZING SQL PLAYGROUND...`}),(0,a.jsx)(`div`,{className:`w-48 h-4 bg-white border-[3px] border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#0ea5e9] w-1/2 animate-pulse border-r-2 border-ink-black`})})]}):e?(0,a.jsx)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm`,children:(0,a.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 custom-scrollbar flex flex-col gap-4`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center bg-slate-100 border-[3px] border-ink-black p-3 shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex gap-2`,children:[(0,a.jsx)(`span`,{className:`bg-blue-100 text-blue-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px] uppercase`,children:e.challenge_type}),(0,a.jsxs)(`span`,{className:`bg-yellow-100 text-yellow-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:[`+`,e.points,` PTS`]}),e.completed?(0,a.jsx)(`span`,{className:`bg-emerald-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`SOLVED`}):(0,a.jsx)(`span`,{className:`bg-rose-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`UNSOLVED`})]}),(0,a.jsxs)(`div`,{className:`font-arcade text-[8px] text-sky-700 font-bold bg-white border-2 border-ink-black px-2 py-0.5 shadow-[1px_1px_0_0_#1E293B]`,children:[`SCORE: `,e.total_score]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-yellow-400 bg-yellow-50 p-3 rounded font-sans leading-relaxed text-xs`,children:[(0,a.jsx)(`h4`,{className:`font-arcade text-[9px] text-yellow-800 mb-1`,children:`PROBLEM`}),(0,a.jsx)(`p`,{className:`font-bold text-slate-800`,children:e.objective})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`schema`}),(0,a.jsx)(`span`,{children:`SCHEMA EXPLORER (MOCK INSTANCE)`})]}),(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-3 max-h-[140px] overflow-y-auto custom-scrollbar font-mono text-[10px]`,children:Object.entries(e.schema).map(([e,t])=>(0,a.jsxs)(`div`,{className:`border border-slate-300 p-2 bg-slate-50`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-blue-700 border-b border-slate-200 pb-0.5 mb-1 flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px]`,children:`table_chart`}),e]}),(0,a.jsx)(`ul`,{className:`space-y-0.5 text-slate-600 text-[9px]`,children:t.map((e,t)=>(0,a.jsxs)(`li`,{className:`flex justify-between`,children:[(0,a.jsx)(`span`,{children:e.name}),(0,a.jsx)(`span`,{className:`text-slate-400 italic text-[8px]`,children:e.type})]},t))})]},e))})]}),(0,a.jsxs)(`div`,{className:`flex flex-col min-h-[120px]`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] mb-1 tracking-wide uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm text-sky-600`,children:`terminal`}),(0,a.jsx)(`span`,{children:`Enter SQL Query:`})]}),(0,a.jsx)(`textarea`,{value:n,onChange:e=>o(e.target.value),className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-3 border-[3px] border-ink-black rounded outline-none focus:ring-2 focus:ring-sky-500 text-xs leading-relaxed resize-none`,placeholder:`SELECT * FROM customers WHERE score > 100;`,spellCheck:`false`})]}),(0,a.jsxs)(`div`,{className:`flex gap-3`,children:[(0,a.jsx)(`button`,{onClick:()=>g(!0),className:`flex-1 bg-white hover:bg-slate-100 text-ink-black border-[3px] border-ink-black font-bold font-window-title text-xs py-2 shadow-[3px_3px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`NEW PROBLEM`}),(0,a.jsx)(`button`,{disabled:s,onClick:async()=>{if(n.trim()){c(!0),f(``),m(null);try{let{data:{session:e}}=await r.auth.getSession();if(!e){f(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/mysql/query`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({query:n})});if(i.ok){let e=await i.json();e.success?(m({columns:e.columns,rows:e.rows,rowsAffected:e.rows_affected,isCorrect:e.is_correct}),e.is_correct&&t(t=>t?{...t,completed:!0,total_score:e.total_score}:null),e.schema&&t(t=>t?{...t,schema:e.schema}:null)):f(e.error)}else f(`Database server query failure.`)}catch{f(`Query connection lost.`)}finally{c(!1)}}},className:`flex-[2] bg-highlight-pink text-white font-window-title font-bold py-2 border-[3px] border-ink-black shadow-[3px_3px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none hover:bg-pink-400 transition-all disabled:opacity-50 cursor-pointer text-center text-xs`,children:s?`EXECUTING SQL...`:`EXECUTE SQL QUERY`})]}),d&&(0,a.jsxs)(`div`,{className:`border-[3px] border-red-500 bg-red-50 text-red-800 p-3 font-mono text-xs whitespace-pre-wrap`,children:[(0,a.jsx)(`div`,{className:`font-bold mb-1`,children:`SQL RUNTIME / SYNTAX ERROR:`}),d]}),p&&(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 flex flex-col`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 flex justify-between items-center`,children:[(0,a.jsx)(`span`,{children:`QUERY OUTPUT BUFFER`}),p.isCorrect&&(0,a.jsx)(`span`,{className:`text-green-600 font-bold animate-bounce text-[9px]`,children:`✓ ACCEPTED!`})]}),(0,a.jsxs)(`div`,{className:`text-[9px] text-slate-500 mb-2 font-mono`,children:[`Rows Affected: `,p.rowsAffected,` | Total Returned: `,p.rows.length]}),p.rows.length>0?(0,a.jsx)(`div`,{className:`overflow-x-auto border border-slate-300 max-h-[180px] custom-scrollbar`,children:(0,a.jsxs)(`table`,{className:`border-collapse w-full font-mono text-[9px] min-w-full`,children:[(0,a.jsx)(`thead`,{children:(0,a.jsx)(`tr`,{className:`bg-slate-100 border-b border-slate-300`,children:p.columns.map((e,t)=>(0,a.jsx)(`th`,{className:`border-r border-slate-300 p-1.5 text-left font-bold text-slate-700`,children:e},t))})}),(0,a.jsx)(`tbody`,{className:`divide-y divide-slate-200`,children:p.rows.map((e,t)=>(0,a.jsx)(`tr`,{className:`hover:bg-slate-50`,children:p.columns.map((t,n)=>(0,a.jsx)(`td`,{className:`border-r border-slate-200 p-1.5 text-slate-800 whitespace-nowrap`,children:e[t]===null?(0,a.jsx)(`span`,{className:`text-slate-300 italic`,children:`NULL`}):String(e[t])},n))},t))})]})}):(0,a.jsx)(`div`,{className:`p-3 border border-dashed border-slate-300 text-center text-slate-400 italic font-sans text-xs`,children:`Query executed successfully. Result set is empty (or modification completed).`})]})]})}):(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col justify-between items-center text-center text-ink-black text-xs md:text-sm font-sans select-none`,children:[(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col justify-center items-center gap-4`,children:[(0,a.jsx)(`div`,{className:`w-16 h-16 bg-white border-[3px] border-ink-black flex items-center justify-center shadow-[4px_4px_0_0_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-[#0ea5e9]`,style:{fontVariationSettings:`'FILL' 1`},children:`database`})}),(0,a.jsx)(`h3`,{className:`font-headline-md font-bold text-lg`,children:`Interactive MySQL Playground`}),(0,a.jsx)(`p`,{className:`max-w-md text-slate-600 leading-relaxed font-semibold`,children:`Practice SQL queries against realistic schema tables. Includes full support for:`}),(0,a.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2 font-mono text-[10px] text-slate-700 font-bold uppercase mt-1`,children:[(0,a.jsx)(`span`,{className:`bg-blue-100 border border-blue-400 px-2 py-0.5`,children:`SELECT / JOIN`}),(0,a.jsx)(`span`,{className:`bg-emerald-100 border border-emerald-400 px-2 py-0.5`,children:`UPDATE / DELETE`}),(0,a.jsx)(`span`,{className:`bg-purple-100 border border-purple-400 px-2 py-0.5`,children:`WINDOW FUNCTIONS`})]})]}),(0,a.jsx)(`div`,{className:`w-full border-t border-slate-200 pt-4 flex flex-col gap-2 shrink-0`,children:(0,a.jsx)(`button`,{onClick:()=>g(!1),className:`w-full py-2.5 bg-[#0ea5e9] hover:bg-sky-400 text-white font-window-title font-bold text-xs uppercase border-[3px] border-ink-black shadow-[4px_4px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer text-center`,children:`CREATE NEW DATABASE`})})]})}export{o as default}; \ No newline at end of file +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Ht as n}from"./vendor-react-hnaVBnLv.js";import{s as r}from"./firebaseClient-DZobvwSx.js";var i=e(n(),1),a=t();function o(){let[e,t]=(0,i.useState)(null),[n,o]=(0,i.useState)(``),[s,c]=(0,i.useState)(!1),[l,u]=(0,i.useState)(!0),[d,f]=(0,i.useState)(``),[p,m]=(0,i.useState)(null),h=async()=>{u(!0),f(``);try{let{data:{session:e}}=await r.auth.getSession();if(!e){f(`Unauthenticated session`);return}let n=await fetch(`/api/challenges/mysql/status`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(n.ok){let e=await n.json();e.active?t(e):t(null)}else f(`Failed to fetch playground status.`)}catch{f(`Connection timed out.`)}finally{u(!1)}},g=async(e=!1)=>{u(!0),f(``),m(null);try{let{data:{session:n}}=await r.auth.getSession();if(!n){f(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/mysql/init${e?`?refresh=true`:``}`,{method:`POST`,headers:{Authorization:`Bearer ${n.access_token}`}});if(i.ok){let e=await i.json();t({active:!0,title:e.title,objective:e.objective,points:e.points,schema:e.schema,challenge_type:e.challenge_type,completed:!1,total_score:e.total_score})}else f(`Failed to initialize mock database playground.`)}catch{f(`Server connection error.`)}finally{u(!1)}};return(0,i.useEffect)(()=>{h()},[]),l?(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-arcade text-[10px]`,children:[(0,a.jsx)(`div`,{className:`animate-bounce mb-2`,children:`INITIALIZING SQL PLAYGROUND...`}),(0,a.jsx)(`div`,{className:`w-48 h-4 bg-white border-[3px] border-ink-black overflow-hidden relative`,children:(0,a.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#0ea5e9] w-1/2 animate-pulse border-r-2 border-ink-black`})})]}):e?(0,a.jsx)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm`,children:(0,a.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 custom-scrollbar flex flex-col gap-4`,children:[(0,a.jsxs)(`div`,{className:`flex justify-between items-center bg-slate-100 border-[3px] border-ink-black p-3 shrink-0`,children:[(0,a.jsxs)(`div`,{className:`flex gap-2`,children:[(0,a.jsx)(`span`,{className:`bg-blue-100 text-blue-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px] uppercase`,children:e.challenge_type}),(0,a.jsxs)(`span`,{className:`bg-yellow-100 text-yellow-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:[`+`,e.points,` PTS`]}),e.completed?(0,a.jsx)(`span`,{className:`bg-emerald-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`SOLVED`}):(0,a.jsx)(`span`,{className:`bg-rose-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`UNSOLVED`})]}),(0,a.jsxs)(`div`,{className:`font-arcade text-[8px] text-sky-700 font-bold bg-white border-2 border-ink-black px-2 py-0.5 shadow-[1px_1px_0_0_#1E293B]`,children:[`SCORE: `,e.total_score]})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-yellow-400 bg-yellow-50 p-3 rounded font-sans leading-relaxed text-xs`,children:[(0,a.jsx)(`h4`,{className:`font-arcade text-[9px] text-yellow-800 mb-1`,children:`PROBLEM`}),(0,a.jsx)(`p`,{className:`font-bold text-slate-800`,children:e.objective})]}),(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 flex items-center gap-1.5`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`schema`}),(0,a.jsx)(`span`,{children:`SCHEMA EXPLORER (MOCK INSTANCE)`})]}),(0,a.jsx)(`div`,{className:`grid grid-cols-2 gap-3 max-h-[140px] overflow-y-auto custom-scrollbar font-mono text-[10px]`,children:Object.entries(e.schema).map(([e,t])=>(0,a.jsxs)(`div`,{className:`border border-slate-300 p-2 bg-slate-50`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-blue-700 border-b border-slate-200 pb-0.5 mb-1 flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-[12px]`,children:`table_chart`}),e]}),(0,a.jsx)(`ul`,{className:`space-y-0.5 text-slate-600 text-[9px]`,children:t.map((e,t)=>(0,a.jsxs)(`li`,{className:`flex justify-between`,children:[(0,a.jsx)(`span`,{children:e.name}),(0,a.jsx)(`span`,{className:`text-slate-400 italic text-[8px]`,children:e.type})]},t))})]},e))})]}),(0,a.jsxs)(`div`,{className:`flex flex-col min-h-[120px]`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] mb-1 tracking-wide uppercase flex items-center gap-1`,children:[(0,a.jsx)(`span`,{className:`material-symbols-outlined text-sm text-sky-600`,children:`terminal`}),(0,a.jsx)(`span`,{children:`Enter SQL Query:`})]}),(0,a.jsx)(`textarea`,{value:n,onChange:e=>o(e.target.value),className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-3 border-[3px] border-ink-black rounded outline-none focus:ring-2 focus:ring-sky-500 text-xs leading-relaxed resize-none`,placeholder:`SELECT * FROM customers WHERE score > 100;`,spellCheck:`false`})]}),(0,a.jsxs)(`div`,{className:`flex gap-3`,children:[(0,a.jsx)(`button`,{onClick:()=>g(!0),className:`flex-1 bg-white hover:bg-slate-100 text-ink-black border-[3px] border-ink-black font-bold font-window-title text-xs py-2 shadow-[3px_3px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`NEW PROBLEM`}),(0,a.jsx)(`button`,{disabled:s,onClick:async()=>{if(n.trim()){c(!0),f(``),m(null);try{let{data:{session:e}}=await r.auth.getSession();if(!e){f(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/mysql/query`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({query:n})});if(i.ok){let e=await i.json();e.success?(m({columns:e.columns,rows:e.rows,rowsAffected:e.rows_affected,isCorrect:e.is_correct}),e.is_correct&&t(t=>t?{...t,completed:!0,total_score:e.total_score}:null),e.schema&&t(t=>t?{...t,schema:e.schema}:null)):f(e.error)}else f(`Database server query failure.`)}catch{f(`Query connection lost.`)}finally{c(!1)}}},className:`flex-[2] bg-highlight-pink text-white font-window-title font-bold py-2 border-[3px] border-ink-black shadow-[3px_3px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none hover:bg-pink-400 transition-all disabled:opacity-50 cursor-pointer text-center text-xs`,children:s?`EXECUTING SQL...`:`EXECUTE SQL QUERY`})]}),d&&(0,a.jsxs)(`div`,{className:`border-[3px] border-red-500 bg-red-50 text-red-800 p-3 font-mono text-xs whitespace-pre-wrap`,children:[(0,a.jsx)(`div`,{className:`font-bold mb-1`,children:`SQL RUNTIME / SYNTAX ERROR:`}),d]}),p&&(0,a.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-white p-3 flex flex-col`,children:[(0,a.jsxs)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 flex justify-between items-center`,children:[(0,a.jsx)(`span`,{children:`QUERY OUTPUT BUFFER`}),p.isCorrect&&(0,a.jsx)(`span`,{className:`text-green-600 font-bold animate-bounce text-[9px]`,children:`✓ ACCEPTED!`})]}),(0,a.jsxs)(`div`,{className:`text-[9px] text-slate-500 mb-2 font-mono`,children:[`Rows Affected: `,p.rowsAffected,` | Total Returned: `,p.rows.length]}),p.rows.length>0?(0,a.jsx)(`div`,{className:`overflow-x-auto border border-slate-300 max-h-[180px] custom-scrollbar`,children:(0,a.jsxs)(`table`,{className:`border-collapse w-full font-mono text-[9px] min-w-full`,children:[(0,a.jsx)(`thead`,{children:(0,a.jsx)(`tr`,{className:`bg-slate-100 border-b border-slate-300`,children:p.columns.map((e,t)=>(0,a.jsx)(`th`,{className:`border-r border-slate-300 p-1.5 text-left font-bold text-slate-700`,children:e},t))})}),(0,a.jsx)(`tbody`,{className:`divide-y divide-slate-200`,children:p.rows.map((e,t)=>(0,a.jsx)(`tr`,{className:`hover:bg-slate-50`,children:p.columns.map((t,n)=>(0,a.jsx)(`td`,{className:`border-r border-slate-200 p-1.5 text-slate-800 whitespace-nowrap`,children:e[t]===null?(0,a.jsx)(`span`,{className:`text-slate-300 italic`,children:`NULL`}):String(e[t])},n))},t))})]})}):(0,a.jsx)(`div`,{className:`p-3 border border-dashed border-slate-300 text-center text-slate-400 italic font-sans text-xs`,children:`Query executed successfully. Result set is empty (or modification completed).`})]})]})}):(0,a.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col justify-between items-center text-center text-ink-black text-xs md:text-sm font-sans select-none`,children:[(0,a.jsxs)(`div`,{className:`flex-1 flex flex-col justify-center items-center gap-4`,children:[(0,a.jsx)(`div`,{className:`w-16 h-16 bg-white border-[3px] border-ink-black flex items-center justify-center shadow-[4px_4px_0_0_#1E293B]`,children:(0,a.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-[#0ea5e9]`,style:{fontVariationSettings:`'FILL' 1`},children:`database`})}),(0,a.jsx)(`h3`,{className:`font-headline-md font-bold text-lg`,children:`Interactive MySQL Playground`}),(0,a.jsx)(`p`,{className:`max-w-md text-slate-600 leading-relaxed font-semibold`,children:`Practice SQL queries against realistic schema tables. Includes full support for:`}),(0,a.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2 font-mono text-[10px] text-slate-700 font-bold uppercase mt-1`,children:[(0,a.jsx)(`span`,{className:`bg-blue-100 border border-blue-400 px-2 py-0.5`,children:`SELECT / JOIN`}),(0,a.jsx)(`span`,{className:`bg-emerald-100 border border-emerald-400 px-2 py-0.5`,children:`UPDATE / DELETE`}),(0,a.jsx)(`span`,{className:`bg-purple-100 border border-purple-400 px-2 py-0.5`,children:`WINDOW FUNCTIONS`})]})]}),(0,a.jsx)(`div`,{className:`w-full border-t border-slate-200 pt-4 flex flex-col gap-2 shrink-0`,children:(0,a.jsx)(`button`,{onClick:()=>g(!1),className:`w-full py-2.5 bg-[#0ea5e9] hover:bg-sky-400 text-white font-window-title font-bold text-xs uppercase border-[3px] border-ink-black shadow-[4px_4px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer text-center`,children:`CREATE NEW DATABASE`})})]})}export{o as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/OnboardingModal-DmgTXeeL.js b/algospaced-ui/dist/assets/OnboardingModal-DmgTXeeL.js deleted file mode 100644 index 9abf137c995f6ebddc9fb3ec8e8c3312aab5085b..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/OnboardingModal-DmgTXeeL.js +++ /dev/null @@ -1 +0,0 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,Bt as n,C as r,Et as i,Rt as a,St as o,_ as s,a as c,ft as l,ht as u,it as d,o as f,v as p,vt as m,y as h,yt as g}from"./vendor-react-CIO8MTK1.js";import{a as _,i as v,l as y,o as b}from"./index-DnK6BACV.js";var x=e(n(),1),S=a(),C=[217,242,1,49,20];function w({isOpen:e,onClose:n,onCompleted:a,userId:w}){let[T,E]=(0,x.useState)(`welcome`),[D,O]=(0,x.useState)(new Set),[k,A]=(0,x.useState)(``),[j,M]=(0,x.useState)(`ALL`),[N,P]=(0,x.useState)({}),[F,I]=(0,x.useState)(!1),[L,R]=(0,x.useState)(null),[z,B]=(0,x.useState)(null),V=()=>`algospaced_onboarding_done_${w===`sandbox-user-id`?`sandbox`:w||`sandbox`}`;(0,x.useEffect)(()=>{if(e){let e=localStorage.getItem(V());E(e?`checklist`:`welcome`),B(null),R(null)}},[e,w]);let H=(0,x.useMemo)(()=>v(),[]),U=(0,x.useMemo)(()=>_(),[]),W=(0,x.useMemo)(()=>{let e=k.trim().toLowerCase();return H.filter(t=>j!==`ALL`&&t.pattern!==j?!1:!e||t.name.toLowerCase().includes(e)||t.problem_number.toString().includes(e)||t.pattern.toLowerCase().includes(e)||t.difficulty.toLowerCase().includes(e))},[H,k,j]),G=(0,x.useMemo)(()=>{let e=new Map;for(let t of W){let n=e.get(t.pattern)||[];n.push(t),e.set(t.pattern,n)}return e},[W]);if(!e)return null;let K=()=>{localStorage.setItem(V(),`true`)},q=async()=>{I(!0),B(null),R(`Enrolling 5 foundational starter problems...`);try{let e=C.map(e=>b(e)).filter(e=>e!==void 0);await y(e),K(),R(`All 5 starter problems enrolled into Box 1!`),setTimeout(()=>{a(),n()},700)}catch(e){console.error(`Failed to start from scratch:`,e),B(e instanceof Error?e.message:`Failed to enroll starter problems`),I(!1)}},J=e=>{O(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Y=e=>{let t=H.filter(t=>t.pattern===e),n=t.every(e=>D.has(e.problem_number));O(e=>{let r=new Set(e);for(let e of t)n?r.delete(e.problem_number):r.add(e.problem_number);return r})},X=e=>{O(t=>{let n=new Set(t);for(let t of H)t.difficulty===e&&n.add(t.problem_number);return n})},Z=()=>{O(new Set(H.map(e=>e.problem_number)))},Q=()=>{O(new Set)},$=e=>{P(t=>({...t,[e]:!t[e]}))};return(0,S.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/75 backdrop-blur-sm p-3 sm:p-6 overflow-y-auto`,children:(0,S.jsxs)(`div`,{className:`w-full max-w-4xl max-h-[92vh] bg-paper-white border-[4px] border-ink-black gadget-shadow flex flex-col relative overflow-hidden text-ink-black`,children:[(0,S.jsxs)(`div`,{className:`h-10 bg-gradient-to-r from-amber-400 via-amber-300 to-grass-green border-b-[3px] border-ink-black px-4 flex items-center justify-between shrink-0`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(`span`,{className:`w-3 h-3 rounded-full bg-rose-500 border border-ink-black`}),(0,S.jsx)(`span`,{className:`w-3 h-3 rounded-full bg-amber-500 border border-ink-black`}),(0,S.jsx)(`span`,{className:`w-3 h-3 rounded-full bg-emerald-500 border border-ink-black`}),(0,S.jsxs)(`span`,{className:`font-arcade text-[11px] font-bold tracking-wider text-ink-black uppercase ml-2 flex items-center gap-1.5`,children:[(0,S.jsx)(d,{className:`w-4 h-4 text-amber-900`}),`GET STARTED`]})]}),(0,S.jsx)(`button`,{onClick:()=>{K(),n()},disabled:F,className:`p-1 hover:bg-black/10 rounded transition-colors text-ink-black cursor-pointer border-0`,title:`Dismiss for now`,children:(0,S.jsx)(f,{className:`w-4 h-4`})})]}),T===`welcome`&&(0,S.jsxs)(`div`,{className:`p-6 sm:p-10 space-y-8 overflow-y-auto custom-scrollbar text-center`,children:[(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsxs)(`div`,{className:`inline-flex items-center gap-2 px-3 py-1 bg-amber-100 border-2 border-ink-black font-arcade text-[10px] font-bold text-amber-900 uppercase`,children:[(0,S.jsx)(h,{className:`w-3.5 h-3.5 text-amber-700`}),`WELCOME TO ALGOSPACED`]}),(0,S.jsx)(`h1`,{className:`font-headline-md text-2xl sm:text-4xl font-extrabold text-ink-black tracking-tight`,children:`How would you like to begin your journey?`}),(0,S.jsx)(`p`,{className:`font-sans text-xs sm:text-sm text-trash-gray max-w-xl mx-auto leading-relaxed font-semibold`,children:`AlgoSpaced uses a 5-box Leitner spaced repetition engine. Choose how to seed your active practice cards.`})]}),(0,S.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6 max-w-2xl mx-auto text-left`,children:[(0,S.jsxs)(`div`,{className:`p-5 sm:p-6 bg-gradient-to-br from-emerald-50 to-emerald-100/60 border-[3px] border-ink-black gadget-shadow hover:translate-y-[-2px] transition-all flex flex-col justify-between space-y-4`,children:[(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsx)(`div`,{className:`w-12 h-12 bg-grass-green border-2 border-ink-black rounded-xl flex items-center justify-center shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:(0,S.jsx)(o,{className:`w-6 h-6 text-ink-black stroke-[2.5]`})}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-emerald-800 uppercase tracking-wide`,children:`RECOMMENDED FOR BEGINNERS`}),(0,S.jsx)(`h2`,{className:`font-headline-md text-lg sm:text-xl font-bold text-ink-black mt-0.5`,children:`🌱 Start From Scratch`})]}),(0,S.jsx)(`p`,{className:`font-sans text-xs text-trash-gray leading-relaxed font-semibold`,children:`Begin with the 5 foundational starter problems: Contains Duplicate, Valid Anagram, Two Sum, Group Anagrams, and Valid Parentheses.`})]}),(0,S.jsx)(`button`,{onClick:q,disabled:F,className:`w-full py-3 bg-grass-green hover:bg-emerald-400 text-ink-black font-arcade text-[10px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center justify-center gap-2 disabled:opacity-50`,children:F?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`w-4 h-4 animate-spin`}),(0,S.jsx)(`span`,{children:`INITIALIZING...`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g,{className:`w-4 h-4 stroke-[3]`}),(0,S.jsx)(`span`,{children:`START FRESH (5 PROBLEMS)`})]})})]}),(0,S.jsxs)(`div`,{className:`p-5 sm:p-6 bg-gradient-to-br from-amber-50 to-orange-100/60 border-[3px] border-ink-black gadget-shadow hover:translate-y-[-2px] transition-all flex flex-col justify-between space-y-4`,children:[(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsx)(`div`,{className:`w-12 h-12 bg-amber-400 border-2 border-ink-black rounded-xl flex items-center justify-center shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:(0,S.jsx)(c,{className:`w-6 h-6 text-ink-black stroke-[2.5]`})}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-amber-800 uppercase tracking-wide`,children:`IF YOU'VE ALREADY SOLVED SOME PROBLEMS ELSEWHERE`}),(0,S.jsx)(`h2`,{className:`font-headline-md text-lg sm:text-xl font-bold text-ink-black mt-0.5`,children:`⚡ Fast-Track Checklist`})]}),(0,S.jsx)(`p`,{className:`font-sans text-xs text-trash-gray leading-relaxed font-semibold`,children:`Already solved some problems? Check off problems you've already solved elsewhere to seed your review queue and update your progress.`})]}),(0,S.jsxs)(`button`,{onClick:()=>E(`checklist`),disabled:F,className:`w-full py-3 bg-amber-400 hover:bg-amber-300 text-ink-black font-arcade text-[10px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center justify-center gap-2`,children:[(0,S.jsx)(`span`,{children:`SELECT WHAT I KNOW (150 POOL)`}),(0,S.jsx)(i,{className:`w-4 h-4 rotate-180`})]})]})]}),L&&(0,S.jsx)(`p`,{className:`font-arcade text-[10px] text-emerald-700 font-bold animate-pulse`,children:L}),z&&(0,S.jsx)(`p`,{className:`font-arcade text-[10px] text-rose-600 font-bold`,children:z})]}),T===`checklist`&&(0,S.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden`,children:[(0,S.jsxs)(`div`,{className:`p-3 sm:p-4 bg-amber-50/60 border-b-[2px] border-ink-black shrink-0 space-y-3`,children:[(0,S.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(`button`,{onClick:()=>E(`welcome`),className:`px-2.5 py-1.5 bg-paper-white hover:bg-slate-100 border-2 border-ink-black font-arcade text-[9px] font-bold text-ink-black flex items-center gap-1 cursor-pointer transition-colors shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`,children:[(0,S.jsx)(i,{className:`w-3.5 h-3.5`}),`BACK`]}),(0,S.jsx)(`h2`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black`,children:`Fast-Track Catalog Checklist`})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2 bg-paper-white border-2 border-ink-black p-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,S.jsx)(`span`,{className:`font-arcade text-[8px] font-bold text-trash-gray px-1 uppercase`,children:`FSRS STATE:`}),(0,S.jsx)(`span`,{className:`px-2 py-1 font-arcade text-[9px] font-bold bg-amber-400 text-ink-black border border-ink-black`,children:`ALL START AS 'NEW'`})]})]}),(0,S.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2 items-center justify-between`,children:[(0,S.jsxs)(`div`,{className:`relative w-full sm:w-72`,children:[(0,S.jsx)(r,{className:`w-3.5 h-3.5 text-trash-gray absolute left-3 top-1/2 -translate-y-1/2`}),(0,S.jsx)(`input`,{type:`text`,value:k,onChange:e=>A(e.target.value),placeholder:`Search by title, number, or pattern...`,"aria-label":`Search problems by title, number, or pattern`,className:`w-full pl-8 pr-3 py-1.5 bg-paper-white border-2 border-ink-black font-sans text-xs text-ink-black font-medium outline-none focus:bg-amber-50`}),k&&(0,S.jsx)(`button`,{onClick:()=>A(``),"aria-label":`Clear search`,className:`absolute right-2 top-1/2 -translate-y-1/2 text-trash-gray hover:text-ink-black p-0.5 cursor-pointer`,children:(0,S.jsx)(f,{className:`w-3 h-3`})})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap w-full sm:w-auto justify-end`,children:[(0,S.jsx)(`button`,{onClick:()=>X(`Easy`),className:`px-2 py-1 bg-emerald-100 hover:bg-emerald-200 border border-emerald-800 text-emerald-900 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`+ ALL EASY`}),(0,S.jsx)(`button`,{onClick:()=>X(`Medium`),className:`px-2 py-1 bg-amber-100 hover:bg-amber-200 border border-amber-800 text-amber-900 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`+ ALL MEDIUM`}),(0,S.jsx)(`button`,{onClick:Z,className:`px-2 py-1 bg-purple-100 hover:bg-purple-200 border border-purple-800 text-purple-900 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`SELECT ALL (150)`}),(0,S.jsx)(`button`,{onClick:Q,className:`px-2 py-1 bg-slate-100 hover:bg-slate-200 border border-slate-700 text-slate-800 font-arcade text-[8px] font-bold cursor-pointer transition-colors`,children:`CLEAR`})]})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 overflow-x-auto custom-scrollbar pb-1 text-[8px] font-arcade font-bold`,children:[(0,S.jsxs)(`button`,{onClick:()=>M(`ALL`),className:`px-2 py-0.5 border cursor-pointer shrink-0 transition-colors ${j===`ALL`?`bg-ink-black text-amber-300 border-ink-black`:`bg-paper-white text-trash-gray border-slate-300 hover:text-ink-black`}`,children:[`ALL PATTERNS (`,H.length,`)`]}),U.map(e=>{let t=H.filter(t=>t.pattern===e).length;return(0,S.jsxs)(`button`,{onClick:()=>M(e),className:`px-2 py-0.5 border cursor-pointer shrink-0 transition-colors ${j===e?`bg-ink-black text-amber-300 border-ink-black`:`bg-paper-white text-trash-gray border-slate-300 hover:text-ink-black`}`,children:[e.toUpperCase(),` (`,t,`)`]},e)})]})]}),(0,S.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 sm:p-6 custom-scrollbar space-y-4 bg-slate-50/50`,children:[Array.from(G.entries()).map(([e,t])=>{let n=t.filter(e=>D.has(e.problem_number)).length,r=n===t.length,i=N[e]!==!1;return(0,S.jsxs)(`div`,{className:`bg-paper-white border-2 border-ink-black gadget-shadow overflow-hidden`,children:[(0,S.jsxs)(`div`,{className:`px-3.5 py-2.5 bg-gradient-to-r from-amber-100 to-amber-50 border-b-2 border-ink-black flex items-center justify-between`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(`button`,{onClick:()=>$(e),className:`p-1 hover:bg-black/10 rounded cursor-pointer transition-colors text-ink-black`,children:i?(0,S.jsx)(u,{className:`w-3.5 h-3.5`}):(0,S.jsx)(m,{className:`w-3.5 h-3.5`})}),(0,S.jsx)(`span`,{className:`font-headline-md text-xs sm:text-sm font-bold text-ink-black`,children:e}),(0,S.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold px-1.5 py-0.5 rounded bg-amber-900/10 text-amber-900 border border-amber-900/20`,children:[n,` / `,t.length,` selected`]})]}),(0,S.jsx)(`button`,{onClick:()=>Y(e),className:`px-2 py-1 font-arcade text-[8px] font-bold border border-ink-black bg-paper-white hover:bg-amber-200 transition-colors cursor-pointer flex items-center gap-1 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)]`,children:r?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(p,{className:`w-3 h-3 text-emerald-600`}),(0,S.jsx)(`span`,{children:`DESELECT ALL`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(s,{className:`w-3 h-3 text-slate-500`}),(0,S.jsx)(`span`,{children:`SELECT ALL`})]})})]}),i&&(0,S.jsx)(`div`,{className:`p-3 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2`,children:t.map(e=>{let t=D.has(e.problem_number);return(0,S.jsxs)(`div`,{onClick:()=>J(e.problem_number),className:`p-2.5 border-2 transition-all cursor-pointer select-none flex items-start gap-2.5 ${t?`bg-amber-50/80 border-amber-600 shadow-[2px_2px_0px_0px_#d97706]`:`bg-paper-white border-slate-300 hover:border-ink-black`}`,children:[(0,S.jsx)(`div`,{className:`mt-0.5 shrink-0`,children:t?(0,S.jsx)(p,{className:`w-4 h-4 text-emerald-600 stroke-[2.5]`}):(0,S.jsx)(s,{className:`w-4 h-4 text-slate-400 stroke-[2]`})}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,S.jsxs)(`span`,{className:`font-mono text-[9px] font-bold text-trash-gray`,children:[`#`,e.problem_number]}),(0,S.jsx)(`span`,{className:`px-1.5 py-0.2 rounded font-arcade text-[7px] font-bold uppercase text-white ${e.difficulty===`Easy`?`bg-emerald-600`:e.difficulty===`Medium`?`bg-amber-600`:`bg-rose-600`}`,children:e.difficulty})]}),(0,S.jsx)(`h3`,{className:`font-headline-md text-xs font-bold text-ink-black truncate mt-0.5`,children:e.name}),(0,S.jsxs)(`div`,{className:`text-[10px] font-code-mono text-slate-500 truncate mt-0.5`,children:[`T: `,e.time_complexity,` | S: `,e.space_complexity]})]})]},e.problem_number)})})]},e)}),G.size===0&&(0,S.jsxs)(`div`,{className:`p-8 text-center bg-paper-white border-2 border-dashed border-slate-300 text-trash-gray space-y-2`,children:[(0,S.jsx)(r,{className:`w-8 h-8 mx-auto text-slate-400`}),(0,S.jsx)(`p`,{className:`font-arcade text-xs font-bold`,children:`NO MATCHING PROBLEMS FOUND`}),(0,S.jsx)(`p`,{className:`text-xs font-sans`,children:`Try searching another keyword or clearing filters.`})]})]}),(0,S.jsxs)(`div`,{className:`p-3 sm:p-4 bg-paper-white border-t-[3px] border-ink-black shrink-0 flex flex-col sm:flex-row items-center justify-between gap-3 shadow-[0px_-4px_10px_rgba(0,0,0,0.05)]`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-emerald-100 border border-emerald-800 flex items-center justify-center`,children:(0,S.jsx)(l,{className:`w-4 h-4 text-emerald-700`})}),(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`font-arcade text-[10px] font-bold text-ink-black`,children:[D.size,` of `,H.length,` PROBLEMS SELECTED`]}),(0,S.jsx)(`div`,{className:`font-sans text-[11px] text-trash-gray font-semibold`,children:`Target: FSRS (New)`})]})]}),(0,S.jsxs)(`div`,{className:`flex items-center gap-2 w-full sm:w-auto justify-end`,children:[z&&(0,S.jsx)(`span`,{className:`font-arcade text-[9px] text-rose-600 font-bold mr-2 truncate`,children:z}),(0,S.jsx)(`button`,{onClick:async()=>{if(D.size!==0){I(!0),B(null),R(`Enrolling ${D.size} problems into FSRS...`);try{let e=H.filter(e=>D.has(e.problem_number));await y(e),K(),R(`Successfully enrolled ${e.length} problems!`),setTimeout(()=>{a(),n()},700)}catch(e){console.error(`Failed to batch activate:`,e),B(e instanceof Error?e.message:`Failed to enroll problems`),I(!1)}}},disabled:D.size===0||F,className:`w-full sm:w-auto px-6 py-2.5 bg-gradient-to-r from-amber-400 to-grass-green hover:from-amber-300 hover:to-emerald-400 text-ink-black font-arcade text-[10px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center justify-center gap-2 disabled:opacity-40 disabled:cursor-not-allowed`,children:F?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`w-3.5 h-3.5 animate-spin`}),(0,S.jsx)(`span`,{children:`ENROLLING...`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(c,{className:`w-3.5 h-3.5 text-amber-900`}),(0,S.jsxs)(`span`,{children:[`ENROLL `,D.size,` PROBLEMS (FSRS)`]})]})})]})]})]})]})})}export{w as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/PrincessChamber-5t89aBn-.js b/algospaced-ui/dist/assets/PrincessChamber-5t89aBn-.js deleted file mode 100644 index 3e3507c873d1aa9021696cc9a0ae84f425b46f49..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/PrincessChamber-5t89aBn-.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{Bt as n,I as r,O as i,Rt as a,S as o,St as s,T as c,U as l,a as u,bt as d,c as f,ct as p,ft as m,k as h,l as g,o as _,p as v,y}from"./vendor-react-CIO8MTK1.js";import{C as b,S as x,_ as S,b as C,g as w,v as T,x as E,y as D}from"./index-DnK6BACV.js";var O=t(n(),1),k={1:{particleType:`pollen`,particleCount:16,particleColors:[`#FDE047`,`#FEF08A`,`#86EFAC`],gradientBg:`from-[#FFFDF0] via-[#FFF9E6] to-[#FEF3C7]`,glowColor:`rgba(251, 191, 36, 0.3)`,badgeLabel:`🌾 Plains Breeze`},2:{particleType:`leaves`,particleCount:18,particleColors:[`#86EFAC`,`#4ADE80`,`#22C55E`,`#A7F3D0`],gradientBg:`from-[#F0FDF4] via-[#DCFCE7] to-[#FEF9C3]`,glowColor:`rgba(34, 197, 94, 0.3)`,badgeLabel:`🍃 Whispering Leaves`},3:{particleType:`spores`,particleCount:22,particleColors:[`#67E8F9`,`#38BDF8`,`#818CF8`,`#C084FC`],gradientBg:`from-[#F0F9FF] via-[#E0F2FE] to-[#EDE9FE]`,glowColor:`rgba(56, 189, 248, 0.35)`,badgeLabel:`✨ Crystal Spores`},4:{particleType:`snow`,particleCount:28,particleColors:[`#FFFFFF`,`#E0F2FE`,`#BAE6FD`],gradientBg:`from-[#F8FAFC] via-[#F1F5F9] to-[#E2E8F0]`,glowColor:`rgba(186, 230, 253, 0.4)`,badgeLabel:`❄️ Alpine Snowfall`},5:{particleType:`runes`,particleCount:20,particleColors:[`#E879F9`,`#C084FC`,`#A855F7`,`#F472B6`],gradientBg:`from-[#FAF5FF] via-[#F3E8FF] to-[#FCE7F3]`,glowColor:`rgba(192, 132, 252, 0.4)`,badgeLabel:`🔮 Arcane Runes`},6:{particleType:`stardust`,particleCount:35,particleColors:[`#FDE047`,`#F59E0B`,`#E11D48`,`#818CF8`],gradientBg:`from-[#FFFBEB] via-[#FEF3C7] to-[#FFE4E6]`,glowColor:`rgba(245, 158, 11, 0.5)`,badgeLabel:`👑 Spire Gates`}};function A(e){return e<=30?k[1]:e<=60?k[2]:e<=90?k[3]:e<=120?k[4]:e<150?k[5]:k[6]}var j=a();function M({emotion:e,floor:t,rhythm:n,activity:r,isLoading:i=!1,className:a=``,onClick:o}){let s=T[e]||T.smiling_warmly,c=(0,O.useMemo)(()=>A(t),[t]),l=(0,O.useMemo)(()=>{switch(n){case`dawn`:return`from-amber-400/30 via-yellow-300/20 to-transparent`;case`dusk`:return`from-orange-500/30 via-purple-500/20 to-transparent`;case`night`:return`from-indigo-600/30 via-blue-500/20 to-transparent`;default:return`from-amber-300/25 via-sky-300/20 to-transparent`}},[n]);return(0,j.jsxs)(`div`,{onClick:o,className:`relative flex flex-col items-center justify-end select-none pointer-events-auto transition-transform ${a}`,children:[(0,j.jsx)(`div`,{className:`absolute -inset-10 overflow-hidden pointer-events-none z-0`,children:Array.from({length:Math.min(16,c.particleCount)}).map((e,t)=>{let n=c.particleColors[t%c.particleColors.length],r=`${t*17%100}%`,i=`${7+t%5*2}s`,a=`${t*.8%4}s`,o=c.particleType===`leaves`||c.particleType===`runes`?`w-2 h-2`:`w-1.5 h-1.5`;return(0,j.jsx)(`span`,{className:`absolute rounded-full opacity-60 animate-pulse ${o}`,style:{backgroundColor:n,left:r,top:`${t*21%90}%`,boxShadow:`0 0 10px ${n}`,animationDuration:i,animationDelay:a}},t)})}),(0,j.jsx)(`div`,{className:`absolute bottom-4 inset-x-0 h-48 sm:h-72 md:h-96 bg-radial ${l} blur-2xl opacity-70 pointer-events-none z-0`}),(0,j.jsxs)(`div`,{className:`relative z-10 flex flex-col items-start justify-end`,children:[r&&(0,j.jsx)(`div`,{className:`mb-2 max-w-[120px] sm:max-w-xs text-center pointer-events-none animate-in fade-in duration-300`,children:(0,j.jsxs)(`span`,{className:`text-[9px] sm:text-[10px] font-mono font-medium text-[#bfe1ff] bg-[#101e2e]/85 px-2 sm:px-2.5 py-0.5 rounded-full border border-[#3e6080]/70 shadow-md inline-flex items-center gap-1 sm:gap-1.5 backdrop-blur-xs`,children:[(0,j.jsx)(`span`,{className:`text-amber-400`,children:`🏰`}),(0,j.jsx)(`span`,{className:`truncate`,children:r})]})}),(0,j.jsx)(`div`,{className:`relative h-[28vh] sm:h-[40vh] md:h-[46vh] lg:h-[50vh] max-h-[220px] sm:max-h-[380px] md:max-h-[460px] lg:max-h-[500px] min-h-[160px] sm:min-h-[240px] md:min-h-[300px] w-auto max-w-[110px] sm:max-w-[200px] md:max-w-[270px] lg:max-w-[320px] flex items-end justify-end`,children:(0,j.jsx)(`img`,{src:s.imagePath,alt:s.label,loading:`eager`,className:`h-full w-auto max-h-[85vh] object-contain object-bottom-left drop-shadow-[0_16px_32px_rgba(0,0,0,0.55)] transition-all duration-300 ${i?`scale-[1.02] filter brightness-110 saturate-125`:`scale-100`}`,onError:e=>{let t=e.currentTarget;t.src.endsWith(`/sprites/princess/smiling_warmly.webp`)?t.src.endsWith(`/sprites/princess/neutral.webp`)||(t.src=`/sprites/princess/neutral.webp`):t.src=`/sprites/princess/smiling_warmly.webp`}})})]})]})}var N=[`I solved a tough task today!`,`I'm feeling stuck on something.`,`Just need a breather.`],P={backgroundColor:`rgba(20, 36, 54, 0.94)`,boxShadow:`0 0 0 2px #0a1420, inset 0 0 0 3px #4c7396, inset 1px 1px 0 4px #8db7dc, inset -1px -1px 0 4px #1a2c3f, inset 0 0 0 5px #0c1724, 0 10px 28px rgba(0, 0, 0, 0.75)`};function F({characterName:e,text:t,isStreaming:n=!1,isLoading:i=!1,choices:a,toolCalls:o,onSelectChoice:s,onSendMessage:l,onTypingStatusChange:u,currentFloor:p,bondTier:m,satchelCount:v=0,isMuted:b=!1,onToggleMute:x,onOpenProgress:S,onOpenSatchel:C,onOpenHistory:w,onMinimize:T,onClose:E,className:D=``}){let[k,A]=(0,O.useState)(``),[M,F]=(0,O.useState)(!1),[I,L]=(0,O.useState)(0),[R,z]=(0,O.useState)(``),[B,V]=(0,O.useState)(!1),H=(0,O.useRef)(t),U=(0,O.useRef)(!1),W=(0,O.useRef)(null),G=(0,O.useRef)(null),K=n||M;(0,O.useEffect)(()=>{u?.(K)},[K,u]);let q=(0,O.useMemo)(()=>Array.isArray(a)&&a.length>0?a.slice(0,4):N,[a]),J=I{if(n){W.current&&=(clearInterval(W.current),null),U.current=!0,H.current=t;return}if(U.current){U.current=!1,H.current=t,W.current&&=(clearInterval(W.current),null);return}if(t!==H.current&&!i){if(H.current=t,!t){W.current&&=(clearInterval(W.current),null);return}W.current&&clearInterval(W.current);let e=0,n=setInterval(()=>{e++,A(t.slice(0,e)),F(!0),e>=t.length&&(clearInterval(n),W.current=null,F(!1))},20);return W.current=n,()=>{clearInterval(n),W.current=null,F(!1)}}},[t,i,n]);let X=(0,O.useCallback)(()=>{W.current&&=(clearInterval(W.current),null),F(!1)},[]),Z=()=>{let e=R.trim();!e||i||n||(l(e),z(``))};return(0,O.useEffect)(()=>{let e=e=>{if(e.key===`Escape`&&E){e.preventDefault(),E();return}if(!B){if(e.key>=`1`&&e.key<=String(q.length)){let t=parseInt(e.key,10)-1;q[t]&&!i&&!n&&(e.preventDefault(),s(q[t]));return}if(e.key===`ArrowUp`){e.preventDefault(),L(e=>(e-1+q.length)%q.length);return}if(e.key===`ArrowDown`){e.preventDefault(),L(e=>(e+1)%q.length);return}if(e.key===`Enter`){!i&&!n&&q[J]&&(e.preventDefault(),s(q[J]));return}e.key===` `&&K&&(e.preventDefault(),X())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[B,q,J,i,n,K,s,X,E]),(0,j.jsxs)(`div`,{className:`relative flex flex-col gap-2 w-full ${D}`,children:[(0,j.jsxs)(`div`,{onClick:X,className:`relative w-full rounded-md sm:rounded-lg text-white pt-3.5 pb-3.5 pr-3.5 pl-8 sm:pt-5 sm:pb-5 sm:pr-5 sm:pl-14 md:pl-16 lg:pl-18 flex flex-col gap-2.5 backdrop-blur-md transition-all select-none cursor-pointer`,style:P,children:[(0,j.jsxs)(`div`,{className:`absolute -top-7 right-1 flex items-center gap-1 sm:gap-1.5 z-30`,onClick:e=>e.stopPropagation(),children:[S&&(0,j.jsxs)(`button`,{type:`button`,onClick:S,className:`px-2 py-0.5 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[10px] sm:text-[11px] font-mono font-bold text-[#8cb4db] hover:text-white transition-all cursor-pointer flex items-center gap-1 shadow-md`,title:`Spire Tower Road (Floor Progress)`,children:[(0,j.jsx)(d,{className:`w-3 h-3 text-amber-400`}),(0,j.jsxs)(`span`,{children:[p,`/150 LC`]})]}),C&&(0,j.jsxs)(`button`,{type:`button`,onClick:C,className:`px-2 py-0.5 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[10px] sm:text-[11px] font-mono font-bold text-[#8cb4db] hover:text-white transition-all cursor-pointer flex items-center gap-1 shadow-md`,title:`Open Royal Satchel`,children:[(0,j.jsx)(c,{className:`w-3 h-3 text-amber-400`}),(0,j.jsx)(`span`,{className:`hidden sm:inline`,children:`Satchel`}),v>0&&(0,j.jsxs)(`span`,{className:`text-[9px] text-[#f3cb65]`,children:[`(`,v,`)`]})]}),w&&(0,j.jsxs)(`button`,{type:`button`,onClick:w,className:`px-2 py-0.5 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[10px] sm:text-[11px] font-mono font-bold text-[#8cb4db] hover:text-white transition-all cursor-pointer flex items-center gap-1 shadow-md`,title:`Dialogue Transcript`,children:[(0,j.jsx)(h,{className:`w-3 h-3 text-[#8cb4db]`}),(0,j.jsx)(`span`,{className:`hidden sm:inline`,children:`Log`})]}),x&&(0,j.jsx)(`button`,{type:`button`,onClick:x,className:`p-1 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[#8cb4db] hover:text-white transition-all cursor-pointer shadow-md`,title:b?`Unmute Audio`:`Mute Audio`,children:b?(0,j.jsx)(f,{className:`w-3 h-3`}):(0,j.jsx)(g,{className:`w-3 h-3`})}),T&&(0,j.jsx)(`button`,{type:`button`,onClick:T,className:`p-1 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[#8cb4db] hover:text-white transition-all cursor-pointer shadow-md`,title:`Minimize to Taskbar`,children:(0,j.jsx)(r,{className:`w-3 h-3`})}),E&&(0,j.jsx)(`button`,{type:`button`,onClick:E,className:`p-1 bg-[#101e2e]/90 hover:bg-rose-900/70 border border-[#3e6080]/80 hover:border-rose-400 rounded text-[#8cb4db] hover:text-rose-200 transition-all cursor-pointer shadow-md`,title:`Leave Parlor (Esc)`,children:(0,j.jsx)(_,{className:`w-3 h-3`})})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`font-mono text-sm sm:text-base font-bold text-[#f3cb65] tracking-wide drop-shadow-[0_1px_2px_rgba(0,0,0,0.9)]`,children:[`-`,e||`Princess Aurelia`,`-`]}),m&&(0,j.jsx)(`span`,{className:`hidden md:inline-block text-[9px] font-mono text-[#8cb4db] bg-[#101d2c]/80 border border-[#3e6080]/60 px-1.5 py-0.2 rounded uppercase tracking-wider`,children:m})]}),(0,j.jsxs)(`div`,{className:`min-h-[48px] sm:min-h-[54px] flex flex-col justify-start`,children:[i?(0,j.jsxs)(`div`,{className:`flex items-center gap-2 py-1 text-xs sm:text-sm font-mono text-[#8cb4db]`,children:[(0,j.jsx)(`span`,{className:`inline-block w-2 h-2 bg-[#f3cb65] rounded-full animate-ping`}),(0,j.jsxs)(`span`,{children:[e||`Princess Aurelia`,` is attuning the crystal relay...`]})]}):(0,j.jsxs)(`div`,{className:`font-mono text-xs sm:text-sm md:text-[15px] leading-relaxed text-[#e6edf4] select-text`,children:[(e=>e.split(/(\*[^*]+\*)/g).map((e,t)=>e.startsWith(`*`)&&e.endsWith(`*`)?(0,j.jsx)(`span`,{className:`text-[#f3cb65] italic font-semibold mr-1 inline-block`,children:e},t):(0,j.jsx)(`span`,{children:e},t)))(Y),K&&(0,j.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-[#f3cb65] ml-1 animate-pulse align-middle`})]}),o&&o.length>0&&!i&&(0,j.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5 select-none`,children:o.map((e,t)=>(0,j.jsxs)(`span`,{className:`px-2 py-0.5 rounded bg-[#102438] border border-[#44729b] text-[10px] font-mono font-bold text-[#bfe1ff] flex items-center gap-1`,children:[(0,j.jsx)(y,{className:`w-2.5 h-2.5 text-[#f3cb65]`}),(0,j.jsxs)(`span`,{children:[`Enchantment: `,e.name]})]},t))})]}),(0,j.jsx)(`div`,{className:`flex flex-col gap-1 pt-1`,onClick:e=>e.stopPropagation(),children:q.map((e,t)=>{let r=t+1,a=J===t;return(0,j.jsxs)(`button`,{type:`button`,disabled:i||n,onClick:()=>s(e),onMouseEnter:()=>L(t),className:`w-full sm:max-w-[90%] md:max-w-[85%] text-left flex items-center gap-2 px-2.5 py-1 rounded-xs sm:rounded-sm transition-all select-none font-mono text-xs sm:text-sm disabled:opacity-40 disabled:cursor-not-allowed ${a&&!i&&!n?`bg-[#1c3e61]/80 border border-[#4883b6]/80 shadow-[0_0_12px_rgba(72,131,182,0.25)] cursor-pointer`:`border border-transparent hover:bg-[#1c3e61]/35 cursor-pointer`}`,children:[(0,j.jsxs)(`span`,{className:`font-bold shrink-0 ${a?`text-[#e2ecf7]`:`text-[#b4c8dc]`}`,children:[r,`.`]}),(0,j.jsxs)(`span`,{className:`truncate font-medium ${a?`text-[#f3cb65]`:`text-[#dde7f2]`}`,children:[`[`,e,`]`]})]},t)})})]}),(0,j.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),Z()},onClick:e=>e.stopPropagation(),className:`w-full rounded-md sm:rounded-lg text-white py-2 sm:py-2.5 pr-3 sm:pr-4 pl-8 sm:pl-14 md:pl-16 lg:pl-18 flex items-center gap-2 backdrop-blur-md transition-all select-none`,style:P,children:[(0,j.jsx)(`span`,{className:`font-mono text-sm sm:text-base font-bold text-[#e2ecf7] select-none pl-0.5 shrink-0`,children:`>`}),(0,j.jsxs)(`div`,{className:`flex-1 flex items-center bg-[#101e2e]/90 border border-[#3b5d7d] rounded px-2.5 py-1 focus-within:border-[#67b1ec] focus-within:ring-1 focus-within:ring-[#67b1ec]/40 shadow-inner`,children:[(0,j.jsx)(`span`,{className:`text-[#f3cb65] font-mono text-xs sm:text-sm select-none mr-1.5 shrink-0`,children:`[`}),(0,j.jsx)(`input`,{ref:G,type:`text`,value:R,onChange:e=>z(e.target.value),onFocus:()=>V(!0),onBlur:()=>V(!1),disabled:i||n,placeholder:`Speak with ${e||`Princess Aurelia`}...`,className:`flex-1 bg-transparent border-none text-[#e2ecf7] placeholder-[#f3cb65]/70 font-mono text-xs sm:text-sm focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed`}),(0,j.jsx)(`span`,{className:`text-[#f3cb65] font-mono text-xs sm:text-sm select-none ml-1.5 shrink-0`,children:`]`})]}),(0,j.jsxs)(`button`,{type:`submit`,disabled:i||n||!R.trim(),className:`bg-[#34597b] hover:bg-[#3f6990] active:bg-[#2b4c6e] disabled:opacity-40 disabled:cursor-not-allowed border border-[#5c8cb5] hover:border-[#8db7dc] rounded px-3 sm:px-4 py-1 text-xs sm:text-sm font-mono font-bold text-white transition-all cursor-pointer shadow-md select-none shrink-0 flex items-center`,children:[(0,j.jsx)(`span`,{className:`text-[#f3cb65]`,children:`[`}),(0,j.jsx)(`span`,{className:`text-white px-1`,children:`Send`}),(0,j.jsx)(`span`,{className:`text-[#f3cb65]`,children:`]`})]})]})]})}function I({currentFloor:e,onClose:t}){let n=b(e),r=Math.min(100,Math.round(e/150*100));return(0,j.jsx)(`div`,{className:`absolute inset-0 z-50 bg-ink-black/40 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 select-none`,onClick:t,children:(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black rounded-xl p-4 sm:p-5 max-w-md w-full shadow-[6px_6px_0px_0px_#1E293B] flex flex-col gap-3.5`,onClick:e=>e.stopPropagation(),children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(d,{className:`w-5 h-5 text-indigo-600`}),(0,j.jsx)(`h4`,{className:`font-headline-md font-bold text-sm text-ink-black m-0`,children:`Journey to the Big-O Spire`})]}),(0,j.jsx)(`button`,{type:`button`,onClick:t,className:`p-1 hover:bg-slate-200 rounded text-slate-700 cursor-pointer`,title:`Close`,children:(0,j.jsx)(_,{className:`w-4 h-4`})})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between text-xs font-bold font-headline-md`,children:[(0,j.jsx)(`span`,{children:`Path Progress:`}),(0,j.jsxs)(`span`,{className:`font-arcade bg-indigo-100 text-indigo-900 px-2 py-0.5 rounded border border-indigo-300`,children:[e,` / 150 Leagues`]})]}),(0,j.jsx)(`div`,{className:`w-full bg-slate-200 h-4 border-[2px] border-ink-black rounded-full overflow-hidden p-0.5`,children:(0,j.jsx)(`div`,{className:`bg-gradient-to-r from-amber-400 via-yellow-400 to-emerald-400 h-full rounded-full transition-all duration-500`,style:{width:`${r}%`}})}),(0,j.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-trash-gray font-medium`,children:[(0,j.jsxs)(`span`,{children:[`Progress: `,(0,j.jsxs)(`strong`,{children:[r,`%`]})]}),(0,j.jsxs)(`span`,{children:[`Distance to Tower: `,(0,j.jsxs)(`strong`,{children:[Math.max(0,150-e),` leagues`]})]})]})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[2px] border-ink-black rounded-lg p-3 shadow-[2px_2px_0px_0px_#1E293B] flex flex-col gap-1`,children:[(0,j.jsx)(`div`,{className:`text-[10px] font-bold uppercase text-amber-700 tracking-wider`,children:`Current Realm:`}),(0,j.jsx)(`div`,{className:`font-bold text-xs text-ink-black`,children:n.title}),(0,j.jsx)(`p`,{className:`text-[11px] text-slate-600 m-0 leading-relaxed font-medium`,children:n.description}),(0,j.jsxs)(`div`,{className:`text-[10px] text-amber-900 bg-amber-50 p-1.5 rounded border border-amber-200 italic mt-1`,children:[`📜 `,n.bgLore]})]}),(0,j.jsx)(`div`,{className:`flex items-center justify-between gap-1 text-center`,children:[{floor:30,label:`Arrays`},{floor:60,label:`Pointers`},{floor:90,label:`Trees`},{floor:120,label:`Heaps`},{floor:150,label:`Spire`}].map(t=>{let n=e>=t.floor;return(0,j.jsxs)(`div`,{className:`flex-1 p-1.5 rounded border text-[10px] flex flex-col items-center ${n?`bg-emerald-100 border-emerald-600 text-emerald-900 font-bold`:`bg-slate-100 border-slate-300 text-slate-500`}`,children:[(0,j.jsx)(`span`,{children:n?`✓`:t.floor}),(0,j.jsx)(`span`,{className:`text-[9px] truncate w-full`,children:t.label})]},t.floor)})}),(0,j.jsx)(`div`,{className:`flex items-center justify-end border-t border-slate-200 pt-2 mt-1`,children:(0,j.jsx)(`button`,{type:`button`,onClick:t,className:`px-4 py-1.5 bg-white hover:bg-slate-100 border-[1.5px] border-ink-black rounded font-bold text-xs text-ink-black cursor-pointer shadow-xs active:translate-y-0.5`,children:`Done`})})]})})}function L({unlockedLetters:e,spireChronicles:t,currentFloor:n,heroCodex:r,episodicEvents:i,recentToolTelemetry:a,onRemoveCodexItem:d,onClose:f}){let[h,g]=(0,O.useState)(`letters`),[b,S]=(0,O.useState)(e[e.length-1]||null);return(0,j.jsx)(`div`,{className:`absolute inset-0 z-50 bg-ink-black/50 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 select-none`,onClick:f,children:(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black rounded-xl max-w-lg w-full h-[85%] max-h-[560px] shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,j.jsxs)(`div`,{className:`bg-white border-b-[2px] border-ink-black px-4 py-2.5 flex items-center justify-between shrink-0`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(c,{className:`w-5 h-5 text-amber-700`}),(0,j.jsx)(`h4`,{className:`font-headline-md font-bold text-sm text-ink-black m-0`,children:`The Royal Satchel`})]}),(0,j.jsx)(`button`,{type:`button`,onClick:f,className:`p-1 hover:bg-slate-200 rounded text-slate-700 cursor-pointer`,title:`Close`,children:(0,j.jsx)(_,{className:`w-4 h-4`})})]}),(0,j.jsxs)(`div`,{className:`flex border-b-2 border-ink-black bg-amber-100/70 shrink-0`,children:[(0,j.jsxs)(`button`,{type:`button`,onClick:()=>g(`letters`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer border-r border-ink-black/20 ${h===`letters`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,j.jsx)(c,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Missives (`,e.length,`/5)`]})]}),(0,j.jsxs)(`button`,{type:`button`,onClick:()=>g(`diary`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer border-r border-ink-black/20 ${h===`diary`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,j.jsx)(s,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Chronicles (`,t.length,`)`]})]}),(0,j.jsxs)(`button`,{type:`button`,onClick:()=>g(`codex`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer ${h===`codex`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,j.jsx)(y,{className:`w-3.5 h-3.5 text-amber-700`}),(0,j.jsx)(`span`,{children:`Codex`})]})]}),(0,j.jsxs)(`div`,{className:`flex-1 p-3 sm:p-4 overflow-y-auto custom-scrollbar flex flex-col gap-3 min-h-0`,children:[h===`letters`&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1`,children:[(0,j.jsx)(`div`,{className:`flex items-center gap-1.5 overflow-x-auto pb-1`,children:[30,60,90,120,150].map(e=>{let t=x[e],r=n>=e,i=b?.floor===e;return(0,j.jsxs)(`button`,{type:`button`,disabled:!r,onClick:()=>r&&S(t),className:`px-3 py-1 rounded-full text-[11px] font-bold border-[1.5px] border-ink-black flex items-center gap-1 shrink-0 transition-all cursor-pointer ${r?i?`bg-[#FFE24C] text-ink-black shadow-[1.5px_1.5px_0px_0px_#1E293B]`:`bg-white hover:bg-amber-100 text-slate-800`:`opacity-40 bg-slate-200 text-slate-500 cursor-not-allowed`}`,children:[r?(0,j.jsx)(`span`,{children:`📜`}):(0,j.jsx)(l,{className:`w-3 h-3`}),(0,j.jsxs)(`span`,{children:[`League `,e]})]},e)})}),b?(0,j.jsxs)(`div`,{className:`bg-[#FFF9E6] border-[2px] border-amber-900/40 rounded-lg p-4 shadow-sm flex-1 overflow-y-auto custom-scrollbar flex flex-col select-text`,children:[(0,j.jsxs)(`div`,{className:`border-b border-amber-800/20 pb-2 mb-3 flex items-center justify-between`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`text-[10px] font-bold text-amber-800 uppercase tracking-wider`,children:[b.chapterTitle,` • League `,b.floor]}),(0,j.jsx)(`h5`,{className:`font-headline-md font-bold text-sm text-amber-950 m-0`,children:b.title})]}),(0,j.jsx)(`span`,{className:`text-xl`,children:`🪶`})]}),(0,j.jsx)(`p`,{className:`text-xs sm:text-[13px] text-amber-950 font-serif leading-relaxed whitespace-pre-wrap flex-1 italic`,children:b.letterText})]}):(0,j.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center p-6 text-slate-500`,children:[(0,j.jsx)(l,{className:`w-8 h-8 mb-2 text-slate-400`}),(0,j.jsx)(`p`,{className:`text-xs font-medium`,children:`Conquer 30 LeetCode problems along the path to receive your first Royal Missive from Aurelia.`})]})]}),h===`diary`&&(0,j.jsx)(`div`,{className:`flex flex-col gap-2.5 flex-1`,children:t.length>0?t.map(e=>(0,j.jsxs)(`div`,{className:`p-3 bg-white border-[1.5px] border-ink-black rounded-lg shadow-xs flex flex-col gap-1 select-text`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between text-[10px] text-amber-800 font-bold border-b border-slate-100 pb-1`,children:[(0,j.jsxs)(`span`,{children:[`League `,e.floor,` along the Path`]}),(0,j.jsx)(`span`,{children:new Date(e.timestamp).toLocaleDateString()})]}),(0,j.jsxs)(`p`,{className:`text-xs text-ink-black font-medium leading-relaxed m-0 italic font-serif`,children:[`“`,e.text,`”`]})]},e.id)):(0,j.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center p-6 text-slate-500`,children:[(0,j.jsx)(s,{className:`w-8 h-8 mb-2 text-slate-400`}),(0,j.jsx)(`p`,{className:`text-xs font-medium`,children:`Aurelia records entries in her Spire Chronicles autonomously as you chat, rest, and cross chapter milestones.`})]})}),h===`codex`&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1 select-text`,children:[(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1.5`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,j.jsx)(y,{className:`w-4 h-4 text-amber-600`}),(0,j.jsx)(`h5`,{className:`font-headline-md font-bold text-xs text-ink-black m-0`,children:`Hero Codex (MemGPT & Mem0 Core Memory)`})]}),(0,j.jsx)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:`Cognitive Sync`})]}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-2 text-xs`,children:[(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2`,children:[(0,j.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Hero Alias`}),(0,j.jsx)(`span`,{className:`font-bold text-ink-black text-xs`,children:r?.heroName||`Champion`})]}),(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2`,children:[(0,j.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Target Goal`}),(0,j.jsx)(`span`,{className:`font-bold text-amber-900 text-xs`,children:r?.targetGoal||`None shared yet (mention to Aurelia!)`})]})]}),r?.preferredLanguage&&(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2 text-xs`,children:[(0,j.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Weapon of Choice (Language)`}),(0,j.jsx)(`span`,{className:`font-bold text-ink-black`,children:r.preferredLanguage})]})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-emerald-800`,children:[(0,j.jsx)(m,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Mastered Patterns (`,r?.strengths?.length||0,`)`]})]}),r?.strengths&&r.strengths.length>0?(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:r.strengths.map(e=>(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-emerald-50 text-emerald-800 border border-emerald-300`,children:[e,d&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>d(`strengths`,e),className:`hover:text-red-600 ml-0.5 cursor-pointer`,title:`Forget strength`,children:(0,j.jsx)(_,{className:`w-3 h-3`})})]},e))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Aurelia will note topics you conquer during your practice.`})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-rose-800`,children:[(0,j.jsx)(o,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Nemesis Patterns (`,r?.nemesisPatterns?.length||0,`)`]})]}),r?.nemesisPatterns&&r.nemesisPatterns.length>0?(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:r.nemesisPatterns.map(e=>(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-rose-50 text-rose-800 border border-rose-300`,children:[e,d&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>d(`nemesisPatterns`,e),className:`hover:text-red-700 ml-0.5 cursor-pointer`,title:`Forget nemesis`,children:(0,j.jsx)(_,{className:`w-3 h-3`})})]},e))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Aurelia tracks patterns that give you trouble to help you prepare targeted drills.`})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-bold text-slate-800`,children:(0,j.jsxs)(`span`,{children:[`Personal Notes & Shared Lore (`,r?.personalNotes?.length||0,`)`]})}),r?.personalNotes&&r.personalNotes.length>0?(0,j.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:r.personalNotes.map(e=>(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-2 p-2 bg-slate-50 border border-slate-200 rounded text-[11px] text-slate-700`,children:[(0,j.jsxs)(`span`,{children:[`• `,e]}),d&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>d(`personalNotes`,e),className:`text-slate-400 hover:text-red-600 shrink-0 cursor-pointer p-0.5`,title:`Forget note`,children:(0,j.jsx)(v,{className:`w-3 h-3`})})]},e))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Share your background or routine with Aurelia and she will hold it in her memory.`})]}),i&&i.length>0&&(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1`,children:[(0,j.jsx)(`span`,{className:`text-xs font-bold text-slate-800`,children:`Episodic Memory Chain (EM-LLM)`}),(0,j.jsxs)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:[i.length,` events`]})]}),(0,j.jsx)(`div`,{className:`flex flex-col gap-2 max-h-40 overflow-y-auto custom-scrollbar`,children:i.slice(0,8).map(e=>(0,j.jsxs)(`div`,{className:`text-[11px] p-2 bg-[#FFFDF0] border border-amber-900/15 rounded flex flex-col gap-0.5`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`span`,{className:`font-bold text-ink-black uppercase text-[9px] px-1.5 py-0.5 bg-amber-200/60 rounded`,children:e.eventType.replace(`_`,` `)}),(0,j.jsx)(`span`,{className:`text-[10px] text-slate-400`,children:new Date(e.timestamp).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})})]}),(0,j.jsx)(`div`,{className:`font-bold text-slate-800 mt-0.5`,children:e.title}),(0,j.jsx)(`div`,{className:`text-slate-600 text-[10px]`,children:e.description})]},e.id))})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-indigo-900`,children:[(0,j.jsx)(u,{className:`w-3.5 h-3.5 text-amber-500`}),(0,j.jsx)(`span`,{children:`Autonomous Enchantment Telemetry`})]}),(0,j.jsxs)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:[a?.length||0,` executed`]})]}),a&&a.length>0?(0,j.jsx)(`div`,{className:`flex flex-col gap-1.5 max-h-36 overflow-y-auto custom-scrollbar`,children:a.slice(0,10).map((e,t)=>(0,j.jsxs)(`div`,{className:`text-[11px] p-2 bg-indigo-50/50 border border-indigo-100 rounded flex items-center justify-between gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,j.jsxs)(`span`,{className:`font-bold text-indigo-950 font-mono text-[10px] truncate`,children:[e.tool_name,`()`]}),e.args&&Object.keys(e.args).length>0&&(0,j.jsx)(`span`,{className:`text-[9px] text-slate-500 truncate`,children:JSON.stringify(e.args).slice(0,50)})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[e.execution_time_ms!==void 0&&(0,j.jsxs)(`span`,{className:`text-[9px] text-slate-400 flex items-center gap-0.5 font-mono`,children:[(0,j.jsx)(p,{className:`w-2.5 h-2.5`}),e.execution_time_ms,`ms`]}),(0,j.jsx)(`span`,{className:`px-1.5 py-0.2 text-[9px] font-bold rounded ${e.success?`bg-emerald-100 text-emerald-800`:`bg-rose-100 text-rose-800`}`,children:e.success?`SUCCESS`:`ERR`})]})]},t))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`No autonomous enchantments executed yet in this session.`})]})]})]}),(0,j.jsx)(`div`,{className:`bg-white border-t border-slate-200 px-4 py-2 flex items-center justify-end shrink-0`,children:(0,j.jsx)(`button`,{type:`button`,onClick:f,className:`px-4 py-1.5 bg-white hover:bg-slate-100 border-[1.5px] border-ink-black rounded font-bold text-xs text-ink-black cursor-pointer shadow-xs active:translate-y-0.5`,children:`Close`})})]})})}var R=e({default:()=>z});function z({onClose:e,onMinimize:t,isActive:n=!0,onFocus:r,zIndex:a}){let o=E(),[s,c]=(0,O.useState)(w()),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(!1),[p,m]=(0,O.useState)(!1);(0,O.useEffect)(()=>{C.syncWithBackend(),C.triggerProactiveGreeting()},[]);let g=(0,O.useCallback)(()=>{e?e():D.getState().closeWindow(`companion`)},[e]),v=(0,O.useCallback)(()=>{t?t():D.getState().minimizeWindow(`companion`)},[t]),y=(0,O.useCallback)(()=>{r?r():D.getState().setActiveWindow(`companion`)},[r]),b=(0,O.useCallback)(()=>{let e=!s;c(e),S(e)},[s]),x=(0,O.useCallback)(()=>{window.confirm(`Clear conversation transcript with Princess Aurelia?`)&&C.clearTranscript()},[]),T=(0,O.useCallback)(e=>{C.setIsTyping(e)},[]),k=(0,O.useMemo)(()=>[...o.transcript].reverse().find(e=>e.sender===`princess`)||o.transcript[0],[o.transcript]),A=`Welcome back to the Spire Tower Parlor. How is your day going today? Are you making progress, or could you use a hand?`,N=k?k.isStreaming?k.text:k.text||(o.isLoading?``:A):A,P=(0,O.useMemo)(()=>k?.choiceSuggestions&&k.choiceSuggestions.length>0?k.choiceSuggestions:[...o.transcript].reverse().find(e=>e.sender===`princess`&&e.choiceSuggestions&&e.choiceSuggestions.length>0)?.choiceSuggestions,[k,o.transcript]);return(0,j.jsxs)(`div`,{onClick:y,className:`fixed inset-x-0 top-0 bottom-[40px] select-none pointer-events-none overflow-hidden font-sans`,style:{zIndex:a??(n?40:30)},children:[(0,j.jsx)(`div`,{className:`absolute inset-x-0 bottom-0 h-44 bg-gradient-to-t from-slate-950/35 via-slate-900/10 to-transparent pointer-events-none z-0`}),(0,j.jsxs)(`div`,{className:`relative w-full h-full flex flex-col justify-end pointer-events-none pb-2 sm:pb-3 px-2 sm:px-4 md:px-8`,children:[(0,j.jsxs)(`div`,{className:`relative w-full max-w-5xl lg:max-w-6xl mx-auto flex items-end justify-start pointer-events-none`,children:[(0,j.jsx)(`div`,{className:`relative z-30 shrink-0 pointer-events-auto -mr-6 sm:-mr-10 md:-mr-12 lg:-mr-14`,children:(0,j.jsx)(M,{emotion:o.activeEmotion,floor:o.currentFloor,rhythm:o.currentRhythm,activity:o.currentActivity,isLoading:o.isLoading,onClick:y})}),(0,j.jsx)(`div`,{className:`relative z-20 flex-1 min-w-0 pointer-events-auto mb-1`,children:(0,j.jsx)(F,{characterName:o.companionSettings.name||`Princess Aurelia`,emotion:o.activeEmotion,text:N,isStreaming:k?.isStreaming,isLoading:o.isLoading,choices:P,toolCalls:k?.toolCalls,onSelectChoice:e=>C.sendMessage(e),onSendMessage:e=>C.sendMessage(e),onTypingStatusChange:T,currentFloor:o.currentFloor,bondTier:o.bondTier,satchelCount:o.unlockedLetters.length,isMuted:s,onToggleMute:b,onOpenProgress:()=>u(!0),onOpenSatchel:()=>f(!0),onOpenHistory:()=>m(!0),onMinimize:v,onClose:g})})]}),(0,j.jsxs)(`div`,{className:`absolute bottom-1 right-3.5 pointer-events-none z-30 hidden md:flex flex-col items-center gap-0.5 opacity-65 select-none`,children:[(0,j.jsx)(`svg`,{className:`w-8 h-8 text-[#9cbcdb] drop-shadow-[0_0_6px_rgba(156,188,219,0.5)] rotate-6`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,j.jsx)(`path`,{d:`M12 2 C12 7.8 7.8 12 2 12 C7.8 12 12 16.2 12 22 C12 16.2 16.2 12 22 12 C16.2 12 12 7.8 12 2 Z`})}),(0,j.jsxs)(`div`,{className:`font-mono text-[9px] text-[#7ba4c8] tracking-tight leading-tight text-center`,children:[(0,j.jsx)(`div`,{children:`AlgoSpaced (Beta)`}),(0,j.jsx)(`div`,{children:`Build Jun24 preview`})]})]})]}),l&&(0,j.jsx)(`div`,{className:`pointer-events-auto`,children:(0,j.jsx)(I,{currentFloor:o.currentFloor,totalSolved:o.totalSolved,onClose:()=>u(!1)})}),d&&(0,j.jsx)(`div`,{className:`pointer-events-auto`,children:(0,j.jsx)(L,{unlockedLetters:o.unlockedLetters,spireChronicles:o.spireChronicles,currentFloor:o.currentFloor,heroCodex:o.heroCodex,episodicEvents:o.episodicEvents,recentToolTelemetry:o.recentToolTelemetry,onRemoveCodexItem:C.removeCodexItem,onClose:()=>f(!1)})}),p&&(0,j.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/60 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 pointer-events-auto`,onClick:()=>m(!1),children:(0,j.jsxs)(`div`,{className:`bg-[#142335] border-[3px] border-[#5a80a2] rounded-xl max-w-lg w-full h-[80%] max-h-[520px] shadow-[0_16px_40px_rgba(0,0,0,0.85)] flex flex-col overflow-hidden text-white`,onClick:e=>e.stopPropagation(),style:{boxShadow:`inset 0 0 0 1px #0a1420, inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 16px 40px rgba(0, 0, 0, 0.85)`},children:[(0,j.jsxs)(`div`,{className:`bg-[#101b2a] border-b border-[#304f6f] px-4 py-2.5 flex items-center justify-between shrink-0`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(h,{className:`w-4 h-4 text-[#67b1ec]`}),(0,j.jsxs)(`h4`,{className:`font-mono font-bold text-xs sm:text-sm text-[#e6f0fa] m-0`,children:[`Dialogue Transcript (`,o.transcript.length,` turns)`]})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,j.jsxs)(`button`,{type:`button`,onClick:x,className:`px-2 py-0.5 bg-rose-950/60 hover:bg-rose-900 border border-rose-700/60 rounded text-[11px] font-mono font-bold text-rose-300 hover:text-white flex items-center gap-1 cursor-pointer mr-1 transition-colors`,title:`Clear Chat History`,children:[(0,j.jsx)(i,{className:`w-3 h-3`}),(0,j.jsx)(`span`,{children:`Clear`})]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>m(!1),className:`p-1 hover:bg-[#203a55] rounded text-[#8cb4db] hover:text-white cursor-pointer transition-colors`,title:`Close`,children:(0,j.jsx)(_,{className:`w-4 h-4`})})]})]}),(0,j.jsx)(`div`,{className:`flex-1 p-3 sm:p-4 overflow-y-auto custom-scrollbar flex flex-col gap-2.5 bg-[#0e1824]/90`,children:o.transcript.map((e,t)=>(0,j.jsxs)(`div`,{className:`p-2.5 rounded-lg border font-mono text-xs max-w-[90%] shadow-md ${e.sender===`princess`?`bg-[#182c42] border-[#3e6080] text-[#e6f0fa] self-start`:`bg-[#214365] border-[#5a8bb9] text-white self-end`}`,children:[(0,j.jsx)(`div`,{className:`text-[10px] font-bold mb-1 text-[#f6d267]`,children:e.sender===`princess`?o.companionSettings.name:`Hero`}),(0,j.jsx)(`p`,{className:`font-medium m-0 leading-relaxed whitespace-pre-wrap select-text`,children:e.text})]},e.id||t))})]})})]})}export{R as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/PrincessChamber-abJShfI5.js b/algospaced-ui/dist/assets/PrincessChamber-abJShfI5.js new file mode 100644 index 0000000000000000000000000000000000000000..08c64e91dea96cb6e80e86dd663bd4671cd8ace0 --- /dev/null +++ b/algospaced-ui/dist/assets/PrincessChamber-abJShfI5.js @@ -0,0 +1 @@ +import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{A as n,Bt as r,Ct as i,D as a,G as o,Ht as s,R as c,Tt as l,a as u,c as d,dt as f,ht as p,j as m,l as h,o as g,p as _,w as v,x as y}from"./vendor-react-hnaVBnLv.js";import{C as b,S as x,_ as S,b as C,g as w,v as T,x as E,y as D}from"./index-DVWZ15xt.js";var O=t(s(),1),k={1:{particleType:`pollen`,particleCount:16,particleColors:[`#FDE047`,`#FEF08A`,`#86EFAC`],gradientBg:`from-[#FFFDF0] via-[#FFF9E6] to-[#FEF3C7]`,glowColor:`rgba(251, 191, 36, 0.3)`,badgeLabel:`🌾 Plains Breeze`},2:{particleType:`leaves`,particleCount:18,particleColors:[`#86EFAC`,`#4ADE80`,`#22C55E`,`#A7F3D0`],gradientBg:`from-[#F0FDF4] via-[#DCFCE7] to-[#FEF9C3]`,glowColor:`rgba(34, 197, 94, 0.3)`,badgeLabel:`🍃 Whispering Leaves`},3:{particleType:`spores`,particleCount:22,particleColors:[`#67E8F9`,`#38BDF8`,`#818CF8`,`#C084FC`],gradientBg:`from-[#F0F9FF] via-[#E0F2FE] to-[#EDE9FE]`,glowColor:`rgba(56, 189, 248, 0.35)`,badgeLabel:`✨ Crystal Spores`},4:{particleType:`snow`,particleCount:28,particleColors:[`#FFFFFF`,`#E0F2FE`,`#BAE6FD`],gradientBg:`from-[#F8FAFC] via-[#F1F5F9] to-[#E2E8F0]`,glowColor:`rgba(186, 230, 253, 0.4)`,badgeLabel:`❄️ Alpine Snowfall`},5:{particleType:`runes`,particleCount:20,particleColors:[`#E879F9`,`#C084FC`,`#A855F7`,`#F472B6`],gradientBg:`from-[#FAF5FF] via-[#F3E8FF] to-[#FCE7F3]`,glowColor:`rgba(192, 132, 252, 0.4)`,badgeLabel:`🔮 Arcane Runes`},6:{particleType:`stardust`,particleCount:35,particleColors:[`#FDE047`,`#F59E0B`,`#E11D48`,`#818CF8`],gradientBg:`from-[#FFFBEB] via-[#FEF3C7] to-[#FFE4E6]`,glowColor:`rgba(245, 158, 11, 0.5)`,badgeLabel:`👑 Spire Gates`}};function A(e){return e<=30?k[1]:e<=60?k[2]:e<=90?k[3]:e<=120?k[4]:e<150?k[5]:k[6]}var j=r();function M({emotion:e,floor:t,rhythm:n,activity:r,isLoading:i=!1,className:a=``,onClick:o}){let s=T[e]||T.smiling_warmly,c=(0,O.useMemo)(()=>A(t),[t]),l=(0,O.useMemo)(()=>{switch(n){case`dawn`:return`from-amber-400/30 via-yellow-300/20 to-transparent`;case`dusk`:return`from-orange-500/30 via-purple-500/20 to-transparent`;case`night`:return`from-indigo-600/30 via-blue-500/20 to-transparent`;default:return`from-amber-300/25 via-sky-300/20 to-transparent`}},[n]);return(0,j.jsxs)(`div`,{onClick:o,className:`relative flex flex-col items-center justify-end select-none pointer-events-auto transition-transform ${a}`,children:[(0,j.jsx)(`div`,{className:`absolute -inset-10 overflow-hidden pointer-events-none z-0`,children:Array.from({length:Math.min(16,c.particleCount)}).map((e,t)=>{let n=c.particleColors[t%c.particleColors.length],r=`${t*17%100}%`,i=`${7+t%5*2}s`,a=`${t*.8%4}s`,o=c.particleType===`leaves`||c.particleType===`runes`?`w-2 h-2`:`w-1.5 h-1.5`;return(0,j.jsx)(`span`,{className:`absolute rounded-full opacity-60 animate-pulse ${o}`,style:{backgroundColor:n,left:r,top:`${t*21%90}%`,boxShadow:`0 0 10px ${n}`,animationDuration:i,animationDelay:a}},t)})}),(0,j.jsx)(`div`,{className:`absolute bottom-4 inset-x-0 h-48 sm:h-72 md:h-96 bg-radial ${l} blur-2xl opacity-70 pointer-events-none z-0`}),(0,j.jsxs)(`div`,{className:`relative z-10 flex flex-col items-start justify-end`,children:[r&&(0,j.jsx)(`div`,{className:`mb-2 max-w-[120px] sm:max-w-xs text-center pointer-events-none animate-in fade-in duration-300`,children:(0,j.jsxs)(`span`,{className:`text-[9px] sm:text-[10px] font-mono font-medium text-[#bfe1ff] bg-[#101e2e]/85 px-2 sm:px-2.5 py-0.5 rounded-full border border-[#3e6080]/70 shadow-md inline-flex items-center gap-1 sm:gap-1.5 backdrop-blur-xs`,children:[(0,j.jsx)(`span`,{className:`text-amber-400`,children:`🏰`}),(0,j.jsx)(`span`,{className:`truncate`,children:r})]})}),(0,j.jsx)(`div`,{className:`relative h-[28vh] sm:h-[40vh] md:h-[46vh] lg:h-[50vh] max-h-[220px] sm:max-h-[380px] md:max-h-[460px] lg:max-h-[500px] min-h-[160px] sm:min-h-[240px] md:min-h-[300px] w-auto max-w-[110px] sm:max-w-[200px] md:max-w-[270px] lg:max-w-[320px] flex items-end justify-end`,children:(0,j.jsx)(`img`,{src:s.imagePath,alt:s.label,loading:`eager`,className:`h-full w-auto max-h-[85vh] object-contain object-bottom-left drop-shadow-[0_16px_32px_rgba(0,0,0,0.55)] transition-all duration-300 ${i?`scale-[1.02] filter brightness-110 saturate-125`:`scale-100`}`,onError:e=>{let t=e.currentTarget;t.src.endsWith(`/sprites/princess/smiling_warmly.webp`)?t.src.endsWith(`/sprites/princess/neutral.webp`)||(t.src=`/sprites/princess/neutral.webp`):t.src=`/sprites/princess/smiling_warmly.webp`}})})]})]})}var N=[`I solved a tough task today!`,`I'm feeling stuck on something.`,`Just need a breather.`],P={backgroundColor:`rgba(20, 36, 54, 0.94)`,boxShadow:`0 0 0 2px #0a1420, inset 0 0 0 3px #4c7396, inset 1px 1px 0 4px #8db7dc, inset -1px -1px 0 4px #1a2c3f, inset 0 0 0 5px #0c1724, 0 10px 28px rgba(0, 0, 0, 0.75)`};function F({characterName:e,text:t,isStreaming:n=!1,isLoading:r=!1,choices:o,toolCalls:s,onSelectChoice:l,onSendMessage:u,onTypingStatusChange:f,currentFloor:p,bondTier:_,satchelCount:v=0,isMuted:b=!1,onToggleMute:x,onOpenProgress:S,onOpenSatchel:C,onOpenHistory:w,onMinimize:T,onClose:E,className:D=``}){let[k,A]=(0,O.useState)(``),[M,F]=(0,O.useState)(!1),[I,L]=(0,O.useState)(0),[R,z]=(0,O.useState)(``),[B,V]=(0,O.useState)(!1),H=(0,O.useRef)(t),U=(0,O.useRef)(!1),W=(0,O.useRef)(null),G=(0,O.useRef)(null),K=n||M;(0,O.useEffect)(()=>{f?.(K)},[K,f]);let q=(0,O.useMemo)(()=>Array.isArray(o)&&o.length>0?o.slice(0,4):N,[o]),J=I{if(n){W.current&&=(clearInterval(W.current),null),U.current=!0,H.current=t;return}if(U.current){U.current=!1,H.current=t,W.current&&=(clearInterval(W.current),null);return}if(t!==H.current&&!r){if(H.current=t,!t){W.current&&=(clearInterval(W.current),null);return}W.current&&clearInterval(W.current);let e=0,n=setInterval(()=>{e++,A(t.slice(0,e)),F(!0),e>=t.length&&(clearInterval(n),W.current=null,F(!1))},20);return W.current=n,()=>{clearInterval(n),W.current=null,F(!1)}}},[t,r,n]);let X=(0,O.useCallback)(()=>{W.current&&=(clearInterval(W.current),null),F(!1)},[]),Z=()=>{let e=R.trim();!e||r||n||(u(e),z(``))};return(0,O.useEffect)(()=>{let e=e=>{if(e.key===`Escape`&&E){e.preventDefault(),E();return}if(!B){if(e.key>=`1`&&e.key<=String(q.length)){let t=parseInt(e.key,10)-1;q[t]&&!r&&!n&&(e.preventDefault(),l(q[t]));return}if(e.key===`ArrowUp`){e.preventDefault(),L(e=>(e-1+q.length)%q.length);return}if(e.key===`ArrowDown`){e.preventDefault(),L(e=>(e+1)%q.length);return}if(e.key===`Enter`){!r&&!n&&q[J]&&(e.preventDefault(),l(q[J]));return}e.key===` `&&K&&(e.preventDefault(),X())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[B,q,J,r,n,K,l,X,E]),(0,j.jsxs)(`div`,{className:`relative flex flex-col gap-2 w-full ${D}`,children:[(0,j.jsxs)(`div`,{onClick:X,className:`relative w-full rounded-md sm:rounded-lg text-white pt-3.5 pb-3.5 pr-3.5 pl-8 sm:pt-5 sm:pb-5 sm:pr-5 sm:pl-14 md:pl-16 lg:pl-18 flex flex-col gap-2.5 backdrop-blur-md transition-all select-none cursor-pointer`,style:P,children:[(0,j.jsxs)(`div`,{className:`absolute -top-7 right-1 flex items-center gap-1 sm:gap-1.5 z-30`,onClick:e=>e.stopPropagation(),children:[S&&(0,j.jsxs)(`button`,{type:`button`,onClick:S,className:`px-2 py-0.5 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[10px] sm:text-[11px] font-mono font-bold text-[#8cb4db] hover:text-white transition-all cursor-pointer flex items-center gap-1 shadow-md`,title:`Spire Tower Road (Floor Progress)`,children:[(0,j.jsx)(i,{className:`w-3 h-3 text-amber-400`}),(0,j.jsxs)(`span`,{children:[p,`/150 LC`]})]}),C&&(0,j.jsxs)(`button`,{type:`button`,onClick:C,className:`px-2 py-0.5 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[10px] sm:text-[11px] font-mono font-bold text-[#8cb4db] hover:text-white transition-all cursor-pointer flex items-center gap-1 shadow-md`,title:`Open Royal Satchel`,children:[(0,j.jsx)(a,{className:`w-3 h-3 text-amber-400`}),(0,j.jsx)(`span`,{className:`hidden sm:inline`,children:`Satchel`}),v>0&&(0,j.jsxs)(`span`,{className:`text-[9px] text-[#f3cb65]`,children:[`(`,v,`)`]})]}),w&&(0,j.jsxs)(`button`,{type:`button`,onClick:w,className:`px-2 py-0.5 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[10px] sm:text-[11px] font-mono font-bold text-[#8cb4db] hover:text-white transition-all cursor-pointer flex items-center gap-1 shadow-md`,title:`Dialogue Transcript`,children:[(0,j.jsx)(m,{className:`w-3 h-3 text-[#8cb4db]`}),(0,j.jsx)(`span`,{className:`hidden sm:inline`,children:`Log`})]}),x&&(0,j.jsx)(`button`,{type:`button`,onClick:x,className:`p-1 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[#8cb4db] hover:text-white transition-all cursor-pointer shadow-md`,title:b?`Unmute Audio`:`Mute Audio`,children:b?(0,j.jsx)(d,{className:`w-3 h-3`}):(0,j.jsx)(h,{className:`w-3 h-3`})}),T&&(0,j.jsx)(`button`,{type:`button`,onClick:T,className:`p-1 bg-[#101e2e]/90 hover:bg-[#1f3750] border border-[#3e6080]/80 hover:border-[#67b1ec] rounded text-[#8cb4db] hover:text-white transition-all cursor-pointer shadow-md`,title:`Minimize to Taskbar`,children:(0,j.jsx)(c,{className:`w-3 h-3`})}),E&&(0,j.jsx)(`button`,{type:`button`,onClick:E,className:`p-1 bg-[#101e2e]/90 hover:bg-rose-900/70 border border-[#3e6080]/80 hover:border-rose-400 rounded text-[#8cb4db] hover:text-rose-200 transition-all cursor-pointer shadow-md`,title:`Leave Parlor (Esc)`,children:(0,j.jsx)(g,{className:`w-3 h-3`})})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`font-mono text-sm sm:text-base font-bold text-[#f3cb65] tracking-wide drop-shadow-[0_1px_2px_rgba(0,0,0,0.9)]`,children:[`-`,e||`Princess Aurelia`,`-`]}),_&&(0,j.jsx)(`span`,{className:`hidden md:inline-block text-[9px] font-mono text-[#8cb4db] bg-[#101d2c]/80 border border-[#3e6080]/60 px-1.5 py-0.2 rounded uppercase tracking-wider`,children:_})]}),(0,j.jsxs)(`div`,{className:`min-h-[48px] sm:min-h-[54px] flex flex-col justify-start`,children:[r?(0,j.jsxs)(`div`,{className:`flex items-center gap-2 py-1 text-xs sm:text-sm font-mono text-[#8cb4db]`,children:[(0,j.jsx)(`span`,{className:`inline-block w-2 h-2 bg-[#f3cb65] rounded-full animate-ping`}),(0,j.jsxs)(`span`,{children:[e||`Princess Aurelia`,` is attuning the crystal relay...`]})]}):(0,j.jsxs)(`div`,{className:`font-mono text-xs sm:text-sm md:text-[15px] leading-relaxed text-[#e6edf4] select-text`,children:[(e=>e.split(/(\*[^*]+\*)/g).map((e,t)=>e.startsWith(`*`)&&e.endsWith(`*`)?(0,j.jsx)(`span`,{className:`text-[#f3cb65] italic font-semibold mr-1 inline-block`,children:e},t):(0,j.jsx)(`span`,{children:e},t)))(Y),K&&(0,j.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-[#f3cb65] ml-1 animate-pulse align-middle`})]}),s&&s.length>0&&!r&&(0,j.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1.5 select-none`,children:s.map((e,t)=>(0,j.jsxs)(`span`,{className:`px-2 py-0.5 rounded bg-[#102438] border border-[#44729b] text-[10px] font-mono font-bold text-[#bfe1ff] flex items-center gap-1`,children:[(0,j.jsx)(y,{className:`w-2.5 h-2.5 text-[#f3cb65]`}),(0,j.jsxs)(`span`,{children:[`Enchantment: `,e.name]})]},t))})]}),(0,j.jsx)(`div`,{className:`flex flex-col gap-1 pt-1`,onClick:e=>e.stopPropagation(),children:q.map((e,t)=>{let i=t+1,a=J===t;return(0,j.jsxs)(`button`,{type:`button`,disabled:r||n,onClick:()=>l(e),onMouseEnter:()=>L(t),className:`w-full sm:max-w-[90%] md:max-w-[85%] text-left flex items-center gap-2 px-2.5 py-1 rounded-xs sm:rounded-sm transition-all select-none font-mono text-xs sm:text-sm disabled:opacity-40 disabled:cursor-not-allowed ${a&&!r&&!n?`bg-[#1c3e61]/80 border border-[#4883b6]/80 shadow-[0_0_12px_rgba(72,131,182,0.25)] cursor-pointer`:`border border-transparent hover:bg-[#1c3e61]/35 cursor-pointer`}`,children:[(0,j.jsxs)(`span`,{className:`font-bold shrink-0 ${a?`text-[#e2ecf7]`:`text-[#b4c8dc]`}`,children:[i,`.`]}),(0,j.jsxs)(`span`,{className:`truncate font-medium ${a?`text-[#f3cb65]`:`text-[#dde7f2]`}`,children:[`[`,e,`]`]})]},t)})})]}),(0,j.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),Z()},onClick:e=>e.stopPropagation(),className:`w-full rounded-md sm:rounded-lg text-white py-2 sm:py-2.5 pr-3 sm:pr-4 pl-8 sm:pl-14 md:pl-16 lg:pl-18 flex items-center gap-2 backdrop-blur-md transition-all select-none`,style:P,children:[(0,j.jsx)(`span`,{className:`font-mono text-sm sm:text-base font-bold text-[#e2ecf7] select-none pl-0.5 shrink-0`,children:`>`}),(0,j.jsxs)(`div`,{className:`flex-1 flex items-center bg-[#101e2e]/90 border border-[#3b5d7d] rounded px-2.5 py-1 focus-within:border-[#67b1ec] focus-within:ring-1 focus-within:ring-[#67b1ec]/40 shadow-inner`,children:[(0,j.jsx)(`span`,{className:`text-[#f3cb65] font-mono text-xs sm:text-sm select-none mr-1.5 shrink-0`,children:`[`}),(0,j.jsx)(`input`,{ref:G,type:`text`,value:R,onChange:e=>z(e.target.value),onFocus:()=>V(!0),onBlur:()=>V(!1),disabled:r||n,placeholder:`Speak with ${e||`Princess Aurelia`}...`,className:`flex-1 bg-transparent border-none text-[#e2ecf7] placeholder-[#f3cb65]/70 font-mono text-xs sm:text-sm focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed`}),(0,j.jsx)(`span`,{className:`text-[#f3cb65] font-mono text-xs sm:text-sm select-none ml-1.5 shrink-0`,children:`]`})]}),(0,j.jsxs)(`button`,{type:`submit`,disabled:r||n||!R.trim(),className:`bg-[#34597b] hover:bg-[#3f6990] active:bg-[#2b4c6e] disabled:opacity-40 disabled:cursor-not-allowed border border-[#5c8cb5] hover:border-[#8db7dc] rounded px-3 sm:px-4 py-1 text-xs sm:text-sm font-mono font-bold text-white transition-all cursor-pointer shadow-md select-none shrink-0 flex items-center`,children:[(0,j.jsx)(`span`,{className:`text-[#f3cb65]`,children:`[`}),(0,j.jsx)(`span`,{className:`text-white px-1`,children:`Send`}),(0,j.jsx)(`span`,{className:`text-[#f3cb65]`,children:`]`})]})]})]})}function I({currentFloor:e,onClose:t}){let n=b(e),r=Math.min(100,Math.round(e/150*100));return(0,j.jsx)(`div`,{className:`absolute inset-0 z-50 bg-ink-black/40 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 select-none`,onClick:t,children:(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black rounded-xl p-4 sm:p-5 max-w-md w-full shadow-[6px_6px_0px_0px_#1E293B] flex flex-col gap-3.5`,onClick:e=>e.stopPropagation(),children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(i,{className:`w-5 h-5 text-indigo-600`}),(0,j.jsx)(`h4`,{className:`font-headline-md font-bold text-sm text-ink-black m-0`,children:`Journey to the Big-O Spire`})]}),(0,j.jsx)(`button`,{type:`button`,onClick:t,className:`p-1 hover:bg-slate-200 rounded text-slate-700 cursor-pointer`,title:`Close`,children:(0,j.jsx)(g,{className:`w-4 h-4`})})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between text-xs font-bold font-headline-md`,children:[(0,j.jsx)(`span`,{children:`Path Progress:`}),(0,j.jsxs)(`span`,{className:`font-arcade bg-indigo-100 text-indigo-900 px-2 py-0.5 rounded border border-indigo-300`,children:[e,` / 150 Leagues`]})]}),(0,j.jsx)(`div`,{className:`w-full bg-slate-200 h-4 border-[2px] border-ink-black rounded-full overflow-hidden p-0.5`,children:(0,j.jsx)(`div`,{className:`bg-gradient-to-r from-amber-400 via-yellow-400 to-emerald-400 h-full rounded-full transition-all duration-500`,style:{width:`${r}%`}})}),(0,j.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-trash-gray font-medium`,children:[(0,j.jsxs)(`span`,{children:[`Progress: `,(0,j.jsxs)(`strong`,{children:[r,`%`]})]}),(0,j.jsxs)(`span`,{children:[`Distance to Tower: `,(0,j.jsxs)(`strong`,{children:[Math.max(0,150-e),` leagues`]})]})]})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[2px] border-ink-black rounded-lg p-3 shadow-[2px_2px_0px_0px_#1E293B] flex flex-col gap-1`,children:[(0,j.jsx)(`div`,{className:`text-[10px] font-bold uppercase text-amber-700 tracking-wider`,children:`Current Realm:`}),(0,j.jsx)(`div`,{className:`font-bold text-xs text-ink-black`,children:n.title}),(0,j.jsx)(`p`,{className:`text-[11px] text-slate-600 m-0 leading-relaxed font-medium`,children:n.description}),(0,j.jsxs)(`div`,{className:`text-[10px] text-amber-900 bg-amber-50 p-1.5 rounded border border-amber-200 italic mt-1`,children:[`📜 `,n.bgLore]})]}),(0,j.jsx)(`div`,{className:`flex items-center justify-between gap-1 text-center`,children:[{floor:30,label:`Arrays`},{floor:60,label:`Pointers`},{floor:90,label:`Trees`},{floor:120,label:`Heaps`},{floor:150,label:`Spire`}].map(t=>{let n=e>=t.floor;return(0,j.jsxs)(`div`,{className:`flex-1 p-1.5 rounded border text-[10px] flex flex-col items-center ${n?`bg-emerald-100 border-emerald-600 text-emerald-900 font-bold`:`bg-slate-100 border-slate-300 text-slate-500`}`,children:[(0,j.jsx)(`span`,{children:n?`✓`:t.floor}),(0,j.jsx)(`span`,{className:`text-[9px] truncate w-full`,children:t.label})]},t.floor)})}),(0,j.jsx)(`div`,{className:`flex items-center justify-end border-t border-slate-200 pt-2 mt-1`,children:(0,j.jsx)(`button`,{type:`button`,onClick:t,className:`px-4 py-1.5 bg-white hover:bg-slate-100 border-[1.5px] border-ink-black rounded font-bold text-xs text-ink-black cursor-pointer shadow-xs active:translate-y-0.5`,children:`Done`})})]})})}function L({unlockedLetters:e,spireChronicles:t,currentFloor:n,heroCodex:r,episodicEvents:i,recentToolTelemetry:s,onRemoveCodexItem:c,onClose:d}){let[m,h]=(0,O.useState)(`letters`),[b,S]=(0,O.useState)(e[e.length-1]||null);return(0,j.jsx)(`div`,{className:`absolute inset-0 z-50 bg-ink-black/50 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 select-none`,onClick:d,children:(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black rounded-xl max-w-lg w-full h-[85%] max-h-[560px] shadow-[6px_6px_0px_0px_#1E293B] flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,j.jsxs)(`div`,{className:`bg-white border-b-[2px] border-ink-black px-4 py-2.5 flex items-center justify-between shrink-0`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(a,{className:`w-5 h-5 text-amber-700`}),(0,j.jsx)(`h4`,{className:`font-headline-md font-bold text-sm text-ink-black m-0`,children:`The Royal Satchel`})]}),(0,j.jsx)(`button`,{type:`button`,onClick:d,className:`p-1 hover:bg-slate-200 rounded text-slate-700 cursor-pointer`,title:`Close`,children:(0,j.jsx)(g,{className:`w-4 h-4`})})]}),(0,j.jsxs)(`div`,{className:`flex border-b-2 border-ink-black bg-amber-100/70 shrink-0`,children:[(0,j.jsxs)(`button`,{type:`button`,onClick:()=>h(`letters`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer border-r border-ink-black/20 ${m===`letters`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,j.jsx)(a,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Missives (`,e.length,`/5)`]})]}),(0,j.jsxs)(`button`,{type:`button`,onClick:()=>h(`diary`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer border-r border-ink-black/20 ${m===`diary`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,j.jsx)(l,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Chronicles (`,t.length,`)`]})]}),(0,j.jsxs)(`button`,{type:`button`,onClick:()=>h(`codex`),className:`flex-1 py-2 text-xs font-bold font-headline-md flex items-center justify-center gap-1.5 transition-colors cursor-pointer ${m===`codex`?`bg-[#FFFDF0] text-amber-950 border-b-2 border-b-[#FFFDF0] -mb-[2px]`:`text-slate-600 hover:bg-amber-200/50`}`,children:[(0,j.jsx)(y,{className:`w-3.5 h-3.5 text-amber-700`}),(0,j.jsx)(`span`,{children:`Codex`})]})]}),(0,j.jsxs)(`div`,{className:`flex-1 p-3 sm:p-4 overflow-y-auto custom-scrollbar flex flex-col gap-3 min-h-0`,children:[m===`letters`&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1`,children:[(0,j.jsx)(`div`,{className:`flex items-center gap-1.5 overflow-x-auto pb-1`,children:[30,60,90,120,150].map(e=>{let t=x[e],r=n>=e,i=b?.floor===e;return(0,j.jsxs)(`button`,{type:`button`,disabled:!r,onClick:()=>r&&S(t),className:`px-3 py-1 rounded-full text-[11px] font-bold border-[1.5px] border-ink-black flex items-center gap-1 shrink-0 transition-all cursor-pointer ${r?i?`bg-[#FFE24C] text-ink-black shadow-[1.5px_1.5px_0px_0px_#1E293B]`:`bg-white hover:bg-amber-100 text-slate-800`:`opacity-40 bg-slate-200 text-slate-500 cursor-not-allowed`}`,children:[r?(0,j.jsx)(`span`,{children:`📜`}):(0,j.jsx)(o,{className:`w-3 h-3`}),(0,j.jsxs)(`span`,{children:[`League `,e]})]},e)})}),b?(0,j.jsxs)(`div`,{className:`bg-[#FFF9E6] border-[2px] border-amber-900/40 rounded-lg p-4 shadow-sm flex-1 overflow-y-auto custom-scrollbar flex flex-col select-text`,children:[(0,j.jsxs)(`div`,{className:`border-b border-amber-800/20 pb-2 mb-3 flex items-center justify-between`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`text-[10px] font-bold text-amber-800 uppercase tracking-wider`,children:[b.chapterTitle,` • League `,b.floor]}),(0,j.jsx)(`h5`,{className:`font-headline-md font-bold text-sm text-amber-950 m-0`,children:b.title})]}),(0,j.jsx)(`span`,{className:`text-xl`,children:`🪶`})]}),(0,j.jsx)(`p`,{className:`text-xs sm:text-[13px] text-amber-950 font-serif leading-relaxed whitespace-pre-wrap flex-1 italic`,children:b.letterText})]}):(0,j.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center p-6 text-slate-500`,children:[(0,j.jsx)(o,{className:`w-8 h-8 mb-2 text-slate-400`}),(0,j.jsx)(`p`,{className:`text-xs font-medium`,children:`Conquer 30 LeetCode problems along the path to receive your first Royal Missive from Aurelia.`})]})]}),m===`diary`&&(0,j.jsx)(`div`,{className:`flex flex-col gap-2.5 flex-1`,children:t.length>0?t.map(e=>(0,j.jsxs)(`div`,{className:`p-3 bg-white border-[1.5px] border-ink-black rounded-lg shadow-xs flex flex-col gap-1 select-text`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between text-[10px] text-amber-800 font-bold border-b border-slate-100 pb-1`,children:[(0,j.jsxs)(`span`,{children:[`League `,e.floor,` along the Path`]}),(0,j.jsx)(`span`,{children:new Date(e.timestamp).toLocaleDateString()})]}),(0,j.jsxs)(`p`,{className:`text-xs text-ink-black font-medium leading-relaxed m-0 italic font-serif`,children:[`“`,e.text,`”`]})]},e.id)):(0,j.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center text-center p-6 text-slate-500`,children:[(0,j.jsx)(l,{className:`w-8 h-8 mb-2 text-slate-400`}),(0,j.jsx)(`p`,{className:`text-xs font-medium`,children:`Aurelia records entries in her Spire Chronicles autonomously as you chat, rest, and cross chapter milestones.`})]})}),m===`codex`&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 flex-1 select-text`,children:[(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1.5`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,j.jsx)(y,{className:`w-4 h-4 text-amber-600`}),(0,j.jsx)(`h5`,{className:`font-headline-md font-bold text-xs text-ink-black m-0`,children:`Hero Codex (MemGPT & Mem0 Core Memory)`})]}),(0,j.jsx)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:`Cognitive Sync`})]}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-2 text-xs`,children:[(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2`,children:[(0,j.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Hero Alias`}),(0,j.jsx)(`span`,{className:`font-bold text-ink-black text-xs`,children:r?.heroName||`Champion`})]}),(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2`,children:[(0,j.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Target Goal`}),(0,j.jsx)(`span`,{className:`font-bold text-amber-900 text-xs`,children:r?.targetGoal||`None shared yet (mention to Aurelia!)`})]})]}),r?.preferredLanguage&&(0,j.jsxs)(`div`,{className:`bg-[#FFFDF0] border border-amber-900/20 rounded p-2 text-xs`,children:[(0,j.jsx)(`span`,{className:`text-[10px] font-bold text-slate-500 uppercase tracking-wider block`,children:`Weapon of Choice (Language)`}),(0,j.jsx)(`span`,{className:`font-bold text-ink-black`,children:r.preferredLanguage})]})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-emerald-800`,children:[(0,j.jsx)(p,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Mastered Patterns (`,r?.strengths?.length||0,`)`]})]}),r?.strengths&&r.strengths.length>0?(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:r.strengths.map(e=>(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-emerald-50 text-emerald-800 border border-emerald-300`,children:[e,c&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>c(`strengths`,e),className:`hover:text-red-600 ml-0.5 cursor-pointer`,title:`Forget strength`,children:(0,j.jsx)(g,{className:`w-3 h-3`})})]},e))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Aurelia will note topics you conquer during your practice.`})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-rose-800`,children:[(0,j.jsx)(v,{className:`w-3.5 h-3.5`}),(0,j.jsxs)(`span`,{children:[`Nemesis Patterns (`,r?.nemesisPatterns?.length||0,`)`]})]}),r?.nemesisPatterns&&r.nemesisPatterns.length>0?(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:r.nemesisPatterns.map(e=>(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[11px] font-bold bg-rose-50 text-rose-800 border border-rose-300`,children:[e,c&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>c(`nemesisPatterns`,e),className:`hover:text-red-700 ml-0.5 cursor-pointer`,title:`Forget nemesis`,children:(0,j.jsx)(g,{className:`w-3 h-3`})})]},e))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Aurelia tracks patterns that give you trouble to help you prepare targeted drills.`})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-bold text-slate-800`,children:(0,j.jsxs)(`span`,{children:[`Personal Notes & Shared Lore (`,r?.personalNotes?.length||0,`)`]})}),r?.personalNotes&&r.personalNotes.length>0?(0,j.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:r.personalNotes.map(e=>(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-2 p-2 bg-slate-50 border border-slate-200 rounded text-[11px] text-slate-700`,children:[(0,j.jsxs)(`span`,{children:[`• `,e]}),c&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>c(`personalNotes`,e),className:`text-slate-400 hover:text-red-600 shrink-0 cursor-pointer p-0.5`,title:`Forget note`,children:(0,j.jsx)(_,{className:`w-3 h-3`})})]},e))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`Share your background or routine with Aurelia and she will hold it in her memory.`})]}),i&&i.length>0&&(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1`,children:[(0,j.jsx)(`span`,{className:`text-xs font-bold text-slate-800`,children:`Episodic Memory Chain (EM-LLM)`}),(0,j.jsxs)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:[i.length,` events`]})]}),(0,j.jsx)(`div`,{className:`flex flex-col gap-2 max-h-40 overflow-y-auto custom-scrollbar`,children:i.slice(0,8).map(e=>(0,j.jsxs)(`div`,{className:`text-[11px] p-2 bg-[#FFFDF0] border border-amber-900/15 rounded flex flex-col gap-0.5`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`span`,{className:`font-bold text-ink-black uppercase text-[9px] px-1.5 py-0.5 bg-amber-200/60 rounded`,children:e.eventType.replace(`_`,` `)}),(0,j.jsx)(`span`,{className:`text-[10px] text-slate-400`,children:new Date(e.timestamp).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})})]}),(0,j.jsx)(`div`,{className:`font-bold text-slate-800 mt-0.5`,children:e.title}),(0,j.jsx)(`div`,{className:`text-slate-600 text-[10px]`,children:e.description})]},e.id))})]}),(0,j.jsxs)(`div`,{className:`bg-white border-[1.5px] border-ink-black rounded-lg p-3 shadow-xs flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-100 pb-1`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-bold text-indigo-900`,children:[(0,j.jsx)(u,{className:`w-3.5 h-3.5 text-amber-500`}),(0,j.jsx)(`span`,{children:`Autonomous Enchantment Telemetry`})]}),(0,j.jsxs)(`span`,{className:`text-[10px] text-slate-400 font-mono`,children:[s?.length||0,` executed`]})]}),s&&s.length>0?(0,j.jsx)(`div`,{className:`flex flex-col gap-1.5 max-h-36 overflow-y-auto custom-scrollbar`,children:s.slice(0,10).map((e,t)=>(0,j.jsxs)(`div`,{className:`text-[11px] p-2 bg-indigo-50/50 border border-indigo-100 rounded flex items-center justify-between gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col min-w-0`,children:[(0,j.jsxs)(`span`,{className:`font-bold text-indigo-950 font-mono text-[10px] truncate`,children:[e.tool_name,`()`]}),e.args&&Object.keys(e.args).length>0&&(0,j.jsx)(`span`,{className:`text-[9px] text-slate-500 truncate`,children:JSON.stringify(e.args).slice(0,50)})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[e.execution_time_ms!==void 0&&(0,j.jsxs)(`span`,{className:`text-[9px] text-slate-400 flex items-center gap-0.5 font-mono`,children:[(0,j.jsx)(f,{className:`w-2.5 h-2.5`}),e.execution_time_ms,`ms`]}),(0,j.jsx)(`span`,{className:`px-1.5 py-0.2 text-[9px] font-bold rounded ${e.success?`bg-emerald-100 text-emerald-800`:`bg-rose-100 text-rose-800`}`,children:e.success?`SUCCESS`:`ERR`})]})]},t))}):(0,j.jsx)(`p`,{className:`text-[11px] text-slate-400 italic m-0`,children:`No autonomous enchantments executed yet in this session.`})]})]})]}),(0,j.jsx)(`div`,{className:`bg-white border-t border-slate-200 px-4 py-2 flex items-center justify-end shrink-0`,children:(0,j.jsx)(`button`,{type:`button`,onClick:d,className:`px-4 py-1.5 bg-white hover:bg-slate-100 border-[1.5px] border-ink-black rounded font-bold text-xs text-ink-black cursor-pointer shadow-xs active:translate-y-0.5`,children:`Close`})})]})})}var R=e({default:()=>z});function z({onClose:e,onMinimize:t,isActive:r=!0,onFocus:i,zIndex:a}){let o=E(),[s,c]=(0,O.useState)(w()),[l,u]=(0,O.useState)(!1),[d,f]=(0,O.useState)(!1),[p,h]=(0,O.useState)(!1);(0,O.useEffect)(()=>{C.syncWithBackend(),C.triggerProactiveGreeting()},[]);let _=(0,O.useCallback)(()=>{e?e():D.getState().closeWindow(`companion`)},[e]),v=(0,O.useCallback)(()=>{t?t():D.getState().minimizeWindow(`companion`)},[t]),y=(0,O.useCallback)(()=>{i?i():D.getState().setActiveWindow(`companion`)},[i]),b=(0,O.useCallback)(()=>{let e=!s;c(e),S(e)},[s]),x=(0,O.useCallback)(()=>{window.confirm(`Clear conversation transcript with Princess Aurelia?`)&&C.clearTranscript()},[]),T=(0,O.useCallback)(e=>{C.setIsTyping(e)},[]),k=(0,O.useMemo)(()=>[...o.transcript].reverse().find(e=>e.sender===`princess`)||o.transcript[0],[o.transcript]),A=`Welcome back to the Spire Tower Parlor. How is your day going today? Are you making progress, or could you use a hand?`,N=k?k.isStreaming?k.text:k.text||(o.isLoading?``:A):A,P=(0,O.useMemo)(()=>k?.choiceSuggestions&&k.choiceSuggestions.length>0?k.choiceSuggestions:[...o.transcript].reverse().find(e=>e.sender===`princess`&&e.choiceSuggestions&&e.choiceSuggestions.length>0)?.choiceSuggestions,[k,o.transcript]);return(0,j.jsxs)(`div`,{onClick:y,className:`fixed inset-x-0 top-0 bottom-[40px] select-none pointer-events-none overflow-hidden font-sans`,style:{zIndex:a??(r?40:30)},children:[(0,j.jsx)(`div`,{className:`absolute inset-x-0 bottom-0 h-44 bg-gradient-to-t from-slate-950/35 via-slate-900/10 to-transparent pointer-events-none z-0`}),(0,j.jsxs)(`div`,{className:`relative w-full h-full flex flex-col justify-end pointer-events-none pb-2 sm:pb-3 px-2 sm:px-4 md:px-8`,children:[(0,j.jsxs)(`div`,{className:`relative w-full max-w-5xl lg:max-w-6xl mx-auto flex items-end justify-start pointer-events-none`,children:[(0,j.jsx)(`div`,{className:`relative z-30 shrink-0 pointer-events-auto -mr-6 sm:-mr-10 md:-mr-12 lg:-mr-14`,children:(0,j.jsx)(M,{emotion:o.activeEmotion,floor:o.currentFloor,rhythm:o.currentRhythm,activity:o.currentActivity,isLoading:o.isLoading,onClick:y})}),(0,j.jsx)(`div`,{className:`relative z-20 flex-1 min-w-0 pointer-events-auto mb-1`,children:(0,j.jsx)(F,{characterName:o.companionSettings.name||`Princess Aurelia`,emotion:o.activeEmotion,text:N,isStreaming:k?.isStreaming,isLoading:o.isLoading,choices:P,toolCalls:k?.toolCalls,onSelectChoice:e=>C.sendMessage(e),onSendMessage:e=>C.sendMessage(e),onTypingStatusChange:T,currentFloor:o.currentFloor,bondTier:o.bondTier,satchelCount:o.unlockedLetters.length,isMuted:s,onToggleMute:b,onOpenProgress:()=>u(!0),onOpenSatchel:()=>f(!0),onOpenHistory:()=>h(!0),onMinimize:v,onClose:_})})]}),(0,j.jsxs)(`div`,{className:`absolute bottom-1 right-3.5 pointer-events-none z-30 hidden md:flex flex-col items-center gap-0.5 opacity-65 select-none`,children:[(0,j.jsx)(`svg`,{className:`w-8 h-8 text-[#9cbcdb] drop-shadow-[0_0_6px_rgba(156,188,219,0.5)] rotate-6`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,j.jsx)(`path`,{d:`M12 2 C12 7.8 7.8 12 2 12 C7.8 12 12 16.2 12 22 C12 16.2 16.2 12 22 12 C16.2 12 12 7.8 12 2 Z`})}),(0,j.jsxs)(`div`,{className:`font-mono text-[9px] text-[#7ba4c8] tracking-tight leading-tight text-center`,children:[(0,j.jsx)(`div`,{children:`AlgoSpaced (Beta)`}),(0,j.jsx)(`div`,{children:`Build Jun24 preview`})]})]})]}),l&&(0,j.jsx)(`div`,{className:`pointer-events-auto`,children:(0,j.jsx)(I,{currentFloor:o.currentFloor,totalSolved:o.totalSolved,onClose:()=>u(!1)})}),d&&(0,j.jsx)(`div`,{className:`pointer-events-auto`,children:(0,j.jsx)(L,{unlockedLetters:o.unlockedLetters,spireChronicles:o.spireChronicles,currentFloor:o.currentFloor,heroCodex:o.heroCodex,episodicEvents:o.episodicEvents,recentToolTelemetry:o.recentToolTelemetry,onRemoveCodexItem:C.removeCodexItem,onClose:()=>f(!1)})}),p&&(0,j.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/60 backdrop-blur-xs flex items-center justify-center p-3 sm:p-4 animate-in fade-in duration-200 pointer-events-auto`,onClick:()=>h(!1),children:(0,j.jsxs)(`div`,{className:`bg-[#142335] border-[3px] border-[#5a80a2] rounded-xl max-w-lg w-full h-[80%] max-h-[520px] shadow-[0_16px_40px_rgba(0,0,0,0.85)] flex flex-col overflow-hidden text-white`,onClick:e=>e.stopPropagation(),style:{boxShadow:`inset 0 0 0 1px #0a1420, inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 16px 40px rgba(0, 0, 0, 0.85)`},children:[(0,j.jsxs)(`div`,{className:`bg-[#101b2a] border-b border-[#304f6f] px-4 py-2.5 flex items-center justify-between shrink-0`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(m,{className:`w-4 h-4 text-[#67b1ec]`}),(0,j.jsxs)(`h4`,{className:`font-mono font-bold text-xs sm:text-sm text-[#e6f0fa] m-0`,children:[`Dialogue Transcript (`,o.transcript.length,` turns)`]})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,j.jsxs)(`button`,{type:`button`,onClick:x,className:`px-2 py-0.5 bg-rose-950/60 hover:bg-rose-900 border border-rose-700/60 rounded text-[11px] font-mono font-bold text-rose-300 hover:text-white flex items-center gap-1 cursor-pointer mr-1 transition-colors`,title:`Clear Chat History`,children:[(0,j.jsx)(n,{className:`w-3 h-3`}),(0,j.jsx)(`span`,{children:`Clear`})]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>h(!1),className:`p-1 hover:bg-[#203a55] rounded text-[#8cb4db] hover:text-white cursor-pointer transition-colors`,title:`Close`,children:(0,j.jsx)(g,{className:`w-4 h-4`})})]})]}),(0,j.jsx)(`div`,{className:`flex-1 p-3 sm:p-4 overflow-y-auto custom-scrollbar flex flex-col gap-2.5 bg-[#0e1824]/90`,children:o.transcript.map((e,t)=>(0,j.jsxs)(`div`,{className:`p-2.5 rounded-lg border font-mono text-xs max-w-[90%] shadow-md ${e.sender===`princess`?`bg-[#182c42] border-[#3e6080] text-[#e6f0fa] self-start`:`bg-[#214365] border-[#5a8bb9] text-white self-end`}`,children:[(0,j.jsx)(`div`,{className:`text-[10px] font-bold mb-1 text-[#f6d267]`,children:e.sender===`princess`?o.companionSettings.name:`Hero`}),(0,j.jsx)(`p`,{className:`font-medium m-0 leading-relaxed whitespace-pre-wrap select-text`,children:e.text})]},e.id||t))})]})})]})}export{R as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/ProblemSpecPanel-BRW8UyO6.js b/algospaced-ui/dist/assets/ProblemSpecPanel-BRW8UyO6.js new file mode 100644 index 0000000000000000000000000000000000000000..b4708fa26291ef64d3e60d7c50365a6be4e12168 --- /dev/null +++ b/algospaced-ui/dist/assets/ProblemSpecPanel-BRW8UyO6.js @@ -0,0 +1,4 @@ +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,F as n,G as ee,Ht as r,M as i,N as te,Tt as a,a as o,d as s,f as c,ht as ne,lt as re,nt as ie,o as ae,ot as l,p as oe,q as se,rt as u,tt as ce,wt as le,x as d}from"./vendor-react-hnaVBnLv.js";import{u as f}from"./index-DVWZ15xt.js";import{n as p,t as m}from"./MarkdownRenderer-D8UdFpnD.js";import{n as h}from"./ReviewQueue-CltGWQpb.js";var g=e(r(),1),_=t(),ue=[`Arrays & Hashing`,`Two Pointers`,`Sliding Window`,`Stack`,`Binary Search`,`Linked List`,`Trees`,`Tries`,`Heap / Priority Queue`,`Backtracking`,`Graphs`,`Advanced Graphs`,`1-D Dynamic Programming`,`2-D Dynamic Programming`,`Greedy`,`Intervals`,`Math & Geometry`,`Bit Manipulation`];function v(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`sol-${crypto.randomUUID()}`:`sol-${Date.now()}`}var y=({leftTab:e,onSelectLeftTab:t,mobileView:r,isNarrow:y=!1,problem:b,parsed:x,userSolution:S,officialSolution:C,effectiveReferenceCode:de,copiedSnippet:w,onCopyText:T,saveRefError:E,aiSolutionLoading:D,aiSolutionError:O,onFetchAiSolution:fe,explainLoading:k,explainError:A,explanationText:j,onExplainCode:pe,activeReview:M,onUpdateSolutions:N})=>{let[me,P]=(0,g.useState)(!1),[F,I]=(0,g.useState)(()=>b.id||b.name),[L,R]=(0,g.useState)(0),[z,B]=(0,g.useState)(!1),[V,H]=(0,g.useState)(null),[U,W]=(0,g.useState)({name:``,pattern:`Arrays & Hashing`,time_complexity:`O(N)`,space_complexity:`O(1)`,code:``,explanation:``,is_optimal:!1}),[G,K]=(0,g.useState)(!1),[q,J]=(0,g.useState)(null),Y=b.id||b.name;F!==Y&&(I(Y),P(!1),R(0),B(!1),H(null),J(null));let X=h(b,C,S),Z=L{if(q){let e=setTimeout(()=>J(null),3500);return()=>clearTimeout(e)}},[q]);let he=async()=>{if(!U.name.trim()){J({type:`error`,message:`Solution name cannot be empty.`});return}if(!U.code.trim()){J({type:`error`,message:`Solution code cannot be empty.`});return}K(!0),J(null);try{let e;if(V)e=X.map(e=>e.id===V?{...e,name:U.name.trim(),pattern:U.pattern.trim()||`General Algorithm`,time_complexity:U.time_complexity.trim()||`O(N)`,space_complexity:U.space_complexity.trim()||`O(1)`,code:U.code,explanation:U.explanation.trim(),is_optimal:U.is_optimal}:U.is_optimal&&e.id!==V?{...e,is_optimal:!1}:e);else{let t={id:v(),name:U.name.trim(),pattern:U.pattern.trim()||`General Algorithm`,time_complexity:U.time_complexity.trim()||`O(N)`,space_complexity:U.space_complexity.trim()||`O(1)`,code:U.code,explanation:U.explanation.trim(),is_optimal:U.is_optimal||X.length===0};e=t.is_optimal?[...X.map(e=>({...e,is_optimal:!1})),t]:[...X,t]}let t=e.find(e=>e.is_optimal)||e[0];b.id&&await f(b.id,e,t?.time_complexity,t?.space_complexity,b),N?.(e),J({type:`success`,message:V?`Solution updated successfully!`:`New solution added to problem dossier!`}),B(!1),H(null),R(V?Z:e.length-1)}catch(e){let t=e instanceof Error?e.message:`Failed to save solution.`;J({type:`error`,message:t})}finally{K(!1)}},ge=async e=>{if(X.length<=1){J({type:`error`,message:`Problem must have at least one solution.`});return}if(window.confirm(`Are you sure you want to remove this solution?`)){K(!0);try{let t=X.filter(t=>t.id!==e);!t.some(e=>e.is_optimal)&&t.length>0&&(t[0].is_optimal=!0);let n=t.find(e=>e.is_optimal)||t[0];b.id&&await f(b.id,t,n?.time_complexity,n?.space_complexity,b),N?.(t),R(0),J({type:`success`,message:`Solution removed successfully.`})}catch(e){let t=e instanceof Error?e.message:`Failed to delete solution.`;J({type:`error`,message:t})}finally{K(!1)}}},$=e=>`cursor-pointer font-arcade text-[7.5px] min-[400px]:text-[8px] sm:text-[8.5px] transition-all flex items-center justify-center gap-1 sm:gap-1.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ink-black select-none whitespace-nowrap shrink-0 ${e?`h-10 px-2 sm:px-2.5 bg-paper-white text-ink-black font-extrabold border-t-2 border-x-2 border-b-0 border-ink-black relative z-10 -mb-[2px] pb-[10px] shadow-[0_-2px_0_0_rgba(30,41,59,0.06)] after:content-[''] after:absolute after:-bottom-[2px] after:left-0 after:right-0 after:h-[2.5px] after:bg-paper-white after:z-10`:`h-9 px-2 sm:px-2.5 bg-[#e8e4da] text-slate-700 hover:bg-[#efece3] hover:text-ink-black font-bold border-2 border-ink-black relative z-0 mb-0`}`;return(0,_.jsxs)(`div`,{className:`w-full ${y?`flex flex-1`:`lg:w-[49%] flex`} flex-col bg-paper-white border-b-[3px] lg:border-b-0 ${y?``:`lg:border-r-[3px]`} border-ink-black overflow-hidden ${y&&r!==`spec`&&r!==`ref`?`hidden`:`flex`}`,children:[(0,_.jsxs)(`div`,{className:`shrink-0 bg-[#f4f1ea] border-b-2 border-ink-black px-1.5 sm:px-2.5 pt-2 flex items-end gap-1 relative z-10 overflow-x-auto no-scrollbar`,children:[(0,_.jsxs)(`button`,{onClick:()=>t(`spec`),className:$(e===`spec`),children:[(0,_.jsx)(ce,{className:`w-3 h-3 text-purple-700 shrink-0`}),(0,_.jsx)(`span`,{children:y?`SPEC`:`SPECIFICATIONS`})]}),(0,_.jsxs)(`button`,{onClick:()=>t(`ref`),className:$(e===`ref`),children:[(0,_.jsx)(re,{className:`w-3 h-3 text-blue-700 shrink-0`}),(0,_.jsx)(`span`,{children:y?`SOL (${X.length})`:`SOLUTIONS (${X.length})`})]}),(0,_.jsxs)(`button`,{onClick:()=>t(`fsrs`),className:$(e===`fsrs`),children:[(0,_.jsx)(c,{className:`w-3 h-3 text-emerald-700 shrink-0`}),(0,_.jsx)(`span`,{className:`whitespace-nowrap`,children:y?`FSRS`:`FSRS STATS`})]})]}),(0,_.jsxs)(`div`,{className:`flex-1 overflow-y-auto no-scrollbar p-4 sm:p-5 space-y-4`,children:[e===`spec`&&(0,_.jsxs)(`div`,{className:`space-y-4`,children:[(0,_.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3.5`,children:[(0,_.jsx)(`div`,{children:(0,_.jsx)(`h2`,{className:`text-base sm:text-lg font-extrabold text-ink-black font-headline-md leading-tight m-0 select-text`,children:b.name||`Algorithm Problem`})}),x.description&&(0,_.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200`,children:[(0,_.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold mb-2 flex items-center gap-1`,children:[(0,_.jsx)(a,{className:`w-3 h-3 text-primary`}),`PROBLEM DESCRIPTION`]}),(0,_.jsx)(`div`,{className:`font-sans text-xs sm:text-[13px] text-slate-800 leading-relaxed space-y-2 font-medium`,children:x.description.split(` +`).map((e,t)=>e.trim()?(0,_.jsx)(`p`,{className:`m-0 leading-relaxed whitespace-pre-wrap select-text`,children:p(e)},t):(0,_.jsx)(`div`,{className:`h-1.5`},t))})]}),x.examples.length>0&&(0,_.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200 space-y-2.5`,children:[(0,_.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,_.jsx)(o,{className:`w-3 h-3 text-amber-500`}),`EXAMPLES (`,x.examples.length,`)`]}),(0,_.jsx)(`div`,{className:`space-y-2.5`,children:x.examples.map((e,t)=>(0,_.jsxs)(`div`,{className:`p-3 bg-slate-50 border border-slate-200 space-y-2 text-xs`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,_.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-primary`,children:[`EXAMPLE `,t+1]}),e.input&&(0,_.jsxs)(`button`,{onClick:()=>T(e.input,`ex-${t}`),className:`px-2 py-0.5 bg-white hover:bg-slate-100 border border-ink-black text-[9px] font-arcade text-ink-black flex items-center gap-1 cursor-pointer`,title:`Copy input data`,children:[(0,_.jsx)(l,{className:`w-2.5 h-2.5`}),w===`ex-${t}`?`COPIED!`:`COPY`]})]}),e.input&&(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase block`,children:`Input:`}),(0,_.jsx)(`div`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono p-2 border border-ink-black text-[11px] break-all select-text`,children:e.input})]}),e.output&&(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase block`,children:`Output:`}),(0,_.jsx)(`div`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono p-2 border border-ink-black text-[11px] break-all select-text`,children:e.output})]}),e.explanation&&(0,_.jsxs)(`div`,{className:`text-[11px] font-sans text-slate-600 bg-white p-2 border border-slate-200`,children:[(0,_.jsx)(`span`,{className:`font-bold text-slate-700`,children:`Explanation: `}),p(e.explanation)]})]},t))})]}),x.constraints.length>0&&(0,_.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200`,children:[(0,_.jsx)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold mb-2`,children:`CONSTRAINTS`}),(0,_.jsx)(`ul`,{className:`space-y-1.5 list-none m-0 p-0`,children:x.constraints.map((e,t)=>(0,_.jsxs)(`li`,{className:`flex items-start gap-2 text-xs`,children:[(0,_.jsx)(`span`,{className:`text-primary font-bold select-none`,children:`•`}),(0,_.jsx)(`code`,{className:`bg-slate-100 text-ink-black font-code-mono px-2 py-0.5 border border-slate-300 text-[11px] select-text`,children:e})]},t))})]})]}),me?(0,_.jsxs)(`div`,{className:`p-3 bg-amber-50 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] flex flex-wrap items-center justify-between gap-2`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,_.jsx)(o,{className:`w-4 h-4 text-amber-600 shrink-0`}),(0,_.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wide uppercase`,children:`OPTIMAL TARGET:`}),(0,_.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-2 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`T: `,b.optimal_time||`O(N)`]}),(0,_.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-2 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`S: `,b.optimal_space||`O(1)`]})]}),(0,_.jsxs)(`button`,{type:`button`,onClick:()=>P(!1),className:`px-2 py-0.5 bg-white hover:bg-slate-100 border border-ink-black font-arcade text-[8px] text-trash-gray hover:text-ink-black cursor-pointer flex items-center gap-1`,title:`Conceal target complexity`,children:[(0,_.jsx)(u,{className:`w-2.5 h-2.5`}),(0,_.jsx)(`span`,{children:`HIDE`})]})]}):(0,_.jsxs)(`div`,{className:`p-3 bg-amber-50/70 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] flex items-center justify-between gap-2`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(ee,{className:`w-4 h-4 text-amber-700 shrink-0`}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wide uppercase block`,children:`OPTIMAL COMPLEXITY TARGET`}),(0,_.jsx)(`span`,{className:`text-[10px] font-sans text-slate-600 font-semibold`,children:`Hidden to test active recall before coding`})]})]}),(0,_.jsxs)(`button`,{type:`button`,onClick:()=>P(!0),className:`px-2.5 py-1 bg-white hover:bg-amber-100 border-2 border-ink-black font-arcade text-[8.5px] font-bold text-ink-black shadow-[1.5px_1.5px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center gap-1.5 shrink-0`,title:`Click to reveal target time and space complexity`,children:[(0,_.jsx)(ie,{className:`w-3 h-3 text-amber-700`}),(0,_.jsx)(`span`,{children:`REVEAL TARGET`})]})]})]}),e===`ref`&&(0,_.jsxs)(`div`,{className:`space-y-4`,children:[q&&(0,_.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black text-xs font-bold flex items-center justify-between shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${q.type===`success`?`bg-emerald-100 text-emerald-900 border-emerald-700`:`bg-rose-100 text-rose-900 border-rose-700`}`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[q.type===`success`?(0,_.jsx)(ne,{className:`w-4 h-4 text-emerald-700 shrink-0`}):(0,_.jsx)(s,{className:`w-4 h-4 text-rose-700 shrink-0`}),(0,_.jsx)(`span`,{children:q.message})]}),(0,_.jsx)(`button`,{type:`button`,onClick:()=>J(null),className:`text-slate-600 hover:text-ink-black cursor-pointer`,children:(0,_.jsx)(ae,{className:`w-3.5 h-3.5`})})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1 p-1 bg-slate-200/90 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] overflow-x-auto no-scrollbar`,children:[X.map((e,t)=>(0,_.jsxs)(`button`,{type:`button`,onClick:()=>{R(t),B(!1),H(null)},className:`py-1 px-2 rounded-full font-arcade text-[8px] font-bold flex items-center justify-center gap-1 border-2 border-ink-black transition-all cursor-pointer whitespace-nowrap shrink-0 ${Z===t&&!z&&!V?`bg-sky-600 text-white shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] -translate-y-0.5`:`bg-white text-ink-black hover:bg-sky-50 shadow-none`}`,title:e.name?`${e.name} (${e.pattern||`Algorithm`})`:`Solution ${t+1}`,children:[e.is_optimal?(0,_.jsx)(d,{className:`w-3 h-3 text-amber-300`}):(0,_.jsx)(a,{className:`w-3 h-3`}),(0,_.jsx)(`span`,{children:`Sol ${t+1}`}),e.is_optimal&&(0,_.jsx)(`span`,{className:`text-[6.5px] px-1 py-0.2 bg-amber-300 text-ink-black border border-ink-black font-extrabold rounded-full tracking-tight`,children:`OPTIMAL`})]},e.id||t)),(0,_.jsx)(`button`,{type:`button`,onClick:()=>{B(!0),H(null),W({name:`Method ${X.length+1}`,pattern:`Arrays & Hashing`,time_complexity:`O(N)`,space_complexity:`O(1)`,code:``,explanation:``,is_optimal:!1})},className:`h-6 w-6 rounded-full font-arcade text-[9px] font-bold flex items-center justify-center border-2 border-ink-black cursor-pointer shrink-0 active:translate-y-0.5 transition-all shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] ${z?`bg-emerald-600 text-white`:`bg-amber-300 text-ink-black hover:bg-amber-200`}`,title:`Add another solution / method for this problem`,"aria-label":`Add Solution`,children:(0,_.jsx)(te,{className:`w-3 h-3 stroke-[2.5]`})})]}),z||V?(0,_.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] space-y-3.5`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between pb-2 border-b-2 border-dashed border-ink-black`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(n,{className:`w-4 h-4 text-purple-700`}),(0,_.jsx)(`span`,{className:`font-arcade text-[10px] font-bold text-ink-black uppercase`,children:V?`EDIT SOLUTION`:`ADD NEW SOLUTION / METHOD`})]}),(0,_.jsx)(`button`,{type:`button`,onClick:()=>{B(!1),H(null)},className:`text-xs font-arcade text-trash-gray hover:text-rose-600 cursor-pointer font-bold`,children:`CANCEL`})]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Solution / Method Name`}),(0,_.jsx)(`input`,{type:`text`,value:U.name,onChange:e=>W({...U,name:e.target.value}),placeholder:`e.g. One-Pass Hash Map, Two Pointers`,className:`w-full p-2 border-2 border-ink-black text-xs font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`})]}),(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Pattern / Strategy`}),(0,_.jsx)(`select`,{value:U.pattern,onChange:e=>W({...U,pattern:e.target.value}),className:`w-full p-2 border-2 border-ink-black text-xs font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`,children:ue.map(e=>(0,_.jsx)(`option`,{value:e,children:e},e))})]}),(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Time Complexity`}),(0,_.jsx)(`input`,{type:`text`,value:U.time_complexity,onChange:e=>W({...U,time_complexity:e.target.value}),placeholder:`e.g. O(N), O(N log N), O(N^2)`,className:`w-full p-2 border-2 border-ink-black text-xs font-code-mono font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`})]}),(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Space Complexity`}),(0,_.jsx)(`input`,{type:`text`,value:U.space_complexity,onChange:e=>W({...U,space_complexity:e.target.value}),placeholder:`e.g. O(1), O(N)`,className:`w-full p-2 border-2 border-ink-black text-xs font-code-mono font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`})]})]}),(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,_.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase`,children:`Python Reference Code`}),(0,_.jsx)(`button`,{type:`button`,onClick:()=>W({...U,code:de}),className:`text-[8.5px] font-arcade text-sky-700 hover:underline cursor-pointer`,children:`Paste Current Code`})]}),(0,_.jsx)(`textarea`,{rows:8,value:U.code,onChange:e=>W({...U,code:e.target.value}),placeholder:`class Solution: + def solve(self, nums): + ...`,className:`w-full p-2.5 border-2 border-ink-black bg-[#1E293B] text-[#4ADE80] font-code-mono text-xs focus:outline-none no-scrollbar`})]}),(0,_.jsxs)(`div`,{className:`space-y-1`,children:[(0,_.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Intuition / How to Solve (Optional)`}),(0,_.jsx)(`textarea`,{rows:3,value:U.explanation,onChange:e=>W({...U,explanation:e.target.value}),placeholder:`Key insight, trade-offs, and state tracking notes...`,className:`w-full p-2 border-2 border-ink-black text-xs bg-[#fdf8e1] focus:outline-none focus:bg-white no-scrollbar`})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`input`,{type:`checkbox`,id:`is_optimal_solution`,checked:U.is_optimal,onChange:e=>W({...U,is_optimal:e.target.checked}),className:`w-4 h-4 border-2 border-ink-black rounded cursor-pointer accent-emerald-600`}),(0,_.jsx)(`label`,{htmlFor:`is_optimal_solution`,className:`font-arcade text-[9px] font-bold text-ink-black cursor-pointer`,children:`SET AS OPTIMAL / PRIMARY APPROACH FOR THIS PROBLEM`})]}),(0,_.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-2 border-t-2 border-dashed border-ink-black`,children:[(0,_.jsx)(`button`,{type:`button`,onClick:()=>{B(!1),H(null)},className:`px-3 py-1.5 bg-slate-100 hover:bg-slate-200 border-2 border-ink-black font-arcade text-[9px] font-bold text-ink-black cursor-pointer`,children:`CANCEL`}),(0,_.jsxs)(`button`,{type:`button`,disabled:G,onClick:he,className:`px-4 py-1.5 bg-emerald-500 hover:bg-emerald-400 border-2 border-ink-black font-arcade text-[9px] font-bold text-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer disabled:opacity-50 flex items-center gap-1.5`,children:[G&&(0,_.jsx)(i,{className:`w-3 h-3 animate-spin`}),(0,_.jsx)(`span`,{children:V?`UPDATE SOLUTION`:`SAVE SOLUTION`})]})]})]}):Q?(0,_.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,_.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3.5`,children:[(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 pb-3 border-b border-slate-200`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap min-w-0`,children:[(0,_.jsx)(`h3`,{className:`font-headline-md font-extrabold text-sm sm:text-base text-ink-black m-0 select-text break-words`,children:Q.name||`Solution ${Z+1}`}),Q.is_optimal&&(0,_.jsx)(`span`,{className:`px-2 py-0.5 bg-amber-300 border border-ink-black font-arcade text-[8px] font-bold text-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] shrink-0`,children:`★ OPTIMAL`})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap sm:ml-auto`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,_.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray uppercase`,children:`Pattern:`}),(0,_.jsx)(`span`,{className:`px-2 py-0.5 bg-purple-50 border border-purple-300 font-arcade text-[8.5px] text-purple-800 font-bold`,children:Q.pattern||`General Algorithm`})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,_.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-1.5 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`T: `,Q.time_complexity||`O(N)`]}),(0,_.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-1.5 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`S: `,Q.space_complexity||`O(1)`]})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1 ml-auto`,children:[(0,_.jsxs)(`button`,{type:`button`,onClick:()=>{H(Q.id),B(!1),W({name:Q.name,pattern:Q.pattern,time_complexity:Q.time_complexity,space_complexity:Q.space_complexity,code:Q.code,explanation:Q.explanation||``,is_optimal:!!Q.is_optimal})},className:`px-2 py-1 bg-white hover:bg-slate-100 border border-ink-black text-ink-black font-arcade text-[8px] font-bold flex items-center gap-1 cursor-pointer`,title:`Edit this solution`,children:[(0,_.jsx)(n,{className:`w-3 h-3 text-slate-700`}),(0,_.jsx)(`span`,{className:`hidden sm:inline`,children:`EDIT`})]}),X.length>1&&(0,_.jsx)(`button`,{type:`button`,onClick:()=>ge(Q.id),className:`px-1.5 py-1 bg-white hover:bg-rose-50 border border-ink-black text-rose-700 font-arcade text-[8px] font-bold flex items-center gap-1 cursor-pointer`,title:`Delete this solution`,children:(0,_.jsx)(oe,{className:`w-3 h-3`})})]})]})]}),Q.code?(0,_.jsxs)(`div`,{className:`border border-ink-black bg-[#0f172a] overflow-hidden`,children:[(0,_.jsxs)(`div`,{className:`bg-[#1e293b] px-2.5 sm:px-3 py-1.5 border-b border-ink-black flex items-center justify-between gap-1.5 flex-wrap min-w-0`,children:[(0,_.jsx)(`span`,{className:`font-arcade text-[8px] text-slate-300 font-bold uppercase truncate min-w-0 flex-1`,children:y?`PYTHON 3`:`PYTHON 3 IMPLEMENTATION`}),(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,_.jsxs)(`button`,{type:`button`,onClick:()=>pe(Q.code,Q.pattern,Q.time_complexity,Q.space_complexity),disabled:k,className:`px-2 py-0.5 bg-purple-50 hover:bg-purple-100 text-purple-800 border border-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 cursor-pointer shrink-0 disabled:opacity-50 active:translate-y-0.5 transition-all`,title:`Explain this solution with AI`,children:[k?(0,_.jsx)(i,{className:`w-2.5 h-2.5 animate-spin text-purple-700`}):(0,_.jsx)(d,{className:`w-2.5 h-2.5 text-purple-600`}),(0,_.jsx)(`span`,{children:`Explain✦`})]}),(0,_.jsxs)(`button`,{onClick:()=>T(Q.code,`sol-${Q.id}`),className:`px-2 py-0.5 bg-white hover:bg-slate-100 text-ink-black border border-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 cursor-pointer shrink-0 active:translate-y-0.5 transition-all`,title:`Copy solution code`,children:[(0,_.jsx)(l,{className:`w-2.5 h-2.5`}),w===`sol-${Q.id}`?`COPIED!`:`COPY`]})]})]}),(0,_.jsx)(`div`,{className:`p-3 text-xs overflow-x-auto max-h-80 no-scrollbar`,children:(0,_.jsx)(`pre`,{className:`font-code-mono text-[#4ADE80] text-[11px] leading-relaxed select-text m-0`,children:(0,_.jsx)(`code`,{children:Q.code})})})]}):(0,_.jsxs)(`div`,{className:`p-4 bg-amber-50 border border-dashed border-amber-300 text-center space-y-3`,children:[(0,_.jsx)(`p`,{className:`text-xs font-sans text-stone-700`,children:`No code implementation archived for this solution yet.`}),(0,_.jsx)(`button`,{onClick:fe,disabled:D,className:`px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer inline-flex items-center gap-2 disabled:opacity-50`,children:D?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(i,{className:`w-3.5 h-3.5 animate-spin`}),(0,_.jsx)(`span`,{children:`Generating solution...`})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(d,{className:`w-3.5 h-3.5 text-amber-300`}),(0,_.jsx)(`span`,{children:`Generate solution`})]})}),O&&(0,_.jsx)(`div`,{className:`text-xs text-rose-600 font-medium`,children:O})]}),Q.explanation&&(0,_.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200 space-y-1.5 select-text`,children:[(0,_.jsx)(`span`,{className:`font-arcade text-[8.5px] text-trash-gray uppercase font-bold block`,children:`SOLUTION INTUITION & STRATEGY:`}),(0,_.jsx)(m,{content:Q.explanation})]})]}),Q.code&&(0,_.jsxs)(`div`,{className:`space-y-3`,children:[A&&(0,_.jsx)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold`,children:A}),j&&(0,_.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-2 select-text`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-1.5 pb-2 border-b-2 border-dashed border-ink-black`,children:[(0,_.jsx)(le,{className:`w-4 h-4 text-purple-600`}),(0,_.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:[`Gemini Code Breakdown (`,Q.name,`)`]})]}),(0,_.jsx)(`div`,{className:`max-h-96 overflow-y-auto no-scrollbar pt-1 select-text`,children:(0,_.jsx)(m,{content:j})})]})]})]}):null,E&&(0,_.jsxs)(`div`,{className:`p-2.5 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-bold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(244,63,94,1)]`,children:[(0,_.jsx)(s,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,_.jsx)(`div`,{className:`flex-1`,children:E})]})]}),e===`fsrs`&&(0,_.jsxs)(`div`,{className:`space-y-4`,children:[(0,_.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,_.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,_.jsx)(se,{className:`w-3 h-3 text-purple-600`}),`SPACED REPETITION PROGRESSION`]}),(0,_.jsx)(`div`,{className:`space-y-2`,children:[{state:0,label:`NEW`,color:`#3b82f6`},{state:1,label:`LEARNING`,color:`#f59e0b`},{state:2,label:`REVIEW`,color:`#10b981`},{state:3,label:`RELEARNING`,color:`#ef4444`}].map(e=>{let t=(M.fsrs_state??0)===e.state;return(0,_.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black flex items-center justify-between transition-all ${t?`bg-amber-100 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] translate-x-1 font-bold`:`bg-slate-50 opacity-70`}`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`w-5 h-5 border border-ink-black flex items-center justify-center font-arcade text-[9px] text-white font-bold`,style:{backgroundColor:e.color},children:e.state}),(0,_.jsx)(`span`,{className:`font-arcade text-[9px] text-ink-black`,children:e.label})]}),(0,_.jsx)(`div`,{className:`flex items-center gap-2`,children:t&&(0,_.jsx)(`span`,{className:`px-1.5 py-0.5 bg-emerald-500 text-white font-arcade text-[7px] border border-ink-black font-bold`,children:`CURRENT`})})]},e.state)})})]}),(0,_.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,_.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,_.jsx)(c,{className:`w-3 h-3 text-emerald-600`}),`PERFORMANCE METRICS`]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,_.jsxs)(`div`,{className:`p-2.5 bg-slate-50 border border-ink-black`,children:[(0,_.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase`,children:`Total Reviews`}),(0,_.jsx)(`span`,{className:`font-headline-md text-lg font-bold text-ink-black`,children:M.total_attempts||0})]}),(0,_.jsxs)(`div`,{className:`p-2.5 bg-slate-50 border border-ink-black`,children:[(0,_.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase`,children:`Correct Recall`}),(0,_.jsx)(`span`,{className:`font-headline-md text-lg font-bold text-emerald-600`,children:M.times_correct||0})]})]}),(0,_.jsxs)(`div`,{className:`text-xs font-sans text-slate-600 pt-1`,children:[`Next Due Date:`,` `,(0,_.jsx)(`span`,{className:`font-code-mono font-bold text-ink-black`,children:M.next_review?new Date(M.next_review).toLocaleDateString():`Today`})]})]})]})]})]})};export{y as ProblemSpecPanel}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/ProblemSpecPanel-CLbwqTwe.js b/algospaced-ui/dist/assets/ProblemSpecPanel-CLbwqTwe.js deleted file mode 100644 index 83452936b01cb6b69f4f649c69ddaab088f1681e..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/ProblemSpecPanel-CLbwqTwe.js +++ /dev/null @@ -1,4 +0,0 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,A as n,Bt as r,G as i,N as a,Q as ee,Rt as o,St as s,U as te,a as c,d as l,et as ne,f as u,ft as re,j as ie,o as ae,ot as oe,p as se,rt as d,xt as ce,y as f}from"./vendor-react-CIO8MTK1.js";import{u as p}from"./index-DnK6BACV.js";import{n as m,t as h}from"./MarkdownRenderer-BMZIn30p.js";import{n as g}from"./ReviewQueue-DmsrlLxn.js";var _=e(r(),1),v=o(),le=[`Arrays & Hashing`,`Two Pointers`,`Sliding Window`,`Stack`,`Binary Search`,`Linked List`,`Trees`,`Tries`,`Heap / Priority Queue`,`Backtracking`,`Graphs`,`Advanced Graphs`,`1-D Dynamic Programming`,`2-D Dynamic Programming`,`Greedy`,`Intervals`,`Math & Geometry`,`Bit Manipulation`];function y(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`sol-${crypto.randomUUID()}`:`sol-${Date.now()}`}var b=({leftTab:e,onSelectLeftTab:r,mobileView:o,isNarrow:b=!1,problem:x,parsed:S,userSolution:ue,officialSolution:de,effectiveReferenceCode:fe,copiedSnippet:C,onCopyText:w,saveRefError:T,aiSolutionLoading:E,aiSolutionError:D,onFetchAiSolution:O,explainLoading:k,explainError:A,explanationText:j,onExplainCode:pe,activeReview:M,onUpdateSolutions:N})=>{let[me,P]=(0,_.useState)(!1),[F,I]=(0,_.useState)(()=>x.id||x.name),[L,R]=(0,_.useState)(0),[z,B]=(0,_.useState)(!1),[V,H]=(0,_.useState)(null),[U,W]=(0,_.useState)({name:``,pattern:`Arrays & Hashing`,time_complexity:`O(N)`,space_complexity:`O(1)`,code:``,explanation:``,is_optimal:!1}),[G,K]=(0,_.useState)(!1),[q,J]=(0,_.useState)(null),Y=x.id||x.name;F!==Y&&(I(Y),P(!1),R(0),B(!1),H(null),J(null));let X=g(x,de,ue),Z=L{if(q){let e=setTimeout(()=>J(null),3500);return()=>clearTimeout(e)}},[q]);let he=async()=>{if(!U.name.trim()){J({type:`error`,message:`Solution name cannot be empty.`});return}if(!U.code.trim()){J({type:`error`,message:`Solution code cannot be empty.`});return}K(!0),J(null);try{let e;if(V)e=X.map(e=>e.id===V?{...e,name:U.name.trim(),pattern:U.pattern.trim()||`General Algorithm`,time_complexity:U.time_complexity.trim()||`O(N)`,space_complexity:U.space_complexity.trim()||`O(1)`,code:U.code,explanation:U.explanation.trim(),is_optimal:U.is_optimal}:U.is_optimal&&e.id!==V?{...e,is_optimal:!1}:e);else{let t={id:y(),name:U.name.trim(),pattern:U.pattern.trim()||`General Algorithm`,time_complexity:U.time_complexity.trim()||`O(N)`,space_complexity:U.space_complexity.trim()||`O(1)`,code:U.code,explanation:U.explanation.trim(),is_optimal:U.is_optimal||X.length===0};e=t.is_optimal?[...X.map(e=>({...e,is_optimal:!1})),t]:[...X,t]}let t=e.find(e=>e.is_optimal)||e[0];x.id&&await p(x.id,e,t?.time_complexity,t?.space_complexity,x),N?.(e),J({type:`success`,message:V?`Solution updated successfully!`:`New solution added to problem dossier!`}),B(!1),H(null),R(V?Z:e.length-1)}catch(e){let t=e instanceof Error?e.message:`Failed to save solution.`;J({type:`error`,message:t})}finally{K(!1)}},ge=async e=>{if(X.length<=1){J({type:`error`,message:`Problem must have at least one solution.`});return}if(window.confirm(`Are you sure you want to remove this solution?`)){K(!0);try{let t=X.filter(t=>t.id!==e);!t.some(e=>e.is_optimal)&&t.length>0&&(t[0].is_optimal=!0);let n=t.find(e=>e.is_optimal)||t[0];x.id&&await p(x.id,t,n?.time_complexity,n?.space_complexity,x),N?.(t),R(0),J({type:`success`,message:`Solution removed successfully.`})}catch(e){let t=e instanceof Error?e.message:`Failed to delete solution.`;J({type:`error`,message:t})}finally{K(!1)}}},$=e=>`cursor-pointer font-arcade text-[7.5px] min-[400px]:text-[8px] sm:text-[8.5px] transition-all flex items-center justify-center gap-1 sm:gap-1.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ink-black select-none whitespace-nowrap shrink-0 ${e?`h-10 px-2 sm:px-2.5 bg-paper-white text-ink-black font-extrabold border-t-2 border-x-2 border-b-0 border-ink-black relative z-10 -mb-[2px] pb-[10px] shadow-[0_-2px_0_0_rgba(30,41,59,0.06)] after:content-[''] after:absolute after:-bottom-[2px] after:left-0 after:right-0 after:h-[2.5px] after:bg-paper-white after:z-10`:`h-9 px-2 sm:px-2.5 bg-[#e8e4da] text-slate-700 hover:bg-[#efece3] hover:text-ink-black font-bold border-2 border-ink-black relative z-0 mb-0`}`;return(0,v.jsxs)(`div`,{className:`w-full ${b?`flex flex-1`:`lg:w-[49%] flex`} flex-col bg-paper-white border-b-[3px] lg:border-b-0 ${b?``:`lg:border-r-[3px]`} border-ink-black overflow-hidden ${b&&o!==`spec`&&o!==`ref`?`hidden`:`flex`}`,children:[(0,v.jsxs)(`div`,{className:`shrink-0 bg-[#f4f1ea] border-b-2 border-ink-black px-1.5 sm:px-2.5 pt-2 flex items-end gap-1 relative z-10 overflow-x-auto no-scrollbar`,children:[(0,v.jsxs)(`button`,{onClick:()=>r(`spec`),className:$(e===`spec`),children:[(0,v.jsx)(ee,{className:`w-3 h-3 text-purple-700 shrink-0`}),(0,v.jsx)(`span`,{children:b?`SPEC`:`SPECIFICATIONS`})]}),(0,v.jsxs)(`button`,{onClick:()=>r(`ref`),className:$(e===`ref`),children:[(0,v.jsx)(oe,{className:`w-3 h-3 text-blue-700 shrink-0`}),(0,v.jsx)(`span`,{children:b?`SOL (${X.length})`:`SOLUTIONS (${X.length})`})]}),(0,v.jsxs)(`button`,{onClick:()=>r(`leitner`),className:$(e===`leitner`),children:[(0,v.jsx)(u,{className:`w-3 h-3 text-emerald-700 shrink-0`}),(0,v.jsx)(`span`,{className:`whitespace-nowrap`,children:b?`FSRS`:`FSRS STATS`})]})]}),(0,v.jsxs)(`div`,{className:`flex-1 overflow-y-auto no-scrollbar p-4 sm:p-5 space-y-4`,children:[e===`spec`&&(0,v.jsxs)(`div`,{className:`space-y-4`,children:[(0,v.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3.5`,children:[(0,v.jsx)(`div`,{children:(0,v.jsx)(`h2`,{className:`text-base sm:text-lg font-extrabold text-ink-black font-headline-md leading-tight m-0 select-text`,children:x.name||`Algorithm Problem`})}),S.description&&(0,v.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200`,children:[(0,v.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold mb-2 flex items-center gap-1`,children:[(0,v.jsx)(s,{className:`w-3 h-3 text-primary`}),`PROBLEM DESCRIPTION`]}),(0,v.jsx)(`div`,{className:`font-sans text-xs sm:text-[13px] text-slate-800 leading-relaxed space-y-2 font-medium`,children:S.description.split(` -`).map((e,t)=>e.trim()?(0,v.jsx)(`p`,{className:`m-0 leading-relaxed whitespace-pre-wrap select-text`,children:m(e)},t):(0,v.jsx)(`div`,{className:`h-1.5`},t))})]}),S.examples.length>0&&(0,v.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200 space-y-2.5`,children:[(0,v.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,v.jsx)(c,{className:`w-3 h-3 text-amber-500`}),`EXAMPLES (`,S.examples.length,`)`]}),(0,v.jsx)(`div`,{className:`space-y-2.5`,children:S.examples.map((e,t)=>(0,v.jsxs)(`div`,{className:`p-3 bg-slate-50 border border-slate-200 space-y-2 text-xs`,children:[(0,v.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,v.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-primary`,children:[`EXAMPLE `,t+1]}),e.input&&(0,v.jsxs)(`button`,{onClick:()=>w(e.input,`ex-${t}`),className:`px-2 py-0.5 bg-white hover:bg-slate-100 border border-ink-black text-[9px] font-arcade text-ink-black flex items-center gap-1 cursor-pointer`,title:`Copy input data`,children:[(0,v.jsx)(d,{className:`w-2.5 h-2.5`}),C===`ex-${t}`?`COPIED!`:`COPY`]})]}),e.input&&(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase block`,children:`Input:`}),(0,v.jsx)(`div`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono p-2 border border-ink-black text-[11px] break-all select-text`,children:e.input})]}),e.output&&(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase block`,children:`Output:`}),(0,v.jsx)(`div`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono p-2 border border-ink-black text-[11px] break-all select-text`,children:e.output})]}),e.explanation&&(0,v.jsxs)(`div`,{className:`text-[11px] font-sans text-slate-600 bg-white p-2 border border-slate-200`,children:[(0,v.jsx)(`span`,{className:`font-bold text-slate-700`,children:`Explanation: `}),m(e.explanation)]})]},t))})]}),S.constraints.length>0&&(0,v.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200`,children:[(0,v.jsx)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold mb-2`,children:`CONSTRAINTS`}),(0,v.jsx)(`ul`,{className:`space-y-1.5 list-none m-0 p-0`,children:S.constraints.map((e,t)=>(0,v.jsxs)(`li`,{className:`flex items-start gap-2 text-xs`,children:[(0,v.jsx)(`span`,{className:`text-primary font-bold select-none`,children:`•`}),(0,v.jsx)(`code`,{className:`bg-slate-100 text-ink-black font-code-mono px-2 py-0.5 border border-slate-300 text-[11px] select-text`,children:e})]},t))})]})]}),me?(0,v.jsxs)(`div`,{className:`p-3 bg-amber-50 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] flex flex-wrap items-center justify-between gap-2`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,v.jsx)(c,{className:`w-4 h-4 text-amber-600 shrink-0`}),(0,v.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wide uppercase`,children:`OPTIMAL TARGET:`}),(0,v.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-2 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`T: `,x.optimal_time||`O(N)`]}),(0,v.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-2 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`S: `,x.optimal_space||`O(1)`]})]}),(0,v.jsxs)(`button`,{type:`button`,onClick:()=>P(!1),className:`px-2 py-0.5 bg-white hover:bg-slate-100 border border-ink-black font-arcade text-[8px] text-trash-gray hover:text-ink-black cursor-pointer flex items-center gap-1`,title:`Conceal target complexity`,children:[(0,v.jsx)(ne,{className:`w-2.5 h-2.5`}),(0,v.jsx)(`span`,{children:`HIDE`})]})]}):(0,v.jsxs)(`div`,{className:`p-3 bg-amber-50/70 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] flex items-center justify-between gap-2`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(te,{className:`w-4 h-4 text-amber-700 shrink-0`}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wide uppercase block`,children:`OPTIMAL COMPLEXITY TARGET`}),(0,v.jsx)(`span`,{className:`text-[10px] font-sans text-slate-600 font-semibold`,children:`Hidden to test active recall before coding`})]})]}),(0,v.jsxs)(`button`,{type:`button`,onClick:()=>P(!0),className:`px-2.5 py-1 bg-white hover:bg-amber-100 border-2 border-ink-black font-arcade text-[8.5px] font-bold text-ink-black shadow-[1.5px_1.5px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer flex items-center gap-1.5 shrink-0`,title:`Click to reveal target time and space complexity`,children:[(0,v.jsx)(t,{className:`w-3 h-3 text-amber-700`}),(0,v.jsx)(`span`,{children:`REVEAL TARGET`})]})]})]}),e===`ref`&&(0,v.jsxs)(`div`,{className:`space-y-4`,children:[q&&(0,v.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black text-xs font-bold flex items-center justify-between shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${q.type===`success`?`bg-emerald-100 text-emerald-900 border-emerald-700`:`bg-rose-100 text-rose-900 border-rose-700`}`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[q.type===`success`?(0,v.jsx)(re,{className:`w-4 h-4 text-emerald-700 shrink-0`}):(0,v.jsx)(l,{className:`w-4 h-4 text-rose-700 shrink-0`}),(0,v.jsx)(`span`,{children:q.message})]}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>J(null),className:`text-slate-600 hover:text-ink-black cursor-pointer`,children:(0,v.jsx)(ae,{className:`w-3.5 h-3.5`})})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1 p-1 bg-slate-200/90 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] overflow-x-auto no-scrollbar`,children:[X.map((e,t)=>(0,v.jsxs)(`button`,{type:`button`,onClick:()=>{R(t),B(!1),H(null)},className:`py-1 px-2 rounded-full font-arcade text-[8px] font-bold flex items-center justify-center gap-1 border-2 border-ink-black transition-all cursor-pointer whitespace-nowrap shrink-0 ${Z===t&&!z&&!V?`bg-sky-600 text-white shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] -translate-y-0.5`:`bg-white text-ink-black hover:bg-sky-50 shadow-none`}`,title:e.name?`${e.name} (${e.pattern||`Algorithm`})`:`Solution ${t+1}`,children:[e.is_optimal?(0,v.jsx)(f,{className:`w-3 h-3 text-amber-300`}):(0,v.jsx)(s,{className:`w-3 h-3`}),(0,v.jsx)(`span`,{children:`Sol ${t+1}`}),e.is_optimal&&(0,v.jsx)(`span`,{className:`text-[6.5px] px-1 py-0.2 bg-amber-300 text-ink-black border border-ink-black font-extrabold rounded-full tracking-tight`,children:`OPTIMAL`})]},e.id||t)),(0,v.jsx)(`button`,{type:`button`,onClick:()=>{B(!0),H(null),W({name:`Method ${X.length+1}`,pattern:`Arrays & Hashing`,time_complexity:`O(N)`,space_complexity:`O(1)`,code:``,explanation:``,is_optimal:!1})},className:`h-6 w-6 rounded-full font-arcade text-[9px] font-bold flex items-center justify-center border-2 border-ink-black cursor-pointer shrink-0 active:translate-y-0.5 transition-all shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] ${z?`bg-emerald-600 text-white`:`bg-amber-300 text-ink-black hover:bg-amber-200`}`,title:`Add another solution / method for this problem`,"aria-label":`Add Solution`,children:(0,v.jsx)(ie,{className:`w-3 h-3 stroke-[2.5]`})})]}),z||V?(0,v.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] space-y-3.5`,children:[(0,v.jsxs)(`div`,{className:`flex items-center justify-between pb-2 border-b-2 border-dashed border-ink-black`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(a,{className:`w-4 h-4 text-purple-700`}),(0,v.jsx)(`span`,{className:`font-arcade text-[10px] font-bold text-ink-black uppercase`,children:V?`EDIT SOLUTION`:`ADD NEW SOLUTION / METHOD`})]}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>{B(!1),H(null)},className:`text-xs font-arcade text-trash-gray hover:text-rose-600 cursor-pointer font-bold`,children:`CANCEL`})]}),(0,v.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Solution / Method Name`}),(0,v.jsx)(`input`,{type:`text`,value:U.name,onChange:e=>W({...U,name:e.target.value}),placeholder:`e.g. One-Pass Hash Map, Two Pointers`,className:`w-full p-2 border-2 border-ink-black text-xs font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`})]}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Pattern / Strategy`}),(0,v.jsx)(`select`,{value:U.pattern,onChange:e=>W({...U,pattern:e.target.value}),className:`w-full p-2 border-2 border-ink-black text-xs font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`,children:le.map(e=>(0,v.jsx)(`option`,{value:e,children:e},e))})]}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Time Complexity`}),(0,v.jsx)(`input`,{type:`text`,value:U.time_complexity,onChange:e=>W({...U,time_complexity:e.target.value}),placeholder:`e.g. O(N), O(N log N), O(N^2)`,className:`w-full p-2 border-2 border-ink-black text-xs font-code-mono font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`})]}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Space Complexity`}),(0,v.jsx)(`input`,{type:`text`,value:U.space_complexity,onChange:e=>W({...U,space_complexity:e.target.value}),placeholder:`e.g. O(1), O(N)`,className:`w-full p-2 border-2 border-ink-black text-xs font-code-mono font-bold bg-[#fdf8e1] focus:outline-none focus:bg-white`})]})]}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,v.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase`,children:`Python Reference Code`}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>W({...U,code:fe}),className:`text-[8.5px] font-arcade text-sky-700 hover:underline cursor-pointer`,children:`Paste Current Code`})]}),(0,v.jsx)(`textarea`,{rows:8,value:U.code,onChange:e=>W({...U,code:e.target.value}),placeholder:`class Solution: - def solve(self, nums): - ...`,className:`w-full p-2.5 border-2 border-ink-black bg-[#1E293B] text-[#4ADE80] font-code-mono text-xs focus:outline-none no-scrollbar`})]}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(`label`,{className:`font-arcade text-[8.5px] font-bold text-trash-gray uppercase block`,children:`Intuition / How to Solve (Optional)`}),(0,v.jsx)(`textarea`,{rows:3,value:U.explanation,onChange:e=>W({...U,explanation:e.target.value}),placeholder:`Key insight, trade-offs, and state tracking notes...`,className:`w-full p-2 border-2 border-ink-black text-xs bg-[#fdf8e1] focus:outline-none focus:bg-white no-scrollbar`})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{type:`checkbox`,id:`is_optimal_solution`,checked:U.is_optimal,onChange:e=>W({...U,is_optimal:e.target.checked}),className:`w-4 h-4 border-2 border-ink-black rounded cursor-pointer accent-emerald-600`}),(0,v.jsx)(`label`,{htmlFor:`is_optimal_solution`,className:`font-arcade text-[9px] font-bold text-ink-black cursor-pointer`,children:`SET AS OPTIMAL / PRIMARY APPROACH FOR THIS PROBLEM`})]}),(0,v.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-2 border-t-2 border-dashed border-ink-black`,children:[(0,v.jsx)(`button`,{type:`button`,onClick:()=>{B(!1),H(null)},className:`px-3 py-1.5 bg-slate-100 hover:bg-slate-200 border-2 border-ink-black font-arcade text-[9px] font-bold text-ink-black cursor-pointer`,children:`CANCEL`}),(0,v.jsxs)(`button`,{type:`button`,disabled:G,onClick:he,className:`px-4 py-1.5 bg-emerald-500 hover:bg-emerald-400 border-2 border-ink-black font-arcade text-[9px] font-bold text-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer disabled:opacity-50 flex items-center gap-1.5`,children:[G&&(0,v.jsx)(n,{className:`w-3 h-3 animate-spin`}),(0,v.jsx)(`span`,{children:V?`UPDATE SOLUTION`:`SAVE SOLUTION`})]})]})]}):Q?(0,v.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,v.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3.5`,children:[(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 pb-3 border-b border-slate-200`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap min-w-0`,children:[(0,v.jsx)(`h3`,{className:`font-headline-md font-extrabold text-sm sm:text-base text-ink-black m-0 select-text break-words`,children:Q.name||`Solution ${Z+1}`}),Q.is_optimal&&(0,v.jsx)(`span`,{className:`px-2 py-0.5 bg-amber-300 border border-ink-black font-arcade text-[8px] font-bold text-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] shrink-0`,children:`★ OPTIMAL`})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap sm:ml-auto`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,v.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray uppercase`,children:`Pattern:`}),(0,v.jsx)(`span`,{className:`px-2 py-0.5 bg-purple-50 border border-purple-300 font-arcade text-[8.5px] text-purple-800 font-bold`,children:Q.pattern||`General Algorithm`})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,v.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-1.5 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`T: `,Q.time_complexity||`O(N)`]}),(0,v.jsxs)(`code`,{className:`bg-[#1E293B] text-[#4ADE80] font-code-mono px-1.5 py-0.5 text-[11px] border border-ink-black font-bold`,children:[`S: `,Q.space_complexity||`O(1)`]})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1 ml-auto`,children:[(0,v.jsxs)(`button`,{type:`button`,onClick:()=>{H(Q.id),B(!1),W({name:Q.name,pattern:Q.pattern,time_complexity:Q.time_complexity,space_complexity:Q.space_complexity,code:Q.code,explanation:Q.explanation||``,is_optimal:!!Q.is_optimal})},className:`px-2 py-1 bg-white hover:bg-slate-100 border border-ink-black text-ink-black font-arcade text-[8px] font-bold flex items-center gap-1 cursor-pointer`,title:`Edit this solution`,children:[(0,v.jsx)(a,{className:`w-3 h-3 text-slate-700`}),(0,v.jsx)(`span`,{className:`hidden sm:inline`,children:`EDIT`})]}),X.length>1&&(0,v.jsx)(`button`,{type:`button`,onClick:()=>ge(Q.id),className:`px-1.5 py-1 bg-white hover:bg-rose-50 border border-ink-black text-rose-700 font-arcade text-[8px] font-bold flex items-center gap-1 cursor-pointer`,title:`Delete this solution`,children:(0,v.jsx)(se,{className:`w-3 h-3`})})]})]})]}),Q.code?(0,v.jsxs)(`div`,{className:`border border-ink-black bg-[#0f172a] overflow-hidden`,children:[(0,v.jsxs)(`div`,{className:`bg-[#1e293b] px-2.5 sm:px-3 py-1.5 border-b border-ink-black flex items-center justify-between gap-1.5 flex-wrap min-w-0`,children:[(0,v.jsx)(`span`,{className:`font-arcade text-[8px] text-slate-300 font-bold uppercase truncate min-w-0 flex-1`,children:b?`PYTHON 3`:`PYTHON 3 IMPLEMENTATION`}),(0,v.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,v.jsxs)(`button`,{type:`button`,onClick:()=>pe(Q.code,Q.pattern,Q.time_complexity,Q.space_complexity),disabled:k,className:`px-2 py-0.5 bg-purple-50 hover:bg-purple-100 text-purple-800 border border-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 cursor-pointer shrink-0 disabled:opacity-50 active:translate-y-0.5 transition-all`,title:`Explain this solution with AI`,children:[k?(0,v.jsx)(n,{className:`w-2.5 h-2.5 animate-spin text-purple-700`}):(0,v.jsx)(f,{className:`w-2.5 h-2.5 text-purple-600`}),(0,v.jsx)(`span`,{children:`Explain✦`})]}),(0,v.jsxs)(`button`,{onClick:()=>w(Q.code,`sol-${Q.id}`),className:`px-2 py-0.5 bg-white hover:bg-slate-100 text-ink-black border border-ink-black text-[9px] font-arcade font-bold flex items-center gap-1 cursor-pointer shrink-0 active:translate-y-0.5 transition-all`,title:`Copy solution code`,children:[(0,v.jsx)(d,{className:`w-2.5 h-2.5`}),C===`sol-${Q.id}`?`COPIED!`:`COPY`]})]})]}),(0,v.jsx)(`div`,{className:`p-3 text-xs overflow-x-auto max-h-80 no-scrollbar`,children:(0,v.jsx)(`pre`,{className:`font-code-mono text-[#4ADE80] text-[11px] leading-relaxed select-text m-0`,children:(0,v.jsx)(`code`,{children:Q.code})})})]}):(0,v.jsxs)(`div`,{className:`p-4 bg-amber-50 border border-dashed border-amber-300 text-center space-y-3`,children:[(0,v.jsx)(`p`,{className:`text-xs font-sans text-stone-700`,children:`No code implementation archived for this solution yet.`}),(0,v.jsx)(`button`,{onClick:O,disabled:E,className:`px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer inline-flex items-center gap-2 disabled:opacity-50`,children:E?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{className:`w-3.5 h-3.5 animate-spin`}),(0,v.jsx)(`span`,{children:`Generating solution...`})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(f,{className:`w-3.5 h-3.5 text-amber-300`}),(0,v.jsx)(`span`,{children:`Generate solution`})]})}),D&&(0,v.jsx)(`div`,{className:`text-xs text-rose-600 font-medium`,children:D})]}),Q.explanation&&(0,v.jsxs)(`div`,{className:`pt-3.5 border-t border-slate-200 space-y-1.5 select-text`,children:[(0,v.jsx)(`span`,{className:`font-arcade text-[8.5px] text-trash-gray uppercase font-bold block`,children:`SOLUTION INTUITION & STRATEGY:`}),(0,v.jsx)(h,{content:Q.explanation})]})]}),Q.code&&(0,v.jsxs)(`div`,{className:`space-y-3`,children:[A&&(0,v.jsx)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold`,children:A}),j&&(0,v.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-2 select-text`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-1.5 pb-2 border-b-2 border-dashed border-ink-black`,children:[(0,v.jsx)(ce,{className:`w-4 h-4 text-purple-600`}),(0,v.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:[`Gemini Code Breakdown (`,Q.name,`)`]})]}),(0,v.jsx)(`div`,{className:`max-h-96 overflow-y-auto no-scrollbar pt-1 select-text`,children:(0,v.jsx)(h,{content:j})})]})]})]}):null,T&&(0,v.jsxs)(`div`,{className:`p-2.5 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-bold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(244,63,94,1)]`,children:[(0,v.jsx)(l,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,v.jsx)(`div`,{className:`flex-1`,children:T})]})]}),e===`leitner`&&(0,v.jsxs)(`div`,{className:`space-y-4`,children:[(0,v.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,v.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,v.jsx)(i,{className:`w-3 h-3 text-purple-600`}),`SPACED REPETITION PROGRESSION`]}),(0,v.jsx)(`div`,{className:`space-y-2`,children:[{state:0,label:`NEW`,color:`#3b82f6`},{state:1,label:`LEARNING`,color:`#f59e0b`},{state:2,label:`REVIEW`,color:`#10b981`},{state:3,label:`RELEARNING`,color:`#ef4444`}].map(e=>{let t=(M.fsrs_state??0)===e.state;return(0,v.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black flex items-center justify-between transition-all ${t?`bg-amber-100 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] translate-x-1 font-bold`:`bg-slate-50 opacity-70`}`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`w-5 h-5 border border-ink-black flex items-center justify-center font-arcade text-[9px] text-white font-bold`,style:{backgroundColor:e.color},children:e.state}),(0,v.jsx)(`span`,{className:`font-arcade text-[9px] text-ink-black`,children:e.label})]}),(0,v.jsx)(`div`,{className:`flex items-center gap-2`,children:t&&(0,v.jsx)(`span`,{className:`px-1.5 py-0.5 bg-emerald-500 text-white font-arcade text-[7px] border border-ink-black font-bold`,children:`CURRENT`})})]},e.state)})})]}),(0,v.jsxs)(`div`,{className:`p-4 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] space-y-3`,children:[(0,v.jsxs)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold flex items-center gap-1.5`,children:[(0,v.jsx)(u,{className:`w-3 h-3 text-emerald-600`}),`PERFORMANCE METRICS`]}),(0,v.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,v.jsxs)(`div`,{className:`p-2.5 bg-slate-50 border border-ink-black`,children:[(0,v.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase`,children:`Total Reviews`}),(0,v.jsx)(`span`,{className:`font-headline-md text-lg font-bold text-ink-black`,children:M.total_attempts||0})]}),(0,v.jsxs)(`div`,{className:`p-2.5 bg-slate-50 border border-ink-black`,children:[(0,v.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase`,children:`Correct Recall`}),(0,v.jsx)(`span`,{className:`font-headline-md text-lg font-bold text-emerald-600`,children:M.times_correct||0})]})]}),(0,v.jsxs)(`div`,{className:`text-xs font-sans text-slate-600 pt-1`,children:[`Next Due Date:`,` `,(0,v.jsx)(`span`,{className:`font-code-mono font-bold text-ink-black`,children:M.next_review?new Date(M.next_review).toLocaleDateString():`Today`})]})]})]})]})]})};export{b as ProblemSpecPanel}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/PythonChallenge-BOgiGe52.js b/algospaced-ui/dist/assets/PythonChallenge-CQdOe4Q2.js similarity index 98% rename from algospaced-ui/dist/assets/PythonChallenge-BOgiGe52.js rename to algospaced-ui/dist/assets/PythonChallenge-CQdOe4Q2.js index e51c19157edea41f5386b5435add4aae539a75c3..2246ae7b08a1384feaca08e3dfdfc953dda98967 100644 --- a/algospaced-ui/dist/assets/PythonChallenge-BOgiGe52.js +++ b/algospaced-ui/dist/assets/PythonChallenge-CQdOe4Q2.js @@ -1 +1 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Rt as n}from"./vendor-react-CIO8MTK1.js";import{s as r}from"./firebaseClient-DZobvwSx.js";import{t as i}from"./MarkdownRenderer-BMZIn30p.js";var a=e(t(),1),o=n();function s(){let[e,t]=(0,a.useState)(null),[n,s]=(0,a.useState)(``),[c,l]=(0,a.useState)(!1),[u,d]=(0,a.useState)([]),[f,p]=(0,a.useState)(``),[m,h]=(0,a.useState)(!0),[g,_]=(0,a.useState)(0),v=async()=>{h(!0),p(``);try{let{data:{session:e}}=await r.auth.getSession();if(!e){p(`Unauthenticated session`);return}let n=await fetch(`/api/challenges/python/daily`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(n.ok){let e=await n.json();t(e),s(e.starter_code),_(e.total_score)}else p(`Failed to load challenge from server.`)}catch{p(`Connection timed out.`)}finally{h(!1)}};return(0,a.useEffect)(()=>{v()},[]),m?(0,o.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-arcade text-[10px]`,children:[(0,o.jsx)(`div`,{className:`animate-bounce mb-2`,children:`LOADING CHALLENGE...`}),(0,o.jsx)(`div`,{className:`w-48 h-4 bg-white border-[3px] border-ink-black overflow-hidden relative`,children:(0,o.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#9d4edd] w-2/3 animate-pulse border-r-2 border-ink-black`})})]}):e?(0,o.jsx)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm`,children:(0,o.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 custom-scrollbar flex flex-col gap-4`,children:[(0,o.jsxs)(`div`,{className:`flex justify-between items-center bg-slate-100 border-[3px] border-ink-black p-3`,children:[(0,o.jsxs)(`div`,{className:`flex gap-2`,children:[(0,o.jsx)(`span`,{className:`px-2 py-0.5 border-2 border-ink-black font-bold uppercase text-[9px] ${e.difficulty===`Easy`?`bg-green-200 text-green-800`:e.difficulty===`Medium`?`bg-yellow-200 text-yellow-800`:`bg-red-200 text-red-800`}`,children:e.difficulty}),(0,o.jsxs)(`span`,{className:`bg-blue-100 text-blue-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:[`+`,e.points,` PTS`]}),e.completed?(0,o.jsx)(`span`,{className:`bg-emerald-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`COMPLETED`}):(0,o.jsx)(`span`,{className:`bg-rose-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`INCOMPLETE`})]}),(0,o.jsxs)(`div`,{className:`font-arcade text-[8px] text-purple-700 font-bold bg-white border-2 border-ink-black px-2 py-0.5 shadow-[1px_1px_0_0_#1E293B]`,children:[`TOTAL SCORE: `,g]})]}),(0,o.jsxs)(`div`,{className:`border-2 border-ink-black bg-slate-50 p-3 rounded font-sans leading-relaxed text-xs`,children:[(0,o.jsxs)(`h3`,{className:`font-bold border-b border-slate-300 pb-1 mb-2 uppercase tracking-wide text-primary-purple flex items-center gap-1`,children:[(0,o.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`description`}),`Problem: `,e.title]}),(0,o.jsx)(i,{content:e.description})]}),(0,o.jsxs)(`div`,{className:`flex flex-col flex-1 min-h-[220px]`,children:[(0,o.jsxs)(`div`,{className:`flex justify-between items-center mb-1`,children:[(0,o.jsxs)(`span`,{className:`font-bold text-[10px] tracking-wide uppercase flex items-center gap-1`,children:[(0,o.jsx)(`span`,{className:`material-symbols-outlined text-sm text-purple-600`,children:`code`}),`Write Python Solution:`]}),(0,o.jsx)(`button`,{onClick:()=>s(e.starter_code),className:`text-[9px] underline text-blue-600 hover:text-blue-800 cursor-pointer font-sans`,children:`Reset Starter Code`})]}),(0,o.jsx)(`textarea`,{value:n,onChange:e=>s(e.target.value),className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-3 border-[3px] border-ink-black rounded outline-none focus:ring-2 focus:ring-primary-purple text-xs leading-relaxed resize-none`,placeholder:`# Write your python code here`,spellCheck:`false`})]}),(0,o.jsx)(`div`,{className:`shrink-0`,children:(0,o.jsx)(`button`,{disabled:c,onClick:async()=>{l(!0),p(``),d([]);try{let{data:{session:e}}=await r.auth.getSession();if(!e){p(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/python/submit`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({code:n})});if(i.ok){let e=await i.json();e.success?(d(e.results),e.all_passed&&(_(e.total_score),t(e=>e?{...e,completed:!0}:null))):p(e.error)}else p(`Submission failed at server host.`)}catch{p(`Network connection lost.`)}finally{l(!1)}},className:`w-full bg-highlight-pink text-white font-window-title font-bold py-2 px-4 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none hover:bg-pink-400 transition-all disabled:opacity-50 cursor-pointer text-center text-xs`,children:c?`EXECUTING TEST CASES...`:`SUBMIT SOLUTION`})}),f&&(0,o.jsxs)(`div`,{className:`border-[3px] border-red-500 bg-red-50 text-red-800 p-3 font-mono text-xs whitespace-pre-wrap`,children:[(0,o.jsx)(`div`,{className:`font-bold mb-1`,children:`COMPILER / RUNTIME ERROR:`}),f]}),u.length>0&&(0,o.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-slate-100 p-3`,children:[(0,o.jsx)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 uppercase`,children:`Test Case Executions:`}),(0,o.jsx)(`div`,{className:`space-y-1.5 font-mono text-xs`,children:u.map((e,t)=>(0,o.jsxs)(`div`,{className:`flex flex-col p-2 border border-slate-300 bg-white`,children:[(0,o.jsxs)(`div`,{className:`flex justify-between`,children:[(0,o.jsxs)(`span`,{className:`font-bold`,children:[`Test Case `,t+1,`:`]}),(0,o.jsx)(`span`,{className:`font-bold uppercase ${e.status===`passed`?`text-green-600`:`text-red-600`}`,children:e.status})]}),(0,o.jsxs)(`div`,{className:`text-[10px] text-slate-500 mt-1`,children:[(0,o.jsxs)(`div`,{children:[`Input: `,JSON.stringify(e.input)]}),e.status===`passed`&&(0,o.jsxs)(`div`,{children:[`Output: `,JSON.stringify(e.got)]}),e.status===`failed`&&(0,o.jsxs)(`div`,{className:`text-red-700`,children:[`Expected: `,JSON.stringify(e.expected),` | Got: `,JSON.stringify(e.got)]}),e.status===`error`&&(0,o.jsxs)(`div`,{className:`text-red-700 font-semibold`,children:[`Error: `,e.error]})]})]},t))})]})]})}):(0,o.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-sans text-center gap-3`,children:[(0,o.jsx)(`span`,{className:`material-symbols-outlined text-red-500 text-4xl`,children:`error`}),(0,o.jsx)(`div`,{className:`font-bold text-ink-black text-sm`,children:f||`No active challenge found.`}),(0,o.jsx)(`button`,{onClick:v,className:`px-3 py-1.5 bg-yellow-400 hover:bg-yellow-300 border-[3px] border-ink-black text-xs font-bold font-window-title cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:`RETRY`})]})}export{s as default}; \ No newline at end of file +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Ht as n}from"./vendor-react-hnaVBnLv.js";import{s as r}from"./firebaseClient-DZobvwSx.js";import{t as i}from"./MarkdownRenderer-D8UdFpnD.js";var a=e(n(),1),o=t();function s(){let[e,t]=(0,a.useState)(null),[n,s]=(0,a.useState)(``),[c,l]=(0,a.useState)(!1),[u,d]=(0,a.useState)([]),[f,p]=(0,a.useState)(``),[m,h]=(0,a.useState)(!0),[g,_]=(0,a.useState)(0),v=async()=>{h(!0),p(``);try{let{data:{session:e}}=await r.auth.getSession();if(!e){p(`Unauthenticated session`);return}let n=await fetch(`/api/challenges/python/daily`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(n.ok){let e=await n.json();t(e),s(e.starter_code),_(e.total_score)}else p(`Failed to load challenge from server.`)}catch{p(`Connection timed out.`)}finally{h(!1)}};return(0,a.useEffect)(()=>{v()},[]),m?(0,o.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-arcade text-[10px]`,children:[(0,o.jsx)(`div`,{className:`animate-bounce mb-2`,children:`LOADING CHALLENGE...`}),(0,o.jsx)(`div`,{className:`w-48 h-4 bg-white border-[3px] border-ink-black overflow-hidden relative`,children:(0,o.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#9d4edd] w-2/3 animate-pulse border-r-2 border-ink-black`})})]}):e?(0,o.jsx)(`div`,{className:`w-full h-full bg-paper-white text-ink-black flex flex-col overflow-hidden text-xs md:text-sm`,children:(0,o.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4 custom-scrollbar flex flex-col gap-4`,children:[(0,o.jsxs)(`div`,{className:`flex justify-between items-center bg-slate-100 border-[3px] border-ink-black p-3`,children:[(0,o.jsxs)(`div`,{className:`flex gap-2`,children:[(0,o.jsx)(`span`,{className:`px-2 py-0.5 border-2 border-ink-black font-bold uppercase text-[9px] ${e.difficulty===`Easy`?`bg-green-200 text-green-800`:e.difficulty===`Medium`?`bg-yellow-200 text-yellow-800`:`bg-red-200 text-red-800`}`,children:e.difficulty}),(0,o.jsxs)(`span`,{className:`bg-blue-100 text-blue-800 px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:[`+`,e.points,` PTS`]}),e.completed?(0,o.jsx)(`span`,{className:`bg-emerald-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`COMPLETED`}):(0,o.jsx)(`span`,{className:`bg-rose-500 text-white px-2 py-0.5 border-2 border-ink-black font-bold text-[9px]`,children:`INCOMPLETE`})]}),(0,o.jsxs)(`div`,{className:`font-arcade text-[8px] text-purple-700 font-bold bg-white border-2 border-ink-black px-2 py-0.5 shadow-[1px_1px_0_0_#1E293B]`,children:[`TOTAL SCORE: `,g]})]}),(0,o.jsxs)(`div`,{className:`border-2 border-ink-black bg-slate-50 p-3 rounded font-sans leading-relaxed text-xs`,children:[(0,o.jsxs)(`h3`,{className:`font-bold border-b border-slate-300 pb-1 mb-2 uppercase tracking-wide text-primary-purple flex items-center gap-1`,children:[(0,o.jsx)(`span`,{className:`material-symbols-outlined text-sm`,children:`description`}),`Problem: `,e.title]}),(0,o.jsx)(i,{content:e.description})]}),(0,o.jsxs)(`div`,{className:`flex flex-col flex-1 min-h-[220px]`,children:[(0,o.jsxs)(`div`,{className:`flex justify-between items-center mb-1`,children:[(0,o.jsxs)(`span`,{className:`font-bold text-[10px] tracking-wide uppercase flex items-center gap-1`,children:[(0,o.jsx)(`span`,{className:`material-symbols-outlined text-sm text-purple-600`,children:`code`}),`Write Python Solution:`]}),(0,o.jsx)(`button`,{onClick:()=>s(e.starter_code),className:`text-[9px] underline text-blue-600 hover:text-blue-800 cursor-pointer font-sans`,children:`Reset Starter Code`})]}),(0,o.jsx)(`textarea`,{value:n,onChange:e=>s(e.target.value),className:`flex-1 w-full bg-slate-900 text-[#4ADE80] font-mono p-3 border-[3px] border-ink-black rounded outline-none focus:ring-2 focus:ring-primary-purple text-xs leading-relaxed resize-none`,placeholder:`# Write your python code here`,spellCheck:`false`})]}),(0,o.jsx)(`div`,{className:`shrink-0`,children:(0,o.jsx)(`button`,{disabled:c,onClick:async()=>{l(!0),p(``),d([]);try{let{data:{session:e}}=await r.auth.getSession();if(!e){p(`Unauthenticated session`);return}let i=await fetch(`/api/challenges/python/submit`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({code:n})});if(i.ok){let e=await i.json();e.success?(d(e.results),e.all_passed&&(_(e.total_score),t(e=>e?{...e,completed:!0}:null))):p(e.error)}else p(`Submission failed at server host.`)}catch{p(`Network connection lost.`)}finally{l(!1)}},className:`w-full bg-highlight-pink text-white font-window-title font-bold py-2 px-4 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none hover:bg-pink-400 transition-all disabled:opacity-50 cursor-pointer text-center text-xs`,children:c?`EXECUTING TEST CASES...`:`SUBMIT SOLUTION`})}),f&&(0,o.jsxs)(`div`,{className:`border-[3px] border-red-500 bg-red-50 text-red-800 p-3 font-mono text-xs whitespace-pre-wrap`,children:[(0,o.jsx)(`div`,{className:`font-bold mb-1`,children:`COMPILER / RUNTIME ERROR:`}),f]}),u.length>0&&(0,o.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-slate-100 p-3`,children:[(0,o.jsx)(`div`,{className:`font-bold text-[10px] border-b border-slate-300 pb-1 mb-2 uppercase`,children:`Test Case Executions:`}),(0,o.jsx)(`div`,{className:`space-y-1.5 font-mono text-xs`,children:u.map((e,t)=>(0,o.jsxs)(`div`,{className:`flex flex-col p-2 border border-slate-300 bg-white`,children:[(0,o.jsxs)(`div`,{className:`flex justify-between`,children:[(0,o.jsxs)(`span`,{className:`font-bold`,children:[`Test Case `,t+1,`:`]}),(0,o.jsx)(`span`,{className:`font-bold uppercase ${e.status===`passed`?`text-green-600`:`text-red-600`}`,children:e.status})]}),(0,o.jsxs)(`div`,{className:`text-[10px] text-slate-500 mt-1`,children:[(0,o.jsxs)(`div`,{children:[`Input: `,JSON.stringify(e.input)]}),e.status===`passed`&&(0,o.jsxs)(`div`,{children:[`Output: `,JSON.stringify(e.got)]}),e.status===`failed`&&(0,o.jsxs)(`div`,{className:`text-red-700`,children:[`Expected: `,JSON.stringify(e.expected),` | Got: `,JSON.stringify(e.got)]}),e.status===`error`&&(0,o.jsxs)(`div`,{className:`text-red-700 font-semibold`,children:[`Error: `,e.error]})]})]},t))})]})]})}):(0,o.jsxs)(`div`,{className:`w-full h-full bg-paper-white p-6 flex flex-col items-center justify-center font-sans text-center gap-3`,children:[(0,o.jsx)(`span`,{className:`material-symbols-outlined text-red-500 text-4xl`,children:`error`}),(0,o.jsx)(`div`,{className:`font-bold text-ink-black text-sm`,children:f||`No active challenge found.`}),(0,o.jsx)(`button`,{onClick:v,className:`px-3 py-1.5 bg-yellow-400 hover:bg-yellow-300 border-[3px] border-ink-black text-xs font-bold font-window-title cursor-pointer shadow-[2px_2px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none`,children:`RETRY`})]})}export{s as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/ReviewQueue-CltGWQpb.js b/algospaced-ui/dist/assets/ReviewQueue-CltGWQpb.js new file mode 100644 index 0000000000000000000000000000000000000000..790ec696df1329b5e9696beccc1616ce315a1975 --- /dev/null +++ b/algospaced-ui/dist/assets/ReviewQueue-CltGWQpb.js @@ -0,0 +1,5 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProblemSpecPanel-BRW8UyO6.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-react-hnaVBnLv.js","assets/vendor-codemirror-By0wlJeM.js","assets/index-DVWZ15xt.js","assets/firebaseClient-DZobvwSx.js","assets/vendor-firebase-DSIO3PIf.js","assets/vendor-ui-ZXcm-2wU.js","assets/index-BsU9BpJx.css","assets/MarkdownRenderer-D8UdFpnD.js"])))=>i.map(i=>d[i]); +import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{A as n,Bt as r,Et as i,F as a,Ht as o,M as s,O as c,P as l,St as u,Tt as d,X as f,a as p,d as m,et as h,ht as g,it as _,lt as v,mt as y,p as b,pt as x,q as S,s as C,st as w,t as T,tt as E,u as D,x as O,xt as ee,yt as k}from"./vendor-react-hnaVBnLv.js";import{r as A,s as j}from"./firebaseClient-DZobvwSx.js";import{b as M,c as N,n as P,o as te,r as F,s as I,t as L}from"./index-DVWZ15xt.js";import{o as ne,r as re}from"./githubSyncService-x0Mm_uEl.js";import{t as ie}from"./confetti.module-Uxh4CK4s.js";import"./MarkdownRenderer-D8UdFpnD.js";import"./PrincessChamber-abJShfI5.js";import{A as R,C as z,I as B,S as V,p as ae,t as oe,x as se,y as ce}from"./vendor-codemirror-By0wlJeM.js";var H=t(o(),1),U=r();function le(e){if(!e)return{description:``,examples:[],constraints:[]};let t=e.description||``,n=[],r=[];if(Array.isArray(e.examples)&&e.examples.length>0&&(n=e.examples.map(e=>typeof e==`string`?{input:e,output:``}:{input:e?.input||``,output:e?.output||``,explanation:e?.explanation||``})),Array.isArray(e.constraints)&&e.constraints.length>0?r=e.constraints.map(e=>String(e).replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean):typeof e.constraints==`string`&&e.constraints.trim()&&(r=e.constraints.split(` +`).map(e=>e.replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean)),n.length===0||r.length===0){let e=t.search(/\bExample\s*\d*:/i),i=t.search(/\bConstraints\s*:/i),a=-1;if(e!==-1&&i!==-1?a=Math.min(e,i):e===-1?i!==-1&&(a=i):a=e,a!==-1){let e=t.substring(0,a).trim(),i=t.substring(a),o=i,s=``,c=i.search(/\bConstraints\s*:/i);if(c!==-1&&(o=i.substring(0,c).trim(),s=i.substring(c).replace(/\bConstraints\s*:/i,``).trim()),n.length===0&&o){let e=/\bExample\s*(\d*)\s*:/gi,t=[],r;for(;(r=e.exec(o))!==null;)t.push({index:r.index,text:r[0]});for(let e=0;ee.replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean)),(n.length>0||r.length>0)&&(t=e)}}return{description:t,examples:n,constraints:r}}function ue(e,t,n,r){let i=e=>!e||/^Method\s*\d*$/i.test(e.trim())||e.trim().toLowerCase()===`standard`,a=(e||t||`Algorithm Problem`).trim(),o=null;if(t&&a.toLowerCase().startsWith(t.toLowerCase())){let e=a.slice(t.length).trim();if(a=t,e){let t=e.match(/^[-\s]*Method\s*(\d+)\s*\((.+)\)$/i);if(t){let e=parseInt(t[1],10),n=t[2].trim();i(n)?e>1&&(o=`Method ${e}`):o=n}else{let t=e.match(/^[-\s]*Method\s*(\d+)/i);if(t){let e=parseInt(t[1],10);e>1&&(o=`Method ${e}`)}else{let t=e.match(/^[-\s]*\((.+)\)$/);if(t){let e=t[1].trim();i(e)||(o=e)}else{let t=e.match(/^[-\s]+([^-]+)$/);t&&!i(t[1])&&(o=t[1].trim())}}}}}else{let e=a.match(/^(.*?)\s*-\s*Method\s*(\d+)\s*\((.+)\)$/i);if(e){a=e[1].trim();let t=parseInt(e[2],10),n=e[3].trim();i(n)?t>1&&(o=`Method ${t}`):o=n}else{let e=a.match(/^(.*?)\s*-\s*Method\s*(\d+)$/i);if(e){a=e[1].trim();let t=parseInt(e[2],10);t>1&&(o=`Method ${t}`)}else{let e=a.match(/^(.*?)\s*\(\s*Method\s*(\d+)\s*\)$/i);if(e){a=e[1].trim();let t=parseInt(e[2],10);t>1&&(o=`Method ${t}`)}}}}let s=`General Algorithm`;return i(n)?i(r)?o&&!i(o)&&(s=o):s=r.trim():s=n.trim(),{cleanTitle:a,approachVariant:o,pattern:s}}function de(e,t,n){if(!e)return[];if(Array.isArray(e.solutions)&&e.solutions.length>0)return e.solutions;let r=[],i=t||e.reference_code||``,a=e.pattern||`General Algorithm`,o=e.optimal_time||`O(N)`,s=e.optimal_space||`O(1)`;return(i||a)&&r.push({id:`sol-1`,name:e.approach_variant||`Optimal Solution`,pattern:a,time_complexity:o,space_complexity:s,code:i,explanation:e.how_to_solve||``,is_optimal:!0}),n&&n.trim()&&n.trim()!==i.trim()&&r.push({id:`sol-2`,name:`Personal Solution`,pattern:a,time_complexity:o,space_complexity:s,code:n,is_optimal:!1}),r}function W(e){if(e&&e!==`sandbox-user-id`)return e;try{let e=A();if(e?.user?.id&&e.user.id!==`sandbox-user-id`)return e.user.id}catch{}return`guest`}function fe({overrideProblemId:e,refreshTrigger:t,onClearOverride:n}){let[r,i]=(0,H.useState)([]),[a,o]=(0,H.useState)(!0),[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(!1),[d,f]=(0,H.useState)(null),[p,m]=(0,H.useState)(null),[h,g]=(0,H.useState)(``),[_,v]=(0,H.useState)(null),[y,b]=(0,H.useState)(!1),[x,S]=(0,H.useState)(()=>{try{return A()?.user?.id}catch{return}}),C=(0,H.useRef)(!1),w=(0,H.useRef)(n),T=(0,H.useRef)(!1);(0,H.useEffect)(()=>{w.current=n});let E=(0,H.useCallback)(async(t=!0)=>{t?(o(!0),m(null),c(null),g(``),C.current=!1):m(null);let n=W(x);try{if(typeof navigator<`u`&&!navigator.onLine)throw Error(`Network connection offline.`);let{data:{session:r}}=await j.auth.getSession(),a=r?r.access_token:`sandbox`;r?.user?.id&&(S(r.user.id),n=W(r.user.id));let o={Authorization:`Bearer ${a}`},s=new AbortController,l=setTimeout(()=>s.abort(),4e3),u;try{u=await fetch(`/api/reviews/due`,{headers:o,signal:s.signal})}finally{clearTimeout(l)}if(!u.ok)throw Error(`Failed to load review queue: HTTP ${u.status}`);let d=await u.json();if(Array.isArray(d)||(d=[]),e){let t=String(e).trim().toLowerCase(),n=d.findIndex(e=>{let n=e.problems;return!!(e.problem_id&&String(e.problem_id).trim().toLowerCase()===t||n?.id&&String(n.id).trim().toLowerCase()===t||n?.problem_number!==void 0&&n?.problem_number!==null&&String(n.problem_number)===t||n?.name&&n.name.trim().toLowerCase()===t)});if(n>0){let[e]=d.splice(n,1);d.unshift(e)}else if(n===-1){let t=null,n=await fetch(`/api/reviews/problems/id/${e}`,{headers:o});if(n.ok){let e=await n.json();Array.isArray(e)&&e.length>0&&(t=e[0])}if(!t){let n=/^\d+$/.test(e),r=F(n?parseInt(e,10):void 0,e);if(r)try{let e=await N(r);if(e?.problem_id){let n=await fetch(`/api/reviews/problems/id/${e.problem_id}`,{headers:o});if(n.ok){let e=await n.json();Array.isArray(e)&&e.length>0&&(t=e[0])}}}catch(e){console.error(`Failed to auto-activate problem for override review:`,e)}}t&&d.unshift(t)}}i(d),c(null);try{localStorage.setItem(`algospaced_review_queue_${n}`,JSON.stringify(d))}catch{}if(d&&d.length>0){if(t){let e=d[0],t=e.problems,n=t?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),r=F(n,t?.id||e?.problem_id,t?.name)?.starter_code||t?.starter_code||``;g(r)}}else try{let e=await fetch(`/api/journey-progress`,{headers:o});if(e.ok){let t=await e.json();v(I(new Set(t))??null)}else v(I(new Set)??null)}catch{v(I(new Set)??null)}}catch(e){console.error(`Error fetching review queue:`,e);let r=e instanceof Error?e.message:`Network error loading review queue.`,a=!1;try{let e=localStorage.getItem(`algospaced_review_queue_${n}`);if(e){let n=JSON.parse(e);if(Array.isArray(n)&&n.length>0&&(i(n),a=!0,c(null),t)){let e=n[0],t=e.problems,r=t?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),i=F(r,t?.id||e?.problem_id,t?.name)?.starter_code||t?.starter_code||``;g(i)}}}catch(e){console.warn(`Failed to parse cached review items:`,e)}a||c(r)}finally{o(!1)}},[e,x]);(0,H.useEffect)(()=>{if(T.current){T.current=!1;return}let e=!1,t=setTimeout(()=>{e||E(!0)},0);return()=>{e=!0,clearTimeout(t)}},[E,t]),(0,H.useEffect)(()=>{if(!a&&!s&&r.length===0&&!e&&!C.current){C.current=!0;try{ie({particleCount:90,spread:70,origin:{y:.6}})}catch{}}},[a,s,r.length,e]);let D=(0,H.useCallback)(async t=>{if(r.length===0||l)return;let n=r[0];if(!n||!n.id)return;u(!0),f(t),m(null);let a=[...r];try{let{data:{session:r}}=await j.auth.getSession(),o=r?r.access_token:`sandbox`,s=await fetch(`/api/reviews/complete`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${o}`},body:JSON.stringify({review_id:n.id,fsrs_state:n.fsrs_state??0,fsrs_step:n.fsrs_step??0,fsrs_stability:n.fsrs_stability??0,fsrs_difficulty:n.fsrs_difficulty??0,fsrs_elapsed_days:n.fsrs_elapsed_days??0,fsrs_scheduled_days:n.fsrs_scheduled_days??0,fsrs_reps:n.fsrs_reps??0,fsrs_lapses:n.fsrs_lapses??0,last_reviewed:n.last_reviewed,rating:t})});if(s.ok){let r=n?.problems?.name||``,a=n?.problems?.pattern||``,o=`Correct`;o=t===1?`Incorrect`:t===2?`Mixed`:`Correct`,M.addReviewEvent(o,r,a).catch(()=>{});let s=re(),l=h.trim()||n?.problems?.reference_code||``;s.token&&s.repoName&&s.autoCommit&&l&&ne({token:s.token,repo:s.repoName,branch:s.branch,problem_number:n?.problems?.problem_number,problem_name:r||`Algorithm Problem`,pattern:a||`Algorithms`,difficulty:n?.problems?.difficulty||`Medium`,optimal_time:n?.problems?.optimal_time||`O(N)`,optimal_space:n?.problems?.optimal_space||`O(1)`,description:n?.problems?.description||``,code:l}).catch(e=>{console.warn(`GitHub background auto-commit failed:`,e)}),e&&w.current&&(T.current=!0,w.current()),i(e=>{let t=e.slice(1);try{let e=W(x);localStorage.setItem(`algospaced_review_queue_${e}`,JSON.stringify(t))}catch{}if(t.length>0){let e=t[0],n=e.problems,r=n?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),i=F(r,n?.id||e?.problem_id,n?.name)?.starter_code||n?.starter_code||``;g(i)}else g(``);return t}),c(null),E(!1)}else{let e=await s.json().catch(()=>({}));m(e.detail||`Server returned error (${s.status}). Please try again.`),i(a)}}catch(e){console.error(`Error logging review completion:`,e);let t=e instanceof Error?e.message:`Network connection failed while logging review.`;m(t),i(a)}finally{u(!1),f(null)}},[r,l,e,E,h,x]),O=(0,H.useCallback)(async()=>{if(_&&!y){b(!0);try{await N(_),await E()}catch(e){console.error(`Failed to activate next milestone:`,e)}finally{b(!1)}}},[_,y,E]),ee=(0,H.useCallback)(()=>{let e=r[0],t=e?.problems,n=t?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),i=F(n,t?.id||e?.problem_id,t?.name)?.starter_code||t?.starter_code||``;g(i)},[r]);return{reviews:r,setReviews:i,loading:a,queueError:s,submitting:l,submittingRating:d,gradeError:p,setGradeError:m,code:h,setCode:g,nextMilestone:_,activatingMilestone:y,currentUserId:x,fetchQueue:E,handleGrade:D,handleSelectCard:(0,H.useCallback)(t=>{if(t<=0||t>=r.length||l)return;e&&w.current&&(T.current=!0,w.current());let n=r[t];if(!n)return;let a=n.problems,o=a?.problem_number??(/^\d+$/.test(n?.problem_id||``)?parseInt(n.problem_id,10):void 0),s=F(o,a?.id||n?.problem_id,a?.name)?.starter_code||a?.starter_code||``;g(s),i(e=>{let t=e.findIndex(e=>e.id&&e.id===n.id||e===n);return t<=0?e:[e[t],...e.slice(0,t),...e.slice(t+1)]})},[r,l,e]),handleActivateNextMilestone:O,handleResetStarterCode:ee}}function pe(){return{sandboxRunning:P(e=>e.sandboxRunning),sandboxResults:P(e=>e.sandboxResults),sandboxError:P(e=>e.sandboxError),savingReference:P(e=>e.savingReference),savedRefSuccess:P(e=>e.savedRefSuccess),saveRefError:P(e=>e.saveRefError),handleRunSandbox:P(e=>e.handleRunSandbox),handleSaveReference:P(e=>e.handleSaveReference),resetSandbox:P(e=>e.resetSandbox)}}function me(){return{aiLoading:P(e=>e.aiLoading),aiResult:P(e=>e.aiResult),aiError:P(e=>e.aiError),explainLoading:P(e=>e.explainLoading),explanationText:P(e=>e.explanationText),explainError:P(e=>e.explainError),aiSolutionLoading:P(e=>e.aiSolutionLoading),aiSolutionError:P(e=>e.aiSolutionError),handleAiEvaluation:P(e=>e.handleAiEvaluation),handleExplainCode:P(e=>e.handleExplainCode),handleFetchAiSolution:P(e=>e.handleFetchAiSolution),resetAiState:P(e=>e.resetAiState)}}var he=({problem:e,totalInQueue:t,reviews:n=[],onSelectCard:r,onOpenCreateProblem:i,onOpenEditProblem:o})=>{let[s,c]=(0,H.useState)(!1),u=(0,H.useRef)(null);(0,H.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&c(!1)},t=e=>{e.key===`Escape`&&c(!1)};return s&&(document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t)),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let d=e.problem_number?`https://leetcode.com/problemset/all/?search=${e.problem_number}`:`https://leetcode.com/problemset/all/?search=${encodeURIComponent(e.name||``)}`;return(0,U.jsxs)(`div`,{className:`shrink-0 bg-paper-white border-b-[3px] border-ink-black px-2.5 sm:px-4 py-2 flex flex-wrap items-center justify-between gap-2 shadow-[0_2px_0_0_rgba(30,41,59,0.05)] relative z-40`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 flex-wrap min-w-0`,children:[(0,U.jsxs)(`div`,{className:`relative shrink-0`,ref:u,children:[(0,U.jsxs)(`button`,{onClick:()=>c(e=>!e),className:`h-7 inline-flex items-center gap-1.5 px-2 sm:px-2.5 bg-amber-300 hover:bg-amber-200 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Click to view all cards due in today's queue`,children:[(0,U.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-emerald-500 animate-ping shrink-0`}),(0,U.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] font-bold text-ink-black tracking-wide whitespace-nowrap`,children:`CARD 1 OF ${t}`}),t>1&&(0,U.jsx)(ee,{className:`w-3 h-3 text-ink-black transition-transform shrink-0 ${s?`rotate-180`:``}`})]}),s&&n.length>0&&(0,U.jsxs)(`div`,{className:`absolute top-9 left-0 z-50 w-64 min-[400px]:w-72 sm:w-80 bg-paper-white border-[3px] border-ink-black gadget-shadow p-3 space-y-2 max-w-[calc(100vw-32px)]`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between border-b-2 border-ink-black pb-1.5 font-arcade text-[9px] font-bold text-ink-black`,children:[(0,U.jsx)(`span`,{children:`DAILY QUEUE (${n.length} CARDS)`}),(0,U.jsx)(`button`,{onClick:()=>c(!1),className:`px-1 hover:text-rose-600 font-bold cursor-pointer`,title:`Close`,children:`✕`})]}),(0,U.jsx)(`div`,{className:`text-[7.5px] font-arcade text-trash-gray uppercase -mt-0.5`,children:`Click any card to solve it now:`}),(0,U.jsx)(`div`,{className:`max-h-60 overflow-y-auto no-scrollbar space-y-1.5 pr-1`,children:n.map((e,t)=>{let n=e.problems,i=n?.problem_number,a=i==null?void 0:te(i),{cleanTitle:o,approachVariant:s}=ue(n?.name||``,a?.name),u=s?`${o} (${s})`:o,d=t===0,f=n?.difficulty,p=f?f.toUpperCase():`EASY`,m=f===`Easy`?`bg-emerald-600 text-white`:f===`Medium`?`bg-amber-400 text-ink-black`:`bg-rose-600 text-white`;return(0,U.jsxs)(`button`,{type:`button`,onClick:()=>{d||r?.(t),c(!1)},className:`group w-full text-left p-2 border-2 border-ink-black text-xs flex items-center justify-between gap-2 cursor-pointer transition-all duration-150 select-none ${d?`bg-amber-100 font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:`bg-white hover:bg-amber-50 hover:translate-x-0.5 active:translate-y-0.5 active:shadow-none shadow-[2px_2px_0px_0px_rgba(30,41,59,0.25)]`}`,title:d?`Currently active card`:`Jump to #${t+1}: ${u}`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 truncate min-w-0`,children:[(0,U.jsxs)(`span`,{className:`font-arcade text-[9px] text-trash-gray shrink-0`,children:[`#`,t+1]}),i!=null&&(0,U.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold px-1 py-0.2 bg-amber-300 border border-ink-black shrink-0`,children:[`LC #`,i]}),(0,U.jsx)(`span`,{className:`truncate`,children:u})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[d?(0,U.jsx)(`span`,{className:`text-[7.5px] font-arcade font-extrabold px-1 py-0.5 bg-amber-300 text-ink-black border border-ink-black shrink-0`,children:`NOW`}):(0,U.jsx)(l,{className:`w-2.5 h-2.5 fill-ink-black text-ink-black opacity-0 group-hover:opacity-100 transition-opacity shrink-0`}),(0,U.jsx)(`span`,{className:`text-[8px] font-arcade font-bold px-1.5 py-0.5 border border-ink-black shrink-0 ${m}`,children:p})]})]},e.id||t)})})]})]}),e.problem_number!==void 0&&e.problem_number!==null&&(0,U.jsx)(`span`,{className:`h-7 inline-flex items-center px-2 font-arcade text-[8px] sm:text-[9px] font-bold bg-amber-200 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-ink-black shrink-0 select-none whitespace-nowrap`,children:e.problem_number>0?`LC #${e.problem_number}`:`CUSTOM`}),(0,U.jsx)(`span`,{className:`h-7 inline-flex items-center px-2 font-arcade text-[8px] sm:text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] shrink-0 select-none whitespace-nowrap ${e.difficulty===`Easy`?`bg-emerald-600 text-white`:e.difficulty===`Medium`?`bg-amber-400 text-ink-black`:`bg-rose-600 text-white`}`,children:e.difficulty?e.difficulty.toUpperCase():`EASY`})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 shrink-0 flex-wrap justify-end`,children:[(0,U.jsxs)(`button`,{onClick:i,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-purple-50 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Create or Import Problem`,children:[(0,U.jsx)(y,{className:`w-3 h-3 text-purple-600 shrink-0`}),(0,U.jsx)(`span`,{className:`hidden min-[480px]:inline`,children:`ADD`})]}),o&&(0,U.jsxs)(`button`,{onClick:o,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-emerald-50 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Edit Problem Specification`,children:[(0,U.jsx)(a,{className:`w-3 h-3 text-emerald-600 shrink-0`}),(0,U.jsx)(`span`,{className:`hidden min-[480px]:inline`,children:`EDIT`})]}),e.google_doc_url&&(0,U.jsxs)(`a`,{href:e.google_doc_url,target:`_blank`,rel:`noreferrer`,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-slate-100 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Open Google Doc Notes`,children:[(0,U.jsx)(`span`,{children:`DOC`}),(0,U.jsx)(_,{className:`w-2.5 h-2.5 text-primary shrink-0`})]}),(0,U.jsxs)(`a`,{href:d,target:`_blank`,rel:`noreferrer`,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-slate-100 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Search LeetCode`,children:[(0,U.jsx)(`span`,{children:`LC`}),(0,U.jsx)(_,{className:`w-2.5 h-2.5 text-amber-600 shrink-0`})]})]})]})},ge=se.mark({class:`cm-indent-dot cm-indent-dot-primary`}),_e=se.mark({class:`cm-indent-dot cm-indent-dot-secondary`});function G(e){let t=new B;for(let{from:n,to:r}of e.visibleRanges){let i=n;for(;ie.decorations}),ye=V.theme({"&":{backgroundColor:`#0c111d`,color:`#f1f5f9`,height:`100%`,fontSize:`13px`,fontFamily:`var(--font-code, "JetBrains Mono", "Fira Code", monospace)`},".cm-scroller":{overflow:`auto`,fontFamily:`inherit`,lineHeight:`1.65`},".cm-content":{caretColor:`#4ade80`,padding:`12px 0`},"&.cm-focused .cm-cursor":{borderLeftColor:`#4ade80`,borderLeftWidth:`2px`,filter:`drop-shadow(0 0 5px rgba(74, 222, 128, 0.8))`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:`rgba(56, 189, 248, 0.25) !important`},".cm-gutters":{backgroundColor:`#070a12`,color:`#475569`,borderRight:`2px solid #1e293b`,paddingRight:`6px`,userSelect:`none`},".cm-activeLineGutter":{backgroundColor:`#131b2e`,color:`#38bdf8`,fontWeight:`700`},".cm-activeLine, &.cm-focused .cm-activeLine":{backgroundColor:`#0f172a !important`},".cm-line":{padding:`0 10px`},".cm-indent-dot":{position:`relative`,display:`inline-block`},".cm-indent-dot::before":{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,pointerEvents:`none`,userSelect:`none`,lineHeight:`0`,fontFamily:`monospace`},".cm-indent-dot-primary::before":{content:`"•"`,color:`#38bdf8`,fontSize:`9px`,opacity:`0.85`},".cm-indent-dot-secondary::before":{content:`"·"`,color:`#64748b`,fontSize:`11px`,opacity:`0.5`},"&.cm-focused .cm-matchingBracket, .cm-matchingBracket":{backgroundColor:`rgba(74, 222, 128, 0.2)`,outline:`1px solid #4ade80`,borderRadius:`2px`,color:`#86efac !important`},".cm-placeholder":{color:`#64748b`,fontStyle:`italic`},".cm-scroller::-webkit-scrollbar":{width:`6px`,height:`6px`},".cm-scroller::-webkit-scrollbar-track":{backgroundColor:`#070a12`},".cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#1e293b`,borderRadius:`3px`,border:`1px solid #334155`},".cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#38bdf8`}}),be=[oe(),ce.of(` `),R.of([ae]),ve,ye,V.contentAttributes.of({"aria-label":`Python Code Editor`})],K=[{id:`python`,name:`Python`,version:`3.14`}],xe=({className:e=`w-3.5 h-3.5`})=>(0,U.jsxs)(`svg`,{viewBox:`0 0 128 128`,className:e,xmlns:`http://www.w3.org/2000/svg`,children:[(0,U.jsx)(`path`,{d:`M63.454 4.018c-14.775 0-23.774 6.425-23.774 18.775v13.626h24.168v3.424H30.082C17.518 39.843 8 47.962 8 63.673c0 15.65 8.358 23.486 21.056 23.486h11.905v-16.89c0-13.064 11.233-24.113 24.331-24.113h23.773V32.793c0-11.83-9.988-19.775-23.773-19.775H63.454v-9zm-9.845 7.426a3.84 3.84 0 0 1 3.86 3.84 3.84 3.84 0 0 1-3.86 3.841 3.84 3.84 0 0 1-3.86-3.84 3.84 3.84 0 0 1 3.86-3.841z`,fill:`#387eb8`}),(0,U.jsx)(`path`,{d:`M64.546 123.982c14.775 0 23.774-6.425 23.774-18.775V91.581H64.152v-3.424h33.766c12.564 0 22.082-8.119 22.082-23.83 0-15.65-8.358-23.486-21.056-23.486H87.04v16.89c0 13.064-11.234 24.113-24.332 24.113H38.934v13.363c0 11.83 9.989 19.775 23.774 19.775h1.838v9zm9.845-7.426a3.84 3.84 0 0 1-3.86-3.84 3.84 3.84 0 0 1 3.86-3.841 3.84 3.84 0 0 1 3.86 3.84 3.84 3.84 0 0 1-3.86 3.841z`,fill:`#ffe052`})]}),Se=({mobileView:e,isNarrow:t=!1,isAutocompleteEnabled:r,onToggleAutocomplete:a,onResetStarterCode:o,code:d,onChangeCode:p,sandboxRunning:v,sandboxError:y,sandboxResults:S,onRunSandbox:C,savingReference:w,savedRefSuccess:E,saveRefError:D,onSaveReference:k,aiLoading:A,aiError:j,aiResult:M,onAiEvaluation:N,optimalTime:P,optimalSpace:te,onPushToGitHub:F,pushingToGitHub:I,githubPushedUrl:L,githubPushError:ne})=>{let[re,ie]=(0,H.useState)(`python`),[R,z]=(0,H.useState)(!1),B=(0,H.useRef)(null);(0,H.useEffect)(()=>{let e=e=>{B.current&&!B.current.contains(e.target)&&z(!1)},t=e=>{e.key===`Escape`&&z(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[]);let V=K.find(e=>e.id===re)??K[0];return(0,U.jsxs)(`div`,{className:`w-full ${t?`flex flex-1`:`lg:w-[51%] flex`} flex-col bg-[#fffdfa] overflow-y-auto no-scrollbar ${t&&e!==`code`?`hidden`:`flex`}`,children:[(0,U.jsxs)(`div`,{className:`shrink-0 bg-[#f7f5ed] border-b-2 border-ink-black p-2 sm:px-3 flex flex-wrap items-center justify-between gap-1.5 sm:gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 flex-wrap`,children:[(0,U.jsxs)(`div`,{className:`relative`,ref:B,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>z(e=>!e),className:`h-7 px-2.5 bg-white hover:bg-slate-100 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none flex items-center gap-1.5 font-arcade text-[9px] font-bold text-ink-black cursor-pointer transition-all select-none`,title:`Select programming language`,"aria-expanded":R,"aria-haspopup":`listbox`,children:[(0,U.jsx)(xe,{className:`w-3.5 h-3.5 shrink-0`}),(0,U.jsx)(`span`,{children:V.name}),(0,U.jsx)(ee,{className:`w-3 h-3 text-ink-black transition-transform duration-150 ${R?`rotate-180`:``}`})]}),R&&(0,U.jsxs)(`div`,{className:`absolute top-full mt-1.5 left-0 z-50 w-52 bg-paper-white border-[3px] border-ink-black gadget-shadow p-1.5 space-y-1`,role:`listbox`,children:[(0,U.jsx)(`div`,{className:`px-2 py-1 text-[8px] font-arcade font-bold text-trash-gray uppercase border-b border-slate-200`,children:`SELECT LANGUAGE`}),K.map(e=>{let t=re===e.id;return(0,U.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>{ie(e.id),z(!1)},className:`w-full flex items-center justify-between px-2.5 py-1.5 border-2 border-ink-black text-left transition-all cursor-pointer ${t?`bg-amber-200 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] font-bold text-ink-black`:`bg-white hover:bg-slate-100 text-slate-800`}`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[9px]`,children:[(0,U.jsx)(xe,{className:`w-3.5 h-3.5 shrink-0`}),(0,U.jsx)(`span`,{children:e.name})]}),(0,U.jsxs)(`span`,{className:`font-mono text-[8px] font-bold px-1.5 py-0.5 bg-white border border-ink-black text-slate-700 shadow-[1px_1px_0px_0px_rgba(30,41,59,0.3)]`,children:[`v`,e.version]})]},e.id)})]})]}),(0,U.jsx)(`div`,{className:`h-4 w-[2px] bg-slate-300 mx-0.5 hidden sm:block`}),(0,U.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 cursor-pointer select-none`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>a(e.target.checked),className:`sr-only peer`,"aria-label":`Toggle code editor autocompletion`}),(0,U.jsx)(`div`,{className:`relative w-7 h-3.5 bg-slate-300 border border-ink-black rounded-full peer peer-checked:bg-grass-green transition-all after:content-[''] after:absolute after:top-[1px] after:left-[2px] after:bg-white after:border after:border-ink-black after:rounded-full after:h-2 after:w-2 after:transition-all peer-checked:after:translate-x-3`}),(0,U.jsx)(`span`,{className:`text-[7.5px] min-[400px]:text-[8px] font-arcade font-bold text-trash-gray peer-checked:text-ink-black whitespace-nowrap`,children:`AUTOCOMPLETE`})]})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2`,children:[(0,U.jsx)(`button`,{onClick:o,className:`w-7 h-7 bg-white hover:bg-slate-100 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-ink-black flex items-center justify-center cursor-pointer transition-all`,title:`Reset to starter code`,"aria-label":`Reset to starter code`,children:(0,U.jsx)(n,{className:`w-3.5 h-3.5`})}),(0,U.jsx)(`button`,{onClick:()=>p(``),className:`w-7 h-7 bg-white hover:bg-rose-50 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-rose-700 flex items-center justify-center cursor-pointer transition-all`,title:`Clear editor`,"aria-label":`Clear editor`,children:(0,U.jsx)(b,{className:`w-3.5 h-3.5 text-rose-600`})}),k&&(0,U.jsx)(`button`,{onClick:k,disabled:w||!d.trim(),className:`w-7 h-7 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all ${E?`bg-emerald-600 hover:bg-emerald-500 text-white`:`bg-amber-400 hover:bg-amber-300 text-ink-black`}`,title:w?`Saving solution to personal database...`:E?`Saved to personal database!`:`Overwrite saved solution with studio code`,"aria-label":`Overwrite saved solution with studio code`,children:w?(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin text-ink-black`}):E?(0,U.jsx)(g,{className:`w-3.5 h-3.5 text-white`}):(0,U.jsx)(c,{className:`w-3.5 h-3.5 text-ink-black`})}),F&&(0,U.jsx)(`button`,{onClick:F,disabled:I||!d.trim(),className:`w-7 h-7 bg-[#24292e] hover:bg-black border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-white flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all`,title:I?`Pushing to GitHub...`:`Push solution to GitHub repository`,"aria-label":`Push to GitHub`,children:I?(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin text-yellow-300`}):(0,U.jsx)(h,{className:`w-3.5 h-3.5 text-yellow-300`})})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2`,children:[(0,U.jsx)(`button`,{onClick:C,disabled:v||!d.trim(),className:`w-7 h-7 bg-emerald-600 hover:bg-emerald-500 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-white flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all`,title:v?`Running sandbox tests...`:`Run tests in local sandbox`,"aria-label":`Run tests`,children:v?(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin`}):(0,U.jsx)(l,{className:`w-3.5 h-3.5 fill-white text-white ml-0.5`})}),(0,U.jsx)(`button`,{onClick:N,disabled:A||!d.trim(),className:`w-7 h-7 bg-purple-600 hover:bg-purple-500 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-white flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all`,title:A?`Evaluating code with Gemini...`:`Gemini Eval (AI code review & complexity)`,"aria-label":`Gemini Eval`,children:A?(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin`}):(0,U.jsx)(O,{className:`w-3.5 h-3.5 text-amber-300`})})]})]}),(0,U.jsxs)(`div`,{className:`p-4 sm:p-5 flex-1 flex flex-col space-y-4`,children:[(0,U.jsx)(`div`,{className:`flex-1 flex flex-col min-h-[300px] sm:min-h-[360px] border-[3px] border-ink-black shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] bg-[#0c111d] overflow-hidden`,children:(0,U.jsx)(`div`,{className:`flex-1 overflow-hidden relative`,children:(0,U.jsx)(T,{value:d,onChange:p,placeholder:`def solve(nums): + # Write your solution from memory here...`,height:`100%`,theme:`dark`,extensions:be,basicSetup:{autocompletion:r,lineNumbers:!0,foldGutter:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,defaultKeymap:!0,searchKeymap:!0,historyKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0},className:`w-full h-full text-xs font-code-mono`})})}),E&&(0,U.jsxs)(`div`,{className:`p-3 bg-[#f0fdf4] border-2 border-emerald-600 text-emerald-950 text-xs font-semibold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsx)(g,{className:`w-4 h-4 text-emerald-600 shrink-0`}),(0,U.jsx)(`span`,{children:`Successfully saved studio code as your personal reference solution!`})]}),D&&(0,U.jsxs)(`div`,{className:`p-3 bg-rose-50 border-2 border-rose-500 text-rose-800 text-xs font-semibold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsx)(m,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,U.jsx)(`span`,{children:D})]}),L&&(0,U.jsxs)(`div`,{className:`p-3 bg-[#f0fdf4] border-2 border-emerald-600 text-emerald-950 text-xs font-semibold flex items-center justify-between shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(g,{className:`w-4 h-4 text-emerald-600 shrink-0`}),(0,U.jsx)(`span`,{children:`Successfully pushed solution to your GitHub repository!`})]}),(0,U.jsxs)(`a`,{href:L,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] font-bold text-blue-700 hover:text-blue-900 underline flex items-center gap-1`,children:[(0,U.jsx)(`span`,{children:`View on GitHub`}),(0,U.jsx)(_,{className:`w-3 h-3`})]})]}),ne&&(0,U.jsxs)(`div`,{className:`p-3 bg-rose-50 border-2 border-rose-500 text-rose-800 text-xs font-semibold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsx)(m,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,U.jsx)(`span`,{children:ne})]}),v&&(0,U.jsxs)(`div`,{className:`p-3 border-2 border-ink-black bg-emerald-50 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] flex items-center gap-3 animate-pulse`,children:[(0,U.jsx)(s,{className:`w-5 h-5 text-emerald-600 animate-spin shrink-0`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:`Running...`}),(0,U.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray font-semibold mt-0.5`,children:`Executing against test cases...`})]})]}),y&&(0,U.jsxs)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] flex items-center gap-2`,children:[(0,U.jsx)(m,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,U.jsx)(`span`,{children:y})]}),S&&(0,U.jsxs)(`div`,{className:`border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-3.5 ${S.status===`passed`?`bg-[#f0fdf4]`:`bg-[#fff1f2]`}`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-2 pb-2.5 border-b-2 border-dashed border-ink-black`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,U.jsx)(`div`,{className:`w-8 h-8 border-2 border-ink-black flex items-center justify-center font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${S.status===`passed`?`bg-grass-green text-ink-black`:`bg-rose-500 text-white`}`,children:S.status===`passed`?(0,U.jsx)(u,{className:`w-5 h-5 stroke-[3]`}):(0,U.jsx)(m,{className:`w-4 h-4`})}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`font-arcade text-[10px] font-bold text-ink-black flex items-center gap-1.5 uppercase`,children:S.status===`passed`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:`ALL TESTS PASSED`}),(0,U.jsx)(g,{className:`w-3.5 h-3.5 text-emerald-600 inline`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:S.status===`error`?`EXECUTION ERROR`:`TESTS FAILED`}),(0,U.jsx)(x,{className:`w-3.5 h-3.5 text-rose-600 inline`})]})}),(0,U.jsxs)(`div`,{className:`font-sans text-[11px] text-slate-600 font-semibold`,children:[S.passed_count??0,` of `,S.total_tests??0,` test cases passed (`,(S.duration_ms??0).toFixed(1),`ms)`]})]})]}),S.status===`passed`&&(0,U.jsxs)(`button`,{onClick:k,disabled:w,className:`px-3 py-1.5 bg-white hover:bg-emerald-100 border-2 border-ink-black text-ink-black font-arcade text-[8px] font-bold flex items-center gap-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 disabled:opacity-50`,children:[w?(0,U.jsx)(s,{className:`w-3 h-3 animate-spin`}):E?(0,U.jsx)(g,{className:`w-3.5 h-3.5 text-emerald-600`}):(0,U.jsx)(c,{className:`w-3.5 h-3.5 text-blue-600`}),(0,U.jsx)(`span`,{children:E?`SAVED TO DB!`:`SAVE AS OFFICIAL SOLUTION`})]})]}),D&&(0,U.jsx)(`div`,{className:`p-2 border border-rose-500 bg-rose-100 text-rose-800 text-[11px] font-semibold`,children:D}),S.results&&S.results.length>0&&(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray uppercase font-bold block`,children:`TEST CASE BREAKDOWN:`}),(0,U.jsx)(`div`,{className:`space-y-1.5 max-h-56 overflow-y-auto custom-scrollbar`,children:S.results.map((e,t)=>(0,U.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black text-xs font-mono shadow-[2px_2px_0px_0px_rgba(30,41,59,0.3)] ${e.passed?`bg-white`:`bg-rose-50`}`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between font-arcade text-[8px] mb-1`,children:[(0,U.jsxs)(`span`,{className:`font-bold text-ink-black`,children:[`CASE #`,t+1]}),(0,U.jsx)(`span`,{className:e.passed?`text-emerald-700 font-bold`:`text-rose-700 font-bold`,children:e.passed?`✓ PASSED`:`✗ FAILED`})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-1.5 text-[10px]`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`text-slate-500 block`,children:`Input:`}),(0,U.jsx)(`span`,{className:`font-code-mono text-ink-black font-semibold break-all`,children:JSON.stringify(e.input)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`text-slate-500 block`,children:`Expected:`}),(0,U.jsx)(`span`,{className:`font-code-mono text-emerald-700 font-semibold break-all`,children:JSON.stringify(e.expected)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`text-slate-500 block`,children:`Output:`}),(0,U.jsx)(`span`,{className:`font-code-mono font-semibold break-all ${e.passed?`text-emerald-700`:`text-rose-700`}`,children:e.output===void 0?`None`:JSON.stringify(e.output)})]})]}),e.error&&(0,U.jsx)(`div`,{className:`mt-1.5 p-1.5 bg-rose-100 text-rose-900 text-[10px] font-mono border border-rose-300 break-all`,children:e.error})]},t))})]}),S.error&&(0,U.jsx)(`div`,{className:`p-3 bg-[#1E293B] text-rose-400 font-code-mono text-[11px] border-2 border-ink-black overflow-x-auto whitespace-pre-wrap select-text`,children:S.error}),S.status===`passed`&&(0,U.jsx)(`div`,{className:`p-2 bg-emerald-100/70 border border-emerald-300 text-emerald-900 text-xs flex items-center justify-between`,children:(0,U.jsx)(`span`,{className:`font-sans font-medium`,children:`✨ All unit tests passed. Rate your recall below.`})})]}),A&&(0,U.jsxs)(`div`,{className:`p-4 border-2 border-ink-black bg-amber-50 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] flex items-center gap-3 animate-pulse`,children:[(0,U.jsx)(s,{className:`w-6 h-6 text-purple-600 animate-spin shrink-0`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:`ANALYZING...`}),(0,U.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray font-semibold mt-0.5`,children:`Checking edge cases, bounds, and Big-O efficiency against optimal constraints...`})]})]}),j&&(0,U.jsx)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:j}),M&&(0,U.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-[#fefce8] p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between pb-3 border-b-2 border-dashed border-ink-black`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,U.jsx)(`div`,{className:`w-9 h-9 border-2 border-ink-black flex items-center justify-center font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${M.is_correct?`bg-grass-green text-ink-black`:`bg-rose-500 text-white`}`,children:M.is_correct?(0,U.jsx)(u,{className:`w-5 h-5 stroke-[3]`}):(0,U.jsx)(i,{className:`w-5 h-5`})}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`font-arcade text-[10px] font-bold text-ink-black flex items-center gap-1.5`,children:M.is_correct?(0,U.jsxs)(U.Fragment,{children:[`STATUS: PASSED`,(0,U.jsx)(g,{className:`w-3.5 h-3.5 text-emerald-600 inline`})]}):(0,U.jsxs)(U.Fragment,{children:[`STATUS: FAILED`,(0,U.jsx)(x,{className:`w-3.5 h-3.5 text-rose-600 inline`})]})}),(0,U.jsx)(`span`,{className:`font-sans text-[11px] text-slate-600 font-semibold`,children:M.is_correct?`Algorithm matches expected logic and patterns.`:`Bugs or edge-case failures detected.`})]})]}),(0,U.jsx)(`span`,{className:`font-arcade text-[9px] px-2 py-1 border-2 border-ink-black uppercase font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${M.is_correct?`bg-emerald-100 text-emerald-800`:`bg-rose-100 text-rose-800`}`,children:M.is_correct?`CORRECT`:`INCORRECT`})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,U.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase font-bold`,children:`Time Complexity`}),(0,U.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,U.jsx)(`span`,{className:`font-code-mono text-xs font-bold text-ink-black`,children:M.detected_complexity?.time||`N/A`}),(0,U.jsxs)(`span`,{className:`text-[10px] font-sans text-slate-500 font-semibold`,children:[`(Target: `,P||`O(N)`,`)`]})]})]}),(0,U.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase font-bold`,children:`Space Complexity`}),(0,U.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,U.jsx)(`span`,{className:`font-code-mono text-xs font-bold text-ink-black`,children:M.detected_complexity?.space||`N/A`}),(0,U.jsxs)(`span`,{className:`text-[10px] font-sans text-slate-500 font-semibold`,children:[`(Target: `,te||`O(1)`,`)`]})]})]})]}),M.bugs&&M.bugs.length>0&&(0,U.jsxs)(`div`,{className:`p-3 bg-white border-2 border-ink-black space-y-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsxs)(`span`,{className:`font-arcade text-[8px] text-rose-600 uppercase font-bold block flex items-center gap-1`,children:[(0,U.jsx)(m,{className:`w-3 h-3 text-rose-500`}),`TRACES & EDGE CASE ISSUES:`]}),(0,U.jsx)(`ul`,{className:`list-disc list-inside text-xs text-slate-800 space-y-1 font-semibold pl-1`,children:M.bugs.map((e,t)=>(0,U.jsx)(`li`,{className:`leading-relaxed select-text`,children:e},t))})]}),M.key_suggestion&&(0,U.jsxs)(`div`,{className:`p-3 bg-amber-50 border-2 border-ink-black space-y-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,U.jsxs)(`span`,{className:`font-arcade text-[8px] text-amber-700 uppercase font-bold block flex items-center gap-1`,children:[(0,U.jsx)(O,{className:`w-3 h-3 text-amber-500`}),`TIP:`]}),(0,U.jsx)(`p`,{className:`text-xs text-slate-800 font-medium leading-relaxed m-0 select-text`,children:M.key_suggestion})]}),(0,U.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-dashed border-ink-black flex items-center justify-between`,children:[(0,U.jsxs)(`span`,{className:`text-xs font-bold text-ink-black flex items-center gap-1.5`,children:[(0,U.jsx)(f,{className:`w-4 h-4 text-primary`}),`Recommendation:`]}),(0,U.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-purple-700`,children:M.is_correct?`Rate your recall below.`:`Review issues and rate recall below.`})]})]})]})]})},Ce=({gradeError:e,onDismissGradeError:t,submitting:n,submittingRating:r,onGrade:i})=>(0,U.jsx)(`div`,{className:`shrink-0 bg-[#f8f5eb] border-t-[3px] border-ink-black p-2 sm:p-3 flex flex-col items-stretch gap-1.5 sm:gap-2 shadow-[0_-3px_0_0_rgba(30,41,59,0.08)]`,children:(0,U.jsxs)(`div`,{className:`w-full flex flex-col`,children:[e&&(0,U.jsxs)(`div`,{className:`p-2.5 mb-2 bg-red-100 border-2 border-red-500 text-red-800 text-xs font-semibold shadow-[2px_2px_0px_0px_#1E293B] flex items-center justify-between`,children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(m,{className:`w-4 h-4 text-red-600 shrink-0`}),e]}),(0,U.jsx)(`button`,{onClick:t,className:`text-red-900 font-bold hover:underline cursor-pointer ml-2 text-xs`,children:`Dismiss`})]}),(0,U.jsxs)(`div`,{className:`flex gap-1.5 sm:gap-2.5 w-full`,children:[(0,U.jsx)(`button`,{onClick:()=>i(1),disabled:n,className:`flex-1 min-w-0 bg-[#dc2626] hover:bg-[#b91c1c] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-white flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 1 on keyboard`,children:r===1?(0,U.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin`})}):(0,U.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,U.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/20 rounded shrink-0`,children:`1`}),(0,U.jsx)(`span`,{className:`truncate`,children:`Again`})]})}),(0,U.jsx)(`button`,{onClick:()=>i(2),disabled:n,className:`flex-1 min-w-0 bg-[#ff9933] hover:bg-[#ff8000] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 2 on keyboard`,children:r===2?(0,U.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,U.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,U.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/10 rounded shrink-0`,children:`2`}),(0,U.jsx)(`span`,{className:`truncate`,children:`Hard`})]})}),(0,U.jsx)(`button`,{onClick:()=>i(3),disabled:n,className:`flex-1 min-w-0 bg-[#4ade80] hover:bg-[#22c55e] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 3 on keyboard`,children:r===3?(0,U.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,U.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,U.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/10 rounded shrink-0`,children:`3`}),(0,U.jsx)(`span`,{className:`truncate`,children:`Good`})]})}),(0,U.jsx)(`button`,{onClick:()=>i(4),disabled:n,className:`flex-1 min-w-0 bg-[#60a5fa] hover:bg-[#3b82f6] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 4 on keyboard`,children:r===4?(0,U.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,U.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,U.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/10 rounded shrink-0`,children:`4`}),(0,U.jsx)(`span`,{className:`truncate`,children:`Easy`})]})})]})]})}),we=({nextMilestone:e,activatingMilestone:t,onActivateNextMilestone:r,onOpenCardManager:i,onOpenJourney:a,onOpenCreateProblem:o,onOpenWindow:c,overrideProblemId:l,onClearOverride:d})=>(0,U.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] p-6 overflow-y-auto custom-scrollbar`,children:(0,U.jsxs)(`div`,{className:`w-full max-w-lg bg-paper-white border-[4px] border-ink-black gadget-shadow p-6 sm:p-8 relative overflow-hidden text-center space-y-6`,children:[(0,U.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-3 bg-gradient-to-r from-grass-green via-amber-300 to-highlight-pink`}),(0,U.jsxs)(`div`,{className:`relative inline-block mt-2`,children:[(0,U.jsx)(`div`,{className:`w-20 h-20 bg-amber-300 border-[3px] border-ink-black rounded-2xl flex items-center justify-center mx-auto gadget-shadow rotate-[-3deg] hover:rotate-0 transition-transform`,children:(0,U.jsx)(D,{className:`w-10 h-10 text-ink-black stroke-[2.5]`})}),(0,U.jsx)(`div`,{className:`absolute -bottom-2 -right-2 bg-grass-green border-2 border-ink-black px-2 py-0.5 font-arcade text-[8px] text-ink-black font-bold uppercase shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:`100% DONE`})]}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-1 bg-emerald-100 border-2 border-ink-black text-emerald-800 font-arcade text-[9px] font-bold`,children:[(0,U.jsx)(u,{className:`w-3 h-3 stroke-[3]`}),` ALL CARDS COMPLETED FOR TODAY`]}),(0,U.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold text-ink-black font-headline-md tracking-tight`,children:`You're all caught up for today. Keep it up.`}),(0,U.jsx)(`p`,{className:`text-xs sm:text-sm font-sans text-trash-gray max-w-md mx-auto leading-relaxed font-semibold`,children:`All reviews for today are finished. Next reviews are scheduled for tomorrow.`})]}),e&&(0,U.jsxs)(`div`,{className:`p-4 sm:p-5 bg-gradient-to-br from-amber-50 to-orange-50 border-[3px] border-ink-black gadget-shadow text-left space-y-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-amber-800 uppercase tracking-wider flex items-center gap-1.5`,children:[(0,U.jsx)(w,{className:`w-3.5 h-3.5 text-amber-600`}),`NEXT UNEXPLORED MILESTONE`]}),(0,U.jsxs)(`span`,{className:`font-mono text-[10px] font-bold px-2 py-0.5 rounded bg-amber-900/10 text-amber-900 border border-amber-900/20`,children:[`LC #`,e.problem_number]})]}),(0,U.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h3`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black truncate`,children:e.name}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 flex-wrap`,children:[(0,U.jsx)(`span`,{className:`px-2 py-0.5 rounded font-arcade text-[8px] font-bold uppercase text-white ${e.difficulty===`Easy`?`bg-emerald-600`:e.difficulty===`Medium`?`bg-amber-600`:`bg-rose-600`}`,children:e.difficulty}),(0,U.jsx)(`span`,{className:`px-2 py-0.5 rounded font-arcade text-[8px] bg-purple-100 text-purple-800 border border-purple-300 font-bold`,children:e.pattern}),(0,U.jsxs)(`span`,{className:`text-[11px] font-code-mono text-slate-600`,children:[`T: `,e.time_complexity,` | S: `,e.space_complexity]})]})]}),(0,U.jsx)(`button`,{onClick:r,disabled:t,className:`px-4 py-2.5 bg-grass-green hover:bg-emerald-400 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 flex items-center justify-center gap-1.5 disabled:opacity-50`,children:t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(s,{className:`w-3.5 h-3.5 animate-spin`}),(0,U.jsx)(`span`,{children:`ACTIVATING...`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(O,{className:`w-3.5 h-3.5 text-amber-700`}),(0,U.jsx)(`span`,{children:`ACTIVATE & REVIEW NOW`})]})})]})]}),(0,U.jsxs)(`div`,{className:`p-4 sm:p-5 bg-gradient-to-r from-sky-100 via-sky-200 to-indigo-100 border-[3px] border-ink-black gadget-shadow text-left flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-sky-900 uppercase flex items-center gap-1.5`,children:[(0,U.jsx)(p,{className:`w-3.5 h-3.5 text-sky-700`}),`DECK BROWSER & CARD MANAGER`]}),(0,U.jsx)(`h3`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black`,children:`Want to Manage or Reschedule Cards?`}),(0,U.jsx)(`p`,{className:`font-sans text-xs text-trash-gray font-semibold max-w-md`,children:`Browse your full 150-card curriculum, reschedule intervals, or enroll new topics in the Anki-style Card Manager.`})]}),(0,U.jsxs)(`button`,{onClick:()=>{i?i():c?.(`cardManager`)},className:`px-4 py-2.5 bg-sky-400 hover:bg-sky-300 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 flex items-center gap-1.5`,children:[(0,U.jsx)(p,{className:`w-3.5 h-3.5 text-sky-950`}),(0,U.jsx)(`span`,{children:`OPEN CARD MANAGER`})]})]}),(0,U.jsxs)(`div`,{className:`border-t-[3px] border-dashed border-ink-black pt-5 space-y-3`,children:[(0,U.jsx)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold text-left`,children:`CONTINUE PRACTICING:`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2.5`,children:[(0,U.jsxs)(`button`,{onClick:a,className:`p-3 bg-amber-100 hover:bg-amber-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(w,{className:`w-4 h-4 text-amber-600`}),(0,U.jsx)(k,{className:`w-3 h-3 text-ink-black`})]}),(0,U.jsxs)(`div`,{className:`mt-2`,children:[(0,U.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Journey Trail`}),(0,U.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`150 Curated nodes`})]})]}),(0,U.jsxs)(`button`,{onClick:o,className:`p-3 bg-purple-100 hover:bg-purple-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(y,{className:`w-4 h-4 text-purple-700`}),(0,U.jsx)(k,{className:`w-3 h-3 text-ink-black`})]}),(0,U.jsxs)(`div`,{className:`mt-2`,children:[(0,U.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Add Problem`}),(0,U.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`New LeetCode entry`})]})]}),(0,U.jsxs)(`button`,{onClick:()=>c?.(`companion`),className:`p-3 bg-yellow-100 hover:bg-yellow-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`material-symbols-outlined text-amber-600 text-lg`,children:`castle`}),(0,U.jsx)(k,{className:`w-3 h-3 text-ink-black`})]}),(0,U.jsxs)(`div`,{className:`mt-2`,children:[(0,U.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Princess Tower`}),(0,U.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`Visit Aurelia`})]})]}),(0,U.jsxs)(`button`,{onClick:()=>{i?i():c?.(`cardManager`)},className:`p-3 bg-cyan-100 hover:bg-cyan-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(S,{className:`w-4 h-4 text-cyan-700`}),(0,U.jsx)(k,{className:`w-3 h-3 text-ink-black`})]}),(0,U.jsxs)(`div`,{className:`mt-2`,children:[(0,U.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Card Manager`}),(0,U.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`Anki Deck Browser`})]})]})]})]}),l&&d&&(0,U.jsxs)(`button`,{onClick:d,className:`mt-3 bg-white hover:bg-slate-100 border-[3px] border-ink-black text-ink-black font-bold px-4 py-2 text-xs uppercase tracking-wide shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer inline-flex items-center gap-2`,children:[(0,U.jsx)(n,{className:`w-3.5 h-3.5`}),` Return to Scheduled Queue`]})]})}),Te=e({default:()=>De}),Ee=(0,H.lazy)(()=>L(()=>import(`./ProblemSpecPanel-BRW8UyO6.js`).then(e=>({default:e.ProblemSpecPanel})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])));function De({overrideProblemId:e,onClearOverride:t,onOpenWindow:r,onOpenJourney:i,onOpenCreateProblem:a,onOpenEditProblem:o,onOpenCardManager:c,refreshTrigger:l}){let[u,f]=(0,H.useState)(null),p=u!==null&&u<780,[h,g]=(0,H.useState)(`spec`),[_,y]=(0,H.useState)(`spec`),[b,x]=(0,H.useState)(null),S=(0,H.useCallback)(e=>{e&&(f(e.clientWidth),new ResizeObserver(e=>{for(let t of e)f(t.contentRect.width)}).observe(e))},[]),[w,T]=(0,H.useState)(()=>localStorage.getItem(`isAutocompleteEnabled`)!==`false`),{reviews:D,setReviews:O,loading:ee,queueError:k,submitting:A,submittingRating:j,gradeError:M,setGradeError:N,code:P,setCode:te,nextMilestone:I,activatingMilestone:L,fetchQueue:ie,handleGrade:R,handleSelectCard:z,handleActivateNextMilestone:B,handleResetStarterCode:V}=fe({overrideProblemId:e,refreshTrigger:l,onClearOverride:t}),{sandboxRunning:ae,sandboxResults:oe,sandboxError:se,savingReference:ce,savedRefSuccess:de,saveRefError:W,handleRunSandbox:ge,handleSaveReference:_e,resetSandbox:G}=pe(),{aiLoading:ve,aiResult:ye,aiError:be,explainLoading:K,explanationText:xe,explainError:Te,aiSolutionLoading:De,aiSolutionError:Oe,handleAiEvaluation:ke,handleExplainCode:Ae,handleFetchAiSolution:je,resetAiState:q}=me(),[Me,Ne]=(0,H.useState)(!1),[Pe,Fe]=(0,H.useState)(null),[Ie,J]=(0,H.useState)(null),Le=(0,H.useCallback)(async()=>{if(D.length===0)return;let e=D[0]?.problems||{},t=P.trim()||e.reference_code||``;if(!t){J(`Please write or save code before pushing to GitHub.`),setTimeout(()=>J(null),4e3);return}let n=re();if(!n.token){r&&r(`github`);return}Ne(!0),J(null),Fe(null);try{let r=await ne({token:n.token,repo:n.repoName,branch:n.branch,problem_number:e.problem_number,problem_name:e.name||`Algorithm Problem`,pattern:e.pattern||`Algorithms`,difficulty:e.difficulty||`Medium`,optimal_time:e.optimal_time||`O(N)`,optimal_space:e.optimal_space||`O(1)`,description:e.description||``,code:t});Fe(r.html_url),setTimeout(()=>Fe(null),8e3)}catch(e){J(e.message||`Failed to push solution to GitHub.`),setTimeout(()=>J(null),5e3)}finally{Ne(!1)}},[D,P,r]),Re=D[0]?.id||D[0]?.problem_id,ze=(0,H.useRef)(void 0);(0,H.useEffect)(()=>{Re&&ze.current!==Re&&(ze.current=Re,q(),G())},[Re,q,G]);let Y=(0,H.useCallback)(e=>{q(),G(),R(e)},[R,q,G]),Be=(0,H.useCallback)(e=>{q(),G(),z(e)},[z,q,G]);(0,H.useEffect)(()=>{let e=e=>{let t=e.target;t?.closest(`.cm-editor`)||t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.isContentEditable||D.length===0||A||(e.key===`1`?(e.preventDefault(),Y(1)):e.key===`2`?(e.preventDefault(),Y(2)):e.key===`3`?(e.preventDefault(),Y(3)):e.key===`4`&&(e.preventDefault(),Y(4)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Y,D.length,A]);let Ve=(e,t)=>{navigator.clipboard.writeText(e),x(t),setTimeout(()=>x(null),1800)},He=(0,H.useCallback)(()=>{i?i():r?.(`journey`)},[i,r]),Ue=(0,H.useCallback)(()=>{a?a():r?.(`createProblem`)},[a,r]),We=(0,H.useCallback)(e=>{O(t=>{if(t.length===0)return t;let n=[...t],r=n[0];return r&&r.problems&&(r.problems={...r.problems,solutions:e}),n})},[O]);if(ee)return(0,U.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] text-ink-black`,children:(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-4 p-8 bg-paper-white border-[3px] border-ink-black gadget-shadow text-center max-w-xs`,children:[(0,U.jsx)(`div`,{className:`w-12 h-12 bg-amber-200 border-2 border-ink-black flex items-center justify-center animate-spin`,children:(0,U.jsx)(s,{className:`w-6 h-6 text-ink-black`})}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h3`,{className:`font-arcade text-xs text-ink-black uppercase tracking-wider font-bold`,children:`LOADING QUEUE`}),(0,U.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray mt-1 font-semibold`,children:`Fetching scheduled FSRS review cards...`})]})]})});if(k&&D.length===0)return(0,U.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] p-6 overflow-y-auto custom-scrollbar`,children:(0,U.jsxs)(`div`,{className:`w-full max-w-md bg-paper-white border-[4px] border-ink-black gadget-shadow p-6 sm:p-8 relative overflow-hidden text-center space-y-6`,children:[(0,U.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-3 bg-gradient-to-r from-red-500 via-amber-400 to-red-500`}),(0,U.jsxs)(`div`,{className:`relative inline-block mt-2`,children:[(0,U.jsx)(`div`,{className:`w-20 h-20 bg-rose-200 border-[3px] border-ink-black rounded-2xl flex items-center justify-center mx-auto gadget-shadow rotate-[-2deg]`,children:(0,U.jsx)(C,{className:`w-10 h-10 text-rose-700 stroke-[2.5]`})}),(0,U.jsx)(`div`,{className:`absolute -bottom-2 -right-2 bg-rose-500 text-white border-2 border-ink-black px-2 py-0.5 font-arcade text-[8px] font-bold uppercase shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:`OFFLINE`})]}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 px-2.5 py-1 bg-rose-100 border-2 border-ink-black text-rose-800 font-arcade text-[9px] font-bold`,children:[(0,U.jsx)(m,{className:`w-3.5 h-3.5 stroke-[2.5] text-rose-600`}),` CONNECTION ERROR`]}),(0,U.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold text-ink-black font-headline-md tracking-tight`,children:`Queue Unavailable`}),(0,U.jsx)(`p`,{className:`font-sans text-xs sm:text-sm text-trash-gray font-semibold leading-relaxed max-w-sm mx-auto`,children:`Unable to reach the server to fetch your scheduled review cards. Check your connection or retry below.`})]}),(0,U.jsxs)(`div`,{className:`pt-2 flex flex-col sm:flex-row gap-3 justify-center items-center`,children:[(0,U.jsxs)(`button`,{onClick:()=>void ie(!0),className:`w-full sm:w-auto px-6 py-2.5 bg-amber-300 hover:bg-amber-400 border-[3px] border-ink-black font-arcade text-xs font-bold text-ink-black gadget-shadow active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all flex items-center justify-center gap-2 cursor-pointer`,children:[(0,U.jsx)(n,{className:`w-4 h-4`}),(0,U.jsx)(`span`,{children:`RETRY CONNECTION`})]}),(i||r)&&(0,U.jsx)(`button`,{onClick:He,className:`w-full sm:w-auto px-5 py-2.5 bg-paper-white hover:bg-warm-sand-bg border-[3px] border-ink-black font-arcade text-xs font-bold text-ink-black gadget-shadow active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all flex items-center justify-center gap-2 cursor-pointer`,children:(0,U.jsx)(`span`,{children:`OPEN JOURNEY MAP`})})]})]})});if(D.length===0)return(0,U.jsx)(we,{nextMilestone:I,activatingMilestone:L,onActivateNextMilestone:B,onOpenCardManager:c||(()=>r?.(`cardManager`)),onOpenJourney:He,onOpenCreateProblem:Ue,onOpenWindow:r,overrideProblemId:e,onClearOverride:t});let X=D[0],Z=X?.problems,Ge=Z?.problem_number??(/^\d+$/.test(X?.problem_id||``)?parseInt(X.problem_id,10):void 0),Q=F(Ge,Z?.id||X?.problem_id,Z?.name),{cleanTitle:Ke,approachVariant:qe,pattern:Je}=ue(Z?.name,Q?.name,Z?.pattern,Q?.pattern),$={...Q,...Z,id:Z?.id||Q?.id||X?.problem_id,name:Ke,problem_number:Z?.problem_number??Q?.problem_number,pattern:Je,approach_variant:qe,difficulty:Z?.difficulty||Q?.difficulty||`Medium`,reference_code:Z?.reference_code||Q?.reference_solution||``,starter_code:Q?.starter_code||Z?.starter_code||``,description:Z?.description||Q?.description||``,optimal_time:Z?.optimal_time||Q?.time_complexity||`O(N)`,optimal_space:Z?.optimal_space||Q?.space_complexity||`O(1)`,examples:Z?.examples&&Z.examples.length>0?Z.examples:Q?.examples,constraints:Z?.constraints||Q?.constraints,how_to_solve:Z?.how_to_solve||``,solutions:Z?.solutions&&Z.solutions.length>0?Z.solutions:Q?.solutions},Ye=le({...Q,...$,examples:$.examples&&$.examples.length>0?$.examples:Q?.examples,constraints:$.constraints&&(Array.isArray($.constraints)?$.constraints.length>0:$.constraints)?$.constraints:Q?.constraints}),Xe=Q?.reference_solution||``,Ze=Z?.reference_code||``,Qe=Ze&&(!Xe||Ze.trim()!==Xe.trim())?Ze:``,$e=Qe||Xe||Ze||``;return(0,U.jsxs)(`div`,{ref:S,className:`w-full h-full bg-[#fdf8e1] flex flex-col overflow-hidden select-none`,children:[(0,U.jsx)(he,{problem:$,totalInQueue:D.length,reviews:D,overrideProblemId:e,onSelectCard:Be,onOpenCreateProblem:Ue,onOpenEditProblem:()=>{o?o($):r?.(`editProblem`)}}),(0,U.jsxs)(`div`,{className:`${p?`flex`:`hidden`} shrink-0 bg-amber-100 border-b-[3px] border-ink-black px-2.5 sm:px-3 py-1.5 gap-1.5 sm:gap-2 overflow-x-auto no-scrollbar`,children:[(0,U.jsxs)(`button`,{onClick:()=>{y(`spec`),g(`spec`)},className:`px-2.5 sm:px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 whitespace-nowrap ${_===`spec`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,U.jsx)(E,{className:`w-3 h-3 shrink-0`}),(0,U.jsx)(`span`,{children:`SPEC`})]}),(0,U.jsxs)(`button`,{onClick:()=>y(`code`),className:`px-2.5 sm:px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 whitespace-nowrap ${_===`code`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,U.jsx)(v,{className:`w-3 h-3 shrink-0`}),(0,U.jsx)(`span`,{children:`CODE STUDIO`})]}),(0,U.jsxs)(`button`,{onClick:()=>{y(`ref`),g(`ref`)},className:`px-2.5 sm:px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 whitespace-nowrap ${_===`ref`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,U.jsx)(d,{className:`w-3 h-3 shrink-0`}),(0,U.jsx)(`span`,{children:`SOLUTION`})]})]}),(0,U.jsxs)(`div`,{className:`flex-1 flex ${p?`flex-col`:`flex-row`} overflow-hidden min-h-0`,children:[(0,U.jsx)(H.Suspense,{fallback:(0,U.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-8 bg-paper-white ${p?`h-64`:`border-r-[4px] border-ink-black`} font-sans text-xs text-trash-gray select-none`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2 font-arcade text-[10px] text-ink-black`,children:[(0,U.jsx)(s,{className:`w-4 h-4 animate-spin text-[#0ea5e9]`}),(0,U.jsx)(`span`,{children:`Loading Problem Spec...`})]})}),children:(0,U.jsx)(Ee,{leftTab:h,onSelectLeftTab:e=>{g(e),e===`ref`?y(`ref`):e===`spec`&&y(`spec`)},mobileView:_,isNarrow:p,problem:$,parsed:Ye,userSolution:Qe,officialSolution:Xe,effectiveReferenceCode:$e,copiedSnippet:b,onCopyText:Ve,saveRefError:W,aiSolutionLoading:De,aiSolutionError:Oe,onFetchAiSolution:()=>je(X,e=>{O(t=>t.map((t,n)=>n===0?{...t,problems:{...$||{},...t.problems||{},reference_code:e}}:t))}),explainLoading:K,explainError:Te,explanationText:xe,onExplainCode:(e,t,n,r)=>Ae(X,e,t,n,r),activeReview:X,onUpdateSolutions:We,onEditProblem:()=>{o?o($):r?.(`editProblem`)}})}),(0,U.jsx)(Se,{mobileView:_,isNarrow:p,isAutocompleteEnabled:w,onToggleAutocomplete:e=>{T(e),localStorage.setItem(`isAutocompleteEnabled`,String(e))},onResetStarterCode:V,code:P,onChangeCode:te,sandboxRunning:ae,sandboxError:se,sandboxResults:oe,onRunSandbox:()=>ge(X,P),savingReference:ce,savedRefSuccess:de,saveRefError:W,onSaveReference:()=>_e(X,P,(e,t)=>{O(n=>n.map((n,r)=>r===0?{...n,problem_id:t||n.problem_id,problems:{...$||{},...n.problems||{},id:t||n.problems?.id||n.problem_id,reference_code:e}}:n))}),aiLoading:ve,aiError:be,aiResult:ye,onAiEvaluation:()=>ke(X,P),optimalTime:$.optimal_time||`O(N)`,optimalSpace:$.optimal_space||`O(1)`,onPushToGitHub:Le,pushingToGitHub:Me,githubPushedUrl:Pe,githubPushError:Ie})]}),(0,U.jsx)(Ce,{gradeError:M,onDismissGradeError:()=>N(null),submitting:A,submittingRating:j,onGrade:Y})]})}export{De as default,de as n,Te as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/ReviewQueue-DmsrlLxn.js b/algospaced-ui/dist/assets/ReviewQueue-DmsrlLxn.js deleted file mode 100644 index 0abf79db7c792e7621c821701a02ae57a6d4c341..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/ReviewQueue-DmsrlLxn.js +++ /dev/null @@ -1,5 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProblemSpecPanel-CLbwqTwe.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-react-CIO8MTK1.js","assets/vendor-codemirror-By0wlJeM.js","assets/index-DnK6BACV.js","assets/firebaseClient-DZobvwSx.js","assets/vendor-firebase-DSIO3PIf.js","assets/vendor-ui-ZXcm-2wU.js","assets/index-tlaKBeUb.css","assets/MarkdownRenderer-BMZIn30p.js"])))=>i.map(i=>d[i]); -import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{A as n,Bt as r,Ct as i,E as a,J as o,M as s,N as c,O as l,Q as u,Rt as d,St as f,Z as p,a as m,d as h,dt as g,ft as _,gt as v,it as y,ot as b,p as x,s as S,t as C,tt as w,u as T,ut as E,vt as D,y as O,yt as k}from"./vendor-react-CIO8MTK1.js";import{r as A,s as j}from"./firebaseClient-DZobvwSx.js";import{b as M,c as N,n as P,o as F,r as I,s as L,t as R}from"./index-DnK6BACV.js";import{o as ee,r as te}from"./githubSyncService-x0Mm_uEl.js";import{t as ne}from"./confetti.module-Uxh4CK4s.js";import re from"./OnboardingModal-DmgTXeeL.js";import"./MarkdownRenderer-BMZIn30p.js";import"./PrincessChamber-5t89aBn-.js";import{A as z,C as B,I as V,S as H,p as ie,t as ae,x as oe,y as se}from"./vendor-codemirror-By0wlJeM.js";var U=t(r(),1),W=d();function ce(e){if(!e)return{description:``,examples:[],constraints:[]};let t=e.description||``,n=[],r=[];if(Array.isArray(e.examples)&&e.examples.length>0&&(n=e.examples.map(e=>typeof e==`string`?{input:e,output:``}:{input:e?.input||``,output:e?.output||``,explanation:e?.explanation||``})),Array.isArray(e.constraints)&&e.constraints.length>0?r=e.constraints.map(e=>String(e).replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean):typeof e.constraints==`string`&&e.constraints.trim()&&(r=e.constraints.split(` -`).map(e=>e.replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean)),n.length===0||r.length===0){let e=t.search(/\bExample\s*\d*:/i),i=t.search(/\bConstraints\s*:/i),a=-1;if(e!==-1&&i!==-1?a=Math.min(e,i):e===-1?i!==-1&&(a=i):a=e,a!==-1){let e=t.substring(0,a).trim(),i=t.substring(a),o=i,s=``,c=i.search(/\bConstraints\s*:/i);if(c!==-1&&(o=i.substring(0,c).trim(),s=i.substring(c).replace(/\bConstraints\s*:/i,``).trim()),n.length===0&&o){let e=/\bExample\s*(\d*)\s*:/gi,t=[],r;for(;(r=e.exec(o))!==null;)t.push({index:r.index,text:r[0]});for(let e=0;ee.replace(/^[\u2022\-*]\s*/,``).trim()).filter(Boolean)),(n.length>0||r.length>0)&&(t=e)}}return{description:t,examples:n,constraints:r}}function le(e,t,n,r){let i=e=>!e||/^Method\s*\d*$/i.test(e.trim())||e.trim().toLowerCase()===`standard`,a=(e||t||`Algorithm Problem`).trim(),o=null;if(t&&a.toLowerCase().startsWith(t.toLowerCase())){let e=a.slice(t.length).trim();if(a=t,e){let t=e.match(/^[-\s]*Method\s*(\d+)\s*\((.+)\)$/i);if(t){let e=parseInt(t[1],10),n=t[2].trim();i(n)?e>1&&(o=`Method ${e}`):o=n}else{let t=e.match(/^[-\s]*Method\s*(\d+)/i);if(t){let e=parseInt(t[1],10);e>1&&(o=`Method ${e}`)}else{let t=e.match(/^[-\s]*\((.+)\)$/);if(t){let e=t[1].trim();i(e)||(o=e)}else{let t=e.match(/^[-\s]+([^-]+)$/);t&&!i(t[1])&&(o=t[1].trim())}}}}}else{let e=a.match(/^(.*?)\s*-\s*Method\s*(\d+)\s*\((.+)\)$/i);if(e){a=e[1].trim();let t=parseInt(e[2],10),n=e[3].trim();i(n)?t>1&&(o=`Method ${t}`):o=n}else{let e=a.match(/^(.*?)\s*-\s*Method\s*(\d+)$/i);if(e){a=e[1].trim();let t=parseInt(e[2],10);t>1&&(o=`Method ${t}`)}else{let e=a.match(/^(.*?)\s*\(\s*Method\s*(\d+)\s*\)$/i);if(e){a=e[1].trim();let t=parseInt(e[2],10);t>1&&(o=`Method ${t}`)}}}}let s=`General Algorithm`;return i(n)?i(r)?o&&!i(o)&&(s=o):s=r.trim():s=n.trim(),{cleanTitle:a,approachVariant:o,pattern:s}}function ue(e,t,n){if(!e)return[];if(Array.isArray(e.solutions)&&e.solutions.length>0)return e.solutions;let r=[],i=t||e.reference_code||``,a=e.pattern||`General Algorithm`,o=e.optimal_time||`O(N)`,s=e.optimal_space||`O(1)`;return(i||a)&&r.push({id:`sol-1`,name:e.approach_variant||`Optimal Solution`,pattern:a,time_complexity:o,space_complexity:s,code:i,explanation:e.how_to_solve||``,is_optimal:!0}),n&&n.trim()&&n.trim()!==i.trim()&&r.push({id:`sol-2`,name:`Personal Solution`,pattern:a,time_complexity:o,space_complexity:s,code:n,is_optimal:!1}),r}function de(e){if(e&&e!==`sandbox-user-id`)return e;try{let e=A();if(e?.user?.id&&e.user.id!==`sandbox-user-id`)return e.user.id}catch{}return`guest`}function fe({overrideProblemId:e,refreshTrigger:t,onClearOverride:n,onOpenOnboarding:r,setIsOnboardingOpen:i}){let[a,o]=(0,U.useState)([]),[s,c]=(0,U.useState)(!0),[l,u]=(0,U.useState)(null),[d,f]=(0,U.useState)(!1),[p,m]=(0,U.useState)(null),[h,g]=(0,U.useState)(null),[_,v]=(0,U.useState)(``),[y,b]=(0,U.useState)(null),[x,S]=(0,U.useState)(!1),[C,w]=(0,U.useState)(()=>{try{return A()?.user?.id}catch{return}}),T=(0,U.useRef)(!1),E=(0,U.useRef)(r),D=(0,U.useRef)(i),O=(0,U.useRef)(n),k=(0,U.useRef)(!1);(0,U.useEffect)(()=>{E.current=r,D.current=i,O.current=n});let P=(0,U.useCallback)(()=>{E.current?E.current():D.current&&D.current(!0)},[]),F=(0,U.useCallback)(async(t=!0)=>{t?(c(!0),g(null),u(null),v(``),T.current=!1):g(null);let n=de(C);try{if(typeof navigator<`u`&&!navigator.onLine)throw Error(`Network connection offline.`);let{data:{session:r}}=await j.auth.getSession(),i=r?r.access_token:`sandbox`;r?.user?.id&&(w(r.user.id),n=de(r.user.id));let a={Authorization:`Bearer ${i}`},s=new AbortController,c=setTimeout(()=>s.abort(),4e3),l;try{l=await fetch(`/api/reviews/due`,{headers:a,signal:s.signal})}finally{clearTimeout(c)}if(!l.ok)throw Error(`Failed to load review queue: HTTP ${l.status}`);let d=await l.json();if(Array.isArray(d)||(d=[]),e){let t=String(e).trim().toLowerCase(),n=d.findIndex(e=>{let n=e.problems;return!!(e.problem_id&&String(e.problem_id).trim().toLowerCase()===t||n?.id&&String(n.id).trim().toLowerCase()===t||n?.problem_number!==void 0&&n?.problem_number!==null&&String(n.problem_number)===t||n?.name&&n.name.trim().toLowerCase()===t)});if(n>0){let[e]=d.splice(n,1);d.unshift(e)}else if(n===-1){let t=null,n=await fetch(`/api/reviews/problems/id/${e}`,{headers:a});if(n.ok){let e=await n.json();Array.isArray(e)&&e.length>0&&(t=e[0])}if(!t){let n=/^\d+$/.test(e),r=I(n?parseInt(e,10):void 0,e);if(r)try{let e=await N(r);if(e?.problem_id){let n=await fetch(`/api/reviews/problems/id/${e.problem_id}`,{headers:a});if(n.ok){let e=await n.json();Array.isArray(e)&&e.length>0&&(t=e[0])}}}catch(e){console.error(`Failed to auto-activate problem for override review:`,e)}}t&&d.unshift(t)}}o(d),u(null);try{localStorage.setItem(`algospaced_review_queue_${n}`,JSON.stringify(d))}catch{}let f=r?.user?.id,p=f===`sandbox-user-id`||!f?`sandbox`:f;if(!localStorage.getItem(`algospaced_onboarding_done_${p}`)&&!e&&P(),d&&d.length>0){if(t){let e=d[0],t=e.problems,n=t?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),r=I(n,t?.id||e?.problem_id,t?.name)?.starter_code||t?.starter_code||``;v(r)}}else try{let e=await fetch(`/api/journey-progress`,{headers:a});if(e.ok){let t=await e.json();b(L(new Set(t))??null)}else b(L(new Set)??null)}catch{b(L(new Set)??null)}}catch(e){console.error(`Error fetching review queue:`,e);let r=e instanceof Error?e.message:`Network error loading review queue.`,i=!1;try{let e=localStorage.getItem(`algospaced_review_queue_${n}`);if(e){let n=JSON.parse(e);if(Array.isArray(n)&&n.length>0&&(o(n),i=!0,u(null),t)){let e=n[0],t=e.problems,r=t?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),i=I(r,t?.id||e?.problem_id,t?.name)?.starter_code||t?.starter_code||``;v(i)}}}catch(e){console.warn(`Failed to parse cached review items:`,e)}i||u(r)}finally{c(!1)}},[e,P,C]);(0,U.useEffect)(()=>{if(k.current){k.current=!1;return}let e=!1,t=setTimeout(()=>{e||F(!0)},0);return()=>{e=!0,clearTimeout(t)}},[F,t]),(0,U.useEffect)(()=>{if(!s&&!l&&a.length===0&&!e&&!T.current){T.current=!0;try{ne({particleCount:90,spread:70,origin:{y:.6}})}catch{}}},[s,l,a.length,e]);let R=(0,U.useCallback)(async t=>{if(a.length===0||d)return;let n=a[0];if(!n||!n.id)return;f(!0),m(t),g(null);let r=[...a];try{let{data:{session:i}}=await j.auth.getSession(),a=i?i.access_token:`sandbox`,s=await fetch(`/api/reviews/complete`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify({review_id:n.id,fsrs_state:n.fsrs_state??0,fsrs_stability:n.fsrs_stability??0,fsrs_difficulty:n.fsrs_difficulty??0,fsrs_elapsed_days:n.fsrs_elapsed_days??0,fsrs_scheduled_days:n.fsrs_scheduled_days??0,fsrs_reps:n.fsrs_reps??0,fsrs_lapses:n.fsrs_lapses??0,last_reviewed:n.last_reviewed,rating:t})});if(s.ok){let r=n?.problems?.name||``,i=n?.problems?.pattern||``,a=`Correct`;a=t===1?`Incorrect`:t===2?`Mixed`:`Correct`,M.addReviewEvent(a,r,i).catch(()=>{});let s=te(),c=_.trim()||n?.problems?.reference_code||``;s.token&&s.repoName&&s.autoCommit&&c&&ee({token:s.token,repo:s.repoName,branch:s.branch,problem_number:n?.problems?.problem_number,problem_name:r||`Algorithm Problem`,pattern:i||`Algorithms`,difficulty:n?.problems?.difficulty||`Medium`,optimal_time:n?.problems?.optimal_time||`O(N)`,optimal_space:n?.problems?.optimal_space||`O(1)`,description:n?.problems?.description||``,code:c}).catch(e=>{console.warn(`GitHub background auto-commit failed:`,e)}),e&&O.current&&(k.current=!0,O.current()),o(e=>{let t=e.slice(1);try{let e=de(C);localStorage.setItem(`algospaced_review_queue_${e}`,JSON.stringify(t))}catch{}if(t.length>0){let e=t[0],n=e.problems,r=n?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),i=I(r,n?.id||e?.problem_id,n?.name)?.starter_code||n?.starter_code||``;v(i)}else v(``);return t}),u(null),F(!1)}else{let e=await s.json().catch(()=>({}));g(e.detail||`Server returned error (${s.status}). Please try again.`),o(r)}}catch(e){console.error(`Error logging review completion:`,e);let t=e instanceof Error?e.message:`Network connection failed while logging review.`;g(t),o(r)}finally{f(!1),m(null)}},[a,d,e,F,_,C]),re=(0,U.useCallback)(async()=>{if(y&&!x){S(!0);try{await N(y),await F()}catch(e){console.error(`Failed to activate next milestone:`,e)}finally{S(!1)}}},[y,x,F]),z=(0,U.useCallback)(()=>{let e=a[0],t=e?.problems,n=t?.problem_number??(/^\d+$/.test(e?.problem_id||``)?parseInt(e.problem_id,10):void 0),r=I(n,t?.id||e?.problem_id,t?.name)?.starter_code||t?.starter_code||``;v(r)},[a]);return{reviews:a,setReviews:o,loading:s,queueError:l,submitting:d,submittingRating:p,gradeError:h,setGradeError:g,code:_,setCode:v,nextMilestone:y,activatingMilestone:x,currentUserId:C,fetchQueue:F,handleGrade:R,handleSelectCard:(0,U.useCallback)(t=>{if(t<=0||t>=a.length||d)return;e&&O.current&&(k.current=!0,O.current());let n=a[t];if(!n)return;let r=n.problems,i=r?.problem_number??(/^\d+$/.test(n?.problem_id||``)?parseInt(n.problem_id,10):void 0),s=I(i,r?.id||n?.problem_id,r?.name)?.starter_code||r?.starter_code||``;v(s),o(e=>{let t=e.findIndex(e=>e.id&&e.id===n.id||e===n);return t<=0?e:[e[t],...e.slice(0,t),...e.slice(t+1)]})},[a,d,e]),handleActivateNextMilestone:re,handleResetStarterCode:z}}function pe(){return{sandboxRunning:P(e=>e.sandboxRunning),sandboxResults:P(e=>e.sandboxResults),sandboxError:P(e=>e.sandboxError),savingReference:P(e=>e.savingReference),savedRefSuccess:P(e=>e.savedRefSuccess),saveRefError:P(e=>e.saveRefError),handleRunSandbox:P(e=>e.handleRunSandbox),handleSaveReference:P(e=>e.handleSaveReference),resetSandbox:P(e=>e.resetSandbox)}}function me(){return{aiLoading:P(e=>e.aiLoading),aiResult:P(e=>e.aiResult),aiError:P(e=>e.aiError),explainLoading:P(e=>e.explainLoading),explanationText:P(e=>e.explanationText),explainError:P(e=>e.explainError),aiSolutionLoading:P(e=>e.aiSolutionLoading),aiSolutionError:P(e=>e.aiSolutionError),handleAiEvaluation:P(e=>e.handleAiEvaluation),handleExplainCode:P(e=>e.handleExplainCode),handleFetchAiSolution:P(e=>e.handleFetchAiSolution),resetAiState:P(e=>e.resetAiState)}}var he=({problem:e,totalInQueue:t,reviews:n=[],onSelectCard:r,onOpenCreateProblem:i,onOpenEditProblem:a})=>{let[o,l]=(0,U.useState)(!1),u=(0,U.useRef)(null);(0,U.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&l(!1)},t=e=>{e.key===`Escape`&&l(!1)};return o&&(document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t)),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[o]);let d=e.problem_number?`https://leetcode.com/problemset/all/?search=${e.problem_number}`:`https://leetcode.com/problemset/all/?search=${encodeURIComponent(e.name||``)}`;return(0,W.jsxs)(`div`,{className:`shrink-0 bg-paper-white border-b-[3px] border-ink-black px-2.5 sm:px-4 py-2 flex flex-wrap items-center justify-between gap-2 shadow-[0_2px_0_0_rgba(30,41,59,0.05)] relative z-40`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 flex-wrap min-w-0`,children:[(0,W.jsxs)(`div`,{className:`relative shrink-0`,ref:u,children:[(0,W.jsxs)(`button`,{onClick:()=>l(e=>!e),className:`h-7 inline-flex items-center gap-1.5 px-2 sm:px-2.5 bg-amber-300 hover:bg-amber-200 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Click to view all cards due in today's queue`,children:[(0,W.jsx)(`span`,{className:`w-2 h-2 rounded-full bg-emerald-500 animate-ping shrink-0`}),(0,W.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] font-bold text-ink-black tracking-wide whitespace-nowrap`,children:`CARD 1 OF ${t}`}),t>1&&(0,W.jsx)(D,{className:`w-3 h-3 text-ink-black transition-transform shrink-0 ${o?`rotate-180`:``}`})]}),o&&n.length>0&&(0,W.jsxs)(`div`,{className:`absolute top-9 left-0 z-50 w-64 min-[400px]:w-72 sm:w-80 bg-paper-white border-[3px] border-ink-black gadget-shadow p-3 space-y-2 max-w-[calc(100vw-32px)]`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between border-b-2 border-ink-black pb-1.5 font-arcade text-[9px] font-bold text-ink-black`,children:[(0,W.jsx)(`span`,{children:`DAILY QUEUE (${n.length} CARDS)`}),(0,W.jsx)(`button`,{onClick:()=>l(!1),className:`px-1 hover:text-rose-600 font-bold cursor-pointer`,title:`Close`,children:`✕`})]}),(0,W.jsx)(`div`,{className:`text-[7.5px] font-arcade text-trash-gray uppercase -mt-0.5`,children:`Click any card to solve it now:`}),(0,W.jsx)(`div`,{className:`max-h-60 overflow-y-auto no-scrollbar space-y-1.5 pr-1`,children:n.map((e,t)=>{let n=e.problems,i=n?.problem_number,a=i==null?void 0:F(i),{cleanTitle:o,approachVariant:c}=le(n?.name||``,a?.name),u=c?`${o} (${c})`:o,d=t===0,f=n?.difficulty,p=f?f.toUpperCase():`EASY`,m=f===`Easy`?`bg-emerald-600 text-white`:f===`Medium`?`bg-amber-400 text-ink-black`:`bg-rose-600 text-white`;return(0,W.jsxs)(`button`,{type:`button`,onClick:()=>{d||r?.(t),l(!1)},className:`group w-full text-left p-2 border-2 border-ink-black text-xs flex items-center justify-between gap-2 cursor-pointer transition-all duration-150 select-none ${d?`bg-amber-100 font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`:`bg-white hover:bg-amber-50 hover:translate-x-0.5 active:translate-y-0.5 active:shadow-none shadow-[2px_2px_0px_0px_rgba(30,41,59,0.25)]`}`,title:d?`Currently active card`:`Jump to #${t+1}: ${u}`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 truncate min-w-0`,children:[(0,W.jsxs)(`span`,{className:`font-arcade text-[9px] text-trash-gray shrink-0`,children:[`#`,t+1]}),i!=null&&(0,W.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold px-1 py-0.2 bg-amber-300 border border-ink-black shrink-0`,children:[`LC #`,i]}),(0,W.jsx)(`span`,{className:`truncate`,children:u})]}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[d?(0,W.jsx)(`span`,{className:`text-[7.5px] font-arcade font-extrabold px-1 py-0.5 bg-amber-300 text-ink-black border border-ink-black shrink-0`,children:`NOW`}):(0,W.jsx)(s,{className:`w-2.5 h-2.5 fill-ink-black text-ink-black opacity-0 group-hover:opacity-100 transition-opacity shrink-0`}),(0,W.jsx)(`span`,{className:`text-[8px] font-arcade font-bold px-1.5 py-0.5 border border-ink-black shrink-0 ${m}`,children:p})]})]},e.id||t)})})]})]}),e.problem_number!==void 0&&e.problem_number!==null&&(0,W.jsx)(`span`,{className:`h-7 inline-flex items-center px-2 font-arcade text-[8px] sm:text-[9px] font-bold bg-amber-200 border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-ink-black shrink-0 select-none whitespace-nowrap`,children:e.problem_number>0?`LC #${e.problem_number}`:`CUSTOM`}),(0,W.jsx)(`span`,{className:`h-7 inline-flex items-center px-2 font-arcade text-[8px] sm:text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] shrink-0 select-none whitespace-nowrap ${e.difficulty===`Easy`?`bg-emerald-600 text-white`:e.difficulty===`Medium`?`bg-amber-400 text-ink-black`:`bg-rose-600 text-white`}`,children:e.difficulty?e.difficulty.toUpperCase():`EASY`})]}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 shrink-0 flex-wrap justify-end`,children:[(0,W.jsxs)(`button`,{onClick:i,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-purple-50 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Create or Import Problem`,children:[(0,W.jsx)(g,{className:`w-3 h-3 text-purple-600 shrink-0`}),(0,W.jsx)(`span`,{className:`hidden min-[480px]:inline`,children:`ADD`})]}),a&&(0,W.jsxs)(`button`,{onClick:a,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-emerald-50 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Edit Problem Specification`,children:[(0,W.jsx)(c,{className:`w-3 h-3 text-emerald-600 shrink-0`}),(0,W.jsx)(`span`,{className:`hidden min-[480px]:inline`,children:`EDIT`})]}),e.google_doc_url&&(0,W.jsxs)(`a`,{href:e.google_doc_url,target:`_blank`,rel:`noreferrer`,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-slate-100 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Open Google Doc Notes`,children:[(0,W.jsx)(`span`,{children:`DOC`}),(0,W.jsx)(w,{className:`w-2.5 h-2.5 text-primary shrink-0`})]}),(0,W.jsxs)(`a`,{href:d,target:`_blank`,rel:`noreferrer`,className:`h-7 inline-flex items-center gap-1 px-2 sm:px-2.5 bg-white hover:bg-slate-100 border-2 border-ink-black text-ink-black text-[8px] sm:text-[9px] font-arcade font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0`,title:`Search LeetCode`,children:[(0,W.jsx)(`span`,{children:`LC`}),(0,W.jsx)(w,{className:`w-2.5 h-2.5 text-amber-600 shrink-0`})]})]})]})},ge=oe.mark({class:`cm-indent-dot cm-indent-dot-primary`}),_e=oe.mark({class:`cm-indent-dot cm-indent-dot-secondary`});function ve(e){let t=new V;for(let{from:n,to:r}of e.visibleRanges){let i=n;for(;ie.decorations}),be=H.theme({"&":{backgroundColor:`#0c111d`,color:`#f1f5f9`,height:`100%`,fontSize:`13px`,fontFamily:`var(--font-code, "JetBrains Mono", "Fira Code", monospace)`},".cm-scroller":{overflow:`auto`,fontFamily:`inherit`,lineHeight:`1.65`},".cm-content":{caretColor:`#4ade80`,padding:`12px 0`},"&.cm-focused .cm-cursor":{borderLeftColor:`#4ade80`,borderLeftWidth:`2px`,filter:`drop-shadow(0 0 5px rgba(74, 222, 128, 0.8))`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:`rgba(56, 189, 248, 0.25) !important`},".cm-gutters":{backgroundColor:`#070a12`,color:`#475569`,borderRight:`2px solid #1e293b`,paddingRight:`6px`,userSelect:`none`},".cm-activeLineGutter":{backgroundColor:`#131b2e`,color:`#38bdf8`,fontWeight:`700`},".cm-activeLine, &.cm-focused .cm-activeLine":{backgroundColor:`#0f172a !important`},".cm-line":{padding:`0 10px`},".cm-indent-dot":{position:`relative`,display:`inline-block`},".cm-indent-dot::before":{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,pointerEvents:`none`,userSelect:`none`,lineHeight:`0`,fontFamily:`monospace`},".cm-indent-dot-primary::before":{content:`"•"`,color:`#38bdf8`,fontSize:`9px`,opacity:`0.85`},".cm-indent-dot-secondary::before":{content:`"·"`,color:`#64748b`,fontSize:`11px`,opacity:`0.5`},"&.cm-focused .cm-matchingBracket, .cm-matchingBracket":{backgroundColor:`rgba(74, 222, 128, 0.2)`,outline:`1px solid #4ade80`,borderRadius:`2px`,color:`#86efac !important`},".cm-placeholder":{color:`#64748b`,fontStyle:`italic`},".cm-scroller::-webkit-scrollbar":{width:`6px`,height:`6px`},".cm-scroller::-webkit-scrollbar-track":{backgroundColor:`#070a12`},".cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#1e293b`,borderRadius:`3px`,border:`1px solid #334155`},".cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#38bdf8`}}),xe=[ae(),se.of(` `),z.of([ie]),ye,be,H.contentAttributes.of({"aria-label":`Python Code Editor`})],G=[{id:`python`,name:`Python`,version:`3.14`}],Se=({className:e=`w-3.5 h-3.5`})=>(0,W.jsxs)(`svg`,{viewBox:`0 0 128 128`,className:e,xmlns:`http://www.w3.org/2000/svg`,children:[(0,W.jsx)(`path`,{d:`M63.454 4.018c-14.775 0-23.774 6.425-23.774 18.775v13.626h24.168v3.424H30.082C17.518 39.843 8 47.962 8 63.673c0 15.65 8.358 23.486 21.056 23.486h11.905v-16.89c0-13.064 11.233-24.113 24.331-24.113h23.773V32.793c0-11.83-9.988-19.775-23.773-19.775H63.454v-9zm-9.845 7.426a3.84 3.84 0 0 1 3.86 3.84 3.84 3.84 0 0 1-3.86 3.841 3.84 3.84 0 0 1-3.86-3.84 3.84 3.84 0 0 1 3.86-3.841z`,fill:`#387eb8`}),(0,W.jsx)(`path`,{d:`M64.546 123.982c14.775 0 23.774-6.425 23.774-18.775V91.581H64.152v-3.424h33.766c12.564 0 22.082-8.119 22.082-23.83 0-15.65-8.358-23.486-21.056-23.486H87.04v16.89c0 13.064-11.234 24.113-24.332 24.113H38.934v13.363c0 11.83 9.989 19.775 23.774 19.775h1.838v9zm9.845-7.426a3.84 3.84 0 0 1-3.86-3.84 3.84 3.84 0 0 1 3.86-3.841 3.84 3.84 0 0 1 3.86 3.84 3.84 3.84 0 0 1-3.86 3.841z`,fill:`#ffe052`})]}),Ce=({mobileView:e,isNarrow:t=!1,isAutocompleteEnabled:r,onToggleAutocomplete:c,onResetStarterCode:u,code:d,onChangeCode:f,sandboxRunning:m,sandboxError:g,sandboxResults:v,onRunSandbox:y,savingReference:b,savedRefSuccess:S,saveRefError:T,onSaveReference:A,aiLoading:j,aiError:M,aiResult:N,onAiEvaluation:P,optimalTime:F,optimalSpace:I,onPushToGitHub:L,pushingToGitHub:R,githubPushedUrl:ee,githubPushError:te})=>{let[ne,re]=(0,U.useState)(`python`),[z,B]=(0,U.useState)(!1),V=(0,U.useRef)(null);(0,U.useEffect)(()=>{let e=e=>{V.current&&!V.current.contains(e.target)&&B(!1)},t=e=>{e.key===`Escape`&&B(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[]);let H=G.find(e=>e.id===ne)??G[0];return(0,W.jsxs)(`div`,{className:`w-full ${t?`flex flex-1`:`lg:w-[51%] flex`} flex-col bg-[#fffdfa] overflow-y-auto no-scrollbar ${t&&e!==`code`?`hidden`:`flex`}`,children:[(0,W.jsxs)(`div`,{className:`shrink-0 bg-[#f7f5ed] border-b-2 border-ink-black p-2 sm:px-3 flex flex-wrap items-center justify-between gap-1.5 sm:gap-2`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2 flex-wrap`,children:[(0,W.jsxs)(`div`,{className:`relative`,ref:V,children:[(0,W.jsxs)(`button`,{type:`button`,onClick:()=>B(e=>!e),className:`h-7 px-2.5 bg-white hover:bg-slate-100 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none flex items-center gap-1.5 font-arcade text-[9px] font-bold text-ink-black cursor-pointer transition-all select-none`,title:`Select programming language`,"aria-expanded":z,"aria-haspopup":`listbox`,children:[(0,W.jsx)(Se,{className:`w-3.5 h-3.5 shrink-0`}),(0,W.jsx)(`span`,{children:H.name}),(0,W.jsx)(D,{className:`w-3 h-3 text-ink-black transition-transform duration-150 ${z?`rotate-180`:``}`})]}),z&&(0,W.jsxs)(`div`,{className:`absolute top-full mt-1.5 left-0 z-50 w-52 bg-paper-white border-[3px] border-ink-black gadget-shadow p-1.5 space-y-1`,role:`listbox`,children:[(0,W.jsx)(`div`,{className:`px-2 py-1 text-[8px] font-arcade font-bold text-trash-gray uppercase border-b border-slate-200`,children:`SELECT LANGUAGE`}),G.map(e=>{let t=ne===e.id;return(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>{re(e.id),B(!1)},className:`w-full flex items-center justify-between px-2.5 py-1.5 border-2 border-ink-black text-left transition-all cursor-pointer ${t?`bg-amber-200 shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] font-bold text-ink-black`:`bg-white hover:bg-slate-100 text-slate-800`}`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[9px]`,children:[(0,W.jsx)(Se,{className:`w-3.5 h-3.5 shrink-0`}),(0,W.jsx)(`span`,{children:e.name})]}),(0,W.jsxs)(`span`,{className:`font-mono text-[8px] font-bold px-1.5 py-0.5 bg-white border border-ink-black text-slate-700 shadow-[1px_1px_0px_0px_rgba(30,41,59,0.3)]`,children:[`v`,e.version]})]},e.id)})]})]}),(0,W.jsx)(`div`,{className:`h-4 w-[2px] bg-slate-300 mx-0.5 hidden sm:block`}),(0,W.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 cursor-pointer select-none`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:r,onChange:e=>c(e.target.checked),className:`sr-only peer`,"aria-label":`Toggle code editor autocompletion`}),(0,W.jsx)(`div`,{className:`relative w-7 h-3.5 bg-slate-300 border border-ink-black rounded-full peer peer-checked:bg-grass-green transition-all after:content-[''] after:absolute after:top-[1px] after:left-[2px] after:bg-white after:border after:border-ink-black after:rounded-full after:h-2 after:w-2 after:transition-all peer-checked:after:translate-x-3`}),(0,W.jsx)(`span`,{className:`text-[7.5px] min-[400px]:text-[8px] font-arcade font-bold text-trash-gray peer-checked:text-ink-black whitespace-nowrap`,children:`AUTOCOMPLETE`})]})]}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2`,children:[(0,W.jsx)(`button`,{onClick:u,className:`w-7 h-7 bg-white hover:bg-slate-100 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-ink-black flex items-center justify-center cursor-pointer transition-all`,title:`Reset to starter code`,"aria-label":`Reset to starter code`,children:(0,W.jsx)(l,{className:`w-3.5 h-3.5`})}),(0,W.jsx)(`button`,{onClick:()=>f(``),className:`w-7 h-7 bg-white hover:bg-rose-50 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-rose-700 flex items-center justify-center cursor-pointer transition-all`,title:`Clear editor`,"aria-label":`Clear editor`,children:(0,W.jsx)(x,{className:`w-3.5 h-3.5 text-rose-600`})}),A&&(0,W.jsx)(`button`,{onClick:A,disabled:b||!d.trim(),className:`w-7 h-7 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all ${S?`bg-emerald-600 hover:bg-emerald-500 text-white`:`bg-amber-400 hover:bg-amber-300 text-ink-black`}`,title:b?`Saving solution to personal database...`:S?`Saved to personal database!`:`Overwrite saved solution with studio code`,"aria-label":`Overwrite saved solution with studio code`,children:b?(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin text-ink-black`}):S?(0,W.jsx)(_,{className:`w-3.5 h-3.5 text-white`}):(0,W.jsx)(a,{className:`w-3.5 h-3.5 text-ink-black`})}),L&&(0,W.jsx)(`button`,{onClick:L,disabled:R||!d.trim(),className:`w-7 h-7 bg-[#24292e] hover:bg-black border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-white flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all`,title:R?`Pushing to GitHub...`:`Push solution to GitHub repository`,"aria-label":`Push to GitHub`,children:R?(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin text-yellow-300`}):(0,W.jsx)(p,{className:`w-3.5 h-3.5 text-yellow-300`})})]}),(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2`,children:[(0,W.jsx)(`button`,{onClick:y,disabled:m||!d.trim(),className:`w-7 h-7 bg-emerald-600 hover:bg-emerald-500 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-white flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all`,title:m?`Running sandbox tests...`:`Run tests in local sandbox`,"aria-label":`Run tests`,children:m?(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin`}):(0,W.jsx)(s,{className:`w-3.5 h-3.5 fill-white text-white ml-0.5`})}),(0,W.jsx)(`button`,{onClick:P,disabled:j||!d.trim(),className:`w-7 h-7 bg-purple-600 hover:bg-purple-500 border-2 border-ink-black shadow-[1px_1px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none text-white flex items-center justify-center cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed transition-all`,title:j?`Evaluating code with Gemini...`:`Gemini Eval (AI code review & complexity)`,"aria-label":`Gemini Eval`,children:j?(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin`}):(0,W.jsx)(O,{className:`w-3.5 h-3.5 text-amber-300`})})]})]}),(0,W.jsxs)(`div`,{className:`p-4 sm:p-5 flex-1 flex flex-col space-y-4`,children:[(0,W.jsx)(`div`,{className:`flex-1 flex flex-col min-h-[300px] sm:min-h-[360px] border-[3px] border-ink-black shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] bg-[#0c111d] overflow-hidden`,children:(0,W.jsx)(`div`,{className:`flex-1 overflow-hidden relative`,children:(0,W.jsx)(C,{value:d,onChange:f,placeholder:`def solve(nums): - # Write your solution from memory here...`,height:`100%`,theme:`dark`,extensions:xe,basicSetup:{autocompletion:r,lineNumbers:!0,foldGutter:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,defaultKeymap:!0,searchKeymap:!0,historyKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0},className:`w-full h-full text-xs font-code-mono`})})}),S&&(0,W.jsxs)(`div`,{className:`p-3 bg-[#f0fdf4] border-2 border-emerald-600 text-emerald-950 text-xs font-semibold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsx)(_,{className:`w-4 h-4 text-emerald-600 shrink-0`}),(0,W.jsx)(`span`,{children:`Successfully saved studio code as your personal reference solution!`})]}),T&&(0,W.jsxs)(`div`,{className:`p-3 bg-rose-50 border-2 border-rose-500 text-rose-800 text-xs font-semibold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsx)(h,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,W.jsx)(`span`,{children:T})]}),ee&&(0,W.jsxs)(`div`,{className:`p-3 bg-[#f0fdf4] border-2 border-emerald-600 text-emerald-950 text-xs font-semibold flex items-center justify-between shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(_,{className:`w-4 h-4 text-emerald-600 shrink-0`}),(0,W.jsx)(`span`,{children:`Successfully pushed solution to your GitHub repository!`})]}),(0,W.jsxs)(`a`,{href:ee,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] font-bold text-blue-700 hover:text-blue-900 underline flex items-center gap-1`,children:[(0,W.jsx)(`span`,{children:`View on GitHub`}),(0,W.jsx)(w,{className:`w-3 h-3`})]})]}),te&&(0,W.jsxs)(`div`,{className:`p-3 bg-rose-50 border-2 border-rose-500 text-rose-800 text-xs font-semibold flex items-center gap-2 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsx)(h,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,W.jsx)(`span`,{children:te})]}),m&&(0,W.jsxs)(`div`,{className:`p-3 border-2 border-ink-black bg-emerald-50 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] flex items-center gap-3 animate-pulse`,children:[(0,W.jsx)(n,{className:`w-5 h-5 text-emerald-600 animate-spin shrink-0`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h4`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:`Running...`}),(0,W.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray font-semibold mt-0.5`,children:`Executing against test cases...`})]})]}),g&&(0,W.jsxs)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] flex items-center gap-2`,children:[(0,W.jsx)(h,{className:`w-4 h-4 text-rose-600 shrink-0`}),(0,W.jsx)(`span`,{children:g})]}),v&&(0,W.jsxs)(`div`,{className:`border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-3.5 ${v.status===`passed`?`bg-[#f0fdf4]`:`bg-[#fff1f2]`}`,children:[(0,W.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-2 pb-2.5 border-b-2 border-dashed border-ink-black`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,W.jsx)(`div`,{className:`w-8 h-8 border-2 border-ink-black flex items-center justify-center font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${v.status===`passed`?`bg-grass-green text-ink-black`:`bg-rose-500 text-white`}`,children:v.status===`passed`?(0,W.jsx)(k,{className:`w-5 h-5 stroke-[3]`}):(0,W.jsx)(h,{className:`w-4 h-4`})}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`font-arcade text-[10px] font-bold text-ink-black flex items-center gap-1.5 uppercase`,children:v.status===`passed`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{children:`ALL TESTS PASSED`}),(0,W.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600 inline`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{children:v.status===`error`?`EXECUTION ERROR`:`TESTS FAILED`}),(0,W.jsx)(E,{className:`w-3.5 h-3.5 text-rose-600 inline`})]})}),(0,W.jsxs)(`div`,{className:`font-sans text-[11px] text-slate-600 font-semibold`,children:[v.passed_count??0,` of `,v.total_tests??0,` test cases passed (`,(v.duration_ms??0).toFixed(1),`ms)`]})]})]}),v.status===`passed`&&(0,W.jsxs)(`button`,{onClick:A,disabled:b,className:`px-3 py-1.5 bg-white hover:bg-emerald-100 border-2 border-ink-black text-ink-black font-arcade text-[8px] font-bold flex items-center gap-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 disabled:opacity-50`,children:[b?(0,W.jsx)(n,{className:`w-3 h-3 animate-spin`}):S?(0,W.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600`}):(0,W.jsx)(a,{className:`w-3.5 h-3.5 text-blue-600`}),(0,W.jsx)(`span`,{children:S?`SAVED TO DB!`:`SAVE AS OFFICIAL SOLUTION`})]})]}),T&&(0,W.jsx)(`div`,{className:`p-2 border border-rose-500 bg-rose-100 text-rose-800 text-[11px] font-semibold`,children:T}),v.results&&v.results.length>0&&(0,W.jsxs)(`div`,{className:`space-y-2`,children:[(0,W.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray uppercase font-bold block`,children:`TEST CASE BREAKDOWN:`}),(0,W.jsx)(`div`,{className:`space-y-1.5 max-h-56 overflow-y-auto custom-scrollbar`,children:v.results.map((e,t)=>(0,W.jsxs)(`div`,{className:`p-2.5 border-2 border-ink-black text-xs font-mono shadow-[2px_2px_0px_0px_rgba(30,41,59,0.3)] ${e.passed?`bg-white`:`bg-rose-50`}`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between font-arcade text-[8px] mb-1`,children:[(0,W.jsxs)(`span`,{className:`font-bold text-ink-black`,children:[`CASE #`,t+1]}),(0,W.jsx)(`span`,{className:e.passed?`text-emerald-700 font-bold`:`text-rose-700 font-bold`,children:e.passed?`✓ PASSED`:`✗ FAILED`})]}),(0,W.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-1.5 text-[10px]`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`text-slate-500 block`,children:`Input:`}),(0,W.jsx)(`span`,{className:`font-code-mono text-ink-black font-semibold break-all`,children:JSON.stringify(e.input)})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`text-slate-500 block`,children:`Expected:`}),(0,W.jsx)(`span`,{className:`font-code-mono text-emerald-700 font-semibold break-all`,children:JSON.stringify(e.expected)})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`text-slate-500 block`,children:`Output:`}),(0,W.jsx)(`span`,{className:`font-code-mono font-semibold break-all ${e.passed?`text-emerald-700`:`text-rose-700`}`,children:e.output===void 0?`None`:JSON.stringify(e.output)})]})]}),e.error&&(0,W.jsx)(`div`,{className:`mt-1.5 p-1.5 bg-rose-100 text-rose-900 text-[10px] font-mono border border-rose-300 break-all`,children:e.error})]},t))})]}),v.error&&(0,W.jsx)(`div`,{className:`p-3 bg-[#1E293B] text-rose-400 font-code-mono text-[11px] border-2 border-ink-black overflow-x-auto whitespace-pre-wrap select-text`,children:v.error}),v.status===`passed`&&(0,W.jsx)(`div`,{className:`p-2 bg-emerald-100/70 border border-emerald-300 text-emerald-900 text-xs flex items-center justify-between`,children:(0,W.jsx)(`span`,{className:`font-sans font-medium`,children:`✨ All unit tests passed. Rate your recall below.`})})]}),j&&(0,W.jsxs)(`div`,{className:`p-4 border-2 border-ink-black bg-amber-50 shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] flex items-center gap-3 animate-pulse`,children:[(0,W.jsx)(n,{className:`w-6 h-6 text-purple-600 animate-spin shrink-0`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h4`,{className:`font-arcade text-[9px] font-bold text-ink-black uppercase`,children:`ANALYZING...`}),(0,W.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray font-semibold mt-0.5`,children:`Checking edge cases, bounds, and Big-O efficiency against optimal constraints...`})]})]}),M&&(0,W.jsx)(`div`,{className:`p-3 border-2 border-rose-500 bg-rose-50 text-rose-800 text-xs font-semibold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:M}),N&&(0,W.jsxs)(`div`,{className:`border-[3px] border-ink-black bg-[#fefce8] p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] space-y-4`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between pb-3 border-b-2 border-dashed border-ink-black`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,W.jsx)(`div`,{className:`w-9 h-9 border-2 border-ink-black flex items-center justify-center font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${N.is_correct?`bg-grass-green text-ink-black`:`bg-rose-500 text-white`}`,children:N.is_correct?(0,W.jsx)(k,{className:`w-5 h-5 stroke-[3]`}):(0,W.jsx)(i,{className:`w-5 h-5`})}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`font-arcade text-[10px] font-bold text-ink-black flex items-center gap-1.5`,children:N.is_correct?(0,W.jsxs)(W.Fragment,{children:[`STATUS: PASSED`,(0,W.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600 inline`})]}):(0,W.jsxs)(W.Fragment,{children:[`STATUS: FAILED`,(0,W.jsx)(E,{className:`w-3.5 h-3.5 text-rose-600 inline`})]})}),(0,W.jsx)(`span`,{className:`font-sans text-[11px] text-slate-600 font-semibold`,children:N.is_correct?`Algorithm matches expected logic and patterns.`:`Bugs or edge-case failures detected.`})]})]}),(0,W.jsx)(`span`,{className:`font-arcade text-[9px] px-2 py-1 border-2 border-ink-black uppercase font-bold shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] ${N.is_correct?`bg-emerald-100 text-emerald-800`:`bg-rose-100 text-rose-800`}`,children:N.is_correct?`CORRECT`:`INCORRECT`})]}),(0,W.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,W.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase font-bold`,children:`Time Complexity`}),(0,W.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,W.jsx)(`span`,{className:`font-code-mono text-xs font-bold text-ink-black`,children:N.detected_complexity?.time||`N/A`}),(0,W.jsxs)(`span`,{className:`text-[10px] font-sans text-slate-500 font-semibold`,children:[`(Target: `,F||`O(N)`,`)`]})]})]}),(0,W.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsx)(`span`,{className:`font-arcade text-[8px] text-trash-gray block uppercase font-bold`,children:`Space Complexity`}),(0,W.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,W.jsx)(`span`,{className:`font-code-mono text-xs font-bold text-ink-black`,children:N.detected_complexity?.space||`N/A`}),(0,W.jsxs)(`span`,{className:`text-[10px] font-sans text-slate-500 font-semibold`,children:[`(Target: `,I||`O(1)`,`)`]})]})]})]}),N.bugs&&N.bugs.length>0&&(0,W.jsxs)(`div`,{className:`p-3 bg-white border-2 border-ink-black space-y-1.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsxs)(`span`,{className:`font-arcade text-[8px] text-rose-600 uppercase font-bold block flex items-center gap-1`,children:[(0,W.jsx)(h,{className:`w-3 h-3 text-rose-500`}),`TRACES & EDGE CASE ISSUES:`]}),(0,W.jsx)(`ul`,{className:`list-disc list-inside text-xs text-slate-800 space-y-1 font-semibold pl-1`,children:N.bugs.map((e,t)=>(0,W.jsx)(`li`,{className:`leading-relaxed select-text`,children:e},t))})]}),N.key_suggestion&&(0,W.jsxs)(`div`,{className:`p-3 bg-amber-50 border-2 border-ink-black space-y-1 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:[(0,W.jsxs)(`span`,{className:`font-arcade text-[8px] text-amber-700 uppercase font-bold block flex items-center gap-1`,children:[(0,W.jsx)(O,{className:`w-3 h-3 text-amber-500`}),`TIP:`]}),(0,W.jsx)(`p`,{className:`text-xs text-slate-800 font-medium leading-relaxed m-0 select-text`,children:N.key_suggestion})]}),(0,W.jsxs)(`div`,{className:`p-2.5 bg-white border-2 border-dashed border-ink-black flex items-center justify-between`,children:[(0,W.jsxs)(`span`,{className:`text-xs font-bold text-ink-black flex items-center gap-1.5`,children:[(0,W.jsx)(o,{className:`w-4 h-4 text-primary`}),`Recommendation:`]}),(0,W.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-purple-700`,children:N.is_correct?`Rate your recall below.`:`Review issues and rate recall below.`})]})]})]})]})},we=({gradeError:e,onDismissGradeError:t,submitting:r,submittingRating:i,onGrade:a})=>(0,W.jsx)(`div`,{className:`shrink-0 bg-[#f8f5eb] border-t-[3px] border-ink-black p-2 sm:p-3 flex flex-col items-stretch gap-1.5 sm:gap-2 shadow-[0_-3px_0_0_rgba(30,41,59,0.08)]`,children:(0,W.jsxs)(`div`,{className:`w-full flex flex-col`,children:[e&&(0,W.jsxs)(`div`,{className:`p-2.5 mb-2 bg-red-100 border-2 border-red-500 text-red-800 text-xs font-semibold shadow-[2px_2px_0px_0px_#1E293B] flex items-center justify-between`,children:[(0,W.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,W.jsx)(h,{className:`w-4 h-4 text-red-600 shrink-0`}),e]}),(0,W.jsx)(`button`,{onClick:t,className:`text-red-900 font-bold hover:underline cursor-pointer ml-2 text-xs`,children:`Dismiss`})]}),(0,W.jsxs)(`div`,{className:`flex gap-1.5 sm:gap-2.5 w-full`,children:[(0,W.jsx)(`button`,{onClick:()=>a(1),disabled:r,className:`flex-1 min-w-0 bg-[#dc2626] hover:bg-[#b91c1c] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-white flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 1 on keyboard`,children:i===1?(0,W.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin`})}):(0,W.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,W.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/20 rounded shrink-0`,children:`1`}),(0,W.jsx)(`span`,{className:`truncate`,children:`Again`})]})}),(0,W.jsx)(`button`,{onClick:()=>a(2),disabled:r,className:`flex-1 min-w-0 bg-[#ff9933] hover:bg-[#ff8000] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 2 on keyboard`,children:i===2?(0,W.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,W.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,W.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/10 rounded shrink-0`,children:`2`}),(0,W.jsx)(`span`,{className:`truncate`,children:`Hard`})]})}),(0,W.jsx)(`button`,{onClick:()=>a(3),disabled:r,className:`flex-1 min-w-0 bg-[#4ade80] hover:bg-[#22c55e] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 3 on keyboard`,children:i===3?(0,W.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,W.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,W.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/10 rounded shrink-0`,children:`3`}),(0,W.jsx)(`span`,{className:`truncate`,children:`Good`})]})}),(0,W.jsx)(`button`,{onClick:()=>a(4),disabled:r,className:`flex-1 min-w-0 bg-[#60a5fa] hover:bg-[#3b82f6] border-2 sm:border-[3px] border-ink-black py-2 sm:py-2.5 px-1 sm:px-2 arcade-btn cursor-pointer disabled:opacity-60 text-ink-black flex flex-col items-center justify-center font-bold transition-all select-none`,title:`Press 4 on keyboard`,children:i===4?(0,W.jsx)(`div`,{className:`flex items-center gap-1.5 font-arcade text-[10px]`,children:(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin text-ink-black`})}):(0,W.jsxs)(`div`,{className:`flex items-center gap-1 font-headline-md text-[10px] min-[400px]:text-xs sm:text-sm font-extrabold tracking-wide uppercase truncate`,children:[(0,W.jsx)(`span`,{className:`font-arcade text-[8px] sm:text-[9px] px-1 py-0.5 bg-black/10 rounded shrink-0`,children:`4`}),(0,W.jsx)(`span`,{className:`truncate`,children:`Easy`})]})})]})]})}),Te=({nextMilestone:e,activatingMilestone:t,onActivateNextMilestone:r,onOpenOnboarding:i,onOpenJourney:a,onOpenCreateProblem:o,onOpenWindow:s,overrideProblemId:c,onClearOverride:u,hasCustomOnboardingModal:d,isOnboardingOpen:p,onCloseOnboarding:h,onCompletedOnboarding:_,currentUserId:b})=>(0,W.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] p-6 overflow-y-auto custom-scrollbar`,children:(0,W.jsxs)(`div`,{className:`w-full max-w-lg bg-paper-white border-[4px] border-ink-black gadget-shadow p-6 sm:p-8 relative overflow-hidden text-center space-y-6`,children:[(0,W.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-3 bg-gradient-to-r from-grass-green via-amber-300 to-highlight-pink`}),(0,W.jsxs)(`div`,{className:`relative inline-block mt-2`,children:[(0,W.jsx)(`div`,{className:`w-20 h-20 bg-amber-300 border-[3px] border-ink-black rounded-2xl flex items-center justify-center mx-auto gadget-shadow rotate-[-3deg] hover:rotate-0 transition-transform`,children:(0,W.jsx)(T,{className:`w-10 h-10 text-ink-black stroke-[2.5]`})}),(0,W.jsx)(`div`,{className:`absolute -bottom-2 -right-2 bg-grass-green border-2 border-ink-black px-2 py-0.5 font-arcade text-[8px] text-ink-black font-bold uppercase shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:`100% DONE`})]}),(0,W.jsxs)(`div`,{className:`space-y-2`,children:[(0,W.jsxs)(`span`,{className:`inline-flex items-center gap-1 px-2.5 py-1 bg-emerald-100 border-2 border-ink-black text-emerald-800 font-arcade text-[9px] font-bold`,children:[(0,W.jsx)(k,{className:`w-3 h-3 stroke-[3]`}),` ALL CARDS COMPLETED FOR TODAY`]}),(0,W.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold text-ink-black font-headline-md tracking-tight`,children:`You're all caught up for today. Keep it up.`}),(0,W.jsx)(`p`,{className:`text-xs sm:text-sm font-sans text-trash-gray max-w-md mx-auto leading-relaxed font-semibold`,children:`All reviews for today are finished. Next reviews are scheduled for tomorrow.`})]}),e&&(0,W.jsxs)(`div`,{className:`p-4 sm:p-5 bg-gradient-to-br from-amber-50 to-orange-50 border-[3px] border-ink-black gadget-shadow text-left space-y-3`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-amber-800 uppercase tracking-wider flex items-center gap-1.5`,children:[(0,W.jsx)(y,{className:`w-3.5 h-3.5 text-amber-600`}),`NEXT UNEXPLORED MILESTONE`]}),(0,W.jsxs)(`span`,{className:`font-mono text-[10px] font-bold px-2 py-0.5 rounded bg-amber-900/10 text-amber-900 border border-amber-900/20`,children:[`LC #`,e.problem_number]})]}),(0,W.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,W.jsxs)(`div`,{className:`min-w-0`,children:[(0,W.jsx)(`h3`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black truncate`,children:e.name}),(0,W.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 flex-wrap`,children:[(0,W.jsx)(`span`,{className:`px-2 py-0.5 rounded font-arcade text-[8px] font-bold uppercase text-white ${e.difficulty===`Easy`?`bg-emerald-600`:e.difficulty===`Medium`?`bg-amber-600`:`bg-rose-600`}`,children:e.difficulty}),(0,W.jsx)(`span`,{className:`px-2 py-0.5 rounded font-arcade text-[8px] bg-purple-100 text-purple-800 border border-purple-300 font-bold`,children:e.pattern}),(0,W.jsxs)(`span`,{className:`text-[11px] font-code-mono text-slate-600`,children:[`T: `,e.time_complexity,` | S: `,e.space_complexity]})]})]}),(0,W.jsx)(`button`,{onClick:r,disabled:t,className:`px-4 py-2.5 bg-grass-green hover:bg-emerald-400 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 flex items-center justify-center gap-1.5 disabled:opacity-50`,children:t?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(n,{className:`w-3.5 h-3.5 animate-spin`}),(0,W.jsx)(`span`,{children:`ACTIVATING...`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(O,{className:`w-3.5 h-3.5 text-amber-700`}),(0,W.jsx)(`span`,{children:`ACTIVATE & REVIEW NOW`})]})})]})]}),(0,W.jsxs)(`div`,{className:`p-4 sm:p-5 bg-gradient-to-r from-amber-100 via-amber-200 to-yellow-100 border-[3px] border-ink-black gadget-shadow text-left flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3`,children:[(0,W.jsxs)(`div`,{className:`space-y-1`,children:[(0,W.jsxs)(`span`,{className:`font-arcade text-[9px] font-bold text-amber-900 uppercase flex items-center gap-1.5`,children:[(0,W.jsx)(m,{className:`w-3.5 h-3.5 text-amber-700`}),`FAST-TRACK EXPEDITION ENROLLMENT`]}),(0,W.jsx)(`h3`,{className:`font-headline-md text-base sm:text-lg font-bold text-ink-black`,children:`Already Solved Problems Elsewhere?`}),(0,W.jsx)(`p`,{className:`font-sans text-xs text-trash-gray font-semibold max-w-md`,children:`Check off problems you've already solved elsewhere to seed your review queue.`})]}),(0,W.jsxs)(`button`,{onClick:i,className:`px-4 py-2.5 bg-amber-400 hover:bg-amber-300 text-ink-black font-arcade text-[9px] font-bold border-2 border-ink-black shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer shrink-0 flex items-center gap-1.5`,children:[(0,W.jsx)(m,{className:`w-3.5 h-3.5 text-amber-900`}),(0,W.jsx)(`span`,{children:`OPEN 150-PROBLEM CHECKLIST`})]})]}),(0,W.jsxs)(`div`,{className:`border-t-[3px] border-dashed border-ink-black pt-5 space-y-3`,children:[(0,W.jsx)(`div`,{className:`text-[9px] font-arcade text-trash-gray uppercase font-bold text-left`,children:`CONTINUE PRACTICING:`}),(0,W.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2.5`,children:[(0,W.jsxs)(`button`,{onClick:a,className:`p-3 bg-amber-100 hover:bg-amber-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsx)(y,{className:`w-4 h-4 text-amber-600`}),(0,W.jsx)(v,{className:`w-3 h-3 text-ink-black`})]}),(0,W.jsxs)(`div`,{className:`mt-2`,children:[(0,W.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Journey Trail`}),(0,W.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`150 Curated nodes`})]})]}),(0,W.jsxs)(`button`,{onClick:o,className:`p-3 bg-purple-100 hover:bg-purple-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsx)(g,{className:`w-4 h-4 text-purple-700`}),(0,W.jsx)(v,{className:`w-3 h-3 text-ink-black`})]}),(0,W.jsxs)(`div`,{className:`mt-2`,children:[(0,W.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Add Problem`}),(0,W.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`New LeetCode entry`})]})]}),(0,W.jsxs)(`button`,{onClick:()=>s?.(`companion`),className:`p-3 bg-yellow-100 hover:bg-yellow-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsx)(`span`,{className:`material-symbols-outlined text-amber-600 text-lg`,children:`castle`}),(0,W.jsx)(v,{className:`w-3 h-3 text-ink-black`})]}),(0,W.jsxs)(`div`,{className:`mt-2`,children:[(0,W.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`Princess Tower`}),(0,W.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`Visit Aurelia`})]})]}),(0,W.jsxs)(`button`,{onClick:()=>s?.(`computer`),className:`p-3 bg-cyan-100 hover:bg-cyan-200 border-[3px] border-ink-black text-left flex flex-col justify-between gadget-shadow active:translate-y-1 active:shadow-none transition-all cursor-pointer`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,W.jsx)(f,{className:`w-4 h-4 text-cyan-700`}),(0,W.jsx)(v,{className:`w-3 h-3 text-ink-black`})]}),(0,W.jsxs)(`div`,{className:`mt-2`,children:[(0,W.jsx)(`div`,{className:`font-arcade text-[8px] font-bold text-ink-black uppercase`,children:`File Explorer`}),(0,W.jsx)(`div`,{className:`font-sans text-[10px] text-trash-gray font-semibold`,children:`Browse all files`})]})]})]})]}),c&&u&&(0,W.jsxs)(`button`,{onClick:u,className:`mt-3 bg-white hover:bg-slate-100 border-[3px] border-ink-black text-ink-black font-bold px-4 py-2 text-xs uppercase tracking-wide shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer inline-flex items-center gap-2`,children:[(0,W.jsx)(l,{className:`w-3.5 h-3.5`}),` Return to Scheduled Queue`]}),!d&&(0,W.jsx)(re,{isOpen:p,onClose:h,onCompleted:_,userId:b})]})}),Ee=e({default:()=>Oe}),De=(0,U.lazy)(()=>R(()=>import(`./ProblemSpecPanel-CLbwqTwe.js`).then(e=>({default:e.ProblemSpecPanel})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])));function Oe({overrideProblemId:e,onClearOverride:t,onOpenWindow:r,onOpenJourney:i,onOpenCreateProblem:a,onOpenEditProblem:o,onOpenOnboarding:s,refreshTrigger:c}){let[d,p]=(0,U.useState)(null),m=d!==null&&d<780,[g,_]=(0,U.useState)(`spec`),[v,y]=(0,U.useState)(`spec`),[x,C]=(0,U.useState)(null),w=(0,U.useCallback)(e=>{e&&(p(e.clientWidth),new ResizeObserver(e=>{for(let t of e)p(t.contentRect.width)}).observe(e))},[]),[T,E]=(0,U.useState)(!1),[D,O]=(0,U.useState)(()=>localStorage.getItem(`isAutocompleteEnabled`)!==`false`),{reviews:k,setReviews:A,loading:j,queueError:M,submitting:N,submittingRating:P,gradeError:F,setGradeError:L,code:R,setCode:ne,nextMilestone:z,activatingMilestone:B,currentUserId:V,fetchQueue:H,handleGrade:ie,handleSelectCard:ae,handleActivateNextMilestone:oe,handleResetStarterCode:se}=fe({overrideProblemId:e,refreshTrigger:c,onClearOverride:t,onOpenOnboarding:s,setIsOnboardingOpen:E}),{sandboxRunning:ue,sandboxResults:de,sandboxError:ge,savingReference:_e,savedRefSuccess:ve,saveRefError:ye,handleRunSandbox:be,handleSaveReference:xe,resetSandbox:G}=pe(),{aiLoading:Se,aiResult:Ee,aiError:Oe,explainLoading:ke,explanationText:Ae,explainError:je,aiSolutionLoading:Me,aiSolutionError:Ne,handleAiEvaluation:Pe,handleExplainCode:Fe,handleFetchAiSolution:Ie,resetAiState:K}=me(),[Le,Re]=(0,U.useState)(!1),[ze,Be]=(0,U.useState)(null),[Ve,q]=(0,U.useState)(null),He=(0,U.useCallback)(async()=>{if(k.length===0)return;let e=k[0]?.problems||{},t=R.trim()||e.reference_code||``;if(!t){q(`Please write or save code before pushing to GitHub.`),setTimeout(()=>q(null),4e3);return}let n=te();if(!n.token){r&&r(`github`);return}Re(!0),q(null),Be(null);try{let r=await ee({token:n.token,repo:n.repoName,branch:n.branch,problem_number:e.problem_number,problem_name:e.name||`Algorithm Problem`,pattern:e.pattern||`Algorithms`,difficulty:e.difficulty||`Medium`,optimal_time:e.optimal_time||`O(N)`,optimal_space:e.optimal_space||`O(1)`,description:e.description||``,code:t});Be(r.html_url),setTimeout(()=>Be(null),8e3)}catch(e){q(e.message||`Failed to push solution to GitHub.`),setTimeout(()=>q(null),5e3)}finally{Re(!1)}},[k,R,r]),J=k[0]?.id||k[0]?.problem_id,Ue=(0,U.useRef)(void 0);(0,U.useEffect)(()=>{J&&Ue.current!==J&&(Ue.current=J,K(),G())},[J,K,G]);let Y=(0,U.useCallback)(e=>{K(),G(),ie(e)},[ie,K,G]),We=(0,U.useCallback)(e=>{K(),G(),ae(e)},[ae,K,G]);(0,U.useEffect)(()=>{let e=e=>{let t=e.target;t?.closest(`.cm-editor`)||t?.tagName===`INPUT`||t?.tagName===`TEXTAREA`||t?.isContentEditable||k.length===0||N||(e.key===`1`?(e.preventDefault(),Y(1)):e.key===`2`?(e.preventDefault(),Y(2)):e.key===`3`?(e.preventDefault(),Y(3)):e.key===`4`&&(e.preventDefault(),Y(4)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[Y,k.length,N]);let Ge=(e,t)=>{navigator.clipboard.writeText(e),C(t),setTimeout(()=>C(null),1800)},Ke=(0,U.useCallback)(()=>{i?i():r?.(`journey`)},[i,r]),qe=(0,U.useCallback)(()=>{a?a():r?.(`createProblem`)},[a,r]),Je=(0,U.useCallback)(()=>{s?s():E(!0)},[s]),Ye=(0,U.useCallback)(e=>{A(t=>{if(t.length===0)return t;let n=[...t],r=n[0];return r&&r.problems&&(r.problems={...r.problems,solutions:e}),n})},[A]);if(j)return(0,W.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] text-ink-black`,children:(0,W.jsxs)(`div`,{className:`flex flex-col items-center gap-4 p-8 bg-paper-white border-[3px] border-ink-black gadget-shadow text-center max-w-xs`,children:[(0,W.jsx)(`div`,{className:`w-12 h-12 bg-amber-200 border-2 border-ink-black flex items-center justify-center animate-spin`,children:(0,W.jsx)(n,{className:`w-6 h-6 text-ink-black`})}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h3`,{className:`font-arcade text-xs text-ink-black uppercase tracking-wider font-bold`,children:`LOADING QUEUE`}),(0,W.jsx)(`p`,{className:`font-sans text-[11px] text-trash-gray mt-1 font-semibold`,children:`Fetching scheduled FSRS review cards...`})]})]})});if(M&&k.length===0)return(0,W.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-[#fdf8e1] p-6 overflow-y-auto custom-scrollbar`,children:(0,W.jsxs)(`div`,{className:`w-full max-w-md bg-paper-white border-[4px] border-ink-black gadget-shadow p-6 sm:p-8 relative overflow-hidden text-center space-y-6`,children:[(0,W.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-3 bg-gradient-to-r from-red-500 via-amber-400 to-red-500`}),(0,W.jsxs)(`div`,{className:`relative inline-block mt-2`,children:[(0,W.jsx)(`div`,{className:`w-20 h-20 bg-rose-200 border-[3px] border-ink-black rounded-2xl flex items-center justify-center mx-auto gadget-shadow rotate-[-2deg]`,children:(0,W.jsx)(S,{className:`w-10 h-10 text-rose-700 stroke-[2.5]`})}),(0,W.jsx)(`div`,{className:`absolute -bottom-2 -right-2 bg-rose-500 text-white border-2 border-ink-black px-2 py-0.5 font-arcade text-[8px] font-bold uppercase shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]`,children:`OFFLINE`})]}),(0,W.jsxs)(`div`,{className:`space-y-2`,children:[(0,W.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 px-2.5 py-1 bg-rose-100 border-2 border-ink-black text-rose-800 font-arcade text-[9px] font-bold`,children:[(0,W.jsx)(h,{className:`w-3.5 h-3.5 stroke-[2.5] text-rose-600`}),` CONNECTION ERROR`]}),(0,W.jsx)(`h2`,{className:`text-2xl sm:text-3xl font-extrabold text-ink-black font-headline-md tracking-tight`,children:`Queue Unavailable`}),(0,W.jsx)(`p`,{className:`font-sans text-xs sm:text-sm text-trash-gray font-semibold leading-relaxed max-w-sm mx-auto`,children:`Unable to reach the server to fetch your scheduled review cards. Check your connection or retry below.`})]}),(0,W.jsxs)(`div`,{className:`pt-2 flex flex-col sm:flex-row gap-3 justify-center items-center`,children:[(0,W.jsxs)(`button`,{onClick:()=>void H(!0),className:`w-full sm:w-auto px-6 py-2.5 bg-amber-300 hover:bg-amber-400 border-[3px] border-ink-black font-arcade text-xs font-bold text-ink-black gadget-shadow active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all flex items-center justify-center gap-2 cursor-pointer`,children:[(0,W.jsx)(l,{className:`w-4 h-4`}),(0,W.jsx)(`span`,{children:`RETRY CONNECTION`})]}),(i||r)&&(0,W.jsx)(`button`,{onClick:Ke,className:`w-full sm:w-auto px-5 py-2.5 bg-paper-white hover:bg-warm-sand-bg border-[3px] border-ink-black font-arcade text-xs font-bold text-ink-black gadget-shadow active:translate-x-0.5 active:translate-y-0.5 active:shadow-none transition-all flex items-center justify-center gap-2 cursor-pointer`,children:(0,W.jsx)(`span`,{children:`OPEN JOURNEY MAP`})})]})]})});if(k.length===0)return(0,W.jsx)(Te,{nextMilestone:z,activatingMilestone:B,onActivateNextMilestone:oe,onOpenOnboarding:Je,onOpenJourney:Ke,onOpenCreateProblem:qe,onOpenWindow:r,overrideProblemId:e,onClearOverride:t,hasCustomOnboardingModal:!!s,isOnboardingOpen:T,onCloseOnboarding:()=>E(!1),onCompletedOnboarding:H,currentUserId:V});let X=k[0],Z=X?.problems,Xe=Z?.problem_number??(/^\d+$/.test(X?.problem_id||``)?parseInt(X.problem_id,10):void 0),Q=I(Xe,Z?.id||X?.problem_id,Z?.name),{cleanTitle:Ze,approachVariant:Qe,pattern:$e}=le(Z?.name,Q?.name,Z?.pattern,Q?.pattern),$={...Q,...Z,id:Z?.id||Q?.id||X?.problem_id,name:Ze,problem_number:Z?.problem_number??Q?.problem_number,pattern:$e,approach_variant:Qe,difficulty:Z?.difficulty||Q?.difficulty||`Medium`,reference_code:Z?.reference_code||Q?.reference_solution||``,starter_code:Q?.starter_code||Z?.starter_code||``,description:Z?.description||Q?.description||``,optimal_time:Z?.optimal_time||Q?.time_complexity||`O(N)`,optimal_space:Z?.optimal_space||Q?.space_complexity||`O(1)`,examples:Z?.examples&&Z.examples.length>0?Z.examples:Q?.examples,constraints:Z?.constraints||Q?.constraints,how_to_solve:Z?.how_to_solve||``,solutions:Z?.solutions&&Z.solutions.length>0?Z.solutions:Q?.solutions},et=ce({...Q,...$,examples:$.examples&&$.examples.length>0?$.examples:Q?.examples,constraints:$.constraints&&(Array.isArray($.constraints)?$.constraints.length>0:$.constraints)?$.constraints:Q?.constraints}),tt=Q?.reference_solution||``,nt=Z?.reference_code||``,rt=nt&&(!tt||nt.trim()!==tt.trim())?nt:``,it=rt||tt||nt||``;return(0,W.jsxs)(`div`,{ref:w,className:`w-full h-full bg-[#fdf8e1] flex flex-col overflow-hidden select-none`,children:[(0,W.jsx)(he,{problem:$,totalInQueue:k.length,reviews:k,overrideProblemId:e,onSelectCard:We,onOpenCreateProblem:qe,onOpenEditProblem:()=>{o?o($):r?.(`editProblem`)}}),(0,W.jsxs)(`div`,{className:`${m?`flex`:`hidden`} shrink-0 bg-amber-100 border-b-[3px] border-ink-black px-2.5 sm:px-3 py-1.5 gap-1.5 sm:gap-2 overflow-x-auto no-scrollbar`,children:[(0,W.jsxs)(`button`,{onClick:()=>{y(`spec`),_(`spec`)},className:`px-2.5 sm:px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 whitespace-nowrap ${v===`spec`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,W.jsx)(u,{className:`w-3 h-3 shrink-0`}),(0,W.jsx)(`span`,{children:`SPEC`})]}),(0,W.jsxs)(`button`,{onClick:()=>y(`code`),className:`px-2.5 sm:px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 whitespace-nowrap ${v===`code`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,W.jsx)(b,{className:`w-3 h-3 shrink-0`}),(0,W.jsx)(`span`,{children:`CODE STUDIO`})]}),(0,W.jsxs)(`button`,{onClick:()=>{y(`ref`),_(`ref`)},className:`px-2.5 sm:px-3 py-1 text-[9px] font-arcade font-bold border-2 border-ink-black transition-all cursor-pointer flex items-center gap-1.5 whitespace-nowrap ${v===`ref`?`bg-paper-white translate-y-0.5 shadow-none text-ink-black`:`bg-white shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] text-trash-gray`}`,children:[(0,W.jsx)(f,{className:`w-3 h-3 shrink-0`}),(0,W.jsx)(`span`,{children:`SOLUTION`})]})]}),(0,W.jsxs)(`div`,{className:`flex-1 flex ${m?`flex-col`:`flex-row`} overflow-hidden min-h-0`,children:[(0,W.jsx)(U.Suspense,{fallback:(0,W.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-8 bg-paper-white ${m?`h-64`:`border-r-[4px] border-ink-black`} font-sans text-xs text-trash-gray select-none`,children:(0,W.jsxs)(`div`,{className:`flex items-center gap-2 font-arcade text-[10px] text-ink-black`,children:[(0,W.jsx)(n,{className:`w-4 h-4 animate-spin text-[#0ea5e9]`}),(0,W.jsx)(`span`,{children:`Loading Problem Spec...`})]})}),children:(0,W.jsx)(De,{leftTab:g,onSelectLeftTab:e=>{_(e),e===`ref`?y(`ref`):e===`spec`&&y(`spec`)},mobileView:v,isNarrow:m,problem:$,parsed:et,userSolution:rt,officialSolution:tt,effectiveReferenceCode:it,copiedSnippet:x,onCopyText:Ge,saveRefError:ye,aiSolutionLoading:Me,aiSolutionError:Ne,onFetchAiSolution:()=>Ie(X,e=>{A(t=>t.map((t,n)=>n===0?{...t,problems:{...$||{},...t.problems||{},reference_code:e}}:t))}),explainLoading:ke,explainError:je,explanationText:Ae,onExplainCode:(e,t,n,r)=>Fe(X,e,t,n,r),activeReview:X,onUpdateSolutions:Ye,onEditProblem:()=>{o?o($):r?.(`editProblem`)}})}),(0,W.jsx)(Ce,{mobileView:v,isNarrow:m,isAutocompleteEnabled:D,onToggleAutocomplete:e=>{O(e),localStorage.setItem(`isAutocompleteEnabled`,String(e))},onResetStarterCode:se,code:R,onChangeCode:ne,sandboxRunning:ue,sandboxError:ge,sandboxResults:de,onRunSandbox:()=>be(X,R),savingReference:_e,savedRefSuccess:ve,saveRefError:ye,onSaveReference:()=>xe(X,R,(e,t)=>{A(n=>n.map((n,r)=>r===0?{...n,problem_id:t||n.problem_id,problems:{...$||{},...n.problems||{},id:t||n.problems?.id||n.problem_id,reference_code:e}}:n))}),aiLoading:Se,aiError:Oe,aiResult:Ee,onAiEvaluation:()=>Pe(X,R),optimalTime:$.optimal_time||`O(N)`,optimalSpace:$.optimal_space||`O(1)`,onPushToGitHub:He,pushingToGitHub:Le,githubPushedUrl:ze,githubPushError:Ve})]}),(0,W.jsx)(we,{gradeError:F,onDismissGradeError:()=>L(null),submitting:N,submittingRating:P,onGrade:Y}),!s&&(0,W.jsx)(re,{isOpen:T,onClose:()=>E(!1),onCompleted:H,userId:V})]})}export{Oe as default,ue as n,Ee as t}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/Settings-ACJ113RL.js b/algospaced-ui/dist/assets/Settings-ACJ113RL.js deleted file mode 100644 index f035d3aa2a87abc4164202971a8f5481023b6e57..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/Settings-ACJ113RL.js +++ /dev/null @@ -1 +0,0 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,A as n,Bt as r,E as i,J as a,K as o,O as s,Rt as c,Z as l,a as ee,at as u,d,et as f,ft as p,mt as m,nt as h,tt as g,x as _,y as v}from"./vendor-react-CIO8MTK1.js";import{_ as y,d as b,f as x,h as S,m as C,p as w}from"./index-DnK6BACV.js";import{a as te,i as ne,n as re,r as T,s as E,t as D}from"./githubSyncService-x0Mm_uEl.js";var O=e(r(),1),k=c(),A=[{id:`default`,name:`Default`,desc:`Subject to Availability`},{id:`groq`,name:`Groq`,badge:`Fastest`,desc:`Llama 3.3 & Qwen`,keyPrefix:`gsk_...`,portalUrl:`https://console.groq.com/keys`},{id:`gemini`,name:`Google Gemini`,desc:`Gemini 2.5 / 3.5`,keyPrefix:`AIzaSy...`,portalUrl:`https://aistudio.google.com/app/apikey`},{id:`openrouter`,name:`OpenRouter`,desc:`Multi-Provider`,keyPrefix:`sk-or-v1-...`,portalUrl:`https://openrouter.ai/keys`}];function j(){let[e,r]=(0,O.useState)(()=>localStorage.getItem(`algospaced_custom_ai_provider`)||`default`),[c,j]=(0,O.useState)(()=>localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``),[M,N]=(0,O.useState)(!1),[P,F]=(0,O.useState)(null),[I,L]=(0,O.useState)(()=>b()),[R,z]=(0,O.useState)(null),[B,V]=(0,O.useState)(()=>x().currentFloor),[H,U]=(0,O.useState)(()=>T()),[W,G]=(0,O.useState)(()=>ne()),[K,q]=(0,O.useState)(!1),[J,Y]=(0,O.useState)(null),X=!!(H.token&&(H.username||W?.login)),Z=!!(c.trim()&&e!=="default"),Q=e!=="default"&&!c.trim(),$=A.find(t=>t.id===e),ie=e=>{r(e),localStorage.setItem(`algospaced_custom_ai_provider`,e),F(e==="default"?{type:`info`,text:`Switched to Server Default (Shared Pool).`}:{type:`info`,text:`Switched to ${e.toUpperCase()}.`}),setTimeout(()=>F(null),3e3)},ae=()=>{let t=c.trim();if(!t){F({type:`error`,text:`Please enter an API key for ${e.toUpperCase()}.`}),setTimeout(()=>F(null),3e3);return}localStorage.setItem(`algospaced_custom_api_key`,t),localStorage.setItem(`sandbox_gemini_api_key`,t),localStorage.setItem(`algospaced_custom_ai_provider`,e),F({type:`success`,text:`${e.toUpperCase()} API key saved successfully.`}),setTimeout(()=>F(null),3e3)},oe=()=>{localStorage.removeItem(`algospaced_custom_api_key`),localStorage.removeItem(`sandbox_gemini_api_key`),j(``),F({type:`info`,text:`Cleared custom API key.`}),setTimeout(()=>F(null),3e3)},se=()=>{localStorage.removeItem(`algospaced_custom_api_key`),localStorage.removeItem(`sandbox_gemini_api_key`),localStorage.setItem(`algospaced_custom_ai_provider`,`default`),j(``),r(`default`),F({type:`info`,text:`Reset to Server Default provider.`}),setTimeout(()=>F(null),3e3)},ce=()=>{C(I),z({type:`success`,text:`Princess Companion settings saved!`}),setTimeout(()=>z(null),3e3)},le=()=>{L(S),C(S),z({type:`info`,text:`Reset companion to default settings.`}),setTimeout(()=>z(null),3e3)},ue=()=>{if(window.confirm(`Are you sure you want to reset your Spire Journey progress back to 0 problems?`)){let e=w();V(e.currentFloor),z({type:`info`,text:`Spire journey progress reset to 0 problems.`}),setTimeout(()=>z(null),3e3)}},de=async()=>{q(!0),Y(null);try{let{token:e,user:t}=await re();G(t);let n=T();U(n);try{await te(e,n.repoName,n.isPrivate)}catch{}Y({type:`success`,text:`Connected to GitHub as @${t.login}!`}),setTimeout(()=>Y(null),4e3)}catch(e){Y({type:`error`,text:e.message||`GitHub connection failed.`}),setTimeout(()=>Y(null),5e3)}finally{q(!1)}},fe=()=>{D(),U(T()),G(null),Y({type:`info`,text:`Disconnected from GitHub.`}),setTimeout(()=>Y(null),3e3)},pe=e=>{E({autoCommit:e}),U(t=>({...t,autoCommit:e})),Y({type:`info`,text:e?`Auto-commit enabled for review submissions.`:`Auto-commit disabled.`}),setTimeout(()=>Y(null),3e3)};return(0,k.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-5 sm:p-6 flex flex-col gap-4 select-none font-sans text-ink-black overflow-y-auto custom-scrollbar`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col gap-0.5 border-b-[3px] border-ink-black pb-2.5`,children:[(0,k.jsxs)(`h3`,{className:`font-headline-md font-bold text-sm m-0 flex items-center gap-2 tracking-wide`,children:[(0,k.jsx)(o,{className:`w-4 h-4 text-ink-black`}),`API & AI Configuration`]}),(0,k.jsx)(`p`,{className:`text-[11px] text-trash-gray font-medium m-0`,children:`Configure your AI model provider..`})]}),(0,k.jsx)(`div`,{className:`px-4 py-3 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] transition-all ${Z?`bg-emerald-50`:Q?`bg-rose-50`:`bg-amber-50/70`}`,children:(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[Z?(0,k.jsx)(ee,{className:`w-4 h-4 text-emerald-600 shrink-0`}):Q?(0,k.jsx)(m,{className:`w-4 h-4 text-rose-600 shrink-0`}):(0,k.jsx)(h,{className:`w-4 h-4 text-amber-600 shrink-0`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`text-xs font-bold font-headline-md text-ink-black flex items-center gap-1.5`,children:(0,k.jsxs)(`span`,{children:[`Active:`,` `,Z?`${e.toUpperCase()} (Custom Key)`:Q?`${e.toUpperCase()} (Key Required)`:`Default`]})}),(0,k.jsx)(`div`,{className:`text-[10px] text-trash-gray font-medium`,children:Z?`Requests are routed directly through your personal API key.`:Q?`Enter your API key below to activate this provider.`:`Using basic, free built-in developer keys with auto-failover.`})]})]}),(0,k.jsx)(`span`,{className:`px-2 py-0.5 text-[9px] font-bold font-arcade uppercase border-2 border-ink-black shrink-0 ${Z?`bg-emerald-300 text-emerald-950`:Q?`bg-rose-300 text-rose-950`:`bg-amber-200 text-amber-950`}`,children:Z?`ACTIVE`:Q?`NEEDS KEY`:`LIMITED`})]})}),(0,k.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider mb-2 font-headline-md flex items-center gap-1.5`,children:[(0,k.jsx)(h,{className:`w-3.5 h-3.5 text-ink-black`}),`Select Provider`]}),(0,k.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2`,children:A.map(t=>{let n=e===t.id;return(0,k.jsxs)(`button`,{type:`button`,onClick:()=>ie(t.id),className:`p-2.5 border-[2px] text-left transition-all cursor-pointer flex flex-col justify-between rounded ${n?`border-ink-black bg-[#ffe24c] shadow-[2px_2px_0px_0px_#1E293B] font-bold`:`border-slate-300 bg-slate-50 hover:bg-slate-100 text-slate-700`}`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,k.jsx)(`span`,{className:`text-xs font-bold font-headline-md`,children:t.name}),t.badge&&(0,k.jsx)(`span`,{className:`text-[8px] font-bold uppercase px-1 py-0.2 bg-orange-100 text-orange-700 rounded border border-orange-300`,children:t.badge})]}),(0,k.jsx)(`span`,{className:`text-[9px] mt-1 text-slate-600 leading-tight block`,children:t.desc})]},t.id)})})]}),e==="default"?(0,k.jsxs)(`div`,{className:`p-3.5 bg-slate-50 border border-slate-200 rounded flex items-start gap-3`,children:[(0,k.jsx)(d,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs text-slate-700`,children:[(0,k.jsxs)(`span`,{className:`font-bold text-ink-black`,children:[`Shared Quotas (`,(0,k.jsx)(`i`,{children:`limited`}),`)`]}),(0,k.jsx)(`p`,{className:`text-[11px] text-trash-gray m-0 leading-relaxed`,children:`Powered by shared, basic developer keys. Because limits are shared with everyone, requests may fail. Use your own provider keys above for stable performance.`})]})]}):(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,k.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md flex items-center gap-1.5`,children:[(0,k.jsx)(o,{className:`w-3.5 h-3.5 text-ink-black`}),$?.name,` API Key`]}),$?.portalUrl&&(0,k.jsxs)(`a`,{href:$.portalUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-[10px] text-sky-600 hover:text-sky-800 font-medium flex items-center gap-1 no-underline`,children:[(0,k.jsx)(`span`,{children:`Get API Key`}),(0,k.jsx)(g,{className:`w-3 h-3`})]})]}),(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(`input`,{type:M?`text`:`password`,value:c,onChange:e=>j(e.target.value),placeholder:`Enter ${$?.keyPrefix||`API Key`}`,className:`w-full bg-white border-[2px] border-ink-black rounded py-2 pl-3 pr-9 text-ink-black placeholder-slate-400 focus:outline-none focus:border-sky-600 text-xs font-code-mono`}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>N(!M),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-trash-gray hover:text-ink-black cursor-pointer bg-transparent border-0 outline-none p-1`,title:M?`Hide API key`:`Show API key`,children:M?(0,k.jsx)(f,{className:`w-3.5 h-3.5`}):(0,k.jsx)(t,{className:`w-3.5 h-3.5`})})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[10px] text-trash-gray font-medium`,children:[(0,k.jsx)(_,{className:`w-3.5 h-3.5 text-emerald-600 shrink-0`}),(0,k.jsx)(`span`,{children:`Stored locally in your browser. Sent directly via request headers.`})]}),(0,k.jsxs)(`div`,{className:`flex gap-2 pt-1`,children:[(0,k.jsxs)(`button`,{onClick:ae,className:`flex-1 flex items-center justify-center gap-1.5 py-2 border-[2px] border-ink-black bg-[#ffe24c] hover:bg-yellow-300 text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:[(0,k.jsx)(i,{className:`w-3.5 h-3.5`}),`Save Key`]}),c&&(0,k.jsx)(`button`,{onClick:oe,className:`px-3 py-2 border-[2px] border-slate-300 bg-white hover:bg-slate-50 text-xs font-bold text-slate-700 hover:text-rose-600 shadow-[2px_2px_0px_0px_rgba(0,0,0,0.05)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:`Clear Key`})]})]}),P&&(0,k.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${P.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:P.type===`error`?`bg-rose-100 border-rose-600 text-rose-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[P.type===`success`?(0,k.jsx)(p,{className:`w-3.5 h-3.5 shrink-0`}):P.type===`error`?(0,k.jsx)(m,{className:`w-3.5 h-3.5 shrink-0`}):(0,k.jsx)(a,{className:`w-3.5 h-3.5 shrink-0`}),P.text]}),e!=="default"&&(0,k.jsx)(`div`,{className:`pt-2 border-t border-slate-200 flex justify-end`,children:(0,k.jsxs)(`button`,{onClick:se,className:`flex items-center gap-1.5 py-1.5 px-3 border border-slate-300 bg-slate-50 hover:bg-slate-100 text-[11px] font-bold text-slate-600 hover:text-ink-black transition-all cursor-pointer rounded`,children:[(0,k.jsx)(s,{className:`w-3 h-3 text-slate-500`}),`Reset to Server Default`]})})]}),(0,k.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,k.jsx)(`div`,{className:`w-8 h-8 rounded bg-[#24292e] border-[2px] border-ink-black flex items-center justify-center text-white shadow-[1px_1px_0px_0px_#1E293B]`,children:(0,k.jsx)(l,{className:`w-4 h-4 text-white`})}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h4`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black m-0 flex items-center gap-2`,children:`GitHub Solutions Sync & Auto-Commit`}),(0,k.jsx)(`p`,{className:`text-[10px] text-trash-gray font-medium m-0`,children:`Sync solutions to personal GitHub repository and commit automatically on submission`})]})]}),(0,k.jsx)(`span`,{className:`px-2 py-0.5 text-[9px] font-bold font-arcade uppercase border-2 border-ink-black shrink-0 ${X?`bg-emerald-300 text-emerald-950`:`bg-slate-200 text-slate-800`}`,children:X?`CONNECTED`:`DISCONNECTED`})]}),X?(0,k.jsxs)(`div`,{className:`space-y-3`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-2 p-3 bg-slate-50 border border-slate-200 rounded`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[W?.avatar_url&&(0,k.jsx)(`img`,{src:W.avatar_url,alt:W.login,className:`w-7 h-7 rounded-full border border-ink-black`}),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`span`,{className:`text-xs font-bold text-ink-black`,children:[`@`,W?.login||H.username]}),(0,k.jsxs)(`span`,{className:`text-[11px] text-slate-600 font-mono block`,children:[H.username,`/`,H.repoName,` (`,H.branch,`)`]})]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsxs)(`a`,{href:`https://github.com/${H.username}/${H.repoName}`,target:`_blank`,rel:`noopener noreferrer`,className:`px-2.5 py-1 text-[11px] font-bold bg-white hover:bg-slate-100 text-ink-black border border-slate-300 rounded no-underline flex items-center gap-1 cursor-pointer`,children:[(0,k.jsx)(g,{className:`w-3 h-3`}),(0,k.jsx)(`span`,{children:`View Repo`})]}),(0,k.jsx)(`button`,{type:`button`,onClick:fe,className:`px-2.5 py-1 text-[11px] font-bold bg-white hover:bg-rose-50 text-rose-700 border border-rose-300 rounded cursor-pointer`,children:`Disconnect`})]})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-emerald-50/50 border border-emerald-300 rounded cursor-pointer`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:H.autoCommit,onChange:e=>pe(e.target.checked),className:`w-4 h-4 accent-emerald-600 cursor-pointer`}),(0,k.jsxs)(`div`,{className:`text-xs`,children:[(0,k.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`Auto-commit on every submission`}),(0,k.jsxs)(`span`,{className:`text-[10px] text-trash-gray`,children:[`Automatically pushes your code to `,H.repoName,` whenever you grade a review card.`]})]})]})]}):(0,k.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 p-3.5 bg-slate-50 border border-slate-200 rounded`,children:[(0,k.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,k.jsx)(`span`,{className:`text-xs font-bold text-ink-black block`,children:`Connect your GitHub Account (1-Click OAuth)`}),(0,k.jsx)(`p`,{className:`text-[11px] text-trash-gray m-0`,children:`Grant repository access to automatically sync your DSA problem solutions as you study.`})]}),(0,k.jsx)(`button`,{type:`button`,onClick:de,disabled:K,className:`px-4 py-2 bg-[#24292e] hover:bg-black text-white text-xs font-bold uppercase rounded border-2 border-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none flex items-center gap-2 shrink-0 cursor-pointer disabled:opacity-50`,children:K?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(n,{className:`w-3.5 h-3.5 animate-spin`}),(0,k.jsx)(`span`,{children:`CONNECTING...`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(l,{className:`w-3.5 h-3.5 text-yellow-300`}),(0,k.jsx)(`span`,{children:`CONNECT GITHUB`})]})})]}),J&&(0,k.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${J.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:J.type===`error`?`bg-rose-100 border-rose-600 text-rose-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[J.type===`success`?(0,k.jsx)(p,{className:`w-3.5 h-3.5 shrink-0`}):J.type===`error`?(0,k.jsx)(m,{className:`w-3.5 h-3.5 shrink-0`}):(0,k.jsx)(a,{className:`w-3.5 h-3.5 shrink-0`}),J.text]})]}),(0,k.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`div`,{className:`w-7 h-7 rounded bg-[#FFE24C] border-[2px] border-ink-black flex items-center justify-center shadow-[1px_1px_0px_0px_#1E293B]`,children:(0,k.jsx)(v,{className:`w-4 h-4 text-ink-black`})}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h4`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black m-0`,children:`Princess AI Companion & RPG Settings`}),(0,k.jsx)(`p`,{className:`text-[10px] text-trash-gray font-medium m-0`,children:`Trapped Princess Persona, Study Break Timer & 8-bit RPG Audio`})]})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`text-[11px] font-bold text-ink-black font-headline-md uppercase`,children:I.enabled?`Enabled`:`Disabled`}),(0,k.jsx)(`input`,{type:`checkbox`,checked:I.enabled,onChange:e=>L(t=>({...t,enabled:e.target.checked})),className:`w-4 h-4 accent-amber-500 cursor-pointer`})]})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md`,children:`Companion Name`}),(0,k.jsx)(`input`,{type:`text`,value:I.name,onChange:e=>L(t=>({...t,name:e.target.value})),placeholder:`e.g. Princess Aurelia`,className:`bg-white border-[2px] border-ink-black rounded py-2 px-3 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600`})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md flex items-center gap-1`,children:[(0,k.jsx)(u,{className:`w-3.5 h-3.5 text-amber-700`}),`Study Break Reminder`]}),(0,k.jsxs)(`select`,{value:I.breakIntervalMinutes,onChange:e=>L(t=>({...t,breakIntervalMinutes:Number(e.target.value)})),className:`bg-white border-[2px] border-ink-black rounded py-2 px-3 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600 cursor-pointer`,children:[(0,k.jsx)(`option`,{value:25,children:`Every 25 Minutes (Classic Pomodoro)`}),(0,k.jsx)(`option`,{value:45,children:`Every 45 Minutes`}),(0,k.jsx)(`option`,{value:60,children:`Every 60 Minutes`}),(0,k.jsx)(`option`,{value:0,children:`Disabled (No automatic break popups)`})]})]})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md`,children:`Princess Backstory & Persona Prompt`}),(0,k.jsx)(`textarea`,{rows:2,value:I.backstory,onChange:e=>L(t=>({...t,backstory:e.target.value})),placeholder:`Describe her background, tone, and connection to your DSA studies...`,className:`bg-white border-[2px] border-ink-black rounded p-2.5 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600 resize-y`})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1`,children:[(0,k.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-white border border-slate-300 rounded cursor-pointer hover:border-ink-black transition-all`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:I.soundEnabled,onChange:e=>{let t=e.target.checked;L(e=>({...e,soundEnabled:t})),y(!t)},className:`w-4 h-4 accent-amber-500 cursor-pointer`}),(0,k.jsxs)(`div`,{className:`text-xs`,children:[(0,k.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`8-bit Sound Effects`}),(0,k.jsx)(`span`,{className:`text-[10px] text-trash-gray`,children:`Audio chimes & fanfare`})]})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-white border border-slate-300 rounded cursor-pointer hover:border-ink-black transition-all`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:I.autoPopupEnabled,onChange:e=>L(t=>({...t,autoPopupEnabled:e.target.checked})),className:`w-4 h-4 accent-amber-500 cursor-pointer`}),(0,k.jsxs)(`div`,{className:`text-xs`,children:[(0,k.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`Spontaneous RPG Popups`}),(0,k.jsx)(`span`,{className:`text-[10px] text-trash-gray`,children:`Speech bubbles for breaks & milestones`})]})]})]}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-slate-200`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:ce,className:`flex items-center gap-1.5 py-2 px-4 border-[2px] border-ink-black bg-[#ffe24c] hover:bg-yellow-300 text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:[(0,k.jsx)(i,{className:`w-3.5 h-3.5`}),`Save Companion Settings`]}),(0,k.jsx)(`button`,{type:`button`,onClick:le,className:`py-2 px-3 border border-slate-300 bg-white hover:bg-slate-50 text-xs font-bold text-slate-700 transition-all cursor-pointer rounded`,children:`Default Persona`})]}),(0,k.jsxs)(`button`,{type:`button`,onClick:ue,className:`flex items-center gap-1 py-1.5 px-3 border border-rose-300 bg-rose-50 hover:bg-rose-100 text-rose-700 text-[11px] font-bold transition-all cursor-pointer rounded`,children:[(0,k.jsx)(s,{className:`w-3 h-3 text-rose-500`}),(0,k.jsxs)(`span`,{children:[`Reset Journey (`,B,`/150 LC)`]})]})]}),R&&(0,k.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${R.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[(0,k.jsx)(p,{className:`w-3.5 h-3.5 shrink-0`}),R.text]})]}),(0,k.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,k.jsx)(a,{className:`w-3.5 h-3.5 text-[#0ea5e9]`}),(0,k.jsx)(`h4`,{className:`text-xs font-bold uppercase font-headline-md m-0`,children:`Get Free API Keys`})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-2 text-[10px]`,children:[(0,k.jsxs)(`a`,{href:`https://console.groq.com/keys`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,k.jsx)(`span`,{children:`Groq Cloud`}),(0,k.jsx)(g,{className:`w-3 h-3 text-slate-400`})]}),(0,k.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Fast inference with generous free rate limits.`})]}),(0,k.jsxs)(`a`,{href:`https://aistudio.google.com/app/apikey`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,k.jsx)(`span`,{children:`Google AI Studio`}),(0,k.jsx)(g,{className:`w-3 h-3 text-slate-400`})]}),(0,k.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Free Gemini Flash API quota.`})]}),(0,k.jsxs)(`a`,{href:`https://openrouter.ai/keys`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,k.jsx)(`span`,{children:`OpenRouter`}),(0,k.jsx)(g,{className:`w-3 h-3 text-slate-400`})]}),(0,k.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Unified API for open-weights models.`})]})]})]})]})}export{j as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/Settings-BVuXk3LW.js b/algospaced-ui/dist/assets/Settings-BVuXk3LW.js new file mode 100644 index 0000000000000000000000000000000000000000..2ad13d61fdc0101fd4eb1587d7af45db6af74c81 --- /dev/null +++ b/algospaced-ui/dist/assets/Settings-BVuXk3LW.js @@ -0,0 +1 @@ +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,Bt as n,C as r,Ht as i,J as a,M as ee,O as o,X as s,_t as c,a as l,at as u,ct as d,d as te,et as f,ht as p,it as m,nt as h,rt as g,x as _}from"./vendor-react-hnaVBnLv.js";import{_ as v,d as ne,f as re,h as y,m as b,p as x}from"./index-DVWZ15xt.js";import{a as S,i as C,n as w,r as T,s as E,t as D}from"./githubSyncService-x0Mm_uEl.js";var O=e(i(),1),k=n(),A=[{id:`default`,name:`Default`,desc:`Subject to Availability`},{id:`groq`,name:`Groq`,badge:`Fastest`,desc:`Llama 3.3 & Qwen`,keyPrefix:`gsk_...`,portalUrl:`https://console.groq.com/keys`},{id:`gemini`,name:`Google Gemini`,desc:`Gemini 2.5 / 3.5`,keyPrefix:`AIzaSy...`,portalUrl:`https://aistudio.google.com/app/apikey`},{id:`openrouter`,name:`OpenRouter`,desc:`Multi-Provider`,keyPrefix:`sk-or-v1-...`,portalUrl:`https://openrouter.ai/keys`}];function j(){let[e,n]=(0,O.useState)(()=>localStorage.getItem(`algospaced_custom_ai_provider`)||`default`),[i,j]=(0,O.useState)(()=>localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``),[M,ie]=(0,O.useState)(!1),[N,P]=(0,O.useState)(null),[F,I]=(0,O.useState)(()=>ne()),[L,R]=(0,O.useState)(null),[z,B]=(0,O.useState)(()=>re().currentFloor),[V,H]=(0,O.useState)(()=>T()),[U,W]=(0,O.useState)(()=>C()),[G,K]=(0,O.useState)(!1),[q,J]=(0,O.useState)(null),Y=!!(V.token&&(V.username||U?.login)),X=!!(i.trim()&&e!=="default"),Z=e!=="default"&&!i.trim(),Q=A.find(t=>t.id===e),ae=e=>{n(e),localStorage.setItem(`algospaced_custom_ai_provider`,e),P(e==="default"?{type:`info`,text:`Switched to Server Default (Shared Pool).`}:{type:`info`,text:`Switched to ${e.toUpperCase()}.`}),setTimeout(()=>P(null),3e3)},oe=()=>{let t=i.trim();if(!t){P({type:`error`,text:`Please enter an API key for ${e.toUpperCase()}.`}),setTimeout(()=>P(null),3e3);return}localStorage.setItem(`algospaced_custom_api_key`,t),localStorage.setItem(`sandbox_gemini_api_key`,t),localStorage.setItem(`algospaced_custom_ai_provider`,e),P({type:`success`,text:`${e.toUpperCase()} API key saved successfully.`}),setTimeout(()=>P(null),3e3)},$=()=>{localStorage.removeItem(`algospaced_custom_api_key`),localStorage.removeItem(`sandbox_gemini_api_key`),j(``),P({type:`info`,text:`Cleared custom API key.`}),setTimeout(()=>P(null),3e3)},se=()=>{localStorage.removeItem(`algospaced_custom_api_key`),localStorage.removeItem(`sandbox_gemini_api_key`),localStorage.setItem(`algospaced_custom_ai_provider`,`default`),j(``),n(`default`),P({type:`info`,text:`Reset to Server Default provider.`}),setTimeout(()=>P(null),3e3)},ce=()=>{b(F),R({type:`success`,text:`Princess Companion settings saved!`}),setTimeout(()=>R(null),3e3)},le=()=>{I(y),b(y),R({type:`info`,text:`Reset companion to default settings.`}),setTimeout(()=>R(null),3e3)},ue=()=>{if(window.confirm(`Are you sure you want to reset your Spire Journey progress back to 0 problems?`)){let e=x();B(e.currentFloor),R({type:`info`,text:`Spire journey progress reset to 0 problems.`}),setTimeout(()=>R(null),3e3)}},de=async()=>{K(!0),J(null);try{let{token:e,user:t}=await w();W(t);let n=T();H(n);try{await S(e,n.repoName,n.isPrivate)}catch{}J({type:`success`,text:`Connected to GitHub as @${t.login}!`}),setTimeout(()=>J(null),4e3)}catch(e){J({type:`error`,text:e.message||`GitHub connection failed.`}),setTimeout(()=>J(null),5e3)}finally{K(!1)}},fe=()=>{D(),H(T()),W(null),J({type:`info`,text:`Disconnected from GitHub.`}),setTimeout(()=>J(null),3e3)},pe=e=>{E({autoCommit:e}),H(t=>({...t,autoCommit:e})),J({type:`info`,text:e?`Auto-commit enabled for review submissions.`:`Auto-commit disabled.`}),setTimeout(()=>J(null),3e3)};return(0,k.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-5 sm:p-6 flex flex-col gap-4 select-none font-sans text-ink-black overflow-y-auto custom-scrollbar`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col gap-0.5 border-b-[3px] border-ink-black pb-2.5`,children:[(0,k.jsxs)(`h3`,{className:`font-headline-md font-bold text-sm m-0 flex items-center gap-2 tracking-wide`,children:[(0,k.jsx)(a,{className:`w-4 h-4 text-ink-black`}),`API & AI Configuration`]}),(0,k.jsx)(`p`,{className:`text-[11px] text-trash-gray font-medium m-0`,children:`Configure your AI model provider..`})]}),(0,k.jsx)(`div`,{className:`px-4 py-3 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_rgba(30,41,59,1)] transition-all ${X?`bg-emerald-50`:Z?`bg-rose-50`:`bg-amber-50/70`}`,children:(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[X?(0,k.jsx)(l,{className:`w-4 h-4 text-emerald-600 shrink-0`}):Z?(0,k.jsx)(c,{className:`w-4 h-4 text-rose-600 shrink-0`}):(0,k.jsx)(u,{className:`w-4 h-4 text-amber-600 shrink-0`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`div`,{className:`text-xs font-bold font-headline-md text-ink-black flex items-center gap-1.5`,children:(0,k.jsxs)(`span`,{children:[`Active:`,` `,X?`${e.toUpperCase()} (Custom Key)`:Z?`${e.toUpperCase()} (Key Required)`:`Default`]})}),(0,k.jsx)(`div`,{className:`text-[10px] text-trash-gray font-medium`,children:X?`Requests are routed directly through your personal API key.`:Z?`Enter your API key below to activate this provider.`:`Using basic, free built-in developer keys with auto-failover.`})]})]}),(0,k.jsx)(`span`,{className:`px-2 py-0.5 text-[9px] font-bold font-arcade uppercase border-2 border-ink-black shrink-0 ${X?`bg-emerald-300 text-emerald-950`:Z?`bg-rose-300 text-rose-950`:`bg-amber-200 text-amber-950`}`,children:X?`ACTIVE`:Z?`NEEDS KEY`:`LIMITED`})]})}),(0,k.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider mb-2 font-headline-md flex items-center gap-1.5`,children:[(0,k.jsx)(u,{className:`w-3.5 h-3.5 text-ink-black`}),`Select Provider`]}),(0,k.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2`,children:A.map(t=>{let n=e===t.id;return(0,k.jsxs)(`button`,{type:`button`,onClick:()=>ae(t.id),className:`p-2.5 border-[2px] text-left transition-all cursor-pointer flex flex-col justify-between rounded ${n?`border-ink-black bg-[#ffe24c] shadow-[2px_2px_0px_0px_#1E293B] font-bold`:`border-slate-300 bg-slate-50 hover:bg-slate-100 text-slate-700`}`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,k.jsx)(`span`,{className:`text-xs font-bold font-headline-md`,children:t.name}),t.badge&&(0,k.jsx)(`span`,{className:`text-[8px] font-bold uppercase px-1 py-0.2 bg-orange-100 text-orange-700 rounded border border-orange-300`,children:t.badge})]}),(0,k.jsx)(`span`,{className:`text-[9px] mt-1 text-slate-600 leading-tight block`,children:t.desc})]},t.id)})})]}),e==="default"?(0,k.jsxs)(`div`,{className:`p-3.5 bg-slate-50 border border-slate-200 rounded flex items-start gap-3`,children:[(0,k.jsx)(te,{className:`w-4 h-4 text-amber-500 shrink-0 mt-0.5`}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs text-slate-700`,children:[(0,k.jsxs)(`span`,{className:`font-bold text-ink-black`,children:[`Shared Quotas (`,(0,k.jsx)(`i`,{children:`limited`}),`)`]}),(0,k.jsx)(`p`,{className:`text-[11px] text-trash-gray m-0 leading-relaxed`,children:`Powered by shared, basic developer keys. Because limits are shared with everyone, requests may fail. Use your own provider keys above for stable performance.`})]})]}):(0,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,k.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md flex items-center gap-1.5`,children:[(0,k.jsx)(a,{className:`w-3.5 h-3.5 text-ink-black`}),Q?.name,` API Key`]}),Q?.portalUrl&&(0,k.jsxs)(`a`,{href:Q.portalUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-[10px] text-sky-600 hover:text-sky-800 font-medium flex items-center gap-1 no-underline`,children:[(0,k.jsx)(`span`,{children:`Get API Key`}),(0,k.jsx)(m,{className:`w-3 h-3`})]})]}),(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(`input`,{type:M?`text`:`password`,value:i,onChange:e=>j(e.target.value),placeholder:`Enter ${Q?.keyPrefix||`API Key`}`,className:`w-full bg-white border-[2px] border-ink-black rounded py-2 pl-3 pr-9 text-ink-black placeholder-slate-400 focus:outline-none focus:border-sky-600 text-xs font-code-mono`}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>ie(!M),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-trash-gray hover:text-ink-black cursor-pointer bg-transparent border-0 outline-none p-1`,title:M?`Hide API key`:`Show API key`,children:M?(0,k.jsx)(g,{className:`w-3.5 h-3.5`}):(0,k.jsx)(h,{className:`w-3.5 h-3.5`})})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[10px] text-trash-gray font-medium`,children:[(0,k.jsx)(r,{className:`w-3.5 h-3.5 text-emerald-600 shrink-0`}),(0,k.jsx)(`span`,{children:`Stored locally in your browser. Sent directly via request headers.`})]}),(0,k.jsxs)(`div`,{className:`flex gap-2 pt-1`,children:[(0,k.jsxs)(`button`,{onClick:oe,className:`flex-1 flex items-center justify-center gap-1.5 py-2 border-[2px] border-ink-black bg-[#ffe24c] hover:bg-yellow-300 text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:[(0,k.jsx)(o,{className:`w-3.5 h-3.5`}),`Save Key`]}),i&&(0,k.jsx)(`button`,{onClick:$,className:`px-3 py-2 border-[2px] border-slate-300 bg-white hover:bg-slate-50 text-xs font-bold text-slate-700 hover:text-rose-600 shadow-[2px_2px_0px_0px_rgba(0,0,0,0.05)] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:`Clear Key`})]})]}),N&&(0,k.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${N.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:N.type===`error`?`bg-rose-100 border-rose-600 text-rose-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[N.type===`success`?(0,k.jsx)(p,{className:`w-3.5 h-3.5 shrink-0`}):N.type===`error`?(0,k.jsx)(c,{className:`w-3.5 h-3.5 shrink-0`}):(0,k.jsx)(s,{className:`w-3.5 h-3.5 shrink-0`}),N.text]}),e!=="default"&&(0,k.jsx)(`div`,{className:`pt-2 border-t border-slate-200 flex justify-end`,children:(0,k.jsxs)(`button`,{onClick:se,className:`flex items-center gap-1.5 py-1.5 px-3 border border-slate-300 bg-slate-50 hover:bg-slate-100 text-[11px] font-bold text-slate-600 hover:text-ink-black transition-all cursor-pointer rounded`,children:[(0,k.jsx)(t,{className:`w-3 h-3 text-slate-500`}),`Reset to Server Default`]})})]}),(0,k.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,k.jsx)(`div`,{className:`w-8 h-8 rounded bg-[#24292e] border-[2px] border-ink-black flex items-center justify-center text-white shadow-[1px_1px_0px_0px_#1E293B]`,children:(0,k.jsx)(f,{className:`w-4 h-4 text-white`})}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h4`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black m-0 flex items-center gap-2`,children:`GitHub Solutions Sync & Auto-Commit`}),(0,k.jsx)(`p`,{className:`text-[10px] text-trash-gray font-medium m-0`,children:`Sync solutions to personal GitHub repository and commit automatically on submission`})]})]}),(0,k.jsx)(`span`,{className:`px-2 py-0.5 text-[9px] font-bold font-arcade uppercase border-2 border-ink-black shrink-0 ${Y?`bg-emerald-300 text-emerald-950`:`bg-slate-200 text-slate-800`}`,children:Y?`CONNECTED`:`DISCONNECTED`})]}),Y?(0,k.jsxs)(`div`,{className:`space-y-3`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-2 p-3 bg-slate-50 border border-slate-200 rounded`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[U?.avatar_url&&(0,k.jsx)(`img`,{src:U.avatar_url,alt:U.login,className:`w-7 h-7 rounded-full border border-ink-black`}),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`span`,{className:`text-xs font-bold text-ink-black`,children:[`@`,U?.login||V.username]}),(0,k.jsxs)(`span`,{className:`text-[11px] text-slate-600 font-mono block`,children:[V.username,`/`,V.repoName,` (`,V.branch,`)`]})]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsxs)(`a`,{href:`https://github.com/${V.username}/${V.repoName}`,target:`_blank`,rel:`noopener noreferrer`,className:`px-2.5 py-1 text-[11px] font-bold bg-white hover:bg-slate-100 text-ink-black border border-slate-300 rounded no-underline flex items-center gap-1 cursor-pointer`,children:[(0,k.jsx)(m,{className:`w-3 h-3`}),(0,k.jsx)(`span`,{children:`View Repo`})]}),(0,k.jsx)(`button`,{type:`button`,onClick:fe,className:`px-2.5 py-1 text-[11px] font-bold bg-white hover:bg-rose-50 text-rose-700 border border-rose-300 rounded cursor-pointer`,children:`Disconnect`})]})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-emerald-50/50 border border-emerald-300 rounded cursor-pointer`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:V.autoCommit,onChange:e=>pe(e.target.checked),className:`w-4 h-4 accent-emerald-600 cursor-pointer`}),(0,k.jsxs)(`div`,{className:`text-xs`,children:[(0,k.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`Auto-commit on every submission`}),(0,k.jsxs)(`span`,{className:`text-[10px] text-trash-gray`,children:[`Automatically pushes your code to `,V.repoName,` whenever you grade a review card.`]})]})]})]}):(0,k.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 p-3.5 bg-slate-50 border border-slate-200 rounded`,children:[(0,k.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,k.jsx)(`span`,{className:`text-xs font-bold text-ink-black block`,children:`Connect your GitHub Account (1-Click OAuth)`}),(0,k.jsx)(`p`,{className:`text-[11px] text-trash-gray m-0`,children:`Grant repository access to automatically sync your DSA problem solutions as you study.`})]}),(0,k.jsx)(`button`,{type:`button`,onClick:de,disabled:G,className:`px-4 py-2 bg-[#24292e] hover:bg-black text-white text-xs font-bold uppercase rounded border-2 border-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none flex items-center gap-2 shrink-0 cursor-pointer disabled:opacity-50`,children:G?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ee,{className:`w-3.5 h-3.5 animate-spin`}),(0,k.jsx)(`span`,{children:`CONNECTING...`})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(f,{className:`w-3.5 h-3.5 text-yellow-300`}),(0,k.jsx)(`span`,{children:`CONNECT GITHUB`})]})})]}),q&&(0,k.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${q.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:q.type===`error`?`bg-rose-100 border-rose-600 text-rose-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[q.type===`success`?(0,k.jsx)(p,{className:`w-3.5 h-3.5 shrink-0`}):q.type===`error`?(0,k.jsx)(c,{className:`w-3.5 h-3.5 shrink-0`}):(0,k.jsx)(s,{className:`w-3.5 h-3.5 shrink-0`}),q.text]})]}),(0,k.jsxs)(`div`,{className:`bg-[#FFFDF0] border-[3px] border-ink-black p-4 sm:p-5 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`div`,{className:`w-7 h-7 rounded bg-[#FFE24C] border-[2px] border-ink-black flex items-center justify-center shadow-[1px_1px_0px_0px_#1E293B]`,children:(0,k.jsx)(_,{className:`w-4 h-4 text-ink-black`})}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`h4`,{className:`font-headline-md font-bold text-xs uppercase text-ink-black m-0`,children:`Princess AI Companion & RPG Settings`}),(0,k.jsx)(`p`,{className:`text-[10px] text-trash-gray font-medium m-0`,children:`Trapped Princess Persona, Study Break Timer & 8-bit RPG Audio`})]})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,k.jsx)(`span`,{className:`text-[11px] font-bold text-ink-black font-headline-md uppercase`,children:F.enabled?`Enabled`:`Disabled`}),(0,k.jsx)(`input`,{type:`checkbox`,checked:F.enabled,onChange:e=>I(t=>({...t,enabled:e.target.checked})),className:`w-4 h-4 accent-amber-500 cursor-pointer`})]})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md`,children:`Companion Name`}),(0,k.jsx)(`input`,{type:`text`,value:F.name,onChange:e=>I(t=>({...t,name:e.target.value})),placeholder:`e.g. Princess Aurelia`,className:`bg-white border-[2px] border-ink-black rounded py-2 px-3 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600`})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsxs)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md flex items-center gap-1`,children:[(0,k.jsx)(d,{className:`w-3.5 h-3.5 text-amber-700`}),`Study Break Reminder`]}),(0,k.jsxs)(`select`,{value:F.breakIntervalMinutes,onChange:e=>I(t=>({...t,breakIntervalMinutes:Number(e.target.value)})),className:`bg-white border-[2px] border-ink-black rounded py-2 px-3 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600 cursor-pointer`,children:[(0,k.jsx)(`option`,{value:25,children:`Every 25 Minutes (Classic Pomodoro)`}),(0,k.jsx)(`option`,{value:45,children:`Every 45 Minutes`}),(0,k.jsx)(`option`,{value:60,children:`Every 60 Minutes`}),(0,k.jsx)(`option`,{value:0,children:`Disabled (No automatic break popups)`})]})]})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`label`,{className:`block text-xs font-bold text-ink-black uppercase tracking-wider font-headline-md`,children:`Princess Backstory & Persona Prompt`}),(0,k.jsx)(`textarea`,{rows:2,value:F.backstory,onChange:e=>I(t=>({...t,backstory:e.target.value})),placeholder:`Describe her background, tone, and connection to your DSA studies...`,className:`bg-white border-[2px] border-ink-black rounded p-2.5 text-ink-black text-xs font-sans font-medium focus:outline-none focus:border-amber-600 resize-y`})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1`,children:[(0,k.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-white border border-slate-300 rounded cursor-pointer hover:border-ink-black transition-all`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:F.soundEnabled,onChange:e=>{let t=e.target.checked;I(e=>({...e,soundEnabled:t})),v(!t)},className:`w-4 h-4 accent-amber-500 cursor-pointer`}),(0,k.jsxs)(`div`,{className:`text-xs`,children:[(0,k.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`8-bit Sound Effects`}),(0,k.jsx)(`span`,{className:`text-[10px] text-trash-gray`,children:`Audio chimes & fanfare`})]})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2.5 p-2.5 bg-white border border-slate-300 rounded cursor-pointer hover:border-ink-black transition-all`,children:[(0,k.jsx)(`input`,{type:`checkbox`,checked:F.autoPopupEnabled,onChange:e=>I(t=>({...t,autoPopupEnabled:e.target.checked})),className:`w-4 h-4 accent-amber-500 cursor-pointer`}),(0,k.jsxs)(`div`,{className:`text-xs`,children:[(0,k.jsx)(`span`,{className:`font-bold text-ink-black block`,children:`Spontaneous RPG Popups`}),(0,k.jsx)(`span`,{className:`text-[10px] text-trash-gray`,children:`Speech bubbles for breaks & milestones`})]})]})]}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-slate-200`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsxs)(`button`,{type:`button`,onClick:ce,className:`flex items-center gap-1.5 py-2 px-4 border-[2px] border-ink-black bg-[#ffe24c] hover:bg-yellow-300 text-xs font-bold text-ink-black shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer rounded uppercase`,children:[(0,k.jsx)(o,{className:`w-3.5 h-3.5`}),`Save Companion Settings`]}),(0,k.jsx)(`button`,{type:`button`,onClick:le,className:`py-2 px-3 border border-slate-300 bg-white hover:bg-slate-50 text-xs font-bold text-slate-700 transition-all cursor-pointer rounded`,children:`Default Persona`})]}),(0,k.jsxs)(`button`,{type:`button`,onClick:ue,className:`flex items-center gap-1 py-1.5 px-3 border border-rose-300 bg-rose-50 hover:bg-rose-100 text-rose-700 text-[11px] font-bold transition-all cursor-pointer rounded`,children:[(0,k.jsx)(t,{className:`w-3 h-3 text-rose-500`}),(0,k.jsxs)(`span`,{children:[`Reset Journey (`,z,`/150 LC)`]})]})]}),L&&(0,k.jsxs)(`div`,{className:`p-2.5 border-[2px] border-ink-black text-xs font-medium rounded flex items-center gap-2 ${L.type===`success`?`bg-emerald-100 border-emerald-600 text-emerald-900`:`bg-sky-100 border-sky-600 text-sky-900`}`,children:[(0,k.jsx)(p,{className:`w-3.5 h-3.5 shrink-0`}),L.text]})]}),(0,k.jsxs)(`div`,{className:`bg-white border-[3px] border-ink-black p-4 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)] flex flex-col gap-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,k.jsx)(s,{className:`w-3.5 h-3.5 text-[#0ea5e9]`}),(0,k.jsx)(`h4`,{className:`text-xs font-bold uppercase font-headline-md m-0`,children:`Get Free API Keys`})]}),(0,k.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-2 text-[10px]`,children:[(0,k.jsxs)(`a`,{href:`https://console.groq.com/keys`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,k.jsx)(`span`,{children:`Groq Cloud`}),(0,k.jsx)(m,{className:`w-3 h-3 text-slate-400`})]}),(0,k.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Fast inference with generous free rate limits.`})]}),(0,k.jsxs)(`a`,{href:`https://aistudio.google.com/app/apikey`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,k.jsx)(`span`,{children:`Google AI Studio`}),(0,k.jsx)(m,{className:`w-3 h-3 text-slate-400`})]}),(0,k.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Free Gemini Flash API quota.`})]}),(0,k.jsxs)(`a`,{href:`https://openrouter.ai/keys`,target:`_blank`,rel:`noopener noreferrer`,className:`p-2.5 border border-slate-200 hover:border-ink-black hover:bg-slate-50 rounded flex flex-col justify-between gap-1 transition-all no-underline text-inherit cursor-pointer`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between font-bold text-ink-black`,children:[(0,k.jsx)(`span`,{children:`OpenRouter`}),(0,k.jsx)(m,{className:`w-3 h-3 text-slate-400`})]}),(0,k.jsx)(`p`,{className:`m-0 text-trash-gray leading-normal`,children:`Unified API for open-weights models.`})]})]})]})]})}export{j as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/TerminalEmulator-C2zR6yON.js b/algospaced-ui/dist/assets/TerminalEmulator-C2zR6yON.js deleted file mode 100644 index ec4911beb3663196feb54ecad792b09f960884ee..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/TerminalEmulator-C2zR6yON.js +++ /dev/null @@ -1 +0,0 @@ -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Rt as n}from"./vendor-react-CIO8MTK1.js";import{s as r}from"./firebaseClient-DZobvwSx.js";import{n as i}from"./index-DnK6BACV.js";var a=e(t(),1),o=n();function s(e,t){if(e.length===0||t.length===0)return[`Empty result set.`];let n={};e.forEach(e=>{n[e]=e.length}),t.forEach(t=>{e.forEach(e=>{let r=t[e]!==null&&t[e]!==void 0?String(t[e]):`NULL`;r.length>(n[e]||0)&&(n[e]=r.length)})});let r=`+`+e.map(e=>`-`.repeat(n[e]+2)).join(`+`)+`+`,i=[r,`|`+e.map(e=>` ${e.padEnd(n[e])} `).join(`|`)+`|`,r];return t.forEach(t=>{let r=`|`+e.map(e=>` ${(t[e]!==null&&t[e]!==void 0?String(t[e]):`NULL`).padEnd(n[e])} `).join(`|`)+`|`;i.push(r)}),i.push(r),i}function c({onOpenWindow:e,onClose:t}){let[n,c]=(0,a.useState)([`AlgoSpaced OS [Version 1.0.24-beta]`,`(c) Retro Arcade Systems. All rights reserved.`,``,`Type "help" for a list of available commands.`,``]),[l,u]=(0,a.useState)(``),d=(0,a.useRef)(null);(0,a.useEffect)(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[n]);let f=e=>{let t=e.trim(),n=/[^\s"']+|"([^"]*)"|'([^']*)'/g,r=[],i;for(;(i=n.exec(t))!==null;)r.push(i[1]||i[2]||i[0]);return{command:r[0]?.toLowerCase()||``,args:r.slice(1)}},p=async n=>{let a=n.trim();if(a===``){c(e=>[...e,`$`]);return}let{command:o,args:l}=f(a),u=[`$ ${a}`];switch(o){case`help`:u.push(`Available commands:`,` help - Display this documentation`,` ps - Inspect OS process table (PIDs & task states)`,` streak - Retrieve your active Leitner combo streak metrics`,` sync - Run google drive file import sync`,` reviews - Fetch Leetcode numbers due for daily review`,` python play - Open Daily Python Challenge window`,` sql play - Open Interactive SQL Playground window`,` db init - Initialize SQL session and open playground window`,` db status - Check active SQL session objectives`,` db query [Q] - Execute query and format results inside CLI`,` open - Open window (usage: open queue | journey | system | python | db)`,` clear - Clear terminal buffer`,` exit - Close the terminal shell`);break;case`ps`:case`top`:{let e=Object.values(i.getState().processes);if(e.length===0)u.push(`No background processes currently in table.`);else{u.push(`AlgoSpaced OS Process Table:`);let t=s([`PID`,`APP`,`STATUS`,`NAME`],e.map(e=>({PID:e.pid.substring(0,16),APP:e.appId,STATUS:e.status.toUpperCase(),NAME:e.title.substring(0,24)})));u.push(...t)}break}case`clear`:c([]);return;case`exit`:u.push(`Closing terminal session...`),setTimeout(()=>{t()},500);break;case`open`:{let t=l[0]?.toLowerCase();t===`queue`||t===`daily`||t===`reviews`?(e(`queue`),u.push(`Launching Daily Queue window...`)):t===`journey`||t===`path`||t===`map`?(e(`journey`),u.push(`Launching Journey Path window...`)):t===`system`||t===`computer`||t===`sys`?(e(`computer`),u.push(`Launching System Information window...`)):t===`python`||t===`challenge`?(e(`python`),u.push(`Launching Daily Python Challenge window...`)):t===`db`||t===`mysql`||t===`sql`?(e(`mysql`),u.push(`Launching MySQL Playground window...`)):u.push(`Usage: open [queue | journey | system | python | db]`);break}case`streak`:u.push(`Connecting to streak.sys database...`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/streak`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();u.push(`Database Response:`,` Active Streak: ${e.current_streak} days`,` Max Combo: ${e.longest_streak} days`,` Last Activity: ${e.last_active_date?new Date(e.last_active_date).toLocaleDateString():`N/A`}`)}else u.push(`Error: Failed to query database endpoint`)}catch{u.push(`Error: Connection timed out`)}break;case`sync`:u.push(`Initializing Google Drive synchronization sync.exe...`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/sync`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();u.push(`Sync Result: ${e.message}`)}else u.push(`Error: Sync command failed at backend host`)}catch{u.push(`Error: Cloud host unreachable`)}break;case`reviews`:u.push(`Querying leitner_cards partition...`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/reviews/due`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();e.length===0?u.push(`Queue status: CLEAR! 0 cards due.`):u.push(`Queue status: ${e.length} card(s) due:`,...e.map(e=>` - LeetCode ${e.problems?.problem_number??`?`}: ${e.problems?.name??`Unknown`} (Box ${e.box_level??1})`))}else u.push(`Error: Failed to fetch due items`)}catch{u.push(`Error: Database connection lost`)}break;case`python`:l[0]?.toLowerCase()===`play`?(u.push(`Launching Daily Python Challenge window...`),e(`python`)):u.push(`Usage: python play`);break;case`sql`:case`mysql`:case`db`:{let t=l[0]?.toLowerCase();if(t===`play`)u.push(`Launching MySQL Playground window...`),e(`mysql`);else if(t===`init`){u.push(`Initializing MySQL Playground and launching window...`),e(`mysql`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/init?refresh=true`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();u.push(`Database Session Created: "${e.title}"`,`Objective: ${e.objective}`)}else u.push(`Error: Failed to initialize DB session on backend host.`)}catch{u.push(`Error: Server connection lost.`)}}else if(t===`status`){u.push(`Fetching SQL playground status...`),e(`mysql`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/status`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();e.active?u.push(`Active SQL Challenge: "${e.title}"`,`Objective: ${e.objective}`,`Status: ${e.completed?`COMPLETED (Done)`:`IN PROGRESS`}`):u.push(e.message)}else u.push(`Error: Failed to fetch DB status.`)}catch{u.push(`Error: Server timed out.`)}}else if(t===`query`){let t=a.toLowerCase().indexOf(`query`),n=t===-1?``:a.substring(t+5).trim().replace(/^["']|["']$/g,``);if(!n){u.push(`Usage: db query [SQL Statement] - Remember to wrap query in double quotes.`);break}u.push(`Running query: ${n}`),e(`mysql`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/query`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({query:n})});if(t.ok){let e=await t.json();e.success?(u.push(`Query OK. Affected ${e.rows_affected} rows.`,...s(e.columns,e.rows)),e.is_correct&&u.push(`OBJECTIVE ACHIEVED! Congratulations.`)):u.push(`SQL Error: ${e.error}`)}else u.push(`Error: SQL execution failed.`)}catch{u.push(`Error: Database server unreachable.`)}}else u.push(`Usage: sql play | db init | db status | db query "SELECT..."`);break}default:u.push(`Command not recognized: "${o}". Type "help" for a list of available actions.`)}c(e=>[...e,...u,``])};return(0,o.jsxs)(`div`,{className:`w-full h-full bg-[#1E293B] text-[#4ADE80] font-code-mono p-4 flex flex-col overflow-hidden text-xs md:text-sm select-text`,children:[(0,o.jsx)(`div`,{ref:d,className:`flex-1 overflow-y-auto mb-2 custom-scrollbar space-y-1`,children:n.map((e,t)=>(0,o.jsx)(`div`,{className:`whitespace-pre-wrap leading-relaxed min-h-[1.2em]`,children:e},t))}),(0,o.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),p(l),u(``)},className:`flex items-center gap-1.5 border-t border-slate-700 pt-2 shrink-0 select-none`,children:[(0,o.jsx)(`span`,{className:`font-bold text-[#ffcc00]`,children:`$`}),(0,o.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),className:`flex-1 bg-transparent text-[#4ADE80] outline-none border-none p-0 focus:ring-0 font-code-mono text-xs md:text-sm`,autoFocus:!0,placeholder:`Type command...`})]})]})}export{c as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/TerminalEmulator-CZed0tiA.js b/algospaced-ui/dist/assets/TerminalEmulator-CZed0tiA.js new file mode 100644 index 0000000000000000000000000000000000000000..fa6958ae3b9ca6435d1cbc8a135beab09af839f2 --- /dev/null +++ b/algospaced-ui/dist/assets/TerminalEmulator-CZed0tiA.js @@ -0,0 +1 @@ +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Bt as t,Ht as n}from"./vendor-react-hnaVBnLv.js";import{s as r}from"./firebaseClient-DZobvwSx.js";import{n as i}from"./index-DVWZ15xt.js";var a=e(n(),1),o=t();function s(e,t){if(e.length===0||t.length===0)return[`Empty result set.`];let n={};e.forEach(e=>{n[e]=e.length}),t.forEach(t=>{e.forEach(e=>{let r=t[e]!==null&&t[e]!==void 0?String(t[e]):`NULL`;r.length>(n[e]||0)&&(n[e]=r.length)})});let r=`+`+e.map(e=>`-`.repeat(n[e]+2)).join(`+`)+`+`,i=[r,`|`+e.map(e=>` ${e.padEnd(n[e])} `).join(`|`)+`|`,r];return t.forEach(t=>{let r=`|`+e.map(e=>` ${(t[e]!==null&&t[e]!==void 0?String(t[e]):`NULL`).padEnd(n[e])} `).join(`|`)+`|`;i.push(r)}),i.push(r),i}function c({onOpenWindow:e,onClose:t}){let[n,c]=(0,a.useState)([`AlgoSpaced OS [Version 1.0.24-beta]`,`(c) Retro Arcade Systems. All rights reserved.`,``,`Type "help" for a list of available commands.`,``]),[l,u]=(0,a.useState)(``),d=(0,a.useRef)(null);(0,a.useEffect)(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[n]);let f=e=>{let t=e.trim(),n=/[^\s"']+|"([^"]*)"|'([^']*)'/g,r=[],i;for(;(i=n.exec(t))!==null;)r.push(i[1]||i[2]||i[0]);return{command:r[0]?.toLowerCase()||``,args:r.slice(1)}},p=async n=>{let a=n.trim();if(a===``){c(e=>[...e,`$`]);return}let{command:o,args:l}=f(a),u=[`$ ${a}`];switch(o){case`help`:u.push(`Available commands:`,` help - Display this documentation`,` ps - Inspect OS process table (PIDs & task states)`,` streak - Retrieve your active review streak metrics`,` sync - Run google drive file import sync`,` reviews - Fetch Leetcode numbers due for daily review`,` python play - Open Daily Python Challenge window`,` sql play - Open Interactive SQL Playground window`,` db init - Initialize SQL session and open playground window`,` db status - Check active SQL session objectives`,` db query [Q] - Execute query and format results inside CLI`,` open - Open window (usage: open queue | journey | system | python | db)`,` clear - Clear terminal buffer`,` exit - Close the terminal shell`);break;case`ps`:case`top`:{let e=Object.values(i.getState().processes);if(e.length===0)u.push(`No background processes currently in table.`);else{u.push(`AlgoSpaced OS Process Table:`);let t=s([`PID`,`APP`,`STATUS`,`NAME`],e.map(e=>({PID:e.pid.substring(0,16),APP:e.appId,STATUS:e.status.toUpperCase(),NAME:e.title.substring(0,24)})));u.push(...t)}break}case`clear`:c([]);return;case`exit`:u.push(`Closing terminal session...`),setTimeout(()=>{t()},500);break;case`open`:{let t=l[0]?.toLowerCase();t===`queue`||t===`daily`||t===`reviews`?(e(`queue`),u.push(`Launching Daily Queue window...`)):t===`journey`||t===`path`||t===`map`?(e(`journey`),u.push(`Launching Journey Path window...`)):t===`system`||t===`computer`||t===`sys`?(e(`computer`),u.push(`Launching System Information window...`)):t===`python`||t===`challenge`?(e(`python`),u.push(`Launching Daily Python Challenge window...`)):t===`db`||t===`mysql`||t===`sql`?(e(`mysql`),u.push(`Launching MySQL Playground window...`)):u.push(`Usage: open [queue | journey | system | python | db]`);break}case`streak`:u.push(`Connecting to streak.sys database...`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/streak`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();u.push(`Database Response:`,` Active Streak: ${e.current_streak} days`,` Max Combo: ${e.longest_streak} days`,` Last Activity: ${e.last_active_date?new Date(e.last_active_date).toLocaleDateString():`N/A`}`)}else u.push(`Error: Failed to query database endpoint`)}catch{u.push(`Error: Connection timed out`)}break;case`sync`:u.push(`Initializing Google Drive synchronization sync.exe...`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/sync`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();u.push(`Sync Result: ${e.message}`)}else u.push(`Error: Sync command failed at backend host`)}catch{u.push(`Error: Cloud host unreachable`)}break;case`reviews`:u.push(`Querying fsrs_cards partition...`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/reviews/due`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();if(e.length===0)u.push(`Queue status: CLEAR! 0 cards due.`);else{let t={0:`New`,1:`Learning`,2:`Review`,3:`Relearning`};u.push(`Queue status: ${e.length} card(s) due:`,...e.map(e=>` - LeetCode ${e.problems?.problem_number??`?`}: ${e.problems?.name??`Unknown`} (${t[e.fsrs_state??0]??`New`})`))}}else u.push(`Error: Failed to fetch due items`)}catch{u.push(`Error: Database connection lost`)}break;case`python`:l[0]?.toLowerCase()===`play`?(u.push(`Launching Daily Python Challenge window...`),e(`python`)):u.push(`Usage: python play`);break;case`sql`:case`mysql`:case`db`:{let t=l[0]?.toLowerCase();if(t===`play`)u.push(`Launching MySQL Playground window...`),e(`mysql`);else if(t===`init`){u.push(`Initializing MySQL Playground and launching window...`),e(`mysql`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/init?refresh=true`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();u.push(`Database Session Created: "${e.title}"`,`Objective: ${e.objective}`)}else u.push(`Error: Failed to initialize DB session on backend host.`)}catch{u.push(`Error: Server connection lost.`)}}else if(t===`status`){u.push(`Fetching SQL playground status...`),e(`mysql`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/status`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();e.active?u.push(`Active SQL Challenge: "${e.title}"`,`Objective: ${e.objective}`,`Status: ${e.completed?`COMPLETED (Done)`:`IN PROGRESS`}`):u.push(e.message)}else u.push(`Error: Failed to fetch DB status.`)}catch{u.push(`Error: Server timed out.`)}}else if(t===`query`){let t=a.toLowerCase().indexOf(`query`),n=t===-1?``:a.substring(t+5).trim().replace(/^["']|["']$/g,``);if(!n){u.push(`Usage: db query [SQL Statement] - Remember to wrap query in double quotes.`);break}u.push(`Running query: ${n}`),e(`mysql`);try{let{data:{session:e}}=await r.auth.getSession();if(!e){u.push(`Error: Unauthenticated session`);break}let t=await fetch(`/api/challenges/mysql/query`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e.access_token}`},body:JSON.stringify({query:n})});if(t.ok){let e=await t.json();e.success?(u.push(`Query OK. Affected ${e.rows_affected} rows.`,...s(e.columns,e.rows)),e.is_correct&&u.push(`OBJECTIVE ACHIEVED! Congratulations.`)):u.push(`SQL Error: ${e.error}`)}else u.push(`Error: SQL execution failed.`)}catch{u.push(`Error: Database server unreachable.`)}}else u.push(`Usage: sql play | db init | db status | db query "SELECT..."`);break}default:u.push(`Command not recognized: "${o}". Type "help" for a list of available actions.`)}c(e=>[...e,...u,``])};return(0,o.jsxs)(`div`,{className:`w-full h-full bg-[#1E293B] text-[#4ADE80] font-code-mono p-4 flex flex-col overflow-hidden text-xs md:text-sm select-text`,children:[(0,o.jsx)(`div`,{ref:d,className:`flex-1 overflow-y-auto mb-2 custom-scrollbar space-y-1`,children:n.map((e,t)=>(0,o.jsx)(`div`,{className:`whitespace-pre-wrap leading-relaxed min-h-[1.2em]`,children:e},t))}),(0,o.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),p(l),u(``)},className:`flex items-center gap-1.5 border-t border-slate-700 pt-2 shrink-0 select-none`,children:[(0,o.jsx)(`span`,{className:`font-bold text-[#ffcc00]`,children:`$`}),(0,o.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),className:`flex-1 bg-transparent text-[#4ADE80] outline-none border-none p-0 focus:ring-0 font-code-mono text-xs md:text-sm`,autoFocus:!0,placeholder:`Type command...`})]})]})}export{c as default}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/index-BsU9BpJx.css b/algospaced-ui/dist/assets/index-BsU9BpJx.css new file mode 100644 index 0000000000000000000000000000000000000000..f40b13228a33df97642ffa0b3485faf63173a24b --- /dev/null +++ b/algospaced-ui/dist/assets/index-BsU9BpJx.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Be Vietnam Pro", system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:"Courier Prime", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-700:oklch(52% .105 223.128);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-indigo-950:oklch(25.7% .09 281.288);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-purple-950:oklch(29.1% .149 302.717);--color-pink-400:oklch(71.8% .202 349.761);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-stone-950:oklch(14.7% .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--drop-shadow-sm:0 1px 2px #00000026;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-2xl:40px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-arcade:"Press Start 2P", monospace;--font-headline-md:"Bricolage Grotesque", sans-serif;--font-display-lg:"Bricolage Grotesque", sans-serif;--font-code-mono:"Courier Prime", monospace;--font-window-title:"Bricolage Grotesque", sans-serif;--font-icon-label:"Press Start 2P", monospace;--color-paper-white:#f9f8f3;--color-ink-black:#1e293b;--color-highlight-pink:#f472b6;--color-grass-green:#4ade80;--color-trash-gray:#64748b;--color-primary-purple:#9d4edd;--color-accent-cyan:#4cc9f0;--color-accent-pink:#f72585;--spacing-desktop-margin:32px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-10{inset:calc(var(--spacing) * -10)}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-2\.5{top:calc(var(--spacing) * -2.5)}.-top-7{top:calc(var(--spacing) * -7)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-4{top:calc(var(--spacing) * 4)}.top-9{top:calc(var(--spacing) * 9)}.top-16{top:calc(var(--spacing) * 16)}.top-desktop-margin{top:var(--spacing-desktop-margin)}.top-full{top:100%}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-3\.5{right:calc(var(--spacing) * 3.5)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.right-8{right:calc(var(--spacing) * 8)}.right-desktop-margin{right:var(--spacing-desktop-margin)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-2\.5{bottom:calc(var(--spacing) * 2.5)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-14{bottom:calc(var(--spacing) * 14)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-\[40px\]{bottom:40px}.-left-\[7px\]{left:-7px}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[10\]{z-index:10}.z-\[50\]{z-index:50}.z-\[90\]{z-index:90}.z-\[100\]{z-index:100}.z-\[120\]{z-index:120}.z-\[999\]{z-index:999}.z-\[9990\]{z-index:9990}.z-\[99999\]{z-index:99999}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-6{grid-column:span 6/span 6}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.container\!{width:100%!important}@media (width>=40rem){.container\!{max-width:40rem!important}}@media (width>=48rem){.container\!{max-width:48rem!important}}@media (width>=64rem){.container\!{max-width:64rem!important}}@media (width>=80rem){.container\!{max-width:80rem!important}}@media (width>=96rem){.container\!{max-width:96rem!important}}.m-0{margin:0}.m-2{margin:calc(var(--spacing) * 2)}.-mx-0{margin-inline:0}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-8{margin-block:calc(var(--spacing) * 8)}.my-auto{margin-block:auto}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.-mr-6{margin-right:calc(var(--spacing) * -6)}.mr-1{margin-right:var(--spacing)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.-mb-\[2px\]{margin-bottom:-2px}.mb-0{margin-bottom:0}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1{width:var(--spacing);height:var(--spacing)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-44{height:calc(var(--spacing) * 44)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-84{height:calc(var(--spacing) * 84)}.h-120{height:calc(var(--spacing) * 120)}.h-\[2px\]{height:2px}.h-\[28vh\]{height:28vh}.h-\[80\%\]{height:80%}.h-\[85\%\]{height:85%}.h-\[90\%\]{height:90%}.h-\[calc\(100vh-56px\)\]{height:calc(100vh - 56px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-16{max-height:calc(var(--spacing) * 16)}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[100dvh\]{max-height:100dvh}.max-h-\[140px\]{max-height:140px}.max-h-\[180px\]{max-height:180px}.max-h-\[220px\]{max-height:220px}.max-h-\[520px\]{max-height:520px}.max-h-\[560px\]{max-height:560px}.max-h-\[calc\(100vh-180px\)\]{max-height:calc(100vh - 180px)}.max-h-none{max-height:none}.min-h-0{min-height:0}.min-h-\[1\.2em\]{min-height:1.2em}.min-h-\[48px\]{min-height:48px}.min-h-\[60px\]{min-height:60px}.min-h-\[64px\]{min-height:64px}.min-h-\[85px\]{min-height:85px}.min-h-\[88px\]{min-height:88px}.min-h-\[90px\]{min-height:90px}.min-h-\[120px\]{min-height:120px}.min-h-\[160px\]{min-height:160px}.min-h-\[220px\]{min-height:220px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-48{width:calc(var(--spacing) * 48)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[2px\]{width:2px}.w-\[75\%\]{width:75%}.w-\[80\%\]{width:80%}.w-\[90\%\]{width:90%}.w-\[96px\]{width:96px}.w-\[calc\(100\%-1\.25rem\)\]{width:calc(100% - 1.25rem)}.w-\[calc\(100vw-24px\)\]{width:calc(100vw - 24px)}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[90\%\]{max-width:90%}.max-w-\[98vw\]{max-width:98vw}.max-w-\[110px\]{max-width:110px}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[170px\]{max-width:170px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[400px\]{max-width:400px}.max-w-\[480px\]{max-width:480px}.max-w-\[calc\(100vw-32px\)\]{max-width:calc(100vw - 32px)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-\[54px\]{min-width:54px}.min-w-\[200px\]{min-width:200px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[2\]{flex:2}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[2px\]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[1\.02\]{scale:1.02}.rotate-6{rotate:6deg}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.rotate-\[-2deg\]{rotate:-2deg}.rotate-\[-3deg\]{rotate:-3deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-se-resize{cursor:se-resize}.cursor-wait{cursor:wait}.touch-none{touch-action:none}.resize{resize:both}.resize\!{resize:both!important}.resize-none{resize:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-slate-200>:not(:last-child)){border-color:var(--color-slate-200)}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2\.5px\]{border-style:var(--tw-border-style);border-width:2.5px}.border-\[2px\]{border-style:var(--tw-border-style);border-width:2px}.border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-x-2{border-inline-style:var(--tw-border-style);border-inline-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-\[3px\]{border-top-style:var(--tw-border-style);border-top-width:3px}.border-t-\[4px\]{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-r-\[3px\]{border-right-style:var(--tw-border-style);border-right-width:3px}.border-r-\[4px\]{border-right-style:var(--tw-border-style);border-right-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2,.border-b-\[2px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-\[3px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:3px}.border-b-\[4px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-l-\[2px\]{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-\[4px\]{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\[\#0ea5e9\]{border-color:#0ea5e9}.border-\[\#3b5d7d\]{border-color:#3b5d7d}.border-\[\#3e6080\]{border-color:#3e6080}.border-\[\#3e6080\]\/60{border-color:oklab(47.7013% -.0246015 -.0605497/.6)}.border-\[\#3e6080\]\/70{border-color:oklab(47.7013% -.0246015 -.0605497/.7)}.border-\[\#3e6080\]\/80{border-color:oklab(47.7013% -.0246015 -.0605497/.8)}.border-\[\#4a392b\]{border-color:#4a392b}.border-\[\#5a8bb9\]{border-color:#5a8bb9}.border-\[\#5a80a2\]{border-color:#5a80a2}.border-\[\#5a4836\]{border-color:#5a4836}.border-\[\#5c8cb5\]{border-color:#5c8cb5}.border-\[\#304f6f\]{border-color:#304f6f}.border-\[\#4883b6\]\/80{border-color:oklab(59.2223% -.0397433 -.0917221/.8)}.border-\[\#44729b\]{border-color:#44729b}.border-\[\#594634\]{border-color:#594634}.border-\[\#c8b28f\]{border-color:#c8b28f}.border-\[\#cbb38e\]{border-color:#cbb38e}.border-\[\#cfbc9c\]{border-color:#cfbc9c}.border-\[\#ea580c\]{border-color:#ea580c}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-200\/60{border-color:#fee68599}@supports (color:color-mix(in lab, red, red)){.border-amber-200\/60{border-color:color-mix(in oklab, var(--color-amber-200) 60%, transparent)}}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/40{border-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/50{border-color:color-mix(in oklab, var(--color-amber-500) 50%, transparent)}}.border-amber-500\/70{border-color:#f99c00b3}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/70{border-color:color-mix(in oklab, var(--color-amber-500) 70%, transparent)}}.border-amber-500\/80{border-color:#f99c00cc}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/80{border-color:color-mix(in oklab, var(--color-amber-500) 80%, transparent)}}.border-amber-600\/30{border-color:#dd74004d}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/30{border-color:color-mix(in oklab, var(--color-amber-600) 30%, transparent)}}.border-amber-600\/70{border-color:#dd7400b3}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/70{border-color:color-mix(in oklab, var(--color-amber-600) 70%, transparent)}}.border-amber-700{border-color:var(--color-amber-700)}.border-amber-700\/30{border-color:#b750004d}@supports (color:color-mix(in lab, red, red)){.border-amber-700\/30{border-color:color-mix(in oklab, var(--color-amber-700) 30%, transparent)}}.border-amber-800\/20{border-color:#953d0033}@supports (color:color-mix(in lab, red, red)){.border-amber-800\/20{border-color:color-mix(in oklab, var(--color-amber-800) 20%, transparent)}}.border-amber-900\/10{border-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/10{border-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.border-amber-900\/15{border-color:#7b330626}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/15{border-color:color-mix(in oklab, var(--color-amber-900) 15%, transparent)}}.border-amber-900\/20{border-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/20{border-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.border-amber-900\/30{border-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/30{border-color:color-mix(in oklab, var(--color-amber-900) 30%, transparent)}}.border-amber-900\/40{border-color:#7b330666}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/40{border-color:color-mix(in oklab, var(--color-amber-900) 40%, transparent)}}.border-amber-900\/50{border-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/50{border-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.border-black\/10{border-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.border-black\/10{border-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.border-black\/20{border-color:#0003}@supports (color:color-mix(in lab, red, red)){.border-black\/20{border-color:color-mix(in oklab, var(--color-black) 20%, transparent)}}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-400{border-color:var(--color-emerald-400)}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/40{border-color:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.border-emerald-600{border-color:var(--color-emerald-600)}.border-emerald-600\/30{border-color:#0097674d}@supports (color:color-mix(in lab, red, red)){.border-emerald-600\/30{border-color:color-mix(in oklab, var(--color-emerald-600) 30%, transparent)}}.border-emerald-700{border-color:var(--color-emerald-700)}.border-green-500{border-color:var(--color-green-500)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-ink-black{border-color:var(--color-ink-black)}.border-ink-black\/20{border-color:#1e293b33}@supports (color:color-mix(in lab, red, red)){.border-ink-black\/20{border-color:color-mix(in oklab, var(--color-ink-black) 20%, transparent)}}.border-orange-300{border-color:var(--color-orange-300)}.border-primary-purple\/30{border-color:#9d4edd4d}@supports (color:color-mix(in lab, red, red)){.border-primary-purple\/30{border-color:color-mix(in oklab, var(--color-primary-purple) 30%, transparent)}}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-purple-400{border-color:var(--color-purple-400)}.border-purple-800\/40{border-color:#6e11b066}@supports (color:color-mix(in lab, red, red)){.border-purple-800\/40{border-color:color-mix(in oklab, var(--color-purple-800) 40%, transparent)}}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-rose-200{border-color:var(--color-rose-200)}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-400{border-color:var(--color-rose-400)}.border-rose-500{border-color:var(--color-rose-500)}.border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.border-rose-500\/30{border-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.border-rose-500\/40{border-color:#ff235766}@supports (color:color-mix(in lab, red, red)){.border-rose-500\/40{border-color:color-mix(in oklab, var(--color-rose-500) 40%, transparent)}}.border-rose-600{border-color:var(--color-rose-600)}.border-rose-600\/30{border-color:#e700444d}@supports (color:color-mix(in lab, red, red)){.border-rose-600\/30{border-color:color-mix(in oklab, var(--color-rose-600) 30%, transparent)}}.border-rose-700{border-color:var(--color-rose-700)}.border-rose-700\/60{border-color:#c2003999}@supports (color:color-mix(in lab, red, red)){.border-rose-700\/60{border-color:color-mix(in oklab, var(--color-rose-700) 60%, transparent)}}.border-rose-950{border-color:var(--color-rose-950)}.border-sky-600{border-color:var(--color-sky-600)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-800{border-color:var(--color-slate-800)}.border-slate-900{border-color:var(--color-slate-900)}.border-slate-900\/60{border-color:#0f172b99}@supports (color:color-mix(in lab, red, red)){.border-slate-900\/60{border-color:color-mix(in oklab, var(--color-slate-900) 60%, transparent)}}.border-stone-300{border-color:var(--color-stone-300)}.border-stone-300\/40{border-color:#d6d3d166}@supports (color:color-mix(in lab, red, red)){.border-stone-300\/40{border-color:color-mix(in oklab, var(--color-stone-300) 40%, transparent)}}.border-stone-400{border-color:var(--color-stone-400)}.border-stone-400\/20{border-color:#a6a09b33}@supports (color:color-mix(in lab, red, red)){.border-stone-400\/20{border-color:color-mix(in oklab, var(--color-stone-400) 20%, transparent)}}.border-stone-700{border-color:var(--color-stone-700)}.border-stone-700\/70{border-color:#44403bb3}@supports (color:color-mix(in lab, red, red)){.border-stone-700\/70{border-color:color-mix(in oklab, var(--color-stone-700) 70%, transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-400{border-color:var(--color-yellow-400)}.border-b-\[\#FFFDF0\]{border-bottom-color:#fffdf0}.bg-\[\#0b0f19\]{background-color:#0b0f19}.bg-\[\#0c111d\]{background-color:#0c111d}.bg-\[\#0e1824\]\/90{background-color:oklab(20.5765% -.00799511 -.0270726/.9)}.bg-\[\#0ea5e9\]{background-color:#0ea5e9}.bg-\[\#0f172a\]{background-color:#0f172a}.bg-\[\#1E293B\]{background-color:#1e293b}.bg-\[\#1a1612\]\/90{background-color:oklab(20.3473% .00389921 .00928028/.9)}.bg-\[\#1c3e61\]\/80{background-color:oklab(35.6759% -.0235387 -.0690016/.8)}.bg-\[\#1c1610\]\/75{background-color:oklab(20.5412% .00589313 .0137692/.75)}.bg-\[\#1c1610\]\/85{background-color:oklab(20.5412% .00589313 .0137692/.85)}.bg-\[\#1c1813\]{background-color:#1c1813}.bg-\[\#1c1813\]\/95{background-color:oklab(21.1924% .00328737 .0109585/.95)}.bg-\[\#1e293b\]{background-color:#1e293b}.bg-\[\#1e1914\]\/60{background-color:oklab(21.7534% .00480779 .0113813/.6)}.bg-\[\#1f1a14\]\/90{background-color:oklab(22.1543% .00422043 .01306/.9)}.bg-\[\#2a2017\]\/90{background-color:oklab(25.2506% .00995521 .0199946/.9)}.bg-\[\#2c2217\]{background-color:#2c2217}.bg-\[\#2d251d\]{background-color:#2d251d}.bg-\[\#4ADE80\],.bg-\[\#4ade80\]{background-color:#4ade80}.bg-\[\#9d4edd\]{background-color:#9d4edd}.bg-\[\#10b981\]{background-color:#10b981}.bg-\[\#39ff14\]{background-color:#39ff14}.bg-\[\#60a5fa\]{background-color:#60a5fa}.bg-\[\#101b2a\]{background-color:#101b2a}.bg-\[\#101d2c\]\/80{background-color:oklab(22.6801% -.0102447 -.0331036/.8)}.bg-\[\#101e2e\]\/85{background-color:oklab(23.0943% -.0109736 -.0351464/.85)}.bg-\[\#101e2e\]\/90{background-color:oklab(23.0943% -.0109736 -.0351464/.9)}.bg-\[\#182c42\]{background-color:#182c42}.bg-\[\#231e18\]{background-color:#231e18}.bg-\[\#0284c7\]{background-color:#0284c7}.bg-\[\#0369a1\]{background-color:#0369a1}.bg-\[\#020617\]{background-color:#020617}.bg-\[\#24292e\]{background-color:#24292e}.bg-\[\#030712\]{background-color:#030712}.bg-\[\#34597b\]{background-color:#34597b}.bg-\[\#059669\]{background-color:#059669}.bg-\[\#102438\]{background-color:#102438}.bg-\[\#142335\]{background-color:#142335}.bg-\[\#214365\]{background-color:#214365}.bg-\[\#252019\]{background-color:#252019}.bg-\[\#FFE24C\]{background-color:#ffe24c}.bg-\[\#FFF9E6\]{background-color:#fff9e6}.bg-\[\#FFFDF0\]{background-color:#fffdf0}.bg-\[\#a7f3d0\]{background-color:#a7f3d0}.bg-\[\#d9d9d9\]{background-color:#d9d9d9}.bg-\[\#dbeafe\]{background-color:#dbeafe}.bg-\[\#dc2626\]{background-color:#dc2626}.bg-\[\#e8e4da\]{background-color:#e8e4da}.bg-\[\#ea580c\]{background-color:#ea580c}.bg-\[\#f0e6c8\]{background-color:#f0e6c8}.bg-\[\#f0fdf4\]{background-color:#f0fdf4}.bg-\[\#f3cb65\]{background-color:#f3cb65}.bg-\[\#f4ebd0\]{background-color:#f4ebd0}.bg-\[\#f4f1ea\]{background-color:#f4f1ea}.bg-\[\#f6edd2\]{background-color:#f6edd2}.bg-\[\#f7efe0\]{background-color:#f7efe0}.bg-\[\#f7efe0\]\/90{background-color:oklab(95.4339% .00254038 .0215065/.9)}.bg-\[\#f7efe0\]\/95{background-color:oklab(95.4339% .00254038 .0215065/.95)}.bg-\[\#f7f0cf\]{background-color:#f7f0cf}.bg-\[\#f7f5ed\]{background-color:#f7f5ed}.bg-\[\#f8efcd\]{background-color:#f8efcd}.bg-\[\#f8f5eb\]{background-color:#f8f5eb}.bg-\[\#f8fafc\]{background-color:#f8fafc}.bg-\[\#f9f2e3\]\/80{background-color:oklab(96.2559% .00149918 .0211427/.8)}.bg-\[\#f59e0b\]{background-color:#f59e0b}.bg-\[\#facc15\]{background-color:#facc15}.bg-\[\#faf6eb\]{background-color:#faf6eb}.bg-\[\#fafafa\]{background-color:#fafafa}.bg-\[\#fbf5e8\]\/98{background-color:oklab(97.1282% .00123182 .0182835/.98)}.bg-\[\#fcf7ee\]{background-color:#fcf7ee}.bg-\[\#fcf8ef\]\/95{background-color:oklab(97.9749% .000698805 .0126095/.95)}.bg-\[\#fdf8e1\]{background-color:#fdf8e1}.bg-\[\#fdfdfd\]{background-color:#fdfdfd}.bg-\[\#fefce8\]{background-color:#fefce8}.bg-\[\#ff9933\]{background-color:#f93}.bg-\[\#ffcc00\]{background-color:#fc0}.bg-\[\#ffe24c\]{background-color:#ffe24c}.bg-\[\#ffedd5\]{background-color:#ffedd5}.bg-\[\#fff1f2\]{background-color:#fff1f2}.bg-\[\#fffaf0\]{background-color:#fffaf0}.bg-\[\#fffdf0\]{background-color:#fffdf0}.bg-\[\#fffdf5\]{background-color:#fffdf5}.bg-\[\#fffdfa\]{background-color:#fffdfa}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\/40{background-color:#fffbeb66}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/40{background-color:color-mix(in oklab, var(--color-amber-50) 40%, transparent)}}.bg-amber-50\/70{background-color:#fffbebb3}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/70{background-color:color-mix(in oklab, var(--color-amber-50) 70%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\/70{background-color:#fef3c6b3}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\/70{background-color:color-mix(in oklab, var(--color-amber-100) 70%, transparent)}}.bg-amber-200{background-color:var(--color-amber-200)}.bg-amber-200\/60{background-color:#fee68599}@supports (color:color-mix(in lab, red, red)){.bg-amber-200\/60{background-color:color-mix(in oklab, var(--color-amber-200) 60%, transparent)}}.bg-amber-300{background-color:var(--color-amber-300)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-amber-600\/15{background-color:#dd740026}@supports (color:color-mix(in lab, red, red)){.bg-amber-600\/15{background-color:color-mix(in oklab, var(--color-amber-600) 15%, transparent)}}.bg-amber-600\/20{background-color:#dd740033}@supports (color:color-mix(in lab, red, red)){.bg-amber-600\/20{background-color:color-mix(in oklab, var(--color-amber-600) 20%, transparent)}}.bg-amber-700\/10{background-color:#b750001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-700\/10{background-color:color-mix(in oklab, var(--color-amber-700) 10%, transparent)}}.bg-amber-900\/5{background-color:#7b33060d}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/5{background-color:color-mix(in oklab, var(--color-amber-900) 5%, transparent)}}.bg-amber-900\/10{background-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/10{background-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.bg-amber-950\/5{background-color:#4619010d}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/5{background-color:color-mix(in oklab, var(--color-amber-950) 5%, transparent)}}.bg-amber-950\/10{background-color:#4619011a}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/10{background-color:color-mix(in oklab, var(--color-amber-950) 10%, transparent)}}.bg-amber-950\/90{background-color:#461901e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/90{background-color:color-mix(in oklab, var(--color-amber-950) 90%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\/5{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab, red, red)){.bg-black\/20{background-color:color-mix(in oklab, var(--color-black) 20%, transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab, red, red)){.bg-black\/70{background-color:color-mix(in oklab, var(--color-black) 70%, transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\/50{background-color:color-mix(in oklab, var(--color-emerald-50) 50%, transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-100\/70{background-color:#d0fae5b3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-100\/70{background-color:color-mix(in oklab, var(--color-emerald-100) 70%, transparent)}}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/20{background-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-600\/10{background-color:#0097671a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/10{background-color:color-mix(in oklab, var(--color-emerald-600) 10%, transparent)}}.bg-emerald-600\/15{background-color:#00976726}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/15{background-color:color-mix(in oklab, var(--color-emerald-600) 15%, transparent)}}.bg-emerald-950\/90{background-color:#002c22e6}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\/90{background-color:color-mix(in oklab, var(--color-emerald-950) 90%, transparent)}}.bg-grass-green{background-color:var(--color-grass-green)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-500{background-color:var(--color-green-500)}.bg-highlight-pink{background-color:var(--color-highlight-pink)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-50\/50{background-color:#eef2ff80}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\/50{background-color:color-mix(in oklab, var(--color-indigo-50) 50%, transparent)}}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-indigo-700{background-color:var(--color-indigo-700)}.bg-ink-black{background-color:var(--color-ink-black)}.bg-ink-black\/20{background-color:#1e293b33}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/20{background-color:color-mix(in oklab, var(--color-ink-black) 20%, transparent)}}.bg-ink-black\/40{background-color:#1e293b66}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/40{background-color:color-mix(in oklab, var(--color-ink-black) 40%, transparent)}}.bg-ink-black\/50{background-color:#1e293b80}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/50{background-color:color-mix(in oklab, var(--color-ink-black) 50%, transparent)}}.bg-ink-black\/80{background-color:#1e293bcc}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/80{background-color:color-mix(in oklab, var(--color-ink-black) 80%, transparent)}}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\/10{background-color:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.bg-paper-white{background-color:var(--color-paper-white)}.bg-primary-purple{background-color:var(--color-primary-purple)}.bg-primary-purple\/10{background-color:#9d4edd1a}@supports (color:color-mix(in lab, red, red)){.bg-primary-purple\/10{background-color:color-mix(in oklab, var(--color-primary-purple) 10%, transparent)}}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-purple-900{background-color:var(--color-purple-900)}.bg-purple-950\/30{background-color:#3c03664d}@supports (color:color-mix(in lab, red, red)){.bg-purple-950\/30{background-color:color-mix(in oklab, var(--color-purple-950) 30%, transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-200{background-color:var(--color-rose-200)}.bg-rose-300{background-color:var(--color-rose-300)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/5{background-color:#ff23570d}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/5{background-color:color-mix(in oklab, var(--color-rose-500) 5%, transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/10{background-color:color-mix(in oklab, var(--color-rose-500) 10%, transparent)}}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/15{background-color:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.bg-rose-600{background-color:var(--color-rose-600)}.bg-rose-600\/10{background-color:#e700441a}@supports (color:color-mix(in lab, red, red)){.bg-rose-600\/10{background-color:color-mix(in oklab, var(--color-rose-600) 10%, transparent)}}.bg-rose-950\/60{background-color:#4d021899}@supports (color:color-mix(in lab, red, red)){.bg-rose-950\/60{background-color:color-mix(in oklab, var(--color-rose-950) 60%, transparent)}}.bg-rose-950\/90{background-color:#4d0218e6}@supports (color:color-mix(in lab, red, red)){.bg-rose-950\/90{background-color:color-mix(in oklab, var(--color-rose-950) 90%, transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-400{background-color:var(--color-sky-400)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-600{background-color:var(--color-sky-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\/90{background-color:#e2e8f0e6}@supports (color:color-mix(in lab, red, red)){.bg-slate-200\/90{background-color:color-mix(in oklab, var(--color-slate-200) 90%, transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/90{background-color:#0f172be6}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/90{background-color:color-mix(in oklab, var(--color-slate-900) 90%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-stone-900{background-color:var(--color-stone-900)}.bg-stone-950{background-color:var(--color-stone-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-200{background-color:var(--color-yellow-200)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-radial{--tw-gradient-position:in oklab;background-image:radial-gradient(var(--tw-gradient-stops))}.bg-\[radial-gradient\(\#39ff14_1px\,transparent_1px\)\]{background-image:radial-gradient(#39ff14 1px,#0000 1px)}.bg-\[radial-gradient\(ellipse_at_center\,transparent_0\%\,rgba\(0\,0\,0\,0\.4\)_100\%\)\]{background-image:radial-gradient(#0000 0%,#0006 100%)}.from-\[\#F0F9FF\]{--tw-gradient-from:#f0f9ff;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#F0FDF4\]{--tw-gradient-from:#f0fdf4;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#F8FAFC\]{--tw-gradient-from:#f8fafc;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FAF5FF\]{--tw-gradient-from:#faf5ff;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFFBEB\]{--tw-gradient-from:#fffbeb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFFDF0\]{--tw-gradient-from:#fffdf0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-50{--tw-gradient-from:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100{--tw-gradient-from:var(--color-amber-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100\/90{--tw-gradient-from:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.from-amber-100\/90{--tw-gradient-from:color-mix(in oklab, var(--color-amber-100) 90%, transparent)}}.from-amber-100\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-300\/25{--tw-gradient-from:#ffd23640}@supports (color:color-mix(in lab, red, red)){.from-amber-300\/25{--tw-gradient-from:color-mix(in oklab, var(--color-amber-300) 25%, transparent)}}.from-amber-300\/25{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400\/30{--tw-gradient-from:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.from-amber-400\/30{--tw-gradient-from:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.from-amber-400\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500{--tw-gradient-from:var(--color-amber-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-grass-green{--tw-gradient-from:var(--color-grass-green);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-600\/30{--tw-gradient-from:#4f39f64d}@supports (color:color-mix(in lab, red, red)){.from-indigo-600\/30{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-600) 30%, transparent)}}.from-indigo-600\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-950\/80{--tw-gradient-from:#1e1a4dcc}@supports (color:color-mix(in lab, red, red)){.from-indigo-950\/80{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-950) 80%, transparent)}}.from-indigo-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-100\/90{--tw-gradient-from:#ffedd5e6}@supports (color:color-mix(in lab, red, red)){.from-orange-100\/90{--tw-gradient-from:color-mix(in oklab, var(--color-orange-100) 90%, transparent)}}.from-orange-100\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-500\/30{--tw-gradient-from:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.from-orange-500\/30{--tw-gradient-from:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.from-orange-500\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-purple{--tw-gradient-from:var(--color-primary-purple);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-100{--tw-gradient-from:var(--color-sky-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-100\/80{--tw-gradient-from:#dff2fecc}@supports (color:color-mix(in lab, red, red)){.from-sky-100\/80{--tw-gradient-from:color-mix(in oklab, var(--color-sky-100) 80%, transparent)}}.from-sky-100\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-950\/35{--tw-gradient-from:#02061859}@supports (color:color-mix(in lab, red, red)){.from-slate-950\/35{--tw-gradient-from:color-mix(in oklab, var(--color-slate-950) 35%, transparent)}}.from-slate-950\/35{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\[\#DCFCE7\]{--tw-gradient-via:#dcfce7;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#E0F2FE\]{--tw-gradient-via:#e0f2fe;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#F1F5F9\]{--tw-gradient-via:#f1f5f9;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#F3E8FF\]{--tw-gradient-via:#f3e8ff;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#FEF3C7\]{--tw-gradient-via:#fef3c7;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#FFF9E6\]{--tw-gradient-via:#fff9e6;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-50\/70{--tw-gradient-via:#fffbebb3}@supports (color:color-mix(in lab, red, red)){.via-amber-50\/70{--tw-gradient-via:color-mix(in oklab, var(--color-amber-50) 70%, transparent)}}.via-amber-50\/70{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-300{--tw-gradient-via:var(--color-amber-300);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-400{--tw-gradient-via:var(--color-amber-400);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-blue-500\/20{--tw-gradient-via:#3080ff33}@supports (color:color-mix(in lab, red, red)){.via-blue-500\/20{--tw-gradient-via:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.via-blue-500\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-100\/60{--tw-gradient-via:#f3e8ff99}@supports (color:color-mix(in lab, red, red)){.via-purple-100\/60{--tw-gradient-via:color-mix(in oklab, var(--color-purple-100) 60%, transparent)}}.via-purple-100\/60{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-500\/20{--tw-gradient-via:#ac4bff33}@supports (color:color-mix(in lab, red, red)){.via-purple-500\/20{--tw-gradient-via:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.via-purple-500\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-200{--tw-gradient-via:var(--color-sky-200);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-300\/20{--tw-gradient-via:#77d4ff33}@supports (color:color-mix(in lab, red, red)){.via-sky-300\/20{--tw-gradient-via:color-mix(in oklab, var(--color-sky-300) 20%, transparent)}}.via-sky-300\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-slate-900\/10{--tw-gradient-via:#0f172b1a}@supports (color:color-mix(in lab, red, red)){.via-slate-900\/10{--tw-gradient-via:color-mix(in oklab, var(--color-slate-900) 10%, transparent)}}.via-slate-900\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-slate-900\/90{--tw-gradient-via:#0f172be6}@supports (color:color-mix(in lab, red, red)){.via-slate-900\/90{--tw-gradient-via:color-mix(in oklab, var(--color-slate-900) 90%, transparent)}}.via-slate-900\/90{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-50\/80{--tw-gradient-via:#fefce8cc}@supports (color:color-mix(in lab, red, red)){.via-yellow-50\/80{--tw-gradient-via:color-mix(in oklab, var(--color-yellow-50) 80%, transparent)}}.via-yellow-50\/80{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-300\/20{--tw-gradient-via:#ffe02a33}@supports (color:color-mix(in lab, red, red)){.via-yellow-300\/20{--tw-gradient-via:color-mix(in oklab, var(--color-yellow-300) 20%, transparent)}}.via-yellow-300\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-400{--tw-gradient-via:var(--color-yellow-400);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\[\#E2E8F0\]{--tw-gradient-to:#e2e8f0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#EDE9FE\]{--tw-gradient-to:#ede9fe;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FCE7F3\]{--tw-gradient-to:#fce7f3;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FEF3C7\]{--tw-gradient-to:#fef3c7;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FEF9C3\]{--tw-gradient-to:#fef9c3;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FFE4E6\]{--tw-gradient-to:#ffe4e6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-accent-pink{--tw-gradient-to:var(--color-accent-pink);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200{--tw-gradient-to:var(--color-amber-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200\/50{--tw-gradient-to:#fee68580}@supports (color:color-mix(in lab, red, red)){.to-amber-200\/50{--tw-gradient-to:color-mix(in oklab, var(--color-amber-200) 50%, transparent)}}.to-amber-200\/50{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200\/70{--tw-gradient-to:#fee685b3}@supports (color:color-mix(in lab, red, red)){.to-amber-200\/70{--tw-gradient-to:color-mix(in oklab, var(--color-amber-200) 70%, transparent)}}.to-amber-200\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-950\/40{--tw-gradient-to:#46190166}@supports (color:color-mix(in lab, red, red)){.to-amber-950\/40{--tw-gradient-to:color-mix(in oklab, var(--color-amber-950) 40%, transparent)}}.to-amber-950\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-400{--tw-gradient-to:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-highlight-pink{--tw-gradient-to:var(--color-highlight-pink);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-100{--tw-gradient-to:var(--color-indigo-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-yellow-100\/60{--tw-gradient-to:#fef9c299}@supports (color:color-mix(in lab, red, red)){.to-yellow-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-yellow-100) 60%, transparent)}}.to-yellow-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.\[background-size\:8px_8px\]{background-size:8px 8px}.bg-cover{background-size:cover}.bg-center{background-position:50%}.fill-ink-black{fill:var(--color-ink-black)}.fill-white{fill:var(--color-white)}.stroke-\[2\.5\]{stroke-width:2.5px}.stroke-\[3\],.stroke-\[3px\]{stroke-width:3px}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-bottom-left{object-position:left bottom}.object-top{object-position:top}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-16{padding-top:calc(var(--spacing) * 16)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-3\.5{padding-right:calc(var(--spacing) * 3.5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-9{padding-right:calc(var(--spacing) * 9)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pb-\[10px\]{padding-bottom:10px}.pl-0\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-baseline{vertical-align:baseline}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-arcade{font-family:var(--font-arcade)}.font-code-mono{font-family:var(--font-code-mono)}.font-display-lg{font-family:var(--font-display-lg)}.font-headline-md{font-family:var(--font-headline-md)}.font-icon-label{font-family:var(--font-icon-label)}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.font-window-title{font-family:var(--font-window-title)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[6\.5px\]{font-size:6.5px}.text-\[7\.5px\]{font-size:7.5px}.text-\[7px\]{font-size:7px}.text-\[8\.5px\]{font-size:8.5px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[21px\]{font-size:21px}.text-\[22px\]{font-size:22px}.leading-10{--tw-leading:calc(var(--spacing) * 10);line-height:calc(var(--spacing) * 10)}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#0ea5e9\]{color:#0ea5e9}.text-\[\#1c120c\]{color:#1c120c}.text-\[\#2c1d11\]{color:#2c1d11}.text-\[\#2c2014\]{color:#2c2014}.text-\[\#4ADE80\]{color:#4ade80}.text-\[\#7ba4c8\]{color:#7ba4c8}.text-\[\#8cb4db\]{color:#8cb4db}.text-\[\#9a3412\]{color:#9a3412}.text-\[\#9cbcdb\]{color:#9cbcdb}.text-\[\#10b981\]{color:#10b981}.text-\[\#39ff14\]{color:#39ff14}.text-\[\#67b1ec\]{color:#67b1ec}.text-\[\#137c36\]{color:#137c36}.text-\[\#332415\]{color:#332415}.text-\[\#855400\]{color:#855400}.text-\[\#FFE24C\]{color:#ffe24c}.text-\[\#b4c8dc\]{color:#b4c8dc}.text-\[\#bfe1ff\]{color:#bfe1ff}.text-\[\#c5221f\]{color:#c5221f}.text-\[\#c06100\]{color:#c06100}.text-\[\#dde7f2\]{color:#dde7f2}.text-\[\#e2d5c2\]{color:#e2d5c2}.text-\[\#e2ecf7\]{color:#e2ecf7}.text-\[\#e6edf4\]{color:#e6edf4}.text-\[\#e6f0fa\]{color:#e6f0fa}.text-\[\#f2e6d5\]{color:#f2e6d5}.text-\[\#f3cb65\]{color:#f3cb65}.text-\[\#f4ebd9\]{color:#f4ebd9}.text-\[\#f6d267\]{color:#f6d267}.text-\[\#f59e0b\]{color:#f59e0b}.text-\[\#fef3c7\]{color:#fef3c7}.text-\[\#ffcc00\]{color:#fc0}.text-accent-cyan{color:var(--color-accent-cyan)}.text-amber-100{color:var(--color-amber-100)}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-700\/40{color:#b7500066}@supports (color:color-mix(in lab, red, red)){.text-amber-700\/40{color:color-mix(in oklab, var(--color-amber-700) 40%, transparent)}}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-amber-950{color:var(--color-amber-950)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-cyan-700{color:var(--color-cyan-700)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-emerald-950{color:var(--color-emerald-950)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-indigo-300{color:var(--color-indigo-300)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-900{color:var(--color-indigo-900)}.text-indigo-950{color:var(--color-indigo-950)}.text-inherit{color:inherit}.text-ink-black{color:var(--color-ink-black)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-orange-700{color:var(--color-orange-700)}.text-primary-purple{color:var(--color-primary-purple)}.text-purple-300{color:var(--color-purple-300)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-purple-900{color:var(--color-purple-900)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-900{color:var(--color-red-900)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-rose-400\/75{color:#ff667fbf}@supports (color:color-mix(in lab, red, red)){.text-rose-400\/75{color:color-mix(in oklab, var(--color-rose-400) 75%, transparent)}}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-rose-950{color:var(--color-rose-950)}.text-sky-300{color:var(--color-sky-300)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-900{color:var(--color-sky-900)}.text-sky-950{color:var(--color-sky-950)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-stone-200{color:var(--color-stone-200)}.text-stone-300{color:var(--color-stone-300)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-stone-800{color:var(--color-stone-800)}.text-stone-900{color:var(--color-stone-900)}.text-trash-gray{color:var(--color-trash-gray)}.text-white{color:var(--color-white)}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab, red, red)){.text-white\/40{color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.text-white\/50{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.italic\!{font-style:italic!important}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.placeholder-\[\#f3cb65\]\/70::placeholder{color:oklab(85.6949% .00434724 .128502/.7)}.placeholder-slate-400::placeholder{color:var(--color-slate-400)}.placeholder-stone-500::placeholder{color:var(--color-stone-500)}.placeholder-trash-gray::placeholder{color:var(--color-trash-gray)}.accent-amber-500{accent-color:var(--color-amber-500)}.accent-emerald-600{accent-color:var(--color-emerald-600)}.accent-primary-purple{accent-color:var(--color-primary-purple)}.opacity-0{opacity:0}.opacity-15{opacity:.15}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.opacity-90{opacity:.9}.opacity-95{opacity:.95}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-2px_0_0_rgba\(30\,41\,59\,0\.06\)\]{--tw-shadow:0 -2px 0 0 var(--tw-shadow-color,#1e293b0f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-3px_0_0_rgba\(30\,41\,59\,0\.08\)\]{--tw-shadow:0 -3px 0 0 var(--tw-shadow-color,#1e293b14);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-4px_0_0_rgba\(30\,41\,59\,0\.1\)\]{--tw-shadow:0 -4px 0 0 var(--tw-shadow-color,#1e293b1a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(72\,131\,182\,0\.25\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#4883b640);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(157\,78\,221\,0\.3\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#9d4edd4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(157\,78\,221\,0\.25\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#9d4edd40);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_2px_0_0_rgba\(30\,41\,59\,0\.05\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,#1e293b0d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_16px_40px_rgba\(0\,0\,0\,0\.85\)\]{--tw-shadow:0 16px 40px var(--tw-shadow-color,#000000d9);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0_0_\#000\]{--tw-shadow:1.5px 1.5px 0 0 var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0_0_\#1E293B\]{--tw-shadow:1.5px 1.5px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0px_0px_\#1E293B\],.shadow-\[1\.5px_1\.5px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:1.5px 1.5px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:1.5px 1.5px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0_0_\#1E293B\]{--tw-shadow:1px 1px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_\#1E293B\]{--tw-shadow:1px 1px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_\#000\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_\#1E293B\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_rgba\(30\,41\,59\,0\.3\)\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#1e293b4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:1px 1px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0_0_\#1E293B\]{--tw-shadow:2px 2px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_\#1E293B\]{--tw-shadow:2px 2px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_\#000\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_\#1E293B\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.06\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,0\.3\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,0\.25\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b40);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(244\,63\,94\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#f43f5e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:2px 2px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[3px_3px_0px_0px_\#1E293B\],.shadow-\[3px_3px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:3px 3px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[3px_3px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:3px 3px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0_0_\#1E293B\]{--tw-shadow:4px 4px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_0px_\#0ea5e9\]{--tw-shadow:4px 4px 0px 0px var(--tw-shadow-color,#0ea5e9);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_0px_\#1E293B\],.shadow-\[4px_4px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:4px 4px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:4px 4px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[6px_6px_0px_0px_\#1E293B\]{--tw-shadow:6px 6px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[6px_6px_0px_0px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:6px 6px 0px 0px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[8px_8px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:8px 8px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[8px_8px_0px_0px_rgba\(244\,63\,94\,0\.3\)\]{--tw-shadow:8px 8px 0px 0px var(--tw-shadow-color,#f43f5e4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_-3px_-3px_0px_rgba\(0\,0\,0\,0\.2\)\,inset_3px_3px_0px_rgba\(255\,255\,255\,0\.5\)\]{--tw-shadow:inset -3px -3px 0px var(--tw-shadow-color,#0003), inset 3px 3px 0px var(--tw-shadow-color,#ffffff80);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_0px_3px_0px_rgba\(255\,255\,255\,0\.8\)\]{--tw-shadow:inset 0px 3px 0px var(--tw-shadow-color,#fffc);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_1px_1px_0px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:inset 1px 1px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_2px_2px_0px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:inset 2px 2px 0px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_2px_2px_0px_rgba\(255\,255\,255\,0\.8\)\]{--tw-shadow:inset 2px 2px 0px var(--tw-shadow-color,#fffc);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_3px_3px_0px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:inset 3px 3px 0px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-700\/20{--tw-shadow-color:#b7500033}@supports (color:color-mix(in lab, red, red)){.shadow-amber-700\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-700) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-\[\#0ea5e9\]{--tw-ring-color:#0ea5e9}.ring-amber-500\/40{--tw-ring-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.ring-amber-500\/40{--tw-ring-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.ring-amber-700\/30{--tw-ring-color:#b750004d}@supports (color:color-mix(in lab, red, red)){.ring-amber-700\/30{--tw-ring-color:color-mix(in oklab, var(--color-amber-700) 30%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.brightness-110{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.contrast-125{--tw-contrast:contrast(125%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_6px_rgba\(156\,188\,219\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 6px var(--tw-drop-shadow-color,#9cbcdb80));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#000000e6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.85\)\]{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#000000d9));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_16px_32px_rgba\(0\,0\,0\,0\.55\)\]{--tw-drop-shadow-size:drop-shadow(0 16px 32px var(--tw-drop-shadow-color,#0000008c));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-sm{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-sm));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-125{--tw-saturate:saturate(125%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-150{--tw-saturate:saturate(150%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}@media (hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.peer-checked\:bg-emerald-500:is(:where(.peer):checked~*){background-color:var(--color-emerald-500)}.peer-checked\:bg-grass-green:is(:where(.peer):checked~*){background-color:var(--color-grass-green)}.peer-checked\:text-ink-black:is(:where(.peer):checked~*){color:var(--color-ink-black)}.peer-focus\:outline-none:is(:where(.peer):focus~*){--tw-outline-style:none;outline-style:none}.selection\:bg-\[\#4ADE80\] ::selection,.selection\:bg-\[\#4ADE80\]::selection{background-color:#4ade80}.selection\:bg-highlight-pink ::selection,.selection\:bg-highlight-pink::selection{background-color:var(--color-highlight-pink)}.selection\:text-\[\#1E293B\] ::selection,.selection\:text-\[\#1E293B\]::selection{color:#1e293b}.selection\:text-white ::selection,.selection\:text-white::selection{color:var(--color-white)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-\[1px\]:after{content:var(--tw-content);top:1px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:right-0:after{content:var(--tw-content);right:0}.after\:-bottom-\[2px\]:after{content:var(--tw-content);bottom:-2px}.after\:left-0:after{content:var(--tw-content);left:0}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:z-10:after{content:var(--tw-content);z-index:10}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing) * 4)}.after\:h-\[2\.5px\]:after{content:var(--tw-content);height:2.5px}.after\:w-2:after{content:var(--tw-content);width:calc(var(--spacing) * 2)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing) * 4)}.after\:rounded-full:after{content:var(--tw-content);border-radius:2147483647px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-2:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:2px}.after\:border-ink-black:after{content:var(--tw-content);border-color:var(--color-ink-black)}.after\:bg-paper-white:after{content:var(--tw-content);background-color:var(--color-paper-white)}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\\\'\\\'\]:after{--tw-content:\'\';content:var(--tw-content)}.peer-checked\:after\:translate-x-3:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 3);translate:var(--tw-translate-x) var(--tw-translate-y)}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:border-\[\#67b1ec\]:focus-within{border-color:#67b1ec}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-\[\#67b1ec\]\/40:focus-within{--tw-ring-color:oklab(73.6024% -.0492724 -.102282/.4)}@media (hover:hover){.hover\:translate-x-0\.5:hover{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:rotate-0:hover{rotate:0deg}.hover\:border-\[\#8db7dc\]:hover{border-color:#8db7dc}.hover\:border-\[\#10b981\]:hover{border-color:#10b981}.hover\:border-\[\#67b1ec\]:hover{border-color:#67b1ec}.hover\:border-\[\#f59e0b\]:hover{border-color:#f59e0b}.hover\:border-amber-500\/60:hover{border-color:#f99c0099}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-500\/60:hover{border-color:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.hover\:border-amber-600\/50:hover{border-color:#dd740080}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-600\/50:hover{border-color:color-mix(in oklab, var(--color-amber-600) 50%, transparent)}}.hover\:border-amber-700\/60:hover{border-color:#b7500099}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-700\/60:hover{border-color:color-mix(in oklab, var(--color-amber-700) 60%, transparent)}}.hover\:border-ink-black:hover{border-color:var(--color-ink-black)}.hover\:border-red-500:hover{border-color:var(--color-red-500)}.hover\:border-rose-400:hover{border-color:var(--color-rose-400)}.hover\:bg-\[\#1c3e61\]\/35:hover{background-color:oklab(35.6758% -.0235387 -.0690016/.35)}.hover\:bg-\[\#1f3750\]:hover{background-color:#1f3750}.hover\:bg-\[\#2a2017\]\/85:hover{background-color:oklab(25.2506% .00995521 .0199946/.85)}.hover\:bg-\[\#3b82f6\]:hover{background-color:#3b82f6}.hover\:bg-\[\#3f6990\]:hover{background-color:#3f6990}.hover\:bg-\[\#4cc9f0\]:hover{background-color:#4cc9f0}.hover\:bg-\[\#10b981\]\/25:hover{background-color:oklab(69.5873% -.142158 .0448781/.25)}.hover\:bg-\[\#22c55e\]:hover{background-color:#22c55e}.hover\:bg-\[\#28e007\]:hover{background-color:#28e007}.hover\:bg-\[\#38bdf8\]:hover{background-color:#38bdf8}.hover\:bg-\[\#39ff14\]:hover{background-color:#39ff14}.hover\:bg-\[\#203a55\]:hover{background-color:#203a55}.hover\:bg-\[\#251f18\]:hover{background-color:#251f18}.hover\:bg-\[\#b91c1c\]:hover{background-color:#b91c1c}.hover\:bg-\[\#c2410c\]:hover{background-color:#c2410c}.hover\:bg-\[\#efece3\]:hover{background-color:#efece3}.hover\:bg-\[\#f72585\]:hover{background-color:#f72585}.hover\:bg-\[\#fcf5e6\]:hover{background-color:#fcf5e6}.hover\:bg-\[\#fde047\]:hover{background-color:#fde047}.hover\:bg-\[\#ff8000\]:hover{background-color:#ff8000}.hover\:bg-\[\#ffe24c\]\/40:hover{background-color:oklab(91.1399% -.0228156 .162602/.4)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-amber-200\/50:hover{background-color:#fee68580}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-200\/50:hover{background-color:color-mix(in oklab, var(--color-amber-200) 50%, transparent)}}.hover\:bg-amber-200\/60:hover{background-color:#fee68599}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-200\/60:hover{background-color:color-mix(in oklab, var(--color-amber-200) 60%, transparent)}}.hover\:bg-amber-300:hover{background-color:var(--color-amber-300)}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500:hover{background-color:var(--color-amber-500)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.hover\:bg-amber-500\/25:hover{background-color:#f99c0040}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/25:hover{background-color:color-mix(in oklab, var(--color-amber-500) 25%, transparent)}}.hover\:bg-amber-500\/30:hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/30:hover{background-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.hover\:bg-amber-600:hover{background-color:var(--color-amber-600)}.hover\:bg-amber-600\/25:hover{background-color:#dd740040}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-600\/25:hover{background-color:color-mix(in oklab, var(--color-amber-600) 25%, transparent)}}.hover\:bg-amber-700\/20:hover{background-color:#b7500033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-700\/20:hover{background-color:color-mix(in oklab, var(--color-amber-700) 20%, transparent)}}.hover\:bg-amber-900\/5:hover{background-color:#7b33060d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/5:hover{background-color:color-mix(in oklab, var(--color-amber-900) 5%, transparent)}}.hover\:bg-amber-900\/10:hover{background-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/10:hover{background-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.hover\:bg-amber-900\/20:hover{background-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/20:hover{background-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.hover\:bg-black:hover{background-color:var(--color-black)}.hover\:bg-black\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\:bg-black\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/10:hover{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.hover\:bg-cyan-200:hover{background-color:var(--color-cyan-200)}.hover\:bg-emerald-50:hover{background-color:var(--color-emerald-50)}.hover\:bg-emerald-100:hover{background-color:var(--color-emerald-100)}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-emerald-300:hover{background-color:var(--color-emerald-300)}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-emerald-500\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-500\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\:bg-emerald-600\/20:hover{background-color:#00976733}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-600\/20:hover{background-color:color-mix(in oklab, var(--color-emerald-600) 20%, transparent)}}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-pink-400:hover{background-color:var(--color-pink-400)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-purple-100:hover{background-color:var(--color-purple-100)}.hover\:bg-purple-200:hover{background-color:var(--color-purple-200)}.hover\:bg-purple-500:hover{background-color:var(--color-purple-500)}.hover\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-rose-50:hover{background-color:var(--color-rose-50)}.hover\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\:bg-rose-200:hover{background-color:var(--color-rose-200)}.hover\:bg-rose-300:hover{background-color:var(--color-rose-300)}.hover\:bg-rose-500:hover{background-color:var(--color-rose-500)}.hover\:bg-rose-500\/10:hover{background-color:#ff23571a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-500\/10:hover{background-color:color-mix(in oklab, var(--color-rose-500) 10%, transparent)}}.hover\:bg-rose-500\/25:hover{background-color:#ff235740}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-500\/25:hover{background-color:color-mix(in oklab, var(--color-rose-500) 25%, transparent)}}.hover\:bg-rose-600:hover{background-color:var(--color-rose-600)}.hover\:bg-rose-600\/20:hover{background-color:#e7004433}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-600\/20:hover{background-color:color-mix(in oklab, var(--color-rose-600) 20%, transparent)}}.hover\:bg-rose-700:hover{background-color:var(--color-rose-700)}.hover\:bg-rose-900:hover{background-color:var(--color-rose-900)}.hover\:bg-rose-900\/70:hover{background-color:#8b0836b3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-900\/70:hover{background-color:color-mix(in oklab, var(--color-rose-900) 70%, transparent)}}.hover\:bg-sky-50:hover{background-color:var(--color-sky-50)}.hover\:bg-sky-100:hover{background-color:var(--color-sky-100)}.hover\:bg-sky-300:hover{background-color:var(--color-sky-300)}.hover\:bg-sky-400:hover{background-color:var(--color-sky-400)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-slate-300:hover{background-color:var(--color-slate-300)}.hover\:bg-slate-600:hover{background-color:var(--color-slate-600)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-slate-950:hover{background-color:var(--color-slate-950)}.hover\:bg-stone-500\/10:hover{background-color:#79716b1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-stone-500\/10:hover{background-color:color-mix(in oklab, var(--color-stone-500) 10%, transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:bg-white\/40:hover{background-color:#fff6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/40:hover{background-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.hover\:bg-yellow-200:hover{background-color:var(--color-yellow-200)}.hover\:bg-yellow-300:hover{background-color:var(--color-yellow-300)}.hover\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}.hover\:text-amber-200:hover{color:var(--color-amber-200)}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-600:hover{color:var(--color-amber-600)}.hover\:text-amber-800:hover{color:var(--color-amber-800)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-blue-900:hover{color:var(--color-blue-900)}.hover\:text-cyan-200:hover{color:var(--color-cyan-200)}.hover\:text-ink-black:hover{color:var(--color-ink-black)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-red-800:hover{color:var(--color-red-800)}.hover\:text-rose-200:hover{color:var(--color-rose-200)}.hover\:text-rose-300:hover{color:var(--color-rose-300)}.hover\:text-rose-600:hover{color:var(--color-rose-600)}.hover\:text-sky-800:hover{color:var(--color-sky-800)}.hover\:text-sky-950:hover{color:var(--color-sky-950)}.hover\:text-stone-200:hover{color:var(--color-stone-200)}.hover\:text-stone-900:hover{color:var(--color-stone-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-75:hover{opacity:.75}.hover\:opacity-100:hover{opacity:1}}.focus\:border-amber-500:focus{border-color:var(--color-amber-500)}.focus\:border-amber-500\/70:focus{border-color:#f99c00b3}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-500\/70:focus{border-color:color-mix(in oklab, var(--color-amber-500) 70%, transparent)}}.focus\:border-amber-600:focus{border-color:var(--color-amber-600)}.focus\:border-amber-700\/60:focus{border-color:#b7500099}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-700\/60:focus{border-color:color-mix(in oklab, var(--color-amber-700) 60%, transparent)}}.focus\:border-sky-600:focus{border-color:var(--color-sky-600)}.focus\:bg-white:focus{background-color:var(--color-white)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-primary-purple:focus{--tw-ring-color:var(--color-primary-purple)}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-sky-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ink-black:focus-visible{--tw-ring-color:var(--color-ink-black)}.active\:translate-x-0\.5:active{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-x-1:active{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-y-0\.5:active{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-y-1:active{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-125:active{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-\[\#1fb304\]:active{background-color:#1fb304}.active\:bg-\[\#2b4c6e\]:active{background-color:#2b4c6e}.active\:shadow-none:active{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=400px){.min-\[400px\]\:w-72{width:calc(var(--spacing) * 72)}.min-\[400px\]\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.min-\[400px\]\:text-\[8px\]{font-size:8px}}@media (width>=480px){.min-\[480px\]\:inline{display:inline}}@media (width>=40rem){.sm\:right-6{right:calc(var(--spacing) * 6)}.sm\:my-5{margin-block:calc(var(--spacing) * 5)}.sm\:mt-0{margin-top:0}.sm\:mt-2{margin-top:calc(var(--spacing) * 2)}.sm\:mt-3{margin-top:calc(var(--spacing) * 3)}.sm\:-mr-10{margin-right:calc(var(--spacing) * -10)}.sm\:mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.sm\:mb-2{margin-bottom:calc(var(--spacing) * 2)}.sm\:mb-4{margin-bottom:calc(var(--spacing) * 4)}.sm\:mb-5{margin-bottom:calc(var(--spacing) * 5)}.sm\:mb-6{margin-bottom:calc(var(--spacing) * 6)}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:h-4{height:calc(var(--spacing) * 4)}.sm\:h-9{height:calc(var(--spacing) * 9)}.sm\:h-16{height:calc(var(--spacing) * 16)}.sm\:h-24{height:calc(var(--spacing) * 24)}.sm\:h-72{height:calc(var(--spacing) * 72)}.sm\:h-\[40vh\]{height:40vh}.sm\:max-h-\[380px\]{max-height:380px}.sm\:min-h-\[54px\]{min-height:54px}.sm\:min-h-\[240px\]{min-height:240px}.sm\:min-h-\[360px\]{min-height:360px}.sm\:w-4{width:calc(var(--spacing) * 4)}.sm\:w-9{width:calc(var(--spacing) * 9)}.sm\:w-16{width:calc(var(--spacing) * 16)}.sm\:w-20{width:calc(var(--spacing) * 20)}.sm\:w-28{width:calc(var(--spacing) * 28)}.sm\:w-80{width:calc(var(--spacing) * 80)}.sm\:w-auto{width:auto}.sm\:max-w-\[90\%\]{max-width:90%}.sm\:max-w-\[200px\]{max-width:200px}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}:where(.sm\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.sm\:self-center{align-self:center}.sm\:rounded-lg{border-radius:var(--radius-lg)}.sm\:rounded-sm{border-radius:var(--radius-sm)}.sm\:border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.sm\:border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.sm\:p-3{padding:calc(var(--spacing) * 3)}.sm\:p-3\.5{padding:calc(var(--spacing) * 3.5)}.sm\:p-4{padding:calc(var(--spacing) * 4)}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:p-8{padding:calc(var(--spacing) * 8)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.sm\:py-3{padding-block:calc(var(--spacing) * 3)}.sm\:py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.sm\:py-6{padding-block:calc(var(--spacing) * 6)}.sm\:pt-5{padding-top:calc(var(--spacing) * 5)}.sm\:pr-4{padding-right:calc(var(--spacing) * 4)}.sm\:pr-5{padding-right:calc(var(--spacing) * 5)}.sm\:pb-3{padding-bottom:calc(var(--spacing) * 3)}.sm\:pb-5{padding-bottom:calc(var(--spacing) * 5)}.sm\:pl-0{padding-left:0}.sm\:pl-10{padding-left:calc(var(--spacing) * 10)}.sm\:pl-14{padding-left:calc(var(--spacing) * 14)}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.sm\:text-\[8\.5px\]{font-size:8.5px}.sm\:text-\[9px\]{font-size:9px}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-\[13px\]{font-size:13px}}@media (width>=48rem){.md\:-mr-12{margin-right:calc(var(--spacing) * -12)}.md\:flex{display:flex}.md\:inline{display:inline}.md\:inline-block{display:inline-block}.md\:table-cell{display:table-cell}.md\:h-96{height:calc(var(--spacing) * 96)}.md\:h-\[46vh\]{height:46vh}.md\:max-h-\[460px\]{max-height:460px}.md\:min-h-\[300px\]{min-height:300px}.md\:w-84{width:calc(var(--spacing) * 84)}.md\:max-w-\[85\%\]{max-width:85%}.md\:max-w-\[270px\]{max-width:270px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:gap-4{gap:calc(var(--spacing) * 4)}.md\:p-8{padding:calc(var(--spacing) * 8)}.md\:px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.md\:px-4{padding-inline:calc(var(--spacing) * 4)}.md\:px-8{padding-inline:calc(var(--spacing) * 8)}.md\:py-2{padding-block:calc(var(--spacing) * 2)}.md\:pl-16{padding-left:calc(var(--spacing) * 16)}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:text-\[15px\]{font-size:15px}}@media (width>=64rem){.lg\:-mr-14{margin-right:calc(var(--spacing) * -14)}.lg\:inline{display:inline}.lg\:table-cell{display:table-cell}.lg\:h-\[50vh\]{height:50vh}.lg\:max-h-\[500px\]{max-height:500px}.lg\:w-96{width:calc(var(--spacing) * 96)}.lg\:w-\[49\%\]{width:49%}.lg\:w-\[51\%\]{width:51%}.lg\:max-w-6xl{max-width:var(--container-6xl)}.lg\:max-w-\[320px\]{max-width:320px}.lg\:border-r-\[3px\]{border-right-style:var(--tw-border-style);border-right-width:3px}.lg\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.lg\:pl-18{padding-left:calc(var(--spacing) * 18)}}@media (prefers-color-scheme:dark){.dark\:border-stone-700{border-color:var(--color-stone-700)}.dark\:border-stone-700\/30{border-color:#44403b4d}@supports (color:color-mix(in lab, red, red)){.dark\:border-stone-700\/30{border-color:color-mix(in oklab, var(--color-stone-700) 30%, transparent)}}.dark\:border-stone-700\/50{border-color:#44403b80}@supports (color:color-mix(in lab, red, red)){.dark\:border-stone-700\/50{border-color:color-mix(in oklab, var(--color-stone-700) 50%, transparent)}}.dark\:bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-purple-400{color:var(--color-purple-400)}.dark\:text-rose-400{color:var(--color-rose-400)}.dark\:text-stone-300{color:var(--color-stone-300)}@media (hover:hover){.dark\:hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}}}}html,body{color:#1e293b;background:linear-gradient(135deg,#0f172a 0%,#020617 100%);width:100%;height:100%;margin:0;padding:0;font-family:Be Vietnam Pro,sans-serif;overflow:hidden}#root{width:100%;height:100%;overflow:hidden}.material-symbols-outlined{white-space:nowrap;vertical-align:middle;max-width:1em;display:inline-block;overflow:hidden}::-webkit-scrollbar{width:12px;height:12px}::-webkit-scrollbar-track{background:#f9f8f3;border-left:2px solid #1e293b}::-webkit-scrollbar-thumb{background:#1e293b;border-radius:0}::-webkit-scrollbar-thumb:hover{background:#334155}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:#1e293b #f4f1ea}.custom-scrollbar::-webkit-scrollbar{width:10px;height:10px}.custom-scrollbar::-webkit-scrollbar-track{background:#f4f1ea}.custom-scrollbar::-webkit-scrollbar-track:vertical{border-top:none;border-left:2px solid #1e293b}.custom-scrollbar::-webkit-scrollbar-track:horizontal{border-top:2px solid #1e293b;border-left:none}.custom-scrollbar::-webkit-scrollbar-thumb{background:#1e293b;border:none;border-radius:0!important}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#334155}.custom-scrollbar::-webkit-scrollbar-thumb:active{background:#0f172a}.custom-scrollbar::-webkit-scrollbar-corner{background:#f4f1ea;border-top:2px solid #1e293b;border-left:2px solid #1e293b}.no-scrollbar::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}.no-scrollbar{-ms-overflow-style:none!important;scrollbar-width:none!important}.window-shadow,.gadget-shadow{box-shadow:6px 6px #1e293b}.arcade-btn{transition:all .1s;box-shadow:0 6px #1e293b,inset 0 4px #fff6}.arcade-btn:active{transform:translateY(6px);box-shadow:0 0 #1e293b,inset 0 2px #0003}.icon-hover-shift{transition:all .1s ease-in-out}.icon-hover-shift:hover{transform:translate(-2px,-2px)}.icon-hover-shift:active{transform:translate(2px,2px)}.cm-editor{border:3px solid #1e293b;border-radius:.5rem;color:#4ade80!important;background-color:#1e293b!important;outline:none!important;font-family:Courier Prime,monospace!important;font-size:13px!important}.cm-scroller{font-family:inherit!important}.cm-gutters{color:#64748b!important;background-color:#1e293b!important;border-right:3px solid #1e293b!important}.cm-activeLineGutter{color:#4ade80!important;background-color:#4ade801a!important}.cm-activeLine{background-color:#4ade800d!important}.cm-cursor{border-left-color:#4ade80!important}.font-cinzel{font-family:Cinzel,serif}.font-cinzel-dec{font-family:Cinzel Decorative,serif}.font-garamond{font-family:EB Garamond,serif}.font-pencil{font-family:Kalam,cursive}.parchment-bg{background-color:#f3e9d2;background-image:radial-gradient(circle,#f8f1e3f2,#e2d0aee6),radial-gradient(circle at 10% 20%,#bd9a6c40 0%,#0000 40%),radial-gradient(circle at 90% 80%,#a883544d 0%,#0000 45%),radial-gradient(circle at 80% 15%,#a0764633 0%,#0000 35%),radial-gradient(circle at 25% 85%,#af8a5c40 0%,#0000 35%)}.parchment-dark-bg{background-color:#171512;background-image:radial-gradient(circle,#26211bf2,#120f0cf2),radial-gradient(circle at 10% 20%,#5544304d 0%,#0000 40%),radial-gradient(circle at 90% 80%,#46342059 0%,#0000 45%)}.map-vignette{box-shadow:inset 0 0 80px #4e361b73,inset 0 0 160px #2d1e0c59}.map-dark-vignette{box-shadow:inset 0 0 90px #000000d9,inset 0 0 180px #000000b3}@keyframes beacon-pulse{0%{r:10px;opacity:.9}50%{r:22px;opacity:.35}to{r:30px;opacity:0}}@keyframes path-shimmer{0%{stroke-dashoffset:200px}to{stroke-dashoffset:0}}.beacon-wave{animation:2s cubic-bezier(.215,.61,.355,1) infinite beacon-pulse}.beacon-wave-delayed{animation:2s cubic-bezier(.215,.61,.355,1) .8s infinite beacon-pulse}.canvas-interactive{cursor:grab}.canvas-interactive:active{cursor:grabbing}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} diff --git a/algospaced-ui/dist/assets/index-DnK6BACV.js b/algospaced-ui/dist/assets/index-DVWZ15xt.js similarity index 65% rename from algospaced-ui/dist/assets/index-DnK6BACV.js rename to algospaced-ui/dist/assets/index-DVWZ15xt.js index 6d9410d7ba5fcc5f73fdc69793286911569a8dc1..241c3339ddb413f0c9ebd30e6c754852ede4166e 100644 --- a/algospaced-ui/dist/assets/index-DnK6BACV.js +++ b/algospaced-ui/dist/assets/index-DVWZ15xt.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReviewQueue-DmsrlLxn.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-react-CIO8MTK1.js","assets/vendor-codemirror-By0wlJeM.js","assets/firebaseClient-DZobvwSx.js","assets/vendor-firebase-DSIO3PIf.js","assets/githubSyncService-x0Mm_uEl.js","assets/confetti.module-Uxh4CK4s.js","assets/OnboardingModal-DmgTXeeL.js","assets/MarkdownRenderer-BMZIn30p.js","assets/PrincessChamber-5t89aBn-.js","assets/JourneyPath-Dpd3IPxF.js","assets/TerminalEmulator-C2zR6yON.js","assets/PythonChallenge-BOgiGe52.js","assets/MySQLPlayground-CDRacqFf.js","assets/FileExplorer-CJE9LlAj.js","assets/Settings-ACJ113RL.js","assets/CreateProblemForm-Cej3QR08.js","assets/GitHubSyncWindow-DHS56rys.js","assets/Auth-DHdm5r3r.js"])))=>i.map(i=>d[i]); -import{r as e}from"./rolldown-runtime-hePW80VL.js";import{At as t,Bt as n,Dt as r,Ft as i,It as a,L as o,Lt as s,Mt as c,Nt as l,O as u,Ot as d,P as f,Pt as p,Rt as m,at as h,c as g,d as _,gt as v,jt as y,kt as b,l as x,n as S,o as C,p as w,y as T,zt as E}from"./vendor-react-CIO8MTK1.js";import{a as D,i as O,n as k,o as A,s as j,t as M}from"./firebaseClient-DZobvwSx.js";import{t as N}from"./vendor-ui-ZXcm-2wU.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var P=e(n(),1),F=E(),I=m(),L=`algospaced_desktop_icon_positions_v2`,R=96,z=105,B=24,V=60,H=112,U=108,W=e=>{let t={},n=e.filter(e=>!e.hidden),r=typeof window<`u`?window.innerHeight-100:700,i=B,a=V;return n.forEach(e=>{a+z>r&&a>V&&(i+=U,a=V),t[e.id]={x:i,y:a},a+=H}),t},G=(e,t)=>{let n=W(t);if(!e||typeof e!=`object`)return n;let r={},i=new Set,a=(e,t)=>`${Math.round(e/50)},${Math.round(t/50)}`;return[...t].sort((e,t)=>e.id===`queue`?-1:+(t.id===`queue`)).forEach(t=>{let o=e[t.id];if(o&&Number.isFinite(o.x)&&Number.isFinite(o.y)){let e=a(o.x,o.y);if(!i.has(e)){r[t.id]={x:Math.max(8,o.x),y:Math.max(48,o.y)},i.add(e);return}}let s=n[t.id]||{x:B,y:V},c=s.x,l=s.y;for(;i.has(a(c,l));)l+=H,typeof window<`u`&&l+z>window.innerHeight-100&&(c+=U,l=V);r[t.id]={x:c,y:l},i.add(a(c,l))}),r},ee=(0,P.forwardRef)(({icons:e,isMobile:t=!1,onContextMenu:n},r)=>{let[i,a]=(0,P.useState)(()=>{try{let t=localStorage.getItem(L);if(t){let n=JSON.parse(t);if(n&&typeof n==`object`)return G(n,e)}}catch(e){console.error(`Error loading icon positions:`,e)}return W(e)}),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(null),u=(0,P.useRef)({startX:0,startY:0,initialIconX:0,initialIconY:0,hasMoved:!1,pointerId:null});(0,P.useEffect)(()=>{let t=()=>{a(t=>{let n=G(t,e),r=!1,i=Math.max(100,window.innerWidth-R),a=Math.max(100,window.innerHeight-120);if(e.forEach(e=>{let t=n[e.id];if(t){let o=Math.max(8,Math.min(t.x,i)),s=Math.max(48,Math.min(t.y,a));(o!==t.x||s!==t.y)&&(n[e.id]={x:o,y:s},r=!0)}}),r||JSON.stringify(n)!==JSON.stringify(t))try{localStorage.setItem(L,JSON.stringify(n))}catch{}return n})};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),(0,P.useImperativeHandle)(r,()=>({autoArrange:()=>{let t=W(e);a(t);try{localStorage.setItem(L,JSON.stringify(t))}catch{}},resetLayout:()=>{localStorage.removeItem(L),localStorage.removeItem(`algospaced_desktop_icon_positions_v1`);let t=W(e);a(t)}})),(0,P.useEffect)(()=>{let e=e=>{e.target.closest(`.desktop-icon-unit`)||s(null)};return window.addEventListener(`pointerdown`,e),()=>window.removeEventListener(`pointerdown`,e)},[]);let d=(t,n)=>{if(t.button!==0&&t.pointerType===`mouse`)return;t.stopPropagation();let r=W(e)[n.id]||{x:B,y:V},a=i[n.id],o=a&&Number.isFinite(a.x)&&Number.isFinite(a.y)?a:r;u.current={startX:t.clientX,startY:t.clientY,initialIconX:o.x,initialIconY:o.y,hasMoved:!1,pointerId:t.pointerId},l(n.id);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}},f=e=>{if(!c)return;let{startX:t,startY:n,initialIconX:r,initialIconY:i,hasMoved:o}=u.current,s=e.clientX-t,l=e.clientY-n;if(!o&&Math.hypot(s,l)>6&&(u.current.hasMoved=!0),u.current.hasMoved){let e=Math.max(100,window.innerWidth-R),t=Math.max(100,window.innerHeight-110),n=Math.max(8,Math.min(r+s,e)),o=Math.max(48,Math.min(i+l,t));a(e=>({...e,[c]:{x:n,y:o}}))}},p=(e,t)=>{if(c!==t.id)return;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let{hasMoved:n}=u.current;if(n)try{localStorage.setItem(L,JSON.stringify(i))}catch{}else s(t.id),t.action();l(null)},m=e=>{e.action()},h=e.filter(e=>!e.hidden);return(0,I.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 select-none overflow-hidden`,onContextMenu:n,children:h.map(t=>{let n=W(e),r=i[t.id],a=r&&Number.isFinite(r.x)&&Number.isFinite(r.y)?r:n[t.id]||{x:B,y:V},s=o===t.id,l=c===t.id;return(0,I.jsxs)(`div`,{id:`desktop-icon-${t.id}`,style:{transform:`translate3d(${a.x}px, ${a.y}px, 0)`,touchAction:`none`},onPointerDown:e=>d(e,t),onPointerMove:f,onPointerUp:e=>p(e,t),onPointerCancel:e=>p(e,t),onDoubleClick:()=>m(t),className:`desktop-icon-unit absolute top-0 left-0 w-[96px] flex flex-col items-center justify-center gap-1.5 p-2 pointer-events-auto cursor-grab active:cursor-grabbing group transition-transform duration-75 ${l?`z-30 scale-105 opacity-90`:`z-10`}`,children:[(0,I.jsx)(`div`,{className:`w-16 h-16 bg-paper-white border-[3px] flex items-center justify-center transition-all ${s?`border-[#0ea5e9] bg-[#dbeafe] shadow-[4px_4px_0px_0px_#0ea5e9] ring-2 ring-[#0ea5e9]`:`border-ink-black gadget-shadow group-hover:bg-secondary-container shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)]`} ${t.iconImg?`p-1 overflow-hidden`:``}`,children:t.iconImg?(0,I.jsx)(`img`,{alt:typeof t.label==`string`?t.label:t.id,className:`w-full h-full object-cover pointer-events-none select-none`,src:t.iconImg,draggable:!1}):(0,I.jsx)(`span`,{className:`material-symbols-outlined text-4xl select-none text-ink-black`,style:{fontVariationSettings:`'FILL' 1`},children:t.icon||`apps`})}),(0,I.jsx)(`span`,{className:`font-icon-label text-[9px] px-1.5 py-1 border-[2px] text-center leading-tight uppercase transition-all select-none ${s?`bg-[#0ea5e9] text-white border-ink-black shadow-[2px_2px_0px_0px_#1E293B]`:`bg-ink-black text-white border-ink-black`}`,style:{boxShadow:s?`2px 2px 0px 0px #1E293B`:`2px 2px 0px 0px ${t.badgeShadowColor||`#fde047`}`},children:t.label})]},t.id)})})});function te({x:e,y:n,isOpen:r,onClose:o,onAutoArrange:u,onResetLayout:f,onChangeWallpaper:m,onOpenWindow:h,onTriggerSync:g,onToggleFullscreen:_,isFullscreen:v}){let y=(0,P.useMemo)(()=>({getBoundingClientRect:()=>({x:e,y:n,top:n,left:e,bottom:n,right:e,width:0,height:0})}),[e,n]),{refs:{setReference:x,setFloating:S},floatingStyles:C,context:w}=t({open:r,onOpenChange:e=>{e||o()},placement:`bottom-start`,middleware:[i(2),p({padding:12}),a({padding:12})],whileElementsMounted:s});(0,P.useEffect)(()=>{x(y)},[y,x]);let T=b(w,{outsidePress:!0,escapeKey:!0}),E=l(w,{role:`menu`}),{getFloatingProps:D}=c([T,E]);return r?(0,I.jsx)(d,{children:(0,I.jsxs)(`div`,{ref:S,style:C,...D(),className:`z-[100] w-56 bg-paper-white border-[3px] border-ink-black gadget-shadow py-1.5 flex flex-col select-none text-ink-black animate-fade-in shadow-[4px_4px_0px_0px_#1E293B]`,children:[(0,I.jsxs)(`div`,{className:`px-3 py-1 bg-[#0ea5e9] text-white border-b-2 border-ink-black flex items-center justify-between mb-1 -mt-1.5 -mx-0`,children:[(0,I.jsx)(`span`,{className:`font-window-title text-[11px] font-bold tracking-wider uppercase`,children:`Desktop Options`}),(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`desktop_windows`})]}),(0,I.jsxs)(`button`,{onClick:()=>{u(),o()},className:`px-3 py-1.5 hover:bg-[#fde047] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`grid_view`}),`Auto Arrange Icons`]}),(0,I.jsxs)(`button`,{onClick:()=>{f(),o()},className:`px-3 py-1.5 hover:bg-[#fde047] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`restart_alt`}),`Reset Icon Layout`]}),(0,I.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,I.jsxs)(`button`,{onClick:()=>{m(),o()},className:`px-3 py-1.5 hover:bg-[#39ff14] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`wallpaper`}),`Change Wallpaper...`]}),(0,I.jsxs)(`button`,{onClick:()=>{_(),o()},className:`px-3 py-1.5 hover:bg-[#39ff14] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:v?`fullscreen_exit`:`fullscreen`}),v?`Exit Fullscreen`:`Enter Fullscreen`]}),(0,I.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,I.jsxs)(`button`,{onClick:()=>{h(`queue`),o()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`view_list`}),`Daily Queue`]}),(0,I.jsxs)(`button`,{onClick:()=>{h(`terminal`),o()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`terminal`}),`Terminal Emulator`]}),(0,I.jsxs)(`button`,{onClick:()=>{h(`computer`),o()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`folder`}),`My Computer`]}),(0,I.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,I.jsxs)(`button`,{onClick:()=>{g(),o()},className:`px-3 py-1.5 hover:bg-[#f72585] hover:text-white flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`cloud_sync`}),`Sync with Drive`]})]})}):null}var ne=[{floorRange:[1,30],title:`The Plains of Arrays & Strings`,description:`Rolling green meadows and ancient cobblestone roads where foundational endurance is forged.`,bgLore:`Looking out towards the distant horizon, the silhouette of the Big-O Spire pierces the clouds.`},{floorRange:[31,60],title:`The Whispering Forest of Pointers`,description:`Winding paths through dense emerald groves where two pointers navigate labyrinthine trails.`,bgLore:`Aurelia’s beacon shines above the canopy, guiding your compass through tangled groves.`},{floorRange:[61,90],title:`The Grand Caverns of Trees & Graphs`,description:`Bioluminescent caves with branching crystal arches and subterranean passes.`,bgLore:`Halfway to the tower! Her voice echoes with hope over the enchanted royal crystal relay.`},{floorRange:[91,120],title:`The High Mountain Passes of Heaps & Backtracking`,description:`Perilous alpine ridges and snowy peaks overlooking the deep Spire valley.`,bgLore:`From the highest ridge, the base of the Spire is in sight through the swirling mountain mist!`},{floorRange:[121,149],title:`The Enchanted Valley of Dynamic Programming`,description:`Shimmering mystical grounds where optimal decisions bridge the final moat.`,bgLore:`The final leagues! The Spire looms directly ahead, its ancient runic wards trembling.`},{floorRange:[150,150],title:`The Gates of the Big-O Spire`,description:`Standing at the threshold of the grand obsidian gates to shatter the seal and free Aurelia!`,bgLore:`150 algorithmic leagues conquered! You have completed the grand journey and reached the Spire!`}];function re(e){return ne.find(t=>e>=t.floorRange[0]&&e<=t.floorRange[1])||ne[0]}var ie={30:{id:`letter-30`,floor:30,chapterTitle:`The Plains of Arrays & Strings`,title:`A Courier from the Open Plains`,letterText:`My Dearest Champion, +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReviewQueue-CltGWQpb.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-react-hnaVBnLv.js","assets/vendor-codemirror-By0wlJeM.js","assets/firebaseClient-DZobvwSx.js","assets/vendor-firebase-DSIO3PIf.js","assets/githubSyncService-x0Mm_uEl.js","assets/confetti.module-Uxh4CK4s.js","assets/MarkdownRenderer-D8UdFpnD.js","assets/PrincessChamber-abJShfI5.js","assets/JourneyPath-BhAvKOiu.js","assets/TerminalEmulator-CZed0tiA.js","assets/PythonChallenge-CQdOe4Q2.js","assets/MySQLPlayground-iGzsbjAa.js","assets/FileExplorer-D3FrJW-x.js","assets/Settings-BVuXk3LW.js","assets/CreateProblemForm-Ccz3TNzp.js","assets/GitHubSyncWindow-CrRFKIeu.js","assets/CardManager-BEhyd34f.js","assets/Auth-CphacI2S.js"])))=>i.map(i=>d[i]); +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,At as n,Bt as r,Ft as i,Ht as a,I as o,It as s,Lt as c,Mt as l,Nt as u,Pt as d,Rt as f,Vt as p,c as m,ct as h,d as g,jt as _,kt as v,l as y,n as b,o as x,p as S,x as C,yt as w,z as T,zt as E}from"./vendor-react-hnaVBnLv.js";import{a as D,i as O,n as k,o as A,s as j,t as M}from"./firebaseClient-DZobvwSx.js";import{t as N}from"./vendor-ui-ZXcm-2wU.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var P=e(a(),1),F=p(),I=r(),L=`algospaced_desktop_icon_positions_v2`,R=96,z=105,B=24,V=60,H=112,U=108,W=e=>{let t={},n=e.filter(e=>!e.hidden),r=typeof window<`u`?window.innerHeight-100:700,i=B,a=V;return n.forEach(e=>{a+z>r&&a>V&&(i+=U,a=V),t[e.id]={x:i,y:a},a+=H}),t},G=(e,t)=>{let n=W(t);if(!e||typeof e!=`object`)return n;let r={},i=new Set,a=(e,t)=>`${Math.round(e/50)},${Math.round(t/50)}`;return[...t].sort((e,t)=>e.id===`queue`?-1:+(t.id===`queue`)).forEach(t=>{let o=e[t.id];if(o&&Number.isFinite(o.x)&&Number.isFinite(o.y)){let e=a(o.x,o.y);if(!i.has(e)){r[t.id]={x:Math.max(8,o.x),y:Math.max(48,o.y)},i.add(e);return}}let s=n[t.id]||{x:B,y:V},c=s.x,l=s.y;for(;i.has(a(c,l));)l+=H,typeof window<`u`&&l+z>window.innerHeight-100&&(c+=U,l=V);r[t.id]={x:c,y:l},i.add(a(c,l))}),r},K=(0,P.forwardRef)(({icons:e,isMobile:t=!1,onContextMenu:n},r)=>{let[i,a]=(0,P.useState)(()=>{try{let t=localStorage.getItem(L);if(t){let n=JSON.parse(t);if(n&&typeof n==`object`)return G(n,e)}}catch(e){console.error(`Error loading icon positions:`,e)}return W(e)}),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(null),u=(0,P.useRef)({startX:0,startY:0,initialIconX:0,initialIconY:0,hasMoved:!1,pointerId:null});(0,P.useEffect)(()=>{let t=()=>{a(t=>{let n=G(t,e),r=!1,i=Math.max(100,window.innerWidth-R),a=Math.max(100,window.innerHeight-120);if(e.forEach(e=>{let t=n[e.id];if(t){let o=Math.max(8,Math.min(t.x,i)),s=Math.max(48,Math.min(t.y,a));(o!==t.x||s!==t.y)&&(n[e.id]={x:o,y:s},r=!0)}}),r||JSON.stringify(n)!==JSON.stringify(t))try{localStorage.setItem(L,JSON.stringify(n))}catch{}return n})};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),(0,P.useImperativeHandle)(r,()=>({autoArrange:()=>{let t=W(e);a(t);try{localStorage.setItem(L,JSON.stringify(t))}catch{}},resetLayout:()=>{localStorage.removeItem(L),localStorage.removeItem(`algospaced_desktop_icon_positions_v1`);let t=W(e);a(t)}})),(0,P.useEffect)(()=>{let e=e=>{e.target.closest(`.desktop-icon-unit`)||s(null)};return window.addEventListener(`pointerdown`,e),()=>window.removeEventListener(`pointerdown`,e)},[]);let d=(t,n)=>{if(t.button!==0&&t.pointerType===`mouse`)return;t.stopPropagation();let r=W(e)[n.id]||{x:B,y:V},a=i[n.id],o=a&&Number.isFinite(a.x)&&Number.isFinite(a.y)?a:r;u.current={startX:t.clientX,startY:t.clientY,initialIconX:o.x,initialIconY:o.y,hasMoved:!1,pointerId:t.pointerId},l(n.id);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}},f=e=>{if(!c)return;let{startX:t,startY:n,initialIconX:r,initialIconY:i,hasMoved:o}=u.current,s=e.clientX-t,l=e.clientY-n;if(!o&&Math.hypot(s,l)>6&&(u.current.hasMoved=!0),u.current.hasMoved){let e=Math.max(100,window.innerWidth-R),t=Math.max(100,window.innerHeight-110),n=Math.max(8,Math.min(r+s,e)),o=Math.max(48,Math.min(i+l,t));a(e=>({...e,[c]:{x:n,y:o}}))}},p=(e,t)=>{if(c!==t.id)return;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let{hasMoved:n}=u.current;if(n)try{localStorage.setItem(L,JSON.stringify(i))}catch{}else s(t.id),t.action();l(null)},m=e=>{e.action()},h=e.filter(e=>!e.hidden);return(0,I.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-10 select-none overflow-hidden`,onContextMenu:n,children:h.map(t=>{let n=W(e),r=i[t.id],a=r&&Number.isFinite(r.x)&&Number.isFinite(r.y)?r:n[t.id]||{x:B,y:V},s=o===t.id,l=c===t.id;return(0,I.jsxs)(`div`,{id:`desktop-icon-${t.id}`,style:{transform:`translate3d(${a.x}px, ${a.y}px, 0)`,touchAction:`none`},onPointerDown:e=>d(e,t),onPointerMove:f,onPointerUp:e=>p(e,t),onPointerCancel:e=>p(e,t),onDoubleClick:()=>m(t),className:`desktop-icon-unit absolute top-0 left-0 w-[96px] flex flex-col items-center justify-center gap-1.5 p-2 pointer-events-auto cursor-grab active:cursor-grabbing group transition-transform duration-75 ${l?`z-30 scale-105 opacity-90`:`z-10`}`,children:[(0,I.jsx)(`div`,{className:`w-16 h-16 bg-paper-white border-[3px] flex items-center justify-center transition-all ${s?`border-[#0ea5e9] bg-[#dbeafe] shadow-[4px_4px_0px_0px_#0ea5e9] ring-2 ring-[#0ea5e9]`:`border-ink-black gadget-shadow group-hover:bg-secondary-container shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)]`} ${t.iconImg?`p-1 overflow-hidden`:``}`,children:t.iconImg?(0,I.jsx)(`img`,{alt:typeof t.label==`string`?t.label:t.id,className:`w-full h-full object-cover pointer-events-none select-none`,src:t.iconImg,draggable:!1}):(0,I.jsx)(`span`,{className:`material-symbols-outlined text-4xl select-none text-ink-black`,style:{fontVariationSettings:`'FILL' 1`},children:t.icon||`apps`})}),(0,I.jsx)(`span`,{className:`font-icon-label text-[9px] px-1.5 py-1 border-[2px] text-center leading-tight uppercase transition-all select-none ${s?`bg-[#0ea5e9] text-white border-ink-black shadow-[2px_2px_0px_0px_#1E293B]`:`bg-ink-black text-white border-ink-black`}`,style:{boxShadow:s?`2px 2px 0px 0px #1E293B`:`2px 2px 0px 0px ${t.badgeShadowColor||`#fde047`}`},children:t.label})]},t.id)})})});function ee({x:e,y:t,isOpen:r,onClose:a,onAutoArrange:o,onResetLayout:u,onChangeWallpaper:p,onOpenWindow:m,onTriggerSync:h,onToggleFullscreen:g,isFullscreen:v}){let y=(0,P.useMemo)(()=>({getBoundingClientRect:()=>({x:e,y:t,top:t,left:e,bottom:t,right:e,width:0,height:0})}),[e,t]),{refs:{setReference:b,setFloating:x},floatingStyles:S,context:C}=l({open:r,onOpenChange:e=>{e||a()},placement:`bottom-start`,middleware:[c(2),s({padding:12}),f({padding:12})],whileElementsMounted:E});(0,P.useEffect)(()=>{b(y)},[y,b]);let w=_(C,{outsidePress:!0,escapeKey:!0}),T=i(C,{role:`menu`}),{getFloatingProps:D}=d([w,T]);return r?(0,I.jsx)(n,{children:(0,I.jsxs)(`div`,{ref:x,style:S,...D(),className:`z-[100] w-56 bg-paper-white border-[3px] border-ink-black gadget-shadow py-1.5 flex flex-col select-none text-ink-black animate-fade-in shadow-[4px_4px_0px_0px_#1E293B]`,children:[(0,I.jsxs)(`div`,{className:`px-3 py-1 bg-[#0ea5e9] text-white border-b-2 border-ink-black flex items-center justify-between mb-1 -mt-1.5 -mx-0`,children:[(0,I.jsx)(`span`,{className:`font-window-title text-[11px] font-bold tracking-wider uppercase`,children:`Desktop Options`}),(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`desktop_windows`})]}),(0,I.jsxs)(`button`,{onClick:()=>{o(),a()},className:`px-3 py-1.5 hover:bg-[#fde047] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`grid_view`}),`Auto Arrange Icons`]}),(0,I.jsxs)(`button`,{onClick:()=>{u(),a()},className:`px-3 py-1.5 hover:bg-[#fde047] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`restart_alt`}),`Reset Icon Layout`]}),(0,I.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,I.jsxs)(`button`,{onClick:()=>{p(),a()},className:`px-3 py-1.5 hover:bg-[#39ff14] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`wallpaper`}),`Change Wallpaper...`]}),(0,I.jsxs)(`button`,{onClick:()=>{g(),a()},className:`px-3 py-1.5 hover:bg-[#39ff14] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:v?`fullscreen_exit`:`fullscreen`}),v?`Exit Fullscreen`:`Enter Fullscreen`]}),(0,I.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,I.jsxs)(`button`,{onClick:()=>{m(`queue`),a()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`view_list`}),`Daily Queue`]}),(0,I.jsxs)(`button`,{onClick:()=>{m(`cardManager`),a()},className:`px-3 py-1.5 hover:bg-[#38bdf8] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`style`}),`Card Manager`]}),(0,I.jsxs)(`button`,{onClick:()=>{m(`terminal`),a()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`terminal`}),`Terminal Emulator`]}),(0,I.jsxs)(`button`,{onClick:()=>{m(`computer`),a()},className:`px-3 py-1.5 hover:bg-[#4cc9f0] hover:text-ink-black flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`folder`}),`My Computer`]}),(0,I.jsx)(`div`,{className:`h-[2px] bg-ink-black/20 my-1 mx-2`}),(0,I.jsxs)(`button`,{onClick:()=>{h(),a()},className:`px-3 py-1.5 hover:bg-[#f72585] hover:text-white flex items-center gap-2 text-xs font-bold transition-colors text-left cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,children:`cloud_sync`}),`Sync with Drive`]})]})}):null}var te=[{floorRange:[1,30],title:`The Plains of Arrays & Strings`,description:`Rolling green meadows and ancient cobblestone roads where foundational endurance is forged.`,bgLore:`Looking out towards the distant horizon, the silhouette of the Big-O Spire pierces the clouds.`},{floorRange:[31,60],title:`The Whispering Forest of Pointers`,description:`Winding paths through dense emerald groves where two pointers navigate labyrinthine trails.`,bgLore:`Aurelia’s beacon shines above the canopy, guiding your compass through tangled groves.`},{floorRange:[61,90],title:`The Grand Caverns of Trees & Graphs`,description:`Bioluminescent caves with branching crystal arches and subterranean passes.`,bgLore:`Halfway to the tower! Her voice echoes with hope over the enchanted royal crystal relay.`},{floorRange:[91,120],title:`The High Mountain Passes of Heaps & Backtracking`,description:`Perilous alpine ridges and snowy peaks overlooking the deep Spire valley.`,bgLore:`From the highest ridge, the base of the Spire is in sight through the swirling mountain mist!`},{floorRange:[121,149],title:`The Enchanted Valley of Dynamic Programming`,description:`Shimmering mystical grounds where optimal decisions bridge the final moat.`,bgLore:`The final leagues! The Spire looms directly ahead, its ancient runic wards trembling.`},{floorRange:[150,150],title:`The Gates of the Big-O Spire`,description:`Standing at the threshold of the grand obsidian gates to shatter the seal and free Aurelia!`,bgLore:`150 algorithmic leagues conquered! You have completed the grand journey and reached the Spire!`}];function ne(e){return te.find(t=>e>=t.floorRange[0]&&e<=t.floorRange[1])||te[0]}var re={30:{id:`letter-30`,floor:30,chapterTitle:`The Plains of Arrays & Strings`,title:`A Courier from the Open Plains`,letterText:`My Dearest Champion, From the highest window of the Spire, I watched your travel banner cross the border stones of the open plains. Thirty leagues conquered! @@ -46,10 +46,10 @@ You did not just conquer a list of problems—you demonstrated the rarest virtue The tower is open. Step through the archway, hero—let us walk out into the sunlight together. Free at last, -Aurelia`}},ae={problem_correct:[{text:`Yes! Nicely done. Getting a stubborn problem to pass cleanly always feels so satisfying.`,emotion:`excited_expression`},{text:`Look at that—another one down! You’re really finding your rhythm today.`,emotion:`smiling_warmly`},{text:`Awesome job! Step by step, you’re steadily working your way through all of these.`,emotion:`smiling_warmly`}],problem_incorrect:[{text:`Hey, don’t sweat it. Even seasoned engineers stumble on test cases constantly. We can always look at the edge cases again.`,emotion:`concerned`},{text:`Take a breath. Getting stuck isn’t failing—it’s literally just your brain building the intuition for the next time.`,emotion:`thinking_expression`},{text:`Ugh, those hidden edge cases can be ruthless. Give your mind a minute to clear, then come back to it with fresh eyes.`,emotion:`smiling_warmly`}],break_reminder:[{text:`Hey, you’ve been at this for a while. Go grab some water and stretch your shoulders for five minutes—trust me, you’ve earned it.`,emotion:`concerned`},{text:`Quick check-in: how are your eyes feeling? Step away from the screen for just a few minutes.`,emotion:`smiling_warmly`}],idle_chat:[{text:`Hey! Thanks for stopping by to chat. How’s your headspace today?`,emotion:`smiling_warmly`},{text:`Whenever the whole 150-problem journey feels overwhelming, just remember: you only ever have to solve the one in front of you.`,emotion:`thinking_expression`}]};async function oe(e){let t=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,n=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;try{let{data:{session:r}}=await j.auth.getSession(),i={"Content-Type":`application/json`,Authorization:`Bearer ${r?.access_token||`sandbox`}`};t.trim()&&n!=="default"&&(i[`x-custom-api-key`]=t.trim(),i[`x-gemini-api-key`]=t.trim(),i[`x-ai-provider`]=n);let a=e.messages.map(e=>({sender:e.sender,text:e.text,emotion:e.emotion})),o={princess_name:e.princess_name||`Princess Aurelia`,user_message:e.user_message,current_floor:e.current_floor,streak_days:e.streak_days||0,hero_name:e.hero_name||`Champion`,target_goal:e.target_goal||``,bond_tier:e.bond_tier||`Acquaintance`,current_rhythm:e.current_rhythm||`day`,hero_codex:e.hero_codex,episodic_memories:e.episodic_memories,messages:a},s=await fetch(`/api/companion/chat`,{method:`POST`,headers:i,body:JSON.stringify(o)});if(s.ok){let e=await s.json();if(e.text)return{text:e.text,emotion:e.emotion||`smiling_warmly`,tool_calls:Array.isArray(e.tool_calls)?e.tool_calls:[],choice_suggestions:Array.isArray(e.choice_suggestions)?e.choice_suggestions:[],provider_used:e.provider_used||`Spire Agent`}}}catch(e){console.warn(`[CompanionAPI] Backend endpoint unreachable, falling back to offline grimoire:`,e)}let r=ae.idle_chat,i=r[Math.floor(Math.random()*r.length)];return{text:i.text,emotion:i.emotion,tool_calls:[],choice_suggestions:[`Tell me about the Spire`,`Can we take a rest by the fire?`],provider_used:`Offline Script`}}async function se(e,t){let n=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,r=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;try{let{data:{session:i}}=await j.auth.getSession(),a={"Content-Type":`application/json`,Authorization:`Bearer ${i?.access_token||`sandbox`}`};n.trim()&&r!=="default"&&(a[`x-custom-api-key`]=n.trim(),a[`x-gemini-api-key`]=n.trim(),a[`x-ai-provider`]=r);let o=e.messages.map(e=>({sender:e.sender,text:e.text,emotion:e.emotion})),s={princess_name:e.princess_name||`Princess Aurelia`,user_message:e.user_message,current_floor:e.current_floor,streak_days:e.streak_days||0,hero_name:e.hero_name||`Champion`,target_goal:e.target_goal||``,bond_tier:e.bond_tier||`Acquaintance`,current_rhythm:e.current_rhythm||`day`,hero_codex:e.hero_codex,episodic_memories:e.episodic_memories,messages:o},c=await fetch(`/api/companion/chat/stream`,{method:`POST`,headers:a,body:JSON.stringify(s)});if(!c.ok||!c.body)throw Error(`Streaming failed with status ${c.status}`);let l=c.body.getReader(),u=new TextDecoder(`utf-8`),d=``,f=!1;for(;;){let{done:e,value:n}=await l.read();if(e)break;d+=u.decode(n,{stream:!0});let r=d.split(` +Aurelia`}},ie={problem_correct:[{text:`Yes! Nicely done. Getting a stubborn problem to pass cleanly always feels so satisfying.`,emotion:`excited_expression`},{text:`Look at that—another one down! You’re really finding your rhythm today.`,emotion:`smiling_warmly`},{text:`Awesome job! Step by step, you’re steadily working your way through all of these.`,emotion:`smiling_warmly`}],problem_incorrect:[{text:`Hey, don’t sweat it. Even seasoned engineers stumble on test cases constantly. We can always look at the edge cases again.`,emotion:`concerned`},{text:`Take a breath. Getting stuck isn’t failing—it’s literally just your brain building the intuition for the next time.`,emotion:`thinking_expression`},{text:`Ugh, those hidden edge cases can be ruthless. Give your mind a minute to clear, then come back to it with fresh eyes.`,emotion:`smiling_warmly`}],break_reminder:[{text:`Hey, you’ve been at this for a while. Go grab some water and stretch your shoulders for five minutes—trust me, you’ve earned it.`,emotion:`concerned`},{text:`Quick check-in: how are your eyes feeling? Step away from the screen for just a few minutes.`,emotion:`smiling_warmly`}],idle_chat:[{text:`Hey! Thanks for stopping by to chat. How’s your headspace today?`,emotion:`smiling_warmly`},{text:`Whenever the whole 150-problem journey feels overwhelming, just remember: you only ever have to solve the one in front of you.`,emotion:`thinking_expression`}]};async function ae(e){let t=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,n=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;try{let{data:{session:r}}=await j.auth.getSession(),i={"Content-Type":`application/json`,Authorization:`Bearer ${r?.access_token||`sandbox`}`};t.trim()&&n!=="default"&&(i[`x-custom-api-key`]=t.trim(),i[`x-gemini-api-key`]=t.trim(),i[`x-ai-provider`]=n);let a=e.messages.map(e=>({sender:e.sender,text:e.text,emotion:e.emotion})),o={princess_name:e.princess_name||`Princess Aurelia`,user_message:e.user_message,current_floor:e.current_floor,streak_days:e.streak_days||0,hero_name:e.hero_name||`Champion`,target_goal:e.target_goal||``,bond_tier:e.bond_tier||`Acquaintance`,current_rhythm:e.current_rhythm||`day`,hero_codex:e.hero_codex,episodic_memories:e.episodic_memories,messages:a},s=await fetch(`/api/companion/chat`,{method:`POST`,headers:i,body:JSON.stringify(o)});if(s.ok){let e=await s.json();if(e.text)return{text:e.text,emotion:e.emotion||`smiling_warmly`,tool_calls:Array.isArray(e.tool_calls)?e.tool_calls:[],choice_suggestions:Array.isArray(e.choice_suggestions)?e.choice_suggestions:[],provider_used:e.provider_used||`Spire Agent`}}}catch(e){console.warn(`[CompanionAPI] Backend endpoint unreachable, falling back to offline grimoire:`,e)}let r=ie.idle_chat,i=r[Math.floor(Math.random()*r.length)];return{text:i.text,emotion:i.emotion,tool_calls:[],choice_suggestions:[`Tell me about the Spire`,`Can we take a rest by the fire?`],provider_used:`Offline Script`}}async function oe(e,t){let n=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`)||``,r=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;try{let{data:{session:i}}=await j.auth.getSession(),a={"Content-Type":`application/json`,Authorization:`Bearer ${i?.access_token||`sandbox`}`};n.trim()&&r!=="default"&&(a[`x-custom-api-key`]=n.trim(),a[`x-gemini-api-key`]=n.trim(),a[`x-ai-provider`]=r);let o=e.messages.map(e=>({sender:e.sender,text:e.text,emotion:e.emotion})),s={princess_name:e.princess_name||`Princess Aurelia`,user_message:e.user_message,current_floor:e.current_floor,streak_days:e.streak_days||0,hero_name:e.hero_name||`Champion`,target_goal:e.target_goal||``,bond_tier:e.bond_tier||`Acquaintance`,current_rhythm:e.current_rhythm||`day`,hero_codex:e.hero_codex,episodic_memories:e.episodic_memories,messages:o},c=await fetch(`/api/companion/chat/stream`,{method:`POST`,headers:a,body:JSON.stringify(s)});if(!c.ok||!c.body)throw Error(`Streaming failed with status ${c.status}`);let l=c.body.getReader(),u=new TextDecoder(`utf-8`),d=``,f=!1;for(;;){let{done:e,value:n}=await l.read();if(e)break;d+=u.decode(n,{stream:!0});let r=d.split(` `);d=r.pop()||``;for(let e of r){if(!e.trim())continue;let n=`message`,r=``,i=e.split(` -`);for(let e of i)e.startsWith(`event:`)?n=e.replace(`event:`,``).trim():e.startsWith(`data:`)&&(r=e.replace(`data:`,``).trim());if(n===`text_delta`&&r)try{let e=JSON.parse(r);e.delta&&t.onDelta(e.delta)}catch(e){console.warn(`[CompanionAPI] Failed to parse delta:`,e)}else if(n===`done`&&r)try{let e=JSON.parse(r);f=!0,t.onDone({text:e.text||``,emotion:e.emotion||`smiling_warmly`,tool_calls:Array.isArray(e.tool_calls)?e.tool_calls:[],choice_suggestions:Array.isArray(e.choice_suggestions)?e.choice_suggestions:[],provider_used:e.provider_used||`Spire Agent Stream`})}catch(e){console.warn(`[CompanionAPI] Failed to parse done payload:`,e)}else if(n===`error`&&r){f=!0;try{let e=JSON.parse(r);t.onDone({text:e.text||`Stay strong, champion!`,emotion:e.emotion||`smiling_warmly`,tool_calls:[],choice_suggestions:e.choice_suggestions||[],provider_used:`fallback`})}catch(e){console.warn(`[CompanionAPI] Error event parse failed:`,e)}}}}if(!f){let n=await oe(e);t.onDone(n)}}catch(n){console.warn(`[CompanionAPI] Stream error, falling back to standard API:`,n);try{let n=await oe(e);t.onDone(n)}catch(e){t.onError?.(e)}}}async function ce(e){try{let{data:{session:t}}=await j.auth.getSession(),n=t?.access_token||`sandbox`;await fetch(`/api/companion/telemetry`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({...e,source:`client`,timestamp:e.timestamp||Date.now()/1e3})})}catch{}}var le={open_app_window:e=>{let t=String(e.window_id||e.windowId||`queue`).toLowerCase(),n=t;return[`reviewer`,`code_reviewer`,`ai`,`grimoire`].includes(t)?n=`queue`:[`map`,`path`,`trail`].includes(t)?n=`journey`:[`files`,`explorer`,`system`].includes(t)&&(n=`computer`),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:open_window`,{detail:{windowId:n}})),{toolName:`open_app_window`,success:!0,message:`Summoned window: ${n}`,data:{windowId:n}}},set_study_timer:e=>{let t=Math.max(1,Math.min(120,Number(e.minutes||10)));return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:start_timer`,{detail:{minutes:t}})),{toolName:`set_study_timer`,success:!0,message:`Set tower countdown hourglass for ${t} minutes.`,data:{minutes:t}}},play_ambient_sound:e=>{let t=String(e.soundscape||`campfire`).toLowerCase();return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:play_soundscape`,{detail:{soundscape:t}})),{toolName:`play_ambient_sound`,success:!0,message:`Kindled ambient soundscape: ${t}.`,data:{soundscape:t}}},bookmark_for_spaced_review:e=>{let t=String(e.problem_name||e.problemName||`Unspecified Problem`),n=String(e.reason||`Flagged by Princess Aurelia for reinforcement`);return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:bookmark_problem`,{detail:{problemName:t,reason:n}})),{toolName:`bookmark_for_spaced_review`,success:!0,message:`Marked "${t}" in the royal grimoire for priority review.`,data:{problemName:t,reason:n}}},write_spire_diary:e=>{let t=String(e.entry||e.text||``).trim();return t?(typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:write_diary`,{detail:{text:t}})),{toolName:`write_spire_diary`,success:!0,message:`Recorded observation into the Spire Chronicles.`,data:{text:t}}):{toolName:`write_spire_diary`,success:!1,message:`Empty diary entry provided.`}},update_hero_codex:e=>{let t=String(e.key||``).trim(),n=String(e.value||``).trim();return!t||!n?{toolName:`update_hero_codex`,success:!1,message:`Missing key or value for hero codex update.`}:(typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:update_codex`,{detail:{key:t,value:n}})),{toolName:`update_hero_codex`,success:!0,message:`Updated Hero Codex: ${t} -> ${n}`,data:{key:t,value:n}})},record_episodic_event:e=>{let t=String(e.eventType||e.event_type||`session_summary`),n=String(e.title||`Event`).trim(),r=String(e.description||``).trim(),i=e.relatedPattern||e.related_pattern?String(e.relatedPattern||e.related_pattern):void 0;return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:record_event`,{detail:{eventType:t,title:n,description:r,relatedPattern:i}})),{toolName:`record_episodic_event`,success:!0,message:`Recorded episodic memory: ${n}`,data:{eventType:t,title:n,description:r,relatedPattern:i}}}};async function ue(e){let t=le[e.name],n=typeof performance<`u`?performance.now():Date.now();if(!t){console.warn(`[AgentTools] No handler registered for tool: ${e.name}`);let t={toolName:e.name,success:!1,message:`Unknown enchantment: ${e.name}`,durationMs:0};return ce({tool_name:e.name,args:e.args,success:!1,error:t.message,execution_time_ms:0}),t}try{let r=await t(e.args||{}),i=typeof performance<`u`?performance.now():Date.now(),a=Math.round(i-n),o={...r,durationMs:a};return ce({tool_name:e.name,args:e.args,success:o.success,error:o.success?void 0:o.message,execution_time_ms:a}),o}catch(t){console.error(`[AgentTools] Error executing ${e.name}:`,t);let r=typeof performance<`u`?performance.now():Date.now(),i=Math.round(r-n),a={toolName:e.name,success:!1,message:t?.message||`Tool execution encountered an error.`,durationMs:i};return ce({tool_name:e.name,args:e.args,success:!1,error:a.message,execution_time_ms:i}),a}}var de={dawn:{state:`dawn`,label:`Morning Sunbreak`,hourRange:[6,12],activity:`Sipping warm mountain tea and watching the sunrise over the valley`,lightingClass:`from-amber-100/90 via-yellow-50/80 to-amber-200/50`,defaultEmotion:`smiling_warmly`,greetings:[`Morning! The sunrise looks pretty incredible from up here today. How are you feeling—ready to solve a few problems, or still waiting for your coffee to kick in?`,`Hey, good morning! Did you get some good rest? Don’t rush into the hardest problems right away—let’s ease in with a warmup.`,`Good morning! It’s really quiet and peaceful right now. Honestly the best time to get some focused thinking done before the rest of the world wakes up.`]},day:{state:`day`,label:`High Sun`,hourRange:[12,18],activity:`Reviewing architectural scrolls in the tower library`,lightingClass:`from-sky-100/80 via-amber-50/70 to-yellow-100/60`,defaultEmotion:`neutral`,greetings:[`Hey, welcome back! How’s your focus holding up today? Remember to step back and take a breath if your eyes start feeling tired.`,`Hey there! I was just organizing some notes in the tower library. What problem pattern are we working through right now?`,`Good to see you! Remember, steady consistency beats frantic cramming every single time. One clean solution at a time.`]},dusk:{state:`dusk`,label:`Twilight & Beacon Fire`,hourRange:[18,22],activity:`Lighting lanterns along the stone balcony as the sun sets`,lightingClass:`from-orange-100/90 via-purple-100/60 to-amber-200/70`,defaultEmotion:`smiling_warmly`,greetings:[`Evening! You’ve put in solid effort today. How are you feeling—ready to wrap things up, or finishing one last review?`,`Hey, the sun is setting over the valley. It’s so easy to lose track of time when deep in code. Make sure you stretch your neck and shoulders a bit.`,`Good evening! How did today’s practice go? Even getting through one tricky problem is real, meaningful progress.`]},night:{state:`night`,label:`Midnight Candlelight`,hourRange:[22,6],activity:`Listening to the quiet wind outside by soft candlelight`,lightingClass:`from-indigo-950/80 via-slate-900/90 to-amber-950/40 text-amber-100`,defaultEmotion:`concerned`,greetings:[`Hey... it’s getting really late. Are you okay? Late-night debugging usually just turns simple typos into monsters—promise me you’ll head to sleep soon.`,`Midnight already? I’m always glad to talk with you, but coding while exhausted will just burn you out. Take it easy tonight, okay?`,`Still awake? Don’t push yourself past your limit. Your brain actually reorganizes problem solutions while you sleep—go rest up for tomorrow.`]}};function fe(e=new Date){let t=e.getHours();return t>=6&&t<12?`dawn`:t>=12&&t<18?`day`:t>=18&&t<22?`dusk`:`night`}function pe(e=new Date){return de[fe(e)]}function me(e=`Champion`){let t=pe(),n=t.greetings;return{text:(n[Math.floor(Math.random()*n.length)]||n[0]).replace(/\{hero\}/g,e||`Champion`),emotion:t.defaultEmotion,rhythm:t.state}}function he(e,t=`Champion`){return{text:`Hey, ${t}... ${e} misses in a row is almost always mental fatigue, not a lack of ability. Step away from the screen for just five minutes, grab a drink of water, and let your head clear. You’ll see the solution much faster once you reset.`,emotion:`concerned`}}var ge=`algospaced_companion_state_v2`,_e={enabled:!0,name:`Princess Aurelia`,backstory:`Princess Aurelia is a noble, intelligent, and deeply caring scholar-princess trapped inside the Spire of Big-O Complexity. You are her champion traveling the 150 leagues of the royal road to break her magical seals.`,breakIntervalMinutes:25,soundEnabled:!0,autoPopupEnabled:!0},ve={heroName:`Champion`,targetGoal:``,preferredLanguage:`Python`,strengths:[],nemesisPatterns:[],personalNotes:[],lastUpdated:Date.now()};function ye(e,t,n){let r={...e,lastUpdated:Date.now()},i=n.trim();if(!i)return e;switch(t){case`heroName`:r.heroName=i;break;case`targetGoal`:r.targetGoal=i;break;case`preferredLanguage`:r.preferredLanguage=i;break;case`strengths`:r.strengths.includes(i)||(r.strengths=[...r.strengths,i].slice(-10));break;case`nemesisPatterns`:r.nemesisPatterns.includes(i)||(r.nemesisPatterns=[...r.nemesisPatterns,i].slice(-10));break;case`personalNotes`:{let e=r.personalNotes.findIndex(e=>e.toLowerCase().includes(i.toLowerCase().slice(0,15)));e>=0?r.personalNotes[e]=i:r.personalNotes=[...r.personalNotes,i].slice(-15);break}default:r.personalNotes.includes(i)||(r.personalNotes=[...r.personalNotes,i].slice(-15))}return r}function be(e,t,n,r=3){if(!e||e.length===0)return[];let i=(t+` `+(n||``)).toLowerCase(),a=e.map((e,t)=>{let r=0,a=(e.title+` `+e.description+` `+(e.relatedPattern||``)).toLowerCase();n&&e.relatedPattern&&e.relatedPattern.toLowerCase()===n.toLowerCase()&&(r+=5);let o=i.split(/\s+/).filter(e=>e.length>3);for(let e of o)a.includes(e)&&(r+=2);let s=(Date.now()-e.timestamp)/864e5;return r+=Math.max(0,3-s*.3),e.eventType===`breakthrough`&&(r+=2),e.eventType===`fatigue_episode`&&(r+=2),{event:e,index:t,score:r}});a.sort((e,t)=>t.score-e.score);let o=a.slice(0,2),s=new Set,c=[];for(let t of o)if(!(t.score<=.5)&&(s.has(t.event.id)||(s.add(t.event.id),c.push(`[${t.event.eventType.toUpperCase()}] ${t.event.title}: ${t.event.description}`)),t.event.contiguousEventId)){let n=e.find(e=>e.id===t.event.contiguousEventId);n&&!s.has(n.id)&&c.length=50?`Soulbound Confidante`:e>=10?`Trusted Ally`:`Acquaintance`}function Se(){let e=pe(),t={id:`turn-init`,sender:`princess`,text:`Hey! I’m Aurelia. It gets pretty quiet up here in the tower, so I’m really glad you stopped by. How are you holding up with your coding practice today?`,emotion:`smiling_warmly`,timestamp:Date.now(),provider:`Spire Relay`};try{let n=localStorage.getItem(ge);if(n){let r=JSON.parse(n),i=Array.isArray(r.transcript)&&r.transcript.length>0?r.transcript:[t],a=i.filter(e=>e.sender===`user`).length;return{transcript:i,activeEmotion:r.activeEmotion||e.defaultEmotion,isTyping:!1,isLoading:!1,heroProfile:r.heroProfile||{heroName:`Champion`,targetGoal:``},heroCodex:r.heroCodex||{...ve,heroName:r.heroProfile?.heroName||`Champion`,targetGoal:r.heroProfile?.targetGoal||``},episodicEvents:Array.isArray(r.episodicEvents)?r.episodicEvents:[],journeyLog:Array.isArray(r.journeyLog)?r.journeyLog:[],currentFloor:Number(r.currentFloor||0),maxFloor:150,totalSolved:Number(r.totalSolved||r.currentFloor||0),unlockedMilestones:Array.isArray(r.unlockedMilestones)?r.unlockedMilestones:[0],unlockedLetters:Array.isArray(r.unlockedLetters)?r.unlockedLetters:[],spireChronicles:Array.isArray(r.spireChronicles)?r.spireChronicles:[],bondTier:xe(a),currentRhythm:e.state,currentActivity:e.activity,companionSettings:{..._e,...r.companionSettings||{}},consecutiveFailures:0,recentToolTelemetry:Array.isArray(r.recentToolTelemetry)?r.recentToolTelemetry:[]}}}catch(e){console.warn(`[CompanionStore] Failed to load from localStorage:`,e)}return{transcript:[t],activeEmotion:e.defaultEmotion,isTyping:!1,isLoading:!1,heroProfile:{heroName:`Champion`,targetGoal:``},heroCodex:ve,episodicEvents:[],journeyLog:[],currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0],unlockedLetters:[],spireChronicles:[],bondTier:`Acquaintance`,currentRhythm:e.state,currentActivity:e.activity,companionSettings:_e,consecutiveFailures:0,recentToolTelemetry:[]}}var K=Se(),Ce=new Set;function we(){try{let e={transcript:K.transcript.slice(-60),activeEmotion:K.activeEmotion,heroProfile:K.heroProfile,heroCodex:K.heroCodex,episodicEvents:K.episodicEvents.slice(-40),journeyLog:K.journeyLog.slice(-50),currentFloor:K.currentFloor,totalSolved:K.totalSolved,unlockedMilestones:K.unlockedMilestones,unlockedLetters:K.unlockedLetters,spireChronicles:K.spireChronicles.slice(-30),companionSettings:K.companionSettings,recentToolTelemetry:(K.recentToolTelemetry||[]).slice(-30)};localStorage.setItem(ge,JSON.stringify(e))}catch(e){console.error(`[CompanionStore] Save error:`,e)}Ce.forEach(e=>e())}function q(e){K={...K,...e},we()}var J={getState:()=>K,subscribe:e=>(Ce.add(e),()=>Ce.delete(e)),setEmotion:e=>{q({activeEmotion:e})},setIsTyping:e=>{K.isTyping!==e&&q({isTyping:e})},updateProfile:e=>{q({heroProfile:{...K.heroProfile,...e}})},updateCodex:(e,t)=>{let n=ye(K.heroCodex,e,t);q({heroCodex:n,heroProfile:{...K.heroProfile,heroName:n.heroName,targetGoal:n.targetGoal,preferredLanguage:n.preferredLanguage}})},removeCodexItem:(e,t)=>{let n=(K.heroCodex[e]||[]).filter(e=>e!==t);q({heroCodex:{...K.heroCodex,[e]:n,lastUpdated:Date.now()}})},recordEpisodicEvent:e=>{let t=K.episodicEvents[0];q({episodicEvents:[{id:`ev-${Date.now()}`,timestamp:Date.now(),...e,contiguousEventId:e.contiguousEventId||t?.id},...K.episodicEvents].slice(0,40)})},updateSettings:e=>{q({companionSettings:{...K.companionSettings,...e}})},executeTool:async e=>{let t=await ue(e);return e.name===`write_spire_diary`&&t.success&&t.data?.text?J.addDiaryEntry(t.data.text):e.name===`update_hero_codex`&&t.success&&t.data?.key&&t.data?.value?J.updateCodex(t.data.key,t.data.value):e.name===`record_episodic_event`&&t.success&&t.data&&J.recordEpisodicEvent({eventType:t.data.eventType||`session_summary`,title:t.data.title||`Event`,description:t.data.description||``,relatedPattern:t.data.relatedPattern,emotionalTone:K.activeEmotion}),q({recentToolTelemetry:[{tool_name:e.name,args:e.args,success:t.success,execution_time_ms:t.durationMs||0,hero_name:K.heroCodex.heroName||`Champion`,source:`client`,error:t.success?void 0:t.message,timestamp:Date.now()/1e3},...K.recentToolTelemetry||[]].slice(0,30)}),t},addDiaryEntry:e=>{q({spireChronicles:[{id:`diary-${Date.now()}`,timestamp:Date.now(),floor:K.currentFloor,text:e},...K.spireChronicles]})},sendMessage:async e=>{let t=e.trim();if(!t||K.isLoading)return;let n={id:`user-${Date.now()}`,sender:`user`,text:t,timestamp:Date.now()},r=[...K.transcript,n],i=r.filter(e=>e.sender===`user`).length,a=xe(i),o=`princess-${Date.now()}`,s={id:o,sender:`princess`,text:``,emotion:`thinking_expression`,timestamp:Date.now(),isStreaming:!0,provider:`Spire Agent Stream`};q({transcript:[...r,s],isLoading:!0,isTyping:!0,activeEmotion:`thinking_expression`,bondTier:a});try{let e=pe(),n=be(K.episodicEvents,t),i=``;await se({princess_name:K.companionSettings.name,user_message:t,current_floor:K.currentFloor,streak_days:0,hero_name:K.heroCodex.heroName||K.heroProfile.heroName||`Champion`,target_goal:K.heroCodex.targetGoal||K.heroProfile.targetGoal,bond_tier:a,current_rhythm:e.state,hero_codex:K.heroCodex,episodic_memories:n,messages:r.slice(-10)},{onDelta:e=>{i+=e,q({transcript:K.transcript.map(e=>e.id===o?{...e,text:i,isStreaming:!0}:e),isLoading:!1,isTyping:!0})},onDone:e=>{if(Array.isArray(e.tool_calls))for(let t of e.tool_calls)J.executeTool(t);let t=e.text||i||`I believe in you, champion!`;q({transcript:K.transcript.map(n=>n.id===o?{...n,text:t,emotion:e.emotion,toolCalls:e.tool_calls,choiceSuggestions:e.choice_suggestions,provider:e.provider_used||`Spire Agent Stream`,isStreaming:!1}:n),activeEmotion:e.emotion,isLoading:!1,isTyping:!1})},onError:e=>{console.warn(`[CompanionStore] Stream failed, using fallback:`,e);let t=ae.idle_chat,n=t[Math.floor(Math.random()*t.length)];q({transcript:K.transcript.map(e=>e.id===o?{...e,text:n.text,emotion:n.emotion,provider:`Offline Script`,isStreaming:!1}:e),activeEmotion:n.emotion,isLoading:!1,isTyping:!1})}})}catch(e){console.error(`[CompanionStore] Send message error:`,e);let t=ae.idle_chat,n=t[Math.floor(Math.random()*t.length)],r={id:o,sender:`princess`,text:n.text,emotion:n.emotion,timestamp:Date.now(),provider:`Offline Script`,isStreaming:!1};q({transcript:K.transcript.map(e=>e.id===o?r:e),activeEmotion:n.emotion,isLoading:!1,isTyping:!1})}},addReviewEvent:async(e,t=`a problem`,n=``)=>{let r=e===`Correct`,i=K.currentFloor,a=K.totalSolved,o=[...K.unlockedMilestones],s=[...K.unlockedLetters],c=K.consecutiveFailures,l=r?0:c+1,u=!1,d=0;if(r&&K.currentFloor=e&&!o.includes(e)){o.push(e),u=!0,d=e;let t=ie[e];t&&!s.some(t=>t.floor===e)&&s.push({...t,unlockedAt:Date.now()})}}let f={id:`ep-${Date.now()}`,timestamp:Date.now(),type:r?`victory`:`struggle`,summary:`${r?`Mastered`:`Faced`} ${t} (${n||`DSA`}) - Graded ${e}`,floor:i};if(q({currentFloor:i,totalSolved:a,unlockedMilestones:o,unlockedLetters:s,consecutiveFailures:l,journeyLog:[f,...K.journeyLog]}),u&&J.recordEpisodicEvent({eventType:`milestone`,title:`Passed League ${d}`,description:`Advanced past League ${d} on the road to the Spire of Big-O! Unlocked a royal missive from Aurelia.`,relatedPattern:n,emotionalTone:`excited_expression`}),r&&c>=2){let e=K.episodicEvents.find(e=>e.eventType===`fatigue_episode`||n&&e.relatedPattern?.toLowerCase()===n.toLowerCase());J.recordEpisodicEvent({eventType:`breakthrough`,title:`Breakthrough: ${t}`,description:`Broke through previous hurdles to solve ${t}${n?` (${n})`:``} flawlessly!`,relatedPattern:n,emotionalTone:`excited_expression`,contiguousEventId:e?.id})}if(l>=3){J.recordEpisodicEvent({eventType:`fatigue_episode`,title:`Fatigue: ${n||t}`,description:`Encountered 3 consecutive review struggles, most recently on ${t}${n?` (${n})`:``}. Aurelia intervened with rest advice.`,relatedPattern:n,emotionalTone:`concerned`});let e=he(l,K.heroProfile.heroName),r={id:`fatigue-${Date.now()}`,sender:`princess`,text:e.text,emotion:e.emotion,timestamp:Date.now(),provider:`Fatigue Watchdog`};q({transcript:[...K.transcript,r],activeEmotion:e.emotion});return}let p=pe(),m=ae[r?`problem_correct`:`problem_incorrect`],h=m[Math.floor(Math.random()*m.length)],g={id:`rev-${Date.now()}`,sender:`princess`,text:h.text,emotion:h.emotion,timestamp:Date.now(),provider:`Journey Log`};q({transcript:[...K.transcript,g],activeEmotion:h.emotion,currentRhythm:p.state,currentActivity:p.activity})},triggerProactiveGreeting:()=>{let e=pe();q({currentRhythm:e.state,currentActivity:e.activity});let t=K.transcript[K.transcript.length-1],n=Date.now();if(t&&n-t.timestamp<18e5)return;let r=me(K.heroProfile.heroName||`Champion`),i={id:`proactive-${n}`,sender:`princess`,text:r.text,emotion:r.emotion,timestamp:n,provider:`Tower Rhythm`};q({transcript:[...K.transcript,i],activeEmotion:r.emotion})},clearTranscript:()=>{q({transcript:[{id:`init-${Date.now()}`,sender:`princess`,text:`The slate is refreshed, champion! How may I accompany your algorithmic journey right now?`,emotion:`smiling_warmly`,timestamp:Date.now(),provider:`Spire Relay`}],activeEmotion:`smiling_warmly`})},syncWithBackend:async()=>{try{let{data:{session:e}}=await j.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},n=await fetch(`/api/journey-progress`,{headers:t});if(n.ok){let e=await n.json(),t=Array.isArray(e)?e.length:0,r=Math.min(150,t),i=[30,60,90,120,150],a=[0],o=[...K.unlockedLetters];i.forEach(e=>{if(r>=e){a.push(e);let t=ie[e];t&&!o.some(t=>t.floor===e)&&o.push({...t,unlockedAt:Date.now()})}}),q({currentFloor:r,totalSolved:t,unlockedMilestones:a,unlockedLetters:o})}}catch(e){console.warn(`[CompanionStore] Sync with backend journey failed:`,e)}}};function Te(){return(0,P.useSyncExternalStore)(J.subscribe,J.getState,J.getState)}var Ee={queue:{isOpen:!0,isMinimized:!1},journey:{isOpen:!1,isMinimized:!1},terminal:{isOpen:!1,isMinimized:!1},computer:{isOpen:!1,isMinimized:!1},sync:{isOpen:!1,isMinimized:!1},github:{isOpen:!1,isMinimized:!1},python:{isOpen:!1,isMinimized:!1},mysql:{isOpen:!1,isMinimized:!1},settings:{isOpen:!1,isMinimized:!1},createProblem:{isOpen:!1,isMinimized:!1},editProblem:{isOpen:!1,isMinimized:!1},companion:{isOpen:!1,isMinimized:!1}},Y=r()(N((e,t)=>({windows:Ee,activeWindow:`queue`,windowZIndexes:{queue:40},maxZIndex:40,windowPositions:{},windowSizes:{},maximizedWindows:{},overrideProblemId:null,editingProblem:null,refreshExplorerTrigger:0,openWindow:n=>{let r=n,i=t().maxZIndex+1;e(e=>({windows:{...e.windows,[r]:{isOpen:!0,isMinimized:!1}},activeWindow:n,maxZIndex:i,windowZIndexes:{...e.windowZIndexes,[n]:i}}))},closeWindow:t=>{let n=t;e(e=>{let r=e.windows[n]||{isOpen:!1,isMinimized:!1},i={...e.windows,[n]:{...r,isOpen:!1}},a=e.activeWindow;if(e.activeWindow===t){let t=Object.entries(i).filter(([,e])=>e.isOpen&&!e.isMinimized).sort((t,n)=>(e.windowZIndexes[n[0]]||0)-(e.windowZIndexes[t[0]]||0));a=t.length>0?t[0][0]:``}return{windows:i,activeWindow:a}})},minimizeWindow:t=>{let n=t;e(e=>{let r=e.windows[n]||{isOpen:!0,isMinimized:!1},i={...e.windows,[n]:{...r,isMinimized:!0}},a=e.activeWindow;if(e.activeWindow===t){let n=Object.entries(i).filter(([e,n])=>n.isOpen&&!n.isMinimized&&e!==t).sort((t,n)=>(e.windowZIndexes[n[0]]||0)-(e.windowZIndexes[t[0]]||0));a=n.length>0?n[0][0]:``}return{windows:i,activeWindow:a}})},toggleWindowMinimize:e=>{let n=e,r=t(),i=r.windows[n]||{isOpen:!1,isMinimized:!1};i.isMinimized||!i.isOpen?t().openWindow(e):r.activeWindow===e?t().minimizeWindow(e):t().focusWindow(e)},focusWindow:n=>{let r=t();if(r.activeWindow===n)return;let i=r.maxZIndex+1;e({activeWindow:n,maxZIndex:i,windowZIndexes:{...r.windowZIndexes,[n]:i}})},setActiveWindow:e=>{t().focusWindow(e)},updateWindowPosition:(t,n,r)=>{e(e=>({windowPositions:{...e.windowPositions,[t]:{x:n,y:r}}}))},updateWindowSize:(t,n,r)=>{e(e=>({windowSizes:{...e.windowSizes,[t]:{width:n,height:r}}}))},toggleMaximize:t=>{e(e=>({maximizedWindows:{...e.maximizedWindows,[t]:!e.maximizedWindows[t]}}))},resetWindowBounds:t=>{e(e=>{let n={...e.windowPositions};delete n[t];let r={...e.windowSizes};delete r[t];let i={...e.maximizedWindows};return delete i[t],{windowPositions:n,windowSizes:r,maximizedWindows:i}})},setOverrideProblemId:t=>{e({overrideProblemId:t})},setEditingProblem:t=>{e({editingProblem:t})},openEditProblem:n=>{e({editingProblem:n}),t().openWindow(`editProblem`)},handleSelectProblemForReview:n=>{e({overrideProblemId:n}),t().openWindow(`queue`)},triggerRefreshExplorer:()=>{e(e=>({refreshExplorerTrigger:e.refreshExplorerTrigger+1}))},isAnyWindowOpen:()=>{let e=t();return Object.values(e.windows).some(e=>e.isOpen&&!e.isMinimized)}}),{name:`algospaced_os_state`,partialize:e=>({windows:e.windows,windowPositions:e.windowPositions,windowSizes:e.windowSizes,maximizedWindows:e.maximizedWindows}),merge:(e,t)=>{let n=e;return{...t,windows:{...t.windows,...n?.windows||{}},windowPositions:n?.windowPositions||t.windowPositions,windowSizes:n?.windowSizes||t.windowSizes,maximizedWindows:n?.maximizedWindows||t.maximizedWindows}}})),De={neutral:{id:`neutral`,label:`Calm`,imagePath:`/sprites/princess/neutral.webp`},smiling_warmly:{id:`smiling_warmly`,label:`Smiling Warmly`,imagePath:`/sprites/princess/smiling_warmly.webp`},excited_expression:{id:`excited_expression`,label:`Excited`,imagePath:`/sprites/princess/excited_expression.webp`},thinking_expression:{id:`thinking_expression`,label:`Thinking`,imagePath:`/sprites/princess/thinking_expression.webp`},concerned:{id:`concerned`,label:`Concerned`,imagePath:`/sprites/princess/concerned.webp`},fear:{id:`fear`,label:`Startled`,imagePath:`/sprites/princess/fear.webp`},sad_expression:{id:`sad_expression`,label:`Melancholy`,imagePath:`/sprites/princess/sad_expression.webp`}},X=null;function Oe(){if(typeof window>`u`)return null;if(!X){let e=window,t=window.AudioContext||e.webkitAudioContext;t&&(X=new t)}return X&&X.state===`suspended`&&X.resume().catch(()=>{}),X}function ke(){try{return localStorage.getItem(`companion_sound_enabled`)===`false`}catch{return!1}}function Ae(e){try{localStorage.setItem(`companion_sound_enabled`,e?`false`:`true`)}catch{}}function je(){if(ke())return;let e=Oe();if(e)try{let t=[523.25,659.25,783.99,1046.5],n=e.currentTime;t.forEach((t,r)=>{let i=e.createOscillator(),a=e.createGain();i.type=`sine`,i.frequency.setValueAtTime(t,n+r*.06),a.gain.setValueAtTime(.06,n+r*.06),a.gain.exponentialRampToValueAtTime(.001,n+r*.06+.18),i.connect(a),a.connect(e.destination),i.start(n+r*.06),i.stop(n+r*.06+.2)})}catch{}}function Me(){if(ke())return;let e=Oe();if(e)try{let t=[440,554.37,659.25,880],n=e.currentTime;t.forEach((t,r)=>{let i=e.createOscillator(),a=e.createGain();i.type=`triangle`,i.frequency.setValueAtTime(t,n+r*.09),a.gain.setValueAtTime(.07,n+r*.09),a.gain.exponentialRampToValueAtTime(1e-4,n+r*.09+.35),i.connect(a),a.connect(e.destination),i.start(n+r*.09),i.stop(n+r*.09+.4)})}catch{}}function Ne({onOpenCompanionWindow:e}){let t=Te(),n=Y(e=>!!e.windows.companion?.isOpen&&!e.windows.companion?.isMinimized),[r,i]=(0,P.useState)(!1),[a,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(ke()),f=(0,P.useRef)(null),p=(0,P.useRef)(null),m=(0,P.useRef)(``);if((0,P.useEffect)(()=>{if(n){f.current&&clearInterval(f.current),p.current&&clearTimeout(p.current);let e=setTimeout(()=>{i(!1)},0);return()=>clearTimeout(e)}},[n]),(0,P.useEffect)(()=>{let e=t.transcript[t.transcript.length-1];if(e&&e.sender===`princess`&&t.companionSettings.enabled&&t.companionSettings.autoPopupEnabled){if(n){m.current=e.id;return}if(e.id!==m.current&&(e.id.startsWith(`rev-`)||e.id.startsWith(`fatigue-`))){m.current=e.id,i(!0),je(),s(``),l(!0);let t=0;f.current&&clearInterval(f.current),f.current=setInterval(()=>{t{i(!1)},8e3))},24)}}},[t.transcript,t.companionSettings.enabled,t.companionSettings.autoPopupEnabled,n]),!r||n)return null;let h=t.transcript[t.transcript.length-1],_=De[t.activeEmotion]||De.smiling_warmly,y=re(t.currentFloor);return(0,I.jsx)(`div`,{className:`fixed bottom-14 right-3 sm:right-6 z-[9990] max-w-[480px] w-[calc(100vw-24px)] transition-all animate-in fade-in slide-in-from-bottom-5 duration-300 select-none`,onClick:()=>{c&&h&&(f.current&&clearInterval(f.current),s(h.text),l(!1))},children:(0,I.jsxs)(`div`,{className:`relative bg-[#FFFDF0] border-[3px] border-ink-black rounded-lg shadow-[6px_6px_0px_0px_#1E293B] overflow-hidden flex flex-col font-sans`,children:[(0,I.jsxs)(`div`,{className:`bg-[#FFE24C] border-b-[3px] border-ink-black px-3 py-1.5 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,I.jsxs)(`span`,{className:`text-xs font-bold font-headline-md text-ink-black tracking-wide truncate flex items-center gap-1`,children:[(0,I.jsx)(T,{className:`w-3.5 h-3.5 text-amber-600 shrink-0`}),t.companionSettings.name||`Princess Aurelia`]}),(0,I.jsxs)(`span`,{className:`bg-ink-black text-[#FFE24C] text-[9px] font-bold font-arcade px-1.5 py-0.5 rounded shrink-0`,children:[t.currentFloor,`/150 LC`]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation();let t=!u;d(t),Ae(t)},className:`p-1 hover:bg-black/10 rounded text-ink-black cursor-pointer border-0 bg-transparent`,title:u?`Unmute Audio`:`Mute Audio`,children:u?(0,I.jsx)(g,{className:`w-3.5 h-3.5`}):(0,I.jsx)(x,{className:`w-3.5 h-3.5`})}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>i(!1),className:`p-1 hover:bg-rose-500 hover:text-white rounded text-ink-black cursor-pointer border-0 bg-transparent`,title:`Dismiss`,children:(0,I.jsx)(C,{className:`w-3.5 h-3.5`})})]})]}),(0,I.jsxs)(`div`,{className:`p-3 sm:p-4 flex gap-3 sm:gap-4 items-start`,children:[(0,I.jsx)(`div`,{className:`relative shrink-0 flex flex-col items-center`,children:(0,I.jsxs)(`div`,{className:`w-16 h-20 sm:w-20 sm:h-24 bg-gradient-to-b from-amber-100 to-amber-200 border-[2px] border-ink-black rounded overflow-hidden shadow-[2px_2px_0px_0px_#1E293B] relative group flex items-center justify-center`,children:[(0,I.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-amber-700/40 pointer-events-none select-none`,children:[(0,I.jsx)(T,{className:`w-6 h-6 animate-pulse`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] mt-1`,children:`Aurelia`})]}),(0,I.jsx)(`img`,{src:_.imagePath,alt:_.label,loading:`eager`,className:`w-full h-full object-cover object-top relative z-10`,onError:e=>{let t=e.currentTarget;t.src.endsWith(`/sprites/princess/neutral.webp`)?t.style.display=`none`:t.src=`/sprites/princess/neutral.webp`}}),(0,I.jsx)(`div`,{className:`absolute bottom-0 inset-x-0 bg-ink-black/80 text-[8px] text-amber-200 text-center py-0.5 font-bold uppercase tracking-wider z-20`,children:_.label})]})}),(0,I.jsxs)(`div`,{className:`flex-1 flex flex-col justify-between min-h-[85px]`,children:[(0,I.jsxs)(`div`,{className:`relative bg-white border-[2px] border-ink-black rounded p-2.5 shadow-xs min-h-[60px]`,children:[(0,I.jsx)(`div`,{className:`absolute -left-[7px] top-4 w-3 h-3 bg-white border-l-[2px] border-b-[2px] border-ink-black rotate-45`}),(0,I.jsxs)(`p`,{className:`text-xs sm:text-[13px] text-ink-black font-medium leading-relaxed m-0 whitespace-pre-wrap`,children:[a,c&&(0,I.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-amber-500 ml-0.5 animate-pulse align-middle`})]})]}),(0,I.jsxs)(`div`,{className:`text-[10px] text-trash-gray font-medium mt-1.5 flex items-center justify-between`,children:[(0,I.jsxs)(`span`,{className:`truncate`,children:[`🗺️ `,y.title]}),c&&(0,I.jsx)(`span`,{className:`text-[9px] text-amber-700 font-bold animate-pulse shrink-0`,children:`Speaking...`})]})]})]}),(0,I.jsxs)(`div`,{className:`px-3 pb-3 pt-1 flex flex-wrap items-center justify-end gap-2 border-t border-amber-200/60 bg-amber-50/40`,children:[(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{e(),i(!1)},className:`flex items-center gap-1 px-2.5 py-1 bg-[#FFE24C] hover:bg-yellow-300 text-ink-black border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,I.jsx)(o,{className:`w-3 h-3`}),(0,I.jsx)(`span`,{children:`Talk to Her`}),(0,I.jsx)(v,{className:`w-3 h-3`})]}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>i(!1),className:`px-2.5 py-1 bg-white hover:bg-slate-100 text-slate-700 border-[2px] border-slate-300 rounded text-[11px] font-bold active:translate-y-0.5 transition-all cursor-pointer`,children:`Dismiss`})]})]})})}var Pe={neutral:{id:`neutral`,label:`Calm`,imagePath:`/sprites/princess/neutral.webp`},smiling_warmly:{id:`smiling_warmly`,label:`Smiling Warmly`,imagePath:`/sprites/princess/smiling_warmly.webp`},excited_expression:{id:`excited_expression`,label:`Excited`,imagePath:`/sprites/princess/excited_expression.webp`},thinking_expression:{id:`thinking_expression`,label:`Thinking`,imagePath:`/sprites/princess/thinking_expression.webp`},concerned:{id:`concerned`,label:`Concerned`,imagePath:`/sprites/princess/concerned.webp`},fear:{id:`fear`,label:`Startled`,imagePath:`/sprites/princess/fear.webp`},sad_expression:{id:`sad_expression`,label:`Melancholy`,imagePath:`/sprites/princess/sad_expression.webp`}},Fe={enabled:!0,name:`Princess Aurelia`,backstory:`Princess Aurelia is trapped in the high Spire of Big-O Complexity. You are a brave traveler journeying across the kingdom. By mastering all 150 LeetCode problems along the royal road, you will reach the tower gates and break her magical seal!`,breakIntervalMinutes:25,soundEnabled:!0,autoPopupEnabled:!0},Ie=[{floorRange:[1,30],title:`The Plains of Arrays & Strings`,description:`Rolling green meadows and ancient cobblestone roads where the journey begins.`,bgLore:`Looking out towards the distant horizon, the silhouette of the Spire pierces the clouds.`},{floorRange:[31,60],title:`The Whispering Forest of Pointers`,description:`Winding paths through dense groves where two pointers guide your compass.`,bgLore:`Aurelia’s magical beacon shines above the treetops, guiding your footsteps along the trail.`},{floorRange:[61,90],title:`The Grand Caverns of Trees & Graphs`,description:`Bioluminescent caves with branching crystal arches and subterranean passes.`,bgLore:`Halfway to the tower! Her voice echoes with hope over the enchanted royal relay.`},{floorRange:[91,120],title:`The High Mountain Passes of Heaps & Backtracking`,description:`Perilous alpine ridges and snowy peaks overlooking the Spire valley.`,bgLore:`From the highest ridge, the base of the Spire is in sight through the mountain mist!`},{floorRange:[121,149],title:`The Enchanted Valley of Dynamic Programming`,description:`Shimmering mystical grounds where optimal solutions bridge the final moat.`,bgLore:`The final leagues! The Spire looms directly ahead, its ancient runic wards trembling.`},{floorRange:[150,150],title:`The Gates of the Big-O Spire`,description:`Standing at the threshold of the grand tower gates to break the seal and free Aurelia!`,bgLore:`150 algorithms conquered! You have completed the grand journey and reached the Spire!`}],Le={break_reminder:[{id:`br-1`,text:`Brave traveler! You have traveled many leagues today. Even the swiftest steeds rest by the campfire—shall we pause for a stretch and some water?`,emotion:`concerned`,context:`break_reminder`},{id:`br-2`,text:`I can see your progress across the plains from my tower window! Please rest your eyes for a moment; a clear mind travels swiftest.`,emotion:`smiling_warmly`,context:`break_reminder`},{id:`br-3`,text:`The evening winds carry word of your relentless march. Take 5 minutes to rest—I will keep watch from the Spire beacon!`,emotion:`thinking_expression`,context:`break_reminder`},{id:`br-4`,text:`Do not exhaust yourself on the road, my hero! Pacing is the secret to enduring a 150-problem expedition. Let us take a short pause.`,emotion:`concerned`,context:`break_reminder`}],problem_correct:[{id:`pc-1`,text:`Magnificent! You conquered that obstacle and advanced another league closer to my tower!`,emotion:`excited_expression`,context:`problem_correct`},{id:`pc-2`,text:`A flawless solution! With every problem you master, the distance between us grows shorter.`,emotion:`smiling_warmly`,context:`problem_correct`},{id:`pc-3`,text:`Incredible speed and elegance! I felt the Spire beacon flare with light as you crossed another milestone!`,emotion:`excited_expression`,context:`problem_correct`},{id:`pc-4`,text:`You handled that algorithm with true mastery. Step by step, league by league, you are approaching the Spire gates!`,emotion:`smiling_warmly`,context:`problem_correct`}],problem_incorrect:[{id:`pi-1`,text:`Do not despair, noble traveler! The road to the Spire has rough terrain. Review the edge cases and let us push forward!`,emotion:`concerned`,context:`problem_incorrect`},{id:`pi-2`,text:`Every wrong turn on the map teaches you the true layout of the land. Let us examine the test case together.`,emotion:`thinking_expression`,context:`problem_incorrect`},{id:`pi-3`,text:`Stay steadfast! I believe in your courage and intellect. Take a breath—we will conquer this pass together!`,emotion:`smiling_warmly`,context:`problem_incorrect`},{id:`pi-4`,text:`A challenging problem! But overcoming difficult obstacles is what makes a legendary hero. Keep your head high!`,emotion:`neutral`,context:`problem_incorrect`}],streak_milestone:[{id:`sm-1`,text:`A glorious travel streak! Your daily dedication across the realms is inspiring. The Spire bells chime in your honor!`,emotion:`excited_expression`,context:`streak_milestone`},{id:`sm-2`,text:`Look at that continuous march! Consistency is the true magic that brings you across all 150 leagues to the tower.`,emotion:`smiling_warmly`,context:`streak_milestone`}],study_start:[{id:`ss-1`,text:`Welcome back to the trail, brave adventurer! Which algorithmic territories shall we cross today on our way to the Spire?`,emotion:`smiling_warmly`,context:`study_start`},{id:`ss-2`,text:`I saw the dust of your travel carriage on the horizon! Ready to conquer today’s review queue and draw closer to the tower?`,emotion:`excited_expression`,context:`study_start`}],idle_motivation:[{id:`im-1`,text:`Whenever the trail seems daunting, break the problem into smaller sub-problems. Every step counts toward the 150 milestone!`,emotion:`thinking_expression`,context:`idle_motivation`},{id:`im-2`,text:`I am watching over your journey and cheering you on! Your quest brings hope to this entire realm.`,emotion:`smiling_warmly`,context:`idle_motivation`},{id:`im-3`,text:`150 problems is a grand quest, but you have the intellect and heart to reach the Spire gates!`,emotion:`neutral`,context:`idle_motivation`}],tower_milestone:[{id:`tm-1`,text:`You have crossed the Plains of Arrays! 30 problems mastered—the first realm is behind us!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:30},{id:`tm-2`,text:`You emerged from the Whispering Forest! 60 problems solved—I can see your banner waving near the foothills!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:60},{id:`tm-3`,text:`Through the Grand Caverns! 90 problems conquered—more than halfway to the Spire!`,emotion:`smiling_warmly`,context:`tower_milestone`,floorRequirement:90},{id:`tm-4`,text:`You crested the High Mountain Passes! 120 problems conquered—the Spire valley is right before you!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:120},{id:`tm-5`,text:`YOU HAVE REACHED THE SPIRE GATES! All 150 LeetCode problems conquered! The grand seals shatter—freedom at last, my legendary champion!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:150}],chat_response:[]},Re=`companion_settings`,ze=`tower_progress`;function Be(){try{let e=localStorage.getItem(Re);return e?{...Fe,...JSON.parse(e)}:Fe}catch{return Fe}}function Ve(e){try{localStorage.setItem(Re,JSON.stringify(e))}catch(e){console.error(`Failed to save companion settings:`,e)}}function He(){try{let e=localStorage.getItem(ze);return e?JSON.parse(e):{currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]}}catch{return{currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]}}}function Ue(e){try{localStorage.setItem(ze,JSON.stringify(e))}catch(e){console.error(`Failed to save tower progress:`,e)}}function We(){let e={currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]};return Ue(e),e}async function Ge(){try{let{data:{session:e}}=await j.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},n=await fetch(`/api/journey-progress`,{headers:t});if(n.ok){let e=await n.json(),t=Array.isArray(e)?e.length:0,r=Math.min(150,t),i=[30,60,90,120,150],a=[0];i.forEach(e=>{r>=e&&a.push(e)});let o={currentFloor:r,maxFloor:150,totalSolved:t,unlockedMilestones:a};return Ue(o),o}}catch(e){console.error(`Failed to sync companion progress with backend journey:`,e)}return He()}function Ke(e){return Ie.find(t=>e>=t.floorRange[0]&&e<=t.floorRange[1])||Ie[0]}function qe(e,t){let n=Le[e]||Le.idle_motivation;if(t&&e===`tower_milestone`){let e=n.find(e=>e.floorRequirement===t);if(e)return e}return n[Math.floor(Math.random()*n.length)]||n[0]}function Je({event:e,onClose:t,onOpenCompanionWindow:n}){let r=Y(e=>!!e.windows.companion?.isOpen&&!e.windows.companion?.isMinimized),[i,a]=(0,P.useState)(``),[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(ke()),[d,f]=(0,P.useState)(He()),p=Be(),m=(0,P.useRef)(null),_=(0,P.useRef)(null);if((0,P.useEffect)(()=>{if(r&&e){let e=setTimeout(()=>{t()},0);return()=>clearTimeout(e)}},[r,e,t]),(0,P.useEffect)(()=>{f(He())},[e]),(0,P.useEffect)(()=>{if(!e){a(``),c(!1);return}je();let n=e.text;a(``),c(!0);let r=0;return m.current&&clearInterval(m.current),m.current=setInterval(()=>{r0&&(_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{t()},e.autoCloseDelay)))},28),()=>{m.current&&clearInterval(m.current),_.current&&clearTimeout(_.current)}},[e]),!e||!p.enabled||r)return null;let y=Pe[e.emotion]||Pe.smiling_warmly,b=Ke(d.currentFloor),S=e=>{e.stopPropagation();let t=!l;u(t),Ae(t)},w=()=>{s&&e&&(m.current&&clearInterval(m.current),a(e.text),c(!1))},E=e.context===`break_reminder`;return(0,I.jsx)(`div`,{className:`fixed bottom-14 right-3 sm:right-6 z-[9990] max-w-[480px] w-[calc(100vw-24px)] transition-all animate-in fade-in slide-in-from-bottom-5 duration-300 select-none`,onClick:w,children:(0,I.jsxs)(`div`,{className:`relative bg-[#FFFDF0] border-[3px] border-ink-black rounded-lg shadow-[6px_6px_0px_0px_#1E293B] overflow-hidden flex flex-col font-sans`,children:[(0,I.jsxs)(`div`,{className:`bg-[#FFE24C] border-b-[3px] border-ink-black px-3 py-1.5 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,I.jsxs)(`span`,{className:`text-xs font-bold font-headline-md text-ink-black tracking-wide truncate flex items-center gap-1`,children:[(0,I.jsx)(T,{className:`w-3.5 h-3.5 text-amber-600 shrink-0`}),p.name||`Princess Aurelia`]}),(0,I.jsxs)(`span`,{className:`bg-ink-black text-[#FFE24C] text-[9px] font-bold font-arcade px-1.5 py-0.5 rounded shrink-0`,children:[d.currentFloor,`/150 LC`]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:S,className:`p-1 hover:bg-black/10 rounded text-ink-black cursor-pointer transition-colors border-0 bg-transparent`,title:l?`Unmute Audio`:`Mute Audio`,children:l?(0,I.jsx)(g,{className:`w-3.5 h-3.5`}):(0,I.jsx)(x,{className:`w-3.5 h-3.5`})}),(0,I.jsx)(`button`,{type:`button`,onClick:t,className:`p-1 hover:bg-rose-500 hover:text-white rounded text-ink-black cursor-pointer transition-colors border-0 bg-transparent`,title:`Dismiss Dialogue`,children:(0,I.jsx)(C,{className:`w-3.5 h-3.5`})})]})]}),(0,I.jsxs)(`div`,{className:`p-3 sm:p-4 flex gap-3 sm:gap-4 items-start`,children:[(0,I.jsx)(`div`,{className:`relative shrink-0 flex flex-col items-center`,children:(0,I.jsxs)(`div`,{className:`w-16 h-20 sm:w-20 sm:h-24 bg-gradient-to-b from-amber-100 to-amber-200 border-[2px] border-ink-black rounded overflow-hidden shadow-[2px_2px_0px_0px_#1E293B] relative group flex items-center justify-center`,children:[(0,I.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-amber-700/40 pointer-events-none select-none`,children:[(0,I.jsx)(T,{className:`w-6 h-6 animate-pulse`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] mt-1`,children:`Aurelia`})]}),(0,I.jsx)(`img`,{src:y.imagePath,alt:y.label,loading:`eager`,className:`w-full h-full object-cover object-top transition-transform duration-300 group-hover:scale-105 relative z-10`,onError:e=>{let t=e.currentTarget;t.src.endsWith(`/sprites/princess/neutral.webp`)?t.style.display=`none`:t.src=`/sprites/princess/neutral.webp`}}),(0,I.jsx)(`div`,{className:`absolute bottom-0 inset-x-0 bg-ink-black/80 text-[8px] text-amber-200 text-center py-0.5 font-bold uppercase tracking-wider backdrop-blur-xs z-20`,children:y.label})]})}),(0,I.jsxs)(`div`,{className:`flex-1 flex flex-col justify-between min-h-[90px]`,children:[(0,I.jsxs)(`div`,{className:`relative bg-white border-[2px] border-ink-black rounded p-2.5 shadow-[2px_2px_0px_0px_rgba(0,0,0,0.06)] min-h-[64px]`,children:[(0,I.jsx)(`div`,{className:`absolute -left-[7px] top-4 w-3 h-3 bg-white border-l-[2px] border-b-[2px] border-ink-black rotate-45`}),(0,I.jsxs)(`p`,{className:`text-xs sm:text-[13px] text-ink-black font-medium leading-relaxed m-0 whitespace-pre-wrap`,children:[i,s&&(0,I.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-amber-500 ml-0.5 animate-pulse align-middle`})]})]}),(0,I.jsxs)(`div`,{className:`text-[10px] text-trash-gray font-medium mt-1.5 flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`truncate flex items-center gap-1`,children:(0,I.jsxs)(`span`,{children:[`🗺️ `,b.title]})}),s&&(0,I.jsx)(`span`,{className:`text-[9px] text-amber-700 font-bold animate-pulse shrink-0`,children:`Speaking...`})]})]})]}),(0,I.jsxs)(`div`,{className:`px-3 pb-3 pt-1 flex flex-wrap items-center justify-end gap-2 border-t border-amber-200/60 bg-amber-50/40`,children:[E&&(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{t()},className:`flex items-center gap-1 px-2.5 py-1 bg-emerald-500 hover:bg-emerald-600 text-white border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,I.jsx)(h,{className:`w-3 h-3`}),(0,I.jsx)(`span`,{children:`Take a Break`})]}),(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{n(),t()},className:`flex items-center gap-1 px-2.5 py-1 bg-[#FFE24C] hover:bg-yellow-300 text-ink-black border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,I.jsx)(o,{className:`w-3 h-3`}),(0,I.jsx)(`span`,{children:`Talk to Her`}),(0,I.jsx)(v,{className:`w-3 h-3`})]}),(0,I.jsx)(`button`,{type:`button`,onClick:t,className:`px-2.5 py-1 bg-white hover:bg-slate-100 text-slate-700 border-[2px] border-slate-300 rounded text-[11px] font-bold active:translate-y-0.5 transition-all cursor-pointer`,children:`Dismiss`})]})]})})}function Ye(e){let t=Y(e=>e.windows),n=Y(e=>e.activeWindow),r=Y(e=>e.overrideProblemId),i=Y(e=>e.editingProblem),a=Y(e=>e.refreshExplorerTrigger),o=(0,P.useCallback)(t=>{Y.getState().openWindow(t),e&&e()},[e]),s=(0,P.useCallback)(e=>{Y.getState().closeWindow(e)},[]),c=(0,P.useCallback)(e=>{Y.getState().minimizeWindow(e)},[]),l=(0,P.useCallback)(e=>{Y.getState().toggleWindowMinimize(e)},[]);return{windows:t,activeWindow:n,setActiveWindow:(0,P.useCallback)(e=>{Y.getState().setActiveWindow(e)},[]),overrideProblemId:r,setOverrideProblemId:(0,P.useCallback)(e=>{Y.getState().setOverrideProblemId(e)},[]),editingProblem:i,setEditingProblem:(0,P.useCallback)(e=>{Y.getState().setEditingProblem(e)},[]),openEditProblem:(0,P.useCallback)(e=>{Y.getState().openEditProblem(e)},[]),refreshExplorerTrigger:a,openWindow:o,closeWindow:s,minimizeWindow:c,toggleWindowMinimize:l,handleSelectProblemForReview:(0,P.useCallback)(e=>{Y.getState().handleSelectProblemForReview(e)},[]),triggerRefreshExplorer:(0,P.useCallback)(()=>{Y.getState().triggerRefreshExplorer()},[]),isAnyWindowOpen:(0,P.useMemo)(()=>Object.values(t).some(e=>e.isOpen&&!e.isMinimized),[t])}}function Xe(e,t){let[n,r]=(0,P.useState)(``),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(null);(0,P.useEffect)(()=>{let e=()=>{let e=new Date,t=e.getHours(),n=e.getMinutes(),i=t>=12?`PM`:`AM`;t%=12,t||=12;let a=n<10?`0`+n:String(n);r(`${t}:${a} ${i}`)};e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[]);let m=(0,P.useCallback)(async()=>{try{let{data:{session:e}}=await j.auth.getSession();if(!e)return;let t=await fetch(`/api/streak`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();a(e)}}catch(e){console.error(`Error fetching streak:`,e)}},[]);return(0,P.useEffect)(()=>{if(e){let e=setTimeout(()=>{m()},0);return Ge(),()=>clearTimeout(e)}},[e,m]),(0,P.useEffect)(()=>{let e=()=>{s(window.innerWidth<768)};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),(0,P.useEffect)(()=>{let e=()=>{l(!!document.fullscreenElement)};return document.addEventListener(`fullscreenchange`,e),()=>{document.removeEventListener(`fullscreenchange`,e)}},[]),(0,P.useEffect)(()=>{let e=e=>{e.ctrlKey&&e.preventDefault()},t=e=>{e.ctrlKey&&(e.key===`=`||e.key===`-`||e.key===`0`||e.key===`+`||e.code===`NumpadAdd`||e.code===`NumpadSubtract`)&&e.preventDefault()},n=e=>{e.touches.length>1&&e.preventDefault()};return document.addEventListener(`wheel`,e,{passive:!1}),document.addEventListener(`keydown`,t),document.addEventListener(`touchmove`,n,{passive:!1}),()=>{document.removeEventListener(`wheel`,e),document.removeEventListener(`keydown`,t),document.removeEventListener(`touchmove`,n)}},[]),{time:n,streak:i,fetchStreak:m,isMobile:o,isFullscreen:c,toggleFullscreen:(0,P.useCallback)(()=>{document.fullscreenElement?document.exitFullscreen().catch(e=>{console.error(`Error exiting fullscreen: ${e.message}`)}):document.documentElement.requestFullscreen().catch(e=>{console.error(`Error enabling fullscreen: ${e.message}`)})},[]),syncing:u,syncResult:f,triggerSync:(0,P.useCallback)(async()=>{t&&t(),d(!0),p(null);try{let{data:{session:e}}=await j.auth.getSession();if(!e)return;let t=await fetch(`/api/sync`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();p(e.message||`Synchronization successfully completed!`),m(),Ge()}else p(`Sync operation failed at server host.`)}catch{p(`Cloud synchronization server unreachable.`)}finally{d(!1)}},[t,m])}}var Ze=`/wallpapers/default.webp`;function Qe(){let[e,t]=(0,P.useState)(()=>{let e=localStorage.getItem(`desktopWallpaperUrl`);return!e||e.includes(`lh3.googleusercontent.com`)?(localStorage.setItem(`desktopWallpaperUrl`,Ze),Ze):e}),n=(0,P.useCallback)(e=>{let n=new FileReader;n.onload=n=>{let r=new Image;r.onload=()=>{let i=document.createElement(`canvas`),a=r.width,o=r.height,s=1920,c=1080;(a>s||o>c)&&(a/o>s/c?(o=Math.round(o*s/a),a=s):(a=Math.round(a*c/o),o=c)),i.width=a,i.height=o;let l=i.getContext(`2d`);if(l){l.drawImage(r,0,0,a,o);try{let n=i.toDataURL(`image/jpeg`,.7);t(n),localStorage.setItem(`desktopWallpaperUrl`,n),localStorage.setItem(`customWallpaperUrl`,n),localStorage.setItem(`customWallpaperName`,e.name)}catch(e){console.error(`Failed to save compressed image to localStorage:`,e);let r=n.target?.result;t(r)}}else{let r=n.target?.result;t(r);try{localStorage.setItem(`desktopWallpaperUrl`,r),localStorage.setItem(`customWallpaperUrl`,r),localStorage.setItem(`customWallpaperName`,e.name)}catch(e){console.error(`Failed to save raw image to localStorage:`,e)}}},r.src=n.target?.result},n.readAsDataURL(e)},[]);return{wallpaperUrl:e,setWallpaperUrl:t,compressAndSaveWallpaper:n,handleWallpaperChange:(0,P.useCallback)((e,t)=>{t&&t();let r=e.target.files?.[0];r&&n(r)},[n])}}function $e(e,t){let[n,r]=(0,P.useState)(null);return(0,P.useEffect)(()=>{if(e){let e=Be();if(e.enabled&&e.autoPopupEnabled){let e=setTimeout(()=>{let e=qe(`study_start`);r({text:e.text,emotion:e.emotion,title:`✨ Welcome, Noble Hero!`,context:`study_start`,autoCloseDelay:7e3})},2500);return()=>clearTimeout(e)}}},[e]),(0,P.useEffect)(()=>{let e=e=>{let t=e;t.detail&&r(t.detail)},n=e=>{let n=e;n.detail?.windowId&&t(n.detail.windowId)};window.addEventListener(`companion:dialogue`,e),window.addEventListener(`companion:open_window`,n);let i=Date.now(),a=setInterval(()=>{let e=Be();if(!(!e.enabled||!e.autoPopupEnabled||!e.breakIntervalMinutes||e.breakIntervalMinutes<=0)&&(Date.now()-i)/6e4>=e.breakIntervalMinutes){i=Date.now(),Me();let e=qe(`break_reminder`);r({text:e.text,emotion:e.emotion,title:`☕ Time for a Royal Pause`,context:`break_reminder`,autoCloseDelay:12e3})}},3e4);return()=>{window.removeEventListener(`companion:dialogue`,e),window.removeEventListener(`companion:open_window`,n),clearInterval(a)}},[t]),{companionDialogueEvent:n,setCompanionDialogueEvent:r}}var et=({isMobile:e,username:t,streak:n})=>e?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`absolute top-desktop-margin right-desktop-margin w-64 bg-paper-white border-[3px] border-ink-black gadget-shadow z-20 overflow-hidden flex flex-col shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] select-none`,children:[(0,I.jsx)(`div`,{className:`bg-[#0ea5e9] border-b-[3px] border-ink-black px-3 py-1 flex justify-between items-center text-ink-black`,children:(0,I.jsx)(`span`,{className:`font-window-title text-xs font-bold tracking-wide`,children:`Profile.sys`})}),(0,I.jsxs)(`div`,{className:`p-3 flex items-center gap-3 bg-[#fdf8e1]`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 border-[3px] border-ink-black overflow-hidden bg-primary-fixed-dim shadow-[2px_2px_0_0_#1E293B] shrink-0`,children:(0,I.jsx)(`img`,{alt:`Profile Avatar`,className:`w-full h-full object-cover`,src:`/icons/avatar.webp`})}),(0,I.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`font-headline-md text-sm font-bold text-ink-black truncate`,children:t}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 text-red-700 mt-1 select-none font-bold`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`local_fire_department`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[7px]`,children:[n?.current_streak??0,` DAY STREAK`]})]})]})]})]}),(0,I.jsxs)(`div`,{className:`fixed bottom-16 right-5 pointer-events-none select-none text-right z-10 flex flex-col items-end leading-tight text-white/50 drop-shadow-[0_1px_2px_rgba(0,0,0,0.85)]`,children:[(0,I.jsx)(`span`,{className:`text-[13px] font-medium tracking-tight`,children:`AlgoSpaced (Beta)`}),(0,I.jsx)(`span`,{className:`text-[11px] font-normal text-white/40 mt-0.5`,children:`Build 0.0.5-preview`})]})]});async function Z(){try{let{data:{session:e}}=await j.auth.getSession();return e?e.access_token:`sandbox`}catch{return`sandbox`}}async function tt(e){let t=await Z(),n=await fetch(`/api/reviews/activate`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify(e)});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to activate problem`}));throw Error(e.detail||`Failed to activate problem`)}return n.json()}async function nt(e){return tt({problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,time_complexity:e.time_complexity,space_complexity:e.space_complexity,description:e.description,starter_code:e.starter_code,reference_solution:e.reference_solution,examples:e.examples,constraints:e.constraints,leetcode_url:e.leetcode_url})}async function rt(e,t,n){let r=await Z(),i=typeof n==`number`?{problem_number:n}:n||{},a=await fetch(`/api/reviews/save-reference`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({problem_id:e||void 0,code:t,...i})});if(!a.ok){let e=await a.json().catch(()=>({detail:`Failed to save reference solution`}));throw Error(e.detail||`Failed to save reference solution`)}return a.json()}async function it(e,t,n,r,i){let a=await Z(),o=t.find(e=>e.is_optimal)||t[0],s={name:i?.name||`Problem`,pattern:o?.pattern||i?.pattern||`General`,difficulty:i?.difficulty||`Medium`,reference_code:o?.code||i?.reference_code||``,description:i?.description||``,problem_number:i?.problem_number??null,optimal_time:n||o?.time_complexity||i?.optimal_time||`O(N)`,optimal_space:r||o?.space_complexity||i?.optimal_space||`O(1)`,examples:i?.examples,constraints:i?.constraints,how_to_solve:i?.how_to_solve||``,solutions:t},c=await fetch(`/api/explorer/problems/${e}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify(s)});if(!c.ok){let e=await c.json().catch(()=>({detail:`Failed to update problem solutions`}));throw Error(e.detail||`Failed to update problem solutions`)}return c.json()}async function at(e){let t=await Z(),n=await fetch(`/api/reviews/ai-solution`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({problem_id:e.problemId,problem_number:e.problemNumber,problem_name:e.problemName,pattern:e.pattern})});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to fetch solution`}));throw Error(e.detail||`Failed to fetch solution`)}return n.json()}async function ot(e,t,n=4,r,i){let a=await Z(),o=await fetch(`/api/reviews/test-run`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify({code:e,test_cases:t,timeout:n,starter_code:r,problem_name:i})});return o.ok?o.json():{success:!1,error:(await o.json().catch(()=>({detail:`Execution service error`}))).detail||`Execution service error`}}async function st(e){let t=await Z(),n={problems:e.map(e=>({problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,time_complexity:e.time_complexity,space_complexity:e.space_complexity,description:e.description,starter_code:e.starter_code,reference_solution:e.reference_solution,examples:e.examples,constraints:e.constraints,leetcode_url:e.leetcode_url}))},r=await fetch(`/api/reviews/activate-batch`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify(n)});if(!r.ok){let e=await r.json().catch(()=>({detail:`Failed to batch activate problems`}));throw Error(e.detail||`Failed to batch activate problems`)}return r.json()}var ct=[{id:`nc-217`,problem_number:217,name:`Contains Duplicate`,pattern:`Arrays & Hashing`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: +`);for(let e of i)e.startsWith(`event:`)?n=e.replace(`event:`,``).trim():e.startsWith(`data:`)&&(r=e.replace(`data:`,``).trim());if(n===`text_delta`&&r)try{let e=JSON.parse(r);e.delta&&t.onDelta(e.delta)}catch(e){console.warn(`[CompanionAPI] Failed to parse delta:`,e)}else if(n===`done`&&r)try{let e=JSON.parse(r);f=!0,t.onDone({text:e.text||``,emotion:e.emotion||`smiling_warmly`,tool_calls:Array.isArray(e.tool_calls)?e.tool_calls:[],choice_suggestions:Array.isArray(e.choice_suggestions)?e.choice_suggestions:[],provider_used:e.provider_used||`Spire Agent Stream`})}catch(e){console.warn(`[CompanionAPI] Failed to parse done payload:`,e)}else if(n===`error`&&r){f=!0;try{let e=JSON.parse(r);t.onDone({text:e.text||`Stay strong, champion!`,emotion:e.emotion||`smiling_warmly`,tool_calls:[],choice_suggestions:e.choice_suggestions||[],provider_used:`fallback`})}catch(e){console.warn(`[CompanionAPI] Error event parse failed:`,e)}}}}if(!f){let n=await ae(e);t.onDone(n)}}catch(n){console.warn(`[CompanionAPI] Stream error, falling back to standard API:`,n);try{let n=await ae(e);t.onDone(n)}catch(e){t.onError?.(e)}}}async function se(e){try{let{data:{session:t}}=await j.auth.getSession(),n=t?.access_token||`sandbox`;await fetch(`/api/companion/telemetry`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({...e,source:`client`,timestamp:e.timestamp||Date.now()/1e3})})}catch{}}var ce={open_app_window:e=>{let t=String(e.window_id||e.windowId||`queue`).toLowerCase(),n=t;return[`reviewer`,`code_reviewer`,`ai`,`grimoire`].includes(t)?n=`queue`:[`map`,`path`,`trail`].includes(t)?n=`journey`:[`files`,`explorer`,`system`].includes(t)&&(n=`computer`),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:open_window`,{detail:{windowId:n}})),{toolName:`open_app_window`,success:!0,message:`Summoned window: ${n}`,data:{windowId:n}}},set_study_timer:e=>{let t=Math.max(1,Math.min(120,Number(e.minutes||10)));return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:start_timer`,{detail:{minutes:t}})),{toolName:`set_study_timer`,success:!0,message:`Set tower countdown hourglass for ${t} minutes.`,data:{minutes:t}}},play_ambient_sound:e=>{let t=String(e.soundscape||`campfire`).toLowerCase();return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:play_soundscape`,{detail:{soundscape:t}})),{toolName:`play_ambient_sound`,success:!0,message:`Kindled ambient soundscape: ${t}.`,data:{soundscape:t}}},bookmark_for_spaced_review:e=>{let t=String(e.problem_name||e.problemName||`Unspecified Problem`),n=String(e.reason||`Flagged by Princess Aurelia for reinforcement`);return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:bookmark_problem`,{detail:{problemName:t,reason:n}})),{toolName:`bookmark_for_spaced_review`,success:!0,message:`Marked "${t}" in the royal grimoire for priority review.`,data:{problemName:t,reason:n}}},write_spire_diary:e=>{let t=String(e.entry||e.text||``).trim();return t?(typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:write_diary`,{detail:{text:t}})),{toolName:`write_spire_diary`,success:!0,message:`Recorded observation into the Spire Chronicles.`,data:{text:t}}):{toolName:`write_spire_diary`,success:!1,message:`Empty diary entry provided.`}},update_hero_codex:e=>{let t=String(e.key||``).trim(),n=String(e.value||``).trim();return!t||!n?{toolName:`update_hero_codex`,success:!1,message:`Missing key or value for hero codex update.`}:(typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:update_codex`,{detail:{key:t,value:n}})),{toolName:`update_hero_codex`,success:!0,message:`Updated Hero Codex: ${t} -> ${n}`,data:{key:t,value:n}})},record_episodic_event:e=>{let t=String(e.eventType||e.event_type||`session_summary`),n=String(e.title||`Event`).trim(),r=String(e.description||``).trim(),i=e.relatedPattern||e.related_pattern?String(e.relatedPattern||e.related_pattern):void 0;return typeof window<`u`&&window.dispatchEvent(new CustomEvent(`companion:record_event`,{detail:{eventType:t,title:n,description:r,relatedPattern:i}})),{toolName:`record_episodic_event`,success:!0,message:`Recorded episodic memory: ${n}`,data:{eventType:t,title:n,description:r,relatedPattern:i}}}};async function le(e){let t=ce[e.name],n=typeof performance<`u`?performance.now():Date.now();if(!t){console.warn(`[AgentTools] No handler registered for tool: ${e.name}`);let t={toolName:e.name,success:!1,message:`Unknown enchantment: ${e.name}`,durationMs:0};return se({tool_name:e.name,args:e.args,success:!1,error:t.message,execution_time_ms:0}),t}try{let r=await t(e.args||{}),i=typeof performance<`u`?performance.now():Date.now(),a=Math.round(i-n),o={...r,durationMs:a};return se({tool_name:e.name,args:e.args,success:o.success,error:o.success?void 0:o.message,execution_time_ms:a}),o}catch(t){console.error(`[AgentTools] Error executing ${e.name}:`,t);let r=typeof performance<`u`?performance.now():Date.now(),i=Math.round(r-n),a={toolName:e.name,success:!1,message:t?.message||`Tool execution encountered an error.`,durationMs:i};return se({tool_name:e.name,args:e.args,success:!1,error:a.message,execution_time_ms:i}),a}}var ue={dawn:{state:`dawn`,label:`Morning Sunbreak`,hourRange:[6,12],activity:`Sipping warm mountain tea and watching the sunrise over the valley`,lightingClass:`from-amber-100/90 via-yellow-50/80 to-amber-200/50`,defaultEmotion:`smiling_warmly`,greetings:[`Morning! The sunrise looks pretty incredible from up here today. How are you feeling—ready to solve a few problems, or still waiting for your coffee to kick in?`,`Hey, good morning! Did you get some good rest? Don’t rush into the hardest problems right away—let’s ease in with a warmup.`,`Good morning! It’s really quiet and peaceful right now. Honestly the best time to get some focused thinking done before the rest of the world wakes up.`]},day:{state:`day`,label:`High Sun`,hourRange:[12,18],activity:`Reviewing architectural scrolls in the tower library`,lightingClass:`from-sky-100/80 via-amber-50/70 to-yellow-100/60`,defaultEmotion:`neutral`,greetings:[`Hey, welcome back! How’s your focus holding up today? Remember to step back and take a breath if your eyes start feeling tired.`,`Hey there! I was just organizing some notes in the tower library. What problem pattern are we working through right now?`,`Good to see you! Remember, steady consistency beats frantic cramming every single time. One clean solution at a time.`]},dusk:{state:`dusk`,label:`Twilight & Beacon Fire`,hourRange:[18,22],activity:`Lighting lanterns along the stone balcony as the sun sets`,lightingClass:`from-orange-100/90 via-purple-100/60 to-amber-200/70`,defaultEmotion:`smiling_warmly`,greetings:[`Evening! You’ve put in solid effort today. How are you feeling—ready to wrap things up, or finishing one last review?`,`Hey, the sun is setting over the valley. It’s so easy to lose track of time when deep in code. Make sure you stretch your neck and shoulders a bit.`,`Good evening! How did today’s practice go? Even getting through one tricky problem is real, meaningful progress.`]},night:{state:`night`,label:`Midnight Candlelight`,hourRange:[22,6],activity:`Listening to the quiet wind outside by soft candlelight`,lightingClass:`from-indigo-950/80 via-slate-900/90 to-amber-950/40 text-amber-100`,defaultEmotion:`concerned`,greetings:[`Hey... it’s getting really late. Are you okay? Late-night debugging usually just turns simple typos into monsters—promise me you’ll head to sleep soon.`,`Midnight already? I’m always glad to talk with you, but coding while exhausted will just burn you out. Take it easy tonight, okay?`,`Still awake? Don’t push yourself past your limit. Your brain actually reorganizes problem solutions while you sleep—go rest up for tomorrow.`]}};function de(e=new Date){let t=e.getHours();return t>=6&&t<12?`dawn`:t>=12&&t<18?`day`:t>=18&&t<22?`dusk`:`night`}function fe(e=new Date){return ue[de(e)]}function pe(e=`Champion`){let t=fe(),n=t.greetings;return{text:(n[Math.floor(Math.random()*n.length)]||n[0]).replace(/\{hero\}/g,e||`Champion`),emotion:t.defaultEmotion,rhythm:t.state}}function me(e,t=`Champion`){return{text:`Hey, ${t}... ${e} misses in a row is almost always mental fatigue, not a lack of ability. Step away from the screen for just five minutes, grab a drink of water, and let your head clear. You’ll see the solution much faster once you reset.`,emotion:`concerned`}}var he=`algospaced_companion_state_v2`,ge={enabled:!0,name:`Princess Aurelia`,backstory:`Princess Aurelia is a noble, intelligent, and deeply caring scholar-princess trapped inside the Spire of Big-O Complexity. You are her champion traveling the 150 leagues of the royal road to break her magical seals.`,breakIntervalMinutes:25,soundEnabled:!0,autoPopupEnabled:!0},_e={heroName:`Champion`,targetGoal:``,preferredLanguage:`Python`,strengths:[],nemesisPatterns:[],personalNotes:[],lastUpdated:Date.now()};function ve(e,t,n){let r={...e,lastUpdated:Date.now()},i=n.trim();if(!i)return e;switch(t){case`heroName`:r.heroName=i;break;case`targetGoal`:r.targetGoal=i;break;case`preferredLanguage`:r.preferredLanguage=i;break;case`strengths`:r.strengths.includes(i)||(r.strengths=[...r.strengths,i].slice(-10));break;case`nemesisPatterns`:r.nemesisPatterns.includes(i)||(r.nemesisPatterns=[...r.nemesisPatterns,i].slice(-10));break;case`personalNotes`:{let e=r.personalNotes.findIndex(e=>e.toLowerCase().includes(i.toLowerCase().slice(0,15)));e>=0?r.personalNotes[e]=i:r.personalNotes=[...r.personalNotes,i].slice(-15);break}default:r.personalNotes.includes(i)||(r.personalNotes=[...r.personalNotes,i].slice(-15))}return r}function ye(e,t,n,r=3){if(!e||e.length===0)return[];let i=(t+` `+(n||``)).toLowerCase(),a=e.map((e,t)=>{let r=0,a=(e.title+` `+e.description+` `+(e.relatedPattern||``)).toLowerCase();n&&e.relatedPattern&&e.relatedPattern.toLowerCase()===n.toLowerCase()&&(r+=5);let o=i.split(/\s+/).filter(e=>e.length>3);for(let e of o)a.includes(e)&&(r+=2);let s=(Date.now()-e.timestamp)/864e5;return r+=Math.max(0,3-s*.3),e.eventType===`breakthrough`&&(r+=2),e.eventType===`fatigue_episode`&&(r+=2),{event:e,index:t,score:r}});a.sort((e,t)=>t.score-e.score);let o=a.slice(0,2),s=new Set,c=[];for(let t of o)if(!(t.score<=.5)&&(s.has(t.event.id)||(s.add(t.event.id),c.push(`[${t.event.eventType.toUpperCase()}] ${t.event.title}: ${t.event.description}`)),t.event.contiguousEventId)){let n=e.find(e=>e.id===t.event.contiguousEventId);n&&!s.has(n.id)&&c.length=50?`Soulbound Confidante`:e>=10?`Trusted Ally`:`Acquaintance`}function xe(){let e=fe(),t={id:`turn-init`,sender:`princess`,text:`Hey! I’m Aurelia. It gets pretty quiet up here in the tower, so I’m really glad you stopped by. How are you holding up with your coding practice today?`,emotion:`smiling_warmly`,timestamp:Date.now(),provider:`Spire Relay`};try{let n=localStorage.getItem(he);if(n){let r=JSON.parse(n),i=Array.isArray(r.transcript)&&r.transcript.length>0?r.transcript:[t],a=i.filter(e=>e.sender===`user`).length;return{transcript:i,activeEmotion:r.activeEmotion||e.defaultEmotion,isTyping:!1,isLoading:!1,heroProfile:r.heroProfile||{heroName:`Champion`,targetGoal:``},heroCodex:r.heroCodex||{..._e,heroName:r.heroProfile?.heroName||`Champion`,targetGoal:r.heroProfile?.targetGoal||``},episodicEvents:Array.isArray(r.episodicEvents)?r.episodicEvents:[],journeyLog:Array.isArray(r.journeyLog)?r.journeyLog:[],currentFloor:Number(r.currentFloor||0),maxFloor:150,totalSolved:Number(r.totalSolved||r.currentFloor||0),unlockedMilestones:Array.isArray(r.unlockedMilestones)?r.unlockedMilestones:[0],unlockedLetters:Array.isArray(r.unlockedLetters)?r.unlockedLetters:[],spireChronicles:Array.isArray(r.spireChronicles)?r.spireChronicles:[],bondTier:be(a),currentRhythm:e.state,currentActivity:e.activity,companionSettings:{...ge,...r.companionSettings||{}},consecutiveFailures:0,recentToolTelemetry:Array.isArray(r.recentToolTelemetry)?r.recentToolTelemetry:[]}}}catch(e){console.warn(`[CompanionStore] Failed to load from localStorage:`,e)}return{transcript:[t],activeEmotion:e.defaultEmotion,isTyping:!1,isLoading:!1,heroProfile:{heroName:`Champion`,targetGoal:``},heroCodex:_e,episodicEvents:[],journeyLog:[],currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0],unlockedLetters:[],spireChronicles:[],bondTier:`Acquaintance`,currentRhythm:e.state,currentActivity:e.activity,companionSettings:ge,consecutiveFailures:0,recentToolTelemetry:[]}}var q=xe(),Se=new Set;function Ce(){try{let e={transcript:q.transcript.slice(-60),activeEmotion:q.activeEmotion,heroProfile:q.heroProfile,heroCodex:q.heroCodex,episodicEvents:q.episodicEvents.slice(-40),journeyLog:q.journeyLog.slice(-50),currentFloor:q.currentFloor,totalSolved:q.totalSolved,unlockedMilestones:q.unlockedMilestones,unlockedLetters:q.unlockedLetters,spireChronicles:q.spireChronicles.slice(-30),companionSettings:q.companionSettings,recentToolTelemetry:(q.recentToolTelemetry||[]).slice(-30)};localStorage.setItem(he,JSON.stringify(e))}catch(e){console.error(`[CompanionStore] Save error:`,e)}Se.forEach(e=>e())}function J(e){q={...q,...e},Ce()}var Y={getState:()=>q,subscribe:e=>(Se.add(e),()=>Se.delete(e)),setEmotion:e=>{J({activeEmotion:e})},setIsTyping:e=>{q.isTyping!==e&&J({isTyping:e})},updateProfile:e=>{J({heroProfile:{...q.heroProfile,...e}})},updateCodex:(e,t)=>{let n=ve(q.heroCodex,e,t);J({heroCodex:n,heroProfile:{...q.heroProfile,heroName:n.heroName,targetGoal:n.targetGoal,preferredLanguage:n.preferredLanguage}})},removeCodexItem:(e,t)=>{let n=(q.heroCodex[e]||[]).filter(e=>e!==t);J({heroCodex:{...q.heroCodex,[e]:n,lastUpdated:Date.now()}})},recordEpisodicEvent:e=>{let t=q.episodicEvents[0];J({episodicEvents:[{id:`ev-${Date.now()}`,timestamp:Date.now(),...e,contiguousEventId:e.contiguousEventId||t?.id},...q.episodicEvents].slice(0,40)})},updateSettings:e=>{J({companionSettings:{...q.companionSettings,...e}})},executeTool:async e=>{let t=await le(e);return e.name===`write_spire_diary`&&t.success&&t.data?.text?Y.addDiaryEntry(t.data.text):e.name===`update_hero_codex`&&t.success&&t.data?.key&&t.data?.value?Y.updateCodex(t.data.key,t.data.value):e.name===`record_episodic_event`&&t.success&&t.data&&Y.recordEpisodicEvent({eventType:t.data.eventType||`session_summary`,title:t.data.title||`Event`,description:t.data.description||``,relatedPattern:t.data.relatedPattern,emotionalTone:q.activeEmotion}),J({recentToolTelemetry:[{tool_name:e.name,args:e.args,success:t.success,execution_time_ms:t.durationMs||0,hero_name:q.heroCodex.heroName||`Champion`,source:`client`,error:t.success?void 0:t.message,timestamp:Date.now()/1e3},...q.recentToolTelemetry||[]].slice(0,30)}),t},addDiaryEntry:e=>{J({spireChronicles:[{id:`diary-${Date.now()}`,timestamp:Date.now(),floor:q.currentFloor,text:e},...q.spireChronicles]})},sendMessage:async e=>{let t=e.trim();if(!t||q.isLoading)return;let n={id:`user-${Date.now()}`,sender:`user`,text:t,timestamp:Date.now()},r=[...q.transcript,n],i=r.filter(e=>e.sender===`user`).length,a=be(i),o=`princess-${Date.now()}`,s={id:o,sender:`princess`,text:``,emotion:`thinking_expression`,timestamp:Date.now(),isStreaming:!0,provider:`Spire Agent Stream`};J({transcript:[...r,s],isLoading:!0,isTyping:!0,activeEmotion:`thinking_expression`,bondTier:a});try{let e=fe(),n=ye(q.episodicEvents,t),i=``;await oe({princess_name:q.companionSettings.name,user_message:t,current_floor:q.currentFloor,streak_days:0,hero_name:q.heroCodex.heroName||q.heroProfile.heroName||`Champion`,target_goal:q.heroCodex.targetGoal||q.heroProfile.targetGoal,bond_tier:a,current_rhythm:e.state,hero_codex:q.heroCodex,episodic_memories:n,messages:r.slice(-10)},{onDelta:e=>{i+=e,J({transcript:q.transcript.map(e=>e.id===o?{...e,text:i,isStreaming:!0}:e),isLoading:!1,isTyping:!0})},onDone:e=>{if(Array.isArray(e.tool_calls))for(let t of e.tool_calls)Y.executeTool(t);let t=e.text||i||`I believe in you, champion!`;J({transcript:q.transcript.map(n=>n.id===o?{...n,text:t,emotion:e.emotion,toolCalls:e.tool_calls,choiceSuggestions:e.choice_suggestions,provider:e.provider_used||`Spire Agent Stream`,isStreaming:!1}:n),activeEmotion:e.emotion,isLoading:!1,isTyping:!1})},onError:e=>{console.warn(`[CompanionStore] Stream failed, using fallback:`,e);let t=ie.idle_chat,n=t[Math.floor(Math.random()*t.length)];J({transcript:q.transcript.map(e=>e.id===o?{...e,text:n.text,emotion:n.emotion,provider:`Offline Script`,isStreaming:!1}:e),activeEmotion:n.emotion,isLoading:!1,isTyping:!1})}})}catch(e){console.error(`[CompanionStore] Send message error:`,e);let t=ie.idle_chat,n=t[Math.floor(Math.random()*t.length)],r={id:o,sender:`princess`,text:n.text,emotion:n.emotion,timestamp:Date.now(),provider:`Offline Script`,isStreaming:!1};J({transcript:q.transcript.map(e=>e.id===o?r:e),activeEmotion:n.emotion,isLoading:!1,isTyping:!1})}},addReviewEvent:async(e,t=`a problem`,n=``)=>{let r=e===`Correct`,i=q.currentFloor,a=q.totalSolved,o=[...q.unlockedMilestones],s=[...q.unlockedLetters],c=q.consecutiveFailures,l=r?0:c+1,u=!1,d=0;if(r&&q.currentFloor=e&&!o.includes(e)){o.push(e),u=!0,d=e;let t=re[e];t&&!s.some(t=>t.floor===e)&&s.push({...t,unlockedAt:Date.now()})}}let f={id:`ep-${Date.now()}`,timestamp:Date.now(),type:r?`victory`:`struggle`,summary:`${r?`Mastered`:`Faced`} ${t} (${n||`DSA`}) - Graded ${e}`,floor:i};if(J({currentFloor:i,totalSolved:a,unlockedMilestones:o,unlockedLetters:s,consecutiveFailures:l,journeyLog:[f,...q.journeyLog]}),u&&Y.recordEpisodicEvent({eventType:`milestone`,title:`Passed League ${d}`,description:`Advanced past League ${d} on the road to the Spire of Big-O! Unlocked a royal missive from Aurelia.`,relatedPattern:n,emotionalTone:`excited_expression`}),r&&c>=2){let e=q.episodicEvents.find(e=>e.eventType===`fatigue_episode`||n&&e.relatedPattern?.toLowerCase()===n.toLowerCase());Y.recordEpisodicEvent({eventType:`breakthrough`,title:`Breakthrough: ${t}`,description:`Broke through previous hurdles to solve ${t}${n?` (${n})`:``} flawlessly!`,relatedPattern:n,emotionalTone:`excited_expression`,contiguousEventId:e?.id})}if(l>=3){Y.recordEpisodicEvent({eventType:`fatigue_episode`,title:`Fatigue: ${n||t}`,description:`Encountered 3 consecutive review struggles, most recently on ${t}${n?` (${n})`:``}. Aurelia intervened with rest advice.`,relatedPattern:n,emotionalTone:`concerned`});let e=me(l,q.heroProfile.heroName),r={id:`fatigue-${Date.now()}`,sender:`princess`,text:e.text,emotion:e.emotion,timestamp:Date.now(),provider:`Fatigue Watchdog`};J({transcript:[...q.transcript,r],activeEmotion:e.emotion});return}let p=fe(),m=ie[r?`problem_correct`:`problem_incorrect`],h=m[Math.floor(Math.random()*m.length)],g={id:`rev-${Date.now()}`,sender:`princess`,text:h.text,emotion:h.emotion,timestamp:Date.now(),provider:`Journey Log`};J({transcript:[...q.transcript,g],activeEmotion:h.emotion,currentRhythm:p.state,currentActivity:p.activity})},triggerProactiveGreeting:()=>{let e=fe();J({currentRhythm:e.state,currentActivity:e.activity});let t=q.transcript[q.transcript.length-1],n=Date.now();if(t&&n-t.timestamp<18e5)return;let r=pe(q.heroProfile.heroName||`Champion`),i={id:`proactive-${n}`,sender:`princess`,text:r.text,emotion:r.emotion,timestamp:n,provider:`Tower Rhythm`};J({transcript:[...q.transcript,i],activeEmotion:r.emotion})},clearTranscript:()=>{J({transcript:[{id:`init-${Date.now()}`,sender:`princess`,text:`The slate is refreshed, champion! How may I accompany your algorithmic journey right now?`,emotion:`smiling_warmly`,timestamp:Date.now(),provider:`Spire Relay`}],activeEmotion:`smiling_warmly`})},syncWithBackend:async()=>{try{let{data:{session:e}}=await j.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},n=await fetch(`/api/journey-progress`,{headers:t});if(n.ok){let e=await n.json(),t=Array.isArray(e)?e.length:0,r=Math.min(150,t),i=[30,60,90,120,150],a=[0],o=[...q.unlockedLetters];i.forEach(e=>{if(r>=e){a.push(e);let t=re[e];t&&!o.some(t=>t.floor===e)&&o.push({...t,unlockedAt:Date.now()})}}),J({currentFloor:r,totalSolved:t,unlockedMilestones:a,unlockedLetters:o})}}catch(e){console.warn(`[CompanionStore] Sync with backend journey failed:`,e)}}};function we(){return(0,P.useSyncExternalStore)(Y.subscribe,Y.getState,Y.getState)}var Te={queue:{isOpen:!0,isMinimized:!1},journey:{isOpen:!1,isMinimized:!1},terminal:{isOpen:!1,isMinimized:!1},computer:{isOpen:!1,isMinimized:!1},sync:{isOpen:!1,isMinimized:!1},github:{isOpen:!1,isMinimized:!1},python:{isOpen:!1,isMinimized:!1},mysql:{isOpen:!1,isMinimized:!1},settings:{isOpen:!1,isMinimized:!1},createProblem:{isOpen:!1,isMinimized:!1},editProblem:{isOpen:!1,isMinimized:!1},companion:{isOpen:!1,isMinimized:!1},cardManager:{isOpen:!1,isMinimized:!1}},X=v()(N((e,t)=>({windows:Te,activeWindow:`queue`,windowZIndexes:{queue:40},maxZIndex:40,windowPositions:{},windowSizes:{},maximizedWindows:{},overrideProblemId:null,editingProblem:null,refreshExplorerTrigger:0,openWindow:n=>{let r=n,i=t().maxZIndex+1;e(e=>({windows:{...e.windows,[r]:{isOpen:!0,isMinimized:!1}},activeWindow:n,maxZIndex:i,windowZIndexes:{...e.windowZIndexes,[n]:i}}))},closeWindow:t=>{let n=t;e(e=>{let r=e.windows[n]||{isOpen:!1,isMinimized:!1},i={...e.windows,[n]:{...r,isOpen:!1}},a=e.activeWindow;if(e.activeWindow===t){let t=Object.entries(i).filter(([,e])=>e.isOpen&&!e.isMinimized).sort((t,n)=>(e.windowZIndexes[n[0]]||0)-(e.windowZIndexes[t[0]]||0));a=t.length>0?t[0][0]:``}return{windows:i,activeWindow:a}})},minimizeWindow:t=>{let n=t;e(e=>{let r=e.windows[n]||{isOpen:!0,isMinimized:!1},i={...e.windows,[n]:{...r,isMinimized:!0}},a=e.activeWindow;if(e.activeWindow===t){let n=Object.entries(i).filter(([e,n])=>n.isOpen&&!n.isMinimized&&e!==t).sort((t,n)=>(e.windowZIndexes[n[0]]||0)-(e.windowZIndexes[t[0]]||0));a=n.length>0?n[0][0]:``}return{windows:i,activeWindow:a}})},toggleWindowMinimize:e=>{let n=e,r=t(),i=r.windows[n]||{isOpen:!1,isMinimized:!1};i.isMinimized||!i.isOpen?t().openWindow(e):r.activeWindow===e?t().minimizeWindow(e):t().focusWindow(e)},focusWindow:n=>{let r=t();if(r.activeWindow===n)return;let i=r.maxZIndex+1;e({activeWindow:n,maxZIndex:i,windowZIndexes:{...r.windowZIndexes,[n]:i}})},setActiveWindow:e=>{t().focusWindow(e)},updateWindowPosition:(t,n,r)=>{e(e=>({windowPositions:{...e.windowPositions,[t]:{x:n,y:r}}}))},updateWindowSize:(t,n,r)=>{e(e=>({windowSizes:{...e.windowSizes,[t]:{width:n,height:r}}}))},toggleMaximize:t=>{e(e=>({maximizedWindows:{...e.maximizedWindows,[t]:!e.maximizedWindows[t]}}))},resetWindowBounds:t=>{e(e=>{let n={...e.windowPositions};delete n[t];let r={...e.windowSizes};delete r[t];let i={...e.maximizedWindows};return delete i[t],{windowPositions:n,windowSizes:r,maximizedWindows:i}})},setOverrideProblemId:t=>{e({overrideProblemId:t})},setEditingProblem:t=>{e({editingProblem:t})},openEditProblem:n=>{e({editingProblem:n}),t().openWindow(`editProblem`)},handleSelectProblemForReview:n=>{e({overrideProblemId:n}),t().openWindow(`queue`)},triggerRefreshExplorer:()=>{e(e=>({refreshExplorerTrigger:e.refreshExplorerTrigger+1}))},isAnyWindowOpen:()=>{let e=t();return Object.values(e.windows).some(e=>e.isOpen&&!e.isMinimized)}}),{name:`algospaced_os_state`,partialize:e=>({windows:e.windows,windowPositions:e.windowPositions,windowSizes:e.windowSizes,maximizedWindows:e.maximizedWindows}),merge:(e,t)=>{let n=e;return{...t,windows:{...t.windows,...n?.windows||{}},windowPositions:n?.windowPositions||t.windowPositions,windowSizes:n?.windowSizes||t.windowSizes,maximizedWindows:n?.maximizedWindows||t.maximizedWindows}}})),Ee={neutral:{id:`neutral`,label:`Calm`,imagePath:`/sprites/princess/neutral.webp`},smiling_warmly:{id:`smiling_warmly`,label:`Smiling Warmly`,imagePath:`/sprites/princess/smiling_warmly.webp`},excited_expression:{id:`excited_expression`,label:`Excited`,imagePath:`/sprites/princess/excited_expression.webp`},thinking_expression:{id:`thinking_expression`,label:`Thinking`,imagePath:`/sprites/princess/thinking_expression.webp`},concerned:{id:`concerned`,label:`Concerned`,imagePath:`/sprites/princess/concerned.webp`},fear:{id:`fear`,label:`Startled`,imagePath:`/sprites/princess/fear.webp`},sad_expression:{id:`sad_expression`,label:`Melancholy`,imagePath:`/sprites/princess/sad_expression.webp`}},De=null;function Oe(){if(typeof window>`u`)return null;if(!De){let e=window,t=window.AudioContext||e.webkitAudioContext;t&&(De=new t)}return De&&De.state===`suspended`&&De.resume().catch(()=>{}),De}function ke(){try{return localStorage.getItem(`companion_sound_enabled`)===`false`}catch{return!1}}function Ae(e){try{localStorage.setItem(`companion_sound_enabled`,e?`false`:`true`)}catch{}}function je(){if(ke())return;let e=Oe();if(e)try{let t=[523.25,659.25,783.99,1046.5],n=e.currentTime;t.forEach((t,r)=>{let i=e.createOscillator(),a=e.createGain();i.type=`sine`,i.frequency.setValueAtTime(t,n+r*.06),a.gain.setValueAtTime(.06,n+r*.06),a.gain.exponentialRampToValueAtTime(.001,n+r*.06+.18),i.connect(a),a.connect(e.destination),i.start(n+r*.06),i.stop(n+r*.06+.2)})}catch{}}function Me(){if(ke())return;let e=Oe();if(e)try{let t=[440,554.37,659.25,880],n=e.currentTime;t.forEach((t,r)=>{let i=e.createOscillator(),a=e.createGain();i.type=`triangle`,i.frequency.setValueAtTime(t,n+r*.09),a.gain.setValueAtTime(.07,n+r*.09),a.gain.exponentialRampToValueAtTime(1e-4,n+r*.09+.35),i.connect(a),a.connect(e.destination),i.start(n+r*.09),i.stop(n+r*.09+.4)})}catch{}}function Ne({onOpenCompanionWindow:e}){let t=we(),n=X(e=>!!e.windows.companion?.isOpen&&!e.windows.companion?.isMinimized),[r,i]=(0,P.useState)(!1),[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(ke()),d=(0,P.useRef)(null),f=(0,P.useRef)(null),p=(0,P.useRef)(``);if((0,P.useEffect)(()=>{if(n){d.current&&clearInterval(d.current),f.current&&clearTimeout(f.current);let e=setTimeout(()=>{i(!1)},0);return()=>clearTimeout(e)}},[n]),(0,P.useEffect)(()=>{let e=t.transcript[t.transcript.length-1];if(e&&e.sender===`princess`&&t.companionSettings.enabled&&t.companionSettings.autoPopupEnabled){if(n){p.current=e.id;return}if(e.id!==p.current&&(e.id.startsWith(`rev-`)||e.id.startsWith(`fatigue-`))){p.current=e.id,i(!0),je(),o(``),c(!0);let t=0;d.current&&clearInterval(d.current),d.current=setInterval(()=>{t{i(!1)},8e3))},24)}}},[t.transcript,t.companionSettings.enabled,t.companionSettings.autoPopupEnabled,n]),!r||n)return null;let h=t.transcript[t.transcript.length-1],g=Ee[t.activeEmotion]||Ee.smiling_warmly,_=ne(t.currentFloor);return(0,I.jsx)(`div`,{className:`fixed bottom-14 right-3 sm:right-6 z-[9990] max-w-[480px] w-[calc(100vw-24px)] transition-all animate-in fade-in slide-in-from-bottom-5 duration-300 select-none`,onClick:()=>{s&&h&&(d.current&&clearInterval(d.current),o(h.text),c(!1))},children:(0,I.jsxs)(`div`,{className:`relative bg-[#FFFDF0] border-[3px] border-ink-black rounded-lg shadow-[6px_6px_0px_0px_#1E293B] overflow-hidden flex flex-col font-sans`,children:[(0,I.jsxs)(`div`,{className:`bg-[#FFE24C] border-b-[3px] border-ink-black px-3 py-1.5 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,I.jsxs)(`span`,{className:`text-xs font-bold font-headline-md text-ink-black tracking-wide truncate flex items-center gap-1`,children:[(0,I.jsx)(C,{className:`w-3.5 h-3.5 text-amber-600 shrink-0`}),t.companionSettings.name||`Princess Aurelia`]}),(0,I.jsxs)(`span`,{className:`bg-ink-black text-[#FFE24C] text-[9px] font-bold font-arcade px-1.5 py-0.5 rounded shrink-0`,children:[t.currentFloor,`/150 LC`]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation();let t=!l;u(t),Ae(t)},className:`p-1 hover:bg-black/10 rounded text-ink-black cursor-pointer border-0 bg-transparent`,title:l?`Unmute Audio`:`Mute Audio`,children:l?(0,I.jsx)(m,{className:`w-3.5 h-3.5`}):(0,I.jsx)(y,{className:`w-3.5 h-3.5`})}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>i(!1),className:`p-1 hover:bg-rose-500 hover:text-white rounded text-ink-black cursor-pointer border-0 bg-transparent`,title:`Dismiss`,children:(0,I.jsx)(x,{className:`w-3.5 h-3.5`})})]})]}),(0,I.jsxs)(`div`,{className:`p-3 sm:p-4 flex gap-3 sm:gap-4 items-start`,children:[(0,I.jsx)(`div`,{className:`relative shrink-0 flex flex-col items-center`,children:(0,I.jsxs)(`div`,{className:`w-16 h-20 sm:w-20 sm:h-24 bg-gradient-to-b from-amber-100 to-amber-200 border-[2px] border-ink-black rounded overflow-hidden shadow-[2px_2px_0px_0px_#1E293B] relative group flex items-center justify-center`,children:[(0,I.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-amber-700/40 pointer-events-none select-none`,children:[(0,I.jsx)(C,{className:`w-6 h-6 animate-pulse`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] mt-1`,children:`Aurelia`})]}),(0,I.jsx)(`img`,{src:g.imagePath,alt:g.label,loading:`eager`,className:`w-full h-full object-cover object-top relative z-10`,onError:e=>{let t=e.currentTarget;t.src.endsWith(`/sprites/princess/neutral.webp`)?t.style.display=`none`:t.src=`/sprites/princess/neutral.webp`}}),(0,I.jsx)(`div`,{className:`absolute bottom-0 inset-x-0 bg-ink-black/80 text-[8px] text-amber-200 text-center py-0.5 font-bold uppercase tracking-wider z-20`,children:g.label})]})}),(0,I.jsxs)(`div`,{className:`flex-1 flex flex-col justify-between min-h-[85px]`,children:[(0,I.jsxs)(`div`,{className:`relative bg-white border-[2px] border-ink-black rounded p-2.5 shadow-xs min-h-[60px]`,children:[(0,I.jsx)(`div`,{className:`absolute -left-[7px] top-4 w-3 h-3 bg-white border-l-[2px] border-b-[2px] border-ink-black rotate-45`}),(0,I.jsxs)(`p`,{className:`text-xs sm:text-[13px] text-ink-black font-medium leading-relaxed m-0 whitespace-pre-wrap`,children:[a,s&&(0,I.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-amber-500 ml-0.5 animate-pulse align-middle`})]})]}),(0,I.jsxs)(`div`,{className:`text-[10px] text-trash-gray font-medium mt-1.5 flex items-center justify-between`,children:[(0,I.jsxs)(`span`,{className:`truncate`,children:[`🗺️ `,_.title]}),s&&(0,I.jsx)(`span`,{className:`text-[9px] text-amber-700 font-bold animate-pulse shrink-0`,children:`Speaking...`})]})]})]}),(0,I.jsxs)(`div`,{className:`px-3 pb-3 pt-1 flex flex-wrap items-center justify-end gap-2 border-t border-amber-200/60 bg-amber-50/40`,children:[(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{e(),i(!1)},className:`flex items-center gap-1 px-2.5 py-1 bg-[#FFE24C] hover:bg-yellow-300 text-ink-black border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,I.jsx)(T,{className:`w-3 h-3`}),(0,I.jsx)(`span`,{children:`Talk to Her`}),(0,I.jsx)(w,{className:`w-3 h-3`})]}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>i(!1),className:`px-2.5 py-1 bg-white hover:bg-slate-100 text-slate-700 border-[2px] border-slate-300 rounded text-[11px] font-bold active:translate-y-0.5 transition-all cursor-pointer`,children:`Dismiss`})]})]})})}var Pe={neutral:{id:`neutral`,label:`Calm`,imagePath:`/sprites/princess/neutral.webp`},smiling_warmly:{id:`smiling_warmly`,label:`Smiling Warmly`,imagePath:`/sprites/princess/smiling_warmly.webp`},excited_expression:{id:`excited_expression`,label:`Excited`,imagePath:`/sprites/princess/excited_expression.webp`},thinking_expression:{id:`thinking_expression`,label:`Thinking`,imagePath:`/sprites/princess/thinking_expression.webp`},concerned:{id:`concerned`,label:`Concerned`,imagePath:`/sprites/princess/concerned.webp`},fear:{id:`fear`,label:`Startled`,imagePath:`/sprites/princess/fear.webp`},sad_expression:{id:`sad_expression`,label:`Melancholy`,imagePath:`/sprites/princess/sad_expression.webp`}},Fe={enabled:!0,name:`Princess Aurelia`,backstory:`Princess Aurelia is trapped in the high Spire of Big-O Complexity. You are a brave traveler journeying across the kingdom. By mastering all 150 LeetCode problems along the royal road, you will reach the tower gates and break her magical seal!`,breakIntervalMinutes:25,soundEnabled:!0,autoPopupEnabled:!0},Ie=[{floorRange:[1,30],title:`The Plains of Arrays & Strings`,description:`Rolling green meadows and ancient cobblestone roads where the journey begins.`,bgLore:`Looking out towards the distant horizon, the silhouette of the Spire pierces the clouds.`},{floorRange:[31,60],title:`The Whispering Forest of Pointers`,description:`Winding paths through dense groves where two pointers guide your compass.`,bgLore:`Aurelia’s magical beacon shines above the treetops, guiding your footsteps along the trail.`},{floorRange:[61,90],title:`The Grand Caverns of Trees & Graphs`,description:`Bioluminescent caves with branching crystal arches and subterranean passes.`,bgLore:`Halfway to the tower! Her voice echoes with hope over the enchanted royal relay.`},{floorRange:[91,120],title:`The High Mountain Passes of Heaps & Backtracking`,description:`Perilous alpine ridges and snowy peaks overlooking the Spire valley.`,bgLore:`From the highest ridge, the base of the Spire is in sight through the mountain mist!`},{floorRange:[121,149],title:`The Enchanted Valley of Dynamic Programming`,description:`Shimmering mystical grounds where optimal solutions bridge the final moat.`,bgLore:`The final leagues! The Spire looms directly ahead, its ancient runic wards trembling.`},{floorRange:[150,150],title:`The Gates of the Big-O Spire`,description:`Standing at the threshold of the grand tower gates to break the seal and free Aurelia!`,bgLore:`150 algorithms conquered! You have completed the grand journey and reached the Spire!`}],Le={break_reminder:[{id:`br-1`,text:`Brave traveler! You have traveled many leagues today. Even the swiftest steeds rest by the campfire—shall we pause for a stretch and some water?`,emotion:`concerned`,context:`break_reminder`},{id:`br-2`,text:`I can see your progress across the plains from my tower window! Please rest your eyes for a moment; a clear mind travels swiftest.`,emotion:`smiling_warmly`,context:`break_reminder`},{id:`br-3`,text:`The evening winds carry word of your relentless march. Take 5 minutes to rest—I will keep watch from the Spire beacon!`,emotion:`thinking_expression`,context:`break_reminder`},{id:`br-4`,text:`Do not exhaust yourself on the road, my hero! Pacing is the secret to enduring a 150-problem expedition. Let us take a short pause.`,emotion:`concerned`,context:`break_reminder`}],problem_correct:[{id:`pc-1`,text:`Magnificent! You conquered that obstacle and advanced another league closer to my tower!`,emotion:`excited_expression`,context:`problem_correct`},{id:`pc-2`,text:`A flawless solution! With every problem you master, the distance between us grows shorter.`,emotion:`smiling_warmly`,context:`problem_correct`},{id:`pc-3`,text:`Incredible speed and elegance! I felt the Spire beacon flare with light as you crossed another milestone!`,emotion:`excited_expression`,context:`problem_correct`},{id:`pc-4`,text:`You handled that algorithm with true mastery. Step by step, league by league, you are approaching the Spire gates!`,emotion:`smiling_warmly`,context:`problem_correct`}],problem_incorrect:[{id:`pi-1`,text:`Do not despair, noble traveler! The road to the Spire has rough terrain. Review the edge cases and let us push forward!`,emotion:`concerned`,context:`problem_incorrect`},{id:`pi-2`,text:`Every wrong turn on the map teaches you the true layout of the land. Let us examine the test case together.`,emotion:`thinking_expression`,context:`problem_incorrect`},{id:`pi-3`,text:`Stay steadfast! I believe in your courage and intellect. Take a breath—we will conquer this pass together!`,emotion:`smiling_warmly`,context:`problem_incorrect`},{id:`pi-4`,text:`A challenging problem! But overcoming difficult obstacles is what makes a legendary hero. Keep your head high!`,emotion:`neutral`,context:`problem_incorrect`}],streak_milestone:[{id:`sm-1`,text:`A glorious travel streak! Your daily dedication across the realms is inspiring. The Spire bells chime in your honor!`,emotion:`excited_expression`,context:`streak_milestone`},{id:`sm-2`,text:`Look at that continuous march! Consistency is the true magic that brings you across all 150 leagues to the tower.`,emotion:`smiling_warmly`,context:`streak_milestone`}],study_start:[{id:`ss-1`,text:`Welcome back to the trail, brave adventurer! Which algorithmic territories shall we cross today on our way to the Spire?`,emotion:`smiling_warmly`,context:`study_start`},{id:`ss-2`,text:`I saw the dust of your travel carriage on the horizon! Ready to conquer today’s review queue and draw closer to the tower?`,emotion:`excited_expression`,context:`study_start`}],idle_motivation:[{id:`im-1`,text:`Whenever the trail seems daunting, break the problem into smaller sub-problems. Every step counts toward the 150 milestone!`,emotion:`thinking_expression`,context:`idle_motivation`},{id:`im-2`,text:`I am watching over your journey and cheering you on! Your quest brings hope to this entire realm.`,emotion:`smiling_warmly`,context:`idle_motivation`},{id:`im-3`,text:`150 problems is a grand quest, but you have the intellect and heart to reach the Spire gates!`,emotion:`neutral`,context:`idle_motivation`}],tower_milestone:[{id:`tm-1`,text:`You have crossed the Plains of Arrays! 30 problems mastered—the first realm is behind us!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:30},{id:`tm-2`,text:`You emerged from the Whispering Forest! 60 problems solved—I can see your banner waving near the foothills!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:60},{id:`tm-3`,text:`Through the Grand Caverns! 90 problems conquered—more than halfway to the Spire!`,emotion:`smiling_warmly`,context:`tower_milestone`,floorRequirement:90},{id:`tm-4`,text:`You crested the High Mountain Passes! 120 problems conquered—the Spire valley is right before you!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:120},{id:`tm-5`,text:`YOU HAVE REACHED THE SPIRE GATES! All 150 LeetCode problems conquered! The grand seals shatter—freedom at last, my legendary champion!`,emotion:`excited_expression`,context:`tower_milestone`,floorRequirement:150}],chat_response:[]},Re=`companion_settings`,ze=`tower_progress`;function Be(){try{let e=localStorage.getItem(Re);return e?{...Fe,...JSON.parse(e)}:Fe}catch{return Fe}}function Ve(e){try{localStorage.setItem(Re,JSON.stringify(e))}catch(e){console.error(`Failed to save companion settings:`,e)}}function He(){try{let e=localStorage.getItem(ze);return e?JSON.parse(e):{currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]}}catch{return{currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]}}}function Ue(e){try{localStorage.setItem(ze,JSON.stringify(e))}catch(e){console.error(`Failed to save tower progress:`,e)}}function We(){let e={currentFloor:0,maxFloor:150,totalSolved:0,unlockedMilestones:[0]};return Ue(e),e}async function Ge(){try{let{data:{session:e}}=await j.auth.getSession(),t={Authorization:`Bearer ${e?e.access_token:`sandbox`}`},n=await fetch(`/api/journey-progress`,{headers:t});if(n.ok){let e=await n.json(),t=Array.isArray(e)?e.length:0,r=Math.min(150,t),i=[30,60,90,120,150],a=[0];i.forEach(e=>{r>=e&&a.push(e)});let o={currentFloor:r,maxFloor:150,totalSolved:t,unlockedMilestones:a};return Ue(o),o}}catch(e){console.error(`Failed to sync companion progress with backend journey:`,e)}return He()}function Ke(e){return Ie.find(t=>e>=t.floorRange[0]&&e<=t.floorRange[1])||Ie[0]}function qe(e,t){let n=Le[e]||Le.idle_motivation;if(t&&e===`tower_milestone`){let e=n.find(e=>e.floorRequirement===t);if(e)return e}return n[Math.floor(Math.random()*n.length)]||n[0]}function Je({event:e,onClose:t,onOpenCompanionWindow:n}){let r=X(e=>!!e.windows.companion?.isOpen&&!e.windows.companion?.isMinimized),[i,a]=(0,P.useState)(``),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(ke()),[u,d]=(0,P.useState)(He()),f=Be(),p=(0,P.useRef)(null),g=(0,P.useRef)(null);if((0,P.useEffect)(()=>{if(r&&e){let e=setTimeout(()=>{t()},0);return()=>clearTimeout(e)}},[r,e,t]),(0,P.useEffect)(()=>{d(He())},[e]),(0,P.useEffect)(()=>{if(!e){a(``),s(!1);return}je();let n=e.text;a(``),s(!0);let r=0;return p.current&&clearInterval(p.current),p.current=setInterval(()=>{r0&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{t()},e.autoCloseDelay)))},28),()=>{p.current&&clearInterval(p.current),g.current&&clearTimeout(g.current)}},[e]),!e||!f.enabled||r)return null;let _=Pe[e.emotion]||Pe.smiling_warmly,v=Ke(u.currentFloor),b=e=>{e.stopPropagation();let t=!c;l(t),Ae(t)},S=()=>{o&&e&&(p.current&&clearInterval(p.current),a(e.text),s(!1))},E=e.context===`break_reminder`;return(0,I.jsx)(`div`,{className:`fixed bottom-14 right-3 sm:right-6 z-[9990] max-w-[480px] w-[calc(100vw-24px)] transition-all animate-in fade-in slide-in-from-bottom-5 duration-300 select-none`,onClick:S,children:(0,I.jsxs)(`div`,{className:`relative bg-[#FFFDF0] border-[3px] border-ink-black rounded-lg shadow-[6px_6px_0px_0px_#1E293B] overflow-hidden flex flex-col font-sans`,children:[(0,I.jsxs)(`div`,{className:`bg-[#FFE24C] border-b-[3px] border-ink-black px-3 py-1.5 flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,I.jsxs)(`span`,{className:`text-xs font-bold font-headline-md text-ink-black tracking-wide truncate flex items-center gap-1`,children:[(0,I.jsx)(C,{className:`w-3.5 h-3.5 text-amber-600 shrink-0`}),f.name||`Princess Aurelia`]}),(0,I.jsxs)(`span`,{className:`bg-ink-black text-[#FFE24C] text-[9px] font-bold font-arcade px-1.5 py-0.5 rounded shrink-0`,children:[u.currentFloor,`/150 LC`]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:b,className:`p-1 hover:bg-black/10 rounded text-ink-black cursor-pointer transition-colors border-0 bg-transparent`,title:c?`Unmute Audio`:`Mute Audio`,children:c?(0,I.jsx)(m,{className:`w-3.5 h-3.5`}):(0,I.jsx)(y,{className:`w-3.5 h-3.5`})}),(0,I.jsx)(`button`,{type:`button`,onClick:t,className:`p-1 hover:bg-rose-500 hover:text-white rounded text-ink-black cursor-pointer transition-colors border-0 bg-transparent`,title:`Dismiss Dialogue`,children:(0,I.jsx)(x,{className:`w-3.5 h-3.5`})})]})]}),(0,I.jsxs)(`div`,{className:`p-3 sm:p-4 flex gap-3 sm:gap-4 items-start`,children:[(0,I.jsx)(`div`,{className:`relative shrink-0 flex flex-col items-center`,children:(0,I.jsxs)(`div`,{className:`w-16 h-20 sm:w-20 sm:h-24 bg-gradient-to-b from-amber-100 to-amber-200 border-[2px] border-ink-black rounded overflow-hidden shadow-[2px_2px_0px_0px_#1E293B] relative group flex items-center justify-center`,children:[(0,I.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center text-amber-700/40 pointer-events-none select-none`,children:[(0,I.jsx)(C,{className:`w-6 h-6 animate-pulse`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] mt-1`,children:`Aurelia`})]}),(0,I.jsx)(`img`,{src:_.imagePath,alt:_.label,loading:`eager`,className:`w-full h-full object-cover object-top transition-transform duration-300 group-hover:scale-105 relative z-10`,onError:e=>{let t=e.currentTarget;t.src.endsWith(`/sprites/princess/neutral.webp`)?t.style.display=`none`:t.src=`/sprites/princess/neutral.webp`}}),(0,I.jsx)(`div`,{className:`absolute bottom-0 inset-x-0 bg-ink-black/80 text-[8px] text-amber-200 text-center py-0.5 font-bold uppercase tracking-wider backdrop-blur-xs z-20`,children:_.label})]})}),(0,I.jsxs)(`div`,{className:`flex-1 flex flex-col justify-between min-h-[90px]`,children:[(0,I.jsxs)(`div`,{className:`relative bg-white border-[2px] border-ink-black rounded p-2.5 shadow-[2px_2px_0px_0px_rgba(0,0,0,0.06)] min-h-[64px]`,children:[(0,I.jsx)(`div`,{className:`absolute -left-[7px] top-4 w-3 h-3 bg-white border-l-[2px] border-b-[2px] border-ink-black rotate-45`}),(0,I.jsxs)(`p`,{className:`text-xs sm:text-[13px] text-ink-black font-medium leading-relaxed m-0 whitespace-pre-wrap`,children:[i,o&&(0,I.jsx)(`span`,{className:`inline-block w-1.5 h-3.5 bg-amber-500 ml-0.5 animate-pulse align-middle`})]})]}),(0,I.jsxs)(`div`,{className:`text-[10px] text-trash-gray font-medium mt-1.5 flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`truncate flex items-center gap-1`,children:(0,I.jsxs)(`span`,{children:[`🗺️ `,v.title]})}),o&&(0,I.jsx)(`span`,{className:`text-[9px] text-amber-700 font-bold animate-pulse shrink-0`,children:`Speaking...`})]})]})]}),(0,I.jsxs)(`div`,{className:`px-3 pb-3 pt-1 flex flex-wrap items-center justify-end gap-2 border-t border-amber-200/60 bg-amber-50/40`,children:[E&&(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{t()},className:`flex items-center gap-1 px-2.5 py-1 bg-emerald-500 hover:bg-emerald-600 text-white border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,I.jsx)(h,{className:`w-3 h-3`}),(0,I.jsx)(`span`,{children:`Take a Break`})]}),(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{n(),t()},className:`flex items-center gap-1 px-2.5 py-1 bg-[#FFE24C] hover:bg-yellow-300 text-ink-black border-[2px] border-ink-black rounded text-[11px] font-bold shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none transition-all cursor-pointer`,children:[(0,I.jsx)(T,{className:`w-3 h-3`}),(0,I.jsx)(`span`,{children:`Talk to Her`}),(0,I.jsx)(w,{className:`w-3 h-3`})]}),(0,I.jsx)(`button`,{type:`button`,onClick:t,className:`px-2.5 py-1 bg-white hover:bg-slate-100 text-slate-700 border-[2px] border-slate-300 rounded text-[11px] font-bold active:translate-y-0.5 transition-all cursor-pointer`,children:`Dismiss`})]})]})})}function Ye(e){let t=X(e=>e.windows),n=X(e=>e.activeWindow),r=X(e=>e.overrideProblemId),i=X(e=>e.editingProblem),a=X(e=>e.refreshExplorerTrigger),o=(0,P.useCallback)(t=>{X.getState().openWindow(t),e&&e()},[e]),s=(0,P.useCallback)(e=>{X.getState().closeWindow(e)},[]),c=(0,P.useCallback)(e=>{X.getState().minimizeWindow(e)},[]),l=(0,P.useCallback)(e=>{X.getState().toggleWindowMinimize(e)},[]);return{windows:t,activeWindow:n,setActiveWindow:(0,P.useCallback)(e=>{X.getState().setActiveWindow(e)},[]),overrideProblemId:r,setOverrideProblemId:(0,P.useCallback)(e=>{X.getState().setOverrideProblemId(e)},[]),editingProblem:i,setEditingProblem:(0,P.useCallback)(e=>{X.getState().setEditingProblem(e)},[]),openEditProblem:(0,P.useCallback)(e=>{X.getState().openEditProblem(e)},[]),refreshExplorerTrigger:a,openWindow:o,closeWindow:s,minimizeWindow:c,toggleWindowMinimize:l,handleSelectProblemForReview:(0,P.useCallback)(e=>{X.getState().handleSelectProblemForReview(e)},[]),triggerRefreshExplorer:(0,P.useCallback)(()=>{X.getState().triggerRefreshExplorer()},[]),isAnyWindowOpen:(0,P.useMemo)(()=>Object.values(t).some(e=>e.isOpen&&!e.isMinimized),[t])}}function Xe(e,t){let[n,r]=(0,P.useState)(``),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(null);(0,P.useEffect)(()=>{let e=()=>{let e=new Date,t=e.getHours(),n=e.getMinutes(),i=t>=12?`PM`:`AM`;t%=12,t||=12;let a=n<10?`0`+n:String(n);r(`${t}:${a} ${i}`)};e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[]);let m=(0,P.useCallback)(async()=>{try{let{data:{session:e}}=await j.auth.getSession();if(!e)return;let t=await fetch(`/api/streak`,{headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();a(e)}}catch(e){console.error(`Error fetching streak:`,e)}},[]);return(0,P.useEffect)(()=>{if(e){let e=setTimeout(()=>{m()},0);return Ge(),()=>clearTimeout(e)}},[e,m]),(0,P.useEffect)(()=>{let e=()=>{s(window.innerWidth<768)};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),(0,P.useEffect)(()=>{let e=()=>{l(!!document.fullscreenElement)};return document.addEventListener(`fullscreenchange`,e),()=>{document.removeEventListener(`fullscreenchange`,e)}},[]),(0,P.useEffect)(()=>{let e=e=>{e.ctrlKey&&e.preventDefault()},t=e=>{e.ctrlKey&&(e.key===`=`||e.key===`-`||e.key===`0`||e.key===`+`||e.code===`NumpadAdd`||e.code===`NumpadSubtract`)&&e.preventDefault()},n=e=>{e.touches.length>1&&e.preventDefault()};return document.addEventListener(`wheel`,e,{passive:!1}),document.addEventListener(`keydown`,t),document.addEventListener(`touchmove`,n,{passive:!1}),()=>{document.removeEventListener(`wheel`,e),document.removeEventListener(`keydown`,t),document.removeEventListener(`touchmove`,n)}},[]),{time:n,streak:i,fetchStreak:m,isMobile:o,isFullscreen:c,toggleFullscreen:(0,P.useCallback)(()=>{document.fullscreenElement?document.exitFullscreen().catch(e=>{console.error(`Error exiting fullscreen: ${e.message}`)}):document.documentElement.requestFullscreen().catch(e=>{console.error(`Error enabling fullscreen: ${e.message}`)})},[]),syncing:u,syncResult:f,triggerSync:(0,P.useCallback)(async()=>{t&&t(),d(!0),p(null);try{let{data:{session:e}}=await j.auth.getSession();if(!e)return;let t=await fetch(`/api/sync`,{method:`POST`,headers:{Authorization:`Bearer ${e.access_token}`}});if(t.ok){let e=await t.json();p(e.message||`Synchronization successfully completed!`),m(),Ge()}else p(`Sync operation failed at server host.`)}catch{p(`Cloud synchronization server unreachable.`)}finally{d(!1)}},[t,m])}}var Ze=`/wallpapers/default.webp`;function Qe(){let[e,t]=(0,P.useState)(()=>{let e=localStorage.getItem(`desktopWallpaperUrl`);return!e||e.includes(`lh3.googleusercontent.com`)?(localStorage.setItem(`desktopWallpaperUrl`,Ze),Ze):e}),n=(0,P.useCallback)(e=>{let n=new FileReader;n.onload=n=>{let r=new Image;r.onload=()=>{let i=document.createElement(`canvas`),a=r.width,o=r.height,s=1920,c=1080;(a>s||o>c)&&(a/o>s/c?(o=Math.round(o*s/a),a=s):(a=Math.round(a*c/o),o=c)),i.width=a,i.height=o;let l=i.getContext(`2d`);if(l){l.drawImage(r,0,0,a,o);try{let n=i.toDataURL(`image/jpeg`,.7);t(n),localStorage.setItem(`desktopWallpaperUrl`,n),localStorage.setItem(`customWallpaperUrl`,n),localStorage.setItem(`customWallpaperName`,e.name)}catch(e){console.error(`Failed to save compressed image to localStorage:`,e);let r=n.target?.result;t(r)}}else{let r=n.target?.result;t(r);try{localStorage.setItem(`desktopWallpaperUrl`,r),localStorage.setItem(`customWallpaperUrl`,r),localStorage.setItem(`customWallpaperName`,e.name)}catch(e){console.error(`Failed to save raw image to localStorage:`,e)}}},r.src=n.target?.result},n.readAsDataURL(e)},[]);return{wallpaperUrl:e,setWallpaperUrl:t,compressAndSaveWallpaper:n,handleWallpaperChange:(0,P.useCallback)((e,t)=>{t&&t();let r=e.target.files?.[0];r&&n(r)},[n])}}function $e(e,t){let[n,r]=(0,P.useState)(null);return(0,P.useEffect)(()=>{if(e){let e=Be();if(e.enabled&&e.autoPopupEnabled){let e=setTimeout(()=>{let e=qe(`study_start`);r({text:e.text,emotion:e.emotion,title:`✨ Welcome, Noble Hero!`,context:`study_start`,autoCloseDelay:7e3})},2500);return()=>clearTimeout(e)}}},[e]),(0,P.useEffect)(()=>{let e=e=>{let t=e;t.detail&&r(t.detail)},n=e=>{let n=e;n.detail?.windowId&&t(n.detail.windowId)};window.addEventListener(`companion:dialogue`,e),window.addEventListener(`companion:open_window`,n);let i=Date.now(),a=setInterval(()=>{let e=Be();if(!(!e.enabled||!e.autoPopupEnabled||!e.breakIntervalMinutes||e.breakIntervalMinutes<=0)&&(Date.now()-i)/6e4>=e.breakIntervalMinutes){i=Date.now(),Me();let e=qe(`break_reminder`);r({text:e.text,emotion:e.emotion,title:`☕ Time for a Royal Pause`,context:`break_reminder`,autoCloseDelay:12e3})}},3e4);return()=>{window.removeEventListener(`companion:dialogue`,e),window.removeEventListener(`companion:open_window`,n),clearInterval(a)}},[t]),{companionDialogueEvent:n,setCompanionDialogueEvent:r}}var et=({isMobile:e,username:t,streak:n})=>e?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`absolute top-desktop-margin right-desktop-margin w-64 bg-paper-white border-[3px] border-ink-black gadget-shadow z-20 overflow-hidden flex flex-col shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] select-none`,children:[(0,I.jsx)(`div`,{className:`bg-[#0ea5e9] border-b-[3px] border-ink-black px-3 py-1 flex justify-between items-center text-ink-black`,children:(0,I.jsx)(`span`,{className:`font-window-title text-xs font-bold tracking-wide`,children:`Profile.sys`})}),(0,I.jsxs)(`div`,{className:`p-3 flex items-center gap-3 bg-[#fdf8e1]`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 border-[3px] border-ink-black overflow-hidden bg-primary-fixed-dim shadow-[2px_2px_0_0_#1E293B] shrink-0`,children:(0,I.jsx)(`img`,{alt:`Profile Avatar`,className:`w-full h-full object-cover`,src:`/icons/avatar.webp`})}),(0,I.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`font-headline-md text-sm font-bold text-ink-black truncate`,children:t}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 text-red-700 mt-1 select-none font-bold`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`local_fire_department`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[7px]`,children:[n?.current_streak??0,` DAY STREAK`]})]})]})]})]}),(0,I.jsxs)(`div`,{className:`fixed bottom-16 right-5 pointer-events-none select-none text-right z-10 flex flex-col items-end leading-tight text-white/50 drop-shadow-[0_1px_2px_rgba(0,0,0,0.85)]`,children:[(0,I.jsx)(`span`,{className:`text-[13px] font-medium tracking-tight`,children:`AlgoSpaced (Beta)`}),(0,I.jsx)(`span`,{className:`text-[11px] font-normal text-white/40 mt-0.5`,children:`Build 0.0.5-preview`})]})]});async function Z(){try{let{data:{session:e}}=await j.auth.getSession();return e?e.access_token:`sandbox`}catch{return`sandbox`}}async function tt(e){let t=await Z(),n=await fetch(`/api/reviews/activate`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify(e)});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to activate problem`}));throw Error(e.detail||`Failed to activate problem`)}return n.json()}async function nt(e){return tt({problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,time_complexity:e.time_complexity,space_complexity:e.space_complexity,description:e.description,starter_code:e.starter_code,reference_solution:e.reference_solution,examples:e.examples,constraints:e.constraints,leetcode_url:e.leetcode_url})}async function rt(e,t,n){let r=await Z(),i=typeof n==`number`?{problem_number:n}:n||{},a=await fetch(`/api/reviews/save-reference`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({problem_id:e||void 0,code:t,...i})});if(!a.ok){let e=await a.json().catch(()=>({detail:`Failed to save reference solution`}));throw Error(e.detail||`Failed to save reference solution`)}return a.json()}async function it(e,t,n,r,i){let a=await Z(),o=t.find(e=>e.is_optimal)||t[0],s={name:i?.name||`Problem`,pattern:o?.pattern||i?.pattern||`General`,difficulty:i?.difficulty||`Medium`,reference_code:o?.code||i?.reference_code||``,description:i?.description||``,problem_number:i?.problem_number??null,optimal_time:n||o?.time_complexity||i?.optimal_time||`O(N)`,optimal_space:r||o?.space_complexity||i?.optimal_space||`O(1)`,examples:i?.examples,constraints:i?.constraints,how_to_solve:i?.how_to_solve||``,solutions:t},c=await fetch(`/api/explorer/problems/${e}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify(s)});if(!c.ok){let e=await c.json().catch(()=>({detail:`Failed to update problem solutions`}));throw Error(e.detail||`Failed to update problem solutions`)}return c.json()}async function at(e){let t=await Z(),n=await fetch(`/api/reviews/ai-solution`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({problem_id:e.problemId,problem_number:e.problemNumber,problem_name:e.problemName,pattern:e.pattern})});if(!n.ok){let e=await n.json().catch(()=>({detail:`Failed to fetch solution`}));throw Error(e.detail||`Failed to fetch solution`)}return n.json()}async function ot(e,t,n=4,r,i){let a=await Z(),o=await fetch(`/api/reviews/test-run`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify({code:e,test_cases:t,timeout:n,starter_code:r,problem_name:i})});return o.ok?o.json():{success:!1,error:(await o.json().catch(()=>({detail:`Execution service error`}))).detail||`Execution service error`}}async function st(e){let t=await Z(),n={problems:e.map(e=>({problem_number:e.problem_number,name:e.name,pattern:e.pattern,difficulty:e.difficulty,time_complexity:e.time_complexity,space_complexity:e.space_complexity,description:e.description,starter_code:e.starter_code,reference_solution:e.reference_solution,examples:e.examples,constraints:e.constraints,leetcode_url:e.leetcode_url}))},r=await fetch(`/api/reviews/activate-batch`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify(n)});if(!r.ok){let e=await r.json().catch(()=>({detail:`Failed to batch activate problems`}));throw Error(e.detail||`Failed to batch activate problems`)}return r.json()}var ct=[{id:`nc-217`,problem_number:217,name:`Contains Duplicate`,pattern:`Arrays & Hashing`,difficulty:`Easy`,time_complexity:`O(N)`,space_complexity:`O(N)`,starter_code:`class Solution: def containsDuplicate(self, nums: list[int]) -> bool: pass`,description:`Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.`,examples:[{input:`nums = [1,2,3,1]`,output:`true`},{input:`nums = [1,2,3,4]`,output:`false`}],constraints:[`1 <= nums.length <= 10^5`,`-10^9 <= nums[i] <= 10^9`],leetcode_url:`https://leetcode.com/problems/contains-duplicate/`,reference_solution:`class Solution: def containsDuplicate(self, nums: list[int]) -> bool: @@ -2349,4 +2349,4 @@ class DetectSquares: sign = -1 if x < 0 else 1 x = abs(x) res = int(str(x)[::-1]) * sign - return res if -2**31 <= res <= 2**31 - 1 else 0`}],lt=new Map,ut=new Map,dt=new Map;for(let e of ct){lt.set(e.problem_number,e),ut.set(e.id,e);let t=dt.get(e.pattern)||[];t.push(e),dt.set(e.pattern,t)}function ft(e){if(e==null)return;let t=typeof e==`string`?parseInt(e,10):e;if(!isNaN(t))return lt.get(t)}function pt(e){if(!e)return;let t=ut.get(e);if(t)return t;if(/^\d+$/.test(e))return lt.get(parseInt(e,10));let n=e.replace(/^prob-/,``).toLowerCase().replace(/[^a-z0-9]+/g,``);for(let e of ct)if(e.name.toLowerCase().replace(/[^a-z0-9]+/g,``)===n||e.id.toLowerCase().replace(/[^a-z0-9]+/g,``)===n)return e}function mt(e){if(!e)return;let t=e.toLowerCase().replace(/\s*-\s*method.*$/i,``).replace(/[^a-z0-9]+/g,``);for(let e of ct)if(e.name.toLowerCase().replace(/[^a-z0-9]+/g,``)===t)return e}function ht(e,t,n){if(e!=null){let t=ft(e);if(t)return t}if(t){let e=pt(t);if(e)return e}if(n){let e=mt(n);if(e)return e}}function gt(){return ct}function _t(){return Array.from(dt.keys())}function vt(e,t){if(t&&t.length>0){for(let n of t)if(!e.has(n)){let e=lt.get(n);if(e)return e}}for(let t of ct)if(!e.has(t.problem_number))return t}var yt=r((e,t)=>({processes:{},sandboxRunning:!1,sandboxResults:null,sandboxError:null,savingReference:!1,savedRefSuccess:!1,saveRefError:null,aiLoading:!1,aiResult:null,aiError:null,explainLoading:!1,explanationText:null,explainError:null,aiSolutionLoading:!1,aiSolutionError:null,registerProcess:(t,n)=>{let r=`${t}-${Date.now().toString(36)}-${Math.random().toString(36).substring(2,6)}`,i={pid:r,appId:t,title:n,status:`running`,startedAt:Date.now()};return e(e=>({processes:{...e.processes,[r]:i}})),r},updateProcessStatus:(t,n,r,i)=>{e(e=>{let a=e.processes[t];return a?{processes:{...e.processes,[t]:{...a,status:n,error:r===void 0?a.error:r,data:i===void 0?a.data:i,completedAt:n===`success`||n===`error`?Date.now():a.completedAt}}}:e})},removeProcess:t=>{e(e=>{let n={...e.processes};return delete n[t],{processes:n}})},clearFinishedProcesses:()=>{e(e=>{let t={};return Object.entries(e.processes).forEach(([e,n])=>{n.status===`running`&&(t[e]=n)}),{processes:t}})},handleRunSandbox:async(n,r)=>{if(!n||!r.trim()||t().sandboxRunning)return;let i=n.problems,a=ht(i?.problem_number,i?.id||``,i?.name),o=(i?.examples&&i.examples.length>0?i.examples:a?.examples||[]).map(e=>typeof e==`string`?{input:e,expected:``}:{input:e?.input??``,expected:e?.output??``}),s=a?.starter_code||i?.starter_code,c=i?.name||a?.name||`Problem`,l=t().registerProcess(`sandbox-runner`,`PyTest: ${c}`);e({sandboxRunning:!0,sandboxResults:null,sandboxError:null,savedRefSuccess:!1});try{let n=await ot(r,o,4,s,c);e({sandboxResults:n}),t().updateProcessStatus(l,`success`,null,n)}catch(n){let r=n instanceof Error?n.message:`Execution failed`;e({sandboxError:r}),t().updateProcessStatus(l,`error`,r)}finally{e({sandboxRunning:!1})}},handleSaveReference:async(n,r,i)=>{if(!n||!r.trim()||t().savingReference)return;let a=n.problems,o=a?.id||n.problem_id;if(!o&&!a?.problem_number)return;let s=a?.problem_number??(typeof n.problem_id==`number`?n.problem_id:/^\d+$/.test(n.problem_id||``)?parseInt(n.problem_id,10):void 0),c=ht(s,o||n.problem_id,a?.name),l=a?.constraints??c?.constraints,u=Array.isArray(l)?l:l?[String(l)]:[],d=a?.examples&&a.examples.length>0?a.examples:c?.examples,f=d?d.map(e=>typeof e==`string`?{input:e,output:``}:{input:String(e?.input??``),output:String(e?.output??``),explanation:e?.explanation}):[],p=a?.name||c?.name||`Problem`,m={problem_number:s??c?.problem_number,problem_name:p,pattern:a?.pattern||c?.pattern,difficulty:a?.difficulty||c?.difficulty,optimal_time:a?.optimal_time||c?.time_complexity,optimal_space:a?.optimal_space||c?.space_complexity,description:a?.description||c?.description,starter_code:c?.starter_code||a?.starter_code,examples:f,constraints:u},h=t().registerProcess(`sandbox-runner`,`Save Ref: ${p}`);e({savingReference:!0,saveRefError:null});try{let n=await rt(o,r,m);e({savedRefSuccess:!0}),t().updateProcessStatus(h,`success`,null,n),i&&i(r,n.problem_id),setTimeout(()=>e({savedRefSuccess:!1}),3500)}catch(n){let r=n instanceof Error?n.message:`Failed to save solution`;e({saveRefError:r}),t().updateProcessStatus(h,`error`,r)}finally{e({savingReference:!1})}},resetSandbox:()=>{let n=t();(n.sandboxResults!==null||n.sandboxError!==null||n.savedRefSuccess||n.saveRefError!==null)&&e({sandboxResults:null,sandboxError:null,savedRefSuccess:!1,saveRefError:null})},handleAiEvaluation:async(n,r)=>{if(!n||!r.trim()||t().aiLoading)return;let i=n.problems,a=i?.name||`Problem`,o=t().registerProcess(`ai-evaluator`,`AI Review: ${a}`);e({aiLoading:!0,aiResult:null,aiError:null});try{let{data:{session:n}}=await j.auth.getSession(),a=n?n.access_token:`sandbox`,s=await fetch(`/api/reviews/evaluate`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify({problem_name:i.name,pattern:i.pattern,optimal_time:i.optimal_time,optimal_space:i.optimal_space,code:r})});if(s.ok){let n=await s.json();e({aiResult:n}),t().updateProcessStatus(o,`success`,null,n)}else{let n=(await s.json().catch(()=>({}))).detail||`Failed to analyze code.`;e({aiError:n}),t().updateProcessStatus(o,`error`,n)}}catch{let n=`Connection to evaluation server failed.`;e({aiError:n}),t().updateProcessStatus(o,`error`,n)}finally{e({aiLoading:!1})}},handleExplainCode:async(n,r,i,a,o)=>{if(!n||t().explainLoading)return;let s=n.problems;if(!s)return;let c=s.problem_number?ft(s.problem_number):pt(s.id||``),l=r||s.reference_code||c?.reference_solution;if(!l)return;let u=s.name||`Problem`,d=t().registerProcess(`ai-explainer`,`AI Explain: ${u}`);e({explainLoading:!0,explanationText:null,explainError:null});try{let{data:{session:n}}=await j.auth.getSession(),r=n?n.access_token:`sandbox`,u=await fetch(`/api/reviews/explain`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({problem_number:s.problem_number||c?.problem_number,method:i||s.pattern||c?.pattern,code:l,problem_name:s.name,optimal_time:a||s.optimal_time||c?.time_complexity,optimal_space:o||s.optimal_space||c?.space_complexity})});if(u.ok){let n=await u.json();e({explanationText:n.explanation}),t().updateProcessStatus(d,`success`,null,n)}else{let n=(await u.json().catch(()=>({}))).detail||`Failed to generate code explanation.`;e({explainError:n}),t().updateProcessStatus(d,`error`,n)}}catch{let n=`Connection to explanation server failed.`;e({explainError:n}),t().updateProcessStatus(d,`error`,n)}finally{e({explainLoading:!1})}},handleFetchAiSolution:async(n,r)=>{if(!n||t().aiSolutionLoading)return;let i=n.problems,a=i?.id||n.problem_id,o=i?.problem_number?ft(i.problem_number):pt(i?.id||``),s=i?.name||`Problem`,c=t().registerProcess(`ai-solution`,`Solution: ${s}`);e({aiSolutionLoading:!0,aiSolutionError:null});try{let e=await at({problemId:a,problemNumber:i?.problem_number||o?.problem_number,problemName:i?.name,pattern:i?.pattern||o?.pattern});e.solution&&r&&r(e.solution),t().updateProcessStatus(c,`success`,null,e)}catch(n){let r=n instanceof Error?n.message:`Failed to retrieve AI Grimoire solution`;e({aiSolutionError:r}),t().updateProcessStatus(c,`error`,r)}finally{e({aiSolutionLoading:!1})}},resetAiState:()=>{let n=t();(n.aiResult!==null||n.aiError!==null||n.explanationText!==null||n.explainError!==null||n.aiSolutionError!==null)&&e({aiResult:null,aiError:null,explanationText:null,explainError:null,aiSolutionError:null})},getActiveProcesses:()=>Object.values(t().processes).filter(e=>e.status===`running`),hasRunningProcesses:()=>Object.values(t().processes).some(e=>e.status===`running`)})),bt=({id:e,title:n,shortTitle:r,icon:o,isOpen:u,isMinimized:f,isActive:m,isMobile:h,color:g,onToggle:_})=>{let[v,x]=(0,P.useState)(!1),S=Y(e=>e.closeWindow),C=Y(e=>e.focusWindow),w=Y(e=>e.minimizeWindow),{refs:{setReference:T,setFloating:E},floatingStyles:D,context:O}=t({open:v&&!h,onOpenChange:x,placement:`top`,middleware:[i(10),p({padding:8}),a({padding:8})],whileElementsMounted:s}),k=y(O,{delay:{open:350,close:150},restMs:120,enabled:!h}),A=b(O),j=l(O,{role:`tooltip`}),{getReferenceProps:M,getFloatingProps:N}=c([k,A,j]);return u?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{ref:T,...M(),onClick:()=>{x(!1),_(e)},className:`h-full ${h?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] text-ink-black ${m&&!f?`bg-paper-white font-extrabold translate-y-[2px]`:`bg-surface-variant hover:bg-white/40`}`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,style:g&&m?{color:g}:void 0,children:o}),(0,I.jsx)(`span`,{style:g&&m?{color:g}:void 0,children:h?r:n})]}),v&&!h&&(0,I.jsx)(d,{children:(0,I.jsxs)(`div`,{ref:E,style:D,...N(),className:`z-[90] w-64 bg-paper-white border-[3px] border-ink-black shadow-[4px_4px_0px_0px_#1E293B] flex flex-col p-3 select-none animate-fade-in pointer-events-auto`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b-2 border-ink-black/20 pb-1.5 mb-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,style:g?{color:g}:void 0,children:o}),(0,I.jsx)(`span`,{className:`font-window-title text-xs font-bold text-ink-black truncate max-w-[140px]`,children:n})]}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold px-1.5 py-0.5 border border-ink-black ${m&&!f?`bg-[#39ff14] text-ink-black`:f?`bg-amber-200 text-amber-900`:`bg-slate-200 text-slate-700`}`,children:m&&!f?`ACTIVE`:f?`MINIMIZED`:`BACKGROUND`})]}),(0,I.jsxs)(`div`,{className:`w-full h-20 bg-slate-900 border-2 border-ink-black mb-2.5 flex flex-col items-center justify-center p-2 relative overflow-hidden group`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 opacity-15 pointer-events-none bg-[radial-gradient(#39ff14_1px,transparent_1px)] [background-size:8px_8px]`}),(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-emerald-400 opacity-60 mb-1`,children:o}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] text-emerald-300 tracking-wider`,children:`ALGOSPACED VIEWPORT`})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-1.5 pt-1 border-t border-ink-black/20`,children:[(0,I.jsxs)(`button`,{onClick:t=>{t.stopPropagation(),x(!1),C(e)},className:`flex-1 py-1 px-2 bg-emerald-100 hover:bg-emerald-200 border-2 border-ink-black text-ink-black font-window-title text-[10px] font-bold flex items-center justify-center gap-1 transition-colors cursor-pointer`,title:`Bring to front`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`open_in_full`}),`Focus`]}),(0,I.jsx)(`button`,{onClick:t=>{t.stopPropagation(),x(!1),w(e)},className:`py-1 px-2 bg-amber-100 hover:bg-amber-200 border-2 border-ink-black text-ink-black font-window-title text-[10px] font-bold flex items-center justify-center transition-colors cursor-pointer`,title:`Minimize window`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`minimize`})}),(0,I.jsx)(`button`,{onClick:t=>{t.stopPropagation(),x(!1),S(e)},className:`py-1 px-2 bg-rose-100 hover:bg-rose-200 border-2 border-ink-black text-rose-700 font-window-title text-[10px] font-bold flex items-center justify-center transition-colors cursor-pointer`,title:`Close window`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`close`})})]})]})})]}):null},xt=({isOpen:e,onOpenChange:n,children:r})=>{let o=yt(e=>e.processes),u=Object.values(o).filter(e=>e.status===`running`),f=Y(e=>e.openWindow),{refs:{setReference:m,setFloating:h},floatingStyles:g,context:_}=t({open:e,onOpenChange:n,placement:`top-end`,middleware:[i(10),p({padding:10}),a({padding:10})],whileElementsMounted:s}),v=b(_,{outsidePress:!0,escapeKey:!0}),y=l(_,{role:`dialog`}),{getReferenceProps:x,getFloatingProps:S}=c([v,y]);return(0,I.jsxs)(I.Fragment,{children:[r(m,x()),e&&(0,I.jsx)(d,{children:(0,I.jsxs)(`div`,{ref:h,style:g,...S(),className:`z-[90] w-80 bg-paper-white border-[3px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col p-3 select-none animate-fade-in`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b-2 border-ink-black pb-2 mb-2 bg-[#0284c7] text-white px-2 py-1 -mx-3 -mt-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm animate-spin`,children:`autorenew`}),(0,I.jsx)(`span`,{className:`font-arcade text-[9px] font-bold tracking-wider`,children:`PROCESS MONITOR`})]}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold bg-[#facc15] text-ink-black px-1.5 py-0.5 border border-ink-black`,children:[u.length,` ACTIVE`]})]}),(0,I.jsx)(`div`,{className:`flex flex-col gap-2 max-h-56 overflow-y-auto custom-scrollbar my-1`,children:u.length===0?(0,I.jsx)(`div`,{className:`text-center py-4 text-xs font-window-title text-slate-500 font-bold`,children:`No background processes running`}):u.map(e=>(0,I.jsxs)(`div`,{className:`p-2 border-2 border-ink-black bg-slate-50 flex flex-col gap-1 shadow-[2px_2px_0_0_#1E293B]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`font-window-title text-xs font-bold text-ink-black truncate max-w-[170px]`,children:e.title}),(0,I.jsx)(`span`,{className:`font-arcade text-[7px] font-extrabold bg-[#39ff14] text-ink-black px-1 py-0.2 border border-ink-black`,children:`RUNNING`})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between font-arcade text-[8px] text-slate-500`,children:[(0,I.jsxs)(`span`,{children:[`TYPE: `,e.appId.toUpperCase()]}),(0,I.jsxs)(`span`,{children:[`PID: `,e.pid.slice(-6)]})]})]},e.pid))}),(0,I.jsxs)(`div`,{className:`pt-2 border-t-2 border-ink-black/20 flex items-center justify-between gap-2 mt-1`,children:[(0,I.jsxs)(`button`,{onClick:()=>{n(!1),f(`terminal`)},className:`flex-1 py-1 px-2 bg-[#39ff14] hover:bg-[#28e007] border-2 border-ink-black text-ink-black font-window-title text-[11px] font-bold flex items-center justify-center gap-1.5 transition-colors cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`terminal`}),`Open Terminal (ps)`]}),(0,I.jsx)(`button`,{onClick:()=>n(!1),className:`py-1 px-2.5 bg-slate-200 hover:bg-slate-300 border-2 border-ink-black text-ink-black font-window-title text-[11px] font-bold transition-colors cursor-pointer`,children:`Close`})]})]})})]})},St=P.forwardRef(({isOpen:e,onOpenWindow:t,onOpenOnboarding:n,onTriggerSync:r,onSignOut:i,style:a,className:o,...s},c)=>e?(0,I.jsxs)(`div`,{ref:c,onClick:e=>e.stopPropagation(),id:`start-menu`,style:a,...s,className:`w-64 bg-white border-[3px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col p-4 z-[90] select-none ${a?``:`absolute bottom-14 left-0 ml-2 mb-2`} ${o||``}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-2 mb-3`,children:[(0,I.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wider`,children:`ALGOSPACED OS`}),(0,I.jsx)(`span`,{className:`font-arcade text-[7px] font-extrabold bg-[#facc15] text-ink-black px-1.5 py-0.5 border-[1.5px] border-ink-black shadow-[1.5px_1.5px_0_0_#1E293B]`,children:`BETA`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-2.5 font-window-title text-base font-bold`,children:[(0,I.jsxs)(`button`,{onClick:()=>t(`queue`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`}),`Daily Queue`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`journey`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`route`}),`Journey Path`]}),(0,I.jsxs)(`button`,{onClick:n,className:`w-full text-left hover:bg-amber-100 px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-amber-600`,style:{fontVariationSettings:`'FILL' 1`},children:`bolt`}),`Fast-Track Checklist`]}),(0,I.jsxs)(`button`,{onClick:r,className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`cloud_sync`}),`Drive Sync`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`github`),className:`w-full text-left hover:bg-slate-100 px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-slate-800`,style:{fontVariationSettings:`'FILL' 1`},children:`code`}),`GitHub Solutions`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`terminal`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`terminal`}),`Terminal`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`computer`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`desktop_windows`}),`My Computer`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`companion`),className:`w-full text-left hover:bg-[#ffe24c]/40 px-3 py-1.5 border-2 border-transparent hover:border-[#f59e0b] transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-[#f59e0b]`,style:{fontVariationSettings:`'FILL' 1`},children:`castle`}),`Auri`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`python`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),`Python Challenge`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`mysql`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`database`}),`MySQL Playground`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`settings`),className:`w-full text-left hover:bg-[#10b981]/25 px-3 py-1.5 border-2 border-transparent hover:border-[#10b981] transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-[#10b981]`,style:{fontVariationSettings:`'FILL' 1`},children:`key`}),`API Configuration`]})]}),(0,I.jsx)(`div`,{className:`mt-4 flex justify-end border-t-[3px] border-ink-black pt-4 select-none`,children:(0,I.jsx)(`button`,{onClick:i,className:`bg-highlight-pink text-white font-window-title px-4 py-2.5 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_#1E293B] active:translate-y-0.5 active:translate-x-0.5 active:shadow-none hover:bg-rose-600 transition-all cursor-pointer font-bold uppercase text-xs`,children:`Shut Down`})})]}):null);St.displayName=`DesktopStartMenu`;var Ct=[{id:`queue`,title:`Daily Queue`,shortTitle:`Queue`,icon:`view_list`},{id:`journey`,title:`Journey Path`,shortTitle:`Journey`,icon:`route`},{id:`terminal`,title:`Terminal`,shortTitle:`Terminal`,icon:`terminal`},{id:`sync`,title:`Drive Sync`,shortTitle:`Sync`,icon:`cloud_sync`},{id:`computer`,title:`My Computer`,shortTitle:`Comp`,icon:`desktop_windows`},{id:`createProblem`,title:`Create Problem`,shortTitle:`New File`,icon:`note_add`},{id:`editProblem`,title:`Edit Problem`,shortTitle:`Edit`,icon:`edit_note`,color:`#059669`},{id:`python`,title:`Python Challenge`,shortTitle:`Python`,icon:`sports_esports`},{id:`mysql`,title:`MySQL Playground`,shortTitle:`SQL`,icon:`database`},{id:`companion`,title:`Auri`,shortTitle:`Auri`,icon:`castle`,color:`#d97706`},{id:`settings`,title:`API Config`,shortTitle:`API`,icon:`key`,color:`#10b981`}],wt=({isStartOpen:e,onToggleStart:n,onCloseStart:r,isMobile:o,windows:u,activeWindow:f,onToggleWindow:m,time:h,onOpenWindow:g,onOpenOnboarding:_,onTriggerSync:v,onSignOut:y})=>{let x=Y(e=>e.windows),S=Y(e=>e.activeWindow),C=Y(e=>e.toggleWindowMinimize),w=Y(e=>e.openWindow),T=yt(e=>e.processes),E=P.useMemo(()=>Object.values(T).filter(e=>e.status===`running`),[T]),O=u??x,k=f??S,A=m??C,[j,M]=(0,P.useState)(()=>D());(0,P.useEffect)(()=>{let e=()=>M(!1),t=()=>M(!0);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let[N,F]=(0,P.useState)(!1),L=e??N,R=()=>{r&&r(),F(!1)},z=()=>{L?R():(n&&n(),F(!0))},{refs:{setReference:B,setFloating:V},floatingStyles:H,context:U}=t({open:L,onOpenChange:e=>{e||R()},placement:`top-start`,middleware:[i(10),p({padding:8}),a({padding:8})],whileElementsMounted:s}),W=b(U,{outsidePress:!0,escapeKey:!0}),G=l(U,{role:`menu`}),{getReferenceProps:ee,getFloatingProps:te}=c([W,G]),[ne,re]=(0,P.useState)(!1);return(0,I.jsxs)(`div`,{onClick:R,className:`fixed bottom-0 left-0 w-full z-50 flex items-center justify-between h-14 border-t-[4px] border-ink-black bg-[#0ea5e9] px-0 select-none shadow-[0_-4px_0_0_rgba(30,41,59,0.1)]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center h-full overflow-x-auto custom-scrollbar`,children:[(0,I.jsxs)(`button`,{ref:B,...ee(),onClick:e=>{e.stopPropagation(),z()},className:`h-full ${o?`px-3`:`px-6`} flex items-center gap-2 border-r-[4px] border-ink-black bg-[#39ff14] text-ink-black hover:bg-[#28e007] active:bg-[#1fb304] transition-colors shadow-[inset_-3px_-3px_0px_rgba(0,0,0,0.2),inset_3px_3px_0px_rgba(255,255,255,0.5)] font-bold cursor-pointer`,title:`Start Menu`,"aria-label":`Start Menu`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-2xl font-bold`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,I.jsx)(`span`,{className:`font-display-lg ${o?`text-sm`:`text-lg`} italic tracking-wide`,children:`Start`})]}),L&&(0,I.jsx)(d,{children:(0,I.jsx)(St,{ref:V,style:H,...te(),isOpen:L,onOpenWindow:e=>{R(),g?g(e):w(e)},onOpenOnboarding:()=>{R(),_?.()},onTriggerSync:()=>{R(),v?.()},onSignOut:()=>{R(),y?.()}})}),Ct.map(e=>{let t=O[e.id];return t?.isOpen?(0,I.jsx)(bt,{id:e.id,title:e.title,shortTitle:e.shortTitle,icon:e.icon,color:e.color,isOpen:t.isOpen,isMinimized:t.isMinimized,isActive:k===e.id,isMobile:o,onToggle:A},e.id):null})]}),(0,I.jsxs)(`div`,{className:`flex items-center h-full border-l-[4px] border-ink-black bg-[#0369a1] text-white px-3 md:px-4 gap-3 md:gap-4 shadow-[inset_3px_3px_0px_rgba(0,0,0,0.2)]`,children:[(0,I.jsx)(xt,{isOpen:ne,onOpenChange:re,children:(e,t)=>E.length>0?(0,I.jsxs)(`div`,{ref:e,...t,onClick:e=>{e.stopPropagation(),re(e=>!e)},title:`Active background processes: ${E.map(e=>e.title).join(`, `)} (click to inspect)`,className:`flex items-center gap-1.5 bg-[#facc15] text-ink-black px-2 py-0.5 border-2 border-ink-black font-arcade text-[8px] font-bold shadow-[1px_1px_0px_0px_#1E293B] animate-pulse select-none cursor-pointer hover:bg-yellow-300`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[12px] animate-spin`,children:`autorenew`}),(0,I.jsxs)(`span`,{children:[E.length,` PROC`]})]}):null}),(0,I.jsx)(`span`,{className:`material-symbols-outlined cursor-pointer select-none text-lg hover:text-cyan-200 transition-colors`,title:`Sound: ON`,children:`volume_up`}),(0,I.jsx)(`span`,{className:`material-symbols-outlined cursor-pointer select-none text-lg transition-colors ${j?`text-orange-300 animate-pulse`:`hover:text-cyan-200`}`,title:j?`Offline (Reconnecting...)`:`Online`,children:j?`wifi_off`:`network_wifi`}),(0,I.jsx)(`div`,{className:`font-arcade text-[9px] font-bold flex flex-col items-center leading-none justify-center select-none pt-0.5 cursor-default`,title:`System Time`,children:(0,I.jsx)(`span`,{children:h})})]})]})},Tt=({isMobile:e,isAnyWindowOpen:t,username:n,streak:r,onToggleWindow:i,onTriggerSync:a})=>!e||t?null:(0,I.jsxs)(`div`,{className:`w-full h-[calc(100vh-56px)] overflow-y-auto custom-scrollbar p-6 pb-24 flex flex-col gap-6 z-10 relative`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col select-none border-b-[3px] border-dashed border-ink-black pb-4 min-h-[88px] justify-center shrink-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 h-4`,children:[(0,I.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase tracking-wider`,children:`AlgoSpaced OS v1.0`}),(0,I.jsx)(`span`,{className:`text-[7px] font-arcade bg-[#facc15] text-ink-black font-extrabold px-1.5 py-0.5 border-[1.5px] border-ink-black shadow-[1px_1px_0px_0px_#1E293B]`,children:`BETA`})]}),(0,I.jsx)(`h1`,{className:`text-4xl font-extrabold font-headline-md text-ink-black uppercase tracking-tight mt-1 h-10 leading-10`,children:`start`})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,I.jsxs)(`div`,{className:`col-span-2 bg-[#fdf8e1] border-[3px] border-ink-black p-4 flex items-center gap-4 gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)]`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 border-[3px] border-ink-black overflow-hidden bg-primary-fixed-dim shadow-[2px_2px_0_0_#1E293B] shrink-0`,children:(0,I.jsx)(`img`,{alt:`Profile Avatar`,width:48,height:48,className:`w-full h-full object-cover`,src:`/icons/avatar.webp`})}),(0,I.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`font-headline-md text-sm font-bold text-ink-black truncate`,children:n}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 text-red-700 mt-1 select-none font-bold`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`local_fire_department`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[7px]`,children:[r?.current_streak??0,` DAY STREAK`]})]})]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`queue`),className:`bg-grass-green text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`DAILY`,(0,I.jsx)(`br`,{}),`QUEUE`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`journey`),className:`bg-[#0ea5e9] text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`route`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`JOURNEY`,(0,I.jsx)(`br`,{}),`PATH`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`computer`),className:`bg-paper-white text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`img`,{alt:`My Computer`,width:40,height:40,className:`w-10 h-10 object-cover border-2 border-ink-black bg-white`,src:`/icons/computer.webp`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`MY COMP`})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`terminal`),className:`bg-[#1e293b] text-[#39ff14] border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`img`,{alt:`Terminal`,width:40,height:40,className:`w-10 h-10 object-cover border-2 border-ink-black bg-white`,src:`/icons/terminal.webp`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] text-[#39ff14] font-bold tracking-tight uppercase leading-tight`,children:`TERMINAL`})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`python`),className:`bg-[#9d4edd] text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`PYTHON`,(0,I.jsx)(`br`,{}),`PLAY`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`mysql`),className:`bg-[#ffcc00] text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`database`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`MYSQL`,(0,I.jsx)(`br`,{}),`PLAY`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`companion`),className:`bg-[#f59e0b] hover:bg-amber-600 text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`img`,{alt:`Auri`,width:40,height:40,className:`w-10 h-10 object-cover object-top border-2 border-ink-black bg-amber-100 rounded`,src:`/sprites/princess/smiling_warmly.webp`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`AURI`})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`settings`),className:`bg-[#059669] hover:bg-emerald-700 text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`key`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`API CONFIG`})]}),(0,I.jsxs)(`button`,{onClick:a,className:`col-span-2 bg-[#ffe24c] hover:bg-yellow-300 text-ink-black border-[3px] border-ink-black p-4 flex items-center justify-between gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl`,style:{fontVariationSettings:`'FILL' 1`},children:`cloud_sync`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase`,children:`DRIVE NOTES SYNC`})]}),(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,children:`chevron_right`})]})]})]}),Et=class extends P.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[WindowErrorBoundary] Error caught in window "${this.props.windowId}":`,e,t)}handleReset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?(0,I.jsx)(`div`,{className:`w-full h-full p-6 bg-[#0f172a] text-white flex flex-col items-center justify-center font-sans select-none overflow-auto`,children:(0,I.jsxs)(`div`,{className:`max-w-md w-full bg-[#1e293b] border-[3px] border-rose-500 rounded-lg p-5 shadow-[6px_6px_0px_0px_rgba(0,0,0,0.5)] flex flex-col gap-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-rose-400 font-headline-md font-bold text-sm border-b border-slate-700 pb-2.5`,children:[(0,I.jsx)(_,{className:`w-5 h-5 shrink-0`}),(0,I.jsxs)(`span`,{children:[`SYSTEM INTERRUPT: `,this.props.windowTitle||this.props.windowId]})]}),(0,I.jsx)(`div`,{className:`bg-[#0b0f19] border border-slate-800 rounded p-3 font-mono text-[11px] text-rose-300 leading-relaxed max-h-32 overflow-y-auto custom-scrollbar`,children:this.state.error?.message||`An unexpected runtime error occurred.`}),(0,I.jsx)(`p`,{className:`text-[11px] text-slate-400 leading-relaxed`,children:`The window process encountered a recoverable fault. You can restart this window module without losing your desktop session.`}),(0,I.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-2 border-t border-slate-700`,children:[this.props.onClose&&(0,I.jsxs)(`button`,{type:`button`,onClick:this.props.onClose,className:`px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs font-bold transition-all flex items-center gap-1.5 cursor-pointer`,children:[(0,I.jsx)(C,{className:`w-3.5 h-3.5`}),(0,I.jsx)(`span`,{children:`Close Window`})]}),(0,I.jsxs)(`button`,{type:`button`,onClick:this.handleReset,className:`px-3 py-1.5 bg-rose-600 hover:bg-rose-500 text-white rounded text-xs font-bold transition-all shadow-[2px_2px_0px_0px_#000] active:translate-y-0.5 active:shadow-none flex items-center gap-1.5 cursor-pointer`,children:[(0,I.jsx)(u,{className:`w-3.5 h-3.5`}),(0,I.jsx)(`span`,{children:`Restart Module`})]})]})]})}):this.props.children}},Dt=e=>{if(!e||!e.startsWith(`#`))return!1;if(e.toLowerCase()===`#0ea5e9`)return!0;let t=e.replace(`#`,``);if(t.length===3){let e=parseInt(t[0]+t[0],16),n=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);return .299*e+.587*n+.114*r>135}if(t.length===6){let e=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16);return .299*e+.587*n+.114*r>135}return!1};function Q({id:e,title:t,isOpen:n,isMinimized:r,onClose:i,onMinimize:a,activeWindow:o,setActiveWindow:s,children:c,icon:l=`terminal`,defaultWidth:u=`700px`,defaultHeight:d=`600px`,minWidth:f=380,minHeight:p=280,defaultX:m,defaultY:h,titleBarColor:g=`#0ea5e9`,isMobile:_=!1}){let v=e=>{let t=parseInt(e,10);return isNaN(t)?500:t},y=Y(t=>t.windowZIndexes[e]),b=Y(e=>e.activeWindow),x=Y(e=>e.closeWindow),C=Y(e=>e.minimizeWindow),w=Y(e=>e.focusWindow),T=Y(t=>!!t.maximizedWindows[e]),E=(o??b)===e,D=y??(E?40:30),O=!_&&T,k=i??(()=>x(e)),A=a??(()=>C(e)),j=(0,P.useCallback)(()=>{s?s(e):w(e)},[e,s,w]),M=(0,P.useCallback)(t=>{t?.stopPropagation(),Y.getState().toggleMaximize(e)},[e]),[N,F]=(0,P.useState)(()=>Y.getState().windowPositions[e]||(m===void 0&&h===void 0?{x:Math.floor(Math.random()*40)-20,y:Math.floor(Math.random()*40)-20}:{x:m??0,y:h??0})),[L,R]=(0,P.useState)(()=>Y.getState().windowSizes[e]||{width:v(u),height:v(d)}),[z,B]=(0,P.useState)(!1),[V,H]=(0,P.useState)(!1),U=(0,P.useRef)(N),W=(0,P.useRef)(L),G=(0,P.useRef)(null);(0,P.useEffect)(()=>{U.current=N},[N]),(0,P.useEffect)(()=>{W.current=L},[L]);let ee=(0,P.useCallback)((e,t,n,r)=>{if(typeof window>`u`)return{x:e,y:t};let i=window.innerWidth/2,a=window.innerHeight/2,o=n/2,s=r/2,c=-a+s,l=Math.max(c,a+s-80),u=-i-o+80,d=i+o-80;return{x:Math.min(Math.max(e,u),d),y:Math.min(Math.max(t,c),l)}},[]),te=S(({offset:[t,n],first:r,last:i,event:a,cancel:o})=>{let s=a.target;if(s?.closest(`.window-control-btn`)||s?.closest(`.window-resize-handle`)){o();return}r&&(j(),B(!0));let c=ee(t,n,W.current.width,W.current.height);U.current=c,G.current&&(G.current.style.transform=`translate3d(calc(-50% + ${c.x}px), calc(-50% + ${c.y}px), 0)`),i&&(B(!1),F(c),Y.getState().updateWindowPosition(e,c.x,c.y))},{from:()=>[U.current.x,U.current.y],pointer:{capture:!0},enabled:!_&&!O,eventOptions:{passive:!1}}),ne=S(({offset:[t,n],first:r,last:i,event:a})=>{a.stopPropagation(),r&&(j(),H(!0));let o=Math.max(f,t),s=Math.max(p,n);W.current={width:o,height:s},G.current&&(G.current.style.width=`${o}px`,G.current.style.height=`${s}px`),i&&(H(!1),R(W.current),Y.getState().updateWindowSize(e,W.current.width,W.current.height))},{from:()=>[W.current.width,W.current.height],pointer:{capture:!0},enabled:!_&&!O,eventOptions:{passive:!1}});return n?(0,I.jsxs)(`div`,{ref:G,onMouseDown:j,style:_?{zIndex:D,display:r?`none`:`flex`}:O?{width:`100vw`,height:`calc(100vh - 56px)`,top:0,left:0,transform:`none`,zIndex:D,display:r?`none`:`flex`}:{width:`${L.width}px`,height:`${L.height}px`,transform:`translate3d(calc(-50% + ${N.x}px), calc(-50% + ${N.y}px), 0)`,zIndex:D,display:r?`none`:`flex`,willChange:z||V?`transform, width, height`:`auto`},className:`absolute bg-paper-white border-[4px] flex flex-col overflow-hidden window-shadow ${z||V?`transition-none`:`transition-all duration-150`} ${_?`top-0 left-0 w-full h-[calc(100vh-56px)] max-w-none max-h-none border-t-0 border-x-0`:O?`top-0 left-0 max-w-none max-h-none border-ink-black`:`top-1/2 left-1/2 max-w-[98vw] max-h-[90vh] border-ink-black`} ${E?`border-ink-black shadow-[8px_8px_0px_0px_rgba(30,41,59,1)]`:`border-ink-black opacity-95 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)]`}`,children:[(0,I.jsxs)(`div`,{...te(),onDoubleClick:_?void 0:M,style:{backgroundColor:g},className:`border-b-[4px] border-ink-black px-4 py-2 flex justify-between items-center ${Dt(g)?`text-ink-black`:`text-white`} shrink-0 select-none touch-none ${_||O?`cursor-default`:z?`cursor-grabbing`:`cursor-grab`}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 pointer-events-none`,children:[l&&(0,I.jsx)(`span`,{className:`material-symbols-outlined select-none`,style:{fontVariationSettings:`'FILL' 1`},children:l}),(0,I.jsx)(`span`,{className:`font-window-title text-sm md:text-base font-bold tracking-wide select-none`,children:t})]}),(0,I.jsxs)(`div`,{className:`flex gap-1.5`,onPointerDown:e=>e.stopPropagation(),children:[!_&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`button`,{onClick:e=>{e.stopPropagation(),A()},className:`window-control-btn w-7 h-7 bg-white text-ink-black border-[3px] border-ink-black flex items-center justify-center hover:bg-yellow-300 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,title:`Minimize`,"aria-label":`Minimize`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:`minimize`})}),(0,I.jsx)(`button`,{onClick:e=>{e.stopPropagation(),M(e)},className:`window-control-btn w-7 h-7 bg-white text-ink-black border-[3px] border-ink-black flex items-center justify-center hover:bg-yellow-300 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,title:O?`Restore`:`Maximize`,"aria-label":O?`Restore`:`Maximize`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:O?`filter_none`:`crop_square`})})]}),(0,I.jsx)(`button`,{onClick:e=>{e.stopPropagation(),k()},className:`window-control-btn w-7 h-7 bg-rose-600 text-white border-[3px] border-ink-black flex items-center justify-center hover:bg-rose-700 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,title:`Close`,"aria-label":`Close`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:`close`})})]})]}),(0,I.jsx)(`div`,{className:`flex-1 overflow-hidden relative bg-paper-white flex flex-col ${z||V?`pointer-events-none select-none`:``}`,children:(0,I.jsx)(Et,{windowId:e,windowTitle:t,onClose:k,children:c})}),!_&&!O&&(0,I.jsx)(`div`,{...ne(),className:`window-resize-handle absolute bottom-0 right-0 w-5 h-5 cursor-se-resize flex items-end justify-end p-0.5 select-none z-[50] touch-none`,title:`Resize Window`,children:(0,I.jsxs)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 10 10`,className:`text-ink-black opacity-60`,children:[(0,I.jsx)(`line`,{x1:`8`,y1:`2`,x2:`2`,y2:`8`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,I.jsx)(`line`,{x1:`8`,y1:`5`,x2:`5`,y2:`8`,stroke:`currentColor`,strokeWidth:`1.5`})]})})]}):null}var Ot=`modulepreload`,kt=function(e){return`/`+e},At={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=kt(t,n),t=s(t),t in At)return;At[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ot,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},jt=(0,P.lazy)(()=>$(()=>import(`./ReviewQueue-DmsrlLxn.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),Mt=(0,P.lazy)(()=>$(()=>import(`./JourneyPath-Dpd3IPxF.js`),__vite__mapDeps([11,1,2,3,4,5,7]))),Nt=(0,P.lazy)(()=>$(()=>import(`./TerminalEmulator-C2zR6yON.js`),__vite__mapDeps([12,1,2,3,4,5]))),Pt=(0,P.lazy)(()=>$(()=>import(`./PythonChallenge-BOgiGe52.js`),__vite__mapDeps([13,1,2,3,4,5,9]))),Ft=(0,P.lazy)(()=>$(()=>import(`./MySQLPlayground-CDRacqFf.js`),__vite__mapDeps([14,1,2,3,4,5]))),It=(0,P.lazy)(()=>$(()=>import(`./FileExplorer-CJE9LlAj.js`),__vite__mapDeps([15,1,2,3,4,5]))),Lt=(0,P.lazy)(()=>$(()=>import(`./Settings-ACJ113RL.js`),__vite__mapDeps([16,1,2,3,6,4,5]))),Rt=(0,P.lazy)(()=>$(()=>import(`./CreateProblemForm-Cej3QR08.js`),__vite__mapDeps([17,1,2,3,4,5]))),zt=(0,P.lazy)(()=>$(()=>import(`./PrincessChamber-5t89aBn-.js`).then(e=>e.t),__vite__mapDeps([10,1,2,3]))),Bt=(0,P.lazy)(()=>$(()=>import(`./GitHubSyncWindow-DHS56rys.js`),__vite__mapDeps([18,1,2,3,6,4,5]))),Vt=({windows:e,activeWindow:t,setActiveWindow:n,isMobile:r,openWindow:i,closeWindow:a,minimizeWindow:o,overrideProblemId:s,setOverrideProblemId:c,editingProblem:l,openEditProblem:u,handleSelectProblemForReview:d,refreshExplorerTrigger:f,triggerRefreshExplorer:p,setIsOnboardingOpen:m,wallpaperUrl:h,setWallpaperUrl:g,syncing:_,syncResult:v,triggerSync:y})=>{let b=Y(e=>e.windows),x=Y(e=>e.activeWindow),S=Y(e=>e.setActiveWindow),C=Y(e=>e.openWindow),w=Y(e=>e.closeWindow),T=Y(e=>e.minimizeWindow),E=Y(e=>e.overrideProblemId),D=Y(e=>e.setOverrideProblemId),O=Y(e=>e.editingProblem),k=Y(e=>e.openEditProblem),A=Y(e=>e.handleSelectProblemForReview),j=Y(e=>e.refreshExplorerTrigger),M=Y(e=>e.triggerRefreshExplorer),N=e??b,F=t??x,L=n??S,R=i??C,z=a??w,B=o??T,V=s===void 0?E:s,H=c??D,U=l===void 0?O:l,W=u??k,G=d??A,ee=f??j,te=p??M,ne=(0,P.useCallback)(()=>H(null),[H]),re=(0,P.useCallback)(()=>R(`journey`),[R]),ie=(0,P.useCallback)(()=>R(`createProblem`),[R]),ae=(0,P.useCallback)(()=>m(!0),[m]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Q,{id:`queue`,title:`Daily Queue.exe`,icon:`terminal`,isOpen:N.queue.isOpen,isMinimized:N.queue.isMinimized,onClose:()=>z(`queue`),onMinimize:()=>B(`queue`),activeWindow:F,setActiveWindow:L,defaultWidth:`980px`,defaultHeight:`680px`,minWidth:440,minHeight:360,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading ReviewQueue.exe...`}),children:(0,I.jsx)(jt,{overrideProblemId:V,onClearOverride:ne,onOpenWindow:R,onOpenJourney:re,onOpenCreateProblem:ie,onOpenEditProblem:W,onOpenOnboarding:ae,refreshTrigger:ee})})}),(0,I.jsx)(Q,{id:`journey`,title:`Journey_Path.exe`,icon:`route`,isOpen:N.journey.isOpen,isMinimized:N.journey.isMinimized,onClose:()=>z(`journey`),onMinimize:()=>B(`journey`),activeWindow:F,setActiveWindow:L,defaultWidth:`980px`,defaultHeight:`680px`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading JourneyPath.exe...`}),children:(0,I.jsx)(Mt,{onSelectProblemForReview:G})})}),(0,I.jsx)(Q,{id:`terminal`,title:`Arcade Terminal.com`,icon:`terminal`,isOpen:N.terminal.isOpen,isMinimized:N.terminal.isMinimized,onClose:()=>z(`terminal`),onMinimize:()=>B(`terminal`),activeWindow:F,setActiveWindow:L,defaultWidth:`640px`,defaultHeight:`450px`,titleBarColor:`#1e293b`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading Terminal.exe...`}),children:(0,I.jsx)(Nt,{onOpenWindow:R,onClose:()=>z(`terminal`)})})}),(0,I.jsx)(Q,{id:`sync`,title:`Drive_Sync.sys`,icon:`cloud_sync`,isOpen:N.sync.isOpen,isMinimized:N.sync.isMinimized,onClose:()=>z(`sync`),onMinimize:()=>B(`sync`),activeWindow:F,setActiveWindow:L,defaultWidth:`480px`,defaultHeight:`320px`,titleBarColor:`#855400`,isMobile:r,children:(0,I.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-6 flex flex-col justify-between`,children:[(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 border-b-2 border-dashed border-ink-black pb-3`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-[#855400] animate-bounce`,children:`cloud_sync`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h4`,{className:`font-arcade text-[10px] font-bold text-ink-black`,children:`DRIVE NOTES SYNCHRONIZATION`}),(0,I.jsx)(`span`,{className:`text-[8px] font-arcade text-trash-gray font-bold uppercase mt-1 block`,children:`Importing LeetCode sheets`})]})]}),_?(0,I.jsxs)(`div`,{className:`space-y-3 py-2`,children:[(0,I.jsx)(`span`,{className:`text-[9px] font-arcade text-ink-black font-bold block animate-pulse`,children:`SYNC PROCESS RUNNING...`}),(0,I.jsx)(`div`,{className:`w-full h-6 bg-white border-[3px] border-ink-black relative overflow-hidden select-none`,children:(0,I.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#ffe24c] border-r-2 border-ink-black w-[75%] animate-pulse`})}),(0,I.jsx)(`p`,{className:`text-[9px] font-sans text-trash-gray leading-normal font-semibold`,children:`Connecting to Supabase partition, requesting Google Drive manifest, indexing note items...`})]}):(0,I.jsx)(`div`,{className:`p-3 bg-white border-[3px] border-ink-black text-xs font-semibold text-ink-black leading-relaxed shadow-[2px_2px_0px_0px_#1E293B]`,children:v||`Idle. Ready to synchronize Leitner box data logs from Sheets drive storage.`})]}),(0,I.jsxs)(`div`,{className:`flex gap-3 justify-end pt-4 border-t border-slate-200`,children:[(0,I.jsx)(`button`,{onClick:()=>z(`sync`),className:`px-4 py-2 bg-white hover:bg-slate-100 text-ink-black border-[3px] border-ink-black font-bold text-xs shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`CLOSE`}),(0,I.jsx)(`button`,{onClick:y,disabled:_,className:`px-4 py-2 bg-[#ffcc00] hover:bg-yellow-300 text-ink-black border-[3px] border-ink-black font-bold text-xs shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none disabled:opacity-50 cursor-pointer`,children:_?`SYNCING...`:`SYNC NOW`})]})]})}),(0,I.jsx)(Q,{id:`github`,title:`GitHub_Sync.exe`,icon:`terminal`,isOpen:N.github?.isOpen??!1,isMinimized:N.github?.isMinimized??!1,onClose:()=>z(`github`),onMinimize:()=>B(`github`),activeWindow:F,setActiveWindow:L,defaultWidth:`620px`,defaultHeight:`520px`,titleBarColor:`#24292e`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading GitHub_Sync.exe...`}),children:(0,I.jsx)(Bt,{onClose:()=>z(`github`)})})}),(0,I.jsx)(Q,{id:`computer`,title:`File Explorer`,icon:`desktop_windows`,isOpen:N.computer.isOpen,isMinimized:N.computer.isMinimized,onClose:()=>z(`computer`),onMinimize:()=>B(`computer`),activeWindow:F,setActiveWindow:L,defaultWidth:`640px`,defaultHeight:`480px`,titleBarColor:`#006686`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading FileExplorer.exe...`}),children:(0,I.jsx)(It,{onSetWallpaper:g,activeWallpaperUrl:h,onOpenCreateProblem:()=>R(`createProblem`),onOpenQueue:()=>R(`queue`),onOpenJourney:()=>R(`journey`),refreshTrigger:ee})})}),N.createProblem?.isOpen&&(0,I.jsx)(Q,{id:`createProblem`,title:`Create Problem`,icon:`note_add`,isOpen:N.createProblem.isOpen,isMinimized:N.createProblem.isMinimized,onClose:()=>z(`createProblem`),onMinimize:()=>B(`createProblem`),activeWindow:F,setActiveWindow:L,defaultWidth:`640px`,defaultHeight:`700px`,titleBarColor:`#a855f7`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading CreateForm.exe...`}),children:(0,I.jsx)(Rt,{onClose:()=>z(`createProblem`),onSuccess:()=>{te(),R(`queue`)}})})}),N.editProblem?.isOpen&&(0,I.jsx)(Q,{id:`editProblem`,title:U?`Edit Problem: #${U.problem_number??`—`} ${U.name}`:`Edit Problem`,icon:`edit_note`,isOpen:N.editProblem.isOpen,isMinimized:N.editProblem.isMinimized,onClose:()=>z(`editProblem`),onMinimize:()=>B(`editProblem`),activeWindow:F,setActiveWindow:L,defaultWidth:`760px`,defaultHeight:`720px`,defaultX:30,defaultY:25,titleBarColor:`#059669`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading EditProblem.exe...`}),children:(0,I.jsx)(Rt,{mode:`edit`,initialProblem:U,onClose:()=>z(`editProblem`),onSuccess:()=>{z(`editProblem`),te(),R(`queue`)}},U?.id||(U?.problem_number===void 0?`edit-problem`:String(U.problem_number)))})}),(0,I.jsx)(Q,{id:`python`,title:`Python Challenge`,icon:`sports_esports`,isOpen:N.python.isOpen,isMinimized:N.python.isMinimized,onClose:()=>z(`python`),onMinimize:()=>B(`python`),activeWindow:F,setActiveWindow:L,defaultWidth:`620px`,defaultHeight:`580px`,titleBarColor:`#9d4edd`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading PythonChallenge.exe...`}),children:(0,I.jsx)(Pt,{})})}),(0,I.jsx)(Q,{id:`mysql`,title:`MySQL Playground`,icon:`database`,isOpen:N.mysql.isOpen,isMinimized:N.mysql.isMinimized,onClose:()=>z(`mysql`),onMinimize:()=>B(`mysql`),activeWindow:F,setActiveWindow:L,defaultWidth:`660px`,defaultHeight:`580px`,titleBarColor:`#0ea5e9`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading MySQLPlayground.exe...`}),children:(0,I.jsx)(Ft,{})})}),(0,I.jsx)(Q,{id:`settings`,title:`API Configuration`,icon:`key`,isOpen:N.settings?.isOpen,isMinimized:N.settings?.isMinimized,onClose:()=>z(`settings`),onMinimize:()=>B(`settings`),activeWindow:F,setActiveWindow:L,defaultWidth:`520px`,defaultHeight:`460px`,titleBarColor:`#10b981`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading APIConfig.exe...`}),children:(0,I.jsx)(Lt,{})})}),N.companion?.isOpen&&!N.companion.isMinimized&&(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`fixed bottom-16 right-8 font-mono text-xs text-amber-300 bg-slate-900/90 p-4 border-2 border-slate-700 rounded z-40 animate-pulse`,children:`Entering the Spire Tower Parlor...`}),children:(0,I.jsx)(zt,{onClose:()=>z(`companion`),onMinimize:()=>B(`companion`),isActive:F===`companion`,onFocus:()=>L(`companion`),isMobile:r})})]})},Ht=(0,P.lazy)(()=>$(()=>import(`./Auth-DHdm5r3r.js`),__vite__mapDeps([19,1,2,3,4,5]))),Ut=(0,P.lazy)(()=>$(()=>import(`./OnboardingModal-DmgTXeeL.js`),__vite__mapDeps([8,1,2,3])));function Wt(){let[e,t]=(0,P.useState)(()=>M.getInitialUser()),[n,r]=(0,P.useState)(()=>!M.getInitialUser()),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),c=(0,P.useRef)(null),[l,u]=(0,P.useState)({visible:!1,x:0,y:0}),{openWindow:d,toggleWindowMinimize:f,triggerRefreshExplorer:p,isAnyWindowOpen:m}=Ye((0,P.useCallback)(()=>s(!1),[])),{time:h,streak:g,isMobile:_,isFullscreen:v,toggleFullscreen:y,syncing:b,syncResult:x,triggerSync:S}=Xe(e,()=>d(`sync`)),{wallpaperUrl:C,setWallpaperUrl:w,handleWallpaperChange:T}=Qe(),{companionDialogueEvent:E,setCompanionDialogueEvent:D}=$e(e,d);(0,P.useEffect)(()=>{j.auth.getSession().then(({data:{session:e}})=>{t(e?.user??null),r(!1)});let{data:{subscription:e}}=j.auth.onAuthStateChange((e,n)=>{t(n?.user??null),r(!1)});return()=>{e.unsubscribe()}},[]),(0,P.useEffect)(()=>{if(!n){let e=document.getElementById(`app-loader`);e&&e.remove()}},[n]),(0,P.useEffect)(()=>{if(!n&&e){let t=e.id,n=t===`sandbox-user-id`||!t?`sandbox`:t;if(!localStorage.getItem(`algospaced_onboarding_done_${n}`)){let e=setTimeout(()=>{a(!0)},0);return()=>clearTimeout(e)}}},[n,e]);let O=e=>{let t=e.target;t.closest(`.window-shadow`)||t.closest(`button`)||t.closest(`input`)||t.closest(`textarea`)||t.closest(`details`)||t.closest(`#start-menu`)||(e.preventDefault(),u({visible:!0,x:e.clientX,y:e.clientY}))},k=()=>{l.visible&&u(e=>({...e,visible:!1}))},A=()=>{k(),y()},N=async()=>{s(!1),await j.auth.signOut()},F=e?.email?e.email.split(`@`)[0]:`Player_One`,L=(0,P.useMemo)(()=>[{id:`queue`,label:(0,I.jsxs)(I.Fragment,{children:[`DAILY`,(0,I.jsx)(`br`,{}),`QUEUE`]}),icon:`view_list`,badgeShadowColor:`#fde047`,action:()=>d(`queue`)},{id:`journey`,label:(0,I.jsxs)(I.Fragment,{children:[`JOURNEY`,(0,I.jsx)(`br`,{}),`PATH`]}),icon:`route`,badgeShadowColor:`#fde047`,action:()=>d(`journey`)},{id:`sync`,label:(0,I.jsxs)(I.Fragment,{children:[`DRIVE`,(0,I.jsx)(`br`,{}),`SYNC`]}),icon:`cloud_sync`,badgeShadowColor:`#fde047`,action:S},{id:`github`,label:(0,I.jsxs)(I.Fragment,{children:[`GITHUB`,(0,I.jsx)(`br`,{}),`SYNC`]}),icon:`code`,badgeShadowColor:`#24292e`,action:()=>d(`github`)},{id:`computer`,label:(0,I.jsxs)(I.Fragment,{children:[`MY`,(0,I.jsx)(`br`,{}),`COMP`]}),iconImg:`/icons/computer.webp`,badgeShadowColor:`#fde047`,action:()=>d(`computer`)},{id:`terminal`,label:`TERMINAL`,iconImg:`/icons/terminal.webp`,badgeShadowColor:`#fde047`,action:()=>d(`terminal`)},{id:`python`,label:(0,I.jsxs)(I.Fragment,{children:[`PYTHON`,(0,I.jsx)(`br`,{}),`CHALLENGE`]}),icon:`sports_esports`,badgeShadowColor:`#4cc9f0`,action:()=>d(`python`)},{id:`mysql`,label:(0,I.jsxs)(I.Fragment,{children:[`MYSQL`,(0,I.jsx)(`br`,{}),`PLAYGROUND`]}),icon:`database`,badgeShadowColor:`#f72585`,action:()=>d(`mysql`)},{id:`companion`,label:`Auri`,iconImg:`/sprites/princess/smiling_warmly.webp`,badgeShadowColor:`#fde047`,action:()=>d(`companion`)},{id:`settings`,label:(0,I.jsx)(I.Fragment,{children:`API CONFIG`}),icon:`key`,badgeShadowColor:`#10b981`,action:()=>d(`settings`)}],[d,S]);return n?null:e?(0,I.jsxs)(`main`,{role:`main`,"aria-label":`Desktop Workspace`,onContextMenu:O,onClick:k,className:`w-screen h-screen m-0 p-0 relative isolate font-sans text-ink-black overflow-hidden select-none`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 w-full h-full bg-cover bg-center z-0 pointer-events-none saturate-150 contrast-125 transition-all duration-300`,style:{backgroundImage:`url('${C}')`}}),!_&&(0,I.jsx)(ee,{ref:c,icons:L,isMobile:_,onContextMenu:O}),(0,I.jsx)(et,{isMobile:_,username:F,streak:g}),(0,I.jsx)(Tt,{isMobile:_,isAnyWindowOpen:m,username:F,streak:g,onToggleWindow:f,onTriggerSync:S}),(0,I.jsx)(Vt,{isMobile:_,setIsOnboardingOpen:a,wallpaperUrl:C,setWallpaperUrl:w,syncing:b,syncResult:x,triggerSync:S}),(0,I.jsx)(wt,{isStartOpen:o,onToggleStart:()=>s(e=>!e),onCloseStart:()=>s(!1),onOpenWindow:d,onOpenOnboarding:()=>{s(!1),a(!0)},onTriggerSync:S,onSignOut:N,isMobile:_,time:h}),(0,I.jsx)(Je,{event:E,onClose:()=>D(null),onOpenCompanionWindow:()=>d(`companion`)}),(0,I.jsx)(Ne,{onOpenCompanionWindow:()=>d(`companion`)}),i&&(0,I.jsx)(P.Suspense,{fallback:null,children:(0,I.jsx)(Ut,{isOpen:i,onClose:()=>a(!1),onCompleted:p,userId:e?.id||`sandbox`})}),(0,I.jsx)(te,{isOpen:l.visible,x:l.x,y:l.y,onClose:k,onAutoArrange:()=>c.current?.autoArrange(),onResetLayout:()=>c.current?.resetLayout(),onChangeWallpaper:()=>document.getElementById(`wallpaper-input`)?.click(),onOpenWindow:d,onTriggerSync:S,onToggleFullscreen:A,isFullscreen:v}),(0,I.jsx)(`input`,{type:`file`,id:`wallpaper-input`,"aria-label":`Upload custom desktop wallpaper`,accept:`image/*`,onChange:e=>T(e,k),className:`hidden`})]}):(0,I.jsx)(P.Suspense,{fallback:null,children:(0,I.jsx)(Ht,{})})}var Gt=class extends P.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[RootErrorBoundary] Fatal system error caught at OS root:`,e,t)}handleReboot=()=>{window.location.reload()};handleHardReset=()=>{try{localStorage.clear(),sessionStorage.clear()}catch{}window.location.reload()};render(){return this.state.hasError?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-[99999] bg-[#030712] text-white flex flex-col items-center justify-center p-6 font-mono select-none overflow-auto`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 pointer-events-none bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(0,0,0,0.4)_100%)]`}),(0,I.jsxs)(`div`,{className:`relative max-w-xl w-full bg-[#0b0f19] border-[3px] border-rose-500 rounded-lg p-6 shadow-[8px_8px_0px_0px_rgba(244,63,94,0.3)] flex flex-col gap-5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-rose-400 border-b border-rose-950 pb-3`,children:[(0,I.jsx)(`div`,{className:`p-2 bg-rose-500/10 rounded border border-rose-500/30`,children:(0,I.jsx)(f,{className:`w-6 h-6 text-rose-500 animate-pulse`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-sm font-bold tracking-wider uppercase text-rose-300 font-arcade`,children:`ALGOSPACED_RECOVERY_CONSOLE`}),(0,I.jsx)(`p`,{className:`text-[10px] text-rose-400/75 mt-0.5`,children:`STOP: 0x000000D1 • DESKTOP_THREAD_EXCEPTION`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`span`,{className:`text-[11px] text-slate-400 uppercase font-semibold tracking-wider block`,children:`Fault Trace:`}),(0,I.jsx)(`div`,{className:`bg-[#020617] border border-slate-800 rounded p-3 text-[11px] text-rose-300 font-mono leading-relaxed max-h-36 overflow-y-auto custom-scrollbar break-all`,children:this.state.error?.message||`A fatal system exception was trapped by the OS kernel.`})]}),(0,I.jsx)(`p`,{className:`text-xs text-slate-300 leading-relaxed`,children:`A recoverable exception occurred in the primary desktop shell. Your local data and progress records are safely preserved in storage.`}),(0,I.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-stretch sm:items-center justify-end gap-3 pt-3 border-t border-slate-800`,children:[(0,I.jsxs)(`button`,{type:`button`,onClick:this.handleHardReset,className:`px-4 py-2 bg-slate-800 hover:bg-slate-700 text-slate-300 rounded text-xs font-bold transition-all border border-slate-700 flex items-center justify-center gap-2 cursor-pointer`,title:`Clears cached session data and resets workspace state`,children:[(0,I.jsx)(w,{className:`w-3.5 h-3.5 text-slate-400`}),(0,I.jsx)(`span`,{children:`Reset Cache & Reboot`})]}),(0,I.jsxs)(`button`,{type:`button`,onClick:this.handleReboot,className:`px-4 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded text-xs font-bold transition-all shadow-[2px_2px_0px_0px_#000] active:translate-y-0.5 active:shadow-none flex items-center justify-center gap-2 cursor-pointer`,children:[(0,I.jsx)(u,{className:`w-3.5 h-3.5`}),(0,I.jsx)(`span`,{children:`Reboot AlgoSpaced OS`})]})]})]})]}):this.props.children}},Kt=window.fetch;window.fetch=async(e,t)=>{let n=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`),r=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;if(r&&r!=="default"&&n&&n.trim()){let i=typeof e==`string`?e:`url`in e?String(e.url):e.toString();if(i&&i.includes(`/api/`)){let i=t?{...t}:{},a=new Headers(i.headers||{});return a.set(`X-Custom-API-Key`,n.trim()),a.set(`X-Gemini-API-Key`,n.trim()),a.set(`X-AI-Provider`,r),i.headers=a,Kt(e,i)}}return Kt(e,t)};async function qt(){try{let e=await fetch(`/api/config`);if(!e.ok)throw Error(`Failed to load runtime configuration`);let t=await e.json();A(!1),O(t)}catch(e){console.warn(`Failed to load runtime config from API, falling back to cached or build environment:`,e),A(!0);let t=k()||{apiKey:``,authDomain:`algospaced-dsa.firebaseapp.com`,projectId:`algospaced-dsa`,storageBucket:`algospaced-dsa.firebasestorage.app`,messagingSenderId:`1039270308844`,appId:`1:1039270308844:web:6499e8813a9f7926f7aec9`,measurementId:`G-K33PLR1N8E`};t.apiKey&&t.projectId&&O(t)}(0,F.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(P.StrictMode,{children:(0,I.jsx)(Gt,{children:(0,I.jsx)(Wt,{})})}))}qt();export{re as C,ie as S,Ae as _,_t as a,J as b,nt as c,Be as d,He as f,ke as g,Fe as h,gt as i,st as l,Ve as m,yt as n,ft as o,We as p,ht as r,vt as s,$ as t,it as u,De as v,Te as x,Y as y}; \ No newline at end of file + return res if -2**31 <= res <= 2**31 - 1 else 0`}],lt=new Map,ut=new Map,dt=new Map;for(let e of ct){lt.set(e.problem_number,e),ut.set(e.id,e);let t=dt.get(e.pattern)||[];t.push(e),dt.set(e.pattern,t)}function ft(e){if(e==null)return;let t=typeof e==`string`?parseInt(e,10):e;if(!isNaN(t))return lt.get(t)}function pt(e){if(!e)return;let t=ut.get(e);if(t)return t;if(/^\d+$/.test(e))return lt.get(parseInt(e,10));let n=e.replace(/^prob-/,``).toLowerCase().replace(/[^a-z0-9]+/g,``);for(let e of ct)if(e.name.toLowerCase().replace(/[^a-z0-9]+/g,``)===n||e.id.toLowerCase().replace(/[^a-z0-9]+/g,``)===n)return e}function mt(e){if(!e)return;let t=e.toLowerCase().replace(/\s*-\s*method.*$/i,``).replace(/[^a-z0-9]+/g,``);for(let e of ct)if(e.name.toLowerCase().replace(/[^a-z0-9]+/g,``)===t)return e}function ht(e,t,n){if(e!=null){let t=ft(e);if(t)return t}if(t){let e=pt(t);if(e)return e}if(n){let e=mt(n);if(e)return e}}function gt(){return ct}function _t(){return Array.from(dt.keys())}function vt(e,t){if(t&&t.length>0){for(let n of t)if(!e.has(n)){let e=lt.get(n);if(e)return e}}for(let t of ct)if(!e.has(t.problem_number))return t}var yt=v((e,t)=>({processes:{},sandboxRunning:!1,sandboxResults:null,sandboxError:null,savingReference:!1,savedRefSuccess:!1,saveRefError:null,aiLoading:!1,aiResult:null,aiError:null,explainLoading:!1,explanationText:null,explainError:null,aiSolutionLoading:!1,aiSolutionError:null,registerProcess:(t,n)=>{let r=`${t}-${Date.now().toString(36)}-${Math.random().toString(36).substring(2,6)}`,i={pid:r,appId:t,title:n,status:`running`,startedAt:Date.now()};return e(e=>({processes:{...e.processes,[r]:i}})),r},updateProcessStatus:(t,n,r,i)=>{e(e=>{let a=e.processes[t];return a?{processes:{...e.processes,[t]:{...a,status:n,error:r===void 0?a.error:r,data:i===void 0?a.data:i,completedAt:n===`success`||n===`error`?Date.now():a.completedAt}}}:e})},removeProcess:t=>{e(e=>{let n={...e.processes};return delete n[t],{processes:n}})},clearFinishedProcesses:()=>{e(e=>{let t={};return Object.entries(e.processes).forEach(([e,n])=>{n.status===`running`&&(t[e]=n)}),{processes:t}})},handleRunSandbox:async(n,r)=>{if(!n||!r.trim()||t().sandboxRunning)return;let i=n.problems,a=ht(i?.problem_number,i?.id||``,i?.name),o=(i?.examples&&i.examples.length>0?i.examples:a?.examples||[]).map(e=>typeof e==`string`?{input:e,expected:``}:{input:e?.input??``,expected:e?.output??``}),s=a?.starter_code||i?.starter_code,c=i?.name||a?.name||`Problem`,l=t().registerProcess(`sandbox-runner`,`PyTest: ${c}`);e({sandboxRunning:!0,sandboxResults:null,sandboxError:null,savedRefSuccess:!1});try{let n=await ot(r,o,4,s,c);e({sandboxResults:n}),t().updateProcessStatus(l,`success`,null,n)}catch(n){let r=n instanceof Error?n.message:`Execution failed`;e({sandboxError:r}),t().updateProcessStatus(l,`error`,r)}finally{e({sandboxRunning:!1})}},handleSaveReference:async(n,r,i)=>{if(!n||!r.trim()||t().savingReference)return;let a=n.problems,o=a?.id||n.problem_id;if(!o&&!a?.problem_number)return;let s=a?.problem_number??(typeof n.problem_id==`number`?n.problem_id:/^\d+$/.test(n.problem_id||``)?parseInt(n.problem_id,10):void 0),c=ht(s,o||n.problem_id,a?.name),l=a?.constraints??c?.constraints,u=Array.isArray(l)?l:l?[String(l)]:[],d=a?.examples&&a.examples.length>0?a.examples:c?.examples,f=d?d.map(e=>typeof e==`string`?{input:e,output:``}:{input:String(e?.input??``),output:String(e?.output??``),explanation:e?.explanation}):[],p=a?.name||c?.name||`Problem`,m={problem_number:s??c?.problem_number,problem_name:p,pattern:a?.pattern||c?.pattern,difficulty:a?.difficulty||c?.difficulty,optimal_time:a?.optimal_time||c?.time_complexity,optimal_space:a?.optimal_space||c?.space_complexity,description:a?.description||c?.description,starter_code:c?.starter_code||a?.starter_code,examples:f,constraints:u},h=t().registerProcess(`sandbox-runner`,`Save Ref: ${p}`);e({savingReference:!0,saveRefError:null});try{let n=await rt(o,r,m);e({savedRefSuccess:!0}),t().updateProcessStatus(h,`success`,null,n),i&&i(r,n.problem_id),setTimeout(()=>e({savedRefSuccess:!1}),3500)}catch(n){let r=n instanceof Error?n.message:`Failed to save solution`;e({saveRefError:r}),t().updateProcessStatus(h,`error`,r)}finally{e({savingReference:!1})}},resetSandbox:()=>{let n=t();(n.sandboxResults!==null||n.sandboxError!==null||n.savedRefSuccess||n.saveRefError!==null)&&e({sandboxResults:null,sandboxError:null,savedRefSuccess:!1,saveRefError:null})},handleAiEvaluation:async(n,r)=>{if(!n||!r.trim()||t().aiLoading)return;let i=n.problems,a=i?.name||`Problem`,o=t().registerProcess(`ai-evaluator`,`AI Review: ${a}`);e({aiLoading:!0,aiResult:null,aiError:null});try{let{data:{session:n}}=await j.auth.getSession(),a=n?n.access_token:`sandbox`,s=await fetch(`/api/reviews/evaluate`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${a}`},body:JSON.stringify({problem_name:i.name,pattern:i.pattern,optimal_time:i.optimal_time,optimal_space:i.optimal_space,code:r})});if(s.ok){let n=await s.json();e({aiResult:n}),t().updateProcessStatus(o,`success`,null,n)}else{let n=(await s.json().catch(()=>({}))).detail||`Failed to analyze code.`;e({aiError:n}),t().updateProcessStatus(o,`error`,n)}}catch{let n=`Connection to evaluation server failed.`;e({aiError:n}),t().updateProcessStatus(o,`error`,n)}finally{e({aiLoading:!1})}},handleExplainCode:async(n,r,i,a,o)=>{if(!n||t().explainLoading)return;let s=n.problems;if(!s)return;let c=s.problem_number?ft(s.problem_number):pt(s.id||``),l=r||s.reference_code||c?.reference_solution;if(!l)return;let u=s.name||`Problem`,d=t().registerProcess(`ai-explainer`,`AI Explain: ${u}`);e({explainLoading:!0,explanationText:null,explainError:null});try{let{data:{session:n}}=await j.auth.getSession(),r=n?n.access_token:`sandbox`,u=await fetch(`/api/reviews/explain`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({problem_number:s.problem_number||c?.problem_number,method:i||s.pattern||c?.pattern,code:l,problem_name:s.name,optimal_time:a||s.optimal_time||c?.time_complexity,optimal_space:o||s.optimal_space||c?.space_complexity})});if(u.ok){let n=await u.json();e({explanationText:n.explanation}),t().updateProcessStatus(d,`success`,null,n)}else{let n=(await u.json().catch(()=>({}))).detail||`Failed to generate code explanation.`;e({explainError:n}),t().updateProcessStatus(d,`error`,n)}}catch{let n=`Connection to explanation server failed.`;e({explainError:n}),t().updateProcessStatus(d,`error`,n)}finally{e({explainLoading:!1})}},handleFetchAiSolution:async(n,r)=>{if(!n||t().aiSolutionLoading)return;let i=n.problems,a=i?.id||n.problem_id,o=i?.problem_number?ft(i.problem_number):pt(i?.id||``),s=i?.name||`Problem`,c=t().registerProcess(`ai-solution`,`Solution: ${s}`);e({aiSolutionLoading:!0,aiSolutionError:null});try{let e=await at({problemId:a,problemNumber:i?.problem_number||o?.problem_number,problemName:i?.name,pattern:i?.pattern||o?.pattern});e.solution&&r&&r(e.solution),t().updateProcessStatus(c,`success`,null,e)}catch(n){let r=n instanceof Error?n.message:`Failed to retrieve AI Grimoire solution`;e({aiSolutionError:r}),t().updateProcessStatus(c,`error`,r)}finally{e({aiSolutionLoading:!1})}},resetAiState:()=>{let n=t();(n.aiResult!==null||n.aiError!==null||n.explanationText!==null||n.explainError!==null||n.aiSolutionError!==null)&&e({aiResult:null,aiError:null,explanationText:null,explainError:null,aiSolutionError:null})},getActiveProcesses:()=>Object.values(t().processes).filter(e=>e.status===`running`),hasRunningProcesses:()=>Object.values(t().processes).some(e=>e.status===`running`)})),bt=({id:e,title:t,shortTitle:r,icon:a,isOpen:o,isMinimized:p,isActive:m,isMobile:h,color:g,onToggle:v})=>{let[y,b]=(0,P.useState)(!1),x=X(e=>e.closeWindow),S=X(e=>e.focusWindow),C=X(e=>e.minimizeWindow),{refs:{setReference:w,setFloating:T},floatingStyles:D,context:O}=l({open:y&&!h,onOpenChange:b,placement:`top`,middleware:[c(10),s({padding:8}),f({padding:8})],whileElementsMounted:E}),k=u(O,{delay:{open:350,close:150},restMs:120,enabled:!h}),A=_(O),j=i(O,{role:`tooltip`}),{getReferenceProps:M,getFloatingProps:N}=d([k,A,j]);return o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{ref:w,...M(),onClick:()=>{b(!1),v(e)},className:`h-full ${h?`px-2 text-[10px] gap-1`:`px-4 text-xs gap-2`} border-r-[4px] border-ink-black font-bold font-window-title cursor-pointer transition-all shadow-[inset_0px_3px_0px_rgba(255,255,255,0.8)] text-ink-black ${m&&!p?`bg-paper-white font-extrabold translate-y-[2px]`:`bg-surface-variant hover:bg-white/40`}`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm font-bold`,style:g&&m?{color:g}:void 0,children:a}),(0,I.jsx)(`span`,{style:g&&m?{color:g}:void 0,children:h?r:t})]}),y&&!h&&(0,I.jsx)(n,{children:(0,I.jsxs)(`div`,{ref:T,style:D,...N(),className:`z-[90] w-64 bg-paper-white border-[3px] border-ink-black shadow-[4px_4px_0px_0px_#1E293B] flex flex-col p-3 select-none animate-fade-in pointer-events-auto`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b-2 border-ink-black/20 pb-1.5 mb-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-base`,style:g?{color:g}:void 0,children:a}),(0,I.jsx)(`span`,{className:`font-window-title text-xs font-bold text-ink-black truncate max-w-[140px]`,children:t})]}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold px-1.5 py-0.5 border border-ink-black ${m&&!p?`bg-[#39ff14] text-ink-black`:p?`bg-amber-200 text-amber-900`:`bg-slate-200 text-slate-700`}`,children:m&&!p?`ACTIVE`:p?`MINIMIZED`:`BACKGROUND`})]}),(0,I.jsxs)(`div`,{className:`w-full h-20 bg-slate-900 border-2 border-ink-black mb-2.5 flex flex-col items-center justify-center p-2 relative overflow-hidden group`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 opacity-15 pointer-events-none bg-[radial-gradient(#39ff14_1px,transparent_1px)] [background-size:8px_8px]`}),(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl text-emerald-400 opacity-60 mb-1`,children:a}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] text-emerald-300 tracking-wider`,children:`ALGOSPACED VIEWPORT`})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-1.5 pt-1 border-t border-ink-black/20`,children:[(0,I.jsxs)(`button`,{onClick:t=>{t.stopPropagation(),b(!1),S(e)},className:`flex-1 py-1 px-2 bg-emerald-100 hover:bg-emerald-200 border-2 border-ink-black text-ink-black font-window-title text-[10px] font-bold flex items-center justify-center gap-1 transition-colors cursor-pointer`,title:`Bring to front`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`open_in_full`}),`Focus`]}),(0,I.jsx)(`button`,{onClick:t=>{t.stopPropagation(),b(!1),C(e)},className:`py-1 px-2 bg-amber-100 hover:bg-amber-200 border-2 border-ink-black text-ink-black font-window-title text-[10px] font-bold flex items-center justify-center transition-colors cursor-pointer`,title:`Minimize window`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`minimize`})}),(0,I.jsx)(`button`,{onClick:t=>{t.stopPropagation(),b(!1),x(e)},className:`py-1 px-2 bg-rose-100 hover:bg-rose-200 border-2 border-ink-black text-rose-700 font-window-title text-[10px] font-bold flex items-center justify-center transition-colors cursor-pointer`,title:`Close window`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`close`})})]})]})})]}):null},xt=({isOpen:e,onOpenChange:t,children:r})=>{let a=yt(e=>e.processes),o=Object.values(a).filter(e=>e.status===`running`),u=X(e=>e.openWindow),{refs:{setReference:p,setFloating:m},floatingStyles:h,context:g}=l({open:e,onOpenChange:t,placement:`top-end`,middleware:[c(10),s({padding:10}),f({padding:10})],whileElementsMounted:E}),v=_(g,{outsidePress:!0,escapeKey:!0}),y=i(g,{role:`dialog`}),{getReferenceProps:b,getFloatingProps:x}=d([v,y]);return(0,I.jsxs)(I.Fragment,{children:[r(p,b()),e&&(0,I.jsx)(n,{children:(0,I.jsxs)(`div`,{ref:m,style:h,...x(),className:`z-[90] w-80 bg-paper-white border-[3px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col p-3 select-none animate-fade-in`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b-2 border-ink-black pb-2 mb-2 bg-[#0284c7] text-white px-2 py-1 -mx-3 -mt-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm animate-spin`,children:`autorenew`}),(0,I.jsx)(`span`,{className:`font-arcade text-[9px] font-bold tracking-wider`,children:`PROCESS MONITOR`})]}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold bg-[#facc15] text-ink-black px-1.5 py-0.5 border border-ink-black`,children:[o.length,` ACTIVE`]})]}),(0,I.jsx)(`div`,{className:`flex flex-col gap-2 max-h-56 overflow-y-auto custom-scrollbar my-1`,children:o.length===0?(0,I.jsx)(`div`,{className:`text-center py-4 text-xs font-window-title text-slate-500 font-bold`,children:`No background processes running`}):o.map(e=>(0,I.jsxs)(`div`,{className:`p-2 border-2 border-ink-black bg-slate-50 flex flex-col gap-1 shadow-[2px_2px_0_0_#1E293B]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`font-window-title text-xs font-bold text-ink-black truncate max-w-[170px]`,children:e.title}),(0,I.jsx)(`span`,{className:`font-arcade text-[7px] font-extrabold bg-[#39ff14] text-ink-black px-1 py-0.2 border border-ink-black`,children:`RUNNING`})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between font-arcade text-[8px] text-slate-500`,children:[(0,I.jsxs)(`span`,{children:[`TYPE: `,e.appId.toUpperCase()]}),(0,I.jsxs)(`span`,{children:[`PID: `,e.pid.slice(-6)]})]})]},e.pid))}),(0,I.jsxs)(`div`,{className:`pt-2 border-t-2 border-ink-black/20 flex items-center justify-between gap-2 mt-1`,children:[(0,I.jsxs)(`button`,{onClick:()=>{t(!1),u(`terminal`)},className:`flex-1 py-1 px-2 bg-[#39ff14] hover:bg-[#28e007] border-2 border-ink-black text-ink-black font-window-title text-[11px] font-bold flex items-center justify-center gap-1.5 transition-colors cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-xs`,children:`terminal`}),`Open Terminal (ps)`]}),(0,I.jsx)(`button`,{onClick:()=>t(!1),className:`py-1 px-2.5 bg-slate-200 hover:bg-slate-300 border-2 border-ink-black text-ink-black font-window-title text-[11px] font-bold transition-colors cursor-pointer`,children:`Close`})]})]})})]})},St=P.forwardRef(({isOpen:e,onOpenWindow:t,onTriggerSync:n,onSignOut:r,style:i,className:a,...o},s)=>e?(0,I.jsxs)(`div`,{ref:s,onClick:e=>e.stopPropagation(),id:`start-menu`,style:i,...o,className:`w-64 bg-white border-[3px] border-ink-black shadow-[6px_6px_0px_0px_#1E293B] flex flex-col p-4 z-[90] select-none ${i?``:`absolute bottom-14 left-0 ml-2 mb-2`} ${a||``}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between border-b-[2px] border-ink-black pb-2 mb-3`,children:[(0,I.jsx)(`span`,{className:`font-arcade text-[9px] font-bold text-ink-black tracking-wider`,children:`ALGOSPACED OS`}),(0,I.jsx)(`span`,{className:`font-arcade text-[7px] font-extrabold bg-[#facc15] text-ink-black px-1.5 py-0.5 border-[1.5px] border-ink-black shadow-[1.5px_1.5px_0_0_#1E293B]`,children:`BETA`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col gap-2.5 font-window-title text-base font-bold`,children:[(0,I.jsxs)(`button`,{onClick:()=>t(`queue`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`}),`Daily Queue`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`cardManager`),className:`w-full text-left hover:bg-sky-100 px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-sky-600`,style:{fontVariationSettings:`'FILL' 1`},children:`style`}),`Card Manager`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`journey`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`route`}),`Journey Path`]}),(0,I.jsxs)(`button`,{onClick:n,className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`cloud_sync`}),`Drive Sync`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`github`),className:`w-full text-left hover:bg-slate-100 px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-slate-800`,style:{fontVariationSettings:`'FILL' 1`},children:`code`}),`GitHub Solutions`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`terminal`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`terminal`}),`Terminal`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`computer`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`desktop_windows`}),`My Computer`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`companion`),className:`w-full text-left hover:bg-[#ffe24c]/40 px-3 py-1.5 border-2 border-transparent hover:border-[#f59e0b] transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-[#f59e0b]`,style:{fontVariationSettings:`'FILL' 1`},children:`castle`}),`Auri`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`python`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),`Python Challenge`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`mysql`),className:`w-full text-left hover:bg-secondary-container px-3 py-1.5 border-2 border-transparent hover:border-ink-black transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,style:{fontVariationSettings:`'FILL' 1`},children:`database`}),`MySQL Playground`]}),(0,I.jsxs)(`button`,{onClick:()=>t(`settings`),className:`w-full text-left hover:bg-[#10b981]/25 px-3 py-1.5 border-2 border-transparent hover:border-[#10b981] transition-colors cursor-pointer flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg text-[#10b981]`,style:{fontVariationSettings:`'FILL' 1`},children:`key`}),`API Configuration`]})]}),(0,I.jsx)(`div`,{className:`mt-4 flex justify-end border-t-[3px] border-ink-black pt-4 select-none`,children:(0,I.jsx)(`button`,{onClick:r,className:`bg-highlight-pink text-white font-window-title px-4 py-2.5 border-[3px] border-ink-black shadow-[3px_3px_0px_0px_#1E293B] active:translate-y-0.5 active:translate-x-0.5 active:shadow-none hover:bg-rose-600 transition-all cursor-pointer font-bold uppercase text-xs`,children:`Shut Down`})})]}):null);St.displayName=`DesktopStartMenu`;var Ct=[{id:`queue`,title:`Daily Queue`,shortTitle:`Queue`,icon:`view_list`},{id:`cardManager`,title:`Card Manager`,shortTitle:`Cards`,icon:`style`,color:`#0284c7`},{id:`journey`,title:`Journey Path`,shortTitle:`Journey`,icon:`route`},{id:`terminal`,title:`Terminal`,shortTitle:`Terminal`,icon:`terminal`},{id:`sync`,title:`Drive Sync`,shortTitle:`Sync`,icon:`cloud_sync`},{id:`computer`,title:`My Computer`,shortTitle:`Comp`,icon:`desktop_windows`},{id:`createProblem`,title:`Create Problem`,shortTitle:`New File`,icon:`note_add`},{id:`editProblem`,title:`Edit Problem`,shortTitle:`Edit`,icon:`edit_note`,color:`#059669`},{id:`python`,title:`Python Challenge`,shortTitle:`Python`,icon:`sports_esports`},{id:`mysql`,title:`MySQL Playground`,shortTitle:`SQL`,icon:`database`},{id:`companion`,title:`Auri`,shortTitle:`Auri`,icon:`castle`,color:`#d97706`},{id:`settings`,title:`API Config`,shortTitle:`API`,icon:`key`,color:`#10b981`}],wt=({isStartOpen:e,onToggleStart:t,onCloseStart:r,isMobile:a,windows:o,activeWindow:u,onToggleWindow:p,time:m,onOpenWindow:h,onTriggerSync:g,onSignOut:v})=>{let y=X(e=>e.windows),b=X(e=>e.activeWindow),x=X(e=>e.toggleWindowMinimize),S=X(e=>e.openWindow),C=yt(e=>e.processes),w=P.useMemo(()=>Object.values(C).filter(e=>e.status===`running`),[C]),T=o??y,O=u??b,k=p??x,[A,j]=(0,P.useState)(()=>D());(0,P.useEffect)(()=>{let e=()=>j(!1),t=()=>j(!0);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let[M,N]=(0,P.useState)(!1),F=e??M,L=()=>{r&&r(),N(!1)},R=()=>{F?L():(t&&t(),N(!0))},{refs:{setReference:z,setFloating:B},floatingStyles:V,context:H}=l({open:F,onOpenChange:e=>{e||L()},placement:`top-start`,middleware:[c(10),s({padding:8}),f({padding:8})],whileElementsMounted:E}),U=_(H,{outsidePress:!0,escapeKey:!0}),W=i(H,{role:`menu`}),{getReferenceProps:G,getFloatingProps:K}=d([U,W]),[ee,te]=(0,P.useState)(!1);return(0,I.jsxs)(`div`,{onClick:L,className:`fixed bottom-0 left-0 w-full z-50 flex items-center justify-between h-14 border-t-[4px] border-ink-black bg-[#0ea5e9] px-0 select-none shadow-[0_-4px_0_0_rgba(30,41,59,0.1)]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center h-full overflow-x-auto custom-scrollbar`,children:[(0,I.jsxs)(`button`,{ref:z,...G(),onClick:e=>{e.stopPropagation(),R()},className:`h-full ${a?`px-3`:`px-6`} flex items-center gap-2 border-r-[4px] border-ink-black bg-[#39ff14] text-ink-black hover:bg-[#28e007] active:bg-[#1fb304] transition-colors shadow-[inset_-3px_-3px_0px_rgba(0,0,0,0.2),inset_3px_3px_0px_rgba(255,255,255,0.5)] font-bold cursor-pointer`,title:`Start Menu`,"aria-label":`Start Menu`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-2xl font-bold`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,I.jsx)(`span`,{className:`font-display-lg ${a?`text-sm`:`text-lg`} italic tracking-wide`,children:`Start`})]}),F&&(0,I.jsx)(n,{children:(0,I.jsx)(St,{ref:B,style:V,...K(),isOpen:F,onOpenWindow:e=>{L(),h?h(e):S(e)},onTriggerSync:()=>{L(),g?.()},onSignOut:()=>{L(),v?.()}})}),Ct.map(e=>{let t=T[e.id];return t?.isOpen?(0,I.jsx)(bt,{id:e.id,title:e.title,shortTitle:e.shortTitle,icon:e.icon,color:e.color,isOpen:t.isOpen,isMinimized:t.isMinimized,isActive:O===e.id,isMobile:a,onToggle:k},e.id):null})]}),(0,I.jsxs)(`div`,{className:`flex items-center h-full border-l-[4px] border-ink-black bg-[#0369a1] text-white px-3 md:px-4 gap-3 md:gap-4 shadow-[inset_3px_3px_0px_rgba(0,0,0,0.2)]`,children:[(0,I.jsx)(xt,{isOpen:ee,onOpenChange:te,children:(e,t)=>w.length>0?(0,I.jsxs)(`div`,{ref:e,...t,onClick:e=>{e.stopPropagation(),te(e=>!e)},title:`Active background processes: ${w.map(e=>e.title).join(`, `)} (click to inspect)`,className:`flex items-center gap-1.5 bg-[#facc15] text-ink-black px-2 py-0.5 border-2 border-ink-black font-arcade text-[8px] font-bold shadow-[1px_1px_0px_0px_#1E293B] animate-pulse select-none cursor-pointer hover:bg-yellow-300`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[12px] animate-spin`,children:`autorenew`}),(0,I.jsxs)(`span`,{children:[w.length,` PROC`]})]}):null}),(0,I.jsx)(`span`,{className:`material-symbols-outlined cursor-pointer select-none text-lg hover:text-cyan-200 transition-colors`,title:`Sound: ON`,children:`volume_up`}),(0,I.jsx)(`span`,{className:`material-symbols-outlined cursor-pointer select-none text-lg transition-colors ${A?`text-orange-300 animate-pulse`:`hover:text-cyan-200`}`,title:A?`Offline (Reconnecting...)`:`Online`,children:A?`wifi_off`:`network_wifi`}),(0,I.jsx)(`div`,{className:`font-arcade text-[9px] font-bold flex flex-col items-center leading-none justify-center select-none pt-0.5 cursor-default`,title:`System Time`,children:(0,I.jsx)(`span`,{children:m})})]})]})},Tt=({isMobile:e,isAnyWindowOpen:t,username:n,streak:r,onToggleWindow:i,onTriggerSync:a})=>!e||t?null:(0,I.jsxs)(`div`,{className:`w-full h-[calc(100vh-56px)] overflow-y-auto custom-scrollbar p-6 pb-24 flex flex-col gap-6 z-10 relative`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col select-none border-b-[3px] border-dashed border-ink-black pb-4 min-h-[88px] justify-center shrink-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 h-4`,children:[(0,I.jsx)(`span`,{className:`text-[9px] font-arcade text-trash-gray font-bold uppercase tracking-wider`,children:`AlgoSpaced OS v1.0`}),(0,I.jsx)(`span`,{className:`text-[7px] font-arcade bg-[#facc15] text-ink-black font-extrabold px-1.5 py-0.5 border-[1.5px] border-ink-black shadow-[1px_1px_0px_0px_#1E293B]`,children:`BETA`})]}),(0,I.jsx)(`h1`,{className:`text-4xl font-extrabold font-headline-md text-ink-black uppercase tracking-tight mt-1 h-10 leading-10`,children:`start`})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,I.jsxs)(`div`,{className:`col-span-2 bg-[#fdf8e1] border-[3px] border-ink-black p-4 flex items-center gap-4 gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)]`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 border-[3px] border-ink-black overflow-hidden bg-primary-fixed-dim shadow-[2px_2px_0_0_#1E293B] shrink-0`,children:(0,I.jsx)(`img`,{alt:`Profile Avatar`,width:48,height:48,className:`w-full h-full object-cover`,src:`/icons/avatar.webp`})}),(0,I.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,I.jsx)(`div`,{className:`font-headline-md text-sm font-bold text-ink-black truncate`,children:n}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1 text-red-700 mt-1 select-none font-bold`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-sm`,style:{fontVariationSettings:`'FILL' 1`},children:`local_fire_department`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[7px]`,children:[r?.current_streak??0,` DAY STREAK`]})]})]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`queue`),className:`bg-grass-green text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`view_list`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`DAILY`,(0,I.jsx)(`br`,{}),`QUEUE`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`cardManager`),className:`bg-[#0284c7] text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`style`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`CARD`,(0,I.jsx)(`br`,{}),`MANAGER`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`journey`),className:`bg-[#0ea5e9] text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`route`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`JOURNEY`,(0,I.jsx)(`br`,{}),`PATH`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`computer`),className:`bg-paper-white text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`img`,{alt:`My Computer`,width:40,height:40,className:`w-10 h-10 object-cover border-2 border-ink-black bg-white`,src:`/icons/computer.webp`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`MY COMP`})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`terminal`),className:`bg-[#1e293b] text-[#39ff14] border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`img`,{alt:`Terminal`,width:40,height:40,className:`w-10 h-10 object-cover border-2 border-ink-black bg-white`,src:`/icons/terminal.webp`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] text-[#39ff14] font-bold tracking-tight uppercase leading-tight`,children:`TERMINAL`})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`python`),className:`bg-[#9d4edd] text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`sports_esports`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`PYTHON`,(0,I.jsx)(`br`,{}),`PLAY`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`mysql`),className:`bg-[#ffcc00] text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`database`}),(0,I.jsxs)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:[`MYSQL`,(0,I.jsx)(`br`,{}),`PLAY`]})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`companion`),className:`bg-[#f59e0b] hover:bg-amber-600 text-ink-black border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`img`,{alt:`Auri`,width:40,height:40,className:`w-10 h-10 object-cover object-top border-2 border-ink-black bg-amber-100 rounded`,src:`/sprites/princess/smiling_warmly.webp`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`AURI`})]}),(0,I.jsxs)(`button`,{onClick:()=>i(`settings`),className:`bg-[#059669] hover:bg-emerald-700 text-white border-[3px] border-ink-black p-4 flex flex-col justify-between aspect-square gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl align-top`,style:{fontVariationSettings:`'FILL' 1`},children:`key`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase leading-tight`,children:`API CONFIG`})]}),(0,I.jsxs)(`button`,{onClick:a,className:`col-span-2 bg-[#ffe24c] hover:bg-yellow-300 text-ink-black border-[3px] border-ink-black p-4 flex items-center justify-between gadget-shadow active:translate-y-1 active:translate-x-1 active:shadow-none select-none text-left cursor-pointer transition-all`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-3xl`,style:{fontVariationSettings:`'FILL' 1`},children:`cloud_sync`}),(0,I.jsx)(`span`,{className:`font-arcade text-[8px] font-bold tracking-tight uppercase`,children:`DRIVE NOTES SYNC`})]}),(0,I.jsx)(`span`,{className:`material-symbols-outlined text-lg`,children:`chevron_right`})]})]})]}),Et=class extends P.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[WindowErrorBoundary] Error caught in window "${this.props.windowId}":`,e,t)}handleReset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?(0,I.jsx)(`div`,{className:`w-full h-full p-6 bg-[#0f172a] text-white flex flex-col items-center justify-center font-sans select-none overflow-auto`,children:(0,I.jsxs)(`div`,{className:`max-w-md w-full bg-[#1e293b] border-[3px] border-rose-500 rounded-lg p-5 shadow-[6px_6px_0px_0px_rgba(0,0,0,0.5)] flex flex-col gap-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-rose-400 font-headline-md font-bold text-sm border-b border-slate-700 pb-2.5`,children:[(0,I.jsx)(g,{className:`w-5 h-5 shrink-0`}),(0,I.jsxs)(`span`,{children:[`SYSTEM INTERRUPT: `,this.props.windowTitle||this.props.windowId]})]}),(0,I.jsx)(`div`,{className:`bg-[#0b0f19] border border-slate-800 rounded p-3 font-mono text-[11px] text-rose-300 leading-relaxed max-h-32 overflow-y-auto custom-scrollbar`,children:this.state.error?.message||`An unexpected runtime error occurred.`}),(0,I.jsx)(`p`,{className:`text-[11px] text-slate-400 leading-relaxed`,children:`The window process encountered a recoverable fault. You can restart this window module without losing your desktop session.`}),(0,I.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-2 border-t border-slate-700`,children:[this.props.onClose&&(0,I.jsxs)(`button`,{type:`button`,onClick:this.props.onClose,className:`px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs font-bold transition-all flex items-center gap-1.5 cursor-pointer`,children:[(0,I.jsx)(x,{className:`w-3.5 h-3.5`}),(0,I.jsx)(`span`,{children:`Close Window`})]}),(0,I.jsxs)(`button`,{type:`button`,onClick:this.handleReset,className:`px-3 py-1.5 bg-rose-600 hover:bg-rose-500 text-white rounded text-xs font-bold transition-all shadow-[2px_2px_0px_0px_#000] active:translate-y-0.5 active:shadow-none flex items-center gap-1.5 cursor-pointer`,children:[(0,I.jsx)(t,{className:`w-3.5 h-3.5`}),(0,I.jsx)(`span`,{children:`Restart Module`})]})]})]})}):this.props.children}},Dt=e=>{if(!e||!e.startsWith(`#`))return!1;if(e.toLowerCase()===`#0ea5e9`)return!0;let t=e.replace(`#`,``);if(t.length===3){let e=parseInt(t[0]+t[0],16),n=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16);return .299*e+.587*n+.114*r>135}if(t.length===6){let e=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16);return .299*e+.587*n+.114*r>135}return!1};function Q({id:e,title:t,isOpen:n,isMinimized:r,onClose:i,onMinimize:a,activeWindow:o,setActiveWindow:s,children:c,icon:l=`terminal`,defaultWidth:u=`700px`,defaultHeight:d=`600px`,minWidth:f=380,minHeight:p=280,defaultX:m,defaultY:h,titleBarColor:g=`#0ea5e9`,isMobile:_=!1}){let v=e=>{let t=parseInt(e,10);return isNaN(t)?500:t},y=X(t=>t.windowZIndexes[e]),x=X(e=>e.activeWindow),S=X(e=>e.closeWindow),C=X(e=>e.minimizeWindow),w=X(e=>e.focusWindow),T=X(t=>!!t.maximizedWindows[e]),E=(o??x)===e,D=y??(E?40:30),O=!_&&T,k=i??(()=>S(e)),A=a??(()=>C(e)),j=(0,P.useCallback)(()=>{s?s(e):w(e)},[e,s,w]),M=(0,P.useCallback)(t=>{t?.stopPropagation(),X.getState().toggleMaximize(e)},[e]),[N,F]=(0,P.useState)(()=>X.getState().windowPositions[e]||(m===void 0&&h===void 0?{x:Math.floor(Math.random()*40)-20,y:Math.floor(Math.random()*40)-20}:{x:m??0,y:h??0})),[L,R]=(0,P.useState)(()=>X.getState().windowSizes[e]||{width:v(u),height:v(d)}),[z,B]=(0,P.useState)(!1),[V,H]=(0,P.useState)(!1),U=(0,P.useRef)(N),W=(0,P.useRef)(L),G=(0,P.useRef)(null);(0,P.useEffect)(()=>{U.current=N},[N]),(0,P.useEffect)(()=>{W.current=L},[L]);let K=(0,P.useCallback)((e,t,n,r)=>{if(typeof window>`u`)return{x:e,y:t};let i=window.innerWidth/2,a=window.innerHeight/2,o=n/2,s=r/2,c=-a+s,l=Math.max(c,a+s-80),u=-i-o+80,d=i+o-80;return{x:Math.min(Math.max(e,u),d),y:Math.min(Math.max(t,c),l)}},[]),ee=b(({offset:[t,n],first:r,last:i,event:a,cancel:o})=>{let s=a.target;if(s?.closest(`.window-control-btn`)||s?.closest(`.window-resize-handle`)){o();return}r&&(j(),B(!0));let c=K(t,n,W.current.width,W.current.height);U.current=c,G.current&&(G.current.style.transform=`translate3d(calc(-50% + ${c.x}px), calc(-50% + ${c.y}px), 0)`),i&&(B(!1),F(c),X.getState().updateWindowPosition(e,c.x,c.y))},{from:()=>[U.current.x,U.current.y],pointer:{capture:!0},enabled:!_&&!O,eventOptions:{passive:!1}}),te=b(({offset:[t,n],first:r,last:i,event:a})=>{a.stopPropagation(),r&&(j(),H(!0));let o=Math.max(f,t),s=Math.max(p,n);W.current={width:o,height:s},G.current&&(G.current.style.width=`${o}px`,G.current.style.height=`${s}px`),i&&(H(!1),R(W.current),X.getState().updateWindowSize(e,W.current.width,W.current.height))},{from:()=>[W.current.width,W.current.height],pointer:{capture:!0},enabled:!_&&!O,eventOptions:{passive:!1}});return n?(0,I.jsxs)(`div`,{ref:G,onMouseDown:j,style:_?{zIndex:D,display:r?`none`:`flex`}:O?{width:`100vw`,height:`calc(100vh - 56px)`,top:0,left:0,transform:`none`,zIndex:D,display:r?`none`:`flex`}:{width:`${L.width}px`,height:`${L.height}px`,transform:`translate3d(calc(-50% + ${N.x}px), calc(-50% + ${N.y}px), 0)`,zIndex:D,display:r?`none`:`flex`,willChange:z||V?`transform, width, height`:`auto`},className:`absolute bg-paper-white border-[4px] flex flex-col overflow-hidden window-shadow ${z||V?`transition-none`:`transition-all duration-150`} ${_?`top-0 left-0 w-full h-[calc(100vh-56px)] max-w-none max-h-none border-t-0 border-x-0`:O?`top-0 left-0 max-w-none max-h-none border-ink-black`:`top-1/2 left-1/2 max-w-[98vw] max-h-[90vh] border-ink-black`} ${E?`border-ink-black shadow-[8px_8px_0px_0px_rgba(30,41,59,1)]`:`border-ink-black opacity-95 shadow-[4px_4px_0px_0px_rgba(30,41,59,1)]`}`,children:[(0,I.jsxs)(`div`,{...ee(),onDoubleClick:_?void 0:M,style:{backgroundColor:g},className:`border-b-[4px] border-ink-black px-4 py-2 flex justify-between items-center ${Dt(g)?`text-ink-black`:`text-white`} shrink-0 select-none touch-none ${_||O?`cursor-default`:z?`cursor-grabbing`:`cursor-grab`}`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 pointer-events-none`,children:[l&&(0,I.jsx)(`span`,{className:`material-symbols-outlined select-none`,style:{fontVariationSettings:`'FILL' 1`},children:l}),(0,I.jsx)(`span`,{className:`font-window-title text-sm md:text-base font-bold tracking-wide select-none`,children:t})]}),(0,I.jsxs)(`div`,{className:`flex gap-1.5`,onPointerDown:e=>e.stopPropagation(),children:[!_&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`button`,{onClick:e=>{e.stopPropagation(),A()},className:`window-control-btn w-7 h-7 bg-white text-ink-black border-[3px] border-ink-black flex items-center justify-center hover:bg-yellow-300 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,title:`Minimize`,"aria-label":`Minimize`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:`minimize`})}),(0,I.jsx)(`button`,{onClick:e=>{e.stopPropagation(),M(e)},className:`window-control-btn w-7 h-7 bg-white text-ink-black border-[3px] border-ink-black flex items-center justify-center hover:bg-yellow-300 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,title:O?`Restore`:`Maximize`,"aria-label":O?`Restore`:`Maximize`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:O?`filter_none`:`crop_square`})})]}),(0,I.jsx)(`button`,{onClick:e=>{e.stopPropagation(),k()},className:`window-control-btn w-7 h-7 bg-rose-600 text-white border-[3px] border-ink-black flex items-center justify-center hover:bg-rose-700 active:translate-y-0.5 active:translate-x-0.5 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)] active:shadow-none transition-all cursor-pointer`,title:`Close`,"aria-label":`Close`,children:(0,I.jsx)(`span`,{className:`material-symbols-outlined text-[14px] font-bold`,children:`close`})})]})]}),(0,I.jsx)(`div`,{className:`flex-1 overflow-hidden relative bg-paper-white flex flex-col ${z||V?`pointer-events-none select-none`:``}`,children:(0,I.jsx)(Et,{windowId:e,windowTitle:t,onClose:k,children:c})}),!_&&!O&&(0,I.jsx)(`div`,{...te(),className:`window-resize-handle absolute bottom-0 right-0 w-5 h-5 cursor-se-resize flex items-end justify-end p-0.5 select-none z-[50] touch-none`,title:`Resize Window`,children:(0,I.jsxs)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 10 10`,className:`text-ink-black opacity-60`,children:[(0,I.jsx)(`line`,{x1:`8`,y1:`2`,x2:`2`,y2:`8`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,I.jsx)(`line`,{x1:`8`,y1:`5`,x2:`5`,y2:`8`,stroke:`currentColor`,strokeWidth:`1.5`})]})})]}):null}var Ot=`modulepreload`,kt=function(e){return`/`+e},At={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=kt(t,n),t=s(t),t in At)return;At[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ot,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},jt=(0,P.lazy)(()=>$(()=>import(`./ReviewQueue-CltGWQpb.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),Mt=(0,P.lazy)(()=>$(()=>import(`./JourneyPath-BhAvKOiu.js`),__vite__mapDeps([10,1,2,3,4,5,7]))),Nt=(0,P.lazy)(()=>$(()=>import(`./TerminalEmulator-CZed0tiA.js`),__vite__mapDeps([11,1,2,3,4,5]))),Pt=(0,P.lazy)(()=>$(()=>import(`./PythonChallenge-CQdOe4Q2.js`),__vite__mapDeps([12,1,2,3,4,5,8]))),Ft=(0,P.lazy)(()=>$(()=>import(`./MySQLPlayground-iGzsbjAa.js`),__vite__mapDeps([13,1,2,3,4,5]))),It=(0,P.lazy)(()=>$(()=>import(`./FileExplorer-D3FrJW-x.js`),__vite__mapDeps([14,1,2,3,4,5]))),Lt=(0,P.lazy)(()=>$(()=>import(`./Settings-BVuXk3LW.js`),__vite__mapDeps([15,1,2,3,6,4,5]))),Rt=(0,P.lazy)(()=>$(()=>import(`./CreateProblemForm-Ccz3TNzp.js`),__vite__mapDeps([16,1,2,3,4,5]))),zt=(0,P.lazy)(()=>$(()=>import(`./PrincessChamber-abJShfI5.js`).then(e=>e.t),__vite__mapDeps([9,1,2,3]))),Bt=(0,P.lazy)(()=>$(()=>import(`./GitHubSyncWindow-CrRFKIeu.js`),__vite__mapDeps([17,1,2,3,6,4,5]))),Vt=(0,P.lazy)(()=>$(()=>import(`./CardManager-BEhyd34f.js`),__vite__mapDeps([18,1,2,3,4,5]))),Ht=({windows:e,activeWindow:t,setActiveWindow:n,isMobile:r,openWindow:i,closeWindow:a,minimizeWindow:o,overrideProblemId:s,setOverrideProblemId:c,editingProblem:l,openEditProblem:u,handleSelectProblemForReview:d,refreshExplorerTrigger:f,triggerRefreshExplorer:p,wallpaperUrl:m,setWallpaperUrl:h,syncing:g,syncResult:_,triggerSync:v})=>{let y=X(e=>e.windows),b=X(e=>e.activeWindow),x=X(e=>e.setActiveWindow),S=X(e=>e.openWindow),C=X(e=>e.closeWindow),w=X(e=>e.minimizeWindow),T=X(e=>e.overrideProblemId),E=X(e=>e.setOverrideProblemId),D=X(e=>e.editingProblem),O=X(e=>e.openEditProblem),k=X(e=>e.handleSelectProblemForReview),A=X(e=>e.refreshExplorerTrigger),j=X(e=>e.triggerRefreshExplorer),M=e??y,N=t??b,F=n??x,L=i??S,R=a??C,z=o??w,B=s===void 0?T:s,V=c??E,H=l===void 0?D:l,U=u??O,W=d??k,G=f??A,K=p??j,ee=(0,P.useCallback)(()=>V(null),[V]),te=(0,P.useCallback)(()=>L(`journey`),[L]),ne=(0,P.useCallback)(()=>L(`createProblem`),[L]),re=(0,P.useCallback)(()=>L(`cardManager`),[L]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Q,{id:`queue`,title:`Daily Queue.exe`,icon:`terminal`,isOpen:M.queue.isOpen,isMinimized:M.queue.isMinimized,onClose:()=>R(`queue`),onMinimize:()=>z(`queue`),activeWindow:N,setActiveWindow:F,defaultWidth:`980px`,defaultHeight:`680px`,minWidth:440,minHeight:360,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading ReviewQueue.exe...`}),children:(0,I.jsx)(jt,{overrideProblemId:B,onClearOverride:ee,onOpenWindow:L,onOpenJourney:te,onOpenCreateProblem:ne,onOpenEditProblem:U,onOpenCardManager:re,refreshTrigger:G})})}),(0,I.jsx)(Q,{id:`journey`,title:`Journey_Path.exe`,icon:`route`,isOpen:M.journey.isOpen,isMinimized:M.journey.isMinimized,onClose:()=>R(`journey`),onMinimize:()=>z(`journey`),activeWindow:N,setActiveWindow:F,defaultWidth:`980px`,defaultHeight:`680px`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading JourneyPath.exe...`}),children:(0,I.jsx)(Mt,{onSelectProblemForReview:W})})}),(0,I.jsx)(Q,{id:`terminal`,title:`Arcade Terminal.com`,icon:`terminal`,isOpen:M.terminal.isOpen,isMinimized:M.terminal.isMinimized,onClose:()=>R(`terminal`),onMinimize:()=>z(`terminal`),activeWindow:N,setActiveWindow:F,defaultWidth:`640px`,defaultHeight:`450px`,titleBarColor:`#1e293b`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading Terminal.exe...`}),children:(0,I.jsx)(Nt,{onOpenWindow:L,onClose:()=>R(`terminal`)})})}),(0,I.jsx)(Q,{id:`sync`,title:`Drive_Sync.sys`,icon:`cloud_sync`,isOpen:M.sync.isOpen,isMinimized:M.sync.isMinimized,onClose:()=>R(`sync`),onMinimize:()=>z(`sync`),activeWindow:N,setActiveWindow:F,defaultWidth:`480px`,defaultHeight:`320px`,titleBarColor:`#855400`,isMobile:r,children:(0,I.jsxs)(`div`,{className:`w-full h-full bg-[#fdf8e1] p-6 flex flex-col justify-between`,children:[(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 border-b-2 border-dashed border-ink-black pb-3`,children:[(0,I.jsx)(`span`,{className:`material-symbols-outlined text-4xl text-[#855400] animate-bounce`,children:`cloud_sync`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h4`,{className:`font-arcade text-[10px] font-bold text-ink-black`,children:`DRIVE NOTES SYNCHRONIZATION`}),(0,I.jsx)(`span`,{className:`text-[8px] font-arcade text-trash-gray font-bold uppercase mt-1 block`,children:`Importing LeetCode sheets`})]})]}),g?(0,I.jsxs)(`div`,{className:`space-y-3 py-2`,children:[(0,I.jsx)(`span`,{className:`text-[9px] font-arcade text-ink-black font-bold block animate-pulse`,children:`SYNC PROCESS RUNNING...`}),(0,I.jsx)(`div`,{className:`w-full h-6 bg-white border-[3px] border-ink-black relative overflow-hidden select-none`,children:(0,I.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-[#ffe24c] border-r-2 border-ink-black w-[75%] animate-pulse`})}),(0,I.jsx)(`p`,{className:`text-[9px] font-sans text-trash-gray leading-normal font-semibold`,children:`Connecting to Supabase partition, requesting Google Drive manifest, indexing note items...`})]}):(0,I.jsx)(`div`,{className:`p-3 bg-white border-[3px] border-ink-black text-xs font-semibold text-ink-black leading-relaxed shadow-[2px_2px_0px_0px_#1E293B]`,children:_||`Idle. Ready to synchronize review data logs from Sheets drive storage.`})]}),(0,I.jsxs)(`div`,{className:`flex gap-3 justify-end pt-4 border-t border-slate-200`,children:[(0,I.jsx)(`button`,{onClick:()=>R(`sync`),className:`px-4 py-2 bg-white hover:bg-slate-100 text-ink-black border-[3px] border-ink-black font-bold text-xs shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none cursor-pointer`,children:`CLOSE`}),(0,I.jsx)(`button`,{onClick:v,disabled:g,className:`px-4 py-2 bg-[#ffcc00] hover:bg-yellow-300 text-ink-black border-[3px] border-ink-black font-bold text-xs shadow-[2px_2px_0px_0px_#1E293B] active:translate-y-0.5 active:shadow-none disabled:opacity-50 cursor-pointer`,children:g?`SYNCING...`:`SYNC NOW`})]})]})}),(0,I.jsx)(Q,{id:`github`,title:`GitHub_Sync.exe`,icon:`terminal`,isOpen:M.github?.isOpen??!1,isMinimized:M.github?.isMinimized??!1,onClose:()=>R(`github`),onMinimize:()=>z(`github`),activeWindow:N,setActiveWindow:F,defaultWidth:`620px`,defaultHeight:`520px`,titleBarColor:`#24292e`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading GitHub_Sync.exe...`}),children:(0,I.jsx)(Bt,{onClose:()=>R(`github`)})})}),(0,I.jsx)(Q,{id:`computer`,title:`File Explorer`,icon:`desktop_windows`,isOpen:M.computer.isOpen,isMinimized:M.computer.isMinimized,onClose:()=>R(`computer`),onMinimize:()=>z(`computer`),activeWindow:N,setActiveWindow:F,defaultWidth:`640px`,defaultHeight:`480px`,titleBarColor:`#006686`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading FileExplorer.exe...`}),children:(0,I.jsx)(It,{onSetWallpaper:h,activeWallpaperUrl:m,onOpenCreateProblem:()=>L(`createProblem`),onOpenQueue:()=>L(`queue`),onOpenJourney:()=>L(`journey`),refreshTrigger:G})})}),M.createProblem?.isOpen&&(0,I.jsx)(Q,{id:`createProblem`,title:`Create Problem`,icon:`note_add`,isOpen:M.createProblem.isOpen,isMinimized:M.createProblem.isMinimized,onClose:()=>R(`createProblem`),onMinimize:()=>z(`createProblem`),activeWindow:N,setActiveWindow:F,defaultWidth:`640px`,defaultHeight:`700px`,titleBarColor:`#a855f7`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading CreateForm.exe...`}),children:(0,I.jsx)(Rt,{onClose:()=>R(`createProblem`),onSuccess:()=>{K(),L(`queue`)}})})}),M.editProblem?.isOpen&&(0,I.jsx)(Q,{id:`editProblem`,title:H?`Edit Problem: #${H.problem_number??`—`} ${H.name}`:`Edit Problem`,icon:`edit_note`,isOpen:M.editProblem.isOpen,isMinimized:M.editProblem.isMinimized,onClose:()=>R(`editProblem`),onMinimize:()=>z(`editProblem`),activeWindow:N,setActiveWindow:F,defaultWidth:`760px`,defaultHeight:`720px`,defaultX:30,defaultY:25,titleBarColor:`#059669`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading EditProblem.exe...`}),children:(0,I.jsx)(Rt,{mode:`edit`,initialProblem:H,onClose:()=>R(`editProblem`),onSuccess:()=>{R(`editProblem`),K(),L(`queue`)}},H?.id||(H?.problem_number===void 0?`edit-problem`:String(H.problem_number)))})}),(0,I.jsx)(Q,{id:`python`,title:`Python Challenge`,icon:`sports_esports`,isOpen:M.python.isOpen,isMinimized:M.python.isMinimized,onClose:()=>R(`python`),onMinimize:()=>z(`python`),activeWindow:N,setActiveWindow:F,defaultWidth:`620px`,defaultHeight:`580px`,titleBarColor:`#9d4edd`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading PythonChallenge.exe...`}),children:(0,I.jsx)(Pt,{})})}),(0,I.jsx)(Q,{id:`mysql`,title:`MySQL Playground`,icon:`database`,isOpen:M.mysql.isOpen,isMinimized:M.mysql.isMinimized,onClose:()=>R(`mysql`),onMinimize:()=>z(`mysql`),activeWindow:N,setActiveWindow:F,defaultWidth:`660px`,defaultHeight:`580px`,titleBarColor:`#0ea5e9`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading MySQLPlayground.exe...`}),children:(0,I.jsx)(Ft,{})})}),(0,I.jsx)(Q,{id:`settings`,title:`API Configuration`,icon:`key`,isOpen:M.settings?.isOpen,isMinimized:M.settings?.isMinimized,onClose:()=>R(`settings`),onMinimize:()=>z(`settings`),activeWindow:N,setActiveWindow:F,defaultWidth:`520px`,defaultHeight:`460px`,titleBarColor:`#10b981`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading APIConfig.exe...`}),children:(0,I.jsx)(Lt,{})})}),M.companion?.isOpen&&!M.companion.isMinimized&&(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`fixed bottom-16 right-8 font-mono text-xs text-amber-300 bg-slate-900/90 p-4 border-2 border-slate-700 rounded z-40 animate-pulse`,children:`Entering the Spire Tower Parlor...`}),children:(0,I.jsx)(zt,{onClose:()=>R(`companion`),onMinimize:()=>z(`companion`),isActive:N===`companion`,onFocus:()=>F(`companion`),isMobile:r})}),M.cardManager?.isOpen&&(0,I.jsx)(Q,{id:`cardManager`,title:`FSRS Card Manager`,icon:`style`,isOpen:M.cardManager.isOpen,isMinimized:M.cardManager.isMinimized,onClose:()=>R(`cardManager`),onMinimize:()=>z(`cardManager`),activeWindow:N,setActiveWindow:F,defaultWidth:`1020px`,defaultHeight:`700px`,minWidth:520,minHeight:420,titleBarColor:`#0284c7`,isMobile:r,children:(0,I.jsx)(P.Suspense,{fallback:(0,I.jsx)(`div`,{className:`p-6 font-arcade text-xs text-trash-gray uppercase animate-pulse`,children:`Loading CardManager.exe...`}),children:(0,I.jsx)(Vt,{onOpenQueue:()=>L(`queue`),onOpenCreateProblem:()=>L(`createProblem`),onOpenEditProblem:U,onSelectProblemForReview:W,refreshTrigger:G,onRefreshExplorer:K})})})]})},Ut=(0,P.lazy)(()=>$(()=>import(`./Auth-CphacI2S.js`),__vite__mapDeps([19,1,2,3,4,5])));function Wt(){let[e,t]=(0,P.useState)(()=>M.getInitialUser()),[n,r]=(0,P.useState)(()=>!M.getInitialUser()),[i,a]=(0,P.useState)(!1),o=(0,P.useRef)(null),[s,c]=(0,P.useState)({visible:!1,x:0,y:0}),{openWindow:l,toggleWindowMinimize:u,isAnyWindowOpen:d}=Ye((0,P.useCallback)(()=>a(!1),[])),{time:f,streak:p,isMobile:m,isFullscreen:h,toggleFullscreen:g,syncing:_,syncResult:v,triggerSync:y}=Xe(e,()=>l(`sync`)),{wallpaperUrl:b,setWallpaperUrl:x,handleWallpaperChange:S}=Qe(),{companionDialogueEvent:C,setCompanionDialogueEvent:w}=$e(e,l);(0,P.useEffect)(()=>{j.auth.getSession().then(({data:{session:e}})=>{t(e?.user??null),r(!1)});let{data:{subscription:e}}=j.auth.onAuthStateChange((e,n)=>{t(n?.user??null),r(!1)});return()=>{e.unsubscribe()}},[]),(0,P.useEffect)(()=>{if(!n){let e=document.getElementById(`app-loader`);e&&e.remove()}},[n]);let T=e=>{let t=e.target;t.closest(`.window-shadow`)||t.closest(`button`)||t.closest(`input`)||t.closest(`textarea`)||t.closest(`details`)||t.closest(`#start-menu`)||(e.preventDefault(),c({visible:!0,x:e.clientX,y:e.clientY}))},E=()=>{s.visible&&c(e=>({...e,visible:!1}))},D=()=>{E(),g()},O=async()=>{a(!1),await j.auth.signOut()},k=e?.email?e.email.split(`@`)[0]:`Player_One`,A=(0,P.useMemo)(()=>[{id:`queue`,label:(0,I.jsxs)(I.Fragment,{children:[`DAILY`,(0,I.jsx)(`br`,{}),`QUEUE`]}),icon:`view_list`,badgeShadowColor:`#fde047`,action:()=>l(`queue`)},{id:`cardManager`,label:(0,I.jsxs)(I.Fragment,{children:[`CARD`,(0,I.jsx)(`br`,{}),`MANAGER`]}),icon:`style`,badgeShadowColor:`#38bdf8`,action:()=>l(`cardManager`)},{id:`journey`,label:(0,I.jsxs)(I.Fragment,{children:[`JOURNEY`,(0,I.jsx)(`br`,{}),`PATH`]}),icon:`route`,badgeShadowColor:`#fde047`,action:()=>l(`journey`)},{id:`sync`,label:(0,I.jsxs)(I.Fragment,{children:[`DRIVE`,(0,I.jsx)(`br`,{}),`SYNC`]}),icon:`cloud_sync`,badgeShadowColor:`#fde047`,action:y},{id:`github`,label:(0,I.jsxs)(I.Fragment,{children:[`GITHUB`,(0,I.jsx)(`br`,{}),`SYNC`]}),icon:`code`,badgeShadowColor:`#24292e`,action:()=>l(`github`)},{id:`computer`,label:(0,I.jsxs)(I.Fragment,{children:[`MY`,(0,I.jsx)(`br`,{}),`COMP`]}),iconImg:`/icons/computer.webp`,badgeShadowColor:`#fde047`,action:()=>l(`computer`)},{id:`terminal`,label:`TERMINAL`,iconImg:`/icons/terminal.webp`,badgeShadowColor:`#fde047`,action:()=>l(`terminal`)},{id:`python`,label:(0,I.jsxs)(I.Fragment,{children:[`PYTHON`,(0,I.jsx)(`br`,{}),`CHALLENGE`]}),icon:`sports_esports`,badgeShadowColor:`#4cc9f0`,action:()=>l(`python`)},{id:`mysql`,label:(0,I.jsxs)(I.Fragment,{children:[`MYSQL`,(0,I.jsx)(`br`,{}),`PLAYGROUND`]}),icon:`database`,badgeShadowColor:`#f72585`,action:()=>l(`mysql`)},{id:`companion`,label:`Auri`,iconImg:`/sprites/princess/smiling_warmly.webp`,badgeShadowColor:`#fde047`,action:()=>l(`companion`)},{id:`settings`,label:(0,I.jsx)(I.Fragment,{children:`API CONFIG`}),icon:`key`,badgeShadowColor:`#10b981`,action:()=>l(`settings`)}],[l,y]);return n?null:e?(0,I.jsxs)(`main`,{role:`main`,"aria-label":`Desktop Workspace`,onContextMenu:T,onClick:E,className:`w-screen h-screen m-0 p-0 relative isolate font-sans text-ink-black overflow-hidden select-none`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 w-full h-full bg-cover bg-center z-0 pointer-events-none saturate-150 contrast-125 transition-all duration-300`,style:{backgroundImage:`url('${b}')`}}),!m&&(0,I.jsx)(K,{ref:o,icons:A,isMobile:m,onContextMenu:T}),(0,I.jsx)(et,{isMobile:m,username:k,streak:p}),(0,I.jsx)(Tt,{isMobile:m,isAnyWindowOpen:d,username:k,streak:p,onToggleWindow:u,onTriggerSync:y}),(0,I.jsx)(Ht,{isMobile:m,wallpaperUrl:b,setWallpaperUrl:x,syncing:_,syncResult:v,triggerSync:y}),(0,I.jsx)(wt,{isStartOpen:i,onToggleStart:()=>a(e=>!e),onCloseStart:()=>a(!1),onOpenWindow:l,onTriggerSync:y,onSignOut:O,isMobile:m,time:f}),(0,I.jsx)(Je,{event:C,onClose:()=>w(null),onOpenCompanionWindow:()=>l(`companion`)}),(0,I.jsx)(Ne,{onOpenCompanionWindow:()=>l(`companion`)}),(0,I.jsx)(ee,{isOpen:s.visible,x:s.x,y:s.y,onClose:E,onAutoArrange:()=>o.current?.autoArrange(),onResetLayout:()=>o.current?.resetLayout(),onChangeWallpaper:()=>document.getElementById(`wallpaper-input`)?.click(),onOpenWindow:l,onTriggerSync:y,onToggleFullscreen:D,isFullscreen:h}),(0,I.jsx)(`input`,{type:`file`,id:`wallpaper-input`,"aria-label":`Upload custom desktop wallpaper`,accept:`image/*`,onChange:e=>S(e,E),className:`hidden`})]}):(0,I.jsx)(P.Suspense,{fallback:null,children:(0,I.jsx)(Ut,{})})}var Gt=class extends P.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[RootErrorBoundary] Fatal system error caught at OS root:`,e,t)}handleReboot=()=>{window.location.reload()};handleHardReset=()=>{try{localStorage.clear(),sessionStorage.clear()}catch{}window.location.reload()};render(){return this.state.hasError?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-[99999] bg-[#030712] text-white flex flex-col items-center justify-center p-6 font-mono select-none overflow-auto`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 pointer-events-none bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(0,0,0,0.4)_100%)]`}),(0,I.jsxs)(`div`,{className:`relative max-w-xl w-full bg-[#0b0f19] border-[3px] border-rose-500 rounded-lg p-6 shadow-[8px_8px_0px_0px_rgba(244,63,94,0.3)] flex flex-col gap-5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-rose-400 border-b border-rose-950 pb-3`,children:[(0,I.jsx)(`div`,{className:`p-2 bg-rose-500/10 rounded border border-rose-500/30`,children:(0,I.jsx)(o,{className:`w-6 h-6 text-rose-500 animate-pulse`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-sm font-bold tracking-wider uppercase text-rose-300 font-arcade`,children:`ALGOSPACED_RECOVERY_CONSOLE`}),(0,I.jsx)(`p`,{className:`text-[10px] text-rose-400/75 mt-0.5`,children:`STOP: 0x000000D1 • DESKTOP_THREAD_EXCEPTION`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(`span`,{className:`text-[11px] text-slate-400 uppercase font-semibold tracking-wider block`,children:`Fault Trace:`}),(0,I.jsx)(`div`,{className:`bg-[#020617] border border-slate-800 rounded p-3 text-[11px] text-rose-300 font-mono leading-relaxed max-h-36 overflow-y-auto custom-scrollbar break-all`,children:this.state.error?.message||`A fatal system exception was trapped by the OS kernel.`})]}),(0,I.jsx)(`p`,{className:`text-xs text-slate-300 leading-relaxed`,children:`A recoverable exception occurred in the primary desktop shell. Your local data and progress records are safely preserved in storage.`}),(0,I.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-stretch sm:items-center justify-end gap-3 pt-3 border-t border-slate-800`,children:[(0,I.jsxs)(`button`,{type:`button`,onClick:this.handleHardReset,className:`px-4 py-2 bg-slate-800 hover:bg-slate-700 text-slate-300 rounded text-xs font-bold transition-all border border-slate-700 flex items-center justify-center gap-2 cursor-pointer`,title:`Clears cached session data and resets workspace state`,children:[(0,I.jsx)(S,{className:`w-3.5 h-3.5 text-slate-400`}),(0,I.jsx)(`span`,{children:`Reset Cache & Reboot`})]}),(0,I.jsxs)(`button`,{type:`button`,onClick:this.handleReboot,className:`px-4 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded text-xs font-bold transition-all shadow-[2px_2px_0px_0px_#000] active:translate-y-0.5 active:shadow-none flex items-center justify-center gap-2 cursor-pointer`,children:[(0,I.jsx)(t,{className:`w-3.5 h-3.5`}),(0,I.jsx)(`span`,{children:`Reboot AlgoSpaced OS`})]})]})]})]}):this.props.children}},Kt=window.fetch;window.fetch=async(e,t)=>{let n=localStorage.getItem(`algospaced_custom_api_key`)||localStorage.getItem(`sandbox_gemini_api_key`),r=localStorage.getItem(`algospaced_custom_ai_provider`)||`default`;if(r&&r!=="default"&&n&&n.trim()){let i=typeof e==`string`?e:`url`in e?String(e.url):e.toString();if(i&&i.includes(`/api/`)){let i=t?{...t}:{},a=new Headers(i.headers||{});return a.set(`X-Custom-API-Key`,n.trim()),a.set(`X-Gemini-API-Key`,n.trim()),a.set(`X-AI-Provider`,r),i.headers=a,Kt(e,i)}}return Kt(e,t)};async function qt(){try{let e=await fetch(`/api/config`);if(!e.ok)throw Error(`Failed to load runtime configuration`);let t=await e.json();A(!1),O(t)}catch(e){console.warn(`Failed to load runtime config from API, falling back to cached or build environment:`,e),A(!0);let t=k()||{apiKey:``,authDomain:`algospaced-dsa.firebaseapp.com`,projectId:`algospaced-dsa`,storageBucket:`algospaced-dsa.firebasestorage.app`,messagingSenderId:`1039270308844`,appId:`1:1039270308844:web:6499e8813a9f7926f7aec9`,measurementId:`G-K33PLR1N8E`};t.apiKey&&t.projectId&&O(t)}(0,F.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(P.StrictMode,{children:(0,I.jsx)(Gt,{children:(0,I.jsx)(Wt,{})})}))}qt();export{ne as C,re as S,Ae as _,_t as a,Y as b,nt as c,Be as d,He as f,ke as g,Fe as h,gt as i,st as l,Ve as m,yt as n,ft as o,We as p,ht as r,vt as s,$ as t,it as u,Ee as v,we as x,X as y}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/index-tlaKBeUb.css b/algospaced-ui/dist/assets/index-tlaKBeUb.css deleted file mode 100644 index a909005e3ed30fb8a71e254eeadb862ea4d60a06..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/index-tlaKBeUb.css +++ /dev/null @@ -1,2 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Be Vietnam Pro", system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:"Courier Prime", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-700:oklch(52% .105 223.128);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-indigo-950:oklch(25.7% .09 281.288);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-purple-950:oklch(29.1% .149 302.717);--color-pink-400:oklch(71.8% .202 349.761);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-stone-950:oklch(14.7% .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--drop-shadow-sm:0 1px 2px #00000026;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-2xl:40px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--font-arcade:"Press Start 2P", monospace;--font-headline-md:"Bricolage Grotesque", sans-serif;--font-display-lg:"Bricolage Grotesque", sans-serif;--font-code-mono:"Courier Prime", monospace;--font-window-title:"Bricolage Grotesque", sans-serif;--font-icon-label:"Press Start 2P", monospace;--color-paper-white:#f9f8f3;--color-ink-black:#1e293b;--color-highlight-pink:#f472b6;--color-grass-green:#4ade80;--color-trash-gray:#64748b;--color-primary-purple:#9d4edd;--color-accent-cyan:#4cc9f0;--color-accent-pink:#f72585;--spacing-desktop-margin:32px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-10{inset:calc(var(--spacing) * -10)}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-2\.5{top:calc(var(--spacing) * -2.5)}.-top-7{top:calc(var(--spacing) * -7)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-4{top:calc(var(--spacing) * 4)}.top-9{top:calc(var(--spacing) * 9)}.top-16{top:calc(var(--spacing) * 16)}.top-desktop-margin{top:var(--spacing-desktop-margin)}.top-full{top:100%}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-3\.5{right:calc(var(--spacing) * 3.5)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.right-8{right:calc(var(--spacing) * 8)}.right-desktop-margin{right:var(--spacing-desktop-margin)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-2\.5{bottom:calc(var(--spacing) * 2.5)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-14{bottom:calc(var(--spacing) * 14)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-\[40px\]{bottom:40px}.-left-\[7px\]{left:-7px}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[10\]{z-index:10}.z-\[50\]{z-index:50}.z-\[90\]{z-index:90}.z-\[100\]{z-index:100}.z-\[120\]{z-index:120}.z-\[999\]{z-index:999}.z-\[9990\]{z-index:9990}.z-\[99999\]{z-index:99999}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-6{grid-column:span 6/span 6}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.container\!{width:100%!important}@media (width>=40rem){.container\!{max-width:40rem!important}}@media (width>=48rem){.container\!{max-width:48rem!important}}@media (width>=64rem){.container\!{max-width:64rem!important}}@media (width>=80rem){.container\!{max-width:80rem!important}}@media (width>=96rem){.container\!{max-width:96rem!important}}.m-0{margin:0}.m-2{margin:calc(var(--spacing) * 2)}.-mx-0{margin-inline:0}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-8{margin-block:calc(var(--spacing) * 8)}.my-auto{margin-block:auto}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.-mr-6{margin-right:calc(var(--spacing) * -6)}.mr-1{margin-right:var(--spacing)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-\[2px\]{margin-bottom:-2px}.mb-0{margin-bottom:0}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1{width:var(--spacing);height:var(--spacing)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-44{height:calc(var(--spacing) * 44)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-84{height:calc(var(--spacing) * 84)}.h-120{height:calc(var(--spacing) * 120)}.h-\[2px\]{height:2px}.h-\[28vh\]{height:28vh}.h-\[80\%\]{height:80%}.h-\[85\%\]{height:85%}.h-\[90\%\]{height:90%}.h-\[calc\(100vh-56px\)\]{height:calc(100vh - 56px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-16{max-height:calc(var(--spacing) * 16)}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.max-h-\[100dvh\]{max-height:100dvh}.max-h-\[140px\]{max-height:140px}.max-h-\[180px\]{max-height:180px}.max-h-\[220px\]{max-height:220px}.max-h-\[520px\]{max-height:520px}.max-h-\[560px\]{max-height:560px}.max-h-\[calc\(100vh-180px\)\]{max-height:calc(100vh - 180px)}.max-h-none{max-height:none}.min-h-0{min-height:0}.min-h-\[1\.2em\]{min-height:1.2em}.min-h-\[48px\]{min-height:48px}.min-h-\[60px\]{min-height:60px}.min-h-\[64px\]{min-height:64px}.min-h-\[85px\]{min-height:85px}.min-h-\[88px\]{min-height:88px}.min-h-\[90px\]{min-height:90px}.min-h-\[120px\]{min-height:120px}.min-h-\[160px\]{min-height:160px}.min-h-\[220px\]{min-height:220px}.min-h-\[300px\]{min-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[2px\]{width:2px}.w-\[75\%\]{width:75%}.w-\[80\%\]{width:80%}.w-\[90\%\]{width:90%}.w-\[96px\]{width:96px}.w-\[calc\(100\%-1\.25rem\)\]{width:calc(100% - 1.25rem)}.w-\[calc\(100vw-24px\)\]{width:calc(100vw - 24px)}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[90\%\]{max-width:90%}.max-w-\[98vw\]{max-width:98vw}.max-w-\[110px\]{max-width:110px}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[170px\]{max-width:170px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[400px\]{max-width:400px}.max-w-\[480px\]{max-width:480px}.max-w-\[calc\(100vw-32px\)\]{max-width:calc(100vw - 32px)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-\[54px\]{min-width:54px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[2\]{flex:2}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[2px\]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[1\.02\]{scale:1.02}.rotate-6{rotate:6deg}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.rotate-\[-2deg\]{rotate:-2deg}.rotate-\[-3deg\]{rotate:-3deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-se-resize{cursor:se-resize}.cursor-wait{cursor:wait}.touch-none{touch-action:none}.resize{resize:both}.resize\!{resize:both!important}.resize-none{resize:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-slate-200>:not(:last-child)){border-color:var(--color-slate-200)}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2\.5px\]{border-style:var(--tw-border-style);border-width:2.5px}.border-\[2px\]{border-style:var(--tw-border-style);border-width:2px}.border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-x-2{border-inline-style:var(--tw-border-style);border-inline-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-\[3px\]{border-top-style:var(--tw-border-style);border-top-width:3px}.border-t-\[4px\]{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-r-\[3px\]{border-right-style:var(--tw-border-style);border-right-width:3px}.border-r-\[4px\]{border-right-style:var(--tw-border-style);border-right-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2,.border-b-\[2px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-\[3px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:3px}.border-b-\[4px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-l-\[2px\]{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-\[4px\]{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\[\#0ea5e9\]{border-color:#0ea5e9}.border-\[\#3b5d7d\]{border-color:#3b5d7d}.border-\[\#3e6080\]{border-color:#3e6080}.border-\[\#3e6080\]\/60{border-color:oklab(47.7013% -.0246015 -.0605497/.6)}.border-\[\#3e6080\]\/70{border-color:oklab(47.7013% -.0246015 -.0605497/.7)}.border-\[\#3e6080\]\/80{border-color:oklab(47.7013% -.0246015 -.0605497/.8)}.border-\[\#4a392b\]{border-color:#4a392b}.border-\[\#5a8bb9\]{border-color:#5a8bb9}.border-\[\#5a80a2\]{border-color:#5a80a2}.border-\[\#5a4836\]{border-color:#5a4836}.border-\[\#5c8cb5\]{border-color:#5c8cb5}.border-\[\#304f6f\]{border-color:#304f6f}.border-\[\#4883b6\]\/80{border-color:oklab(59.2223% -.0397433 -.0917221/.8)}.border-\[\#44729b\]{border-color:#44729b}.border-\[\#594634\]{border-color:#594634}.border-\[\#c8b28f\]{border-color:#c8b28f}.border-\[\#cbb38e\]{border-color:#cbb38e}.border-\[\#cfbc9c\]{border-color:#cfbc9c}.border-\[\#ea580c\]{border-color:#ea580c}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-200\/60{border-color:#fee68599}@supports (color:color-mix(in lab, red, red)){.border-amber-200\/60{border-color:color-mix(in oklab, var(--color-amber-200) 60%, transparent)}}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-amber-500\/40{border-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/40{border-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.border-amber-500\/50{border-color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/50{border-color:color-mix(in oklab, var(--color-amber-500) 50%, transparent)}}.border-amber-500\/80{border-color:#f99c00cc}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/80{border-color:color-mix(in oklab, var(--color-amber-500) 80%, transparent)}}.border-amber-600{border-color:var(--color-amber-600)}.border-amber-600\/30{border-color:#dd74004d}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/30{border-color:color-mix(in oklab, var(--color-amber-600) 30%, transparent)}}.border-amber-600\/70{border-color:#dd7400b3}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/70{border-color:color-mix(in oklab, var(--color-amber-600) 70%, transparent)}}.border-amber-700{border-color:var(--color-amber-700)}.border-amber-700\/30{border-color:#b750004d}@supports (color:color-mix(in lab, red, red)){.border-amber-700\/30{border-color:color-mix(in oklab, var(--color-amber-700) 30%, transparent)}}.border-amber-800{border-color:var(--color-amber-800)}.border-amber-800\/20{border-color:#953d0033}@supports (color:color-mix(in lab, red, red)){.border-amber-800\/20{border-color:color-mix(in oklab, var(--color-amber-800) 20%, transparent)}}.border-amber-900\/10{border-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/10{border-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.border-amber-900\/15{border-color:#7b330626}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/15{border-color:color-mix(in oklab, var(--color-amber-900) 15%, transparent)}}.border-amber-900\/20{border-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/20{border-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.border-amber-900\/30{border-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/30{border-color:color-mix(in oklab, var(--color-amber-900) 30%, transparent)}}.border-amber-900\/40{border-color:#7b330666}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/40{border-color:color-mix(in oklab, var(--color-amber-900) 40%, transparent)}}.border-amber-900\/50{border-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/50{border-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.border-black\/10{border-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.border-black\/10{border-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.border-black\/20{border-color:#0003}@supports (color:color-mix(in lab, red, red)){.border-black\/20{border-color:color-mix(in oklab, var(--color-black) 20%, transparent)}}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-400{border-color:var(--color-emerald-400)}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/40{border-color:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.border-emerald-600{border-color:var(--color-emerald-600)}.border-emerald-600\/30{border-color:#0097674d}@supports (color:color-mix(in lab, red, red)){.border-emerald-600\/30{border-color:color-mix(in oklab, var(--color-emerald-600) 30%, transparent)}}.border-emerald-700{border-color:var(--color-emerald-700)}.border-emerald-800{border-color:var(--color-emerald-800)}.border-green-500{border-color:var(--color-green-500)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-ink-black{border-color:var(--color-ink-black)}.border-ink-black\/20{border-color:#1e293b33}@supports (color:color-mix(in lab, red, red)){.border-ink-black\/20{border-color:color-mix(in oklab, var(--color-ink-black) 20%, transparent)}}.border-orange-300{border-color:var(--color-orange-300)}.border-primary-purple\/30{border-color:#9d4edd4d}@supports (color:color-mix(in lab, red, red)){.border-primary-purple\/30{border-color:color-mix(in oklab, var(--color-primary-purple) 30%, transparent)}}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-purple-400{border-color:var(--color-purple-400)}.border-purple-800{border-color:var(--color-purple-800)}.border-purple-800\/40{border-color:#6e11b066}@supports (color:color-mix(in lab, red, red)){.border-purple-800\/40{border-color:color-mix(in oklab, var(--color-purple-800) 40%, transparent)}}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-400{border-color:var(--color-rose-400)}.border-rose-500{border-color:var(--color-rose-500)}.border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.border-rose-500\/30{border-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.border-rose-500\/40{border-color:#ff235766}@supports (color:color-mix(in lab, red, red)){.border-rose-500\/40{border-color:color-mix(in oklab, var(--color-rose-500) 40%, transparent)}}.border-rose-600{border-color:var(--color-rose-600)}.border-rose-600\/30{border-color:#e700444d}@supports (color:color-mix(in lab, red, red)){.border-rose-600\/30{border-color:color-mix(in oklab, var(--color-rose-600) 30%, transparent)}}.border-rose-700{border-color:var(--color-rose-700)}.border-rose-700\/60{border-color:#c2003999}@supports (color:color-mix(in lab, red, red)){.border-rose-700\/60{border-color:color-mix(in oklab, var(--color-rose-700) 60%, transparent)}}.border-rose-950{border-color:var(--color-rose-950)}.border-sky-600{border-color:var(--color-sky-600)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-800{border-color:var(--color-slate-800)}.border-slate-900{border-color:var(--color-slate-900)}.border-slate-900\/60{border-color:#0f172b99}@supports (color:color-mix(in lab, red, red)){.border-slate-900\/60{border-color:color-mix(in oklab, var(--color-slate-900) 60%, transparent)}}.border-stone-300{border-color:var(--color-stone-300)}.border-stone-300\/40{border-color:#d6d3d166}@supports (color:color-mix(in lab, red, red)){.border-stone-300\/40{border-color:color-mix(in oklab, var(--color-stone-300) 40%, transparent)}}.border-stone-400{border-color:var(--color-stone-400)}.border-stone-400\/20{border-color:#a6a09b33}@supports (color:color-mix(in lab, red, red)){.border-stone-400\/20{border-color:color-mix(in oklab, var(--color-stone-400) 20%, transparent)}}.border-stone-700{border-color:var(--color-stone-700)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-yellow-400{border-color:var(--color-yellow-400)}.border-b-\[\#FFFDF0\]{border-bottom-color:#fffdf0}.bg-\[\#0b0f19\]{background-color:#0b0f19}.bg-\[\#0c111d\]{background-color:#0c111d}.bg-\[\#0e1824\]\/90{background-color:oklab(20.5765% -.00799511 -.0270726/.9)}.bg-\[\#0ea5e9\]{background-color:#0ea5e9}.bg-\[\#0f172a\]{background-color:#0f172a}.bg-\[\#1E293B\]{background-color:#1e293b}.bg-\[\#1a1612\]\/90{background-color:oklab(20.3473% .00389921 .00928028/.9)}.bg-\[\#1c3e61\]\/80{background-color:oklab(35.6759% -.0235387 -.0690016/.8)}.bg-\[\#1c1813\]{background-color:#1c1813}.bg-\[\#1c1813\]\/95{background-color:oklab(21.1924% .00328737 .0109585/.95)}.bg-\[\#1e293b\]{background-color:#1e293b}.bg-\[\#1e1914\]\/60{background-color:oklab(21.7534% .00480779 .0113813/.6)}.bg-\[\#1f1a14\]\/90{background-color:oklab(22.1543% .00422043 .01306/.9)}.bg-\[\#2c2217\]{background-color:#2c2217}.bg-\[\#2d251d\]{background-color:#2d251d}.bg-\[\#4ADE80\],.bg-\[\#4ade80\]{background-color:#4ade80}.bg-\[\#9d4edd\]{background-color:#9d4edd}.bg-\[\#10b981\]{background-color:#10b981}.bg-\[\#39ff14\]{background-color:#39ff14}.bg-\[\#60a5fa\]{background-color:#60a5fa}.bg-\[\#101b2a\]{background-color:#101b2a}.bg-\[\#101d2c\]\/80{background-color:oklab(22.6801% -.0102447 -.0331036/.8)}.bg-\[\#101e2e\]\/85{background-color:oklab(23.0943% -.0109736 -.0351464/.85)}.bg-\[\#101e2e\]\/90{background-color:oklab(23.0943% -.0109736 -.0351464/.9)}.bg-\[\#182c42\]{background-color:#182c42}.bg-\[\#231e18\]{background-color:#231e18}.bg-\[\#0284c7\]{background-color:#0284c7}.bg-\[\#0369a1\]{background-color:#0369a1}.bg-\[\#020617\]{background-color:#020617}.bg-\[\#24292e\]{background-color:#24292e}.bg-\[\#030712\]{background-color:#030712}.bg-\[\#34597b\]{background-color:#34597b}.bg-\[\#059669\]{background-color:#059669}.bg-\[\#102438\]{background-color:#102438}.bg-\[\#142335\]{background-color:#142335}.bg-\[\#214365\]{background-color:#214365}.bg-\[\#252019\]{background-color:#252019}.bg-\[\#FFE24C\]{background-color:#ffe24c}.bg-\[\#FFF9E6\]{background-color:#fff9e6}.bg-\[\#FFFDF0\]{background-color:#fffdf0}.bg-\[\#a7f3d0\]{background-color:#a7f3d0}.bg-\[\#d9d9d9\]{background-color:#d9d9d9}.bg-\[\#dbeafe\]{background-color:#dbeafe}.bg-\[\#dc2626\]{background-color:#dc2626}.bg-\[\#e8e4da\]{background-color:#e8e4da}.bg-\[\#ea580c\]{background-color:#ea580c}.bg-\[\#f0e6c8\]{background-color:#f0e6c8}.bg-\[\#f0fdf4\]{background-color:#f0fdf4}.bg-\[\#f3cb65\]{background-color:#f3cb65}.bg-\[\#f4f1ea\]{background-color:#f4f1ea}.bg-\[\#f6edd2\]{background-color:#f6edd2}.bg-\[\#f7efe0\]{background-color:#f7efe0}.bg-\[\#f7efe0\]\/90{background-color:oklab(95.4339% .00254038 .0215065/.9)}.bg-\[\#f7efe0\]\/95{background-color:oklab(95.4339% .00254038 .0215065/.95)}.bg-\[\#f7f5ed\]{background-color:#f7f5ed}.bg-\[\#f8f5eb\]{background-color:#f8f5eb}.bg-\[\#f8fafc\]{background-color:#f8fafc}.bg-\[\#f9f2e3\]\/80{background-color:oklab(96.2559% .00149918 .0211427/.8)}.bg-\[\#f59e0b\]{background-color:#f59e0b}.bg-\[\#facc15\]{background-color:#facc15}.bg-\[\#faf6eb\]{background-color:#faf6eb}.bg-\[\#fafafa\]{background-color:#fafafa}.bg-\[\#fbf5e8\]\/98{background-color:oklab(97.1282% .00123182 .0182835/.98)}.bg-\[\#fcf7ee\]{background-color:#fcf7ee}.bg-\[\#fcf8ef\]\/95{background-color:oklab(97.9749% .000698805 .0126095/.95)}.bg-\[\#fdf8e1\]{background-color:#fdf8e1}.bg-\[\#fdfdfd\]{background-color:#fdfdfd}.bg-\[\#fefce8\]{background-color:#fefce8}.bg-\[\#ff9933\]{background-color:#f93}.bg-\[\#ffcc00\]{background-color:#fc0}.bg-\[\#ffe24c\]{background-color:#ffe24c}.bg-\[\#ffedd5\]{background-color:#ffedd5}.bg-\[\#fff1f2\]{background-color:#fff1f2}.bg-\[\#fffaf0\]{background-color:#fffaf0}.bg-\[\#fffdf0\]{background-color:#fffdf0}.bg-\[\#fffdf5\]{background-color:#fffdf5}.bg-\[\#fffdfa\]{background-color:#fffdfa}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\/40{background-color:#fffbeb66}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/40{background-color:color-mix(in oklab, var(--color-amber-50) 40%, transparent)}}.bg-amber-50\/60{background-color:#fffbeb99}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/60{background-color:color-mix(in oklab, var(--color-amber-50) 60%, transparent)}}.bg-amber-50\/70{background-color:#fffbebb3}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/70{background-color:color-mix(in oklab, var(--color-amber-50) 70%, transparent)}}.bg-amber-50\/80{background-color:#fffbebcc}@supports (color:color-mix(in lab, red, red)){.bg-amber-50\/80{background-color:color-mix(in oklab, var(--color-amber-50) 80%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\/70{background-color:#fef3c6b3}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\/70{background-color:color-mix(in oklab, var(--color-amber-100) 70%, transparent)}}.bg-amber-200{background-color:var(--color-amber-200)}.bg-amber-200\/60{background-color:#fee68599}@supports (color:color-mix(in lab, red, red)){.bg-amber-200\/60{background-color:color-mix(in oklab, var(--color-amber-200) 60%, transparent)}}.bg-amber-300{background-color:var(--color-amber-300)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-amber-600\/15{background-color:#dd740026}@supports (color:color-mix(in lab, red, red)){.bg-amber-600\/15{background-color:color-mix(in oklab, var(--color-amber-600) 15%, transparent)}}.bg-amber-600\/20{background-color:#dd740033}@supports (color:color-mix(in lab, red, red)){.bg-amber-600\/20{background-color:color-mix(in oklab, var(--color-amber-600) 20%, transparent)}}.bg-amber-700\/10{background-color:#b750001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-700\/10{background-color:color-mix(in oklab, var(--color-amber-700) 10%, transparent)}}.bg-amber-900\/5{background-color:#7b33060d}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/5{background-color:color-mix(in oklab, var(--color-amber-900) 5%, transparent)}}.bg-amber-900\/10{background-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/10{background-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.bg-amber-950\/5{background-color:#4619010d}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/5{background-color:color-mix(in oklab, var(--color-amber-950) 5%, transparent)}}.bg-amber-950\/10{background-color:#4619011a}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/10{background-color:color-mix(in oklab, var(--color-amber-950) 10%, transparent)}}.bg-amber-950\/90{background-color:#461901e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/90{background-color:color-mix(in oklab, var(--color-amber-950) 90%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\/5{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab, red, red)){.bg-black\/20{background-color:color-mix(in oklab, var(--color-black) 20%, transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab, red, red)){.bg-black\/70{background-color:color-mix(in oklab, var(--color-black) 70%, transparent)}}.bg-black\/75{background-color:#000000bf}@supports (color:color-mix(in lab, red, red)){.bg-black\/75{background-color:color-mix(in oklab, var(--color-black) 75%, transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\/50{background-color:color-mix(in oklab, var(--color-emerald-50) 50%, transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-100\/70{background-color:#d0fae5b3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-100\/70{background-color:color-mix(in oklab, var(--color-emerald-100) 70%, transparent)}}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/20{background-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-600\/10{background-color:#0097671a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/10{background-color:color-mix(in oklab, var(--color-emerald-600) 10%, transparent)}}.bg-emerald-600\/15{background-color:#00976726}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/15{background-color:color-mix(in oklab, var(--color-emerald-600) 15%, transparent)}}.bg-emerald-950\/90{background-color:#002c22e6}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\/90{background-color:color-mix(in oklab, var(--color-emerald-950) 90%, transparent)}}.bg-grass-green{background-color:var(--color-grass-green)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-500{background-color:var(--color-green-500)}.bg-highlight-pink{background-color:var(--color-highlight-pink)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-50\/50{background-color:#eef2ff80}@supports (color:color-mix(in lab, red, red)){.bg-indigo-50\/50{background-color:color-mix(in oklab, var(--color-indigo-50) 50%, transparent)}}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-700{background-color:var(--color-indigo-700)}.bg-ink-black{background-color:var(--color-ink-black)}.bg-ink-black\/20{background-color:#1e293b33}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/20{background-color:color-mix(in oklab, var(--color-ink-black) 20%, transparent)}}.bg-ink-black\/40{background-color:#1e293b66}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/40{background-color:color-mix(in oklab, var(--color-ink-black) 40%, transparent)}}.bg-ink-black\/50{background-color:#1e293b80}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/50{background-color:color-mix(in oklab, var(--color-ink-black) 50%, transparent)}}.bg-ink-black\/80{background-color:#1e293bcc}@supports (color:color-mix(in lab, red, red)){.bg-ink-black\/80{background-color:color-mix(in oklab, var(--color-ink-black) 80%, transparent)}}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\/10{background-color:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.bg-paper-white{background-color:var(--color-paper-white)}.bg-primary-purple{background-color:var(--color-primary-purple)}.bg-primary-purple\/10{background-color:#9d4edd1a}@supports (color:color-mix(in lab, red, red)){.bg-primary-purple\/10{background-color:color-mix(in oklab, var(--color-primary-purple) 10%, transparent)}}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-purple-950\/30{background-color:#3c03664d}@supports (color:color-mix(in lab, red, red)){.bg-purple-950\/30{background-color:color-mix(in oklab, var(--color-purple-950) 30%, transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-200{background-color:var(--color-rose-200)}.bg-rose-300{background-color:var(--color-rose-300)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/5{background-color:#ff23570d}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/5{background-color:color-mix(in oklab, var(--color-rose-500) 5%, transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/10{background-color:color-mix(in oklab, var(--color-rose-500) 10%, transparent)}}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/15{background-color:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.bg-rose-600{background-color:var(--color-rose-600)}.bg-rose-600\/10{background-color:#e700441a}@supports (color:color-mix(in lab, red, red)){.bg-rose-600\/10{background-color:color-mix(in oklab, var(--color-rose-600) 10%, transparent)}}.bg-rose-950\/60{background-color:#4d021899}@supports (color:color-mix(in lab, red, red)){.bg-rose-950\/60{background-color:color-mix(in oklab, var(--color-rose-950) 60%, transparent)}}.bg-rose-950\/90{background-color:#4d0218e6}@supports (color:color-mix(in lab, red, red)){.bg-rose-950\/90{background-color:color-mix(in oklab, var(--color-rose-950) 90%, transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-600{background-color:var(--color-sky-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab, red, red)){.bg-slate-50\/50{background-color:color-mix(in oklab, var(--color-slate-50) 50%, transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\/90{background-color:#e2e8f0e6}@supports (color:color-mix(in lab, red, red)){.bg-slate-200\/90{background-color:color-mix(in oklab, var(--color-slate-200) 90%, transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/90{background-color:#0f172be6}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/90{background-color:color-mix(in oklab, var(--color-slate-900) 90%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-stone-900{background-color:var(--color-stone-900)}.bg-stone-950{background-color:var(--color-stone-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-200{background-color:var(--color-yellow-200)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-radial{--tw-gradient-position:in oklab;background-image:radial-gradient(var(--tw-gradient-stops))}.bg-\[radial-gradient\(\#39ff14_1px\,transparent_1px\)\]{background-image:radial-gradient(#39ff14 1px,#0000 1px)}.bg-\[radial-gradient\(ellipse_at_center\,transparent_0\%\,rgba\(0\,0\,0\,0\.4\)_100\%\)\]{background-image:radial-gradient(#0000 0%,#0006 100%)}.from-\[\#F0F9FF\]{--tw-gradient-from:#f0f9ff;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#F0FDF4\]{--tw-gradient-from:#f0fdf4;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#F8FAFC\]{--tw-gradient-from:#f8fafc;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FAF5FF\]{--tw-gradient-from:#faf5ff;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFFBEB\]{--tw-gradient-from:#fffbeb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFFDF0\]{--tw-gradient-from:#fffdf0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-50{--tw-gradient-from:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100{--tw-gradient-from:var(--color-amber-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100\/90{--tw-gradient-from:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.from-amber-100\/90{--tw-gradient-from:color-mix(in oklab, var(--color-amber-100) 90%, transparent)}}.from-amber-100\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-300\/25{--tw-gradient-from:#ffd23640}@supports (color:color-mix(in lab, red, red)){.from-amber-300\/25{--tw-gradient-from:color-mix(in oklab, var(--color-amber-300) 25%, transparent)}}.from-amber-300\/25{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400\/30{--tw-gradient-from:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.from-amber-400\/30{--tw-gradient-from:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.from-amber-400\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500{--tw-gradient-from:var(--color-amber-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-50{--tw-gradient-from:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-grass-green{--tw-gradient-from:var(--color-grass-green);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-600\/30{--tw-gradient-from:#4f39f64d}@supports (color:color-mix(in lab, red, red)){.from-indigo-600\/30{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-600) 30%, transparent)}}.from-indigo-600\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-950\/80{--tw-gradient-from:#1e1a4dcc}@supports (color:color-mix(in lab, red, red)){.from-indigo-950\/80{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-950) 80%, transparent)}}.from-indigo-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-100\/90{--tw-gradient-from:#ffedd5e6}@supports (color:color-mix(in lab, red, red)){.from-orange-100\/90{--tw-gradient-from:color-mix(in oklab, var(--color-orange-100) 90%, transparent)}}.from-orange-100\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-500\/30{--tw-gradient-from:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.from-orange-500\/30{--tw-gradient-from:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.from-orange-500\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-primary-purple{--tw-gradient-from:var(--color-primary-purple);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-100\/80{--tw-gradient-from:#dff2fecc}@supports (color:color-mix(in lab, red, red)){.from-sky-100\/80{--tw-gradient-from:color-mix(in oklab, var(--color-sky-100) 80%, transparent)}}.from-sky-100\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-950\/35{--tw-gradient-from:#02061859}@supports (color:color-mix(in lab, red, red)){.from-slate-950\/35{--tw-gradient-from:color-mix(in oklab, var(--color-slate-950) 35%, transparent)}}.from-slate-950\/35{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\[\#DCFCE7\]{--tw-gradient-via:#dcfce7;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#E0F2FE\]{--tw-gradient-via:#e0f2fe;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#F1F5F9\]{--tw-gradient-via:#f1f5f9;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#F3E8FF\]{--tw-gradient-via:#f3e8ff;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#FEF3C7\]{--tw-gradient-via:#fef3c7;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#FFF9E6\]{--tw-gradient-via:#fff9e6;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-50\/70{--tw-gradient-via:#fffbebb3}@supports (color:color-mix(in lab, red, red)){.via-amber-50\/70{--tw-gradient-via:color-mix(in oklab, var(--color-amber-50) 70%, transparent)}}.via-amber-50\/70{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-200{--tw-gradient-via:var(--color-amber-200);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-300{--tw-gradient-via:var(--color-amber-300);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-400{--tw-gradient-via:var(--color-amber-400);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-blue-500\/20{--tw-gradient-via:#3080ff33}@supports (color:color-mix(in lab, red, red)){.via-blue-500\/20{--tw-gradient-via:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.via-blue-500\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-100\/60{--tw-gradient-via:#f3e8ff99}@supports (color:color-mix(in lab, red, red)){.via-purple-100\/60{--tw-gradient-via:color-mix(in oklab, var(--color-purple-100) 60%, transparent)}}.via-purple-100\/60{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-500\/20{--tw-gradient-via:#ac4bff33}@supports (color:color-mix(in lab, red, red)){.via-purple-500\/20{--tw-gradient-via:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.via-purple-500\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-300\/20{--tw-gradient-via:#77d4ff33}@supports (color:color-mix(in lab, red, red)){.via-sky-300\/20{--tw-gradient-via:color-mix(in oklab, var(--color-sky-300) 20%, transparent)}}.via-sky-300\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-slate-900\/10{--tw-gradient-via:#0f172b1a}@supports (color:color-mix(in lab, red, red)){.via-slate-900\/10{--tw-gradient-via:color-mix(in oklab, var(--color-slate-900) 10%, transparent)}}.via-slate-900\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-slate-900\/90{--tw-gradient-via:#0f172be6}@supports (color:color-mix(in lab, red, red)){.via-slate-900\/90{--tw-gradient-via:color-mix(in oklab, var(--color-slate-900) 90%, transparent)}}.via-slate-900\/90{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-50\/80{--tw-gradient-via:#fefce8cc}@supports (color:color-mix(in lab, red, red)){.via-yellow-50\/80{--tw-gradient-via:color-mix(in oklab, var(--color-yellow-50) 80%, transparent)}}.via-yellow-50\/80{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-300\/20{--tw-gradient-via:#ffe02a33}@supports (color:color-mix(in lab, red, red)){.via-yellow-300\/20{--tw-gradient-via:color-mix(in oklab, var(--color-yellow-300) 20%, transparent)}}.via-yellow-300\/20{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-yellow-400{--tw-gradient-via:var(--color-yellow-400);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\[\#E2E8F0\]{--tw-gradient-to:#e2e8f0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#EDE9FE\]{--tw-gradient-to:#ede9fe;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FCE7F3\]{--tw-gradient-to:#fce7f3;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FEF3C7\]{--tw-gradient-to:#fef3c7;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FEF9C3\]{--tw-gradient-to:#fef9c3;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FFE4E6\]{--tw-gradient-to:#ffe4e6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-accent-pink{--tw-gradient-to:var(--color-accent-pink);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-50{--tw-gradient-to:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200{--tw-gradient-to:var(--color-amber-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200\/50{--tw-gradient-to:#fee68580}@supports (color:color-mix(in lab, red, red)){.to-amber-200\/50{--tw-gradient-to:color-mix(in oklab, var(--color-amber-200) 50%, transparent)}}.to-amber-200\/50{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-200\/70{--tw-gradient-to:#fee685b3}@supports (color:color-mix(in lab, red, red)){.to-amber-200\/70{--tw-gradient-to:color-mix(in oklab, var(--color-amber-200) 70%, transparent)}}.to-amber-200\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-950\/40{--tw-gradient-to:#46190166}@supports (color:color-mix(in lab, red, red)){.to-amber-950\/40{--tw-gradient-to:color-mix(in oklab, var(--color-amber-950) 40%, transparent)}}.to-amber-950\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-100\/60{--tw-gradient-to:#d0fae599}@supports (color:color-mix(in lab, red, red)){.to-emerald-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-100) 60%, transparent)}}.to-emerald-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-400{--tw-gradient-to:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-grass-green{--tw-gradient-to:var(--color-grass-green);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-highlight-pink{--tw-gradient-to:var(--color-highlight-pink);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-100\/60{--tw-gradient-to:#ffedd599}@supports (color:color-mix(in lab, red, red)){.to-orange-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-orange-100) 60%, transparent)}}.to-orange-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-yellow-100{--tw-gradient-to:var(--color-yellow-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-yellow-100\/60{--tw-gradient-to:#fef9c299}@supports (color:color-mix(in lab, red, red)){.to-yellow-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-yellow-100) 60%, transparent)}}.to-yellow-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.\[background-size\:8px_8px\]{background-size:8px 8px}.bg-cover{background-size:cover}.bg-center{background-position:50%}.fill-ink-black{fill:var(--color-ink-black)}.fill-white{fill:var(--color-white)}.stroke-\[2\.5\]{stroke-width:2.5px}.stroke-\[2\]{stroke-width:2px}.stroke-\[3\],.stroke-\[3px\]{stroke-width:3px}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-bottom-left{object-position:left bottom}.object-top{object-position:top}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-16{padding-top:calc(var(--spacing) * 16)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-3\.5{padding-right:calc(var(--spacing) * 3.5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-9{padding-right:calc(var(--spacing) * 9)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pb-\[10px\]{padding-bottom:10px}.pl-0\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-baseline{vertical-align:baseline}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-arcade{font-family:var(--font-arcade)}.font-code-mono{font-family:var(--font-code-mono)}.font-display-lg{font-family:var(--font-display-lg)}.font-headline-md{font-family:var(--font-headline-md)}.font-icon-label{font-family:var(--font-icon-label)}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.font-window-title{font-family:var(--font-window-title)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[6\.5px\]{font-size:6.5px}.text-\[7\.5px\]{font-size:7.5px}.text-\[7px\]{font-size:7px}.text-\[8\.5px\]{font-size:8.5px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[18px\]{font-size:18px}.text-\[22px\]{font-size:22px}.leading-10{--tw-leading:calc(var(--spacing) * 10);line-height:calc(var(--spacing) * 10)}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#0ea5e9\]{color:#0ea5e9}.text-\[\#1c120c\]{color:#1c120c}.text-\[\#2c1d11\]{color:#2c1d11}.text-\[\#2c2014\]{color:#2c2014}.text-\[\#4ADE80\]{color:#4ade80}.text-\[\#7ba4c8\]{color:#7ba4c8}.text-\[\#8cb4db\]{color:#8cb4db}.text-\[\#9a3412\]{color:#9a3412}.text-\[\#9cbcdb\]{color:#9cbcdb}.text-\[\#10b981\]{color:#10b981}.text-\[\#39ff14\]{color:#39ff14}.text-\[\#67b1ec\]{color:#67b1ec}.text-\[\#137c36\]{color:#137c36}.text-\[\#332415\]{color:#332415}.text-\[\#855400\]{color:#855400}.text-\[\#FFE24C\]{color:#ffe24c}.text-\[\#b4c8dc\]{color:#b4c8dc}.text-\[\#bfe1ff\]{color:#bfe1ff}.text-\[\#c5221f\]{color:#c5221f}.text-\[\#c06100\]{color:#c06100}.text-\[\#dde7f2\]{color:#dde7f2}.text-\[\#e2d5c2\]{color:#e2d5c2}.text-\[\#e2ecf7\]{color:#e2ecf7}.text-\[\#e6edf4\]{color:#e6edf4}.text-\[\#e6f0fa\]{color:#e6f0fa}.text-\[\#f2e6d5\]{color:#f2e6d5}.text-\[\#f3cb65\]{color:#f3cb65}.text-\[\#f4ebd9\]{color:#f4ebd9}.text-\[\#f6d267\]{color:#f6d267}.text-\[\#f59e0b\]{color:#f59e0b}.text-\[\#fef3c7\]{color:#fef3c7}.text-\[\#ffcc00\]{color:#fc0}.text-accent-cyan{color:var(--color-accent-cyan)}.text-amber-100{color:var(--color-amber-100)}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-700\/40{color:#b7500066}@supports (color:color-mix(in lab, red, red)){.text-amber-700\/40{color:color-mix(in oklab, var(--color-amber-700) 40%, transparent)}}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-amber-950{color:var(--color-amber-950)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-cyan-700{color:var(--color-cyan-700)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-emerald-950{color:var(--color-emerald-950)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-900{color:var(--color-indigo-900)}.text-indigo-950{color:var(--color-indigo-950)}.text-inherit{color:inherit}.text-ink-black{color:var(--color-ink-black)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-orange-700{color:var(--color-orange-700)}.text-primary-purple{color:var(--color-primary-purple)}.text-purple-300{color:var(--color-purple-300)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-purple-900{color:var(--color-purple-900)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-900{color:var(--color-red-900)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-rose-400\/75{color:#ff667fbf}@supports (color:color-mix(in lab, red, red)){.text-rose-400\/75{color:color-mix(in oklab, var(--color-rose-400) 75%, transparent)}}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-rose-950{color:var(--color-rose-950)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-900{color:var(--color-sky-900)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-stone-200{color:var(--color-stone-200)}.text-stone-300{color:var(--color-stone-300)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-stone-800{color:var(--color-stone-800)}.text-stone-900{color:var(--color-stone-900)}.text-trash-gray{color:var(--color-trash-gray)}.text-white{color:var(--color-white)}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab, red, red)){.text-white\/40{color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.text-white\/50{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.italic\!{font-style:italic!important}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.placeholder-\[\#f3cb65\]\/70::placeholder{color:oklab(85.6949% .00434724 .128502/.7)}.placeholder-slate-400::placeholder{color:var(--color-slate-400)}.placeholder-stone-500::placeholder{color:var(--color-stone-500)}.placeholder-trash-gray::placeholder{color:var(--color-trash-gray)}.accent-amber-500{accent-color:var(--color-amber-500)}.accent-emerald-600{accent-color:var(--color-emerald-600)}.accent-primary-purple{accent-color:var(--color-primary-purple)}.opacity-0{opacity:0}.opacity-15{opacity:.15}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.opacity-90{opacity:.9}.opacity-95{opacity:.95}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-2px_0_0_rgba\(30\,41\,59\,0\.06\)\]{--tw-shadow:0 -2px 0 0 var(--tw-shadow-color,#1e293b0f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-3px_0_0_rgba\(30\,41\,59\,0\.08\)\]{--tw-shadow:0 -3px 0 0 var(--tw-shadow-color,#1e293b14);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_-4px_0_0_rgba\(30\,41\,59\,0\.1\)\]{--tw-shadow:0 -4px 0 0 var(--tw-shadow-color,#1e293b1a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(72\,131\,182\,0\.25\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#4883b640);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(157\,78\,221\,0\.3\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#9d4edd4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(157\,78\,221\,0\.25\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#9d4edd40);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_2px_0_0_rgba\(30\,41\,59\,0\.05\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,#1e293b0d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_16px_40px_rgba\(0\,0\,0\,0\.85\)\]{--tw-shadow:0 16px 40px var(--tw-shadow-color,#000000d9);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0px_-4px_10px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:0px -4px 10px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0_0_\#000\]{--tw-shadow:1.5px 1.5px 0 0 var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0_0_\#1E293B\]{--tw-shadow:1.5px 1.5px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0px_0px_\#1E293B\],.shadow-\[1\.5px_1\.5px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:1.5px 1.5px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1\.5px_1\.5px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:1.5px 1.5px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0_0_\#1E293B\]{--tw-shadow:1px 1px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_\#1E293B\]{--tw-shadow:1px 1px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_\#000\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_\#1E293B\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_rgba\(30\,41\,59\,0\.3\)\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#1e293b4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:1px 1px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[1px_1px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:1px 1px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0_0_\#1E293B\]{--tw-shadow:2px 2px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_\#1E293B\]{--tw-shadow:2px 2px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_\#000\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_\#1E293B\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_\#d97706\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#d97706);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.06\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,0\.3\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,0\.25\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b40);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_0px_rgba\(244\,63\,94\,1\)\]{--tw-shadow:2px 2px 0px 0px var(--tw-shadow-color,#f43f5e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[2px_2px_0px_rgba\(0\,0\,0\,1\)\]{--tw-shadow:2px 2px 0px var(--tw-shadow-color,#000);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[3px_3px_0px_0px_\#1E293B\],.shadow-\[3px_3px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:3px 3px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[3px_3px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:3px 3px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0_0_\#1E293B\]{--tw-shadow:4px 4px 0 0 var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_0px_\#0ea5e9\]{--tw-shadow:4px 4px 0px 0px var(--tw-shadow-color,#0ea5e9);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_0px_\#1E293B\],.shadow-\[4px_4px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:4px 4px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[4px_4px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:4px 4px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[6px_6px_0px_0px_\#1E293B\]{--tw-shadow:6px 6px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[6px_6px_0px_0px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:6px 6px 0px 0px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[8px_8px_0px_0px_rgba\(30\,41\,59\,1\)\]{--tw-shadow:8px 8px 0px 0px var(--tw-shadow-color,#1e293b);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[8px_8px_0px_0px_rgba\(244\,63\,94\,0\.3\)\]{--tw-shadow:8px 8px 0px 0px var(--tw-shadow-color,#f43f5e4d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_-3px_-3px_0px_rgba\(0\,0\,0\,0\.2\)\,inset_3px_3px_0px_rgba\(255\,255\,255\,0\.5\)\]{--tw-shadow:inset -3px -3px 0px var(--tw-shadow-color,#0003), inset 3px 3px 0px var(--tw-shadow-color,#ffffff80);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_0px_3px_0px_rgba\(255\,255\,255\,0\.8\)\]{--tw-shadow:inset 0px 3px 0px var(--tw-shadow-color,#fffc);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_1px_1px_0px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:inset 1px 1px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_2px_2px_0px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:inset 2px 2px 0px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_2px_2px_0px_rgba\(255\,255\,255\,0\.8\)\]{--tw-shadow:inset 2px 2px 0px var(--tw-shadow-color,#fffc);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[inset_3px_3px_0px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:inset 3px 3px 0px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-amber-500\/20{--tw-shadow-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.shadow-amber-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-amber-700\/20{--tw-shadow-color:#b7500033}@supports (color:color-mix(in lab, red, red)){.shadow-amber-700\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-700) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-\[\#0ea5e9\]{--tw-ring-color:#0ea5e9}.ring-amber-500\/40{--tw-ring-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.ring-amber-500\/40{--tw-ring-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.ring-amber-700\/30{--tw-ring-color:#b750004d}@supports (color:color-mix(in lab, red, red)){.ring-amber-700\/30{--tw-ring-color:color-mix(in oklab, var(--color-amber-700) 30%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.brightness-110{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.contrast-125{--tw-contrast:contrast(125%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_6px_rgba\(156\,188\,219\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 6px var(--tw-drop-shadow-color,#9cbcdb80));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#000000e6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.85\)\]{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#000000d9));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_16px_32px_rgba\(0\,0\,0\,0\.55\)\]{--tw-drop-shadow-size:drop-shadow(0 16px 32px var(--tw-drop-shadow-color,#0000008c));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-sm{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-sm));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-125{--tw-saturate:saturate(125%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-150{--tw-saturate:saturate(150%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}@media (hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.peer-checked\:bg-emerald-500:is(:where(.peer):checked~*){background-color:var(--color-emerald-500)}.peer-checked\:bg-grass-green:is(:where(.peer):checked~*){background-color:var(--color-grass-green)}.peer-checked\:text-ink-black:is(:where(.peer):checked~*){color:var(--color-ink-black)}.peer-focus\:outline-none:is(:where(.peer):focus~*){--tw-outline-style:none;outline-style:none}.selection\:bg-\[\#4ADE80\] ::selection,.selection\:bg-\[\#4ADE80\]::selection{background-color:#4ade80}.selection\:bg-highlight-pink ::selection,.selection\:bg-highlight-pink::selection{background-color:var(--color-highlight-pink)}.selection\:text-\[\#1E293B\] ::selection,.selection\:text-\[\#1E293B\]::selection{color:#1e293b}.selection\:text-white ::selection,.selection\:text-white::selection{color:var(--color-white)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-\[1px\]:after{content:var(--tw-content);top:1px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:right-0:after{content:var(--tw-content);right:0}.after\:-bottom-\[2px\]:after{content:var(--tw-content);bottom:-2px}.after\:left-0:after{content:var(--tw-content);left:0}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:z-10:after{content:var(--tw-content);z-index:10}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing) * 4)}.after\:h-\[2\.5px\]:after{content:var(--tw-content);height:2.5px}.after\:w-2:after{content:var(--tw-content);width:calc(var(--spacing) * 2)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing) * 4)}.after\:rounded-full:after{content:var(--tw-content);border-radius:2147483647px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-2:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:2px}.after\:border-ink-black:after{content:var(--tw-content);border-color:var(--color-ink-black)}.after\:bg-paper-white:after{content:var(--tw-content);background-color:var(--color-paper-white)}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\\\'\\\'\]:after{--tw-content:\'\';content:var(--tw-content)}.peer-checked\:after\:translate-x-3:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 3);translate:var(--tw-translate-x) var(--tw-translate-y)}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:border-\[\#67b1ec\]:focus-within{border-color:#67b1ec}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-\[\#67b1ec\]\/40:focus-within{--tw-ring-color:oklab(73.6024% -.0492724 -.102282/.4)}@media (hover:hover){.hover\:translate-x-0\.5:hover{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:translate-y-\[-2px\]:hover{--tw-translate-y:-2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:rotate-0:hover{rotate:0deg}.hover\:border-\[\#8db7dc\]:hover{border-color:#8db7dc}.hover\:border-\[\#10b981\]:hover{border-color:#10b981}.hover\:border-\[\#67b1ec\]:hover{border-color:#67b1ec}.hover\:border-\[\#f59e0b\]:hover{border-color:#f59e0b}.hover\:border-amber-600\/50:hover{border-color:#dd740080}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-600\/50:hover{border-color:color-mix(in oklab, var(--color-amber-600) 50%, transparent)}}.hover\:border-amber-700\/60:hover{border-color:#b7500099}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-700\/60:hover{border-color:color-mix(in oklab, var(--color-amber-700) 60%, transparent)}}.hover\:border-ink-black:hover{border-color:var(--color-ink-black)}.hover\:border-red-500:hover{border-color:var(--color-red-500)}.hover\:border-rose-400:hover{border-color:var(--color-rose-400)}.hover\:bg-\[\#1c3e61\]\/35:hover{background-color:oklab(35.6758% -.0235387 -.0690016/.35)}.hover\:bg-\[\#1f3750\]:hover{background-color:#1f3750}.hover\:bg-\[\#3b82f6\]:hover{background-color:#3b82f6}.hover\:bg-\[\#3f6990\]:hover{background-color:#3f6990}.hover\:bg-\[\#4cc9f0\]:hover{background-color:#4cc9f0}.hover\:bg-\[\#10b981\]\/25:hover{background-color:oklab(69.5873% -.142158 .0448781/.25)}.hover\:bg-\[\#22c55e\]:hover{background-color:#22c55e}.hover\:bg-\[\#28e007\]:hover{background-color:#28e007}.hover\:bg-\[\#39ff14\]:hover{background-color:#39ff14}.hover\:bg-\[\#203a55\]:hover{background-color:#203a55}.hover\:bg-\[\#251f18\]:hover{background-color:#251f18}.hover\:bg-\[\#b91c1c\]:hover{background-color:#b91c1c}.hover\:bg-\[\#c2410c\]:hover{background-color:#c2410c}.hover\:bg-\[\#efece3\]:hover{background-color:#efece3}.hover\:bg-\[\#f72585\]:hover{background-color:#f72585}.hover\:bg-\[\#fcf5e6\]:hover{background-color:#fcf5e6}.hover\:bg-\[\#fde047\]:hover{background-color:#fde047}.hover\:bg-\[\#ff8000\]:hover{background-color:#ff8000}.hover\:bg-\[\#ffe24c\]\/40:hover{background-color:oklab(91.1399% -.0228156 .162602/.4)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-amber-200\/50:hover{background-color:#fee68580}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-200\/50:hover{background-color:color-mix(in oklab, var(--color-amber-200) 50%, transparent)}}.hover\:bg-amber-300:hover{background-color:var(--color-amber-300)}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500:hover{background-color:var(--color-amber-500)}.hover\:bg-amber-500\/10:hover{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/10:hover{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.hover\:bg-amber-500\/25:hover{background-color:#f99c0040}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/25:hover{background-color:color-mix(in oklab, var(--color-amber-500) 25%, transparent)}}.hover\:bg-amber-500\/30:hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/30:hover{background-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.hover\:bg-amber-600:hover{background-color:var(--color-amber-600)}.hover\:bg-amber-600\/25:hover{background-color:#dd740040}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-600\/25:hover{background-color:color-mix(in oklab, var(--color-amber-600) 25%, transparent)}}.hover\:bg-amber-700\/20:hover{background-color:#b7500033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-700\/20:hover{background-color:color-mix(in oklab, var(--color-amber-700) 20%, transparent)}}.hover\:bg-amber-900\/5:hover{background-color:#7b33060d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/5:hover{background-color:color-mix(in oklab, var(--color-amber-900) 5%, transparent)}}.hover\:bg-amber-900\/10:hover{background-color:#7b33061a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/10:hover{background-color:color-mix(in oklab, var(--color-amber-900) 10%, transparent)}}.hover\:bg-amber-900\/20:hover{background-color:#7b330633}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-900\/20:hover{background-color:color-mix(in oklab, var(--color-amber-900) 20%, transparent)}}.hover\:bg-black:hover{background-color:var(--color-black)}.hover\:bg-black\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\:bg-black\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/10:hover{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.hover\:bg-cyan-200:hover{background-color:var(--color-cyan-200)}.hover\:bg-emerald-50:hover{background-color:var(--color-emerald-50)}.hover\:bg-emerald-100:hover{background-color:var(--color-emerald-100)}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-emerald-300:hover{background-color:var(--color-emerald-300)}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-emerald-500\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-500\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\:bg-emerald-600\/20:hover{background-color:#00976733}@supports (color:color-mix(in lab, red, red)){.hover\:bg-emerald-600\/20:hover{background-color:color-mix(in oklab, var(--color-emerald-600) 20%, transparent)}}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-pink-400:hover{background-color:var(--color-pink-400)}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-purple-100:hover{background-color:var(--color-purple-100)}.hover\:bg-purple-200:hover{background-color:var(--color-purple-200)}.hover\:bg-purple-500:hover{background-color:var(--color-purple-500)}.hover\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-rose-50:hover{background-color:var(--color-rose-50)}.hover\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\:bg-rose-200:hover{background-color:var(--color-rose-200)}.hover\:bg-rose-500:hover{background-color:var(--color-rose-500)}.hover\:bg-rose-500\/10:hover{background-color:#ff23571a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-500\/10:hover{background-color:color-mix(in oklab, var(--color-rose-500) 10%, transparent)}}.hover\:bg-rose-500\/25:hover{background-color:#ff235740}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-500\/25:hover{background-color:color-mix(in oklab, var(--color-rose-500) 25%, transparent)}}.hover\:bg-rose-600:hover{background-color:var(--color-rose-600)}.hover\:bg-rose-600\/20:hover{background-color:#e7004433}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-600\/20:hover{background-color:color-mix(in oklab, var(--color-rose-600) 20%, transparent)}}.hover\:bg-rose-700:hover{background-color:var(--color-rose-700)}.hover\:bg-rose-900:hover{background-color:var(--color-rose-900)}.hover\:bg-rose-900\/70:hover{background-color:#8b0836b3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-rose-900\/70:hover{background-color:color-mix(in oklab, var(--color-rose-900) 70%, transparent)}}.hover\:bg-sky-50:hover{background-color:var(--color-sky-50)}.hover\:bg-sky-400:hover{background-color:var(--color-sky-400)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-slate-300:hover{background-color:var(--color-slate-300)}.hover\:bg-slate-600:hover{background-color:var(--color-slate-600)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-slate-950:hover{background-color:var(--color-slate-950)}.hover\:bg-stone-500\/10:hover{background-color:#79716b1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-stone-500\/10:hover{background-color:color-mix(in oklab, var(--color-stone-500) 10%, transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:bg-white\/40:hover{background-color:#fff6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/40:hover{background-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.hover\:bg-yellow-200:hover{background-color:var(--color-yellow-200)}.hover\:bg-yellow-300:hover{background-color:var(--color-yellow-300)}.hover\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}.hover\:from-amber-300:hover{--tw-gradient-from:var(--color-amber-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-emerald-400:hover{--tw-gradient-to:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-600:hover{color:var(--color-amber-600)}.hover\:text-amber-800:hover{color:var(--color-amber-800)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-blue-900:hover{color:var(--color-blue-900)}.hover\:text-cyan-200:hover{color:var(--color-cyan-200)}.hover\:text-ink-black:hover{color:var(--color-ink-black)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-red-800:hover{color:var(--color-red-800)}.hover\:text-rose-200:hover{color:var(--color-rose-200)}.hover\:text-rose-300:hover{color:var(--color-rose-300)}.hover\:text-rose-600:hover{color:var(--color-rose-600)}.hover\:text-sky-800:hover{color:var(--color-sky-800)}.hover\:text-stone-200:hover{color:var(--color-stone-200)}.hover\:text-stone-900:hover{color:var(--color-stone-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:border-amber-500:focus{border-color:var(--color-amber-500)}.focus\:border-amber-500\/70:focus{border-color:#f99c00b3}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-500\/70:focus{border-color:color-mix(in oklab, var(--color-amber-500) 70%, transparent)}}.focus\:border-amber-600:focus{border-color:var(--color-amber-600)}.focus\:border-amber-700\/60:focus{border-color:#b7500099}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-700\/60:focus{border-color:color-mix(in oklab, var(--color-amber-700) 60%, transparent)}}.focus\:border-sky-600:focus{border-color:var(--color-sky-600)}.focus\:bg-amber-50:focus{background-color:var(--color-amber-50)}.focus\:bg-white:focus{background-color:var(--color-white)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-primary-purple:focus{--tw-ring-color:var(--color-primary-purple)}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-sky-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ink-black:focus-visible{--tw-ring-color:var(--color-ink-black)}.active\:translate-x-0\.5:active{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-x-1:active{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-y-0\.5:active{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-y-1:active{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-125:active{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-\[\#1fb304\]:active{background-color:#1fb304}.active\:bg-\[\#2b4c6e\]:active{background-color:#2b4c6e}.active\:shadow-none:active{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=400px){.min-\[400px\]\:w-72{width:calc(var(--spacing) * 72)}.min-\[400px\]\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.min-\[400px\]\:text-\[8px\]{font-size:8px}}@media (width>=480px){.min-\[480px\]\:inline{display:inline}}@media (width>=40rem){.sm\:right-6{right:calc(var(--spacing) * 6)}.sm\:my-5{margin-block:calc(var(--spacing) * 5)}.sm\:mt-0{margin-top:0}.sm\:mt-2{margin-top:calc(var(--spacing) * 2)}.sm\:mt-3{margin-top:calc(var(--spacing) * 3)}.sm\:-mr-10{margin-right:calc(var(--spacing) * -10)}.sm\:mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.sm\:mb-2{margin-bottom:calc(var(--spacing) * 2)}.sm\:mb-4{margin-bottom:calc(var(--spacing) * 4)}.sm\:mb-5{margin-bottom:calc(var(--spacing) * 5)}.sm\:mb-6{margin-bottom:calc(var(--spacing) * 6)}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:h-4{height:calc(var(--spacing) * 4)}.sm\:h-9{height:calc(var(--spacing) * 9)}.sm\:h-16{height:calc(var(--spacing) * 16)}.sm\:h-24{height:calc(var(--spacing) * 24)}.sm\:h-72{height:calc(var(--spacing) * 72)}.sm\:h-\[40vh\]{height:40vh}.sm\:max-h-\[380px\]{max-height:380px}.sm\:min-h-\[54px\]{min-height:54px}.sm\:min-h-\[240px\]{min-height:240px}.sm\:min-h-\[360px\]{min-height:360px}.sm\:w-4{width:calc(var(--spacing) * 4)}.sm\:w-9{width:calc(var(--spacing) * 9)}.sm\:w-16{width:calc(var(--spacing) * 16)}.sm\:w-20{width:calc(var(--spacing) * 20)}.sm\:w-28{width:calc(var(--spacing) * 28)}.sm\:w-72{width:calc(var(--spacing) * 72)}.sm\:w-80{width:calc(var(--spacing) * 80)}.sm\:w-auto{width:auto}.sm\:max-w-\[90\%\]{max-width:90%}.sm\:max-w-\[200px\]{max-width:200px}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}:where(.sm\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.sm\:self-center{align-self:center}.sm\:rounded-lg{border-radius:var(--radius-lg)}.sm\:rounded-sm{border-radius:var(--radius-sm)}.sm\:border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.sm\:border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.sm\:p-3{padding:calc(var(--spacing) * 3)}.sm\:p-3\.5{padding:calc(var(--spacing) * 3.5)}.sm\:p-4{padding:calc(var(--spacing) * 4)}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:p-8{padding:calc(var(--spacing) * 8)}.sm\:p-10{padding:calc(var(--spacing) * 10)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.sm\:py-3{padding-block:calc(var(--spacing) * 3)}.sm\:py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.sm\:py-6{padding-block:calc(var(--spacing) * 6)}.sm\:pt-5{padding-top:calc(var(--spacing) * 5)}.sm\:pr-4{padding-right:calc(var(--spacing) * 4)}.sm\:pr-5{padding-right:calc(var(--spacing) * 5)}.sm\:pb-3{padding-bottom:calc(var(--spacing) * 3)}.sm\:pb-5{padding-bottom:calc(var(--spacing) * 5)}.sm\:pl-0{padding-left:0}.sm\:pl-10{padding-left:calc(var(--spacing) * 10)}.sm\:pl-14{padding-left:calc(var(--spacing) * 14)}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.sm\:text-\[8\.5px\]{font-size:8.5px}.sm\:text-\[9px\]{font-size:9px}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-\[13px\]{font-size:13px}}@media (width>=48rem){.md\:-mr-12{margin-right:calc(var(--spacing) * -12)}.md\:flex{display:flex}.md\:inline{display:inline}.md\:inline-block{display:inline-block}.md\:h-96{height:calc(var(--spacing) * 96)}.md\:h-\[46vh\]{height:46vh}.md\:max-h-\[460px\]{max-height:460px}.md\:min-h-\[300px\]{min-height:300px}.md\:w-84{width:calc(var(--spacing) * 84)}.md\:max-w-\[85\%\]{max-width:85%}.md\:max-w-\[270px\]{max-width:270px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:gap-4{gap:calc(var(--spacing) * 4)}.md\:p-8{padding:calc(var(--spacing) * 8)}.md\:px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.md\:px-4{padding-inline:calc(var(--spacing) * 4)}.md\:px-8{padding-inline:calc(var(--spacing) * 8)}.md\:py-2{padding-block:calc(var(--spacing) * 2)}.md\:pl-16{padding-left:calc(var(--spacing) * 16)}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:text-\[15px\]{font-size:15px}}@media (width>=64rem){.lg\:-mr-14{margin-right:calc(var(--spacing) * -14)}.lg\:h-\[50vh\]{height:50vh}.lg\:max-h-\[500px\]{max-height:500px}.lg\:w-\[49\%\]{width:49%}.lg\:w-\[51\%\]{width:51%}.lg\:max-w-6xl{max-width:var(--container-6xl)}.lg\:max-w-\[320px\]{max-width:320px}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:border-r-\[3px\]{border-right-style:var(--tw-border-style);border-right-width:3px}.lg\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.lg\:pl-18{padding-left:calc(var(--spacing) * 18)}}@media (prefers-color-scheme:dark){.dark\:border-stone-700{border-color:var(--color-stone-700)}.dark\:border-stone-700\/30{border-color:#44403b4d}@supports (color:color-mix(in lab, red, red)){.dark\:border-stone-700\/30{border-color:color-mix(in oklab, var(--color-stone-700) 30%, transparent)}}.dark\:border-stone-700\/50{border-color:#44403b80}@supports (color:color-mix(in lab, red, red)){.dark\:border-stone-700\/50{border-color:color-mix(in oklab, var(--color-stone-700) 50%, transparent)}}.dark\:bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-purple-400{color:var(--color-purple-400)}.dark\:text-rose-400{color:var(--color-rose-400)}.dark\:text-stone-300{color:var(--color-stone-300)}@media (hover:hover){.dark\:hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}}}}html,body{color:#1e293b;background:linear-gradient(135deg,#0f172a 0%,#020617 100%);width:100%;height:100%;margin:0;padding:0;font-family:Be Vietnam Pro,sans-serif;overflow:hidden}#root{width:100%;height:100%;overflow:hidden}.material-symbols-outlined{white-space:nowrap;vertical-align:middle;max-width:1em;display:inline-block;overflow:hidden}::-webkit-scrollbar{width:12px;height:12px}::-webkit-scrollbar-track{background:#f9f8f3;border-left:2px solid #1e293b}::-webkit-scrollbar-thumb{background:#1e293b;border-radius:0}::-webkit-scrollbar-thumb:hover{background:#334155}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:#1e293b #f4f1ea}.custom-scrollbar::-webkit-scrollbar{width:10px;height:10px}.custom-scrollbar::-webkit-scrollbar-track{background:#f4f1ea}.custom-scrollbar::-webkit-scrollbar-track:vertical{border-top:none;border-left:2px solid #1e293b}.custom-scrollbar::-webkit-scrollbar-track:horizontal{border-top:2px solid #1e293b;border-left:none}.custom-scrollbar::-webkit-scrollbar-thumb{background:#1e293b;border:none;border-radius:0!important}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#334155}.custom-scrollbar::-webkit-scrollbar-thumb:active{background:#0f172a}.custom-scrollbar::-webkit-scrollbar-corner{background:#f4f1ea;border-top:2px solid #1e293b;border-left:2px solid #1e293b}.no-scrollbar::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}.no-scrollbar{-ms-overflow-style:none!important;scrollbar-width:none!important}.window-shadow,.gadget-shadow{box-shadow:6px 6px #1e293b}.arcade-btn{transition:all .1s;box-shadow:0 6px #1e293b,inset 0 4px #fff6}.arcade-btn:active{transform:translateY(6px);box-shadow:0 0 #1e293b,inset 0 2px #0003}.icon-hover-shift{transition:all .1s ease-in-out}.icon-hover-shift:hover{transform:translate(-2px,-2px)}.icon-hover-shift:active{transform:translate(2px,2px)}.cm-editor{border:3px solid #1e293b;border-radius:.5rem;color:#4ade80!important;background-color:#1e293b!important;outline:none!important;font-family:Courier Prime,monospace!important;font-size:13px!important}.cm-scroller{font-family:inherit!important}.cm-gutters{color:#64748b!important;background-color:#1e293b!important;border-right:3px solid #1e293b!important}.cm-activeLineGutter{color:#4ade80!important;background-color:#4ade801a!important}.cm-activeLine{background-color:#4ade800d!important}.cm-cursor{border-left-color:#4ade80!important}.font-cinzel{font-family:Cinzel,serif}.font-cinzel-dec{font-family:Cinzel Decorative,serif}.font-garamond{font-family:EB Garamond,serif}.font-pencil{font-family:Kalam,cursive}.parchment-bg{background-color:#f3e9d2;background-image:radial-gradient(circle,#f8f1e3f2,#e2d0aee6),radial-gradient(circle at 10% 20%,#bd9a6c40 0%,#0000 40%),radial-gradient(circle at 90% 80%,#a883544d 0%,#0000 45%),radial-gradient(circle at 80% 15%,#a0764633 0%,#0000 35%),radial-gradient(circle at 25% 85%,#af8a5c40 0%,#0000 35%)}.parchment-dark-bg{background-color:#171512;background-image:radial-gradient(circle,#26211bf2,#120f0cf2),radial-gradient(circle at 10% 20%,#5544304d 0%,#0000 40%),radial-gradient(circle at 90% 80%,#46342059 0%,#0000 45%)}.map-vignette{box-shadow:inset 0 0 80px #4e361b73,inset 0 0 160px #2d1e0c59}.map-dark-vignette{box-shadow:inset 0 0 90px #000000d9,inset 0 0 180px #000000b3}@keyframes beacon-pulse{0%{r:10px;opacity:.9}50%{r:22px;opacity:.35}to{r:30px;opacity:0}}@keyframes path-shimmer{0%{stroke-dashoffset:200px}to{stroke-dashoffset:0}}.beacon-wave{animation:2s cubic-bezier(.215,.61,.355,1) infinite beacon-pulse}.beacon-wave-delayed{animation:2s cubic-bezier(.215,.61,.355,1) .8s infinite beacon-pulse}.canvas-interactive{cursor:grab}.canvas-interactive:active{cursor:grabbing}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} diff --git a/algospaced-ui/dist/assets/vendor-react-CIO8MTK1.js b/algospaced-ui/dist/assets/vendor-react-CIO8MTK1.js deleted file mode 100644 index e997734404d38ea927dd3467d30e2a825d70c983..0000000000000000000000000000000000000000 --- a/algospaced-ui/dist/assets/vendor-react-CIO8MTK1.js +++ /dev/null @@ -1,9 +0,0 @@ -import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{A as n,D as r,E as i,F as a,L as o,M as s,N as c,O as l,P as u,S as d,T as f,_ as p,a as m,b as h,c as g,d as _,f as v,g as y,h as b,i as x,j as S,k as C,l as w,m as T,n as E,o as ee,p as D,r as O,s as k,u as A,v as te,w as j,y as M}from"./vendor-codemirror-By0wlJeM.js";var ne=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=ne()})),ie=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,k=O.port2;O.port1.onmessage=ee,D=function(){k.postMessage(null)}}else D=function(){_(ee,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ae=t(((e,t)=>{t.exports=ie()})),oe=t((e=>{var t=re();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=oe()})),ce=t((e=>{var t=ae(),n=re(),r=se();function i(e){var t=`https://react.dev/errors/`+e;if(1oe||(e.current=ie[oe],ie[oe]=null,oe--)}function N(e,t){oe++,ie[oe]=e.current,e.current=t}var ue=ce(null),P=ce(null),de=ce(null),fe=ce(null);function pe(e,t){switch(N(de,t),N(P,e),N(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}le(ue),N(ue,e)}function F(){le(ue),le(P),le(de)}function me(e){e.memoizedState!==null&&N(fe,e);var t=ue.current,n=Hd(t,e.type);t!==n&&(N(P,e),N(ue,n))}function I(e){P.current===e&&(le(ue),le(P)),fe.current===e&&(le(fe),Qf._currentValue=ne)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Rt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Ed(Nr,`onSelect`),0>=o,i-=o,Di=1<<32-ze(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),z&&ki(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),z&&ki(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return z&&ki(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),z&&ki(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),Fa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Oa(o),x(e,r,o,c)}if(te(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Pa(o),c);if(o.$$typeof===b)return x(e,r,na(e,o),c);Ia(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=x(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=L(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function B(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=pa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Y&p)===p:(r&p)===p){p!==0&&p===fa&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ba=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};j.T=s,Ps(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,ga(c,r),pu(e)):Ns(e,t,r,pu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ne,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},pu())}function Ds(){return ta(Qf)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(hu(r,t,n),Wa(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=ii(e,t,n,r),n!==null&&(hu(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,pu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),q===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return hu(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&hu(t,e,2)}function Fs(e){var t=e.alternate;return e===V||t!==null&&t===V}function Is(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Rs={readContext:ta,use:No,useCallback:U,useContext:U,useEffect:U,useImperativeHandle:U,useLayoutEffect:U,useInsertionEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useSyncExternalStore:U,useId:U,useHostTransitionStatus:U,useFormState:U,useActionState:U,useOptimistic:U,useMemoCache:U,useCacheRefresh:U};Rs.useEffectEvent=U;var zs={readContext:ta,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(go){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(go){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,V,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=ko();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=q.identifierPrefix;if(z){var n=Oi,r=Di;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return W(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=de.current,Vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ri(t,!0)}else e=Bd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Vi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),a=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),W(t),null);case 4:return F(),e===null&&Sd(t.stateNode.containerInfo),W(t),null;case 10:return Yi(t.type),W(t),null;case 19:if(le(lo),r=t.memoizedState,r===null)return W(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Lc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return N(lo,lo.current&1|2),z&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>tu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!z)return W(t),null}else 2*De()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=lo.current,N(lo,a?n&1|2:n&1),z&&ki(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&le(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),W(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),F(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return I(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(lo),null;case 4:return F(),null;case 10:return Yi(t.type),null;case 22:case 23:return co(t),to(),e!==null&&le(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Bc(e,t){switch(Mi(t),t.tag){case 3:Yi(sa),F();break;case 26:case 27:case 5:I(t);break;case 4:F();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:le(lo);break;case 10:Yi(t.type);break;case 22:case 23:co(t),to(),e!==null&&le(va);break;case 24:Yi(sa)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Z(e,e.return,t)}}}function Wc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[lt]=t}catch(t){Z(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ct]=e,t[lt]=n}catch(t){Z(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{M.p=a,j.T=r,Vu(e,t)}}function Wu(e,t,n){t=yi(n,t),t=Qs(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Qe(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=yi(n,e),n=$s(2),r=Ua(t,n,2),r!==null&&(ec(n,r,t,e),Qe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>De()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Xe()),e=ai(e,t),e!==null&&(Qe(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ce(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=qe(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,ld(r,a))}r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=De(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=bt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);xt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=de.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Bt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),xt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Bt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,xt(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ce()})),N=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ue=t(((e,t)=>{t.exports=N()})),P=e(re(),1);function de(){return typeof window<`u`}function fe(e){return me(e)?(e.nodeName||``).toLowerCase():`#document`}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function F(e){return((me(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function me(e){return de()?e instanceof Node||e instanceof pe(e).Node:!1}function I(e){return de()?e instanceof Element||e instanceof pe(e).Element:!1}function he(e){return de()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function ge(e){return!de()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function _e(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ve(e){return/^(table|td|th)$/.test(fe(e))}function ye(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var be=/transform|translate|scale|rotate|perspective|filter/,xe=/paint|layout|strict|content/,Se=e=>!!e&&e!==`none`,Ce;function we(e){let t=I(e)?Oe(e):e;return Se(t.transform)||Se(t.translate)||Se(t.scale)||Se(t.rotate)||Se(t.perspective)||!Ee()&&(Se(t.backdropFilter)||Se(t.filter))||be.test(t.willChange||``)||xe.test(t.contain||``)}function Te(e){let t=Ae(e);for(;he(t)&&!De(t);){if(we(t))return t;if(ye(t))return null;t=Ae(t)}return null}function Ee(){return Ce??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ce}function De(e){return/^(html|body|#document)$/.test(fe(e))}function Oe(e){return pe(e).getComputedStyle(e)}function ke(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(fe(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ge(e)&&e.host||F(e);return ge(t)?t.host:t}function je(e){let t=Ae(e);return De(t)?(e.ownerDocument||e).body:he(t)&&_e(t)?t:je(t)}function Me(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=je(e),i=r===e.ownerDocument?.body,a=pe(r);if(i){let e=Ne(a);return t.concat(a,a.visualViewport||[],_e(r)?r:[],e&&n?Me(e):[])}return t.concat(r,Me(r,[],n))}function Ne(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Pe=Math.min,Fe=Math.max,Ie=Math.round,Le=Math.floor,Re=e=>({x:e,y:e}),ze={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Be(e,t,n){return Fe(e,Pe(t,n))}function Ve(e,t){return typeof e==`function`?e(t):e}function He(e){return e.split(`-`)[0]}function Ue(e){return e.split(`-`)[1]}function We(e){return e===`x`?`y`:`x`}function Ge(e){return e===`y`?`height`:`width`}function Ke(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function qe(e){return We(Ke(e))}function Je(e,t,n){n===void 0&&(n=!1);let r=Ue(e),i=qe(e),a=Ge(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=rt(o)),[o,rt(o)]}function Ye(e){let t=rt(e);return[Xe(e),t,Xe(t)]}function Xe(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ze=[`left`,`right`],Qe=[`right`,`left`],$e=[`top`,`bottom`],et=[`bottom`,`top`];function tt(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Qe:Ze:t?Ze:Qe;case`left`:case`right`:return t?$e:et;default:return[]}}function nt(e,t,n,r){let i=Ue(e),a=tt(He(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Xe)))),a}function rt(e){let t=He(e);return ze[t]+e.slice(t.length)}function it(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function at(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:it(e)}function ot(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var st=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[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] *)`].join(`,`),ct=typeof Element>`u`,lt=ct?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ut=!ct&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},dt=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):dt(e.parentNode))},ft=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},pt=function(e,t,n){if(dt(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(st));return t&<.call(e,st)&&r.unshift(e),r=r.filter(n),r},mt=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!dt(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=mt(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{lt.call(a,st)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!dt(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=mt(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},ht=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},gt=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ft(e))&&!ht(e)?0:e.tabIndex},_t=function(e,t){var n=gt(e);return n<0&&t&&!ht(e)?0:n},vt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},yt=function(e){return e.tagName===`INPUT`},bt=function(e){return yt(e)&&e.type===`hidden`},xt=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},St=function(e,t){for(var n=0;nsummary:first-of-type`)?e.parentElement:e;if(lt.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=ut(e);if(s&&!s.shadowRoot&&r(s)===!0)return Dt(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(Et(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return Dt(e);return!1},kt=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n=0)},Nt=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=_t(a,i),s=i?Nt(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(vt).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Pt=function(e,t){return t||={},Nt(t.getShadowRoot?mt([e],t.includeContainer,{filter:jt.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Mt}):pt(e,t.includeContainer,jt.bind(null,t)))};function Ft(){return/apple/i.test(navigator.vendor)}var It=`data-floating-ui-focusable`;function Lt(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Rt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ge(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function zt(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Bt(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Vt(e){return e.matches(`html,body`)}function Ht(e){return e?.ownerDocument||document}function Ut(e){return e?e.hasAttribute(It)?e:e.querySelector(`[`+It+`]`)||e:null}function Wt(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Wt(e,t.id,n)])}function Gt(e){return`nativeEvent`in e}function Kt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var qt=typeof document<`u`?P.useLayoutEffect:function(){},Jt={...P};function Yt(e){let t=P.useRef(e);return qt(()=>{t.current=e}),t}var Xt=Jt.useInsertionEffect||(e=>e());function Zt(e){let t=P.useRef(()=>{});return Xt(()=>{t.current=e}),P.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var Qt=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function $t(e,t){let n=Pt(e,Qt()),r=n.length;if(r===0)return;let i=Lt(Ht(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function en(e){return $t(Ht(e).body,1)||e}function tn(e){return $t(Ht(e).body,-1)||e}function nn(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Rt(n,r)}function rn(e){Pt(e,Qt()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function an(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var on=e(se(),1),sn=ue();function cn(e,t,n){let{reference:r,floating:i}=e,a=Ke(t),o=qe(t),s=Ge(o),c=He(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ue(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ln(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ve(t,e),p=at(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ot(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var un=50,dn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ln},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=cn(l,r,c),f=r,p=0,m={};for(let n=0;ne<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ke(t)||T.every(e=>Ke(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ke(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},pn=new Set([`left`,`top`]);async function mn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=He(n),s=Ue(n),c=Ke(n)===`y`,l=pn.has(o)?-1:1,u=a&&c?-1:1,d=Ve(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var hn=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await mn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},gn=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ve(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ke(i),p=We(f),m=u[p],h=u[f],g=(e,t)=>Be(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function _n(e){let t=Oe(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=he(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ie(n)!==a||Ie(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vn(e){return I(e)?e:e.contextElement}function yn(e){let t=vn(e);if(!he(t))return Re(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_n(t),o=(a?Ie(n.width):n.width)/r,s=(a?Ie(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var bn=Re(0);function xn(e){let t=pe(e);return!Ee()||!t.visualViewport?bn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===pe(e)}function Cn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vn(e),o=Re(1);t&&(r?I(r)&&(o=yn(r)):o=yn(e));let s=Sn(a,n,r)?xn(a):Re(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=pe(a),t=I(r)?pe(r):r,n=e,i=Ne(n);for(;i&&t!==n;){let e=yn(i),t=i.getBoundingClientRect(),r=Oe(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=pe(i),i=Ne(n)}}return ot({width:u,height:d,x:c,y:l})}function wn(e,t){let n=ke(e).scrollLeft;return t?t.left+n:Cn(F(e)).left+n}function Tn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-wn(e,n),y:n.top+t.scrollTop}}function En(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=F(r),s=t?ye(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Re(1),u=Re(0),d=he(r);if((d||!a)&&((fe(r)!==`body`||_e(o))&&(c=ke(r)),d)){let e=Cn(r);l=yn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Tn(o,c):Re(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Dn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function On(e){let t=ke(e),n=e.ownerDocument.body,r=Fe(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Fe(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+wn(e),o=-t.scrollTop;return Oe(n).direction===`rtl`&&(a+=Fe(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var kn=25;function An(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=pe(e),a=F(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ee()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(wn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=kn&&(s-=o)}return{width:s,height:c,x:l,y:u}}function jn(e,t){let n=Cn(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yn(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Mn(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=An(e,n,t);else if(t===`document`)r=On(F(e));else if(I(t))r=jn(t,n);else{let n=xn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ot(r)}function Nn(e,t){let n=t.get(e);if(n)return n;let r=Me(e,[],!1).filter(e=>I(e)&&fe(e)!==`body`),i=null,a=Oe(e).position===`fixed`,o=a?Ae(e):e;for(;I(o)&&!De(o);){let e=Oe(o),t=we(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Ae(o)}return t.set(e,r),r}function Pn(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ye(t)?[]:Nn(t,this._c):[].concat(n),r],o=Mn(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=pe(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Gn(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vn(e),u=i||a?[...l?Me(l):[],...t?Me(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Wn(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Cn(e):null;c&&g();function g(){let t=Cn(e);h&&!Un(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Kn=hn,qn=gn,Jn=fn,Yn=(e,t,n)=>{let r=new Map,i=n??{},a={...Hn,...i.platform,_c:r};return dn(e,t,{...i,platform:a})},Xn=typeof document<`u`?P.useLayoutEffect:function(){};function Zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Zn(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Zn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Qn(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $n(e,t){let n=Qn(e);return Math.round(t*n)/n}function er(e){let t=P.useRef(e);return Xn(()=>{t.current=e}),t}function tr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Zn(f,r)||p(r);let[m,h]=P.useState(null),[g,_]=P.useState(null),v=P.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=P.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=P.useRef(null),C=P.useRef(null),w=P.useRef(u),T=c!=null,E=er(c),ee=er(i),D=er(l),O=P.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),Yn(S.current,C.current,e).then(e=>{let t={...e,isPositioned:D.current!==!1};k.current&&!Zn(w.current,t)&&(w.current=t,on.flushSync(()=>{d(t)}))})},[f,t,n,ee,D]);Xn(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=P.useRef(!1);Xn(()=>(k.current=!0,()=>{k.current=!1}),[]),Xn(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let A=P.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),te=P.useMemo(()=>({reference:b,floating:x}),[b,x]),j=P.useMemo(()=>{let e={position:n,left:0,top:0};if(!te.floating)return e;let t=$n(te.floating,u.x),r=$n(te.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Qn(te.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,te.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:O,refs:A,elements:te,floatingStyles:j}),[u,O,A,te,j])}var nr=(e,t)=>{let n=Kn(e);return{name:n.name,fn:n.fn,options:[e,t]}},rr=(e,t)=>{let n=qn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ir=(e,t)=>{let n=Jn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ar=`data-floating-ui-focusable`,or=`active`,sr=`selected`,cr=`ArrowLeft`,lr=`ArrowRight`,ur=`ArrowUp`,dr=`ArrowDown`,fr=[cr,lr],pr=[ur,dr];[...fr,...pr];var mr={...P},hr=!1,gr=0,_r=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+gr++;function vr(){let[e,t]=P.useState(()=>hr?_r():void 0);return qt(()=>{e??t(_r())},[]),P.useEffect(()=>{hr=!0},[]),e}var yr=mr.useId||vr;function br(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var xr=P.createContext(null),Sr=P.createContext(null),Cr=()=>P.useContext(xr)?.id||null,wr=()=>P.useContext(Sr);function Tr(e){return`data-floating-ui-`+e}function Er(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Dr=Tr(`safe-polygon`);function Or(e,t,n){if(n&&!Kt(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function kr(e){return typeof e==`function`?e():e}function Ar(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=wr(),m=Cr(),h=Yt(l),g=Yt(c),_=Yt(n),v=Yt(d),y=P.useRef(),b=P.useRef(-1),x=P.useRef(),S=P.useRef(-1),C=P.useRef(!0),w=P.useRef(!1),T=P.useRef(()=>{}),E=P.useRef(!1),ee=Zt(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});P.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Er(b),Er(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),P.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){ee()&&r(!1,e,`hover`)}let t=Ht(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,ee]);let D=P.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Or(g.current,`close`,y.current);i&&!x.current?(Er(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Er(b),r(!1,e,n))},[g,r]),O=Zt(()=>{T.current(),x.current=void 0}),k=Zt(()=>{if(w.current){let e=Ht(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Dr),w.current=!1}}),A=Zt(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);P.useEffect(()=>{if(!s)return;function e(e){if(Er(b),C.current=!1,u&&!Kt(y.current)||kr(v.current)>0&&!Or(g.current,`open`))return;let t=Or(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(A()){k();return}T.current();let t=Ht(o.floating);if(Er(S),E.current=!1,h.current&&i.current.floatingContext){n||Er(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){k(),O(),A()||D(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!Rt(o.floating,e.relatedTarget))&&D(e)}function a(e){A()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){k(),O(),A()||D(e)}})(e))}function c(){Er(b)}function l(e){A()||D(e,!1)}if(I(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,D,O,k,r,n,_,p,g,h,i,A,v]),qt(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&ee()){w.current=!0;let e=o.floating;if(I(o.domReference)&&e){var t;let n=Ht(o.floating).body;n.setAttribute(Dr,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,ee]),qt(()=>{n||(y.current=void 0,E.current=!1,O(),k())},[n,O,k]),P.useEffect(()=>()=>{O(),Er(b),Er(S),k()},[s,o.domReference,O,k]);let te=P.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||Kt(y.current))&&(n||kr(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Er(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,kr(v.current)))))}}},[u,r,n,_,v]);return P.useMemo(()=>s?{reference:te}:{},[s,te])}var jr={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},Mr=P.forwardRef(function(e,t){let[n,r]=P.useState();qt(()=>{Ft()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Tr(`focus-guard`)]:``,style:jr};return(0,sn.jsx)(`span`,{...e,...i})}),Nr={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Pr=P.createContext(null),Fr=Tr(`portal`);function Ir(e){e===void 0&&(e={});let{id:t,root:n}=e,r=yr(),i=Rr(),[a,o]=P.useState(null),s=P.useRef(null);return qt(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),qt(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(Fr,``),e.appendChild(n),s.current=n,o(n)},[t,r]),qt(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!me(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(Fr,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function Lr(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=Ir({id:n,root:r}),[o,s]=P.useState(null),c=P.useRef(null),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return P.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&nn(e)&&(e.type===`focusin`?an:rn)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),P.useEffect(()=>{a&&(p||an(a))},[p,a]),(0,sn.jsxs)(Pr.Provider,{value:P.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,sn.jsx)(Mr,{"data-type":`outside`,ref:c,onFocus:e=>{if(nn(e,a)){var t;(t=u.current)==null||t.focus()}else tn(o?o.domReference:null)?.focus()}}),m&&a&&(0,sn.jsx)(`span`,{"aria-owns":a.id,style:Nr}),a&&on.createPortal(t,a),m&&a&&(0,sn.jsx)(Mr,{"data-type":`outside`,ref:l,onFocus:e=>{if(nn(e,a)){var t;(t=d.current)==null||t.focus()}else en(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var Rr=()=>P.useContext(Pr),zr={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Br={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Vr=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Hr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=wr(),g=Zt(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=P.useRef(!1),{escapeKey:y,outsidePress:b}=Vr(p),{escapeKey:x,outsidePress:S}=Vr(m),C=P.useRef(!1),w=Zt(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?Wt(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,Gt(e)?e.nativeEvent:e,`escape-key`)}),T=Zt(e=>{var t;let n=()=>{var t;w(e),(t=zt(e))==null||t.removeEventListener(`keydown`,n)};(t=zt(e))==null||t.addEventListener(`keydown`,n)}),E=Zt(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=zt(e),s=`[`+Tr(`inert`)+`]`,c=Ht(i.floating).querySelectorAll(s),u=I(o)?o:null;for(;u&&!De(u);){let e=Ae(u);if(De(e)||!I(e))break;u=e}if(c.length&&I(o)&&!Vt(o)&&!Rt(o,i.floating)&&Array.from(c).every(e=>!Rt(u,e)))return;if(he(o)&&O){let t=De(o),n=Oe(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&Wt(h.nodesRef.current,d).some(t=>Bt(e,t.context?.elements.floating));if(Bt(e,i.floating)||Bt(e,i.domReference)||f)return;let p=h?Wt(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),ee=Zt(e=>{var t;let n=()=>{var t;E(e),(t=zt(e))==null||t.removeEventListener(l,n)};(t=zt(e))==null||t.addEventListener(l,n)});P.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},Ee()?5:0)}let d=Ht(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?ee:E,S);let p=[];return f&&(I(i.domReference)&&(p=Me(i.domReference)),I(i.floating)&&(p=p.concat(Me(i.floating))),!I(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(Me(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?ee:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,ee]),P.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let D=P.useMemo(()=>({onKeyDown:w,...u&&{[zr[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),O=P.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[Br[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return P.useMemo(()=>o?{reference:D,floating:O}:{},[o,D,O])}function Ur(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=yr(),a=P.useRef({}),[o]=P.useState(()=>br()),s=Cr()!=null,[c,l]=P.useState(r.reference),u=Zt((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=P.useMemo(()=>({setPositionReference:l}),[]),f=P.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return P.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Wr(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=Ur({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=P.useState(null),[l,u]=P.useState(null),d=o?.domReference||s,f=P.useRef(null),p=wr();qt(()=>{d&&(f.current=d)},[d]);let m=tr({...n,elements:{...o,...l&&{reference:l}}}),h=P.useCallback(e=>{let t=I(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=P.useCallback(e=>{(I(e)||e===null)&&(f.current=e,c(e)),(I(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!I(e))&&m.refs.setReference(e)},[m.refs]),_=P.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=P.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=P.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return qt(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),P.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function Gr(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[or]:t,[sr]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[ar]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[or,sr].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Kr(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=P.useCallback(t=>Gr(t,e,`reference`),t),a=P.useCallback(t=>Gr(t,e,`floating`),n),o=P.useCallback(t=>Gr(t,e,`item`),r);return P.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var qr=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Jr(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=yr(),c=r.domReference?.id||s,l=P.useMemo(()=>Ut(r.floating)?.id||i,[r.floating,i]),u=qr.get(o)??o,d=Cr()!=null,f=P.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=P.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=P.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return P.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var Yr=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Xr=(e=>e?Yr(e):Yr),Zr=e=>e;function Qr(e,t=Zr){let n=P.useSyncExternalStore(e.subscribe,P.useCallback(()=>t(e.getState()),[e,t]),P.useCallback(()=>t(e.getInitialState()),[e,t]));return P.useDebugValue(n),n}var $r=e=>{let t=Xr(e),n=e=>Qr(t,e);return Object.assign(n,t),n},ei=(e=>e?$r(e):$r),ti=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ni=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ri=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),ii=e=>{let t=ri(e);return t.charAt(0).toUpperCase()+t.slice(1)},ai={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},oi=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},si=(0,P.createContext)({}),ci=()=>(0,P.useContext)(si),li=(0,P.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ci()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,P.createElement)(`svg`,{ref:c,...ai,width:t??l??ai.width,height:t??l??ai.height,stroke:e??f,strokeWidth:m,className:ti(`lucide`,p,i),...!a&&!oi(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,P.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),L=(e,t)=>{let n=(0,P.forwardRef)(({className:n,...r},i)=>(0,P.createElement)(li,{ref:i,iconNode:t,className:ti(`lucide-${ni(ii(e))}`,`lucide-${e}`,n),...r}));return n.displayName=ii(e),n},ui=L(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),di=L(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),fi=L(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),pi=L(`award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),mi=L(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),hi=L(`brain-circuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),gi=L(`castle`,[[`path`,{d:`M10 5V3`,key:`1y54qe`}],[`path`,{d:`M14 5V3`,key:`m6isi`}],[`path`,{d:`M15 21v-3a3 3 0 0 0-6 0v3`,key:`lbp5hj`}],[`path`,{d:`M18 3v8`,key:`2ollhf`}],[`path`,{d:`M18 5H6`,key:`98imr9`}],[`path`,{d:`M22 11H2`,key:`1lmjae`}],[`path`,{d:`M22 9v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9`,key:`1rly83`}],[`path`,{d:`M6 3v8`,key:`csox7g`}]]),_i=L(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),vi=L(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),yi=L(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),bi=L(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),xi=L(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Si=L(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ci=L(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),wi=L(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]),Ti=L(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),Ei=L(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Di=L(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Oi=L(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ki=L(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),Ai=L(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),ji=L(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),Mi=L(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),Ni=L(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Pi=L(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),R=L(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),z=L(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Fi=L(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ii=L(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Li=L(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),Ri=L(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),zi=L(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),Bi=L(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Vi=L(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Hi=L(`key`,[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]),Ui=L(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Wi=L(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Gi=L(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Ki=L(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),qi=L(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Ji=L(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Yi=L(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),Xi=L(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Zi=L(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Qi=L(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),$i=L(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),ea=L(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),ta=L(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),na=L(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),ra=L(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),ia=L(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),aa=L(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),oa=L(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),sa=L(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),ca=L(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),la=L(`scroll`,[[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),ua=L(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),da=L(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),fa=L(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),pa=L(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ma=L(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ha=L(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ga=L(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),_a=L(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),va=L(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),ya=L(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ba=L(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),xa=L(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Sa=L(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Ca=L(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),wa=L(`trophy`,[[`path`,{d:`M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2`,key:`pwuv1l`}],[`path`,{d:`M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2`,key:`1y54w1`}],[`path`,{d:`M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3`,key:`e30mpu`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3`,key:`i0yafy`}]]),Ta=L(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Ea=L(`volume-x`,[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]),Da=L(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Oa=L(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ka=L(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),Aa=L(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),ja=L(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]);function Ma(e,t,n){return Math.max(t,Math.min(e,n))}var Na={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Pa(e,t,n){return t===0||Math.abs(t)===1/0?e**(n*5):e*t*n/(t+n*e)}function Fa(e,t,n,r=.15){return r===0?Ma(e,t,n):en?+Pa(e-n,n-t,r)+n:e}function Ia(e,[t,n],[r,i]){let[[a,o],[s,c]]=e;return[Fa(t,a,o,r),Fa(n,s,c,i)]}function La(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ra(e){var t=La(e,`string`);return typeof t==`symbol`?t:String(t)}function za(e,t,n){return t=Ra(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ba(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)==null||(r=n.contains)==null?void 0:r.call(n,t.target))})}function Qa(e){return e.type===`touchend`||e.type===`touchcancel`?e.changedTouches:e.targetTouches}function $a(e){return Ya(e)?Qa(e)[0]:e}function eo(e){return Za(e).map(e=>e.identifier)}function to(e){let t=$a(e);return Ya(e)?t.identifier:t.pointerId}function no(e){let t=$a(e);return[t.clientX,t.clientY]}function ro(e){let t={};if(`buttons`in e&&(t.buttons=e.buttons),`shiftKey`in e){let{shiftKey:n,altKey:r,metaKey:i,ctrlKey:a}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:a})}return t}function io(e,...t){return typeof e==`function`?e(...t):e}function ao(){}function oo(...e){return e.length===0?ao:e.length===1?e[0]:function(){let t;for(let n of e)t=n.apply(this,arguments)||t;return t}}function so(e,t){return Object.assign({},t,e||{})}var co=32,lo=class{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){let{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){let t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?io(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){let t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){let e=this.state;e._initial=e._values,e.initial=e.values}compute(e){let{state:t,config:n,shared:r}=this;t.args=this.args;let i=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,ro(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,i=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){let e=t._delta.map(Math.abs);Na.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);let[a,o]=t._movement,[s,c]=n.threshold,{_step:l,values:u}=t;if(n.hasCustomTransform?(l[0]===!1&&(l[0]=Math.abs(a)>=s&&u[0]),l[1]===!1&&(l[1]=Math.abs(o)>=c&&u[1])):(l[0]===!1&&(l[0]=Math.abs(a)>=s&&Math.sign(a)*s),l[1]===!1&&(l[1]=Math.abs(o)>=c&&Math.sign(o)*c)),t.intentional=l[0]!==!1||l[1]!==!1,!t.intentional)return;let d=[0,0];if(n.hasCustomTransform){let[e,t]=u;d[0]=l[0]===!1?0:e-l[0],d[1]=l[1]===!1?0:t-l[1]}else d[0]=l[0]===!1?0:a-l[0],d[1]=l[1]===!1?0:o-l[1];this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);let f=t.offset,p=t._active&&!t._blocked||t.active;p&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&(`bounds`in n&&(t._bounds=io(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));let[m,h]=t.offset,[[g,_],[v,y]]=t._bounds;t.overflow=[m_),hy)],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;let b=t._active&&n.rubberband||[0,0];if(t.offset=Ia(t._bounds,t.offset,b),t.delta=Na.sub(t.offset,f),this.computeMovement(),p&&(!t.last||i>co)){t.delta=Na.sub(t.offset,f);let e=t.delta.map(Math.abs);Na.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&i>0&&(t.velocity=[e[0]/i,e[1]/i],t.timeDelta=i)}}emit(){let e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;let r=this.handler(B(B(B({},t),e),{},{[this.aliasKey]:e.values}));r!==void 0&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}};function uo([e,t],n){let r=Math.abs(e),i=Math.abs(t);if(r>i&&r>n)return`x`;if(i>r&&i>n)return`y`}var fo=class extends lo{constructor(...e){super(...e),za(this,`aliasKey`,`xy`)}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Na.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Na.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){let t=this.state,n=this.config;if(!t.axis&&e){let r=typeof n.axisThreshold==`object`?n.axisThreshold[Xa(e)]:n.axisThreshold;t.axis=uo(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case`x`:e[1]=0;break;case`y`:e[0]=0}}},V=e=>e,H=.15,po={enabled(e=!0){return e},eventOptions(e,t,n){return B(B({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[H,H];case!1:return[0,0];default:return Na.toVector(e)}},from(e){if(typeof e==`function`)return e;if(e!=null)return Na.toVector(e)},transform(e,t,n){let r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||V},threshold(e){return Na.toVector(e,0)}},mo=0,ho=B(B({},po),{},{axis(e,t,{axis:n}){if(this.lockDirection=n===`lock`,!this.lockDirection)return n},axisThreshold(e=mo){return e},bounds(e={}){if(typeof e==`function`)return t=>ho.bounds(e(t));if(`current`in e)return()=>e.current;if(typeof HTMLElement==`function`&&e instanceof HTMLElement)return e;let{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),go={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]},_o=class extends fo{constructor(...e){super(...e),za(this,`ingKey`,`dragging`)}reset(){super.reset();let e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){let e=this.state;if(e._bounds instanceof HTMLElement){let t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=ho.bounds(r)}}cancel(){let e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){let t=this.config,n=this.state;if(e.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):t.pointerButtons!==-1&&t.pointerButtons!==e.buttons))return;let r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(r&&r.size>1&&n._pointerActive)&&(this.start(e),this.setupPointer(e),n._pointerId=to(e),n._pointerActive=!0,this.computeValues(no(e)),this.computeInitial(),t.preventScrollAxis&&Xa(e)!==`mouse`?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){let t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){let t=this.state,n=this.config;if(!t._pointerActive)return;let r=to(e);if(t._pointerId!==void 0&&r!==t._pointerId)return;let i=no(e);if(document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=Na.sub(i,t._values),this.computeValues(i)),Na.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional){this.timeoutStore.remove(`dragDelay`),t.active=!1,this.startPointerDrag(e);return}if(n.preventScrollAxis&&!t._preventScroll){if(t.axis){if(t.axis===n.preventScrollAxis||n.preventScrollAxis===`xy`){t._active=!1,this.clean();return}this.timeoutStore.remove(`startPointerDrag`),this.startPointerDrag(e);return}return}this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}let t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;let r=to(e);if(t._pointerId!==void 0&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);let[i,a]=t._distance;if(t.tap=i<=n.tapsThreshold&&a<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{let[e,r]=t._delta,[i,a]=t._movement,[o,s]=n.swipe.velocity,[c,l]=n.swipe.distance,u=n.swipe.duration;if(t.elapsedTimeo&&Math.abs(i)>c&&(t.swipe[0]=Math.sign(e)),u>s&&Math.abs(a)>l&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){let t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,`change`,this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,`end`,this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,`cancel`,this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,vo(e);let t=this.eventStore.add(this.sharedConfig.window,`touch`,`change`,this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,`touch`,`end`,t),this.eventStore.add(this.sharedConfig.window,`touch`,`cancel`,t),this.timeoutStore.add(`startPointerDrag`,this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add(`dragDelay`,()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){let t=go[e.key];if(t){let n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,Na.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in go&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){let t=this.config.device;e(t,`start`,this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,`change`,this.pointerMove.bind(this)),e(t,`end`,this.pointerUp.bind(this)),e(t,`cancel`,this.pointerUp.bind(this)),e(`lostPointerCapture`,``,this.pointerUp.bind(this))),this.config.keys&&(e(`key`,`down`,this.keyDown.bind(this)),e(`key`,`up`,this.keyUp.bind(this))),this.config.filterTaps&&e(`click`,``,this.pointerClick.bind(this),{capture:!0,passive:!1})}};function vo(e){`persist`in e&&typeof e.persist==`function`&&e.persist()}var yo=typeof window<`u`&&window.document&&window.document.createElement;function bo(){return yo&&`ontouchstart`in window}function U(){return bo()||yo&&window.navigator.maxTouchPoints>1}function xo(){return yo&&`onpointerdown`in window}function So(){return yo&&`exitPointerLock`in window.document}function Co(){try{return`constructor`in GestureEvent}catch{return!1}}var wo={isBrowser:yo,gesture:Co(),touch:bo(),touchscreen:U(),pointer:xo(),pointerLock:So()},To=250,Eo=180,Do=.5,Oo=50,ko=250,Ao=10,jo={mouse:0,touch:0,pen:8},Mo=B(B({},ho),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&wo.pointerLock,wo.touch&&n?`touch`:this.pointerLock?`mouse`:wo.pointer&&!i?`pointer`:wo.touch?`touch`:`mouse`},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n==`number`?n:n||n===void 0&&e?To:void 0,wo.touchscreen&&n!==!1)return e||(n===void 0?void 0:`y`)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&this.device===`pointer`&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:i=void 0}){let a=Na.toVector(e,n?r:+!!i);return this.filterTaps=n,this.tapsThreshold=r,a},swipe({velocity:e=Do,distance:t=Oo,duration:n=ko}={}){return{velocity:this.transform(Na.toVector(e)),distance:this.transform(Na.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return Eo;case!1:return 0;default:return e}},axisThreshold(e){return e?B(B({},jo),e):jo},keyboardDisplacement(e=Ao){return e}});B(B({},po),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!wo.touch&&wo.gesture)return`gesture`;if(wo.touch&&r)return`touch`;if(wo.touchscreen){if(wo.pointer)return`pointer`;if(wo.touch)return`touch`}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){let i=e=>{let t=so(io(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},a=e=>{let t=so(io(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return typeof n!=`function`&&typeof r!=`function`?[i(),a()]:e=>[i(e),a(e)]},threshold(e,t,n){return this.lockDirection=n.axis===`lock`,Na.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?`ctrlKey`:e},pinchOnWheel(e=!0){return e}}),B(B({},ho),{},{mouseOnly:(e=!0)=>e}),B(B({},ho),{},{mouseOnly:(e=!0)=>e});var No=new Map,Po=new Map;function Fo(e){No.set(e.key,e.engine),Po.set(e.key,e.resolver)}var Io={key:`drag`,engine:_o,resolver:Mo};function Lo(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a=0)&&(n[i]=e[i]);return n}function Ro(e,t){if(e==null)return{};var n=Lo(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var zo={target(e){if(e)return()=>`current`in e?e.current:e},enabled(e=!0){return e},window(e=wo.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},Bo=[`target`,`eventOptions`,`window`,`enabled`,`transform`];function Vo(e={},t){let n={};for(let[r,i]of Object.entries(t))switch(typeof i){case`function`:n[r]=i.call(n,e[r],r,e);break;case`object`:n[r]=Vo(e[r],i);break;case`boolean`:i&&(n[r]=e[r])}return n}function Ho(e,t,n={}){let r=e,{target:i,eventOptions:a,window:o,enabled:s,transform:c}=r,l=Ro(r,Bo);if(n.shared=Vo({target:i,eventOptions:a,window:o,enabled:s,transform:c},zo),t){let e=Po.get(t);n[t]=Vo(B({shared:n.shared},l),e)}else for(let e in l){let t=Po.get(e);t&&(n[e]=Vo(B({shared:n.shared},l[e]),t))}return n}var Uo=class{constructor(e,t){za(this,`_listeners`,new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,i){let a=this._listeners,o=Ja(t,n),s=B(B({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),i);e.addEventListener(o,r,s);let c=()=>{e.removeEventListener(o,r,s),a.delete(c)};return a.add(c),c}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}},Wo=class{constructor(){za(this,`_timeouts`,new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){let t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}},Go=class{constructor(e){za(this,`gestures`,new Set),za(this,`_targetEventStore`,new Uo(this)),za(this,`gestureEventStores`,{}),za(this,`gestureTimeoutStores`,{}),za(this,`handlers`,{}),za(this,`config`,{}),za(this,`pointerIds`,new Set),za(this,`touchIds`,new Set),za(this,`state`,{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),qo(this,e)}setEventIds(e){if(Ya(e))return this.touchIds=new Set(eo(e)),this.touchIds;if(`pointerId`in e)return e.type===`pointerup`||e.type===`pointercancel`?this.pointerIds.delete(e.pointerId):e.type===`pointerdown`&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=Ho(e,t,this.config)}clean(){this._targetEventStore.clean();for(let e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){let t=this.config.shared,n={},r;if(!(t.target&&(r=t.target(),!r))){if(t.enabled){for(let t of this.gestures){let i=this.config[t],a=Jo(n,i.eventOptions,!!r);i.enabled&&new(No.get(t))(this,e,t).bind(a)}let i=Jo(n,t.eventOptions,!!r);for(let t in this.nativeHandlers)i(t,``,n=>this.nativeHandlers[t](B(B({},this.state.shared),{},{event:n,args:e})),void 0,!0)}for(let e in n)n[e]=oo(...n[e]);if(!r)return n;for(let e in n){let{device:t,capture:i,passive:a}=qa(e);this._targetEventStore.add(r,t,``,n[e],{capture:i,passive:a})}}}};function Ko(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Uo(e,t),e.gestureTimeoutStores[t]=new Wo}function qo(e,t){t.drag&&Ko(e,`drag`),t.wheel&&Ko(e,`wheel`),t.scroll&&Ko(e,`scroll`),t.move&&Ko(e,`move`),t.pinch&&Ko(e,`pinch`),t.hover&&Ko(e,`hover`)}var Jo=(e,t,n)=>(r,i,a,o={},s=!1)=>{let c=o.capture??t.capture,l=o.passive??t.passive,u=s?r:Ga(r,i,c);n&&l&&(u+=`Passive`),e[u]=e[u]||[],e[u].push(a)};function Yo(e,t={},n,r){let i=P.useMemo(()=>new Go(e),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),P.useEffect(i.effect.bind(i)),P.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function Xo(e,t){return Fo(Io),Yo({drag:e},t||{},`drag`)}function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),rs=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},is=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},as=null,os=()=>typeof window>`u`?new is:(as||=new is,as),ss=d.theme({"& .cm-scroller":{height:`100% !important`}}),cs=null,ls=null;function us(e,t,n,r,i,a){if(!e&&!t&&!n&&!r&&!i&&!a)return null;var o=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a});return o===cs?ls:(cs=o,ls=d.theme({"&":{height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a}}),ls)}var ds=u.define(),fs=200,ps=[];function ms(e){var t=e.value,n=e.selection,r=e.onChange,i=e.onStatistics,s=e.onCreateEditor,c=e.onUpdate,l=e.extensions,u=l===void 0?ps:l,f=e.autoFocus,p=e.theme,m=p===void 0?`light`:p,h=e.height,g=h===void 0?null:h,_=e.minHeight,v=_===void 0?null:_,y=e.maxHeight,b=y===void 0?null:y,x=e.width,S=x===void 0?null:x,C=e.minWidth,w=C===void 0?null:C,T=e.maxWidth,E=T===void 0?null:T,ee=e.placeholder,D=ee===void 0?``:ee,O=e.editable,k=O===void 0||O,A=e.readOnly,te=A!==void 0&&A,j=e.indentWithTab,M=j===void 0||j,ne=e.basicSetup,re=ne===void 0||ne,ie=e.root,ae=e.initialState,oe=(0,P.useState)(),se=oe[0],ce=oe[1],le=(0,P.useState)(),N=le[0],ue=le[1],de=(0,P.useState)(),fe=de[0],pe=de[1],F=(0,P.useState)(()=>({current:null}))[0],me=(0,P.useState)(()=>({current:null}))[0],I=us(g,v,b,S,w,E),he=d.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(ds))&&(F.current?F.current.reset():(F.current=new rs(()=>{if(me.current){var e=me.current;me.current=null,e()}F.current=null},fs),os().add(F.current)),r(e.state.doc.toString(),e)),i&&i(ns(e))}),ge=ts({theme:m,editable:k,readOnly:te,placeholder:D,indentWithTab:M,basicSetup:re}),_e=[he,...I?[I]:[],ss,...ge];return c&&typeof c==`function`&&_e.push(d.updateListener.of(c)),_e=_e.concat(u),(0,P.useLayoutEffect)(()=>{if(se&&!fe){var e={doc:t,selection:n,extensions:_e},r=ae?a.fromJSON(ae.json,e,ae.fields):a.create(e);if(pe(r),!N){var i=new d({state:r,parent:se,root:ie});ue(i),s&&s(i,r)}}return()=>{N&&(pe(void 0),ue(void 0))}},[se,fe]),(0,P.useEffect)(()=>{e.container&&ce(e.container)},[e.container]),(0,P.useEffect)(()=>()=>{N&&(N.destroy(),ue(void 0)),F.current&&=(F.current.cancel(),null)},[N]),(0,P.useEffect)(()=>{f&&N&&N.focus()},[f,N]),(0,P.useEffect)(()=>{N&&N.dispatch({effects:o.reconfigure.of(_e)})},[m,u,g,v,b,S,w,E,D,k,te,M,re,r,c]),(0,P.useEffect)(()=>{if(t!==void 0){var e=N?N.state.doc.toString():``;if(N&&t!==e){var n=F.current&&!F.current.isDone,r=()=>{N&&t!==N.state.doc.toString()&&N.dispatch({changes:{from:0,to:N.state.doc.toString().length,insert:t||``},annotations:[ds.of(!0)]})};n?me.current=r:r()}}},[t,N]),{state:fe,setState:pe,view:N,setView:ue,container:se,setContainer:ce}}var hs=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],gs=(0,P.forwardRef)((e,t)=>{var n=e.className,r=e.value,i=r===void 0?``:r,a=e.selection,o=e.extensions,s=o===void 0?[]:o,c=e.onChange,l=e.onStatistics,u=e.onCreateEditor,d=e.onUpdate,f=e.autoFocus,p=e.theme,m=p===void 0?`light`:p,h=e.height,g=e.minHeight,_=e.maxHeight,v=e.width,y=e.minWidth,b=e.maxWidth,x=e.basicSetup,S=e.placeholder,C=e.indentWithTab,w=e.editable,T=e.readOnly,E=e.root,ee=e.initialState,D=Qo(e,hs),O=(0,P.useRef)(null),k=ms({root:E,value:i,autoFocus:f,theme:m,height:h,minHeight:g,maxHeight:_,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:S,indentWithTab:C,editable:w,readOnly:T,selection:a,onChange:c,onStatistics:l,onCreateEditor:u,onUpdate:d,extensions:s,initialState:ee}),A=k.state,te=k.view,j=k.container,M=k.setContainer;(0,P.useImperativeHandle)(t,()=>({editor:O.current,state:A,view:te}),[O,j,A,te]);var ne=(0,P.useCallback)(e=>{O.current=e,M(e)},[M]);if(typeof i!=`string`)throw Error(`value must be typeof string but got `+typeof i);var re=typeof m==`string`?`cm-theme-`+m:`cm-theme`;return(0,sn.jsx)(`div`,Zo({ref:ne,className:``+re+(n?` `+n:``)},D))});gs.displayName=`CodeMirror`;export{Fi as $,ia as A,Wr as At,Ji as B,re as Bt,da as C,pi as Ct,sa as D,ei as Dt,ca as E,ui as Et,$i as F,nr as Ft,Ui as G,Ki as H,Qi as I,rr as It,Bi as J,Hi as K,Zi as L,Gn as Lt,na as M,Kr as Mt,ta as N,Jr as Nt,oa as O,Lr as Ot,ea as P,ir as Pt,Ii as Q,Xi as R,ue as Rt,fa as S,mi as St,la as T,di as Tt,Gi as U,qi as V,Wi as W,Ri as X,zi as Y,Li as Z,_a as _,yi as _t,ka as a,ji as at,ma as b,gi as bt,Ea as c,Oi as ct,Ca as d,Ti as dt,z as et,Sa as f,wi as ft,va as g,bi as gt,ya as h,xi as ht,Aa as i,Mi as it,ra as j,Ar as jt,aa as k,Hr as kt,Ta as l,Di as lt,ba as m,Si as mt,Xo as n,Pi as nt,Oa as o,Ai as ot,xa as p,Ci as pt,Vi as q,ja as r,Ni as rt,Da as s,ki as st,gs as t,R as tt,wa as u,Ei as ut,ga as v,vi as vt,ua as w,fi as wt,pa as x,hi as xt,ha as y,_i as yt,Yi as z,le as zt}; \ No newline at end of file diff --git a/algospaced-ui/dist/assets/vendor-react-hnaVBnLv.js b/algospaced-ui/dist/assets/vendor-react-hnaVBnLv.js new file mode 100644 index 0000000000000000000000000000000000000000..41f9ca9568e1186a1b9fbdcb8d71521e9d605d94 --- /dev/null +++ b/algospaced-ui/dist/assets/vendor-react-hnaVBnLv.js @@ -0,0 +1,9 @@ +import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{A as n,D as r,E as i,F as a,L as o,M as s,N as c,O as l,P as u,S as d,T as f,_ as p,a as m,b as h,c as g,d as _,f as v,g as y,h as b,i as x,j as S,k as C,l as w,m as T,n as E,o as ee,p as D,r as O,s as te,u as ne,v as re,w as k,y as A}from"./vendor-codemirror-By0wlJeM.js";var ie=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=ie()})),oe=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=ee,D=function(){te.postMessage(null)}}else D=function(){_(ee,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),se=t(((e,t)=>{t.exports=oe()})),ce=t((e=>{var t=ae();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ce()})),ue=t((e=>{var t=se(),n=ae(),r=le();function i(e){var t=`https://react.dev/errors/`+e;if(1ce||(e.current=oe[ce],oe[ce]=null,ce--)}function j(e,t){ce++,oe[ce]=e.current,e.current=t}var fe=ue(null),M=ue(null),pe=ue(null),me=ue(null);function he(e,t){switch(j(pe,t),j(M,e),j(fe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}de(fe),j(fe,e)}function N(){de(fe),de(M),de(pe)}function ge(e){e.memoizedState!==null&&j(me,e);var t=fe.current,n=Hd(t,e.type);t!==n&&(j(M,e),j(fe,n))}function P(e){M.current===e&&(de(fe),de(M)),me.current===e&&(de(me),Qf._currentValue=ie)}var _e,ve;function ye(e){if(_e===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||``,ve=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{be=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ye(n):``}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye(`Lazy`);case 13:return e.child!==t&&t!==null?ye(`Suspense Fallback`):ye(`Suspense`);case 19:return ye(`SuspenseList`);case 0:case 15:return xe(e.type,!1);case 11:return xe(e.type.render,!1);case 1:return xe(e.type,!0);case 31:return ye(`Activity`);default:return``}}function Ce(e){try{var t=``,n=null;do t+=Se(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var we=Object.prototype.hasOwnProperty,Te=t.unstable_scheduleCallback,Ee=t.unstable_cancelCallback,De=t.unstable_shouldYield,Oe=t.unstable_requestPaint,ke=t.unstable_now,Ae=t.unstable_getCurrentPriorityLevel,je=t.unstable_ImmediatePriority,Me=t.unstable_UserBlockingPriority,Ne=t.unstable_NormalPriority,Pe=t.unstable_LowPriority,Fe=t.unstable_IdlePriority,Ie=t.log,Le=t.unstable_setDisableYieldValue,Re=null,ze=null;function Be(e){if(typeof Ie==`function`&&Le(e),ze&&typeof ze.setStrictMode==`function`)try{ze.setStrictMode(Re,e)}catch{}}var Ve=Math.clz32?Math.clz32:We,He=Math.log,Ue=Math.LN2;function We(e){return e>>>=0,e===0?32:31-(He(e)/Ue|0)|0}var Ge=256,Ke=262144,qe=4194304;function Je(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ye(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Je(n))):i=Je(o):i=Je(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Je(n))):i=Je(o)):i=Je(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qe(){var e=qe;return qe<<=1,!(qe&62914560)&&(qe=4194304),e}function $e(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function et(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.textContent,a=i.length;for(e=0;e=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,ir=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bt(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Nr=pn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==Bt(r)||(r=Pr,`selectionStart`in r&&Mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ir&&Dr(Ir,r)||(Ir=r,r=Ed(Fr,`onSelect`),0>=o,i-=o,ki=1<<32-Ve(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),L&&ji(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),L&&ji(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return L&&ji(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),L&&ji(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Aa(o),x(e,r,o,c)}if(re(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ia(o),c);if(o.$$typeof===b)return x(e,r,ia(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=x(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=F(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function R(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=li(e),ci(e,null,n),t}return ai(e,r,t,n),li(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rt(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ha;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(J&p)===p:(r&p)===p){p!==0&&p===ma&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ha=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=k.T,s={};k.T=s,Fs(e,!1,t,n);try{var c=i(),l=k.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,va(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{A.p=a,o!==null&&s.types!==null&&(o.types=s.types),k.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,ie,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return ra(Qf)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=R(n);var r=Ga(t,e,n);r!==null&&(hu(r,t,n),Ka(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=oi(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,o))return ai(e,t,i,0),K===null&&ii(),!1}catch{}if(n=oi(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=oi(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===B||t!==null&&t===B}function Ls(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rt(e,n)}}var zs={readContext:ra,use:Po,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H};zs.useEffectEvent=H;var Bs={readContext:ra,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(_o){Be(!0);try{e()}finally{Be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(_o){Be(!0);try{n(t)}finally{Be(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,B,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=Ao();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),K===null)throw Error(i(349));J&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=K.identifierPrefix;if(L){var n=Ai,r=ki;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ut]=t,o[dt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=pe.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ut]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Bi(t,!0)}else e=Bd(e).createTextNode(r),e[ut]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ut]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(i(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ut]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return N(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return Zi(t.type),U(t),null;case 19:if(de(z),r=t.memoizedState,r===null)return U(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return j(z,z.current&1|2),L&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ke()>tu&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!L)return U(t),null}else 2*ke()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ke(),e.sibling=null,n=z.current,j(z,a?n&1|2:n&1),L&&ji(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&de(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),U(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),N(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return P(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(z),null;case 4:return N(),null;case 10:return Zi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&de(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function Vc(e,t){switch(Pi(t),t.tag){case 3:Zi(la),N();break;case 26:case 27:case 5:P(t);break;case 4:N();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:de(z);break;case 10:Zi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&de(ba);break;case 24:Zi(la)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[dt]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ut]=e,t[dt]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=jr(e),Mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Pd(o,r,n),o[ut]=e,Ct(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=kr(s,h),v=kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,k.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(i(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),ze&&typeof ze.onPostCommitFiberRoot==`function`)try{ze.onPostCommitFiberRoot(Re,o)}catch{}return!0}finally{A.p=a,k.T=r,Vu(e,t)}}function Wu(e,t,n){t=xi(n,t),t=$s(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(et(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=xi(n,e),n=ec(2),r=Ga(t,n,2),r!==null&&(tc(n,r,t,e),et(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>ke()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Qe()),e=si(e,t),e!==null&&(et(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Te(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ve(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Ye(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Xe(r,a)||(n=!0,ld(r,a))}r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=ke(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Ct(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=St(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Ct(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=pe.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=St(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=St(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=St(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Ht(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Ct(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ht(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,Ct(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ct(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Ct(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Ct(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ct(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ct(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ue()})),j=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),fe=t(((e,t)=>{t.exports=j()})),M=e(ae(),1);function pe(){return typeof window<`u`}function me(e){return ge(e)?(e.nodeName||``).toLowerCase():`#document`}function he(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function N(e){return((ge(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ge(e){return pe()?e instanceof Node||e instanceof he(e).Node:!1}function P(e){return pe()?e instanceof Element||e instanceof he(e).Element:!1}function _e(e){return pe()?e instanceof HTMLElement||e instanceof he(e).HTMLElement:!1}function ve(e){return!pe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof he(e).ShadowRoot}function ye(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function be(e){return/^(table|td|th)$/.test(me(e))}function xe(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Se=/transform|translate|scale|rotate|perspective|filter/,Ce=/paint|layout|strict|content/,we=e=>!!e&&e!==`none`,Te;function Ee(e){let t=P(e)?Ae(e):e;return we(t.transform)||we(t.translate)||we(t.scale)||we(t.rotate)||we(t.perspective)||!Oe()&&(we(t.backdropFilter)||we(t.filter))||Se.test(t.willChange||``)||Ce.test(t.contain||``)}function De(e){let t=Me(e);for(;_e(t)&&!ke(t);){if(Ee(t))return t;if(xe(t))return null;t=Me(t)}return null}function Oe(){return Te??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Te}function ke(e){return/^(html|body|#document)$/.test(me(e))}function Ae(e){return he(e).getComputedStyle(e)}function je(e){return P(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(me(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ve(e)&&e.host||N(e);return ve(t)?t.host:t}function Ne(e){let t=Me(e);return ke(t)?(e.ownerDocument||e).body:_e(t)&&ye(t)?t:Ne(t)}function Pe(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ne(e),i=r===e.ownerDocument?.body,a=he(r);if(i){let e=Fe(a);return t.concat(a,a.visualViewport||[],ye(r)?r:[],e&&n?Pe(e):[])}return t.concat(r,Pe(r,[],n))}function Fe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ie=Math.min,Le=Math.max,Re=Math.round,ze=Math.floor,Be=e=>({x:e,y:e}),Ve={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function He(e,t,n){return Le(e,Ie(t,n))}function Ue(e,t){return typeof e==`function`?e(t):e}function We(e){return e.split(`-`)[0]}function Ge(e){return e.split(`-`)[1]}function Ke(e){return e===`x`?`y`:`x`}function qe(e){return e===`y`?`height`:`width`}function Je(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ye(e){return Ke(Je(e))}function Xe(e,t,n){n===void 0&&(n=!1);let r=Ge(e),i=Ye(e),a=qe(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=at(o)),[o,at(o)]}function Ze(e){let t=at(e);return[Qe(e),t,Qe(t)]}function Qe(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var $e=[`left`,`right`],et=[`right`,`left`],tt=[`top`,`bottom`],nt=[`bottom`,`top`];function rt(e,t,n){switch(e){case`top`:case`bottom`:return n?t?et:$e:t?$e:et;case`left`:case`right`:return t?tt:nt;default:return[]}}function it(e,t,n,r){let i=Ge(e),a=rt(We(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Qe)))),a}function at(e){let t=We(e);return Ve[t]+e.slice(t.length)}function ot(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function st(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ot(e)}function ct(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var lt=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[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] *)`].join(`,`),ut=typeof Element>`u`,dt=ut?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ft=!ut&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},pt=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):pt(e.parentNode))},mt=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},ht=function(e,t,n){if(pt(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(lt));return t&&dt.call(e,lt)&&r.unshift(e),r=r.filter(n),r},gt=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!pt(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=gt(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{dt.call(a,lt)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!pt(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=gt(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},_t=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},vt=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||mt(e))&&!_t(e)?0:e.tabIndex},yt=function(e,t){var n=vt(e);return n<0&&t&&!_t(e)?0:n},bt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName===`INPUT`},St=function(e){return xt(e)&&e.type===`hidden`},Ct=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},wt=function(e,t){for(var n=0;nsummary:first-of-type`)?e.parentElement:e;if(dt.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=ft(e);if(s&&!s.shadowRoot&&r(s)===!0)return kt(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(Ot(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return kt(e);return!1},jt=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n=0)},Ft=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=yt(a,i),s=i?Ft(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(bt).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},It=function(e,t){return t||={},Ft(t.getShadowRoot?gt([e],t.includeContainer,{filter:Nt.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Pt}):ht(e,t.includeContainer,Nt.bind(null,t)))};function Lt(){return/apple/i.test(navigator.vendor)}var Rt=`data-floating-ui-focusable`;function zt(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Bt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ve(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Vt(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ht(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ut(e){return e.matches(`html,body`)}function Wt(e){return e?.ownerDocument||document}function Gt(e){return e?e.hasAttribute(Rt)?e:e.querySelector(`[`+Rt+`]`)||e:null}function Kt(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Kt(e,t.id,n)])}function qt(e){return`nativeEvent`in e}function Jt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Yt=typeof document<`u`?M.useLayoutEffect:function(){},Xt={...M};function Zt(e){let t=M.useRef(e);return Yt(()=>{t.current=e}),t}var Qt=Xt.useInsertionEffect||(e=>e());function $t(e){let t=M.useRef(()=>{});return Qt(()=>{t.current=e}),M.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var en=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function tn(e,t){let n=It(e,en()),r=n.length;if(r===0)return;let i=zt(Wt(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function nn(e){return tn(Wt(e).body,1)||e}function rn(e){return tn(Wt(e).body,-1)||e}function an(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Bt(n,r)}function on(e){It(e,en()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function sn(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var cn=e(le(),1),ln=fe();function un(e,t,n){let{reference:r,floating:i}=e,a=Je(t),o=Ye(t),s=qe(o),c=We(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ge(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function dn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ue(t,e),p=st(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ct(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ct(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var fn=50,pn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:dn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=un(l,r,c),f=r,p=0,m={};for(let n=0;ne<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Je(t)||T.every(e=>Je(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Je(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},hn=new Set([`left`,`top`]);async function gn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=We(n),s=Ge(n),c=Je(n)===`y`,l=hn.has(o)?-1:1,u=a&&c?-1:1,d=Ue(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var _n=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await gn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},vn=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ue(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Je(i),p=Ke(f),m=u[p],h=u[f],g=(e,t)=>He(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function yn(e){let t=Ae(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=_e(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Re(n)!==a||Re(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bn(e){return P(e)?e:e.contextElement}function xn(e){let t=bn(e);if(!_e(t))return Be(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yn(t),o=(a?Re(n.width):n.width)/r,s=(a?Re(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Sn=Be(0);function Cn(e){let t=he(e);return!Oe()||!t.visualViewport?Sn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===he(e)}function Tn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bn(e),o=Be(1);t&&(r?P(r)&&(o=xn(r)):o=xn(e));let s=wn(a,n,r)?Cn(a):Be(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=he(a),t=P(r)?he(r):r,n=e,i=Fe(n);for(;i&&t!==n;){let e=xn(i),t=i.getBoundingClientRect(),r=Ae(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=he(i),i=Fe(n)}}return ct({width:u,height:d,x:c,y:l})}function En(e,t){let n=je(e).scrollLeft;return t?t.left+n:Tn(N(e)).left+n}function Dn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-En(e,n),y:n.top+t.scrollTop}}function On(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=N(r),s=t?xe(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Be(1),u=Be(0),d=_e(r);if((d||!a)&&((me(r)!==`body`||ye(o))&&(c=je(r)),d)){let e=Tn(r);l=xn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Dn(o,c):Be(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function kn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function An(e){let t=je(e),n=e.ownerDocument.body,r=Le(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Le(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+En(e),o=-t.scrollTop;return Ae(n).direction===`rtl`&&(a+=Le(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var jn=25;function Mn(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=he(e),a=N(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Oe()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(En(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=jn&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Nn(e,t){let n=Tn(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xn(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pn(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Mn(e,n,t);else if(t===`document`)r=An(N(e));else if(P(t))r=Nn(t,n);else{let n=Cn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ct(r)}function Fn(e,t){let n=t.get(e);if(n)return n;let r=Pe(e,[],!1).filter(e=>P(e)&&me(e)!==`body`),i=null,a=Ae(e).position===`fixed`,o=a?Me(e):e;for(;P(o)&&!ke(o);){let e=Ae(o),t=Ee(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Me(o)}return t.set(e,r),r}function In(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?xe(t)?[]:Fn(t,this._c):[].concat(n),r],o=Pn(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=he(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function qn(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bn(e),u=i||a?[...l?Pe(l):[],...t?Pe(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Kn(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Tn(e):null;c&&g();function g(){let t=Tn(e);h&&!Gn(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Jn=_n,Yn=vn,Xn=mn,Zn=(e,t,n)=>{let r=new Map,i=n??{},a={...Wn,...i.platform,_c:r};return pn(e,t,{...i,platform:a})},Qn=typeof document<`u`?M.useLayoutEffect:function(){};function $n(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!$n(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!$n(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function er(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tr(e,t){let n=er(e);return Math.round(t*n)/n}function nr(e){let t=M.useRef(e);return Qn(()=>{t.current=e}),t}function rr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=M.useState(r);$n(f,r)||p(r);let[m,h]=M.useState(null),[g,_]=M.useState(null),v=M.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=M.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=M.useRef(null),C=M.useRef(null),w=M.useRef(u),T=c!=null,E=nr(c),ee=nr(i),D=nr(l),O=M.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),Zn(S.current,C.current,e).then(e=>{let t={...e,isPositioned:D.current!==!1};te.current&&!$n(w.current,t)&&(w.current=t,cn.flushSync(()=>{d(t)}))})},[f,t,n,ee,D]);Qn(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=M.useRef(!1);Qn(()=>(te.current=!0,()=>{te.current=!1}),[]),Qn(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let ne=M.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),re=M.useMemo(()=>({reference:b,floating:x}),[b,x]),k=M.useMemo(()=>{let e={position:n,left:0,top:0};if(!re.floating)return e;let t=tr(re.floating,u.x),r=tr(re.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...er(re.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,re.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:O,refs:ne,elements:re,floatingStyles:k}),[u,O,ne,re,k])}var ir=(e,t)=>{let n=Jn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ar=(e,t)=>{let n=Yn(e);return{name:n.name,fn:n.fn,options:[e,t]}},or=(e,t)=>{let n=Xn(e);return{name:n.name,fn:n.fn,options:[e,t]}},sr=`data-floating-ui-focusable`,cr=`active`,lr=`selected`,ur=`ArrowLeft`,dr=`ArrowRight`,fr=`ArrowUp`,pr=`ArrowDown`,mr=[ur,dr],hr=[fr,pr];[...mr,...hr];var gr={...M},_r=!1,vr=0,yr=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+vr++;function br(){let[e,t]=M.useState(()=>_r?yr():void 0);return Yt(()=>{e??t(yr())},[]),M.useEffect(()=>{_r=!0},[]),e}var xr=gr.useId||br;function Sr(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Cr=M.createContext(null),wr=M.createContext(null),Tr=()=>M.useContext(Cr)?.id||null,Er=()=>M.useContext(wr);function Dr(e){return`data-floating-ui-`+e}function Or(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var kr=Dr(`safe-polygon`);function Ar(e,t,n){if(n&&!Jt(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function jr(e){return typeof e==`function`?e():e}function Mr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Er(),m=Tr(),h=Zt(l),g=Zt(c),_=Zt(n),v=Zt(d),y=M.useRef(),b=M.useRef(-1),x=M.useRef(),S=M.useRef(-1),C=M.useRef(!0),w=M.useRef(!1),T=M.useRef(()=>{}),E=M.useRef(!1),ee=$t(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});M.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Or(b),Or(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),M.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){ee()&&r(!1,e,`hover`)}let t=Wt(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,ee]);let D=M.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Ar(g.current,`close`,y.current);i&&!x.current?(Or(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Or(b),r(!1,e,n))},[g,r]),O=$t(()=>{T.current(),x.current=void 0}),te=$t(()=>{if(w.current){let e=Wt(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(kr),w.current=!1}}),ne=$t(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);M.useEffect(()=>{if(!s)return;function e(e){if(Or(b),C.current=!1,u&&!Jt(y.current)||jr(v.current)>0&&!Ar(g.current,`open`))return;let t=Ar(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(ne()){te();return}T.current();let t=Wt(o.floating);if(Or(S),E.current=!1,h.current&&i.current.floatingContext){n||Or(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){te(),O(),ne()||D(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!Bt(o.floating,e.relatedTarget))&&D(e)}function a(e){ne()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){te(),O(),ne()||D(e)}})(e))}function c(){Or(b)}function l(e){ne()||D(e,!1)}if(P(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,D,O,te,r,n,_,p,g,h,i,ne,v]),Yt(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&ee()){w.current=!0;let e=o.floating;if(P(o.domReference)&&e){var t;let n=Wt(o.floating).body;n.setAttribute(kr,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,ee]),Yt(()=>{n||(y.current=void 0,E.current=!1,O(),te())},[n,O,te]),M.useEffect(()=>()=>{O(),Or(b),Or(S),te()},[s,o.domReference,O,te]);let re=M.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||Jt(y.current))&&(n||jr(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Or(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,jr(v.current)))))}}},[u,r,n,_,v]);return M.useMemo(()=>s?{reference:re}:{},[s,re])}var Nr={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},Pr=M.forwardRef(function(e,t){let[n,r]=M.useState();Yt(()=>{Lt()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Dr(`focus-guard`)]:``,style:Nr};return(0,ln.jsx)(`span`,{...e,...i})}),Fr={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ir=M.createContext(null),Lr=Dr(`portal`);function Rr(e){e===void 0&&(e={});let{id:t,root:n}=e,r=xr(),i=Br(),[a,o]=M.useState(null),s=M.useRef(null);return Yt(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),Yt(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(Lr,``),e.appendChild(n),s.current=n,o(n)},[t,r]),Yt(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!ge(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(Lr,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function zr(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=Rr({id:n,root:r}),[o,s]=M.useState(null),c=M.useRef(null),l=M.useRef(null),u=M.useRef(null),d=M.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return M.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&an(e)&&(e.type===`focusin`?sn:on)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),M.useEffect(()=>{a&&(p||sn(a))},[p,a]),(0,ln.jsxs)(Ir.Provider,{value:M.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,ln.jsx)(Pr,{"data-type":`outside`,ref:c,onFocus:e=>{if(an(e,a)){var t;(t=u.current)==null||t.focus()}else rn(o?o.domReference:null)?.focus()}}),m&&a&&(0,ln.jsx)(`span`,{"aria-owns":a.id,style:Fr}),a&&cn.createPortal(t,a),m&&a&&(0,ln.jsx)(Pr,{"data-type":`outside`,ref:l,onFocus:e=>{if(an(e,a)){var t;(t=d.current)==null||t.focus()}else nn(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var Br=()=>M.useContext(Ir),Vr={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Hr={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Ur=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Wr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Er(),g=$t(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=M.useRef(!1),{escapeKey:y,outsidePress:b}=Ur(p),{escapeKey:x,outsidePress:S}=Ur(m),C=M.useRef(!1),w=$t(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?Kt(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,qt(e)?e.nativeEvent:e,`escape-key`)}),T=$t(e=>{var t;let n=()=>{var t;w(e),(t=Vt(e))==null||t.removeEventListener(`keydown`,n)};(t=Vt(e))==null||t.addEventListener(`keydown`,n)}),E=$t(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=Vt(e),s=`[`+Dr(`inert`)+`]`,c=Wt(i.floating).querySelectorAll(s),u=P(o)?o:null;for(;u&&!ke(u);){let e=Me(u);if(ke(e)||!P(e))break;u=e}if(c.length&&P(o)&&!Ut(o)&&!Bt(o,i.floating)&&Array.from(c).every(e=>!Bt(u,e)))return;if(_e(o)&&O){let t=ke(o),n=Ae(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&Kt(h.nodesRef.current,d).some(t=>Ht(e,t.context?.elements.floating));if(Ht(e,i.floating)||Ht(e,i.domReference)||f)return;let p=h?Kt(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),ee=$t(e=>{var t;let n=()=>{var t;E(e),(t=Vt(e))==null||t.removeEventListener(l,n)};(t=Vt(e))==null||t.addEventListener(l,n)});M.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},Oe()?5:0)}let d=Wt(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?ee:E,S);let p=[];return f&&(P(i.domReference)&&(p=Pe(i.domReference)),P(i.floating)&&(p=p.concat(Pe(i.floating))),!P(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(Pe(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?ee:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,ee]),M.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let D=M.useMemo(()=>({onKeyDown:w,...u&&{[Vr[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),O=M.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[Hr[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return M.useMemo(()=>o?{reference:D,floating:O}:{},[o,D,O])}function Gr(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=xr(),a=M.useRef({}),[o]=M.useState(()=>Sr()),s=Tr()!=null,[c,l]=M.useState(r.reference),u=$t((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=M.useMemo(()=>({setPositionReference:l}),[]),f=M.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return M.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Kr(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=Gr({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=M.useState(null),[l,u]=M.useState(null),d=o?.domReference||s,f=M.useRef(null),p=Er();Yt(()=>{d&&(f.current=d)},[d]);let m=rr({...n,elements:{...o,...l&&{reference:l}}}),h=M.useCallback(e=>{let t=P(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=M.useCallback(e=>{(P(e)||e===null)&&(f.current=e,c(e)),(P(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!P(e))&&m.refs.setReference(e)},[m.refs]),_=M.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=M.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=M.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return Yt(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),M.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function qr(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[cr]:t,[lr]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[sr]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[cr,lr].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Jr(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=M.useCallback(t=>qr(t,e,`reference`),t),a=M.useCallback(t=>qr(t,e,`floating`),n),o=M.useCallback(t=>qr(t,e,`item`),r);return M.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Yr=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Xr(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=xr(),c=r.domReference?.id||s,l=M.useMemo(()=>Gt(r.floating)?.id||i,[r.floating,i]),u=Yr.get(o)??o,d=Tr()!=null,f=M.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=M.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=M.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return M.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var Zr=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Qr=(e=>e?Zr(e):Zr),$r=e=>e;function ei(e,t=$r){let n=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(n),n}var ti=e=>{let t=Qr(e),n=e=>ei(t,e);return Object.assign(n,t),n},ni=(e=>e?ti(e):ti),ri=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ii=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ai=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),oi=e=>{let t=ai(e);return t.charAt(0).toUpperCase()+t.slice(1)},si={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},ci=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},li=(0,M.createContext)({}),ui=()=>(0,M.useContext)(li),di=(0,M.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ui()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,M.createElement)(`svg`,{ref:c,...si,width:t??l??si.width,height:t??l??si.height,stroke:e??f,strokeWidth:m,className:ri(`lucide`,p,i),...!a&&!ci(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,M.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),F=(e,t)=>{let n=(0,M.forwardRef)(({className:n,...r},i)=>(0,M.createElement)(di,{ref:i,iconNode:t,className:ri(`lucide-${ii(oi(e))}`,`lucide-${e}`,n),...r}));return n.displayName=oi(e),n},fi=F(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),pi=F(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),mi=F(`award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),hi=F(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),gi=F(`brain-circuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),_i=F(`castle`,[[`path`,{d:`M10 5V3`,key:`1y54qe`}],[`path`,{d:`M14 5V3`,key:`m6isi`}],[`path`,{d:`M15 21v-3a3 3 0 0 0-6 0v3`,key:`lbp5hj`}],[`path`,{d:`M18 3v8`,key:`2ollhf`}],[`path`,{d:`M18 5H6`,key:`98imr9`}],[`path`,{d:`M22 11H2`,key:`1lmjae`}],[`path`,{d:`M22 9v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9`,key:`1rly83`}],[`path`,{d:`M6 3v8`,key:`csox7g`}]]),vi=F(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),yi=F(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),bi=F(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),xi=F(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Si=F(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Ci=F(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),wi=F(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Ti=F(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]),Ei=F(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),Di=F(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Oi=F(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),ki=F(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Ai=F(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),ji=F(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Mi=F(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),Ni=F(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),Pi=F(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Fi=F(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Ii=F(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),I=F(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),L=F(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Li=F(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Ri=F(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),zi=F(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Bi=F(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Vi=F(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),Hi=F(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ui=F(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Wi=F(`key`,[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]),Gi=F(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Ki=F(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),qi=F(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Ji=F(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Yi=F(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Xi=F(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Zi=F(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),Qi=F(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),$i=F(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),ea=F(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),ta=F(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),na=F(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),ra=F(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),ia=F(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),aa=F(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),oa=F(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),sa=F(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),ca=F(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),la=F(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),ua=F(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),da=F(`scroll`,[[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),fa=F(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),pa=F(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ma=F(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),ha=F(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ga=F(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),_a=F(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),va=F(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),ya=F(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ba=F(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),xa=F(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Sa=F(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Ca=F(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),wa=F(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ta=F(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Ea=F(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Da=F(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Oa=F(`trophy`,[[`path`,{d:`M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2`,key:`pwuv1l`}],[`path`,{d:`M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2`,key:`1y54w1`}],[`path`,{d:`M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3`,key:`e30mpu`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3`,key:`i0yafy`}]]),ka=F(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Aa=F(`volume-x`,[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]),ja=F(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ma=F(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Na=F(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),Pa=F(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Fa=F(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]);function Ia(e,t,n){return Math.max(t,Math.min(e,n))}var La={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Ra(e,t,n){return t===0||Math.abs(t)===1/0?e**(n*5):e*t*n/(t+n*e)}function za(e,t,n,r=.15){return r===0?Ia(e,t,n):en?+Ra(e-n,n-t,r)+n:e}function Ba(e,[t,n],[r,i]){let[[a,o],[s,c]]=e;return[za(t,a,o,r),za(n,s,c,i)]}function Va(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ha(e){var t=Va(e,`string`);return typeof t==`symbol`?t:String(t)}function Ua(e,t,n){return t=Ha(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)==null||(r=n.contains)==null?void 0:r.call(n,t.target))})}function no(e){return e.type===`touchend`||e.type===`touchcancel`?e.changedTouches:e.targetTouches}function ro(e){return $a(e)?no(e)[0]:e}function io(e){return to(e).map(e=>e.identifier)}function ao(e){let t=ro(e);return $a(e)?t.identifier:t.pointerId}function oo(e){let t=ro(e);return[t.clientX,t.clientY]}function so(e){let t={};if(`buttons`in e&&(t.buttons=e.buttons),`shiftKey`in e){let{shiftKey:n,altKey:r,metaKey:i,ctrlKey:a}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:a})}return t}function co(e,...t){return typeof e==`function`?e(...t):e}function lo(){}function uo(...e){return e.length===0?lo:e.length===1?e[0]:function(){let t;for(let n of e)t=n.apply(this,arguments)||t;return t}}function z(e,t){return Object.assign({},t,e||{})}var fo=32,po=class{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){let{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){let t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?co(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){let t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){let e=this.state;e._initial=e._values,e.initial=e.values}compute(e){let{state:t,config:n,shared:r}=this;t.args=this.args;let i=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,so(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,i=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){let e=t._delta.map(Math.abs);La.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);let[a,o]=t._movement,[s,c]=n.threshold,{_step:l,values:u}=t;if(n.hasCustomTransform?(l[0]===!1&&(l[0]=Math.abs(a)>=s&&u[0]),l[1]===!1&&(l[1]=Math.abs(o)>=c&&u[1])):(l[0]===!1&&(l[0]=Math.abs(a)>=s&&Math.sign(a)*s),l[1]===!1&&(l[1]=Math.abs(o)>=c&&Math.sign(o)*c)),t.intentional=l[0]!==!1||l[1]!==!1,!t.intentional)return;let d=[0,0];if(n.hasCustomTransform){let[e,t]=u;d[0]=l[0]===!1?0:e-l[0],d[1]=l[1]===!1?0:t-l[1]}else d[0]=l[0]===!1?0:a-l[0],d[1]=l[1]===!1?0:o-l[1];this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);let f=t.offset,p=t._active&&!t._blocked||t.active;p&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&(`bounds`in n&&(t._bounds=co(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));let[m,h]=t.offset,[[g,_],[v,y]]=t._bounds;t.overflow=[m_),hy)],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;let b=t._active&&n.rubberband||[0,0];if(t.offset=Ba(t._bounds,t.offset,b),t.delta=La.sub(t.offset,f),this.computeMovement(),p&&(!t.last||i>fo)){t.delta=La.sub(t.offset,f);let e=t.delta.map(Math.abs);La.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&i>0&&(t.velocity=[e[0]/i,e[1]/i],t.timeDelta=i)}}emit(){let e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;let r=this.handler(R(R(R({},t),e),{},{[this.aliasKey]:e.values}));r!==void 0&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}};function B([e,t],n){let r=Math.abs(e),i=Math.abs(t);if(r>i&&r>n)return`x`;if(i>r&&i>n)return`y`}var V=class extends po{constructor(...e){super(...e),Ua(this,`aliasKey`,`xy`)}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=La.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=La.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){let t=this.state,n=this.config;if(!t.axis&&e){let r=typeof n.axisThreshold==`object`?n.axisThreshold[eo(e)]:n.axisThreshold;t.axis=B(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case`x`:e[1]=0;break;case`y`:e[0]=0}}},mo=e=>e,ho=.15,go={enabled(e=!0){return e},eventOptions(e,t,n){return R(R({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[ho,ho];case!1:return[0,0];default:return La.toVector(e)}},from(e){if(typeof e==`function`)return e;if(e!=null)return La.toVector(e)},transform(e,t,n){let r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||mo},threshold(e){return La.toVector(e,0)}},_o=0,vo=R(R({},go),{},{axis(e,t,{axis:n}){if(this.lockDirection=n===`lock`,!this.lockDirection)return n},axisThreshold(e=_o){return e},bounds(e={}){if(typeof e==`function`)return t=>vo.bounds(e(t));if(`current`in e)return()=>e.current;if(typeof HTMLElement==`function`&&e instanceof HTMLElement)return e;let{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),yo={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]},bo=class extends V{constructor(...e){super(...e),Ua(this,`ingKey`,`dragging`)}reset(){super.reset();let e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){let e=this.state;if(e._bounds instanceof HTMLElement){let t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=vo.bounds(r)}}cancel(){let e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){let t=this.config,n=this.state;if(e.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):t.pointerButtons!==-1&&t.pointerButtons!==e.buttons))return;let r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(r&&r.size>1&&n._pointerActive)&&(this.start(e),this.setupPointer(e),n._pointerId=ao(e),n._pointerActive=!0,this.computeValues(oo(e)),this.computeInitial(),t.preventScrollAxis&&eo(e)!==`mouse`?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){let t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){let t=this.state,n=this.config;if(!t._pointerActive)return;let r=ao(e);if(t._pointerId!==void 0&&r!==t._pointerId)return;let i=oo(e);if(document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=La.sub(i,t._values),this.computeValues(i)),La.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional){this.timeoutStore.remove(`dragDelay`),t.active=!1,this.startPointerDrag(e);return}if(n.preventScrollAxis&&!t._preventScroll){if(t.axis){if(t.axis===n.preventScrollAxis||n.preventScrollAxis===`xy`){t._active=!1,this.clean();return}this.timeoutStore.remove(`startPointerDrag`),this.startPointerDrag(e);return}return}this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}let t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;let r=ao(e);if(t._pointerId!==void 0&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);let[i,a]=t._distance;if(t.tap=i<=n.tapsThreshold&&a<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{let[e,r]=t._delta,[i,a]=t._movement,[o,s]=n.swipe.velocity,[c,l]=n.swipe.distance,u=n.swipe.duration;if(t.elapsedTimeo&&Math.abs(i)>c&&(t.swipe[0]=Math.sign(e)),u>s&&Math.abs(a)>l&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){let t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,`change`,this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,`end`,this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,`cancel`,this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,xo(e);let t=this.eventStore.add(this.sharedConfig.window,`touch`,`change`,this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,`touch`,`end`,t),this.eventStore.add(this.sharedConfig.window,`touch`,`cancel`,t),this.timeoutStore.add(`startPointerDrag`,this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add(`dragDelay`,()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){let t=yo[e.key];if(t){let n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,La.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in yo&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){let t=this.config.device;e(t,`start`,this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,`change`,this.pointerMove.bind(this)),e(t,`end`,this.pointerUp.bind(this)),e(t,`cancel`,this.pointerUp.bind(this)),e(`lostPointerCapture`,``,this.pointerUp.bind(this))),this.config.keys&&(e(`key`,`down`,this.keyDown.bind(this)),e(`key`,`up`,this.keyUp.bind(this))),this.config.filterTaps&&e(`click`,``,this.pointerClick.bind(this),{capture:!0,passive:!1})}};function xo(e){`persist`in e&&typeof e.persist==`function`&&e.persist()}var H=typeof window<`u`&&window.document&&window.document.createElement;function So(){return H&&`ontouchstart`in window}function Co(){return So()||H&&window.navigator.maxTouchPoints>1}function wo(){return H&&`onpointerdown`in window}function To(){return H&&`exitPointerLock`in window.document}function Eo(){try{return`constructor`in GestureEvent}catch{return!1}}var Do={isBrowser:H,gesture:Eo(),touch:So(),touchscreen:Co(),pointer:wo(),pointerLock:To()},Oo=250,ko=180,Ao=.5,jo=50,Mo=250,No=10,Po={mouse:0,touch:0,pen:8},Fo=R(R({},vo),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&Do.pointerLock,Do.touch&&n?`touch`:this.pointerLock?`mouse`:Do.pointer&&!i?`pointer`:Do.touch?`touch`:`mouse`},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n==`number`?n:n||n===void 0&&e?Oo:void 0,Do.touchscreen&&n!==!1)return e||(n===void 0?void 0:`y`)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&this.device===`pointer`&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:i=void 0}){let a=La.toVector(e,n?r:+!!i);return this.filterTaps=n,this.tapsThreshold=r,a},swipe({velocity:e=Ao,distance:t=jo,duration:n=Mo}={}){return{velocity:this.transform(La.toVector(e)),distance:this.transform(La.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return ko;case!1:return 0;default:return e}},axisThreshold(e){return e?R(R({},Po),e):Po},keyboardDisplacement(e=No){return e}});R(R({},go),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Do.touch&&Do.gesture)return`gesture`;if(Do.touch&&r)return`touch`;if(Do.touchscreen){if(Do.pointer)return`pointer`;if(Do.touch)return`touch`}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){let i=e=>{let t=z(co(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},a=e=>{let t=z(co(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return typeof n!=`function`&&typeof r!=`function`?[i(),a()]:e=>[i(e),a(e)]},threshold(e,t,n){return this.lockDirection=n.axis===`lock`,La.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?`ctrlKey`:e},pinchOnWheel(e=!0){return e}}),R(R({},vo),{},{mouseOnly:(e=!0)=>e}),R(R({},vo),{},{mouseOnly:(e=!0)=>e});var Io=new Map,Lo=new Map;function Ro(e){Io.set(e.key,e.engine),Lo.set(e.key,e.resolver)}var zo={key:`drag`,engine:bo,resolver:Fo};function Bo(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a=0)&&(n[i]=e[i]);return n}function Vo(e,t){if(e==null)return{};var n=Bo(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Ho={target(e){if(e)return()=>`current`in e?e.current:e},enabled(e=!0){return e},window(e=Do.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},Uo=[`target`,`eventOptions`,`window`,`enabled`,`transform`];function Wo(e={},t){let n={};for(let[r,i]of Object.entries(t))switch(typeof i){case`function`:n[r]=i.call(n,e[r],r,e);break;case`object`:n[r]=Wo(e[r],i);break;case`boolean`:i&&(n[r]=e[r])}return n}function Go(e,t,n={}){let r=e,{target:i,eventOptions:a,window:o,enabled:s,transform:c}=r,l=Vo(r,Uo);if(n.shared=Wo({target:i,eventOptions:a,window:o,enabled:s,transform:c},Ho),t){let e=Lo.get(t);n[t]=Wo(R({shared:n.shared},l),e)}else for(let e in l){let t=Lo.get(e);t&&(n[e]=Wo(R({shared:n.shared},l[e]),t))}return n}var Ko=class{constructor(e,t){Ua(this,`_listeners`,new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,i){let a=this._listeners,o=Qa(t,n),s=R(R({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),i);e.addEventListener(o,r,s);let c=()=>{e.removeEventListener(o,r,s),a.delete(c)};return a.add(c),c}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}},qo=class{constructor(){Ua(this,`_timeouts`,new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){let t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}},Jo=class{constructor(e){Ua(this,`gestures`,new Set),Ua(this,`_targetEventStore`,new Ko(this)),Ua(this,`gestureEventStores`,{}),Ua(this,`gestureTimeoutStores`,{}),Ua(this,`handlers`,{}),Ua(this,`config`,{}),Ua(this,`pointerIds`,new Set),Ua(this,`touchIds`,new Set),Ua(this,`state`,{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Xo(this,e)}setEventIds(e){if($a(e))return this.touchIds=new Set(io(e)),this.touchIds;if(`pointerId`in e)return e.type===`pointerup`||e.type===`pointercancel`?this.pointerIds.delete(e.pointerId):e.type===`pointerdown`&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=Go(e,t,this.config)}clean(){this._targetEventStore.clean();for(let e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){let t=this.config.shared,n={},r;if(!(t.target&&(r=t.target(),!r))){if(t.enabled){for(let t of this.gestures){let i=this.config[t],a=Zo(n,i.eventOptions,!!r);i.enabled&&new(Io.get(t))(this,e,t).bind(a)}let i=Zo(n,t.eventOptions,!!r);for(let t in this.nativeHandlers)i(t,``,n=>this.nativeHandlers[t](R(R({},this.state.shared),{},{event:n,args:e})),void 0,!0)}for(let e in n)n[e]=uo(...n[e]);if(!r)return n;for(let e in n){let{device:t,capture:i,passive:a}=Za(e);this._targetEventStore.add(r,t,``,n[e],{capture:i,passive:a})}}}};function Yo(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Ko(e,t),e.gestureTimeoutStores[t]=new qo}function Xo(e,t){t.drag&&Yo(e,`drag`),t.wheel&&Yo(e,`wheel`),t.scroll&&Yo(e,`scroll`),t.move&&Yo(e,`move`),t.pinch&&Yo(e,`pinch`),t.hover&&Yo(e,`hover`)}var Zo=(e,t,n)=>(r,i,a,o={},s=!1)=>{let c=o.capture??t.capture,l=o.passive??t.passive,u=s?r:Ya(r,i,c);n&&l&&(u+=`Passive`),e[u]=e[u]||[],e[u].push(a)};function Qo(e,t={},n,r){let i=M.useMemo(()=>new Jo(e),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),M.useEffect(i.effect.bind(i)),M.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function $o(e,t){return Ro(zo),Qo({drag:e},t||{},`drag`)}function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),os=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},ss=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},cs=null,ls=()=>typeof window>`u`?new ss:(cs||=new ss,cs),us=d.theme({"& .cm-scroller":{height:`100% !important`}}),ds=null,fs=null;function ps(e,t,n,r,i,a){if(!e&&!t&&!n&&!r&&!i&&!a)return null;var o=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a});return o===ds?fs:(ds=o,fs=d.theme({"&":{height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:a}}),fs)}var ms=u.define(),hs=200,gs=[];function _s(e){var t=e.value,n=e.selection,r=e.onChange,i=e.onStatistics,s=e.onCreateEditor,c=e.onUpdate,l=e.extensions,u=l===void 0?gs:l,f=e.autoFocus,p=e.theme,m=p===void 0?`light`:p,h=e.height,g=h===void 0?null:h,_=e.minHeight,v=_===void 0?null:_,y=e.maxHeight,b=y===void 0?null:y,x=e.width,S=x===void 0?null:x,C=e.minWidth,w=C===void 0?null:C,T=e.maxWidth,E=T===void 0?null:T,ee=e.placeholder,D=ee===void 0?``:ee,O=e.editable,te=O===void 0||O,ne=e.readOnly,re=ne!==void 0&&ne,k=e.indentWithTab,A=k===void 0||k,ie=e.basicSetup,ae=ie===void 0||ie,oe=e.root,se=e.initialState,ce=(0,M.useState)(),le=ce[0],ue=ce[1],de=(0,M.useState)(),j=de[0],fe=de[1],pe=(0,M.useState)(),me=pe[0],he=pe[1],N=(0,M.useState)(()=>({current:null}))[0],ge=(0,M.useState)(()=>({current:null}))[0],P=ps(g,v,b,S,w,E),_e=d.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(ms))&&(N.current?N.current.reset():(N.current=new os(()=>{if(ge.current){var e=ge.current;ge.current=null,e()}N.current=null},hs),ls().add(N.current)),r(e.state.doc.toString(),e)),i&&i(as(e))}),ve=is({theme:m,editable:te,readOnly:re,placeholder:D,indentWithTab:A,basicSetup:ae}),ye=[_e,...P?[P]:[],us,...ve];return c&&typeof c==`function`&&ye.push(d.updateListener.of(c)),ye=ye.concat(u),(0,M.useLayoutEffect)(()=>{if(le&&!me){var e={doc:t,selection:n,extensions:ye},r=se?a.fromJSON(se.json,e,se.fields):a.create(e);if(he(r),!j){var i=new d({state:r,parent:le,root:oe});fe(i),s&&s(i,r)}}return()=>{j&&(he(void 0),fe(void 0))}},[le,me]),(0,M.useEffect)(()=>{e.container&&ue(e.container)},[e.container]),(0,M.useEffect)(()=>()=>{j&&(j.destroy(),fe(void 0)),N.current&&=(N.current.cancel(),null)},[j]),(0,M.useEffect)(()=>{f&&j&&j.focus()},[f,j]),(0,M.useEffect)(()=>{j&&j.dispatch({effects:o.reconfigure.of(ye)})},[m,u,g,v,b,S,w,E,D,te,re,A,ae,r,c]),(0,M.useEffect)(()=>{if(t!==void 0){var e=j?j.state.doc.toString():``;if(j&&t!==e){var n=N.current&&!N.current.isDone,r=()=>{j&&t!==j.state.doc.toString()&&j.dispatch({changes:{from:0,to:j.state.doc.toString().length,insert:t||``},annotations:[ms.of(!0)]})};n?ge.current=r:r()}}},[t,j]),{state:me,setState:he,view:j,setView:fe,container:le,setContainer:ue}}var vs=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],ys=(0,M.forwardRef)((e,t)=>{var n=e.className,r=e.value,i=r===void 0?``:r,a=e.selection,o=e.extensions,s=o===void 0?[]:o,c=e.onChange,l=e.onStatistics,u=e.onCreateEditor,d=e.onUpdate,f=e.autoFocus,p=e.theme,m=p===void 0?`light`:p,h=e.height,g=e.minHeight,_=e.maxHeight,v=e.width,y=e.minWidth,b=e.maxWidth,x=e.basicSetup,S=e.placeholder,C=e.indentWithTab,w=e.editable,T=e.readOnly,E=e.root,ee=e.initialState,D=ts(e,vs),O=(0,M.useRef)(null),te=_s({root:E,value:i,autoFocus:f,theme:m,height:h,minHeight:g,maxHeight:_,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:S,indentWithTab:C,editable:w,readOnly:T,selection:a,onChange:c,onStatistics:l,onCreateEditor:u,onUpdate:d,extensions:s,initialState:ee}),ne=te.state,re=te.view,k=te.container,A=te.setContainer;(0,M.useImperativeHandle)(t,()=>({editor:O.current,state:ne,view:re}),[O,k,ne,re]);var ie=(0,M.useCallback)(e=>{O.current=e,A(e)},[A]);if(typeof i!=`string`)throw Error(`value must be typeof string but got `+typeof i);var ae=typeof m==`string`?`cm-theme-`+m:`cm-theme`;return(0,ln.jsx)(`div`,es({ref:ie,className:``+ae+(n?` `+n:``)},D))});ys.displayName=`CodeMirror`;export{zi as $,ca as A,zr as At,Qi as B,fe as Bt,ha as C,_i as Ct,da as D,pi as Dt,fa as E,mi as Et,ra as F,Xr as Ft,qi as G,Xi as H,ae as Ht,na as I,or as It,Wi as J,Ki as K,ta as L,ir as Lt,oa as M,Kr as Mt,aa as N,Mr as Nt,ua as O,fi as Ot,ia as P,Jr as Pt,Bi as Q,ea as R,ar as Rt,ga as S,vi as St,pa as T,hi as Tt,Yi as U,Zi as V,de as Vt,Ji as W,Hi as X,Ui as Y,Vi as Z,xa as _,Ci as _t,Na as a,Fi as at,va as b,bi as bt,Aa as c,Mi as ct,Da as d,ki as dt,Ri as et,Ea as f,Oi as ft,Sa as g,wi as gt,Ca as h,Ti as ht,Pa as i,Ii as it,sa as j,Wr as jt,la as k,ni as kt,ka as l,ji as lt,wa as m,Ei as mt,$o as n,L as nt,Ma as o,Pi as ot,Ta as p,Di as pt,Gi as q,Fa as r,I as rt,ja as s,Ni as st,ys as t,Li as tt,Oa as u,Ai as ut,ba as v,Si as vt,ma as w,gi as wt,_a as x,yi as xt,ya as y,xi as yt,$i as z,qn as zt}; \ No newline at end of file diff --git a/algospaced-ui/dist/index.html b/algospaced-ui/dist/index.html index 40fdb37cfaa0959022e22da22ced85b2c2a9fe96..8ba0345e140cb14a6553dd9f370d493e7c97de4b 100644 --- a/algospaced-ui/dist/index.html +++ b/algospaced-ui/dist/index.html @@ -21,14 +21,14 @@ rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=Be+Vietnam+Pro:wght@500;700&family=Courier+Prime:wght@400;700&family=Press+Start+2P&family=Cinzel:wght@500;700;900&family=Cinzel+Decorative:wght@700;900&family=EB+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=Kalam:wght@400;700&display=swap" /> - + - + - + diff --git a/algospaced-ui/dist/llms.txt b/algospaced-ui/dist/llms.txt index 0f5035cd22a6b20bc42b8962183e27301b5381b5..b99c42f50b5becd34fa0b56584608269356428cb 100644 --- a/algospaced-ui/dist/llms.txt +++ b/algospaced-ui/dist/llms.txt @@ -2,7 +2,7 @@ > AlgoSpaced is a gamified spaced repetition and active recall web application for mastering Data Structures and Algorithms (DSA). -AlgoSpaced integrates the FSRS (Free Spaced Repetition Scheduler) and Leitner box model with an interactive Python 3.14 browser sandbox, LeetCode style problem catalog, and retro-arcade operating system interface. +AlgoSpaced integrates the FSRS (Free Spaced Repetition Scheduler) with an interactive Python 3.14 browser sandbox, LeetCode style problem catalog, and retro-arcade operating system interface. ## Core Features and Links - [Daily Review Queue](/): Spaced repetition flashcards with interactive active-recall code studio. diff --git a/algospaced-ui/dist/sw.js b/algospaced-ui/dist/sw.js index 102fae57aae88c00b7011542ccceb35fecce0de5..6d47403dedea16242d65308e71ecbba25a9c9ff9 100644 --- a/algospaced-ui/dist/sw.js +++ b/algospaced-ui/dist/sw.js @@ -1 +1 @@ -if(!self.define){let s,e={};const r=(r,l)=>(r=new URL(r+".js",l).href,e[r]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=r,s.onload=e,document.head.appendChild(s)}else s=r,importScripts(r),e()}).then(()=>{let s=e[r];if(!s)throw new Error(`Module ${r} didn’t register its module`);return s}));self.define=(l,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const o=s=>r(s,i),t={module:{uri:i},exports:u,require:o};e[i]=Promise.all(l.map(s=>t[s]||o(s))).then(s=>(n(...s),u))}}define(["./workbox-9c191d2f"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"loader.css",revision:"fe561cfc0908978c7b17dcf5d0ce1075"},{url:"loader-init.js",revision:"3d0342fa97370ec97880bb98818cd608"},{url:"index.html",revision:"0bef10bf5a14476194a6dac7c6104dfc"},{url:"assets/vendor-ui-ZXcm-2wU.js",revision:null},{url:"assets/vendor-react-CIO8MTK1.js",revision:null},{url:"assets/vendor-katex-DtkCqjBQ.css",revision:null},{url:"assets/vendor-katex-Balf574a.js",revision:null},{url:"assets/vendor-firebase-DSIO3PIf.js",revision:null},{url:"assets/vendor-codemirror-By0wlJeM.js",revision:null},{url:"assets/TerminalEmulator-C2zR6yON.js",revision:null},{url:"assets/Settings-ACJ113RL.js",revision:null},{url:"assets/rolldown-runtime-hePW80VL.js",revision:null},{url:"assets/ReviewQueue-DmsrlLxn.js",revision:null},{url:"assets/PythonChallenge-BOgiGe52.js",revision:null},{url:"assets/ProblemSpecPanel-CLbwqTwe.js",revision:null},{url:"assets/PrincessChamber-5t89aBn-.js",revision:null},{url:"assets/OnboardingModal-DmgTXeeL.js",revision:null},{url:"assets/MySQLPlayground-CDRacqFf.js",revision:null},{url:"assets/MarkdownRenderer-BMZIn30p.js",revision:null},{url:"assets/KatexRenderer-HIhDCm0G.js",revision:null},{url:"assets/JourneyPath-Dpd3IPxF.js",revision:null},{url:"assets/index-tlaKBeUb.css",revision:null},{url:"assets/index-DnK6BACV.js",revision:null},{url:"assets/GitHubSyncWindow-DHS56rys.js",revision:null},{url:"assets/githubSyncService-x0Mm_uEl.js",revision:null},{url:"assets/firebaseClient-DZobvwSx.js",revision:null},{url:"assets/FileExplorer-CJE9LlAj.js",revision:null},{url:"assets/CreateProblemForm-Cej3QR08.js",revision:null},{url:"assets/confetti.module-Uxh4CK4s.js",revision:null},{url:"assets/Auth-DHdm5r3r.js",revision:null},{url:"manifest.webmanifest",revision:"7c8ff056d2e188c868d851bcb349e28e"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}); +if(!self.define){let s,e={};const r=(r,l)=>(r=new URL(r+".js",l).href,e[r]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=r,s.onload=e,document.head.appendChild(s)}else s=r,importScripts(r),e()}).then(()=>{let s=e[r];if(!s)throw new Error(`Module ${r} didn’t register its module`);return s}));self.define=(l,n)=>{const i=s||("document"in self?document.currentScript.src:"")||location.href;if(e[i])return;let u={};const t=s=>r(s,i),o={module:{uri:i},exports:u,require:t};e[i]=Promise.all(l.map(s=>o[s]||t(s))).then(s=>(n(...s),u))}}define(["./workbox-9c191d2f"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"loader.css",revision:"fe561cfc0908978c7b17dcf5d0ce1075"},{url:"loader-init.js",revision:"3d0342fa97370ec97880bb98818cd608"},{url:"index.html",revision:"af59fb115d7311a1378fc0a9c8a20111"},{url:"assets/vendor-ui-ZXcm-2wU.js",revision:null},{url:"assets/vendor-react-hnaVBnLv.js",revision:null},{url:"assets/vendor-katex-DtkCqjBQ.css",revision:null},{url:"assets/vendor-katex-Balf574a.js",revision:null},{url:"assets/vendor-firebase-DSIO3PIf.js",revision:null},{url:"assets/vendor-codemirror-By0wlJeM.js",revision:null},{url:"assets/TerminalEmulator-CZed0tiA.js",revision:null},{url:"assets/Settings-BVuXk3LW.js",revision:null},{url:"assets/rolldown-runtime-hePW80VL.js",revision:null},{url:"assets/ReviewQueue-CltGWQpb.js",revision:null},{url:"assets/PythonChallenge-CQdOe4Q2.js",revision:null},{url:"assets/ProblemSpecPanel-BRW8UyO6.js",revision:null},{url:"assets/PrincessChamber-abJShfI5.js",revision:null},{url:"assets/MySQLPlayground-iGzsbjAa.js",revision:null},{url:"assets/MarkdownRenderer-D8UdFpnD.js",revision:null},{url:"assets/KatexRenderer-DVt2cqHc.js",revision:null},{url:"assets/JourneyPath-BhAvKOiu.js",revision:null},{url:"assets/index-DVWZ15xt.js",revision:null},{url:"assets/index-BsU9BpJx.css",revision:null},{url:"assets/GitHubSyncWindow-CrRFKIeu.js",revision:null},{url:"assets/githubSyncService-x0Mm_uEl.js",revision:null},{url:"assets/firebaseClient-DZobvwSx.js",revision:null},{url:"assets/FileExplorer-D3FrJW-x.js",revision:null},{url:"assets/CreateProblemForm-Ccz3TNzp.js",revision:null},{url:"assets/confetti.module-Uxh4CK4s.js",revision:null},{url:"assets/CardManager-BEhyd34f.js",revision:null},{url:"assets/Auth-CphacI2S.js",revision:null},{url:"manifest.webmanifest",revision:"7c8ff056d2e188c868d851bcb349e28e"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))}); diff --git a/algospaced-ui/package.json b/algospaced-ui/package.json index 803732a7b543e2dd38950d7d9512c42e6ee55e28..c3f9a295cbfa68561b82449cde47b38e6afaaf81 100644 --- a/algospaced-ui/package.json +++ b/algospaced-ui/package.json @@ -8,7 +8,7 @@ "build": "node node_modules/typescript7/bin/tsc -b && vite build", "typecheck": "node node_modules/typescript7/bin/tsc -b", "lint": "eslint .", - "test": "node --experimental-strip-types --test tests/offlineAuth.test.mjs tests/offlineReviewQueue.test.mjs", + "test": "node --experimental-strip-types --test tests/offlineAuth.test.mjs tests/offlineReviewQueue.test.mjs tests/cardManager.test.mjs", "preview": "vite preview" }, "dependencies": { diff --git a/algospaced-ui/public/llms.txt b/algospaced-ui/public/llms.txt index 0f5035cd22a6b20bc42b8962183e27301b5381b5..b99c42f50b5becd34fa0b56584608269356428cb 100644 --- a/algospaced-ui/public/llms.txt +++ b/algospaced-ui/public/llms.txt @@ -2,7 +2,7 @@ > AlgoSpaced is a gamified spaced repetition and active recall web application for mastering Data Structures and Algorithms (DSA). -AlgoSpaced integrates the FSRS (Free Spaced Repetition Scheduler) and Leitner box model with an interactive Python 3.14 browser sandbox, LeetCode style problem catalog, and retro-arcade operating system interface. +AlgoSpaced integrates the FSRS (Free Spaced Repetition Scheduler) with an interactive Python 3.14 browser sandbox, LeetCode style problem catalog, and retro-arcade operating system interface. ## Core Features and Links - [Daily Review Queue](/): Spaced repetition flashcards with interactive active-recall code studio. diff --git a/algospaced-ui/src/App.tsx b/algospaced-ui/src/App.tsx index 685534a15b900a64f9a90503ae845e0b9f29abf9..95008eb1b84a354f6e13fbb6ff37ff76887d3f57 100644 --- a/algospaced-ui/src/App.tsx +++ b/algospaced-ui/src/App.tsx @@ -7,7 +7,6 @@ import PrincessDialoguePopup from './components/PrincessDialoguePopup'; import { useWindowManager } from './hooks/useWindowManager'; const Auth = lazy(() => import('./components/Auth')); -const OnboardingModal = lazy(() => import('./components/OnboardingModal')); import { useSystemStats } from './hooks/useSystemStats'; import { useWallpaper } from './hooks/useWallpaper'; import { useCompanionEvents } from './hooks/useCompanionEvents'; @@ -19,7 +18,6 @@ import { DesktopWindowContainer } from './components/desktop/DesktopWindowContai export default function App() { const [user, setUser] = useState(() => authService.getInitialUser()); const [isLoadingAuth, setIsLoadingAuth] = useState(() => !authService.getInitialUser()); - const [isOnboardingOpen, setIsOnboardingOpen] = useState(false); const [isStartOpen, setIsStartOpen] = useState(false); // Desktop icons & context menu refs @@ -35,7 +33,6 @@ export default function App() { const { openWindow, toggleWindowMinimize, - triggerRefreshExplorer, isAnyWindowOpen } = useWindowManager(closeStartMenu); @@ -88,21 +85,6 @@ export default function App() { } }, [isLoadingAuth]); - // Prompt onboarding for first-time session - useEffect(() => { - if (!isLoadingAuth && user) { - const rawUid = user.id; - const uid = rawUid === 'sandbox-user-id' || !rawUid ? 'sandbox' : rawUid; - const onbDone = localStorage.getItem(`algospaced_onboarding_done_${uid}`); - if (!onbDone) { - const timer = setTimeout(() => { - setIsOnboardingOpen(true); - }, 0); - return () => clearTimeout(timer); - } - } - }, [isLoadingAuth, user]); - const handleContextMenu = (e: React.MouseEvent) => { const target = e.target as HTMLElement; if ( @@ -154,6 +136,17 @@ export default function App() { badgeShadowColor: '#fde047', action: () => openWindow('queue') }, + { + id: 'cardManager', + label: ( + <> + CARD
MANAGER + + ), + icon: 'style', + badgeShadowColor: '#38bdf8', + action: () => openWindow('cardManager') + }, { id: 'journey', label: ( @@ -297,7 +290,6 @@ export default function App() { {/* Floating Windows Shell Containers */} setIsStartOpen(prev => !prev)} onCloseStart={() => setIsStartOpen(false)} onOpenWindow={openWindow} - onOpenOnboarding={() => { - setIsStartOpen(false); - setIsOnboardingOpen(true); - }} onTriggerSync={triggerSync} onSignOut={handleSignOut} isMobile={isMobile} @@ -331,18 +319,6 @@ export default function App() { {/* Reactive Princess Toast HUD */} openWindow('companion')} /> - {/* Expedition Onboarding & Fast-Track Checklist Modal */} - {isOnboardingOpen && ( - - setIsOnboardingOpen(false)} - onCompleted={triggerRefreshExplorer} - userId={user?.id || 'sandbox'} - /> - - )} - {/* Retro Desktop Context Menu */} + + @@ -792,7 +799,7 @@ export default function FileExplorer({ )} - {/* TAB CONTENT: Leitner properties */} + {/* TAB CONTENT: FSRS properties */} {modalTab === 'properties' && (

Card Diagnostics

@@ -800,7 +807,19 @@ export default function FileExplorer({
Scheduling Status -
Leitner Combo Box: {previewFile.box_level || 'N/A (Box 1)'}
+
FSRS State: + {previewFile.fsrs_state !== null && previewFile.fsrs_state !== undefined + ? (previewFile.fsrs_state === 0 + ? 'New (0)' + : previewFile.fsrs_state === 1 + ? 'Learning (1)' + : previewFile.fsrs_state === 2 + ? 'Review (2)' + : 'Relearning (3)') + : 'Unenrolled'} +
+
Stability: {previewFile.fsrs_stability !== undefined ? `${previewFile.fsrs_stability.toFixed(1)} days` : '0.0 days'}
+
Difficulty: {previewFile.fsrs_difficulty !== undefined ? `${previewFile.fsrs_difficulty.toFixed(1)}/10` : '0.0/10'}
Next Review Date: {previewFile.next_review ? new Date(previewFile.next_review).toLocaleString() : 'N/A (Due)'}
Last Reviewed: {previewFile.last_reviewed ? new Date(previewFile.last_reviewed).toLocaleDateString() : 'Never'}
diff --git a/algospaced-ui/src/components/OnboardingModal.tsx b/algospaced-ui/src/components/OnboardingModal.tsx deleted file mode 100644 index 89f1e608d37c07691023d43c0df1e1f7d4bca04e..0000000000000000000000000000000000000000 --- a/algospaced-ui/src/components/OnboardingModal.tsx +++ /dev/null @@ -1,600 +0,0 @@ -import { useState, useMemo, useEffect } from 'react'; -import { - Sparkles, - Zap, - Check, - Search, - X, - ArrowLeft, - RefreshCw, - CheckCircle2, - CheckSquare, - Square, - Compass, - BookOpen, - ChevronDown, - ChevronUp -} from 'lucide-react'; -import { - getAllCatalogProblems, - getAllPatterns, - getCatalogProblemByNumber, - type CatalogProblem -} from '../services/catalogService'; -import { batchActivateProblems } from '../services/reviewService'; - -interface OnboardingModalProps { - isOpen: boolean; - onClose: () => void; - onCompleted: () => void; - userId?: string; -} - -const STARTER_PROBLEM_NUMBERS = [217, 242, 1, 49, 20]; // Foundational starter pack - -export default function OnboardingModal({ - isOpen, - onClose, - onCompleted, - userId -}: OnboardingModalProps) { - const [step, setStep] = useState<'welcome' | 'checklist'>('welcome'); - const [selectedNumbers, setSelectedNumbers] = useState>(new Set()); - const [searchQuery, setSearchQuery] = useState(''); - const [selectedPatternFilter, setSelectedPatternFilter] = useState('ALL'); - const [expandedPatterns, setExpandedPatterns] = useState>({}); - const [isSubmitting, setIsSubmitting] = useState(false); - const [statusMessage, setStatusMessage] = useState(null); - const [errorMessage, setErrorMessage] = useState(null); - - const getStorageKey = () => { - const id = userId === 'sandbox-user-id' ? 'sandbox' : (userId || 'sandbox'); - return `algospaced_onboarding_done_${id}`; - }; - - useEffect(() => { - if (isOpen) { - const done = localStorage.getItem(getStorageKey()); - setStep(done ? 'checklist' : 'welcome'); - setErrorMessage(null); - setStatusMessage(null); - } - }, [isOpen, userId]); - - const allProblems = useMemo(() => getAllCatalogProblems(), []); - const allPatterns = useMemo(() => getAllPatterns(), []); - - // Filtered problems based on search and pattern - const filteredProblems = useMemo(() => { - const q = searchQuery.trim().toLowerCase(); - return allProblems.filter((p) => { - const matchesPattern = selectedPatternFilter === 'ALL' || p.pattern === selectedPatternFilter; - if (!matchesPattern) return false; - if (!q) return true; - return ( - p.name.toLowerCase().includes(q) || - p.problem_number.toString().includes(q) || - p.pattern.toLowerCase().includes(q) || - p.difficulty.toLowerCase().includes(q) - ); - }); - }, [allProblems, searchQuery, selectedPatternFilter]); - - // Group filtered problems by pattern - const groupedProblems = useMemo(() => { - const map = new Map(); - for (const p of filteredProblems) { - const list = map.get(p.pattern) || []; - list.push(p); - map.set(p.pattern, list); - } - return map; - }, [filteredProblems]); - - if (!isOpen) return null; - - const markOnboardingDone = () => { - localStorage.setItem(getStorageKey(), 'true'); - }; - - const handleStartFromScratch = async () => { - setIsSubmitting(true); - setErrorMessage(null); - setStatusMessage('Enrolling 5 foundational starter problems...'); - - try { - const starterProbs = STARTER_PROBLEM_NUMBERS.map((num) => - getCatalogProblemByNumber(num) - ).filter((p): p is CatalogProblem => p !== undefined); - - await batchActivateProblems(starterProbs); - markOnboardingDone(); - setStatusMessage('All 5 starter problems enrolled into Box 1!'); - setTimeout(() => { - onCompleted(); - onClose(); - }, 700); - } catch (err) { - console.error('Failed to start from scratch:', err); - setErrorMessage(err instanceof Error ? err.message : 'Failed to enroll starter problems'); - setIsSubmitting(false); - } - }; - - const toggleProblemSelection = (problemNumber: number) => { - setSelectedNumbers((prev) => { - const next = new Set(prev); - if (next.has(problemNumber)) { - next.delete(problemNumber); - } else { - next.add(problemNumber); - } - return next; - }); - }; - - const togglePatternSelection = (patternName: string) => { - const patternProbs = allProblems.filter((p) => p.pattern === patternName); - const allSelected = patternProbs.every((p) => selectedNumbers.has(p.problem_number)); - - setSelectedNumbers((prev) => { - const next = new Set(prev); - for (const p of patternProbs) { - if (allSelected) { - next.delete(p.problem_number); - } else { - next.add(p.problem_number); - } - } - return next; - }); - }; - - const selectByDifficulty = (difficulty: 'Easy' | 'Medium' | 'Hard') => { - setSelectedNumbers((prev) => { - const next = new Set(prev); - for (const p of allProblems) { - if (p.difficulty === difficulty) { - next.add(p.problem_number); - } - } - return next; - }); - }; - - const selectAll = () => { - setSelectedNumbers(new Set(allProblems.map((p) => p.problem_number))); - }; - - const clearAll = () => { - setSelectedNumbers(new Set()); - }; - - const togglePatternExpand = (pat: string) => { - setExpandedPatterns((prev) => ({ - ...prev, - [pat]: !prev[pat] - })); - }; - - const handleEnrollFastTrack = async () => { - if (selectedNumbers.size === 0) return; - setIsSubmitting(true); - setErrorMessage(null); - setStatusMessage(`Enrolling ${selectedNumbers.size} problems into FSRS...`); - - try { - const chosenProblems = allProblems.filter((p) => selectedNumbers.has(p.problem_number)); - await batchActivateProblems(chosenProblems); - markOnboardingDone(); - setStatusMessage(`Successfully enrolled ${chosenProblems.length} problems!`); - setTimeout(() => { - onCompleted(); - onClose(); - }, 700); - } catch (err) { - console.error('Failed to batch activate:', err); - setErrorMessage(err instanceof Error ? err.message : 'Failed to enroll problems'); - setIsSubmitting(false); - } - }; - - return ( -
-
- {/* Top retro arcade title bar */} -
-
- - - - - - GET STARTED - -
- -
- - {/* Step 1: Welcome & Path Selection */} - {step === 'welcome' && ( -
-
-
- - WELCOME TO ALGOSPACED -
-

- How would you like to begin your journey? -

-

- AlgoSpaced uses a 5-box Leitner spaced repetition engine. Choose how to seed your active practice cards. -

-
- - {/* Path Selection Cards */} -
- {/* Option A: Start From Scratch */} -
-
-
- -
-
- - RECOMMENDED FOR BEGINNERS - -

- 🌱 Start From Scratch -

-
-

- Begin with the 5 foundational starter problems: Contains Duplicate, Valid Anagram, Two Sum, Group Anagrams, and Valid Parentheses. -

-
- - -
- - {/* Option B: Fast-Track Checklist */} -
-
-
- -
-
- - IF YOU'VE ALREADY SOLVED SOME PROBLEMS ELSEWHERE - -

- ⚡ Fast-Track Checklist -

-
-

- Already solved some problems? Check off problems you've already solved elsewhere to seed your review queue and update your progress. -

-
- - -
-
- - {statusMessage && ( -

- {statusMessage} -

- )} - {errorMessage && ( -

- {errorMessage} -

- )} -
- )} - - {/* Step 2: 150-Problem Catalog Checklist */} - {step === 'checklist' && ( -
- {/* Top Toolbar: Search, Filters & Box Selector */} -
-
-
- -

- Fast-Track Catalog Checklist -

-
- -
- - FSRS STATE: - - - ALL START AS 'NEW' - -
-
- - {/* Search Bar & Quick Bulk Actions */} -
-
- - setSearchQuery(e.target.value)} - placeholder="Search by title, number, or pattern..." - aria-label="Search problems by title, number, or pattern" - className="w-full pl-8 pr-3 py-1.5 bg-paper-white border-2 border-ink-black font-sans text-xs text-ink-black font-medium outline-none focus:bg-amber-50" - /> - {searchQuery && ( - - )} -
- -
- - - - -
-
- - {/* Pattern Filter Tags */} -
- - {allPatterns.map((pat) => { - const count = allProblems.filter((p) => p.pattern === pat).length; - const isSelected = selectedPatternFilter === pat; - return ( - - ); - })} -
-
- - {/* Checklist Scrollable Body */} -
- {Array.from(groupedProblems.entries()).map(([patternName, probs]) => { - const patternSelectedCount = probs.filter((p) => - selectedNumbers.has(p.problem_number) - ).length; - const isAllPatternSelected = patternSelectedCount === probs.length; - const isExpanded = expandedPatterns[patternName] !== false; // default open - - return ( -
- {/* Pattern Section Header */} -
-
- - - {patternName} - - - {patternSelectedCount} / {probs.length} selected - -
- - -
- - {/* Problems Grid */} - {isExpanded && ( -
- {probs.map((p) => { - const isChecked = selectedNumbers.has(p.problem_number); - return ( -
toggleProblemSelection(p.problem_number)} - className={`p-2.5 border-2 transition-all cursor-pointer select-none flex items-start gap-2.5 ${isChecked - ? 'bg-amber-50/80 border-amber-600 shadow-[2px_2px_0px_0px_#d97706]' - : 'bg-paper-white border-slate-300 hover:border-ink-black' - }`} - > -
- {isChecked ? ( - - ) : ( - - )} -
- -
-
- - #{p.problem_number} - - - {p.difficulty} - -
-

- {p.name} -

-
- T: {p.time_complexity} | S: {p.space_complexity} -
-
-
- ); - })} -
- )} -
- ); - })} - - {groupedProblems.size === 0 && ( -
- -

NO MATCHING PROBLEMS FOUND

-

Try searching another keyword or clearing filters.

-
- )} -
- - {/* Bottom Sticky Action Bar */} -
-
-
- -
-
- - {selectedNumbers.size} of {allProblems.length} PROBLEMS SELECTED - -
- Target: FSRS (New) -
-
-
- -
- {errorMessage && ( - - {errorMessage} - - )} - -
-
-
- )} -
-
- ); -} diff --git a/algospaced-ui/src/components/ReviewQueue.tsx b/algospaced-ui/src/components/ReviewQueue.tsx index 82b58b459e10640b72f05436ae39d06d4cc0fbec..34a299e26a618af6fa71dcd723418ec06f25c025 100644 --- a/algospaced-ui/src/components/ReviewQueue.tsx +++ b/algospaced-ui/src/components/ReviewQueue.tsx @@ -1,6 +1,5 @@ import { useState, useEffect, useCallback, useRef, lazy, Suspense } from 'react'; import { RefreshCw, FileText, Code, BookOpen, WifiOff, AlertTriangle, RotateCcw } from 'lucide-react'; -import OnboardingModal from './OnboardingModal'; import { findCatalogProblem } from '../services/catalogService'; import { parseProblemContent, parseProblemTitle } from '../utils/problemContentParser'; import { getGitHubConfig, pushSolutionToGitHub } from '../services/githubSyncService'; @@ -23,7 +22,7 @@ export interface ReviewQueueProps { onOpenJourney?: () => void; onOpenCreateProblem?: () => void; onOpenEditProblem?: (problem: ProblemItem) => void; - onOpenOnboarding?: () => void; + onOpenCardManager?: () => void; refreshTrigger?: number; } @@ -34,12 +33,12 @@ export default function ReviewQueue({ onOpenJourney, onOpenCreateProblem, onOpenEditProblem, - onOpenOnboarding, + onOpenCardManager, refreshTrigger }: ReviewQueueProps) { const [containerWidth, setContainerWidth] = useState(null); const isNarrow = containerWidth !== null ? containerWidth < 780 : false; - const [leftTab, setLeftTab] = useState<'spec' | 'ref' | 'leitner'>('spec'); + const [leftTab, setLeftTab] = useState<'spec' | 'ref' | 'fsrs'>('spec'); const [mobileView, setMobileView] = useState<'spec' | 'code' | 'ref'>('spec'); const [copiedSnippet, setCopiedSnippet] = useState(null); @@ -53,7 +52,6 @@ export default function ReviewQueue({ }); observer.observe(node); }, []); - const [isOnboardingOpen, setIsOnboardingOpen] = useState(false); const [isAutocompleteEnabled, setIsAutocompleteEnabled] = useState(() => { const saved = localStorage.getItem('isAutocompleteEnabled'); @@ -73,7 +71,6 @@ export default function ReviewQueue({ setCode, nextMilestone, activatingMilestone, - currentUserId, fetchQueue, handleGrade, handleSelectCard, @@ -82,9 +79,7 @@ export default function ReviewQueue({ } = useReviewQueue({ overrideProblemId, refreshTrigger, - onClearOverride, - onOpenOnboarding, - setIsOnboardingOpen + onClearOverride }); const { @@ -245,14 +240,6 @@ export default function ReviewQueue({ else onOpenWindow?.('createProblem'); }, [onOpenCreateProblem, onOpenWindow]); - const handleOpenOnboardingInternal = useCallback(() => { - if (onOpenOnboarding) { - onOpenOnboarding(); - } else { - setIsOnboardingOpen(true); - } - }, [onOpenOnboarding]); - const handleUpdateSolutions = useCallback((updatedSolutions: ProblemSolution[]) => { setReviews((prev) => { if (prev.length === 0) return prev; @@ -344,17 +331,12 @@ export default function ReviewQueue({ nextMilestone={nextMilestone} activatingMilestone={activatingMilestone} onActivateNextMilestone={handleActivateNextMilestone} - onOpenOnboarding={handleOpenOnboardingInternal} + onOpenCardManager={onOpenCardManager || (() => onOpenWindow?.('cardManager'))} onOpenJourney={handleOpenJourney} onOpenCreateProblem={handleOpenCreateProblem} onOpenWindow={onOpenWindow} overrideProblemId={overrideProblemId} onClearOverride={onClearOverride} - hasCustomOnboardingModal={Boolean(onOpenOnboarding)} - isOnboardingOpen={isOnboardingOpen} - onCloseOnboarding={() => setIsOnboardingOpen(false)} - onCompletedOnboarding={fetchQueue} - currentUserId={currentUserId} /> ); } @@ -603,15 +585,6 @@ export default function ReviewQueue({ submittingRating={submittingRating} onGrade={handleGradeWithReset} /> - - {!onOpenOnboarding && ( - setIsOnboardingOpen(false)} - onCompleted={fetchQueue} - userId={currentUserId} - /> - )}
); } diff --git a/algospaced-ui/src/components/TerminalEmulator.tsx b/algospaced-ui/src/components/TerminalEmulator.tsx index b0263658cd49b7f2334ece70c568b974ea9976df..0aacd890876f7b0efb445f1d7c3164a2353c546e 100644 --- a/algospaced-ui/src/components/TerminalEmulator.tsx +++ b/algospaced-ui/src/components/TerminalEmulator.tsx @@ -95,7 +95,7 @@ export default function TerminalEmulator({ onOpenWindow, onClose }: TerminalEmul 'Available commands:', ' help - Display this documentation', ' ps - Inspect OS process table (PIDs & task states)', - ' streak - Retrieve your active Leitner combo streak metrics', + ' streak - Retrieve your active review streak metrics', ' sync - Run google drive file import sync', ' reviews - Fetch Leetcode numbers due for daily review', ' python play - Open Daily Python Challenge window', @@ -206,7 +206,7 @@ export default function TerminalEmulator({ onOpenWindow, onClose }: TerminalEmul } break; case 'reviews': - output.push('Querying leitner_cards partition...'); + output.push('Querying fsrs_cards partition...'); try { const { data: { session } } = await supabase.auth.getSession(); if (!session) { @@ -226,11 +226,17 @@ export default function TerminalEmulator({ onOpenWindow, onClose }: TerminalEmul problem_number?: number; name?: string; }; - box_level?: number; + fsrs_state?: number; } + const stateNames: Record = { + 0: 'New', + 1: 'Learning', + 2: 'Review', + 3: 'Relearning' + }; output.push( `Queue status: ${data.length} card(s) due:`, - ...(data as DueReviewResponse[]).map((r) => ` - LeetCode ${r.problems?.problem_number ?? '?'}: ${r.problems?.name ?? 'Unknown'} (Box ${r.box_level ?? 1})`) + ...(data as DueReviewResponse[]).map((r) => ` - LeetCode ${r.problems?.problem_number ?? '?'}: ${r.problems?.name ?? 'Unknown'} (${stateNames[r.fsrs_state ?? 0] ?? 'New'})`) ); } } else { diff --git a/algospaced-ui/src/components/card-manager/CardManager.tsx b/algospaced-ui/src/components/card-manager/CardManager.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2da83731587c1504dbe3263fb092df38877b1108 --- /dev/null +++ b/algospaced-ui/src/components/card-manager/CardManager.tsx @@ -0,0 +1,1344 @@ +import React, { useState, useEffect, useMemo, useCallback } from 'react'; +import { + Layers, + Search, + RefreshCw, + PlusCircle, + Play, + RotateCcw, + Trash2, + Edit, + CheckSquare, + Square, + Check, + Copy, + Folder, + ArrowUpDown, + Tag, + Sparkles, + Zap, + Info +} from 'lucide-react'; +import { + fetchManagedCards, + resetCardReviews, + deleteCustomCard, + deleteCustomCards, + enrollCatalogCards, + type ManagedCard +} from '../../services/cardManagerService'; +import type { ProblemItem } from '../../types/reviewTypes'; + +interface CardManagerProps { + onOpenQueue: () => void; + onOpenCreateProblem: () => void; + onOpenEditProblem: (problem: ProblemItem) => void; + onSelectProblemForReview: (problemId: string) => void; + refreshTrigger?: number; + onRefreshExplorer?: () => void; +} + +type DeckFilterType = 'all' | 'due' | 'enrolled' | 'new' | 'learning' | 'reviewing' | 'relearning'; +type SortField = 'number' | 'name' | 'pattern' | 'difficulty' | 'state' | 'due' | 'retention'; +type SortOrder = 'asc' | 'desc'; +type InspectorTab = 'front' | 'back' | 'stats'; + +export default function CardManager({ + onOpenQueue, + onOpenCreateProblem, + onOpenEditProblem, + onSelectProblemForReview, + refreshTrigger, + onRefreshExplorer +}: CardManagerProps) { + const [cards, setCards] = useState([]); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + + // Filter & Search states + const [searchQuery, setSearchQuery] = useState(''); + const [selectedDeck, setSelectedDeck] = useState('all'); + const [selectedPattern, setSelectedPattern] = useState('ALL'); + const [selectedDifficulty, setSelectedDifficulty] = useState('ALL'); + + // Sorting + const [sortField, setSortField] = useState('number'); + const [sortOrder, setSortOrder] = useState('asc'); + + // Selection & Inspector + const [selectedCardIds, setSelectedCardIds] = useState>(new Set()); + const [activeCardId, setActiveCardId] = useState(null); + const [inspectorTab, setInspectorTab] = useState('front'); + const [isCopied, setIsCopied] = useState(false); + + // Operational states + const [actionLoading, setActionLoading] = useState(false); + const [statusMessage, setStatusMessage] = useState(null); + + // Mobile sub-view tab ('table' vs 'inspector') + const [mobileView, setMobileView] = useState<'table' | 'inspector'>('table'); + + const loadCards = useCallback(async () => { + setLoading(true); + setError(null); + try { + const data = await fetchManagedCards(); + setCards(data); + if (data.length > 0 && !activeCardId) { + setActiveCardId(data[0].id); + } + } catch (err: unknown) { + const msg = err instanceof Error ? err.message : 'Failed to load card database'; + setError(msg); + } finally { + setLoading(false); + } + }, [activeCardId]); + + useEffect(() => { + loadCards(); + }, [loadCards, refreshTrigger]); + + // Statistics calculation for all cards + const stats = useMemo(() => { + let dueCount = 0; + let enrolledCount = 0; + let newCount = 0; + let learningCount = 0; + let reviewingCount = 0; + let relearningCount = 0; + + for (const c of cards) { + if (c.is_enrolled) { + enrolledCount++; + if (c.is_due) dueCount++; + const state = c.fsrs_state ?? 0; + if (state === 1) learningCount++; + else if (state === 2) reviewingCount++; + else if (state === 3) relearningCount++; + } else { + newCount++; + } + } + + return { + total: cards.length, + due: dueCount, + enrolled: enrolledCount, + newCards: newCount, + learning: learningCount, + reviewing: reviewingCount, + relearning: relearningCount + }; + }, [cards]); + + // Unique patterns list with counts + const patternList = useMemo(() => { + const counts = new Map(); + for (const c of cards) { + counts.set(c.pattern, (counts.get(c.pattern) || 0) + 1); + } + const arr = Array.from(counts.entries()).map(([pattern, count]) => ({ pattern, count })); + arr.sort((a, b) => a.pattern.localeCompare(b.pattern)); + return arr; + }, [cards]); + + // Filtering cards + const filteredCards = useMemo(() => { + const q = searchQuery.trim().toLowerCase(); + return cards.filter((card) => { + // 1. Deck state filter + if (selectedDeck === 'due' && !card.is_due) return false; + if (selectedDeck === 'enrolled' && !card.is_enrolled) return false; + if (selectedDeck === 'new' && card.is_enrolled) return false; + if (selectedDeck === 'learning' && (!card.is_enrolled || card.fsrs_state !== 1)) return false; + if (selectedDeck === 'reviewing' && (!card.is_enrolled || card.fsrs_state !== 2)) return false; + if (selectedDeck === 'relearning' && (!card.is_enrolled || card.fsrs_state !== 3)) return false; + + // 2. Pattern filter + if (selectedPattern !== 'ALL' && card.pattern !== selectedPattern) return false; + + // 3. Difficulty filter + if (selectedDifficulty !== 'ALL' && card.difficulty !== selectedDifficulty) return false; + + // 4. Text query + if (q) { + const matchesNum = card.problem_number ? String(card.problem_number).includes(q) : false; + const matchesName = card.name.toLowerCase().includes(q); + const matchesPattern = card.pattern.toLowerCase().includes(q); + const matchesDiff = card.difficulty.toLowerCase().includes(q); + if (!matchesNum && !matchesName && !matchesPattern && !matchesDiff) return false; + } + + return true; + }); + }, [cards, selectedDeck, selectedPattern, selectedDifficulty, searchQuery]); + + // Sorting filtered cards + const sortedCards = useMemo(() => { + const list = [...filteredCards]; + list.sort((a, b) => { + let cmp = 0; + switch (sortField) { + case 'number': { + const numA = a.problem_number ?? 999999; + const numB = b.problem_number ?? 999999; + cmp = numA - numB; + break; + } + case 'name': + cmp = a.name.localeCompare(b.name); + break; + case 'pattern': + cmp = a.pattern.localeCompare(b.pattern); + break; + case 'difficulty': { + const diffWeight: Record = { Easy: 1, Medium: 2, Hard: 3 }; + cmp = (diffWeight[a.difficulty] || 2) - (diffWeight[b.difficulty] || 2); + break; + } + case 'state': { + const stateA = a.fsrs_state ?? -1; + const stateB = b.fsrs_state ?? -1; + cmp = stateA - stateB; + break; + } + case 'due': { + const dateA = a.next_review ? new Date(a.next_review).getTime() : 9999999999999; + const dateB = b.next_review ? new Date(b.next_review).getTime() : 9999999999999; + cmp = dateA - dateB; + break; + } + case 'retention': { + const rateA = a.total_attempts > 0 ? a.times_correct / a.total_attempts : 0; + const rateB = b.total_attempts > 0 ? b.times_correct / b.total_attempts : 0; + cmp = rateA - rateB; + break; + } + } + return sortOrder === 'asc' ? cmp : -cmp; + }); + return list; + }, [filteredCards, sortField, sortOrder]); + + // Active inspected card + const activeCard = useMemo(() => { + if (!activeCardId && sortedCards.length > 0) return sortedCards[0]; + return cards.find((c) => c.id === activeCardId) || sortedCards[0] || null; + }, [cards, activeCardId, sortedCards]); + + const toggleSort = (field: SortField) => { + if (sortField === field) { + setSortOrder(prev => (prev === 'asc' ? 'desc' : 'asc')); + } else { + setSortField(field); + setSortOrder('asc'); + } + }; + + const toggleSelectCard = (id: string, e: React.MouseEvent) => { + e.stopPropagation(); + setSelectedCardIds(prev => { + const next = new Set(prev); + if (next.has(id)) next.delete(id); + else next.add(id); + return next; + }); + }; + + // Filtered cards selection state + const isAllFilteredSelected = useMemo( + () => sortedCards.length > 0 && sortedCards.every(c => selectedCardIds.has(c.id)), + [sortedCards, selectedCardIds] + ); + + const toggleSelectAllFiltered = () => { + setSelectedCardIds(prev => { + const next = new Set(prev); + if (isAllFilteredSelected) { + for (const c of sortedCards) { + next.delete(c.id); + } + } else { + for (const c of sortedCards) { + next.add(c.id); + } + } + return next; + }); + }; + + // Custom problems in current selection + const customSelected = useMemo( + () => cards.filter(c => selectedCardIds.has(c.id) && c.is_custom), + [cards, selectedCardIds] + ); + + // Batch Delete selected custom cards + const handleBatchDeleteCustom = async () => { + if (customSelected.length === 0) return; + if (!confirm(`Are you sure you want to delete ${customSelected.length} custom cards?`)) return; + + setActionLoading(true); + try { + const count = await deleteCustomCards(customSelected.map(c => c.id)); + setStatusMessage(`Deleted ${count} custom cards.`); + setSelectedCardIds(prev => { + const next = new Set(prev); + for (const c of customSelected) next.delete(c.id); + return next; + }); + await loadCards(); + onRefreshExplorer?.(); + } catch (err: unknown) { + const msg = err instanceof Error ? err.message : 'Batch delete failed'; + setError(msg); + } finally { + setActionLoading(false); + setTimeout(() => setStatusMessage(null), 3500); + } + }; + + // Batch Enroll selected cards + const handleBatchEnroll = async () => { + const toEnroll = cards.filter(c => selectedCardIds.has(c.id) && !c.is_enrolled && c.catalogProblem); + if (toEnroll.length === 0) { + setStatusMessage('No unenrolled catalog cards in current selection.'); + setTimeout(() => setStatusMessage(null), 3000); + return; + } + + setActionLoading(true); + try { + const count = await enrollCatalogCards(toEnroll.map(c => c.catalogProblem!)); + setStatusMessage(`Enrolled ${count} cards into Daily Queue!`); + setSelectedCardIds(new Set()); + await loadCards(); + onRefreshExplorer?.(); + } catch (err: unknown) { + const msg = err instanceof Error ? err.message : 'Enrollment failed'; + setError(msg); + } finally { + setActionLoading(false); + setTimeout(() => setStatusMessage(null), 3500); + } + }; + + // Batch Reset selected cards + const handleBatchReset = async () => { + const enrolledSelected = cards.filter(c => selectedCardIds.has(c.id) && c.is_enrolled); + if (enrolledSelected.length === 0) { + setStatusMessage('No active cards in selection to reset.'); + setTimeout(() => setStatusMessage(null), 3000); + return; + } + + setActionLoading(true); + try { + await resetCardReviews(enrolledSelected.map(c => c.id)); + setStatusMessage(`Reset ${enrolledSelected.length} cards to initial FSRS state due today!`); + setSelectedCardIds(new Set()); + await loadCards(); + onRefreshExplorer?.(); + } catch (err: unknown) { + const msg = err instanceof Error ? err.message : 'Reset failed'; + setError(msg); + } finally { + setActionLoading(false); + setTimeout(() => setStatusMessage(null), 3500); + } + }; + + // Single card actions + const handleSingleReset = async (card: ManagedCard) => { + setActionLoading(true); + try { + await resetCardReviews([card.id]); + setStatusMessage(`Reset #${card.problem_number ?? '—'} ${card.name} for FSRS!`); + await loadCards(); + onRefreshExplorer?.(); + } catch (err: unknown) { + const msg = err instanceof Error ? err.message : 'Reset failed'; + setError(msg); + } finally { + setActionLoading(false); + setTimeout(() => setStatusMessage(null), 3500); + } + }; + + const handleSingleEnroll = async (card: ManagedCard) => { + if (!card.catalogProblem) return; + setActionLoading(true); + try { + await enrollCatalogCards([card.catalogProblem]); + setStatusMessage(`Enrolled #${card.problem_number ?? '—'} ${card.name} into review queue!`); + await loadCards(); + onRefreshExplorer?.(); + } catch (err: unknown) { + const msg = err instanceof Error ? err.message : 'Enrollment failed'; + setError(msg); + } finally { + setActionLoading(false); + setTimeout(() => setStatusMessage(null), 3500); + } + }; + + const handleSingleDelete = async (card: ManagedCard) => { + if (!confirm(`Are you sure you want to delete custom card "${card.name}"?`)) return; + setActionLoading(true); + try { + await deleteCustomCard(card.id); + setStatusMessage(`Deleted custom card "${card.name}"`); + await loadCards(); + onRefreshExplorer?.(); + } catch (err: unknown) { + const msg = err instanceof Error ? err.message : 'Delete failed'; + setError(msg); + } finally { + setActionLoading(false); + setTimeout(() => setStatusMessage(null), 3500); + } + }; + + const handleReviewNow = useCallback((card: ManagedCard) => { + onSelectProblemForReview(card.id); + onOpenQueue(); + }, [onSelectProblemForReview, onOpenQueue]); + + const handleEditCard = (card: ManagedCard) => { + const problemItem: ProblemItem = { + id: card.id, + name: card.name, + problem_number: card.problem_number, + pattern: card.pattern, + difficulty: card.difficulty, + description: card.description, + examples: card.examples, + constraints: card.constraints, + optimal_time: card.optimal_time, + optimal_space: card.optimal_space, + starter_code: card.starter_code, + reference_code: card.reference_code, + how_to_solve: card.how_to_solve, + solutions: card.solutions + }; + onOpenEditProblem(problemItem); + }; + + const copyReferenceCode = () => { + if (!activeCard?.reference_code) return; + navigator.clipboard.writeText(activeCard.reference_code); + setIsCopied(true); + setTimeout(() => setIsCopied(false), 2000); + }; + + const formatDueDate = (dateStr: string | null | undefined, isDue: boolean, isEnrolled: boolean) => { + if (!isEnrolled) return 'Not enrolled'; + if (!dateStr) return 'Due now'; + if (isDue) return 'Due today'; + const d = new Date(dateStr); + const now = new Date(); + const diffDays = Math.ceil((d.getTime() - now.getTime()) / (1000 * 60 * 60 * 24)); + if (diffDays <= 1) return 'Tomorrow'; + return `In ${diffDays}d`; + }; + + // Keyboard navigation across cards (Up/Down arrow, Space to flip tab, Enter to review) + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + const target = e.target as HTMLElement; + if ( + target.tagName === 'INPUT' || + target.tagName === 'TEXTAREA' || + target.tagName === 'SELECT' || + target.isContentEditable + ) { + return; + } + + if (sortedCards.length === 0) return; + + const currentIdx = sortedCards.findIndex(c => c.id === activeCard?.id); + + if (e.key === 'ArrowDown') { + e.preventDefault(); + const nextIdx = currentIdx < sortedCards.length - 1 ? currentIdx + 1 : 0; + setActiveCardId(sortedCards[nextIdx].id); + } else if (e.key === 'ArrowUp') { + e.preventDefault(); + const prevIdx = currentIdx > 0 ? currentIdx - 1 : sortedCards.length - 1; + setActiveCardId(sortedCards[prevIdx].id); + } else if (e.key === ' ' || e.code === 'Space') { + e.preventDefault(); + setInspectorTab(prev => (prev === 'front' ? 'back' : 'front')); + } else if (e.key === 'Enter') { + if (activeCard?.is_enrolled) { + e.preventDefault(); + handleReviewNow(activeCard); + } + } + }; + + window.addEventListener('keydown', handleKeyDown); + return () => window.removeEventListener('keydown', handleKeyDown); + }, [sortedCards, activeCard, handleReviewNow]); + + return ( +
+ {/* 1. Header Toolbar (Anki Deck Browser Banner) */} +
+
+
+ +
+
+

+ MANAGE FSRS +

+

+ Browse, filter, and reschedule spaced-repetition cards +

+
+
+ + {/* Global Stats Badges */} +
+ + + + + + + +
+ + {/* Global Actions */} +
+ + +
+
+ + {/* Status or Alert Notification Banner */} + {statusMessage && ( +
+
+ + {statusMessage} +
+ +
+ )} + {error && ( +
+ {error} + +
+ )} + + {/* Mobile Tab Switcher */} +
+ + +
+ + {/* 2. Main Workspace Body (3-Column Layout: Left Sidebar + Center Table + Right Inspector) */} +
+ {/* LEFT COLUMN: Deck / Category / Tag Tree */} + + + {/* CENTER COLUMN: Search bar + Multi-Select Actions + Card Table */} +
+ {/* Quick Search & Filter Controls */} +
+
+ + setSearchQuery(e.target.value)} + placeholder="Search by card #, title, pattern, or keyword..." + className="w-full pl-8 pr-3 py-1.5 bg-white border-2 border-ink-black text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-sky-500 shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]" + /> + {searchQuery && ( + + )} +
+ +
+ + + + {sortedCards.length} matching cards + +
+
+ + {/* Sticky Multi-Select Batch Actions Bar */} + {selectedCardIds.size > 0 && ( +
+
+ + {selectedCardIds.size} SELECTED + {customSelected.length > 0 && ` (${customSelected.length} custom)`} + + +
+ +
+ + + {customSelected.length > 0 && ( + + )} +
+
+ )} + + {/* Anki Card Data Table */} +
+ + + + + + + + + + + + + + + {sortedCards.length === 0 ? ( + + + + ) : ( + sortedCards.map((card) => { + const isSelected = selectedCardIds.has(card.id); + const isActive = activeCard?.id === card.id; + + return ( + { + setActiveCardId(card.id); + setMobileView('inspector'); + }} + onDoubleClick={() => { + if (card.is_enrolled) { + handleReviewNow(card); + } else { + handleEditCard(card); + } + }} + className={`cursor-pointer transition-colors ${isActive + ? 'bg-sky-100 font-semibold' + : isSelected + ? 'bg-amber-50' + : 'hover:bg-slate-50' + }`} + > + + + + + + + + + + ); + }) + )} + +
+ + toggleSort('number')} + className="p-2 w-16 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20" + > +
+ # + +
+
toggleSort('name')} + className="p-2 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20" + > +
+ CARD TITLE + +
+
toggleSort('pattern')} + className="p-2 hidden md:table-cell cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20" + > +
+ DECK / PATTERN + +
+
toggleSort('difficulty')} + className="p-2 w-20 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20" + > +
+ DIFF + +
+
toggleSort('state')} + className="p-2 w-24 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20" + > +
+ FSRS STATE + +
+
toggleSort('due')} + className="p-2 w-24 cursor-pointer hover:bg-amber-200/50 border-r border-ink-black/20" + > +
+ DUE + +
+
toggleSort('retention')} + className="p-2 w-20 hidden lg:table-cell cursor-pointer hover:bg-amber-200/50" + > +
+ RETENTION + +
+
+ No cards match current filter criteria. +
toggleSelectCard(card.id, e)} + > + {isSelected ? ( + + ) : ( + + )} + + {card.problem_number ? `#${card.problem_number}` : '—'} + +
+ {card.name} + {card.is_custom && ( + + CUSTOM + + )} +
+
+ {card.pattern} + + + {card.difficulty} + + + {card.is_enrolled ? ( + + + {(card.fsrs_state ?? 0) === 0 + ? 'New' + : (card.fsrs_state ?? 0) === 1 + ? 'Learning' + : (card.fsrs_state ?? 0) === 2 + ? 'Review' + : 'Relearning'} + + ) : ( + + Unenrolled + + )} + + + {formatDueDate(card.next_review, card.is_due, card.is_enrolled)} + + + {card.total_attempts > 0 ? ( + + {card.times_correct}/{card.total_attempts}{' '} + + ({Math.round((card.times_correct / card.total_attempts) * 100)}%) + + + ) : ( + — + )} +
+
+
+ + {/* RIGHT COLUMN: Anki Card Inspector & Detail Pane */} + +
+
+ ); +} diff --git a/algospaced-ui/src/components/desktop/DesktopStartMenu.tsx b/algospaced-ui/src/components/desktop/DesktopStartMenu.tsx index f9383b1bbcca5bfb4ca7b93469e7d822888d2f69..af1fbbaccb1cc298421b6b1420b757fa20abd386 100644 --- a/algospaced-ui/src/components/desktop/DesktopStartMenu.tsx +++ b/algospaced-ui/src/components/desktop/DesktopStartMenu.tsx @@ -3,7 +3,6 @@ import React from 'react'; interface DesktopStartMenuProps extends React.HTMLAttributes { isOpen: boolean; onOpenWindow: (id: string) => void; - onOpenOnboarding: () => void; onTriggerSync: () => void; onSignOut: () => void; style?: React.CSSProperties; @@ -14,7 +13,6 @@ export const DesktopStartMenu = React.forwardRef Daily Queue + -
) : (
- {syncResult || 'Idle. Ready to synchronize Leitner box data logs from Sheets drive storage.'} + {syncResult || 'Idle. Ready to synchronize review data logs from Sheets drive storage.'}
)} @@ -495,6 +494,44 @@ export const DesktopWindowContainer: React.FC = ({ )} + {/* 10. Anki Card Manager Window */} + {windows.cardManager?.isOpen && ( + closeWindow('cardManager')} + onMinimize={() => minimizeWindow('cardManager')} + activeWindow={activeWindow} + setActiveWindow={setActiveWindow} + defaultWidth="1020px" + defaultHeight="700px" + minWidth={520} + minHeight={420} + titleBarColor="#0284c7" + isMobile={isMobile} + > + + Loading CardManager.exe... + + } + > + openWindow('queue')} + onOpenCreateProblem={() => openWindow('createProblem')} + onOpenEditProblem={openEditProblem} + onSelectProblemForReview={handleSelectProblemForReview} + refreshTrigger={refreshExplorerTrigger} + onRefreshExplorer={triggerRefreshExplorer} + /> + + + )} + ); }; diff --git a/algospaced-ui/src/components/desktop/MobileMetroScreen.tsx b/algospaced-ui/src/components/desktop/MobileMetroScreen.tsx index 6f65a54ec591137714e4831c9da47c9d519a63f4..5705f4a048a2834e2651872c2f5af362dfce46df 100644 --- a/algospaced-ui/src/components/desktop/MobileMetroScreen.tsx +++ b/algospaced-ui/src/components/desktop/MobileMetroScreen.tsx @@ -74,6 +74,19 @@ export const MobileMetroScreen: React.FC = ({ + {/* Card Manager Tile */} + + {/* Journey Path Tile */}