@velastack/patterns 0.0.34 → 0.0.35
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/chunks/{collections-Czm1C8ow.js → collections-DRN-8nW0.js} +2 -2
- package/dist/chunks/collections-DRN-8nW0.js.map +1 -0
- package/dist/chunks/{generate.runtime-y1Ga_5QI.js → generate.runtime--31y_UK2.js} +2 -2
- package/dist/chunks/{generate.runtime-y1Ga_5QI.js.map → generate.runtime--31y_UK2.js.map} +1 -1
- package/dist/chunks/{generate.runtime-BZ-KaCUr.js → generate.runtime-BVss5za4.js} +28 -19
- package/dist/chunks/generate.runtime-BVss5za4.js.map +1 -0
- package/dist/chunks/{generate.runtime-BCz-NNqq.js → generate.runtime-CZKIdbEC.js} +2 -2
- package/dist/chunks/{generate.runtime-BCz-NNqq.js.map → generate.runtime-CZKIdbEC.js.map} +1 -1
- package/dist/chunks/{write-result-B0-q-egx.js → write-result-CqSY1Bww.js} +19 -9
- package/dist/chunks/{write-result-B0-q-egx.js.map → write-result-CqSY1Bww.js.map} +1 -1
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/collections-Czm1C8ow.js.map +0 -1
- package/dist/chunks/generate.runtime-BZ-KaCUr.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-result-B0-q-egx.js","names":[],"sources":["../../src/ui/components/auth-menu/auth-menu-content.svelte?raw","../../src/ui/components/auth-menu/auth-menu-group.svelte?raw","../../src/ui/components/auth-menu/auth-menu-item.svelte?raw","../../src/ui/components/auth-menu/auth-menu-label.svelte?raw","../../src/ui/components/auth-menu/auth-menu-separator.svelte?raw","../../src/ui/components/auth-menu/auth-menu-trigger.svelte?raw","../../src/ui/components/auth-menu/auth-menu.svelte?raw","../../src/ui/components/auth-menu/context.ts?raw","../../src/ui/components/auth-menu/index.ts?raw","../../src/ui/components/cells/autodate.svelte?raw","../../src/ui/components/cells/bool.svelte?raw","../../src/ui/components/cells/date.svelte?raw","../../src/ui/components/cells/editor.svelte?raw","../../src/ui/components/cells/email.svelte?raw","../../src/ui/components/cells/file.svelte?raw","../../src/ui/components/cells/geoPoint.svelte?raw","../../src/ui/components/cells/index.ts?raw","../../src/ui/components/cells/json.svelte?raw","../../src/ui/components/cells/number.svelte?raw","../../src/ui/components/cells/password.svelte?raw","../../src/ui/components/cells/relation.svelte?raw","../../src/ui/components/cells/select.svelte?raw","../../src/ui/components/cells/text.svelte?raw","../../src/ui/components/cells/url.svelte?raw","../../src/ui/components/column-header/column-header.svelte?raw","../../src/ui/components/column-header/index.ts?raw","../../src/ui/components/faceted-filter/faceted-filter.svelte?raw","../../src/ui/components/faceted-filter/index.ts?raw","../../src/ui/components/file-form/file-field.svelte?raw","../../src/ui/components/file-form/file-input.svelte?raw","../../src/ui/components/file-form/file-multiple.svelte?raw","../../src/ui/components/file-form/file-single.svelte?raw","../../src/ui/components/file-form/file-thumb.svelte?raw","../../src/ui/components/file-form/index.ts?raw","../../src/ui/components/file-form/shared.ts?raw","../../src/ui/components/geopoint/coordinate.svelte?raw","../../src/ui/components/geopoint/index.ts?raw","../../src/ui/components/geopoint/input.svelte?raw","../../src/ui/components/geopoint/toggle-map.svelte?raw","../../src/ui/components/leaflet/index.ts?raw","../../src/ui/components/leaflet/leaflet.svelte?raw","../../src/ui/components/multiselect/chip.svelte?raw","../../src/ui/components/multiselect/content.svelte?raw","../../src/ui/components/multiselect/field.svelte?raw","../../src/ui/components/multiselect/index.ts?raw","../../src/ui/components/multiselect/input.svelte?raw","../../src/ui/components/multiselect/item.svelte?raw","../../src/ui/components/multiselect/trigger.svelte?raw","../../src/ui/components/pagination/index.ts?raw","../../src/ui/components/pagination/pagination.svelte?raw","../../src/ui/components/row-actions/index.ts?raw","../../src/ui/components/row-actions/row-actions.svelte?raw","../../src/runtime/write-result.ts"],"sourcesContent":["export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: DropdownMenuPrimitive.ContentProps & {\\n\\t\\tportalProps?: DropdownMenuPrimitive.PortalProps;\\n\\t} = $props();\\n\\n\\tlet { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Content class={className} {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Content>\\n{:else}\\n\\t<div class={cn('flex flex-col w-full', className)}>\\n\\t\\t{@render children?.()}\\n\\t</div>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet { children, ...restProps } = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Group {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Group>\\n{:else}\\n\\t{@render children?.()}\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { goto } from '$app/navigation';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { children, href = undefined, ...restProps } = $props();\\n\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\n\\tconst handleClick = () => {\\n\\t\\tif (restProps.onclick) {\\n\\t\\t\\trestProps.onclick();\\n\\t\\t} else {\\n\\t\\t\\tif (href) {\\n\\t\\t\\t\\tgoto(href);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Item {...restProps} onclick={handleClick}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Item>\\n{:else}\\n\\t<Button\\n\\t\\tclass=\\\"w-full justify-start md:justify-center md:w-auto\\\"\\n\\t\\tvariant=\\\"ghost\\\"\\n\\t\\t{href}\\n\\t\\t{...restProps}\\n\\t>\\n\\t\\t{@render children?.()}\\n\\t</Button>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet { children, ...restProps } = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Label {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Label>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet restProps = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Separator {...restProps} />\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { class: className = '', ...restProps } = $props();\\n\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Trigger class={cn('inline-flex', className)} {...restProps} />\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { page } from '$app/state';\\n\\timport { browser } from '$app/environment';\\n\\timport { onMount, setContext } from 'svelte';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\n\\tlet { user, guest } = $props();\\n\\n\\tconst breakpoint = 768;\\n\\tconst breakpointQuery = `(min-width: ${breakpoint}px)`;\\n\\n\\tlet hasMounted = $state(false);\\n\\tlet authMenuContext = $state<AuthMenuContext>({ isDesktop: true });\\n\\n\\tsetContext(AUTH_MENU_CONTEXT_KEY, authMenuContext);\\n\\n\\tfunction updateIsDesktop() {\\n\\t\\tif (!browser) return;\\n\\t\\tauthMenuContext.isDesktop = window.matchMedia(breakpointQuery).matches;\\n\\t}\\n\\n\\tonMount(() => {\\n\\t\\tupdateIsDesktop();\\n\\t\\thasMounted = true;\\n\\t\\tconst mq = window.matchMedia(breakpointQuery);\\n\\t\\tconst listener = () => (authMenuContext.isDesktop = mq.matches);\\n\\t\\tmq.addEventListener('change', listener);\\n\\t\\treturn () => mq.removeEventListener('change', listener);\\n\\t});\\n</script>\\n\\n{#if page.data.user}\\n\\t{#if authMenuContext.isDesktop}\\n\\t\\t<DropdownMenu.Root>\\n\\t\\t\\t{@render user?.()}\\n\\t\\t</DropdownMenu.Root>\\n\\t{:else}\\n\\t\\t<!-- This prevents the menu from being rendered twice before we know if we're on desktop or not -->\\n\\t\\t{#if hasMounted}\\n\\t\\t\\t{@render user?.()}\\n\\t\\t{/if}\\n\\t{/if}\\n{:else}\\n\\t{@render guest?.()}\\n{/if}\\n\"","export default \"export type AuthMenuContext = {\\n isDesktop: boolean;\\n};\\n\\nexport const AUTH_MENU_CONTEXT_KEY = Symbol(\\\"auth-menu-context\\\");\\n\"","export default \"import Root from \\\"./auth-menu.svelte\\\";\\nimport Content from \\\"./auth-menu-content.svelte\\\";\\nimport Trigger from \\\"./auth-menu-trigger.svelte\\\";\\nimport Group from \\\"./auth-menu-group.svelte\\\";\\nimport Label from \\\"./auth-menu-label.svelte\\\";\\nimport Separator from \\\"./auth-menu-separator.svelte\\\";\\nimport Item from \\\"./auth-menu-item.svelte\\\";\\n\\nexport { Root, Content, Trigger, Group, Label, Separator, Item };\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{new Date(value).toLocaleDateString()}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: boolean | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value ? 'Yes' : 'No'}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{new Date(value).toLocaleDateString()}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport FileIcon from '@lucide/svelte/icons/file';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tcollectionId,\\n\\t\\tid,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\tcollectionId: string;\\n\\t\\tid: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{#if Array.isArray(value)}\\n\\t\\t\\t{#each value.slice(0, 2) as filename}\\n\\t\\t\\t\\t{#if ['.jpg', '.png', '.jpeg', '.webp', '.gif'].some((ext) => filename.endsWith(ext))}\\n\\t\\t\\t\\t\\t<img\\n\\t\\t\\t\\t\\t\\tsrc=\\\"/api/files/{collectionId}/{id}/{filename}\\\"\\n\\t\\t\\t\\t\\t\\tclass=\\\"w-8 h-8 rounded-sm object-cover inline-block mr-2\\\"\\n\\t\\t\\t\\t\\t\\talt={filename}\\n\\t\\t\\t\\t\\t\\ttitle={filename}\\n\\t\\t\\t\\t\\t/>\\n\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t<div\\n\\t\\t\\t\\t\\t\\tclass=\\\"inline-flex items-center justify-center w-8 h-8 bg-muted rounded-sm mr-2\\\"\\n\\t\\t\\t\\t\\t\\ttitle={filename}\\n\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t{/each}\\n\\t\\t\\t{#if value.length > 2}\\n\\t\\t\\t\\tand {value.length - 2} more files\\n\\t\\t\\t{/if}\\n\\t\\t{:else if ['.jpg', '.png', '.jpeg', '.webp', '.gif'].some((ext) => value.endsWith(ext))}\\n\\t\\t\\t<img\\n\\t\\t\\t\\tsrc=\\\"/api/files/{collectionId}/{id}/{value}\\\"\\n\\t\\t\\t\\tclass=\\\"w-8 h-8 rounded-sm object-cover\\\"\\n\\t\\t\\t\\talt={value}\\n\\t\\t\\t\\ttitle={value}\\n\\t\\t\\t/>\\n\\t\\t{:else}\\n\\t\\t\\t<div\\n\\t\\t\\t\\tclass=\\\"inline-flex items-center justify-center w-8 h-8 bg-muted rounded-sm\\\"\\n\\t\\t\\t\\ttitle={value}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t</div>\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport MapPinIcon from '@lucide/svelte/icons/map-pin';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: { lat: number; lon: number } | undefined;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center space-x-1', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t<MapPinIcon class=\\\"inline-block w-4 h-4 text-muted-foreground\\\" />\\n\\t\\t<span>{value.lat.toFixed(6)}, {value.lon.toFixed(6)}</span>\\n\\t{/if}\\n</div>\\n\"","export default \"export { default as AutodateCell } from \\\"./autodate.svelte\\\";\\nexport { default as BoolCell } from \\\"./bool.svelte\\\";\\nexport { default as DateCell } from \\\"./date.svelte\\\";\\nexport { default as EditorCell } from \\\"./editor.svelte\\\";\\nexport { default as EmailCell } from \\\"./email.svelte\\\";\\nexport { default as FileCell } from \\\"./file.svelte\\\";\\nexport { default as GeoPointCell } from \\\"./geoPoint.svelte\\\";\\nexport { default as JsonCell } from \\\"./json.svelte\\\";\\nexport { default as NumberCell } from \\\"./number.svelte\\\";\\nexport { default as PasswordCell } from \\\"./password.svelte\\\";\\nexport { default as RelationCell } from \\\"./relation.svelte\\\";\\nexport { default as SelectCell } from \\\"./select.svelte\\\";\\nexport { default as TextCell } from \\\"./text.svelte\\\";\\nexport { default as UrlCell } from \\\"./url.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: any } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value !== undefined}\\n\\t\\t{JSON.stringify(value)}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: number | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>********</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\texpanded,\\n\\t\\tdisplayField = 'id',\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\texpanded: any;\\n\\t\\tdisplayField?: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if expanded}\\n\\t\\t{#if Array.isArray(expanded)}\\n\\t\\t\\t{#each expanded.slice(0, 2) as item}\\n\\t\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t{item[displayField]}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/each}\\n\\t\\t\\t{#if expanded.length > 2}\\n\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t+{expanded.length - 2}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/if}\\n\\t\\t{:else}\\n\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t{expanded[displayField]}\\n\\t\\t\\t</Badge>\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\toptions,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\toptions: Record<string, { label: string; value: string }>;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{#if Array.isArray(value)}\\n\\t\\t\\t{#each value.slice(0, 2) as item}\\n\\t\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t{options[item].label}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/each}\\n\\t\\t{:else}\\n\\t\\t\\t{options[value].label}\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\ttarget = '_blank',\\n\\t\\trel = 'noopener noreferrer',\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string | undefined;\\n\\t\\ttarget?: string;\\n\\t\\trel?: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t<a href={value} {target} {rel}>{value}</a>\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport type { Column } from '@tanstack/table-core';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport ArrowUpIcon from '@lucide/svelte/icons/arrow-up';\\n\\timport ArrowDownIcon from '@lucide/svelte/icons/arrow-down';\\n\\timport ChevronsUpDownIcon from '@lucide/svelte/icons/chevrons-up-down';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tcolumn,\\n\\t\\ttitle,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { column: Column<any>; title: string } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n{#if !column?.getCanSort()}\\n\\t<div class={className} {...restProps}>\\n\\t\\t{title}\\n\\t</div>\\n{:else}\\n\\t<div class={cn('flex items-center', className)} {...restProps}>\\n\\t\\t<DropdownMenu.Root>\\n\\t\\t\\t<DropdownMenu.Trigger>\\n\\t\\t\\t\\t{#snippet child({ props })}\\n\\t\\t\\t\\t\\t<Button\\n\\t\\t\\t\\t\\t\\t{...props}\\n\\t\\t\\t\\t\\t\\tvariant=\\\"ghost\\\"\\n\\t\\t\\t\\t\\t\\tsize=\\\"sm\\\"\\n\\t\\t\\t\\t\\t\\tclass=\\\"data-[state=open]:bg-accent -ml-3 h-8\\\"\\n\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t<span>\\n\\t\\t\\t\\t\\t\\t\\t{title}\\n\\t\\t\\t\\t\\t\\t</span>\\n\\t\\t\\t\\t\\t\\t{#if column.getIsSorted() === 'desc'}\\n\\t\\t\\t\\t\\t\\t\\t<ArrowDownIcon />\\n\\t\\t\\t\\t\\t\\t{:else if column.getIsSorted() === 'asc'}\\n\\t\\t\\t\\t\\t\\t\\t<ArrowUpIcon />\\n\\t\\t\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t\\t\\t<ChevronsUpDownIcon />\\n\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t</Button>\\n\\t\\t\\t\\t{/snippet}\\n\\t\\t\\t</DropdownMenu.Trigger>\\n\\t\\t\\t<DropdownMenu.Content align=\\\"start\\\">\\n\\t\\t\\t\\t<DropdownMenu.Item onclick={() => column.toggleSorting(false)}>\\n\\t\\t\\t\\t\\t<ArrowUpIcon class=\\\"text-muted-foreground/70 mr-2 size-3.5\\\" />\\n\\t\\t\\t\\t\\tAsc\\n\\t\\t\\t\\t</DropdownMenu.Item>\\n\\t\\t\\t\\t<DropdownMenu.Item onclick={() => column.toggleSorting(true)}>\\n\\t\\t\\t\\t\\t<ArrowDownIcon class=\\\"text-muted-foreground/70 mr-2 size-3.5\\\" />\\n\\t\\t\\t\\t\\tDesc\\n\\t\\t\\t\\t</DropdownMenu.Item>\\n\\t\\t\\t</DropdownMenu.Content>\\n\\t\\t</DropdownMenu.Root>\\n\\t</div>\\n{/if}\\n\"","export default \"export { default as ColumnHeader } from \\\"./column-header.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"TData, TValue\\\">\\n\\timport type { Component } from 'svelte';\\n\\timport { SvelteSet } from 'svelte/reactivity';\\n\\timport type { Column } from '@tanstack/table-core';\\n\\timport CirclePlusIcon from '@lucide/svelte/icons/circle-plus';\\n\\timport CheckIcon from '@lucide/svelte/icons/check';\\n\\timport * as Command from '$lib/components/ui/command';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport { Separator } from '$lib/components/ui/separator';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tcolumn,\\n\\t\\ttitle,\\n\\t\\toptions\\n\\t}: {\\n\\t\\tcolumn: Column<TData, TValue>;\\n\\t\\ttitle: string;\\n\\t\\toptions: {\\n\\t\\t\\tlabel: string;\\n\\t\\t\\tvalue: string;\\n\\t\\t\\ticon?: Component;\\n\\t\\t}[];\\n\\t} = $props();\\n\\n\\tconst facets = $derived(column?.getFacetedUniqueValues());\\n\\tconst selectedValues = $derived(new SvelteSet(column?.getFilterValue() as string[]));\\n</script>\\n\\n<Popover.Root>\\n\\t<Popover.Trigger>\\n\\t\\t{#snippet child({ props })}\\n\\t\\t\\t<Button {...props} variant=\\\"outline\\\" size=\\\"sm\\\" class=\\\"h-8 border-dashed\\\">\\n\\t\\t\\t\\t<CirclePlusIcon />\\n\\t\\t\\t\\t{title}\\n\\t\\t\\t\\t{#if selectedValues.size > 0}\\n\\t\\t\\t\\t\\t<Separator orientation=\\\"vertical\\\" class=\\\"mx-2 h-4\\\" />\\n\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal lg:hidden\\\">\\n\\t\\t\\t\\t\\t\\t{selectedValues.size}\\n\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t<div class=\\\"hidden space-x-1 lg:flex\\\">\\n\\t\\t\\t\\t\\t\\t{#if selectedValues.size > 2}\\n\\t\\t\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t{selectedValues.size} selected\\n\\t\\t\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t\\t\\t{#each options.filter((opt) => selectedValues.has(opt.value)) as option (option)}\\n\\t\\t\\t\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{option.label}\\n\\t\\t\\t\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t</Button>\\n\\t\\t{/snippet}\\n\\t</Popover.Trigger>\\n\\t<Popover.Content class=\\\"w-[200px] p-0\\\" align=\\\"start\\\">\\n\\t\\t<Command.Root>\\n\\t\\t\\t<Command.Input placeholder={title} />\\n\\t\\t\\t<Command.List>\\n\\t\\t\\t\\t<Command.Empty>No results found.</Command.Empty>\\n\\t\\t\\t\\t<Command.Group>\\n\\t\\t\\t\\t\\t{#each options as option (option)}\\n\\t\\t\\t\\t\\t\\t{@const isSelected = selectedValues.has(option.value)}\\n\\t\\t\\t\\t\\t\\t<Command.Item\\n\\t\\t\\t\\t\\t\\t\\tonSelect={() => {\\n\\t\\t\\t\\t\\t\\t\\t\\tif (isSelected) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tselectedValues.delete(option.value);\\n\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tselectedValues.add(option.value);\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\tconst filterValues = Array.from(selectedValues);\\n\\t\\t\\t\\t\\t\\t\\t\\tcolumn?.setFilterValue(filterValues.length ? filterValues : undefined);\\n\\t\\t\\t\\t\\t\\t\\t}}\\n\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\t<div\\n\\t\\t\\t\\t\\t\\t\\t\\tclass={cn(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'border-primary mr-2 flex size-4 items-center justify-center rounded-sm border',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tisSelected ? 'bg-primary text-primary-foreground' : 'opacity-50 [&_svg]:invisible'\\n\\t\\t\\t\\t\\t\\t\\t\\t)}\\n\\t\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\t\\t<CheckIcon class=\\\"size-4\\\" />\\n\\t\\t\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\t\\t\\t{#if option.icon}\\n\\t\\t\\t\\t\\t\\t\\t\\t{@const Icon = option.icon}\\n\\t\\t\\t\\t\\t\\t\\t\\t<Icon class=\\\"text-muted-foreground\\\" />\\n\\t\\t\\t\\t\\t\\t\\t{/if}\\n\\n\\t\\t\\t\\t\\t\\t\\t<span>{option.label}</span>\\n\\t\\t\\t\\t\\t\\t\\t{#if facets?.get(option.value)}\\n\\t\\t\\t\\t\\t\\t\\t\\t<span class=\\\"ml-auto flex size-4 items-center justify-center font-mono text-xs\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{facets.get(option.value)}\\n\\t\\t\\t\\t\\t\\t\\t\\t</span>\\n\\t\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t\\t</Command.Item>\\n\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t</Command.Group>\\n\\t\\t\\t\\t{#if selectedValues.size > 0}\\n\\t\\t\\t\\t\\t<Command.Separator />\\n\\t\\t\\t\\t\\t<Command.Group>\\n\\t\\t\\t\\t\\t\\t<Command.Item\\n\\t\\t\\t\\t\\t\\t\\tonSelect={() => column?.setFilterValue(undefined)}\\n\\t\\t\\t\\t\\t\\t\\tclass=\\\"justify-center text-center\\\"\\n\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\tClear filters\\n\\t\\t\\t\\t\\t\\t</Command.Item>\\n\\t\\t\\t\\t\\t</Command.Group>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t</Command.List>\\n\\t\\t</Command.Root>\\n\\t</Popover.Content>\\n</Popover.Root>\\n\"","export default \"export { default as FacetedFilter } from \\\"./faceted-filter.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends Record<string, unknown>, U extends FormPath<T>\\\">\\n\\timport * as FormPrimitive from 'formsnap';\\n\\timport type { FormPath } from 'sveltekit-superforms';\\n\\timport { cn, type WithElementRef, type WithoutChildren } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { setContext } from 'svelte';\\n\\n\\tlet {\\n\\t\\tref = $bindable(null),\\n\\t\\tclass: className,\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\tchildren: childrenProp,\\n\\t\\t...restProps\\n\\t}: FormPrimitive.FieldProps<T, U> &\\n\\t\\tWithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();\\n\\n\\tsetContext('file-field', {\\n\\t\\tget form() {\\n\\t\\t\\treturn form;\\n\\t\\t},\\n\\t\\tget name() {\\n\\t\\t\\treturn name;\\n\\t\\t}\\n\\t});\\n</script>\\n\\n<FormPrimitive.Field {form} {name}>\\n\\t{#snippet children({ constraints, errors, tainted, value })}\\n\\t\\t<div bind:this={ref} data-slot=\\\"form-item\\\" class={cn('space-y-2', className)} {...restProps}>\\n\\t\\t\\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\\n\\t\\t</div>\\n\\t{/snippet}\\n</FormPrimitive.Field>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext } from 'svelte';\\n\\timport { fileProxy, filesProxy, type SuperForm } from 'sveltekit-superforms';\\n\\timport { Input } from '$lib/components/ui/input';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst { multiple } = getContext<{ multiple: boolean }>('file-field-multiple');\\n\\n\\tconst files = multiple ? filesProxy(ctx.form, `${ctx.name}+`) : fileProxy(ctx.form, ctx.name);\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tconst { ...props } = $props();\\n\\n\\tconst onchange = () => {\\n\\t\\treset({\\n\\t\\t\\tdata: $formData\\n\\t\\t});\\n\\t};\\n</script>\\n\\n{#if !multiple}\\n\\t{#if $formData[ctx.name]}\\n\\t\\t{#if typeof $formData[ctx.name] === 'string'}\\n\\t\\t\\t<input type=\\\"text\\\" name={ctx.name} value={$formData[ctx.name]} class=\\\"hidden\\\" />\\n\\t\\t{:else}\\n\\t\\t\\t<input type=\\\"file\\\" name={ctx.name} files={$files} class=\\\"hidden\\\" />\\n\\t\\t{/if}\\n\\t{:else}\\n\\t\\t<input type=\\\"text\\\" name={ctx.name} value=\\\"\\\" class=\\\"hidden\\\" />\\n\\t{/if}\\n{/if}\\n\\n<Input\\n\\ttype=\\\"file\\\"\\n\\tbind:files={$files}\\n\\t{multiple}\\n\\t{onchange}\\n\\t{...props}\\n\\tname={multiple ? `${ctx.name}+` : ''}\\n/>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext, getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport { getName } from './shared';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst {\\n\\t\\tdisplay,\\n\\t\\tinput\\n\\t}: {\\n\\t\\tdisplay: (props: {\\n\\t\\t\\tfile: File | string;\\n\\t\\t\\tfilename: string;\\n\\t\\t\\tonremove: (file: File | string) => void;\\n\\t\\t}) => any;\\n\\t\\tinput: () => any;\\n\\t} = $props();\\n\\n\\tsetContext('file-field-multiple', { multiple: true });\\n\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tlet removed = $state<string[]>([]);\\n\\n\\tconst onremove = (file: File | string) => {\\n\\t\\tif (typeof file === 'string') {\\n\\t\\t\\tremoved.push(file);\\n\\t\\t} else {\\n\\t\\t\\tif (Array.isArray($formData[`${ctx.name}+`])) {\\n\\t\\t\\t\\treset({\\n\\t\\t\\t\\t\\tdata: {\\n\\t\\t\\t\\t\\t\\t...$formData,\\n\\t\\t\\t\\t\\t\\t[`${ctx.name}+`]: $formData[`${ctx.name}+`].filter((f: File | string) => f !== file) as\\n\\t\\t\\t\\t\\t\\t\\t| File[]\\n\\t\\t\\t\\t\\t\\t\\t| undefined\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t});\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n\\n\\tconst initialFiles = $formData[ctx.name] || [];\\n</script>\\n\\n{#if initialFiles}\\n\\t{#each initialFiles as file}\\n\\t\\t{#if !removed.includes(file)}\\n\\t\\t\\t{@render display({ file, filename: getName(file), onremove })}\\n\\t\\t{/if}\\n\\t{/each}\\n{/if}\\n\\n{#each $formData[`${ctx.name}+`] as file}\\n\\t{#if file && typeof file !== 'string'}\\n\\t\\t{@render display({ file, filename: getName(file), onremove })}\\n\\t{/if}\\n{/each}\\n\\n{#each removed as removedFile}\\n\\t<input type=\\\"text\\\" name={`${ctx.name}-`} value={removedFile} class=\\\"hidden\\\" />\\n{/each}\\n\\n{@render input()}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext, getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport { getName } from './shared';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst {\\n\\t\\tdisplay,\\n\\t\\tinput\\n\\t}: {\\n\\t\\tdisplay: (props: {\\n\\t\\t\\tfile: File | string;\\n\\t\\t\\tfilename: string;\\n\\t\\t\\tonremove: (file: File | string) => void;\\n\\t\\t}) => any;\\n\\t\\tinput: () => any;\\n\\t} = $props();\\n\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tsetContext('file-field-multiple', { multiple: false });\\n\\n\\tconst onremove = () => {\\n\\t\\treset({\\n\\t\\t\\tdata: {\\n\\t\\t\\t\\t...$formData,\\n\\t\\t\\t\\t[ctx.name]: ''\\n\\t\\t\\t}\\n\\t\\t});\\n\\t};\\n</script>\\n\\n{#if $formData[ctx.name]}\\n\\t{@render display({ file: $formData[ctx.name], filename: getName($formData[ctx.name]), onremove })}\\n{/if}\\n\\n{@render input()}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport FileIcon from '@lucide/svelte/icons/file';\\n\\timport ImageIcon from '@lucide/svelte/icons/image';\\n\\timport { cn } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst { form: formData } = ctx.form;\\n\\n\\tconst {\\n\\t\\tfile,\\n\\t\\tfilename,\\n\\t\\tcollectionId,\\n\\t\\tid,\\n\\t\\tthumb = '50x50',\\n\\t\\tclass: className,\\n\\t\\ttype = 'image',\\n\\t\\t...props\\n\\t}: {\\n\\t\\tfile: File | string;\\n\\t\\tfilename: string;\\n\\t\\tcollectionId?: string;\\n\\t\\tid?: string;\\n\\t\\tthumb?: string;\\n\\t\\tclass?: string;\\n\\t\\ttype?: 'image' | 'file';\\n\\t} & HTMLAttributes<HTMLImageElement> = $props();\\n\\n\\tconst isImage = $derived(\\n\\t\\ttype === 'image' ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.png') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.jpg') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.jpeg') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.gif') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.webp')\\n\\t);\\n\\n\\tfunction getUrl(file: string) {\\n\\t\\treturn `/api/files/${collectionId ?? $formData.collectionId}/${id ?? $formData.id}/${file}?thumb=${thumb}`;\\n\\t}\\n</script>\\n\\n{#if typeof file === 'string'}\\n\\t{#if (id ?? $formData.collectionId) && (id ?? $formData.id) && isImage}\\n\\t\\t<img src={getUrl(file)} alt={filename} class={className} {...props} />\\n\\t{:else}\\n\\t\\t<div\\n\\t\\t\\tclass={cn('flex items-center justify-center w-full h-full bg-muted rounded-md', className)}\\n\\t\\t\\t{...props as HTMLAttributes<HTMLDivElement>}\\n\\t\\t>\\n\\t\\t\\t{#if isImage}\\n\\t\\t\\t\\t<ImageIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t{:else}\\n\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t{/if}\\n\\t\\t</div>\\n\\t{/if}\\n{:else if isImage}\\n\\t<img src={URL.createObjectURL(file)} alt={filename} class={className} {...props} />\\n{:else}\\n\\t<div\\n\\t\\tclass={cn('flex items-center justify-center w-full h-full bg-muted rounded-md', className)}\\n\\t\\t{...props as HTMLAttributes<HTMLDivElement>}\\n\\t>\\n\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t</div>\\n{/if}\\n\"","export default \"export { default as Field } from \\\"./file-field.svelte\\\";\\nexport { default as Single } from \\\"./file-single.svelte\\\";\\nexport { default as Multiple } from \\\"./file-multiple.svelte\\\";\\nexport { default as Input } from \\\"./file-input.svelte\\\";\\nexport { default as Thumb } from \\\"./file-thumb.svelte\\\";\\n\"","export default \"export function getUrl(\\n file: File | string,\\n collectionId: string,\\n recordId: string,\\n thumb: string,\\n) {\\n return typeof file === \\\"string\\\"\\n ? `/api/files/${collectionId}/${recordId}/${file}?thumb=${thumb}`\\n : URL.createObjectURL(file);\\n}\\n\\nexport function getName(file: File | string) {\\n return typeof file === \\\"string\\\" ? (file.split(\\\"/\\\").pop() ?? \\\"\\\") : file.name;\\n}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue = $bindable(),\\n\\t\\tid,\\n\\t\\tlabel,\\n\\t\\tshortLabel,\\n\\t\\tmapOpen\\n\\t}: {\\n\\t\\tvalue: number;\\n\\t\\tid: string;\\n\\t\\tlabel: string;\\n\\t\\tshortLabel: string;\\n\\t\\tmapOpen: boolean;\\n\\t} = $props();\\n</script>\\n\\n<div\\n\\tclass={cn(\\n\\t\\t'border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\\n\\t\\t'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]',\\n\\t\\t'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\\n\\t\\t'pr-0 flex items-center',\\n\\t\\tlabel === 'Latitude' && 'rounded-r-none',\\n\\t\\tlabel === 'Longitude' && 'rounded-none -ml-px',\\n\\t\\tmapOpen && 'rounded-b-none'\\n\\t)}\\n>\\n\\t<label for={id} class=\\\"text-muted-foreground mr-2\\\">\\n\\t\\t<span class=\\\"hidden md:block\\\">{label}</span>\\n\\t\\t<span class=\\\"block md:hidden\\\">{shortLabel}</span>\\n\\t</label>\\n\\n\\t<input\\n\\t\\tbind:value\\n\\t\\ttype=\\\"number\\\"\\n\\t\\tclass=\\\"border-none outline-none min-w-0 w-full pr-2\\\"\\n\\t\\t{id}\\n\\t\\tstep=\\\"0.000001\\\"\\n\\t/>\\n</div>\\n\"","export default \"export { default as GeopointInput } from \\\"./input.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext } from 'svelte';\\n\\timport ToggleMap from './toggle-map.svelte';\\n\\timport Coordinate from './coordinate.svelte';\\n\\n\\tlet {\\n\\t\\tname,\\n\\t\\tvalue = $bindable()\\n\\t}: {\\n\\t\\tname: string;\\n\\t\\tvalue: string | undefined;\\n\\t} = $props();\\n\\n\\tconst geopoint = $state(value ? JSON.parse(value) : { lat: 0, lon: 0 });\\n\\tconst map = $state({ open: false });\\n\\n\\tsetContext('geopoint', {\\n\\t\\tgeopoint,\\n\\t\\tmap\\n\\t});\\n\\n\\t$effect(() => {\\n\\t\\tif (value) {\\n\\t\\t\\tconst parsed = JSON.parse(value);\\n\\n\\t\\t\\tif (typeof parsed === 'object' && parsed !== null && 'lat' in parsed && 'lon' in parsed) {\\n\\t\\t\\t\\tgeopoint.lat = parsed.lat.toFixed(6);\\n\\t\\t\\t\\tgeopoint.lon = parsed.lon.toFixed(6);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t});\\n\\n\\tconst stringValue = $derived(\\n\\t\\tJSON.stringify({ lat: parseFloat(geopoint.lat), lon: parseFloat(geopoint.lon) })\\n\\t);\\n</script>\\n\\n<input type=\\\"hidden\\\" {name} value={stringValue} />\\n\\n<div class=\\\"w-full\\\">\\n\\t<div class=\\\"w-full flex\\\">\\n\\t\\t<Coordinate\\n\\t\\t\\tid=\\\"latitude\\\"\\n\\t\\t\\tlabel=\\\"Latitude\\\"\\n\\t\\t\\tshortLabel=\\\"Lat\\\"\\n\\t\\t\\tbind:value={geopoint.lat}\\n\\t\\t\\tmapOpen={map.open}\\n\\t\\t/>\\n\\t\\t<Coordinate\\n\\t\\t\\tid=\\\"longitude\\\"\\n\\t\\t\\tlabel=\\\"Longitude\\\"\\n\\t\\t\\tshortLabel=\\\"Lon\\\"\\n\\t\\t\\tbind:value={geopoint.lon}\\n\\t\\t\\tmapOpen={map.open}\\n\\t\\t/>\\n\\t\\t<ToggleMap />\\n\\t</div>\\n\\n\\t{#if map.open}\\n\\t\\t{#await import('$lib/components/ui/leaflet/leaflet.svelte')}\\n\\t\\t\\t<div class=\\\"h-[225px] w-full bg-input rounded-b-md\\\"></div>\\n\\t\\t{:then { default: Leaflet }}\\n\\t\\t\\t<Leaflet height={225} point={geopoint} class=\\\"rounded-b-md overflow-hidden\\\" />\\n\\t\\t{/await}\\n\\t{/if}\\n</div>\\n\"","export default \"<script>\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport MapIcon from '@lucide/svelte/icons/map';\\n\\timport { getContext } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet { map } = getContext('geopoint');\\n</script>\\n\\n<Button\\n\\tvariant=\\\"outline\\\"\\n\\tsize=\\\"icon\\\"\\n\\tclass={cn('w-10 rounded-none rounded-r-md border-l-0', map.open && 'rounded-b-none')}\\n\\tonclick={() => (map.open = !map.open)}\\n>\\n\\t<MapIcon class=\\\"w-4 h-4\\\" />\\n</Button>\\n\"","export default \"export { default as Leaflet } from \\\"./leaflet.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { onMount } from 'svelte';\\n\\timport L from 'leaflet';\\n\\timport 'leaflet/dist/leaflet.css';\\n\\n\\t// manually load the markers so that they can be embedded in the prod bundle\\n\\timport markerIconUrl from 'leaflet/dist/images/marker-icon.png';\\n\\timport markerIconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\\n\\timport markerShadowUrl from 'leaflet/dist/images/marker-shadow.png';\\n\\n\\tlet { height = 225, point = $bindable(), readonly = false, ...props } = $props();\\n\\n\\tlet map: L.Map;\\n\\tlet mapEl: HTMLElement;\\n\\tlet marker: L.Marker;\\n\\tlet panTimeoutId: ReturnType<typeof setTimeout>;\\n\\n\\tconst defaultZoomLevel = 8;\\n\\n\\t$effect(() => {\\n\\t\\tif (point.lat && point.lon) {\\n\\t\\t\\tpanInside();\\n\\t\\t}\\n\\t});\\n\\n\\tfunction normalizeCoordinate(coord: any) {\\n\\t\\treturn +(+coord).toFixed(6);\\n\\t}\\n\\n\\tfunction panInside(debounce = 200) {\\n\\t\\tclearTimeout(panTimeoutId);\\n\\t\\tpanTimeoutId = setTimeout(() => {\\n\\t\\t\\tmarker?.setLatLng([point.lat, point.lon]);\\n\\t\\t\\tmap?.panInside([point.lat, point.lon], { padding: [20, 40] });\\n\\t\\t}, debounce);\\n\\t}\\n\\n\\tfunction initMap() {\\n\\t\\tconst latlon = [\\n\\t\\t\\tnormalizeCoordinate(point.lat),\\n\\t\\t\\tnormalizeCoordinate(point.lon)\\n\\t\\t] as L.LatLngTuple;\\n\\n\\t\\tmap = L.map(mapEl, {\\n\\t\\t\\tzoomControl: false,\\n\\t\\t\\tmaxBounds: [\\n\\t\\t\\t\\t[-90, -180],\\n\\t\\t\\t\\t[90, 180]\\n\\t\\t\\t],\\n\\t\\t\\tminZoom: 2\\n\\t\\t}).setView(latlon, defaultZoomLevel);\\n\\n\\t\\tif (readonly) {\\n\\t\\t\\tmap.dragging.disable();\\n\\t\\t\\tmap.touchZoom.disable();\\n\\t\\t\\tmap.doubleClickZoom.disable();\\n\\t\\t\\tmap.scrollWheelZoom.disable();\\n\\t\\t\\tmap.boxZoom.disable();\\n\\t\\t\\tmap.keyboard.disable();\\n\\t\\t}\\n\\n\\t\\tL.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {\\n\\t\\t\\tattribution: '© <a href=\\\"https://www.openstreetmap.org/copyright\\\">OSM</a>',\\n\\t\\t\\tnoWrap: true\\n\\t\\t}).addTo(map);\\n\\n\\t\\tmap.attributionControl.setPrefix('');\\n\\n\\t\\t// reassign the default marker images with the loaded ones\\n\\t\\t// (https://leafletjs.com/reference.html#icon-default-option)\\n\\t\\tL.Icon.Default.prototype.options.iconUrl = markerIconUrl;\\n\\t\\tL.Icon.Default.prototype.options.iconRetinaUrl = markerIconRetinaUrl;\\n\\t\\tL.Icon.Default.prototype.options.shadowUrl = markerShadowUrl;\\n\\t\\tL.Icon.Default.imagePath = '';\\n\\n\\t\\tmarker = L.marker(latlon, {\\n\\t\\t\\tdraggable: true,\\n\\t\\t\\tautoPan: true\\n\\t\\t}).addTo(map);\\n\\n\\t\\tmarker.bindTooltip('drag or right click anywhere on the map to move');\\n\\n\\t\\tmarker.on('moveend', (e) => {\\n\\t\\t\\tif (e.sourceTarget?._latlng) {\\n\\t\\t\\t\\tselect(e.sourceTarget._latlng.lat, e.sourceTarget._latlng.lng, false);\\n\\t\\t\\t}\\n\\t\\t});\\n\\n\\t\\tmap.on('contextmenu', (e) => {\\n\\t\\t\\tselect(e.latlng.lat, e.latlng.lng, false);\\n\\t\\t});\\n\\t}\\n\\n\\tfunction destroyMap() {\\n\\t\\tmarker?.remove();\\n\\t\\tmap?.remove();\\n\\t}\\n\\n\\tfunction select(lat: number, lon: number, centerMap = true) {\\n\\t\\tpoint.lat = normalizeCoordinate(lat);\\n\\t\\tpoint.lon = normalizeCoordinate(lon);\\n\\n\\t\\t// center the map\\n\\t\\tif (centerMap) {\\n\\t\\t\\tmarker?.setLatLng([point.lat, point.lon]); // optimistic marker update\\n\\t\\t\\tmap?.panTo([point.lat, point.lon], { animate: false });\\n\\t\\t}\\n\\t}\\n\\n\\tonMount(() => {\\n\\t\\tinitMap();\\n\\n\\t\\treturn () => {\\n\\t\\t\\tdestroyMap();\\n\\t\\t};\\n\\t});\\n</script>\\n\\n<div class=\\\"map-wrapper\\\" style=\\\"{height ? `height:${height}px` : null};\\\" {...props}>\\n\\t<div bind:this={mapEl} class=\\\"map-box\\\"></div>\\n</div>\\n\\n<style>\\n\\t.map-wrapper {\\n\\t\\tposition: relative;\\n\\t\\tdisplay: block;\\n\\t\\theight: 100%;\\n\\t\\twidth: 100%;\\n\\t}\\n\\t.map-box {\\n\\t\\tz-index: 1;\\n\\t\\theight: 100%;\\n\\t\\twidth: 100%;\\n\\t}\\n</style>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { Snippet } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet { children, class: className }: { children: Snippet; class?: string } = $props();\\n</script>\\n\\n<span class={cn('bg-secondary text-secondary-foreground px-2 py-1 rounded-sm text-sm', className)}>\\n\\t{@render children?.()}\\n</span>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { Popover as PopoverPrimitive } from 'bits-ui';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\t...props\\n\\t}: PopoverPrimitive.ContentProps & {\\n\\t\\tportalProps?: PopoverPrimitive.PortalProps;\\n\\t} = $props();\\n</script>\\n\\n<Popover.Content {...props}>\\n\\t{@render children?.()}\\n</Popover.Content>\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends Record<string, unknown>, U extends FormPath<T>\\\">\\n\\timport * as FormPrimitive from 'formsnap';\\n\\timport type { FormPath } from 'sveltekit-superforms';\\n\\timport { cn, type WithElementRef, type WithoutChildren } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { setContext } from 'svelte';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\n\\tlet {\\n\\t\\tref = $bindable(null),\\n\\t\\tclass: className,\\n\\t\\ttype,\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\trequired,\\n\\t\\tchildren: childrenProp,\\n\\t\\t...restProps\\n\\t}: FormPrimitive.FieldProps<T, U> & {\\n\\t\\ttype: 'multiple' | 'single';\\n\\t\\trequired?: boolean;\\n\\t} & WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();\\n\\n\\tconst { form: formData } = form;\\n\\n\\tconst toggleSelected = (value: string) => {\\n\\t\\tif (type === 'single') {\\n\\t\\t\\tif (!required && $formData[name] === value) {\\n\\t\\t\\t\\t$formData[name] = undefined as T[U];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$formData[name] = value as T[U];\\n\\t\\t\\t}\\n\\t\\t} else if (type === 'multiple') {\\n\\t\\t\\tif (!$formData[name]) {\\n\\t\\t\\t\\t$formData[name] = [] as T[U];\\n\\t\\t\\t}\\n\\n\\t\\t\\tconst currentValue = $formData[name] as string[];\\n\\t\\t\\tconst index = currentValue.indexOf(value);\\n\\n\\t\\t\\tif (index > -1) {\\n\\t\\t\\t\\t$formData[name] = currentValue.filter((id) => id !== value) as T[U];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$formData[name] = [...currentValue, value] as T[U];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n\\n\\tconst isSelected = (value: string) => {\\n\\t\\tif (type === 'single') {\\n\\t\\t\\treturn $formData[name] === value;\\n\\t\\t} else if (type === 'multiple') {\\n\\t\\t\\treturn ($formData[name] as string[])?.includes(value) ?? false;\\n\\t\\t}\\n\\t};\\n\\n\\tsetContext('multiselect-field', {\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\ttype,\\n\\t\\ttoggleSelected,\\n\\t\\tisSelected\\n\\t});\\n</script>\\n\\n<Popover.Root>\\n\\t<FormPrimitive.Field {form} {name}>\\n\\t\\t{#snippet children({ constraints, errors, tainted, value })}\\n\\t\\t\\t<div bind:this={ref} data-slot=\\\"form-item\\\" class={cn('space-y-2', className)} {...restProps}>\\n\\t\\t\\t\\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\\n\\t\\t\\t</div>\\n\\t\\t{/snippet}\\n\\t</FormPrimitive.Field>\\n</Popover.Root>\\n\"","export default \"export { default as Field } from \\\"./field.svelte\\\";\\nexport { default as Trigger } from \\\"./trigger.svelte\\\";\\nexport { default as Input } from \\\"./input.svelte\\\";\\nexport { default as Content } from \\\"./content.svelte\\\";\\nexport { default as Item } from \\\"./item.svelte\\\";\\nexport { default as Chip } from \\\"./chip.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends string\\\">\\n\\timport type { SuperForm } from 'sveltekit-superforms';\\n\\timport { getContext, type Snippet } from 'svelte';\\n\\n\\tconst { form, type } = getContext<{ form: SuperForm<any, any>; type: 'single' | 'multiple' }>(\\n\\t\\t'multiselect-field'\\n\\t);\\n\\tconst { form: formData } = form;\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tplaceholder,\\n\\t\\tname,\\n\\t\\tvalue = $bindable()\\n\\t}: {\\n\\t\\tchildren: Snippet<[{ selected: T[] }]>;\\n\\t\\tplaceholder?: string;\\n\\t\\tname: string;\\n\\t\\tvalue: T[] | T | undefined;\\n\\t} = $props();\\n</script>\\n\\n{#if value && value.length > 0}\\n\\t{@render children?.({ selected: type === 'single' ? [$formData[name]] : $formData[name] })}\\n\\t{#if type === 'multiple'}\\n\\t\\t{#each value as v}\\n\\t\\t\\t<input type=\\\"hidden\\\" {name} value={v} />\\n\\t\\t{/each}\\n\\t{:else}\\n\\t\\t<input type=\\\"hidden\\\" {name} {value} />\\n\\t{/if}\\n{:else}\\n\\t{placeholder}\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext, type Snippet } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\timport { Command as CommandPrimitive } from 'bits-ui';\\n\\timport * as Command from '$lib/components/ui/command';\\n\\timport CheckIcon from '@lucide/svelte/icons/check';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tvalue,\\n\\t\\tlabel,\\n\\t\\tclass: className,\\n\\t\\t...props\\n\\t}: CommandPrimitive.ItemProps & {\\n\\t\\tvalue: string;\\n\\t\\tlabel: string | undefined;\\n\\t\\tchildren?: Snippet;\\n\\t\\tclass?: string;\\n\\t} = $props();\\n\\n\\tconst { toggleSelected, isSelected } = getContext<{\\n\\t\\ttoggleSelected: (value: string) => void;\\n\\t\\tisSelected: (value: string) => boolean;\\n\\t}>('multiselect-field');\\n\\n\\tconst handleSelect = () => {\\n\\t\\ttoggleSelected(value);\\n\\t};\\n</script>\\n\\n<Command.Item\\n\\tclass={cn('cursor-pointer', className)}\\n\\t{...props}\\n\\tvalue={label}\\n\\tonSelect={handleSelect}\\n>\\n\\t{label}\\n\\t<CheckIcon class={cn('ml-auto', !isSelected(value) && 'text-transparent')} />\\n</Command.Item>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\timport { Popover as PopoverPrimitive } from 'bits-ui';\\n\\timport { cn } from '$lib/utils';\\n\\timport { buttonVariants } from '$lib/components/ui/button';\\n\\timport ChevronDownIcon from '@lucide/svelte/icons/chevron-down';\\n\\n\\tlet { children, class: className, ...props }: PopoverPrimitive.TriggerProps = $props();\\n</script>\\n\\n<Popover.Trigger\\n\\tclass={cn(buttonVariants({ variant: 'outline' }), className)}\\n\\trole=\\\"combobox\\\"\\n\\t{...props}\\n>\\n\\t{@render children?.()}\\n\\t<ChevronDownIcon class=\\\"size-4 opacity-50\\\" />\\n</Popover.Trigger>\\n\"","export default \"export { default as Pagination } from \\\"./pagination.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as Select from '$lib/components/ui/select';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport ChevronsLeftIcon from '@lucide/svelte/icons/chevrons-left';\\n\\timport ChevronLeftIcon from '@lucide/svelte/icons/chevron-left';\\n\\timport ChevronRightIcon from '@lucide/svelte/icons/chevron-right';\\n\\timport ChevronsRightIcon from '@lucide/svelte/icons/chevrons-right';\\n\\timport type { Table as TableType } from '@tanstack/table-core';\\n\\n\\tlet { table }: { table: TableType<any> } = $props();\\n</script>\\n\\n<div class=\\\"flex items-center justify-between px-2\\\">\\n\\t<div class=\\\"text-muted-foreground flex-1 text-sm\\\">\\n\\t\\t{table.getFilteredSelectedRowModel().rows.length} of\\n\\t\\t{table.getFilteredRowModel().rows.length} row(s) selected.\\n\\t</div>\\n\\t<div class=\\\"flex items-center space-x-6 lg:space-x-8\\\">\\n\\t\\t<div class=\\\"flex items-center space-x-2\\\">\\n\\t\\t\\t<p class=\\\"text-sm font-medium\\\">Rows per page</p>\\n\\t\\t\\t<Select.Root\\n\\t\\t\\t\\tallowDeselect={false}\\n\\t\\t\\t\\ttype=\\\"single\\\"\\n\\t\\t\\t\\tvalue={`${table.getState().pagination.pageSize}`}\\n\\t\\t\\t\\tonValueChange={(value) => {\\n\\t\\t\\t\\t\\ttable.setPageSize(Number(value));\\n\\t\\t\\t\\t}}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<Select.Trigger class=\\\"h-8 w-[70px]\\\">\\n\\t\\t\\t\\t\\t{String(table.getState().pagination.pageSize)}\\n\\t\\t\\t\\t</Select.Trigger>\\n\\t\\t\\t\\t<Select.Content side=\\\"top\\\">\\n\\t\\t\\t\\t\\t{#each [10, 20, 30, 40, 50] as pageSize (pageSize)}\\n\\t\\t\\t\\t\\t\\t<Select.Item value={`${pageSize}`}>\\n\\t\\t\\t\\t\\t\\t\\t{pageSize}\\n\\t\\t\\t\\t\\t\\t</Select.Item>\\n\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t</Select.Content>\\n\\t\\t\\t</Select.Root>\\n\\t\\t</div>\\n\\t\\t<div class=\\\"flex w-[100px] items-center justify-center text-sm font-medium\\\">\\n\\t\\t\\tPage {table.getState().pagination.pageIndex + 1} of\\n\\t\\t\\t{table.getPageCount()}\\n\\t\\t</div>\\n\\t\\t<div class=\\\"flex items-center space-x-2\\\">\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"hidden size-8 p-0 lg:flex\\\"\\n\\t\\t\\t\\tonclick={() => table.setPageIndex(0)}\\n\\t\\t\\t\\tdisabled={!table.getCanPreviousPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to first page</span>\\n\\t\\t\\t\\t<ChevronsLeftIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"size-8 p-0\\\"\\n\\t\\t\\t\\tonclick={() => table.previousPage()}\\n\\t\\t\\t\\tdisabled={!table.getCanPreviousPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to previous page</span>\\n\\t\\t\\t\\t<ChevronLeftIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"size-8 p-0\\\"\\n\\t\\t\\t\\tonclick={() => table.nextPage()}\\n\\t\\t\\t\\tdisabled={!table.getCanNextPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to next page</span>\\n\\t\\t\\t\\t<ChevronRightIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"hidden size-8 p-0 lg:flex\\\"\\n\\t\\t\\t\\tonclick={() => table.setPageIndex(table.getPageCount() - 1)}\\n\\t\\t\\t\\tdisabled={!table.getCanNextPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to last page</span>\\n\\t\\t\\t\\t<ChevronsRightIcon />\\n\\t\\t\\t</Button>\\n\\t\\t</div>\\n\\t</div>\\n</div>\\n\"","export default \"export { default as RowActions } from \\\"./row-actions.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { goto } from '$app/navigation';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport EllipsisIcon from '@lucide/svelte/icons/ellipsis';\\n\\n\\tlet {\\n\\t\\tviewPath,\\n\\t\\teditPath,\\n\\t\\tdeletePath\\n\\t}: {\\n\\t\\tviewPath: string;\\n\\t\\teditPath: string;\\n\\t\\tdeletePath: string;\\n\\t} = $props();\\n</script>\\n\\n<DropdownMenu.Root>\\n\\t<DropdownMenu.Trigger>\\n\\t\\t{#snippet child({ props })}\\n\\t\\t\\t<Button {...props} variant=\\\"ghost\\\" class=\\\"data-[state=open]:bg-muted flex h-8 w-8 p-0\\\">\\n\\t\\t\\t\\t<EllipsisIcon />\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Open Menu</span>\\n\\t\\t\\t</Button>\\n\\t\\t{/snippet}\\n\\t</DropdownMenu.Trigger>\\n\\t<DropdownMenu.Content class=\\\"w-[160px]\\\" align=\\\"end\\\">\\n\\t\\t<DropdownMenu.Item onclick={() => goto(viewPath)}>View</DropdownMenu.Item>\\n\\t\\t<DropdownMenu.Item onclick={() => goto(editPath)}>Edit</DropdownMenu.Item>\\n\\t\\t<DropdownMenu.Item>\\n\\t\\t\\t<form method=\\\"POST\\\" action={deletePath}>\\n\\t\\t\\t\\t<button type=\\\"submit\\\" class=\\\"contents\\\">Delete</button>\\n\\t\\t\\t</form>\\n\\t\\t</DropdownMenu.Item>\\n\\t</DropdownMenu.Content>\\n</DropdownMenu.Root>\\n\"","import {\n existsSync,\n mkdirSync,\n readFileSync,\n rmSync,\n writeFileSync,\n} from \"node:fs\";\nimport path from \"node:path\";\nimport { detect } from \"package-manager-detector\";\nimport { resolveCommand } from \"package-manager-detector/commands\";\nimport spawn from \"cross-spawn\";\nimport type { Options, Result } from \"../core/types\";\nimport { getLogger, NOOP_LOGGER, type Logger } from \"../core/logger\";\n\ntype PackageManagerOperation = \"execute\" | \"install\";\ntype ExecuteCommand = (\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n) => Promise<void>;\n\ninterface WriteResultRuntime {\n executeCommand?: ExecuteCommand;\n}\n\ntype CustomNpmPackages = Record<string, string[]>;\n\nconst customDependencies: Record<string, string[]> = {\n \"file-form\": [\"input\", \"form\"],\n multiselect: [\"command\", \"popover\", \"button\", \"badge\"],\n geopoint: [\"button\", \"leaflet\"],\n cells: [],\n \"column-header\": [\"dropdown-menu\", \"button\"],\n \"faceted-filter\": [\"command\", \"popover\", \"button\", \"separator\", \"badge\"],\n pagination: [\"button\", \"select\"],\n \"row-actions\": [\"dropdown-menu\", \"button\"],\n leaflet: [],\n \"auth-menu\": [\"dropdown-menu\", \"button\"],\n};\n\nconst customNpmPackages: CustomNpmPackages = {\n \"file-form\": [],\n multiselect: [],\n geopoint: [],\n cells: [],\n \"column-header\": [\"@tanstack/table-core\"],\n \"faceted-filter\": [\"@tanstack/table-core\"],\n pagination: [\"@tanstack/table-core\"],\n \"row-actions\": [],\n leaflet: [\"leaflet\", \"@types/leaflet\"],\n};\n\nconst customComponentAssets = import.meta.glob<string>(\"../ui/components/**\", {\n query: \"?raw\",\n import: \"default\",\n eager: true,\n});\n\nfunction getAllCustomComponents() {\n return [\n ...new Set(\n Object.keys(customComponentAssets).map(componentNameFromAssetPath),\n ),\n ]\n .filter(Boolean)\n .sort();\n}\n\nfunction componentNameFromAssetPath(assetPath: string): string {\n const parts = assetPath.split(\"/\");\n const index = parts.indexOf(\"components\");\n return parts[index + 1] ?? \"\";\n}\n\nfunction componentRelativeAssetPath(assetPath: string): string {\n const parts = assetPath.split(\"/\");\n const index = parts.indexOf(\"components\");\n return parts.slice(index + 2).join(\"/\");\n}\n\nfunction toTargetPath(root: string, filePath: string): string {\n if (path.isAbsolute(filePath)) {\n return filePath;\n }\n return path.join(root, filePath);\n}\n\nfunction writeFile(filePath: string, content: string): void {\n mkdirSync(path.dirname(filePath), { recursive: true });\n writeFileSync(filePath, content, \"utf8\");\n}\n\nfunction removeFile(filePath: string): void {\n if (!existsSync(filePath)) {\n return;\n }\n\n rmSync(filePath, { force: true, recursive: true });\n}\n\nasync function executeWithDetectedPackageManager(\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n): Promise<void> {\n const packageManager = (await detect({ cwd }))?.name ?? \"npm\";\n const resolved = resolveCommand(packageManager, operation, args);\n if (!resolved) {\n throw new Error(\n `Unable to resolve ${operation} command for ${packageManager}`,\n );\n }\n\n const commandArgs = [...resolved.args];\n if (packageManager === \"npm\") {\n commandArgs.unshift(\"--yes\");\n }\n\n await new Promise<void>((resolve, reject) => {\n const child = spawn(resolved.command, commandArgs, {\n cwd,\n stdio: \"inherit\",\n });\n child.on(\"error\", reject);\n child.on(\"exit\", (code) => {\n if (code === 0) {\n resolve();\n return;\n }\n reject(\n new Error(`${resolved.command} exited with code ${code ?? \"unknown\"}`),\n );\n });\n });\n}\n\nasync function executeCommand(\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n runtime?: WriteResultRuntime,\n): Promise<void> {\n if (runtime?.executeCommand) {\n await runtime.executeCommand(cwd, operation, args);\n return;\n }\n\n await executeWithDetectedPackageManager(cwd, operation, args);\n}\n\nfunction installedPackagesFromProject(root: string): Set<string> {\n const packageJsonPath = path.join(root, \"package.json\");\n if (!existsSync(packageJsonPath)) {\n return new Set();\n }\n\n const packageJson = JSON.parse(readFileSync(packageJsonPath, \"utf8\")) as {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n optionalDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n };\n\n return new Set([\n ...Object.keys(packageJson.dependencies ?? {}),\n ...Object.keys(packageJson.devDependencies ?? {}),\n ...Object.keys(packageJson.optionalDependencies ?? {}),\n ...Object.keys(packageJson.peerDependencies ?? {}),\n ]);\n}\n\nasync function installPackages(\n root: string,\n packages: string[],\n runtime?: WriteResultRuntime,\n logger: Logger = NOOP_LOGGER,\n): Promise<string[]> {\n if (packages.length === 0) {\n return [];\n }\n\n const installed = installedPackagesFromProject(root);\n const toInstall = [...new Set(packages)].filter((pkg) => !installed.has(pkg));\n if (toInstall.length === 0) {\n return [];\n }\n\n logger.info(`Installing packages: ${toInstall.join(\", \")}`);\n await executeCommand(root, \"install\", toInstall, runtime);\n return toInstall;\n}\n\nfunction isCustomComponent(component: string): boolean {\n return getAllCustomComponents().includes(component);\n}\n\nfunction customNpmPackagesFor(components: string[]): string[] {\n return [\n ...new Set(\n components.flatMap((component) => customNpmPackages[component] ?? []),\n ),\n ];\n}\n\nfunction copyCustomComponent(\n component: string,\n targetComponentsDir: string,\n): void {\n const targetDir = path.join(targetComponentsDir, component);\n mkdirSync(targetDir, { recursive: true });\n\n for (const [assetPath, content] of Object.entries(customComponentAssets)) {\n if (componentNameFromAssetPath(assetPath) !== component) {\n continue;\n }\n const relativePath = componentRelativeAssetPath(assetPath);\n if (!relativePath) {\n continue;\n }\n\n const outputPath = path.join(targetDir, relativePath);\n mkdirSync(path.dirname(outputPath), { recursive: true });\n writeFileSync(outputPath, content, \"utf8\");\n }\n}\n\nasync function installComponents(\n root: string,\n components: string[],\n runtime?: WriteResultRuntime,\n logger: Logger = NOOP_LOGGER,\n): Promise<{ components: string[]; packages: string[] }> {\n if (components.length === 0) {\n return { components: [], packages: [] };\n }\n\n const componentsDir = path.join(root, \"src\", \"lib\", \"components\", \"ui\");\n mkdirSync(componentsDir, { recursive: true });\n\n const requested = [...new Set(components)];\n const missing = requested.filter(\n (component) => !existsSync(path.join(componentsDir, component)),\n );\n\n if (missing.length === 0) {\n return { components: [], packages: [] };\n }\n\n const customToInstall = new Set(missing.filter(isCustomComponent));\n const publicToInstall = new Set(\n missing.filter((component) => !isCustomComponent(component)),\n );\n\n for (const component of [...customToInstall]) {\n for (const dependency of customDependencies[component] ?? []) {\n if (existsSync(path.join(componentsDir, dependency))) {\n continue;\n }\n if (isCustomComponent(dependency)) {\n customToInstall.add(dependency);\n } else {\n publicToInstall.add(dependency);\n }\n }\n }\n\n const installedComponents: string[] = [];\n const customList = [...customToInstall].sort();\n if (customList.length > 0) {\n logger.info(`Installing custom components: ${customList.join(\", \")}`);\n }\n for (const component of customList) {\n copyCustomComponent(component, componentsDir);\n installedComponents.push(component);\n publicToInstall.delete(component);\n }\n\n const customPackages = await installPackages(\n root,\n customNpmPackagesFor([...customToInstall]),\n runtime,\n logger,\n );\n\n const publicList = [...publicToInstall].sort();\n if (publicList.length > 0) {\n logger.info(`Installing shadcn-svelte components: ${publicList.join(\", \")}`);\n await executeCommand(\n root,\n \"execute\",\n [\"shadcn-svelte\", \"add\", \"--yes\", \"--overwrite\", ...publicList],\n runtime,\n );\n installedComponents.push(...publicList);\n }\n\n return {\n components: [...new Set(installedComponents)],\n packages: customPackages,\n };\n}\n\nexport async function writeResult(\n result: Result,\n options: Options,\n runtime?: WriteResultRuntime,\n): Promise<Result> {\n const logger = getLogger(options);\n\n for (const file of result.creates) {\n if (file.status !== \"success\") continue;\n writeFile(toTargetPath(options.root, file.path), file.content);\n }\n\n for (const file of result.modifies) {\n if (file.status !== \"success\") continue;\n writeFile(toTargetPath(options.root, file.path), file.content);\n }\n\n for (const file of result.deletes) {\n if (file.status !== \"success\") continue;\n removeFile(toTargetPath(options.root, file.path));\n }\n\n const packageInstalls = await installPackages(\n options.root,\n result.packages,\n runtime,\n logger,\n );\n const componentInstalls = await installComponents(\n options.root,\n result.components,\n runtime,\n logger,\n );\n\n return {\n ...result,\n components: compon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AAM,EACJ,GACA,WACA;EAAC;EAAiB;EAAO;EAAS;EAAe,GAAG;EAAW,EAC/D,EACD,EACD,EAAoB,KAAK,GAAG,EAAW,GAGlC;EACL,YAAY,CAAC,GAAG,IAAI,IAAI,EAAoB,CAAC;EAC7C,UAAU;EACX;;AAGH,eAAsB,GACpB,GACA,GACA,GACiB;CACjB,IAAM,IAAS,EAAU,EAAQ;AAEjC,MAAK,IAAM,KAAQ,EAAO,QACpB,GAAK,WAAW,aACpB,EAAU,EAAa,EAAQ,MAAM,EAAK,KAAK,EAAE,EAAK,QAAQ;AAGhE,MAAK,IAAM,KAAQ,EAAO,SACpB,GAAK,WAAW,aACpB,EAAU,EAAa,EAAQ,MAAM,EAAK,KAAK,EAAE,EAAK,QAAQ;AAGhE,MAAK,IAAM,KAAQ,EAAO,QACpB,GAAK,WAAW,aACpB,GAAW,EAAa,EAAQ,MAAM,EAAK,KAAK,CAAC;CAGnD,IAAM,IAAkB,MAAM,EAC5B,EAAQ,MACR,EAAO,UACP,GACA,EACD,EACK,IAAoB,MAAM,GAC9B,EAAQ,MACR,EAAO,YACP,GACA,EACD;AAED,QAAO;EACL,GAAG;EACH,YAAY,EAAkB;EAC9B,UAAU,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,GAAiB,GAAG,EAAkB,SAAS,CAAC,CAAA;EAC3E"}
|
|
1
|
+
{"version":3,"file":"write-result-CqSY1Bww.js","names":[],"sources":["../../src/ui/components/auth-menu/auth-menu-content.svelte?raw","../../src/ui/components/auth-menu/auth-menu-group.svelte?raw","../../src/ui/components/auth-menu/auth-menu-item.svelte?raw","../../src/ui/components/auth-menu/auth-menu-label.svelte?raw","../../src/ui/components/auth-menu/auth-menu-separator.svelte?raw","../../src/ui/components/auth-menu/auth-menu-trigger.svelte?raw","../../src/ui/components/auth-menu/auth-menu.svelte?raw","../../src/ui/components/auth-menu/context.ts?raw","../../src/ui/components/auth-menu/index.ts?raw","../../src/ui/components/cells/autodate.svelte?raw","../../src/ui/components/cells/bool.svelte?raw","../../src/ui/components/cells/date.svelte?raw","../../src/ui/components/cells/editor.svelte?raw","../../src/ui/components/cells/email.svelte?raw","../../src/ui/components/cells/file.svelte?raw","../../src/ui/components/cells/geoPoint.svelte?raw","../../src/ui/components/cells/index.ts?raw","../../src/ui/components/cells/json.svelte?raw","../../src/ui/components/cells/number.svelte?raw","../../src/ui/components/cells/password.svelte?raw","../../src/ui/components/cells/relation.svelte?raw","../../src/ui/components/cells/select.svelte?raw","../../src/ui/components/cells/text.svelte?raw","../../src/ui/components/cells/url.svelte?raw","../../src/ui/components/column-header/column-header.svelte?raw","../../src/ui/components/column-header/index.ts?raw","../../src/ui/components/faceted-filter/faceted-filter.svelte?raw","../../src/ui/components/faceted-filter/index.ts?raw","../../src/ui/components/file-form/file-field.svelte?raw","../../src/ui/components/file-form/file-input.svelte?raw","../../src/ui/components/file-form/file-multiple.svelte?raw","../../src/ui/components/file-form/file-single.svelte?raw","../../src/ui/components/file-form/file-thumb.svelte?raw","../../src/ui/components/file-form/index.ts?raw","../../src/ui/components/file-form/shared.ts?raw","../../src/ui/components/geopoint/coordinate.svelte?raw","../../src/ui/components/geopoint/index.ts?raw","../../src/ui/components/geopoint/input.svelte?raw","../../src/ui/components/geopoint/toggle-map.svelte?raw","../../src/ui/components/leaflet/index.ts?raw","../../src/ui/components/leaflet/leaflet.svelte?raw","../../src/ui/components/multiselect/chip.svelte?raw","../../src/ui/components/multiselect/content.svelte?raw","../../src/ui/components/multiselect/field.svelte?raw","../../src/ui/components/multiselect/index.ts?raw","../../src/ui/components/multiselect/input.svelte?raw","../../src/ui/components/multiselect/item.svelte?raw","../../src/ui/components/multiselect/trigger.svelte?raw","../../src/ui/components/pagination/index.ts?raw","../../src/ui/components/pagination/pagination.svelte?raw","../../src/ui/components/row-actions/index.ts?raw","../../src/ui/components/row-actions/row-actions.svelte?raw","../../src/runtime/write-result.ts"],"sourcesContent":["export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: DropdownMenuPrimitive.ContentProps & {\\n\\t\\tportalProps?: DropdownMenuPrimitive.PortalProps;\\n\\t} = $props();\\n\\n\\tlet { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Content class={className} {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Content>\\n{:else}\\n\\t<div class={cn('flex flex-col w-full', className)}>\\n\\t\\t{@render children?.()}\\n\\t</div>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet { children, ...restProps } = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Group {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Group>\\n{:else}\\n\\t{@render children?.()}\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { goto } from '$app/navigation';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { children, href = undefined, ...restProps } = $props();\\n\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\n\\tconst handleClick = () => {\\n\\t\\tif (restProps.onclick) {\\n\\t\\t\\trestProps.onclick();\\n\\t\\t} else {\\n\\t\\t\\tif (href) {\\n\\t\\t\\t\\tgoto(href);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Item {...restProps} onclick={handleClick}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Item>\\n{:else}\\n\\t<Button\\n\\t\\tclass=\\\"w-full justify-start md:justify-center md:w-auto\\\"\\n\\t\\tvariant=\\\"ghost\\\"\\n\\t\\t{href}\\n\\t\\t{...restProps}\\n\\t>\\n\\t\\t{@render children?.()}\\n\\t</Button>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet { children, ...restProps } = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Label {...restProps}>\\n\\t\\t{@render children?.()}\\n\\t</DropdownMenu.Label>\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n\\tlet restProps = $props();\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Separator {...restProps} />\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { getContext } from 'svelte';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\tlet { class: className = '', ...restProps } = $props();\\n\\n\\tconst { isDesktop } =\\n\\t\\tgetContext<AuthMenuContext>(AUTH_MENU_CONTEXT_KEY) ?? ({ isDesktop: false } as AuthMenuContext);\\n</script>\\n\\n{#if isDesktop}\\n\\t<DropdownMenu.Trigger class={cn('inline-flex', className)} {...restProps} />\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { page } from '$app/state';\\n\\timport { browser } from '$app/environment';\\n\\timport { onMount, setContext } from 'svelte';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';\\n\\timport { AUTH_MENU_CONTEXT_KEY, type AuthMenuContext } from './context.js';\\n\\n\\tlet { user, guest } = $props();\\n\\n\\tconst breakpoint = 768;\\n\\tconst breakpointQuery = `(min-width: ${breakpoint}px)`;\\n\\n\\tlet hasMounted = $state(false);\\n\\tlet authMenuContext = $state<AuthMenuContext>({ isDesktop: true });\\n\\n\\tsetContext(AUTH_MENU_CONTEXT_KEY, authMenuContext);\\n\\n\\tfunction updateIsDesktop() {\\n\\t\\tif (!browser) return;\\n\\t\\tauthMenuContext.isDesktop = window.matchMedia(breakpointQuery).matches;\\n\\t}\\n\\n\\tonMount(() => {\\n\\t\\tupdateIsDesktop();\\n\\t\\thasMounted = true;\\n\\t\\tconst mq = window.matchMedia(breakpointQuery);\\n\\t\\tconst listener = () => (authMenuContext.isDesktop = mq.matches);\\n\\t\\tmq.addEventListener('change', listener);\\n\\t\\treturn () => mq.removeEventListener('change', listener);\\n\\t});\\n</script>\\n\\n{#if page.data.user}\\n\\t{#if authMenuContext.isDesktop}\\n\\t\\t<DropdownMenu.Root>\\n\\t\\t\\t{@render user?.()}\\n\\t\\t</DropdownMenu.Root>\\n\\t{:else}\\n\\t\\t<!-- This prevents the menu from being rendered twice before we know if we're on desktop or not -->\\n\\t\\t{#if hasMounted}\\n\\t\\t\\t{@render user?.()}\\n\\t\\t{/if}\\n\\t{/if}\\n{:else}\\n\\t{@render guest?.()}\\n{/if}\\n\"","export default \"export type AuthMenuContext = {\\n isDesktop: boolean;\\n};\\n\\nexport const AUTH_MENU_CONTEXT_KEY = Symbol(\\\"auth-menu-context\\\");\\n\"","export default \"import Root from \\\"./auth-menu.svelte\\\";\\nimport Content from \\\"./auth-menu-content.svelte\\\";\\nimport Trigger from \\\"./auth-menu-trigger.svelte\\\";\\nimport Group from \\\"./auth-menu-group.svelte\\\";\\nimport Label from \\\"./auth-menu-label.svelte\\\";\\nimport Separator from \\\"./auth-menu-separator.svelte\\\";\\nimport Item from \\\"./auth-menu-item.svelte\\\";\\n\\nexport { Root, Content, Trigger, Group, Label, Separator, Item };\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{new Date(value).toLocaleDateString()}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: boolean | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value ? 'Yes' : 'No'}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{new Date(value).toLocaleDateString()}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport FileIcon from '@lucide/svelte/icons/file';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tcollectionId,\\n\\t\\tid,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\tcollectionId: string;\\n\\t\\tid: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{#if Array.isArray(value)}\\n\\t\\t\\t{#each value.slice(0, 2) as filename}\\n\\t\\t\\t\\t{#if ['.jpg', '.png', '.jpeg', '.webp', '.gif'].some((ext) => filename.endsWith(ext))}\\n\\t\\t\\t\\t\\t<img\\n\\t\\t\\t\\t\\t\\tsrc=\\\"/api/files/{collectionId}/{id}/{filename}\\\"\\n\\t\\t\\t\\t\\t\\tclass=\\\"w-8 h-8 rounded-sm object-cover inline-block mr-2\\\"\\n\\t\\t\\t\\t\\t\\talt={filename}\\n\\t\\t\\t\\t\\t\\ttitle={filename}\\n\\t\\t\\t\\t\\t/>\\n\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t<div\\n\\t\\t\\t\\t\\t\\tclass=\\\"inline-flex items-center justify-center w-8 h-8 bg-muted rounded-sm mr-2\\\"\\n\\t\\t\\t\\t\\t\\ttitle={filename}\\n\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t{/each}\\n\\t\\t\\t{#if value.length > 2}\\n\\t\\t\\t\\tand {value.length - 2} more files\\n\\t\\t\\t{/if}\\n\\t\\t{:else if ['.jpg', '.png', '.jpeg', '.webp', '.gif'].some((ext) => value.endsWith(ext))}\\n\\t\\t\\t<img\\n\\t\\t\\t\\tsrc=\\\"/api/files/{collectionId}/{id}/{value}\\\"\\n\\t\\t\\t\\tclass=\\\"w-8 h-8 rounded-sm object-cover\\\"\\n\\t\\t\\t\\talt={value}\\n\\t\\t\\t\\ttitle={value}\\n\\t\\t\\t/>\\n\\t\\t{:else}\\n\\t\\t\\t<div\\n\\t\\t\\t\\tclass=\\\"inline-flex items-center justify-center w-8 h-8 bg-muted rounded-sm\\\"\\n\\t\\t\\t\\ttitle={value}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t</div>\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport MapPinIcon from '@lucide/svelte/icons/map-pin';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: { lat: number; lon: number } | undefined;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center space-x-1', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t<MapPinIcon class=\\\"inline-block w-4 h-4 text-muted-foreground\\\" />\\n\\t\\t<span>{value.lat.toFixed(6)}, {value.lon.toFixed(6)}</span>\\n\\t{/if}\\n</div>\\n\"","export default \"export { default as AutodateCell } from \\\"./autodate.svelte\\\";\\nexport { default as BoolCell } from \\\"./bool.svelte\\\";\\nexport { default as DateCell } from \\\"./date.svelte\\\";\\nexport { default as EditorCell } from \\\"./editor.svelte\\\";\\nexport { default as EmailCell } from \\\"./email.svelte\\\";\\nexport { default as FileCell } from \\\"./file.svelte\\\";\\nexport { default as GeoPointCell } from \\\"./geoPoint.svelte\\\";\\nexport { default as JsonCell } from \\\"./json.svelte\\\";\\nexport { default as NumberCell } from \\\"./number.svelte\\\";\\nexport { default as PasswordCell } from \\\"./password.svelte\\\";\\nexport { default as RelationCell } from \\\"./relation.svelte\\\";\\nexport { default as SelectCell } from \\\"./select.svelte\\\";\\nexport { default as TextCell } from \\\"./text.svelte\\\";\\nexport { default as UrlCell } from \\\"./url.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: any } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value !== undefined}\\n\\t\\t{JSON.stringify(value)}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: number | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>********</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\texpanded,\\n\\t\\tdisplayField = 'id',\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\texpanded: any;\\n\\t\\tdisplayField?: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if expanded}\\n\\t\\t{#if Array.isArray(expanded)}\\n\\t\\t\\t{#each expanded.slice(0, 2) as item}\\n\\t\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t{item[displayField]}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/each}\\n\\t\\t\\t{#if expanded.length > 2}\\n\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t+{expanded.length - 2}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/if}\\n\\t\\t{:else}\\n\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t{expanded[displayField]}\\n\\t\\t\\t</Badge>\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\toptions,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string[] | string | undefined;\\n\\t\\toptions: Record<string, { label: string; value: string }>;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t{#if Array.isArray(value)}\\n\\t\\t\\t{#each value.slice(0, 2) as item}\\n\\t\\t\\t\\t<Badge variant=\\\"outline\\\" class=\\\"mr-1\\\">\\n\\t\\t\\t\\t\\t{options[item].label}\\n\\t\\t\\t\\t</Badge>\\n\\t\\t\\t{/each}\\n\\t\\t{:else}\\n\\t\\t\\t{options[value].label}\\n\\t\\t{/if}\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { value: string | undefined } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{value}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue,\\n\\t\\tclass: className,\\n\\t\\ttarget = '_blank',\\n\\t\\trel = 'noopener noreferrer',\\n\\t\\t...restProps\\n\\t}: {\\n\\t\\tvalue: string | undefined;\\n\\t\\ttarget?: string;\\n\\t\\trel?: string;\\n\\t} & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n<div class={cn('flex items-center', className)} {...restProps}>\\n\\t{#if value}\\n\\t\\t<a href={value} {target} {rel}>{value}</a>\\n\\t{/if}\\n</div>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport type { Column } from '@tanstack/table-core';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport ArrowUpIcon from '@lucide/svelte/icons/arrow-up';\\n\\timport ArrowDownIcon from '@lucide/svelte/icons/arrow-down';\\n\\timport ChevronsUpDownIcon from '@lucide/svelte/icons/chevrons-up-down';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tcolumn,\\n\\t\\ttitle,\\n\\t\\tclass: className,\\n\\t\\t...restProps\\n\\t}: { column: Column<any>; title: string } & HTMLAttributes<HTMLDivElement> = $props();\\n</script>\\n\\n{#if !column?.getCanSort()}\\n\\t<div class={className} {...restProps}>\\n\\t\\t{title}\\n\\t</div>\\n{:else}\\n\\t<div class={cn('flex items-center', className)} {...restProps}>\\n\\t\\t<DropdownMenu.Root>\\n\\t\\t\\t<DropdownMenu.Trigger>\\n\\t\\t\\t\\t{#snippet child({ props })}\\n\\t\\t\\t\\t\\t<Button\\n\\t\\t\\t\\t\\t\\t{...props}\\n\\t\\t\\t\\t\\t\\tvariant=\\\"ghost\\\"\\n\\t\\t\\t\\t\\t\\tsize=\\\"sm\\\"\\n\\t\\t\\t\\t\\t\\tclass=\\\"data-[state=open]:bg-accent -ml-3 h-8\\\"\\n\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t<span>\\n\\t\\t\\t\\t\\t\\t\\t{title}\\n\\t\\t\\t\\t\\t\\t</span>\\n\\t\\t\\t\\t\\t\\t{#if column.getIsSorted() === 'desc'}\\n\\t\\t\\t\\t\\t\\t\\t<ArrowDownIcon />\\n\\t\\t\\t\\t\\t\\t{:else if column.getIsSorted() === 'asc'}\\n\\t\\t\\t\\t\\t\\t\\t<ArrowUpIcon />\\n\\t\\t\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t\\t\\t<ChevronsUpDownIcon />\\n\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t</Button>\\n\\t\\t\\t\\t{/snippet}\\n\\t\\t\\t</DropdownMenu.Trigger>\\n\\t\\t\\t<DropdownMenu.Content align=\\\"start\\\">\\n\\t\\t\\t\\t<DropdownMenu.Item onclick={() => column.toggleSorting(false)}>\\n\\t\\t\\t\\t\\t<ArrowUpIcon class=\\\"text-muted-foreground/70 mr-2 size-3.5\\\" />\\n\\t\\t\\t\\t\\tAsc\\n\\t\\t\\t\\t</DropdownMenu.Item>\\n\\t\\t\\t\\t<DropdownMenu.Item onclick={() => column.toggleSorting(true)}>\\n\\t\\t\\t\\t\\t<ArrowDownIcon class=\\\"text-muted-foreground/70 mr-2 size-3.5\\\" />\\n\\t\\t\\t\\t\\tDesc\\n\\t\\t\\t\\t</DropdownMenu.Item>\\n\\t\\t\\t</DropdownMenu.Content>\\n\\t\\t</DropdownMenu.Root>\\n\\t</div>\\n{/if}\\n\"","export default \"export { default as ColumnHeader } from \\\"./column-header.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"TData, TValue\\\">\\n\\timport type { Component } from 'svelte';\\n\\timport { SvelteSet } from 'svelte/reactivity';\\n\\timport type { Column } from '@tanstack/table-core';\\n\\timport CirclePlusIcon from '@lucide/svelte/icons/circle-plus';\\n\\timport CheckIcon from '@lucide/svelte/icons/check';\\n\\timport * as Command from '$lib/components/ui/command';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport { Separator } from '$lib/components/ui/separator';\\n\\timport { Badge } from '$lib/components/ui/badge';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tcolumn,\\n\\t\\ttitle,\\n\\t\\toptions\\n\\t}: {\\n\\t\\tcolumn: Column<TData, TValue>;\\n\\t\\ttitle: string;\\n\\t\\toptions: {\\n\\t\\t\\tlabel: string;\\n\\t\\t\\tvalue: string;\\n\\t\\t\\ticon?: Component;\\n\\t\\t}[];\\n\\t} = $props();\\n\\n\\tconst facets = $derived(column?.getFacetedUniqueValues());\\n\\tconst selectedValues = $derived(new SvelteSet(column?.getFilterValue() as string[]));\\n</script>\\n\\n<Popover.Root>\\n\\t<Popover.Trigger>\\n\\t\\t{#snippet child({ props })}\\n\\t\\t\\t<Button {...props} variant=\\\"outline\\\" size=\\\"sm\\\" class=\\\"h-8 border-dashed\\\">\\n\\t\\t\\t\\t<CirclePlusIcon />\\n\\t\\t\\t\\t{title}\\n\\t\\t\\t\\t{#if selectedValues.size > 0}\\n\\t\\t\\t\\t\\t<Separator orientation=\\\"vertical\\\" class=\\\"mx-2 h-4\\\" />\\n\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal lg:hidden\\\">\\n\\t\\t\\t\\t\\t\\t{selectedValues.size}\\n\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t<div class=\\\"hidden space-x-1 lg:flex\\\">\\n\\t\\t\\t\\t\\t\\t{#if selectedValues.size > 2}\\n\\t\\t\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t{selectedValues.size} selected\\n\\t\\t\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t\\t{:else}\\n\\t\\t\\t\\t\\t\\t\\t{#each options.filter((opt) => selectedValues.has(opt.value)) as option (option)}\\n\\t\\t\\t\\t\\t\\t\\t\\t<Badge variant=\\\"secondary\\\" class=\\\"rounded-sm px-1 font-normal\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{option.label}\\n\\t\\t\\t\\t\\t\\t\\t\\t</Badge>\\n\\t\\t\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t</Button>\\n\\t\\t{/snippet}\\n\\t</Popover.Trigger>\\n\\t<Popover.Content class=\\\"w-[200px] p-0\\\" align=\\\"start\\\">\\n\\t\\t<Command.Root>\\n\\t\\t\\t<Command.Input placeholder={title} />\\n\\t\\t\\t<Command.List>\\n\\t\\t\\t\\t<Command.Empty>No results found.</Command.Empty>\\n\\t\\t\\t\\t<Command.Group>\\n\\t\\t\\t\\t\\t{#each options as option (option)}\\n\\t\\t\\t\\t\\t\\t{@const isSelected = selectedValues.has(option.value)}\\n\\t\\t\\t\\t\\t\\t<Command.Item\\n\\t\\t\\t\\t\\t\\t\\tonSelect={() => {\\n\\t\\t\\t\\t\\t\\t\\t\\tif (isSelected) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tselectedValues.delete(option.value);\\n\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tselectedValues.add(option.value);\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\tconst filterValues = Array.from(selectedValues);\\n\\t\\t\\t\\t\\t\\t\\t\\tcolumn?.setFilterValue(filterValues.length ? filterValues : undefined);\\n\\t\\t\\t\\t\\t\\t\\t}}\\n\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\t<div\\n\\t\\t\\t\\t\\t\\t\\t\\tclass={cn(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'border-primary mr-2 flex size-4 items-center justify-center rounded-sm border',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tisSelected ? 'bg-primary text-primary-foreground' : 'opacity-50 [&_svg]:invisible'\\n\\t\\t\\t\\t\\t\\t\\t\\t)}\\n\\t\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\t\\t<CheckIcon class=\\\"size-4\\\" />\\n\\t\\t\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\t\\t\\t{#if option.icon}\\n\\t\\t\\t\\t\\t\\t\\t\\t{@const Icon = option.icon}\\n\\t\\t\\t\\t\\t\\t\\t\\t<Icon class=\\\"text-muted-foreground\\\" />\\n\\t\\t\\t\\t\\t\\t\\t{/if}\\n\\n\\t\\t\\t\\t\\t\\t\\t<span>{option.label}</span>\\n\\t\\t\\t\\t\\t\\t\\t{#if facets?.get(option.value)}\\n\\t\\t\\t\\t\\t\\t\\t\\t<span class=\\\"ml-auto flex size-4 items-center justify-center font-mono text-xs\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{facets.get(option.value)}\\n\\t\\t\\t\\t\\t\\t\\t\\t</span>\\n\\t\\t\\t\\t\\t\\t\\t{/if}\\n\\t\\t\\t\\t\\t\\t</Command.Item>\\n\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t</Command.Group>\\n\\t\\t\\t\\t{#if selectedValues.size > 0}\\n\\t\\t\\t\\t\\t<Command.Separator />\\n\\t\\t\\t\\t\\t<Command.Group>\\n\\t\\t\\t\\t\\t\\t<Command.Item\\n\\t\\t\\t\\t\\t\\t\\tonSelect={() => column?.setFilterValue(undefined)}\\n\\t\\t\\t\\t\\t\\t\\tclass=\\\"justify-center text-center\\\"\\n\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\tClear filters\\n\\t\\t\\t\\t\\t\\t</Command.Item>\\n\\t\\t\\t\\t\\t</Command.Group>\\n\\t\\t\\t\\t{/if}\\n\\t\\t\\t</Command.List>\\n\\t\\t</Command.Root>\\n\\t</Popover.Content>\\n</Popover.Root>\\n\"","export default \"export { default as FacetedFilter } from \\\"./faceted-filter.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends Record<string, unknown>, U extends FormPath<T>\\\">\\n\\timport * as FormPrimitive from 'formsnap';\\n\\timport type { FormPath } from 'sveltekit-superforms';\\n\\timport { cn, type WithElementRef, type WithoutChildren } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { setContext } from 'svelte';\\n\\n\\tlet {\\n\\t\\tref = $bindable(null),\\n\\t\\tclass: className,\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\tchildren: childrenProp,\\n\\t\\t...restProps\\n\\t}: FormPrimitive.FieldProps<T, U> &\\n\\t\\tWithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();\\n\\n\\tsetContext('file-field', {\\n\\t\\tget form() {\\n\\t\\t\\treturn form;\\n\\t\\t},\\n\\t\\tget name() {\\n\\t\\t\\treturn name;\\n\\t\\t}\\n\\t});\\n</script>\\n\\n<FormPrimitive.Field {form} {name}>\\n\\t{#snippet children({ constraints, errors, tainted, value })}\\n\\t\\t<div bind:this={ref} data-slot=\\\"form-item\\\" class={cn('space-y-2', className)} {...restProps}>\\n\\t\\t\\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\\n\\t\\t</div>\\n\\t{/snippet}\\n</FormPrimitive.Field>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext } from 'svelte';\\n\\timport { fileProxy, filesProxy, type SuperForm } from 'sveltekit-superforms';\\n\\timport { Input } from '$lib/components/ui/input';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst { multiple } = getContext<{ multiple: boolean }>('file-field-multiple');\\n\\n\\tconst files = multiple ? filesProxy(ctx.form, `${ctx.name}+`) : fileProxy(ctx.form, ctx.name);\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tconst { ...props } = $props();\\n\\n\\tconst onchange = () => {\\n\\t\\treset({\\n\\t\\t\\tdata: $formData\\n\\t\\t});\\n\\t};\\n</script>\\n\\n{#if !multiple}\\n\\t{#if $formData[ctx.name]}\\n\\t\\t{#if typeof $formData[ctx.name] === 'string'}\\n\\t\\t\\t<input type=\\\"text\\\" name={ctx.name} value={$formData[ctx.name]} class=\\\"hidden\\\" />\\n\\t\\t{:else}\\n\\t\\t\\t<input type=\\\"file\\\" name={ctx.name} files={$files} class=\\\"hidden\\\" />\\n\\t\\t{/if}\\n\\t{:else}\\n\\t\\t<input type=\\\"text\\\" name={ctx.name} value=\\\"\\\" class=\\\"hidden\\\" />\\n\\t{/if}\\n{/if}\\n\\n<Input\\n\\ttype=\\\"file\\\"\\n\\tbind:files={$files}\\n\\t{multiple}\\n\\t{onchange}\\n\\t{...props}\\n\\tname={multiple ? `${ctx.name}+` : ''}\\n/>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext, getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport { getName } from './shared';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst {\\n\\t\\tdisplay,\\n\\t\\tinput\\n\\t}: {\\n\\t\\tdisplay: (props: {\\n\\t\\t\\tfile: File | string;\\n\\t\\t\\tfilename: string;\\n\\t\\t\\tonremove: (file: File | string) => void;\\n\\t\\t}) => any;\\n\\t\\tinput: () => any;\\n\\t} = $props();\\n\\n\\tsetContext('file-field-multiple', { multiple: true });\\n\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tlet removed = $state<string[]>([]);\\n\\n\\tconst onremove = (file: File | string) => {\\n\\t\\tif (typeof file === 'string') {\\n\\t\\t\\tremoved.push(file);\\n\\t\\t} else {\\n\\t\\t\\tif (Array.isArray($formData[`${ctx.name}+`])) {\\n\\t\\t\\t\\treset({\\n\\t\\t\\t\\t\\tdata: {\\n\\t\\t\\t\\t\\t\\t...$formData,\\n\\t\\t\\t\\t\\t\\t[`${ctx.name}+`]: $formData[`${ctx.name}+`].filter((f: File | string) => f !== file) as\\n\\t\\t\\t\\t\\t\\t\\t| File[]\\n\\t\\t\\t\\t\\t\\t\\t| undefined\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t});\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n\\n\\tconst initialFiles = $formData[ctx.name] || [];\\n</script>\\n\\n{#if initialFiles}\\n\\t{#each initialFiles as file}\\n\\t\\t{#if !removed.includes(file)}\\n\\t\\t\\t{@render display({ file, filename: getName(file), onremove })}\\n\\t\\t{/if}\\n\\t{/each}\\n{/if}\\n\\n{#each $formData[`${ctx.name}+`] as file}\\n\\t{#if file && typeof file !== 'string'}\\n\\t\\t{@render display({ file, filename: getName(file), onremove })}\\n\\t{/if}\\n{/each}\\n\\n{#each removed as removedFile}\\n\\t<input type=\\\"text\\\" name={`${ctx.name}-`} value={removedFile} class=\\\"hidden\\\" />\\n{/each}\\n\\n{@render input()}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext, getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport { getName } from './shared';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst {\\n\\t\\tdisplay,\\n\\t\\tinput\\n\\t}: {\\n\\t\\tdisplay: (props: {\\n\\t\\t\\tfile: File | string;\\n\\t\\t\\tfilename: string;\\n\\t\\t\\tonremove: (file: File | string) => void;\\n\\t\\t}) => any;\\n\\t\\tinput: () => any;\\n\\t} = $props();\\n\\n\\tconst { form: formData, reset } = ctx.form;\\n\\n\\tsetContext('file-field-multiple', { multiple: false });\\n\\n\\tconst onremove = () => {\\n\\t\\treset({\\n\\t\\t\\tdata: {\\n\\t\\t\\t\\t...$formData,\\n\\t\\t\\t\\t[ctx.name]: ''\\n\\t\\t\\t}\\n\\t\\t});\\n\\t};\\n</script>\\n\\n{#if $formData[ctx.name]}\\n\\t{@render display({ file: $formData[ctx.name], filename: getName($formData[ctx.name]), onremove })}\\n{/if}\\n\\n{@render input()}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext } from 'svelte';\\n\\timport { type SuperForm } from 'sveltekit-superforms';\\n\\timport FileIcon from '@lucide/svelte/icons/file';\\n\\timport ImageIcon from '@lucide/svelte/icons/image';\\n\\timport { cn } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\n\\tconst ctx = getContext<{ form: SuperForm<any, any>; name: string }>('file-field');\\n\\tconst { form: formData } = ctx.form;\\n\\n\\tconst {\\n\\t\\tfile,\\n\\t\\tfilename,\\n\\t\\tcollectionId,\\n\\t\\tid,\\n\\t\\tthumb = '50x50',\\n\\t\\tclass: className,\\n\\t\\ttype = 'image',\\n\\t\\t...props\\n\\t}: {\\n\\t\\tfile: File | string;\\n\\t\\tfilename: string;\\n\\t\\tcollectionId?: string;\\n\\t\\tid?: string;\\n\\t\\tthumb?: string;\\n\\t\\tclass?: string;\\n\\t\\ttype?: 'image' | 'file';\\n\\t} & HTMLAttributes<HTMLImageElement> = $props();\\n\\n\\tconst isImage = $derived(\\n\\t\\ttype === 'image' ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.png') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.jpg') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.jpeg') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.gif') ||\\n\\t\\t\\tfilename.toLowerCase().endsWith('.webp')\\n\\t);\\n\\n\\tfunction getUrl(file: string) {\\n\\t\\treturn `/api/files/${collectionId ?? $formData.collectionId}/${id ?? $formData.id}/${file}?thumb=${thumb}`;\\n\\t}\\n</script>\\n\\n{#if typeof file === 'string'}\\n\\t{#if (id ?? $formData.collectionId) && (id ?? $formData.id) && isImage}\\n\\t\\t<img src={getUrl(file)} alt={filename} class={className} {...props} />\\n\\t{:else}\\n\\t\\t<div\\n\\t\\t\\tclass={cn('flex items-center justify-center w-full h-full bg-muted rounded-md', className)}\\n\\t\\t\\t{...props as HTMLAttributes<HTMLDivElement>}\\n\\t\\t>\\n\\t\\t\\t{#if isImage}\\n\\t\\t\\t\\t<ImageIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t{:else}\\n\\t\\t\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t\\t\\t{/if}\\n\\t\\t</div>\\n\\t{/if}\\n{:else if isImage}\\n\\t<img src={URL.createObjectURL(file)} alt={filename} class={className} {...props} />\\n{:else}\\n\\t<div\\n\\t\\tclass={cn('flex items-center justify-center w-full h-full bg-muted rounded-md', className)}\\n\\t\\t{...props as HTMLAttributes<HTMLDivElement>}\\n\\t>\\n\\t\\t<FileIcon class=\\\"w-4 h-4\\\" />\\n\\t</div>\\n{/if}\\n\"","export default \"export { default as Field } from \\\"./file-field.svelte\\\";\\nexport { default as Single } from \\\"./file-single.svelte\\\";\\nexport { default as Multiple } from \\\"./file-multiple.svelte\\\";\\nexport { default as Input } from \\\"./file-input.svelte\\\";\\nexport { default as Thumb } from \\\"./file-thumb.svelte\\\";\\n\"","export default \"export function getUrl(\\n file: File | string,\\n collectionId: string,\\n recordId: string,\\n thumb: string,\\n) {\\n return typeof file === \\\"string\\\"\\n ? `/api/files/${collectionId}/${recordId}/${file}?thumb=${thumb}`\\n : URL.createObjectURL(file);\\n}\\n\\nexport function getName(file: File | string) {\\n return typeof file === \\\"string\\\" ? (file.split(\\\"/\\\").pop() ?? \\\"\\\") : file.name;\\n}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet {\\n\\t\\tvalue = $bindable(),\\n\\t\\tid,\\n\\t\\tlabel,\\n\\t\\tshortLabel,\\n\\t\\tmapOpen\\n\\t}: {\\n\\t\\tvalue: number;\\n\\t\\tid: string;\\n\\t\\tlabel: string;\\n\\t\\tshortLabel: string;\\n\\t\\tmapOpen: boolean;\\n\\t} = $props();\\n</script>\\n\\n<div\\n\\tclass={cn(\\n\\t\\t'border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground shadow-xs flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base outline-none transition-[color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\\n\\t\\t'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]',\\n\\t\\t'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\\n\\t\\t'pr-0 flex items-center',\\n\\t\\tlabel === 'Latitude' && 'rounded-r-none',\\n\\t\\tlabel === 'Longitude' && 'rounded-none -ml-px',\\n\\t\\tmapOpen && 'rounded-b-none'\\n\\t)}\\n>\\n\\t<label for={id} class=\\\"text-muted-foreground mr-2\\\">\\n\\t\\t<span class=\\\"hidden md:block\\\">{label}</span>\\n\\t\\t<span class=\\\"block md:hidden\\\">{shortLabel}</span>\\n\\t</label>\\n\\n\\t<input\\n\\t\\tbind:value\\n\\t\\ttype=\\\"number\\\"\\n\\t\\tclass=\\\"border-none outline-none min-w-0 w-full pr-2\\\"\\n\\t\\t{id}\\n\\t\\tstep=\\\"0.000001\\\"\\n\\t/>\\n</div>\\n\"","export default \"export { default as GeopointInput } from \\\"./input.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { setContext } from 'svelte';\\n\\timport ToggleMap from './toggle-map.svelte';\\n\\timport Coordinate from './coordinate.svelte';\\n\\n\\tlet {\\n\\t\\tname,\\n\\t\\tvalue = $bindable()\\n\\t}: {\\n\\t\\tname: string;\\n\\t\\tvalue: string | undefined;\\n\\t} = $props();\\n\\n\\tconst geopoint = $state(value ? JSON.parse(value) : { lat: 0, lon: 0 });\\n\\tconst map = $state({ open: false });\\n\\n\\tsetContext('geopoint', {\\n\\t\\tgeopoint,\\n\\t\\tmap\\n\\t});\\n\\n\\t$effect(() => {\\n\\t\\tif (value) {\\n\\t\\t\\tconst parsed = JSON.parse(value);\\n\\n\\t\\t\\tif (typeof parsed === 'object' && parsed !== null && 'lat' in parsed && 'lon' in parsed) {\\n\\t\\t\\t\\tgeopoint.lat = parsed.lat.toFixed(6);\\n\\t\\t\\t\\tgeopoint.lon = parsed.lon.toFixed(6);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t});\\n\\n\\tconst stringValue = $derived(\\n\\t\\tJSON.stringify({ lat: parseFloat(geopoint.lat), lon: parseFloat(geopoint.lon) })\\n\\t);\\n</script>\\n\\n<input type=\\\"hidden\\\" {name} value={stringValue} />\\n\\n<div class=\\\"w-full\\\">\\n\\t<div class=\\\"w-full flex\\\">\\n\\t\\t<Coordinate\\n\\t\\t\\tid=\\\"latitude\\\"\\n\\t\\t\\tlabel=\\\"Latitude\\\"\\n\\t\\t\\tshortLabel=\\\"Lat\\\"\\n\\t\\t\\tbind:value={geopoint.lat}\\n\\t\\t\\tmapOpen={map.open}\\n\\t\\t/>\\n\\t\\t<Coordinate\\n\\t\\t\\tid=\\\"longitude\\\"\\n\\t\\t\\tlabel=\\\"Longitude\\\"\\n\\t\\t\\tshortLabel=\\\"Lon\\\"\\n\\t\\t\\tbind:value={geopoint.lon}\\n\\t\\t\\tmapOpen={map.open}\\n\\t\\t/>\\n\\t\\t<ToggleMap />\\n\\t</div>\\n\\n\\t{#if map.open}\\n\\t\\t{#await import('$lib/components/ui/leaflet/leaflet.svelte')}\\n\\t\\t\\t<div class=\\\"h-[225px] w-full bg-input rounded-b-md\\\"></div>\\n\\t\\t{:then { default: Leaflet }}\\n\\t\\t\\t<Leaflet height={225} point={geopoint} class=\\\"rounded-b-md overflow-hidden\\\" />\\n\\t\\t{/await}\\n\\t{/if}\\n</div>\\n\"","export default \"<script>\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport MapIcon from '@lucide/svelte/icons/map';\\n\\timport { getContext } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet { map } = getContext('geopoint');\\n</script>\\n\\n<Button\\n\\tvariant=\\\"outline\\\"\\n\\tsize=\\\"icon\\\"\\n\\tclass={cn('w-10 rounded-none rounded-r-md border-l-0', map.open && 'rounded-b-none')}\\n\\tonclick={() => (map.open = !map.open)}\\n>\\n\\t<MapIcon class=\\\"w-4 h-4\\\" />\\n</Button>\\n\"","export default \"export { default as Leaflet } from \\\"./leaflet.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { onMount } from 'svelte';\\n\\timport L from 'leaflet';\\n\\timport 'leaflet/dist/leaflet.css';\\n\\n\\t// manually load the markers so that they can be embedded in the prod bundle\\n\\timport markerIconUrl from 'leaflet/dist/images/marker-icon.png';\\n\\timport markerIconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\\n\\timport markerShadowUrl from 'leaflet/dist/images/marker-shadow.png';\\n\\n\\tlet { height = 225, point = $bindable(), readonly = false, ...props } = $props();\\n\\n\\tlet map: L.Map;\\n\\tlet mapEl: HTMLElement;\\n\\tlet marker: L.Marker;\\n\\tlet panTimeoutId: ReturnType<typeof setTimeout>;\\n\\n\\tconst defaultZoomLevel = 8;\\n\\n\\t$effect(() => {\\n\\t\\tif (point.lat && point.lon) {\\n\\t\\t\\tpanInside();\\n\\t\\t}\\n\\t});\\n\\n\\tfunction normalizeCoordinate(coord: any) {\\n\\t\\treturn +(+coord).toFixed(6);\\n\\t}\\n\\n\\tfunction panInside(debounce = 200) {\\n\\t\\tclearTimeout(panTimeoutId);\\n\\t\\tpanTimeoutId = setTimeout(() => {\\n\\t\\t\\tmarker?.setLatLng([point.lat, point.lon]);\\n\\t\\t\\tmap?.panInside([point.lat, point.lon], { padding: [20, 40] });\\n\\t\\t}, debounce);\\n\\t}\\n\\n\\tfunction initMap() {\\n\\t\\tconst latlon = [\\n\\t\\t\\tnormalizeCoordinate(point.lat),\\n\\t\\t\\tnormalizeCoordinate(point.lon)\\n\\t\\t] as L.LatLngTuple;\\n\\n\\t\\tmap = L.map(mapEl, {\\n\\t\\t\\tzoomControl: false,\\n\\t\\t\\tmaxBounds: [\\n\\t\\t\\t\\t[-90, -180],\\n\\t\\t\\t\\t[90, 180]\\n\\t\\t\\t],\\n\\t\\t\\tminZoom: 2\\n\\t\\t}).setView(latlon, defaultZoomLevel);\\n\\n\\t\\tif (readonly) {\\n\\t\\t\\tmap.dragging.disable();\\n\\t\\t\\tmap.touchZoom.disable();\\n\\t\\t\\tmap.doubleClickZoom.disable();\\n\\t\\t\\tmap.scrollWheelZoom.disable();\\n\\t\\t\\tmap.boxZoom.disable();\\n\\t\\t\\tmap.keyboard.disable();\\n\\t\\t}\\n\\n\\t\\tL.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {\\n\\t\\t\\tattribution: '© <a href=\\\"https://www.openstreetmap.org/copyright\\\">OSM</a>',\\n\\t\\t\\tnoWrap: true\\n\\t\\t}).addTo(map);\\n\\n\\t\\tmap.attributionControl.setPrefix('');\\n\\n\\t\\t// reassign the default marker images with the loaded ones\\n\\t\\t// (https://leafletjs.com/reference.html#icon-default-option)\\n\\t\\tL.Icon.Default.prototype.options.iconUrl = markerIconUrl;\\n\\t\\tL.Icon.Default.prototype.options.iconRetinaUrl = markerIconRetinaUrl;\\n\\t\\tL.Icon.Default.prototype.options.shadowUrl = markerShadowUrl;\\n\\t\\tL.Icon.Default.imagePath = '';\\n\\n\\t\\tmarker = L.marker(latlon, {\\n\\t\\t\\tdraggable: true,\\n\\t\\t\\tautoPan: true\\n\\t\\t}).addTo(map);\\n\\n\\t\\tmarker.bindTooltip('drag or right click anywhere on the map to move');\\n\\n\\t\\tmarker.on('moveend', (e) => {\\n\\t\\t\\tif (e.sourceTarget?._latlng) {\\n\\t\\t\\t\\tselect(e.sourceTarget._latlng.lat, e.sourceTarget._latlng.lng, false);\\n\\t\\t\\t}\\n\\t\\t});\\n\\n\\t\\tmap.on('contextmenu', (e) => {\\n\\t\\t\\tselect(e.latlng.lat, e.latlng.lng, false);\\n\\t\\t});\\n\\t}\\n\\n\\tfunction destroyMap() {\\n\\t\\tmarker?.remove();\\n\\t\\tmap?.remove();\\n\\t}\\n\\n\\tfunction select(lat: number, lon: number, centerMap = true) {\\n\\t\\tpoint.lat = normalizeCoordinate(lat);\\n\\t\\tpoint.lon = normalizeCoordinate(lon);\\n\\n\\t\\t// center the map\\n\\t\\tif (centerMap) {\\n\\t\\t\\tmarker?.setLatLng([point.lat, point.lon]); // optimistic marker update\\n\\t\\t\\tmap?.panTo([point.lat, point.lon], { animate: false });\\n\\t\\t}\\n\\t}\\n\\n\\tonMount(() => {\\n\\t\\tinitMap();\\n\\n\\t\\treturn () => {\\n\\t\\t\\tdestroyMap();\\n\\t\\t};\\n\\t});\\n</script>\\n\\n<div class=\\\"map-wrapper\\\" style=\\\"{height ? `height:${height}px` : null};\\\" {...props}>\\n\\t<div bind:this={mapEl} class=\\\"map-box\\\"></div>\\n</div>\\n\\n<style>\\n\\t.map-wrapper {\\n\\t\\tposition: relative;\\n\\t\\tdisplay: block;\\n\\t\\theight: 100%;\\n\\t\\twidth: 100%;\\n\\t}\\n\\t.map-box {\\n\\t\\tz-index: 1;\\n\\t\\theight: 100%;\\n\\t\\twidth: 100%;\\n\\t}\\n</style>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport type { Snippet } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\n\\tlet { children, class: className }: { children: Snippet; class?: string } = $props();\\n</script>\\n\\n<span class={cn('bg-secondary text-secondary-foreground px-2 py-1 rounded-sm text-sm', className)}>\\n\\t{@render children?.()}\\n</span>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { Popover as PopoverPrimitive } from 'bits-ui';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\t...props\\n\\t}: PopoverPrimitive.ContentProps & {\\n\\t\\tportalProps?: PopoverPrimitive.PortalProps;\\n\\t} = $props();\\n</script>\\n\\n<Popover.Content {...props}>\\n\\t{@render children?.()}\\n</Popover.Content>\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends Record<string, unknown>, U extends FormPath<T>\\\">\\n\\timport * as FormPrimitive from 'formsnap';\\n\\timport type { FormPath } from 'sveltekit-superforms';\\n\\timport { cn, type WithElementRef, type WithoutChildren } from '$lib/utils';\\n\\timport type { HTMLAttributes } from 'svelte/elements';\\n\\timport { setContext } from 'svelte';\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\n\\tlet {\\n\\t\\tref = $bindable(null),\\n\\t\\tclass: className,\\n\\t\\ttype,\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\trequired,\\n\\t\\tchildren: childrenProp,\\n\\t\\t...restProps\\n\\t}: FormPrimitive.FieldProps<T, U> & {\\n\\t\\ttype: 'multiple' | 'single';\\n\\t\\trequired?: boolean;\\n\\t} & WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();\\n\\n\\tconst { form: formData } = form;\\n\\n\\tconst toggleSelected = (value: string) => {\\n\\t\\tif (type === 'single') {\\n\\t\\t\\tif (!required && $formData[name] === value) {\\n\\t\\t\\t\\t$formData[name] = undefined as T[U];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$formData[name] = value as T[U];\\n\\t\\t\\t}\\n\\t\\t} else if (type === 'multiple') {\\n\\t\\t\\tif (!$formData[name]) {\\n\\t\\t\\t\\t$formData[name] = [] as T[U];\\n\\t\\t\\t}\\n\\n\\t\\t\\tconst currentValue = $formData[name] as string[];\\n\\t\\t\\tconst index = currentValue.indexOf(value);\\n\\n\\t\\t\\tif (index > -1) {\\n\\t\\t\\t\\t$formData[name] = currentValue.filter((id) => id !== value) as T[U];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$formData[name] = [...currentValue, value] as T[U];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n\\n\\tconst isSelected = (value: string) => {\\n\\t\\tif (type === 'single') {\\n\\t\\t\\treturn $formData[name] === value;\\n\\t\\t} else if (type === 'multiple') {\\n\\t\\t\\treturn ($formData[name] as string[])?.includes(value) ?? false;\\n\\t\\t}\\n\\t};\\n\\n\\tsetContext('multiselect-field', {\\n\\t\\tform,\\n\\t\\tname,\\n\\t\\ttype,\\n\\t\\ttoggleSelected,\\n\\t\\tisSelected\\n\\t});\\n</script>\\n\\n<Popover.Root>\\n\\t<FormPrimitive.Field {form} {name}>\\n\\t\\t{#snippet children({ constraints, errors, tainted, value })}\\n\\t\\t\\t<div bind:this={ref} data-slot=\\\"form-item\\\" class={cn('space-y-2', className)} {...restProps}>\\n\\t\\t\\t\\t{@render childrenProp?.({ constraints, errors, tainted, value: value as T[U] })}\\n\\t\\t\\t</div>\\n\\t\\t{/snippet}\\n\\t</FormPrimitive.Field>\\n</Popover.Root>\\n\"","export default \"export { default as Field } from \\\"./field.svelte\\\";\\nexport { default as Trigger } from \\\"./trigger.svelte\\\";\\nexport { default as Input } from \\\"./input.svelte\\\";\\nexport { default as Content } from \\\"./content.svelte\\\";\\nexport { default as Item } from \\\"./item.svelte\\\";\\nexport { default as Chip } from \\\"./chip.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\" generics=\\\"T extends string\\\">\\n\\timport type { SuperForm } from 'sveltekit-superforms';\\n\\timport { getContext, type Snippet } from 'svelte';\\n\\n\\tconst { form, type } = getContext<{ form: SuperForm<any, any>; type: 'single' | 'multiple' }>(\\n\\t\\t'multiselect-field'\\n\\t);\\n\\tconst { form: formData } = form;\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tplaceholder,\\n\\t\\tname,\\n\\t\\tvalue = $bindable()\\n\\t}: {\\n\\t\\tchildren: Snippet<[{ selected: T[] }]>;\\n\\t\\tplaceholder?: string;\\n\\t\\tname: string;\\n\\t\\tvalue: T[] | T | undefined;\\n\\t} = $props();\\n</script>\\n\\n{#if value && value.length > 0}\\n\\t{@render children?.({ selected: type === 'single' ? [$formData[name]] : $formData[name] })}\\n\\t{#if type === 'multiple'}\\n\\t\\t{#each value as v}\\n\\t\\t\\t<input type=\\\"hidden\\\" {name} value={v} />\\n\\t\\t{/each}\\n\\t{:else}\\n\\t\\t<input type=\\\"hidden\\\" {name} {value} />\\n\\t{/if}\\n{:else}\\n\\t{placeholder}\\n{/if}\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { getContext, type Snippet } from 'svelte';\\n\\timport { cn } from '$lib/utils';\\n\\timport { Command as CommandPrimitive } from 'bits-ui';\\n\\timport * as Command from '$lib/components/ui/command';\\n\\timport CheckIcon from '@lucide/svelte/icons/check';\\n\\n\\tlet {\\n\\t\\tchildren,\\n\\t\\tvalue,\\n\\t\\tlabel,\\n\\t\\tclass: className,\\n\\t\\t...props\\n\\t}: CommandPrimitive.ItemProps & {\\n\\t\\tvalue: string;\\n\\t\\tlabel: string | undefined;\\n\\t\\tchildren?: Snippet;\\n\\t\\tclass?: string;\\n\\t} = $props();\\n\\n\\tconst { toggleSelected, isSelected } = getContext<{\\n\\t\\ttoggleSelected: (value: string) => void;\\n\\t\\tisSelected: (value: string) => boolean;\\n\\t}>('multiselect-field');\\n\\n\\tconst handleSelect = () => {\\n\\t\\ttoggleSelected(value);\\n\\t};\\n</script>\\n\\n<Command.Item\\n\\tclass={cn('cursor-pointer', className)}\\n\\t{...props}\\n\\tvalue={label}\\n\\tonSelect={handleSelect}\\n>\\n\\t{label}\\n\\t<CheckIcon class={cn('ml-auto', !isSelected(value) && 'text-transparent')} />\\n</Command.Item>\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as Popover from '$lib/components/ui/popover';\\n\\timport { Popover as PopoverPrimitive } from 'bits-ui';\\n\\timport { cn } from '$lib/utils';\\n\\timport { buttonVariants } from '$lib/components/ui/button';\\n\\timport ChevronDownIcon from '@lucide/svelte/icons/chevron-down';\\n\\n\\tlet { children, class: className, ...props }: PopoverPrimitive.TriggerProps = $props();\\n</script>\\n\\n<Popover.Trigger\\n\\tclass={cn(buttonVariants({ variant: 'outline' }), className)}\\n\\trole=\\\"combobox\\\"\\n\\t{...props}\\n>\\n\\t{@render children?.()}\\n\\t<ChevronDownIcon class=\\\"size-4 opacity-50\\\" />\\n</Popover.Trigger>\\n\"","export default \"export { default as Pagination } from \\\"./pagination.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport * as Select from '$lib/components/ui/select';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport ChevronsLeftIcon from '@lucide/svelte/icons/chevrons-left';\\n\\timport ChevronLeftIcon from '@lucide/svelte/icons/chevron-left';\\n\\timport ChevronRightIcon from '@lucide/svelte/icons/chevron-right';\\n\\timport ChevronsRightIcon from '@lucide/svelte/icons/chevrons-right';\\n\\timport type { Table as TableType } from '@tanstack/table-core';\\n\\n\\tlet { table }: { table: TableType<any> } = $props();\\n</script>\\n\\n<div class=\\\"flex items-center justify-between px-2\\\">\\n\\t<div class=\\\"text-muted-foreground flex-1 text-sm\\\">\\n\\t\\t{table.getFilteredSelectedRowModel().rows.length} of\\n\\t\\t{table.getFilteredRowModel().rows.length} row(s) selected.\\n\\t</div>\\n\\t<div class=\\\"flex items-center space-x-6 lg:space-x-8\\\">\\n\\t\\t<div class=\\\"flex items-center space-x-2\\\">\\n\\t\\t\\t<p class=\\\"text-sm font-medium\\\">Rows per page</p>\\n\\t\\t\\t<Select.Root\\n\\t\\t\\t\\tallowDeselect={false}\\n\\t\\t\\t\\ttype=\\\"single\\\"\\n\\t\\t\\t\\tvalue={`${table.getState().pagination.pageSize}`}\\n\\t\\t\\t\\tonValueChange={(value) => {\\n\\t\\t\\t\\t\\ttable.setPageSize(Number(value));\\n\\t\\t\\t\\t}}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<Select.Trigger class=\\\"h-8 w-[70px]\\\">\\n\\t\\t\\t\\t\\t{String(table.getState().pagination.pageSize)}\\n\\t\\t\\t\\t</Select.Trigger>\\n\\t\\t\\t\\t<Select.Content side=\\\"top\\\">\\n\\t\\t\\t\\t\\t{#each [10, 20, 30, 40, 50] as pageSize (pageSize)}\\n\\t\\t\\t\\t\\t\\t<Select.Item value={`${pageSize}`}>\\n\\t\\t\\t\\t\\t\\t\\t{pageSize}\\n\\t\\t\\t\\t\\t\\t</Select.Item>\\n\\t\\t\\t\\t\\t{/each}\\n\\t\\t\\t\\t</Select.Content>\\n\\t\\t\\t</Select.Root>\\n\\t\\t</div>\\n\\t\\t<div class=\\\"flex w-[100px] items-center justify-center text-sm font-medium\\\">\\n\\t\\t\\tPage {table.getState().pagination.pageIndex + 1} of\\n\\t\\t\\t{table.getPageCount()}\\n\\t\\t</div>\\n\\t\\t<div class=\\\"flex items-center space-x-2\\\">\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"hidden size-8 p-0 lg:flex\\\"\\n\\t\\t\\t\\tonclick={() => table.setPageIndex(0)}\\n\\t\\t\\t\\tdisabled={!table.getCanPreviousPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to first page</span>\\n\\t\\t\\t\\t<ChevronsLeftIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"size-8 p-0\\\"\\n\\t\\t\\t\\tonclick={() => table.previousPage()}\\n\\t\\t\\t\\tdisabled={!table.getCanPreviousPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to previous page</span>\\n\\t\\t\\t\\t<ChevronLeftIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"size-8 p-0\\\"\\n\\t\\t\\t\\tonclick={() => table.nextPage()}\\n\\t\\t\\t\\tdisabled={!table.getCanNextPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to next page</span>\\n\\t\\t\\t\\t<ChevronRightIcon />\\n\\t\\t\\t</Button>\\n\\t\\t\\t<Button\\n\\t\\t\\t\\tvariant=\\\"outline\\\"\\n\\t\\t\\t\\tclass=\\\"hidden size-8 p-0 lg:flex\\\"\\n\\t\\t\\t\\tonclick={() => table.setPageIndex(table.getPageCount() - 1)}\\n\\t\\t\\t\\tdisabled={!table.getCanNextPage()}\\n\\t\\t\\t>\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Go to last page</span>\\n\\t\\t\\t\\t<ChevronsRightIcon />\\n\\t\\t\\t</Button>\\n\\t\\t</div>\\n\\t</div>\\n</div>\\n\"","export default \"export { default as RowActions } from \\\"./row-actions.svelte\\\";\\n\"","export default \"<script lang=\\\"ts\\\">\\n\\timport { goto } from '$app/navigation';\\n\\timport * as DropdownMenu from '$lib/components/ui/dropdown-menu';\\n\\timport { Button } from '$lib/components/ui/button';\\n\\timport EllipsisIcon from '@lucide/svelte/icons/ellipsis';\\n\\n\\tlet {\\n\\t\\tviewPath,\\n\\t\\teditPath,\\n\\t\\tdeletePath\\n\\t}: {\\n\\t\\tviewPath: string;\\n\\t\\teditPath: string;\\n\\t\\tdeletePath: string;\\n\\t} = $props();\\n</script>\\n\\n<DropdownMenu.Root>\\n\\t<DropdownMenu.Trigger>\\n\\t\\t{#snippet child({ props })}\\n\\t\\t\\t<Button {...props} variant=\\\"ghost\\\" class=\\\"data-[state=open]:bg-muted flex h-8 w-8 p-0\\\">\\n\\t\\t\\t\\t<EllipsisIcon />\\n\\t\\t\\t\\t<span class=\\\"sr-only\\\">Open Menu</span>\\n\\t\\t\\t</Button>\\n\\t\\t{/snippet}\\n\\t</DropdownMenu.Trigger>\\n\\t<DropdownMenu.Content class=\\\"w-[160px]\\\" align=\\\"end\\\">\\n\\t\\t<DropdownMenu.Item onclick={() => goto(viewPath)}>View</DropdownMenu.Item>\\n\\t\\t<DropdownMenu.Item onclick={() => goto(editPath)}>Edit</DropdownMenu.Item>\\n\\t\\t<DropdownMenu.Item>\\n\\t\\t\\t<form method=\\\"POST\\\" action={deletePath}>\\n\\t\\t\\t\\t<button type=\\\"submit\\\" class=\\\"contents\\\">Delete</button>\\n\\t\\t\\t</form>\\n\\t\\t</DropdownMenu.Item>\\n\\t</DropdownMenu.Content>\\n</DropdownMenu.Root>\\n\"","import {\n existsSync,\n mkdirSync,\n readFileSync,\n rmSync,\n writeFileSync,\n} from \"node:fs\";\nimport path from \"node:path\";\nimport { detect } from \"package-manager-detector\";\nimport { resolveCommand } from \"package-manager-detector/commands\";\nimport spawn from \"cross-spawn\";\nimport type { Options, Result } from \"../core/types\";\nimport { getLogger, NOOP_LOGGER, type Logger } from \"../core/logger\";\n\ntype PackageManagerOperation = \"execute\" | \"install\";\ntype ExecuteCommand = (\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n) => Promise<void>;\n\ninterface WriteResultRuntime {\n executeCommand?: ExecuteCommand;\n}\n\ntype CustomNpmPackages = Record<string, string[]>;\n\nconst customDependencies: Record<string, string[]> = {\n \"file-form\": [\"input\", \"form\"],\n multiselect: [\"command\", \"popover\", \"button\", \"badge\"],\n geopoint: [\"button\", \"leaflet\"],\n cells: [],\n \"column-header\": [\"dropdown-menu\", \"button\"],\n \"faceted-filter\": [\"command\", \"popover\", \"button\", \"separator\", \"badge\"],\n pagination: [\"button\", \"select\"],\n \"row-actions\": [\"dropdown-menu\", \"button\"],\n leaflet: [],\n \"auth-menu\": [\"dropdown-menu\", \"button\"],\n};\n\nconst customNpmPackages: CustomNpmPackages = {\n \"file-form\": [],\n multiselect: [],\n geopoint: [],\n cells: [],\n \"column-header\": [\"@tanstack/table-core\"],\n \"faceted-filter\": [\"@tanstack/table-core\"],\n pagination: [\"@tanstack/table-core\"],\n \"row-actions\": [],\n leaflet: [\"leaflet\", \"@types/leaflet\"],\n};\n\nconst customComponentAssets = import.meta.glob<string>(\"../ui/components/**\", {\n query: \"?raw\",\n import: \"default\",\n eager: true,\n});\n\nfunction getAllCustomComponents() {\n return [\n ...new Set(\n Object.keys(customComponentAssets).map(componentNameFromAssetPath),\n ),\n ]\n .filter(Boolean)\n .sort();\n}\n\nfunction componentNameFromAssetPath(assetPath: string): string {\n const parts = assetPath.split(\"/\");\n const index = parts.indexOf(\"components\");\n return parts[index + 1] ?? \"\";\n}\n\nfunction componentRelativeAssetPath(assetPath: string): string {\n const parts = assetPath.split(\"/\");\n const index = parts.indexOf(\"components\");\n return parts.slice(index + 2).join(\"/\");\n}\n\nfunction toTargetPath(root: string, filePath: string): string {\n if (path.isAbsolute(filePath)) {\n return filePath;\n }\n return path.join(root, filePath);\n}\n\nfunction writeFile(filePath: string, content: string): void {\n mkdirSync(path.dirname(filePath), { recursive: true });\n writeFileSync(filePath, content, \"utf8\");\n}\n\nfunction removeFile(filePath: string): void {\n if (!existsSync(filePath)) {\n return;\n }\n\n rmSync(filePath, { force: true, recursive: true });\n}\n\nasync function executeWithDetectedPackageManager(\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n): Promise<void> {\n const packageManager = (await detect({ cwd }))?.name ?? \"npm\";\n const resolved = resolveCommand(packageManager, operation, args);\n if (!resolved) {\n throw new Error(\n `Unable to resolve ${operation} command for ${packageManager}`,\n );\n }\n\n const commandArgs = [...resolved.args];\n if (packageManager === \"npm\") {\n commandArgs.unshift(\"--yes\");\n }\n\n await new Promise<void>((resolve, reject) => {\n const child = spawn(resolved.command, commandArgs, {\n cwd,\n stdio: \"inherit\",\n });\n child.on(\"error\", reject);\n child.on(\"exit\", (code) => {\n if (code === 0) {\n resolve();\n return;\n }\n reject(\n new Error(`${resolved.command} exited with code ${code ?? \"unknown\"}`),\n );\n });\n });\n}\n\nasync function executeCommand(\n cwd: string,\n operation: PackageManagerOperation,\n args: string[],\n runtime?: WriteResultRuntime,\n): Promise<void> {\n if (runtime?.executeCommand) {\n await runtime.executeCommand(cwd, operation, args);\n return;\n }\n\n await executeWithDetectedPackageManager(cwd, operation, args);\n}\n\nfunction installedPackagesFromProject(root: string): Set<string> {\n const packageJsonPath = path.join(root, \"package.json\");\n if (!existsSync(packageJsonPath)) {\n return new Set();\n }\n\n const packageJson = JSON.parse(readFileSync(packageJsonPath, \"utf8\")) as {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n optionalDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n };\n\n return new Set([\n ...Object.keys(packageJson.dependencies ?? {}),\n ...Object.keys(packageJson.devDependencies ?? {}),\n ...Object.keys(packageJson.optionalDependencies ?? {}),\n ...Object.keys(packageJson.peerDependencies ?? {}),\n ]);\n}\n\nasync function installPackages(\n root: string,\n packages: string[],\n runtime?: WriteResultRuntime,\n logger: Logger = NOOP_LOGGER,\n): Promise<string[]> {\n if (packages.length === 0) {\n return [];\n }\n\n const installed = installedPackagesFromProject(root);\n const toInstall = [...new Set(packages)].filter((pkg) => !installed.has(pkg));\n if (toInstall.length === 0) {\n return [];\n }\n\n logger.info(`Installing packages: ${toInstall.join(\", \")}`);\n await executeCommand(root, \"install\", toInstall, runtime);\n return toInstall;\n}\n\nfunction isCustomComponent(component: string): boolean {\n return getAllCustomComponents().includes(component);\n}\n\nfunction customNpmPackagesFor(components: string[]): string[] {\n return [\n ...new Set(\n components.flatMap((component) => customNpmPackages[component] ?? []),\n ),\n ];\n}\n\nfunction copyCustomComponent(\n component: string,\n targetComponentsDir: string,\n): void {\n const targetDir = path.join(targetComponentsDir, component);\n mkdirSync(targetDir, { recursive: true });\n\n for (const [assetPath, content] of Object.entries(customComponentAssets)) {\n if (componentNameFromAssetPath(assetPath) !== component) {\n continue;\n }\n const relativePath = componentRelativeAssetPath(assetPath);\n if (!relativePath) {\n continue;\n }\n\n const outputPath = path.join(targetDir, relativePath);\n mkdirSync(path.dirname(outputPath), { recursive: true });\n writeFileSync(outputPath, content, \"utf8\");\n }\n}\n\nasync function installComponents(\n root: string,\n components: string[],\n runtime?: WriteResultRuntime,\n logger: Logger = NOOP_LOGGER,\n): Promise<{ components: string[]; packages: string[] }> {\n if (components.length === 0) {\n return { components: [], packages: [] };\n }\n\n const componentsDir = path.join(root, \"src\", \"lib\", \"components\", \"ui\");\n mkdirSync(componentsDir, { recursive: true });\n\n const requested = [...new Set(components)];\n const missing = requested.filter(\n (component) => !existsSync(path.join(componentsDir, component)),\n );\n\n if (missing.length === 0) {\n return { components: [], packages: [] };\n }\n\n const customToInstall = new Set(missing.filter(isCustomComponent));\n const publicToInstall = new Set(\n missing.filter((component) => !isCustomComponent(component)),\n );\n\n for (const component of [...customToInstall]) {\n for (const dependency of customDependencies[component] ?? []) {\n if (existsSync(path.join(componentsDir, dependency))) {\n continue;\n }\n if (isCustomComponent(dependency)) {\n customToInstall.add(dependency);\n } else {\n publicToInstall.add(dependency);\n }\n }\n }\n\n const installedComponents: string[] = [];\n const customList = [...customToInstall].sort();\n if (customList.length > 0) {\n logger.info(`Installing custom components: ${customList.join(\", \")}`);\n }\n for (const component of customList) {\n copyCustomComponent(component, componentsDir);\n installedComponents.push(component);\n publicToInstall.delete(component);\n }\n\n const customPackages = await installPackages(\n root,\n customNpmPackagesFor([...customToInstall]),\n runtime,\n logger,\n );\n\n const publicList = [...publicToInstall].sort();\n if (publicList.length > 0) {\n logger.info(\n `Installing shadcn-svelte components: ${publicList.join(\", \")}`,\n );\n await executeCommand(\n root,\n \"execute\",\n [\"shadcn-svelte\", \"add\", \"--yes\", \"--overwrite\", ...publicList],\n runtime,\n );\n installedComponents.push(...publicList);\n }\n\n return {\n components: [...new Set(installedComponents)],\n packages: customPackages,\n };\n}\n\nexport async function writeResult(\n result: Result,\n options: Options,\n runtime?: WriteResultRuntime,\n): Promise<Result> {\n const logger = getLogger(options);\n\n const writtenResult: Result = {\n creates: [],\n modifies: [],\n deletes: [],\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n };\n\n for (const file of result.creates) {\n if (file.status !== \"success\") continue;\n if (!existsSync(toTargetPath(options.root, file.path))) {\n writeFile(toTargetPath(options.root, file.path), file.content);\n writtenResult.creates.push(file);\n }\n }\n\n for (const file of result.modifies) {\n if (file.status !== \"success\") continue;\n writeFile(toTargetPath(options.root, file.path), file.content);\n }\n\n for (const file of result.deletes) {\n if (file.status !== \"success\") continue;\n if (existsSync(toTargetPath(options.root, file.path))) {\n removeFile(toTargetPath(options.root, file.path));\n writtenResult.deletes.push(file);\n }\n }\n\n const packageInstalls = await installPackages(\n options.root,\n result.packages,\n runtime,\n logger,\n );\n\n const componentInstalls = await installComponents(\n options.root,\n result.components,\n runtime,\n logger,\n );\n\n return {\n ...result,\n creates: writtenResult.creates,\n deletes: writtenResult.deletes,\n components: componentInstalls.components,\n packages: [...new Set([...packageInstalls, ...componentInstalls.packages])],\n };\n}\n"],"mappings":";;;;;;;AAAA,IAAA,IAAe,g2BCAf,IAAe,miBCAf,IAAe,g8BCAf,IAAe,mgBCAf,IAAe,scCAf,KAAe,4iBCAf,KAAe,g2CCAf,KAAe,uICAf,KAAe,uaCAf,KAAe,sZCAf,KAAe,gXCAf,KAAe,sZCAf,KAAe,gWCAf,IAAe,gWCAf,IAAe,siDCAf,IAAe,ilBCAf,IAAe,g0BCAf,IAAe,sYCAf,IAAe,gWCAf,IAAe,4VCAf,IAAe,u6BCAf,IAAe,otBCAf,IAAe,gWCAf,IAAe,2fCAf,IAAe,6xDCAf,IAAe,yECAf,IAAe,uoHCAf,IAAe,2ECAf,IAAe,yiCCAf,IAAe,inCCAf,IAAe,khDCAf,IAAe,i1BCAf,IAAe,0/DCAf,IAAe,mTCAf,IAAe,sZCAf,IAAe,+wCCAf,IAAe,kECAf,IAAe,6hDCAf,IAAe,sdCAf,IAAe,8DCAf,IAAe,m2GCAf,KAAe,qVCAf,IAAe,8WCAf,IAAe,kkECAf,KAAe,4UCAf,KAAe,i3BCAf,KAAe,08BCAf,KAAe,+mBCAf,KAAe,oECAf,KAAe,mvFCAf,KAAe,qECAf,KAAe,0mCC2BT,KAA+C;CACnD,aAAa,CAAC,SAAS,OAAO;CAC9B,aAAa;EAAC;EAAW;EAAW;EAAU;EAAQ;CACtD,UAAU,CAAC,UAAU,UAAU;CAC/B,OAAO,EAAE;CACT,iBAAiB,CAAC,iBAAiB,SAAS;CAC5C,kBAAkB;EAAC;EAAW;EAAW;E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A,EACD;AAED,QAAO;EACL,GAAG;EACH,SAAS,EAAc;EACvB,SAAS,EAAc;EACvB,YAAY,EAAkB;EAC9B,UAAU,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,GAAiB,GAAG,EAAkB,SAAS,CAAC,CAAA;EAC3E"}
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ var f = Object.create, p = Object.defineProperty, m = Object.getOwnPropertyDescr
|
|
|
22
22
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
23
23
|
}), ae = {
|
|
24
24
|
name: "@velastack/patterns",
|
|
25
|
-
version: "0.0.
|
|
25
|
+
version: "0.0.35",
|
|
26
26
|
type: "module",
|
|
27
27
|
private: !1,
|
|
28
28
|
main: "./dist/index.js",
|
|
@@ -2182,7 +2182,7 @@ var Wt = "generate-form", Gt = "1.0.7", Kt = "src/patterns/generate/form", qt =
|
|
|
2182
2182
|
async function Jt(e) {
|
|
2183
2183
|
let t = await Ut(e);
|
|
2184
2184
|
if (e.env !== "runtime") return _(t);
|
|
2185
|
-
let { writeResult: n } = await import("./chunks/write-result-
|
|
2185
|
+
let { writeResult: n } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
2186
2186
|
return n(await _(t), e);
|
|
2187
2187
|
}
|
|
2188
2188
|
var Yt = {
|
|
@@ -2474,7 +2474,7 @@ async function Cn(e) {
|
|
|
2474
2474
|
let o = i(e.root), s = n(o, a(o)), l = {
|
|
2475
2475
|
...t,
|
|
2476
2476
|
modifies: [...t.modifies, ...s ? [s] : []]
|
|
2477
|
-
}, { writeResult: u } = await import("./chunks/write-result-
|
|
2477
|
+
}, { writeResult: u } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
2478
2478
|
return u(await _(l), e);
|
|
2479
2479
|
}
|
|
2480
2480
|
var wn = {
|
|
@@ -2606,14 +2606,14 @@ var An = "generate-migration", jn = "1.0.0", Mn = "src/patterns/generate/migrati
|
|
|
2606
2606
|
async function Pn(e) {
|
|
2607
2607
|
let t = await Dn(e);
|
|
2608
2608
|
if (e.env !== "runtime") return _(t);
|
|
2609
|
-
let { applyCollectionFieldsPatches: n } = await import("./chunks/collections-
|
|
2609
|
+
let { applyCollectionFieldsPatches: n } = await import("./chunks/collections-DRN-8nW0.js"), { withPocketbase: r } = await import("./chunks/pocketbase-iFJBbNJu.js"), i = c(e), a = [];
|
|
2610
2610
|
await r(e.root, async (r) => {
|
|
2611
2611
|
a = await n(r, t.collectionPatches, e, i);
|
|
2612
2612
|
});
|
|
2613
2613
|
let o = {
|
|
2614
2614
|
...t,
|
|
2615
2615
|
creates: [...t.creates, ...a]
|
|
2616
|
-
}, { writeResult: s } = await import("./chunks/write-result-
|
|
2616
|
+
}, { writeResult: s } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
2617
2617
|
return s(await _(o), e);
|
|
2618
2618
|
}
|
|
2619
2619
|
var Fn = {
|
|
@@ -2712,10 +2712,10 @@ var zn = "generate-resource", Bn = "1.0.7", Vn = "src/patterns/generate/resource
|
|
|
2712
2712
|
async function Un(e) {
|
|
2713
2713
|
let t = await Rn(e);
|
|
2714
2714
|
if (e.env !== "runtime") return _(t);
|
|
2715
|
-
let { createCollections: n } = await import("./chunks/collections-
|
|
2715
|
+
let { createCollections: n } = await import("./chunks/collections-DRN-8nW0.js"), r = await n(t.collections, e), i = {
|
|
2716
2716
|
...t,
|
|
2717
2717
|
creates: [...t.creates, ...r]
|
|
2718
|
-
}, { writeResult: a } = await import("./chunks/write-result-
|
|
2718
|
+
}, { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
2719
2719
|
return a(await _(i), e);
|
|
2720
2720
|
}
|
|
2721
2721
|
var Wn = {
|
|
@@ -3096,10 +3096,10 @@ var dr = "generate-scaffold", fr = "1.0.7", pr = "src/patterns/generate/scaffold
|
|
|
3096
3096
|
async function hr(e) {
|
|
3097
3097
|
let t = await ur(e);
|
|
3098
3098
|
if (e.env !== "runtime") return _(t);
|
|
3099
|
-
let { createCollections: n } = await import("./chunks/collections-
|
|
3099
|
+
let { createCollections: n } = await import("./chunks/collections-DRN-8nW0.js"), r = await n(t.collections, e), i = {
|
|
3100
3100
|
...t,
|
|
3101
3101
|
creates: [...t.creates, ...r]
|
|
3102
|
-
}, { writeResult: a } = await import("./chunks/write-result-
|
|
3102
|
+
}, { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
3103
3103
|
return a(await _(i), e);
|
|
3104
3104
|
}
|
|
3105
3105
|
var gr = {
|
|
@@ -3461,13 +3461,13 @@ async function Jr(e) {
|
|
|
3461
3461
|
let t = await Br(e);
|
|
3462
3462
|
if (e.env === "preview") return _(r([t, await Ur(e)]));
|
|
3463
3463
|
if (e.env !== "runtime") return _(t);
|
|
3464
|
-
let { createCollections: n } = await import("./chunks/collections-
|
|
3464
|
+
let { createCollections: n } = await import("./chunks/collections-DRN-8nW0.js"), i = await n(t.collections, e), { modifyOutcomeToFile: a } = await import("./chunks/modify-file-DT_1_kvI.js"), { findSvelteConfigPath: o, modifySvelteConfigRemote: s } = await import("./chunks/modify-svelte-config-remote-CFsA9Mom.js");
|
|
3465
3465
|
c(e).info("Modifying svelte.config for remote");
|
|
3466
3466
|
let l = o(e.root), u = a(l, s(l)), d = {
|
|
3467
3467
|
...t,
|
|
3468
3468
|
creates: [...t.creates, ...i],
|
|
3469
3469
|
modifies: [...t.modifies, ...u ? [u] : []]
|
|
3470
|
-
}, { writeResult: f } = await import("./chunks/write-result-
|
|
3470
|
+
}, { writeResult: f } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
3471
3471
|
return f(await _(d), e);
|
|
3472
3472
|
}
|
|
3473
3473
|
var Yr = {
|
|
@@ -3560,7 +3560,7 @@ var $r = "generate-schema", ei = "1.0.7", ti = "src/patterns/generate/schema", n
|
|
|
3560
3560
|
async function ri(e) {
|
|
3561
3561
|
let t = await Qr(e);
|
|
3562
3562
|
if (e.env !== "runtime") return _(t);
|
|
3563
|
-
let { writeResult: n } = await import("./chunks/write-result-
|
|
3563
|
+
let { writeResult: n } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
3564
3564
|
return n(await _(t), e);
|
|
3565
3565
|
}
|
|
3566
3566
|
var ii = {
|
|
@@ -3779,7 +3779,7 @@ var di = "enable-auth", fi = "1.0.7", pi = "src/patterns/enable/auth", mi = "/en
|
|
|
3779
3779
|
async function hi(e) {
|
|
3780
3780
|
let t = await si(e);
|
|
3781
3781
|
if (e.env === "preview") return _(r([t, await ui(e)]));
|
|
3782
|
-
let { generate: n } = await import("./chunks/generate.runtime-DTZ1PeDS.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-
|
|
3782
|
+
let { generate: n } = await import("./chunks/generate.runtime-DTZ1PeDS.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
3783
3783
|
return a(await _(r([t, i])), e);
|
|
3784
3784
|
}
|
|
3785
3785
|
var gi = {
|
|
@@ -3990,7 +3990,7 @@ var Ci = "enable-auth-remote", wi = "1.0.0", Ti = "src/patterns/enable/auth-remo
|
|
|
3990
3990
|
async function Di(e) {
|
|
3991
3991
|
let t = await yi(e);
|
|
3992
3992
|
if (e.env === "preview") return _(r([t, await Si(e)]));
|
|
3993
|
-
let { generate: n } = await import("./chunks/generate.runtime-Cbq2649r.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-
|
|
3993
|
+
let { generate: n } = await import("./chunks/generate.runtime-Cbq2649r.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
3994
3994
|
return a(await _(r([t, i])), e);
|
|
3995
3995
|
}
|
|
3996
3996
|
var Oi = {
|
|
@@ -4076,7 +4076,7 @@ var Fi = "enable-api", Ii = "1.0.7", Li = "src/patterns/enable/api", Ri = "/enab
|
|
|
4076
4076
|
async function zi(e) {
|
|
4077
4077
|
let t = await ji(e);
|
|
4078
4078
|
if (e.env === "preview") return _(r([t, await Pi(e)]));
|
|
4079
|
-
let { generate: n } = await import("./chunks/generate.runtime-Caqa5ndO.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-
|
|
4079
|
+
let { generate: n } = await import("./chunks/generate.runtime-Caqa5ndO.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
4080
4080
|
return a(await _(r([t, i])), e);
|
|
4081
4081
|
}
|
|
4082
4082
|
var Bi = {
|
|
@@ -4175,7 +4175,7 @@ var qi = "enable-api-keys", Ji = "1.0.0", Yi = "src/patterns/enable/api-keys", X
|
|
|
4175
4175
|
async function Zi(e) {
|
|
4176
4176
|
let t = await Ui(e);
|
|
4177
4177
|
if (e.env === "preview") return _(r([t, await Ki(e)]));
|
|
4178
|
-
let { generate: n } = await import("./chunks/generate.runtime
|
|
4178
|
+
let { generate: n } = await import("./chunks/generate.runtime--31y_UK2.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
4179
4179
|
return a(await _(r([t, i])), e);
|
|
4180
4180
|
}
|
|
4181
4181
|
var Qi = {
|
|
@@ -4272,7 +4272,7 @@ var aa = "enable-i18n", oa = "1.0.0", sa = "src/patterns/enable/i18n", ca = "/en
|
|
|
4272
4272
|
async function la(e) {
|
|
4273
4273
|
let t = await ta(e);
|
|
4274
4274
|
if (e.env === "preview") return _(r([t, await ia(e)]));
|
|
4275
|
-
let { generate: n } = await import("./chunks/generate.runtime-D7ksYerH.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-
|
|
4275
|
+
let { generate: n } = await import("./chunks/generate.runtime-D7ksYerH.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
4276
4276
|
return a(await _(r([t, i])), e);
|
|
4277
4277
|
}
|
|
4278
4278
|
var ua = {
|
|
@@ -4684,7 +4684,7 @@ var vo = "enable-payments", yo = "1.0.0", bo = "src/patterns/enable/payments", x
|
|
|
4684
4684
|
async function So(e) {
|
|
4685
4685
|
let t = await Qa(e);
|
|
4686
4686
|
if (e.env === "preview") return _(r([t, await _o(e)]));
|
|
4687
|
-
let { generate: n } = await import("./chunks/generate.runtime-
|
|
4687
|
+
let { generate: n } = await import("./chunks/generate.runtime-BVss5za4.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
4688
4688
|
return a(await _(r([t, i])), e);
|
|
4689
4689
|
}
|
|
4690
4690
|
var Co = {
|
|
@@ -5072,7 +5072,7 @@ var Lo = "enable-teams", Ro = "1.0.0", zo = "src/patterns/enable/teams", Bo = "/
|
|
|
5072
5072
|
async function Vo(e) {
|
|
5073
5073
|
let t = await Eo(e);
|
|
5074
5074
|
if (e.env === "preview") return _(r([t, await Io(e)]));
|
|
5075
|
-
let { generate: n } = await import("./chunks/generate.runtime-
|
|
5075
|
+
let { generate: n } = await import("./chunks/generate.runtime-CZKIdbEC.js"), i = await n(e), { writeResult: a } = await import("./chunks/write-result-CqSY1Bww.js");
|
|
5076
5076
|
return a(await _(r([t, i])), e);
|
|
5077
5077
|
}
|
|
5078
5078
|
var Ho = {
|