@donotdev/ui 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/assets/fonts/fonts.css +4 -4
  2. package/dist/components/auth/AuthHeader.d.ts +5 -0
  3. package/dist/components/auth/AuthHeader.d.ts.map +1 -1
  4. package/dist/components/auth/AuthHeader.js +22 -8
  5. package/dist/components/auth/AuthMenu.d.ts +6 -2
  6. package/dist/components/auth/AuthMenu.d.ts.map +1 -1
  7. package/dist/components/auth/AuthMenu.js +2 -2
  8. package/dist/components/common/RedirectOverlay.d.ts +37 -0
  9. package/dist/components/common/RedirectOverlay.d.ts.map +1 -0
  10. package/dist/components/common/RedirectOverlay.js +243 -0
  11. package/dist/components/common/index.d.ts +1 -0
  12. package/dist/components/common/index.d.ts.map +1 -1
  13. package/dist/components/common/index.js +1 -0
  14. package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
  15. package/dist/components/layout/components/header/SettingsMenu.js +1 -1
  16. package/dist/crud/components/DisplayFieldRenderer.js +1 -1
  17. package/dist/dndev.css +447 -63
  18. package/dist/index.js +4 -4
  19. package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
  20. package/dist/internal/devtools/components/DesignTab.js +25 -3
  21. package/dist/internal/layout/components/PerformanceHints.d.ts.map +1 -1
  22. package/dist/internal/layout/components/PerformanceHints.js +3 -2
  23. package/dist/internal/layout/config/presets/admin.d.ts +2 -2
  24. package/dist/internal/layout/config/presets/admin.d.ts.map +1 -1
  25. package/dist/internal/layout/config/presets/admin.js +8 -4
  26. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  27. package/dist/providers/NextJsAppProviders.js +4 -1
  28. package/dist/routing/hooks/hooks.next.d.ts +1 -0
  29. package/dist/routing/hooks/hooks.next.d.ts.map +1 -1
  30. package/dist/routing/hooks/hooks.next.js +1 -1
  31. package/dist/routing/hooks/hooks.vite.d.ts +1 -0
  32. package/dist/routing/hooks/hooks.vite.d.ts.map +1 -1
  33. package/dist/routing/hooks/hooks.vite.js +1 -1
  34. package/dist/routing/hooks/useRouteParam.next.d.ts +18 -0
  35. package/dist/routing/hooks/useRouteParam.next.d.ts.map +1 -0
  36. package/dist/routing/hooks/useRouteParam.next.js +38 -0
  37. package/dist/routing/hooks/useRouteParam.vite.d.ts +18 -0
  38. package/dist/routing/hooks/useRouteParam.vite.d.ts.map +1 -0
  39. package/dist/routing/hooks/useRouteParam.vite.js +38 -0
  40. package/dist/routing/index.d.ts +1 -1
  41. package/dist/routing/index.d.ts.map +1 -1
  42. package/dist/routing/index.js +1 -1
  43. package/dist/styles/index.css +443 -59
  44. package/dist/utils/useCrudSafe.d.ts.map +1 -1
  45. package/dist/utils/useCrudSafe.js +2 -1
  46. package/dist/vite-routing/RootLayout.d.ts.map +1 -1
  47. package/dist/vite-routing/RootLayout.js +4 -1
  48. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use client";var Do=Object.defineProperty;var Tr=(t,e,o)=>e in t?Do(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var ce=(t,e)=>()=>(t&&(e=t(t=0)),e);var Ao=(t,e)=>{for(var o in e)Do(t,o,{get:e[o],enumerable:!0})};var ze=(t,e,o)=>Tr(t,typeof e!="symbol"?e+"":e,o);import*as Oe from"lucide-react";import{isValidElement as Sr}from"react";import{cn as ut}from"@donotdev/components";import{jsx as xe}from"react/jsx-runtime";function kr(t){if(!t)return Oe.Palette;let e=t.replace(/['"]/g,"");return Oe[e]||Oe.Palette}var F,wr,oe=ce(()=>{"use strict";F=({icon:t,fallback:e,className:o,ariaHidden:n=!1})=>{let r=t||e;if(!r)return null;let a="dndev-size-md";if(typeof r=="function"||typeof r=="object"&&r!==null&&"render"in r)return xe(r,{className:ut(a,o),style:{flexShrink:0},"aria-hidden":n});if(typeof r=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(r))return xe("span",{className:ut(a,o),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r});let s=kr(r);return xe(s,{className:ut(a,o),style:{flexShrink:0},"aria-hidden":n})}return Sr(r)?xe("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r}):xe("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r})},wr=F});import{DEGRADED_AUTH_API as Er}from"@donotdev/core";import*as Br from"@donotdev/auth";function Mr(t){return Er[t]}function S(t){return gt?gt(t):Mr(t)}var gt,Vm,Ce=ce(()=>{"use strict";gt=Br?.useAuth;Vm=typeof gt=="function"});var yt={};Ao(yt,{default:()=>Jr});import{Cookie as ft,Settings as zr,Shield as Or,BarChart3 as Ur,Target as Vr}from"lucide-react";import{useState as ht,useEffect as Ve,useRef as Gr}from"react";import{Accordion as Hr,Button as Te,BUTTON_VARIANT as Ge,Card as Ro,Switch as _r,Text as Se,cn as $r,Stack as Z}from"@donotdev/components";import{handleError as Wr,useConsent as ne,getCookieExamples as He,hasOptionalCookies as Kr}from"@donotdev/core";import{CONSENT_CATEGORY as re}from"@donotdev/core";import{useTranslation as Yr}from"@donotdev/core";import{isClient as qr}from"@donotdev/core";import{Fragment as Qr,jsx as D,jsxs as J}from"react/jsx-runtime";function Zr({position:t="bottom",showBranding:e=!0,brandingText:o="Powered by DoNotDev Framework",className:n=""}){let r=ne("hasConsented"),a=ne("categories"),i=ne("acceptAll"),p=ne("declineAll"),s=ne("updateCategory"),c=ne("showBanner"),d=ne("showCookieBanner"),{t:l}=Yr("cookies"),[g,m]=ht(!1),[f,u]=ht(!r||c),[h,y]=ht(a),v=Gr(null);Ve(()=>{c&&u(!0)},[c]);let N=Object.keys(a),E=[{id:re.NECESSARY,icon:Or,title:l("essentialCookies"),description:l("essentialDescription"),examples:He("necessary")||l("essentialExamples"),locked:!0},{id:re.FUNCTIONAL,icon:ft,title:l("functionalCookies"),description:l("functionalDescription"),examples:He("functional")||l("functionalExamples"),legalNotice:l("functionalLegalNotice"),locked:!1},{id:re.ANALYTICS,icon:Ur,title:l("analyticsCookies"),description:l("analyticsDescription"),examples:He("analytics")||l("analyticsExamples"),locked:!1},{id:re.MARKETING,icon:Vr,title:l("marketingCookies"),description:l("marketingDescription"),examples:He("marketing")||l("marketingExamples"),locked:!1}].filter(C=>N.includes(C.id)),Y=Kr();if(Ve(()=>{!r&&!Y&&i()},[r,Y,i]),Ve(()=>{let C={...a};if(g){let L=C;Object.keys(L).forEach(H=>{H!==re.NECESSARY&&L[H]===!1&&(L[H]=!0)})}y(C)},[a,g]),Ve(()=>{if(!qr()||r||!f)return;let C=H=>{v.current&&!v.current.contains(H.target)&&u(!1)},L=setTimeout(()=>{document.addEventListener("mousedown",C)},100);return()=>{clearTimeout(L),document.removeEventListener("mousedown",C)}},[r,f]),r&&!c)return null;let U=()=>{try{Object.entries(h).forEach(([C,L])=>{if(C!==re.NECESSARY&&L!==void 0){let H=C;Object.values(re).includes(H)&&s(H,!!L)}}),m(!1),u(!1)}catch(C){Wr(C,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},k=()=>{i(),u(!1)},x=()=>{p(),u(!1)},z=J(Z,{gap:"medium",children:[D(Se,{as:"p",variant:"muted",level:"small",children:l("cookieBannerDescription")}),Y&&D(Hr,{type:"single",collapsible:!0,value:g?"preferences":"",onValueChange:C=>m(C==="preferences"),items:[{value:"preferences",trigger:J(Z,{direction:"row",align:"center",gap:"tight",children:[D(zr,{className:"dndev-size-md"}),l("customize")]}),content:D(Z,{gap:"medium",children:E.map(C=>{let L=C.icon,H=h[C.id]??!1;return D(Ro,{content:J(Z,{direction:"row",align:"center",justify:"between",gap:"medium",children:[J(Z,{direction:"row",align:"start",gap:"tight",style:{flex:1},children:[D(L,{className:"dndev-size-md",style:{color:"var(--primary)",marginTop:"0.125rem"}}),J(Z,{gap:"tight",children:[D(Se,{as:"span",level:"body",style:{fontWeight:600},children:C.title}),D(Se,{as:"span",variant:"muted",level:"small",children:C.description}),C.examples&&D(Se,{as:"span",variant:"muted",level:"small",style:{fontStyle:"italic"},children:C.examples})]})]}),C.locked?D(Se,{as:"span",variant:"muted",level:"small",children:l("alwaysOn")}):D(_r,{checked:H,onCheckedChange:xr=>y(Cr=>({...Cr,[C.id]:xr}))})]})},C.id)})})}]})]}),le=g?J(Z,{direction:"row",gap:"tight",style:{width:"100%"},children:[D(Te,{onClick:U,variant:Ge.DEFAULT,style:{flex:1},children:l("savePreferences","Save Preferences")}),D(Te,{onClick:()=>m(!1),variant:Ge.OUTLINE,style:{flex:1},children:l("form.cancel","Cancel")})]}):J(Z,{direction:"row",gap:"tight",style:{width:"100%"},children:[D(Te,{onClick:k,variant:Ge.DEFAULT,style:{flex:1},children:l("acceptAll")}),Y&&D(Te,{onClick:x,variant:Ge.OUTLINE,style:{flex:1},children:l("declineOptional")})]});return J(Qr,{children:[f&&D(Ro,{ref:v,className:$r("dndev-fixed dndev-z-modal",n),icon:ft,title:l("cookiePreferences"),content:z,footer:le,style:{[t==="top"?"top":"bottom"]:"var(--gap-md)",left:"var(--gap-md)",right:"var(--gap-md)",maxWidth:"100%",width:"calc(100% - var(--gap-md) * 2)"}}),!f&&!r&&D(Te,{onClick:()=>u(!0),className:"dndev-fixed dndev-z-toast",style:{bottom:"var(--gap-md)",left:"var(--gap-md)"},icon:ft,title:l("cookiePreferences")})]})}var Jr,vt=ce(()=>{"use strict";Jr=Zr});import{useMemo as Ka}from"react";import{useNavigationStore as Ya}from"@donotdev/core";import{USER_ROLES as qa}from"@donotdev/core";import{useLocation as Za}from"@donotdev/ui/routing/hooks";function _(){let t=Za(),e=S("user"),o=!!e,n=e?.role||qa.GUEST,r=Ya(a=>!a||typeof a.getFilteredRoutes!="function"?[]:a.getFilteredRoutes({authenticated:o,role:n}));return Ka(()=>Array.isArray(r)?r.map(a=>({...a,isActive:Ja(a.path,t.pathname),hasChildren:!1,children:void 0})).sort((a,i)=>a.label.localeCompare(i.label)):[],[r,t.pathname])}function Ja(t,e){return t==="/"?e==="/":e===t?!0:e.startsWith(t+"/")}var ge=ce(()=>{"use strict";Ce()});import{useCallback as Ke,useMemo as Ho}from"react";import{useNavigationStore as Ne}from"@donotdev/core";import{useNavigate as Qa}from"@donotdev/ui/routing/hooks";var _o,Tt=ce(()=>{"use strict";ge();_o=()=>{let t=Qa(),e=_()??[],o=Ne(m=>m.favorites),n=Ne(m=>m.recent),r=Ne(m=>m.toggleFavorite),a=Ne(m=>m.isFavorite),i=Ne(m=>m.addRecent),p=Ho(()=>e.length?e.filter(m=>o.includes(m.path)):[],[o,e]),s=Ho(()=>e.length?e.filter(f=>n.includes(f.path)).slice(0,5):[],[n,e]),c=Ke(m=>{r(m)},[r]),d=Ke(m=>a(m),[a]),l=Ke(m=>{i(m)},[i]),g=Ke(m=>{l(m),t(m)},[t,l]);return{navigationItems:e,favoriteItems:p,recentItems:s,toggleFavorite:c,isFavorite:d,navigateToItem:g}}});var Wo={};Ao(Wo,{default:()=>ci});import{Star as Xa,Clock as ja,Link as ei}from"lucide-react";import{useCallback as $o,useEffect as ti,useRef as oi}from"react";import{Badge as ni,Command as ri,CommandDialog as ai}from"@donotdev/components";import{useOverlayStore as Ye}from"@donotdev/core";import{useTranslation as ii}from"@donotdev/core";import{jsx as A,jsxs as fe}from"react/jsx-runtime";var si,li,ci,Ko=ce(()=>{"use strict";Tt();oe();si=()=>{let{t}=ii("dndev"),e=oi(null),o=Ye(u=>u.isCommandDialogOpen),n=Ye(u=>u.commandDialogInitialSearch),r=Ye(u=>u.closeCommandDialog),{navigationItems:a,favoriteItems:i,recentItems:p,toggleFavorite:s,isFavorite:c,navigateToItem:d}=_o();ti(()=>{o&&requestAnimationFrame(()=>{e.current?.focus()})},[o]);let l=$o(u=>{d(u),r()},[d,r]),g=$o((u,h=!0)=>u.map(y=>({label:y.label,value:y.path,description:y.path!==y.label?y.path:void 0,icon:A(F,{icon:y.icon,fallback:ei}),badge:y.badge?A(ni,{children:y.badge}):void 0,onSelect:()=>l(y.path),rightSlot:h?A("button",{type:"button",onClick:v=>{v.stopPropagation(),s(y.path)},className:"dndev-command-favorite-button","data-favorited":c(y.path),"aria-label":c(y.path)?t("globalGoTo.unfavorite","Remove from favorites"):t("globalGoTo.favorite","Add to favorites"),children:A(F,{icon:Xa,className:"dndev-size-sm"})}):void 0})),[l,s,c,t]),m=[];if(i.length>0&&m.push({heading:t("globalGoTo.favorites","Favorites"),items:g(i,!1)}),p.length>0){let u=p.flatMap(h=>g([h],!0)).map(h=>({...h,icon:A(F,{icon:ja,className:"dndev-size-sm"})}));u.length>0&&m.push({heading:t("globalGoTo.recent","Recent"),separator:i.length>0,items:u})}m.push({heading:t("globalGoTo.allPages","All Pages"),separator:i.length>0||p.length>0,items:g(a)});let f=a.length>0;return fe(ai,{open:o,onOpenChange:u=>u?null:r(),children:[A(ri,{placeholder:t("globalGoTo.placeholder","Search pages..."),emptyMessage:f?t("globalGoTo.noResults","No results found."):t("globalGoTo.empty","No pages available."),groups:m}),A("div",{className:"dndev-command-footer",children:fe("div",{className:"dndev-command-footer-shortcuts",children:[fe("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),A("span",{children:t("globalGoTo.shortcutOpen","Open")})]}),fe("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),A("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),A("span",{children:t("globalGoTo.shortcutNavigate","Navigate")})]}),fe("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),A("span",{children:t("globalGoTo.shortcutSelect","Select")})]}),fe("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"Esc"}),A("span",{children:t("globalGoTo.shortcutClose","Close")})]})]})})]})},li=()=>Ye(e=>e.isCommandDialogOpen)?A(si,{}):null,ci=li});import{User as Et}from"lucide-react";import{Suspense as ln,lazy as cn}from"react";import{Button as Bt,BUTTON_VARIANT as Mt,DropdownMenu as Ds,DISPLAY as As}from"@donotdev/components";import{useTranslation as Is}from"@donotdev/core";import{useAuthConfig as Ps}from"@donotdev/core";import{getEnabledAuthPartners as Fs}from"@donotdev/core";import{User as ns,LogOut as rs,Settings as Ae,UserCheck as as,Trash2 as is}from"lucide-react";import*as ss from"lucide-react";import Xe,{useMemo as ls,lazy as an,Suspense as rn}from"react";import{Avatar as cs,Button as ps,BUTTON_VARIANT as ds,DropdownMenu as ms,Text as us,DISPLAY as gs}from"@donotdev/components";import{useTranslation as fs}from"@donotdev/core";import{getEnabledAuthPartners as hs,useAuthConfig as ys,isClient as vs}from"@donotdev/core";import{useBreakpoint as bs}from"@donotdev/core";oe();import{Link as Io}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as Nr}from"@donotdev/core";import{useNavigate as Dr}from"@donotdev/ui/routing/hooks";import{Fragment as Ar,jsx as pe,jsxs as Po}from"react/jsx-runtime";var T=({path:t,replace:e,prefetch:o=!0,children:n,icon:r,label:a,onClick:i,className:p,"aria-label":s,"aria-describedby":c,target:d,rel:l,...g})=>{let m=Dr();if(t==="#cookie-settings"){let v=Nr("showCookieBanner");return Po("a",{href:"#cookie-settings",onClick:E=>{E.preventDefault(),E.stopPropagation();try{v()}catch{}i&&i(E)},className:p,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0,...g.style},"aria-label":s||a||"Cookie Settings","aria-describedby":c,...g,children:[r&&pe(F,{icon:r,fallback:Io}),a&&pe("span",{children:a}),n]})}let f=t.startsWith("http://")||t.startsWith("https://")||t.startsWith("mailto:")||t.startsWith("tel:"),u=v=>{if(f){i&&i(v);return}v.preventDefault(),i&&i(v);let N=t.startsWith("/")?t:`/${t}`;m(N,{replace:e})},h={"aria-label":s||a,"aria-describedby":c},y=Po(Ar,{children:[r&&pe(F,{icon:r,fallback:Io}),a&&pe("span",{children:a}),n]});return f?pe("a",{href:t,onClick:u,target:d||"_blank",rel:l||"noopener noreferrer",className:p,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...h,...g,children:y}):pe("a",{href:t,onClick:u,className:p,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...h,...g,children:y})};import{useEffect as Eo,useState as Xr,lazy as jr,Suspense as ea}from"react";import{Stack as Bo}from"@donotdev/components";import{FEATURE_STATUS as bt,USER_ROLES as _e,SUBSCRIPTION_TIERS as xt}from"@donotdev/core";import{useRedirectGuard as ta,useNavigate as oa}from"@donotdev/ui/routing/hooks";import{RefreshCw as Fo}from"lucide-react";import{Suspense as Ir}from"react";import{cn as Pr}from"@donotdev/components";import{useLoadingState as Fr}from"@donotdev/core";import{jsx as q}from"react/jsx-runtime";var Lo=({variant:t="fullPage",className:e})=>t==="inline"?q("div",{className:e,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:q(Fo,{className:"dndev-size-md",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}):q("div",{className:Pr("dndev-loading-overlay",e),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:q(Fo,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}),Lr=({variant:t="fullPage",className:e,isLoading:o})=>{let{isLoading:n}=Fr();return o??n?q(Lo,{variant:t,className:e}):null},Rr=t=>q(Ir,{fallback:q(Lo,{variant:t.variant,className:t.className}),children:q(Lr,{...t})}),Ue=Rr;Ce();import{Fragment as Mo,jsx as I,jsxs as zo}from"react/jsx-runtime";var na=jr(()=>Promise.resolve().then(()=>(vt(),yt)));function ra({auth:t,children:e,fallback:o=Ue}){let n=oa(),r=S("user"),a=S("can"),i=S("status"),[p,s]=Xr(!1),{shouldRedirect:c,redirectTo:d,isChecking:l}=ta({auth:t});return Eo(()=>{let g=setTimeout(()=>{i===bt.INITIALIZING&&s(!0)},5e3);return()=>clearTimeout(g)},[i]),Eo(()=>{c&&d&&n(d,{replace:!0})},[c,d,n]),t===!1?I(Mo,{children:e}):c||l?I(Ue,{}):i===bt.INITIALIZING&&p?I(Bo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:zo("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[I("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),I("p",{style:{marginBottom:"var(--gap-md)",color:"var(--muted-foreground)"},children:"This might be due to a slow connection. Please wait or try refreshing the page."}),I("button",{onClick:()=>window.location.reload(),style:{padding:"var(--gap-sm) var(--gap-md)",backgroundColor:"var(--primary)",color:"var(--primary-foreground)",border:"none",borderRadius:"var(--radius)",cursor:"pointer"},children:"Refresh Page"})]})}):i===bt.INITIALIZING?I(o,{}):t&&typeof t=="object"&&t.required&&!r&&a&&!a.navigate(t)?I(Bo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:zo("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[I("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),I("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),I(ea,{fallback:I("div",{children:"Loading consent..."}),children:I(na,{})})]})}):I(Mo,{children:e})}function aa(t){return S("can")?.navigate(t)??!1}var n1=aa;function r1(){return S("user")?.role||_e.GUEST}function a1(t){return S("user")?.role===t}function i1(){let t=S("user"),e=S("userSubscription"),o=S("loading");return{authenticated:!!t,role:t?.role,tier:e?.tier||"free",loading:o,userId:t?.id}}function s1(t,e){return n=>I(ra,{auth:e,children:I(t,{...n})})}var l1={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:_e.USER}),admin:()=>({required:!0,role:_e.ADMIN}),tier:t=>({required:!0,tier:t}),pro:()=>({required:!0,tier:xt.PRO}),premium:()=>({required:!0,tier:xt.PREMIUM}),adminPro:()=>({required:!0,role:_e.ADMIN,tier:xt.PRO}),custom:t=>({required:!0,validate:t})};import{ArrowLeft as wa,Lock as Na}from"lucide-react";import{Suspense as Da,lazy as Aa}from"react";import{Card as Ia,Button as Pa,Separator as Fa,Stack as ue,cn as La}from"@donotdev/components";import{useTranslation as Ra}from"@donotdev/core";import"@donotdev/core";import{useLocation as Ea,useBack as Ba}from"@donotdev/ui/routing/hooks";import{Suspense as Sa}from"react";import{cn as ka}from"@donotdev/components";import{Component as ia}from"react";import{handleError as sa}from"@donotdev/core";var Ct=class extends ia{constructor(o){super(o);ze(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,n){sa(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:n,component:"DnDevErrorBoundary",level:this.props.level||"component"},showNotification:!1})}render(){return this.state.hasError?this.props.fallback({error:this.state.error,resetError:this.resetError,componentStack:null,eventId:null}):this.props.children}},Oo=Ct;import{AlertTriangle as la,Home as ca,ArrowLeft as pa,RotateCw as da,Copy as ma,Check as ua}from"lucide-react";import{useEffect as ga,useState as fa}from"react";import{Button as $e,BUTTON_VARIANT as We,Card as Uo,CARD_VARIANT as Vo,Alert as ha,ALERT_VARIANT as ya,Stack as de}from"@donotdev/components";import{handleError as va,useTranslation as ba}from"@donotdev/core";import{useLocation as xa,useBack as Ca}from"@donotdev/ui/routing/hooks";import{jsx as P,jsxs as ae}from"react/jsx-runtime";var Ta=({error:t,resetError:e,componentStack:o,eventId:n})=>{let{t:r}=ba("dndev"),[a,i]=fa(!1),p=Ca(),c=xa()?.pathname||(typeof window<"u"?window.location.pathname:"/"),d=t instanceof Error?t.message:"Unknown error",l=t instanceof Error?t.stack:void 0,g=!1;ga(()=>{try{va(t,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:c}})}catch{}},[t,c]);let m=async()=>{if(!l)return;let h=[`Error: ${d}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,n?`Event ID: ${n}`:null,`Path: ${c}`,"","Stack Trace:",l,o?`
1
+ "use client";var Fo=Object.defineProperty;var Ar=(t,e,o)=>e in t?Fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var de=(t,e)=>()=>(t&&(e=t(t=0)),e);var Lo=(t,e)=>{for(var o in e)Fo(t,o,{get:e[o],enumerable:!0})};var Ge=(t,e,o)=>Ar(t,typeof e!="symbol"?e+"":e,o);import*as He from"lucide-react";import{isValidElement as Ir}from"react";import{cn as vt}from"@donotdev/components";import{jsx as Se}from"react/jsx-runtime";function Fr(t){if(!t)return He.Palette;let e=t.replace(/['"]/g,"");return He[e]||He.Palette}var R,Lr,ae=de(()=>{"use strict";R=({icon:t,fallback:e,className:o,ariaHidden:n=!1})=>{let r=t||e;if(!r)return null;let a="dndev-size-md";if(typeof r=="function"||typeof r=="object"&&r!==null&&"render"in r)return Se(r,{className:vt(a,o),style:{flexShrink:0},"aria-hidden":n});if(typeof r=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(r))return Se("span",{className:vt(a,o),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r});let l=Fr(r);return Se(l,{className:vt(a,o),style:{flexShrink:0},"aria-hidden":n})}return Ir(r)?Se("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r}):Se("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r})},Lr=R});import{DEGRADED_AUTH_API as Gr}from"@donotdev/core";import*as Hr from"@donotdev/auth";function _r(t){return Gr[t]}function k(t){return bt?bt(t):_r(t)}var bt,su,ke=de(()=>{"use strict";bt=Hr?.useAuth;su=typeof bt=="function"});var Tt={};Lo(Tt,{default:()=>na});import{Cookie as xt,Settings as $r,Shield as Wr,BarChart3 as Kr,Target as Yr}from"lucide-react";import{useState as Ct,useEffect as $e,useRef as qr}from"react";import{Accordion as Zr,Button as we,BUTTON_VARIANT as We,Card as Oo,Switch as Jr,Text as Ne,cn as Qr,Stack as Q}from"@donotdev/components";import{handleError as Xr,useConsent as ie,getCookieExamples as Ke,hasOptionalCookies as jr}from"@donotdev/core";import{CONSENT_CATEGORY as se}from"@donotdev/core";import{useTranslation as ea}from"@donotdev/core";import{isClient as ta}from"@donotdev/core";import{Fragment as ra,jsx as P,jsxs as X}from"react/jsx-runtime";function oa({position:t="bottom",showBranding:e=!0,brandingText:o="Powered by DoNotDev Framework",className:n=""}){let r=ie("hasConsented"),a=ie("categories"),i=ie("acceptAll"),c=ie("declineAll"),l=ie("updateCategory"),d=ie("showBanner"),m=ie("showCookieBanner"),{t:s}=ea("cookies"),[g,p]=Ct(!1),[f,u]=Ct(!r||d),[h,v]=Ct(a),y=qr(null);$e(()=>{d&&u(!0)},[d]);let S=Object.keys(a),w=[{id:se.NECESSARY,icon:Wr,title:s("essentialCookies"),description:s("essentialDescription"),examples:Ke("necessary")||s("essentialExamples"),locked:!0},{id:se.FUNCTIONAL,icon:xt,title:s("functionalCookies"),description:s("functionalDescription"),examples:Ke("functional")||s("functionalExamples"),legalNotice:s("functionalLegalNotice"),locked:!1},{id:se.ANALYTICS,icon:Kr,title:s("analyticsCookies"),description:s("analyticsDescription"),examples:Ke("analytics")||s("analyticsExamples"),locked:!1},{id:se.MARKETING,icon:Yr,title:s("marketingCookies"),description:s("marketingDescription"),examples:Ke("marketing")||s("marketingExamples"),locked:!1}].filter(b=>S.includes(b.id)),U=jr();if($e(()=>{!r&&!U&&i()},[r,U,i]),$e(()=>{let b={...a};if(g){let E=b;Object.keys(E).forEach(B=>{B!==se.NECESSARY&&E[B]===!1&&(E[B]=!0)})}v(b)},[a,g]),$e(()=>{if(!ta()||r||!f)return;let b=B=>{y.current&&!y.current.contains(B.target)&&u(!1)},E=setTimeout(()=>{document.addEventListener("mousedown",b)},100);return()=>{clearTimeout(E),document.removeEventListener("mousedown",b)}},[r,f]),r&&!d)return null;let V=()=>{try{Object.entries(h).forEach(([b,E])=>{if(b!==se.NECESSARY&&E!==void 0){let B=b;Object.values(se).includes(B)&&l(B,!!E)}}),p(!1),u(!1)}catch(b){Xr(b,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},re=()=>{i(),u(!1)},Y=()=>{c(),u(!1)},N=X(Q,{gap:"medium",children:[P(Ne,{as:"p",variant:"muted",level:"small",children:s("cookieBannerDescription")}),U&&P(Zr,{type:"single",collapsible:!0,value:g?"preferences":"",onValueChange:b=>p(b==="preferences"),items:[{value:"preferences",trigger:X(Q,{direction:"row",align:"center",gap:"tight",children:[P($r,{className:"dndev-size-md"}),s("customize")]}),content:P(Q,{gap:"medium",children:w.map(b=>{let E=b.icon,B=h[b.id]??!1;return P(Oo,{content:X(Q,{direction:"row",align:"center",justify:"between",gap:"medium",children:[X(Q,{direction:"row",align:"start",gap:"tight",style:{flex:1},children:[P(E,{className:"dndev-size-md",style:{color:"var(--primary)",marginTop:"0.125rem"}}),X(Q,{gap:"tight",children:[P(Ne,{as:"span",level:"body",style:{fontWeight:600},children:b.title}),P(Ne,{as:"span",variant:"muted",level:"small",children:b.description}),b.examples&&P(Ne,{as:"span",variant:"muted",level:"small",style:{fontStyle:"italic"},children:b.examples})]})]}),b.locked?P(Ne,{as:"span",variant:"muted",level:"small",children:s("alwaysOn")}):P(Jr,{checked:B,onCheckedChange:Te=>v(Pr=>({...Pr,[b.id]:Te}))})]})},b.id)})})}]})]}),x=g?X(Q,{direction:"row",gap:"tight",style:{width:"100%"},children:[P(we,{onClick:V,variant:We.DEFAULT,style:{flex:1},children:s("savePreferences","Save Preferences")}),P(we,{onClick:()=>p(!1),variant:We.OUTLINE,style:{flex:1},children:s("form.cancel","Cancel")})]}):X(Q,{direction:"row",gap:"tight",style:{width:"100%"},children:[P(we,{onClick:re,variant:We.DEFAULT,style:{flex:1},children:s("acceptAll")}),U&&P(we,{onClick:Y,variant:We.OUTLINE,style:{flex:1},children:s("declineOptional")})]});return X(ra,{children:[f&&P(Oo,{ref:y,className:Qr("dndev-fixed dndev-z-modal",n),icon:xt,title:s("cookiePreferences"),content:N,footer:x,style:{[t==="top"?"top":"bottom"]:"var(--gap-md)",left:"var(--gap-md)",right:"var(--gap-md)",maxWidth:"100%",width:"calc(100% - var(--gap-md) * 2)"}}),!f&&!r&&P(we,{onClick:()=>u(!0),className:"dndev-fixed dndev-z-toast",style:{bottom:"var(--gap-md)",left:"var(--gap-md)"},icon:xt,title:s("cookiePreferences")})]})}var na,St=de(()=>{"use strict";na=oa});import{useMemo as ja}from"react";import{useNavigationStore as ei}from"@donotdev/core";import{USER_ROLES as ti}from"@donotdev/core";import{useLocation as oi}from"@donotdev/ui/routing/hooks";function _(){let t=oi(),e=k("user"),o=!!e,n=e?.role||ti.GUEST,r=ei(a=>!a||typeof a.getFilteredRoutes!="function"?[]:a.getFilteredRoutes({authenticated:o,role:n}));return ja(()=>Array.isArray(r)?r.map(a=>({...a,isActive:ni(a.path,t.pathname),hasChildren:!1,children:void 0})).sort((a,i)=>a.label.localeCompare(i.label)):[],[r,t.pathname])}function ni(t,e){return t==="/"?e==="/":e===t?!0:e.startsWith(t+"/")}var he=de(()=>{"use strict";ke()});import{useCallback as Je,useMemo as Ko}from"react";import{useNavigationStore as Ae}from"@donotdev/core";import{useNavigate as ri}from"@donotdev/ui/routing/hooks";var Yo,Dt=de(()=>{"use strict";he();Yo=()=>{let t=ri(),e=_()??[],o=Ae(p=>p.favorites),n=Ae(p=>p.recent),r=Ae(p=>p.toggleFavorite),a=Ae(p=>p.isFavorite),i=Ae(p=>p.addRecent),c=Ko(()=>e.length?e.filter(p=>o.includes(p.path)):[],[o,e]),l=Ko(()=>e.length?e.filter(f=>n.includes(f.path)).slice(0,5):[],[n,e]),d=Je(p=>{r(p)},[r]),m=Je(p=>a(p),[a]),s=Je(p=>{i(p)},[i]),g=Je(p=>{s(p),t(p)},[t,s]);return{navigationItems:e,favoriteItems:c,recentItems:l,toggleFavorite:d,isFavorite:m,navigateToItem:g}}});var Zo={};Lo(Zo,{default:()=>hi});import{Star as ai,Clock as ii,Link as si}from"lucide-react";import{useCallback as qo,useEffect as li,useRef as ci}from"react";import{Badge as pi,Command as di,CommandDialog as mi}from"@donotdev/components";import{useOverlayStore as Qe}from"@donotdev/core";import{useTranslation as ui}from"@donotdev/core";import{jsx as A,jsxs as ye}from"react/jsx-runtime";var gi,fi,hi,Jo=de(()=>{"use strict";Dt();ae();gi=()=>{let{t}=ui("dndev"),e=ci(null),o=Qe(u=>u.isCommandDialogOpen),n=Qe(u=>u.commandDialogInitialSearch),r=Qe(u=>u.closeCommandDialog),{navigationItems:a,favoriteItems:i,recentItems:c,toggleFavorite:l,isFavorite:d,navigateToItem:m}=Yo();li(()=>{o&&requestAnimationFrame(()=>{e.current?.focus()})},[o]);let s=qo(u=>{m(u),r()},[m,r]),g=qo((u,h=!0)=>u.map(v=>({label:v.label,value:v.path,description:v.path!==v.label?v.path:void 0,icon:A(R,{icon:v.icon,fallback:si}),badge:v.badge?A(pi,{children:v.badge}):void 0,onSelect:()=>s(v.path),rightSlot:h?A("button",{type:"button",onClick:y=>{y.stopPropagation(),l(v.path)},className:"dndev-command-favorite-button","data-favorited":d(v.path),"aria-label":d(v.path)?t("globalGoTo.unfavorite","Remove from favorites"):t("globalGoTo.favorite","Add to favorites"),children:A(R,{icon:ai,className:"dndev-size-sm"})}):void 0})),[s,l,d,t]),p=[];if(i.length>0&&p.push({heading:t("globalGoTo.favorites","Favorites"),items:g(i,!1)}),c.length>0){let u=c.flatMap(h=>g([h],!0)).map(h=>({...h,icon:A(R,{icon:ii,className:"dndev-size-sm"})}));u.length>0&&p.push({heading:t("globalGoTo.recent","Recent"),separator:i.length>0,items:u})}p.push({heading:t("globalGoTo.allPages","All Pages"),separator:i.length>0||c.length>0,items:g(a)});let f=a.length>0;return ye(mi,{open:o,onOpenChange:u=>u?null:r(),children:[A(di,{placeholder:t("globalGoTo.placeholder","Search pages..."),emptyMessage:f?t("globalGoTo.noResults","No results found."):t("globalGoTo.empty","No pages available."),groups:p}),A("div",{className:"dndev-command-footer",children:ye("div",{className:"dndev-command-footer-shortcuts",children:[ye("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),A("span",{children:t("globalGoTo.shortcutOpen","Open")})]}),ye("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),A("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),A("span",{children:t("globalGoTo.shortcutNavigate","Navigate")})]}),ye("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),A("span",{children:t("globalGoTo.shortcutSelect","Select")})]}),ye("div",{className:"dndev-command-footer-shortcut",children:[A("kbd",{className:"dndev-command-footer-key",children:"Esc"}),A("span",{children:t("globalGoTo.shortcutClose","Close")})]})]})})]})},fi=()=>Qe(e=>e.isCommandDialogOpen)?A(gi,{}):null,hi=fi});import{User as Es}from"lucide-react";import{Suspense as Ut,lazy as un,useState as Bs}from"react";import{Button as Ms,BUTTON_VARIANT as Os,DropdownMenu as zs,Dialog as Us,DISPLAY as Vs}from"@donotdev/components";import{useTranslation as Gs}from"@donotdev/core";import{useAuthConfig as Hs}from"@donotdev/core";import{getEnabledAuthPartners as _s}from"@donotdev/core";import{User as ps,LogOut as ds,Settings as Fe,UserCheck as ms,Trash2 as us}from"lucide-react";import*as gs from"lucide-react";import ot,{useMemo as fs,lazy as pn,Suspense as cn}from"react";import{Avatar as hs,Button as ys,BUTTON_VARIANT as vs,DropdownMenu as bs,Text as xs,DISPLAY as Cs}from"@donotdev/components";import{useTranslation as Ts}from"@donotdev/core";import{getEnabledAuthPartners as Ss,useAuthConfig as ks,isClient as ws}from"@donotdev/core";import{useBreakpoint as Ns}from"@donotdev/core";ae();import{Link as Ro}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as Rr}from"@donotdev/core";import{useNavigate as Er}from"@donotdev/ui/routing/hooks";import{Fragment as Br,jsx as me,jsxs as Eo}from"react/jsx-runtime";var T=({path:t,replace:e,prefetch:o=!0,children:n,icon:r,label:a,onClick:i,className:c,"aria-label":l,"aria-describedby":d,target:m,rel:s,...g})=>{let p=Er();if(t==="#cookie-settings"){let y=Rr("showCookieBanner");return Eo("a",{href:"#cookie-settings",onClick:w=>{w.preventDefault(),w.stopPropagation();try{y()}catch{}i&&i(w)},className:c,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0,...g.style},"aria-label":l||a||"Cookie Settings","aria-describedby":d,...g,children:[r&&me(R,{icon:r,fallback:Ro}),a&&me("span",{children:a}),n]})}let f=t.startsWith("http://")||t.startsWith("https://")||t.startsWith("mailto:")||t.startsWith("tel:"),u=y=>{if(f){i&&i(y);return}y.preventDefault(),i&&i(y);let S=t.startsWith("/")?t:`/${t}`;p(S,{replace:e})},h={"aria-label":l||a,"aria-describedby":d},v=Eo(Br,{children:[r&&me(R,{icon:r,fallback:Ro}),a&&me("span",{children:a}),n]});return f?me("a",{href:t,onClick:u,target:m||"_blank",rel:s||"noopener noreferrer",className:c,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...h,...g,children:v}):me("a",{href:t,onClick:u,className:c,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...h,...g,children:v})};import{useEffect as zo,useState as aa,lazy as ia,Suspense as sa}from"react";import{Stack as Uo}from"@donotdev/components";import{FEATURE_STATUS as kt,USER_ROLES as Ye,SUBSCRIPTION_TIERS as wt}from"@donotdev/core";import{useRedirectGuard as la,useNavigate as ca}from"@donotdev/ui/routing/hooks";import{RefreshCw as Bo}from"lucide-react";import{Suspense as Mr}from"react";import{cn as Or}from"@donotdev/components";import{useLoadingState as zr}from"@donotdev/core";import{jsx as J}from"react/jsx-runtime";var Mo=({variant:t="fullPage",className:e})=>t==="inline"?J("div",{className:e,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:J(Bo,{className:"dndev-size-md",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}):J("div",{className:Or("dndev-loading-overlay",e),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:J(Bo,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}),Ur=({variant:t="fullPage",className:e,isLoading:o})=>{let{isLoading:n}=zr();return o??n?J(Mo,{variant:t,className:e}):null},Vr=t=>J(Mr,{fallback:J(Mo,{variant:t.variant,className:t.className}),children:J(Ur,{...t})}),_e=Vr;ke();import{Fragment as Vo,jsx as F,jsxs as Go}from"react/jsx-runtime";var pa=ia(()=>Promise.resolve().then(()=>(St(),Tt)));function da({auth:t,children:e,fallback:o=_e}){let n=ca(),r=k("user"),a=k("can"),i=k("status"),[c,l]=aa(!1),{shouldRedirect:d,redirectTo:m,isChecking:s}=la({auth:t});return zo(()=>{let g=setTimeout(()=>{i===kt.INITIALIZING&&l(!0)},5e3);return()=>clearTimeout(g)},[i]),zo(()=>{d&&m&&n(m,{replace:!0})},[d,m,n]),t===!1?F(Vo,{children:e}):d||s?F(_e,{}):i===kt.INITIALIZING&&c?F(Uo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Go("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[F("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),F("p",{style:{marginBottom:"var(--gap-md)",color:"var(--muted-foreground)"},children:"This might be due to a slow connection. Please wait or try refreshing the page."}),F("button",{onClick:()=>window.location.reload(),style:{padding:"var(--gap-sm) var(--gap-md)",backgroundColor:"var(--primary)",color:"var(--primary-foreground)",border:"none",borderRadius:"var(--radius)",cursor:"pointer"},children:"Refresh Page"})]})}):i===kt.INITIALIZING?F(o,{}):t&&typeof t=="object"&&t.required&&!r&&a&&!a.navigate(t)?F(Uo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Go("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[F("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),F("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),F(sa,{fallback:F("div",{children:"Loading consent..."}),children:F(pa,{})})]})}):F(Vo,{children:e})}function ma(t){return k("can")?.navigate(t)??!1}var ku=ma;function wu(){return k("user")?.role||Ye.GUEST}function Nu(t){return k("user")?.role===t}function Du(){let t=k("user"),e=k("userSubscription"),o=k("loading");return{authenticated:!!t,role:t?.role,tier:e?.tier||"free",loading:o,userId:t?.id}}function Pu(t,e){return n=>F(da,{auth:e,children:F(t,{...n})})}var Au={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:Ye.USER}),admin:()=>({required:!0,role:Ye.ADMIN}),tier:t=>({required:!0,tier:t}),pro:()=>({required:!0,tier:wt.PRO}),premium:()=>({required:!0,tier:wt.PREMIUM}),adminPro:()=>({required:!0,role:Ye.ADMIN,tier:wt.PRO}),custom:t=>({required:!0,validate:t})};import{ArrowLeft as La,Lock as Ra}from"lucide-react";import{Suspense as Ea,lazy as Ba}from"react";import{Card as Ma,Button as Oa,Separator as za,Stack as fe,cn as Ua}from"@donotdev/components";import{useTranslation as Va}from"@donotdev/core";import"@donotdev/core";import{useLocation as Ga,useBack as Ha}from"@donotdev/ui/routing/hooks";import{Suspense as Ia}from"react";import{cn as Fa}from"@donotdev/components";import{Component as ua}from"react";import{handleError as ga}from"@donotdev/core";var Nt=class extends ua{constructor(o){super(o);Ge(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,n){ga(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:n,component:"DnDevErrorBoundary",level:this.props.level||"component"},showNotification:!1})}render(){return this.state.hasError?this.props.fallback({error:this.state.error,resetError:this.resetError,componentStack:null,eventId:null}):this.props.children}},Ho=Nt;import{AlertTriangle as fa,Home as ha,ArrowLeft as ya,RotateCw as va,Copy as ba,Check as xa}from"lucide-react";import{useEffect as Ca,useState as Ta}from"react";import{Button as qe,BUTTON_VARIANT as Ze,Card as _o,CARD_VARIANT as $o,Alert as Sa,ALERT_VARIANT as ka,Stack as ue}from"@donotdev/components";import{handleError as wa,useTranslation as Na}from"@donotdev/core";import{useLocation as Da,useBack as Pa}from"@donotdev/ui/routing/hooks";import{jsx as L,jsxs as le}from"react/jsx-runtime";var Aa=({error:t,resetError:e,componentStack:o,eventId:n})=>{let{t:r}=Na("dndev"),[a,i]=Ta(!1),c=Pa(),d=Da()?.pathname||(typeof window<"u"?window.location.pathname:"/"),m=t instanceof Error?t.message:"Unknown error",s=t instanceof Error?t.stack:void 0,g=!1;Ca(()=>{try{wa(t,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:d}})}catch{}},[t,d]);let p=async()=>{if(!s)return;let h=[`Error: ${m}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,n?`Event ID: ${n}`:null,`Path: ${d}`,"","Stack Trace:",s,o?`
2
2
  Component Stack:`:null,o||null].filter(Boolean).join(`
3
- `);try{await navigator.clipboard.writeText(h),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},f=()=>{try{e()}catch{typeof window<"u"&&window.location.reload()}},u=()=>{try{p()}catch{typeof window<"u"&&window.history.back()}};return P(me,{children:P(Uo,{variant:Vo.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:ae(de,{gap:"large",align:"center",className:"dndev-text-center",children:[P(de,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:P(la,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),ae(de,{gap:"medium",children:[P("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:r("routeError.title","Something went wrong")}),P("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:r("routeError.description","We encountered an error while loading this page.")}),P(ha,{variant:ya.SUCCESS,hideIcon:!0,children:P("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:r("routeError.dataSafe","Don't worry, your data is safe.")})})]}),n&&ae("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-full)",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",color:"var(--foreground)"},children:[r("routeError.errorId","Error ID"),": ",n]}),g&&d&&ae(Uo,{variant:Vo.MUTED,className:"dndev-w-full",children:[ae(de,{direction:"row",align:"center",justify:"between",gap:"medium",children:[P("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),P($e,{variant:We.GHOST,icon:a?ua:ma,onClick:m,disabled:a,children:a?r("routeError.copied","Copied"):r("routeError.copyDetails","Copy Details")})]}),P("pre",{style:{fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",wordBreak:"break-word",whiteSpace:"pre-wrap",color:"var(--foreground)",margin:0,marginTop:"var(--gap-sm)"},children:d})]}),ae(de,{gap:"medium",className:"dndev-w-full",children:[P($e,{variant:We.DESTRUCTIVE,icon:da,onClick:f,fullWidth:!0,children:r("routeError.tryAgain","Try Again")}),ae(de,{direction:"row",gap:"medium",justify:"center",children:[P(T,{path:"/",children:P($e,{variant:We.DEFAULT,icon:ca,fullWidth:!0,children:r("routeError.goHome","Go Home")})}),P($e,{variant:We.OUTLINE,icon:pa,onClick:u,fullWidth:!0,children:r("routeError.goBack","Go Back")})]})]}),P("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:r("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},Go=Ta;import{jsx as ke}from"react/jsx-runtime";var me=({variant:t="standard",density:e,className:o,children:n,centered:r=!0,gapFirst:a=!1})=>ke(Oo,{level:"route",fallback:i=>ke(Sa,{fallback:ke("div",{children:"Loading error fallback..."}),children:ke(Go,{...i})}),children:ke("div",{className:ka("dndev-container",o),"data-variant":t,"data-density":e,"data-centered":r?"true":"false","data-gap-first":a?"true":void 0,children:n})});import{Fragment as za,jsx as w,jsxs as we}from"react/jsx-runtime";var Ma=Aa(()=>import("@donotdev/auth").then(t=>({default:t.MultipleAuthProviders})));function G1({title:t,description:e,showBackButton:o=!0,onBack:n,className:r=""}){let{t:a}=Ra(["auth","common"]),i=Ea(),p=Ba(),s=()=>{n?n():p()};return w(me,{variant:"docs",children:w(ue,{align:"center",justify:"center",className:La("dndev-min-h-60",r),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:w(Ia,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:we(ue,{gap:"medium",children:[w(ue,{justify:"center",children:w("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:w(Na,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),w("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),w("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:we(ue,{gap:"medium",children:[we(ue,{gap:"large",children:[w("div",{children:w("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),w(Da,{fallback:w("div",{children:"Loading providers..."}),children:w(Ma,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&we(za,{children:[w(Fa,{}),w("div",{children:w(Pa,{onClick:s,className:"dndev-gap-sm",icon:wa,children:a("common.back")})})]}),we(ue,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[w("p",{children:a("auth.fallback.secure")}),w("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as Oa}from"lucide-react";import{Button as Ua,BUTTON_VARIANT as Va,DISPLAY as Ga}from"@donotdev/components";import{useOverlayStore as Ha,useTranslation as _a}from"@donotdev/core";import{jsx as $a,jsxs as Wa}from"react/jsx-runtime";var Y1=({display:t=Ga.AUTO,className:e})=>{let{t:o}=_a("dndev"),n=Ha(i=>i.openCommandDialog),a=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)?"\u2318K":"Ctrl+K";return Wa(Ua,{variant:Va.OUTLINE,display:t,icon:Oa,onClick:()=>n(),className:e,"aria-label":o("goTo.ariaLabel","Go to page"),children:[o("goTo.label","Go to"),$a("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:a})]})};import{Suspense as pi,lazy as di}from"react";import{useEventListener as mi,useOverlayStore as ui}from"@donotdev/core";import{jsx as Yo}from"react/jsx-runtime";var gi=di(()=>Promise.resolve().then(()=>(Ko(),Wo))),fi=()=>{let t=ui(e=>e.openCommandDialog);return mi("keydown",e=>{(e.metaKey||e.ctrlKey)&&e.key==="k"&&(e.preventDefault(),t())},{target:document,options:{passive:!1,capture:!1}}),Yo(pi,{fallback:null,children:Yo(gi,{})})},hi=fi;import{Search as yi}from"lucide-react";import{useCallback as qo,useEffect as vi,useState as bi,useRef as xi}from"react";import{Stack as Ci}from"@donotdev/components";import{useOverlayStore as Zo}from"@donotdev/core";import{useTranslation as Ti}from"@donotdev/core";import{jsx as qe,jsxs as wi}from"react/jsx-runtime";var Si=()=>{let{t}=Ti("dndev"),[e,o]=bi(""),n=xi(null),r=Zo(s=>s.openCommandDialog),a=Zo(s=>s.isCommandDialogOpen);vi(()=>{a||o("")},[a]);let i=qo(()=>{r(e)},[r,e]),p=qo(s=>{s.key==="Enter"&&(s.preventDefault(),r(e))},[r,e]);return wi(Ci,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[qe(yi,{className:"dndev-absolute dndev-size-md",style:{left:"0.75rem",opacity:.5},"aria-hidden":"true"}),qe("input",{ref:n,type:"text",value:e,onChange:s=>o(s.target.value),onFocus:i,onKeyDown:p,placeholder:t("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingLeft:"2.5rem",paddingRight:"5rem"},"aria-label":t("globalGoTo.ariaLabel","Search navigation")}),qe("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{right:"0.75rem",gap:"0.25rem",opacity:.5},"aria-hidden":"true",children:qe("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:"\u2318K"})})]})},ki=Si;import{MoreHorizontal as Ni,Link as Jo}from"lucide-react";import{useState as Di,useEffect as Qo,useRef as Ai,useMemo as Ii}from"react";import{NavigationMenu as Xo,NavigationMenuListPrimitive as Pi,NavigationMenuItemPrimitive as jo,Button as Fi,DropdownMenu as Li,cn as Ze,DISPLAY as Ri}from"@donotdev/components";import{useTranslation as Ei}from"@donotdev/core";ge();oe();import{jsx as V,jsxs as St}from"react/jsx-runtime";var en=({routes:t,vertical:e=!1,display:o=Ri.AUTO,overflowDetection:n=!1,showIcons:r=!0,className:a,style:i})=>{let{t:p}=Ei("dndev"),s=_(),c=t??s,d=Ai(null),[l,g]=Di(c.length),m=Ii(()=>c.map(f=>({label:f.label,path:f.path,icon:V(F,{icon:f.icon,fallback:Jo}),children:f.children?f.children.map(u=>({label:u.label,path:u.path,icon:V(F,{icon:u.icon,fallback:Jo})})):void 0})),[c]);if(Qo(()=>{if(!n||c.length===0||e)return;let f=()=>{let h=d.current;if(!h)return;let y=h.getBoundingClientRect(),v=h.querySelectorAll("[data-nav-item]"),N=h.querySelector("[data-more-button]"),E=0,Y=N?.offsetWidth||0;for(let U=0;U<v.length;U++){let k=v[U];if(!k)break;if(k.getBoundingClientRect().right-y.left+(U===v.length-1&&N?Y:0)<=y.width)E=U+1;else break}g(Math.max(0,E))},u=new ResizeObserver(f);return d.current&&u.observe(d.current),setTimeout(f,0),()=>u.disconnect()},[n,c.length,e]),Qo(()=>{n&&!e&&g(c.length)},[c.length,n,e]),c.length===0)return null;if(n&&!e){let f=m.slice(0,l),u=m.slice(l);return V(Xo,{className:Ze(a),style:i||{flex:1},children:St(Pi,{ref:d,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[f.filter(h=>h.path).map((h,y)=>V(jo,{"data-nav-item":!0,children:St(T,{path:h.path,className:Ze("dndev-interactive"),"data-role":"nav-trigger",children:[r&&h.icon,V("span",{className:"dndev-interactive-label",children:h.label})]})},h.path||y)),u.length>0&&V(jo,{"data-more-button":!0,children:V(Li,{trigger:V(Fi,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":p("navigation.more","More"),children:V(Ni,{className:"dndev-size-md"})}),items:u.filter(h=>h.path).map(h=>({label:h.label,children:St(T,{path:h.path,className:Ze("dndev-interactive"),"data-role":"menu-item",children:[r&&h.icon,V("span",{className:"dndev-interactive-label",children:h.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return V(Xo,{items:m,vertical:e,display:o,className:Ze(a,e&&"dndev-sidebar-nav-menu"),LinkComponent:T})};import{Home as Bi,ArrowLeft as Mi,Link as zi}from"lucide-react";import{useMemo as Oi}from"react";import{Button as kt,BUTTON_VARIANT as wt,Stack as De,Text as Nt}from"@donotdev/components";import{useTranslation as Ui}from"@donotdev/core";import{useLocation as Vi,useNavigate as Gi}from"@donotdev/ui/routing/hooks";ge();oe();import{jsx as B,jsxs as Je}from"react/jsx-runtime";function tn(){let{t}=Ui("dndev"),e=Vi(),o=Gi(),n=_(),r=Oi(()=>n.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[n]),a=()=>{o("back")};return B(me,{variant:"docs",centered:!0,children:Je(De,{gap:"large",align:"center",justify:"center",children:[Je(De,{gap:"medium",align:"center",children:[B(Nt,{level:"h1",style:{fontSize:"clamp(4rem, 12vw, 8rem)",fontWeight:"var(--font-weight-bold)",lineHeight:1,letterSpacing:"-0.02em",background:"linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",margin:0},children:"404"}),B(Nt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:t("errors.notFound.title","Page Not Found")}),B(Nt,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:t("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),e.pathname&&B("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-md)",fontSize:"var(--font-size-sm)",fontFamily:"var(--font-mono)",color:"var(--foreground)",wordBreak:"break-all",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",border:"1px solid var(--border-hairline)"},children:e.pathname})]}),r.length>0&&Je(De,{gap:"medium",align:"center",children:[B("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:t("errors.notFound.suggestions","You might be looking for:")}),B(De,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:r.map(i=>B(T,{path:i.path,replace:!0,children:B(kt,{variant:wt.OUTLINE,icon:B(F,{icon:i.icon,fallback:zi}),"aria-label":t("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),Je(De,{direction:"row",wrap:"wrap",justify:"center",gap:"medium",children:[B(T,{path:"/",replace:!0,children:B(kt,{variant:wt.DEFAULT,icon:Bi,"aria-label":t("errors.notFound.goHome","Go to home page"),children:t("errors.notFound.goHome","Go Home")})}),B(kt,{variant:wt.OUTLINE,icon:Mi,onClick:a,"aria-label":t("errors.notFound.goBack","Go back to previous page"),children:t("errors.notFound.goBack","Go Back")})]})]})})}ge();Tt();import{useNavigate as ag,useBack as ig,useRefresh as sg,usePrefetch as lg,useLocation as cg,useParams as pg,useSearchParams as dg,useMatch as mg,useQueryParams as ug,useRedirectGuard as gg}from"@donotdev/ui/routing/hooks";import{useNavigate as xs}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Dt,isClient as ie,isDev as on}from"@donotdev/core";var R=class{static getBrowserSupport(){if(!ie())return{svg:!0,webp:!1,avif:!1};let e=this.cache.get("browser-support");if(e)return e;let o={svg:!0,webp:!1,avif:!1};try{let n=document.createElement("canvas");n.width=1,n.height=1,o.webp=n.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let n=document.createElement("canvas");n.width=1,n.height=1,o.avif=n.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(e){let o=[];if(e==null)return o;if(typeof e=="string")o.push(e);else if(Array.isArray(e))for(let n of e)o.push(...this.extractStringValues(n));else if(typeof e=="object")for(let n of Object.values(e))o.push(...this.extractStringValues(n));return o}static assetExists(e){if(!ie())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(e):!1}static getAssetManifest(){return ie()&&Dt()?.assets?.mapping||null}static getLogoSvgContent(){return Dt()?.assets?.logoSvgContent||null}static resolveLogo(e){if(e)return e;let o="logo";if(this.cache.has(o))return this.cache.get(o);let r=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,r),r}static directAssetCheck(e){if(!ie())return!1;try{let o=new Image;return o.src=e,!0}catch{return!1}}static resolveFaviconSet(){let e="favicon-set";if(this.cache.has(e))return this.cache.get(e);let o=this.getAssetManifest();if(o?.favicon?.set){let a=o.favicon.set,i=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",p={svg:a.svg||"/favicon.svg",ico:a.ico||"/favicon.ico",png16:a.png16||i,png32:a.png32||i,apple180:a.apple180||i,android192:a.android192||i,android512:a.android512||i};return this.cache.set(e,p),p}let n=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",r={svg:this.assetExists("/favicon.svg")?"/favicon.svg":"/logo.svg",ico:this.assetExists("/favicon.ico")?"/favicon.ico":"/favicon.svg",png16:this.assetExists("/favicon-16x16.png")?"/favicon-16x16.png":n,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":n,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":n,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":n,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":n};return this.cache.set(e,r),r}static resolveFavicon(){let e=this.getAssetManifest();if(e?.favicon?.optimal)return e.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let n of o)if(this.assetExists(n))return n;return"/favicon.svg"}static clearCache(){this.cache.clear(),on()&&ie()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:ie()?Dt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};ze(R,"cache",new Map);function vg(t){return R.resolveLogo(t)}function bg(){return R.resolveFaviconSet()}on()&&(R.clearCache(),ie()&&window.addEventListener("DOMContentLoaded",()=>{R.clearCache()}));Ce();import{useMemo as Hi}from"react";function Qe(){let t=S("status"),e=S("isAvailable"),o=S("user");return Hi(()=>({shouldHide:t!=="ready"||!e,isLoading:t==="initializing",isReady:t==="ready"&&e,isAuthenticated:!!o}),[t,e,o])}import{DEGRADED_BILLING_API as _i}from"@donotdev/core";import*as $i from"@donotdev/billing";var At=$i?.useStripeBilling;function Wi(t){return _i[t]}function It(t,e){return At?At(t,e):Wi(t)}var Ng=typeof At=="function";Ce();function Pg(){let t=S("user"),e=S("status"),o={user:t,status:e},n=It("status",o),r=It("isAvailable",o);return{shouldHide:!r,isLoading:n==="initializing",isReady:r&&n==="ready"}}import{DEGRADED_CRUD_API as Ki}from"@donotdev/core";import*as Yi from"@donotdev/crud";var Pt=Yi?.useCrud;function qi(){return Ki}function Rg(t,e={}){return Pt?Pt(t,e):qi()}var Eg=typeof Pt=="function";import{DEGRADED_OAUTH_API as Zi}from"@donotdev/core";import*as Ji from"@donotdev/oauth";var Ft=Ji?.useOAuth;function Qi(t){return Zi[t]}function zg(t){return Ft?Ft(t):Qi(t)}var Og=typeof Ft=="function";import{CheckCircle as Xi}from"lucide-react";import{List as ji}from"@donotdev/components";import{translateArray as es}from"@donotdev/core";import{jsx as nn}from"react/jsx-runtime";var ts=Xi,os=16;function _g(t,e,o,n=ts,r=os){let a=n;return nn(ji,{icon:a?nn(a,{size:r}):void 0,items:es(t,e,o),style:{listStyle:"none",paddingInlineStart:0}})}import{Fragment as ws,jsx as Q,jsxs as Ns}from"react/jsx-runtime";var sn=()=>null,Cs=an(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:sn}}}),Ts=an(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:sn}}}),Lt=null;vs()&&import("@donotdev/auth").then(t=>{Lt=t.useDeleteAccount}).catch(()=>{});function Ss(){let[t]=Xe.useState(!1),[e]=Xe.useState(!1),[o]=Xe.useState(!1),[n]=Xe.useState(null);return{showConfirmDialog:t,showPasswordDialog:e,isDeleting:o,error:n,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}}function ks(){return Lt?Lt():Ss()}var je=t=>{if(!t)return Ae;if(typeof t=="function")return t;let e=t.replace(/['"]/g,"");return ss[e]||Ae},Rt=({loginPath:t,display:e=gs.AUTO,"no-tooltip":o=!1,customItems:n=[]})=>{let{t:r}=fs("dndev"),{shouldHide:a,isReady:i,isAuthenticated:p}=Qe(),s=ys(),c=S("user"),d=S("signOut"),l=bs("isLaptop"),g=_(),m=xs(),f=s.profilePath,u=s.authMenuItems||[],h=ks(),y=()=>c&&(c.displayName||c.email?.split("@")[0])||"User",v=()=>y().split(" ").map(x=>x.charAt(0)).slice(0,2).join("").toUpperCase(),N=()=>{if(!c)return r("auth.userMenu",{defaultValue:"User menu"});let k=[y()];return c.email&&k.push(c.email),U&&U!=="guest"&&k.push(`Role: ${U}`),k.join(`
4
- `)},E=ls(()=>{let k=[];return!l&&c&&k.push({children:Q(us,{variant:"muted",as:"span",children:`${y()}${c.email?`
5
- ${c.email}`:""}`}),disabled:!0}),f&&k.push({label:r("auth.profile",{defaultValue:"Profile"}),icon:ns,onClick:()=>m(f)}),u.forEach(x=>{let z=g.find(L=>L.path===x.path),le=x.label||z?.label||x.path.split("/").pop()||"Menu",C=x.icon?je(x.icon):z?.icon&&(typeof z.icon=="string"||typeof z.icon=="function")?je(z.icon):Ae;k.push({label:le,icon:C,onClick:()=>m(x.path)})}),n.forEach(x=>{if(x.path){let z=g.find(L=>L.path===x.path),le=x.label||z?.label||x.path.split("/").pop()||"Menu",C=x.icon?je(x.icon):Ae;k.push({label:le,icon:C,onClick:()=>m(x.path),disabled:x.disabled,style:x.style})}else if(x.onClick){let z=x.icon?je(x.icon):Ae;k.push({label:x.label,icon:z,onClick:x.onClick,disabled:x.disabled,style:x.style})}}),k.push({label:r("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:is,onClick:h.startDeleteFlow,variant:"destructive"}),k.push({label:r("auth.signOut",{defaultValue:"Sign Out"}),icon:rs,onClick:()=>d(),variant:"destructive"}),k},[f,u,n,d,h,r,g,l,c,y,m]);if(hs().length===0||a||!i)return null;let U=c?.role;return p?Ns(ws,{children:[Q(rn,{fallback:null,children:Q(Cs,{open:h.showPasswordDialog,isLoading:h.isDeleting,error:h.error,onReauth:k=>h.confirmDelete(k),onCancel:h.cancel})}),Q(rn,{fallback:null,children:Q(Ts,{open:h.showConfirmDialog,isLoading:h.isDeleting,error:h.error,onConfirm:()=>h.confirmDelete(),onCancel:h.cancel})}),Q(ms,{trigger:Q(ps,{variant:ds.OUTLINE,icon:c?Q(cs,{src:c.photoURL??void 0,fallback:v(),alt:y(),style:{margin:"-4px 0"}}):as,display:e,"aria-label":r("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&l&&c?N():o?void 0:r("auth.userMenu",{defaultValue:"User menu"}),children:y()}),items:E,contentAlign:"end"})]}):null};import{jsx as G}from"react/jsx-runtime";var pn=()=>null,Ls=cn(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:pn}}}),Rs=cn(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:pn}}}),zt=({display:t=As.AUTO})=>{let{t:e}=Is("dndev"),{shouldHide:o,isLoading:n,isReady:r,isAuthenticated:a}=Qe(),i=Ps(),p=Fs(),s=i.loginPath,c=e("auth.signIn",{defaultValue:"Sign In"}),d=e("auth.loading",{defaultValue:"Loading..."});if(o||!r)return null;if(!a){if(s!==void 0)return G(T,{path:s,prefetch:!0,children:G(Bt,{variant:Mt.GHOST,icon:Et,display:t,tooltip:c,children:c})});if(p.length>1)return G(Ds,{trigger:G(Bt,{variant:Mt.GHOST,icon:Et,display:t,tooltip:c,children:c}),children:G(ln,{fallback:G("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:d}),children:G(Rs,{spacing:"tight"})})});let l=p[0];return G(ln,{fallback:G(Bt,{variant:Mt.GHOST,icon:Et,display:t,disabled:n,tooltip:n?d:c,children:n?d:c}),children:G(Ls,{partnerId:l,display:t})})}return G(Rt,{display:t,loginPath:s})};import{RefreshCw as Es}from"lucide-react";import"react";import{cn as Bs}from"@donotdev/components";import{jsx as dn,jsxs as Os}from"react/jsx-runtime";var Ms=({className:t})=>Os("div",{className:Bs("dndev-loading-overlay",t),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",opacity:"var(--opacity-muted)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:[dn(Es,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),dn("span",{className:"dndev-sr-only",children:"Loading..."})]}),zs=Ms;import{AlertCircle as Us,RefreshCw as Vs,Mail as Gs,Cookie as Hs}from"lucide-react";import{Card as _s,Button as Ot,BUTTON_VARIANT as Ut,Stack as mn}from"@donotdev/components";import{useTranslation as $s}from"@donotdev/core";import{jsx as Ie,jsxs as et}from"react/jsx-runtime";function Ws({featureName:t,title:e,description:o,showReviewCookies:n=!1,showContactSupport:r=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:p,onReviewCookies:s,customActions:c,className:d=""}){let{t:l}=$s("ui"),g=o||l("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:t}),m=()=>{if(s)s();else{let u=new CustomEvent("openCookieConsent");window.dispatchEvent(u)}},f=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${t}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${t} not being available.`)}`};return et(_s,{className:d,title:et(mn,{direction:"row",align:"center",gap:"tight",children:[Ie(Us,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),e||t]}),subtitle:g,children:[" ",et("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(n||r||a||c)&&et(mn,{direction:"row",wrap:"wrap",gap:"tight",children:[n&&Ie(Ot,{variant:Ut.OUTLINE,onClick:m,icon:Hs,children:l("featureDisabled.reviewCookies","Review Cookies")}),r&&Ie(Ot,{variant:Ut.OUTLINE,onClick:f,icon:Gs,children:l("featureDisabled.contactSupport","Contact Support")}),a&&Ie(Ot,{variant:Ut.OUTLINE,onClick:p,icon:Vs,children:l("featureDisabled.retry","Retry")}),c]}),Ie("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:l("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var Ks=Ws;oe();import"react";import{cn as Ys}from"@donotdev/components";import{jsx as $,jsxs as ol}from"react/jsx-runtime";var K=({state:t="loading",message:e,show:o=!0,className:n,showSpinner:r=!1,spinnerSize:a="md"})=>{if(!o)return null;let p=e||(c=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[c]||"Loading...")(t),s={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return ol("div",{className:Ys(n),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--gap-sm)",color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",transition:"opacity var(--dur-fast) ease-out"},role:"status","aria-live":"polite","aria-label":p,children:[r&&$("div",{style:{...s[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),$("span",{style:{fontWeight:500},children:p})]})},qs=({message:t="Loading...",...e})=>$(K,{state:"loading",message:t,...e}),Zs=({message:t="Processing your request...",...e})=>$(K,{state:"processing",message:t,...e}),Js=({message:t="Almost there...",...e})=>$(K,{state:"almost-done",message:t,...e}),Qs=({message:t="Complete!",...e})=>$(K,{state:"complete",message:t,...e}),Xs=({showSpinner:t=!0,...e})=>$(K,{state:"processing",message:"Saving your changes...",showSpinner:t,...e}),js=({showSpinner:t=!0,fileName:e,...o})=>$(K,{state:"processing",message:e?`Uploading ${e}...`:"Uploading file...",showSpinner:t,...o}),el=({showSpinner:t=!0,query:e,...o})=>$(K,{state:"processing",message:e?`Searching for "${e}"...`:"Searching...",showSpinner:t,...o}),tl=({showSpinner:t=!0,...e})=>$(K,{state:"loading",message:"Connecting to server...",showSpinner:t,...e}),tt=K;import{cn as nl}from"@donotdev/components";import{Fragment as un,jsx as X,jsxs as gn}from"react/jsx-runtime";var rl=({show:t=!1,backdrop:e=!0,backdropBlur:o=!0,className:n,children:r,message:a,showSpinner:i=!0,spinnerSize:p="lg",preventClicks:s=!0,zIndex:c="var(--z-modal)"})=>{if(!t)return null;let d=c==="var(--z-modal)"||!c?"dndev-z-modal":c==="var(--z-toast)"?"dndev-z-toast":c==="var(--z-tooltip)"?"dndev-z-tooltip":c==="var(--z-overlay)"?"dndev-z-overlay":null;return X("div",{className:nl("dndev-loading-overlay",d,n),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:e?"var(--background)":"transparent",opacity:e?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:s?"auto":"none",...d?{}:{zIndex:c}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:X("div",{className:"dndev-surface",style:{display:"grid",placeItems:"center",gap:"var(--gap-md)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:"var(--background)",opacity:"var(--opacity-strong)",border:"1px solid var(--border)",boxShadow:"var(--shadow-xl)",maxWidth:"var(--content-text)",width:"100%",margin:"0 var(--gap-md)"},children:r||gn(un,{children:[i&&X("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:p==="sm"?"2rem":p==="md"?"3rem":"4rem",height:p==="sm"?"2rem":p==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&X(tt,{...a})]})})})};var al=({show:t=!1,backdrop:e=!1,backdropBlur:o=!1,className:n,...r})=>X("div",{className:n,style:{position:"absolute",inset:0,display:t?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:e?"var(--background)":"transparent",opacity:e?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:X("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:r.children||gn(un,{children:[X("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:"1.5rem",height:"1.5rem"},role:"status","aria-hidden":"true"}),r.message&&X(tt,{...r.message})]})})}),il=rl;import"react";import{cn as sl}from"@donotdev/components";import{jsx as fn}from"react/jsx-runtime";var ll=({variant:t="fullPage",className:e,isLoading:o})=>o===!1?null:fn("div",{className:sl(e),style:{display:"flex",alignItems:"center",justifyContent:"center",...t==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:fn("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...t==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),cl=ll;import{useEffect as Vt,useState as hn}from"react";import{cn as pl}from"@donotdev/components";import{jsx as yn}from"react/jsx-runtime";var dl=({isActive:t=!1,progress:e,useFakeProgress:o=!0,duration:n=2e3,className:r,show:a=!0})=>{let[i,p]=hn(0),[s,c]=hn(!1);Vt(()=>{if(!t||!o||e!==void 0)return;c(!0),p(0);let l=Date.now(),g=setInterval(()=>{let m=Date.now()-l,f=Math.min(m/n*90,90);p(f)},16);return()=>{clearInterval(g)}},[t,o,e,n]),Vt(()=>{e!==void 0&&c(e>0&&e<100)},[e]),Vt(()=>{if(!t){let l=setTimeout(()=>{c(!1),p(0)},300);return()=>clearTimeout(l)}},[t]);let d=e??i;return!a||!s?null:yn("div",{className:pl(r),style:{position:"fixed",left:0,right:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(d),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:yn("div",{style:{height:"100%",width:`${d}%`,background:"linear-gradient(to right, var(--primary), color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--primary) 60%, transparent))",transition:t?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},ml=dl;import{cn as ot,Stack as ul}from"@donotdev/components";import{jsx as Pe,jsxs as qf}from"react/jsx-runtime";var gl=({variant:t="text",width:e,height:o,lines:n=1,show:r=!0,className:a,animation:i="pulse",style:p})=>{if(!r)return null;let s={backgroundColor:"var(--muted)",opacity:"var(--opacity-muted)",borderRadius:"var(--radius)",animation:i==="pulse"||i==="wave"?"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite":"none",...i==="wave"&&{background:"linear-gradient(to right, color-mix(in srgb, var(--muted) 50%, transparent), color-mix(in srgb, var(--muted) 30%, transparent), color-mix(in srgb, var(--muted) 50%, transparent))"}},c=()=>{let d={};return e&&(d.width=typeof e=="number"?`${e}px`:e),o&&(d.height=typeof o=="number"?`${o}px`:o),d};return t==="text"?Pe(ul,{gap:"tight",children:Array.from({length:n}).map((d,l)=>Pe("div",{className:ot("dndev-skeleton",a),style:{...s,height:"var(--gap-md)",width:l===n-1?"75%":"100%",...c(),...p}},l))}):t==="circular"?Pe("div",{className:ot("dndev-skeleton",a),style:{...s,borderRadius:"var(--radius-full)",width:e||o||"40px",height:o||e||"40px",...c(),...p}}):t==="rectangular"?Pe("div",{className:ot("dndev-skeleton",a),style:{...s,width:e||"100%",height:o||"200px",...c(),...p}}):Pe("div",{className:ot("dndev-skeleton",a),style:{...s,borderRadius:"var(--radius-lg)",width:e||"100%",height:o||"20px",...c(),...p}})};var fl=gl;import{Card as hl,IconBox as yl,Stack as vl,Text as Gt,renderCardContent as bl}from"@donotdev/components";import{jsx as W,jsxs as vn}from"react/jsx-runtime";var xl=({icon:t,title:e,subtitle:o,content:n,href:r,variant:a,elevated:i,onClick:p,className:s,footer:c,style:d,...l})=>{let g=bl(n),u=`calc(var(--font-size-lg) * var(--line-height) * 2 + var(--gap-md)) calc(var(--font-size-base) * var(--line-height) * 2 + var(--gap-md)) 1fr${c?" auto":""}`,h={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},y={...h,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},v={...h,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},N=t?vn(vl,{direction:"row",align:"center",gap:"medium",style:{width:"100%"},children:[W(yl,{icon:t}),W(Gt,{as:"div",level:"h3",style:y,children:e})]}):W(Gt,{as:"div",level:"h3",style:y,children:e}),E=W(hl,{variant:a,elevated:i,onClick:p,className:s,"data-clickable":r||p?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...d},...l,children:vn("div",{style:{display:"grid",gridTemplateRows:u,gap:"var(--gap-md)",width:"100%"},children:[W("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:N}),W("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:W(Gt,{as:"div",level:"body",style:v,children:o})}),W("div",{children:g}),c&&W("div",{children:c})]})});return r&&!p?W(T,{path:r,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":e?`Learn more about ${e}`:void 0,children:E}):E},Cl=xl;import{useState as Ll}from"react";import{Bento as Rl,Card as El,Section as Bl,Stack as Ml,Text as zl,cn as Ol}from"@donotdev/components";var Tl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3178C6" d="M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"/></svg>',Sl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></svg>',kl='<svg role="img" viewBox="0 0 410 404" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="vite-a" x1="6" y1="33" x2="235" y2="344" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="vite-b" x1="195" y1="9" x2="236" y2="293" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset=".08" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs><path fill="url(#vite-a)" d="M399.641 59.525 215.643 388.545c-3.799 6.793-13.559 6.833-17.415.073L10.582 59.556c-4.201-7.366 2.098-16.29 10.446-14.797l184.195 32.923c1.175.21 2.378.208 3.553-.006l180.343-32.87c8.32-1.517 14.649 7.337 10.522 14.72z"/><path fill="url(#vite-b)" d="M292.965 1.574 156.801 28.255c-2.238.439-3.895 2.335-4.03 4.611l-8.376 141.465c-.197 3.332 2.863 5.918 6.115 5.168l37.91-8.749c3.547-.818 6.752 2.306 6.023 5.873l-11.263 55.153c-.758 3.712 2.727 6.886 6.352 5.785l23.415-7.114c3.63-1.102 7.118 2.081 6.35 5.796l-17.899 86.633c-1.12 5.42 6.088 8.374 9.094 3.728l2.008-3.103 110.954-221.428c1.858-3.707-1.346-7.935-5.418-7.15l-39.022 7.532c-3.667.707-6.787-2.708-5.752-6.296l25.469-88.291c1.036-3.594-2.095-6.612-5.764-5.891z"/></svg>',wl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/></svg>',Nl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#339933" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></svg>',Dl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#DD2C00" d="M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"/></svg>',Al='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m12 1.608 12 20.784H0Z"/></svg>',Il='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#635BFF" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>',Pl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><linearGradient id="vb-a" x1="0.414" y1="0.255" x2="0" y2="0.932" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#eab308"/><stop offset="1" stop-color="#ca8a04"/></linearGradient><linearGradient id="vb-b" x1="0.338" y1="0.02" x2="0.664" y2="0.966" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#fde68a"/><stop offset="1" stop-color="#fbbf24"/></linearGradient><linearGradient id="vb-c" y1="0.5" x2="1" y2="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#7dd3fc"/><stop offset="1" stop-color="#0ea5e9"/></linearGradient></defs><g transform="translate(-2056 -1899)"><path d="M742.271,987.024c-66.706,0-119.121,54.673-121.874,126.408l-2.551,95.471c-3.967,78.653,71.961,105.52,126.936,105.52Z" transform="translate(1463.458 1004.277)" fill="url(#vb-a)"/><path d="M92.616.01H319.894c54.53-.8,95.624,40.1,98.381,93.335l6.144,135.76c.732,67.368-48.116,94.95-104.525,95.335L92.616,327.374C34.061,327.8-1.063,283.663.022,229.105l3.8-135.76C7.41,33.54,33.3,1.093,92.616.01Z" transform="translate(2118.42 1991.302)" fill="url(#vb-b)"/><path d="M86.844.009H299.958c51.132-.746,89.665,37.307,92.25,86.824l5.761,126.29c.686,62.669-45.117,88.326-98.011,88.685L86.844,304.537C31.938,304.933-1,263.875.02,213.123L3.58,86.834C6.948,31.2,31.222,1.016,86.844.009Z" transform="translate(2136.977 2001.737)" fill="#111827"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2421.148 2104.357)" fill="url(#vb-c)"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2208.034 2104.357)" fill="url(#vb-c)"/></g></svg>',Fl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#FBF0DF" d="M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083a5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"/></svg>',Ht={bun:{svg:`data:image/svg+xml,${encodeURIComponent(Fl)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(Tl)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(Sl)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(kl)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(wl)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(Nl)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(Dl)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(Al)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(Il)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(Pl)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as j,jsxs as Hl}from"react/jsx-runtime";function Ul({techKey:t,variant:e}){let o=Ht[t],[n,r]=Ll(!1);if(!o)return null;let a=o.svg.replace("data:image/svg+xml,",""),i=decodeURIComponent(a);return j(El,{variant:e,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:Hl(Ml,{direction:"column",align:"center",gap:"tight",children:[j("div",{className:"dndev-tech-card-logo","data-tech":t,dangerouslySetInnerHTML:{__html:i}}),j(zl,{as:"span",level:"small",children:o.name})]})})}function Vl({title:t,techs:e,cols:o=3,columns:n,gap:r="medium",separator:a=!1,className:i}){let p=n||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),s=l=>{if(l==="long")return{cols:2,rows:1};if(l==="high")return{cols:1,rows:2};if(l==="huge")return{cols:2,rows:2}},c=e.filter(l=>Ht[l.name]).map(l=>({id:l.name,content:j(Ul,{techKey:l.name,variant:l.variant}),span:s(l.size)})),d=j(Rl,{items:c,columns:p,gap:r,className:i,ariaLabel:"Technology stack"});return t?j(Bl,{title:t,separator:a,className:"dndev-tech-bento",children:j("div",{className:"dndev-tech-bento-grid",children:d})}):j("div",{className:Ol("dndev-tech-bento",i),children:d})}var Gl=Vl;import{Suspense as _l,lazy as $l}from"react";import{useConsent as bn}from"@donotdev/core";import{jsx as xn}from"react/jsx-runtime";var Wl=$l(()=>Promise.resolve().then(()=>(vt(),yt)));function x2(){let t=bn("hasConsented"),e=bn("showBanner");return t&&!e?null:xn(_l,{fallback:null,children:xn(Wl,{})})}import{Button as Kl,ScrollArea as Yl}from"@donotdev/components";import{cn as Cn}from"@donotdev/components";import{jsx as Fe,jsxs as ql}from"react/jsx-runtime";function w2({content:t,cta:e,align:o="center",justify:n="center",disableScrollArea:r=!1,contentClassName:a,ctaClassName:i}){return ql("div",{className:"dndev-game-container",children:[Fe("div",{className:Cn("dndev-game-container__content",a),"data-align":o,"data-justify":n,children:r?Fe("div",{style:{overflow:"auto",overscrollBehavior:"contain"},children:t}):Fe(Yl,{className:"dndev-game-container__scroll",children:t})}),e&&Fe("div",{className:Cn("dndev-game-container__cta",i),children:Fe(Kl,{onClick:e.onClick,disabled:e.disabled??!1,variant:e.variant??"default",className:"dndev-game-container__cta-button",children:e.label})})]})}import{useEffect as Zl,useMemo as Jl,Suspense as Ql,lazy as Xl}from"react";import{jsx as _t}from"react/jsx-runtime";var Tn=new Set;function I2({screenRegistry:t,currentScreen:e,nextScreen:o,fallback:n=null}){Zl(()=>{if(o&&!Tn.has(o)){Tn.add(o);let a=t[o];a&&a().catch(()=>{})}},[o,t]);let r=Jl(()=>{if(!e)return null;let a=t[e];return a?Xl(a):null},[e,t]);return!e||!r?null:_t("div",{style:{height:"100%"},children:_t(Ql,{fallback:n,children:_t(r,{})})})}import{cn as jl,DISPLAY as $t}from"@donotdev/components";import{useAppConfig as Sn}from"@donotdev/core";import{jsx as nt,jsxs as oc}from"react/jsx-runtime";var ec=({display:t=$t.AUTO,linkToHome:e=!0,className:o})=>{let n=Sn("name"),a=Sn("shortName")||n||"App",i=R.getLogoSvgContent(),p=R.resolveLogo(),s=t===$t.FULL||t===$t.AUTO,c=i?nt("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:i}}):R.assetExists(p)?nt("img",{src:p,alt:a,className:"app-branding-logo"}):null,d=s&&nt("span",{className:"app-branding-title","data-display":t,children:a}),l=oc("div",{className:jl("app-branding",o),"data-display":t,children:[c,d]});return e?nt(T,{path:"/",className:"app-branding-link",children:l}):l},tc=ec;import{cn as kn}from"@donotdev/components";import{useAppConfig as wn}from"@donotdev/core";import{jsx as Dn}from"react/jsx-runtime";var Nn={sm:{width:"var(--icon-md)",height:"var(--icon-md)"},md:{width:"var(--icon-touch)",height:"var(--icon-touch)"},lg:{width:"var(--icon-touch)",height:"var(--icon-touch)"},xl:{width:"var(--touch-target)",height:"var(--touch-target)"},header:{height:"var(--icon-touch)",width:"auto"}},nc=({alt:t,size:e="header",className:o})=>{let n=t||wn("name")||wn("shortName")||"App",r=R.getLogoSvgContent(),a=R.resolveLogo(),i=typeof e=="string"&&e in Nn?Nn[e]:typeof e=="string"?{}:{width:e,height:e};return r?Dn("div",{className:kn("app-icon-header",o),style:{display:"inline-flex",...i},role:"img","aria-label":n,dangerouslySetInnerHTML:{__html:r}}):Dn("img",{src:a,alt:n,className:kn(o),style:{objectFit:"contain",...i}})},rc=nc;import{cn as An}from"@donotdev/components";import{useAppConfig as In,useBreakpoint as ac}from"@donotdev/core";import{jsx as Pn}from"react/jsx-runtime";var ic=({title:t,className:e,linkToHome:o=!0})=>{let n=ac("isMobileOrTablet"),r=In("name"),a=In("shortName"),i=t||n&&a||r||"App",p=Pn("div",{className:An("dndev-text-base",e),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?Pn(T,{path:"/",className:An("dndev-inline-block",e),children:p}):p},sc=ic;import{ChevronRight as uc}from"lucide-react";import{useMemo as gc}from"react";import{cn as fc}from"@donotdev/components";import{useTranslation as hc}from"@donotdev/core";import{useLocation as yc}from"@donotdev/ui/routing/hooks";import{useMemo as Fn}from"react";import{useNavigationStore as J2,getRoutes as lc,getRouteManifest as Q2}from"@donotdev/core";function cc(){return Fn(()=>{try{let t=lc();return!t||t.length===0?[]:pc(t)}catch{return[]}},[])}function Ln(){let t=cc();return Fn(()=>t.flatMap(e=>e.routes),[t])}function pc(t){let e=new Map;return t.forEach(o=>{let n=typeof o.path=="string"?o.path:String(o.path);if(!n||n==="undefined"||n==="null")return;let r=o.meta?.entity||dc(n)||"other",a={path:n,label:o.meta?.title||mc(n),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};e.has(r)||e.set(r,{label:r.charAt(0).toUpperCase()+r.slice(1),routes:[]}),e.get(r)?.routes.push(a)}),Array.from(e.values())}function dc(t){return t.split("/").filter(Boolean)[0]||null}function mc(t){let e=t.split("/").filter(Boolean),o=e[e.length-1];return o?o.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Home"}import{jsx as Le,jsxs as xc}from"react/jsx-runtime";var vc=({items:t,separator:e=uc,showHome:o=!0,homeHref:n="/",variant:r="default",className:a})=>{let{t:i}=hc("dndev"),p=yc(),s=Ln(),c=gc(()=>new Set(s.map(g=>g.path)),[s]),d=t||(()=>{let g=p.pathname.split("/").filter(Boolean),m=[],f="";return g.forEach(u=>{f+=`/${u}`;let h=u.split("-").map(v=>v.charAt(0).toUpperCase()+v.slice(1)).join(" "),y=c.has(f)?f:void 0;m.push({label:h,href:y})}),m})(),l=o?[{label:i("navigation.home","Home"),href:n},...d]:d;return r==="smart"&&p.pathname.split("/").filter(Boolean).length<2?null:Le("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:fc("breadcrumbs",a),children:l.map((g,m)=>{let u=m===l.length-1||!g.href;return xc("span",{className:"breadcrumb-item",children:[m>0&&Le(e,{className:"dndev-size-md separator"}),g.icon&&Le(g.icon,{className:"dndev-size-md icon"}),g.href&&!u?Le(T,{path:g.href,className:"breadcrumb-link",children:g.label}):Le("span",{className:"breadcrumb-label",children:g.label})]},m)})})},bc=vc;import{useTranslation as Cc,maybeTranslate as Rn,useLayout as Wt,useAppConfig as Tc}from"@donotdev/core";import{jsx as he,jsxs as kc}from"react/jsx-runtime";var Sc=({asLink:t=!1,className:e})=>{let o=Tc("app"),n=Wt("gameTitle"),r=Wt("gameSubtitle"),a=Wt("gameNamespace"),{t:i}=Cc(a||"dndev"),p=Rn(i,n??void 0),s=Rn(i,r??void 0),c=o?.name||"Game";if(p)return he("div",{className:e,children:kc("div",{style:{textAlign:"center"},children:[he("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p}),s&&he("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s})]})});let d=he("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c});return t?he(T,{path:"/",className:e,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:l=>l.currentTarget.style.color="var(--primary)",onMouseLeave:l=>l.currentTarget.style.color="var(--foreground)",children:c}):he("div",{className:e,children:d})};import{Trash2 as wc}from"lucide-react";import{useState as En}from"react";import{Button as Nc,BUTTON_VARIANT as Dc,Checkbox as Ac,Stack as Kt,useToast as Ic}from"@donotdev/components";import{useTranslation as Pc}from"@donotdev/core";import{useRefresh as Fc}from"@donotdev/ui/routing/hooks";import{jsx as rt,jsxs as Bn}from"react/jsx-runtime";function Lc(){let{t}=Pc("dndev"),{toast:e}=Ic(),[o,n]=En(!1),r=Fc(),[a,i]=En({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),p=async()=>{try{n(!0);let s=[];if(a.localStorage&&typeof window<"u")try{localStorage.clear(),s.push("localStorage")}catch{}if(a.sessionStorage&&typeof window<"u")try{sessionStorage.clear(),s.push("sessionStorage")}catch{}if(a.indexedDB&&typeof window<"u"&&"indexedDB"in window)try{if("databases"in indexedDB){let d=await indexedDB.databases();await Promise.all(d.map(async l=>{if(l.name){let g=indexedDB.deleteDatabase(l.name);await new Promise((m,f)=>{g.onsuccess=()=>m(void 0),g.onerror=()=>f(g.error)})}}))}s.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let d=globalThis.openDatabase("","","","");d&&d.transaction&&d.transaction(l=>{l.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,m)=>{for(let f=0;f<m.rows.length;f++){let u=m.rows.item(f).name;g.executeSql(`DROP TABLE IF EXISTS ${u}`)}})}),s.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let d=await caches.keys();await Promise.all(d.map(async l=>{try{await caches.delete(l)}catch{}})),s.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let d=await navigator.serviceWorker.getRegistrations();await Promise.all(d.map(async l=>{try{await l.unregister()}catch{}})),s.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(d=>{let l=d.indexOf("="),g=l>-1?d.substr(0,l):d;document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${window.location.hostname}`}),s.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),s.push("Memory Cache")}catch{}let c=s.length>0?t("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:s.join(", ")}):t("settings.clearCache.noItemsCleared","No cache items were cleared");e("success",c),s.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:r()},1e3)}catch{e("error",t("settings.clearCache.error","Error clearing cache"))}finally{n(!1)}};return Bn(Kt,{gap:"medium",children:[rt(Kt,{gap:"medium",children:Object.entries(a).map(([s,c])=>Bn(Kt,{direction:"row",align:"center",gap:"tight",children:[rt(Ac,{id:s,checked:c,onCheckedChange:d=>i(l=>({...l,[s]:!!d}))}),rt("label",{htmlFor:s,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:t(`settings.clearCache.${s}`,s.charAt(0).toUpperCase()+s.slice(1))})]},s))}),rt(Nc,{variant:Dc.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:p,icon:wc,children:o?t("settings.clearCache.clearing","Clearing..."):t("settings.clearCache.button","Clear Cache")})]})}var Yt=Lc;import{DropdownMenu as Mc,Button as qt,Stack as zn}from"@donotdev/components";import{Link as Rc}from"lucide-react";import"react";import{navigationMenuTriggerStylePrimitive as Ec}from"@donotdev/components";oe();import{jsx as Mn,jsxs as Bc}from"react/jsx-runtime";var ye=({route:t,showIcons:e=!0})=>{let o=e&&!!t.icon,n=!!t.label;return Bc(T,{path:t.path,className:Ec(),...o&&!n&&{"data-display":"compact"},children:[e&&Mn(F,{icon:t.icon,fallback:Rc}),Mn("span",{children:t.label})]})};import{jsx as O}from"react/jsx-runtime";var zc=({navigation:t,className:e})=>O(zn,{role:"navigation",direction:"row",align:"center",className:e,style:{gap:"var(--gap-sm)"},children:t.map((o,n)=>o.routes&&o.routes.length>0?O(Mc,{trigger:O(qt,{icon:o.icon,children:o.label}),items:o.routes.map(r=>{let a=r.path?r.external?O("a",{href:r.path,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",width:"100%"},children:O(ye,{route:r})}):O(T,{path:r.path,style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",width:"100%"},children:O(ye,{route:r})}):O(zn,{direction:"row",align:"center",style:{gap:"var(--gap-sm)",width:"100%"},children:O(ye,{route:r})});return{label:r.label,children:a,asChild:!!r.path}}),contentAlign:"start"},o.label+n):o.path?O(qt,{icon:o.icon,"aria-label":o.label,render:({children:r,...a})=>O(T,{path:o.path,...a,children:r}),children:o.label},o.label+n):O(qt,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+n))}),Oc=zc;import"react";import{Card as Uc,cn as Vc}from"@donotdev/components";import{jsx as Zt}from"react/jsx-runtime";var Gc=({languages:t,currentLanguage:e,onLanguageChange:o,className:n})=>Zt(Uc,{className:Vc("dndev-z-modal",n),style:{position:"fixed",bottom:"var(--gap-md)",right:"var(--gap-md)",display:"flex",alignItems:"center",gap:"var(--gap-sm)",transition:"var(--dur-fast) ease-out"},role:"region","aria-label":"Language selector","data-role":"floating",children:Zt("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:e,onChange:r=>o?.(r.target.value),"aria-label":"Select language",children:t.map(r=>Zt("option",{value:r,children:r},r))})}),Hc=Gc;import{MoreHorizontal as _c}from"lucide-react";import{Button as $c,BUTTON_VARIANT as Wc,DropdownMenu as Kc}from"@donotdev/components";import{jsx as On}from"react/jsx-runtime";var Yc=({children:t,className:e})=>On(Kc,{trigger:On($c,{variant:Wc.GHOST,icon:_c,"aria-label":"Menu",className:e}),contentAlign:"end",children:t}),qc=Yc;import{MoreHorizontal as Zc}from"lucide-react";import{DISPLAY as Re,DropdownMenu as Jc,Button as Qc}from"@donotdev/components";import{cn as Xc}from"@donotdev/components";import{useBreakpoint as Un,useTranslation as jc}from"@donotdev/core";ge();import{jsx as at}from"react/jsx-runtime";var ep=({className:t="",showIcons:e=!0,display:o=Re.AUTO})=>{let{t:n}=jc("dndev"),r=Un("isMobile"),a=Un("isTablet"),i=_();return(o===Re.AUTO?r||a?Re.COMPACT:Re.FULL:o)===Re.COMPACT?at(Jc,{trigger:at(Qc,{variant:"ghost",icon:Zc,"aria-label":n("navigation.menu","Navigation"),className:t}),contentAlign:"end",items:i.map(s=>({label:s.label,children:at(ye,{route:s,showIcons:e}),asChild:!0}))}):at(en,{overflowDetection:!0,showIcons:e,className:Xc(t),style:{flex:1}})},tp=ep;import{Bell as op}from"lucide-react";import{useMemo as np,useEffect as rp,useRef as ap}from"react";import{Button as ip,cn as sp,toast as lp,Stack as cp}from"@donotdev/components";import{jsx as Jt}from"react/jsx-runtime";var pp={sm:{button:{width:"var(--icon-md)",height:"var(--icon-md)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},md:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},lg:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-touch)",height:"var(--icon-touch)"},badge:{width:"var(--icon-touch)",height:"var(--icon-touch)",fontSize:"var(--font-size-sm)"}}},dp=({notifications:t=[],count:e=0,loading:o=!1,onNotificationClick:n,onMarkAllRead:r,onDropdownOpen:a,className:i,maxVisible:p=10,alwaysShow:s=!1,size:c="md",disabled:d=!1})=>{let l=pp[c],g=ap(new Set),m=np(()=>e===0?null:e>99?"99+":e.toString(),[e]),f=e>0||s;return rp(()=>{t.forEach(u=>{if(!g.current.has(u.id)){g.current.add(u.id);let h=u.type==="error"?"error":u.type==="warning"?"warning":u.type==="success"?"success":"info";lp({title:u.title,description:u.message,toastType:h,duration:0,onDismiss:()=>{g.current.delete(u.id),n&&n(u)}})}})},[t,n]),f?Jt("div",{className:sp(i),style:{position:"relative"},children:Jt(ip,{disabled:d,style:{...l.button,position:"relative"},onFocus:u=>{u.currentTarget.style.outline="2px solid var(--ring)",u.currentTarget.style.outlineOffset="2px"},onBlur:u=>{u.currentTarget.style.outline="none"},"aria-label":`${e} notification${e!==1?"s":""}`,icon:op,children:m&&Jt(cp,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",right:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...l.badge},"aria-hidden":"true",children:m})})}):null},mp=dp;import{Settings as up,Check as gp}from"lucide-react";import*as it from"lucide-react";import"react";import{Button as fp,BUTTON_VARIANT as hp,DropdownMenu as yp,Stack as vp,DISPLAY as bp}from"@donotdev/components";import{useTranslation as xp}from"@donotdev/core";import{useLanguageSelector as Cp,useTheme as Qt,Flag as Tp}from"@donotdev/core";import{jsx as ee,jsxs as wp}from"react/jsx-runtime";function Sp({variant:t=hp.OUTLINE}={}){let{t:e}=xp("dndev"),{languages:o,currentLanguage:n,changeLanguage:r,isLoading:a}=Cp(),i=Qt("availableThemes"),p=Qt("currentTheme"),s=Qt("setTheme"),c=m=>{if(!m)return it.Palette;let f=m.replace(/['"]/g,"");return it[f]||it.Palette},d=i.map(m=>{let f=c(m.meta?.icon),u=m.name===p;return{label:m.displayName||m.name,icon:f,onClick:()=>s(m.name),checked:u}}),l=o.map(m=>{let f=m.id===n;return{label:m.name,onClick:()=>r(m.id),disabled:a,checked:f,className:f?"bg-accent":void 0,iconEnd:f&&!a?gp:void 0,children:wp(vp,{direction:"row",align:"center",gap:"tight",children:[ee(Tp,{code:m.id,title:`${m.name} flag`}),ee("span",{children:m.name}),a&&f&&ee("div",{style:{marginInlineStart:"auto"},children:ee("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:e("auth.title","Authentication"),subContent:ee(zt,{display:bp.COMPACT})},{label:e("settings.theme","Theme"),subItems:d},{label:e("settings.language","Language"),subItems:l},{label:e("settings.clearCache.title","Clear Cache"),subContent:ee(Yt,{})}];return ee(yp,{trigger:ee(fp,{variant:t,"aria-label":e("settings.title","Settings"),icon:up}),items:g,contentWidth:"14rem",contentAlign:"end"})}var kp=Sp;import*as st from"lucide-react";import"react";import{Button as Vn,BUTTON_VARIANT as Np,DropdownMenu as Dp,DISPLAY as Ap}from"@donotdev/components";import{useTranslation as Ip}from"@donotdev/core";import{useTheme as Xt}from"@donotdev/core";import{jsx as eo}from"react/jsx-runtime";var jt=t=>{if(!t)return st.Palette;let e=t.replace(/['"]/g,"");return st[e]||st.Palette},Pp=({display:t=Ap.AUTO,"no-tooltip":e=!1})=>{let{t:o}=Ip("dndev"),n=Xt("availableThemes"),r=Xt("currentTheme"),a=Xt("setTheme");if(n.length<=1)return null;let i=n.find(y=>y.name===r),p=n.length===2?n.find(y=>y.name!==r)||n[0]:null,s=i?jt(i.meta?.icon):null,c=p?jt(p.meta?.icon):null,d=i?.displayName||i?.name||"Theme",l=p?.displayName||p?.name||"Theme",g=n.length===2&&p&&c,m=g?c:s,f=g?e?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:p?.displayName||p?.name}):e?void 0:o("common.themeSelector.changeTheme","Change Theme"),u={variant:Np.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:f,icon:m,display:t};if(g&&p)return eo(Vn,{...u,onClick:()=>a(p.name),children:l});if(!i||!s)return null;let h=n.map(y=>{let v=jt(y.meta?.icon),N=y.name===r;return{label:y.displayName||y.name,icon:v,onClick:()=>a(y.name),checked:N}});return eo(Dp,{trigger:eo(Vn,{...u,children:d}),items:h,contentWidth:"10rem"})},Fp=Pp;import{useEffect as Rp}from"react";import{checkLicense as Ep}from"@donotdev/core";var Lp='<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>logo</title><style>.s0{opacity:.98;fill:#f23d29}.s1{opacity:.99;fill:#03bec4}.s2{opacity:.97;fill:#27494a}</style><g id="Background"><path id="Path 0" fill-rule="evenodd" class="s0" d="m254 41.1c5.8-0.1 15.2 0.4 21 0.9 5.8 0.6 16 2.2 22.8 3.5 6.7 1.4 17.5 4.2 23.9 6.4 6.5 2.1 16.7 6.1 22.8 8.8 6.1 2.7 15.5 7.6 21 10.8 5.5 3.3 14.3 9.2 19.5 13 5.2 3.9 13.8 11.2 19 16.2 5.2 5 12.2 12.3 15.5 16.2 3.3 4 8.8 11.1 12.2 15.9 3.4 4.8 8.7 13.2 11.7 18.7 3 5.5 6.9 13.4 8.7 17.5 1.7 4.1 4.7 12 6.6 17.5 1.9 5.5 4.5 14.5 5.8 20 1.3 5.5 3.1 15.3 3.9 21.8 0.9 6.6 1.6 19 1.6 28.7 0 9.4-0.7 22.1-1.5 28.3-0.8 6.1-3 17.3-4.8 24.7-1.9 7.4-5.5 18.9-8.2 25.5-2.6 6.6-7 16.3-9.8 21.5-2.8 5.2-8 13.8-11.5 19-3.6 5.2-9.3 12.9-12.7 17-3.5 4.1-10.7 11.8-16.2 17-5.4 5.3-12.7 11.9-16.3 14.7-3.6 2.8-11.4 8.3-17.5 12.2-6.1 4-16.4 9.8-23 13.1-6.6 3.2-17.4 7.6-24 9.8-6.6 2.3-17.2 5.2-23.5 6.6-6.3 1.4-16.2 3-22 3.7-6.4 0.7-17.5 1-28.5 0.6-11.9-0.3-21.7-1.2-29-2.6-6.1-1.1-15.9-3.4-22-5.1-6.1-1.7-15.9-5.2-22-7.6-6.1-2.5-15.5-6.9-21-9.8-5.5-2.9-14.1-8-19-11.3-4.9-3.3-12.4-8.7-16.5-12-4.1-3.4-12.5-11.2-18.6-17.4-6.1-6.3-13.9-15.2-17.3-19.9-3.5-4.7-8.8-12.6-11.9-17.5-3-4.9-7.9-13.9-10.8-20-2.9-6.1-7.1-16.4-9.3-23-2.2-6.6-5.1-17.6-6.5-24.5-1.4-6.9-3-17.4-3.7-23.5-0.7-6.7-0.9-17.2-0.6-27 0.4-8.8 1.3-20.5 2.2-26 0.8-5.5 2.7-14.5 4.1-20 1.4-5.5 3.9-14.1 5.5-19 1.7-4.9 6.3-15.8 10.4-24 4-8.3 10-19.1 13.3-24 3.3-4.9 9-12.6 12.5-17 3.6-4.4 11.4-12.8 17.3-18.6 6-5.8 15.4-13.9 20.9-18 5.5-4.1 14.5-10 20-13.2 5.5-3.1 14.5-7.6 20-10.1 5.5-2.4 15.1-6 21.3-8 6.1-2 16.7-4.7 23.5-6.1 6.7-1.3 16.3-2.8 21.2-3.3 4.9-0.5 13.7-1 19.5-1.1zm-21 38c-4.7 0.5-12.1 1.9-16.5 3-4.4 1.1-11.6 3.1-16 4.5-4.4 1.5-13.8 5.4-21 8.9-7.2 3.5-16.1 8.5-20 11.1-3.8 2.6-10 7.2-13.8 10.3-3.7 3.1-6.7 5.9-6.7 6.3 0 0.5 9.3 10.3 20.8 21.9l20.7 21c5.5-10.5 9-16.5 11.5-20.1 2.4-3.6 7.2-9.6 10.5-13.5 3.3-3.8 9.4-9.6 13.5-12.9 4.1-3.2 10.7-7.4 14.5-9.2 3.9-1.8 9.7-4 13-4.9 3.3-0.8 9.6-1.5 14-1.5 4.4 0 10.7 0.7 14 1.6 3.3 0.9 9.1 3.2 13 5.1 3.9 2 9.3 5.2 12 7.3 2.8 2 8.5 7.5 12.9 12.1 4.3 4.6 10.2 11.8 13.1 15.9 2.9 4.1 7.8 12.2 10.8 18 3 5.8 7.1 14.8 9 20 2 5.2 4.2 13 5.1 17.3 0.9 4.2 1.6 11.4 1.6 15.9 0 5.6-0.6 10.6-2.1 15.3-1.1 3.8-3.8 9.9-5.9 13.5-2.1 3.6-5.8 8.9-8.4 11.7-2.5 2.9-4.6 5.6-4.6 6 0 0.5 1.4 1.2 3.2 1.6 1.8 0.4 6.4 2.4 10.3 4.4 3.9 1.9 9 4.9 11.5 6.6 2.5 1.8 7.1 5.9 10.4 9.2 4.2 4.3 7.1 8.6 10.1 15 2.4 4.9 5 11.9 5.9 15.5 0.9 3.6 2.3 11.9 3.2 18.5 1.1 8 1.4 15.9 1.1 23.5l-0.5 11.5 6.3 6.4c6.3-8.1 10.4-13.8 13.1-17.9 2.8-4.1 6.4-10 8.1-13 1.7-3 5.1-10.2 7.6-16 2.5-5.8 5.8-15.2 7.5-21 1.7-5.8 3.7-13.9 4.6-18 0.8-4.1 2-11.9 2.5-17.3 0.6-5.3 1.1-13.5 1.1-18.2 0-4.7-0.5-12.9-1.1-18.3-0.6-5.3-1.9-13.5-2.9-18.2-1-4.7-3.1-12.3-4.5-17-1.5-4.7-5.1-13.4-7.9-19.5-2.9-6.1-7.6-14.8-10.6-19.5-2.9-4.7-7.2-11-9.5-14-2.3-3-7.8-9.3-12.1-13.9-4.3-4.6-12-11.6-16.9-15.6-4.9-4.1-13.1-9.9-18-13-4.9-3.1-13.3-7.7-18.5-10.2-5.2-2.5-13.6-6.1-18.5-7.8-4.9-1.8-14.2-4.5-20.5-5.9-6.3-1.4-17.1-3-24-3.6-6.9-0.5-13.4-0.9-14.5-0.8-1.1 0.1-4.5 0.3-7.5 0.5-3 0.2-9.3 0.8-14 1.4zm-125.4 79.6c-4.3 6.5-9.8 15.9-12.1 20.8-2.4 4.9-5.9 13.7-7.9 19.5-1.9 5.8-4.4 15-5.5 20.5-1.1 5.5-2.5 15.8-3.1 23-0.6 7.2-0.8 16.8-0.5 21.5 0.4 4.7 1.5 13.9 2.5 20.5 1.1 6.6 3.5 17.3 5.4 23.8 2 6.4 5.5 16.1 7.9 21.5 2.3 5.3 6.7 13.8 9.7 18.7 3 4.9 8.1 12.4 11.4 16.5 3.3 4.1 9.8 11.5 14.5 16.3 4.7 4.9 11.8 11.2 15.6 14.2 3.9 2.9 11.1 7.9 16 11 4.9 3.1 13.1 7.6 18 10 4.9 2.4 13.7 5.9 19.5 7.9 5.8 1.9 14.6 4.4 19.5 5.5 4.9 1.1 13.7 2.5 19.5 3.2 6.6 0.7 16.1 0.9 25.5 0.6 9.8-0.4 19.1-1.5 27-3.1 6.6-1.4 16.7-4.1 22.5-6.1 5.8-2 15-5.8 20.5-8.5 5.5-2.7 13.8-7.4 18.5-10.5 4.7-3.2 9.3-6.5 10.3-7.4 1.6-1.5 1.6-1.7-0.5-3.9-1.3-1.2-2.6-2.2-3-2.2-0.5 0-3.4 2-6.5 4.4-3.2 2.4-9.4 6.4-13.8 8.9-4.4 2.6-12.7 6.4-18.5 8.6-5.8 2.2-15.2 5.1-21 6.5-5.8 1.4-14.6 3-19.5 3.7-4.9 0.6-15.7 1.1-24 1.1-8.2 0-19.5-0.7-25-1.6-5.5-0.8-14.7-2.7-20.5-4.1-5.8-1.5-15-4.5-20.5-6.6-5.5-2.2-12.9-5.6-16.5-7.5-3.6-2-10.3-6.1-15-9.2-4.7-3.1-12.7-9.7-17.8-14.7-7.5-7.2-9.5-9.8-10.2-13-0.5-2.2-1-9.9-1-17 0-7.1 0.7-17.3 1.5-22.5 0.8-5.2 2.3-12.8 3.5-16.8 1.1-3.9 3.3-9.8 4.9-12.9 1.6-3.2 4.5-7.8 6.5-10.3 1.9-2.5 6.1-6.6 9.3-9.3 3.2-2.6 9.2-6.5 13.3-8.6 4.1-2.1 9.3-4.4 11.5-5.1 2.2-0.7 4.3-1.5 4.7-1.9 0.4-0.3-1.3-3.1-3.8-6.1-2.5-3-6.1-8.4-8.2-12-2-3.6-4.7-9.9-6-14-1.8-5.6-2.5-10-2.6-17 0-5.2 0.2-11.7 0.5-14.5l0.6-5-49.2-48.5zm117.6 8.2c-4 1.1-9.8 3.1-13 4.3-3.2 1.3-8.4 4.1-11.6 6.3l-5.8 3.9 6.7 6.5c7.5-3.7 9.9-4 24.2-4 13.2 0 17 0.4 20.4 1.8 2.3 0.9 4.5 2.5 5 3.5 0.6 1.2 2 1.7 4.9 1.7 2.8 0 4.2-0.5 4.8-1.7 0.5-1 2.5-2.6 4.5-3.5 3.1-1.5 6.6-1.8 21.7-1.8 9.9 0 19.1 0.5 20.5 1 1.3 0.6 3.1 2 4 3.3 1.1 1.6 1.5 4.8 1.5 11.7 0 7.9-0.4 10.3-2.3 14-1.2 2.4-3.4 5.3-4.7 6.3-1.4 1-4.3 2.2-6.5 2.7-2.2 0.6-7.9 1-12.5 1-4.7 0-10.3-0.4-12.5-1-2.2-0.5-5.2-1.8-6.5-2.8-1.4-1-3.6-3.6-4.8-5.8-1.2-2.1-2.6-6-3-8.6-0.7-4.6-0.9-4.8-4-4.8-3.2 0-3.3 0.2-4.4 5.8-0.6 3.1-1.7 6.9-2.4 8.2-0.7 1.4-2.5 3.7-4.1 5.2-1.6 1.4-4 2.9-5.3 3.3-2.4 0.7-1 2.2 20.5 23.6 12.6 12.6 23.3 22.9 23.7 22.9 0.4 0 4.4-3.5 8.9-7.7 4.5-4.3 10-10.5 12.2-13.8 2.2-3.3 5.5-9.1 7.3-13 1.8-3.8 4.5-11 5.9-16 1.5-4.9 2.9-12.8 3.2-17.5 0.5-6.5 0.2-9.5-1-13-1-2.6-3.5-6.2-5.9-8.5-2.4-2.3-7.7-5.8-11.8-7.8-4.2-2-10.9-4.5-15-5.5-4.2-1.1-11.6-2.5-16.5-3.1-5-0.6-12.6-1-17-0.9-4.4 0-11.2 0.5-15 1-3.9 0.5-10.3 1.8-14.3 2.8zm-13.7 29.2c-0.5 0.9 2 4.1 8.1 10.1 7.5 7.4 9.4 8.7 12.1 8.7 1.8 0 4.2-0.4 5.3-1 1.1-0.5 2.8-2.9 3.9-5.2 1.1-2.4 2-5.8 2-7.8 0.1-1.9-0.6-4.4-1.3-5.5-1.3-1.8-2.8-2-13.3-2.2-6.5-0.1-12.8 0.2-13.9 0.7-1.2 0.5-2.5 1.5-2.9 2.2zm58.5 1.1c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.6 1.7 3.9 2.6 8.3 3.1 3.3 0.4 8.2 0.5 11 0.1 2.7-0.4 5.7-1.1 6.7-1.7 1-0.5 2.4-2.4 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.5-2.2-2.1-2.3-15.3-2.2-7.6 0.1-14.3 0.3-14.9 0.6-0.7 0.2-1.7 1.9-2.3 3.6zm-71.9 38c1.7 3.4 5 8.9 7.4 12.2 2.3 3.3 6.9 8.5 10.1 11.6 3.2 3.1 7.9 6.8 10.4 8.2 2.4 1.4 6.5 3.3 9 4.2 2.4 0.8 4.5 1.4 4.7 1.3 0.1-0.2-9.9-10.4-22.3-22.8-12.3-12.3-22.5-22.1-22.5-21.7 0.1 0.4 1.5 3.5 3.2 7z"/><path id="Path 1" class="s1" d="m243 105.6c-3 0.8-8.7 2.9-12.5 4.8-3.8 1.8-10.4 6-14.5 9.2-4.1 3.3-10.2 9.1-13.5 12.9-3.4 3.9-8.4 10.4-11.1 14.5-2.8 4.1-6.5 10.2-8.2 13.5l-3.1 6 14.8 15c9-6.2 15.4-9.4 20.1-11.1 4.7-1.8 12-3.9 16.2-4.8 4.3-0.9 12.4-1.9 18-2.2 6.2-0.4 14.5-0.2 20.8 0.6 5.8 0.6 13.9 2.1 18 3.1 4.1 1.1 10.9 3.6 15 5.6 4.1 2 9.4 5.5 11.8 7.7 2.5 2.4 5 6 5.9 8.6 1.3 3.4 1.5 6.5 1.1 13-0.4 4.7-1.8 12.6-3.2 17.5-1.5 4.9-4.2 12.2-6 16-1.8 3.9-5 9.7-7.3 13-2.2 3.3-8 9.7-12.9 14.3l-8.9 8.3c76.3 76.3 98.8 98 99.2 97.6 0.4-0.5 1-5.7 1.2-11.5 0.2-6.2-0.4-15.7-1.3-22.7-0.9-6.6-2.3-14.9-3.2-18.5-0.9-3.6-3.5-10.6-5.9-15.5-3-6.4-5.9-10.7-10.1-15-3.3-3.3-7.9-7.4-10.4-9.2-2.5-1.7-7.6-4.7-11.5-6.6-3.9-2-8.5-4-10.3-4.4-1.8-0.4-3.2-1.1-3.2-1.5 0-0.5 2.1-3.2 4.6-6 2.6-2.9 6.3-8.2 8.4-11.8 2.1-3.6 4.8-9.6 5.9-13.5 1.5-4.7 2.1-9.7 2.1-15.2 0-4.6-0.7-11.8-1.6-16-0.9-4.3-3.1-12.1-5.1-17.3-1.9-5.2-6-14.2-9-20-3-5.8-7.9-13.9-10.8-18-2.9-4.1-8.8-11.3-13.1-15.9-4.4-4.6-10.2-10.1-12.9-12.1-2.8-2.1-8.1-5.3-12-7.3-3.9-1.9-9.7-4.2-13-5.1-3.3-0.9-9.8-1.5-14.5-1.5-4.7 0-11 0.7-14 1.5zm-78.7 93.9c-0.4 2.2-0.8 8.7-0.7 14.5 0.1 8.3 0.6 12.1 2.5 18 1.4 4.1 4.1 10.4 6.1 14 2.1 3.6 5.7 9 8.2 12 2.5 3 4.2 5.8 3.8 6.1-0.4 0.4-2.5 1.2-4.7 1.9-2.2 0.7-7.4 3-11.5 5.1-4.1 2.1-10.1 6-13.3 8.6-3.2 2.7-7.4 6.8-9.3 9.3-2 2.5-4.9 7.1-6.5 10.3-1.6 3.1-3.8 9-4.9 13-1.2 3.9-2.7 11.5-3.5 16.7-0.8 5.2-1.5 15.4-1.5 22.5 0 7.1 0.5 14.8 1 17 0.7 3.2 2.7 5.8 10.2 13 5.1 5 13.1 11.6 17.8 14.7 4.7 3.1 11.4 7.2 15 9.2 3.6 1.9 11 5.3 16.5 7.5 5.5 2.1 14.7 5.1 20.5 6.6 5.8 1.4 15 3.3 20.5 4.1 5.5 0.9 16.8 1.6 25 1.6 8.3 0 19.1-0.5 24-1.1 4.9-0.7 13.7-2.3 19.5-3.7 5.8-1.4 15.2-4.3 21-6.5 5.8-2.2 14.1-6 18.5-8.6 4.4-2.5 10.8-6.7 14.2-9.2 3.5-2.5 6.3-4.9 6.3-5.3 0-0.5-26.5-27-58.8-59-54.3-53.8-59.2-58.4-63.8-59.8-2.7-0.8-7.4-3-10.4-4.8-3-1.8-7.9-5.7-10.8-8.5-3-2.9-7.3-7.9-9.7-11.2-2.4-3.3-6.4-10.3-8.9-15.5-4.2-8.7-5.6-10.6-18-23l-13.5-13.5z"/><path id="Path 2" fill-rule="evenodd" class="s2" d="m225.8 184c13.2 0 17 0.3 20.3 1.8 2.3 0.9 4.6 2.5 5 3.5 0.6 1.2 2.1 1.7 4.9 1.7 2.8 0 4.3-0.5 4.9-1.8 0.4-0.9 2.5-2.5 4.5-3.5 3-1.4 6.5-1.7 21.6-1.7 9.9 0 19.1 0.4 20.5 1 1.4 0.6 3.2 2 4 3.3 1.2 1.6 1.6 4.8 1.6 11.7-0.1 7.9-0.4 10.3-2.3 13.9-1.3 2.5-3.4 5.3-4.8 6.3-1.4 1-4.3 2.3-6.5 2.8-2.2 0.5-7.8 1-12.5 1-4.7 0-10.3-0.5-12.5-1-2.2-0.5-5.1-1.8-6.5-2.8-1.4-1-3.5-3.6-4.7-5.8-1.3-2.1-2.6-6-3-8.7-0.8-4.5-0.9-4.7-4.1-4.7-3.1 0-3.2 0.2-4.3 5.8-0.6 3.1-1.7 6.8-2.4 8.2-0.7 1.4-2.6 3.7-4.2 5.2-1.5 1.5-3.9 3-5.3 3.3-2 0.6-3.3 0-6.8-3.1-2.4-2.2-4.3-4.2-4.2-4.6 0-0.5 1.3-0.8 3-0.8 1.6 0 3.9-0.4 5-1 1.1-0.6 2.9-2.9 4-5.2 1.1-2.4 2-5.9 2-7.8 0-1.9-0.6-4.4-1.4-5.5-1.3-1.8-2.6-2-14.4-2-11.6 0-13.2 0.2-17.1 4l-4-4.5c-2.1-2.5-3.7-4.8-3.5-5.2 0.2-0.5 1.9-1.5 3.6-2.3 2.5-1 7.5-1.4 19.5-1.5zm44.3 13.3c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.7 1.7 3.9 2.5 8.3 3.1 3.3 0.4 8.2 0.4 11 0 2.7-0.3 5.8-1.1 6.7-1.6 1-0.5 2.5-2.5 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.4-2.2-2.1-2.3-15.3-2.2-7.5 0-14.2 0.3-14.9 0.5-0.6 0.3-1.7 2-2.3 3.7zm-40 126.7c0.3-0.1 2.2 2 8 9l-23.5 22.7 22.4 23.8-7.8 8-16.1-15.5c-8.8-8.5-16.2-15.8-16.3-16.2-0.1-0.3 7.3-7.6 16.3-16.2 9.1-8.6 16.7-15.6 17-15.6zm33.5 0l4 0.1c2.2 0.1 5 0.4 6.1 0.7 2.1 0.7 1.8 1.7-19.4 62.7l-5.3-0.3c-3-0.2-5.6-0.5-5.9-0.7-0.3-0.2 4.2-14.4 10-31.4zm20.7 3.9l2.7 1.9c1.4 1.1 8.2 7.3 27.6 26l-15.5 15.6c-8.5 8.6-16 15.6-16.7 15.6-0.7 0-2.9-2-8.3-8.5l23.2-22-6.8-6.7c-3.8-3.7-8.1-7.6-9.6-8.8-1.5-1.1-2.8-2.5-2.9-3.1 0-0.6 1.4-3.1 3.1-5.5z"/></g></svg>',Gn=`data:image/svg+xml,${encodeURIComponent(Lp)}`;import{jsx as to,jsxs as Hn}from"react/jsx-runtime";function E3(){let t=Ep();return Rp(()=>{t.isValid},[t.isValid]),t.isValid?null:Hn("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",right:"20px",top:"50%",transform:"translateY(-50%)",zIndex:9999,display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",backgroundColor:"rgba(255, 255, 255, 0.95)",border:"2px solid rgba(242, 61, 41, 0.3)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",textDecoration:"none",transition:"all 0.2s ease",cursor:"pointer",opacity:.9},onMouseEnter:e=>{e.currentTarget.style.opacity="1",e.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.9",e.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[to("img",{src:Gn,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),Hn("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[to("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),to("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}import"react";import{Stack as rm}from"@donotdev/components";import{Mail as Bp,Calendar as Mp,Clock as zp}from"lucide-react";import{useState as Op}from"react";import{Skeleton as _n,Badge as Up,BADGE_VARIANT as Vp,Text as lt,cn as $n,CopyToClipboard as Wn,Stack as Ee}from"@donotdev/components";import{getWeekFromISOString as Gp}from"@donotdev/core";import{jsx as M,jsxs as ve}from"react/jsx-runtime";var Hp=({config:t,value:e,t:o,className:n,loading:r=!1,showCopy:a=!1,asBadge:i=!1,truncate:p=!1,maxLength:s=50,showLabel:c=!1})=>{let[d,l]=Op(!1),g=async()=>{try{await navigator.clipboard.writeText(e),l(!0),setTimeout(()=>l(!1),2e3)}catch{}},m=()=>{switch(t.type){case"email":return M(Bp,{});case"month":case"week":return M(Mp,{});case"time":return M(zp,{});default:return null}},f=v=>{if(!v)return null;switch(t.type){case"email":return ve("a",{href:`mailto:${v}`,style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)"},onMouseEnter:N=>N.currentTarget.style.textDecoration="underline",onMouseLeave:N=>N.currentTarget.style.textDecoration="none",children:[m(),v]});case"month":return new Date(v).toLocaleDateString("en-US",{year:"numeric",month:"long"});case"week":return Gp(v);case"time":return new Date(`2000-01-01T${v}`).toLocaleTimeString();default:return v}},u=v=>!p||v.length<=s?v:`${v.substring(0,s)}...`;if(r)return ve(Ee,{gap:"tight",children:[c&&M(_n,{style:{height:"1rem",width:"6rem"}}),M(_n,{className:"dndev-w-full",style:{height:"1.5rem"}})]});if(!e)return ve(Ee,{gap:"tight",children:[c&&M(lt,{as:"span",variant:"muted",children:t.label||t.name}),M(lt,{as:"span",variant:"muted",className:$n(n),style:{fontStyle:"italic"},children:o("common.noValue",{defaultValue:"No value"})})]});let h=f(e),y=u(String(h));return i?ve(Ee,{direction:"row",align:"center",gap:"tight",children:[m(),M(Up,{variant:Vp.SECONDARY,className:n,children:y}),a&&M(Wn,{text:e,tooltipText:o("copyToClipboard")||"Copy to clipboard",copiedTooltipText:o("copied")||"Copied!",ariaLabel:o("copyToClipboard")||"Copy to clipboard"})]}):ve(Ee,{gap:"tight",children:[c&&M(lt,{as:"span",variant:"muted",children:t.label||t.name}),ve(Ee,{direction:"row",align:"center",gap:"tight",children:[M("div",{className:$n("dndev-flex-1",p&&"truncate",n),title:p&&e.length>s?e:void 0,children:M(lt,{as:"span",children:y})}),a&&M(Wn,{text:e,tooltipText:o("copyToClipboard")||"Copy to clipboard",copiedTooltipText:o("copied")||"Copied!",ariaLabel:o("copyToClipboard")||"Copy to clipboard"})]})]})},ct=Hp;import{Badge as _p,Text as $p}from"@donotdev/components";import{jsx as Kn}from"react/jsx-runtime";var Wp=({config:t,value:e,t:o,className:n})=>{if(e==null)return Kn($p,{as:"span",variant:"muted",className:n,children:"-"});let r=typeof e=="boolean"?o(e?"common.yes":"common.no"):String(e);return Kn(_p,{variant:typeof e=="boolean"?e?"default":"secondary":"outline",className:n,children:r})},oo=Wp;import{Avatar as Kp,Text as Yp}from"@donotdev/components";import{jsx as Yn}from"react/jsx-runtime";var qp=({config:t,value:e,t:o,className:n,size:r="md"})=>{if(!e)return Yn(Yp,{as:"span",variant:"muted",className:n,children:"-"});let a={sm:"size-touch",md:"size-touch",lg:"h-16 w-16"},i=p=>p.split(" ").map(s=>s.charAt(0)).slice(0,2).join("").toUpperCase();return Yn(Kp,{src:e,alt:t.label||"Avatar",fallback:i(t.label||"AV"),className:`${a[r]} ${n||""}`})},no=qp;import"react";import{Text as Zp}from"@donotdev/components";import{Link as Jp}from"@donotdev/ui";import{jsx as qn}from"react/jsx-runtime";var Qp=({config:t,value:e,t:o,className:n})=>{if(!e)return qn(Zp,{as:"span",variant:"muted",className:n,children:"-"});let a=(()=>{switch(t.type){case"email":return{path:`mailto:${e}`,"aria-label":o("common.sendEmailTo",{email:e})};case"tel":return{path:`tel:${e}`,"aria-label":o("common.callNumber",{number:e})};default:return{path:e,"aria-label":o("common.openLink")}}})();return qn(Jp,{...a,className:n||"",style:{color:"var(--primary)"},onMouseEnter:i=>i.currentTarget.style.textDecoration="underline",onMouseLeave:i=>i.currentTarget.style.textDecoration="none",children:e})},ro=Qp;import"react";import{Text as Be}from"@donotdev/components";import{Skeleton as Xp}from"@donotdev/ui";import{jsx as be,jsxs as ed}from"react/jsx-runtime";var jp=({config:t,value:e,t:o,className:n,loading:r=!1})=>{if(r)return be(Xp,{className:n});if(!e)return be(Be,{as:"span",variant:"muted",className:n,children:"-"});try{let a=new Date(e),i=a.toLocaleDateString(),p=a.toLocaleTimeString();return t.type==="date"?be(Be,{as:"span",className:n,children:i}):ed("div",{className:n,children:[be(Be,{as:"span",children:i}),be(Be,{as:"span",variant:"muted",level:"small",children:p})]})}catch{return be(Be,{as:"span",variant:"muted",className:n,children:"-"})}},ao=jp;import"react";import{Text as Zn}from"@donotdev/components";import{Skeleton as td}from"@donotdev/ui";import{jsx as io}from"react/jsx-runtime";var od=({config:t,value:e,t:o,className:n,loading:r=!1})=>r?io(td,{className:n}):e==null?io(Zn,{as:"span",variant:"muted",className:n,children:"-"}):io(Zn,{as:"span",className:`font-mono ${n||""}`,children:e.toLocaleString()}),so=od;import"react";import{Text as nd}from"@donotdev/components";import{Link as rd}from"@donotdev/ui";import{jsx as Jn}from"react/jsx-runtime";var ad=({config:t,value:e,t:o,className:n})=>e?Jn(rd,{path:`tel:${e}`,className:n||"",style:{color:"var(--primary)"},onMouseEnter:r=>r.currentTarget.style.textDecoration="underline",onMouseLeave:r=>r.currentTarget.style.textDecoration="none","aria-label":o("common.callNumber",{number:e}),children:e}):Jn(nd,{as:"span",variant:"muted",className:n,children:"-"}),lo=ad;import"react";import{Text as Qn}from"@donotdev/components";import{jsx as Xn}from"react/jsx-runtime";var id=({config:t,value:e,t:o,className:n})=>e?Xn(Qn,{as:"div",level:"small",className:`whitespace-pre-wrap ${n||""}`,children:e}):Xn(Qn,{as:"span",variant:"muted",className:n,children:"-"}),co=id;import{Badge as sd,Text as ld}from"@donotdev/components";import{jsx as jn}from"react/jsx-runtime";var cd=({config:t,value:e,t:o,className:n})=>{if(e==null)return jn(ld,{as:"span",variant:"muted",className:n,children:"-"});let r=o(e?"common.yes":"common.no");return jn(sd,{variant:e?"default":"secondary",className:n,children:r})},po=cd;import{Badge as pd,BADGE_VARIANT as dd,Text as md}from"@donotdev/components";import{jsx as er}from"react/jsx-runtime";var ud=({config:t,value:e,t:o,className:n})=>e?er(pd,{variant:dd.OUTLINE,className:n,children:e}):er(md,{as:"span",variant:"muted",className:n,children:"-"}),mo=ud;import"react";import{Badge as gd,BADGE_VARIANT as fd,Text as hd,Stack as yd}from"@donotdev/components";import{jsx as uo}from"react/jsx-runtime";var vd=({config:t,value:e,t:o,className:n})=>!e||!Array.isArray(e)||e.length===0?uo(hd,{as:"span",variant:"muted",className:n,children:"-"}):uo(yd,{direction:"row",wrap:"wrap",gap:"medium",className:n,children:e.map((r,a)=>uo(gd,{variant:fd.OUTLINE,children:String(r)},a))}),go=vd;import"react";import{Badge as bd,BADGE_VARIANT as xd,Text as Cd,Stack as Td}from"@donotdev/components";import{jsx as fo}from"react/jsx-runtime";var Sd=({config:t,value:e,t:o,className:n})=>!e||!Array.isArray(e)||e.length===0?fo(Cd,{as:"span",variant:"muted",className:n,children:"-"}):fo(Td,{direction:"row",wrap:"wrap",gap:"medium",className:n,children:e.map((r,a)=>fo(bd,{variant:xd.OUTLINE,children:String(r)},a))}),ho=Sd;import"react";import{Badge as kd,BADGE_VARIANT as wd,Text as Nd}from"@donotdev/components";import{jsx as tr}from"react/jsx-runtime";var Dd=({config:t,value:e,t:o,className:n})=>e?tr(kd,{variant:wd.OUTLINE,className:n,children:e}):tr(Nd,{as:"span",variant:"muted",className:n,children:"-"}),yo=Dd;import"react";import{Text as or}from"@donotdev/components";import{jsx as nr}from"react/jsx-runtime";var Ad=({config:t,value:e,t:o,className:n})=>e==null?nr(or,{as:"span",variant:"muted",className:n,children:"-"}):nr(or,{as:"span",className:`font-mono ${n||""}`,children:e}),Id=Ad;import{Badge as Pd,BADGE_VARIANT as Fd,Text as rr,Stack as Ld}from"@donotdev/components";import{jsx as ar,jsxs as ir}from"react/jsx-runtime";var Rd=({config:t,value:e,t:o,className:n})=>e?ir(Ld,{direction:"row",align:"center",gap:"medium",className:n,children:[ar(rr,{as:"span",level:"small",children:e.name}),e.size&&ir(Pd,{variant:Fd.SECONDARY,children:[(e.size/1024).toFixed(1)," KB"]})]}):ar(rr,{as:"span",variant:"muted",className:n,children:"-"}),vo=Rd;import"react";import{Avatar as Ed,Text as Bd}from"@donotdev/components";import{jsx as sr}from"react/jsx-runtime";var Md=({config:t,value:e,t:o,className:n,size:r="md"})=>{if(!e)return sr(Bd,{as:"span",variant:"muted",className:n,children:"-"});let a={sm:"size-touch",md:"size-touch",lg:"h-16 w-16"},i=p=>p.split(" ").map(s=>s.charAt(0)).slice(0,2).join("").toUpperCase();return sr(Ed,{src:e,alt:t.label||"Image",fallback:i(t.label||"IMG"),className:`${a[r]} ${n||""}`})},bo=Md;import"react";import{Text as lr}from"@donotdev/components";import{jsx as Od,jsxs as Ud}from"react/jsx-runtime";var zd=({config:t,value:e,t:o,className:n})=>!e||e.lat===void 0&&e.lng===void 0?Od(lr,{as:"span",variant:"muted",className:n,children:"-"}):Ud(lr,{as:"div",level:"small",className:`font-mono ${n||""}`,children:[e.lat?.toFixed(6),", ",e.lng?.toFixed(6)]}),xo=zd;import"react";import{Text as cr}from"@donotdev/components";import{jsx as Gd,jsxs as Hd}from"react/jsx-runtime";var Vd=({config:t,value:e,t:o,className:n})=>!e||e.lat===void 0&&e.lng===void 0?Gd(cr,{as:"span",variant:"muted",className:n,children:"-"}):Hd(cr,{as:"div",level:"small",className:`font-mono ${n||""}`,children:[e.lat?.toFixed(6),", ",e.lng?.toFixed(6)]}),Co=Vd;import"react";import{Badge as _d,BADGE_VARIANT as $d,Text as Wd}from"@donotdev/components";import{jsx as pr}from"react/jsx-runtime";var Kd=({config:t,value:e,t:o,className:n})=>{if(!e)return pr(Wd,{as:"span",variant:"muted",className:n,children:"-"});let r=e.displayName||e.name||e.id||e;return pr(_d,{variant:$d.OUTLINE,className:n,children:String(r)})},To=Kd;import"react";import{Text as pt}from"@donotdev/components";import{jsx as dt,jsxs as qd}from"react/jsx-runtime";var Yd=({config:t,value:e,t:o,className:n})=>{if(!e)return dt(pt,{as:"span",variant:"muted",className:n,children:"-"});try{let r=new Date(e),a=r.toLocaleDateString(),i=r.toLocaleTimeString();return qd("div",{className:n,children:[dt(pt,{as:"span",children:a}),dt(pt,{as:"span",variant:"muted",level:"small",children:i})]})}catch{return dt(pt,{as:"span",variant:"muted",className:n,children:"-"})}},So=Yd;import"react";var Zd=()=>null,ko=Zd;var Jd=()=>null,wo=Jd;import{Eye as Qd,EyeOff as Xd}from"lucide-react";import"react";import{useState as jd}from"react";import{Skeleton as em,Button as tm,CopyToClipboard as om,Stack as dr}from"@donotdev/components";import{jsx as se,jsxs as mr}from"react/jsx-runtime";var nm=({config:t,value:e,t:o,className:n,loading:r=!1})=>{let[a,i]=jd(!1);return r?se(em,{className:n}):e?mr(dr,{direction:"row",align:"center",gap:"medium",className:n,children:[se("span",{style:{fontFamily:"monospace"},children:a?e:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),mr(dr,{direction:"row",align:"center",gap:"tight",children:[se(tm,{type:"button",onClick:()=>i(!a),"aria-label":a?"Hide password":"Show password",children:a?se(Xd,{}):se(Qd,{})}),se(om,{text:e,tooltipText:o("copyToClipboard")||"Copy to clipboard",copiedTooltipText:o("copied")||"Copied!",ariaLabel:o("copyPassword")||"Copy password"})]})]}):se("div",{style:{color:"var(--muted-foreground)"},children:"-"})},ur=nm;import{Fragment as gr,jsx as b,jsxs as am}from"react/jsx-runtime";function No({name:t,config:e,t:o,value:n,className:r}){let a=()=>{switch(e.type){case"password":return b(ur,{config:e,value:n,t:o,className:r,loading:!1});case"text":case"email":case"month":case"week":case"time":return b(ct,{config:e,value:n,t:o,className:r});case"avatar":return b(no,{config:e,value:n,t:o,className:r});case"badge":return b(oo,{config:e,value:n,t:o,className:r});case"boolean":case"checkbox":return b(po,{config:e,value:n,t:o,className:r});case"array":return b(ho,{config:e,value:n,t:o,className:r});case"multiselect":return b(go,{config:e,value:n,t:o,className:r});case"image":return b(bo,{config:e,value:n,t:o,className:r});case"url":return b(ro,{config:e,value:n,t:o,className:r});case"tel":return b(lo,{config:e,value:n,t:o,className:r});case"color":return n&&typeof n=="string"?am(rm,{direction:"row",align:"center",gap:"tight",children:[b("div",{style:{backgroundColor:n,width:"1.5rem",height:"1.5rem"},"aria-label":`Color: ${n}`}),b("span",{style:{fontFamily:"monospace"},children:n})]}):b("span",{style:{color:"var(--muted-foreground)"},children:"-"});case"number":case"range":return b(so,{config:e,value:n,t:o,className:r});case"date":case"datetime-local":return b(ao,{config:e,value:n,t:o,className:r});case"timestamp":return b(So,{config:e,value:n,t:o,className:r});case"reference":return b(To,{config:e,value:n,t:o,className:r});case"file":return b(vo,{config:e,value:n,t:o,className:r});case"geopoint":return b(xo,{config:e,value:n,t:o,className:r});case"map":return b(Co,{config:e,value:n,t:o,className:r});case"textarea":return b(co,{config:e,value:n,t:o,className:r});case"select":return b(mo,{config:e,value:n,t:o,className:r});case"radio":return b(yo,{config:e,value:n,t:o,className:r});case"hidden":return b(ko,{config:e,value:n,t:o,className:r});case"submit":case"reset":return b(wo,{config:e,value:n,t:o,className:r});default:return b(ct,{config:e,value:n,t:o,className:r})}};if(e.hidden)return b(gr,{});let i=a();return i?b("div",{className:r,children:i}):b(gr,{})}import{Stack as fr}from"@donotdev/components";import{useTranslation as im}from"@donotdev/core";import{jsx as Me,jsxs as lm}from"react/jsx-runtime";function sm({entity:t,data:e,t:o,className:n="",loading:r=!1}){let{t:a}=im("dndev"),i=o||a,p=Object.entries(t);return r?Me(fr,{gap:"medium",className:n,children:p.map(([s])=>lm("div",{className:"dndev-animate-pulse",children:[Me("div",{style:{marginBottom:"var(--gap-sm)",height:"1rem",width:"25%"}}),Me("div",{style:{height:"2rem",backgroundColor:"var(--muted)"}})]},s))}):Me(fr,{gap:"medium",className:n,children:p.map(([s,c])=>Me(No,{name:s,config:c,value:e[s],t:i},s))})}import{createContext as yr,useId as cm,use as hr}from"react";import{Controller as pm,FormProvider as dm,useFormContext as mm}from"react-hook-form";import{Label as um,Slot as gm,cn as fm,Stack as hm}from"@donotdev/components";import{jsx as te}from"react/jsx-runtime";var ay=dm,vr=yr({}),iy=({...t})=>te(vr.Provider,{value:{name:t.name},children:te(pm,{...t})}),br=yr({}),sy=({className:t,...e})=>{let o=cm();return te(br.Provider,{value:{id:o},children:te(hm,{gap:"medium",className:t,...e})})},mt=()=>{let t=hr(vr);if(!t||!t.name)return null;let e=hr(br);if(!e)return null;let{getFieldState:o,formState:n}=mm(),r=o(t.name,n),{id:a}=e;return{id:a,name:t.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},ly=({className:t,...e})=>{let o=mt();if(!o)return null;let{error:n,formItemId:r}=o;return te(um,{className:fm(n&&"text-destructive",t),htmlFor:r,...e})},cy=({...t})=>{let e=mt();if(!e)return null;let{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=e;return te(gm,{id:n,"aria-describedby":o?`${r} ${a}`:`${r}`,"aria-invalid":!!o,...t})},py=({className:t,...e})=>{let o=mt();if(!o)return null;let{formDescriptionId:n}=o;return te("p",{id:n,className:t,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...e})},dy=({className:t,children:e,...o})=>{let n=mt();if(!n)return null;let{error:r,formMessageId:a}=n,i=r?String(r?.message):e;return i?te("p",{id:a,className:t,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var ym={layoutContainer:"dndev-layout",sidebar:"sidebar",sidebarTop:"sidebar-top",sidebarContent:"sidebar-content",sidebarBottom:"sidebar-bottom",sidebarResizeHandle:"dndev-sidebar-resize-handle",header:"header",main:"main",footer:"footer",container:"dndev-container",pageContainer:"dndev-container",breadcrumbsContainer:"breadcrumbs-container"},vm={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},by={...ym,...vm},xy={headerHeight:"--header-height",headerPadding:"--header-padding",headerIconSize:"--header-icon-size",headerLogoMaxHeight:"--header-logo-max-height",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",mainPadding:"--main-padding",mainMaxWidth:"--main-max-width",contentWidth:"--content-width",contentPadding:"--content-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zOverlay:"--z-overlay",zModal:"--z-modal",zTooltip:"--z-tooltip",zToast:"--z-toast"},Cy={headerHeight:"--header-height",headerPadding:"--header-padding",logoSize:"--logo-size",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",layoutGap:"--layout-gap",sectionGap:"--gap-lg",contentGap:"--content-gap",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zModal:"--z-modal",zTooltip:"--z-tooltip"};export{tc as AppBranding,rc as AppIcon,zs as AppLoading,sc as AppTitle,R as AssetResolver,ra as AuthGuard,G1 as AuthGuardFallback,zt as AuthHeader,Rt as AuthMenu,no as AvatarFieldDisplay,oo as BadgeFieldDisplay,bc as Breadcrumbs,wo as ButtonFieldDisplay,Yt as CacheSettings,po as CheckboxFieldDisplay,x2 as ConsentBanner,ao as DateFieldDisplay,No as DisplayFieldRenderer,en as DnDevNavigationMenu,mo as DropdownDisplay,Oc as DropdownNavigation,sm as EntityDisplayRenderer,Cl as FeatureCard,Ks as FeatureDisabled,vo as FileFieldDisplay,Hc as FloatingLanguageSwitcher,ay as Form,cy as FormControl,py as FormDescription,iy as FormField,sy as FormItem,ly as FormLabel,dy as FormMessage,w2 as GameContainer,I2 as GameFlow,Sc as GameTitle,xo as GeoPointFieldDisplay,Y1 as GoTo,ki as GoToInput,hi as GoToWrapper,qc as HeaderMenu,tp as HeaderNavigation,ko as HiddenFieldDisplay,wr as Icon,bo as ImageFieldDisplay,E3 as LicenseWatermark,T as Link,ro as LinkFieldDisplay,Ue as Loader,al as LoadingContainerOverlay,tt as LoadingMessage,Js as LoadingMessageAlmostDone,Qs as LoadingMessageComplete,tl as LoadingMessageConnecting,Zs as LoadingMessageProcessing,Xs as LoadingMessageSaving,el as LoadingMessageSearching,qs as LoadingMessageSimple,js as LoadingMessageUploading,il as LoadingOverlay,cl as LoadingScreen,Co as MapFieldDisplay,go as MultiDropdownDisplay,ho as MultiInputTextFieldDisplay,tn as NotFoundPage,mp as Notifications,so as NumberFieldDisplay,me as PageContainer,lo as PhoneNumberDisplay,ml as ProgressBar,yo as RadioFieldDisplay,Id as RangeFieldDisplay,To as ReferenceFieldDisplay,kp as SettingsMenu,fl as Skeleton,Gl as TechBento,co as TextAreaDisplay,ct as TextFieldDisplay,Fp as ThemeToggle,So as TimestampFieldDisplay,by as allLayoutClasses,l1 as createAuthConfig,Cy as cssVariables,Vm as isAuthAvailable,Ng as isBillingAvailable,Eg as isCrudAvailable,Og as isOAuthAvailable,ym as layoutClasses,vm as layoutUtilities,xy as layoutVariables,bg as resolveFaviconSet,vg as resolveLogo,_g as tList,Ht as techLogos,S as useAuthSafe,i1 as useAuthState,Qe as useAuthVisibility,ig as useBack,Pg as useBillingVisibility,n1 as useCanAccess,aa as useCanNavigate,Rg as useCrudSafe,mt as useFormField,_o as useGoTo,a1 as useHasRole,cg as useLocation,mg as useMatch,ag as useNavigate,_ as useNavigationItems,zg as useOAuthSafe,pg as useParams,lg as usePrefetch,ug as useQueryParams,gg as useRedirectGuard,sg as useRefresh,dg as useSearchParams,It as useStripeBillingSafe,r1 as useUserRole,s1 as withAuth};
3
+ `);try{await navigator.clipboard.writeText(h),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},f=()=>{try{e()}catch{typeof window<"u"&&window.location.reload()}},u=()=>{try{c()}catch{typeof window<"u"&&window.history.back()}};return L(ge,{children:L(_o,{variant:$o.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:le(ue,{gap:"large",align:"center",className:"dndev-text-center",children:[L(ue,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:L(fa,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),le(ue,{gap:"medium",children:[L("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:r("routeError.title","Something went wrong")}),L("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:r("routeError.description","We encountered an error while loading this page.")}),L(Sa,{variant:ka.SUCCESS,hideIcon:!0,children:L("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:r("routeError.dataSafe","Don't worry, your data is safe.")})})]}),n&&le("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-full)",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",color:"var(--foreground)"},children:[r("routeError.errorId","Error ID"),": ",n]}),g&&m&&le(_o,{variant:$o.MUTED,className:"dndev-w-full",children:[le(ue,{direction:"row",align:"center",justify:"between",gap:"medium",children:[L("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),L(qe,{variant:Ze.GHOST,icon:a?xa:ba,onClick:p,disabled:a,children:a?r("routeError.copied","Copied"):r("routeError.copyDetails","Copy Details")})]}),L("pre",{style:{fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",wordBreak:"break-word",whiteSpace:"pre-wrap",color:"var(--foreground)",margin:0,marginTop:"var(--gap-sm)"},children:m})]}),le(ue,{gap:"medium",className:"dndev-w-full",children:[L(qe,{variant:Ze.DESTRUCTIVE,icon:va,onClick:f,fullWidth:!0,children:r("routeError.tryAgain","Try Again")}),le(ue,{direction:"row",gap:"medium",justify:"center",children:[L(T,{path:"/",children:L(qe,{variant:Ze.DEFAULT,icon:ha,fullWidth:!0,children:r("routeError.goHome","Go Home")})}),L(qe,{variant:Ze.OUTLINE,icon:ya,onClick:u,fullWidth:!0,children:r("routeError.goBack","Go Back")})]})]}),L("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:r("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},Wo=Aa;import{jsx as De}from"react/jsx-runtime";var ge=({variant:t="standard",density:e,className:o,children:n,centered:r=!0,gapFirst:a=!1})=>De(Ho,{level:"route",fallback:i=>De(Ia,{fallback:De("div",{children:"Loading error fallback..."}),children:De(Wo,{...i})}),children:De("div",{className:Fa("dndev-container",o),"data-variant":t,"data-density":e,"data-centered":r?"true":"false","data-gap-first":a?"true":void 0,children:n})});import{Fragment as $a,jsx as D,jsxs as Pe}from"react/jsx-runtime";var _a=Ba(()=>import("@donotdev/auth").then(t=>({default:t.MultipleAuthProviders})));function l1({title:t,description:e,showBackButton:o=!0,onBack:n,className:r=""}){let{t:a}=Va(["auth","common"]),i=Ga(),c=Ha(),l=()=>{n?n():c()};return D(ge,{variant:"docs",children:D(fe,{align:"center",justify:"center",className:Ua("dndev-min-h-60",r),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:D(Ma,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:Pe(fe,{gap:"medium",children:[D(fe,{justify:"center",children:D("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:D(Ra,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),D("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),D("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:Pe(fe,{gap:"medium",children:[Pe(fe,{gap:"large",children:[D("div",{children:D("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),D(Ea,{fallback:D("div",{children:"Loading providers..."}),children:D(_a,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&Pe($a,{children:[D(za,{}),D("div",{children:D(Oa,{onClick:l,className:"dndev-gap-sm",icon:La,children:a("common.back")})})]}),Pe(fe,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[D("p",{children:a("auth.fallback.secure")}),D("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as Wa}from"lucide-react";import{Button as Ka,BUTTON_VARIANT as Ya,DISPLAY as qa}from"@donotdev/components";import{useOverlayStore as Za,useTranslation as Ja}from"@donotdev/core";import{jsx as Qa,jsxs as Xa}from"react/jsx-runtime";var g1=({display:t=qa.AUTO,className:e})=>{let{t:o}=Ja("dndev"),n=Za(i=>i.openCommandDialog),a=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)?"\u2318K":"Ctrl+K";return Xa(Ka,{variant:Ya.OUTLINE,display:t,icon:Wa,onClick:()=>n(),className:e,"aria-label":o("goTo.ariaLabel","Go to page"),children:[o("goTo.label","Go to"),Qa("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:a})]})};import{Suspense as yi,lazy as vi}from"react";import{useEventListener as bi,useOverlayStore as xi}from"@donotdev/core";import{jsx as Qo}from"react/jsx-runtime";var Ci=vi(()=>Promise.resolve().then(()=>(Jo(),Zo))),Ti=()=>{let t=xi(e=>e.openCommandDialog);return bi("keydown",e=>{(e.metaKey||e.ctrlKey)&&e.key==="k"&&(e.preventDefault(),t())},{target:document,options:{passive:!1,capture:!1}}),Qo(yi,{fallback:null,children:Qo(Ci,{})})},Si=Ti;import{Search as ki}from"lucide-react";import{useCallback as Xo,useEffect as wi,useState as Ni,useRef as Di}from"react";import{Stack as Pi}from"@donotdev/components";import{useOverlayStore as jo}from"@donotdev/core";import{useTranslation as Ai}from"@donotdev/core";import{jsx as Xe,jsxs as Li}from"react/jsx-runtime";var Ii=()=>{let{t}=Ai("dndev"),[e,o]=Ni(""),n=Di(null),r=jo(l=>l.openCommandDialog),a=jo(l=>l.isCommandDialogOpen);wi(()=>{a||o("")},[a]);let i=Xo(()=>{r(e)},[r,e]),c=Xo(l=>{l.key==="Enter"&&(l.preventDefault(),r(e))},[r,e]);return Li(Pi,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[Xe(ki,{className:"dndev-absolute dndev-size-md",style:{left:"0.75rem",opacity:.5},"aria-hidden":"true"}),Xe("input",{ref:n,type:"text",value:e,onChange:l=>o(l.target.value),onFocus:i,onKeyDown:c,placeholder:t("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingLeft:"2.5rem",paddingRight:"5rem"},"aria-label":t("globalGoTo.ariaLabel","Search navigation")}),Xe("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{right:"0.75rem",gap:"0.25rem",opacity:.5},"aria-hidden":"true",children:Xe("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:"\u2318K"})})]})},Fi=Ii;import{MoreHorizontal as Ri,Link as en}from"lucide-react";import{useState as Ei,useEffect as tn,useRef as Bi,useMemo as Mi}from"react";import{NavigationMenu as on,NavigationMenuListPrimitive as Oi,NavigationMenuItemPrimitive as nn,Button as zi,DropdownMenu as Ui,cn as je,DISPLAY as Vi}from"@donotdev/components";import{useTranslation as Gi}from"@donotdev/core";he();ae();import{jsx as H,jsxs as Pt}from"react/jsx-runtime";var rn=({routes:t,vertical:e=!1,display:o=Vi.AUTO,overflowDetection:n=!1,showIcons:r=!0,className:a,style:i})=>{let{t:c}=Gi("dndev"),l=_(),d=t??l,m=Bi(null),[s,g]=Ei(d.length),p=Mi(()=>d.map(f=>({label:f.label,path:f.path,icon:H(R,{icon:f.icon,fallback:en}),children:f.children?f.children.map(u=>({label:u.label,path:u.path,icon:H(R,{icon:u.icon,fallback:en})})):void 0})),[d]);if(tn(()=>{if(!n||d.length===0||e)return;let f=()=>{let h=m.current;if(!h)return;let v=h.getBoundingClientRect(),y=h.querySelectorAll("[data-nav-item]"),S=h.querySelector("[data-more-button]"),w=0,U=S?.offsetWidth||0;for(let V=0;V<y.length;V++){let re=y[V];if(!re)break;if(re.getBoundingClientRect().right-v.left+(V===y.length-1&&S?U:0)<=v.width)w=V+1;else break}g(Math.max(0,w))},u=new ResizeObserver(f);return m.current&&u.observe(m.current),setTimeout(f,0),()=>u.disconnect()},[n,d.length,e]),tn(()=>{n&&!e&&g(d.length)},[d.length,n,e]),d.length===0)return null;if(n&&!e){let f=p.slice(0,s),u=p.slice(s);return H(on,{className:je(a),style:i||{flex:1},children:Pt(Oi,{ref:m,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[f.filter(h=>h.path).map((h,v)=>H(nn,{"data-nav-item":!0,children:Pt(T,{path:h.path,className:je("dndev-interactive"),"data-role":"nav-trigger",children:[r&&h.icon,H("span",{className:"dndev-interactive-label",children:h.label})]})},h.path||v)),u.length>0&&H(nn,{"data-more-button":!0,children:H(Ui,{trigger:H(zi,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":c("navigation.more","More"),children:H(Ri,{className:"dndev-size-md"})}),items:u.filter(h=>h.path).map(h=>({label:h.label,children:Pt(T,{path:h.path,className:je("dndev-interactive"),"data-role":"menu-item",children:[r&&h.icon,H("span",{className:"dndev-interactive-label",children:h.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return H(on,{items:p,vertical:e,display:o,className:je(a,e&&"dndev-sidebar-nav-menu"),LinkComponent:T})};import{Home as Hi,ArrowLeft as _i,Link as $i}from"lucide-react";import{useMemo as Wi}from"react";import{Button as At,BUTTON_VARIANT as It,Stack as Ie,Text as Ft}from"@donotdev/components";import{useTranslation as Ki}from"@donotdev/core";import{useLocation as Yi,useNavigate as qi}from"@donotdev/ui/routing/hooks";he();ae();import{jsx as O,jsxs as et}from"react/jsx-runtime";function an(){let{t}=Ki("dndev"),e=Yi(),o=qi(),n=_(),r=Wi(()=>n.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[n]),a=()=>{o("back")};return O(ge,{variant:"docs",centered:!0,children:et(Ie,{gap:"large",align:"center",justify:"center",children:[et(Ie,{gap:"medium",align:"center",children:[O(Ft,{level:"h1",style:{fontSize:"clamp(4rem, 12vw, 8rem)",fontWeight:"var(--font-weight-bold)",lineHeight:1,letterSpacing:"-0.02em",background:"linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",margin:0},children:"404"}),O(Ft,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:t("errors.notFound.title","Page Not Found")}),O(Ft,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:t("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),e.pathname&&O("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-md)",fontSize:"var(--font-size-sm)",fontFamily:"var(--font-mono)",color:"var(--foreground)",wordBreak:"break-all",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",border:"1px solid var(--border-hairline)"},children:e.pathname})]}),r.length>0&&et(Ie,{gap:"medium",align:"center",children:[O("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:t("errors.notFound.suggestions","You might be looking for:")}),O(Ie,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:r.map(i=>O(T,{path:i.path,replace:!0,children:O(At,{variant:It.OUTLINE,icon:O(R,{icon:i.icon,fallback:$i}),"aria-label":t("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),et(Ie,{direction:"row",wrap:"wrap",justify:"center",gap:"medium",children:[O(T,{path:"/",replace:!0,children:O(At,{variant:It.DEFAULT,icon:Hi,"aria-label":t("errors.notFound.goHome","Go to home page"),children:t("errors.notFound.goHome","Go Home")})}),O(At,{variant:It.OUTLINE,icon:_i,onClick:a,"aria-label":t("errors.notFound.goBack","Go back to previous page"),children:t("errors.notFound.goBack","Go Back")})]})]})})}he();Dt();import{useNavigate as Ng,useBack as Dg,useRefresh as Pg,usePrefetch as Ag,useLocation as Ig,useParams as Fg,useRouteParam as Lg,useSearchParams as Rg,useMatch as Eg,useQueryParams as Bg,useRedirectGuard as Mg}from"@donotdev/ui/routing/hooks";import{useNavigate as Ds}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Lt,isClient as ce,isDev as sn}from"@donotdev/core";var M=class{static getBrowserSupport(){if(!ce())return{svg:!0,webp:!1,avif:!1};let e=this.cache.get("browser-support");if(e)return e;let o={svg:!0,webp:!1,avif:!1};try{let n=document.createElement("canvas");n.width=1,n.height=1,o.webp=n.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let n=document.createElement("canvas");n.width=1,n.height=1,o.avif=n.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(e){let o=[];if(e==null)return o;if(typeof e=="string")o.push(e);else if(Array.isArray(e))for(let n of e)o.push(...this.extractStringValues(n));else if(typeof e=="object")for(let n of Object.values(e))o.push(...this.extractStringValues(n));return o}static assetExists(e){if(!ce())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(e):!1}static getAssetManifest(){return ce()&&Lt()?.assets?.mapping||null}static getLogoSvgContent(){return Lt()?.assets?.logoSvgContent||null}static resolveLogo(e){if(e)return e;let o="logo";if(this.cache.has(o))return this.cache.get(o);let r=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,r),r}static directAssetCheck(e){if(!ce())return!1;try{let o=new Image;return o.src=e,!0}catch{return!1}}static resolveFaviconSet(){let e="favicon-set";if(this.cache.has(e))return this.cache.get(e);let o=this.getAssetManifest();if(o?.favicon?.set){let a=o.favicon.set,i=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",c={svg:a.svg||"/favicon.svg",ico:a.ico||"/favicon.ico",png16:a.png16||i,png32:a.png32||i,apple180:a.apple180||i,android192:a.android192||i,android512:a.android512||i};return this.cache.set(e,c),c}let n=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",r={svg:this.assetExists("/favicon.svg")?"/favicon.svg":"/logo.svg",ico:this.assetExists("/favicon.ico")?"/favicon.ico":"/favicon.svg",png16:this.assetExists("/favicon-16x16.png")?"/favicon-16x16.png":n,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":n,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":n,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":n,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":n};return this.cache.set(e,r),r}static resolveFavicon(){let e=this.getAssetManifest();if(e?.favicon?.optimal)return e.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let n of o)if(this.assetExists(n))return n;return"/favicon.svg"}static clearCache(){this.cache.clear(),sn()&&ce()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:ce()?Lt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};Ge(M,"cache",new Map);function Vg(t){return M.resolveLogo(t)}function Gg(){return M.resolveFaviconSet()}sn()&&(M.clearCache(),ce()&&window.addEventListener("DOMContentLoaded",()=>{M.clearCache()}));ke();import{useMemo as Zi}from"react";function tt(){let t=k("status"),e=k("isAvailable"),o=k("user");return Zi(()=>({shouldHide:t!=="ready"||!e,isLoading:t==="initializing",isReady:t==="ready"&&e,isAuthenticated:!!o}),[t,e,o])}import{DEGRADED_BILLING_API as Ji}from"@donotdev/core";import*as Qi from"@donotdev/billing";var Rt=Qi?.useStripeBilling;function Xi(t){return Ji[t]}function Et(t,e){return Rt?Rt(t,e):Xi(t)}var qg=typeof Rt=="function";ke();function Xg(){let t=k("user"),e=k("status"),o={user:t,status:e},n=Et("status",o),r=Et("isAvailable",o);return{shouldHide:!r,isLoading:n==="initializing",isReady:r&&n==="ready"}}import{DEGRADED_CRUD_API as ji}from"@donotdev/core";import*as es from"@donotdev/crud";var Bt=es?.useCrud;function ts(){return ji}function tf(t,e={}){return Bt?Bt(t,e):ts()}var of=typeof Bt=="function";import{DEGRADED_OAUTH_API as os}from"@donotdev/core";import*as ns from"@donotdev/oauth";var Mt=ns?.useOAuth;function rs(t){return os[t]}function af(t){return Mt?Mt(t):rs(t)}var sf=typeof Mt=="function";import{CheckCircle as as}from"lucide-react";import{List as is}from"@donotdev/components";import{translateArray as ss}from"@donotdev/core";import{jsx as ln}from"react/jsx-runtime";var ls=as,cs=16;function mf(t,e,o,n=ls,r=cs){let a=n;return ln(is,{icon:a?ln(a,{size:r}):void 0,items:ss(t,e,o),style:{listStyle:"none",paddingInlineStart:0}})}import{Fragment as Ls,jsx as j,jsxs as Rs}from"react/jsx-runtime";var dn=()=>null,Ps=pn(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:dn}}}),As=pn(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:dn}}}),Ot=null;ws()&&import("@donotdev/auth").then(t=>{Ot=t.useDeleteAccount}).catch(()=>{});function Is(){let[t]=ot.useState(!1),[e]=ot.useState(!1),[o]=ot.useState(!1),[n]=ot.useState(null);return{showConfirmDialog:t,showPasswordDialog:e,isDeleting:o,error:n,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}}function Fs(){return Ot?Ot():Is()}var nt=t=>{if(!t)return Fe;if(typeof t=="function")return t;let e=t.replace(/['"]/g,"");return gs[e]||Fe},zt=({loginPath:t,display:e=Cs.AUTO,"no-tooltip":o=!1,customItems:n=[],className:r,style:a})=>{let{t:i}=Ts("dndev"),{shouldHide:c,isReady:l,isAuthenticated:d}=tt(),m=ks(),s=k("user"),g=k("signOut"),p=Ns("isLaptop"),f=_(),u=Ds(),h=m.profilePath,v=m.authMenuItems||[],y=Fs(),S=()=>s&&(s.displayName||s.email?.split("@")[0])||"User",w=()=>S().split(" ").map(x=>x.charAt(0)).slice(0,2).join("").toUpperCase(),U=()=>{if(!s)return i("auth.userMenu",{defaultValue:"User menu"});let N=[S()];return s.email&&N.push(s.email),Y&&Y!=="guest"&&N.push(`Role: ${Y}`),N.join(`
4
+ `)},V=fs(()=>{let N=[];return!p&&s&&N.push({children:j(xs,{variant:"muted",as:"span",children:`${S()}${s.email?`
5
+ ${s.email}`:""}`}),disabled:!0}),h&&N.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:ps,onClick:()=>u(h)}),v.forEach(x=>{let b=f.find(Te=>Te.path===x.path),E=x.label||b?.label||x.path.split("/").pop()||"Menu",B=x.icon?nt(x.icon):b?.icon&&(typeof b.icon=="string"||typeof b.icon=="function")?nt(b.icon):Fe;N.push({label:E,icon:B,onClick:()=>u(x.path)})}),n.forEach(x=>{if(x.path){let b=f.find(Te=>Te.path===x.path),E=x.label||b?.label||x.path.split("/").pop()||"Menu",B=x.icon?nt(x.icon):Fe;N.push({label:E,icon:B,onClick:()=>u(x.path),disabled:x.disabled,style:x.style})}else if(x.onClick){let b=x.icon?nt(x.icon):Fe;N.push({label:x.label,icon:b,onClick:x.onClick,disabled:x.disabled,style:x.style})}}),N.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:us,onClick:y.startDeleteFlow,variant:"destructive"}),N.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:ds,onClick:()=>g(),variant:"destructive"}),N},[h,v,n,g,y,i,f,p,s,S,u]);if(Ss().length===0||c||!l)return null;let Y=s?.role;return d?Rs(Ls,{children:[j(cn,{fallback:null,children:j(Ps,{open:y.showPasswordDialog,isLoading:y.isDeleting,error:y.error,onReauth:N=>y.confirmDelete(N),onCancel:y.cancel})}),j(cn,{fallback:null,children:j(As,{open:y.showConfirmDialog,isLoading:y.isDeleting,error:y.error,onConfirm:()=>y.confirmDelete(),onCancel:y.cancel})}),j(bs,{trigger:j(ys,{variant:vs.OUTLINE,icon:s?j(hs,{src:s.photoURL??void 0,fallback:w(),alt:S(),style:{margin:"-4px 0"}}):ms,display:e,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&p&&s?U():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:r,style:a,children:S()}),items:V,contentAlign:"end"})]}):null};import{jsx as I}from"react/jsx-runtime";var gn=()=>null,$s=un(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:gn}}}),mn=un(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:gn}}}),Vt=({display:t=Vs.AUTO,className:e,style:o})=>{let{t:n}=Gs("dndev"),{shouldHide:r,isLoading:a,isReady:i,isAuthenticated:c}=tt(),l=Hs(),d=_s(),[m,s]=Bs(!1),g=l.loginPath,p=n("auth.signIn",{defaultValue:"Sign In"}),f=n("auth.loading",{defaultValue:"Loading..."}),u=d.includes("password")||d.includes("emailLink");if(r||!i)return null;let h=({children:v,...y})=>I(Ms,{variant:Os.OUTLINE,icon:Es,display:t,tooltip:p,className:e,style:o,...y,children:v??p});if(!c){if(g!==void 0)return I(T,{path:g,prefetch:!0,children:I(h,{})});let v=d[0];return u?I(Us,{trigger:I(h,{}),title:p,open:m,onOpenChange:s,"data-content-size":"form",children:I(Ut,{fallback:I("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:f}),children:I(mn,{spacing:"medium",onSuccess:()=>s(!1)})})}):d.length>1?I(zs,{trigger:I(h,{}),children:I(Ut,{fallback:I("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:f}),children:I(mn,{spacing:"tight"})})}):I(Ut,{fallback:I(h,{disabled:a,tooltip:a?f:p,children:a?f:p}),children:I($s,{partnerId:v,display:t,className:e,style:o})})}return I(zt,{display:t,loginPath:g,className:e,style:o})};import{RefreshCw as Ws}from"lucide-react";import"react";import{cn as Ks}from"@donotdev/components";import{jsx as fn,jsxs as Zs}from"react/jsx-runtime";var Ys=({className:t})=>Zs("div",{className:Ks("dndev-loading-overlay",t),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",opacity:"var(--opacity-muted)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:[fn(Ws,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),fn("span",{className:"dndev-sr-only",children:"Loading..."})]}),qs=Ys;import{AlertCircle as Js,RefreshCw as Qs,Mail as Xs,Cookie as js}from"lucide-react";import{Card as el,Button as Gt,BUTTON_VARIANT as Ht,Stack as hn}from"@donotdev/components";import{useTranslation as tl}from"@donotdev/core";import{jsx as Le,jsxs as rt}from"react/jsx-runtime";function ol({featureName:t,title:e,description:o,showReviewCookies:n=!1,showContactSupport:r=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:c,onReviewCookies:l,customActions:d,className:m=""}){let{t:s}=tl("ui"),g=o||s("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:t}),p=()=>{if(l)l();else{let u=new CustomEvent("openCookieConsent");window.dispatchEvent(u)}},f=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${t}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${t} not being available.`)}`};return rt(el,{className:m,title:rt(hn,{direction:"row",align:"center",gap:"tight",children:[Le(Js,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),e||t]}),subtitle:g,children:[" ",rt("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(n||r||a||d)&&rt(hn,{direction:"row",wrap:"wrap",gap:"tight",children:[n&&Le(Gt,{variant:Ht.OUTLINE,onClick:p,icon:js,children:s("featureDisabled.reviewCookies","Review Cookies")}),r&&Le(Gt,{variant:Ht.OUTLINE,onClick:f,icon:Xs,children:s("featureDisabled.contactSupport","Contact Support")}),a&&Le(Gt,{variant:Ht.OUTLINE,onClick:c,icon:Qs,children:s("featureDisabled.retry","Retry")}),d]}),Le("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:s("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var nl=ol;ae();import"react";import{cn as rl}from"@donotdev/components";import{jsx as $,jsxs as ul}from"react/jsx-runtime";var q=({state:t="loading",message:e,show:o=!0,className:n,showSpinner:r=!1,spinnerSize:a="md"})=>{if(!o)return null;let c=e||(d=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[d]||"Loading...")(t),l={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return ul("div",{className:rl(n),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--gap-sm)",color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",transition:"opacity var(--dur-fast) ease-out"},role:"status","aria-live":"polite","aria-label":c,children:[r&&$("div",{style:{...l[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),$("span",{style:{fontWeight:500},children:c})]})},al=({message:t="Loading...",...e})=>$(q,{state:"loading",message:t,...e}),il=({message:t="Processing your request...",...e})=>$(q,{state:"processing",message:t,...e}),sl=({message:t="Almost there...",...e})=>$(q,{state:"almost-done",message:t,...e}),ll=({message:t="Complete!",...e})=>$(q,{state:"complete",message:t,...e}),cl=({showSpinner:t=!0,...e})=>$(q,{state:"processing",message:"Saving your changes...",showSpinner:t,...e}),pl=({showSpinner:t=!0,fileName:e,...o})=>$(q,{state:"processing",message:e?`Uploading ${e}...`:"Uploading file...",showSpinner:t,...o}),dl=({showSpinner:t=!0,query:e,...o})=>$(q,{state:"processing",message:e?`Searching for "${e}"...`:"Searching...",showSpinner:t,...o}),ml=({showSpinner:t=!0,...e})=>$(q,{state:"loading",message:"Connecting to server...",showSpinner:t,...e}),at=q;import{cn as gl}from"@donotdev/components";import{Fragment as yn,jsx as ee,jsxs as vn}from"react/jsx-runtime";var fl=({show:t=!1,backdrop:e=!0,backdropBlur:o=!0,className:n,children:r,message:a,showSpinner:i=!0,spinnerSize:c="lg",preventClicks:l=!0,zIndex:d="var(--z-modal)"})=>{if(!t)return null;let m=d==="var(--z-modal)"||!d?"dndev-z-modal":d==="var(--z-toast)"?"dndev-z-toast":d==="var(--z-tooltip)"?"dndev-z-tooltip":d==="var(--z-overlay)"?"dndev-z-overlay":null;return ee("div",{className:gl("dndev-loading-overlay",m,n),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:e?"var(--background)":"transparent",opacity:e?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:l?"auto":"none",...m?{}:{zIndex:d}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:ee("div",{className:"dndev-surface",style:{display:"grid",placeItems:"center",gap:"var(--gap-md)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:"var(--background)",opacity:"var(--opacity-strong)",border:"1px solid var(--border)",boxShadow:"var(--shadow-xl)",maxWidth:"var(--content-text)",width:"100%",margin:"0 var(--gap-md)"},children:r||vn(yn,{children:[i&&ee("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:c==="sm"?"2rem":c==="md"?"3rem":"4rem",height:c==="sm"?"2rem":c==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&ee(at,{...a})]})})})};var hl=({show:t=!1,backdrop:e=!1,backdropBlur:o=!1,className:n,...r})=>ee("div",{className:n,style:{position:"absolute",inset:0,display:t?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:e?"var(--background)":"transparent",opacity:e?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:ee("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:r.children||vn(yn,{children:[ee("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:"1.5rem",height:"1.5rem"},role:"status","aria-hidden":"true"}),r.message&&ee(at,{...r.message})]})})}),yl=fl;import"react";import{cn as vl}from"@donotdev/components";import{jsx as bn}from"react/jsx-runtime";var bl=({variant:t="fullPage",className:e,isLoading:o})=>o===!1?null:bn("div",{className:vl(e),style:{display:"flex",alignItems:"center",justifyContent:"center",...t==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:bn("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...t==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),xl=bl;import{useEffect as _t,useRef as xn,useCallback as Cl}from"react";import{Lock as it,Shield as Cn}from"lucide-react";import{Portal as Tl,Spinner as Sl,Stack as kl,Text as Re,Button as wl}from"@donotdev/components";import{useTranslation as Nl,useOverlay as Z}from"@donotdev/core";import{jsx as W,jsxs as Sn}from"react/jsx-runtime";var Tn={connecting:0,preparing:2e3,redirecting:5e3},Dl=1e4;function Pl(t,e){return e==="none"?null:e==="shield"?Cn:e==="lock"?it:t?t.startsWith("stripe-")||t.includes("payment")||t.includes("checkout")?it:t.startsWith("oauth-")||t.startsWith("auth-")?Cn:it:it}function Al(t){return t||"default"}function Il(){let{t}=Nl("dndev"),e=Z("isRedirectOverlayOpen"),o=Z("redirectOperation"),n=Z("redirectPhase"),r=Z("showCancelButton"),a=Z("redirectConfig"),i=Z("redirectStartTime"),c=Z("setRedirectPhase"),l=Z("setShowCancelButton"),d=Z("hideRedirectOverlay"),m=xn([]),s=xn(null),g=Cl(()=>{d()},[d]);if(_t(()=>{if(!e||!i)return;let w=a?.cancelTimeout??Dl,U=Date.now()-i;m.current.forEach(clearTimeout),m.current=[],s.current&&(clearTimeout(s.current),s.current=null);let V=(Y,N)=>{let x=Math.max(0,N-U);if(x>0){let b=setTimeout(()=>{c(Y)},x);m.current.push(b)}else c(Y)};V("preparing",Tn.preparing),V("redirecting",Tn.redirecting);let re=Math.max(0,w-U);return s.current=setTimeout(()=>{l(!0),c("timeout")},re),()=>{m.current.forEach(clearTimeout),m.current=[],s.current&&(clearTimeout(s.current),s.current=null)}},[e,i,a?.cancelTimeout,c,l]),_t(()=>{if(!e)return;let w=()=>{d()};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[e,d]),_t(()=>{if(!e)return;let w=()=>{};return document.addEventListener("visibilitychange",w),()=>document.removeEventListener("visibilitychange",w)},[e]),!e)return null;let p=Al(o),f=a?.title??t(`redirectOverlay.${p}.title`,{defaultValue:t("redirectOverlay.default.title")}),u=a?.message??t(`redirectOverlay.${p}.message`,{defaultValue:t("redirectOverlay.default.message")}),h=a?.subtitle??t(`redirectOverlay.${p}.subtitle`,{defaultValue:t("redirectOverlay.default.subtitle")}),v=t(`redirectOverlay.${p}.ariaLabel`,{defaultValue:t("redirectOverlay.default.ariaLabel")}),y=t(`redirectOverlay.phases.${n}`),S=Pl(o,a?.icon);return W(Tl,{children:W("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":v,style:{zIndex:"var(--z-overlay, 9999)"},children:Sn("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[Sn(kl,{direction:"row",gap:"medium",align:"center",children:[S&&W(S,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),W(Sl,{variant:"primary"})]}),W(Re,{as:"h3",style:{color:"var(--foreground)",margin:0},children:f}),W(Re,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:y}),W(Re,{variant:"muted",level:"small",style:{opacity:.8},children:u}),W(Re,{variant:"muted",level:"small",style:{opacity:.6},children:h}),W(Re,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:t("redirectOverlay.doNotRefresh")}),r&&W(wl,{variant:"ghost",onClick:g,style:{marginTop:"var(--gap-md)"},children:t("redirectOverlay.cancel")})]})})})}import{useEffect as $t,useState as kn}from"react";import{cn as Fl}from"@donotdev/components";import{jsx as wn}from"react/jsx-runtime";var Ll=({isActive:t=!1,progress:e,useFakeProgress:o=!0,duration:n=2e3,className:r,show:a=!0})=>{let[i,c]=kn(0),[l,d]=kn(!1);$t(()=>{if(!t||!o||e!==void 0)return;d(!0),c(0);let s=Date.now(),g=setInterval(()=>{let p=Date.now()-s,f=Math.min(p/n*90,90);c(f)},16);return()=>{clearInterval(g)}},[t,o,e,n]),$t(()=>{e!==void 0&&d(e>0&&e<100)},[e]),$t(()=>{if(!t){let s=setTimeout(()=>{d(!1),c(0)},300);return()=>clearTimeout(s)}},[t]);let m=e??i;return!a||!l?null:wn("div",{className:Fl(r),style:{position:"fixed",left:0,right:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(m),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:wn("div",{style:{height:"100%",width:`${m}%`,background:"linear-gradient(to right, var(--primary), color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--primary) 60%, transparent))",transition:t?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},Rl=Ll;import{cn as st,Stack as El}from"@donotdev/components";import{jsx as Ee,jsxs as T2}from"react/jsx-runtime";var Bl=({variant:t="text",width:e,height:o,lines:n=1,show:r=!0,className:a,animation:i="pulse",style:c})=>{if(!r)return null;let l={backgroundColor:"var(--muted)",opacity:"var(--opacity-muted)",borderRadius:"var(--radius)",animation:i==="pulse"||i==="wave"?"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite":"none",...i==="wave"&&{background:"linear-gradient(to right, color-mix(in srgb, var(--muted) 50%, transparent), color-mix(in srgb, var(--muted) 30%, transparent), color-mix(in srgb, var(--muted) 50%, transparent))"}},d=()=>{let m={};return e&&(m.width=typeof e=="number"?`${e}px`:e),o&&(m.height=typeof o=="number"?`${o}px`:o),m};return t==="text"?Ee(El,{gap:"tight",children:Array.from({length:n}).map((m,s)=>Ee("div",{className:st("dndev-skeleton",a),style:{...l,height:"var(--gap-md)",width:s===n-1?"75%":"100%",...d(),...c}},s))}):t==="circular"?Ee("div",{className:st("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-full)",width:e||o||"40px",height:o||e||"40px",...d(),...c}}):t==="rectangular"?Ee("div",{className:st("dndev-skeleton",a),style:{...l,width:e||"100%",height:o||"200px",...d(),...c}}):Ee("div",{className:st("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-lg)",width:e||"100%",height:o||"20px",...d(),...c}})};var Ml=Bl;import{Card as Ol,IconBox as zl,Stack as Ul,Text as Wt,renderCardContent as Vl}from"@donotdev/components";import{jsx as K,jsxs as Nn}from"react/jsx-runtime";var Gl=({icon:t,title:e,subtitle:o,content:n,href:r,variant:a,elevated:i,onClick:c,className:l,footer:d,style:m,...s})=>{let g=Vl(n),u=`calc(var(--font-size-lg) * var(--line-height) * 2 + var(--gap-md)) calc(var(--font-size-base) * var(--line-height) * 2 + var(--gap-md)) 1fr${d?" auto":""}`,h={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},v={...h,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},y={...h,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},S=t?Nn(Ul,{direction:"row",align:"center",gap:"medium",style:{width:"100%"},children:[K(zl,{icon:t}),K(Wt,{as:"div",level:"h3",style:v,children:e})]}):K(Wt,{as:"div",level:"h3",style:v,children:e}),w=K(Ol,{variant:a,elevated:i,onClick:c,className:l,"data-clickable":r||c?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...m},...s,children:Nn("div",{style:{display:"grid",gridTemplateRows:u,gap:"var(--gap-md)",width:"100%"},children:[K("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:S}),K("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:K(Wt,{as:"div",level:"body",style:y,children:o})}),K("div",{children:g}),d&&K("div",{children:d})]})});return r&&!c?K(T,{path:r,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":e?`Learn more about ${e}`:void 0,children:w}):w},Hl=Gl;import{useState as jl}from"react";import{Bento as ec,Card as tc,Section as oc,Stack as nc,Text as rc,cn as ac}from"@donotdev/components";var _l='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3178C6" d="M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"/></svg>',$l='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></svg>',Wl='<svg role="img" viewBox="0 0 410 404" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="vite-a" x1="6" y1="33" x2="235" y2="344" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="vite-b" x1="195" y1="9" x2="236" y2="293" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset=".08" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs><path fill="url(#vite-a)" d="M399.641 59.525 215.643 388.545c-3.799 6.793-13.559 6.833-17.415.073L10.582 59.556c-4.201-7.366 2.098-16.29 10.446-14.797l184.195 32.923c1.175.21 2.378.208 3.553-.006l180.343-32.87c8.32-1.517 14.649 7.337 10.522 14.72z"/><path fill="url(#vite-b)" d="M292.965 1.574 156.801 28.255c-2.238.439-3.895 2.335-4.03 4.611l-8.376 141.465c-.197 3.332 2.863 5.918 6.115 5.168l37.91-8.749c3.547-.818 6.752 2.306 6.023 5.873l-11.263 55.153c-.758 3.712 2.727 6.886 6.352 5.785l23.415-7.114c3.63-1.102 7.118 2.081 6.35 5.796l-17.899 86.633c-1.12 5.42 6.088 8.374 9.094 3.728l2.008-3.103 110.954-221.428c1.858-3.707-1.346-7.935-5.418-7.15l-39.022 7.532c-3.667.707-6.787-2.708-5.752-6.296l25.469-88.291c1.036-3.594-2.095-6.612-5.764-5.891z"/></svg>',Kl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/></svg>',Yl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#339933" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></svg>',ql='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#DD2C00" d="M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"/></svg>',Zl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m12 1.608 12 20.784H0Z"/></svg>',Jl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#635BFF" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>',Ql='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><linearGradient id="vb-a" x1="0.414" y1="0.255" x2="0" y2="0.932" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#eab308"/><stop offset="1" stop-color="#ca8a04"/></linearGradient><linearGradient id="vb-b" x1="0.338" y1="0.02" x2="0.664" y2="0.966" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#fde68a"/><stop offset="1" stop-color="#fbbf24"/></linearGradient><linearGradient id="vb-c" y1="0.5" x2="1" y2="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#7dd3fc"/><stop offset="1" stop-color="#0ea5e9"/></linearGradient></defs><g transform="translate(-2056 -1899)"><path d="M742.271,987.024c-66.706,0-119.121,54.673-121.874,126.408l-2.551,95.471c-3.967,78.653,71.961,105.52,126.936,105.52Z" transform="translate(1463.458 1004.277)" fill="url(#vb-a)"/><path d="M92.616.01H319.894c54.53-.8,95.624,40.1,98.381,93.335l6.144,135.76c.732,67.368-48.116,94.95-104.525,95.335L92.616,327.374C34.061,327.8-1.063,283.663.022,229.105l3.8-135.76C7.41,33.54,33.3,1.093,92.616.01Z" transform="translate(2118.42 1991.302)" fill="url(#vb-b)"/><path d="M86.844.009H299.958c51.132-.746,89.665,37.307,92.25,86.824l5.761,126.29c.686,62.669-45.117,88.326-98.011,88.685L86.844,304.537C31.938,304.933-1,263.875.02,213.123L3.58,86.834C6.948,31.2,31.222,1.016,86.844.009Z" transform="translate(2136.977 2001.737)" fill="#111827"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2421.148 2104.357)" fill="url(#vb-c)"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2208.034 2104.357)" fill="url(#vb-c)"/></g></svg>',Xl='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#FBF0DF" d="M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083a5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"/></svg>',Kt={bun:{svg:`data:image/svg+xml,${encodeURIComponent(Xl)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(_l)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent($l)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(Wl)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(Kl)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(Yl)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(ql)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(Zl)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(Jl)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(Ql)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as te,jsxs as cc}from"react/jsx-runtime";function ic({techKey:t,variant:e}){let o=Kt[t],[n,r]=jl(!1);if(!o)return null;let a=o.svg.replace("data:image/svg+xml,",""),i=decodeURIComponent(a);return te(tc,{variant:e,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:cc(nc,{direction:"column",align:"center",gap:"tight",children:[te("div",{className:"dndev-tech-card-logo","data-tech":t,dangerouslySetInnerHTML:{__html:i}}),te(rc,{as:"span",level:"small",children:o.name})]})})}function sc({title:t,techs:e,cols:o=3,columns:n,gap:r="medium",separator:a=!1,className:i}){let c=n||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),l=s=>{if(s==="long")return{cols:2,rows:1};if(s==="high")return{cols:1,rows:2};if(s==="huge")return{cols:2,rows:2}},d=e.filter(s=>Kt[s.name]).map(s=>({id:s.name,content:te(ic,{techKey:s.name,variant:s.variant}),span:l(s.size)})),m=te(ec,{items:d,columns:c,gap:r,className:i,ariaLabel:"Technology stack"});return t?te(oc,{title:t,separator:a,className:"dndev-tech-bento",children:te("div",{className:"dndev-tech-bento-grid",children:m})}):te("div",{className:ac("dndev-tech-bento",i),children:m})}var lc=sc;import{Suspense as pc,lazy as dc}from"react";import{useConsent as Dn}from"@donotdev/core";import{jsx as Pn}from"react/jsx-runtime";var mc=dc(()=>Promise.resolve().then(()=>(St(),Tt)));function Z2(){let t=Dn("hasConsented"),e=Dn("showBanner");return t&&!e?null:Pn(pc,{fallback:null,children:Pn(mc,{})})}import{Button as uc,ScrollArea as gc}from"@donotdev/components";import{cn as An}from"@donotdev/components";import{jsx as Be,jsxs as fc}from"react/jsx-runtime";function e0({content:t,cta:e,align:o="center",justify:n="center",disableScrollArea:r=!1,contentClassName:a,ctaClassName:i}){return fc("div",{className:"dndev-game-container",children:[Be("div",{className:An("dndev-game-container__content",a),"data-align":o,"data-justify":n,children:r?Be("div",{style:{overflow:"auto",overscrollBehavior:"contain"},children:t}):Be(gc,{className:"dndev-game-container__scroll",children:t})}),e&&Be("div",{className:An("dndev-game-container__cta",i),children:Be(uc,{onClick:e.onClick,disabled:e.disabled??!1,variant:e.variant??"default",className:"dndev-game-container__cta-button",children:e.label})})]})}import{useEffect as hc,useMemo as yc,Suspense as vc,lazy as bc}from"react";import{jsx as Yt}from"react/jsx-runtime";var In=new Set;function r0({screenRegistry:t,currentScreen:e,nextScreen:o,fallback:n=null}){hc(()=>{if(o&&!In.has(o)){In.add(o);let a=t[o];a&&a().catch(()=>{})}},[o,t]);let r=yc(()=>{if(!e)return null;let a=t[e];return a?bc(a):null},[e,t]);return!e||!r?null:Yt("div",{style:{height:"100%"},children:Yt(vc,{fallback:n,children:Yt(r,{})})})}import{cn as xc,DISPLAY as qt}from"@donotdev/components";import{useAppConfig as Fn}from"@donotdev/core";import{jsx as lt,jsxs as Sc}from"react/jsx-runtime";var Cc=({display:t=qt.AUTO,linkToHome:e=!0,className:o})=>{let n=Fn("name"),a=Fn("shortName")||n||"App",i=M.getLogoSvgContent(),c=M.resolveLogo(),l=t===qt.FULL||t===qt.AUTO,d=i?lt("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:i}}):M.assetExists(c)?lt("img",{src:c,alt:a,className:"app-branding-logo"}):null,m=l&&lt("span",{className:"app-branding-title","data-display":t,children:a}),s=Sc("div",{className:xc("app-branding",o),"data-display":t,children:[d,m]});return e?lt(T,{path:"/",className:"app-branding-link",children:s}):s},Tc=Cc;import{cn as Ln}from"@donotdev/components";import{useAppConfig as Rn}from"@donotdev/core";import{jsx as Bn}from"react/jsx-runtime";var En={sm:{width:"var(--icon-md)",height:"var(--icon-md)"},md:{width:"var(--icon-touch)",height:"var(--icon-touch)"},lg:{width:"var(--icon-touch)",height:"var(--icon-touch)"},xl:{width:"var(--touch-target)",height:"var(--touch-target)"},header:{height:"var(--icon-touch)",width:"auto"}},kc=({alt:t,size:e="header",className:o})=>{let n=t||Rn("name")||Rn("shortName")||"App",r=M.getLogoSvgContent(),a=M.resolveLogo(),i=typeof e=="string"&&e in En?En[e]:typeof e=="string"?{}:{width:e,height:e};return r?Bn("div",{className:Ln("app-icon-header",o),style:{display:"inline-flex",...i},role:"img","aria-label":n,dangerouslySetInnerHTML:{__html:r}}):Bn("img",{src:a,alt:n,className:Ln(o),style:{objectFit:"contain",...i}})},wc=kc;import{cn as Mn}from"@donotdev/components";import{useAppConfig as On,useBreakpoint as Nc}from"@donotdev/core";import{jsx as zn}from"react/jsx-runtime";var Dc=({title:t,className:e,linkToHome:o=!0})=>{let n=Nc("isMobileOrTablet"),r=On("name"),a=On("shortName"),i=t||n&&a||r||"App",c=zn("div",{className:Mn("dndev-text-base",e),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?zn(T,{path:"/",className:Mn("dndev-inline-block",e),children:c}):c},Pc=Dc;import{ChevronRight as Ec}from"lucide-react";import{useMemo as Bc}from"react";import{cn as Mc}from"@donotdev/components";import{useTranslation as Oc}from"@donotdev/core";import{useLocation as zc}from"@donotdev/ui/routing/hooks";import{useMemo as Un}from"react";import{useNavigationStore as w0,getRoutes as Ac,getRouteManifest as N0}from"@donotdev/core";function Ic(){return Un(()=>{try{let t=Ac();return!t||t.length===0?[]:Fc(t)}catch{return[]}},[])}function Vn(){let t=Ic();return Un(()=>t.flatMap(e=>e.routes),[t])}function Fc(t){let e=new Map;return t.forEach(o=>{let n=typeof o.path=="string"?o.path:String(o.path);if(!n||n==="undefined"||n==="null")return;let r=o.meta?.entity||Lc(n)||"other",a={path:n,label:o.meta?.title||Rc(n),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};e.has(r)||e.set(r,{label:r.charAt(0).toUpperCase()+r.slice(1),routes:[]}),e.get(r)?.routes.push(a)}),Array.from(e.values())}function Lc(t){return t.split("/").filter(Boolean)[0]||null}function Rc(t){let e=t.split("/").filter(Boolean),o=e[e.length-1];return o?o.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Home"}import{jsx as Me,jsxs as Gc}from"react/jsx-runtime";var Uc=({items:t,separator:e=Ec,showHome:o=!0,homeHref:n="/",variant:r="default",className:a})=>{let{t:i}=Oc("dndev"),c=zc(),l=Vn(),d=Bc(()=>new Set(l.map(g=>g.path)),[l]),m=t||(()=>{let g=c.pathname.split("/").filter(Boolean),p=[],f="";return g.forEach(u=>{f+=`/${u}`;let h=u.split("-").map(y=>y.charAt(0).toUpperCase()+y.slice(1)).join(" "),v=d.has(f)?f:void 0;p.push({label:h,href:v})}),p})(),s=o?[{label:i("navigation.home","Home"),href:n},...m]:m;return r==="smart"&&c.pathname.split("/").filter(Boolean).length<2?null:Me("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:Mc("breadcrumbs",a),children:s.map((g,p)=>{let u=p===s.length-1||!g.href;return Gc("span",{className:"breadcrumb-item",children:[p>0&&Me(e,{className:"dndev-size-md separator"}),g.icon&&Me(g.icon,{className:"dndev-size-md icon"}),g.href&&!u?Me(T,{path:g.href,className:"breadcrumb-link",children:g.label}):Me("span",{className:"breadcrumb-label",children:g.label})]},p)})})},Vc=Uc;import{useTranslation as Hc,maybeTranslate as Gn,useLayout as Zt,useAppConfig as _c}from"@donotdev/core";import{jsx as ve,jsxs as Wc}from"react/jsx-runtime";var $c=({asLink:t=!1,className:e})=>{let o=_c("app"),n=Zt("gameTitle"),r=Zt("gameSubtitle"),a=Zt("gameNamespace"),{t:i}=Hc(a||"dndev"),c=Gn(i,n??void 0),l=Gn(i,r??void 0),d=o?.name||"Game";if(c)return ve("div",{className:e,children:Wc("div",{style:{textAlign:"center"},children:[ve("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c}),l&&ve("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l})]})});let m=ve("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d});return t?ve(T,{path:"/",className:e,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:s=>s.currentTarget.style.color="var(--primary)",onMouseLeave:s=>s.currentTarget.style.color="var(--foreground)",children:d}):ve("div",{className:e,children:m})};import{Trash2 as Kc}from"lucide-react";import{useState as Hn}from"react";import{Button as Yc,BUTTON_VARIANT as qc,Checkbox as Zc,Stack as Jt,useToast as Jc}from"@donotdev/components";import{useTranslation as Qc}from"@donotdev/core";import{useRefresh as Xc}from"@donotdev/ui/routing/hooks";import{jsx as ct,jsxs as _n}from"react/jsx-runtime";function jc(){let{t}=Qc("dndev"),{toast:e}=Jc(),[o,n]=Hn(!1),r=Xc(),[a,i]=Hn({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),c=async()=>{try{n(!0);let l=[];if(a.localStorage&&typeof window<"u")try{localStorage.clear(),l.push("localStorage")}catch{}if(a.sessionStorage&&typeof window<"u")try{sessionStorage.clear(),l.push("sessionStorage")}catch{}if(a.indexedDB&&typeof window<"u"&&"indexedDB"in window)try{if("databases"in indexedDB){let m=await indexedDB.databases();await Promise.all(m.map(async s=>{if(s.name){let g=indexedDB.deleteDatabase(s.name);await new Promise((p,f)=>{g.onsuccess=()=>p(void 0),g.onerror=()=>f(g.error)})}}))}l.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let m=globalThis.openDatabase("","","","");m&&m.transaction&&m.transaction(s=>{s.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,p)=>{for(let f=0;f<p.rows.length;f++){let u=p.rows.item(f).name;g.executeSql(`DROP TABLE IF EXISTS ${u}`)}})}),l.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let m=await caches.keys();await Promise.all(m.map(async s=>{try{await caches.delete(s)}catch{}})),l.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let m=await navigator.serviceWorker.getRegistrations();await Promise.all(m.map(async s=>{try{await s.unregister()}catch{}})),l.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(m=>{let s=m.indexOf("="),g=s>-1?m.substr(0,s):m;document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${window.location.hostname}`}),l.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),l.push("Memory Cache")}catch{}let d=l.length>0?t("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:l.join(", ")}):t("settings.clearCache.noItemsCleared","No cache items were cleared");e("success",d),l.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:r()},1e3)}catch{e("error",t("settings.clearCache.error","Error clearing cache"))}finally{n(!1)}};return _n(Jt,{gap:"medium",children:[ct(Jt,{gap:"medium",children:Object.entries(a).map(([l,d])=>_n(Jt,{direction:"row",align:"center",gap:"tight",children:[ct(Zc,{id:l,checked:d,onCheckedChange:m=>i(s=>({...s,[l]:!!m}))}),ct("label",{htmlFor:l,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:t(`settings.clearCache.${l}`,l.charAt(0).toUpperCase()+l.slice(1))})]},l))}),ct(Yc,{variant:qc.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:c,icon:Kc,children:o?t("settings.clearCache.clearing","Clearing..."):t("settings.clearCache.button","Clear Cache")})]})}var Qt=jc;import{DropdownMenu as np,Button as Xt,Stack as Wn}from"@donotdev/components";import{Link as ep}from"lucide-react";import"react";import{navigationMenuTriggerStylePrimitive as tp}from"@donotdev/components";ae();import{jsx as $n,jsxs as op}from"react/jsx-runtime";var be=({route:t,showIcons:e=!0})=>{let o=e&&!!t.icon,n=!!t.label;return op(T,{path:t.path,className:tp(),...o&&!n&&{"data-display":"compact"},children:[e&&$n(R,{icon:t.icon,fallback:ep}),$n("span",{children:t.label})]})};import{jsx as G}from"react/jsx-runtime";var rp=({navigation:t,className:e})=>G(Wn,{role:"navigation",direction:"row",align:"center",className:e,style:{gap:"var(--gap-sm)"},children:t.map((o,n)=>o.routes&&o.routes.length>0?G(np,{trigger:G(Xt,{icon:o.icon,children:o.label}),items:o.routes.map(r=>{let a=r.path?r.external?G("a",{href:r.path,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",width:"100%"},children:G(be,{route:r})}):G(T,{path:r.path,style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",width:"100%"},children:G(be,{route:r})}):G(Wn,{direction:"row",align:"center",style:{gap:"var(--gap-sm)",width:"100%"},children:G(be,{route:r})});return{label:r.label,children:a,asChild:!!r.path}}),contentAlign:"start"},o.label+n):o.path?G(Xt,{icon:o.icon,"aria-label":o.label,render:({children:r,...a})=>G(T,{path:o.path,...a,children:r}),children:o.label},o.label+n):G(Xt,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+n))}),ap=rp;import"react";import{Card as ip,cn as sp}from"@donotdev/components";import{jsx as jt}from"react/jsx-runtime";var lp=({languages:t,currentLanguage:e,onLanguageChange:o,className:n})=>jt(ip,{className:sp("dndev-z-modal",n),style:{position:"fixed",bottom:"var(--gap-md)",right:"var(--gap-md)",display:"flex",alignItems:"center",gap:"var(--gap-sm)",transition:"var(--dur-fast) ease-out"},role:"region","aria-label":"Language selector","data-role":"floating",children:jt("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:e,onChange:r=>o?.(r.target.value),"aria-label":"Select language",children:t.map(r=>jt("option",{value:r,children:r},r))})}),cp=lp;import{MoreHorizontal as pp}from"lucide-react";import{Button as dp,BUTTON_VARIANT as mp,DropdownMenu as up}from"@donotdev/components";import{jsx as Kn}from"react/jsx-runtime";var gp=({children:t,className:e})=>Kn(up,{trigger:Kn(dp,{variant:mp.GHOST,icon:pp,"aria-label":"Menu",className:e}),contentAlign:"end",children:t}),fp=gp;import{MoreHorizontal as hp}from"lucide-react";import{DISPLAY as Oe,DropdownMenu as yp,Button as vp}from"@donotdev/components";import{cn as bp}from"@donotdev/components";import{useBreakpoint as Yn,useTranslation as xp}from"@donotdev/core";he();import{jsx as pt}from"react/jsx-runtime";var Cp=({className:t="",showIcons:e=!0,display:o=Oe.AUTO})=>{let{t:n}=xp("dndev"),r=Yn("isMobile"),a=Yn("isTablet"),i=_();return(o===Oe.AUTO?r||a?Oe.COMPACT:Oe.FULL:o)===Oe.COMPACT?pt(yp,{trigger:pt(vp,{variant:"ghost",icon:hp,"aria-label":n("navigation.menu","Navigation"),className:t}),contentAlign:"end",items:i.map(l=>({label:l.label,children:pt(be,{route:l,showIcons:e}),asChild:!0}))}):pt(rn,{overflowDetection:!0,showIcons:e,className:bp(t),style:{flex:1}})},Tp=Cp;import{Bell as Sp}from"lucide-react";import{useMemo as kp,useEffect as wp,useRef as Np}from"react";import{Button as Dp,cn as Pp,toast as Ap,Stack as Ip}from"@donotdev/components";import{jsx as eo}from"react/jsx-runtime";var Fp={sm:{button:{width:"var(--icon-md)",height:"var(--icon-md)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},md:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},lg:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-touch)",height:"var(--icon-touch)"},badge:{width:"var(--icon-touch)",height:"var(--icon-touch)",fontSize:"var(--font-size-sm)"}}},Lp=({notifications:t=[],count:e=0,loading:o=!1,onNotificationClick:n,onMarkAllRead:r,onDropdownOpen:a,className:i,maxVisible:c=10,alwaysShow:l=!1,size:d="md",disabled:m=!1})=>{let s=Fp[d],g=Np(new Set),p=kp(()=>e===0?null:e>99?"99+":e.toString(),[e]),f=e>0||l;return wp(()=>{t.forEach(u=>{if(!g.current.has(u.id)){g.current.add(u.id);let h=u.type==="error"?"error":u.type==="warning"?"warning":u.type==="success"?"success":"info";Ap({title:u.title,description:u.message,toastType:h,duration:0,onDismiss:()=>{g.current.delete(u.id),n&&n(u)}})}})},[t,n]),f?eo("div",{className:Pp(i),style:{position:"relative"},children:eo(Dp,{disabled:m,style:{...s.button,position:"relative"},onFocus:u=>{u.currentTarget.style.outline="2px solid var(--ring)",u.currentTarget.style.outlineOffset="2px"},onBlur:u=>{u.currentTarget.style.outline="none"},"aria-label":`${e} notification${e!==1?"s":""}`,icon:Sp,children:p&&eo(Ip,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",right:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...s.badge},"aria-hidden":"true",children:p})})}):null},Rp=Lp;import{Settings as Ep,Check as Bp}from"lucide-react";import*as dt from"lucide-react";import"react";import{Button as Mp,BUTTON_VARIANT as Op,DropdownMenu as zp,Stack as Up,DISPLAY as Vp}from"@donotdev/components";import{useTranslation as Gp}from"@donotdev/core";import{useLanguageSelector as Hp,useTheme as to,Flag as _p}from"@donotdev/core";import{jsx as oe,jsxs as Kp}from"react/jsx-runtime";function $p({variant:t=Op.OUTLINE}={}){let{t:e}=Gp("dndev"),{languages:o,currentLanguage:n,changeLanguage:r,isLoading:a}=Hp(),i=to("availableThemes"),c=to("currentTheme"),l=to("setTheme"),d=p=>{if(!p)return dt.Palette;let f=p.replace(/['"]/g,"");return dt[f]||dt.Palette},m=i.map(p=>{let f=d(p.meta?.icon),u=p.name===c;return{label:p.displayName||p.name,icon:f,onClick:()=>l(p.name),checked:u}}),s=o.map(p=>{let f=p.id===n;return{label:p.name,onClick:()=>r(p.id),disabled:a,checked:f,className:f?"bg-accent":void 0,iconEnd:f&&!a?Bp:void 0,children:Kp(Up,{direction:"row",align:"center",gap:"tight",children:[oe(_p,{code:p.flagCode||p.id,title:`${p.name} flag`}),oe("span",{children:p.name}),a&&f&&oe("div",{style:{marginInlineStart:"auto"},children:oe("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:e("auth.title","Authentication"),subContent:oe(Vt,{display:Vp.COMPACT})},{label:e("settings.theme","Theme"),subItems:m},{label:e("settings.language","Language"),subItems:s},{label:e("settings.clearCache.title","Clear Cache"),subContent:oe(Qt,{})}];return oe(zp,{trigger:oe(Mp,{variant:t,"aria-label":e("settings.title","Settings"),icon:Ep}),items:g,contentWidth:"14rem",contentAlign:"end"})}var Wp=$p;import*as mt from"lucide-react";import"react";import{Button as qn,BUTTON_VARIANT as Yp,DropdownMenu as qp,DISPLAY as Zp}from"@donotdev/components";import{useTranslation as Jp}from"@donotdev/core";import{useTheme as oo}from"@donotdev/core";import{jsx as ro}from"react/jsx-runtime";var no=t=>{if(!t)return mt.Palette;let e=t.replace(/['"]/g,"");return mt[e]||mt.Palette},Qp=({display:t=Zp.AUTO,"no-tooltip":e=!1})=>{let{t:o}=Jp("dndev"),n=oo("availableThemes"),r=oo("currentTheme"),a=oo("setTheme");if(n.length<=1)return null;let i=n.find(v=>v.name===r),c=n.length===2?n.find(v=>v.name!==r)||n[0]:null,l=i?no(i.meta?.icon):null,d=c?no(c.meta?.icon):null,m=i?.displayName||i?.name||"Theme",s=c?.displayName||c?.name||"Theme",g=n.length===2&&c&&d,p=g?d:l,f=g?e?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:c?.displayName||c?.name}):e?void 0:o("common.themeSelector.changeTheme","Change Theme"),u={variant:Yp.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:f,icon:p,display:t};if(g&&c)return ro(qn,{...u,onClick:()=>a(c.name),children:s});if(!i||!l)return null;let h=n.map(v=>{let y=no(v.meta?.icon),S=v.name===r;return{label:v.displayName||v.name,icon:y,onClick:()=>a(v.name),checked:S}});return ro(qp,{trigger:ro(qn,{...u,children:m}),items:h,contentWidth:"10rem"})},Xp=Qp;import{useEffect as ed}from"react";import{checkLicense as td}from"@donotdev/core";var jp='<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>logo</title><style>.s0{opacity:.98;fill:#f23d29}.s1{opacity:.99;fill:#03bec4}.s2{opacity:.97;fill:#27494a}</style><g id="Background"><path id="Path 0" fill-rule="evenodd" class="s0" d="m254 41.1c5.8-0.1 15.2 0.4 21 0.9 5.8 0.6 16 2.2 22.8 3.5 6.7 1.4 17.5 4.2 23.9 6.4 6.5 2.1 16.7 6.1 22.8 8.8 6.1 2.7 15.5 7.6 21 10.8 5.5 3.3 14.3 9.2 19.5 13 5.2 3.9 13.8 11.2 19 16.2 5.2 5 12.2 12.3 15.5 16.2 3.3 4 8.8 11.1 12.2 15.9 3.4 4.8 8.7 13.2 11.7 18.7 3 5.5 6.9 13.4 8.7 17.5 1.7 4.1 4.7 12 6.6 17.5 1.9 5.5 4.5 14.5 5.8 20 1.3 5.5 3.1 15.3 3.9 21.8 0.9 6.6 1.6 19 1.6 28.7 0 9.4-0.7 22.1-1.5 28.3-0.8 6.1-3 17.3-4.8 24.7-1.9 7.4-5.5 18.9-8.2 25.5-2.6 6.6-7 16.3-9.8 21.5-2.8 5.2-8 13.8-11.5 19-3.6 5.2-9.3 12.9-12.7 17-3.5 4.1-10.7 11.8-16.2 17-5.4 5.3-12.7 11.9-16.3 14.7-3.6 2.8-11.4 8.3-17.5 12.2-6.1 4-16.4 9.8-23 13.1-6.6 3.2-17.4 7.6-24 9.8-6.6 2.3-17.2 5.2-23.5 6.6-6.3 1.4-16.2 3-22 3.7-6.4 0.7-17.5 1-28.5 0.6-11.9-0.3-21.7-1.2-29-2.6-6.1-1.1-15.9-3.4-22-5.1-6.1-1.7-15.9-5.2-22-7.6-6.1-2.5-15.5-6.9-21-9.8-5.5-2.9-14.1-8-19-11.3-4.9-3.3-12.4-8.7-16.5-12-4.1-3.4-12.5-11.2-18.6-17.4-6.1-6.3-13.9-15.2-17.3-19.9-3.5-4.7-8.8-12.6-11.9-17.5-3-4.9-7.9-13.9-10.8-20-2.9-6.1-7.1-16.4-9.3-23-2.2-6.6-5.1-17.6-6.5-24.5-1.4-6.9-3-17.4-3.7-23.5-0.7-6.7-0.9-17.2-0.6-27 0.4-8.8 1.3-20.5 2.2-26 0.8-5.5 2.7-14.5 4.1-20 1.4-5.5 3.9-14.1 5.5-19 1.7-4.9 6.3-15.8 10.4-24 4-8.3 10-19.1 13.3-24 3.3-4.9 9-12.6 12.5-17 3.6-4.4 11.4-12.8 17.3-18.6 6-5.8 15.4-13.9 20.9-18 5.5-4.1 14.5-10 20-13.2 5.5-3.1 14.5-7.6 20-10.1 5.5-2.4 15.1-6 21.3-8 6.1-2 16.7-4.7 23.5-6.1 6.7-1.3 16.3-2.8 21.2-3.3 4.9-0.5 13.7-1 19.5-1.1zm-21 38c-4.7 0.5-12.1 1.9-16.5 3-4.4 1.1-11.6 3.1-16 4.5-4.4 1.5-13.8 5.4-21 8.9-7.2 3.5-16.1 8.5-20 11.1-3.8 2.6-10 7.2-13.8 10.3-3.7 3.1-6.7 5.9-6.7 6.3 0 0.5 9.3 10.3 20.8 21.9l20.7 21c5.5-10.5 9-16.5 11.5-20.1 2.4-3.6 7.2-9.6 10.5-13.5 3.3-3.8 9.4-9.6 13.5-12.9 4.1-3.2 10.7-7.4 14.5-9.2 3.9-1.8 9.7-4 13-4.9 3.3-0.8 9.6-1.5 14-1.5 4.4 0 10.7 0.7 14 1.6 3.3 0.9 9.1 3.2 13 5.1 3.9 2 9.3 5.2 12 7.3 2.8 2 8.5 7.5 12.9 12.1 4.3 4.6 10.2 11.8 13.1 15.9 2.9 4.1 7.8 12.2 10.8 18 3 5.8 7.1 14.8 9 20 2 5.2 4.2 13 5.1 17.3 0.9 4.2 1.6 11.4 1.6 15.9 0 5.6-0.6 10.6-2.1 15.3-1.1 3.8-3.8 9.9-5.9 13.5-2.1 3.6-5.8 8.9-8.4 11.7-2.5 2.9-4.6 5.6-4.6 6 0 0.5 1.4 1.2 3.2 1.6 1.8 0.4 6.4 2.4 10.3 4.4 3.9 1.9 9 4.9 11.5 6.6 2.5 1.8 7.1 5.9 10.4 9.2 4.2 4.3 7.1 8.6 10.1 15 2.4 4.9 5 11.9 5.9 15.5 0.9 3.6 2.3 11.9 3.2 18.5 1.1 8 1.4 15.9 1.1 23.5l-0.5 11.5 6.3 6.4c6.3-8.1 10.4-13.8 13.1-17.9 2.8-4.1 6.4-10 8.1-13 1.7-3 5.1-10.2 7.6-16 2.5-5.8 5.8-15.2 7.5-21 1.7-5.8 3.7-13.9 4.6-18 0.8-4.1 2-11.9 2.5-17.3 0.6-5.3 1.1-13.5 1.1-18.2 0-4.7-0.5-12.9-1.1-18.3-0.6-5.3-1.9-13.5-2.9-18.2-1-4.7-3.1-12.3-4.5-17-1.5-4.7-5.1-13.4-7.9-19.5-2.9-6.1-7.6-14.8-10.6-19.5-2.9-4.7-7.2-11-9.5-14-2.3-3-7.8-9.3-12.1-13.9-4.3-4.6-12-11.6-16.9-15.6-4.9-4.1-13.1-9.9-18-13-4.9-3.1-13.3-7.7-18.5-10.2-5.2-2.5-13.6-6.1-18.5-7.8-4.9-1.8-14.2-4.5-20.5-5.9-6.3-1.4-17.1-3-24-3.6-6.9-0.5-13.4-0.9-14.5-0.8-1.1 0.1-4.5 0.3-7.5 0.5-3 0.2-9.3 0.8-14 1.4zm-125.4 79.6c-4.3 6.5-9.8 15.9-12.1 20.8-2.4 4.9-5.9 13.7-7.9 19.5-1.9 5.8-4.4 15-5.5 20.5-1.1 5.5-2.5 15.8-3.1 23-0.6 7.2-0.8 16.8-0.5 21.5 0.4 4.7 1.5 13.9 2.5 20.5 1.1 6.6 3.5 17.3 5.4 23.8 2 6.4 5.5 16.1 7.9 21.5 2.3 5.3 6.7 13.8 9.7 18.7 3 4.9 8.1 12.4 11.4 16.5 3.3 4.1 9.8 11.5 14.5 16.3 4.7 4.9 11.8 11.2 15.6 14.2 3.9 2.9 11.1 7.9 16 11 4.9 3.1 13.1 7.6 18 10 4.9 2.4 13.7 5.9 19.5 7.9 5.8 1.9 14.6 4.4 19.5 5.5 4.9 1.1 13.7 2.5 19.5 3.2 6.6 0.7 16.1 0.9 25.5 0.6 9.8-0.4 19.1-1.5 27-3.1 6.6-1.4 16.7-4.1 22.5-6.1 5.8-2 15-5.8 20.5-8.5 5.5-2.7 13.8-7.4 18.5-10.5 4.7-3.2 9.3-6.5 10.3-7.4 1.6-1.5 1.6-1.7-0.5-3.9-1.3-1.2-2.6-2.2-3-2.2-0.5 0-3.4 2-6.5 4.4-3.2 2.4-9.4 6.4-13.8 8.9-4.4 2.6-12.7 6.4-18.5 8.6-5.8 2.2-15.2 5.1-21 6.5-5.8 1.4-14.6 3-19.5 3.7-4.9 0.6-15.7 1.1-24 1.1-8.2 0-19.5-0.7-25-1.6-5.5-0.8-14.7-2.7-20.5-4.1-5.8-1.5-15-4.5-20.5-6.6-5.5-2.2-12.9-5.6-16.5-7.5-3.6-2-10.3-6.1-15-9.2-4.7-3.1-12.7-9.7-17.8-14.7-7.5-7.2-9.5-9.8-10.2-13-0.5-2.2-1-9.9-1-17 0-7.1 0.7-17.3 1.5-22.5 0.8-5.2 2.3-12.8 3.5-16.8 1.1-3.9 3.3-9.8 4.9-12.9 1.6-3.2 4.5-7.8 6.5-10.3 1.9-2.5 6.1-6.6 9.3-9.3 3.2-2.6 9.2-6.5 13.3-8.6 4.1-2.1 9.3-4.4 11.5-5.1 2.2-0.7 4.3-1.5 4.7-1.9 0.4-0.3-1.3-3.1-3.8-6.1-2.5-3-6.1-8.4-8.2-12-2-3.6-4.7-9.9-6-14-1.8-5.6-2.5-10-2.6-17 0-5.2 0.2-11.7 0.5-14.5l0.6-5-49.2-48.5zm117.6 8.2c-4 1.1-9.8 3.1-13 4.3-3.2 1.3-8.4 4.1-11.6 6.3l-5.8 3.9 6.7 6.5c7.5-3.7 9.9-4 24.2-4 13.2 0 17 0.4 20.4 1.8 2.3 0.9 4.5 2.5 5 3.5 0.6 1.2 2 1.7 4.9 1.7 2.8 0 4.2-0.5 4.8-1.7 0.5-1 2.5-2.6 4.5-3.5 3.1-1.5 6.6-1.8 21.7-1.8 9.9 0 19.1 0.5 20.5 1 1.3 0.6 3.1 2 4 3.3 1.1 1.6 1.5 4.8 1.5 11.7 0 7.9-0.4 10.3-2.3 14-1.2 2.4-3.4 5.3-4.7 6.3-1.4 1-4.3 2.2-6.5 2.7-2.2 0.6-7.9 1-12.5 1-4.7 0-10.3-0.4-12.5-1-2.2-0.5-5.2-1.8-6.5-2.8-1.4-1-3.6-3.6-4.8-5.8-1.2-2.1-2.6-6-3-8.6-0.7-4.6-0.9-4.8-4-4.8-3.2 0-3.3 0.2-4.4 5.8-0.6 3.1-1.7 6.9-2.4 8.2-0.7 1.4-2.5 3.7-4.1 5.2-1.6 1.4-4 2.9-5.3 3.3-2.4 0.7-1 2.2 20.5 23.6 12.6 12.6 23.3 22.9 23.7 22.9 0.4 0 4.4-3.5 8.9-7.7 4.5-4.3 10-10.5 12.2-13.8 2.2-3.3 5.5-9.1 7.3-13 1.8-3.8 4.5-11 5.9-16 1.5-4.9 2.9-12.8 3.2-17.5 0.5-6.5 0.2-9.5-1-13-1-2.6-3.5-6.2-5.9-8.5-2.4-2.3-7.7-5.8-11.8-7.8-4.2-2-10.9-4.5-15-5.5-4.2-1.1-11.6-2.5-16.5-3.1-5-0.6-12.6-1-17-0.9-4.4 0-11.2 0.5-15 1-3.9 0.5-10.3 1.8-14.3 2.8zm-13.7 29.2c-0.5 0.9 2 4.1 8.1 10.1 7.5 7.4 9.4 8.7 12.1 8.7 1.8 0 4.2-0.4 5.3-1 1.1-0.5 2.8-2.9 3.9-5.2 1.1-2.4 2-5.8 2-7.8 0.1-1.9-0.6-4.4-1.3-5.5-1.3-1.8-2.8-2-13.3-2.2-6.5-0.1-12.8 0.2-13.9 0.7-1.2 0.5-2.5 1.5-2.9 2.2zm58.5 1.1c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.6 1.7 3.9 2.6 8.3 3.1 3.3 0.4 8.2 0.5 11 0.1 2.7-0.4 5.7-1.1 6.7-1.7 1-0.5 2.4-2.4 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.5-2.2-2.1-2.3-15.3-2.2-7.6 0.1-14.3 0.3-14.9 0.6-0.7 0.2-1.7 1.9-2.3 3.6zm-71.9 38c1.7 3.4 5 8.9 7.4 12.2 2.3 3.3 6.9 8.5 10.1 11.6 3.2 3.1 7.9 6.8 10.4 8.2 2.4 1.4 6.5 3.3 9 4.2 2.4 0.8 4.5 1.4 4.7 1.3 0.1-0.2-9.9-10.4-22.3-22.8-12.3-12.3-22.5-22.1-22.5-21.7 0.1 0.4 1.5 3.5 3.2 7z"/><path id="Path 1" class="s1" d="m243 105.6c-3 0.8-8.7 2.9-12.5 4.8-3.8 1.8-10.4 6-14.5 9.2-4.1 3.3-10.2 9.1-13.5 12.9-3.4 3.9-8.4 10.4-11.1 14.5-2.8 4.1-6.5 10.2-8.2 13.5l-3.1 6 14.8 15c9-6.2 15.4-9.4 20.1-11.1 4.7-1.8 12-3.9 16.2-4.8 4.3-0.9 12.4-1.9 18-2.2 6.2-0.4 14.5-0.2 20.8 0.6 5.8 0.6 13.9 2.1 18 3.1 4.1 1.1 10.9 3.6 15 5.6 4.1 2 9.4 5.5 11.8 7.7 2.5 2.4 5 6 5.9 8.6 1.3 3.4 1.5 6.5 1.1 13-0.4 4.7-1.8 12.6-3.2 17.5-1.5 4.9-4.2 12.2-6 16-1.8 3.9-5 9.7-7.3 13-2.2 3.3-8 9.7-12.9 14.3l-8.9 8.3c76.3 76.3 98.8 98 99.2 97.6 0.4-0.5 1-5.7 1.2-11.5 0.2-6.2-0.4-15.7-1.3-22.7-0.9-6.6-2.3-14.9-3.2-18.5-0.9-3.6-3.5-10.6-5.9-15.5-3-6.4-5.9-10.7-10.1-15-3.3-3.3-7.9-7.4-10.4-9.2-2.5-1.7-7.6-4.7-11.5-6.6-3.9-2-8.5-4-10.3-4.4-1.8-0.4-3.2-1.1-3.2-1.5 0-0.5 2.1-3.2 4.6-6 2.6-2.9 6.3-8.2 8.4-11.8 2.1-3.6 4.8-9.6 5.9-13.5 1.5-4.7 2.1-9.7 2.1-15.2 0-4.6-0.7-11.8-1.6-16-0.9-4.3-3.1-12.1-5.1-17.3-1.9-5.2-6-14.2-9-20-3-5.8-7.9-13.9-10.8-18-2.9-4.1-8.8-11.3-13.1-15.9-4.4-4.6-10.2-10.1-12.9-12.1-2.8-2.1-8.1-5.3-12-7.3-3.9-1.9-9.7-4.2-13-5.1-3.3-0.9-9.8-1.5-14.5-1.5-4.7 0-11 0.7-14 1.5zm-78.7 93.9c-0.4 2.2-0.8 8.7-0.7 14.5 0.1 8.3 0.6 12.1 2.5 18 1.4 4.1 4.1 10.4 6.1 14 2.1 3.6 5.7 9 8.2 12 2.5 3 4.2 5.8 3.8 6.1-0.4 0.4-2.5 1.2-4.7 1.9-2.2 0.7-7.4 3-11.5 5.1-4.1 2.1-10.1 6-13.3 8.6-3.2 2.7-7.4 6.8-9.3 9.3-2 2.5-4.9 7.1-6.5 10.3-1.6 3.1-3.8 9-4.9 13-1.2 3.9-2.7 11.5-3.5 16.7-0.8 5.2-1.5 15.4-1.5 22.5 0 7.1 0.5 14.8 1 17 0.7 3.2 2.7 5.8 10.2 13 5.1 5 13.1 11.6 17.8 14.7 4.7 3.1 11.4 7.2 15 9.2 3.6 1.9 11 5.3 16.5 7.5 5.5 2.1 14.7 5.1 20.5 6.6 5.8 1.4 15 3.3 20.5 4.1 5.5 0.9 16.8 1.6 25 1.6 8.3 0 19.1-0.5 24-1.1 4.9-0.7 13.7-2.3 19.5-3.7 5.8-1.4 15.2-4.3 21-6.5 5.8-2.2 14.1-6 18.5-8.6 4.4-2.5 10.8-6.7 14.2-9.2 3.5-2.5 6.3-4.9 6.3-5.3 0-0.5-26.5-27-58.8-59-54.3-53.8-59.2-58.4-63.8-59.8-2.7-0.8-7.4-3-10.4-4.8-3-1.8-7.9-5.7-10.8-8.5-3-2.9-7.3-7.9-9.7-11.2-2.4-3.3-6.4-10.3-8.9-15.5-4.2-8.7-5.6-10.6-18-23l-13.5-13.5z"/><path id="Path 2" fill-rule="evenodd" class="s2" d="m225.8 184c13.2 0 17 0.3 20.3 1.8 2.3 0.9 4.6 2.5 5 3.5 0.6 1.2 2.1 1.7 4.9 1.7 2.8 0 4.3-0.5 4.9-1.8 0.4-0.9 2.5-2.5 4.5-3.5 3-1.4 6.5-1.7 21.6-1.7 9.9 0 19.1 0.4 20.5 1 1.4 0.6 3.2 2 4 3.3 1.2 1.6 1.6 4.8 1.6 11.7-0.1 7.9-0.4 10.3-2.3 13.9-1.3 2.5-3.4 5.3-4.8 6.3-1.4 1-4.3 2.3-6.5 2.8-2.2 0.5-7.8 1-12.5 1-4.7 0-10.3-0.5-12.5-1-2.2-0.5-5.1-1.8-6.5-2.8-1.4-1-3.5-3.6-4.7-5.8-1.3-2.1-2.6-6-3-8.7-0.8-4.5-0.9-4.7-4.1-4.7-3.1 0-3.2 0.2-4.3 5.8-0.6 3.1-1.7 6.8-2.4 8.2-0.7 1.4-2.6 3.7-4.2 5.2-1.5 1.5-3.9 3-5.3 3.3-2 0.6-3.3 0-6.8-3.1-2.4-2.2-4.3-4.2-4.2-4.6 0-0.5 1.3-0.8 3-0.8 1.6 0 3.9-0.4 5-1 1.1-0.6 2.9-2.9 4-5.2 1.1-2.4 2-5.9 2-7.8 0-1.9-0.6-4.4-1.4-5.5-1.3-1.8-2.6-2-14.4-2-11.6 0-13.2 0.2-17.1 4l-4-4.5c-2.1-2.5-3.7-4.8-3.5-5.2 0.2-0.5 1.9-1.5 3.6-2.3 2.5-1 7.5-1.4 19.5-1.5zm44.3 13.3c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.7 1.7 3.9 2.5 8.3 3.1 3.3 0.4 8.2 0.4 11 0 2.7-0.3 5.8-1.1 6.7-1.6 1-0.5 2.5-2.5 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.4-2.2-2.1-2.3-15.3-2.2-7.5 0-14.2 0.3-14.9 0.5-0.6 0.3-1.7 2-2.3 3.7zm-40 126.7c0.3-0.1 2.2 2 8 9l-23.5 22.7 22.4 23.8-7.8 8-16.1-15.5c-8.8-8.5-16.2-15.8-16.3-16.2-0.1-0.3 7.3-7.6 16.3-16.2 9.1-8.6 16.7-15.6 17-15.6zm33.5 0l4 0.1c2.2 0.1 5 0.4 6.1 0.7 2.1 0.7 1.8 1.7-19.4 62.7l-5.3-0.3c-3-0.2-5.6-0.5-5.9-0.7-0.3-0.2 4.2-14.4 10-31.4zm20.7 3.9l2.7 1.9c1.4 1.1 8.2 7.3 27.6 26l-15.5 15.6c-8.5 8.6-16 15.6-16.7 15.6-0.7 0-2.9-2-8.3-8.5l23.2-22-6.8-6.7c-3.8-3.7-8.1-7.6-9.6-8.8-1.5-1.1-2.8-2.5-2.9-3.1 0-0.6 1.4-3.1 3.1-5.5z"/></g></svg>',Zn=`data:image/svg+xml,${encodeURIComponent(jp)}`;import{jsx as ao,jsxs as Jn}from"react/jsx-runtime";function c5(){let t=td();return ed(()=>{t.isValid},[t.isValid]),t.isValid?null:Jn("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",right:"20px",top:"50%",transform:"translateY(-50%)",zIndex:9999,display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",backgroundColor:"rgba(255, 255, 255, 0.95)",border:"2px solid rgba(242, 61, 41, 0.3)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",textDecoration:"none",transition:"all 0.2s ease",cursor:"pointer",opacity:.9},onMouseEnter:e=>{e.currentTarget.style.opacity="1",e.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.9",e.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[ao("img",{src:Zn,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),Jn("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[ao("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),ao("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}import"react";import{Stack as wm}from"@donotdev/components";import{Mail as od,Calendar as nd,Clock as rd}from"lucide-react";import{useState as ad}from"react";import{Skeleton as Qn,Badge as id,BADGE_VARIANT as sd,Text as ut,cn as Xn,CopyToClipboard as jn,Stack as ze}from"@donotdev/components";import{getWeekFromISOString as ld}from"@donotdev/core";import{jsx as z,jsxs as xe}from"react/jsx-runtime";var cd=({config:t,value:e,t:o,className:n,loading:r=!1,showCopy:a=!1,asBadge:i=!1,truncate:c=!1,maxLength:l=50,showLabel:d=!1})=>{let[m,s]=ad(!1),g=async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},p=()=>{switch(t.type){case"email":return z(od,{});case"month":case"week":return z(nd,{});case"time":return z(rd,{});default:return null}},f=y=>{if(!y)return null;switch(t.type){case"email":return xe("a",{href:`mailto:${y}`,style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)"},onMouseEnter:S=>S.currentTarget.style.textDecoration="underline",onMouseLeave:S=>S.currentTarget.style.textDecoration="none",children:[p(),y]});case"month":return new Date(y).toLocaleDateString("en-US",{year:"numeric",month:"long"});case"week":return ld(y);case"time":return new Date(`2000-01-01T${y}`).toLocaleTimeString();default:return y}},u=y=>!c||y.length<=l?y:`${y.substring(0,l)}...`;if(r)return xe(ze,{gap:"tight",children:[d&&z(Qn,{style:{height:"1rem",width:"6rem"}}),z(Qn,{className:"dndev-w-full",style:{height:"1.5rem"}})]});if(!e)return xe(ze,{gap:"tight",children:[d&&z(ut,{as:"span",variant:"muted",children:t.label||t.name}),z(ut,{as:"span",variant:"muted",className:Xn(n),style:{fontStyle:"italic"},children:o("common.noValue",{defaultValue:"No value"})})]});let h=f(e),v=u(String(h));return i?xe(ze,{direction:"row",align:"center",gap:"tight",children:[p(),z(id,{variant:sd.SECONDARY,className:n,children:v}),a&&z(jn,{text:e,tooltipText:o("copyToClipboard")||"Copy to clipboard",copiedTooltipText:o("copied")||"Copied!",ariaLabel:o("copyToClipboard")||"Copy to clipboard"})]}):xe(ze,{gap:"tight",children:[d&&z(ut,{as:"span",variant:"muted",children:t.label||t.name}),xe(ze,{direction:"row",align:"center",gap:"tight",children:[z("div",{className:Xn("dndev-flex-1",c&&"truncate",n),title:c&&e.length>l?e:void 0,children:z(ut,{as:"span",children:v})}),a&&z(jn,{text:e,tooltipText:o("copyToClipboard")||"Copy to clipboard",copiedTooltipText:o("copied")||"Copied!",ariaLabel:o("copyToClipboard")||"Copy to clipboard"})]})]})},gt=cd;import{Badge as pd,Text as dd}from"@donotdev/components";import{jsx as er}from"react/jsx-runtime";var md=({config:t,value:e,t:o,className:n})=>{if(e==null)return er(dd,{as:"span",variant:"muted",className:n,children:"-"});let r=typeof e=="boolean"?o(e?"common.yes":"common.no"):String(e);return er(pd,{variant:typeof e=="boolean"?e?"default":"secondary":"outline",className:n,children:r})},io=md;import{Avatar as ud,Text as gd}from"@donotdev/components";import{jsx as tr}from"react/jsx-runtime";var fd=({config:t,value:e,t:o,className:n,size:r="md"})=>{if(!e)return tr(gd,{as:"span",variant:"muted",className:n,children:"-"});let a={sm:"size-touch",md:"size-touch",lg:"h-16 w-16"},i=c=>c.split(" ").map(l=>l.charAt(0)).slice(0,2).join("").toUpperCase();return tr(ud,{src:e,alt:t.label||"Avatar",fallback:i(t.label||"AV"),className:`${a[r]} ${n||""}`})},so=fd;import"react";import{Text as hd}from"@donotdev/components";import{Link as yd}from"@donotdev/ui";import{jsx as or}from"react/jsx-runtime";var vd=({config:t,value:e,t:o,className:n})=>{if(!e)return or(hd,{as:"span",variant:"muted",className:n,children:"-"});let a=(()=>{switch(t.type){case"email":return{path:`mailto:${e}`,"aria-label":o("common.sendEmailTo",{email:e})};case"tel":return{path:`tel:${e}`,"aria-label":o("common.callNumber",{number:e})};default:return{path:e,"aria-label":o("common.openLink")}}})();return or(yd,{...a,className:n||"",style:{color:"var(--primary)"},onMouseEnter:i=>i.currentTarget.style.textDecoration="underline",onMouseLeave:i=>i.currentTarget.style.textDecoration="none",children:e})},lo=vd;import"react";import{Text as Ue}from"@donotdev/components";import{Skeleton as bd}from"@donotdev/ui";import{jsx as Ce,jsxs as Cd}from"react/jsx-runtime";var xd=({config:t,value:e,t:o,className:n,loading:r=!1})=>{if(r)return Ce(bd,{className:n});if(!e)return Ce(Ue,{as:"span",variant:"muted",className:n,children:"-"});try{let a=new Date(e),i=a.toLocaleDateString(),c=a.toLocaleTimeString();return t.type==="date"?Ce(Ue,{as:"span",className:n,children:i}):Cd("div",{className:n,children:[Ce(Ue,{as:"span",children:i}),Ce(Ue,{as:"span",variant:"muted",level:"small",children:c})]})}catch{return Ce(Ue,{as:"span",variant:"muted",className:n,children:"-"})}},co=xd;import"react";import{Text as nr}from"@donotdev/components";import{Skeleton as Td}from"@donotdev/ui";import{jsx as po}from"react/jsx-runtime";var Sd=({config:t,value:e,t:o,className:n,loading:r=!1})=>r?po(Td,{className:n}):e==null?po(nr,{as:"span",variant:"muted",className:n,children:"-"}):po(nr,{as:"span",className:`font-mono ${n||""}`,children:e.toLocaleString()}),mo=Sd;import"react";import{Text as kd}from"@donotdev/components";import{Link as wd}from"@donotdev/ui";import{jsx as rr}from"react/jsx-runtime";var Nd=({config:t,value:e,t:o,className:n})=>e?rr(wd,{path:`tel:${e}`,className:n||"",style:{color:"var(--primary)"},onMouseEnter:r=>r.currentTarget.style.textDecoration="underline",onMouseLeave:r=>r.currentTarget.style.textDecoration="none","aria-label":o("common.callNumber",{number:e}),children:e}):rr(kd,{as:"span",variant:"muted",className:n,children:"-"}),uo=Nd;import"react";import{Text as ar}from"@donotdev/components";import{jsx as ir}from"react/jsx-runtime";var Dd=({config:t,value:e,t:o,className:n})=>e?ir(ar,{as:"div",level:"small",className:`whitespace-pre-wrap ${n||""}`,children:e}):ir(ar,{as:"span",variant:"muted",className:n,children:"-"}),go=Dd;import{Badge as Pd,Text as Ad}from"@donotdev/components";import{jsx as sr}from"react/jsx-runtime";var Id=({config:t,value:e,t:o,className:n})=>{if(e==null)return sr(Ad,{as:"span",variant:"muted",className:n,children:"-"});let r=o(e?"common.yes":"common.no");return sr(Pd,{variant:e?"default":"secondary",className:n,children:r})},fo=Id;import{Badge as Fd,BADGE_VARIANT as Ld,Text as Rd}from"@donotdev/components";import{jsx as lr}from"react/jsx-runtime";var Ed=({config:t,value:e,t:o,className:n})=>e?lr(Fd,{variant:Ld.OUTLINE,className:n,children:e}):lr(Rd,{as:"span",variant:"muted",className:n,children:"-"}),ho=Ed;import"react";import{Badge as Bd,BADGE_VARIANT as Md,Text as Od,Stack as zd}from"@donotdev/components";import{jsx as yo}from"react/jsx-runtime";var Ud=({config:t,value:e,t:o,className:n})=>!e||!Array.isArray(e)||e.length===0?yo(Od,{as:"span",variant:"muted",className:n,children:"-"}):yo(zd,{direction:"row",wrap:"wrap",gap:"medium",className:n,children:e.map((r,a)=>yo(Bd,{variant:Md.OUTLINE,children:String(r)},a))}),vo=Ud;import"react";import{Badge as Vd,BADGE_VARIANT as Gd,Text as Hd,Stack as _d}from"@donotdev/components";import{jsx as bo}from"react/jsx-runtime";var $d=({config:t,value:e,t:o,className:n})=>!e||!Array.isArray(e)||e.length===0?bo(Hd,{as:"span",variant:"muted",className:n,children:"-"}):bo(_d,{direction:"row",wrap:"wrap",gap:"medium",className:n,children:e.map((r,a)=>bo(Vd,{variant:Gd.OUTLINE,children:String(r)},a))}),xo=$d;import"react";import{Badge as Wd,BADGE_VARIANT as Kd,Text as Yd}from"@donotdev/components";import{jsx as cr}from"react/jsx-runtime";var qd=({config:t,value:e,t:o,className:n})=>e?cr(Wd,{variant:Kd.OUTLINE,className:n,children:e}):cr(Yd,{as:"span",variant:"muted",className:n,children:"-"}),Co=qd;import"react";import{Text as pr}from"@donotdev/components";import{jsx as dr}from"react/jsx-runtime";var Zd=({config:t,value:e,t:o,className:n})=>e==null?dr(pr,{as:"span",variant:"muted",className:n,children:"-"}):dr(pr,{as:"span",className:`font-mono ${n||""}`,children:e}),Jd=Zd;import{Badge as Qd,BADGE_VARIANT as Xd,Text as mr,Stack as jd}from"@donotdev/components";import{jsx as ur,jsxs as gr}from"react/jsx-runtime";var em=({config:t,value:e,t:o,className:n})=>e?gr(jd,{direction:"row",align:"center",gap:"medium",className:n,children:[ur(mr,{as:"span",level:"small",children:e.name}),e.size&&gr(Qd,{variant:Xd.SECONDARY,children:[(e.size/1024).toFixed(1)," KB"]})]}):ur(mr,{as:"span",variant:"muted",className:n,children:"-"}),To=em;import"react";import{Avatar as tm,Text as om}from"@donotdev/components";import{jsx as fr}from"react/jsx-runtime";var nm=({config:t,value:e,t:o,className:n,size:r="md"})=>{if(!e)return fr(om,{as:"span",variant:"muted",className:n,children:"-"});let a={sm:"size-touch",md:"size-touch",lg:"h-16 w-16"},i=c=>c.split(" ").map(l=>l.charAt(0)).slice(0,2).join("").toUpperCase();return fr(tm,{src:e,alt:t.label||"Image",fallback:i(t.label||"IMG"),className:`${a[r]} ${n||""}`})},So=nm;import"react";import{Text as hr}from"@donotdev/components";import{jsx as am,jsxs as im}from"react/jsx-runtime";var rm=({config:t,value:e,t:o,className:n})=>!e||e.lat===void 0&&e.lng===void 0?am(hr,{as:"span",variant:"muted",className:n,children:"-"}):im(hr,{as:"div",level:"small",className:`font-mono ${n||""}`,children:[e.lat?.toFixed(6),", ",e.lng?.toFixed(6)]}),ko=rm;import"react";import{Text as yr}from"@donotdev/components";import{jsx as lm,jsxs as cm}from"react/jsx-runtime";var sm=({config:t,value:e,t:o,className:n})=>!e||e.lat===void 0&&e.lng===void 0?lm(yr,{as:"span",variant:"muted",className:n,children:"-"}):cm(yr,{as:"div",level:"small",className:`font-mono ${n||""}`,children:[e.lat?.toFixed(6),", ",e.lng?.toFixed(6)]}),wo=sm;import"react";import{Badge as pm,BADGE_VARIANT as dm,Text as mm}from"@donotdev/components";import{jsx as vr}from"react/jsx-runtime";var um=({config:t,value:e,t:o,className:n})=>{if(!e)return vr(mm,{as:"span",variant:"muted",className:n,children:"-"});let r=e.displayName||e.name||e.id||e;return vr(pm,{variant:dm.OUTLINE,className:n,children:String(r)})},No=um;import"react";import{Text as ft}from"@donotdev/components";import{jsx as ht,jsxs as fm}from"react/jsx-runtime";var gm=({config:t,value:e,t:o,className:n})=>{if(!e)return ht(ft,{as:"span",variant:"muted",className:n,children:"-"});try{let r=new Date(e),a=r.toLocaleDateString(),i=r.toLocaleTimeString();return fm("div",{className:n,children:[ht(ft,{as:"span",children:a}),ht(ft,{as:"span",variant:"muted",level:"small",children:i})]})}catch{return ht(ft,{as:"span",variant:"muted",className:n,children:"-"})}},Do=gm;import"react";var hm=()=>null,Po=hm;var ym=()=>null,Ao=ym;import{Eye as vm,EyeOff as bm}from"lucide-react";import"react";import{useState as xm}from"react";import{Skeleton as Cm,Button as Tm,CopyToClipboard as Sm,Stack as br}from"@donotdev/components";import{jsx as pe,jsxs as xr}from"react/jsx-runtime";var km=({config:t,value:e,t:o,className:n,loading:r=!1})=>{let[a,i]=xm(!1);return r?pe(Cm,{className:n}):e?xr(br,{direction:"row",align:"center",gap:"medium",className:n,children:[pe("span",{style:{fontFamily:"monospace"},children:a?e:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),xr(br,{direction:"row",align:"center",gap:"tight",children:[pe(Tm,{type:"button",onClick:()=>i(!a),"aria-label":a?"Hide password":"Show password",children:a?pe(bm,{}):pe(vm,{})}),pe(Sm,{text:e,tooltipText:o("copyToClipboard")||"Copy to clipboard",copiedTooltipText:o("copied")||"Copied!",ariaLabel:o("copyPassword")||"Copy password"})]})]}):pe("div",{style:{color:"var(--muted-foreground)"},children:"-"})},Cr=km;import{Fragment as Tr,jsx as C,jsxs as Nm}from"react/jsx-runtime";function Io({name:t,config:e,t:o,value:n,className:r}){let a=()=>{switch(e.type){case"password":return C(Cr,{config:e,value:n,t:o,className:r,loading:!1});case"text":case"email":case"month":case"week":case"time":return C(gt,{config:e,value:n,t:o,className:r});case"avatar":return C(so,{config:e,value:n,t:o,className:r});case"badge":return C(io,{config:e,value:n,t:o,className:r});case"boolean":case"checkbox":return C(fo,{config:e,value:n,t:o,className:r});case"array":return C(xo,{config:e,value:n,t:o,className:r});case"multiselect":return C(vo,{config:e,value:n,t:o,className:r});case"image":return C(So,{config:e,value:n,t:o,className:r});case"url":return C(lo,{config:e,value:n,t:o,className:r});case"tel":return C(uo,{config:e,value:n,t:o,className:r});case"color":return n&&typeof n=="string"?Nm(wm,{direction:"row",align:"center",gap:"tight",children:[C("div",{style:{backgroundColor:n,width:"1.5rem",height:"1.5rem"},"aria-label":`Color: ${n}`}),C("span",{style:{fontFamily:"monospace"},children:n})]}):C("span",{style:{color:"var(--muted-foreground)"},children:"-"});case"number":case"range":return C(mo,{config:e,value:n,t:o,className:r});case"date":case"datetime-local":return C(co,{config:e,value:n,t:o,className:r});case"timestamp":return C(Do,{config:e,value:n,t:o,className:r});case"reference":return C(No,{config:e,value:n,t:o,className:r});case"file":return C(To,{config:e,value:n,t:o,className:r});case"geopoint":return C(ko,{config:e,value:n,t:o,className:r});case"map":return C(wo,{config:e,value:n,t:o,className:r});case"textarea":return C(go,{config:e,value:n,t:o,className:r});case"select":return C(ho,{config:e,value:n,t:o,className:r});case"radio":return C(Co,{config:e,value:n,t:o,className:r});case"hidden":return C(Po,{config:e,value:n,t:o,className:r});case"submit":case"reset":return C(Ao,{config:e,value:n,t:o,className:r});default:return C(gt,{config:e,value:n,t:o,className:r})}};if(e.visibility==="hidden")return C(Tr,{});let i=a();return i?C("div",{className:r,children:i}):C(Tr,{})}import{Stack as Sr}from"@donotdev/components";import{useTranslation as Dm}from"@donotdev/core";import{jsx as Ve,jsxs as Am}from"react/jsx-runtime";function Pm({entity:t,data:e,t:o,className:n="",loading:r=!1}){let{t:a}=Dm("dndev"),i=o||a,c=Object.entries(t);return r?Ve(Sr,{gap:"medium",className:n,children:c.map(([l])=>Am("div",{className:"dndev-animate-pulse",children:[Ve("div",{style:{marginBottom:"var(--gap-sm)",height:"1rem",width:"25%"}}),Ve("div",{style:{height:"2rem",backgroundColor:"var(--muted)"}})]},l))}):Ve(Sr,{gap:"medium",className:n,children:c.map(([l,d])=>Ve(Io,{name:l,config:d,value:e[l],t:i},l))})}import{createContext as wr,useId as Im,use as kr}from"react";import{Controller as Fm,FormProvider as Lm,useFormContext as Rm}from"react-hook-form";import{Label as Em,Slot as Bm,cn as Mm,Stack as Om}from"@donotdev/components";import{jsx as ne}from"react/jsx-runtime";var Ey=Lm,Nr=wr({}),By=({...t})=>ne(Nr.Provider,{value:{name:t.name},children:ne(Fm,{...t})}),Dr=wr({}),My=({className:t,...e})=>{let o=Im();return ne(Dr.Provider,{value:{id:o},children:ne(Om,{gap:"medium",className:t,...e})})},yt=()=>{let t=kr(Nr);if(!t||!t.name)return null;let e=kr(Dr);if(!e)return null;let{getFieldState:o,formState:n}=Rm(),r=o(t.name,n),{id:a}=e;return{id:a,name:t.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},Oy=({className:t,...e})=>{let o=yt();if(!o)return null;let{error:n,formItemId:r}=o;return ne(Em,{className:Mm(n&&"text-destructive",t),htmlFor:r,...e})},zy=({...t})=>{let e=yt();if(!e)return null;let{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=e;return ne(Bm,{id:n,"aria-describedby":o?`${r} ${a}`:`${r}`,"aria-invalid":!!o,...t})},Uy=({className:t,...e})=>{let o=yt();if(!o)return null;let{formDescriptionId:n}=o;return ne("p",{id:n,className:t,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...e})},Vy=({className:t,children:e,...o})=>{let n=yt();if(!n)return null;let{error:r,formMessageId:a}=n,i=r?String(r?.message):e;return i?ne("p",{id:a,className:t,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var zm={layoutContainer:"dndev-layout",sidebar:"sidebar",sidebarTop:"sidebar-top",sidebarContent:"sidebar-content",sidebarBottom:"sidebar-bottom",sidebarResizeHandle:"dndev-sidebar-resize-handle",header:"header",main:"main",footer:"footer",container:"dndev-container",pageContainer:"dndev-container",breadcrumbsContainer:"breadcrumbs-container"},Um={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},qy={...zm,...Um},Zy={headerHeight:"--header-height",headerPadding:"--header-padding",headerIconSize:"--header-icon-size",headerLogoMaxHeight:"--header-logo-max-height",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",mainPadding:"--main-padding",mainMaxWidth:"--main-max-width",contentWidth:"--content-width",contentPadding:"--content-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zOverlay:"--z-overlay",zModal:"--z-modal",zTooltip:"--z-tooltip",zToast:"--z-toast"},Jy={headerHeight:"--header-height",headerPadding:"--header-padding",logoSize:"--logo-size",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",layoutGap:"--layout-gap",sectionGap:"--gap-lg",contentGap:"--content-gap",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zModal:"--z-modal",zTooltip:"--z-tooltip"};export{Tc as AppBranding,wc as AppIcon,qs as AppLoading,Pc as AppTitle,M as AssetResolver,da as AuthGuard,l1 as AuthGuardFallback,Vt as AuthHeader,zt as AuthMenu,so as AvatarFieldDisplay,io as BadgeFieldDisplay,Vc as Breadcrumbs,Ao as ButtonFieldDisplay,Qt as CacheSettings,fo as CheckboxFieldDisplay,Z2 as ConsentBanner,co as DateFieldDisplay,Io as DisplayFieldRenderer,rn as DnDevNavigationMenu,ho as DropdownDisplay,ap as DropdownNavigation,Pm as EntityDisplayRenderer,Hl as FeatureCard,nl as FeatureDisabled,To as FileFieldDisplay,cp as FloatingLanguageSwitcher,Ey as Form,zy as FormControl,Uy as FormDescription,By as FormField,My as FormItem,Oy as FormLabel,Vy as FormMessage,e0 as GameContainer,r0 as GameFlow,$c as GameTitle,ko as GeoPointFieldDisplay,g1 as GoTo,Fi as GoToInput,Si as GoToWrapper,fp as HeaderMenu,Tp as HeaderNavigation,Po as HiddenFieldDisplay,Lr as Icon,So as ImageFieldDisplay,c5 as LicenseWatermark,T as Link,lo as LinkFieldDisplay,_e as Loader,hl as LoadingContainerOverlay,at as LoadingMessage,sl as LoadingMessageAlmostDone,ll as LoadingMessageComplete,ml as LoadingMessageConnecting,il as LoadingMessageProcessing,cl as LoadingMessageSaving,dl as LoadingMessageSearching,al as LoadingMessageSimple,pl as LoadingMessageUploading,yl as LoadingOverlay,xl as LoadingScreen,wo as MapFieldDisplay,vo as MultiDropdownDisplay,xo as MultiInputTextFieldDisplay,an as NotFoundPage,Rp as Notifications,mo as NumberFieldDisplay,ge as PageContainer,uo as PhoneNumberDisplay,Rl as ProgressBar,Co as RadioFieldDisplay,Jd as RangeFieldDisplay,Il as RedirectOverlay,No as ReferenceFieldDisplay,Wp as SettingsMenu,Ml as Skeleton,lc as TechBento,go as TextAreaDisplay,gt as TextFieldDisplay,Xp as ThemeToggle,Do as TimestampFieldDisplay,qy as allLayoutClasses,Au as createAuthConfig,Jy as cssVariables,su as isAuthAvailable,qg as isBillingAvailable,of as isCrudAvailable,sf as isOAuthAvailable,zm as layoutClasses,Um as layoutUtilities,Zy as layoutVariables,Gg as resolveFaviconSet,Vg as resolveLogo,mf as tList,Kt as techLogos,k as useAuthSafe,Du as useAuthState,tt as useAuthVisibility,Dg as useBack,Xg as useBillingVisibility,ku as useCanAccess,ma as useCanNavigate,tf as useCrudSafe,yt as useFormField,Yo as useGoTo,Nu as useHasRole,Ig as useLocation,Eg as useMatch,Ng as useNavigate,_ as useNavigationItems,af as useOAuthSafe,Fg as useParams,Ag as usePrefetch,Bg as useQueryParams,Mg as useRedirectGuard,Pg as useRefresh,Lg as useRouteParam,Rg as useSearchParams,Et as useStripeBillingSafe,wu as useUserRole,Pu as withAuth};