@donotdev/ui 0.0.24 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crud/components/CrudCardLink.d.ts +1 -1
- package/dist/crud/components/CrudCardLink.d.ts.map +1 -1
- package/dist/crud/components/CrudCardLink.js +5 -1
- package/dist/crud/components/EntityCardList.d.ts +1 -1
- package/dist/crud/components/EntityCardList.d.ts.map +1 -1
- package/dist/crud/components/EntityCardList.js +5 -1
- package/dist/crud/components/EntityDisplayRenderer.d.ts +1 -1
- package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityDisplayRenderer.js +5 -1
- package/dist/crud/components/EntityFormRenderer.d.ts +1 -1
- package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityFormRenderer.js +6 -1
- package/dist/crud/components/EntityList.d.ts +1 -1
- package/dist/crud/components/EntityList.d.ts.map +1 -1
- package/dist/crud/components/EntityList.js +5 -1
- package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
- package/dist/crud/components/EntityRecommendations.js +5 -1
- package/dist/crud/components/EntityWorkflow.d.ts +2 -2
- package/dist/crud/components/EntityWorkflow.d.ts.map +1 -1
- package/dist/crud/components/EntityWorkflow.js +5 -1
- package/dist/crud/crudImports.d.ts +36 -0
- package/dist/crud/crudImports.d.ts.map +1 -0
- package/dist/crud/crudImports.js +39 -0
- package/dist/dndev-next.css +2 -1
- package/dist/dndev.css +2 -1
- package/dist/index.js +4 -4
- package/dist/styles/index.css +2 -1
- package/package.json +7 -10
|
@@ -12,6 +12,6 @@ import type { CrudCardProps } from '@donotdev/core';
|
|
|
12
12
|
* CrudCard with Link wrapping for web navigation.
|
|
13
13
|
* When detailHref is provided, wraps the card in a Link for a11y/SEO.
|
|
14
14
|
*/
|
|
15
|
-
export declare function CrudCard({ detailHref, onClick, ...rest }: CrudCardProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function CrudCard({ detailHref, onClick, ...rest }: CrudCardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
16
|
export default CrudCard;
|
|
17
17
|
//# sourceMappingURL=CrudCardLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudCardLink.d.ts","sourceRoot":"","sources":["../../../src/crud/components/CrudCardLink.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"CrudCardLink.d.ts","sourceRoot":"","sources":["../../../src/crud/components/CrudCardLink.tsx"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQpD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,kDAsBvE;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { CrudCard as BaseCrudCard } from '
|
|
3
|
+
import { isCrudModuleAvailable, CrudCard as BaseCrudCard, } from '../crudImports';
|
|
4
4
|
import { Link } from '../../routing';
|
|
5
5
|
/**
|
|
6
6
|
* CrudCard with Link wrapping for web navigation.
|
|
7
7
|
* When detailHref is provided, wraps the card in a Link for a11y/SEO.
|
|
8
8
|
*/
|
|
9
9
|
export function CrudCard({ detailHref, onClick, ...rest }) {
|
|
10
|
+
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
11
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
12
|
+
if (!isCrudModuleAvailable)
|
|
13
|
+
return null;
|
|
10
14
|
// When detailHref is set, Link handles navigation — don't pass onClick to inner card
|
|
11
15
|
const card = (_jsx(BaseCrudCard, { ...rest, onClick: detailHref ? undefined : onClick }));
|
|
12
16
|
if (detailHref) {
|
|
@@ -12,5 +12,5 @@ export type { EntityCardListProps };
|
|
|
12
12
|
* - Auto-routing when handler not provided
|
|
13
13
|
*/
|
|
14
14
|
export declare function EntityCardList({ entity, basePath, onClick, cols, staleTime, // 30 minutes default cache
|
|
15
|
-
filter, hideFilters, resultLabel, tone, }: EntityCardListProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
filter, hideFilters, resultLabel, tone, }: EntityCardListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
16
|
//# sourceMappingURL=EntityCardList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityCardList.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityCardList.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,mBAAmB,EAAgB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityCardList.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityCardList.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,mBAAmB,EAAgB,MAAM,gBAAgB,CAAC;AAYxE,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,QAAQ,EACR,OAAO,EACP,IAAmB,EACnB,SAA0B,EAAE,2BAA2B;AACvD,MAAM,EACN,WAAmB,EACnB,WAAW,EACX,IAAI,GACL,EAAE,mBAAmB,kDA+LrB"}
|
|
@@ -17,7 +17,7 @@ import { Heart } from 'lucide-react';
|
|
|
17
17
|
import { useMemo, useCallback } from 'react';
|
|
18
18
|
import { Card, Grid, Stack, Text, Spinner, Section, Button, } from '@donotdev/components';
|
|
19
19
|
import { useTranslation, getListCardFieldNames } from '@donotdev/core';
|
|
20
|
-
import { useCrudCardList, EntityFilters, useEntityFavorites, useCrudFilters, } from '
|
|
20
|
+
import { isCrudModuleAvailable, useCrudCardList, EntityFilters, useEntityFavorites, useCrudFilters, } from '../crudImports';
|
|
21
21
|
import { CrudCard } from './CrudCardLink';
|
|
22
22
|
import { useNavigate } from '../../routing';
|
|
23
23
|
/**
|
|
@@ -33,6 +33,10 @@ import { useNavigate } from '../../routing';
|
|
|
33
33
|
*/
|
|
34
34
|
export function EntityCardList({ entity, basePath, onClick, cols = [1, 2, 3, 4], staleTime = 1000 * 60 * 30, // 30 minutes default cache
|
|
35
35
|
filter, hideFilters = false, resultLabel, tone, }) {
|
|
36
|
+
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
37
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
38
|
+
if (!isCrudModuleAvailable)
|
|
39
|
+
return null;
|
|
36
40
|
const navigate = useNavigate();
|
|
37
41
|
const base = basePath ?? `/${entity.collection}`;
|
|
38
42
|
// useCrudCardList -> handles fetching + client-side filter/search/sort via `processed`
|
|
@@ -16,6 +16,6 @@ export type { EntityDisplayRendererProps };
|
|
|
16
16
|
* <EntityDisplayRenderer entity={carEntity} id={carId} />
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export declare function EntityDisplayRenderer<T extends EntityRecord = EntityRecord>({ entity, id, t, className, loadingMessage, notFoundMessage, viewerRole: viewerRoleProp, excludeFields, }: EntityDisplayRendererProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function EntityDisplayRenderer<T extends EntityRecord = EntityRecord>({ entity, id, t, className, loadingMessage, notFoundMessage, viewerRole: viewerRoleProp, excludeFields, }: EntityDisplayRendererProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
20
20
|
export default EntityDisplayRenderer;
|
|
21
21
|
//# sourceMappingURL=EntityDisplayRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityDisplayRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityDisplayRenderer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityDisplayRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityDisplayRenderer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAS/E,YAAY,EAAE,0BAA0B,EAAE,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,EAC3E,MAAM,EACN,EAAE,EACF,CAAC,EACD,SAAc,EACd,cAAc,EACd,eAAe,EACf,UAAU,EAAE,cAAc,EAC1B,aAAa,GACd,EAAE,0BAA0B,CAAC,CAAC,CAAC,kDA8M/B;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import { useEffect, useState, useMemo } from 'react';
|
|
14
14
|
import { Stack, Spinner } from '@donotdev/components';
|
|
15
15
|
import { useTranslation, isFieldVisible } from '@donotdev/core';
|
|
16
|
-
import { useCrud, DisplayFieldRenderer } from '
|
|
16
|
+
import { isCrudModuleAvailable, useCrud, DisplayFieldRenderer, } from '../crudImports';
|
|
17
17
|
import { useAuthSafe } from '../../utils/useAuthSafe';
|
|
18
18
|
/**
|
|
19
19
|
* EntityDisplayRenderer - Automatically fetches and displays entity data
|
|
@@ -32,6 +32,10 @@ import { useAuthSafe } from '../../utils/useAuthSafe';
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
export function EntityDisplayRenderer({ entity, id, t, className = '', loadingMessage, notFoundMessage, viewerRole: viewerRoleProp, excludeFields, }) {
|
|
35
|
+
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
36
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
37
|
+
if (!isCrudModuleAvailable)
|
|
38
|
+
return null;
|
|
35
39
|
// Auto-detect role from auth; prop overrides
|
|
36
40
|
const authRole = useAuthSafe('userRole');
|
|
37
41
|
const viewerRole = viewerRoleProp ?? authRole;
|
|
@@ -13,6 +13,6 @@ export type { EntityFormRendererProps };
|
|
|
13
13
|
* @since 0.0.1
|
|
14
14
|
* @author AMBROISE PARK Consulting
|
|
15
15
|
*/
|
|
16
|
-
export declare function EntityFormRenderer<T extends EntityRecord = EntityRecord>({ entity, onSubmit, t, className, submitText, loading, defaultValues, submitVariant, secondaryButtonText, secondaryButtonVariant, onSecondarySubmit, viewerRole: viewerRoleProp, operation, formId: externalFormId, cancelText, cancelPath, successPath, onCancel, warnOnUnsavedChanges, unsavedChangesMessage, hideVisibilityInfo, }: EntityFormRendererProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function EntityFormRenderer<T extends EntityRecord = EntityRecord>({ entity, onSubmit, t, className, submitText, loading, defaultValues, submitVariant, secondaryButtonText, secondaryButtonVariant, onSecondarySubmit, viewerRole: viewerRoleProp, operation, formId: externalFormId, cancelText, cancelPath, successPath, onCancel, warnOnUnsavedChanges, unsavedChangesMessage, hideVisibilityInfo, }: EntityFormRendererProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
17
17
|
export default EntityFormRenderer;
|
|
18
18
|
//# sourceMappingURL=EntityFormRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityFormRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityFormRenderer.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EAEb,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityFormRenderer.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityFormRenderer.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EAEb,MAAM,gBAAgB,CAAC;AAgBxB,YAAY,EAAE,uBAAuB,EAAE,CAAC;AAExC;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAAE,EACxE,MAAM,EACN,QAAQ,EACR,CAAC,EACD,SAAc,EACd,UAAU,EACV,OAAe,EACf,aAAa,EACb,aAAyB,EACzB,mBAAmB,EACnB,sBAAkC,EAClC,iBAAiB,EACjB,UAAU,EAAE,cAAc,EAC1B,SAA6C,EAC7C,MAAM,EAAE,cAAc,EACtB,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,oBAA2B,EAC3B,qBAAqB,EACrB,kBAA0B,GAC3B,EAAE,uBAAuB,CAAC,CAAC,CAAC,kDAgd5B;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -14,7 +14,7 @@ import { useEffect, useId, useMemo, useState } from 'react';
|
|
|
14
14
|
import { FormProvider } from 'react-hook-form';
|
|
15
15
|
import { Badge, Button, DropdownMenu, Grid, Stack, Spinner, } from '@donotdev/components';
|
|
16
16
|
import { hasRoleAccess, useTranslation } from '@donotdev/core';
|
|
17
|
-
import { DisplayFieldRenderer, FormFieldRenderer, UploadProvider, useEntityForm, useUnsavedChangesWarning, useFormStore, useFieldConditions, } from '
|
|
17
|
+
import { isCrudModuleAvailable, DisplayFieldRenderer, FormFieldRenderer, UploadProvider, useEntityForm, useUnsavedChangesWarning, useFormStore, useFieldConditions, } from '../crudImports';
|
|
18
18
|
import { useNavigate } from '../../routing';
|
|
19
19
|
import { useAuthSafe } from '../../utils/useAuthSafe';
|
|
20
20
|
/**
|
|
@@ -31,6 +31,11 @@ import { useAuthSafe } from '../../utils/useAuthSafe';
|
|
|
31
31
|
* @author AMBROISE PARK Consulting
|
|
32
32
|
*/
|
|
33
33
|
export function EntityFormRenderer({ entity, onSubmit, t, className = '', submitText, loading = false, defaultValues, submitVariant = 'primary', secondaryButtonText, secondaryButtonVariant = 'outline', onSecondarySubmit, viewerRole: viewerRoleProp, operation = defaultValues ? 'edit' : 'create', formId: externalFormId, cancelText, cancelPath, successPath, onCancel, warnOnUnsavedChanges = true, unsavedChangesMessage, hideVisibilityInfo = false, }) {
|
|
34
|
+
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
35
|
+
// Hooks below are either ALL called or NONE — no Rules-of-Hooks violation at runtime.
|
|
36
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
37
|
+
if (!isCrudModuleAvailable)
|
|
38
|
+
return null;
|
|
34
39
|
const navigate = useNavigate();
|
|
35
40
|
// Auto-detect role from auth; prop overrides (e.g. View-As preview)
|
|
36
41
|
const authRole = useAuthSafe('userRole');
|
|
@@ -10,5 +10,5 @@ export type { EntityListProps };
|
|
|
10
10
|
* - Edit and Delete actions (admin only)
|
|
11
11
|
* - Auto-routing when handlers not provided
|
|
12
12
|
*/
|
|
13
|
-
export declare function EntityList({ entity, basePath, onClick, hideFilters, pagination, pageSize: pageSizeProp, queryOptions, exportable, }: EntityListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function EntityList({ entity, basePath, onClick, hideFilters, pagination, pageSize: pageSizeProp, queryOptions, exportable, }: EntityListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
14
|
//# sourceMappingURL=EntityList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityList.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityList.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"EntityList.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityList.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AActD,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAmB,EACnB,UAAmB,EACnB,QAAQ,EAAE,YAAY,EACtB,YAAY,EACZ,UAAiB,GAClB,EAAE,eAAe,kDAyRjB"}
|
|
@@ -17,7 +17,7 @@ import { RefreshCw, Plus, Trash2, Edit, Search } from 'lucide-react';
|
|
|
17
17
|
import { useMemo, useCallback, useState } from 'react';
|
|
18
18
|
import { DataTable, Button, Stack, ActionButton, Section, Input, } from '@donotdev/components';
|
|
19
19
|
import { useTranslation } from '@donotdev/core';
|
|
20
|
-
import { translateFieldLabel, useCrud, useCrudList, EntityFilters, formatValue, useReferenceResolver, } from '
|
|
20
|
+
import { isCrudModuleAvailable, translateFieldLabel, useCrud, useCrudList, EntityFilters, formatValue, useReferenceResolver, } from '../crudImports';
|
|
21
21
|
import { useNavigate } from '../../routing';
|
|
22
22
|
/**
|
|
23
23
|
* Entity List Component - Table view for admin/internal operations
|
|
@@ -30,6 +30,10 @@ import { useNavigate } from '../../routing';
|
|
|
30
30
|
* - Auto-routing when handlers not provided
|
|
31
31
|
*/
|
|
32
32
|
export function EntityList({ entity, basePath, onClick, hideFilters = false, pagination = 'auto', pageSize: pageSizeProp, queryOptions, exportable = true, }) {
|
|
33
|
+
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
34
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
|
+
if (!isCrudModuleAvailable)
|
|
36
|
+
return null;
|
|
33
37
|
const navigate = useNavigate();
|
|
34
38
|
const base = basePath ?? `/${entity.collection}`;
|
|
35
39
|
// Pre-fetch referenced collections for display resolution
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,IAAQ,EACR,SAAS,GACV,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,IAAQ,EACR,SAAS,GACV,EAAE,0BAA0B,kDA2B5B"}
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
* @author AMBROISE PARK Consulting
|
|
12
12
|
*/
|
|
13
13
|
import { Section } from '@donotdev/components';
|
|
14
|
-
import { useCrudCardList } from '
|
|
14
|
+
import { isCrudModuleAvailable, useCrudCardList } from '../crudImports';
|
|
15
15
|
import { CrudCard } from './CrudCardLink';
|
|
16
16
|
/**
|
|
17
17
|
* Displays a grid of related entity cards.
|
|
@@ -31,6 +31,10 @@ import { CrudCard } from './CrudCardLink';
|
|
|
31
31
|
* />
|
|
32
32
|
*/
|
|
33
33
|
export function EntityRecommendations({ entity, queryOptions, title, basePath, cols = 3, className, }) {
|
|
34
|
+
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
35
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
36
|
+
if (!isCrudModuleAvailable)
|
|
37
|
+
return null;
|
|
34
38
|
const { items, loading } = useCrudCardList(entity, {
|
|
35
39
|
queryOptions,
|
|
36
40
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WorkflowConfig, EntityWorkflowReturn } from '@donotdev/crud';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
/** Props for EntityWorkflow */
|
|
4
4
|
export interface EntityWorkflowProps {
|
|
@@ -23,5 +23,5 @@ export interface EntityWorkflowProps {
|
|
|
23
23
|
* Default mode: auto-renders Stepper + form + navigation buttons.
|
|
24
24
|
* Custom mode: pass a render prop as children for full control.
|
|
25
25
|
*/
|
|
26
|
-
export declare function EntityWorkflow({ workflow: config, onComplete, onStepChange, defaultValues, viewerRole, children, className, }: EntityWorkflowProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function EntityWorkflow({ workflow: config, onComplete, onStepChange, defaultValues, viewerRole, children, className, }: EntityWorkflowProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
27
|
//# sourceMappingURL=EntityWorkflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityWorkflow.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityWorkflow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EntityWorkflow.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityWorkflow.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,cAAc,EAEd,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,+BAA+B;AAC/B,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,QAAQ,EAAE,cAAc,CAAC;IACzB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,iCAAiC;IACjC,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,oBAAoB,KAAK,SAAS,CAAC;IACnD,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAChB,UAAU,EACV,YAAY,EACZ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,SAAS,GACV,EAAE,mBAAmB,kDA4FrB"}
|
|
@@ -23,7 +23,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
23
23
|
*/
|
|
24
24
|
import { Button, Stack, Stepper } from '@donotdev/components';
|
|
25
25
|
import { useTranslation } from '@donotdev/core';
|
|
26
|
-
import {
|
|
26
|
+
import { isCrudModuleAvailable, useEntityWorkflow } from '../crudImports';
|
|
27
27
|
import { EntityFormRenderer } from './EntityFormRenderer';
|
|
28
28
|
/**
|
|
29
29
|
* EntityWorkflow — renders a multi-step entity workflow.
|
|
@@ -32,6 +32,10 @@ import { EntityFormRenderer } from './EntityFormRenderer';
|
|
|
32
32
|
* Custom mode: pass a render prop as children for full control.
|
|
33
33
|
*/
|
|
34
34
|
export function EntityWorkflow({ workflow: config, onComplete, onStepChange, defaultValues, viewerRole, children, className, }) {
|
|
35
|
+
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
36
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
37
|
+
if (!isCrudModuleAvailable)
|
|
38
|
+
return null;
|
|
35
39
|
const { t } = useTranslation('crud');
|
|
36
40
|
const wf = useEntityWorkflow(config, {
|
|
37
41
|
onComplete,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Safe import hub for @donotdev/crud
|
|
3
|
+
* @description Single module-level import using the proven `import * as` pattern.
|
|
4
|
+
* When crud is not installed, Vite aliases it to an empty module — all extractions
|
|
5
|
+
* resolve to `undefined`. This is immutable: the decision is made once at module load.
|
|
6
|
+
*
|
|
7
|
+
* Components import from here instead of directly from '@donotdev/crud'.
|
|
8
|
+
* Type-only imports (`import type`) can still go directly to '@donotdev/crud'.
|
|
9
|
+
*
|
|
10
|
+
* @see useCrudSafe.ts — same pattern, proven in production
|
|
11
|
+
* @version 0.0.1
|
|
12
|
+
* @since 0.0.25
|
|
13
|
+
* @author AMBROISE PARK Consulting
|
|
14
|
+
*/
|
|
15
|
+
import * as crudModule from '@donotdev/crud';
|
|
16
|
+
/** true when @donotdev/crud resolved with real exports */
|
|
17
|
+
export declare const isCrudModuleAvailable: boolean;
|
|
18
|
+
export declare const useEntityForm: typeof crudModule.useEntityForm;
|
|
19
|
+
export declare const useUnsavedChangesWarning: typeof crudModule.useUnsavedChangesWarning;
|
|
20
|
+
export declare const useFormStore: import("zustand").UseBoundStore<import("zustand").StoreApi<crudModule.FormStoreState & crudModule.FormStoreActions & import("@donotdev/stores").DoNotDevStore>>;
|
|
21
|
+
export declare const useFieldConditions: typeof crudModule.useFieldConditions;
|
|
22
|
+
export declare const useCrud: typeof crudModule.useCrud;
|
|
23
|
+
export declare const useCrudList: typeof crudModule.useCrudList;
|
|
24
|
+
export declare const useCrudCardList: typeof crudModule.useCrudCardList;
|
|
25
|
+
export declare const useEntityFavorites: typeof crudModule.useEntityFavorites;
|
|
26
|
+
export declare const useCrudFilters: typeof crudModule.useCrudFilters;
|
|
27
|
+
export declare const useEntityWorkflow: typeof crudModule.useEntityWorkflow;
|
|
28
|
+
export declare const useReferenceResolver: typeof crudModule.useReferenceResolver;
|
|
29
|
+
export declare const DisplayFieldRenderer: typeof crudModule.DisplayFieldRenderer;
|
|
30
|
+
export declare const FormFieldRenderer: typeof crudModule.FormFieldRenderer;
|
|
31
|
+
export declare const UploadProvider: typeof crudModule.UploadProvider;
|
|
32
|
+
export declare const EntityFilters: typeof crudModule.EntityFilters;
|
|
33
|
+
export declare const CrudCard: typeof crudModule.CrudCard;
|
|
34
|
+
export declare const translateFieldLabel: typeof crudModule.translateFieldLabel;
|
|
35
|
+
export declare const formatValue: typeof crudModule.formatValue;
|
|
36
|
+
//# sourceMappingURL=crudImports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crudImports.d.ts","sourceRoot":"","sources":["../../src/crud/crudImports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,SACS,CAAC;AAG5C,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,wBAAwB,4CAAuC,CAAC;AAC7E,eAAO,MAAM,YAAY,iKAA2B,CAAC;AACrD,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,OAAO,2BAAsB,CAAC;AAC3C,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AAGrE,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AACrE,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,QAAQ,4BAAuB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,uCAAkC,CAAC;AACnE,eAAO,MAAM,WAAW,+BAA0B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// packages/ui/src/crud/crudImports.ts
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Safe import hub for @donotdev/crud
|
|
4
|
+
* @description Single module-level import using the proven `import * as` pattern.
|
|
5
|
+
* When crud is not installed, Vite aliases it to an empty module — all extractions
|
|
6
|
+
* resolve to `undefined`. This is immutable: the decision is made once at module load.
|
|
7
|
+
*
|
|
8
|
+
* Components import from here instead of directly from '@donotdev/crud'.
|
|
9
|
+
* Type-only imports (`import type`) can still go directly to '@donotdev/crud'.
|
|
10
|
+
*
|
|
11
|
+
* @see useCrudSafe.ts — same pattern, proven in production
|
|
12
|
+
* @version 0.0.1
|
|
13
|
+
* @since 0.0.25
|
|
14
|
+
* @author AMBROISE PARK Consulting
|
|
15
|
+
*/
|
|
16
|
+
import * as crudModule from '@donotdev/crud';
|
|
17
|
+
/** true when @donotdev/crud resolved with real exports */
|
|
18
|
+
export const isCrudModuleAvailable = typeof crudModule?.useCrud === 'function';
|
|
19
|
+
// --- Hooks ---
|
|
20
|
+
export const useEntityForm = crudModule?.useEntityForm;
|
|
21
|
+
export const useUnsavedChangesWarning = crudModule?.useUnsavedChangesWarning;
|
|
22
|
+
export const useFormStore = crudModule?.useFormStore;
|
|
23
|
+
export const useFieldConditions = crudModule?.useFieldConditions;
|
|
24
|
+
export const useCrud = crudModule?.useCrud;
|
|
25
|
+
export const useCrudList = crudModule?.useCrudList;
|
|
26
|
+
export const useCrudCardList = crudModule?.useCrudCardList;
|
|
27
|
+
export const useEntityFavorites = crudModule?.useEntityFavorites;
|
|
28
|
+
export const useCrudFilters = crudModule?.useCrudFilters;
|
|
29
|
+
export const useEntityWorkflow = crudModule?.useEntityWorkflow;
|
|
30
|
+
export const useReferenceResolver = crudModule?.useReferenceResolver;
|
|
31
|
+
// --- Components ---
|
|
32
|
+
export const DisplayFieldRenderer = crudModule?.DisplayFieldRenderer;
|
|
33
|
+
export const FormFieldRenderer = crudModule?.FormFieldRenderer;
|
|
34
|
+
export const UploadProvider = crudModule?.UploadProvider;
|
|
35
|
+
export const EntityFilters = crudModule?.EntityFilters;
|
|
36
|
+
export const CrudCard = crudModule?.CrudCard;
|
|
37
|
+
// --- Utils ---
|
|
38
|
+
export const translateFieldLabel = crudModule?.translateFieldLabel;
|
|
39
|
+
export const formatValue = crudModule?.formatValue;
|
package/dist/dndev-next.css
CHANGED
|
@@ -746,7 +746,8 @@ em {
|
|
|
746
746
|
}
|
|
747
747
|
.dndev-input[data-variant='destructive']:focus {
|
|
748
748
|
border-color: var(--destructive);
|
|
749
|
-
box-shadow: 0 0 0 3px
|
|
749
|
+
box-shadow: 0 0 0 3px
|
|
750
|
+
color-mix(in oklab, var(--destructive) 50%, transparent);
|
|
750
751
|
}
|
|
751
752
|
.dndev-input[data-variant='destructive']:focus-visible {
|
|
752
753
|
box-shadow:
|
package/dist/dndev.css
CHANGED
|
@@ -840,7 +840,8 @@ em {
|
|
|
840
840
|
|
|
841
841
|
.dndev-input[data-variant='destructive']:focus {
|
|
842
842
|
border-color: var(--destructive);
|
|
843
|
-
box-shadow: 0 0 0 3px
|
|
843
|
+
box-shadow: 0 0 0 3px
|
|
844
|
+
color-mix(in oklab, var(--destructive) 50%, transparent);
|
|
844
845
|
}
|
|
845
846
|
|
|
846
847
|
.dndev-input[data-variant='destructive']:focus-visible {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use client";import{a as
|
|
1
|
+
"use client";import{a as K,b as Nn,c as N,d as Up,e as Z,f as wo,g as _p}from"./chunk-XHGRMKOY.js";import{a as $e}from"./chunk-O2XFH626.js";import{User as ts}from"lucide-react";import{Suspense as zt,lazy as Qo,useState as os}from"react";import{Button as rs,BUTTON_VARIANT as ns,DropdownMenu as as,Dialog as is,DISPLAY as ss}from"@donotdev/components";import{useTranslation as ls}from"@donotdev/core";import{useAuthConfig as cs}from"@donotdev/core";import{getEnabledAuthPartners as ds}from"@donotdev/core";import{User as Di,LogOut as Fi,Settings as Oe,UserCheck as Mi,Trash2 as Bi}from"lucide-react";import*as Oi from"lucide-react";import et,{useMemo as zi,lazy as Yo,Suspense as Ko}from"react";import{Avatar as Vi,Button as Ui,BUTTON_VARIANT as _i,DropdownMenu as Hi,Text as Wi,DISPLAY as $i}from"@donotdev/components";import{useTranslation as Gi}from"@donotdev/core";import{getEnabledAuthPartners as Ki,useAuthConfig as Yi,isClient as qi}from"@donotdev/core";import{useBreakpoint as Zi}from"@donotdev/core";import{useNavigate as Ji}from"@donotdev/ui/routing/hooks";import{Link as To}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as In}from"@donotdev/core";import{useNavigate as An}from"@donotdev/ui/routing/hooks";import{Fragment as Rn,jsx as Se,jsxs as ko}from"react/jsx-runtime";var T=({path:e,replace:t,prefetch:o=!0,children:r,icon:n,label:a,onClick:i,className:s,"aria-label":l,"aria-describedby":c,target:d,rel:p,...g})=>{let m=An(),u=In("showCookieBanner");if(e==="#cookie-settings")return ko("a",{href:"#cookie-settings",onClick:C=>{C.preventDefault(),C.stopPropagation();try{u()}catch{}i&&i(C)},className:s,style:{display:n&&a?"flex":void 0,alignItems:n&&a?"center":void 0,gap:n&&a?"var(--gap-sm)":void 0,...g.style},"aria-label":l||a||"Cookie Settings","aria-describedby":c,...g,children:[n&&Se(K,{icon:n,fallback:To}),a&&Se("span",{children:a}),r]});let v=e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:"),y=b=>{if(v){i&&i(b);return}b.preventDefault(),i&&i(b);let C=e.startsWith("/")||e.startsWith(".")?e:`/${e}`;m(C,{replace:t})},f={"aria-label":l||a,"aria-describedby":c},x=ko(Rn,{children:[n&&Se(K,{icon:n,fallback:To}),a&&Se("span",{children:a}),r]});return v?Se("a",{href:e,onClick:y,target:d||"_blank",rel:p||"noopener noreferrer",className:s,style:{display:n&&a?"flex":void 0,alignItems:n&&a?"center":void 0,gap:n&&a?"var(--gap-sm)":void 0},...f,...g,children:x}):Se("a",{href:e,onClick:y,className:s,style:{display:n&&a?"flex":void 0,alignItems:n&&a?"center":void 0,gap:n&&a?"var(--gap-sm)":void 0},...f,...g,children:x})};import{useEffect as Po,useState as On,lazy as zn,Suspense as Vn}from"react";import{Stack as Eo}from"@donotdev/components";import{FEATURE_STATUS as Tt,USER_ROLES as Ke,SUBSCRIPTION_TIERS as kt}from"@donotdev/core";import{useRedirectGuard as Un,useNavigate as _n}from"@donotdev/ui/routing/hooks";import{RefreshCw as Lo}from"lucide-react";import"react";import{cn as Dn}from"@donotdev/components";import{jsx as Ce}from"react/jsx-runtime";var Fn=({variant:e="fullPage",className:t})=>e==="inline"?Ce("div",{className:t,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:Ce(Lo,{className:"dndev-size-md",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}):Ce("div",{className:Dn("dndev-loading-overlay",t),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:Ce(Lo,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}),Mn=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Ce(Fn,{variant:e,className:t}),Bn=e=>Ce(Mn,{...e}),Ge=Bn;import{Fragment as No,jsx as z,jsxs as Io}from"react/jsx-runtime";var Hn=zn(()=>import("./CookieConsent-UVTR7CWW.js"));function Wn({auth:e,children:t,fallback:o=Ge}){let r=_n(),n=N("user"),a=N("can"),i=N("status"),[s,l]=On(!1),{shouldRedirect:c,redirectTo:d,isChecking:p}=Un({auth:e});return Po(()=>{let g=setTimeout(()=>{i===Tt.INITIALIZING&&l(!0)},5e3);return()=>clearTimeout(g)},[i]),Po(()=>{c&&d&&r(d,{replace:!0})},[c,d,r]),e===!1?z(No,{children:t}):c||p?z(Ge,{}):i===Tt.INITIALIZING&&s?z(Eo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Io("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[z("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),z("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."}),z("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===Tt.INITIALIZING?z(o,{}):e&&typeof e=="object"&&e.required&&!n&&a&&!a.navigate(e)?z(Eo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Io("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[z("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),z("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),z(Vn,{fallback:z("div",{children:"Loading consent..."}),children:z(Hn,{})})]})}):z(No,{children:t})}function $n(e){return N("can")?.navigate(e)??!1}var du=$n;function pu(){return N("user")?.role||Ke.GUEST}function uu(e){return N("user")?.role===e}function mu(){let e=N("user"),t=N("userSubscription"),o=N("loading");return{authenticated:!!e,role:e?.role,tier:t?.tier||"free",loading:o,userId:e?.id}}function gu(e,t){return r=>z(Wn,{auth:t,children:z(e,{...r})})}var fu={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:Ke.USER}),admin:()=>({required:!0,role:Ke.ADMIN}),tier:e=>({required:!0,tier:e}),pro:()=>({required:!0,tier:kt.PRO}),premium:()=>({required:!0,tier:kt.PREMIUM}),adminPro:()=>({required:!0,role:Ke.ADMIN,tier:kt.PRO}),custom:e=>({required:!0,validate:e})};import{ArrowLeft as pa,Lock as ua}from"lucide-react";import{Suspense as ma,lazy as ga}from"react";import{Card as fa,Button as va,Separator as ha,Stack as we,cn as ya}from"@donotdev/components";import{useTranslation as ba}from"@donotdev/core";import"@donotdev/core";import{useLocation as Sa,useBack as Ca}from"@donotdev/ui/routing/hooks";import{Suspense as la}from"react";import{cn as ca}from"@donotdev/components";import{Component as Gn}from"react";import{handleError as Kn}from"@donotdev/core";var Lt=class extends Gn{constructor(o){super(o);$e(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,r){Kn(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:r,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}},Ao=Lt;import{AlertTriangle as Yn,Home as qn,ArrowLeft as Zn,RotateCw as Jn,Copy as Qn,Check as Xn}from"lucide-react";import{useEffect as jn,useState as ea}from"react";import{Button as Ye,BUTTON_VARIANT as qe,Card as Ro,CARD_VARIANT as Do,Alert as ta,ALERT_VARIANT as oa,Stack as xe}from"@donotdev/components";import{handleError as ra,useTranslation as na}from"@donotdev/core";import{useLocation as aa,useBack as ia}from"@donotdev/ui/routing/hooks";import{jsx as V,jsxs as me}from"react/jsx-runtime";var sa=({error:e,resetError:t,componentStack:o,eventId:r})=>{let{t:n}=na("dndev"),[a,i]=ea(!1),s=ia(),c=aa()?.pathname||(typeof window<"u"?window.location.pathname:"/"),d=e instanceof Error?e.message:"Unknown error",p=e instanceof Error?e.stack:void 0,g=!1;jn(()=>{try{ra(e,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:c}})}catch{}},[e,c]);let m=async()=>{if(!p)return;let y=[`Error: ${d}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,r?`Event ID: ${r}`:null,`Path: ${c}`,"","Stack Trace:",p,o?`
|
|
2
2
|
Component Stack:`:null,o||null].filter(Boolean).join(`
|
|
3
|
-
`);try{await navigator.clipboard.writeText(y),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},u=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},v=()=>{try{s()}catch{typeof window<"u"&&window.history.back()}};return z("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:z(Lo,{variant:Po.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:pe(Se,{gap:"large",align:"center",className:"dndev-text-center",children:[z(Se,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:z(Pn,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),pe(Se,{children:[z("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:n("routeError.title","Something went wrong")}),z("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:n("routeError.description","We encountered an error while loading this page.")}),z(Bn,{variant:Mn.INFO,hideIcon:!0,children:z("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:n("routeError.dataSafe","Don't worry, your data is safe.")})})]}),r&&pe("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:[n("routeError.errorId","Error ID"),": ",r]}),g&&d&&pe(Lo,{variant:Po.MUTED,className:"dndev-w-full",children:[pe(Se,{direction:"row",align:"center",justify:"between",children:[z("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),z(We,{variant:Ke.GHOST,icon:a?Rn:An,onClick:m,disabled:a,children:a?n("routeError.copied","Copied"):n("routeError.copyDetails","Copy Details")})]}),z("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})]}),pe(Se,{className:"dndev-w-full",children:[z(We,{variant:Ke.DESTRUCTIVE,icon:En,onClick:u,fullWidth:!0,children:n("routeError.tryAgain","Try Again")}),pe(Se,{direction:"row",justify:"center",children:[z(T,{path:"/",children:z(We,{variant:Ke.DEFAULT,icon:Nn,fullWidth:!0,children:n("routeError.goHome","Go Home")})}),z(We,{variant:Ke.OUTLINE,icon:In,onClick:v,fullWidth:!0,children:n("routeError.goBack","Go Back")})]})]}),z("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:n("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},No=_n;import{jsx as Re}from"react/jsx-runtime";function Gn(e){return Re(Hn,{fallback:Re("div",{children:"Loading error fallback..."}),children:Re(No,{...e})})}var Ye=({variant:e="standard",density:t,className:o,children:r,centered:n=!0,gapFirst:a=!1})=>Re(ko,{level:"route",fallback:Gn,children:Re("div",{className:$n("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":n?"true":"false","data-gap-first":a?"true":void 0,children:r})});import{Fragment as ra,jsx as F,jsxs as De}from"react/jsx-runtime";var oa=qn(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function Zu({title:e,description:t,showBackButton:o=!0,onBack:r,className:n=""}){let{t:a}=jn(["auth","common"]),i=ea(),s=ta(),l=()=>{r?r():s()};return F(Ye,{variant:"docs",children:F(Ce,{align:"center",justify:"center",className:Xn("dndev-min-h-60",n),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:F(Zn,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:De(Ce,{children:[F(Ce,{justify:"center",children:F("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:F(Kn,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),F("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),F("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:De(Ce,{children:[De(Ce,{gap:"large",children:[F("div",{children:F("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),F(Yn,{fallback:F("div",{children:"Loading providers..."}),children:F(oa,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&De(ra,{children:[F(Qn,{}),F("div",{children:F(Jn,{onClick:l,className:"dndev-gap-sm",icon:Wn,children:a("common.back")})})]}),De(Ce,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[F("p",{children:a("auth.fallback.secure")}),F("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as na}from"lucide-react";import{Button as aa,BUTTON_VARIANT as ia,DISPLAY as sa}from"@donotdev/components";import{useOverlayStore as la,useTranslation as ca}from"@donotdev/core";import{jsx as da,jsxs as pa}from"react/jsx-runtime";var t1=({display:e=sa.AUTO,className:t,onOpen:o})=>{let{t:r}=ca("dndev"),n=la(l=>l.openCommandDialog),i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgentData?.platform??navigator.platform)?"\u2318K":"Ctrl+K",s=()=>{n(),o?.()};return pa(aa,{variant:ia.OUTLINE,display:e,icon:na,onClick:s,className:t,"aria-label":r("goTo.ariaLabel","Go to page"),children:[r("goTo.label","Go to"),da("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:i})]})};import{Suspense as ua,lazy as ma}from"react";import{useEventListener as ga,useOverlayStore as fa}from"@donotdev/core";import{jsx as Io}from"react/jsx-runtime";var va=ma(()=>import("./GoToDialog-CR4VOVXT.js")),ha=()=>{let e=fa(t=>t.openCommandDialog);return ga("keydown",t=>{if((t.metaKey||t.ctrlKey)&&t.key==="k"){let o=t.target;if(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable)return;t.preventDefault(),e()}},{target:document,options:{passive:!1,capture:!1}}),Io(ua,{fallback:null,children:Io(va,{})})},ya=ha;import{Search as ba}from"lucide-react";import{useCallback as Eo,useEffect as Sa,useState as Ca,useRef as xa}from"react";import{Stack as wa}from"@donotdev/components";import{useOverlayStore as Ct}from"@donotdev/core";import{useTranslation as Ta}from"@donotdev/core";import{jsx as qe,jsxs as Na}from"react/jsx-runtime";var ka=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),La=()=>{let{t:e}=Ta("dndev"),[t,o]=Ca(""),r=xa(null),n=Ct(s=>s.isCommandDialogOpen);Sa(()=>{n||o("")},[n]);let a=Eo(()=>{Ct.getState().openCommandDialog(t)},[t]),i=Eo(s=>{s.key==="Enter"&&(s.preventDefault(),Ct.getState().openCommandDialog(t))},[t]);return Na(wa,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[qe(ba,{className:"dndev-absolute dndev-size-md",style:{insetInlineStart:"0.75rem",opacity:.5},"aria-hidden":"true"}),qe("input",{ref:r,type:"text",value:t,onChange:s=>o(s.target.value),onFocus:a,onKeyDown:i,placeholder:e("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingInlineStart:"2.5rem",paddingInlineEnd:"5rem"},"aria-label":e("globalGoTo.ariaLabel","Search navigation")}),qe("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{insetInlineEnd:"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:ka?"\u2318K":"Ctrl+K"})})]})},Pa=La;import{MoreHorizontal as Ia,Link as Ao}from"lucide-react";import{useState as Ea,useEffect as Ro,useRef as Aa,useMemo as Ra}from"react";import{NavigationMenu as Do,NavigationMenuListPrimitive as Da,NavigationMenuItemPrimitive as Fo,Button as Fa,DropdownMenu as Ba,cn as Ze,DISPLAY as Ma}from"@donotdev/components";import{useTranslation as Oa}from"@donotdev/core";import{jsx as K,jsxs as xt}from"react/jsx-runtime";var Bo=({routes:e,vertical:t=!1,display:o=Ma.AUTO,overflowDetection:r=!1,showIcons:n=!0,className:a,style:i})=>{let{t:s}=Oa("dndev"),l=Y(),c=e??l,d=Aa(null),[p,g]=Ea(c.length),m=Ra(()=>c.map(u=>({label:u.label,path:u.path,icon:K(G,{icon:u.icon,fallback:Ao}),children:u.children?u.children.map(v=>({label:v.label,path:v.path,icon:K(G,{icon:v.icon,fallback:Ao})})):void 0})),[c]);if(Ro(()=>{if(!r||c.length===0||t)return;let u=()=>{let y=d.current;if(!y)return;let f=y.getBoundingClientRect(),x=y.querySelectorAll("[data-nav-item]"),b=y.querySelector("[data-more-button]"),C=0,k=b?.offsetWidth||0;for(let A=0;A<x.length;A++){let P=x[A];if(!P)break;if(P.getBoundingClientRect().right-f.left+(A===x.length-1&&b?k:0)<=f.width)C=A+1;else break}g(Math.max(0,C))},v=new ResizeObserver(u);return d.current&&v.observe(d.current),setTimeout(u,0),()=>v.disconnect()},[r,c.length,t]),Ro(()=>{r&&!t&&g(c.length)},[c.length,r,t]),c.length===0)return null;if(r&&!t){let u=Math.min(p,m.length),v=m.slice(0,u),y=m.slice(u);return K(Do,{className:Ze(a),style:i||{flex:1},children:xt(Da,{ref:d,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[v.filter(f=>f.path).map((f,x)=>K(Fo,{"data-nav-item":!0,children:xt(T,{path:f.path,className:Ze("dndev-interactive"),"data-role":"nav-trigger",children:[n&&f.icon,K("span",{className:"dndev-interactive-label",children:f.label})]})},f.path||x)),y.length>0&&K(Fo,{"data-more-button":!0,children:K(Ba,{trigger:K(Fa,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":s("navigation.more","More"),children:K(Ia,{className:"dndev-size-md"})}),items:y.filter(f=>f.path).map(f=>({label:f.label,children:xt(T,{path:f.path,className:Ze("dndev-interactive"),"data-role":"menu-item",children:[n&&f.icon,K("span",{className:"dndev-interactive-label",children:f.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return K(Do,{items:m,vertical:t,display:o,className:Ze(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:T})};import{Home as za,ArrowLeft as Va,Link as Ua}from"lucide-react";import{useMemo as _a}from"react";import{Button as wt,BUTTON_VARIANT as Tt,Stack as Fe,Text as kt}from"@donotdev/components";import{useTranslation as Ha}from"@donotdev/core";import{useLocation as $a,useNavigate as Ga}from"@donotdev/ui/routing/hooks";import{jsx as _,jsxs as Je}from"react/jsx-runtime";function Mo(){let{t:e}=Ha("dndev"),t=$a(),o=Ga(),r=Y(),n=_a(()=>r.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[r]),a=()=>{o("back")};return _(Ye,{variant:"docs",centered:!0,children:Je(Fe,{gap:"large",align:"center",justify:"center",children:[Je(Fe,{align:"center",children:[_(kt,{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"}),_(kt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),_(kt,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:e("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),t.pathname&&_("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:t.pathname})]}),n.length>0&&Je(Fe,{align:"center",children:[_("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:e("errors.notFound.suggestions","You might be looking for:")}),_(Fe,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:n.map(i=>_(T,{path:i.path,replace:!0,children:_(wt,{variant:Tt.OUTLINE,icon:_(G,{icon:i.icon,fallback:Ua}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),Je(Fe,{direction:"row",wrap:"wrap",justify:"center",children:[_(T,{path:"/",replace:!0,children:_(wt,{variant:Tt.DEFAULT,icon:za,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),_(wt,{variant:Tt.OUTLINE,icon:Va,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}import{useNavigate as xe,useBack as W1,useRefresh as K1,usePrefetch as Y1,useLocation as q1,useParams as Z1,useRouteParam as J1,useSearchParams as Q1,useMatch as X1,useQueryParams as j1,useRedirectGuard as em}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Lt,isClient as ue,isDev as Oo}from"@donotdev/core";var U=class{static getBrowserSupport(){if(!ue())return{svg:!0,webp:!1,avif:!1};let t=this.cache.get("browser-support");if(t)return t;let o={svg:!0,webp:!1,avif:!1};try{let r=document.createElement("canvas");r.width=1,r.height=1,o.webp=r.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let r=document.createElement("canvas");r.width=1,r.height=1,o.avif=r.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(t){let o=[];if(t==null)return o;if(typeof t=="string")o.push(t);else if(Array.isArray(t))for(let r of t)o.push(...this.extractStringValues(r));else if(typeof t=="object")for(let r of Object.values(t))o.push(...this.extractStringValues(r));return o}static assetExists(t){if(!ue())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return ue()&&Lt()?.assets?.mapping||null}static getLogoSvgContent(){return Lt()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let n=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,n),n}static directAssetCheck(t){if(!ue())return!1;try{let o=new Image;return o.src=t,!0}catch{return!1}}static resolveFaviconSet(){let t="favicon-set";if(this.cache.has(t))return this.cache.get(t);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",s={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(t,s),s}let r=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",n={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":r,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":r,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":r,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":r,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":r};return this.cache.set(t,n),n}static resolveFavicon(){let t=this.getAssetManifest();if(t?.favicon?.optimal)return t.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let r of o)if(this.assetExists(r))return r;return"/favicon.svg"}static clearCache(){this.cache.clear(),Oo()&&ue()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:ue()?Lt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};He(U,"cache",new Map);function nm(e){return U.resolveLogo(e)}function am(){return U.resolveFaviconSet()}Oo()&&(U.clearCache(),ue()&&window.addEventListener("DOMContentLoaded",()=>{U.clearCache()}));import*as Wa from"@donotdev/crud";var zo={forms:{},startSubmit:()=>{},setUploading:()=>{},setValidating:()=>{},setSubmitting:()=>{},setSuccess:()=>{},setError:()=>{},reset:()=>{},cleanup:()=>{},setIsDirty:(e,t)=>{},hasDirtyForms:()=>!1,getDirtyFormIds:()=>[],getStatus:()=>"idle",isLoading:()=>!1,getUploadProgress:()=>0,getError:()=>null,getIsDirty:()=>!1},we=Wa?.useFormStore,lm=typeof we=="function";function Ka(e){return we?we(e):e(zo)}Ka.getState=()=>we&&typeof we.getState=="function"?we.getState():zo;import{useMemo as Ya}from"react";function Qe(){let e=I("status"),t=I("isAvailable"),o=I("user");return Ya(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as qa from"@donotdev/billing";import{DEGRADED_BILLING_API as Za}from"@donotdev/core";var Pt=qa?.useStripeBilling;function Ja(e){return Za[e]}function Nt(e,t){return Pt?Pt(e,t):Ja(e)}var gm=typeof Pt=="function";function ym(){let e=I("user"),t=I("status"),o={user:e,status:t},r=Nt("status",o),n=Nt("isAvailable",o);return{shouldHide:!n,isLoading:r==="initializing",isReady:n&&r==="ready"}}import{DEGRADED_CRUD_API as Qa}from"@donotdev/core";import*as Xa from"@donotdev/crud";var It=Xa?.useCrud;function ja(){return Qa}function Cm(e,t={}){return It?It(e,t):ja()}var xm=typeof It=="function";import{DEGRADED_OAUTH_API as ei}from"@donotdev/core";import*as ti from"@donotdev/oauth";var Et=ti?.useOAuth;function oi(e){return ei[e]}function km(e){return Et?Et(e):oi(e)}var Lm=typeof Et=="function";import{CheckCircle as ri}from"lucide-react";import{List as ni}from"@donotdev/components";import{translateArray as ai}from"@donotdev/core";import{jsx as Vo}from"react/jsx-runtime";var ii=ri,si=16;function Am(e,t,o,r=ii,n=si){let a=r;return Vo(ni,{icon:a?Vo(a,{size:n}):void 0,items:ai(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}var li=/<script[\s\S]*?<\/script>/gi,ci=/<foreignObject[\s\S]*?<\/foreignObject>/gi,di=/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,pi=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,ui=/\s+(?:xlink:)?href\s*=\s*["']\s*data:(?!image\/(?:png|jpe?g|gif|webp|svg\+xml))[^"']*["']/gi;function Te(e){return e.replace(li,"").replace(ci,"").replace(di,"").replace(pi,"").replace(ui,"")}import{Fragment as Di,jsx as ie,jsxs as Fi}from"react/jsx-runtime";var Ho=()=>null,Ai=_o(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:Ho}}}),Ri=_o(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:Ho}}}),$o=()=>{let[e]=Xe.useState(!1),[t]=Xe.useState(!1),[o]=Xe.useState(!1),[r]=Xe.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:r,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}};Ni()&&import("@donotdev/auth").then(e=>{$o=e.useDeleteAccount}).catch(e=>{});var je=e=>{if(!e)return Be;if(typeof e=="function")return e;let t=e.replace(/['"]/g,""),o=hi[t];return o||Be},At=({loginPath:e,display:t=Ti.AUTO,"no-tooltip":o=!1,customItems:r=[],className:n,style:a})=>{let{t:i}=ki("dndev"),{shouldHide:s,isReady:l,isAuthenticated:c}=Qe(),d=Pi(),p=I("user"),g=I("signOut"),m=Ii("isLaptop"),u=Y(),v=Ei(),y=d.profilePath,f=d.authMenuItems||[],x=p?.role,b=$o(),C=()=>p&&(p.displayName||p.email?.split("@")[0])||"User",k=()=>C().split(" ").map(S=>S.charAt(0)).slice(0,2).join("").toUpperCase(),A=()=>{if(!p)return i("auth.userMenu",{defaultValue:"User menu"});let h=[C()];return p.email&&h.push(p.email),x&&x!=="guest"&&h.push(`Role: ${x}`),h.join(`
|
|
4
|
-
`)},P=
|
|
5
|
-
${p.email}`:""}`}),disabled:!0}),y&&h.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:mi,onClick:()=>v(y)}),f.forEach(S=>{let L=u.find(R=>R.path===S.path),E=S.label||L?.label||S.path.split("/").pop()||"Menu",D=S.icon?je(S.icon):L?.icon&&(typeof L.icon=="string"||typeof L.icon=="function")?je(L.icon):Be;h.push({label:E,icon:D,onClick:()=>v(S.path)})}),r.forEach(S=>{if(S.path){let L=u.find(R=>R.path===S.path),E=S.label||L?.label||S.path.split("/").pop()||"Menu",D=S.icon?je(S.icon):Be;h.push({label:E,icon:D,onClick:()=>v(S.path),disabled:S.disabled,style:S.style})}else if(S.onClick){let L=S.icon?je(S.icon):Be;h.push({label:S.label,icon:L,onClick:S.onClick,disabled:S.disabled,style:S.style})}}),h.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:vi,onClick:b.startDeleteFlow,variant:"destructive"}),h.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:gi,onClick:()=>g(),variant:"destructive"}),h},[y,f,r,g,b,i,u,m,p,x,C,v]);return Li().length===0||s||!l||!c?null:Fi(Di,{children:[ie(Uo,{fallback:null,children:ie(Ai,{open:b.showPasswordDialog,isLoading:b.isDeleting,error:b.error,onReauth:h=>b.confirmDelete(h),onCancel:b.cancel})}),ie(Uo,{fallback:null,children:ie(Ri,{open:b.showConfirmDialog,isLoading:b.isDeleting,error:b.error,onConfirm:()=>b.confirmDelete(),onCancel:b.cancel})}),ie(xi,{trigger:ie(Si,{variant:Ci.OUTLINE,icon:p?ie(bi,{src:p.photoURL??void 0,fallback:k(),alt:C(),style:{margin:"-4px 0"}}):fi,display:t,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&m&&p?A():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:n,style:a,children:C()}),items:P,contentAlign:"end"})]})};import{jsx as B}from"react/jsx-runtime";var Ko=()=>null;function et({display:e,signInLabel:t,className:o,style:r,children:n,...a}){return B(Oi,{variant:zi.OUTLINE,icon:Bi,display:e,tooltip:t,className:o,style:r,...a,children:n??t})}var Wi=Wo(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:Ko}}}),Go=Wo(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:Ko}}}),Dt=({display:e=_i.AUTO,className:t,style:o})=>{let{t:r}=Hi("dndev"),{shouldHide:n,isLoading:a,isReady:i,isAuthenticated:s}=Qe(),l=$i(),c=Gi(),[d,p]=Mi(!1),g=l.loginPath,m=r("auth.signIn",{defaultValue:"Sign In"}),u=r("auth.loading",{defaultValue:"Loading..."}),v=c.includes("password")||c.includes("emailLink");if(n||!i)return null;if(!s){if(g!==void 0)return B(T,{path:g,prefetch:!0,children:B(et,{display:e,signInLabel:m,className:t,style:o})});let y=c[0];return v?B(Ui,{trigger:B(et,{display:e,signInLabel:m,className:t,style:o}),title:m,open:d,onOpenChange:p,"data-content-size":"form",children:B(Rt,{fallback:B("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:u}),children:B(Go,{spacing:"medium",onSuccess:()=>p(!1)})})}):c.length>1?B(Vi,{trigger:B(et,{display:e,signInLabel:m,className:t,style:o}),children:B(Rt,{fallback:B("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:u}),children:B(Go,{spacing:"tight"})})}):B(Rt,{fallback:B(et,{display:e,signInLabel:m,className:t,style:o,disabled:a,tooltip:a?u:m,children:a?u:m}),children:B(Wi,{partnerId:y,display:e,className:t,style:o})})}return B(At,{display:e,loginPath:g,className:t,style:o})};import{RefreshCw as Ki}from"lucide-react";import{cn as Yi}from"@donotdev/components";import{jsx as Yo,jsxs as Ji}from"react/jsx-runtime";var qi=({className:e})=>Ji("div",{className:Yi("dndev-loading-overlay",e),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:[Yo(Ki,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),Yo("span",{className:"dndev-sr-only",children:"Loading..."})]}),Zi=qi;import{AlertCircle as Qi,RefreshCw as Xi,Mail as ji,Cookie as es}from"lucide-react";import{Card as ts,Button as Ft,BUTTON_VARIANT as Bt,Stack as qo}from"@donotdev/components";import{useTranslation as os}from"@donotdev/core";import{jsx as Me,jsxs as tt}from"react/jsx-runtime";function rs({featureName:e,title:t,description:o,showReviewCookies:r=!1,showContactSupport:n=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:s,onReviewCookies:l,customActions:c,className:d=""}){let{t:p}=os("ui"),g=o||p("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),m=()=>{if(l)l();else{let v=new CustomEvent("openCookieConsent");window.dispatchEvent(v)}},u=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return tt(ts,{className:d,title:tt(qo,{direction:"row",align:"center",gap:"tight",children:[Me(Qi,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:g,children:[" ",tt("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(r||n||a||c)&&tt(qo,{direction:"row",wrap:"wrap",gap:"tight",children:[r&&Me(Ft,{variant:Bt.OUTLINE,onClick:m,icon:es,children:p("featureDisabled.reviewCookies","Review Cookies")}),n&&Me(Ft,{variant:Bt.OUTLINE,onClick:u,icon:ji,children:p("featureDisabled.contactSupport","Contact Support")}),a&&Me(Ft,{variant:Bt.OUTLINE,onClick:s,icon:Xi,children:p("featureDisabled.retry","Retry")}),c]}),Me("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:p("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var ns=rs;import{cn as as}from"@donotdev/components";import{jsx as q,jsxs as gs}from"react/jsx-runtime";var te=({state:e="loading",message:t,show:o=!0,className:r,showSpinner:n=!1,spinnerSize:a="md"})=>{if(!o)return null;let s=t||(c=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[c]||"Loading...")(e),l={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return gs("div",{className:as(r),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":s,children:[n&&q("div",{style:{...l[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),q("span",{style:{fontWeight:500},children:s})]})},is=({message:e="Loading...",...t})=>q(te,{state:"loading",message:e,...t}),ss=({message:e="Processing your request...",...t})=>q(te,{state:"processing",message:e,...t}),ls=({message:e="Almost there...",...t})=>q(te,{state:"almost-done",message:e,...t}),cs=({message:e="Complete!",...t})=>q(te,{state:"complete",message:e,...t}),ds=({showSpinner:e=!0,...t})=>q(te,{state:"processing",message:"Saving your changes...",showSpinner:e,...t}),ps=({showSpinner:e=!0,fileName:t,...o})=>q(te,{state:"processing",message:t?`Uploading ${t}...`:"Uploading file...",showSpinner:e,...o}),us=({showSpinner:e=!0,query:t,...o})=>q(te,{state:"processing",message:t?`Searching for "${t}"...`:"Searching...",showSpinner:e,...o}),ms=({showSpinner:e=!0,...t})=>q(te,{state:"loading",message:"Connecting to server...",showSpinner:e,...t}),ot=te;import{cn as fs}from"@donotdev/components";import{Fragment as Zo,jsx as se,jsxs as Jo}from"react/jsx-runtime";var vs=({show:e=!1,backdrop:t=!0,backdropBlur:o=!0,className:r,children:n,message:a,showSpinner:i=!0,spinnerSize:s="lg",preventClicks:l=!0,zIndex:c="var(--z-modal)"})=>{if(!e)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 se("div",{className:fs("dndev-loading-overlay",d,r),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:l?"auto":"none",...d?{}:{zIndex:c}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:se("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:n||Jo(Zo,{children:[i&&se("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:s==="sm"?"2rem":s==="md"?"3rem":"4rem",height:s==="sm"?"2rem":s==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&se(ot,{...a})]})})})};var hs=({show:e=!1,backdrop:t=!1,backdropBlur:o=!1,className:r,...n})=>se("div",{className:r,style:{position:"absolute",inset:0,display:e?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:se("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:n.children||Jo(Zo,{children:[se("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"}),n.message&&se(ot,{...n.message})]})})}),ys=vs;import{cn as bs}from"@donotdev/components";import{jsx as Qo}from"react/jsx-runtime";var Ss=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Qo("div",{className:bs(t),style:{display:"flex",alignItems:"center",justifyContent:"center",...e==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:Qo("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...e==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),Cs=Ss;import{Lock as rt,Shield as Xo}from"lucide-react";import{useEffect as Mt,useRef as jo,useCallback as xs}from"react";import{Portal as ws,Spinner as Ts,Stack as ks,Text as Oe,Button as Ls}from"@donotdev/components";import{useTranslation as Ps,useOverlay as oe}from"@donotdev/core";import{jsx as Z,jsxs as tr}from"react/jsx-runtime";var er={connecting:0,preparing:2e3,redirecting:5e3},Ns=1e4;function Is(e,t){return t==="none"?null:t==="shield"?Xo:t==="lock"?rt:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?rt:e.startsWith("oauth-")||e.startsWith("auth-")?Xo:rt:rt}function Es(e){return e||"default"}function As(){let{t:e}=Ps("dndev"),t=oe("isRedirectOverlayOpen"),o=oe("redirectOperation"),r=oe("redirectPhase"),n=oe("showCancelButton"),a=oe("redirectConfig"),i=oe("redirectStartTime"),s=oe("setRedirectPhase"),l=oe("setShowCancelButton"),c=oe("hideRedirectOverlay"),d=jo([]),p=jo(null),g=xs(()=>{c()},[c]);if(Mt(()=>{if(!t||!i)return;let C=a?.cancelTimeout??Ns,k=Date.now()-i;d.current.forEach(clearTimeout),d.current=[],p.current&&(clearTimeout(p.current),p.current=null);let A=(w,h)=>{let S=Math.max(0,h-k);if(S>0){let L=setTimeout(()=>{s(w)},S);d.current.push(L)}else s(w)};A("preparing",er.preparing),A("redirecting",er.redirecting);let P=Math.max(0,C-k);return p.current=setTimeout(()=>{l(!0),s("timeout")},P),()=>{d.current.forEach(clearTimeout),d.current=[],p.current&&(clearTimeout(p.current),p.current=null)}},[t,i,a?.cancelTimeout,s,l]),Mt(()=>{if(!t)return;let C=()=>{c()};return window.addEventListener("popstate",C),()=>window.removeEventListener("popstate",C)},[t,c]),Mt(()=>{if(!t)return;let C=()=>{};return document.addEventListener("visibilitychange",C),()=>document.removeEventListener("visibilitychange",C)},[t]),!t)return null;let m=Es(o),u=a?.title??e(`redirectOverlay.${m}.title`,{defaultValue:e("redirectOverlay.default.title")}),v=a?.message??e(`redirectOverlay.${m}.message`,{defaultValue:e("redirectOverlay.default.message")}),y=a?.subtitle??e(`redirectOverlay.${m}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),f=e(`redirectOverlay.${m}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),x=e(`redirectOverlay.phases.${r}`),b=Is(o,a?.icon);return Z(ws,{children:Z("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":f,style:{zIndex:"var(--z-overlay, 9999)"},children:tr("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[tr(ks,{direction:"row",align:"center",children:[b&&Z(b,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),Z(Ts,{variant:"primary"})]}),Z(Oe,{as:"h3",style:{color:"var(--foreground)",margin:0},children:u}),Z(Oe,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:x}),Z(Oe,{variant:"muted",level:"small",style:{opacity:.8},children:v}),Z(Oe,{variant:"muted",level:"small",style:{opacity:.6},children:y}),Z(Oe,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),n&&Z(Ls,{variant:"ghost",onClick:g,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as Ot,useState as or}from"react";import{cn as Rs}from"@donotdev/components";import{jsx as rr}from"react/jsx-runtime";var Ds=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:r=2e3,className:n,show:a=!0})=>{let[i,s]=or(0),[l,c]=or(!1);Ot(()=>{if(!e||!o||t!==void 0)return;c(!0),s(0);let p=Date.now(),g=setInterval(()=>{let m=Date.now()-p,u=Math.min(m/r*90,90);s(u)},16);return()=>{clearInterval(g)}},[e,o,t,r]),Ot(()=>{t!==void 0&&c(t>0&&t<100)},[t]),Ot(()=>{if(!e){let p=setTimeout(()=>{c(!1),s(0)},300);return()=>clearTimeout(p)}},[e]);let d=t??i;return!a||!l?null:rr("div",{className:Rs(n),style:{position:"fixed",insetInlineStart:0,insetInlineEnd: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:rr("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:e?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},Fs=Ds;import{cn as nt,Stack as Bs}from"@donotdev/components";import{jsx as ze,jsxs as Vg}from"react/jsx-runtime";var Ms=({variant:e="text",width:t,height:o,lines:r=1,show:n=!0,className:a,animation:i="pulse",style:s})=>{if(!n)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))"}},c=()=>{let d={};return t&&(d.width=typeof t=="number"?`${t}px`:t),o&&(d.height=typeof o=="number"?`${o}px`:o),d};return e==="text"?ze(Bs,{gap:"tight",children:Array.from({length:r}).map((d,p)=>ze("div",{className:nt("dndev-skeleton",a),style:{...l,height:"var(--gap-md)",width:p===r-1?"75%":"100%",...c(),...s}},p))}):e==="circular"?ze("div",{className:nt("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...c(),...s}}):e==="rectangular"?ze("div",{className:nt("dndev-skeleton",a),style:{...l,width:t||"100%",height:o||"200px",...c(),...s}}):ze("div",{className:nt("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...c(),...s}})};var Os=Ms;import{Card as zs,IconBox as Vs,Stack as Us,Text as zt,renderCardContent as _s}from"@donotdev/components";import{jsx as J,jsxs as nr}from"react/jsx-runtime";var Hs=({icon:e,title:t,subtitle:o,content:r,href:n,variant:a,elevated:i,onClick:s,className:l,footer:c,style:d,clickable:p,...g})=>{let m=_s(r),y=`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":""}`,f={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},x={...f,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},b={...f,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},C=e?nr(Us,{direction:"row",align:"center",style:{width:"100%"},children:[J(Vs,{icon:e}),J(zt,{as:"div",level:"h3",style:x,children:t})]}):J(zt,{as:"div",level:"h3",style:x,children:t}),k=J(zs,{variant:a,elevated:i,onClick:s,className:l,"data-clickable":n||s||p?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...d},...g,children:nr("div",{style:{display:"grid",gridTemplateRows:y,gap:"var(--gap-md)",width:"100%"},children:[J("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:C}),J("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:J(zt,{as:"div",level:"body",style:b,children:o})}),J("div",{children:m}),c&&J("div",{children:c})]})});return n&&!s?J(T,{path:n,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:k}):k},$s=Hs;import{useState as el}from"react";import{Bento as tl,Card as ol,Section as rl,Stack as nl,Text as al,TONE as il,cn as sl}from"@donotdev/components";var Gs='<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>',Ws='<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>',Ks='<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>',Ys='<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>',qs='<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>',Zs='<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>',Js='<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>',Qs='<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>',Xs='<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>',js='<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>',Vt={bun:{svg:`data:image/svg+xml,${encodeURIComponent(js)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(Gs)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(Ws)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(Ks)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(Ys)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(qs)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(Zs)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(Js)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(Qs)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(Xs)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as me,jsxs as pl}from"react/jsx-runtime";function ll({techKey:e,variant:t}){let o=Vt[e],[r,n]=el(!1);if(!o)return null;let a=decodeURIComponent(o.svg.replace("data:image/svg+xml,","")),i=Te(a);return me(ol,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":r,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:pl(nl,{direction:"column",align:"center",gap:"tight",children:[me("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:i}}),me(al,{as:"span",level:"small",children:o.name})]})})}function cl({title:e,techs:t,cols:o=3,columns:r,gap:n="medium",separator:a=!1,tone:i=il.GHOST,align:s,collapsible:l,open:c,onOpenChange:d,defaultOpen:p,className:g}){let m=r||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),u=f=>{if(f==="long")return{cols:2,rows:1};if(f==="high")return{cols:1,rows:2};if(f==="huge")return{cols:2,rows:2}},v=t.filter(f=>Vt[f.name]).map(f=>({id:f.name,content:me(ll,{techKey:f.name,variant:f.variant}),span:u(f.size)})),y=me(tl,{items:v,columns:m,gap:n,ariaLabel:"Technology stack"});return me(rl,{title:e,separator:a,tone:i,align:s,collapsible:l,open:c,onOpenChange:d,defaultOpen:p,className:sl("dndev-tech-bento",g),children:me("div",{className:"dndev-tech-bento-grid",children:y})})}var dl=cl;import{Suspense as ul,lazy as ml}from"react";import{useConsent as ar}from"@donotdev/core";import{jsx as ir}from"react/jsx-runtime";var gl=ml(()=>import("./CookieConsent-UVTR7CWW.js"));function gf(){let e=ar("hasConsented"),t=ar("showBanner");return e&&!t?null:ir(ul,{fallback:null,children:ir(gl,{})})}import{Button as sr,ScrollArea as fl}from"@donotdev/components";import{cn as lr}from"@donotdev/components";import{jsx as re,jsxs as vl}from"react/jsx-runtime";function bf({content:e,cta:t,align:o="center",justify:r="center",disableScrollArea:n=!1,contentVariant:a="narrow",contentClassName:i,ctaClassName:s}){let c=a==="narrow"?a==="narrow"&&re("div",{className:"dndev-game-container__content-narrow",children:e}):e,d=n?re("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:c}):re(fl,{className:"dndev-game-container__scroll",children:c});return vl("div",{className:"dndev-game-container",children:[re("div",{className:lr("dndev-game-container__content",i),"data-align":o,"data-justify":r,"data-content-variant":a,children:re("div",{className:"dndev-game-container__scroll-wrapper",children:d})}),t&&re("div",{className:lr("dndev-game-container__cta",s),children:Array.isArray(t)?re("div",{className:"dndev-game-container__cta-buttons",children:t.map((p,g)=>re(sr,{onClick:p.onClick,disabled:p.disabled??!1,variant:p.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:p.label},g))}):re(sr,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as hl,Suspense as yl,lazy as bl}from"react";import{jsx as Ut}from"react/jsx-runtime";var cr=new Set,dr=new Map;function Sl(e,t){let o=dr.get(e);if(o)return o;let r=t[e];if(!r)return null;let n=bl(r);return dr.set(e,n),n}function wf({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:r=null}){hl(()=>{if(o&&!cr.has(o)){cr.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let n=t?Sl(t,e):null;return!t||!n?null:Ut("div",{style:{height:"100%"},children:Ut(yl,{fallback:r,children:Ut(n,{})})})}import{cn as Cl,DISPLAY as _t}from"@donotdev/components";import{useAppConfig as pr}from"@donotdev/core";import{jsx as at,jsxs as Tl}from"react/jsx-runtime";var xl=({display:e=_t.AUTO,linkToHome:t=!0,className:o})=>{let r=pr("name"),a=pr("shortName")||r||"App",i=U.getLogoSvgContent(),s=U.resolveLogo(),l=e===_t.FULL||e===_t.AUTO,c=i?at("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Te(i)}}):U.assetExists(s)?at("img",{src:s,alt:a,className:"app-branding-logo"}):null,d=l&&at("span",{className:"app-branding-title","data-display":e,children:a}),p=Tl("div",{className:Cl("app-branding",o),"data-display":e,children:[c,d]});return t?at(T,{path:"/",className:"app-branding-link",children:p}):p},wl=xl;import{cn as ur}from"@donotdev/components";import{useAppConfig as mr}from"@donotdev/core";import{jsx as fr}from"react/jsx-runtime";var gr={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"}},kl=({alt:e,size:t="header",className:o})=>{let r=mr("name"),n=mr("shortName"),a=e||r||n||"App",i=U.getLogoSvgContent(),s=U.resolveLogo(),l=typeof t=="string"&&t in gr?gr[t]:typeof t=="string"?{}:{width:t,height:t};return i?fr("div",{className:ur("app-icon-header",o),style:{display:"inline-flex",...l},role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Te(i)}}):fr("img",{src:s,alt:a,className:ur(o),style:{objectFit:"contain",...l}})},Ll=kl;import{cn as vr}from"@donotdev/components";import{useAppConfig as hr,useBreakpoint as Pl}from"@donotdev/core";import{jsx as yr}from"react/jsx-runtime";var Nl=({title:e,className:t,linkToHome:o=!0})=>{let r=Pl("isMobileOrTablet"),n=hr("name"),a=hr("shortName"),i=e||r&&a||n||"App",s=yr("div",{className:vr("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?yr(T,{path:"/",className:vr("dndev-inline-block",t),children:s}):s},Il=Nl;import{ChevronRight as Bl}from"lucide-react";import{useMemo as Ml}from"react";import{cn as Ol}from"@donotdev/components";import{useTranslation as zl}from"@donotdev/core";import{useLocation as Vl}from"@donotdev/ui/routing/hooks";import{useMemo as br}from"react";import{useNavigationStore as Kf,getRoutes as El,getRouteManifest as Yf}from"@donotdev/core";function Al(){return br(()=>{try{let e=El();return!e||e.length===0?[]:Rl(e)}catch{return[]}},[])}function Sr(){let e=Al();return br(()=>e.flatMap(t=>t.routes),[e])}function Rl(e){let t=new Map;return e.forEach(o=>{let r=typeof o.path=="string"?o.path:String(o.path);if(!r||r==="undefined"||r==="null")return;let n=o.meta?.entity||Dl(r)||"other",a={path:r,label:o.meta?.title||Fl(r),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(n)||t.set(n,{label:n.charAt(0).toUpperCase()+n.slice(1),routes:[]}),t.get(n)?.routes.push(a)}),Array.from(t.values())}function Dl(e){return e.split("/").filter(Boolean)[0]||null}function Fl(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):"Home"}import{jsx as Ve,jsxs as Hl}from"react/jsx-runtime";var Ul=({items:e,separator:t=Bl,showHome:o=!0,homeHref:r="/",variant:n="default",className:a})=>{let{t:i}=zl("dndev"),s=Vl(),l=Sr(),c=Ml(()=>new Set(l.map(g=>g.path)),[l]),d=e||(()=>{let g=s.pathname.split("/").filter(Boolean),m=[],u="";return g.forEach(v=>{u+=`/${v}`;let y=v.split("-").map(x=>x.charAt(0).toUpperCase()+x.slice(1)).join(" "),f=c.has(u)?u:void 0;m.push({label:y,href:f})}),m})(),p=o?[{label:i("navigation.home","Home"),href:r},...d]:d;return n==="smart"&&s.pathname.split("/").filter(Boolean).length<2?null:Ve("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:Ol("breadcrumbs",a),children:p.map((g,m)=>{let v=m===p.length-1||!g.href;return Hl("span",{className:"breadcrumb-item",children:[m>0&&Ve(t,{className:"dndev-size-md separator"}),g.icon&&Ve(g.icon,{className:"dndev-size-md icon"}),g.href&&!v?Ve(T,{path:g.href,className:"breadcrumb-link",children:g.label}):Ve("span",{className:"breadcrumb-label",children:g.label})]},m)})})},_l=Ul;import{useTranslation as $l,maybeTranslate as Cr,useLayout as Ht,useAppConfig as Gl}from"@donotdev/core";import{jsx as ke,jsxs as Kl}from"react/jsx-runtime";var Wl=({asLink:e=!1,className:t})=>{let o=Gl("app"),r=Ht("gameTitle"),n=Ht("gameSubtitle"),a=Ht("gameNamespace"),{t:i}=$l(a||"dndev"),s=Cr(i,r??void 0),l=Cr(i,n??void 0),c=o?.name||"Game";if(s)return ke("div",{className:t,children:Kl("div",{style:{textAlign:"center"},children:[ke("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),l&&ke("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l})]})});let d=ke("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c});return e?ke(T,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:p=>p.currentTarget.style.color="var(--primary)",onMouseLeave:p=>p.currentTarget.style.color="var(--foreground)",children:c}):ke("div",{className:t,children:d})};import{Trash2 as Yl}from"lucide-react";import{useState as xr}from"react";import{Button as ql,BUTTON_VARIANT as Zl,Checkbox as Jl,Stack as $t,useToast as Ql}from"@donotdev/components";import{useTranslation as Xl}from"@donotdev/core";import{useRefresh as jl}from"@donotdev/ui/routing/hooks";import{jsx as it,jsxs as wr}from"react/jsx-runtime";function ec(){let{t:e}=Xl("dndev"),{toast:t}=Ql(),[o,r]=xr(!1),n=jl(),[a,i]=xr({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),s=async()=>{try{r(!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 d=await indexedDB.databases();await Promise.all(d.map(async p=>{if(p.name){let g=indexedDB.deleteDatabase(p.name);await new Promise((m,u)=>{g.onsuccess=()=>m(void 0),g.onerror=()=>u(g.error)})}}))}l.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let d=globalThis.openDatabase("","","","");d&&d.transaction&&d.transaction(p=>{p.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,m)=>{for(let u=0;u<m.rows.length;u++){let v=m.rows.item(u).name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(v)&&g.executeSql(`DROP TABLE IF EXISTS ${v}`)}})}),l.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let d=await caches.keys();await Promise.all(d.map(async p=>{try{await caches.delete(p)}catch{}})),l.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let d=await navigator.serviceWorker.getRegistrations();await Promise.all(d.map(async p=>{try{await p.unregister()}catch{}})),l.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(d=>{let p=d.indexOf("="),g=p>-1?d.substr(0,p):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}`}),l.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),l.push("Memory Cache")}catch{}let c=l.length>0?e("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:l.join(", ")}):e("settings.clearCache.noItemsCleared","No cache items were cleared");t("success",c),l.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:n()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{r(!1)}};return wr($t,{children:[it($t,{children:Object.entries(a).map(([l,c])=>wr($t,{direction:"row",align:"center",gap:"tight",children:[it(Jl,{id:l,checked:c,onCheckedChange:d=>i(p=>({...p,[l]:!!d}))}),it("label",{htmlFor:l,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:e(`settings.clearCache.${l}`,l.charAt(0).toUpperCase()+l.slice(1))})]},l))}),it(ql,{variant:Zl.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:s,icon:Yl,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var Gt=ec;import{DropdownMenu as nc,Button as Wt,Stack as ac}from"@donotdev/components";import{Link as tc}from"lucide-react";import{navigationMenuTriggerStylePrimitive as oc}from"@donotdev/components";import{jsx as Tr,jsxs as rc}from"react/jsx-runtime";var st=({path:e,route:t,showIcons:o=!0})=>{let r=Y(),n=t??r.find(s=>s.path===e);if(!n)return null;let a=o&&!!n.icon,i=!!n.label;return rc(T,{path:n.path,className:oc(),...a&&!i&&{"data-display":"compact"},children:[o&&Tr(G,{icon:n.icon,fallback:tc}),Tr("span",{children:n.label})]})};import{jsx as ge}from"react/jsx-runtime";var ic=({navigation:e,className:t})=>ge(ac,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,r)=>o.routes&&o.routes.length>0?ge(nc,{trigger:ge(Wt,{icon:o.icon,children:o.label}),items:o.routes.map(n=>({label:n.label,children:ge(st,{route:n}),asChild:!!n.path})),contentAlign:"start"},o.label+r):o.path?ge(Wt,{icon:o.icon,"aria-label":o.label,render:({children:n,...a})=>ge(T,{path:o.path,...a,children:n}),children:o.label},o.label+r):ge(Wt,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+r))}),sc=ic;import{Card as lc,cn as cc}from"@donotdev/components";import{jsx as Kt}from"react/jsx-runtime";var dc=({languages:e,currentLanguage:t,onLanguageChange:o,className:r})=>Kt(lc,{className:cc("dndev-z-modal",r),style:{position:"fixed",bottom:"var(--gap-md)",insetInlineEnd:"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:Kt("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:n=>o?.(n.target.value),"aria-label":"Select language",children:e.map(n=>Kt("option",{value:n,children:n},n))})}),pc=dc;import{MoreHorizontal as uc}from"lucide-react";import{Button as mc,BUTTON_VARIANT as gc,DropdownMenu as fc}from"@donotdev/components";import{jsx as kr}from"react/jsx-runtime";var vc=({children:e,className:t})=>kr(fc,{trigger:kr(mc,{variant:gc.GHOST,icon:uc,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),hc=vc;import{MoreHorizontal as yc}from"lucide-react";import{Link as bc}from"lucide-react";import{DISPLAY as Ue,DropdownMenu as Sc,Button as Lr}from"@donotdev/components";import{cn as Cc}from"@donotdev/components";import{useBreakpoint as Pr,useTranslation as xc}from"@donotdev/core";import{jsx as fe}from"react/jsx-runtime";var wc=({className:e="",showIcons:t=!0,display:o=Ue.AUTO,path:r})=>{let{t:n}=xc("dndev"),a=Pr("isMobile"),i=Pr("isTablet"),s=Y(),l=ho(r??"");return r?l?fe(Lr,{variant:"ghost",display:o,icon:t?fe(G,{icon:l.icon,fallback:bc}):void 0,className:e,render:({children:d,...p})=>fe(T,{path:l.path,...p,children:d}),children:l.label}):null:(o===Ue.AUTO?a||i?Ue.COMPACT:Ue.FULL:o)===Ue.COMPACT?fe(Sc,{trigger:fe(Lr,{variant:"ghost",icon:yc,"aria-label":n("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:s.map(d=>({label:d.label,children:fe(st,{route:d,showIcons:t}),asChild:!0}))}):fe(Bo,{overflowDetection:!0,showIcons:t,className:Cc(e),style:{flex:1}})},Tc=wc;import{Bell as kc}from"lucide-react";import{useMemo as Lc,useEffect as Pc,useRef as Nc}from"react";import{Button as Ic,cn as Ec,toast as Ac,Stack as Rc}from"@donotdev/components";import{jsx as Yt}from"react/jsx-runtime";var Dc={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)"}}},Fc=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:r,onDropdownOpen:n,className:a,maxVisible:i=10,alwaysShow:s=!1,size:l="md",disabled:c=!1})=>{let d=Dc[l],p=Nc(new Set),g=Lc(()=>t===0?null:t>99?"99+":t.toString(),[t]),m=t>0||s;return Pc(()=>{e.forEach(u=>{if(!p.current.has(u.id)){p.current.add(u.id);let v=u.type==="error"?"error":u.type==="warning"?"warning":u.type==="success"?"success":"info";Ac({title:u.title,description:u.message,toastType:v,duration:0,onDismiss:()=>{p.current.delete(u.id),r&&r(u)}})}})},[e,r]),m?Yt("div",{className:Ec(a),style:{position:"relative"},children:Yt(Ic,{disabled:c,style:{...d.button,position:"relative"},onClick:()=>{n?.()},onFocus:u=>{u.currentTarget.style.outline="2px solid var(--ring)",u.currentTarget.style.outlineOffset="2px"},onBlur:u=>{u.currentTarget.style.outline="none"},"aria-label":`${t} notification${t!==1?"s":""}`,icon:kc,children:g&&Yt(Rc,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",insetInlineEnd:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...d.badge},"aria-hidden":"true",children:g})})}):null},Bc=Fc;import{Settings as Mc,Check as Oc}from"lucide-react";import*as lt from"lucide-react";import{Button as zc,BUTTON_VARIANT as Vc,DropdownMenu as Uc,Stack as _c,DISPLAY as Hc}from"@donotdev/components";import{useTranslation as $c}from"@donotdev/core";import{useLanguageSelector as Gc,useTheme as qt,Flag as Wc}from"@donotdev/core";import{jsx as le,jsxs as qc}from"react/jsx-runtime";function Kc({variant:e=Vc.OUTLINE}={}){let{t}=$c("dndev"),{languages:o,currentLanguage:r,changeLanguage:n,isLoading:a}=Gc(),i=qt("availableThemes"),s=qt("currentTheme"),l=qt("setTheme"),c=m=>{if(!m)return lt.Palette;let u=m.replace(/['"]/g,"");return lt[u]||lt.Palette},d=i.map(m=>{let u=c(m.meta?.icon),v=m.name===s;return{label:m.displayName||m.name,icon:u,onClick:()=>l(m.name),checked:v}}),p=o.map(m=>{let u=m.id===r;return{label:m.name,onClick:()=>n(m.id),disabled:a,checked:u,className:u?"bg-accent":void 0,iconEnd:u&&!a?Oc:void 0,children:qc(_c,{direction:"row",align:"center",gap:"tight",children:[le(Wc,{code:m.flagCode||m.id,title:`${m.name} flag`}),le("span",{children:m.name}),a&&u&&le("div",{style:{marginInlineStart:"auto"},children:le("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:t("auth.title","Authentication"),subContent:le(Dt,{display:Hc.COMPACT})},{label:t("settings.theme","Theme"),subItems:d},{label:t("settings.language","Language"),subItems:p},{label:t("settings.clearCache.title","Clear Cache"),subContent:le(Gt,{})}];return le(Uc,{trigger:le(zc,{variant:e,"aria-label":t("settings.title","Settings"),icon:Mc}),items:g,contentWidth:"14rem",contentAlign:"end"})}var Yc=Kc;import*as ct from"lucide-react";import{Button as Nr,BUTTON_VARIANT as Zc,DropdownMenu as Jc,DISPLAY as Qc}from"@donotdev/components";import{useTranslation as Xc}from"@donotdev/core";import{useTheme as Zt}from"@donotdev/core";import{jsx as Qt}from"react/jsx-runtime";var Jt=e=>{if(!e)return ct.Palette;let t=e.replace(/['"]/g,"");return ct[t]||ct.Palette},jc=({display:e=Qc.AUTO,"no-tooltip":t=!1})=>{let{t:o}=Xc("dndev"),r=Zt("availableThemes"),n=Zt("currentTheme"),a=Zt("setTheme");if(r.length<=1)return null;let i=r.find(f=>f.name===n)||r[0],s=r.length===2?r.find(f=>f.name!==i?.name)||r[0]:null,l=i?Jt(i.meta?.icon):null,c=s?Jt(s.meta?.icon):null,d=i?.displayName||i?.name||"Theme",p=s?.displayName||s?.name||"Theme",g=r.length===2&&s&&c,m=g?c:l,u=g?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:s?.displayName||s?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),v={variant:Zc.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:u,icon:m,display:e};if(g&&s)return Qt(Nr,{...v,onClick:()=>a(s.name),children:p});if(!i||!l)return null;let y=r.map(f=>{let x=Jt(f.meta?.icon),b=f.name===n;return{label:f.displayName||f.name,icon:x,onClick:()=>a(f.name),checked:b}});return Qt(Jc,{trigger:Qt(Nr,{...v,children:d}),items:y,contentWidth:"10rem"})},ed=jc;import{ExternalLink as td}from"lucide-react";import{getPlatformEnvVar as od}from"@donotdev/core";import{jsx as rd,jsxs as nd}from"react/jsx-runtime";var Xt=({className:e})=>{let o=od("APP_URL")==="https://donotdev.com";return nd("a",{href:o?"https://www.ambroise-park.com":"https://donotdev.com",target:"_blank",rel:"noopener noreferrer",className:e,style:{display:"inline-flex",alignItems:"center",gap:"var(--gap-sm)",fontSize:"var(--font-size-xs)"},children:[o?"AMBROISE-PARK":"DoNotDev",rd(td,{style:{width:"12px",height:"12px"},"aria-hidden":"true"})]})};import{cn as ad}from"@donotdev/components";import{useTranslation as id,useAppConfig as sd}from"@donotdev/core";import{jsxs as cd}from"react/jsx-runtime";var ld=({appName:e,year:t=new Date().getFullYear(),className:o})=>{let{t:r}=id("dndev"),n=sd("app"),a=e||n?.name||"App";return cd("span",{className:ad(o),style:{flexShrink:0,color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"},children:["\xA9 ",t," ",a,". ",r("footer.legal.allRightsReserved")]})};import{Stack as ud}from"@donotdev/components";import{useTranslation as md,maybeTranslate as gd,useAppConfig as fd}from"@donotdev/core";var dd=[{path:"#cookie-settings",label:"footer.legal.cookieSettings"},{label:"footer.legal.privacyPolicy",path:"/privacy"},{label:"footer.legal.termsOfService",path:"/terms"}],pd=e=>e?.legalLinks===null?[]:e?.legalLinks??dd,Ir=pd;import{jsx as Er,jsxs as hd}from"react/jsx-runtime";var vd=({app:e,direction:t="column",gap:o="tight"})=>{let{t:r}=md("dndev"),n=fd("app"),i=Ir((e||n||{}).footer),s={transition:"color var(--dur-fast) ease-out",textDecoration:"underline",textUnderlineOffset:"2px",color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"};return i.length===0?null:hd(ud,{direction:t,gap:o,align:"stretch",children:[i.map(l=>Er(T,{path:l.path,style:s,onMouseEnter:c=>c.currentTarget.style.color="var(--primary)",onMouseLeave:c=>c.currentTarget.style.color="var(--muted-foreground)",children:gd(r,l.label)},l.path)),Er(Xt,{})]})};import{useEffect as bd}from"react";import{checkLicense as Sd}from"@donotdev/core";var yd='<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>',Ar=`data:image/svg+xml,${encodeURIComponent(yd)}`;import{jsx as jt,jsxs as Rr}from"react/jsx-runtime";function Z0(){let e=Sd();return bd(()=>{e.isValid},[e.isValid]),e.isValid?null:Rr("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",insetInlineEnd:"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:t=>{t.currentTarget.style.opacity="1",t.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:t=>{t.currentTarget.style.opacity="0.9",t.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[jt("img",{src:Ar,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),Rr("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[jt("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),jt("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}import{useEffect as Cd,useState as eo,useMemo as xd}from"react";import{Stack as to,Spinner as wd}from"@donotdev/components";import{useTranslation as Dr,isFieldVisible as Td}from"@donotdev/core";import{useCrud as kd,DisplayFieldRenderer as Ld}from"@donotdev/crud";import{jsx as ve,jsxs as Nd}from"react/jsx-runtime";function Pd({entity:e,id:t,t:o,className:r="",loadingMessage:n,notFoundMessage:a,viewerRole:i,excludeFields:s}){let l=I("userRole"),c=i??l,{get:d,loading:p,data:g,error:m,isAvailable:u}=kd(e),[v,y]=eo(!1),[f,x]=eo(null),[b,C]=eo(null),{t:k}=Dr([e.namespace,"crud"]),{t:A}=Dr("crud"),P=o||k;Cd(()=>{if(!t){C(null),x(null),y(!1);return}if(!u||!d)return;let E=!1;return y(!0),x(null),d(t).then(D=>{E||(y(!1),D?(C(D),x(null)):(C(null),x(new Error("Entity not found"))))}).catch(D=>{E||(y(!1),x(D instanceof Error?D:new Error(String(D))),C(null))}),()=>{E=!0}},[t,d,u]);let w=g||b,h=m||f,S=p||v||!t,L=xd(()=>w?Object.entries(e.fields).filter(([E,D])=>{if(s?.includes(E)||!Td(D.visibility,c)||D.visibility==="hidden")return!1;let R=w[E];return!(R==null||typeof R=="string"&&R.trim()===""||Array.isArray(R)&&R.length===0||typeof R=="object"&&!Array.isArray(R)&&R!==null&&Object.keys(R).length===0)}):[],[e.fields,c,w,s]);return S?ve("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:r,children:ve(wd,{overlay:!0,"aria-label":n||A("form.loading",{defaultValue:"Loading..."})})}):h||!w?ve(to,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:r,children:Nd(to,{direction:"column",gap:"tight",children:[ve("h3",{style:{color:"var(--muted-foreground)"},children:a||A("errors.notFound",{defaultValue:`${e.name} not found`})}),h&&ve("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:h instanceof Error?h.message:String(h)})]})}):ve(to,{direction:"column",className:r,children:L.map(([E,D])=>ve(Ld,{name:E,config:D,value:w[E],t:P},E))})}import{RefreshCw as Id,Plus as Ed,Trash2 as Ad,Edit as Rd,Search as Dd}from"lucide-react";import{useMemo as Fd,useCallback as _e,useState as oo}from"react";import{DataTable as Bd,Button as ro,Stack as no,ActionButton as Md,Section as Fr,Input as Od}from"@donotdev/components";import{useTranslation as Br}from"@donotdev/core";import{translateFieldLabel as zd,useCrud as Vd,useCrudList as Ud,EntityFilters as _d,formatValue as Hd,useReferenceResolver as $d}from"@donotdev/crud";import{Fragment as Wd,jsx as ne,jsxs as dt}from"react/jsx-runtime";function Gd({entity:e,basePath:t,onClick:o,hideFilters:r=!1,pagination:n="auto",pageSize:a,queryOptions:i,exportable:s=!0}){let l=xe(),c=t??`/${e.collection}`,d=$d(e),[p,g]=oo(1),[m,u]=oo(a),[v,y]=oo(""),{data:f,items:x,processed:b,loading:C,mutate:k,effectiveMode:A}=Ud(e,{pagination:n,searchQuery:v,...i&&{queryOptions:i},...(n==="server"||n==="auto")&&{page:p,pageSize:m}}),{delete:P}=Vd(e),{t:w}=Br("crud"),{t:h}=Br([e.namespace,"crud"]),S=_e(async()=>{await k()},[k]),L=_e(V=>{l(`${c}/${V}`)},[c,l]),E=_e(V=>{o?o(V):l(`${c}/${V}`)},[c,l,o]),D=_e(()=>{l(`${c}/new`)},[c,l]),R=_e(async V=>{await P(V)},[P]),Le=Fd(()=>{let he=(e.listFields||Object.keys(e.fields)).map(X=>{let j=e.fields[X];if(!j)return null;let de=zd(X,j,h),Ne=j.type||"text";return{key:X,title:de,dataIndex:X,sortable:!0,filterable:!0,align:Ne==="number"||Ne==="range"?"end":"start",render:(Ie,Ee)=>Hd(Ie,j,h,{compact:!0,referenceData:d})}}).filter(Boolean);return he.unshift({key:"_actions",title:w("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(X,j)=>dt(no,{direction:"row",gap:"tight",align:"center",justify:"center",children:[ne(ro,{variant:"outline",icon:Rd,onClick:de=>{de.stopPropagation(),L(j.id)},"aria-label":w("edit",{defaultValue:"Edit"})}),ne(Md,{action:async()=>{await R(j.id)},confirmText:w("delete.confirm",{defaultValue:"Are you sure you want to delete this item?"}),confirmTitle:w("delete.title",{defaultValue:"Delete Item"}),loadingText:w("delete.loading",{defaultValue:"Deleting..."}),variant:"destructive",icon:Ad,"aria-label":w("delete",{defaultValue:"Delete"}),children:w("delete",{defaultValue:"Delete"})})]})}),he},[e,h,w,L,R]),Q=h("name",{defaultValue:e.name}),Pe=b.length;return dt(Wd,{children:[ne(Fr,{title:w("filters.title",{entity:Q,defaultValue:`Browse ${Q} - Filters`}),collapsible:!0,defaultOpen:!0,children:dt(no,{children:[dt(no,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[ne(Od,{placeholder:w("search.placeholder",{defaultValue:"Search..."}),value:v,onChange:V=>y(V.target.value),icon:Dd,className:"dndev-w-full"}),ne(ro,{icon:Id,variant:"outline",onClick:S,disabled:C,display:"compact","aria-label":w("refresh",{defaultValue:"Refresh"})}),ne(ro,{icon:Ed,onClick:D,display:"compact",children:w("addNew",{defaultValue:"Add New"})})]}),!r&&ne(_d,{entity:e,data:x,fieldsToFilter:e.listFields})]})}),ne(Fr,{title:C?w("results.title.fetching",{defaultValue:"Fetching..."}):w("results.title.count",{count:Pe,defaultValue:Pe===1?"Found 1 occurrence":`Found ${Pe} occurrences`}),collapsible:!0,defaultOpen:!0,children:ne(Bd,{data:b,columns:Le,sortable:!0,searchable:!1,pagination:!0,loading:C,onRowClick:V=>E(V.id),showingLabel:w("pagination.showing",{defaultValue:"Showing {{from}} to {{to}} of {{total}} entries"}),paginationPreviousLabel:w("pagination.previous",{defaultValue:"Previous"}),paginationNextLabel:w("pagination.next",{defaultValue:"Next"}),paginationItemsPerPagePlaceholder:w("pagination.itemsPerPagePlaceholder",{defaultValue:"Items per page"}),...a&&{pageSize:a},...A==="server"&&{currentPage:p,pageSize:m,total:f?.total,onPageChange:g,onPageSizeChange:u},exportable:s,exportFilename:`${e.collection}-export`,exportLabel:w("export",{defaultValue:"Export"})})})]})}import{Heart as Or}from"lucide-react";import{useMemo as zr,useCallback as Yd}from"react";import{Card as qd,Grid as Zd,Stack as ao,Text as Vr,Spinner as Jd,Section as Ur,Button as Qd}from"@donotdev/components";import{useTranslation as _r,getListCardFieldNames as Xd}from"@donotdev/core";import{useCrudCardList as jd,EntityFilters as ep,useEntityFavorites as tp,useCrudFilters as op}from"@donotdev/crud";import{CrudCard as Kd}from"@donotdev/crud";import{jsx as Mr}from"react/jsx-runtime";function pt({detailHref:e,onClick:t,...o}){let r=Mr(Kd,{...o,onClick:e?void 0:t});return e?Mr(T,{path:e,"aria-label":o.item?.id?`View ${o.item.id}`:void 0,children:r}):r}import{Fragment as np,jsx as H,jsxs as io}from"react/jsx-runtime";function rp({entity:e,basePath:t,onClick:o,cols:r=[1,2,3,4],staleTime:n=1e3*60*30,filter:a,hideFilters:i=!1,resultLabel:s,tone:l}){let c=xe(),d=t??`/${e.collection}`,{items:p,processed:g,loading:m}=jd(e,{staleTime:n}),{isFavorite:u,toggleFavorite:v,favoritesFilter:y}=tp({collection:e.collection}),{showFavoritesOnly:f,setShowFavoritesOnly:x}=op({collection:e.collection}),b=zr(()=>{let h=g;return f&&(h=h.filter(y)),a&&(h=h.filter(a)),h},[g,f,y,a]),{t:C}=_r([e.namespace,"crud"]),{t:k}=_r("crud"),A=Yd(h=>{o?o(h):c(`${d}/${h}`)},[d,c,o]),P=zr(()=>Xd(e),[e]),w=C("name",{defaultValue:e.name});return io(np,{children:[!i&&H(Ur,{title:k("filters.title",{entity:w,defaultValue:`Browse ${w} - Filters`}),collapsible:!0,defaultOpen:!0,tone:l,children:H(qd,{children:io(ao,{direction:"column",children:[H(Qd,{variant:f?"primary":"outline",icon:H(Or,{size:18}),onClick:()=>x(!f),children:f?k("favorites.showAll",{defaultValue:"Show All"}):k("favorites.showFavorites",{defaultValue:"Show Favorites"})}),H(ep,{entity:e,data:p,fieldsToFilter:P})]})})}),H(Ur,{title:m?k("results.title.fetching",{defaultValue:"Fetching..."}):s?s(b.length):k("results.title.count",{count:b.length,defaultValue:b.length===1?"Found 1 occurrence":`Found ${b.length} occurrences`}),collapsible:!0,defaultOpen:!0,tone:l,children:m?H(ao,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:H(Jd,{})}):b.length===0?io(ao,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[H(Vr,{level:"h3",style:{color:"var(--muted-foreground)"},children:k("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),H(Vr,{style:{color:"var(--muted-foreground)"},children:k("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):H(Zd,{cols:r,children:b.map(h=>{let S=u(h.id),L=o?void 0:`${d}/${h.id}`;return H(pt,{item:h,entity:e,detailHref:L,onClick:o?()=>A(h.id):void 0,renderActions:H(Or,{fill:S?"#ef4444":"#ffffff",stroke:S?"#ef4444":"var(--muted-foreground)",onClick:E=>{E.preventDefault(),E.stopPropagation(),v(h.id)},style:{cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":S?k("favorites.remove",{defaultValue:"Remove from favorites"}):k("favorites.add",{defaultValue:"Add to favorites"})})},h.id)})})})]})}import{useEffect as Hr,useId as ap,useMemo as ut,useState as ip}from"react";import{FormProvider as sp}from"react-hook-form";import{Badge as lp,Button as mt,DropdownMenu as cp,Grid as dp,Stack as pp,Spinner as up}from"@donotdev/components";import{hasRoleAccess as mp,useTranslation as $r}from"@donotdev/core";import{DisplayFieldRenderer as gp,FormFieldRenderer as fp,UploadProvider as vp,useEntityForm as hp,useUnsavedChangesWarning as yp,useFormStore as bp,useFieldConditions as Sp}from"@donotdev/crud";import{jsx as W,jsxs as gt}from"react/jsx-runtime";function so({entity:e,onSubmit:t,t:o,className:r="",submitText:n,loading:a=!1,defaultValues:i,submitVariant:s="primary",secondaryButtonText:l,secondaryButtonVariant:c="outline",onSecondarySubmit:d,viewerRole:p,operation:g=i?"edit":"create",formId:m,cancelText:u,cancelPath:v,successPath:y,onCancel:f,warnOnUnsavedChanges:x=!0,unsavedChangesMessage:b,hideVisibilityInfo:C=!1}){let k=xe(),A=I("userRole"),P=p??A,w=ap(),h=m??`entity-form-${e.name}-${w}`,{t:S}=$r([e.namespace,"crud"]),{t:L}=$r("crud"),E=o||S,R=!C&&(P==="admin"||P==="super"),Le=P==="user"||P==="admin"||P==="super",[Q,Pe]=ip(P==="admin"||P==="super"||P==="user"?P:"guest"),V={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},he=["guest","user","admin","super"],X={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},j=ut(()=>he.filter(N=>mp(P,N)).map(N=>({label:X[N],checked:Q===N,onClick:()=>Pe(N)})),[Q,P]),de=hp(e,{formId:h,operation:g,defaultValues:i,viewerRole:P,t:E}),{control:Ne,handleSubmit:lo,formState:{errors:co},fields:Ie,formStatus:Ee,uploadProgress:Ae,cleanup:po,isDirty:Zr,hasUserInteracted:Jr,resetForm:Qr}=de,ht=Zr&&Jr,uo=ut(()=>{if(!Le)return Ie;let N=he.indexOf(Q);return Ie.filter(({config:M})=>{let ee=M.visibility;return ee==="hidden"?!1:ee==="technical"?!0:he.indexOf(ee)<=N})},[Ie,Le,Q]),Xr=Sp(uo,Ne);Hr(()=>{h&&bp.getState().setIsDirty(h,ht)},[h,ht]),Hr(()=>po,[po]);let jr=ut(()=>b||L("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[b,L]);yp({isDirty:ht,enabled:x,message:jr});let en=()=>{Qr(),f?f():k(v||"back")},tn=async N=>{try{await t(N),k(y||"back")}catch{}},on=u!==null,mo=u??L("form.cancel",{defaultValue:"Cancel"}),go={gridColumn:"1 / -1",position:"sticky",bottom:0,backgroundColor:"var(--background)",borderTop:"1px solid var(--border)",paddingTop:"var(--gap-md)",paddingBottom:"var(--gap-md)",zIndex:10,marginTop:"var(--gap-lg)"},rn=a||g==="edit"&&!i,ae=ut(()=>Ee==="uploading"?{loading:!0,loadingText:Ae<100?L("form.uploading",{progress:Math.round(Ae),defaultValue:`Uploading ${Math.round(Ae)}%...`}):L("form.processing",{defaultValue:"Processing..."}),progress:Ae}:Ee==="validating"?{loading:!0,loadingText:L("form.validating",{defaultValue:"Validating..."})}:Ee==="submitting"?{loading:!0,loadingText:L("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[Ee,Ae,L]);return W(sp,{...de,children:W(vp,{formId:h,children:gt("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[rn&&W(up,{overlay:!0}),gt("form",{onSubmit:lo(tn),noValidate:!0,className:r,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[uo.map(({name:N,config:M,editable:ee})=>{let $=Xr[N];if($&&!$.visible)return null;let fo=$?{...M,...$.required&&M.validation?{validation:{...M.validation,required:!0}}:$.required?{validation:{required:!0}}:{}}:M,nn=ee&&!$?.disabled&&!$?.readonly,an=R&&M.visibility!=="guest",sn=M.visibility!=="hidden"?V[M.visibility]:void 0,ln=X[M.visibility]??M.visibility,vo=nn?W(fp,{name:N,config:fo,control:Ne,errors:co,t:E},N):W(gp,{name:N,config:fo,value:i?.[N],t:E},N);return an?gt("div",{style:{position:"relative"},children:[W(lp,{as:"span",variant:sn,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:ln}),vo]},N):vo}),(()=>{let N=[];if(on&&mo&&N.push(W(mt,{type:"button",onClick:en,disabled:ae.loading,variant:"outline",className:"dndev-w-full",children:mo},"cancel")),Le){let $=V[Q]||"muted";N.push(W(cp,{trigger:gt(mt,{type:"button",variant:$,disabled:ae.loading,className:"dndev-w-full",children:[L("visibility.preview",{defaultValue:"Preview"}),": ",X[Q]]}),items:j},"preview"))}l&&N.push(W(mt,{type:"button",onClick:()=>{if(d){let $=de.getValues();d($)}},loading:ae.loading,loadingText:ae.loadingText,progress:ae.progress,variant:c,className:"dndev-w-full",children:l},"secondary")),N.push(W(mt,{type:"submit",loading:ae.loading,loadingText:ae.loadingText,progress:ae.progress,variant:s,className:"dndev-w-full",children:n||L("form.submit",{defaultValue:"Submit"})},"submit"));let M=N.length;if(M===1)return W(pp,{direction:"column",gap:"tight",style:go,children:N[0]});let ee=M===2?"1fr 2fr":M===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr";return W(dp,{cols:["1fr",ee,ee,ee],gap:"tight",style:go,children:N})})()]})]})})})}import{Section as Cp}from"@donotdev/components";import{useCrudCardList as xp}from"@donotdev/crud";import{jsx as Gr}from"react/jsx-runtime";function wp({entity:e,queryOptions:t,title:o,basePath:r,cols:n=3,className:a}){let{items:i,loading:s}=xp(e,{queryOptions:t});if(!s&&i.length===0)return null;let l=r??`/${e.collection}`;return Gr(Cp,{title:o,gridCols:n,className:a,children:i.map(c=>Gr(pt,{item:c,entity:e,detailHref:`${l}/${c.id}`},c.id))})}import{Button as Tp,Stack as kp,Stepper as Lp}from"@donotdev/components";import{useTranslation as Pp}from"@donotdev/core";import{useEntityWorkflow as Np}from"@donotdev/crud";import{Fragment as Ep,jsx as ft,jsxs as Ap}from"react/jsx-runtime";function Ip({workflow:e,onComplete:t,onStepChange:o,defaultValues:r,viewerRole:n,children:a,className:i}){let{t:s}=Pp("crud"),l=Np(e,{onComplete:t,onStepChange:o,defaultValues:r});if(a)return ft(Ep,{children:a(l)});let{currentStep:c,currentStepIndex:d,visibleSteps:p,isFirst:g,isLast:m,isSubmitting:u,stepData:v}=l,y=p.map((f,x)=>({number:x+1,title:f.title,content:null}));return Ap(kp,{className:i,gap:"large",children:[ft(Lp,{steps:y,activeStep:d,showStepNumbers:!0,onStepChange:f=>{f<=d&&l.goToStep(f)}}),c.custom?c.custom(l.allData):c.entity?ft(so,{entity:c.entity,operation:"create",viewerRole:n,defaultValues:{...v[c.id],...!m&&{status:"draft"}},onSubmit:async f=>{await l.goNext(f)},submitText:m?s("workflow.submit",{defaultValue:"Submit"}):s("workflow.next",{defaultValue:"Next"}),cancelText:g?null:s("workflow.previous",{defaultValue:"Previous"}),onCancel:g?void 0:l.goPrevious,loading:u,warnOnUnsavedChanges:!1,hideVisibilityInfo:!0}):null,c.allowSkip&&!m&&ft(Tp,{variant:"ghost",onClick:l.skipStep,className:"dndev-w-full",children:s("workflow.skip",{defaultValue:"Skip this step"})})]})}import{createContext as Kr,useId as Rp,use as Wr}from"react";import{Controller as Dp,FormProvider as Fp,useFormContext as Bp}from"react-hook-form";import{Label as Mp,Slot as Op,cn as zp,Stack as Vp}from"@donotdev/components";import{jsx as ce}from"react/jsx-runtime";var Z3=Fp,Yr=Kr({}),J3=({...e})=>ce(Yr.Provider,{value:{name:e.name},children:ce(Dp,{...e})}),qr=Kr({}),Q3=({className:e,...t})=>{let o=Rp();return ce(qr.Provider,{value:{id:o},children:ce(Vp,{className:e,...t})})},vt=()=>{let e=Wr(Yr);if(!e||!e.name)return null;let t=Wr(qr);if(!t)return null;let{getFieldState:o,formState:r}=Bp(),n=o(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...n}},X3=({className:e,...t})=>{let o=vt();if(!o)return null;let{error:r,formItemId:n}=o;return ce(Mp,{className:zp(r&&"text-destructive",e),htmlFor:n,...t})},j3=({...e})=>{let t=vt();if(!t)return null;let{error:o,formItemId:r,formDescriptionId:n,formMessageId:a}=t;return ce(Op,{id:r,"aria-describedby":o?`${n} ${a}`:`${n}`,"aria-invalid":!!o,...e})},ev=({className:e,...t})=>{let o=vt();if(!o)return null;let{formDescriptionId:r}=o;return ce("p",{id:r,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},tv=({className:e,children:t,...o})=>{let r=vt();if(!r)return null;let{error:n,formMessageId:a}=r,i=n?String(n?.message):t;return i?ce("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var Up={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"},_p={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},uv={...Up,..._p},mv={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"},gv={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{wl as AppBranding,Ll as AppIcon,Zi as AppLoading,Il as AppTitle,U as AssetResolver,wn as AuthGuard,Zu as AuthGuardFallback,Dt as AuthHeader,At as AuthMenu,_l as Breadcrumbs,Gt as CacheSettings,gf as ConsentBanner,Bo as DnDevNavigationMenu,sc as DropdownNavigation,rp as EntityCardList,Pd as EntityDisplayRenderer,so as EntityFormRenderer,Gd as EntityList,wp as EntityRecommendations,Ip as EntityWorkflow,$s as FeatureCard,ns as FeatureDisabled,pc as FloatingLanguageSwitcher,Xt as FooterBranding,ld as FooterCopyright,vd as FooterLegalLinks,Z3 as Form,j3 as FormControl,ev as FormDescription,J3 as FormField,Q3 as FormItem,X3 as FormLabel,tv as FormMessage,bf as GameContainer,wf as GameFlow,Wl as GameTitle,t1 as GoTo,Pa as GoToInput,ya as GoToWrapper,hc as HeaderMenu,Tc as HeaderNavigation,cn as Icon,Z0 as LicenseWatermark,T as Link,$e as Loader,hs as LoadingContainerOverlay,ot as LoadingMessage,ls as LoadingMessageAlmostDone,cs as LoadingMessageComplete,ms as LoadingMessageConnecting,ss as LoadingMessageProcessing,ds as LoadingMessageSaving,us as LoadingMessageSearching,is as LoadingMessageSimple,ps as LoadingMessageUploading,ys as LoadingOverlay,Cs as LoadingScreen,Mo as NotFoundPage,Bc as Notifications,Ye as PageContainer,Fs as ProgressBar,As as RedirectOverlay,Yc as SettingsMenu,Os as Skeleton,dl as TechBento,ed as ThemeToggle,uv as allLayoutClasses,hu as createAuthConfig,gv as cssVariables,Hp as isAuthAvailable,gm as isBillingAvailable,xm as isCrudAvailable,lm as isFormStoreAvailable,Lm as isOAuthAvailable,Up as layoutClasses,_p as layoutUtilities,mv as layoutVariables,am as resolveFaviconSet,nm as resolveLogo,Te as sanitizeSvg,Am as tList,Vt as techLogos,I as useAuthSafe,fu as useAuthState,Qe as useAuthVisibility,W1 as useBack,ym as useBillingVisibility,uu as useCanAccess,Tn as useCanNavigate,Cm as useCrudSafe,vt as useFormField,Ka as useFormStoreSafe,$p as useGoTo,gu as useHasRole,q1 as useLocation,X1 as useMatch,xe as useNavigate,Y as useNavigationItems,ho as useNavigationRoute,km as useOAuthSafe,Z1 as useParams,Y1 as usePrefetch,j1 as useQueryParams,em as useRedirectGuard,K1 as useRefresh,J1 as useRouteParam,Q1 as useSearchParams,Nt as useStripeBillingSafe,mu as useUserRole,vu as withAuth};
|
|
3
|
+
`);try{await navigator.clipboard.writeText(y),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},u=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},v=()=>{try{s()}catch{typeof window<"u"&&window.history.back()}};return V("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:V(Ro,{variant:Do.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:me(xe,{gap:"large",align:"center",className:"dndev-text-center",children:[V(xe,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:V(Yn,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),me(xe,{children:[V("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:n("routeError.title","Something went wrong")}),V("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:n("routeError.description","We encountered an error while loading this page.")}),V(ta,{variant:oa.INFO,hideIcon:!0,children:V("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:n("routeError.dataSafe","Don't worry, your data is safe.")})})]}),r&&me("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:[n("routeError.errorId","Error ID"),": ",r]}),g&&d&&me(Ro,{variant:Do.MUTED,className:"dndev-w-full",children:[me(xe,{direction:"row",align:"center",justify:"between",children:[V("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),V(Ye,{variant:qe.GHOST,icon:a?Xn:Qn,onClick:m,disabled:a,children:a?n("routeError.copied","Copied"):n("routeError.copyDetails","Copy Details")})]}),V("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})]}),me(xe,{className:"dndev-w-full",children:[V(Ye,{variant:qe.DESTRUCTIVE,icon:Jn,onClick:u,fullWidth:!0,children:n("routeError.tryAgain","Try Again")}),me(xe,{direction:"row",justify:"center",children:[V(T,{path:"/",children:V(Ye,{variant:qe.DEFAULT,icon:qn,fullWidth:!0,children:n("routeError.goHome","Go Home")})}),V(Ye,{variant:qe.OUTLINE,icon:Zn,onClick:v,fullWidth:!0,children:n("routeError.goBack","Go Back")})]})]}),V("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:n("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},Fo=sa;import{jsx as Fe}from"react/jsx-runtime";function da(e){return Fe(la,{fallback:Fe("div",{children:"Loading error fallback..."}),children:Fe(Fo,{...e})})}var Ze=({variant:e="standard",density:t,className:o,children:r,centered:n=!0,gapFirst:a=!1})=>Fe(Ao,{level:"route",fallback:da,children:Fe("div",{className:ca("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":n?"true":"false","data-gap-first":a?"true":void 0,children:r})});import{Fragment as wa,jsx as M,jsxs as Me}from"react/jsx-runtime";var xa=ga(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function Yu({title:e,description:t,showBackButton:o=!0,onBack:r,className:n=""}){let{t:a}=ba(["auth","common"]),i=Sa(),s=Ca(),l=()=>{r?r():s()};return M(Ze,{variant:"docs",children:M(we,{align:"center",justify:"center",className:ya("dndev-min-h-60",n),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:M(fa,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:Me(we,{children:[M(we,{justify:"center",children:M("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:M(ua,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),M("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),M("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:Me(we,{children:[Me(we,{gap:"large",children:[M("div",{children:M("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),M(ma,{fallback:M("div",{children:"Loading providers..."}),children:M(xa,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&Me(wa,{children:[M(ha,{}),M("div",{children:M(va,{onClick:l,className:"dndev-gap-sm",icon:pa,children:a("common.back")})})]}),Me(we,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[M("p",{children:a("auth.fallback.secure")}),M("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as Ta}from"lucide-react";import{Button as ka,BUTTON_VARIANT as La,DISPLAY as Pa}from"@donotdev/components";import{useOverlayStore as Ea,useTranslation as Na}from"@donotdev/core";import{jsx as Ia,jsxs as Aa}from"react/jsx-runtime";var ju=({display:e=Pa.AUTO,className:t,onOpen:o})=>{let{t:r}=Na("dndev"),n=Ea(l=>l.openCommandDialog),i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgentData?.platform??navigator.platform)?"\u2318K":"Ctrl+K",s=()=>{n(),o?.()};return Aa(ka,{variant:La.OUTLINE,display:e,icon:Ta,onClick:s,className:t,"aria-label":r("goTo.ariaLabel","Go to page"),children:[r("goTo.label","Go to"),Ia("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:i})]})};import{Suspense as Ra,lazy as Da}from"react";import{useEventListener as Fa,useOverlayStore as Ma}from"@donotdev/core";import{jsx as Mo}from"react/jsx-runtime";var Ba=Da(()=>import("./GoToDialog-CR4VOVXT.js")),Oa=()=>{let e=Ma(t=>t.openCommandDialog);return Fa("keydown",t=>{if((t.metaKey||t.ctrlKey)&&t.key==="k"){let o=t.target;if(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable)return;t.preventDefault(),e()}},{target:document,options:{passive:!1,capture:!1}}),Mo(Ra,{fallback:null,children:Mo(Ba,{})})},za=Oa;import{Search as Va}from"lucide-react";import{useCallback as Bo,useEffect as Ua,useState as _a,useRef as Ha}from"react";import{Stack as Wa}from"@donotdev/components";import{useOverlayStore as Pt}from"@donotdev/core";import{useTranslation as $a}from"@donotdev/core";import{jsx as Je,jsxs as qa}from"react/jsx-runtime";var Ga=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),Ka=()=>{let{t:e}=$a("dndev"),[t,o]=_a(""),r=Ha(null),n=Pt(s=>s.isCommandDialogOpen);Ua(()=>{n||o("")},[n]);let a=Bo(()=>{Pt.getState().openCommandDialog(t)},[t]),i=Bo(s=>{s.key==="Enter"&&(s.preventDefault(),Pt.getState().openCommandDialog(t))},[t]);return qa(Wa,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[Je(Va,{className:"dndev-absolute dndev-size-md",style:{insetInlineStart:"0.75rem",opacity:.5},"aria-hidden":"true"}),Je("input",{ref:r,type:"text",value:t,onChange:s=>o(s.target.value),onFocus:a,onKeyDown:i,placeholder:e("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingInlineStart:"2.5rem",paddingInlineEnd:"5rem"},"aria-label":e("globalGoTo.ariaLabel","Search navigation")}),Je("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{insetInlineEnd:"0.75rem",gap:"0.25rem",opacity:.5},"aria-hidden":"true",children:Je("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:Ga?"\u2318K":"Ctrl+K"})})]})},Ya=Ka;import{MoreHorizontal as Za,Link as Oo}from"lucide-react";import{useState as Ja,useEffect as zo,useRef as Qa,useMemo as Xa}from"react";import{NavigationMenu as Vo,NavigationMenuListPrimitive as ja,NavigationMenuItemPrimitive as Uo,Button as ei,DropdownMenu as ti,cn as Qe,DISPLAY as oi}from"@donotdev/components";import{useTranslation as ri}from"@donotdev/core";import{jsx as q,jsxs as Et}from"react/jsx-runtime";var _o=({routes:e,vertical:t=!1,display:o=oi.AUTO,overflowDetection:r=!1,showIcons:n=!0,className:a,style:i})=>{let{t:s}=ri("dndev"),l=Z(),c=e??l,d=Qa(null),[p,g]=Ja(c.length),m=Xa(()=>c.map(u=>({label:u.label,path:u.path,icon:q(K,{icon:u.icon,fallback:Oo}),children:u.children?u.children.map(v=>({label:v.label,path:v.path,icon:q(K,{icon:v.icon,fallback:Oo})})):void 0})),[c]);if(zo(()=>{if(!r||c.length===0||t)return;let u=()=>{let y=d.current;if(!y)return;let f=y.getBoundingClientRect(),x=y.querySelectorAll("[data-nav-item]"),b=y.querySelector("[data-more-button]"),C=0,k=b?.offsetWidth||0;for(let A=0;A<x.length;A++){let P=x[A];if(!P)break;if(P.getBoundingClientRect().right-f.left+(A===x.length-1&&b?k:0)<=f.width)C=A+1;else break}g(Math.max(0,C))},v=new ResizeObserver(u);return d.current&&v.observe(d.current),setTimeout(u,0),()=>v.disconnect()},[r,c.length,t]),zo(()=>{r&&!t&&g(c.length)},[c.length,r,t]),c.length===0)return null;if(r&&!t){let u=Math.min(p,m.length),v=m.slice(0,u),y=m.slice(u);return q(Vo,{className:Qe(a),style:i||{flex:1},children:Et(ja,{ref:d,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[v.filter(f=>f.path).map((f,x)=>q(Uo,{"data-nav-item":!0,children:Et(T,{path:f.path,className:Qe("dndev-interactive"),"data-role":"nav-trigger",children:[n&&f.icon,q("span",{className:"dndev-interactive-label",children:f.label})]})},f.path||x)),y.length>0&&q(Uo,{"data-more-button":!0,children:q(ti,{trigger:q(ei,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":s("navigation.more","More"),children:q(Za,{className:"dndev-size-md"})}),items:y.filter(f=>f.path).map(f=>({label:f.label,children:Et(T,{path:f.path,className:Qe("dndev-interactive"),"data-role":"menu-item",children:[n&&f.icon,q("span",{className:"dndev-interactive-label",children:f.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return q(Vo,{items:m,vertical:t,display:o,className:Qe(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:T})};import{Home as ni,ArrowLeft as ai,Link as ii}from"lucide-react";import{useMemo as si}from"react";import{Button as Nt,BUTTON_VARIANT as It,Stack as Be,Text as At}from"@donotdev/components";import{useTranslation as li}from"@donotdev/core";import{useLocation as ci,useNavigate as di}from"@donotdev/ui/routing/hooks";import{jsx as W,jsxs as Xe}from"react/jsx-runtime";function Ho(){let{t:e}=li("dndev"),t=ci(),o=di(),r=Z(),n=si(()=>r.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[r]),a=()=>{o("back")};return W(Ze,{variant:"docs",centered:!0,children:Xe(Be,{gap:"large",align:"center",justify:"center",children:[Xe(Be,{align:"center",children:[W(At,{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"}),W(At,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),W(At,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:e("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),t.pathname&&W("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:t.pathname})]}),n.length>0&&Xe(Be,{align:"center",children:[W("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:e("errors.notFound.suggestions","You might be looking for:")}),W(Be,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:n.map(i=>W(T,{path:i.path,replace:!0,children:W(Nt,{variant:It.OUTLINE,icon:W(K,{icon:i.icon,fallback:ii}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),Xe(Be,{direction:"row",wrap:"wrap",justify:"center",children:[W(T,{path:"/",replace:!0,children:W(Nt,{variant:It.DEFAULT,icon:ni,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),W(Nt,{variant:It.OUTLINE,icon:ai,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}import{useNavigate as Te,useBack as W1,useRefresh as $1,usePrefetch as G1,useLocation as K1,useParams as Y1,useRouteParam as q1,useSearchParams as Z1,useMatch as J1,useQueryParams as Q1,useRedirectGuard as X1}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Rt,isClient as ge,isDev as Wo}from"@donotdev/core";var _=class{static getBrowserSupport(){if(!ge())return{svg:!0,webp:!1,avif:!1};let t=this.cache.get("browser-support");if(t)return t;let o={svg:!0,webp:!1,avif:!1};try{let r=document.createElement("canvas");r.width=1,r.height=1,o.webp=r.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let r=document.createElement("canvas");r.width=1,r.height=1,o.avif=r.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(t){let o=[];if(t==null)return o;if(typeof t=="string")o.push(t);else if(Array.isArray(t))for(let r of t)o.push(...this.extractStringValues(r));else if(typeof t=="object")for(let r of Object.values(t))o.push(...this.extractStringValues(r));return o}static assetExists(t){if(!ge())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return ge()&&Rt()?.assets?.mapping||null}static getLogoSvgContent(){return Rt()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let n=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,n),n}static directAssetCheck(t){if(!ge())return!1;try{let o=new Image;return o.src=t,!0}catch{return!1}}static resolveFaviconSet(){let t="favicon-set";if(this.cache.has(t))return this.cache.get(t);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",s={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(t,s),s}let r=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",n={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":r,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":r,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":r,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":r,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":r};return this.cache.set(t,n),n}static resolveFavicon(){let t=this.getAssetManifest();if(t?.favicon?.optimal)return t.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let r of o)if(this.assetExists(r))return r;return"/favicon.svg"}static clearCache(){this.cache.clear(),Wo()&&ge()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:ge()?Rt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};$e(_,"cache",new Map);function om(e){return _.resolveLogo(e)}function rm(){return _.resolveFaviconSet()}Wo()&&(_.clearCache(),ge()&&window.addEventListener("DOMContentLoaded",()=>{_.clearCache()}));import*as pi from"@donotdev/crud";var $o={forms:{},startSubmit:()=>{},setUploading:()=>{},setValidating:()=>{},setSubmitting:()=>{},setSuccess:()=>{},setError:()=>{},reset:()=>{},cleanup:()=>{},setIsDirty:(e,t)=>{},hasDirtyForms:()=>!1,getDirtyFormIds:()=>[],getStatus:()=>"idle",isLoading:()=>!1,getUploadProgress:()=>0,getError:()=>null,getIsDirty:()=>!1},ke=pi?.useFormStore,im=typeof ke=="function";function ui(e){return ke?ke(e):e($o)}ui.getState=()=>ke&&typeof ke.getState=="function"?ke.getState():$o;import{useMemo as mi}from"react";function je(){let e=N("status"),t=N("isAvailable"),o=N("user");return mi(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as gi from"@donotdev/billing";import{DEGRADED_BILLING_API as fi}from"@donotdev/core";var Dt=gi?.useStripeBilling;function vi(e){return fi[e]}function Ft(e,t){return Dt?Dt(e,t):vi(e)}var um=typeof Dt=="function";function vm(){let e=N("user"),t=N("status"),o={user:e,status:t},r=Ft("status",o),n=Ft("isAvailable",o);return{shouldHide:!n,isLoading:r==="initializing",isReady:n&&r==="ready"}}import{DEGRADED_CRUD_API as hi}from"@donotdev/core";import*as yi from"@donotdev/crud";var Mt=yi?.useCrud;function bi(){return hi}function bm(e,t={}){return Mt?Mt(e,t):bi()}var Sm=typeof Mt=="function";import{DEGRADED_OAUTH_API as Si}from"@donotdev/core";import*as Ci from"@donotdev/oauth";var Bt=Ci?.useOAuth;function xi(e){return Si[e]}function wm(e){return Bt?Bt(e):xi(e)}var Tm=typeof Bt=="function";import{CheckCircle as wi}from"lucide-react";import{List as Ti}from"@donotdev/components";import{translateArray as ki}from"@donotdev/core";import{jsx as Go}from"react/jsx-runtime";var Li=wi,Pi=16;function Nm(e,t,o,r=Li,n=Pi){let a=r;return Go(Ti,{icon:a?Go(a,{size:n}):void 0,items:ki(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}var Ei=/<script[\s\S]*?<\/script>/gi,Ni=/<foreignObject[\s\S]*?<\/foreignObject>/gi,Ii=/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,Ai=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,Ri=/\s+(?:xlink:)?href\s*=\s*["']\s*data:(?!image\/(?:png|jpe?g|gif|webp|svg\+xml))[^"']*["']/gi;function Le(e){return e.replace(Ei,"").replace(Ni,"").replace(Ii,"").replace(Ai,"").replace(Ri,"")}import{Fragment as ji,jsx as le,jsxs as es}from"react/jsx-runtime";var qo=()=>null,Qi=Yo(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:qo}}}),Xi=Yo(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:qo}}}),Zo=()=>{let[e]=et.useState(!1),[t]=et.useState(!1),[o]=et.useState(!1),[r]=et.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:r,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}};qi()&&import("@donotdev/auth").then(e=>{Zo=e.useDeleteAccount}).catch(e=>{});var tt=e=>{if(!e)return Oe;if(typeof e=="function")return e;let t=e.replace(/['"]/g,""),o=Oi[t];return o||Oe},Ot=({loginPath:e,display:t=$i.AUTO,"no-tooltip":o=!1,customItems:r=[],className:n,style:a})=>{let{t:i}=Gi("dndev"),{shouldHide:s,isReady:l,isAuthenticated:c}=je(),d=Yi(),p=N("user"),g=N("signOut"),m=Zi("isLaptop"),u=Z(),v=Ji(),y=d.profilePath,f=d.authMenuItems||[],x=p?.role,b=Zo(),C=()=>p&&(p.displayName||p.email?.split("@")[0])||"User",k=()=>C().split(" ").map(S=>S.charAt(0)).slice(0,2).join("").toUpperCase(),A=()=>{if(!p)return i("auth.userMenu",{defaultValue:"User menu"});let h=[C()];return p.email&&h.push(p.email),x&&x!=="guest"&&h.push(`Role: ${x}`),h.join(`
|
|
4
|
+
`)},P=zi(()=>{let h=[];return!m&&p&&h.push({children:le(Wi,{variant:"muted",as:"span",children:`${C()}${p.email?`
|
|
5
|
+
${p.email}`:""}`}),disabled:!0}),y&&h.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:Di,onClick:()=>v(y)}),f.forEach(S=>{let L=u.find(R=>R.path===S.path),I=S.label||L?.label||S.path.split("/").pop()||"Menu",F=S.icon?tt(S.icon):L?.icon&&(typeof L.icon=="string"||typeof L.icon=="function")?tt(L.icon):Oe;h.push({label:I,icon:F,onClick:()=>v(S.path)})}),r.forEach(S=>{if(S.path){let L=u.find(R=>R.path===S.path),I=S.label||L?.label||S.path.split("/").pop()||"Menu",F=S.icon?tt(S.icon):Oe;h.push({label:I,icon:F,onClick:()=>v(S.path),disabled:S.disabled,style:S.style})}else if(S.onClick){let L=S.icon?tt(S.icon):Oe;h.push({label:S.label,icon:L,onClick:S.onClick,disabled:S.disabled,style:S.style})}}),h.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:Bi,onClick:b.startDeleteFlow,variant:"destructive"}),h.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:Fi,onClick:()=>g(),variant:"destructive"}),h},[y,f,r,g,b,i,u,m,p,x,C,v]);return Ki().length===0||s||!l||!c?null:es(ji,{children:[le(Ko,{fallback:null,children:le(Qi,{open:b.showPasswordDialog,isLoading:b.isDeleting,error:b.error,onReauth:h=>b.confirmDelete(h),onCancel:b.cancel})}),le(Ko,{fallback:null,children:le(Xi,{open:b.showConfirmDialog,isLoading:b.isDeleting,error:b.error,onConfirm:()=>b.confirmDelete(),onCancel:b.cancel})}),le(Hi,{trigger:le(Ui,{variant:_i.OUTLINE,icon:p?le(Vi,{src:p.photoURL??void 0,fallback:k(),alt:C(),style:{margin:"-4px 0"}}):Mi,display:t,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&m&&p?A():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:n,style:a,children:C()}),items:P,contentAlign:"end"})]})};import{jsx as B}from"react/jsx-runtime";var Xo=()=>null;function ot({display:e,signInLabel:t,className:o,style:r,children:n,...a}){return B(rs,{variant:ns.OUTLINE,icon:ts,display:e,tooltip:t,className:o,style:r,...a,children:n??t})}var ps=Qo(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:Xo}}}),Jo=Qo(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:Xo}}}),Vt=({display:e=ss.AUTO,className:t,style:o})=>{let{t:r}=ls("dndev"),{shouldHide:n,isLoading:a,isReady:i,isAuthenticated:s}=je(),l=cs(),c=ds(),[d,p]=os(!1),g=l.loginPath,m=r("auth.signIn",{defaultValue:"Sign In"}),u=r("auth.loading",{defaultValue:"Loading..."}),v=c.includes("password")||c.includes("emailLink");if(n||!i)return null;if(!s){if(g!==void 0)return B(T,{path:g,prefetch:!0,children:B(ot,{display:e,signInLabel:m,className:t,style:o})});let y=c[0];return v?B(is,{trigger:B(ot,{display:e,signInLabel:m,className:t,style:o}),title:m,open:d,onOpenChange:p,"data-content-size":"form",children:B(zt,{fallback:B("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:u}),children:B(Jo,{spacing:"medium",onSuccess:()=>p(!1)})})}):c.length>1?B(as,{trigger:B(ot,{display:e,signInLabel:m,className:t,style:o}),children:B(zt,{fallback:B("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:u}),children:B(Jo,{spacing:"tight"})})}):B(zt,{fallback:B(ot,{display:e,signInLabel:m,className:t,style:o,disabled:a,tooltip:a?u:m,children:a?u:m}),children:B(ps,{partnerId:y,display:e,className:t,style:o})})}return B(Ot,{display:e,loginPath:g,className:t,style:o})};import{RefreshCw as us}from"lucide-react";import{cn as ms}from"@donotdev/components";import{jsx as jo,jsxs as vs}from"react/jsx-runtime";var gs=({className:e})=>vs("div",{className:ms("dndev-loading-overlay",e),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:[jo(us,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),jo("span",{className:"dndev-sr-only",children:"Loading..."})]}),fs=gs;import{AlertCircle as hs,RefreshCw as ys,Mail as bs,Cookie as Ss}from"lucide-react";import{Card as Cs,Button as Ut,BUTTON_VARIANT as _t,Stack as er}from"@donotdev/components";import{useTranslation as xs}from"@donotdev/core";import{jsx as ze,jsxs as rt}from"react/jsx-runtime";function ws({featureName:e,title:t,description:o,showReviewCookies:r=!1,showContactSupport:n=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:s,onReviewCookies:l,customActions:c,className:d=""}){let{t:p}=xs("ui"),g=o||p("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),m=()=>{if(l)l();else{let v=new CustomEvent("openCookieConsent");window.dispatchEvent(v)}},u=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return rt(Cs,{className:d,title:rt(er,{direction:"row",align:"center",gap:"tight",children:[ze(hs,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:g,children:[" ",rt("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(r||n||a||c)&&rt(er,{direction:"row",wrap:"wrap",gap:"tight",children:[r&&ze(Ut,{variant:_t.OUTLINE,onClick:m,icon:Ss,children:p("featureDisabled.reviewCookies","Review Cookies")}),n&&ze(Ut,{variant:_t.OUTLINE,onClick:u,icon:bs,children:p("featureDisabled.contactSupport","Contact Support")}),a&&ze(Ut,{variant:_t.OUTLINE,onClick:s,icon:ys,children:p("featureDisabled.retry","Retry")}),c]}),ze("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:p("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var Ts=ws;import{cn as ks}from"@donotdev/components";import{jsx as J,jsxs as Fs}from"react/jsx-runtime";var re=({state:e="loading",message:t,show:o=!0,className:r,showSpinner:n=!1,spinnerSize:a="md"})=>{if(!o)return null;let s=t||(c=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[c]||"Loading...")(e),l={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return Fs("div",{className:ks(r),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":s,children:[n&&J("div",{style:{...l[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),J("span",{style:{fontWeight:500},children:s})]})},Ls=({message:e="Loading...",...t})=>J(re,{state:"loading",message:e,...t}),Ps=({message:e="Processing your request...",...t})=>J(re,{state:"processing",message:e,...t}),Es=({message:e="Almost there...",...t})=>J(re,{state:"almost-done",message:e,...t}),Ns=({message:e="Complete!",...t})=>J(re,{state:"complete",message:e,...t}),Is=({showSpinner:e=!0,...t})=>J(re,{state:"processing",message:"Saving your changes...",showSpinner:e,...t}),As=({showSpinner:e=!0,fileName:t,...o})=>J(re,{state:"processing",message:t?`Uploading ${t}...`:"Uploading file...",showSpinner:e,...o}),Rs=({showSpinner:e=!0,query:t,...o})=>J(re,{state:"processing",message:t?`Searching for "${t}"...`:"Searching...",showSpinner:e,...o}),Ds=({showSpinner:e=!0,...t})=>J(re,{state:"loading",message:"Connecting to server...",showSpinner:e,...t}),nt=re;import{cn as Ms}from"@donotdev/components";import{Fragment as tr,jsx as ce,jsxs as or}from"react/jsx-runtime";var Bs=({show:e=!1,backdrop:t=!0,backdropBlur:o=!0,className:r,children:n,message:a,showSpinner:i=!0,spinnerSize:s="lg",preventClicks:l=!0,zIndex:c="var(--z-modal)"})=>{if(!e)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 ce("div",{className:Ms("dndev-loading-overlay",d,r),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:l?"auto":"none",...d?{}:{zIndex:c}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:ce("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:n||or(tr,{children:[i&&ce("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:s==="sm"?"2rem":s==="md"?"3rem":"4rem",height:s==="sm"?"2rem":s==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&ce(nt,{...a})]})})})};var Os=({show:e=!1,backdrop:t=!1,backdropBlur:o=!1,className:r,...n})=>ce("div",{className:r,style:{position:"absolute",inset:0,display:e?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:ce("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:n.children||or(tr,{children:[ce("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"}),n.message&&ce(nt,{...n.message})]})})}),zs=Bs;import{cn as Vs}from"@donotdev/components";import{jsx as rr}from"react/jsx-runtime";var Us=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:rr("div",{className:Vs(t),style:{display:"flex",alignItems:"center",justifyContent:"center",...e==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:rr("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...e==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),_s=Us;import{Lock as at,Shield as nr}from"lucide-react";import{useEffect as Ht,useRef as ar,useCallback as Hs}from"react";import{Portal as Ws,Spinner as $s,Stack as Gs,Text as Ve,Button as Ks}from"@donotdev/components";import{useTranslation as Ys,useOverlay as ne}from"@donotdev/core";import{jsx as Q,jsxs as sr}from"react/jsx-runtime";var ir={connecting:0,preparing:2e3,redirecting:5e3},qs=1e4;function Zs(e,t){return t==="none"?null:t==="shield"?nr:t==="lock"?at:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?at:e.startsWith("oauth-")||e.startsWith("auth-")?nr:at:at}function Js(e){return e||"default"}function Qs(){let{t:e}=Ys("dndev"),t=ne("isRedirectOverlayOpen"),o=ne("redirectOperation"),r=ne("redirectPhase"),n=ne("showCancelButton"),a=ne("redirectConfig"),i=ne("redirectStartTime"),s=ne("setRedirectPhase"),l=ne("setShowCancelButton"),c=ne("hideRedirectOverlay"),d=ar([]),p=ar(null),g=Hs(()=>{c()},[c]);if(Ht(()=>{if(!t||!i)return;let C=a?.cancelTimeout??qs,k=Date.now()-i;d.current.forEach(clearTimeout),d.current=[],p.current&&(clearTimeout(p.current),p.current=null);let A=(w,h)=>{let S=Math.max(0,h-k);if(S>0){let L=setTimeout(()=>{s(w)},S);d.current.push(L)}else s(w)};A("preparing",ir.preparing),A("redirecting",ir.redirecting);let P=Math.max(0,C-k);return p.current=setTimeout(()=>{l(!0),s("timeout")},P),()=>{d.current.forEach(clearTimeout),d.current=[],p.current&&(clearTimeout(p.current),p.current=null)}},[t,i,a?.cancelTimeout,s,l]),Ht(()=>{if(!t)return;let C=()=>{c()};return window.addEventListener("popstate",C),()=>window.removeEventListener("popstate",C)},[t,c]),Ht(()=>{if(!t)return;let C=()=>{};return document.addEventListener("visibilitychange",C),()=>document.removeEventListener("visibilitychange",C)},[t]),!t)return null;let m=Js(o),u=a?.title??e(`redirectOverlay.${m}.title`,{defaultValue:e("redirectOverlay.default.title")}),v=a?.message??e(`redirectOverlay.${m}.message`,{defaultValue:e("redirectOverlay.default.message")}),y=a?.subtitle??e(`redirectOverlay.${m}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),f=e(`redirectOverlay.${m}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),x=e(`redirectOverlay.phases.${r}`),b=Zs(o,a?.icon);return Q(Ws,{children:Q("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":f,style:{zIndex:"var(--z-overlay, 9999)"},children:sr("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[sr(Gs,{direction:"row",align:"center",children:[b&&Q(b,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),Q($s,{variant:"primary"})]}),Q(Ve,{as:"h3",style:{color:"var(--foreground)",margin:0},children:u}),Q(Ve,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:x}),Q(Ve,{variant:"muted",level:"small",style:{opacity:.8},children:v}),Q(Ve,{variant:"muted",level:"small",style:{opacity:.6},children:y}),Q(Ve,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),n&&Q(Ks,{variant:"ghost",onClick:g,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as Wt,useState as lr}from"react";import{cn as Xs}from"@donotdev/components";import{jsx as cr}from"react/jsx-runtime";var js=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:r=2e3,className:n,show:a=!0})=>{let[i,s]=lr(0),[l,c]=lr(!1);Wt(()=>{if(!e||!o||t!==void 0)return;c(!0),s(0);let p=Date.now(),g=setInterval(()=>{let m=Date.now()-p,u=Math.min(m/r*90,90);s(u)},16);return()=>{clearInterval(g)}},[e,o,t,r]),Wt(()=>{t!==void 0&&c(t>0&&t<100)},[t]),Wt(()=>{if(!e){let p=setTimeout(()=>{c(!1),s(0)},300);return()=>clearTimeout(p)}},[e]);let d=t??i;return!a||!l?null:cr("div",{className:Xs(n),style:{position:"fixed",insetInlineStart:0,insetInlineEnd: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:cr("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:e?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},el=js;import{cn as it,Stack as tl}from"@donotdev/components";import{jsx as Ue,jsxs as Og}from"react/jsx-runtime";var ol=({variant:e="text",width:t,height:o,lines:r=1,show:n=!0,className:a,animation:i="pulse",style:s})=>{if(!n)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))"}},c=()=>{let d={};return t&&(d.width=typeof t=="number"?`${t}px`:t),o&&(d.height=typeof o=="number"?`${o}px`:o),d};return e==="text"?Ue(tl,{gap:"tight",children:Array.from({length:r}).map((d,p)=>Ue("div",{className:it("dndev-skeleton",a),style:{...l,height:"var(--gap-md)",width:p===r-1?"75%":"100%",...c(),...s}},p))}):e==="circular"?Ue("div",{className:it("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...c(),...s}}):e==="rectangular"?Ue("div",{className:it("dndev-skeleton",a),style:{...l,width:t||"100%",height:o||"200px",...c(),...s}}):Ue("div",{className:it("dndev-skeleton",a),style:{...l,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...c(),...s}})};var rl=ol;import{Card as nl,IconBox as al,Stack as il,Text as $t,renderCardContent as sl}from"@donotdev/components";import{jsx as X,jsxs as dr}from"react/jsx-runtime";var ll=({icon:e,title:t,subtitle:o,content:r,href:n,variant:a,elevated:i,onClick:s,className:l,footer:c,style:d,clickable:p,...g})=>{let m=sl(r),y=`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":""}`,f={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},x={...f,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},b={...f,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},C=e?dr(il,{direction:"row",align:"center",style:{width:"100%"},children:[X(al,{icon:e}),X($t,{as:"div",level:"h3",style:x,children:t})]}):X($t,{as:"div",level:"h3",style:x,children:t}),k=X(nl,{variant:a,elevated:i,onClick:s,className:l,"data-clickable":n||s||p?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...d},...g,children:dr("div",{style:{display:"grid",gridTemplateRows:y,gap:"var(--gap-md)",width:"100%"},children:[X("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:C}),X("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:X($t,{as:"div",level:"body",style:b,children:o})}),X("div",{children:m}),c&&X("div",{children:c})]})});return n&&!s?X(T,{path:n,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:k}):k},cl=ll;import{useState as Sl}from"react";import{Bento as Cl,Card as xl,Section as wl,Stack as Tl,Text as kl,TONE as Ll,cn as Pl}from"@donotdev/components";var dl='<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>',pl='<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>',ul='<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>',ml='<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>',gl='<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>',fl='<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>',vl='<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>',hl='<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>',yl='<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>',bl='<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>',Gt={bun:{svg:`data:image/svg+xml,${encodeURIComponent(bl)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(dl)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(pl)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(ul)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(ml)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(gl)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(fl)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(vl)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(hl)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(yl)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as fe,jsxs as Al}from"react/jsx-runtime";function El({techKey:e,variant:t}){let o=Gt[e],[r,n]=Sl(!1);if(!o)return null;let a=decodeURIComponent(o.svg.replace("data:image/svg+xml,","")),i=Le(a);return fe(xl,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":r,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:Al(Tl,{direction:"column",align:"center",gap:"tight",children:[fe("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:i}}),fe(kl,{as:"span",level:"small",children:o.name})]})})}function Nl({title:e,techs:t,cols:o=3,columns:r,gap:n="medium",separator:a=!1,tone:i=Ll.GHOST,align:s,collapsible:l,open:c,onOpenChange:d,defaultOpen:p,className:g}){let m=r||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),u=f=>{if(f==="long")return{cols:2,rows:1};if(f==="high")return{cols:1,rows:2};if(f==="huge")return{cols:2,rows:2}},v=t.filter(f=>Gt[f.name]).map(f=>({id:f.name,content:fe(El,{techKey:f.name,variant:f.variant}),span:u(f.size)})),y=fe(Cl,{items:v,columns:m,gap:n,ariaLabel:"Technology stack"});return fe(wl,{title:e,separator:a,tone:i,align:s,collapsible:l,open:c,onOpenChange:d,defaultOpen:p,className:Pl("dndev-tech-bento",g),children:fe("div",{className:"dndev-tech-bento-grid",children:y})})}var Il=Nl;import{Suspense as Rl,lazy as Dl}from"react";import{useConsent as pr}from"@donotdev/core";import{jsx as ur}from"react/jsx-runtime";var Fl=Dl(()=>import("./CookieConsent-UVTR7CWW.js"));function uf(){let e=pr("hasConsented"),t=pr("showBanner");return e&&!t?null:ur(Rl,{fallback:null,children:ur(Fl,{})})}import{Button as mr,ScrollArea as Ml}from"@donotdev/components";import{cn as gr}from"@donotdev/components";import{jsx as ae,jsxs as Bl}from"react/jsx-runtime";function hf({content:e,cta:t,align:o="center",justify:r="center",disableScrollArea:n=!1,contentVariant:a="narrow",contentClassName:i,ctaClassName:s}){let c=a==="narrow"?a==="narrow"&&ae("div",{className:"dndev-game-container__content-narrow",children:e}):e,d=n?ae("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:c}):ae(Ml,{className:"dndev-game-container__scroll",children:c});return Bl("div",{className:"dndev-game-container",children:[ae("div",{className:gr("dndev-game-container__content",i),"data-align":o,"data-justify":r,"data-content-variant":a,children:ae("div",{className:"dndev-game-container__scroll-wrapper",children:d})}),t&&ae("div",{className:gr("dndev-game-container__cta",s),children:Array.isArray(t)?ae("div",{className:"dndev-game-container__cta-buttons",children:t.map((p,g)=>ae(mr,{onClick:p.onClick,disabled:p.disabled??!1,variant:p.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:p.label},g))}):ae(mr,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as Ol,Suspense as zl,lazy as Vl}from"react";import{jsx as Kt}from"react/jsx-runtime";var fr=new Set,vr=new Map;function Ul(e,t){let o=vr.get(e);if(o)return o;let r=t[e];if(!r)return null;let n=Vl(r);return vr.set(e,n),n}function Cf({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:r=null}){Ol(()=>{if(o&&!fr.has(o)){fr.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let n=t?Ul(t,e):null;return!t||!n?null:Kt("div",{style:{height:"100%"},children:Kt(zl,{fallback:r,children:Kt(n,{})})})}import{cn as _l,DISPLAY as Yt}from"@donotdev/components";import{useAppConfig as hr}from"@donotdev/core";import{jsx as st,jsxs as $l}from"react/jsx-runtime";var Hl=({display:e=Yt.AUTO,linkToHome:t=!0,className:o})=>{let r=hr("name"),a=hr("shortName")||r||"App",i=_.getLogoSvgContent(),s=_.resolveLogo(),l=e===Yt.FULL||e===Yt.AUTO,c=i?st("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Le(i)}}):_.assetExists(s)?st("img",{src:s,alt:a,className:"app-branding-logo"}):null,d=l&&st("span",{className:"app-branding-title","data-display":e,children:a}),p=$l("div",{className:_l("app-branding",o),"data-display":e,children:[c,d]});return t?st(T,{path:"/",className:"app-branding-link",children:p}):p},Wl=Hl;import{cn as yr}from"@donotdev/components";import{useAppConfig as br}from"@donotdev/core";import{jsx as Cr}from"react/jsx-runtime";var Sr={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"}},Gl=({alt:e,size:t="header",className:o})=>{let r=br("name"),n=br("shortName"),a=e||r||n||"App",i=_.getLogoSvgContent(),s=_.resolveLogo(),l=typeof t=="string"&&t in Sr?Sr[t]:typeof t=="string"?{}:{width:t,height:t};return i?Cr("div",{className:yr("app-icon-header",o),style:{display:"inline-flex",...l},role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Le(i)}}):Cr("img",{src:s,alt:a,className:yr(o),style:{objectFit:"contain",...l}})},Kl=Gl;import{cn as xr}from"@donotdev/components";import{useAppConfig as wr,useBreakpoint as Yl}from"@donotdev/core";import{jsx as Tr}from"react/jsx-runtime";var ql=({title:e,className:t,linkToHome:o=!0})=>{let r=Yl("isMobileOrTablet"),n=wr("name"),a=wr("shortName"),i=e||r&&a||n||"App",s=Tr("div",{className:xr("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?Tr(T,{path:"/",className:xr("dndev-inline-block",t),children:s}):s},Zl=ql;import{ChevronRight as tc}from"lucide-react";import{useMemo as oc}from"react";import{cn as rc}from"@donotdev/components";import{useTranslation as nc}from"@donotdev/core";import{useLocation as ac}from"@donotdev/ui/routing/hooks";import{useMemo as kr}from"react";import{useNavigationStore as $f,getRoutes as Jl,getRouteManifest as Gf}from"@donotdev/core";function Ql(){return kr(()=>{try{let e=Jl();return!e||e.length===0?[]:Xl(e)}catch{return[]}},[])}function Lr(){let e=Ql();return kr(()=>e.flatMap(t=>t.routes),[e])}function Xl(e){let t=new Map;return e.forEach(o=>{let r=typeof o.path=="string"?o.path:String(o.path);if(!r||r==="undefined"||r==="null")return;let n=o.meta?.entity||jl(r)||"other",a={path:r,label:o.meta?.title||ec(r),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(n)||t.set(n,{label:n.charAt(0).toUpperCase()+n.slice(1),routes:[]}),t.get(n)?.routes.push(a)}),Array.from(t.values())}function jl(e){return e.split("/").filter(Boolean)[0]||null}function ec(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):"Home"}import{jsx as _e,jsxs as lc}from"react/jsx-runtime";var ic=({items:e,separator:t=tc,showHome:o=!0,homeHref:r="/",variant:n="default",className:a})=>{let{t:i}=nc("dndev"),s=ac(),l=Lr(),c=oc(()=>new Set(l.map(g=>g.path)),[l]),d=e||(()=>{let g=s.pathname.split("/").filter(Boolean),m=[],u="";return g.forEach(v=>{u+=`/${v}`;let y=v.split("-").map(x=>x.charAt(0).toUpperCase()+x.slice(1)).join(" "),f=c.has(u)?u:void 0;m.push({label:y,href:f})}),m})(),p=o?[{label:i("navigation.home","Home"),href:r},...d]:d;return n==="smart"&&s.pathname.split("/").filter(Boolean).length<2?null:_e("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:rc("breadcrumbs",a),children:p.map((g,m)=>{let v=m===p.length-1||!g.href;return lc("span",{className:"breadcrumb-item",children:[m>0&&_e(t,{className:"dndev-size-md separator"}),g.icon&&_e(g.icon,{className:"dndev-size-md icon"}),g.href&&!v?_e(T,{path:g.href,className:"breadcrumb-link",children:g.label}):_e("span",{className:"breadcrumb-label",children:g.label})]},m)})})},sc=ic;import{useTranslation as cc,maybeTranslate as Pr,useLayout as qt,useAppConfig as dc}from"@donotdev/core";import{jsx as Pe,jsxs as uc}from"react/jsx-runtime";var pc=({asLink:e=!1,className:t})=>{let o=dc("app"),r=qt("gameTitle"),n=qt("gameSubtitle"),a=qt("gameNamespace"),{t:i}=cc(a||"dndev"),s=Pr(i,r??void 0),l=Pr(i,n??void 0),c=o?.name||"Game";if(s)return Pe("div",{className:t,children:uc("div",{style:{textAlign:"center"},children:[Pe("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),l&&Pe("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l})]})});let d=Pe("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c});return e?Pe(T,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:p=>p.currentTarget.style.color="var(--primary)",onMouseLeave:p=>p.currentTarget.style.color="var(--foreground)",children:c}):Pe("div",{className:t,children:d})};import{Trash2 as mc}from"lucide-react";import{useState as Er}from"react";import{Button as gc,BUTTON_VARIANT as fc,Checkbox as vc,Stack as Zt,useToast as hc}from"@donotdev/components";import{useTranslation as yc}from"@donotdev/core";import{useRefresh as bc}from"@donotdev/ui/routing/hooks";import{jsx as lt,jsxs as Nr}from"react/jsx-runtime";function Sc(){let{t:e}=yc("dndev"),{toast:t}=hc(),[o,r]=Er(!1),n=bc(),[a,i]=Er({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),s=async()=>{try{r(!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 d=await indexedDB.databases();await Promise.all(d.map(async p=>{if(p.name){let g=indexedDB.deleteDatabase(p.name);await new Promise((m,u)=>{g.onsuccess=()=>m(void 0),g.onerror=()=>u(g.error)})}}))}l.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let d=globalThis.openDatabase("","","","");d&&d.transaction&&d.transaction(p=>{p.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,m)=>{for(let u=0;u<m.rows.length;u++){let v=m.rows.item(u).name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(v)&&g.executeSql(`DROP TABLE IF EXISTS ${v}`)}})}),l.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let d=await caches.keys();await Promise.all(d.map(async p=>{try{await caches.delete(p)}catch{}})),l.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let d=await navigator.serviceWorker.getRegistrations();await Promise.all(d.map(async p=>{try{await p.unregister()}catch{}})),l.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(d=>{let p=d.indexOf("="),g=p>-1?d.substr(0,p):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}`}),l.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),l.push("Memory Cache")}catch{}let c=l.length>0?e("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:l.join(", ")}):e("settings.clearCache.noItemsCleared","No cache items were cleared");t("success",c),l.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:n()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{r(!1)}};return Nr(Zt,{children:[lt(Zt,{children:Object.entries(a).map(([l,c])=>Nr(Zt,{direction:"row",align:"center",gap:"tight",children:[lt(vc,{id:l,checked:c,onCheckedChange:d=>i(p=>({...p,[l]:!!d}))}),lt("label",{htmlFor:l,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:e(`settings.clearCache.${l}`,l.charAt(0).toUpperCase()+l.slice(1))})]},l))}),lt(gc,{variant:fc.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:s,icon:mc,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var Jt=Sc;import{DropdownMenu as Tc,Button as Qt,Stack as kc}from"@donotdev/components";import{Link as Cc}from"lucide-react";import{navigationMenuTriggerStylePrimitive as xc}from"@donotdev/components";import{jsx as Ir,jsxs as wc}from"react/jsx-runtime";var ct=({path:e,route:t,showIcons:o=!0})=>{let r=Z(),n=t??r.find(s=>s.path===e);if(!n)return null;let a=o&&!!n.icon,i=!!n.label;return wc(T,{path:n.path,className:xc(),...a&&!i&&{"data-display":"compact"},children:[o&&Ir(K,{icon:n.icon,fallback:Cc}),Ir("span",{children:n.label})]})};import{jsx as ve}from"react/jsx-runtime";var Lc=({navigation:e,className:t})=>ve(kc,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,r)=>o.routes&&o.routes.length>0?ve(Tc,{trigger:ve(Qt,{icon:o.icon,children:o.label}),items:o.routes.map(n=>({label:n.label,children:ve(ct,{route:n}),asChild:!!n.path})),contentAlign:"start"},o.label+r):o.path?ve(Qt,{icon:o.icon,"aria-label":o.label,render:({children:n,...a})=>ve(T,{path:o.path,...a,children:n}),children:o.label},o.label+r):ve(Qt,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+r))}),Pc=Lc;import{Card as Ec,cn as Nc}from"@donotdev/components";import{jsx as Xt}from"react/jsx-runtime";var Ic=({languages:e,currentLanguage:t,onLanguageChange:o,className:r})=>Xt(Ec,{className:Nc("dndev-z-modal",r),style:{position:"fixed",bottom:"var(--gap-md)",insetInlineEnd:"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:Xt("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:n=>o?.(n.target.value),"aria-label":"Select language",children:e.map(n=>Xt("option",{value:n,children:n},n))})}),Ac=Ic;import{MoreHorizontal as Rc}from"lucide-react";import{Button as Dc,BUTTON_VARIANT as Fc,DropdownMenu as Mc}from"@donotdev/components";import{jsx as Ar}from"react/jsx-runtime";var Bc=({children:e,className:t})=>Ar(Mc,{trigger:Ar(Dc,{variant:Fc.GHOST,icon:Rc,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),Oc=Bc;import{MoreHorizontal as zc}from"lucide-react";import{Link as Vc}from"lucide-react";import{DISPLAY as He,DropdownMenu as Uc,Button as Rr}from"@donotdev/components";import{cn as _c}from"@donotdev/components";import{useBreakpoint as Dr,useTranslation as Hc}from"@donotdev/core";import{jsx as he}from"react/jsx-runtime";var Wc=({className:e="",showIcons:t=!0,display:o=He.AUTO,path:r})=>{let{t:n}=Hc("dndev"),a=Dr("isMobile"),i=Dr("isTablet"),s=Z(),l=wo(r??"");return r?l?he(Rr,{variant:"ghost",display:o,icon:t?he(K,{icon:l.icon,fallback:Vc}):void 0,className:e,render:({children:d,...p})=>he(T,{path:l.path,...p,children:d}),children:l.label}):null:(o===He.AUTO?a||i?He.COMPACT:He.FULL:o)===He.COMPACT?he(Uc,{trigger:he(Rr,{variant:"ghost",icon:zc,"aria-label":n("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:s.map(d=>({label:d.label,children:he(ct,{route:d,showIcons:t}),asChild:!0}))}):he(_o,{overflowDetection:!0,showIcons:t,className:_c(e),style:{flex:1}})},$c=Wc;import{Bell as Gc}from"lucide-react";import{useMemo as Kc,useEffect as Yc,useRef as qc}from"react";import{Button as Zc,cn as Jc,toast as Qc,Stack as Xc}from"@donotdev/components";import{jsx as jt}from"react/jsx-runtime";var jc={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)"}}},ed=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:r,onDropdownOpen:n,className:a,maxVisible:i=10,alwaysShow:s=!1,size:l="md",disabled:c=!1})=>{let d=jc[l],p=qc(new Set),g=Kc(()=>t===0?null:t>99?"99+":t.toString(),[t]),m=t>0||s;return Yc(()=>{e.forEach(u=>{if(!p.current.has(u.id)){p.current.add(u.id);let v=u.type==="error"?"error":u.type==="warning"?"warning":u.type==="success"?"success":"info";Qc({title:u.title,description:u.message,toastType:v,duration:0,onDismiss:()=>{p.current.delete(u.id),r&&r(u)}})}})},[e,r]),m?jt("div",{className:Jc(a),style:{position:"relative"},children:jt(Zc,{disabled:c,style:{...d.button,position:"relative"},onClick:()=>{n?.()},onFocus:u=>{u.currentTarget.style.outline="2px solid var(--ring)",u.currentTarget.style.outlineOffset="2px"},onBlur:u=>{u.currentTarget.style.outline="none"},"aria-label":`${t} notification${t!==1?"s":""}`,icon:Gc,children:g&&jt(Xc,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",insetInlineEnd:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...d.badge},"aria-hidden":"true",children:g})})}):null},td=ed;import{Settings as od,Check as rd}from"lucide-react";import*as dt from"lucide-react";import{Button as nd,BUTTON_VARIANT as ad,DropdownMenu as id,Stack as sd,DISPLAY as ld}from"@donotdev/components";import{useTranslation as cd}from"@donotdev/core";import{useLanguageSelector as dd,useTheme as eo,Flag as pd}from"@donotdev/core";import{jsx as de,jsxs as gd}from"react/jsx-runtime";function ud({variant:e=ad.OUTLINE}={}){let{t}=cd("dndev"),{languages:o,currentLanguage:r,changeLanguage:n,isLoading:a}=dd(),i=eo("availableThemes"),s=eo("currentTheme"),l=eo("setTheme"),c=m=>{if(!m)return dt.Palette;let u=m.replace(/['"]/g,"");return dt[u]||dt.Palette},d=i.map(m=>{let u=c(m.meta?.icon),v=m.name===s;return{label:m.displayName||m.name,icon:u,onClick:()=>l(m.name),checked:v}}),p=o.map(m=>{let u=m.id===r;return{label:m.name,onClick:()=>n(m.id),disabled:a,checked:u,className:u?"bg-accent":void 0,iconEnd:u&&!a?rd:void 0,children:gd(sd,{direction:"row",align:"center",gap:"tight",children:[de(pd,{code:m.flagCode||m.id,title:`${m.name} flag`}),de("span",{children:m.name}),a&&u&&de("div",{style:{marginInlineStart:"auto"},children:de("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:t("auth.title","Authentication"),subContent:de(Vt,{display:ld.COMPACT})},{label:t("settings.theme","Theme"),subItems:d},{label:t("settings.language","Language"),subItems:p},{label:t("settings.clearCache.title","Clear Cache"),subContent:de(Jt,{})}];return de(id,{trigger:de(nd,{variant:e,"aria-label":t("settings.title","Settings"),icon:od}),items:g,contentWidth:"14rem",contentAlign:"end"})}var md=ud;import*as pt from"lucide-react";import{Button as Fr,BUTTON_VARIANT as fd,DropdownMenu as vd,DISPLAY as hd}from"@donotdev/components";import{useTranslation as yd}from"@donotdev/core";import{useTheme as to}from"@donotdev/core";import{jsx as ro}from"react/jsx-runtime";var oo=e=>{if(!e)return pt.Palette;let t=e.replace(/['"]/g,"");return pt[t]||pt.Palette},bd=({display:e=hd.AUTO,"no-tooltip":t=!1})=>{let{t:o}=yd("dndev"),r=to("availableThemes"),n=to("currentTheme"),a=to("setTheme");if(r.length<=1)return null;let i=r.find(f=>f.name===n)||r[0],s=r.length===2?r.find(f=>f.name!==i?.name)||r[0]:null,l=i?oo(i.meta?.icon):null,c=s?oo(s.meta?.icon):null,d=i?.displayName||i?.name||"Theme",p=s?.displayName||s?.name||"Theme",g=r.length===2&&s&&c,m=g?c:l,u=g?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:s?.displayName||s?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),v={variant:fd.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:u,icon:m,display:e};if(g&&s)return ro(Fr,{...v,onClick:()=>a(s.name),children:p});if(!i||!l)return null;let y=r.map(f=>{let x=oo(f.meta?.icon),b=f.name===n;return{label:f.displayName||f.name,icon:x,onClick:()=>a(f.name),checked:b}});return ro(vd,{trigger:ro(Fr,{...v,children:d}),items:y,contentWidth:"10rem"})},Sd=bd;import{ExternalLink as Cd}from"lucide-react";import{getPlatformEnvVar as xd}from"@donotdev/core";import{jsx as wd,jsxs as Td}from"react/jsx-runtime";var no=({className:e})=>{let o=xd("APP_URL")==="https://donotdev.com";return Td("a",{href:o?"https://www.ambroise-park.com":"https://donotdev.com",target:"_blank",rel:"noopener noreferrer",className:e,style:{display:"inline-flex",alignItems:"center",gap:"var(--gap-sm)",fontSize:"var(--font-size-xs)"},children:[o?"AMBROISE-PARK":"DoNotDev",wd(Cd,{style:{width:"12px",height:"12px"},"aria-hidden":"true"})]})};import{cn as kd}from"@donotdev/components";import{useTranslation as Ld,useAppConfig as Pd}from"@donotdev/core";import{jsxs as Nd}from"react/jsx-runtime";var Ed=({appName:e,year:t=new Date().getFullYear(),className:o})=>{let{t:r}=Ld("dndev"),n=Pd("app"),a=e||n?.name||"App";return Nd("span",{className:kd(o),style:{flexShrink:0,color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"},children:["\xA9 ",t," ",a,". ",r("footer.legal.allRightsReserved")]})};import{Stack as Rd}from"@donotdev/components";import{useTranslation as Dd,maybeTranslate as Fd,useAppConfig as Md}from"@donotdev/core";var Id=[{path:"#cookie-settings",label:"footer.legal.cookieSettings"},{label:"footer.legal.privacyPolicy",path:"/privacy"},{label:"footer.legal.termsOfService",path:"/terms"}],Ad=e=>e?.legalLinks===null?[]:e?.legalLinks??Id,Mr=Ad;import{jsx as Br,jsxs as Od}from"react/jsx-runtime";var Bd=({app:e,direction:t="column",gap:o="tight"})=>{let{t:r}=Dd("dndev"),n=Md("app"),i=Mr((e||n||{}).footer),s={transition:"color var(--dur-fast) ease-out",textDecoration:"underline",textUnderlineOffset:"2px",color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"};return i.length===0?null:Od(Rd,{direction:t,gap:o,align:"stretch",children:[i.map(l=>Br(T,{path:l.path,style:s,onMouseEnter:c=>c.currentTarget.style.color="var(--primary)",onMouseLeave:c=>c.currentTarget.style.color="var(--muted-foreground)",children:Fd(r,l.label)},l.path)),Br(no,{})]})};import{useEffect as Vd}from"react";import{checkLicense as Ud}from"@donotdev/core";var zd='<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>',Or=`data:image/svg+xml,${encodeURIComponent(zd)}`;import{jsx as ao,jsxs as zr}from"react/jsx-runtime";function Y0(){let e=Ud();return Vd(()=>{e.isValid},[e.isValid]),e.isValid?null:zr("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",insetInlineEnd:"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:t=>{t.currentTarget.style.opacity="1",t.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:t=>{t.currentTarget.style.opacity="0.9",t.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[ao("img",{src:Or,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),zr("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{useEffect as _d,useState as io,useMemo as Hd}from"react";import{Stack as so,Spinner as Wd}from"@donotdev/components";import{useTranslation as jr,isFieldVisible as $d}from"@donotdev/core";import*as D from"@donotdev/crud";var H=typeof D?.useCrud=="function",Vr=D?.useEntityForm,Ur=D?.useUnsavedChangesWarning,_r=D?.useFormStore,Hr=D?.useFieldConditions,ut=D?.useCrud,Wr=D?.useCrudList,mt=D?.useCrudCardList,$r=D?.useEntityFavorites,Gr=D?.useCrudFilters,Kr=D?.useEntityWorkflow,Yr=D?.useReferenceResolver,gt=D?.DisplayFieldRenderer,qr=D?.FormFieldRenderer,Zr=D?.UploadProvider,ft=D?.EntityFilters,Jr=D?.CrudCard,Qr=D?.translateFieldLabel,Xr=D?.formatValue;import{jsx as ye,jsxs as Kd}from"react/jsx-runtime";function Gd({entity:e,id:t,t:o,className:r="",loadingMessage:n,notFoundMessage:a,viewerRole:i,excludeFields:s}){if(!H)return null;let l=N("userRole"),c=i??l,{get:d,loading:p,data:g,error:m,isAvailable:u}=ut(e),[v,y]=io(!1),[f,x]=io(null),[b,C]=io(null),{t:k}=jr([e.namespace,"crud"]),{t:A}=jr("crud"),P=o||k;_d(()=>{if(!t){C(null),x(null),y(!1);return}if(!u||!d)return;let I=!1;return y(!0),x(null),d(t).then(F=>{I||(y(!1),F?(C(F),x(null)):(C(null),x(new Error("Entity not found"))))}).catch(F=>{I||(y(!1),x(F instanceof Error?F:new Error(String(F))),C(null))}),()=>{I=!0}},[t,d,u]);let w=g||b,h=m||f,S=p||v||!t,L=Hd(()=>w?Object.entries(e.fields).filter(([I,F])=>{if(s?.includes(I)||!$d(F.visibility,c)||F.visibility==="hidden")return!1;let R=w[I];return!(R==null||typeof R=="string"&&R.trim()===""||Array.isArray(R)&&R.length===0||typeof R=="object"&&!Array.isArray(R)&&R!==null&&Object.keys(R).length===0)}):[],[e.fields,c,w,s]);return S?ye("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:r,children:ye(Wd,{overlay:!0,"aria-label":n||A("form.loading",{defaultValue:"Loading..."})})}):h||!w?ye(so,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:r,children:Kd(so,{direction:"column",gap:"tight",children:[ye("h3",{style:{color:"var(--muted-foreground)"},children:a||A("errors.notFound",{defaultValue:`${e.name} not found`})}),h&&ye("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:h instanceof Error?h.message:String(h)})]})}):ye(so,{direction:"column",className:r,children:L.map(([I,F])=>ye(gt,{name:I,config:F,value:w[I],t:P},I))})}import{RefreshCw as Yd,Plus as qd,Trash2 as Zd,Edit as Jd,Search as Qd}from"lucide-react";import{useMemo as Xd,useCallback as We,useState as lo}from"react";import{DataTable as jd,Button as co,Stack as po,ActionButton as ep,Section as en,Input as tp}from"@donotdev/components";import{useTranslation as tn}from"@donotdev/core";import{Fragment as rp,jsx as ie,jsxs as vt}from"react/jsx-runtime";function op({entity:e,basePath:t,onClick:o,hideFilters:r=!1,pagination:n="auto",pageSize:a,queryOptions:i,exportable:s=!0}){if(!H)return null;let l=Te(),c=t??`/${e.collection}`,d=Yr(e),[p,g]=lo(1),[m,u]=lo(a),[v,y]=lo(""),{data:f,items:x,processed:b,loading:C,mutate:k,effectiveMode:A}=Wr(e,{pagination:n,searchQuery:v,...i&&{queryOptions:i},...(n==="server"||n==="auto")&&{page:p,pageSize:m}}),{delete:P}=ut(e),{t:w}=tn("crud"),{t:h}=tn([e.namespace,"crud"]),S=We(async()=>{await k()},[k]),L=We(U=>{l(`${c}/${U}`)},[c,l]),I=We(U=>{o?o(U):l(`${c}/${U}`)},[c,l,o]),F=We(()=>{l(`${c}/new`)},[c,l]),R=We(async U=>{await P(U)},[P]),Ee=Xd(()=>{let be=(e.listFields||Object.keys(e.fields)).map(ee=>{let te=e.fields[ee];if(!te)return null;let ue=Qr(ee,te,h),Ie=te.type||"text";return{key:ee,title:ue,dataIndex:ee,sortable:!0,filterable:!0,align:Ie==="number"||Ie==="range"?"end":"start",render:(Ae,Re)=>Xr(Ae,te,h,{compact:!0,referenceData:d})}}).filter(Boolean);return be.unshift({key:"_actions",title:w("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(ee,te)=>vt(po,{direction:"row",gap:"tight",align:"center",justify:"center",children:[ie(co,{variant:"outline",icon:Jd,onClick:ue=>{ue.stopPropagation(),L(te.id)},"aria-label":w("edit",{defaultValue:"Edit"})}),ie(ep,{action:async()=>{await R(te.id)},confirmText:w("delete.confirm",{defaultValue:"Are you sure you want to delete this item?"}),confirmTitle:w("delete.title",{defaultValue:"Delete Item"}),loadingText:w("delete.loading",{defaultValue:"Deleting..."}),variant:"destructive",icon:Zd,"aria-label":w("delete",{defaultValue:"Delete"}),children:w("delete",{defaultValue:"Delete"})})]})}),be},[e,h,w,L,R]),j=h("name",{defaultValue:e.name}),Ne=b.length;return vt(rp,{children:[ie(en,{title:w("filters.title",{entity:j,defaultValue:`Browse ${j} - Filters`}),collapsible:!0,defaultOpen:!0,children:vt(po,{children:[vt(po,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[ie(tp,{placeholder:w("search.placeholder",{defaultValue:"Search..."}),value:v,onChange:U=>y(U.target.value),icon:Qd,className:"dndev-w-full"}),ie(co,{icon:Yd,variant:"outline",onClick:S,disabled:C,display:"compact","aria-label":w("refresh",{defaultValue:"Refresh"})}),ie(co,{icon:qd,onClick:F,display:"compact",children:w("addNew",{defaultValue:"Add New"})})]}),!r&&ie(ft,{entity:e,data:x,fieldsToFilter:e.listFields})]})}),ie(en,{title:C?w("results.title.fetching",{defaultValue:"Fetching..."}):w("results.title.count",{count:Ne,defaultValue:Ne===1?"Found 1 occurrence":`Found ${Ne} occurrences`}),collapsible:!0,defaultOpen:!0,children:ie(jd,{data:b,columns:Ee,sortable:!0,searchable:!1,pagination:!0,loading:C,onRowClick:U=>I(U.id),showingLabel:w("pagination.showing",{defaultValue:"Showing {{from}} to {{to}} of {{total}} entries"}),paginationPreviousLabel:w("pagination.previous",{defaultValue:"Previous"}),paginationNextLabel:w("pagination.next",{defaultValue:"Next"}),paginationItemsPerPagePlaceholder:w("pagination.itemsPerPagePlaceholder",{defaultValue:"Items per page"}),...a&&{pageSize:a},...A==="server"&&{currentPage:p,pageSize:m,total:f?.total,onPageChange:g,onPageSizeChange:u},exportable:s,exportFilename:`${e.collection}-export`,exportLabel:w("export",{defaultValue:"Export"})})})]})}import{Heart as rn}from"lucide-react";import{useMemo as nn,useCallback as np}from"react";import{Card as ap,Grid as ip,Stack as uo,Text as an,Spinner as sp,Section as sn,Button as lp}from"@donotdev/components";import{useTranslation as ln,getListCardFieldNames as cp}from"@donotdev/core";import{jsx as on}from"react/jsx-runtime";function ht({detailHref:e,onClick:t,...o}){if(!H)return null;let r=on(Jr,{...o,onClick:e?void 0:t});return e?on(T,{path:e,"aria-label":o.item?.id?`View ${o.item.id}`:void 0,children:r}):r}import{Fragment as pp,jsx as $,jsxs as mo}from"react/jsx-runtime";function dp({entity:e,basePath:t,onClick:o,cols:r=[1,2,3,4],staleTime:n=1e3*60*30,filter:a,hideFilters:i=!1,resultLabel:s,tone:l}){if(!H)return null;let c=Te(),d=t??`/${e.collection}`,{items:p,processed:g,loading:m}=mt(e,{staleTime:n}),{isFavorite:u,toggleFavorite:v,favoritesFilter:y}=$r({collection:e.collection}),{showFavoritesOnly:f,setShowFavoritesOnly:x}=Gr({collection:e.collection}),b=nn(()=>{let h=g;return f&&(h=h.filter(y)),a&&(h=h.filter(a)),h},[g,f,y,a]),{t:C}=ln([e.namespace,"crud"]),{t:k}=ln("crud"),A=np(h=>{o?o(h):c(`${d}/${h}`)},[d,c,o]),P=nn(()=>cp(e),[e]),w=C("name",{defaultValue:e.name});return mo(pp,{children:[!i&&$(sn,{title:k("filters.title",{entity:w,defaultValue:`Browse ${w} - Filters`}),collapsible:!0,defaultOpen:!0,tone:l,children:$(ap,{children:mo(uo,{direction:"column",children:[$(lp,{variant:f?"primary":"outline",icon:$(rn,{size:18}),onClick:()=>x(!f),children:f?k("favorites.showAll",{defaultValue:"Show All"}):k("favorites.showFavorites",{defaultValue:"Show Favorites"})}),$(ft,{entity:e,data:p,fieldsToFilter:P})]})})}),$(sn,{title:m?k("results.title.fetching",{defaultValue:"Fetching..."}):s?s(b.length):k("results.title.count",{count:b.length,defaultValue:b.length===1?"Found 1 occurrence":`Found ${b.length} occurrences`}),collapsible:!0,defaultOpen:!0,tone:l,children:m?$(uo,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:$(sp,{})}):b.length===0?mo(uo,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[$(an,{level:"h3",style:{color:"var(--muted-foreground)"},children:k("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),$(an,{style:{color:"var(--muted-foreground)"},children:k("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):$(ip,{cols:r,children:b.map(h=>{let S=u(h.id),L=o?void 0:`${d}/${h.id}`;return $(ht,{item:h,entity:e,detailHref:L,onClick:o?()=>A(h.id):void 0,renderActions:$(rn,{fill:S?"#ef4444":"#ffffff",stroke:S?"#ef4444":"var(--muted-foreground)",onClick:I=>{I.preventDefault(),I.stopPropagation(),v(h.id)},style:{cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":S?k("favorites.remove",{defaultValue:"Remove from favorites"}):k("favorites.add",{defaultValue:"Add to favorites"})})},h.id)})})})]})}import{useEffect as cn,useId as up,useMemo as yt,useState as mp}from"react";import{FormProvider as gp}from"react-hook-form";import{Badge as fp,Button as bt,DropdownMenu as vp,Grid as hp,Stack as yp,Spinner as bp}from"@donotdev/components";import{hasRoleAccess as Sp,useTranslation as dn}from"@donotdev/core";import{jsx as Y,jsxs as St}from"react/jsx-runtime";function go({entity:e,onSubmit:t,t:o,className:r="",submitText:n,loading:a=!1,defaultValues:i,submitVariant:s="primary",secondaryButtonText:l,secondaryButtonVariant:c="outline",onSecondarySubmit:d,viewerRole:p,operation:g=i?"edit":"create",formId:m,cancelText:u,cancelPath:v,successPath:y,onCancel:f,warnOnUnsavedChanges:x=!0,unsavedChangesMessage:b,hideVisibilityInfo:C=!1}){if(!H)return null;let k=Te(),A=N("userRole"),P=p??A,w=up(),h=m??`entity-form-${e.name}-${w}`,{t:S}=dn([e.namespace,"crud"]),{t:L}=dn("crud"),I=o||S,R=!C&&(P==="admin"||P==="super"),Ee=P==="user"||P==="admin"||P==="super",[j,Ne]=mp(P==="admin"||P==="super"||P==="user"?P:"guest"),U={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},be=["guest","user","admin","super"],ee={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},te=yt(()=>be.filter(E=>Sp(P,E)).map(E=>({label:ee[E],checked:j===E,onClick:()=>Ne(E)})),[j,P]),ue=Vr(e,{formId:h,operation:g,defaultValues:i,viewerRole:P,t:I}),{control:Ie,handleSubmit:fo,formState:{errors:vo},fields:Ae,formStatus:Re,uploadProgress:De,cleanup:ho,isDirty:vn,hasUserInteracted:hn,resetForm:yn}=ue,wt=vn&&hn,yo=yt(()=>{if(!Ee)return Ae;let E=be.indexOf(j);return Ae.filter(({config:O})=>{let oe=O.visibility;return oe==="hidden"?!1:oe==="technical"?!0:be.indexOf(oe)<=E})},[Ae,Ee,j]),bn=Hr(yo,Ie);cn(()=>{h&&_r.getState().setIsDirty(h,wt)},[h,wt]),cn(()=>ho,[ho]);let Sn=yt(()=>b||L("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[b,L]);Ur({isDirty:wt,enabled:x,message:Sn});let Cn=()=>{yn(),f?f():k(v||"back")},xn=async E=>{try{await t(E),k(y||"back")}catch{}},wn=u!==null,bo=u??L("form.cancel",{defaultValue:"Cancel"}),So={gridColumn:"1 / -1",position:"sticky",bottom:0,backgroundColor:"var(--background)",borderTop:"1px solid var(--border)",paddingTop:"var(--gap-md)",paddingBottom:"var(--gap-md)",zIndex:10,marginTop:"var(--gap-lg)"},Tn=a||g==="edit"&&!i,se=yt(()=>Re==="uploading"?{loading:!0,loadingText:De<100?L("form.uploading",{progress:Math.round(De),defaultValue:`Uploading ${Math.round(De)}%...`}):L("form.processing",{defaultValue:"Processing..."}),progress:De}:Re==="validating"?{loading:!0,loadingText:L("form.validating",{defaultValue:"Validating..."})}:Re==="submitting"?{loading:!0,loadingText:L("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[Re,De,L]);return Y(gp,{...ue,children:Y(Zr,{formId:h,children:St("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[Tn&&Y(bp,{overlay:!0}),St("form",{onSubmit:fo(xn),noValidate:!0,className:r,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[yo.map(({name:E,config:O,editable:oe})=>{let G=bn[E];if(G&&!G.visible)return null;let Co=G?{...O,...G.required&&O.validation?{validation:{...O.validation,required:!0}}:G.required?{validation:{required:!0}}:{}}:O,kn=oe&&!G?.disabled&&!G?.readonly,Ln=R&&O.visibility!=="guest",Pn=O.visibility!=="hidden"?U[O.visibility]:void 0,En=ee[O.visibility]??O.visibility,xo=kn?Y(qr,{name:E,config:Co,control:Ie,errors:vo,t:I},E):Y(gt,{name:E,config:Co,value:i?.[E],t:I},E);return Ln?St("div",{style:{position:"relative"},children:[Y(fp,{as:"span",variant:Pn,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:En}),xo]},E):xo}),(()=>{let E=[];if(wn&&bo&&E.push(Y(bt,{type:"button",onClick:Cn,disabled:se.loading,variant:"outline",className:"dndev-w-full",children:bo},"cancel")),Ee){let G=U[j]||"muted";E.push(Y(vp,{trigger:St(bt,{type:"button",variant:G,disabled:se.loading,className:"dndev-w-full",children:[L("visibility.preview",{defaultValue:"Preview"}),": ",ee[j]]}),items:te},"preview"))}l&&E.push(Y(bt,{type:"button",onClick:()=>{if(d){let G=ue.getValues();d(G)}},loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:c,className:"dndev-w-full",children:l},"secondary")),E.push(Y(bt,{type:"submit",loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:s,className:"dndev-w-full",children:n||L("form.submit",{defaultValue:"Submit"})},"submit"));let O=E.length;if(O===1)return Y(yp,{direction:"column",gap:"tight",style:So,children:E[0]});let oe=O===2?"1fr 2fr":O===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr";return Y(hp,{cols:["1fr",oe,oe,oe],gap:"tight",style:So,children:E})})()]})]})})})}import{Section as Cp}from"@donotdev/components";import{jsx as pn}from"react/jsx-runtime";function xp({entity:e,queryOptions:t,title:o,basePath:r,cols:n=3,className:a}){if(!H)return null;let{items:i,loading:s}=mt(e,{queryOptions:t});if(!s&&i.length===0)return null;let l=r??`/${e.collection}`;return pn(Cp,{title:o,gridCols:n,className:a,children:i.map(c=>pn(ht,{item:c,entity:e,detailHref:`${l}/${c.id}`},c.id))})}import{Button as wp,Stack as Tp,Stepper as kp}from"@donotdev/components";import{useTranslation as Lp}from"@donotdev/core";import{Fragment as Ep,jsx as Ct,jsxs as Np}from"react/jsx-runtime";function Pp({workflow:e,onComplete:t,onStepChange:o,defaultValues:r,viewerRole:n,children:a,className:i}){if(!H)return null;let{t:s}=Lp("crud"),l=Kr(e,{onComplete:t,onStepChange:o,defaultValues:r});if(a)return Ct(Ep,{children:a(l)});let{currentStep:c,currentStepIndex:d,visibleSteps:p,isFirst:g,isLast:m,isSubmitting:u,stepData:v}=l,y=p.map((f,x)=>({number:x+1,title:f.title,content:null}));return Np(Tp,{className:i,gap:"large",children:[Ct(kp,{steps:y,activeStep:d,showStepNumbers:!0,onStepChange:f=>{f<=d&&l.goToStep(f)}}),c.custom?c.custom(l.allData):c.entity?Ct(go,{entity:c.entity,operation:"create",viewerRole:n,defaultValues:{...v[c.id],...!m&&{status:"draft"}},onSubmit:async f=>{await l.goNext(f)},submitText:m?s("workflow.submit",{defaultValue:"Submit"}):s("workflow.next",{defaultValue:"Next"}),cancelText:g?null:s("workflow.previous",{defaultValue:"Previous"}),onCancel:g?void 0:l.goPrevious,loading:u,warnOnUnsavedChanges:!1,hideVisibilityInfo:!0}):null,c.allowSkip&&!m&&Ct(wp,{variant:"ghost",onClick:l.skipStep,className:"dndev-w-full",children:s("workflow.skip",{defaultValue:"Skip this step"})})]})}import{createContext as mn,useId as Ip,use as un}from"react";import{Controller as Ap,FormProvider as Rp,useFormContext as Dp}from"react-hook-form";import{Label as Fp,Slot as Mp,cn as Bp,Stack as Op}from"@donotdev/components";import{jsx as pe}from"react/jsx-runtime";var qv=Rp,gn=mn({}),Zv=({...e})=>pe(gn.Provider,{value:{name:e.name},children:pe(Ap,{...e})}),fn=mn({}),Jv=({className:e,...t})=>{let o=Ip();return pe(fn.Provider,{value:{id:o},children:pe(Op,{className:e,...t})})},xt=()=>{let e=un(gn);if(!e||!e.name)return null;let t=un(fn);if(!t)return null;let{getFieldState:o,formState:r}=Dp(),n=o(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...n}},Qv=({className:e,...t})=>{let o=xt();if(!o)return null;let{error:r,formItemId:n}=o;return pe(Fp,{className:Bp(r&&"text-destructive",e),htmlFor:n,...t})},Xv=({...e})=>{let t=xt();if(!t)return null;let{error:o,formItemId:r,formDescriptionId:n,formMessageId:a}=t;return pe(Mp,{id:r,"aria-describedby":o?`${n} ${a}`:`${n}`,"aria-invalid":!!o,...e})},jv=({className:e,...t})=>{let o=xt();if(!o)return null;let{formDescriptionId:r}=o;return pe("p",{id:r,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},e3=({className:e,children:t,...o})=>{let r=xt();if(!r)return null;let{error:n,formMessageId:a}=r,i=n?String(n?.message):t;return i?pe("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var zp={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"},Vp={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},p3={...zp,...Vp},u3={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"},m3={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{Wl as AppBranding,Kl as AppIcon,fs as AppLoading,Zl as AppTitle,_ as AssetResolver,Wn as AuthGuard,Yu as AuthGuardFallback,Vt as AuthHeader,Ot as AuthMenu,sc as Breadcrumbs,Jt as CacheSettings,uf as ConsentBanner,_o as DnDevNavigationMenu,Pc as DropdownNavigation,dp as EntityCardList,Gd as EntityDisplayRenderer,go as EntityFormRenderer,op as EntityList,xp as EntityRecommendations,Pp as EntityWorkflow,cl as FeatureCard,Ts as FeatureDisabled,Ac as FloatingLanguageSwitcher,no as FooterBranding,Ed as FooterCopyright,Bd as FooterLegalLinks,qv as Form,Xv as FormControl,jv as FormDescription,Zv as FormField,Jv as FormItem,Qv as FormLabel,e3 as FormMessage,hf as GameContainer,Cf as GameFlow,pc as GameTitle,ju as GoTo,Ya as GoToInput,za as GoToWrapper,Oc as HeaderMenu,$c as HeaderNavigation,Nn as Icon,Y0 as LicenseWatermark,T as Link,Ge as Loader,Os as LoadingContainerOverlay,nt as LoadingMessage,Es as LoadingMessageAlmostDone,Ns as LoadingMessageComplete,Ds as LoadingMessageConnecting,Ps as LoadingMessageProcessing,Is as LoadingMessageSaving,Rs as LoadingMessageSearching,Ls as LoadingMessageSimple,As as LoadingMessageUploading,zs as LoadingOverlay,_s as LoadingScreen,Ho as NotFoundPage,td as Notifications,Ze as PageContainer,el as ProgressBar,Qs as RedirectOverlay,md as SettingsMenu,rl as Skeleton,Il as TechBento,Sd as ThemeToggle,p3 as allLayoutClasses,fu as createAuthConfig,m3 as cssVariables,Up as isAuthAvailable,um as isBillingAvailable,Sm as isCrudAvailable,im as isFormStoreAvailable,Tm as isOAuthAvailable,zp as layoutClasses,Vp as layoutUtilities,u3 as layoutVariables,rm as resolveFaviconSet,om as resolveLogo,Le as sanitizeSvg,Nm as tList,Gt as techLogos,N as useAuthSafe,mu as useAuthState,je as useAuthVisibility,W1 as useBack,vm as useBillingVisibility,du as useCanAccess,$n as useCanNavigate,bm as useCrudSafe,xt as useFormField,ui as useFormStoreSafe,_p as useGoTo,uu as useHasRole,K1 as useLocation,J1 as useMatch,Te as useNavigate,Z as useNavigationItems,wo as useNavigationRoute,wm as useOAuthSafe,Y1 as useParams,G1 as usePrefetch,Q1 as useQueryParams,X1 as useRedirectGuard,$1 as useRefresh,q1 as useRouteParam,Z1 as useSearchParams,Ft as useStripeBillingSafe,pu as useUserRole,gu as withAuth};
|
package/dist/styles/index.css
CHANGED
|
@@ -836,7 +836,8 @@ em {
|
|
|
836
836
|
|
|
837
837
|
.dndev-input[data-variant='destructive']:focus {
|
|
838
838
|
border-color: var(--destructive);
|
|
839
|
-
box-shadow: 0 0 0 3px
|
|
839
|
+
box-shadow: 0 0 0 3px
|
|
840
|
+
color-mix(in oklab, var(--destructive) 50%, transparent);
|
|
840
841
|
}
|
|
841
842
|
|
|
842
843
|
.dndev-input[data-variant='destructive']:focus-visible {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donotdev/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"react-hook-form": "^7.71.2"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@donotdev/auth": "^0.0.
|
|
62
|
-
"@donotdev/billing": "^0.0.
|
|
63
|
-
"@donotdev/components": "^0.0.
|
|
64
|
-
"@donotdev/core": "^0.0.
|
|
65
|
-
"@donotdev/crud": "^0.0.
|
|
66
|
-
"@donotdev/oauth": "^0.0.
|
|
61
|
+
"@donotdev/auth": "^0.0.20",
|
|
62
|
+
"@donotdev/billing": "^0.0.17",
|
|
63
|
+
"@donotdev/components": "^0.0.28",
|
|
64
|
+
"@donotdev/core": "^0.0.39",
|
|
65
|
+
"@donotdev/crud": "^0.0.27",
|
|
66
|
+
"@donotdev/oauth": "^0.0.17",
|
|
67
67
|
"lucide-react": "^0.575.0",
|
|
68
68
|
"react": "^19.2.4",
|
|
69
69
|
"react-dom": "^19.2.4",
|
|
@@ -85,9 +85,6 @@
|
|
|
85
85
|
},
|
|
86
86
|
"react-router-dom": {
|
|
87
87
|
"optional": true
|
|
88
|
-
},
|
|
89
|
-
"routing": {
|
|
90
|
-
"optional": true
|
|
91
88
|
}
|
|
92
89
|
},
|
|
93
90
|
"repository": {
|