@velastack/patterns 0.0.33 → 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-DRN-8nW0.js +108 -0
- package/dist/chunks/collections-DRN-8nW0.js.map +1 -0
- package/dist/chunks/{env.preview-NYMljYNr.js → env.preview-BZwjhgoi.js} +1 -1
- package/dist/chunks/{env.preview-NYMljYNr.js.map → env.preview-BZwjhgoi.js.map} +1 -1
- package/dist/chunks/{env.runtime-ZUZgxjxf.js → env.runtime-BEdollKV.js} +1 -1
- package/dist/chunks/{env.runtime-ZUZgxjxf.js.map → env.runtime-BEdollKV.js.map} +1 -1
- package/dist/chunks/{generate.runtime-BkjQiaP_.js → generate.runtime--31y_UK2.js} +70 -64
- package/dist/chunks/{generate.runtime-BkjQiaP_.js.map → generate.runtime--31y_UK2.js.map} +1 -1
- package/dist/chunks/{generate.runtime-4zd9-8H_.js → generate.runtime-BVss5za4.js} +130 -105
- package/dist/chunks/generate.runtime-BVss5za4.js.map +1 -0
- package/dist/chunks/{generate.runtime-uk9-KOP-.js → generate.runtime-CZKIdbEC.js} +123 -117
- package/dist/chunks/generate.runtime-CZKIdbEC.js.map +1 -0
- package/dist/chunks/generate.runtime-Caqa5ndO.js +85 -0
- package/dist/chunks/{generate.runtime-CbiQhqdL.js.map → generate.runtime-Caqa5ndO.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DpeB3h-P.js → generate.runtime-Cbq2649r.js} +94 -91
- package/dist/chunks/{generate.runtime-DpeB3h-P.js.map → generate.runtime-Cbq2649r.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CXqD8em8.js → generate.runtime-D7ksYerH.js} +133 -130
- package/dist/chunks/{generate.runtime-CXqD8em8.js.map → generate.runtime-D7ksYerH.js.map} +1 -1
- package/dist/chunks/{generate.runtime-BKrtBCRk.js → generate.runtime-DTZ1PeDS.js} +94 -91
- package/dist/chunks/{generate.runtime-BKrtBCRk.js.map → generate.runtime-DTZ1PeDS.js.map} +1 -1
- package/dist/chunks/logger-BpgCb-ZG.js +9 -0
- package/dist/chunks/logger-BpgCb-ZG.js.map +1 -0
- package/dist/chunks/{modify-file-D3OuKUEp.js → modify-file-DT_1_kvI.js} +1 -1
- package/dist/chunks/{modify-file-D3OuKUEp.js.map → modify-file-DT_1_kvI.js.map} +1 -1
- package/dist/chunks/{modify-svelte-config-remote-Dzgk1OIN.js → modify-svelte-config-remote-CFsA9Mom.js} +1 -1
- package/dist/chunks/{modify-svelte-config-remote-Dzgk1OIN.js.map → modify-svelte-config-remote-CFsA9Mom.js.map} +1 -1
- package/dist/chunks/{pocketbase--dNkFDJ5.js → pocketbase-BiRWz-OQ.js} +1 -1
- package/dist/chunks/{pocketbase--dNkFDJ5.js.map → pocketbase-BiRWz-OQ.js.map} +1 -1
- package/dist/chunks/{pocketbase-W_FJaYZ3.js → pocketbase-iFJBbNJu.js} +1 -1
- package/dist/chunks/{pocketbase-W_FJaYZ3.js.map → pocketbase-iFJBbNJu.js.map} +1 -1
- package/dist/chunks/{ts-morph-helpers-digNcfBD.js → ts-morph-helpers-C0HeJDjR.js} +1 -1
- package/dist/chunks/{ts-morph-helpers-digNcfBD.js.map → ts-morph-helpers-C0HeJDjR.js.map} +1 -1
- package/dist/chunks/write-result-CqSY1Bww.js +229 -0
- package/dist/chunks/{write-result-C80dpjr-.js.map → write-result-CqSY1Bww.js.map} +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +662 -657
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/collections-BRIAYJ-Q.js +0 -94
- package/dist/chunks/collections-BRIAYJ-Q.js.map +0 -1
- package/dist/chunks/generate.runtime-4zd9-8H_.js.map +0 -1
- package/dist/chunks/generate.runtime-CbiQhqdL.js +0 -82
- package/dist/chunks/generate.runtime-uk9-KOP-.js.map +0 -1
- package/dist/chunks/write-result-C80dpjr-.js +0 -216
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-result-C80dpjr-.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\";\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): 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 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): 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 for (const component of [...customToInstall].sort()) {\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 );\n\n const publicList = [...publicToInstall].sort();\n if (publicList.length > 0) {\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 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 );\n const componentInstalls = await installComponents(\n options.root,\n result.components,\n runtime,\n );\n\n return {\n ...result,\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,KAAe,scCAf,KAAe,4iBCAf,IAAe,g2CCAf,IAAe,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,KAAe,m2GCAf,IAAe,qVCAf,IAAe,8WCAf,IAAe,kkECAf,IAAe,4UCAf,IAAe,i3BCAf,KAAe,08BCAf,KAAe,+mBCAf,KAAe,oECAf,KAAe,mvFCAf,KAAe,qECAf,KAAe,0mCC0BT,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;EAAU;EAAa;EAAQ;CACxE,YAAY,CAAC,UAAU,SAAS;CAChC,eAAe,CAAC,iBAAiB,SAAS;CAC1C,SAAS,EAAE;CACX,aAAa,CAAC,iBAAiB,SAAA;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;EACL,YAAY,CAAC,GAAG,IAAI,IAAI,EAAoB,CAAC;EAC7C,UAAU;EACX;;AAGH,eAAsB,GACpB,GACA,GACA,GACiB;AACjB,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,EACD,EACK,IAAoB,MAAM,GAC9B,EAAQ,MACR,EAAO,YACP,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;EAAU;EAAa;EAAQ;CACxE,YAAY,CAAC,UAAU,SAAS;CAChC,eAAe,CAAC,iBAAiB,SAAS;CAC1C,SAAS,EAAE;CACX,aAAa,CAAC,iBAAiB,SAAA;CAChC,EAEK,KAAuC;CAC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AAS,CAAC,CAAA;EAC3E"}
|
package/dist/index.d.ts
CHANGED
|
@@ -508,12 +508,17 @@ export declare class InvalidArgumentError extends Error {
|
|
|
508
508
|
constructor(message: string);
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
declare interface Logger {
|
|
512
|
+
info: (message: string) => void;
|
|
513
|
+
}
|
|
514
|
+
|
|
511
515
|
declare interface Options {
|
|
512
516
|
argv: string[];
|
|
513
517
|
env: "runtime" | "preview";
|
|
514
518
|
root: string;
|
|
515
519
|
features: Features;
|
|
516
520
|
input: Record<string, any>;
|
|
521
|
+
logger?: Logger;
|
|
517
522
|
}
|
|
518
523
|
|
|
519
524
|
declare type Package = string;
|