diff --git a/packages/craftcms-cp/scripts/generate-color-palette.js b/packages/craftcms-cp/scripts/generate-color-palette.js index ab765eb5b28..bc4d280e3bc 100644 --- a/packages/craftcms-cp/scripts/generate-color-palette.js +++ b/packages/craftcms-cp/scripts/generate-color-palette.js @@ -1,7 +1,12 @@ import {writeFileSync} from 'fs'; import {dirname, resolve} from 'path'; import {fileURLToPath} from 'url'; -import {stops, lightTheme, darkTheme} from '../src/styles/color-definitions.js'; +import { + stops, + lightTheme, + darkTheme, + staticTheme, +} from '../src/styles/color-definitions.js'; const __dirname = dirname(fileURLToPath(import.meta.url)); const ROOT = resolve(__dirname, '..'); @@ -35,7 +40,7 @@ function printStyles() { const lightColors = colorsToCssVariables(lightTheme.contrastColors); const darkColors = colorsToCssVariables(darkTheme.contrastColors); const staticColors = colorsToCssVariables( - lightTheme.contrastColors, + staticTheme.contrastColors, 'color-static' ); diff --git a/packages/craftcms-cp/scripts/generate-colors.js b/packages/craftcms-cp/scripts/generate-colors.js index 2eb1debf3ae..18e3d6a022b 100644 --- a/packages/craftcms-cp/scripts/generate-colors.js +++ b/packages/craftcms-cp/scripts/generate-colors.js @@ -39,7 +39,7 @@ const semanticColors = { accent: 'blue', info: 'blue', success: 'emerald', - warning: 'orange', + warning: 'yellow', danger: 'red', }; diff --git a/packages/craftcms-cp/src/components/action-item/action-item.ts b/packages/craftcms-cp/src/components/action-item/action-item.ts index 5c04af54cc4..7b2921dab1d 100644 --- a/packages/craftcms-cp/src/components/action-item/action-item.ts +++ b/packages/craftcms-cp/src/components/action-item/action-item.ts @@ -13,7 +13,7 @@ export default class CraftActionItem extends LitElement { @property() icon: string | null = null; @property() href: string | null = null; @property({type: Boolean}) disabled: boolean = false; - @property({reflect: true}) variant: VariantKey = Variant.Default; + @property({reflect: true}) variant: VariantKey = Variant.Neutral; @property({type: Boolean}) checked: boolean = false; @property({type: Boolean}) active: boolean = false; @property() type: 'normal' | 'checkbox' = 'normal'; diff --git a/packages/craftcms-cp/src/components/button/Docs.mdx b/packages/craftcms-cp/src/components/button/Docs.mdx new file mode 100644 index 00000000000..aba2d6ced23 --- /dev/null +++ b/packages/craftcms-cp/src/components/button/Docs.mdx @@ -0,0 +1,46 @@ +import {Canvas, Meta} from '@storybook/addon-docs/blocks'; +import * as ButtonStories from './button.stories'; + + + +# Button + +A button represents a clickable element that performs an action when activated. + + + +## Appearance + +`appearance` controls how visually prominent the button is. Use it to signal importance relative to other buttons on the page. + +- `solid` — Solid colored background. The highest-emphasis style. Use for the single most important action in a given context. +- `outline` — Transparent background with a colored border. Medium emphasis. Use for secondary actions alongside a solid button. +- `plain` — No background or border. Lowest emphasis. Use for tertiary or destructive actions that shouldn't draw attention on their own. + +## Variant + +`variant` controls the button's color, which communicates the _intent_ of the action — not how prominent it is. Appearance and variant are independent: any appearance can be combined with any variant. + +- `accent` — Blue. Use for the primary action on a page, such as Save or Confirm. +- `neutral` — Gray. The default. Use for everyday actions that don't carry a strong positive or negative meaning. +- `danger` — Red. Use for actions that delete, remove, or permanently change data. + + + +### Inherit + +`variant="inherit"` is a special case for buttons placed inside [Colorable](?path=/docs/concepts-colorable--docs) containers. Instead of applying its own color, the button picks up the color from its parent container. + +Avoid using the standard color variants (`accent`, `neutral`, `danger`) inside Colorable components — the two color systems can conflict and produce unexpected results. + +## Sizes + + + +## Icon buttons + + + +## Loading state + + diff --git a/packages/craftcms-cp/src/components/button/button.stories.ts b/packages/craftcms-cp/src/components/button/button.stories.ts index b3449959d26..45a5ab4e049 100644 --- a/packages/craftcms-cp/src/components/button/button.stories.ts +++ b/packages/craftcms-cp/src/components/button/button.stories.ts @@ -5,6 +5,10 @@ import {html} from 'lit'; import './button.js'; import '../icon/icon.js'; import '../chip/chip.js'; +import {ButtonAppearance, ButtonVariant} from '@src/types'; + +const buttonVariants = Object.values(ButtonVariant); +const appearance = Object.values(ButtonAppearance); // More on how to set up stories at: https://storybook.js.org/docs/writing-stories const meta = { @@ -13,20 +17,31 @@ const meta = { parameters: { layout: 'centered', }, - argTypes: {}, + args: { + label: 'Button', + appearance: 'solid', + loading: false, + variant: 'neutral', + }, + argTypes: { + appearance: { + control: {type: 'select'}, + options: appearance, + }, + loading: { + control: {type: 'boolean'}, + }, + }, render: (args) => html`
- ${['primary', 'default', 'danger'].map( + ${buttonVariants.map( (variant) => html`
${variant ?? 'None'} - ${variant} filled${variant ?? 'None'} solid - ${variant} dashed${variant} outline ${variant} plain
- Chip buttons - Filled - DashedChip Buttons + Outline plainPlain
@@ -61,6 +73,21 @@ export const Default: Story = { args: {}, }; +export const Accent: Story = { + args: { + variant: 'accent', + }, + argTypes: { + variant: { + control: {type: 'select'}, + options: buttonVariants, + }, + }, + render: (args) => html` + ${args.label} + `, +}; + export const Sizes: Story = { args: {}, render: (args) => html` @@ -87,6 +114,10 @@ export const Icon: Story = { }; export const Loading: Story = { - args: {}, - render: (args) => html` Submit `, + args: { + loading: true, + }, + render: (args) => html` + Submit + `, }; diff --git a/packages/craftcms-cp/src/components/button/button.styles.ts b/packages/craftcms-cp/src/components/button/button.styles.ts index 52ec9d5c69c..f404ab085e2 100644 --- a/packages/craftcms-cp/src/components/button/button.styles.ts +++ b/packages/craftcms-cp/src/components/button/button.styles.ts @@ -17,11 +17,11 @@ export default css` min-height: var(--c-button-height, var(--c-size-control-md)); min-width: var(--c-button-width, var(--c-size-control-md)); white-space: nowrap; + border-width: var(--c-button-border-width, 1px); + border-style: var(--c-button-border-style, solid); /* Colorable styles */ color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); - border-width: var(--c-button-border-width, 1px); - border-style: var(--c-button-border-style, solid); border-color: var( --c-color-border-loud, var(--c-color-neutral-border-loud) @@ -34,22 +34,17 @@ export default css` @media (hover: hover) { :host(:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-loud, var(--c-button-default-fill)), - var(--c-color-mix-hover) + background-color: hsl( + from var(--c-color-fill-loud, var(--c-button-default-fill)) h s + calc(l - 5) ); color: var(--c-color-on-loud); } } :host(:not(:disabled):not(.loading):active) { - color: var(--c-color-on-loud); - background-color: color-mix( - in oklab, - var(--c-color-fill-loud, var(--c-color-neutral-fill-normal)), - var(--c-color-mix-active) - ); + color: var(--_active-color); + background-color: var(--_active-background-color); } /* @@ -113,101 +108,82 @@ export default css` Appearances */ - /* Plain */ - :host([appearance~='plain']) { + /* Plain & Outline (Shared) */ + :host([appearance~='plain']), + :host([appearance~='outline']) { background-color: transparent; - border-color: transparent; - color: inherit; + color: var(--c-color-on-quiet); } - :host([appearance~='plain']:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-button-default-fill)), - var(--c-color-mix-hover) + :host([appearance~='plain']:hover), + :host([appearance~='outline']:hover) { + background-color: hsl( + from var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)) h s + calc(l - 5) ); - color: var(--c-color-on-quiet); } - :host([appearance~='plain']:active) { - color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)), - var(--c-color-mix-active) + :host([appearance~='plain']:active), + :host([appearance~='outline']:active) { + --_active-background-color: hsl( + from var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)) h s + calc(l - 8) ); + --_active-color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); } - /* Filled */ - :host([appearance~='filled']) { - background-color: var( - --c-color-fill-normal, - var(--c-color-neutral-fill-normal) - ); + /* Plain */ + :host([appearance~='plain']) { border-color: transparent; - color: var(--c-color-on-normal, var(--c-color-neutral-on-normal)); } - :host([appearance~='filled']:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-normal, var(--c-color-neutral-fill-normal)), - var(--c-color-mix-hover) + /* Solid */ + :host([appearance~='solid']) { + background-color: var( + --c-color-fill-loud, + var(--c-color-neutral-fill-loud) ); - color: var(--c-color-on-normal, var(--c-color-neutral-on-normal)); + border-color: transparent; + color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); } - :host([appearance~='filled']:active) { - color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)), - var(--c-color-mix-active) + :host([appearance~='solid']:hover) { + background-color: hsl( + from var(--c-color-fill-loud, var(--c-color-neutral-fill-loud)) h s + calc(l - 5) ); + color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); } - /* Dashed */ - :host([appearance~='dashed']) { - background-color: transparent; - border-color: var(--c-color-border-normal); - border-style: dashed; - color: var(--c-color-on-quiet); - } - - :host([appearance~='dashed']:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-button-default-fill)), - var(--c-color-mix-hover) + :host([appearance~='solid']:active) { + --_active-background-color: hsl( + from var(--c-color-fill-loud, var(--c-color-neutral-fill-loud)) h s + calc(l - 10) ); - color: var(--c-color-on-quiet); + --_active-color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); } - :host([appearance~='dashed']:active) { - color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)), - var(--c-color-mix-active) - ); + /* Outline */ + :host([appearance~='outline']) { + border-color: var(--c-color-border-loud); } /* Variants (aka fill colors) */ - :host([variant~='primary']) { - --c-color-fill-loud: var(--c-color-brand-fill-loud); - --c-color-fill-normal: var(--c-color-brand-fill-normal); - --c-color-fill-quiet: var(--c-color-brand-fill-quiet); - --c-color-border-loud: var(--c-color-brand-border-loud); - --c-color-border-normal: var(--c-color-brand-border-normal); - --c-color-border-quiet: var(--c-color-brand-border-quiet); - --c-color-on-loud: var(--c-color-brand-on-loud); - --c-color-on-normal: var(--c-color-brand-on-normal); - --c-color-on-quiet: var(--c-color-brand-on-quiet); + :host([variant~='accent']) { + --c-color-fill-loud: var(--c-color-accent-fill-loud); + --c-color-fill-normal: var(--c-color-accent-fill-normal); + --c-color-fill-quiet: var(--c-color-accent-fill-quiet); + --c-color-border-loud: var(--c-color-accent-border-loud); + --c-color-border-normal: var(--c-color-accent-border-normal); + --c-color-border-quiet: var(--c-color-accent-border-quiet); + --c-color-on-loud: var(--c-color-accent-on-loud); + --c-color-on-normal: var(--c-color-accent-on-normal); + --c-color-on-quiet: var(--c-color-accent-on-quiet); } - :host([variant='default']) { + :host([variant='neutral']) { --c-color-fill-loud: var(--c-color-neutral-fill-loud); --c-color-fill-normal: var(--c-color-neutral-fill-normal); --c-color-fill-quiet: var(--c-color-neutral-fill-quiet); diff --git a/packages/craftcms-cp/src/components/button/button.ts b/packages/craftcms-cp/src/components/button/button.ts index c988d3013b0..652d7da0a30 100644 --- a/packages/craftcms-cp/src/components/button/button.ts +++ b/packages/craftcms-cp/src/components/button/button.ts @@ -50,25 +50,22 @@ export default class CraftButton extends LionButtonSubmit { @property() accessibleName: string; /** Visual appearance of the button */ - @property({reflect: true}) appearance: - | 'accent' - | 'plain' - | 'filled' - | 'dashed' = 'accent'; + @property({reflect: true}) appearance: 'solid' | 'outline' | 'plain' = + 'solid'; /** - * Theme variant of the button. Defaults to "default" + * Theme variant of the button. Defaults to "neutral" * - * Primary: The primary action on a page - * Default: Used in most cases + * Accent: The primary action on a page + * Neutral: Used in most cases * Danger: Indicates a dangerous action, when data will be removed or deleted * Inherit: Useful for colorable elements, button will reflect the parent theme */ @property({reflect: true}) variant: - | 'primary' - | 'default' + | 'accent' + | 'neutral' | 'danger' - | 'inherit' = 'default'; + | 'inherit' = 'neutral'; /** Size of the button. Defaults to "medium" */ @property({reflect: true}) size: 'zero' | 'small' | 'medium' | 'large' = diff --git a/packages/craftcms-cp/src/components/callout/callout.styles.ts b/packages/craftcms-cp/src/components/callout/callout.styles.ts index a2d4527922f..8441e5b00e7 100644 --- a/packages/craftcms-cp/src/components/callout/callout.styles.ts +++ b/packages/craftcms-cp/src/components/callout/callout.styles.ts @@ -72,7 +72,7 @@ export default css` border-end-end-radius: var(--_radius); } - :host([appearance~='accent']) { + :host([appearance~='solid']) { --c-text-link: var(--c-color-on-loud); background-color: var(--c-color-fill-loud); color: var(--c-color-on-loud); diff --git a/packages/craftcms-cp/src/components/callout/callout.ts b/packages/craftcms-cp/src/components/callout/callout.ts index 24fe343e05f..88779f26247 100644 --- a/packages/craftcms-cp/src/components/callout/callout.ts +++ b/packages/craftcms-cp/src/components/callout/callout.ts @@ -14,7 +14,7 @@ export default class CraftCallout extends LitElement { static override styles: CSSResultGroup = [variantsStyles, styles]; /** Variant style of the callout */ - @property({reflect: true}) variant: VariantKey = Variant.Default; + @property({reflect: true}) variant: VariantKey = Variant.Neutral; /** * Appearance style of the callout diff --git a/packages/craftcms-cp/src/components/indicator/indicator.ts b/packages/craftcms-cp/src/components/indicator/indicator.ts index 944806e22cf..a9d15155b84 100644 --- a/packages/craftcms-cp/src/components/indicator/indicator.ts +++ b/packages/craftcms-cp/src/components/indicator/indicator.ts @@ -2,20 +2,20 @@ import {css, html, LitElement} from 'lit'; import {property} from 'lit/decorators.js'; import {Variant, type VariantKey} from '@src/types'; import {classMap} from 'lit/directives/class-map.js'; -import variantsStyles from '@src/styles/variants.styles'; +import staticVariantsStyles from '@src/styles/static-variants.styles'; export default class CraftIndicator extends LitElement { static override styles = [ - variantsStyles, + staticVariantsStyles, css` .indicator { display: inline-flex; aspect-ratio: 1; width: var(--c-indicator-size, 0.5em); border-radius: var(--c-radius-full); - color: var(--c-color-on-loud); - background-color: var(--c-color-fill-loud); - border: 1px solid var(--c-color-border-loud); + color: var(--c-color-static-on); + background-color: var(--c-color-static-fill); + border: 1px solid var(--c-color-static-border); } .indicator--empty { @@ -26,7 +26,7 @@ export default class CraftIndicator extends LitElement { ]; @property({reflect: true}) - variant: VariantKey | 'empty' = Variant.Default; + variant: VariantKey | 'empty' = Variant.Neutral; @property() label: string | null = null; diff --git a/packages/craftcms-cp/src/components/switch-button/switch-button.ts b/packages/craftcms-cp/src/components/switch-button/switch-button.ts index 49d81a7d9ea..45a00b9f46d 100644 --- a/packages/craftcms-cp/src/components/switch-button/switch-button.ts +++ b/packages/craftcms-cp/src/components/switch-button/switch-button.ts @@ -49,7 +49,7 @@ export default class CraftSwitchButton extends LionSwitchButton { } :host([checked]) .switch-button__track { - background-color: var(--c-color-success-fill-loud); + background-color: var(--c-color-static-success-fill); } :host([checked]) .switch-button__thumb { @@ -69,7 +69,7 @@ export default class CraftSwitchButton extends LionSwitchButton { mask-repeat: no-repeat; width: calc(var(--c-switch-thumb-height) - 6px); aspect-ratio: 1; - background-color: var(--c-color-success-border-loud); + background-color: var(--c-color-success-on-normal); } `, ]; diff --git a/packages/craftcms-cp/src/stories/tokens/Colors.mdx b/packages/craftcms-cp/src/stories/tokens/Colors.mdx index ffbc500e8b8..a6be522a49e 100644 --- a/packages/craftcms-cp/src/stories/tokens/Colors.mdx +++ b/packages/craftcms-cp/src/stories/tokens/Colors.mdx @@ -1,27 +1,46 @@ import {Meta, ColorPalette, ColorItem} from '@storybook/addon-docs/blocks'; -import {stops, lightTheme, darkTheme} from '../../styles/color-definitions.js'; +import { + stops, + staticTheme, + lightTheme, + darkTheme, +} from '../../styles/color-definitions.js'; ## Overview -The Craft color palette uses Leonardo to generate color palettes based on defined contrast ratios. The palette includes a wide range of colors, but not all of them are intended for direct use in the UI. +The Craft color palette uses Leonardo to generate colors based on defined contrast ratios. The palette includes a wide range of colors, but not all of them are intended for direct use in the UI. -Instead, colors should be used inside of **color tokens**. The palette is organized into two themes: light and dark. Each theme has a set of contrast colors that are used for text, borders, and backgrounds. +Instead, colors should be used inside of **color tokens**. When a color token is used, it automatically adapts to the active theme, providing appropriate contrast for UI elements and text. This means that components can use the same color variables, and they will automatically adapt to the active theme without needing to override colors when the theme changes. -For both themes, the general guideline is: +For light and dark themes, the general guideline is: - Colors **400** and above are suitable for UI elements, as they have a 3:1 contrast ratio against the theme background color. - Colors **600** and above are suitable for text, as they have a 4.5:1 contrast ratio against the theme background color. -## Static Colors +There is also a static color palette that is not affected by the active theme. These colors are used for elements that need to maintain a consistent color regardless of the theme, such as icons or logos. -The palette also includes a set of static colors that are not affected by the active theme. These colors are used for elements that need to maintain a consistent color regardless of the theme, such as icons or logos. +## Static Colors -Static colors are based on the colors generated for the light theme, and can be used in both light and dark themes without modification. +Static colors are used for elements that need to maintain a consistent color regardless of the theme, such as icons or logos. The color variables are used by prefixing the desired color with `--color-static-`. For example, the `blue-500` color can be used with the following variable: `--color-static-blue-500`. + + {staticTheme.contrastColors + .filter((scale) => scale.values) + .map((scale) => ( + [`${stops[i]}`, val.value]) + )} + /> + ))} + + ## Theme Colors The color palette adapts to the active theme, providing appropriate contrast for UI elements and text. diff --git a/packages/craftcms-cp/src/stories/tokens/Docs.mdx b/packages/craftcms-cp/src/stories/tokens/Docs.mdx index 1bd83b21204..66ba2f49d9b 100644 --- a/packages/craftcms-cp/src/stories/tokens/Docs.mdx +++ b/packages/craftcms-cp/src/stories/tokens/Docs.mdx @@ -12,10 +12,10 @@ import VariantsMeta, { The component system uses two independent properties to control how semantic color is applied to UI elements: -- **Variant** - _What kind of message is this?_ Values: `default`, `success`, `warning`, `danger`, `info` -- **Appearance** - _How prominently should it be displayed?_ Values: `accent`, `fill`, `outline-fill`, `outline`, `plain` +- **Variant** - _What kind of message is this?_ Values: `neutral`, `success`, `warning`, `danger`, `info` +- **Appearance** - _How prominently should it be displayed?_ Values: `solid`, `fill`, `outline-fill`, `outline`, `plain` -Any variant can be combined with any appearance. A `danger` callout can be a bold `accent` banner or a subtle `plain` inline hint. The variant stays the same; the appearance controls how loudly it speaks. +Any variant can be combined with any appearance. A `danger` callout can be a bold `solid` banner or a subtle `plain` inline hint. The variant stays the same; the appearance controls how loudly it speaks. --- @@ -54,7 +54,7 @@ Appearances consume the generic tokens set by the variant and apply them with va - accent + solid fill-loud @@ -146,7 +146,7 @@ Not every component supports the full set of variants and appearances. Component ### Button -Buttons use **3 variants** (`primary`, `default`, `danger`) and **4 appearances** (`accent`, `filled`, `dashed`, `plain`). The `primary` variant maps to the `brand` color group rather than the shared `Variant` type. +Buttons use **3 variants** (`accent`, `neutral`, `danger`) and **3 appearances** (`solid`, `outline`, `plain`). @@ -174,7 +174,7 @@ export default class MyComponent extends LitElement { static override styles: CSSResultGroup = [variantsStyles, styles]; @property({reflect: true}) - variant: VariantKey = Variant.Default; + variant: VariantKey = Variant.Neutral; } ``` @@ -219,5 +219,5 @@ appearance: AppearanceKey = Appearance.Fill; - **Reflect properties** - both `variant` and `appearance` should use `reflect: true` so they appear as HTML attributes for CSS matching. - **Use `~=` selectors** - appearance selectors in existing components use `[appearance~='value']` (word matching) rather than `[appearance='value']` (exact matching). -- **Default to neutral** - set sensible defaults (`Variant.Default` / the most common appearance) so components look correct without explicit attributes. +- **Default to neutral** - set sensible defaults (`Variant.Neutral` / the most common appearance) so components look correct without explicit attributes. - **Define custom subsets when needed** - if the standard `Variant` or `Appearance` type doesn't fit (like Button's `primary` variant), define component-specific values instead of forcing the shared types. diff --git a/packages/craftcms-cp/src/stories/tokens/variants.stories.ts b/packages/craftcms-cp/src/stories/tokens/variants.stories.ts index 77381a11ee1..308f5cdfca3 100644 --- a/packages/craftcms-cp/src/stories/tokens/variants.stories.ts +++ b/packages/craftcms-cp/src/stories/tokens/variants.stories.ts @@ -6,13 +6,13 @@ import '../../components/callout/callout.js'; import '../../components/button/button.js'; import '../../components/indicator/indicator.js'; -import {Appearance, Variant} from '@src/types'; +import {Appearance, Variant, ButtonAppearance, ButtonVariant} from '@src/types'; const variants = Object.values(Variant); const appearances = Object.values(Appearance); -const buttonVariants = ['primary', 'default', 'danger'] as const; -const buttonAppearances = ['accent', 'filled', 'dashed', 'plain'] as const; +const buttonVariants = Object.values(ButtonVariant); +const buttonAppearances = Object.values(ButtonAppearance); const meta: Meta = { title: 'Tokens/Variants & Appearances', @@ -65,8 +65,8 @@ export const CalloutMatrix: Story = { }; /** - * Buttons use their own variant subset (primary, default, danger) - * and appearance subset (accent, filled, dashed, plain). + * Buttons use their own variant subset (accent, neutral, danger) + * and appearance subset (solid, outline, plain). */ export const ButtonMatrix: Story = { name: 'Button Matrix', @@ -89,9 +89,7 @@ export const ButtonMatrix: Story = { ${variant} diff --git a/packages/craftcms-cp/src/styles/color-definitions.js b/packages/craftcms-cp/src/styles/color-definitions.js index 34ec1a4e5fe..fcb11824292 100644 --- a/packages/craftcms-cp/src/styles/color-definitions.js +++ b/packages/craftcms-cp/src/styles/color-definitions.js @@ -1,6 +1,7 @@ import {Theme, Color, BackgroundColor} from '@adobe/leonardo-contrast-colors'; const contrastRatios = { + static: [1.45, 1.78, 2.22, 2.78, 3.54, 4.61, 5.92, 7.81, 10.21, 13.01, 15.91], light: [1.08, 1.33, 1.58, 2.39, 3.01, 3.87, 5.07, 6.72, 8.84, 11.31, 13.94], dark: [1.08, 1.58, 1.96, 2.45, 3.09, 3.9, 5.07, 6.02, 7.34, 8.77, 10.18], base: [-1.2, 1, 1.2, 1.4, 2, 4, 5, 6.5, 10.21, 13.58, 17.04], @@ -165,6 +166,12 @@ export const lightTheme = new Theme({ lightness: 97, }); +export const staticTheme = new Theme({ + colors: makeColors(contrastRatios.static), + backgroundColor: backgroundColor, + lightness: 100, +}); + export const darkTheme = new Theme({ colors: makeColors(contrastRatios.dark), backgroundColor: backgroundColor, diff --git a/packages/craftcms-cp/src/styles/shared/color-palette.css b/packages/craftcms-cp/src/styles/shared/color-palette.css index a110be227df..00f6a78f08c 100644 --- a/packages/craftcms-cp/src/styles/shared/color-palette.css +++ b/packages/craftcms-cp/src/styles/shared/color-palette.css @@ -257,259 +257,259 @@ --color-base-950: #0f141c; /* Static colors */ - --color-static-gray-50: #eaecef; - --color-static-gray-100: #d4d7dd; - --color-static-gray-200: #c2c6ce; - --color-static-gray-300: #9ba1ae; - --color-static-gray-400: #888e9c; - --color-static-gray-500: #757b8a; - --color-static-gray-600: #626978; - --color-static-gray-700: #4f5665; - --color-static-gray-800: #3e4555; - --color-static-gray-900: #2e3545; - --color-static-gray-950: #1e2635; - --color-static-red-50: #fae8e8; - --color-static-red-100: #f6cdcc; - --color-static-red-200: #f4b6b4; - --color-static-red-300: #ee817e; - --color-static-red-400: #e8645f; - --color-static-red-500: #dc463e; - --color-static-red-600: #c72c22; - --color-static-red-700: #a32720; - --color-static-red-800: #80231f; - --color-static-red-900: #631b18; - --color-static-red-950: #4b110f; - --color-static-orange-50: #fbead2; - --color-static-orange-100: #f7d0a1; - --color-static-orange-200: #f4ba7c; - --color-static-orange-300: #ed8633; - --color-static-orange-400: #e6692c; - --color-static-orange-500: #d45124; - --color-static-orange-600: #b5441d; - --color-static-orange-700: #963816; - --color-static-orange-800: #792c12; - --color-static-orange-900: #5e220e; - --color-static-orange-950: #44180b; - --color-static-amber-50: #fbecaf; - --color-static-amber-100: #f7d36f; - --color-static-amber-200: #f4bd44; - --color-static-amber-300: #df8e32; - --color-static-amber-400: #ca7c2c; - --color-static-amber-500: #b56825; - --color-static-amber-600: #a0551e; - --color-static-amber-700: #8a4217; - --color-static-amber-800: #703411; - --color-static-amber-900: #58270b; - --color-static-amber-950: #411b06; - --color-static-emerald-50: #cff6e1; - --color-static-emerald-100: #9ae7be; - --color-static-emerald-200: #77d9a6; - --color-static-emerald-300: #51b37f; - --color-static-emerald-400: #479e70; - --color-static-emerald-500: #3d8961; - --color-static-emerald-600: #327555; - --color-static-emerald-700: #286048; - --color-static-emerald-800: #1e4d3c; - --color-static-emerald-900: #173b2e; - --color-static-emerald-950: #112a21; - --color-static-blue-50: #e2edfd; - --color-static-blue-100: #c1d9fb; - --color-static-blue-200: #a5c8fa; - --color-static-blue-300: #68a2f7; - --color-static-blue-400: #518cf6; - --color-static-blue-500: #3e74f2; - --color-static-blue-600: #305ce7; - --color-static-blue-700: #2244d7; - --color-static-blue-800: #2138a7; - --color-static-blue-900: #1d2d7a; - --color-static-blue-950: #192250; - --color-static-yellow-50: #fcef90; - --color-static-yellow-100: #f7d358; - --color-static-yellow-200: #eebf40; - --color-static-yellow-300: #ce9733; - --color-static-yellow-400: #bd822c; - --color-static-yellow-500: #aa6f24; - --color-static-yellow-600: #945c1d; - --color-static-yellow-700: #7c4b16; - --color-static-yellow-800: #633c12; - --color-static-yellow-900: #4c2e0e; - --color-static-yellow-950: #37210a; - --color-static-slate-50: #e9eef3; - --color-static-slate-100: #ced7e2; - --color-static-slate-200: #bdc7d4; - --color-static-slate-300: #95a2b4; - --color-static-slate-400: #828fa4; - --color-static-slate-500: #6f7c94; - --color-static-slate-600: #5c6982; - --color-static-slate-700: #4a576d; - --color-static-slate-800: #3a455a; - --color-static-slate-900: #2b3549; - --color-static-slate-950: #1e2637; - --color-static-lime-50: #ddf7a2; - --color-static-lime-100: #b4e758; - --color-static-lime-200: #9ed742; - --color-static-lime-300: #7ab034; - --color-static-lime-400: #6a9c2d; - --color-static-lime-500: #5d8726; - --color-static-lime-600: #50731f; - --color-static-lime-700: #435e18; - --color-static-lime-800: #344c13; - --color-static-lime-900: #273a0e; - --color-static-lime-950: #1b2a09; - --color-static-green-50: #cef7d8; - --color-static-green-100: #96e9a8; - --color-static-green-200: #6add82; - --color-static-green-300: #52b555; - --color-static-green-400: #48a04a; - --color-static-green-500: #3e8b42; - --color-static-green-600: #34763b; - --color-static-green-700: #2b6133; - --color-static-green-800: #234e2b; - --color-static-green-900: #1b3b21; - --color-static-green-950: #142b18; - --color-static-teal-50: #c7f7ec; - --color-static-teal-100: #90e7d6; - --color-static-teal-200: #6dd7c4; - --color-static-teal-300: #4fb0a1; - --color-static-teal-400: #459c90; - --color-static-teal-500: #3b877f; - --color-static-teal-600: #31736d; - --color-static-teal-700: #275f5b; - --color-static-teal-800: #1e4c49; - --color-static-teal-900: #163a39; - --color-static-teal-950: #0f2a2a; - --color-static-cyan-50: #c9f5fc; - --color-static-cyan-100: #7fe6fa; - --color-static-cyan-200: #66d4f1; - --color-static-cyan-300: #4dacce; - --color-static-cyan-400: #4397bb; - --color-static-cyan-500: #3983a5; - --color-static-cyan-600: #2f6f8d; - --color-static-cyan-700: #265c74; - --color-static-cyan-800: #1e4a5e; - --color-static-cyan-900: #17384b; - --color-static-cyan-950: #102836; - --color-static-sky-50: #dceffc; - --color-static-sky-100: #aaddfb; - --color-static-sky-200: #84cefa; - --color-static-sky-300: #4ca8eb; - --color-static-sky-400: #4193d9; - --color-static-sky-500: #377fc5; - --color-static-sky-600: #2e6ca7; - --color-static-sky-700: #25598a; - --color-static-sky-800: #1d476f; - --color-static-sky-900: #163655; - --color-static-sky-950: #10273e; - --color-static-zinc-50: #ededee; - --color-static-zinc-100: #d6d6da; - --color-static-zinc-200: #c5c5ca; - --color-static-zinc-300: #a0a0a7; - --color-static-zinc-400: #8d8d95; - --color-static-zinc-500: #7b7b83; - --color-static-zinc-600: #686872; - --color-static-zinc-700: #55555f; - --color-static-zinc-800: #44444c; - --color-static-zinc-900: #34343b; - --color-static-zinc-950: #25252b; - --color-static-violet-50: #eeebfd; - --color-static-violet-100: #d8d2fb; - --color-static-violet-200: #c9bdfa; - --color-static-violet-300: #a991f8; - --color-static-violet-400: #9979f7; - --color-static-violet-500: #8b5df5; - --color-static-violet-600: #7c3cf4; - --color-static-violet-700: #6a1be3; - --color-static-violet-800: #5518b5; - --color-static-violet-900: #401889; - --color-static-violet-950: #2d0f69; - --color-static-purple-50: #f2eafd; - --color-static-purple-100: #e2cefb; - --color-static-purple-200: #d6b9f9; - --color-static-purple-300: #be88f8; - --color-static-purple-400: #b16df7; - --color-static-purple-500: #a24ff6; - --color-static-purple-600: #902bf2; - --color-static-purple-700: #7815d6; - --color-static-purple-800: #6118a6; - --color-static-purple-900: #4b167c; - --color-static-purple-950: #380963; - --color-static-fuchsia-50: #f7e7fd; - --color-static-fuchsia-100: #eecafb; - --color-static-fuchsia-200: #e9b2f9; - --color-static-fuchsia-300: #dd78f7; - --color-static-fuchsia-400: #d15bed; - --color-static-fuchsia-500: #c23be0; - --color-static-fuchsia-600: #ac22c8; - --color-static-fuchsia-700: #8e1ea3; - --color-static-fuchsia-800: #721c7f; - --color-static-fuchsia-900: #571861; - --color-static-fuchsia-950: #401146; - --color-static-pink-50: #f9e7f2; - --color-static-pink-100: #f4cbe4; - --color-static-pink-200: #f1b3d8; - --color-static-pink-300: #eb7bba; - --color-static-pink-400: #e65ba6; - --color-static-pink-500: #db3b88; - --color-static-pink-600: #c2296a; - --color-static-pink-700: #a22054; - --color-static-pink-800: #801d44; - --color-static-pink-900: #631735; - --color-static-pink-950: #481127; - --color-static-rose-50: #fbe8ea; - --color-static-rose-100: #f7ccd0; - --color-static-rose-200: #f3b6bd; - --color-static-rose-300: #ee7f8f; - --color-static-rose-400: #ec5e74; - --color-static-rose-500: #e43852; - --color-static-rose-600: #c7293f; - --color-static-rose-700: #a52138; - --color-static-rose-800: #851930; - --color-static-rose-900: #681225; - --color-static-rose-950: #4e0b1b; - --color-static-neutral-50: #ededed; - --color-static-neutral-100: #d7d7d7; - --color-static-neutral-200: #c5c5c5; - --color-static-neutral-300: #a0a0a0; - --color-static-neutral-400: #8e8e8e; - --color-static-neutral-500: #7c7c7c; - --color-static-neutral-600: #686868; - --color-static-neutral-700: #565656; - --color-static-neutral-800: #444444; - --color-static-neutral-900: #343434; - --color-static-neutral-950: #262626; - --color-static-stone-50: #eeedec; - --color-static-stone-100: #d8d7d5; - --color-static-stone-200: #c8c5c2; - --color-static-stone-300: #a4a09b; - --color-static-stone-400: #928e88; - --color-static-stone-500: #807a75; - --color-static-stone-600: #6d6862; - --color-static-stone-700: #5a5550; - --color-static-stone-800: #48443f; - --color-static-stone-900: #373430; - --color-static-stone-950: #282523; - --color-static-indigo-50: #e7ebfd; - --color-static-indigo-100: #cfd5fb; - --color-static-indigo-200: #bbc2fa; - --color-static-indigo-300: #9198f8; - --color-static-indigo-400: #7b83f6; - --color-static-indigo-500: #6b6cec; - --color-static-indigo-600: #5a54e1; - --color-static-indigo-700: #483bd6; - --color-static-indigo-800: #3a2eaf; - --color-static-indigo-900: #2e2681; - --color-static-indigo-950: #221e56; + --color-static-gray-50: #d3d6dc; + --color-static-gray-100: #bec2cb; + --color-static-gray-200: #a9aeb9; + --color-static-gray-300: #959ba8; + --color-static-gray-400: #828896; + --color-static-gray-500: #6f7584; + --color-static-gray-600: #5e6473; + --color-static-gray-700: #4a5261; + --color-static-gray-800: #3a4151; + --color-static-gray-900: #2a3141; + --color-static-gray-950: #1a2231; + --color-static-red-50: #f6cdcc; + --color-static-red-100: #f3b2b1; + --color-static-red-200: #f09593; + --color-static-red-300: #ed7875; + --color-static-red-400: #e45a55; + --color-static-red-500: #d83930; + --color-static-red-600: #be2a21; + --color-static-red-700: #9a2620; + --color-static-red-800: #78221f; + --color-static-red-900: #5d1816; + --color-static-red-950: #440f0d; + --color-static-orange-50: #f7d0a1; + --color-static-orange-100: #f4b574; + --color-static-orange-200: #f09a47; + --color-static-orange-300: #eb7e31; + --color-static-orange-400: #e35f29; + --color-static-orange-500: #c94c22; + --color-static-orange-600: #ad411b; + --color-static-orange-700: #8f3515; + --color-static-orange-800: #722a11; + --color-static-orange-900: #571f0d; + --color-static-orange-950: #3d160a; + --color-static-amber-50: #f7d36f; + --color-static-amber-100: #f4b83f; + --color-static-amber-200: #ee9c37; + --color-static-amber-300: #d88930; + --color-static-amber-400: #c47529; + --color-static-amber-500: #ae6122; + --color-static-amber-600: #9a501c; + --color-static-amber-700: #843e15; + --color-static-amber-800: #69310f; + --color-static-amber-900: #51240a; + --color-static-amber-950: #3a1805; + --color-static-emerald-50: #99e6bd; + --color-static-emerald-100: #6fd6a1; + --color-static-emerald-200: #58c18a; + --color-static-emerald-300: #4eac7a; + --color-static-emerald-400: #44976a; + --color-static-emerald-500: #39825d; + --color-static-emerald-600: #306f52; + --color-static-emerald-700: #255b45; + --color-static-emerald-800: #1c4838; + --color-static-emerald-900: #15372b; + --color-static-emerald-950: #0f261e; + --color-static-blue-50: #c0d8fb; + --color-static-blue-100: #a0c4f9; + --color-static-blue-200: #7eb0f8; + --color-static-blue-300: #609bf7; + --color-static-blue-400: #4a84f6; + --color-static-blue-500: #396cee; + --color-static-blue-600: #2c55e4; + --color-static-blue-700: #2241cb; + --color-static-blue-800: #20369b; + --color-static-blue-900: #1c2a70; + --color-static-blue-950: #161e47; + --color-static-yellow-50: #f7d358; + --color-static-yellow-100: #ebbb3f; + --color-static-yellow-200: #daa538; + --color-static-yellow-300: #c99031; + --color-static-yellow-400: #b77c2a; + --color-static-yellow-500: #a26722; + --color-static-yellow-600: #8e571b; + --color-static-yellow-700: #754715; + --color-static-yellow-800: #5d3811; + --color-static-yellow-900: #462b0d; + --color-static-yellow-950: #311e09; + --color-static-slate-50: #ced7e2; + --color-static-slate-100: #b8c3d0; + --color-static-slate-200: #a4afc0; + --color-static-slate-300: #909caf; + --color-static-slate-400: #7c899f; + --color-static-slate-500: #68758e; + --color-static-slate-600: #57647c; + --color-static-slate-700: #475268; + --color-static-slate-800: #374256; + --color-static-slate-900: #283144; + --color-static-slate-950: #1a2232; + --color-static-lime-50: #b4e758; + --color-static-lime-100: #9bd340; + --color-static-lime-200: #87be39; + --color-static-lime-300: #75aa32; + --color-static-lime-400: #66952a; + --color-static-lime-500: #598023; + --color-static-lime-600: #4d6d1d; + --color-static-lime-700: #3f5a17; + --color-static-lime-800: #314712; + --color-static-lime-900: #24360d; + --color-static-lime-950: #182608; + --color-static-green-50: #96e9a8; + --color-static-green-100: #64d97a; + --color-static-green-200: #59c35e; + --color-static-green-300: #4faf52; + --color-static-green-400: #449947; + --color-static-green-500: #3a8440; + --color-static-green-600: #327039; + --color-static-green-700: #295c32; + --color-static-green-800: #214929; + --color-static-green-900: #19371f; + --color-static-green-950: #112616; + --color-static-teal-50: #8de6d4; + --color-static-teal-100: #67d4c1; + --color-static-teal-200: #57bfae; + --color-static-teal-300: #4caa9c; + --color-static-teal-400: #42958b; + --color-static-teal-500: #388079; + --color-static-teal-600: #2e6e68; + --color-static-teal-700: #255b57; + --color-static-teal-800: #1c4745; + --color-static-teal-900: #143636; + --color-static-teal-950: #0d2525; + --color-static-cyan-50: #7de4f9; + --color-static-cyan-100: #61d0ef; + --color-static-cyan-200: #55badb; + --color-static-cyan-300: #4aa6c8; + --color-static-cyan-400: #4091b5; + --color-static-cyan-500: #367c9d; + --color-static-cyan-600: #2d6a86; + --color-static-cyan-700: #24576f; + --color-static-cyan-800: #1c455a; + --color-static-cyan-900: #153446; + --color-static-cyan-950: #0f2431; + --color-static-sky-50: #aaddfb; + --color-static-sky-100: #7dcbfa; + --color-static-sky-200: #53b6f7; + --color-static-sky-300: #48a1e5; + --color-static-sky-400: #3e8cd4; + --color-static-sky-500: #3478bc; + --color-static-sky-600: #2c679f; + --color-static-sky-700: #235482; + --color-static-sky-800: #1c4369; + --color-static-sky-900: #14324f; + --color-static-sky-950: #0e2338; + --color-static-zinc-50: #d5d5d9; + --color-static-zinc-100: #c1c1c6; + --color-static-zinc-200: #adadb3; + --color-static-zinc-300: #9a9aa1; + --color-static-zinc-400: #87878f; + --color-static-zinc-500: #74747d; + --color-static-zinc-600: #63636d; + --color-static-zinc-700: #52525c; + --color-static-zinc-800: #404048; + --color-static-zinc-900: #303036; + --color-static-zinc-950: #212126; + --color-static-violet-50: #d8d2fb; + --color-static-violet-100: #c6b9fa; + --color-static-violet-200: #b5a1f8; + --color-static-violet-300: #a48af7; + --color-static-violet-400: #9570f6; + --color-static-violet-500: #8553f5; + --color-static-violet-600: #7831f4; + --color-static-violet-700: #6515dc; + --color-static-violet-800: #5018ab; + --color-static-violet-900: #3b1581; + --color-static-violet-950: #280d5f; + --color-static-purple-50: #e2cefb; + --color-static-purple-100: #d4b5f9; + --color-static-purple-200: #c79af8; + --color-static-purple-300: #ba80f8; + --color-static-purple-400: #ac64f7; + --color-static-purple-500: #9c44f5; + --color-static-purple-600: #8a20f0; + --color-static-purple-700: #7215cb; + --color-static-purple-800: #5b199b; + --color-static-purple-900: #451376; + --color-static-purple-950: #32075b; + --color-static-fuchsia-50: #eec9fb; + --color-static-fuchsia-100: #e8adf9; + --color-static-fuchsia-200: #e28ef8; + --color-static-fuchsia-300: #da6ef6; + --color-static-fuchsia-400: #cc51e9; + --color-static-fuchsia-500: #bc2eda; + --color-static-fuchsia-600: #a421be; + --color-static-fuchsia-700: #881d9a; + --color-static-fuchsia-800: #6b1c77; + --color-static-fuchsia-900: #51165a; + --color-static-fuchsia-950: #390f40; + --color-static-pink-50: #f3cae4; + --color-static-pink-100: #f0afd5; + --color-static-pink-200: #ed90c5; + --color-static-pink-300: #ea71b5; + --color-static-pink-400: #e4509e; + --color-static-pink-500: #d5317b; + --color-static-pink-600: #ba2664; + --color-static-pink-700: #9a1e4f; + --color-static-pink-800: #781d41; + --color-static-pink-900: #5b1631; + --color-static-pink-950: #410f23; + --color-static-rose-50: #f7ccd0; + --color-static-rose-100: #f3b1b8; + --color-static-rose-200: #f0949f; + --color-static-rose-300: #ee7587; + --color-static-rose-400: #eb516a; + --color-static-rose-500: #db3148; + --color-static-rose-600: #be273c; + --color-static-rose-700: #9d1f38; + --color-static-rose-800: #7e172e; + --color-static-rose-900: #611023; + --color-static-rose-950: #470918; + --color-static-neutral-50: #d6d6d6; + --color-static-neutral-100: #c2c2c2; + --color-static-neutral-200: #aeaeae; + --color-static-neutral-300: #9b9b9b; + --color-static-neutral-400: #888888; + --color-static-neutral-500: #757575; + --color-static-neutral-600: #646464; + --color-static-neutral-700: #525252; + --color-static-neutral-800: #414141; + --color-static-neutral-900: #313131; + --color-static-neutral-950: #222222; + --color-static-stone-50: #d7d5d3; + --color-static-stone-100: #c4c2bf; + --color-static-stone-200: #b1ada9; + --color-static-stone-300: #9f9a95; + --color-static-stone-400: #8d8782; + --color-static-stone-500: #7a746e; + --color-static-stone-600: #69635e; + --color-static-stone-700: #56514c; + --color-static-stone-800: #44403b; + --color-static-stone-900: #33302d; + --color-static-stone-950: #24211f; + --color-static-indigo-50: #ced4fb; + --color-static-indigo-100: #b7befa; + --color-static-indigo-200: #a0a8f9; + --color-static-indigo-300: #8a92f8; + --color-static-indigo-400: #767bf3; + --color-static-indigo-500: #6564e8; + --color-static-indigo-600: #564ede; + --color-static-indigo-700: #4335d3; + --color-static-indigo-800: #372ca4; + --color-static-indigo-900: #2b2474; + --color-static-indigo-950: #1e1b4d; --color-static-base-50: #ffffff; - --color-static-base-100: #f2f5f8; - --color-static-base-200: #dae1e9; - --color-static-base-300: #c8d2de; - --color-static-base-400: #a6b1c1; - --color-static-base-500: #6c7a92; - --color-static-base-600: #5d6a83; - --color-static-base-700: #4d5970; - --color-static-base-800: #313c50; - --color-static-base-900: #1f283b; - --color-static-base-950: #0f141c; + --color-static-base-100: #fefefe; + --color-static-base-200: #e5ebf0; + --color-static-base-300: #d2dbe4; + --color-static-base-400: #acb8c7; + --color-static-base-500: #728097; + --color-static-base-600: #627089; + --color-static-base-700: #525e76; + --color-static-base-800: #374256; + --color-static-base-900: #252e41; + --color-static-base-950: #161c29; } [data-theme='dark'] { diff --git a/packages/craftcms-cp/src/styles/shared/colorable.css b/packages/craftcms-cp/src/styles/shared/colorable.css index a2868f9bdc8..ab9ce17f3e1 100644 --- a/packages/craftcms-cp/src/styles/shared/colorable.css +++ b/packages/craftcms-cp/src/styles/shared/colorable.css @@ -276,15 +276,15 @@ --c-color-success-on-loud: var(--color-emerald-50); /* Semantics colors - warning */ - --c-color-warning-fill-quiet: var(--color-orange-50); - --c-color-warning-fill-normal: var(--color-orange-100); - --c-color-warning-fill-loud: var(--color-orange-600); - --c-color-warning-border-quiet: var(--color-orange-400); - --c-color-warning-border-normal: var(--color-orange-600); - --c-color-warning-border-loud: var(--color-orange-800); - --c-color-warning-on-quiet: var(--color-orange-800); - --c-color-warning-on-normal: var(--color-orange-950); - --c-color-warning-on-loud: var(--color-orange-50); + --c-color-warning-fill-quiet: var(--color-yellow-50); + --c-color-warning-fill-normal: var(--color-yellow-100); + --c-color-warning-fill-loud: var(--color-yellow-600); + --c-color-warning-border-quiet: var(--color-yellow-400); + --c-color-warning-border-normal: var(--color-yellow-600); + --c-color-warning-border-loud: var(--color-yellow-800); + --c-color-warning-on-quiet: var(--color-yellow-800); + --c-color-warning-on-normal: var(--color-yellow-950); + --c-color-warning-on-loud: var(--color-yellow-50); /* Semantics colors - danger */ --c-color-danger-fill-quiet: var(--color-red-50); diff --git a/packages/craftcms-cp/src/styles/shared/tokens.css b/packages/craftcms-cp/src/styles/shared/tokens.css index d27db89a921..a7bc3ac1028 100644 --- a/packages/craftcms-cp/src/styles/shared/tokens.css +++ b/packages/craftcms-cp/src/styles/shared/tokens.css @@ -16,6 +16,7 @@ /* Text tokens (replaces --c-fg-*) */ --c-text-white: var(--color-white); + --c-text-black: var(--color-black); --c-text-default: var(--color-slate-900); --c-text-quiet: var(--color-slate-600); --c-text-link: var(--color-blue-600); @@ -108,6 +109,33 @@ /** Components */ + --c-color-static-success-fill: var(--color-static-emerald-200); + --c-color-static-success-on: var(--c-text-white); + --c-color-static-success-border: var(--color-static-emerald-500); + + --c-color-static-warning-fill: var(--color-static-yellow-100); + --c-color-static-warning-on: var(--c-text-black); + --c-color-static-warning-border: var(--color-static-yellow-200); + + --c-color-static-info-fill: var(--color-static-blue-400); + --c-color-static-info-on: var(--c-text-white); + --c-color-static-info-border: var(--color-static-blue-500); + + --c-color-static-brand-fill: var(--color-static-red-500); + --c-color-static-brand-on: var(--c-text-white); + --c-color-static-brand-border: var(--color-static-red-600); + + --c-color-static-danger-fill: var(--color-static-red-500); + --c-color-static-danger-on: var(--c-text-white); + --c-color-static-danger-border: var(--color-static-red-600); + + --c-color-static-accent-fill: var(--color-static-blue-400); + --c-color-static-accent-on: var(--c-text-white); + --c-color-static-accent-border: var(--color-static-blue-500); + + --c-color-static-neutral-fill: var(--color-static-slate-600); + --c-color-static-neutral-on: var(--c-text-white); + --c-color-static-neutral-border: var(--color-static-slate-700); /** Form controls @@ -147,35 +175,6 @@ --c-select-spacing-block: var(--c-form-control-spacing-block); --c-select-shadow: var(--shadow-sm); - /** - Buttons - */ - - /** Variants **/ - /* Default */ - --c-button-default-fill: var(--color-slate-200); - --c-button-default-fill-hover: var(--color-slate-300); - --c-button-default-text: var(--c-text-default); - --c-button-default-text-hover: var(--c-button-default-text); - --c-button-default-border: var(--color-slate-300); - --c-button-default-border-hover: var(--c-button-default-border); - - /* Primary */ - --c-button-primary-fill: var(--color-red-600); - --c-button-primary-border: var(--color-red-700); - --c-button-primary-text: var(--color-white); - --c-button-primary-fill-hover: var(--color-red-700); - --c-button-primary-border-hover: var(--c-button-primary-border); - --c-button-primary-text-hover: var(--c-button-primary-text); - - /* Danger */ - --c-button-danger-fill: var(--color-red-600); - --c-button-danger-border: var(--color-red-700); - --c-button-danger-text: var(--color-white); - --c-button-danger-fill-hover: var(--color-red-700); - --c-button-danger-border-hover: var(--c-button-danger-border); - --c-button-danger-text-hover: var(--c-button-danger-text); - /** Appearances **/ /* Generic Panes */ --c-pane-fill: var(--c-surface-overlay); diff --git a/packages/craftcms-cp/src/styles/static-variants.styles.ts b/packages/craftcms-cp/src/styles/static-variants.styles.ts new file mode 100644 index 00000000000..667e70be918 --- /dev/null +++ b/packages/craftcms-cp/src/styles/static-variants.styles.ts @@ -0,0 +1,33 @@ +import {css} from 'lit'; + +export default css` + :host([variant='neutral']) { + --c-color-static-fill: var(--c-color-static-neutral-fill); + --c-color-static-on: var(--c-color-static-neutral-on); + --c-color-static-border: var(--c-color-static-neutral-border); + } + + :host([variant='danger']) { + --c-color-static-fill: var(--c-color-static-danger-fill); + --c-color-static-on: var(--c-color-static-danger-on); + --c-color-static-border: var(--c-color-static-danger-border); + } + + :host([variant='info']) { + --c-color-static-fill: var(--c-color-static-info-fill); + --c-color-static-on: var(--c-color-static-info-on); + --c-color-static-border: var(--c-color-static-info-border); + } + + :host([variant='warning']) { + --c-color-static-fill: var(--c-color-static-warning-fill); + --c-color-static-on: var(--c-color-static-warning-on); + --c-color-static-border: var(--c-color-static-warning-border); + } + + :host([variant='success']) { + --c-color-static-fill: var(--c-color-static-success-fill); + --c-color-static-on: var(--c-color-static-success-on); + --c-color-static-border: var(--c-color-static-success-border); + } +`; diff --git a/packages/craftcms-cp/src/types/index.ts b/packages/craftcms-cp/src/types/index.ts index 56a0e5ab4d5..bd710d410d6 100644 --- a/packages/craftcms-cp/src/types/index.ts +++ b/packages/craftcms-cp/src/types/index.ts @@ -1,5 +1,5 @@ export const Variant = { - Default: 'default', + Neutral: 'neutral', Success: 'success', Warning: 'warning', Danger: 'danger', @@ -9,13 +9,25 @@ export const Variant = { export type VariantKey = (typeof Variant)[keyof typeof Variant]; export const Appearance = { - Accent: 'accent', + Solid: 'solid', OutlineFill: 'outline-fill', Fill: 'fill', Outline: 'outline', Plain: 'plain', } as const; +export const ButtonAppearance = { + Solid: 'solid', + Outline: 'outline', + Plain: 'plain', +} as const; + +export const ButtonVariant = { + Accent: 'accent', + Neutral: 'neutral', + Danger: 'danger', +} as const; + export type AppearanceKey = (typeof Appearance)[keyof typeof Appearance]; export interface DateObject { diff --git a/resources/build/AppLayout.js b/resources/build/AppLayout.js index 041102f8343..8265755d970 100644 --- a/resources/build/AppLayout.js +++ b/resources/build/AppLayout.js @@ -1 +1 @@ -import{$ as e,B as t,E as n,G as r,J as i,K as a,L as o,P as s,S as c,T as l,V as u,X as d,a as f,b as p,d as m,h,it as g,l as _,lt as v,rt as ee,t as y,v as b,w as x,x as S,y as C,z as w}from"./_plugin-vue_export-helper.js";import{r as T}from"./nav-item-9g3ebwBJ.js";import{a as E,i as D,n as O,r as k,t as A}from"./useAnnouncer.js";import{a as j,r as te}from"./dist.js";var M={class:`system-info__icon`},N=[`src`],P={class:`system-info__name`},F=y(n({__name:`SystemInfo`,setup(t){let n=j(),r=b(()=>n.system),a=b(()=>n.site),s=b(()=>a.value.url?`a`:`div`);return(t,n)=>(o(),p(u(s.value),{class:`system-info`,href:a.value.url,target:a.value.url?`_blank`:null},{default:i(()=>[C(`div`,M,[r.value.icon?(o(),c(`img`,{key:0,src:r.value.icon,alt:``},null,8,N)):S(``,!0)]),C(`div`,P,e(r.value.name),1)]),_:1},8,[`href`,`target`]))}}),[[`__scopeId`,`data-v-d8aced2c`]]),I=[`icon`,`href`,`active`,`indicator`],L={key:0,slot:`subnav`},R=[`active`,`href`,`indicator`],z=[`name`],B={key:1,class:`nav-indicator`,slot:`icon`},V=[`.displayedJob`,`.hasReservedJobs`,`.hasWaitingJobs`],H=y(n({__name:`MainNav`,setup(t){let n=_(),{nav:r}=j(),i=b(()=>n.props.queue);return(t,n)=>(o(),c(`craft-nav-list`,null,[(o(!0),c(h,null,w(v(r),t=>(o(),c(`craft-nav-item`,{key:t.url,icon:t.icon,href:t.url,active:t.sel,indicator:!!t.badgeCount},[x(e(t.label)+` `,1),t.subnav?(o(),c(h,{key:0},[t.subnav?(o(),c(`craft-nav-list`,L,[(o(!0),c(h,null,w(t.subnav,t=>(o(),c(`craft-nav-item`,{key:t.url,active:t.sel,href:t.url,indicator:!!t.badgeCount},[t.icon?(o(),c(`craft-icon`,{key:0,name:t.icon,slot:`icon`},null,8,z)):(o(),c(`span`,B)),x(` `+e(t.label),1)],8,R))),128))])):S(``,!0)],64)):S(``,!0)],8,I))),128)),C(`cp-queue-indicator`,{".displayedJob":i.value.displayedJob,".hasReservedJobs":i.value.hasReservedJobs,".hasWaitingJobs":i.value.hasWaitingJobs},null,40,V)]))}}),[[`__scopeId`,`data-v-2115cac3`]]),U={class:`flex justify-center py-4 px-2 text-muted`},W={lang:`en`,class:`flex items-center gap-2`},G={class:`edition-logo`},K={"aria-hidden":`true`},q={class:`sr-only`},J=y(n({__name:`EditionInfo`,setup(t){let{app:n}=j(),r=b(()=>`${n.edition.name} Edition`);return(t,i)=>(o(),c(`div`,U,[C(`div`,null,[C(`span`,W,[i[0]||=x(` Craft CMS `,-1),C(`span`,G,[C(`span`,K,e(v(n).edition.name),1),C(`span`,q,e(r.value),1)]),x(` `+e(v(n).version),1)])])]))}}),[[`__scopeId`,`data-v-f8b4ece7`]]),Y={},X={class:`dev-mode`};function Z(e,t){return o(),c(`div`,X,[...t[0]||=[C(`div`,{class:`inline-flex py-1 px-2 bg-slate-900 text-slate-100 font-mono text-xs rounded-lg`},` Dev Mode is enabled `,-1)]])}var Q=y(Y,[[`render`,Z],[`__scopeId`,`data-v-52fa7a33`]]),ne=[`data-visibility`,`data-mode`,`aria-label`],re={class:`cp-sidebar__header`},ie={key:0,class:`sidebar-header`},ae=[`label`],oe={class:`cp-sidebar__body`},se={class:`cp-sidebar__footer`},ce=y(n({__name:`CpSidebar`,props:{mode:{default:`floating`},visibility:{default:`hidden`}},emits:[`close`,`dock`],setup(e,{emit:t}){let n=t,r=b(()=>e.mode===`floating`);return a(()=>e.visibility,async e=>{r.value&&e===`visible`&&(await s(),document.querySelector(`.cp-sidebar`).querySelector(`button, [href], [tabindex]:not([tabindex="-1"])`)?.focus())}),(t,r)=>(o(),c(`nav`,{class:`cp-sidebar`,"data-visibility":e.visibility,"data-mode":e.mode,"aria-label":v(T)(`Primary`)},[e.visibility===`visible`?(o(),c(h,{key:0},[C(`div`,re,[e.mode===`docked`?S(``,!0):(o(),c(`div`,ie,[l(F),r[1]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,{size:`small`,icon:``,onClick:r[0]||=e=>n(`close`),type:`button`},[C(`craft-icon`,{name:`x`,style:{"font-size":`0.7em`},label:v(T)(`Close`)},null,8,ae)])]))]),C(`div`,oe,[l(H)]),C(`div`,se,[l(J),l(Q)])],64)):S(``,!0)],8,ne))}}),[[`__scopeId`,`data-v-c4268663`]]),le=[`aria-label`],ue={class:`breadcrumbs`},de={key:2,class:`separator`},fe=y(n({__name:`Breadcrumbs`,props:{items:{},separator:{default:`/`}},setup(t){return(n,r)=>(o(),c(`nav`,{"aria-label":v(T)(`Breadcrumbs`)},[C(`ul`,ue,[(o(!0),c(h,null,w(t.items,(n,r)=>(o(),c(`li`,{key:r,class:d({"breadcrumb-item":!0,"breadcrumb-item--active":r===t.items.length-1})},[n.url?(o(),p(E,{key:0,href:n.url},{default:i(()=>[x(e(n.label),1)]),_:2},1032,[`href`])):(o(),c(h,{key:1},[x(e(n.label),1)],64)),r(o(),p(O,null,{default:i(()=>[v(n)?(o(),c(`div`,pe,e(v(n)),1)):S(``,!0)]),_:1}))}}),he={class:`cp`},ge={class:`cp__header`},_e=[`href`],ve={class:`flex gap-2 p-2`},ye=[`name`,`label`],be={icon:``,appearance:`plain`},xe=[`label`],Se={key:0,variant:`danger`,rounded:`none`},Ce={key:1,variant:`success`,rounded:`none`},we={class:`cp__sidebar`},Te={class:`cp__main`},Ee={key:0,class:`px-4 py-2 border-b border-b-neutral-border-quiet`},De={id:`main`,tabindex:`-1`},$={class:`index-grid index-grid--header`},Oe={class:`index-grid__aside`},ke={class:`text-xl`},Ae={class:`index-grid__main`},je={class:`cp__footer`},Me={key:0,class:`fixed bottom-2 right-2 flex gap-2 justify-end items-center p-2`},Ne={class:`bg-blue-50 border border-blue-500 py-1 px-4 rounded`},Pe=[`label`],Fe=[`label`],Ie=y(n({__name:`AppLayout`,props:{title:{},debug:{},fullWidth:{type:Boolean,default:!1},additionalSkipLinks:{}},setup(n){m(e=>({c87de578:W.value}));let i=n,{system:s}=j(),{messages:u}=D(),y=_(),x=b(()=>y.props.flash?.error??u.value.error??null),E=b(()=>y.props.flash?.success??u.value.success??null),O=b(()=>y.props.crumbs??null),M=b(()=>[{label:T(`Skip to main section`),url:`#main`},...i.additionalSkipLinks??[]]),N=r(`sidebarToggle`),{announcement:P,announce:I}=A(),L=b(()=>{let e=i.title?.trim();return e?`${e} - ${s.name}`:s.name});a(E,e=>I(e)),a(x,e=>I(e));let R=ee({sidebar:{mode:`floating`,visibility:`hidden`}}),z=te(`(min-width: 1024px)`),B=g(!1);a(z,e=>{e?(R.sidebar.mode=`docked`,R.sidebar.visibility=`visible`):(R.sidebar.mode=`floating`,R.sidebar.visibility=`hidden`)},{immediate:!0});function V(){R.sidebar.visibility===`visible`?R.sidebar.visibility=`hidden`:R.sidebar.visibility=`visible`}function H(){R.sidebar.visibility=`hidden`,N.value.focus()}let U=b(()=>R.sidebar.visibility===`visible`?`x`:`bars`),W=b(()=>R.sidebar.mode===`docked`?R.sidebar.visibility===`visible`?`var(--global-sidebar-width)`:`0`:`auto`);return(r,i)=>(o(),c(h,null,[l(v(f),{title:L.value},null,8,[`title`]),l(me,{debug:!0}),C(`div`,he,[C(`header`,ge,[(o(!0),c(h,null,w(M.value,t=>(o(),c(`a`,{key:t.url,href:t.url,class:`skip-link skip-link--global`},e(t.label),9,_e))),128)),C(`div`,ve,[v(z)?S(``,!0):(o(),c(`craft-button`,{key:0,icon:``,type:`button`,appearance:`plain`,onClick:V,ref_key:`sidebarToggle`,ref:N},[C(`craft-icon`,{name:U.value,label:v(T)(`Toggle menu`)},null,8,ye)],512)),v(z)?(o(),p(F,{key:1})):S(``,!0),i[2]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,be,[C(`craft-icon`,{name:`search`,label:v(T)(`Search`)},null,8,xe)])]),x.value?(o(),c(`craft-callout`,Se,e(x.value),1)):S(``,!0),E.value?(o(),c(`craft-callout`,Ce,e(E.value),1)):S(``,!0)]),C(`div`,we,[l(ce,{mode:R.sidebar.mode,visibility:R.sidebar.visibility,onClose:H},null,8,[`mode`,`visibility`])]),C(`div`,Te,[t(r.$slots,`main`,{},()=>[t(r.$slots,`breadcrumbs`,{},()=>[O.value?(o(),c(`div`,Ee,[l(fe,{items:O.value},null,8,[`items`])])):S(``,!0)],!0),C(`main`,De,[t(r.$slots,`header`,{},()=>[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[C(`div`,$,[C(`div`,Oe,[t(r.$slots,`title`,{},()=>[C(`h1`,ke,e(n.title),1)],!0),t(r.$slots,`title-badge`,{},void 0,!0)]),C(`div`,Ae,[t(r.$slots,`actions`,{},void 0,!0)])])],2)],!0),C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`default`,{},void 0,!0)],2)])],!0)]),C(`div`,je,[C(`footer`,null,[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`footer`,{},void 0,!0)],2)])])]),n.debug?(o(),c(`div`,Me,[C(`div`,Ne,e(v(P)??`No announcement`),1),C(`div`,null,[B.value?(o(),p(k,{key:0,data:n.debug,class:`max-h-[50vh] max-w-[600px] overflow-scroll absolute transform -translate-full`},null,8,[`data`])):S(``,!0),B.value?(o(),c(`craft-button`,{key:1,icon:``,type:`button`,onClick:i[0]||=e=>B.value=!1},[C(`craft-icon`,{label:v(T)(`Close Debug panel`),name:`x`},null,8,Pe)])):(o(),c(`craft-button`,{key:2,type:`button`,onClick:i[1]||=e=>B.value=!0,icon:``},[C(`craft-icon`,{name:`code`,label:v(T)(`Show debug variables`)},null,8,Fe)]))])])):S(``,!0)],64))}}),[[`__scopeId`,`data-v-af8bc5be`]]);export{Ie as t}; \ No newline at end of file +import{$ as e,B as t,E as n,G as r,J as i,K as a,L as o,P as s,S as c,T as l,V as u,X as d,a as f,b as p,d as m,h,it as g,l as _,lt as v,rt as ee,t as y,v as b,w as x,x as S,y as C,z as w}from"./_plugin-vue_export-helper.js";import{r as T}from"./nav-item-9g3ebwBJ.js";import{a as E,i as D,n as O,r as k,t as A}from"./useAnnouncer.js";import{a as j,r as te}from"./dist.js";var M={class:`system-info__icon`},N=[`src`],P={class:`system-info__name`},F=y(n({__name:`SystemInfo`,setup(t){let n=j(),r=b(()=>n.system),a=b(()=>n.site),s=b(()=>a.value.url?`a`:`div`);return(t,n)=>(o(),p(u(s.value),{class:`system-info`,href:a.value.url,target:a.value.url?`_blank`:null},{default:i(()=>[C(`div`,M,[r.value.icon?(o(),c(`img`,{key:0,src:r.value.icon,alt:``},null,8,N)):S(``,!0)]),C(`div`,P,e(r.value.name),1)]),_:1},8,[`href`,`target`]))}}),[[`__scopeId`,`data-v-d8aced2c`]]),I=[`icon`,`href`,`active`,`indicator`],L={key:0,slot:`subnav`},R=[`active`,`href`,`indicator`],z=[`name`],B={key:1,class:`nav-indicator`,slot:`icon`},V=[`.displayedJob`,`.hasReservedJobs`,`.hasWaitingJobs`],H=y(n({__name:`MainNav`,setup(t){let n=_(),{nav:r}=j(),i=b(()=>n.props.queue);return(t,n)=>(o(),c(`craft-nav-list`,null,[(o(!0),c(h,null,w(v(r),t=>(o(),c(`craft-nav-item`,{key:t.url,icon:t.icon,href:t.url,active:t.sel,indicator:!!t.badgeCount},[x(e(t.label)+` `,1),t.subnav?(o(),c(h,{key:0},[t.subnav?(o(),c(`craft-nav-list`,L,[(o(!0),c(h,null,w(t.subnav,t=>(o(),c(`craft-nav-item`,{key:t.url,active:t.sel,href:t.url,indicator:!!t.badgeCount},[t.icon?(o(),c(`craft-icon`,{key:0,name:t.icon,slot:`icon`},null,8,z)):(o(),c(`span`,B)),x(` `+e(t.label),1)],8,R))),128))])):S(``,!0)],64)):S(``,!0)],8,I))),128)),C(`cp-queue-indicator`,{".displayedJob":i.value.displayedJob,".hasReservedJobs":i.value.hasReservedJobs,".hasWaitingJobs":i.value.hasWaitingJobs},null,40,V)]))}}),[[`__scopeId`,`data-v-2115cac3`]]),U={class:`flex justify-center py-4 px-2 text-muted`},W={lang:`en`,class:`flex items-center gap-2`},G={class:`edition-logo`},K={"aria-hidden":`true`},q={class:`sr-only`},J=y(n({__name:`EditionInfo`,setup(t){let{app:n}=j(),r=b(()=>`${n.edition.name} Edition`);return(t,i)=>(o(),c(`div`,U,[C(`div`,null,[C(`span`,W,[i[0]||=x(` Craft CMS `,-1),C(`span`,G,[C(`span`,K,e(v(n).edition.name),1),C(`span`,q,e(r.value),1)]),x(` `+e(v(n).version),1)])])]))}}),[[`__scopeId`,`data-v-f8b4ece7`]]),Y={},X={class:`dev-mode`};function Z(e,t){return o(),c(`div`,X,[...t[0]||=[C(`div`,{class:`inline-flex py-1 px-2 bg-slate-900 text-slate-100 font-mono text-xs rounded-lg`},` Dev Mode is enabled `,-1)]])}var Q=y(Y,[[`render`,Z],[`__scopeId`,`data-v-b7da7c4e`]]),ne=[`data-visibility`,`data-mode`,`aria-label`],re={class:`cp-sidebar__header`},ie={key:0,class:`sidebar-header`},ae=[`label`],oe={class:`cp-sidebar__body`},se={class:`cp-sidebar__footer`},ce=y(n({__name:`CpSidebar`,props:{mode:{default:`floating`},visibility:{default:`hidden`}},emits:[`close`,`dock`],setup(e,{emit:t}){let n=t,r=b(()=>e.mode===`floating`);return a(()=>e.visibility,async e=>{r.value&&e===`visible`&&(await s(),document.querySelector(`.cp-sidebar`).querySelector(`button, [href], [tabindex]:not([tabindex="-1"])`)?.focus())}),(t,r)=>(o(),c(`nav`,{class:`cp-sidebar`,"data-visibility":e.visibility,"data-mode":e.mode,"aria-label":v(T)(`Primary`)},[e.visibility===`visible`?(o(),c(h,{key:0},[C(`div`,re,[e.mode===`docked`?S(``,!0):(o(),c(`div`,ie,[l(F),r[1]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,{size:`small`,icon:``,onClick:r[0]||=e=>n(`close`),type:`button`},[C(`craft-icon`,{name:`x`,style:{"font-size":`0.7em`},label:v(T)(`Close`)},null,8,ae)])]))]),C(`div`,oe,[l(H)]),C(`div`,se,[l(J),l(Q)])],64)):S(``,!0)],8,ne))}}),[[`__scopeId`,`data-v-c4268663`]]),le=[`aria-label`],ue={class:`breadcrumbs`},de={key:2,class:`separator`},fe=y(n({__name:`Breadcrumbs`,props:{items:{},separator:{default:`/`}},setup(t){return(n,r)=>(o(),c(`nav`,{"aria-label":v(T)(`Breadcrumbs`)},[C(`ul`,ue,[(o(!0),c(h,null,w(t.items,(n,r)=>(o(),c(`li`,{key:r,class:d({"breadcrumb-item":!0,"breadcrumb-item--active":r===t.items.length-1})},[n.url?(o(),p(E,{key:0,href:n.url},{default:i(()=>[x(e(n.label),1)]),_:2},1032,[`href`])):(o(),c(h,{key:1},[x(e(n.label),1)],64)),r(o(),p(O,null,{default:i(()=>[v(n)?(o(),c(`div`,pe,e(v(n)),1)):S(``,!0)]),_:1}))}}),he={class:`cp`},ge={class:`cp__header`},_e=[`href`],ve={class:`flex gap-2 p-2`},ye=[`name`,`label`],be={icon:``,appearance:`plain`},xe=[`label`],Se={key:0,variant:`danger`,rounded:`none`},Ce={key:1,variant:`success`,rounded:`none`},we={class:`cp__sidebar`},Te={class:`cp__main`},Ee={key:0,class:`px-4 py-2 border-b border-b-neutral-border-quiet`},De={id:`main`,tabindex:`-1`},$={class:`index-grid index-grid--header`},Oe={class:`index-grid__aside`},ke={class:`text-xl`},Ae={class:`index-grid__main`},je={class:`cp__footer`},Me={key:0,class:`fixed bottom-2 right-2 flex gap-2 justify-end items-center p-2`},Ne={class:`bg-blue-50 border border-blue-500 py-1 px-4 rounded`},Pe=[`label`],Fe=[`label`],Ie=y(n({__name:`AppLayout`,props:{title:{},debug:{},fullWidth:{type:Boolean,default:!1},additionalSkipLinks:{}},setup(n){m(e=>({c87de578:W.value}));let i=n,{system:s}=j(),{messages:u}=D(),y=_(),x=b(()=>y.props.flash?.error??u.value.error??null),E=b(()=>y.props.flash?.success??u.value.success??null),O=b(()=>y.props.crumbs??null),M=b(()=>[{label:T(`Skip to main section`),url:`#main`},...i.additionalSkipLinks??[]]),N=r(`sidebarToggle`),{announcement:P,announce:I}=A(),L=b(()=>{let e=i.title?.trim();return e?`${e} - ${s.name}`:s.name});a(E,e=>I(e)),a(x,e=>I(e));let R=ee({sidebar:{mode:`floating`,visibility:`hidden`}}),z=te(`(min-width: 1024px)`),B=g(!1);a(z,e=>{e?(R.sidebar.mode=`docked`,R.sidebar.visibility=`visible`):(R.sidebar.mode=`floating`,R.sidebar.visibility=`hidden`)},{immediate:!0});function V(){R.sidebar.visibility===`visible`?R.sidebar.visibility=`hidden`:R.sidebar.visibility=`visible`}function H(){R.sidebar.visibility=`hidden`,N.value.focus()}let U=b(()=>R.sidebar.visibility===`visible`?`x`:`bars`),W=b(()=>R.sidebar.mode===`docked`?R.sidebar.visibility===`visible`?`var(--global-sidebar-width)`:`0`:`auto`);return(r,i)=>(o(),c(h,null,[l(v(f),{title:L.value},null,8,[`title`]),l(me,{debug:!0}),C(`div`,he,[C(`header`,ge,[(o(!0),c(h,null,w(M.value,t=>(o(),c(`a`,{key:t.url,href:t.url,class:`skip-link skip-link--global`},e(t.label),9,_e))),128)),C(`div`,ve,[v(z)?S(``,!0):(o(),c(`craft-button`,{key:0,icon:``,type:`button`,appearance:`plain`,onClick:V,ref_key:`sidebarToggle`,ref:N},[C(`craft-icon`,{name:U.value,label:v(T)(`Toggle menu`)},null,8,ye)],512)),v(z)?(o(),p(F,{key:1})):S(``,!0),i[2]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,be,[C(`craft-icon`,{name:`search`,label:v(T)(`Search`)},null,8,xe)])]),x.value?(o(),c(`craft-callout`,Se,e(x.value),1)):S(``,!0),E.value?(o(),c(`craft-callout`,Ce,e(E.value),1)):S(``,!0)]),C(`div`,we,[l(ce,{mode:R.sidebar.mode,visibility:R.sidebar.visibility,onClose:H},null,8,[`mode`,`visibility`])]),C(`div`,Te,[t(r.$slots,`main`,{},()=>[t(r.$slots,`breadcrumbs`,{},()=>[O.value?(o(),c(`div`,Ee,[l(fe,{items:O.value},null,8,[`items`])])):S(``,!0)],!0),C(`main`,De,[t(r.$slots,`header`,{},()=>[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[C(`div`,$,[C(`div`,Oe,[t(r.$slots,`title`,{},()=>[C(`h1`,ke,e(n.title),1)],!0),t(r.$slots,`title-badge`,{},void 0,!0)]),C(`div`,Ae,[t(r.$slots,`actions`,{},void 0,!0)])])],2)],!0),C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`default`,{},void 0,!0)],2)])],!0)]),C(`div`,je,[C(`footer`,null,[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`footer`,{},void 0,!0)],2)])])]),n.debug?(o(),c(`div`,Me,[C(`div`,Ne,e(v(P)??`No announcement`),1),C(`div`,null,[B.value?(o(),p(k,{key:0,data:n.debug,class:`max-h-[50vh] max-w-[600px] overflow-scroll absolute transform -translate-full`},null,8,[`data`])):S(``,!0),B.value?(o(),c(`craft-button`,{key:1,icon:``,type:`button`,onClick:i[0]||=e=>B.value=!1},[C(`craft-icon`,{label:v(T)(`Close Debug panel`),name:`x`},null,8,Pe)])):(o(),c(`craft-button`,{key:2,type:`button`,onClick:i[1]||=e=>B.value=!0,icon:``},[C(`craft-icon`,{name:`code`,label:v(T)(`Show debug variables`)},null,8,Fe)]))])])):S(``,!0)],64))}}),[[`__scopeId`,`data-v-af8bc5be`]]);export{Ie as t}; \ No newline at end of file diff --git a/resources/build/InputCombobox.js b/resources/build/InputCombobox.js index ff3dc4278d0..6b05f182b62 100644 --- a/resources/build/InputCombobox.js +++ b/resources/build/InputCombobox.js @@ -1,4 +1,4 @@ import{$ as e,B as t,E as n,F as r,G as i,I as a,J as o,K as s,L as c,P as l,Q as u,R as d,S as f,T as p,X as m,_ as h,at as g,b as _,ct as v,h as y,it as b,j as x,k as S,lt as C,nt as w,ot as T,q as E,rt as D,t as O,v as k,w as A,x as j,y as M,z as N}from"./_plugin-vue_export-helper.js";import{a as ee,c as P,d as te,f as F,i as ne,l as I,m as L,n as R,o as z,p as B,r as V,s as re,t as H,u as U}from"./keyboard.js";function W(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o;n.key&&n.debug?.call(n)&&(o=Date.now());let s=e();if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug?.call(n)&&(c=Date.now()),i=t(...s),n.key&&n.debug?.call(n)){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length{r=e},o}function ie(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var ae=(e,t)=>Math.abs(e-t)<1.01,oe=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},se=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},ce=e=>e,le=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},ue=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(se(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(se(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},de={passive:!0},fe=typeof window>`u`?!0:`onscrollend`in window,pe=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&fe?()=>void 0:oe(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,de);let l=e.options.useScrollendEvent&&fe;return l&&n.addEventListener(`scrollend`,c,de),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},me=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},he=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},ge=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ce,rangeExtractor:le,onChange:()=>{},measureElement:me,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=W(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.ende.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=W(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=W(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=W(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=W(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;let i=r.key,a=this.elementsCache.get(i);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=W(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;rthis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return ie(t[_e(0,t.length-1,e=>ie(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let r=this.getSize(),i=this.getScrollOffset();if(t===`auto`)if(n.end>=i+r-this.options.scrollPaddingEnd)t=`end`;else if(n.start<=i+this.options.scrollPaddingStart)t=`start`;else return[i,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t=`start`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t=`auto`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let r=0,i=t=>{if(!this.targetWindow)return;let r=this.getOffsetForIndex(e,t);if(!r){console.warn(`Failed to get offset for index:`,e);return}let[i,o]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{let t=()=>{if(this.currentScrollToIndex!==e)return;let t=this.getScrollOffset(),n=this.getOffsetForIndex(e,o);if(!n){console.warn(`Failed to get offset for index:`,e);return}ae(n[0],t)||a(o)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},a=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(r++,r<10?this.targetWindow.requestAnimationFrame(()=>i(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};i(t)},this.scrollBy=(e,{behavior:t}={})=>{t===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}},_e=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(ar)t=i-1;else return i}return e>0?e-1:0};function ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=_e(0,i,a,n),s=o;if(r===1)for(;s1){let a=Array(r).fill(0);for(;se=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function ye(e){let t=new ge(C(e)),n=g(t),r=t._didMount();return s(()=>C(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),s(()=>C(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var i;v(n),(i=e.onChange)==null||i.call(e,t,r)}}),t._willUpdate(),v(n)},{immediate:!0}),w(r),n}function be(e){return ye(k(()=>({observeElementRect:ue,observeElementOffset:pe,scrollToFn:he,...C(e)})))}function xe(e,t,n){let r=b(n?.value),i=k(()=>e.value!==void 0);return[k(()=>i.value?e.value:r.value),function(e){return i.value||(r.value=e),t?.(e)}]}function Se(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function G(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...e)})},setTimeout(...e){let n=setTimeout(...e);t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return Se(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=G();return e(t),this.add(()=>t.dispose())},add(t){return e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function Ce(){let e=G();return a(()=>e.dispose()),e}function we(){let e=Ce();return t=>{e.dispose(),e.nextFrame(t)}}var Te=Object.defineProperty,Ee=(e,t,n)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,De=(e,t,n)=>(Ee(e,typeof t==`symbol`?t:t+``,n),n),K=new class{constructor(){De(this,`current`,this.detect()),De(this,`currentId`,0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}};function Oe(e){if(K.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty(`value`)){let t=B(e);if(t)return t.ownerDocument}return document}var ke=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),Ae=(e=>(e[e.First=1]=`First`,e[e.Previous=2]=`Previous`,e[e.Next=4]=`Next`,e[e.Last=8]=`Last`,e[e.WrapAround=16]=`WrapAround`,e[e.NoScroll=32]=`NoScroll`,e))(Ae||{}),je=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(je||{}),Me=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(Me||{}),Ne=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(Ne||{});function Pe(e,t=0){return e===Oe(e)?.body?!1:F(t,{0(){return e.matches(ke)},1(){let t=e;for(;t!==null;){if(t.matches(ke))return!0;t=t.parentElement}return!1}})}var Fe=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(Fe||{});typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=``)},!0),document.addEventListener(`click`,e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=``)},!0)),[`textarea`,`input`].join(`,`);function Ie(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Le(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Re(){return/Android/gi.test(window.navigator.userAgent)}function ze(){return Le()||Re()}function q(e,t,n){K.isServer||E(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Be(e,t,n){K.isServer||E(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function Ve(e,t,n=k(()=>!0)){function r(r,i){if(!n.value||r.defaultPrevented)return;let a=i(r);if(a===null||!a.getRootNode().contains(a))return;let o=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e);for(let e of o){if(e===null)continue;let t=e instanceof HTMLElement?e:B(e);if(t!=null&&t.contains(a)||r.composed&&r.composedPath().includes(t))return}return!Pe(a,Ne.Loose)&&a.tabIndex!==-1&&r.preventDefault(),t(r,a)}let i=b(null);q(`pointerdown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`mousedown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`click`,e=>{ze()||(i.value&&=(r(e,()=>i.value),null))},!0),q(`touchend`,e=>r(e,()=>e.target instanceof HTMLElement?e.target:null),!0),Be(`blur`,e=>r(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function He(e){return[e.screenX,e.screenY]}function Ue(){let e=b([-1,-1]);return{wasMoved(t){let n=He(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=He(t)}}}function We({container:e,accept:t,walk:n,enabled:r}){E(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let a=Oe(e);if(!a)return;let o=Object.assign(e=>t(e),{acceptNode:t}),s=a.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,o,!1);for(;s.nextNode();)n(s.currentNode)})}var Ge=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(Ge||{}),Ke=n({name:`Hidden`,props:{as:{type:[Object,String],default:`div`},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e;return z({ourProps:{"aria-hidden":(r&2)==2?!0:i[`aria-hidden`]??void 0,hidden:(r&4)==4?!0:void 0,style:{position:`fixed`,top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,...(r&4)==4&&(r&2)!=2&&{display:`none`}}},theirProps:i,slot:{},attrs:n,slots:t,name:`Hidden`})}}}),qe=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(qe||{});function Je(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var J=[];Je(()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&J[0]!==e.target&&(J.unshift(e.target),J=J.filter(e=>e!=null&&e.isConnected),J.splice(10))}window.addEventListener(`click`,e,{capture:!0}),window.addEventListener(`mousedown`,e,{capture:!0}),window.addEventListener(`focus`,e,{capture:!0}),document.body.addEventListener(`click`,e,{capture:!0}),document.body.addEventListener(`mousedown`,e,{capture:!0}),document.body.addEventListener(`focus`,e,{capture:!0})});function Ye(e){throw Error(`Unexpected object: `+e)}var Y=(e=>(e[e.First=0]=`First`,e[e.Previous=1]=`Previous`,e[e.Next=2]=`Next`,e[e.Last=3]=`Last`,e[e.Specific=4]=`Specific`,e[e.Nothing=5]=`Nothing`,e))(Y||{});function Xe(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(tt||{}),nt=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(nt||{}),rt=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Focus=1]=`Focus`,e[e.Other=2]=`Other`,e))(rt||{}),it=Symbol(`ComboboxContext`);function X(e){let t=x(it,null);if(t===null){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,X),t}return t}var at=Symbol(`VirtualContext`),ot=n({name:`VirtualProvider`,setup(e,{slots:t}){let n=X(`VirtualProvider`),r=k(()=>{let e=B(n.optionsRef);if(!e)return{start:0,end:0};let t=window.getComputedStyle(e);return{start:parseFloat(t.paddingBlockStart||t.paddingTop),end:parseFloat(t.paddingBlockEnd||t.paddingBottom)}}),i=be(k(()=>({scrollPaddingStart:r.value.start,scrollPaddingEnd:r.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return B(n.optionsRef)},overscan:12}))),a=k(()=>n.virtual.value?.options),o=b(0);return s([a],()=>{o.value+=1}),d(at,n.virtual.value?i:null),()=>[S(`div`,{style:{position:`relative`,width:`100%`,height:`${i.value.getTotalSize()}px`},ref:e=>{if(e){if(typeof process<`u`&&{}.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&i.value.scrollToIndex(n.activeOptionIndex.value)}}},i.value.getVirtualItems().map(e=>h(t.default({option:n.virtual.value.options[e.index],open:n.comboboxState.value===0})[0],{key:`${o.value}-${e.index}`,"data-index":e.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":e.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,overflowAnchor:`none`}})))]}}),st=n({name:`Combobox`,emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:`template`},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:i}){let a=b(1),o=b(null),c=b(null),l=b(null),u=b(null),f=b({static:!1,hold:!1}),p=b([]),m=b(null),h=b(2),g=b(!1);function _(e=e=>e){let t=m.value===null?null:p.value[m.value],n=e(p.value.slice()),r=n.length>0&&n[0].dataRef.order.value!==null?n.sort((e,t)=>e.dataRef.order.value-t.dataRef.order.value):Ie(n,e=>B(e.dataRef.domRef)),i=t?r.indexOf(t):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let v=k(()=>+!!e.multiple),x=k(()=>e.nullable),[C,w]=xe(k(()=>e.modelValue),e=>i(`update:modelValue`,e),k(()=>e.defaultValue)),E=k(()=>C.value===void 0?F(v.value,{1:[],0:void 0}):C.value),O=null,A=null;function j(e){return F(v.value,{0(){return w?.(e)},1:()=>{let t=T(M.value.value).slice(),n=T(e),r=t.findIndex(e=>M.compare(n,T(e)));return r===-1?t.push(n):t.splice(r,1),w?.(t)}})}s([k(()=>{})],([e],[t])=>{if(M.virtual.value&&e&&t&&m.value!==null){let n=e.indexOf(t[m.value]);n===-1?m.value=null:m.value=n}});let M={comboboxState:a,value:E,mode:v,compare(t,n){if(typeof e.by==`string`){let r=e.by;return t?.[r]===n?.[r]}return e.by===null?et(t,n):e.by(t,n)},calculateIndex(t){return M.virtual.value?e.by===null?M.virtual.value.options.indexOf(t):M.virtual.value.options.findIndex(e=>M.compare(e,t)):p.value.findIndex(e=>M.compare(e.dataRef.value,t))},defaultValue:k(()=>e.defaultValue),nullable:x,immediate:k(()=>!1),virtual:k(()=>null),inputRef:c,labelRef:o,buttonRef:l,optionsRef:u,disabled:k(()=>e.disabled),options:p,change(e){w(e)},activeOptionIndex:k(()=>{if(g.value&&m.value===null&&(M.virtual.value?M.virtual.value.options.length>0:p.value.length>0)){if(M.virtual.value){let e=M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))});if(e!==-1)return e}let e=p.value.findIndex(e=>!e.dataRef.disabled);if(e!==-1)return e}return m.value}),activationTrigger:h,optionsPropsRef:f,closeCombobox(){g.value=!1,!e.disabled&&a.value!==1&&(a.value=1,m.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&a.value!==0){if(M.value.value){let e=M.calculateIndex(M.value.value);e!==-1&&(m.value=e)}a.value=0}},setActivationTrigger(e){h.value=e},goToOption(t,n,r){g.value=!1,O!==null&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{if(e.disabled||u.value&&!f.value.static&&a.value===1)return;if(M.virtual.value){m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>M.virtual.value.options,resolveActiveIndex:()=>M.activeOptionIndex.value??M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))})??null,resolveDisabled:e=>M.virtual.value.disabled(e),resolveId(){throw Error(`Function not implemented.`)}}),h.value=r??2;return}let i=_();if(i.activeOptionIndex===null){let e=i.options.findIndex(e=>!e.dataRef.disabled);e!==-1&&(i.activeOptionIndex=e)}m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.disabled}),h.value=r??2,p.value=i.options})},selectOption(e){let t=p.value.find(t=>t.id===e);if(!t)return;let{dataRef:n}=t;j(n.value)},selectActiveOption(){if(M.activeOptionIndex.value!==null){if(M.virtual.value)j(M.virtual.value.options[M.activeOptionIndex.value]);else{let{dataRef:e}=p.value[M.activeOptionIndex.value];j(e.value)}M.goToOption(Y.Specific,M.activeOptionIndex.value)}},registerOption(e,t){let n=D({id:e,dataRef:t});if(M.virtual.value){p.value.push(n);return}A&&cancelAnimationFrame(A);let r=_(e=>(e.push(n),e));m.value===null&&M.isSelected(t.value.value)&&(r.activeOptionIndex=r.options.indexOf(n)),p.value=r.options,m.value=r.activeOptionIndex,h.value=2,r.options.some(e=>!B(e.dataRef.domRef))&&(A=requestAnimationFrame(()=>{let e=_();p.value=e.options,m.value=e.activeOptionIndex}))},unregisterOption(e,t){if(O!==null&&cancelAnimationFrame(O),t&&(g.value=!0),M.virtual.value){p.value=p.value.filter(t=>t.id!==e);return}let n=_(t=>{let n=t.findIndex(t=>t.id===e);return n!==-1&&t.splice(n,1),t});p.value=n.options,m.value=n.activeOptionIndex,h.value=2},isSelected(e){return F(v.value,{0:()=>M.compare(T(M.value.value),T(e)),1:()=>T(M.value.value).some(t=>M.compare(T(t),T(e)))})},isActive(e){return m.value===M.calculateIndex(e)}};Ve([c,l,u],()=>M.closeCombobox(),k(()=>a.value===0)),d(it,M),ee(k(()=>F(a.value,{0:R.Open,1:R.Closed})));let N=k(()=>B(c)?.closest(`form`));return r(()=>{s([N],()=>{if(!N.value||e.defaultValue===void 0)return;function t(){M.change(e.defaultValue)}return N.value.addEventListener(`reset`,t),()=>{var e;(e=N.value)==null||e.removeEventListener(`reset`,t)}},{immediate:!0})}),()=>{let{name:r,disabled:i,form:o,...s}=e,c={open:a.value===0,disabled:i,activeIndex:M.activeOptionIndex.value,activeOption:M.activeOptionIndex.value===null?null:M.virtual.value?M.virtual.value.options[M.activeOptionIndex.value??0]:M.options.value[M.activeOptionIndex.value]?.dataRef.value??null,value:E.value};return S(y,[...r!=null&&E.value!=null?Ze({[r]:E.value}).map(([e,t])=>S(Ke,re({features:Ge.Hidden,key:e,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,form:o,disabled:i,name:e,value:t}))):[],z({theirProps:{...n,...U(s,[`by`,`defaultValue`,`immediate`,`modelValue`,`multiple`,`nullable`,`onUpdate:modelValue`,`virtual`])},ourProps:{},slot:c,slots:t,attrs:n,name:`Combobox`})])}}});n({name:`ComboboxLabel`,props:{as:{type:[Object,String],default:`label`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){let r=e.id??`headlessui-combobox-label-${L()}`,i=X(`ComboboxLabel`);function a(){var e;(e=B(i.inputRef))==null||e.focus({preventScroll:!0})}return()=>{let o={open:i.comboboxState.value===0,disabled:i.disabled.value},{...s}=e;return z({ourProps:{id:r,ref:i.labelRef,onClick:a},theirProps:s,slot:o,attrs:t,slots:n,name:`ComboboxLabel`})}}});var ct=n({name:`ComboboxButton`,props:{as:{type:[Object,String],default:`button`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let i=e.id??`headlessui-combobox-button-${L()}`,a=X(`ComboboxButton`);r({el:a.buttonRef,$el:a.buttonRef});function o(e){a.disabled.value||(a.comboboxState.value===0?a.closeCombobox():(e.preventDefault(),a.openCombobox()),l(()=>B(a.inputRef)?.focus({preventScroll:!0})))}function s(e){switch(e.key){case H.ArrowDown:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&a.openCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.ArrowUp:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&(a.openCombobox(),l(()=>{a.value.value||a.goToOption(Y.Last)})),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.Escape:if(a.comboboxState.value!==0)return;e.preventDefault(),a.optionsRef.value&&!a.optionsPropsRef.value.static&&e.stopPropagation(),a.closeCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return}}let c=te(k(()=>({as:e.as,type:t.type})),a.buttonRef);return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value,value:a.value.value},{...l}=e;return z({ourProps:{ref:a.buttonRef,id:i,type:c.value,tabindex:`-1`,"aria-haspopup":`listbox`,"aria-controls":B(a.optionsRef)?.id,"aria-expanded":a.comboboxState.value===0,"aria-labelledby":a.labelRef.value?[B(a.labelRef)?.id,i].join(` `):void 0,disabled:a.disabled.value===!0?!0:void 0,onKeydown:s,onClick:o},theirProps:l,slot:r,attrs:t,slots:n,name:`ComboboxButton`})}}}),lt=n({name:`ComboboxInput`,props:{as:{type:[Object,String],default:`input`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:a}){let o=e.id??`headlessui-combobox-input-${L()}`,c=X(`ComboboxInput`),u=k(()=>Oe(B(c.inputRef))),d={value:!1};a({el:c.inputRef,$el:c.inputRef});function f(){c.change(null);let e=B(c.optionsRef);e&&(e.scrollTop=0),c.goToOption(Y.Nothing)}let p=k(()=>{let t=c.value.value;return B(c.inputRef)?e.displayValue!==void 0&&t!==void 0?e.displayValue(t)??``:typeof t==`string`?t:``:``});r(()=>{s([p,c.comboboxState,u],([e,t],[n,r])=>{if(d.value)return;let i=B(c.inputRef);i&&((r===0&&t===1||e!==n)&&(i.value=e),requestAnimationFrame(()=>{if(d.value||!i||u.value?.activeElement!==i)return;let{selectionStart:e,selectionEnd:t}=i;Math.abs((t??0)-(e??0))===0&&e===0&&i.setSelectionRange(i.value.length,i.value.length)}))},{immediate:!0}),s([c.comboboxState],([e],[t])=>{if(e===0&&t===1){if(d.value)return;let e=B(c.inputRef);if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:i}=e;e.value=``,e.value=t,i===null?e.setSelectionRange(n,r):e.setSelectionRange(n,r,i)}})});let m=b(!1);function h(){m.value=!0}function g(){G().nextFrame(()=>{m.value=!1})}let _=we();function v(e){switch(d.value=!0,_(()=>{d.value=!1}),e.key){case H.Enter:if(d.value=!1,c.comboboxState.value!==0||m.value)return;if(e.preventDefault(),e.stopPropagation(),c.activeOptionIndex.value===null){c.closeCombobox();return}c.selectActiveOption(),c.mode.value===0&&c.closeCombobox();break;case H.ArrowDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Next),1:()=>c.openCombobox()});case H.ArrowUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Previous),1:()=>{c.openCombobox(),l(()=>{c.value.value||c.goToOption(Y.Last)})}});case H.Home:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.PageUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.End:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.PageDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.Escape:if(d.value=!1,c.comboboxState.value!==0)return;e.preventDefault(),c.optionsRef.value&&!c.optionsPropsRef.value.static&&e.stopPropagation(),c.nullable.value&&c.mode.value===0&&c.value.value===null&&f(),c.closeCombobox();break;case H.Tab:if(d.value=!1,c.comboboxState.value!==0)return;c.mode.value===0&&c.activationTrigger.value!==1&&c.selectActiveOption(),c.closeCombobox();break}}function y(e){t(`change`,e),c.nullable.value&&c.mode.value===0&&e.target.value===``&&f(),c.openCombobox()}function x(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);if(d.value=!1,!((t=B(c.optionsRef))!=null&&t.contains(r))&&!((n=B(c.buttonRef))!=null&&n.contains(r))&&c.comboboxState.value===0)return e.preventDefault(),c.mode.value===0&&(c.nullable.value&&c.value.value===null?f():c.activationTrigger.value!==1&&c.selectActiveOption()),c.closeCombobox()}function S(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);(t=B(c.buttonRef))!=null&&t.contains(r)||(n=B(c.optionsRef))!=null&&n.contains(r)||c.disabled.value||c.immediate.value&&c.comboboxState.value!==0&&(c.openCombobox(),G().nextFrame(()=>{c.setActivationTrigger(1)}))}let C=k(()=>e.defaultValue??(c.defaultValue.value===void 0?null:e.displayValue?.call(e,c.defaultValue.value))??c.defaultValue.value??``);return()=>{let t={open:c.comboboxState.value===0},{displayValue:r,onChange:a,...s}=e;return z({ourProps:{"aria-controls":c.optionsRef.value?.id,"aria-expanded":c.comboboxState.value===0,"aria-activedescendant":c.activeOptionIndex.value===null?void 0:c.virtual.value?c.options.value.find(e=>!c.virtual.value.disabled(e.dataRef.value)&&c.compare(e.dataRef.value,c.virtual.value.options[c.activeOptionIndex.value]))?.id:c.options.value[c.activeOptionIndex.value]?.id,"aria-labelledby":B(c.labelRef)?.id??B(c.buttonRef)?.id,"aria-autocomplete":`list`,id:o,onCompositionstart:h,onCompositionend:g,onKeydown:v,onInput:y,onFocus:S,onBlur:x,role:`combobox`,type:n.type??`text`,tabIndex:0,ref:c.inputRef,defaultValue:C.value,disabled:c.disabled.value===!0?!0:void 0},theirProps:s,slot:t,attrs:n,slots:i,features:P.RenderStrategy|P.Static,name:`ComboboxInput`})}}}),ut=n({name:`ComboboxOptions`,props:{as:{type:[Object,String],default:`ul`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:r}){let i=X(`ComboboxOptions`),a=`headlessui-combobox-options-${L()}`;r({el:i.optionsRef,$el:i.optionsRef}),E(()=>{i.optionsPropsRef.value.static=e.static}),E(()=>{i.optionsPropsRef.value.hold=e.hold});let o=V(),s=k(()=>o===null?i.comboboxState.value===0:(o.value&R.Open)===R.Open);We({container:k(()=>B(i.optionsRef)),enabled:k(()=>i.comboboxState.value===0),accept(e){return e.getAttribute(`role`)===`option`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});function c(e){e.preventDefault()}return()=>{let r={open:i.comboboxState.value===0};return z({ourProps:{"aria-labelledby":B(i.labelRef)?.id??B(i.buttonRef)?.id,id:a,ref:i.optionsRef,role:`listbox`,"aria-multiselectable":i.mode.value===1?!0:void 0,onMousedown:c},theirProps:U(e,[`hold`]),slot:r,attrs:t,slots:i.virtual.value&&i.comboboxState.value===0?{...n,default:()=>[S(ot,{},n.default)]}:n,features:P.RenderStrategy|P.Static,visible:s.value,name:`ComboboxOptions`})}}}),dt=n({name:`ComboboxOption`,props:{as:{type:[Object,String],default:`li`},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:n,expose:i}){let o=X(`ComboboxOption`),s=`headlessui-combobox-option-${L()}`,c=b(null),u=k(()=>e.disabled);i({el:c,$el:c});let d=k(()=>o.virtual.value?o.activeOptionIndex.value===o.calculateIndex(e.value):o.activeOptionIndex.value===null?!1:o.options.value[o.activeOptionIndex.value]?.id===s),f=k(()=>o.isSelected(e.value)),p=x(at,null),m=k(()=>({disabled:e.disabled,value:e.value,domRef:c,order:k(()=>e.order)}));r(()=>o.registerOption(s,m)),a(()=>o.unregisterOption(s,d.value)),E(()=>{let e=B(c);e&&p?.value.measureElement(e)}),E(()=>{o.comboboxState.value===0&&d.value&&(o.virtual.value||o.activationTrigger.value!==0&&l(()=>{var e;return((e=B(c))?.scrollIntoView)?.call(e,{block:`nearest`})}))});function h(e){e.preventDefault(),e.button===qe.Left&&(u.value||(o.selectOption(s),ze()||requestAnimationFrame(()=>B(o.inputRef)?.focus({preventScroll:!0})),o.mode.value===0&&o.closeCombobox()))}function g(){var t;if(e.disabled||(t=o.virtual.value)!=null&&t.disabled(e.value))return o.goToOption(Y.Nothing);let n=o.calculateIndex(e.value);o.goToOption(Y.Specific,n)}let _=Ue();function v(e){_.update(e)}function y(t){var n;if(!_.wasMoved(t)||e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value)return;let r=o.calculateIndex(e.value);o.goToOption(Y.Specific,r,0)}function S(t){var n;_.wasMoved(t)&&(e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value&&(o.optionsPropsRef.value.hold||o.goToOption(Y.Nothing)))}return()=>{let{disabled:r}=e,i={active:d.value,selected:f.value,disabled:r};return z({ourProps:{id:s,ref:c,role:`option`,tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,"aria-selected":f.value,disabled:void 0,onMousedown:h,onFocus:g,onPointerenter:v,onMouseenter:v,onPointermove:y,onMousemove:y,onPointerleave:S,onMouseleave:S},theirProps:U(e,[`order`,`value`]),slot:i,attrs:n,slots:t,name:`ComboboxOption`})}}});function ft(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function pt(e,...t){e&&t.length>0&&e.classList.add(...t)}function Z(e,...t){e&&t.length>0&&e.classList.remove(...t)}var mt=(e=>(e.Finished=`finished`,e.Cancelled=`cancelled`,e))(mt||{});function ht(e,t){let n=G();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(e=>{let[t=0]=e.split(`,`).filter(Boolean).map(e=>e.includes(`ms`)?parseFloat(e):parseFloat(e)*1e3).sort((e,t)=>t-e);return t});return a===0?t(`finished`):n.setTimeout(()=>t(`finished`),a+o),n.add(()=>t(`cancelled`)),n.dispose}function gt(e,t,n,r,i,a){let o=G(),s=a===void 0?()=>{}:ft(a);return Z(e,...i),pt(e,...t,...n),o.nextFrame(()=>{Z(e,...n),pt(e,...r),o.add(ht(e,n=>(Z(e,...r,...t),pt(e,...i),s(n))))}),o.add(()=>Z(e,...t,...n,...r,...i)),o.add(()=>s(`cancelled`)),o.dispose}function Q(e=``){return e.split(/\s+/).filter(e=>e.length>1)}var _t=Symbol(`TransitionContext`),vt=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(vt||{});function yt(){return x(_t,null)!==null}function bt(){let e=x(_t,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}function xt(){let e=x(St,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}var St=Symbol(`NestingContext`);function $(e){return`children`in e?$(e.children):e.value.filter(({state:e})=>e===`visible`).length>0}function Ct(e){let t=b([]),n=b(!1);r(()=>n.value=!0),a(()=>n.value=!1);function i(r,i=I.Hidden){let a=t.value.findIndex(({id:e})=>e===r);a!==-1&&(F(i,{[I.Unmount](){t.value.splice(a,1)},[I.Hidden](){t.value[a].state=`hidden`}}),!$(t)&&n.value&&e?.())}function o(e){let n=t.value.find(({id:t})=>t===e);return n?n.state!==`visible`&&(n.state=`visible`):t.value.push({id:e,state:`visible`}),()=>i(e,I.Unmount)}return{children:t,register:o,unregister:i}}var wt=P.RenderStrategy,Tt=n({props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:o}){let c=b(0);function l(){c.value|=R.Opening,t(`beforeEnter`)}function u(){c.value&=~R.Opening,t(`afterEnter`)}function f(){c.value|=R.Closing,t(`beforeLeave`)}function p(){c.value&=~R.Closing,t(`afterLeave`)}if(!yt()&&ne())return()=>S(Et,{...e,onBeforeEnter:l,onAfterEnter:u,onBeforeLeave:f,onAfterLeave:p},i);let h=b(null),g=k(()=>e.unmount?I.Unmount:I.Hidden);o({el:h,$el:h});let{show:_,appear:v}=bt(),{register:y,unregister:x}=xt(),C=b(_.value?`visible`:`hidden`),w={value:!0},T=L(),D={value:!1},O=Ct(()=>{!D.value&&C.value!==`hidden`&&(C.value=`hidden`,x(T),p())});r(()=>{a(y(T))}),E(()=>{if(g.value===I.Hidden&&T){if(_.value&&C.value!==`visible`){C.value=`visible`;return}F(C.value,{hidden:()=>x(T),visible:()=>y(T)})}});let A=Q(e.enter),j=Q(e.enterFrom),M=Q(e.enterTo),N=Q(e.entered),P=Q(e.leave),te=Q(e.leaveFrom),V=Q(e.leaveTo);r(()=>{E(()=>{if(C.value===`visible`){let e=B(h);if(e instanceof Comment&&e.data===``)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function re(e){let t=w.value&&!v.value,n=B(h);!n||!(n instanceof HTMLElement)||t||(D.value=!0,_.value&&l(),_.value||f(),e(_.value?gt(n,A,j,M,N,e=>{D.value=!1,e===mt.Finished&&u()}):gt(n,P,te,V,N,e=>{D.value=!1,e===mt.Finished&&($(O)||(C.value=`hidden`,x(T),p()))})))}return r(()=>{s([_],(e,t,n)=>{re(n),w.value=!1},{immediate:!0})}),d(St,O),ee(k(()=>F(C.value,{visible:R.Open,hidden:R.Closed})|c.value)),()=>{let{appear:t,show:r,enter:a,enterFrom:o,enterTo:s,entered:c,leave:l,leaveFrom:u,leaveTo:d,...f}=e,p={ref:h};return z({theirProps:{...f,...v.value&&_.value&&K.isServer?{class:m([n.class,f.class,...A,...j])}:{}},ourProps:p,slot:{},slots:i,attrs:n,features:wt,visible:C.value===`visible`,name:`TransitionChild`})}}}),Et=n({inheritAttrs:!1,props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i}){let a=V(),o=k(()=>e.show===null&&a!==null?(a.value&R.Open)===R.Open:e.show);E(()=>{if(![!0,!1].includes(o.value))throw Error('A is used but it is missing a `:show="true | false"` prop.')});let s=b(o.value?`visible`:`hidden`),c=Ct(()=>{s.value=`hidden`}),l=b(!0),u={show:o,appear:k(()=>e.appear||!l.value)};return r(()=>{E(()=>{l.value=!1,o.value?s.value=`visible`:$(c)||(s.value=`hidden`)})}),d(St,c),d(_t,u),()=>{let r=U(e,[`show`,`appear`,`unmount`,`onBeforeEnter`,`onBeforeLeave`,`onAfterEnter`,`onAfterLeave`]),a={unmount:e.unmount};return z({ourProps:{...a,as:`template`},theirProps:{},slot:{},slots:{...i,default:()=>[S(Tt,{onBeforeEnter:()=>t(`beforeEnter`),onAfterEnter:()=>t(`afterEnter`),onBeforeLeave:()=>t(`beforeLeave`),onAfterLeave:()=>t(`afterLeave`),...n,...a,...r},i.default)]},attrs:{},features:wt,visible:s.value===`visible`,name:`Transition`})}}}),Dt=[`active`,`checked`,`hint`],Ot={key:0},kt=n({__name:`InputComboboxOption`,props:{option:{}},setup(n){return(r,i)=>(c(),_(C(dt),{value:n.option,as:`template`},{default:o(({active:i,selected:a})=>[t(r.$slots,`option`,{option:n.option,active:i,selected:a},()=>[M(`craft-option`,{active:i,checked:a,hint:n.option.data?.hint},[n.option.label.startsWith(`$`)||n.option.label.startsWith(`@`)?(c(),f(`code`,Ot,e(n.option.label),1)):(c(),f(y,{key:1},[A(e(n.option.label),1)],64))],8,Dt)])]),_:3},8,[`value`]))}}),At={key:1},jt={class:`group-label`},Mt=O(n({__name:`InputCombobox`,props:{label:{},options:{default:()=>[]},modelValue:{default:``},requireOptionMatch:{type:Boolean,default:!1},transformModelValue:{type:Function,default:e=>e?e.value:``},class:{type:[Boolean,null,String,Object,Array]},placeholder:{}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,a=t,s=k({get(){let e=null;return a.options.forEach(t=>{t.type===`optgroup`?t.options.forEach(t=>{t.value===a.modelValue&&(e=t)}):t.value===a.modelValue&&(e=t)}),!e&&!a.requireOptionMatch&&(e={label:a.modelValue,value:a.modelValue}),e},set(e){r(`update:modelValue`,a.transformModelValue(e))}}),l=i(`reference`),d=b(a.modelValue??``),h=k(()=>l.value?.getBoundingClientRect()||new DOMRect);function g(e,t){let n=C(e).toLowerCase(),r=C(t);return r.label.toLowerCase().includes(n)||r.value.toLowerCase().includes(n)||(r.data?.keywords?.toLowerCase().includes(n)??!1)}function v(e,t){return C(t).map(t=>{if(t.type===`optgroup`){let n=t.options.filter(t=>g(e,t));return n.length>0?{...t,options:n}:null}return g(e,t)?t:null}).filter(e=>e!==null)}let x=k(()=>d.value===``?a.options:v(d,a.options));function S(e){return e?e.label:``}let w=k(()=>[``,`@`,`$`].includes(d.value)?null:{value:d.value,label:d.value});return(n,r)=>(c(),f(`div`,{class:`relative`,ref_key:`reference`,ref:l},[p(C(st),{modelValue:s.value,"onUpdate:modelValue":r[2]||=e=>s.value=e},{default:o(()=>[p(C(lt),{onChange:r[0]||=e=>d.value=e.target.value,class:m([`input`,a.class]),displayValue:S,placeholder:t.placeholder},null,8,[`class`,`placeholder`]),p(C(ct),{class:`absolute inset-y-1 right-1 flex items-center`,type:`button`,as:`craft-button`,appearance:`plain`,size:`small`,icon:``,"aria-label":t.label},{default:o(()=>[...r[3]||=[M(`craft-icon`,{name:`chevron-down`,style:{"font-size":`0.8em`}},null,-1)]]),_:1},8,[`aria-label`]),p(C(Et),{leave:`transition ease-in duration-100`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,onAfterLeave:r[1]||=e=>d.value=``},{default:o(()=>[p(C(ut),{class:`options`,style:u({position:`fixed`,insetInlineStart:`${h.value.left}px`,width:`${h.value.width}px`,insetBlockStart:`${h.value.bottom}px`})},{default:o(()=>[!t.requireOptionMatch&&w.value?(c(),_(kt,{key:0,option:w.value},null,8,[`option`])):x.value.length===0&&d.value!==``?(c(),f(`div`,At,` Nothing found. `)):j(``,!0),(c(!0),f(y,null,N(x.value,(t,n)=>(c(),f(y,{key:n},[t.type===`optgroup`?(c(),f(y,{key:0},[M(`div`,jt,e(t.label),1),(c(!0),f(y,null,N(t.options,(e,t)=>(c(),_(kt,{key:t,option:e},null,8,[`option`]))),128))],64)):(c(),_(kt,{key:1,option:t},null,8,[`option`]))],64))),128))]),_:1},8,[`style`])]),_:1})]),_:1},8,[`modelValue`])],512))}}),[[`__scopeId`,`data-v-edae8701`]]);export{Mt as t}; \ No newline at end of file + color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function ie(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var ae=(e,t)=>Math.abs(e-t)<1.01,oe=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},se=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},ce=e=>e,le=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},ue=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(se(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(se(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},de={passive:!0},fe=typeof window>`u`?!0:`onscrollend`in window,pe=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&fe?()=>void 0:oe(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,de);let l=e.options.useScrollendEvent&&fe;return l&&n.addEventListener(`scrollend`,c,de),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},me=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},he=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},ge=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ce,rangeExtractor:le,onChange:()=>{},measureElement:me,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=W(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.ende.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=W(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=W(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=W(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=W(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;let i=r.key,a=this.elementsCache.get(i);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=W(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;rthis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return ie(t[_e(0,t.length-1,e=>ie(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let r=this.getSize(),i=this.getScrollOffset();if(t===`auto`)if(n.end>=i+r-this.options.scrollPaddingEnd)t=`end`;else if(n.start<=i+this.options.scrollPaddingStart)t=`start`;else return[i,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t=`start`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t=`auto`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let r=0,i=t=>{if(!this.targetWindow)return;let r=this.getOffsetForIndex(e,t);if(!r){console.warn(`Failed to get offset for index:`,e);return}let[i,o]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{let t=()=>{if(this.currentScrollToIndex!==e)return;let t=this.getScrollOffset(),n=this.getOffsetForIndex(e,o);if(!n){console.warn(`Failed to get offset for index:`,e);return}ae(n[0],t)||a(o)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},a=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(r++,r<10?this.targetWindow.requestAnimationFrame(()=>i(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};i(t)},this.scrollBy=(e,{behavior:t}={})=>{t===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}},_e=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(ar)t=i-1;else return i}return e>0?e-1:0};function ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=_e(0,i,a,n),s=o;if(r===1)for(;s1){let a=Array(r).fill(0);for(;se=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function ye(e){let t=new ge(C(e)),n=g(t),r=t._didMount();return s(()=>C(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),s(()=>C(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var i;v(n),(i=e.onChange)==null||i.call(e,t,r)}}),t._willUpdate(),v(n)},{immediate:!0}),w(r),n}function be(e){return ye(k(()=>({observeElementRect:ue,observeElementOffset:pe,scrollToFn:he,...C(e)})))}function xe(e,t,n){let r=b(n?.value),i=k(()=>e.value!==void 0);return[k(()=>i.value?e.value:r.value),function(e){return i.value||(r.value=e),t?.(e)}]}function Se(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function G(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...e)})},setTimeout(...e){let n=setTimeout(...e);t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return Se(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=G();return e(t),this.add(()=>t.dispose())},add(t){return e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function Ce(){let e=G();return a(()=>e.dispose()),e}function we(){let e=Ce();return t=>{e.dispose(),e.nextFrame(t)}}var Te=Object.defineProperty,Ee=(e,t,n)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,De=(e,t,n)=>(Ee(e,typeof t==`symbol`?t:t+``,n),n),K=new class{constructor(){De(this,`current`,this.detect()),De(this,`currentId`,0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}};function Oe(e){if(K.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty(`value`)){let t=B(e);if(t)return t.ownerDocument}return document}var ke=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),Ae=(e=>(e[e.First=1]=`First`,e[e.Previous=2]=`Previous`,e[e.Next=4]=`Next`,e[e.Last=8]=`Last`,e[e.WrapAround=16]=`WrapAround`,e[e.NoScroll=32]=`NoScroll`,e))(Ae||{}),je=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(je||{}),Me=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(Me||{}),Ne=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(Ne||{});function Pe(e,t=0){return e===Oe(e)?.body?!1:F(t,{0(){return e.matches(ke)},1(){let t=e;for(;t!==null;){if(t.matches(ke))return!0;t=t.parentElement}return!1}})}var Fe=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(Fe||{});typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=``)},!0),document.addEventListener(`click`,e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=``)},!0)),[`textarea`,`input`].join(`,`);function Ie(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Le(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Re(){return/Android/gi.test(window.navigator.userAgent)}function ze(){return Le()||Re()}function q(e,t,n){K.isServer||E(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Be(e,t,n){K.isServer||E(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function Ve(e,t,n=k(()=>!0)){function r(r,i){if(!n.value||r.defaultPrevented)return;let a=i(r);if(a===null||!a.getRootNode().contains(a))return;let o=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e);for(let e of o){if(e===null)continue;let t=e instanceof HTMLElement?e:B(e);if(t!=null&&t.contains(a)||r.composed&&r.composedPath().includes(t))return}return!Pe(a,Ne.Loose)&&a.tabIndex!==-1&&r.preventDefault(),t(r,a)}let i=b(null);q(`pointerdown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`mousedown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`click`,e=>{ze()||(i.value&&=(r(e,()=>i.value),null))},!0),q(`touchend`,e=>r(e,()=>e.target instanceof HTMLElement?e.target:null),!0),Be(`blur`,e=>r(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function He(e){return[e.screenX,e.screenY]}function Ue(){let e=b([-1,-1]);return{wasMoved(t){let n=He(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=He(t)}}}function We({container:e,accept:t,walk:n,enabled:r}){E(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let a=Oe(e);if(!a)return;let o=Object.assign(e=>t(e),{acceptNode:t}),s=a.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,o,!1);for(;s.nextNode();)n(s.currentNode)})}var Ge=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(Ge||{}),Ke=n({name:`Hidden`,props:{as:{type:[Object,String],default:`div`},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e;return z({ourProps:{"aria-hidden":(r&2)==2?!0:i[`aria-hidden`]??void 0,hidden:(r&4)==4?!0:void 0,style:{position:`fixed`,top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,...(r&4)==4&&(r&2)!=2&&{display:`none`}}},theirProps:i,slot:{},attrs:n,slots:t,name:`Hidden`})}}}),qe=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(qe||{});function Je(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var J=[];Je(()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&J[0]!==e.target&&(J.unshift(e.target),J=J.filter(e=>e!=null&&e.isConnected),J.splice(10))}window.addEventListener(`click`,e,{capture:!0}),window.addEventListener(`mousedown`,e,{capture:!0}),window.addEventListener(`focus`,e,{capture:!0}),document.body.addEventListener(`click`,e,{capture:!0}),document.body.addEventListener(`mousedown`,e,{capture:!0}),document.body.addEventListener(`focus`,e,{capture:!0})});function Ye(e){throw Error(`Unexpected object: `+e)}var Y=(e=>(e[e.First=0]=`First`,e[e.Previous=1]=`Previous`,e[e.Next=2]=`Next`,e[e.Last=3]=`Last`,e[e.Specific=4]=`Specific`,e[e.Nothing=5]=`Nothing`,e))(Y||{});function Xe(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(tt||{}),nt=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(nt||{}),rt=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Focus=1]=`Focus`,e[e.Other=2]=`Other`,e))(rt||{}),it=Symbol(`ComboboxContext`);function X(e){let t=x(it,null);if(t===null){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,X),t}return t}var at=Symbol(`VirtualContext`),ot=n({name:`VirtualProvider`,setup(e,{slots:t}){let n=X(`VirtualProvider`),r=k(()=>{let e=B(n.optionsRef);if(!e)return{start:0,end:0};let t=window.getComputedStyle(e);return{start:parseFloat(t.paddingBlockStart||t.paddingTop),end:parseFloat(t.paddingBlockEnd||t.paddingBottom)}}),i=be(k(()=>({scrollPaddingStart:r.value.start,scrollPaddingEnd:r.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return B(n.optionsRef)},overscan:12}))),a=k(()=>n.virtual.value?.options),o=b(0);return s([a],()=>{o.value+=1}),d(at,n.virtual.value?i:null),()=>[S(`div`,{style:{position:`relative`,width:`100%`,height:`${i.value.getTotalSize()}px`},ref:e=>{if(e){if(typeof process<`u`&&{}.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&i.value.scrollToIndex(n.activeOptionIndex.value)}}},i.value.getVirtualItems().map(e=>h(t.default({option:n.virtual.value.options[e.index],open:n.comboboxState.value===0})[0],{key:`${o.value}-${e.index}`,"data-index":e.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":e.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,overflowAnchor:`none`}})))]}}),st=n({name:`Combobox`,emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:`template`},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:i}){let a=b(1),o=b(null),c=b(null),l=b(null),u=b(null),f=b({static:!1,hold:!1}),p=b([]),m=b(null),h=b(2),g=b(!1);function _(e=e=>e){let t=m.value===null?null:p.value[m.value],n=e(p.value.slice()),r=n.length>0&&n[0].dataRef.order.value!==null?n.sort((e,t)=>e.dataRef.order.value-t.dataRef.order.value):Ie(n,e=>B(e.dataRef.domRef)),i=t?r.indexOf(t):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let v=k(()=>+!!e.multiple),x=k(()=>e.nullable),[C,w]=xe(k(()=>e.modelValue),e=>i(`update:modelValue`,e),k(()=>e.defaultValue)),E=k(()=>C.value===void 0?F(v.value,{1:[],0:void 0}):C.value),O=null,A=null;function j(e){return F(v.value,{0(){return w?.(e)},1:()=>{let t=T(M.value.value).slice(),n=T(e),r=t.findIndex(e=>M.compare(n,T(e)));return r===-1?t.push(n):t.splice(r,1),w?.(t)}})}s([k(()=>{})],([e],[t])=>{if(M.virtual.value&&e&&t&&m.value!==null){let n=e.indexOf(t[m.value]);n===-1?m.value=null:m.value=n}});let M={comboboxState:a,value:E,mode:v,compare(t,n){if(typeof e.by==`string`){let r=e.by;return t?.[r]===n?.[r]}return e.by===null?et(t,n):e.by(t,n)},calculateIndex(t){return M.virtual.value?e.by===null?M.virtual.value.options.indexOf(t):M.virtual.value.options.findIndex(e=>M.compare(e,t)):p.value.findIndex(e=>M.compare(e.dataRef.value,t))},defaultValue:k(()=>e.defaultValue),nullable:x,immediate:k(()=>!1),virtual:k(()=>null),inputRef:c,labelRef:o,buttonRef:l,optionsRef:u,disabled:k(()=>e.disabled),options:p,change(e){w(e)},activeOptionIndex:k(()=>{if(g.value&&m.value===null&&(M.virtual.value?M.virtual.value.options.length>0:p.value.length>0)){if(M.virtual.value){let e=M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))});if(e!==-1)return e}let e=p.value.findIndex(e=>!e.dataRef.disabled);if(e!==-1)return e}return m.value}),activationTrigger:h,optionsPropsRef:f,closeCombobox(){g.value=!1,!e.disabled&&a.value!==1&&(a.value=1,m.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&a.value!==0){if(M.value.value){let e=M.calculateIndex(M.value.value);e!==-1&&(m.value=e)}a.value=0}},setActivationTrigger(e){h.value=e},goToOption(t,n,r){g.value=!1,O!==null&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{if(e.disabled||u.value&&!f.value.static&&a.value===1)return;if(M.virtual.value){m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>M.virtual.value.options,resolveActiveIndex:()=>M.activeOptionIndex.value??M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))})??null,resolveDisabled:e=>M.virtual.value.disabled(e),resolveId(){throw Error(`Function not implemented.`)}}),h.value=r??2;return}let i=_();if(i.activeOptionIndex===null){let e=i.options.findIndex(e=>!e.dataRef.disabled);e!==-1&&(i.activeOptionIndex=e)}m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.disabled}),h.value=r??2,p.value=i.options})},selectOption(e){let t=p.value.find(t=>t.id===e);if(!t)return;let{dataRef:n}=t;j(n.value)},selectActiveOption(){if(M.activeOptionIndex.value!==null){if(M.virtual.value)j(M.virtual.value.options[M.activeOptionIndex.value]);else{let{dataRef:e}=p.value[M.activeOptionIndex.value];j(e.value)}M.goToOption(Y.Specific,M.activeOptionIndex.value)}},registerOption(e,t){let n=D({id:e,dataRef:t});if(M.virtual.value){p.value.push(n);return}A&&cancelAnimationFrame(A);let r=_(e=>(e.push(n),e));m.value===null&&M.isSelected(t.value.value)&&(r.activeOptionIndex=r.options.indexOf(n)),p.value=r.options,m.value=r.activeOptionIndex,h.value=2,r.options.some(e=>!B(e.dataRef.domRef))&&(A=requestAnimationFrame(()=>{let e=_();p.value=e.options,m.value=e.activeOptionIndex}))},unregisterOption(e,t){if(O!==null&&cancelAnimationFrame(O),t&&(g.value=!0),M.virtual.value){p.value=p.value.filter(t=>t.id!==e);return}let n=_(t=>{let n=t.findIndex(t=>t.id===e);return n!==-1&&t.splice(n,1),t});p.value=n.options,m.value=n.activeOptionIndex,h.value=2},isSelected(e){return F(v.value,{0:()=>M.compare(T(M.value.value),T(e)),1:()=>T(M.value.value).some(t=>M.compare(T(t),T(e)))})},isActive(e){return m.value===M.calculateIndex(e)}};Ve([c,l,u],()=>M.closeCombobox(),k(()=>a.value===0)),d(it,M),ee(k(()=>F(a.value,{0:R.Open,1:R.Closed})));let N=k(()=>B(c)?.closest(`form`));return r(()=>{s([N],()=>{if(!N.value||e.defaultValue===void 0)return;function t(){M.change(e.defaultValue)}return N.value.addEventListener(`reset`,t),()=>{var e;(e=N.value)==null||e.removeEventListener(`reset`,t)}},{immediate:!0})}),()=>{let{name:r,disabled:i,form:o,...s}=e,c={open:a.value===0,disabled:i,activeIndex:M.activeOptionIndex.value,activeOption:M.activeOptionIndex.value===null?null:M.virtual.value?M.virtual.value.options[M.activeOptionIndex.value??0]:M.options.value[M.activeOptionIndex.value]?.dataRef.value??null,value:E.value};return S(y,[...r!=null&&E.value!=null?Ze({[r]:E.value}).map(([e,t])=>S(Ke,re({features:Ge.Hidden,key:e,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,form:o,disabled:i,name:e,value:t}))):[],z({theirProps:{...n,...U(s,[`by`,`defaultValue`,`immediate`,`modelValue`,`multiple`,`nullable`,`onUpdate:modelValue`,`virtual`])},ourProps:{},slot:c,slots:t,attrs:n,name:`Combobox`})])}}});n({name:`ComboboxLabel`,props:{as:{type:[Object,String],default:`label`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){let r=e.id??`headlessui-combobox-label-${L()}`,i=X(`ComboboxLabel`);function a(){var e;(e=B(i.inputRef))==null||e.focus({preventScroll:!0})}return()=>{let o={open:i.comboboxState.value===0,disabled:i.disabled.value},{...s}=e;return z({ourProps:{id:r,ref:i.labelRef,onClick:a},theirProps:s,slot:o,attrs:t,slots:n,name:`ComboboxLabel`})}}});var ct=n({name:`ComboboxButton`,props:{as:{type:[Object,String],default:`button`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let i=e.id??`headlessui-combobox-button-${L()}`,a=X(`ComboboxButton`);r({el:a.buttonRef,$el:a.buttonRef});function o(e){a.disabled.value||(a.comboboxState.value===0?a.closeCombobox():(e.preventDefault(),a.openCombobox()),l(()=>B(a.inputRef)?.focus({preventScroll:!0})))}function s(e){switch(e.key){case H.ArrowDown:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&a.openCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.ArrowUp:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&(a.openCombobox(),l(()=>{a.value.value||a.goToOption(Y.Last)})),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.Escape:if(a.comboboxState.value!==0)return;e.preventDefault(),a.optionsRef.value&&!a.optionsPropsRef.value.static&&e.stopPropagation(),a.closeCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return}}let c=te(k(()=>({as:e.as,type:t.type})),a.buttonRef);return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value,value:a.value.value},{...l}=e;return z({ourProps:{ref:a.buttonRef,id:i,type:c.value,tabindex:`-1`,"aria-haspopup":`listbox`,"aria-controls":B(a.optionsRef)?.id,"aria-expanded":a.comboboxState.value===0,"aria-labelledby":a.labelRef.value?[B(a.labelRef)?.id,i].join(` `):void 0,disabled:a.disabled.value===!0?!0:void 0,onKeydown:s,onClick:o},theirProps:l,slot:r,attrs:t,slots:n,name:`ComboboxButton`})}}}),lt=n({name:`ComboboxInput`,props:{as:{type:[Object,String],default:`input`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:a}){let o=e.id??`headlessui-combobox-input-${L()}`,c=X(`ComboboxInput`),u=k(()=>Oe(B(c.inputRef))),d={value:!1};a({el:c.inputRef,$el:c.inputRef});function f(){c.change(null);let e=B(c.optionsRef);e&&(e.scrollTop=0),c.goToOption(Y.Nothing)}let p=k(()=>{let t=c.value.value;return B(c.inputRef)?e.displayValue!==void 0&&t!==void 0?e.displayValue(t)??``:typeof t==`string`?t:``:``});r(()=>{s([p,c.comboboxState,u],([e,t],[n,r])=>{if(d.value)return;let i=B(c.inputRef);i&&((r===0&&t===1||e!==n)&&(i.value=e),requestAnimationFrame(()=>{if(d.value||!i||u.value?.activeElement!==i)return;let{selectionStart:e,selectionEnd:t}=i;Math.abs((t??0)-(e??0))===0&&e===0&&i.setSelectionRange(i.value.length,i.value.length)}))},{immediate:!0}),s([c.comboboxState],([e],[t])=>{if(e===0&&t===1){if(d.value)return;let e=B(c.inputRef);if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:i}=e;e.value=``,e.value=t,i===null?e.setSelectionRange(n,r):e.setSelectionRange(n,r,i)}})});let m=b(!1);function h(){m.value=!0}function g(){G().nextFrame(()=>{m.value=!1})}let _=we();function v(e){switch(d.value=!0,_(()=>{d.value=!1}),e.key){case H.Enter:if(d.value=!1,c.comboboxState.value!==0||m.value)return;if(e.preventDefault(),e.stopPropagation(),c.activeOptionIndex.value===null){c.closeCombobox();return}c.selectActiveOption(),c.mode.value===0&&c.closeCombobox();break;case H.ArrowDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Next),1:()=>c.openCombobox()});case H.ArrowUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Previous),1:()=>{c.openCombobox(),l(()=>{c.value.value||c.goToOption(Y.Last)})}});case H.Home:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.PageUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.End:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.PageDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.Escape:if(d.value=!1,c.comboboxState.value!==0)return;e.preventDefault(),c.optionsRef.value&&!c.optionsPropsRef.value.static&&e.stopPropagation(),c.nullable.value&&c.mode.value===0&&c.value.value===null&&f(),c.closeCombobox();break;case H.Tab:if(d.value=!1,c.comboboxState.value!==0)return;c.mode.value===0&&c.activationTrigger.value!==1&&c.selectActiveOption(),c.closeCombobox();break}}function y(e){t(`change`,e),c.nullable.value&&c.mode.value===0&&e.target.value===``&&f(),c.openCombobox()}function x(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);if(d.value=!1,!((t=B(c.optionsRef))!=null&&t.contains(r))&&!((n=B(c.buttonRef))!=null&&n.contains(r))&&c.comboboxState.value===0)return e.preventDefault(),c.mode.value===0&&(c.nullable.value&&c.value.value===null?f():c.activationTrigger.value!==1&&c.selectActiveOption()),c.closeCombobox()}function S(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);(t=B(c.buttonRef))!=null&&t.contains(r)||(n=B(c.optionsRef))!=null&&n.contains(r)||c.disabled.value||c.immediate.value&&c.comboboxState.value!==0&&(c.openCombobox(),G().nextFrame(()=>{c.setActivationTrigger(1)}))}let C=k(()=>e.defaultValue??(c.defaultValue.value===void 0?null:e.displayValue?.call(e,c.defaultValue.value))??c.defaultValue.value??``);return()=>{let t={open:c.comboboxState.value===0},{displayValue:r,onChange:a,...s}=e;return z({ourProps:{"aria-controls":c.optionsRef.value?.id,"aria-expanded":c.comboboxState.value===0,"aria-activedescendant":c.activeOptionIndex.value===null?void 0:c.virtual.value?c.options.value.find(e=>!c.virtual.value.disabled(e.dataRef.value)&&c.compare(e.dataRef.value,c.virtual.value.options[c.activeOptionIndex.value]))?.id:c.options.value[c.activeOptionIndex.value]?.id,"aria-labelledby":B(c.labelRef)?.id??B(c.buttonRef)?.id,"aria-autocomplete":`list`,id:o,onCompositionstart:h,onCompositionend:g,onKeydown:v,onInput:y,onFocus:S,onBlur:x,role:`combobox`,type:n.type??`text`,tabIndex:0,ref:c.inputRef,defaultValue:C.value,disabled:c.disabled.value===!0?!0:void 0},theirProps:s,slot:t,attrs:n,slots:i,features:P.RenderStrategy|P.Static,name:`ComboboxInput`})}}}),ut=n({name:`ComboboxOptions`,props:{as:{type:[Object,String],default:`ul`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:r}){let i=X(`ComboboxOptions`),a=`headlessui-combobox-options-${L()}`;r({el:i.optionsRef,$el:i.optionsRef}),E(()=>{i.optionsPropsRef.value.static=e.static}),E(()=>{i.optionsPropsRef.value.hold=e.hold});let o=V(),s=k(()=>o===null?i.comboboxState.value===0:(o.value&R.Open)===R.Open);We({container:k(()=>B(i.optionsRef)),enabled:k(()=>i.comboboxState.value===0),accept(e){return e.getAttribute(`role`)===`option`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});function c(e){e.preventDefault()}return()=>{let r={open:i.comboboxState.value===0};return z({ourProps:{"aria-labelledby":B(i.labelRef)?.id??B(i.buttonRef)?.id,id:a,ref:i.optionsRef,role:`listbox`,"aria-multiselectable":i.mode.value===1?!0:void 0,onMousedown:c},theirProps:U(e,[`hold`]),slot:r,attrs:t,slots:i.virtual.value&&i.comboboxState.value===0?{...n,default:()=>[S(ot,{},n.default)]}:n,features:P.RenderStrategy|P.Static,visible:s.value,name:`ComboboxOptions`})}}}),dt=n({name:`ComboboxOption`,props:{as:{type:[Object,String],default:`li`},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:n,expose:i}){let o=X(`ComboboxOption`),s=`headlessui-combobox-option-${L()}`,c=b(null),u=k(()=>e.disabled);i({el:c,$el:c});let d=k(()=>o.virtual.value?o.activeOptionIndex.value===o.calculateIndex(e.value):o.activeOptionIndex.value===null?!1:o.options.value[o.activeOptionIndex.value]?.id===s),f=k(()=>o.isSelected(e.value)),p=x(at,null),m=k(()=>({disabled:e.disabled,value:e.value,domRef:c,order:k(()=>e.order)}));r(()=>o.registerOption(s,m)),a(()=>o.unregisterOption(s,d.value)),E(()=>{let e=B(c);e&&p?.value.measureElement(e)}),E(()=>{o.comboboxState.value===0&&d.value&&(o.virtual.value||o.activationTrigger.value!==0&&l(()=>{var e;return((e=B(c))?.scrollIntoView)?.call(e,{block:`nearest`})}))});function h(e){e.preventDefault(),e.button===qe.Left&&(u.value||(o.selectOption(s),ze()||requestAnimationFrame(()=>B(o.inputRef)?.focus({preventScroll:!0})),o.mode.value===0&&o.closeCombobox()))}function g(){var t;if(e.disabled||(t=o.virtual.value)!=null&&t.disabled(e.value))return o.goToOption(Y.Nothing);let n=o.calculateIndex(e.value);o.goToOption(Y.Specific,n)}let _=Ue();function v(e){_.update(e)}function y(t){var n;if(!_.wasMoved(t)||e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value)return;let r=o.calculateIndex(e.value);o.goToOption(Y.Specific,r,0)}function S(t){var n;_.wasMoved(t)&&(e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value&&(o.optionsPropsRef.value.hold||o.goToOption(Y.Nothing)))}return()=>{let{disabled:r}=e,i={active:d.value,selected:f.value,disabled:r};return z({ourProps:{id:s,ref:c,role:`option`,tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,"aria-selected":f.value,disabled:void 0,onMousedown:h,onFocus:g,onPointerenter:v,onMouseenter:v,onPointermove:y,onMousemove:y,onPointerleave:S,onMouseleave:S},theirProps:U(e,[`order`,`value`]),slot:i,attrs:n,slots:t,name:`ComboboxOption`})}}});function ft(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function pt(e,...t){e&&t.length>0&&e.classList.add(...t)}function Z(e,...t){e&&t.length>0&&e.classList.remove(...t)}var mt=(e=>(e.Finished=`finished`,e.Cancelled=`cancelled`,e))(mt||{});function ht(e,t){let n=G();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(e=>{let[t=0]=e.split(`,`).filter(Boolean).map(e=>e.includes(`ms`)?parseFloat(e):parseFloat(e)*1e3).sort((e,t)=>t-e);return t});return a===0?t(`finished`):n.setTimeout(()=>t(`finished`),a+o),n.add(()=>t(`cancelled`)),n.dispose}function gt(e,t,n,r,i,a){let o=G(),s=a===void 0?()=>{}:ft(a);return Z(e,...i),pt(e,...t,...n),o.nextFrame(()=>{Z(e,...n),pt(e,...r),o.add(ht(e,n=>(Z(e,...r,...t),pt(e,...i),s(n))))}),o.add(()=>Z(e,...t,...n,...r,...i)),o.add(()=>s(`cancelled`)),o.dispose}function Q(e=``){return e.split(/\s+/).filter(e=>e.length>1)}var _t=Symbol(`TransitionContext`),vt=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(vt||{});function yt(){return x(_t,null)!==null}function bt(){let e=x(_t,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}function xt(){let e=x(St,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}var St=Symbol(`NestingContext`);function $(e){return`children`in e?$(e.children):e.value.filter(({state:e})=>e===`visible`).length>0}function Ct(e){let t=b([]),n=b(!1);r(()=>n.value=!0),a(()=>n.value=!1);function i(r,i=I.Hidden){let a=t.value.findIndex(({id:e})=>e===r);a!==-1&&(F(i,{[I.Unmount](){t.value.splice(a,1)},[I.Hidden](){t.value[a].state=`hidden`}}),!$(t)&&n.value&&e?.())}function o(e){let n=t.value.find(({id:t})=>t===e);return n?n.state!==`visible`&&(n.state=`visible`):t.value.push({id:e,state:`visible`}),()=>i(e,I.Unmount)}return{children:t,register:o,unregister:i}}var wt=P.RenderStrategy,Tt=n({props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:o}){let c=b(0);function l(){c.value|=R.Opening,t(`beforeEnter`)}function u(){c.value&=~R.Opening,t(`afterEnter`)}function f(){c.value|=R.Closing,t(`beforeLeave`)}function p(){c.value&=~R.Closing,t(`afterLeave`)}if(!yt()&&ne())return()=>S(Et,{...e,onBeforeEnter:l,onAfterEnter:u,onBeforeLeave:f,onAfterLeave:p},i);let h=b(null),g=k(()=>e.unmount?I.Unmount:I.Hidden);o({el:h,$el:h});let{show:_,appear:v}=bt(),{register:y,unregister:x}=xt(),C=b(_.value?`visible`:`hidden`),w={value:!0},T=L(),D={value:!1},O=Ct(()=>{!D.value&&C.value!==`hidden`&&(C.value=`hidden`,x(T),p())});r(()=>{a(y(T))}),E(()=>{if(g.value===I.Hidden&&T){if(_.value&&C.value!==`visible`){C.value=`visible`;return}F(C.value,{hidden:()=>x(T),visible:()=>y(T)})}});let A=Q(e.enter),j=Q(e.enterFrom),M=Q(e.enterTo),N=Q(e.entered),P=Q(e.leave),te=Q(e.leaveFrom),V=Q(e.leaveTo);r(()=>{E(()=>{if(C.value===`visible`){let e=B(h);if(e instanceof Comment&&e.data===``)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function re(e){let t=w.value&&!v.value,n=B(h);!n||!(n instanceof HTMLElement)||t||(D.value=!0,_.value&&l(),_.value||f(),e(_.value?gt(n,A,j,M,N,e=>{D.value=!1,e===mt.Finished&&u()}):gt(n,P,te,V,N,e=>{D.value=!1,e===mt.Finished&&($(O)||(C.value=`hidden`,x(T),p()))})))}return r(()=>{s([_],(e,t,n)=>{re(n),w.value=!1},{immediate:!0})}),d(St,O),ee(k(()=>F(C.value,{visible:R.Open,hidden:R.Closed})|c.value)),()=>{let{appear:t,show:r,enter:a,enterFrom:o,enterTo:s,entered:c,leave:l,leaveFrom:u,leaveTo:d,...f}=e,p={ref:h};return z({theirProps:{...f,...v.value&&_.value&&K.isServer?{class:m([n.class,f.class,...A,...j])}:{}},ourProps:p,slot:{},slots:i,attrs:n,features:wt,visible:C.value===`visible`,name:`TransitionChild`})}}}),Et=n({inheritAttrs:!1,props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i}){let a=V(),o=k(()=>e.show===null&&a!==null?(a.value&R.Open)===R.Open:e.show);E(()=>{if(![!0,!1].includes(o.value))throw Error('A is used but it is missing a `:show="true | false"` prop.')});let s=b(o.value?`visible`:`hidden`),c=Ct(()=>{s.value=`hidden`}),l=b(!0),u={show:o,appear:k(()=>e.appear||!l.value)};return r(()=>{E(()=>{l.value=!1,o.value?s.value=`visible`:$(c)||(s.value=`hidden`)})}),d(St,c),d(_t,u),()=>{let r=U(e,[`show`,`appear`,`unmount`,`onBeforeEnter`,`onBeforeLeave`,`onAfterEnter`,`onAfterLeave`]),a={unmount:e.unmount};return z({ourProps:{...a,as:`template`},theirProps:{},slot:{},slots:{...i,default:()=>[S(Tt,{onBeforeEnter:()=>t(`beforeEnter`),onAfterEnter:()=>t(`afterEnter`),onBeforeLeave:()=>t(`beforeLeave`),onAfterLeave:()=>t(`afterLeave`),...n,...a,...r},i.default)]},attrs:{},features:wt,visible:s.value===`visible`,name:`Transition`})}}}),Dt=[`active`,`checked`,`hint`],Ot={key:0},kt=n({__name:`InputComboboxOption`,props:{option:{}},setup(n){return(r,i)=>(c(),_(C(dt),{value:n.option,as:`template`},{default:o(({active:i,selected:a})=>[t(r.$slots,`option`,{option:n.option,active:i,selected:a},()=>[M(`craft-option`,{active:i,checked:a,hint:n.option.data?.hint},[n.option.label.startsWith(`$`)||n.option.label.startsWith(`@`)?(c(),f(`code`,Ot,e(n.option.label),1)):(c(),f(y,{key:1},[A(e(n.option.label),1)],64))],8,Dt)])]),_:3},8,[`value`]))}}),At={key:1},jt={class:`group-label`},Mt=O(n({__name:`InputCombobox`,props:{label:{},options:{default:()=>[]},modelValue:{default:``},requireOptionMatch:{type:Boolean,default:!1},transformModelValue:{type:Function,default:e=>e?e.value:``},class:{type:[Boolean,null,String,Object,Array]},placeholder:{},disabled:{type:Boolean}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,a=t,s=k({get(){let e=null;return a.options.forEach(t=>{t.type===`optgroup`?t.options.forEach(t=>{t.value===a.modelValue&&(e=t)}):t.value===a.modelValue&&(e=t)}),!e&&!a.requireOptionMatch&&(e={label:a.modelValue,value:a.modelValue}),e},set(e){r(`update:modelValue`,a.transformModelValue(e))}}),l=i(`reference`),d=b(a.modelValue??``),h=k(()=>l.value?.getBoundingClientRect()||new DOMRect);function g(e,t){let n=C(e).toLowerCase(),r=C(t);return r.label.toLowerCase().includes(n)||r.value.toLowerCase().includes(n)||(r.data?.keywords?.toLowerCase().includes(n)??!1)}function v(e,t){return C(t).map(t=>{if(t.type===`optgroup`){let n=t.options.filter(t=>g(e,t));return n.length>0?{...t,options:n}:null}return g(e,t)?t:null}).filter(e=>e!==null)}let x=k(()=>d.value===``?a.options:v(d,a.options));function S(e){return e?e.label:``}let w=k(()=>[``,`@`,`$`].includes(d.value)?null:{value:d.value,label:d.value});return(n,r)=>(c(),f(`div`,{class:`relative`,ref_key:`reference`,ref:l},[p(C(st),{modelValue:s.value,"onUpdate:modelValue":r[2]||=e=>s.value=e,disabled:a.disabled},{default:o(()=>[p(C(lt),{onChange:r[0]||=e=>d.value=e.target.value,class:m([`input`,a.class]),displayValue:S,placeholder:t.placeholder},null,8,[`class`,`placeholder`]),p(C(ct),{class:`absolute inset-y-1 right-1 flex items-center`,type:`button`,as:`craft-button`,appearance:`plain`,size:`small`,icon:``,"aria-label":t.label},{default:o(()=>[...r[3]||=[M(`craft-icon`,{name:`chevron-down`,style:{"font-size":`0.8em`}},null,-1)]]),_:1},8,[`aria-label`]),p(C(Et),{leave:`transition ease-in duration-100`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,onAfterLeave:r[1]||=e=>d.value=``},{default:o(()=>[p(C(ut),{class:`options`,style:u({position:`fixed`,insetInlineStart:`${h.value.left}px`,width:`${h.value.width}px`,insetBlockStart:`${h.value.bottom}px`})},{default:o(()=>[!t.requireOptionMatch&&w.value?(c(),_(kt,{key:0,option:w.value},null,8,[`option`])):x.value.length===0&&d.value!==``?(c(),f(`div`,At,` Nothing found. `)):j(``,!0),(c(!0),f(y,null,N(x.value,(t,n)=>(c(),f(y,{key:n},[t.type===`optgroup`?(c(),f(y,{key:0},[M(`div`,jt,e(t.label),1),(c(!0),f(y,null,N(t.options,(e,t)=>(c(),_(kt,{key:t,option:e},null,8,[`option`]))),128))],64)):(c(),_(kt,{key:1,option:t},null,8,[`option`]))],64))),128))]),_:1},8,[`style`])]),_:1})]),_:1},8,[`modelValue`,`disabled`])],512))}}),[[`__scopeId`,`data-v-b00ef27e`]]);export{Mt as t}; \ No newline at end of file diff --git a/resources/build/Install.js b/resources/build/Install.js index a68c2b5962c..620c6027036 100644 --- a/resources/build/Install.js +++ b/resources/build/Install.js @@ -1 +1 @@ -import{$ as e,B as t,E as n,F as r,G as i,J as a,K as o,L as s,M as c,N as l,S as u,T as d,U as f,X as p,a as ee,b as m,c as h,d as te,h as g,it as _,l as v,lt as y,m as b,q as x,r as S,rt as C,t as w,v as T,w as E,x as D,y as O,z as k}from"./_plugin-vue_export-helper.js";import"./lit.js";import{r as A}from"./nav-item-9g3ebwBJ.js";import{t as j}from"./Select.js";import{t as M}from"./Pane.js";import{i as N}from"./dist.js";import{i as P}from"./useFetch.js";import{n as F}from"./wayfinder.js";import{t as I}from"./Modal.js";import{t as L}from"./CraftInput.js";import{t as ne}from"./CraftCombobox.js";var re=``+new URL(`assets/installer-bg.png`,import.meta.url).href,R=e=>{o(i(e),async e=>{e?.tagName.includes(`CRAFT-`)&&(await customElements.whenDefined(e.tagName.toLowerCase()),await e?.updateComplete),e?.focus()})},z=[`.modelValue`,`has-feedbck-for`],B={slot:`feedback`},V={key:0,class:`error-list`},H=n({name:`CraftInputPassword`,__name:`CraftInputPassword`,props:c({error:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=f(n,`modelValue`);return(i,a)=>(s(),u(`craft-input-password`,l(i.$attrs,{".modelValue":r.value,onModelValueChanged:a[0]||=e=>r.value=e.target?.modelValue,"has-feedbck-for":n.error?`error`:``}),[t(i.$slots,`default`),O(`div`,B,[n.error?(s(),u(`ul`,V,[O(`li`,null,e(n.error),1)])):D(``,!0)])],48,z))}}),U=n({__name:`AccountFields`,props:{modelValue:{default:()=>({email:``,username:``,password:``})},errors:{default:()=>({email:``,username:``,password:``})}},emits:[`success`,`click:back`,`update:modelValue`],setup(e,{emit:t}){let n=t,r=e,i=v(),a=T(()=>!i.props.useEmailAsUsername),o=T({get(){return console.log(r.modelValue),r.modelValue},set(e){console.log(`value`,e),n(`update:modelValue`,e)}});return R(`username-input`),(t,n)=>(s(),u(g,null,[a.value?(s(),m(L,{key:0,label:y(A)(`Username`),id:`account-username`,name:`username`,modelValue:o.value.username,"onUpdate:modelValue":n[0]||=e=>o.value.username=e,error:e.errors?.username,maxlength:`255`,required:``,autofocus:``},null,8,[`label`,`modelValue`,`error`])):D(``,!0),d(L,{label:y(A)(`Email`),id:`account-email`,name:`email`,modelValue:o.value.email,"onUpdate:modelValue":n[1]||=e=>o.value.email=e,maxlength:`255`,autocomplete:`email`,error:e.errors?.email,required:``,type:`email`},null,8,[`label`,`modelValue`,`error`]),d(H,{label:y(A)(`Password`),id:`account-password`,name:`password`,modelValue:o.value.password,"onUpdate:modelValue":n[2]||=e=>o.value.password=e,error:e.errors?.password,required:``,autocomplete:`new-password`},null,8,[`label`,`modelValue`,`error`])],64))}}),W={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},G={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},K=n({__name:`SiteFields`,props:{modelValue:{default:()=>({})},localeOptions:{default:()=>[]},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=v(),c=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}});return R(`site-name`),(n,r)=>(s(),u(g,null,[d(L,{name:`name`,label:y(A)(`System Name`),id:`site-name`,modelValue:c.value.name,"onUpdate:modelValue":r[0]||=e=>c.value.name=e,maxlength:`255`,ref:`site-name`,error:t.errors?.name},null,8,[`label`,`modelValue`,`error`]),d(ne,{modelValue:c.value.baseUrl,"onUpdate:modelValue":r[1]||=e=>c.value.baseUrl=e,label:y(A)(`Base URL`),"help-text":y(A)(`The base URL for the site.`),id:`base-url`,name:`baseUrl`,error:t.errors?.baseUrl,options:y(o).props.baseUrlSuggestions},{after:a(()=>[O(`craft-callout`,W,[E(e(y(A)(`This can begin with an environment variable or alias.`))+` `,1),O(`a`,G,e(y(A)(`Learn more`)),1)])]),_:1},8,[`modelValue`,`label`,`help-text`,`error`,`options`]),d(j,{modelValue:c.value.language,"onUpdate:modelValue":r[2]||=e=>c.value.language=e,options:t.localeOptions,label:y(A)(`Language`),id:`site-language`,name:`language`},{"option-label":a(({option:t})=>[E(e(t.value)+` (`+e(t.label)+`) `,1)]),_:1},8,[`modelValue`,`options`,`label`])],64))}}),q=e=>({url:q.url(e),method:`post`});q.definition={methods:[`post`],url:`/admin/actions/install/validate-db`},q.url=e=>q.definition.url+F(e),q.post=e=>({url:q.url(e),method:`post`});var J=e=>({url:J.url(e),method:`post`});J.definition={methods:[`post`],url:`/admin/actions/install/validate-account`},J.url=e=>J.definition.url+F(e),J.post=e=>({url:J.url(e),method:`post`});var Y=e=>({url:Y.url(e),method:`post`});Y.definition={methods:[`post`],url:`/admin/actions/install/validate-site`},Y.url=e=>Y.definition.url+F(e),Y.post=e=>({url:Y.url(e),method:`post`});var X=e=>({url:X.url(e),method:`post`});X.definition={methods:[`post`],url:`/admin/actions/install/install`},X.url=e=>X.definition.url+F(e),X.post=e=>({url:X.url(e),method:`post`});var Z=e=>({url:Z.url(e),method:`get`});Z.definition={methods:[`get`,`head`],url:`/admin/install`},Z.url=e=>Z.definition.url+F(e),Z.get=e=>({url:Z.url(e),method:`get`}),Z.head=e=>({url:Z.url(e),method:`head`});var ie=()=>{let e=_({start:{},license:{id:`license`,label:`License`},account:{id:`account`,label:`Account`,action:J().url,heading:A(`Create your account`)},db:{id:`db`,label:`Database`,action:q().url,heading:A(`Connect to your database`)},site:{id:`site`,label:`Site`,action:Y().url,heading:A(`Set up your site`),submitLabel:A(`Finish up`)},installing:{label:`Installing`,id:`installing`}}),t=T(()=>Object.keys(e.value).reduce((t,n)=>{let r=e.value[n];return(r.hidden??!1)||(t[n]=r),t},{})),n=T(()=>Object.keys(t.value).reduce((e,n)=>{let r=t.value[n];return(r.label??!1)&&(e[n]=r),e},{})),r=N(t),i=T(()=>r.stepNames.value[r.index.value]);return{...r,possibleSteps:e,currentId:i,dotSteps:n}},ae=``+new URL(`assets/account.png`,import.meta.url).href,oe=``+new URL(`assets/site.png`,import.meta.url).href,se=``+new URL(`assets/db.png`,import.meta.url).href,ce=w(n({__name:`Callout`,props:{variant:{default:`info`},appearance:{default:`default`}},setup(e){return(n,r)=>(s(),u(`div`,{class:p({callout:!0,"callout--danger":e.variant===`danger`,"callout--info":e.variant===`info`,"callout--success":e.variant===`success`,"callout--warning":e.variant===`warning`,"callout--emphasis":e.appearance===`emphasis`,"callout--default":e.appearance===`default`,"callout--outline":e.appearance===`outline`,"callout--plain":e.appearance===`plain`})},[t(n.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-2a01f40b`]]),le={class:`grid grid-cols-5 gap-2`},ue={class:`col-span-2`},de={class:`col-span-2`},fe={key:0,class:`error-list col-span-5`},pe={class:`grid grid-cols-2 gap-2`},me={key:0,class:`error-list col-span-2`},he={class:`grid grid-cols-4 gap-2`},ge={class:`col-span-2`},_e=n({__name:`DbFields`,props:{modelValue:{default:()=>({})},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}}),c=[{value:`mysql`,label:`MySQL`},{value:`pgsql`,label:`PostgreSQL`}];return R(`db-driver`),(n,r)=>(s(),u(g,null,[t.errors&&t.errors[`*`]?(s(),m(ce,{key:0,variant:`danger`},{default:a(()=>[O(`ul`,null,[(s(!0),u(g,null,k(t.errors[`*`],t=>(s(),u(`li`,null,e(t),1))),256))])]),_:1})):D(``,!0),O(`div`,le,[O(`div`,ue,[d(j,{label:y(A)(`Driver`),name:`driver`,id:`db-driver`,modelValue:o.value.driver,"onUpdate:modelValue":r[0]||=e=>o.value.driver=e,ref:`db-driver`,options:c,error:t.errors?.drive},null,8,[`label`,`modelValue`,`error`])]),O(`div`,de,[d(L,{label:y(A)(`Host`),name:`host`,id:`db-host`,modelValue:o.value.host,"onUpdate:modelValue":r[1]||=e=>o.value.host=e,placeholder:`127.0.0.1`,error:t.errors?.host},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(L,{label:y(A)(`Port`),name:`port`,id:`db-port`,modelValue:o.value.port,"onUpdate:modelValue":r[2]||=e=>o.value.port=e,size:`7`,error:t.errors?.port},null,8,[`label`,`modelValue`,`error`])]),t.errors?.server?(s(),u(`ul`,fe,[O(`li`,null,e(t.errors?.server),1)])):D(``,!0)]),O(`div`,pe,[O(`div`,null,[d(L,{label:y(A)(`Username`),name:`username`,id:`db-username`,modelValue:o.value.username,"onUpdate:modelValue":r[3]||=e=>o.value.username=e,placeholder:`root`,error:t.errors?.username},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(H,{label:y(A)(`Password`),name:`password`,id:`db-password`,modelValue:o.value.password,"onUpdate:modelValue":r[4]||=e=>o.value.password=e,error:t.errors?.password},null,8,[`label`,`modelValue`,`error`])]),t.errors?.user?(s(),u(`ul`,me,[O(`li`,null,e(t.errors?.user),1)])):D(``,!0)]),O(`div`,he,[O(`div`,ge,[d(L,{label:y(A)(`Database Name`),name:`name`,id:`db-database`,modelValue:o.value.database,"onUpdate:modelValue":r[5]||=e=>o.value.database=e,errors:t.errors?.database},null,8,[`label`,`modelValue`,`errors`])]),O(`div`,null,[d(L,{label:y(A)(`Prefix`),name:`prefix`,id:`db-prefix`,modelValue:o.value.prefix,"onUpdate:modelValue":r[6]||=e=>o.value.prefix=e,maxlength:`5`,size:`7`,error:t.errors?.prefix},null,8,[`label`,`modelValue`,`error`])])])],64))}}),ve={key:0,class:`content`},ye={key:1,class:`content`},be={key:2,class:`content`},xe={class:`text-left border border-red-500 rounded p-4 text-red-800 bg-red-50 font-mono text-xs`},Se=w(n({__name:`InstallingScreen`,props:{data:{}},setup(t){let{props:n}=v(),i=t,{execute:o,error:c,isSuccess:l,isLoading:d,isError:f}=P(`/admin/actions/install/install`,{onSuccess:e=>{setTimeout(()=>{window.location.href=n.postCpLoginRedirect},1e3)}});return r(async()=>{await o(i.data)}),(t,n)=>(s(),m(M,{class:`max-w-[80ch] mx-auto`},{default:a(()=>[y(d)?(s(),u(`div`,ve,[O(`h2`,null,e(y(A)(`Installing Craft CMS…`)),1),n[0]||=O(`craft-spinner`,null,null,-1)])):y(l)?(s(),u(`div`,ye,[O(`h2`,null,e(y(A)(`Craft is installed! 🎉`)),1),n[1]||=O(`div`,{class:`flex justify-center items-center`},[O(`craft-icon`,{name:`circle-check`,variant:`regular`,style:{color:`var(--c-color-success-fill-loud)`,"font-size":`2.5rem`}})],-1)])):D(``,!0),y(f)?(s(),u(`div`,be,[O(`h2`,null,e(y(A)(`Install failed 😞`)),1),O(`div`,xe,e(y(c).message),1)])):D(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-900f8a00`]]),Ce={class:`grid md:grid-cols-2 gap-4 items-center`},we={class:`aspect-[352/455] w-1/2 md:w-3/4 mx-auto`},Te=[`src`],Ee={class:`mb-4`},De={class:`grid gap-3 md:pr-6`},Q=n({__name:`StepScreen`,props:{illustrationSrc:{default:``},heading:{default:``}},setup(n){return(r,i)=>(s(),u(`div`,Ce,[O(`div`,we,[O(`img`,{loading:`lazy`,src:n.illustrationSrc,alt:``,width:`368`},null,8,Te)]),O(`div`,null,[O(`h2`,Ee,e(n.heading),1),O(`div`,De,[t(r.$slots,`default`)])])]))}}),$={class:`install`},Oe=[`innerHTML`],ke={class:`flex justify-center w-full`},Ae={key:2},je={class:`grid grid-cols-3 items-center gap-2 w-full`},Me={class:`flex gap-2 justify-center`},Ne={class:`sr-only`},Pe=[`loading`],Fe=w(n({__name:`Install`,props:{dbConfig:{},localeOptions:{},licenseHtml:{},defaultSystemName:{},defaultSiteUrl:{},defaultSiteLanguage:{},showDbScreen:{type:Boolean}},setup(t){te(e=>({v50826d02:n.value}));let n=T(()=>`url(${re})`),r=t,{dotSteps:i,current:o,currentId:c,goTo:l,goToNext:f,goToPrevious:_,isCurrent:v,possibleSteps:w}=ie();x(()=>{w.value.db.hidden=!r.showDbScreen});function j(){l(`license`)}let N=C({account:{},db:{},site:{}}),P=h({account:{username:``,email:``,password:``},db:{driver:r.dbConfig.driver,host:r.dbConfig.host,port:r.dbConfig.port,database:r.dbConfig.database,username:r.dbConfig.username,password:r.dbConfig.password,prefix:r.dbConfig.prefix},site:{name:r.defaultSystemName,baseUrl:r.defaultSiteUrl,language:r.defaultSiteLanguage}}),F=T(()=>!v(`start`));function L(e){if(P.processing)return;N[c.value]={};let t=e.currentTarget;P.transform(e=>e[c.value]).post(t.action,{onSuccess:()=>{f()},onError:e=>{N[c.value]=e}})}return(n,r)=>(s(),u(g,null,[d(y(ee),{title:y(A)(`Install Craft CMS`)},null,8,[`title`]),O(`div`,$,[y(v)(`start`)?(s(),u(`craft-button`,{key:0,type:`button`,onClick:j,variant:`primary`,class:`begin-button`},[E(e(y(A)(`Install Craft CMS`))+` `,1),r[6]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)])):D(``,!0),d(I,{"is-active":F.value,overlay:!1,width:`2xl`},{default:a(()=>[y(v)(`license`)?(s(),m(M,{key:0,class:`max-w-[80ch] mx-auto`},{actions:a(()=>[O(`div`,ke,[O(`craft-button`,{type:`button`,variant:`primary`,onClick:r[0]||=e=>y(l)(`account`)},e(y(A)(`Got it`)),1)])]),default:a(()=>[d(y(S),{data:`licenseHtml`},{fallback:a(()=>[...r[7]||=[O(`div`,{class:`flex justify-center`},[O(`craft-spinner`)],-1)]]),default:a(()=>[O(`div`,{class:`license`,innerHTML:t.licenseHtml},null,8,Oe)]),_:1})]),_:1})):y(v)(`installing`)?(s(),m(Se,{key:1,data:y(P),onSuccess:r[1]||=e=>y(f)()},null,8,[`data`])):(s(),u(`div`,Ae,[d(M,{as:`form`,action:y(o).action,onSubmit:b(L,[`prevent`])},{"footer-content":a(()=>[O(`div`,je,[O(`craft-button`,{type:`button`,onClick:r[5]||=(...e)=>y(_)&&y(_)(...e),appearance:`plain`,class:`justify-self-start`},[E(e(y(A)(`Back`))+` `,1),r[9]||=O(`craft-icon`,{name:`arrow-left`,slot:`prefix`},null,-1)]),O(`ul`,Me,[(s(!0),u(g,null,k(y(i),(t,n)=>(s(),u(`li`,{key:n},[O(`span`,{class:p([`dot`,{"dot--active":y(v)(n)}])},[O(`span`,Ne,e(t.label),1)],2)]))),128))]),O(`craft-button`,{class:`justify-self-end`,type:`submit`,variant:`primary`,loading:y(P).processing},[E(e(y(o).submitLabel??y(A)(`Next`))+` `,1),r[10]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)],8,Pe)])]),default:a(()=>[y(v)(`account`)?(s(),m(Q,{key:0,"illustration-src":y(ae),heading:y(o).heading,class:`screen`},{default:a(()=>[y(v)(`account`)?(s(),m(U,{key:0,modelValue:y(P).account,"onUpdate:modelValue":r[2]||=e=>y(P).account=e,errors:N.account},null,8,[`modelValue`,`errors`])):D(``,!0)]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`db`)?(s(),m(Q,{key:1,"illustration-src":y(se),heading:y(o).heading,class:`screen`},{default:a(()=>[d(_e,{modelValue:y(P).db,"onUpdate:modelValue":r[3]||=e=>y(P).db=e,errors:N.db},null,8,[`modelValue`,`errors`])]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`site`)?(s(),m(Q,{key:2,"illustration-src":y(oe),heading:y(o).heading,class:`screen`},{default:a(()=>[d(y(S),{data:`localeOptions`},{fallback:a(()=>[...r[8]||=[O(`craft-spinner`,null,null,-1)]]),default:a(()=>[d(K,{modelValue:y(P).site,"onUpdate:modelValue":r[4]||=e=>y(P).site=e,localeOptions:t.localeOptions,errors:N.site},null,8,[`modelValue`,`localeOptions`,`errors`])]),_:1})]),_:1},8,[`illustration-src`,`heading`])):D(``,!0)]),_:1},8,[`action`])]))]),_:1},8,[`is-active`])])],64))}}),[[`__scopeId`,`data-v-da5490c7`]]);export{Fe as default}; \ No newline at end of file +import{$ as e,B as t,E as n,F as r,G as i,J as a,K as o,L as s,M as c,N as l,S as u,T as d,U as f,X as p,a as ee,b as m,c as h,d as te,h as g,it as _,l as v,lt as y,m as b,q as x,r as S,rt as C,t as w,v as T,w as E,x as D,y as O,z as k}from"./_plugin-vue_export-helper.js";import"./lit.js";import{r as A}from"./nav-item-9g3ebwBJ.js";import{t as j}from"./Select.js";import{t as M}from"./Pane.js";import{i as N}from"./dist.js";import{i as P}from"./useFetch.js";import{n as F}from"./wayfinder.js";import{t as I}from"./Modal.js";import{t as L}from"./CraftInput.js";import{t as ne}from"./CraftCombobox.js";var re=``+new URL(`assets/installer-bg.png`,import.meta.url).href,R=e=>{o(i(e),async e=>{e?.tagName.includes(`CRAFT-`)&&(await customElements.whenDefined(e.tagName.toLowerCase()),await e?.updateComplete),e?.focus()})},z=[`.modelValue`,`has-feedbck-for`],B={slot:`feedback`},V={key:0,class:`error-list`},H=n({name:`CraftInputPassword`,__name:`CraftInputPassword`,props:c({error:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=f(n,`modelValue`);return(i,a)=>(s(),u(`craft-input-password`,l(i.$attrs,{".modelValue":r.value,onModelValueChanged:a[0]||=e=>r.value=e.target?.modelValue,"has-feedbck-for":n.error?`error`:``}),[t(i.$slots,`default`),O(`div`,B,[n.error?(s(),u(`ul`,V,[O(`li`,null,e(n.error),1)])):D(``,!0)])],48,z))}}),U=n({__name:`AccountFields`,props:{modelValue:{default:()=>({email:``,username:``,password:``})},errors:{default:()=>({email:``,username:``,password:``})}},emits:[`success`,`click:back`,`update:modelValue`],setup(e,{emit:t}){let n=t,r=e,i=v(),a=T(()=>!i.props.useEmailAsUsername),o=T({get(){return console.log(r.modelValue),r.modelValue},set(e){console.log(`value`,e),n(`update:modelValue`,e)}});return R(`username-input`),(t,n)=>(s(),u(g,null,[a.value?(s(),m(L,{key:0,label:y(A)(`Username`),id:`account-username`,name:`username`,modelValue:o.value.username,"onUpdate:modelValue":n[0]||=e=>o.value.username=e,error:e.errors?.username,maxlength:`255`,required:``,autofocus:``},null,8,[`label`,`modelValue`,`error`])):D(``,!0),d(L,{label:y(A)(`Email`),id:`account-email`,name:`email`,modelValue:o.value.email,"onUpdate:modelValue":n[1]||=e=>o.value.email=e,maxlength:`255`,autocomplete:`email`,error:e.errors?.email,required:``,type:`email`},null,8,[`label`,`modelValue`,`error`]),d(H,{label:y(A)(`Password`),id:`account-password`,name:`password`,modelValue:o.value.password,"onUpdate:modelValue":n[2]||=e=>o.value.password=e,error:e.errors?.password,required:``,autocomplete:`new-password`},null,8,[`label`,`modelValue`,`error`])],64))}}),W={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},G={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},K=n({__name:`SiteFields`,props:{modelValue:{default:()=>({})},localeOptions:{default:()=>[]},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=v(),c=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}});return R(`site-name`),(n,r)=>(s(),u(g,null,[d(L,{name:`name`,label:y(A)(`System Name`),id:`site-name`,modelValue:c.value.name,"onUpdate:modelValue":r[0]||=e=>c.value.name=e,maxlength:`255`,ref:`site-name`,error:t.errors?.name},null,8,[`label`,`modelValue`,`error`]),d(ne,{modelValue:c.value.baseUrl,"onUpdate:modelValue":r[1]||=e=>c.value.baseUrl=e,label:y(A)(`Base URL`),"help-text":y(A)(`The base URL for the site.`),id:`base-url`,name:`baseUrl`,error:t.errors?.baseUrl,options:y(o).props.baseUrlSuggestions},{after:a(()=>[O(`craft-callout`,W,[E(e(y(A)(`This can begin with an environment variable or alias.`))+` `,1),O(`a`,G,e(y(A)(`Learn more`)),1)])]),_:1},8,[`modelValue`,`label`,`help-text`,`error`,`options`]),d(j,{modelValue:c.value.language,"onUpdate:modelValue":r[2]||=e=>c.value.language=e,options:t.localeOptions,label:y(A)(`Language`),id:`site-language`,name:`language`},{"option-label":a(({option:t})=>[E(e(t.value)+` (`+e(t.label)+`) `,1)]),_:1},8,[`modelValue`,`options`,`label`])],64))}}),q=e=>({url:q.url(e),method:`post`});q.definition={methods:[`post`],url:`/admin/actions/install/validate-db`},q.url=e=>q.definition.url+F(e),q.post=e=>({url:q.url(e),method:`post`});var J=e=>({url:J.url(e),method:`post`});J.definition={methods:[`post`],url:`/admin/actions/install/validate-account`},J.url=e=>J.definition.url+F(e),J.post=e=>({url:J.url(e),method:`post`});var Y=e=>({url:Y.url(e),method:`post`});Y.definition={methods:[`post`],url:`/admin/actions/install/validate-site`},Y.url=e=>Y.definition.url+F(e),Y.post=e=>({url:Y.url(e),method:`post`});var X=e=>({url:X.url(e),method:`post`});X.definition={methods:[`post`],url:`/admin/actions/install/install`},X.url=e=>X.definition.url+F(e),X.post=e=>({url:X.url(e),method:`post`});var Z=e=>({url:Z.url(e),method:`get`});Z.definition={methods:[`get`,`head`],url:`/admin/install`},Z.url=e=>Z.definition.url+F(e),Z.get=e=>({url:Z.url(e),method:`get`}),Z.head=e=>({url:Z.url(e),method:`head`});var ie=()=>{let e=_({start:{},license:{id:`license`,label:`License`},account:{id:`account`,label:`Account`,action:J().url,heading:A(`Create your account`)},db:{id:`db`,label:`Database`,action:q().url,heading:A(`Connect to your database`)},site:{id:`site`,label:`Site`,action:Y().url,heading:A(`Set up your site`),submitLabel:A(`Finish up`)},installing:{label:`Installing`,id:`installing`}}),t=T(()=>Object.keys(e.value).reduce((t,n)=>{let r=e.value[n];return(r.hidden??!1)||(t[n]=r),t},{})),n=T(()=>Object.keys(t.value).reduce((e,n)=>{let r=t.value[n];return(r.label??!1)&&(e[n]=r),e},{})),r=N(t),i=T(()=>r.stepNames.value[r.index.value]);return{...r,possibleSteps:e,currentId:i,dotSteps:n}},ae=``+new URL(`assets/account.png`,import.meta.url).href,oe=``+new URL(`assets/site.png`,import.meta.url).href,se=``+new URL(`assets/db.png`,import.meta.url).href,ce=w(n({__name:`Callout`,props:{variant:{default:`info`},appearance:{default:`default`}},setup(e){return(n,r)=>(s(),u(`div`,{class:p({callout:!0,"callout--danger":e.variant===`danger`,"callout--info":e.variant===`info`,"callout--success":e.variant===`success`,"callout--warning":e.variant===`warning`,"callout--emphasis":e.appearance===`emphasis`,"callout--default":e.appearance===`default`,"callout--outline":e.appearance===`outline`,"callout--plain":e.appearance===`plain`})},[t(n.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-2a01f40b`]]),le={class:`grid grid-cols-5 gap-2`},ue={class:`col-span-2`},de={class:`col-span-2`},fe={key:0,class:`error-list col-span-5`},pe={class:`grid grid-cols-2 gap-2`},me={key:0,class:`error-list col-span-2`},he={class:`grid grid-cols-4 gap-2`},ge={class:`col-span-2`},_e=n({__name:`DbFields`,props:{modelValue:{default:()=>({})},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}}),c=[{value:`mysql`,label:`MySQL`},{value:`pgsql`,label:`PostgreSQL`}];return R(`db-driver`),(n,r)=>(s(),u(g,null,[t.errors&&t.errors[`*`]?(s(),m(ce,{key:0,variant:`danger`},{default:a(()=>[O(`ul`,null,[(s(!0),u(g,null,k(t.errors[`*`],t=>(s(),u(`li`,null,e(t),1))),256))])]),_:1})):D(``,!0),O(`div`,le,[O(`div`,ue,[d(j,{label:y(A)(`Driver`),name:`driver`,id:`db-driver`,modelValue:o.value.driver,"onUpdate:modelValue":r[0]||=e=>o.value.driver=e,ref:`db-driver`,options:c,error:t.errors?.drive},null,8,[`label`,`modelValue`,`error`])]),O(`div`,de,[d(L,{label:y(A)(`Host`),name:`host`,id:`db-host`,modelValue:o.value.host,"onUpdate:modelValue":r[1]||=e=>o.value.host=e,placeholder:`127.0.0.1`,error:t.errors?.host},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(L,{label:y(A)(`Port`),name:`port`,id:`db-port`,modelValue:o.value.port,"onUpdate:modelValue":r[2]||=e=>o.value.port=e,size:`7`,error:t.errors?.port},null,8,[`label`,`modelValue`,`error`])]),t.errors?.server?(s(),u(`ul`,fe,[O(`li`,null,e(t.errors?.server),1)])):D(``,!0)]),O(`div`,pe,[O(`div`,null,[d(L,{label:y(A)(`Username`),name:`username`,id:`db-username`,modelValue:o.value.username,"onUpdate:modelValue":r[3]||=e=>o.value.username=e,placeholder:`root`,error:t.errors?.username},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(H,{label:y(A)(`Password`),name:`password`,id:`db-password`,modelValue:o.value.password,"onUpdate:modelValue":r[4]||=e=>o.value.password=e,error:t.errors?.password},null,8,[`label`,`modelValue`,`error`])]),t.errors?.user?(s(),u(`ul`,me,[O(`li`,null,e(t.errors?.user),1)])):D(``,!0)]),O(`div`,he,[O(`div`,ge,[d(L,{label:y(A)(`Database Name`),name:`name`,id:`db-database`,modelValue:o.value.database,"onUpdate:modelValue":r[5]||=e=>o.value.database=e,errors:t.errors?.database},null,8,[`label`,`modelValue`,`errors`])]),O(`div`,null,[d(L,{label:y(A)(`Prefix`),name:`prefix`,id:`db-prefix`,modelValue:o.value.prefix,"onUpdate:modelValue":r[6]||=e=>o.value.prefix=e,maxlength:`5`,size:`7`,error:t.errors?.prefix},null,8,[`label`,`modelValue`,`error`])])])],64))}}),ve={key:0,class:`content`},ye={key:1,class:`content`},be={key:2,class:`content`},xe={class:`text-left border border-red-500 rounded p-4 text-red-800 bg-red-50 font-mono text-xs`},Se=w(n({__name:`InstallingScreen`,props:{data:{}},setup(t){let{props:n}=v(),i=t,{execute:o,error:c,isSuccess:l,isLoading:d,isError:f}=P(`/admin/actions/install/install`,{onSuccess:e=>{setTimeout(()=>{window.location.href=n.postCpLoginRedirect},1e3)}});return r(async()=>{await o(i.data)}),(t,n)=>(s(),m(M,{class:`max-w-[80ch] mx-auto`},{default:a(()=>[y(d)?(s(),u(`div`,ve,[O(`h2`,null,e(y(A)(`Installing Craft CMS…`)),1),n[0]||=O(`craft-spinner`,null,null,-1)])):y(l)?(s(),u(`div`,ye,[O(`h2`,null,e(y(A)(`Craft is installed! 🎉`)),1),n[1]||=O(`div`,{class:`flex justify-center items-center`},[O(`craft-icon`,{name:`circle-check`,variant:`regular`,style:{color:`var(--c-color-success-fill-loud)`,"font-size":`2.5rem`}})],-1)])):D(``,!0),y(f)?(s(),u(`div`,be,[O(`h2`,null,e(y(A)(`Install failed 😞`)),1),O(`div`,xe,e(y(c).message),1)])):D(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-900f8a00`]]),Ce={class:`grid md:grid-cols-2 gap-4 items-center`},we={class:`aspect-[352/455] w-1/2 md:w-3/4 mx-auto`},Te=[`src`],Ee={class:`mb-4`},De={class:`grid gap-3 md:pr-6`},Q=n({__name:`StepScreen`,props:{illustrationSrc:{default:``},heading:{default:``}},setup(n){return(r,i)=>(s(),u(`div`,Ce,[O(`div`,we,[O(`img`,{loading:`lazy`,src:n.illustrationSrc,alt:``,width:`368`},null,8,Te)]),O(`div`,null,[O(`h2`,Ee,e(n.heading),1),O(`div`,De,[t(r.$slots,`default`)])])]))}}),$={class:`install`},Oe=[`innerHTML`],ke={class:`flex justify-center w-full`},Ae={key:2},je={class:`grid grid-cols-3 items-center gap-2 w-full`},Me={class:`flex gap-2 justify-center`},Ne={class:`sr-only`},Pe=[`loading`],Fe=w(n({__name:`Install`,props:{dbConfig:{},localeOptions:{},licenseHtml:{},defaultSystemName:{},defaultSiteUrl:{},defaultSiteLanguage:{},showDbScreen:{type:Boolean}},setup(t){te(e=>({v9fee5bf4:n.value}));let n=T(()=>`url(${re})`),r=t,{dotSteps:i,current:o,currentId:c,goTo:l,goToNext:f,goToPrevious:_,isCurrent:v,possibleSteps:w}=ie();x(()=>{w.value.db.hidden=!r.showDbScreen});function j(){l(`license`)}let N=C({account:{},db:{},site:{}}),P=h({account:{username:``,email:``,password:``},db:{driver:r.dbConfig.driver,host:r.dbConfig.host,port:r.dbConfig.port,database:r.dbConfig.database,username:r.dbConfig.username,password:r.dbConfig.password,prefix:r.dbConfig.prefix},site:{name:r.defaultSystemName,baseUrl:r.defaultSiteUrl,language:r.defaultSiteLanguage}}),F=T(()=>!v(`start`));function L(e){if(P.processing)return;N[c.value]={};let t=e.currentTarget;P.transform(e=>e[c.value]).post(t.action,{onSuccess:()=>{f()},onError:e=>{N[c.value]=e}})}return(n,r)=>(s(),u(g,null,[d(y(ee),{title:y(A)(`Install Craft CMS`)},null,8,[`title`]),O(`div`,$,[y(v)(`start`)?(s(),u(`craft-button`,{key:0,type:`button`,onClick:j,variant:`accent`,class:`begin-button`},[E(e(y(A)(`Install Craft CMS`))+` `,1),r[6]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)])):D(``,!0),d(I,{"is-active":F.value,overlay:!1,width:`2xl`},{default:a(()=>[y(v)(`license`)?(s(),m(M,{key:0,class:`max-w-[80ch] mx-auto`},{actions:a(()=>[O(`div`,ke,[O(`craft-button`,{type:`button`,variant:`accent`,onClick:r[0]||=e=>y(l)(`account`)},e(y(A)(`Got it`)),1)])]),default:a(()=>[d(y(S),{data:`licenseHtml`},{fallback:a(()=>[...r[7]||=[O(`div`,{class:`flex justify-center`},[O(`craft-spinner`)],-1)]]),default:a(()=>[O(`div`,{class:`license`,innerHTML:t.licenseHtml},null,8,Oe)]),_:1})]),_:1})):y(v)(`installing`)?(s(),m(Se,{key:1,data:y(P),onSuccess:r[1]||=e=>y(f)()},null,8,[`data`])):(s(),u(`div`,Ae,[d(M,{as:`form`,action:y(o).action,onSubmit:b(L,[`prevent`])},{"footer-content":a(()=>[O(`div`,je,[O(`craft-button`,{type:`button`,onClick:r[5]||=(...e)=>y(_)&&y(_)(...e),appearance:`plain`,class:`justify-self-start`},[E(e(y(A)(`Back`))+` `,1),r[9]||=O(`craft-icon`,{name:`arrow-left`,slot:`prefix`},null,-1)]),O(`ul`,Me,[(s(!0),u(g,null,k(y(i),(t,n)=>(s(),u(`li`,{key:n},[O(`span`,{class:p([`dot`,{"dot--active":y(v)(n)}])},[O(`span`,Ne,e(t.label),1)],2)]))),128))]),O(`craft-button`,{class:`justify-self-end`,type:`submit`,variant:`accent`,loading:y(P).processing},[E(e(y(o).submitLabel??y(A)(`Next`))+` `,1),r[10]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)],8,Pe)])]),default:a(()=>[y(v)(`account`)?(s(),m(Q,{key:0,"illustration-src":y(ae),heading:y(o).heading,class:`screen`},{default:a(()=>[y(v)(`account`)?(s(),m(U,{key:0,modelValue:y(P).account,"onUpdate:modelValue":r[2]||=e=>y(P).account=e,errors:N.account},null,8,[`modelValue`,`errors`])):D(``,!0)]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`db`)?(s(),m(Q,{key:1,"illustration-src":y(se),heading:y(o).heading,class:`screen`},{default:a(()=>[d(_e,{modelValue:y(P).db,"onUpdate:modelValue":r[3]||=e=>y(P).db=e,errors:N.db},null,8,[`modelValue`,`errors`])]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`site`)?(s(),m(Q,{key:2,"illustration-src":y(oe),heading:y(o).heading,class:`screen`},{default:a(()=>[d(y(S),{data:`localeOptions`},{fallback:a(()=>[...r[8]||=[O(`craft-spinner`,null,null,-1)]]),default:a(()=>[d(K,{modelValue:y(P).site,"onUpdate:modelValue":r[4]||=e=>y(P).site=e,localeOptions:t.localeOptions,errors:N.site},null,8,[`modelValue`,`localeOptions`,`errors`])]),_:1})]),_:1},8,[`illustration-src`,`heading`])):D(``,!0)]),_:1},8,[`action`])]))]),_:1},8,[`is-active`])])],64))}}),[[`__scopeId`,`data-v-2498bb7d`]]);export{Fe as default}; \ No newline at end of file diff --git a/resources/build/ModalForm.js b/resources/build/ModalForm.js index 7652d21fda7..e865228487c 100644 --- a/resources/build/ModalForm.js +++ b/resources/build/ModalForm.js @@ -1 +1 @@ -import{$ as e,B as t,C as n,E as r,J as i,L as a,S as o,T as s,b as c,m as l,v as u,y as d,z as f}from"./_plugin-vue_export-helper.js";import{r as p}from"./nav-item-9g3ebwBJ.js";import{t as m}from"./Pane.js";import{t as h}from"./Modal.js";var g=[`variant`],_=[`variant`],v=r({__name:`Badge`,props:{variant:{default:`default`}},setup(e){let n=e,r=u(()=>n.variant===`default`?`empty`:n.variant);return(n,i)=>(a(),o(`craft-callout`,{variant:e.variant,size:`small`,class:`items-center`,inline:``},[d(`craft-indicator`,{slot:`icon`,variant:r.value},null,8,_),d(`span`,null,[t(n.$slots,`default`)])],8,g))}}),y=[`loading`],b=r({__name:`ModalForm`,props:{isActive:{type:Boolean},overlay:{type:Boolean,default:!0},width:{},loading:{type:Boolean,default:!1},title:{},resetLabel:{default:p(`Cancel`)},submitLabel:{default:p(`Save`)}},emits:[`close`,`submit`],setup(r,{emit:o}){let u=o;function p(){u(`submit`)}return(o,g)=>(a(),c(h,{isActive:r.isActive,overlay:r.overlay,onClose:g[1]||=e=>u(`close`),width:r.width},{default:i(()=>[d(`form`,{onSubmit:l(p,[`prevent`])},[s(m,{title:r.title},n({"secondary-action":i(()=>[d(`craft-button`,{type:`reset`,onClick:g[0]||=e=>u(`close`),appearance:`plain`},e(r.resetLabel),1)]),"primary-action":i(()=>[d(`craft-button`,{type:`submit`,variant:`primary`,loading:r.loading},e(r.submitLabel),9,y)]),default:i(()=>[t(o.$slots,`default`)]),_:2},[f(o.$slots,(e,n)=>({name:n,fn:i(()=>[t(o.$slots,n)])}))]),1032,[`title`])],32)]),_:3},8,[`isActive`,`overlay`,`width`]))}});export{v as n,b as t}; \ No newline at end of file +import{$ as e,B as t,C as n,E as r,J as i,L as a,S as o,T as s,b as c,m as l,v as u,y as d,z as f}from"./_plugin-vue_export-helper.js";import{r as p}from"./nav-item-9g3ebwBJ.js";import{t as m}from"./Pane.js";import{t as h}from"./Modal.js";var g=[`variant`],_=[`variant`],v=r({__name:`Badge`,props:{variant:{default:`default`}},setup(e){let n=e,r=u(()=>n.variant===`default`?`empty`:n.variant);return(n,i)=>(a(),o(`craft-callout`,{variant:e.variant,size:`small`,class:`items-center`,inline:``},[d(`craft-indicator`,{slot:`icon`,variant:r.value},null,8,_),d(`span`,null,[t(n.$slots,`default`)])],8,g))}}),y=[`loading`],b=r({__name:`ModalForm`,props:{isActive:{type:Boolean},overlay:{type:Boolean,default:!0},width:{},loading:{type:Boolean,default:!1},title:{},resetLabel:{default:p(`Cancel`)},submitLabel:{default:p(`Save`)}},emits:[`close`,`submit`],setup(r,{emit:o}){let u=o;function p(){u(`submit`)}return(o,g)=>(a(),c(h,{isActive:r.isActive,overlay:r.overlay,onClose:g[1]||=e=>u(`close`),width:r.width},{default:i(()=>[d(`form`,{onSubmit:l(p,[`prevent`])},[s(m,{title:r.title},n({"secondary-action":i(()=>[d(`craft-button`,{type:`reset`,onClick:g[0]||=e=>u(`close`),appearance:`plain`},e(r.resetLabel),1)]),"primary-action":i(()=>[d(`craft-button`,{type:`submit`,variant:`accent`,loading:r.loading},e(r.submitLabel),9,y)]),default:i(()=>[t(o.$slots,`default`)]),_:2},[f(o.$slots,(e,n)=>({name:n,fn:i(()=>[t(o.$slots,n)])}))]),1032,[`title`])],32)]),_:3},8,[`isActive`,`overlay`,`width`]))}});export{v as n,b as t}; \ No newline at end of file diff --git a/resources/build/Queue.ts.js b/resources/build/Queue.ts.js index 8b900c6047d..e1dfffbf894 100644 --- a/resources/build/Queue.ts.js +++ b/resources/build/Queue.ts.js @@ -1,4 +1,4 @@ -import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js";import{c as n,f as r,t as i}from"./lit.js";import{a}from"./decorators.js";function o(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function s(e,t,n){o(e,t),t.set(e,n)}function c(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function l(e,t,n){return e.set(c(e,t),n),n}function u(e,t){return e.get(c(e,t))}var d={Pending:1,Reserved:2,Done:3,Failed:4,Delayed:5,Cancelled:6},f={Default:`default`,Success:`success`,Warning:`warning`,Danger:`danger`,Info:`info`},p={Accent:`accent`,OutlineFill:`outline-fill`,Fill:`fill`,Outline:`outline`,Plain:`plain`};function m(e,t){o(e,t),t.add(e)}var h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakSet,D=class extends i{constructor(...e){super(...e),m(this,E),this.progress=0,this.failed=!1,this.color=`currentColor`,this.bgColor=`#a3afbb`,this.failColor=`#da5a47`,this.label=`Progress`,this.autoComplete=!1,s(this,h,null),s(this,g,0),s(this,_,0),s(this,v,0),s(this,y,0),s(this,b,0),s(this,x,null),s(this,S,0),s(this,C,null),s(this,w,0),s(this,T,!1)}connectedCallback(){super.connectedCallback(),l(T,this,window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)}disconnectedCallback(){super.disconnectedCallback(),c(E,this,ae).call(this)}firstUpdated(){l(h,this,this.renderRoot.querySelector(`canvas`)),c(E,this,ee).call(this),c(E,this,te).call(this)}updated(e){e.has(`progress`)?c(E,this,te).call(this):(e.has(`color`)||e.has(`bgColor`)||e.has(`failColor`)||e.has(`failed`))&&c(E,this,O).call(this)}get canvas(){return u(h,this)}get prefersReducedMotion(){return u(T,this)}runCompleteAnimation(){return new Promise(e=>{if(u(T,this)){l(b,this,1),u(h,this)&&(u(h,this).style.opacity=`0`),c(E,this,O).call(this),e();return}c(E,this,ie).call(this,1,()=>{u(h,this)&&(u(h,this).style.transition=`opacity 0.4s`,u(h,this).style.opacity=`0`),setTimeout(e,400)})})}async complete(){await this.runCompleteAnimation(),this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,composed:!0}))}render(){return n` +import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js";import{c as n,f as r,t as i}from"./lit.js";import{a}from"./decorators.js";function o(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function s(e,t,n){o(e,t),t.set(e,n)}function c(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function l(e,t,n){return e.set(c(e,t),n),n}function u(e,t){return e.get(c(e,t))}var d={Pending:1,Reserved:2,Done:3,Failed:4,Delayed:5,Cancelled:6},f={Neutral:`neutral`,Success:`success`,Warning:`warning`,Danger:`danger`,Info:`info`},p={Solid:`solid`,OutlineFill:`outline-fill`,Fill:`fill`,Outline:`outline`,Plain:`plain`};function m(e,t){o(e,t),t.add(e)}var h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakSet,D=class extends i{constructor(...e){super(...e),m(this,E),this.progress=0,this.failed=!1,this.color=`currentColor`,this.bgColor=`#a3afbb`,this.failColor=`#da5a47`,this.label=`Progress`,this.autoComplete=!1,s(this,h,null),s(this,g,0),s(this,_,0),s(this,v,0),s(this,y,0),s(this,b,0),s(this,x,null),s(this,S,0),s(this,C,null),s(this,w,0),s(this,T,!1)}connectedCallback(){super.connectedCallback(),l(T,this,window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)}disconnectedCallback(){super.disconnectedCallback(),c(E,this,ae).call(this)}firstUpdated(){l(h,this,this.renderRoot.querySelector(`canvas`)),c(E,this,ee).call(this),c(E,this,te).call(this)}updated(e){e.has(`progress`)?c(E,this,te).call(this):(e.has(`color`)||e.has(`bgColor`)||e.has(`failColor`)||e.has(`failed`))&&c(E,this,O).call(this)}get canvas(){return u(h,this)}get prefersReducedMotion(){return u(T,this)}runCompleteAnimation(){return new Promise(e=>{if(u(T,this)){l(b,this,1),u(h,this)&&(u(h,this).style.opacity=`0`),c(E,this,O).call(this),e();return}c(E,this,ie).call(this,1,()=>{u(h,this)&&(u(h,this).style.transition=`opacity 0.4s`,u(h,this).style.opacity=`0`),setTimeout(e,400)})})}async complete(){await this.runCompleteAnimation(),this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,composed:!0}))}render(){return n` u.props.envSuggestions);f(()=>u.props.readOnly);let p=f(()=>u.props.templateSuggestions);function m(e){return s.sites.find(t=>t.uid===e)?.name??e}let{table:h}=E({data:()=>s.modelValue,key:`uid`,name:`siteOverrides`,onChange:e=>i(`update:modelValue`,e),columns:({columnHelper:e})=>[e.display({id:`name`,header:g(`Site`),cell:({row:e})=>m(e.original.uid),meta:{cellTag:`th`}}),e.autocomplete(`fromEmail`,{header:g(`System Email Address`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:d.value}),e.autocomplete(`fromName`,{header:g(`Sender Name`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:d.value}),e.autocomplete(`replyToEmail`,{header:g(`Reply-To Address`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:d.value}),e.autocomplete(`template`,{header:g(`HTML Email Template`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:p.value})]});return(e,t)=>(r(),o(v,{padding:0,appearance:`raised`},{default:n(()=>[a(_,{table:l(h),reorderable:!1},null,8,[`table`])]),_:1}))}}),D=e=>({url:D.url(e),method:`get`});D.definition={methods:[`get`,`head`],url:`/admin/settings/email`},D.url=e=>D.definition.url+x(e),D.get=e=>({url:D.url(e),method:`get`}),D.head=e=>({url:D.url(e),method:`head`});var O=e=>({url:O.url(e),method:`post`});O.definition={methods:[`post`],url:`/admin/settings/email`},O.url=e=>O.definition.url+x(e),O.post=e=>({url:O.url(e),method:`post`});var k=e=>({url:k.url(e),method:`post`});k.definition={methods:[`post`],url:`/admin/settings/email/test`},k.url=e=>k.definition.url+x(e),k.post=e=>({url:k.url(e),method:`post`}),Object.assign(D,D),Object.assign(O,O),Object.assign(k,k);var A={key:0,class:`flex gap-1 items-center text-sm`},j={key:1,class:`tw:flex tw:gap-1 tw:items-center tw:text-sm`},M={key:0},N=[`loading`],P={slot:`invoker`,variant:`primary`,type:`button`,icon:``},F=[`label`],I={slot:`content`},L={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},R={class:`grid gap-3 p-5`},z={key:0,variant:`danger`,icon:`triangle-exclamation`},B={slot:`title`,class:`tw:font-bold`},V={class:`p-5`},H={class:`mb-2`},U={class:`text-sm text-neutral-text-quiet mb-4`},W={class:`p-5`},G={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm mt-6`},K={class:`p-5`},q={class:`mb-3`},J={class:`grid gap-3`},Y={key:0,variant:`success`,icon:`circle-check`},X={class:`buttons`},Z=[`loading`],Q=t({__name:`SettingsEmailPage`,props:{readOnly:{type:Boolean},emailConfig:{},mailerOptions:{},envSuggestions:{},templateSuggestions:{},sites:{},defaultToEmail:{},flash:{},errors:{}},setup(t){let c=t,_=f(()=>c.flash),v=f(()=>c.errors),x=f(()=>c.sites.length>1),E={};for(let e of c.sites){let t=c.emailConfig.siteOverrides?.[e.uid]??{};E[e.uid]={fromEmail:t.fromEmail??``,fromName:t.fromName??``,replyToEmail:t.replyToEmail??``,template:t.template??``}}let D=d({fromEmail:c.emailConfig.fromEmail??``,fromName:c.emailConfig.fromName??``,replyToEmail:c.emailConfig.replyToEmail??``,mailer:c.emailConfig.mailer??``,template:c.emailConfig.template??``,siteOverrides:E}),Q=d({to:c.defaultToEmail});b(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),$())});function $(){D.clearErrors().submit(O())}function ne(){Q.clearErrors().submit(k(),{onSuccess:()=>{Q.reset()}})}return(c,d)=>(r(),i(`form`,{onSubmit:u($,[`prevent`])},[a(w,{title:l(g)(`Email Settings`)},{actions:n(()=>[a(y,null,{default:n(()=>[l(D).recentlySuccessful&&_.value?.success?(r(),i(`div`,A,[d[7]||=h(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),p(` `+e(_.value.success),1)])):m(``,!0),l(D).hasErrors?(r(),i(`div`,j,[d[8]||=h(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),p(` `+e(l(g)(`Could not save settings`)),1)])):m(``,!0)]),_:1}),t.readOnly?m(``,!0):(r(),i(`craft-button-group`,M,[h(`craft-button`,{type:`submit`,variant:`primary`,loading:l(D).processing},e(l(g)(`Save`)),9,N),h(`craft-action-menu`,null,[h(`craft-button`,P,[h(`craft-icon`,{name:`chevron-down`,label:l(g)(`More actions`)},null,8,F)]),h(`div`,I,[h(`craft-action-item`,{onClick:$},[p(e(l(g)(`Save and continue editing`))+` `,1),d[9]||=h(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)])])])]))]),default:n(()=>[h(`div`,L,[t.readOnly?(r(),o(T,{key:0})):m(``,!0),h(`div`,R,[l(D).hasErrors?(r(),i(`craft-callout`,z,[h(`div`,B,e(l(g)(`Could not save settings`)),1),h(`ul`,null,[(r(!0),i(s,null,ee(v.value,(t,n)=>(r(),i(`li`,{key:n},e(t),1))),128))])])):m(``,!0),a(C,{label:l(g)(`System Email Address`),"help-text":l(g)(`The email address Craft CMS will use when sending email.`),id:`fromEmail`,name:`fromEmail`,modelValue:l(D).fromEmail,"onUpdate:modelValue":d[0]||=e=>l(D).fromEmail=e,error:l(D).errors?.fromEmail,options:t.envSuggestions,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`options`,`disabled`]),a(C,{label:l(g)(`Sender Name`),"help-text":l(g)(`The “From” name Craft CMS will use when sending email.`),id:`fromName`,name:`fromName`,modelValue:l(D).fromName,"onUpdate:modelValue":d[1]||=e=>l(D).fromName=e,error:l(D).errors?.fromName,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,options:t.envSuggestions,callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`]),a(C,{label:l(g)(`Reply-To Address`),"help-text":l(g)(`The Reply-To email address Craft CMS should use when sending email.`),id:`replyToEmail`,name:`replyToEmail`,modelValue:l(D).replyToEmail,"onUpdate:modelValue":d[2]||=e=>l(D).replyToEmail=e,error:l(D).errors?.replyToEmail,disabled:t.readOnly,"require-option-match":!1,options:t.envSuggestions,"show-all-on-empty":``,callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`]),a(C,{label:l(g)(`HTML Email Template`),"help-text":l(g)(`The template Craft CMS will use for HTML emails. Leave blank to use the default template.`),id:`template`,name:`template`,modelValue:l(D).template,"onUpdate:modelValue":d[3]||=e=>l(D).template=e,error:v.value?.template,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,options:[...t.templateSuggestions,...t.envSuggestions],callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`])]),x.value?(r(),i(s,{key:1},[d[10]||=h(`hr`,null,null,-1),h(`div`,V,[h(`h2`,H,e(l(g)(`Site Overrides`)),1),h(`p`,U,e(l(g)(`Override the default email settings on a per-site basis. Blank values will use the defaults above.`)),1),a(te,{modelValue:l(D).siteOverrides,"onUpdate:modelValue":d[4]||=e=>l(D).siteOverrides=e,sites:t.sites},null,8,[`modelValue`,`sites`])])],64)):m(``,!0),d[11]||=h(`hr`,null,null,-1),h(`div`,W,[a(C,{label:l(g)(`Mailer`),"help-text":l(g)(`How should Craft CMS send the emails?`),id:`mailer`,name:`mailer`,modelValue:l(D).mailer,"onUpdate:modelValue":d[5]||=e=>l(D).mailer=e,error:l(D).errors?.mailer,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,options:[...t.mailerOptions,...t.envSuggestions],callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`])])]),h(`div`,G,[h(`div`,K,[h(`h2`,q,e(l(g)(`Send a test email`)),1),h(`div`,J,[a(S,{label:l(g)(`To`),modelValue:l(Q).to,"onUpdate:modelValue":d[6]||=e=>l(Q).to=e,name:`to`,error:l(Q).errors.to},null,8,[`label`,`modelValue`,`error`]),a(y,null,{default:n(()=>[l(Q).recentlySuccessful&&_.value?.success?(r(),i(`craft-callout`,Y,e(_.value.success),1)):m(``,!0)]),_:1}),h(`div`,X,[h(`craft-button`,{type:`button`,variant:`primary`,loading:l(Q).processing,onClick:ne},e(l(g)(`Test`)),9,Z)])])])])]),_:1},8,[`title`])],32))}});export{Q as default}; \ No newline at end of file +import{$ as e,E as t,J as n,L as r,S as i,T as a,b as o,h as s,l as c,lt as l,m as u,s as d,v as f,w as p,x as m,y as h,z as ee}from"./_plugin-vue_export-helper.js";import{r as g}from"./nav-item-9g3ebwBJ.js";import{t as _}from"./AdminTable.js";import{t as v}from"./Pane.js";import{n as y}from"./useAnnouncer.js";import{n as b}from"./dist.js";import{n as x}from"./wayfinder.js";import{t as S}from"./Input.js";import{t as C}from"./CraftCombobox.js";import{t as w}from"./AppLayout.js";import{t as T}from"./CalloutReadOnly.js";import{t as E}from"./useEditableTable.js";var te=t({__name:`SiteOverridesTable`,props:{sites:{},modelValue:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let i=t,s=e,u=c(),d=f(()=>u.props.envSuggestions);f(()=>u.props.readOnly);let p=f(()=>u.props.templateSuggestions);function m(e){return s.sites.find(t=>t.uid===e)?.name??e}let{table:h}=E({data:()=>s.modelValue,key:`uid`,name:`siteOverrides`,onChange:e=>i(`update:modelValue`,e),columns:({columnHelper:e})=>[e.display({id:`name`,header:g(`Site`),cell:({row:e})=>m(e.original.uid),meta:{cellTag:`th`}}),e.autocomplete(`fromEmail`,{header:g(`System Email Address`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:d.value}),e.autocomplete(`fromName`,{header:g(`Sender Name`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:d.value}),e.autocomplete(`replyToEmail`,{header:g(`Reply-To Address`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:d.value}),e.autocomplete(`template`,{header:g(`HTML Email Template`),class:`font-mono text-xs !px-[var(--_cell-spacing-inline)]`,options:p.value})]});return(e,t)=>(r(),o(v,{padding:0,appearance:`raised`},{default:n(()=>[a(_,{table:l(h),reorderable:!1},null,8,[`table`])]),_:1}))}}),D=e=>({url:D.url(e),method:`get`});D.definition={methods:[`get`,`head`],url:`/admin/settings/email`},D.url=e=>D.definition.url+x(e),D.get=e=>({url:D.url(e),method:`get`}),D.head=e=>({url:D.url(e),method:`head`});var O=e=>({url:O.url(e),method:`post`});O.definition={methods:[`post`],url:`/admin/settings/email`},O.url=e=>O.definition.url+x(e),O.post=e=>({url:O.url(e),method:`post`});var k=e=>({url:k.url(e),method:`post`});k.definition={methods:[`post`],url:`/admin/settings/email/test`},k.url=e=>k.definition.url+x(e),k.post=e=>({url:k.url(e),method:`post`}),Object.assign(D,D),Object.assign(O,O),Object.assign(k,k);var A={key:0,class:`flex gap-1 items-center text-sm`},j={key:1,class:`tw:flex tw:gap-1 tw:items-center tw:text-sm`},M={key:0},N=[`loading`],P={slot:`invoker`,variant:`accent`,type:`button`,icon:``},F=[`label`],I={slot:`content`},L={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},R={class:`grid gap-3 p-5`},z={key:0,variant:`danger`,icon:`triangle-exclamation`},B={slot:`title`,class:`tw:font-bold`},V={class:`p-5`},H={class:`mb-2`},U={class:`text-sm text-neutral-text-quiet mb-4`},W={class:`p-5`},G={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm mt-6`},K={class:`p-5`},q={class:`mb-3`},J={class:`grid gap-3`},Y={key:0,variant:`success`,icon:`circle-check`},X={class:`buttons`},Z=[`loading`],Q=t({__name:`SettingsEmailPage`,props:{readOnly:{type:Boolean},emailConfig:{},mailerOptions:{},envSuggestions:{},templateSuggestions:{},sites:{},defaultToEmail:{},flash:{},errors:{}},setup(t){let c=t,_=f(()=>c.flash),v=f(()=>c.errors),x=f(()=>c.sites.length>1),E={};for(let e of c.sites){let t=c.emailConfig.siteOverrides?.[e.uid]??{};E[e.uid]={fromEmail:t.fromEmail??``,fromName:t.fromName??``,replyToEmail:t.replyToEmail??``,template:t.template??``}}let D=d({fromEmail:c.emailConfig.fromEmail??``,fromName:c.emailConfig.fromName??``,replyToEmail:c.emailConfig.replyToEmail??``,mailer:c.emailConfig.mailer??``,template:c.emailConfig.template??``,siteOverrides:E}),Q=d({to:c.defaultToEmail});b(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),$())});function $(){D.clearErrors().submit(O())}function ne(){Q.clearErrors().submit(k(),{onSuccess:()=>{Q.reset()}})}return(c,d)=>(r(),i(`form`,{onSubmit:u($,[`prevent`])},[a(w,{title:l(g)(`Email Settings`)},{actions:n(()=>[a(y,null,{default:n(()=>[l(D).recentlySuccessful&&_.value?.success?(r(),i(`div`,A,[d[7]||=h(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),p(` `+e(_.value.success),1)])):m(``,!0),l(D).hasErrors?(r(),i(`div`,j,[d[8]||=h(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),p(` `+e(l(g)(`Could not save settings`)),1)])):m(``,!0)]),_:1}),t.readOnly?m(``,!0):(r(),i(`craft-button-group`,M,[h(`craft-button`,{type:`submit`,variant:`accent`,loading:l(D).processing},e(l(g)(`Save`)),9,N),h(`craft-action-menu`,null,[h(`craft-button`,P,[h(`craft-icon`,{name:`chevron-down`,label:l(g)(`More actions`)},null,8,F)]),h(`div`,I,[h(`craft-action-item`,{onClick:$},[p(e(l(g)(`Save and continue editing`))+` `,1),d[9]||=h(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)])])])]))]),default:n(()=>[h(`div`,L,[t.readOnly?(r(),o(T,{key:0})):m(``,!0),h(`div`,R,[l(D).hasErrors?(r(),i(`craft-callout`,z,[h(`div`,B,e(l(g)(`Could not save settings`)),1),h(`ul`,null,[(r(!0),i(s,null,ee(v.value,(t,n)=>(r(),i(`li`,{key:n},e(t),1))),128))])])):m(``,!0),a(C,{label:l(g)(`System Email Address`),"help-text":l(g)(`The email address Craft CMS will use when sending email.`),id:`fromEmail`,name:`fromEmail`,modelValue:l(D).fromEmail,"onUpdate:modelValue":d[0]||=e=>l(D).fromEmail=e,error:l(D).errors?.fromEmail,options:t.envSuggestions,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`options`,`disabled`]),a(C,{label:l(g)(`Sender Name`),"help-text":l(g)(`The “From” name Craft CMS will use when sending email.`),id:`fromName`,name:`fromName`,modelValue:l(D).fromName,"onUpdate:modelValue":d[1]||=e=>l(D).fromName=e,error:l(D).errors?.fromName,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,options:t.envSuggestions,callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`]),a(C,{label:l(g)(`Reply-To Address`),"help-text":l(g)(`The Reply-To email address Craft CMS should use when sending email.`),id:`replyToEmail`,name:`replyToEmail`,modelValue:l(D).replyToEmail,"onUpdate:modelValue":d[2]||=e=>l(D).replyToEmail=e,error:l(D).errors?.replyToEmail,disabled:t.readOnly,"require-option-match":!1,options:t.envSuggestions,"show-all-on-empty":``,callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`]),a(C,{label:l(g)(`HTML Email Template`),"help-text":l(g)(`The template Craft CMS will use for HTML emails. Leave blank to use the default template.`),id:`template`,name:`template`,modelValue:l(D).template,"onUpdate:modelValue":d[3]||=e=>l(D).template=e,error:v.value?.template,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,options:[...t.templateSuggestions,...t.envSuggestions],callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`])]),x.value?(r(),i(s,{key:1},[d[10]||=h(`hr`,null,null,-1),h(`div`,V,[h(`h2`,H,e(l(g)(`Site Overrides`)),1),h(`p`,U,e(l(g)(`Override the default email settings on a per-site basis. Blank values will use the defaults above.`)),1),a(te,{modelValue:l(D).siteOverrides,"onUpdate:modelValue":d[4]||=e=>l(D).siteOverrides=e,sites:t.sites},null,8,[`modelValue`,`sites`])])],64)):m(``,!0),d[11]||=h(`hr`,null,null,-1),h(`div`,W,[a(C,{label:l(g)(`Mailer`),"help-text":l(g)(`How should Craft CMS send the emails?`),id:`mailer`,name:`mailer`,modelValue:l(D).mailer,"onUpdate:modelValue":d[5]||=e=>l(D).mailer=e,error:l(D).errors?.mailer,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``,options:[...t.mailerOptions,...t.envSuggestions],callouts:[`envVars`]},null,8,[`label`,`help-text`,`modelValue`,`error`,`disabled`,`options`])])]),h(`div`,G,[h(`div`,K,[h(`h2`,q,e(l(g)(`Send a test email`)),1),h(`div`,J,[a(S,{label:l(g)(`To`),modelValue:l(Q).to,"onUpdate:modelValue":d[6]||=e=>l(Q).to=e,name:`to`,error:l(Q).errors.to},null,8,[`label`,`modelValue`,`error`]),a(y,null,{default:n(()=>[l(Q).recentlySuccessful&&_.value?.success?(r(),i(`craft-callout`,Y,e(_.value.success),1)):m(``,!0)]),_:1}),h(`div`,X,[h(`craft-button`,{type:`button`,variant:`accent`,loading:l(Q).processing,onClick:ne},e(l(g)(`Test`)),9,Z)])])])])]),_:1},8,[`title`])],32))}});export{Q as default}; \ No newline at end of file diff --git a/resources/build/SettingsGeneralPage.js b/resources/build/SettingsGeneralPage.js index 864347ad91f..8be7723d847 100644 --- a/resources/build/SettingsGeneralPage.js +++ b/resources/build/SettingsGeneralPage.js @@ -1 +1 @@ -import{$ as e,E as t,J as n,L as r,S as i,T as a,Y as o,b as ee,h as s,lt as c,m as l,p as u,s as d,t as f,v as p,w as m,x as h,y as g,z as _}from"./_plugin-vue_export-helper.js";import{r as v}from"./nav-item-9g3ebwBJ.js";import{n as te}from"./useAnnouncer.js";import{n as ne}from"./dist.js";import{n as y}from"./wayfinder.js";import{t as re}from"./AppLayout.js";import{t as b}from"./CalloutReadOnly.js";var x=e=>({url:x.url(e),method:`get`});x.definition={methods:[`get`,`head`],url:`/admin/settings/general`},x.url=e=>x.definition.url+y(e),x.get=e=>({url:x.url(e),method:`get`}),x.head=e=>({url:x.url(e),method:`head`});var S=e=>({url:S.url(e),method:`post`});S.definition={methods:[`post`],url:`/admin/settings/general`},S.url=e=>S.definition.url+y(e),S.post=e=>({url:S.url(e),method:`post`});var C={key:0,class:`flex gap-1 items-center text-sm`},w={key:1,class:`tw:flex tw:gap-1 tw:items-center tw:text-sm`},T={key:0},E=[`loading`],D={slot:`invoker`,variant:`primary`,type:`button`,icon:``},O=[`label`],k={slot:`content`},A={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},j={class:`grid gap-3 p-5`},M={key:0,variant:`danger`,icon:`triangle-exclamation`},N={slot:`title`,class:`tw:font-bold`},P=[`label`,`has-feedback-for`,`disabled`],F=[`.choiceValue`,`.hint`],I={slot:`after`},L={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},R={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},z={slot:`feedback`},ie={key:0,class:`error-list`},B=[`label`,`.modelValue`,`has-feedback-for`,`disabled`],V={class:`tw:flex tw:items-center tw:gap-1`},H={class:`tw:flex tw:items-center tw:gap-1`},U=[`.choiceValue`],W={class:`tw:flex tw:items-center tw:gap-1`},G=[`variant`],K={class:`tw:font-mono`},q=[`innerHTML`],J={slot:`feedback`},Y={key:0,class:`error-list`},ae=[`label`,`has-feedback-for`,`disabled`],oe=[`innerHTML`],se={key:0,class:`error-list`,slot:`feedback`},ce=[`label`,`.modelValue`,`has-feedback-for`,`disabled`],le=[`.choiceValue`],X={key:0,class:`error-list`,slot:`feedback`},Z=f(t({__name:`SettingsGeneralPage`,props:{readOnly:{type:Boolean},system:{},nameSuggestions:{},timezoneOptions:{},systemStatusOptions:{},saveUrl:{},flash:{},errors:{}},setup(t){let f=t,y=p(()=>f.flash),x=p(()=>f.errors),Z=d({name:f.system.name,live:f.system.live,retryDuration:f.system.retryDuration,timeZone:f.system.timeZone});function Q(e){let t=e.target;t&&(Z[t.name]=t.modelValue)}ne(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),$())});function $(){Z.clearErrors().submit(S())}return(d,f)=>(r(),i(`form`,{onSubmit:l($,[`prevent`])},[a(re,{title:c(v)(`General Settings`)},{actions:n(()=>[a(te,null,{default:n(()=>[c(Z).recentlySuccessful&&y.value?.success?(r(),i(`div`,C,[f[2]||=g(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),m(` `+e(y.value.success),1)])):h(``,!0),c(Z).hasErrors?(r(),i(`div`,w,[f[3]||=g(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),m(` `+e(c(v)(`Could not save settings`)),1)])):h(``,!0)]),_:1}),t.readOnly?h(``,!0):(r(),i(`craft-button-group`,T,[g(`craft-button`,{type:`submit`,variant:`primary`,loading:c(Z).processing},e(c(v)(`Save`)),9,E),g(`craft-action-menu`,null,[g(`craft-button`,D,[g(`craft-icon`,{name:`chevron-down`,label:c(v)(`More actions`)},null,8,O)]),g(`div`,k,[g(`craft-action-item`,{onClick:$},[m(e(c(v)(`Save and continue editing`))+` `,1),f[4]||=g(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)])])])]))]),default:n(()=>[g(`div`,A,[t.readOnly?(r(),ee(b,{key:0})):h(``,!0),g(`div`,j,[c(Z).hasErrors?(r(),i(`craft-callout`,M,[g(`div`,N,e(c(v)(`Could not save settings`)),1),g(`ul`,null,[(r(!0),i(s,null,_(x.value,(t,n)=>(r(),i(`li`,null,e(t),1))),256))])])):h(``,!0),o(g(`craft-combobox`,{label:c(v)(`System Name`),id:`name`,name:`name`,"onUpdate:modelValue":f[0]||=e=>c(Z).name=e,"has-feedback-for":x.value?.name?`error`:``,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``},[(r(!0),i(s,null,_(t.nameSuggestions,(t,n)=>(r(),i(s,{key:n},[(r(!0),i(s,null,_(t.data,t=>(r(),i(`craft-option`,{key:t.name,".choiceValue":t.name,".hint":t.hint},e(t.name),41,F))),128))],64))),128)),g(`div`,I,[g(`craft-callout`,L,[m(e(c(v)(`This can begin with an environment variable.`))+` `,1),g(`a`,R,e(c(v)(`Learn more`)),1)])]),g(`div`,z,[x.value?.name?(r(),i(`ul`,ie,[g(`li`,null,e(x.value.name),1)])):h(``,!0)])],8,P),[[u,c(Z).name]]),g(`craft-combobox`,{label:c(v)(`System Status`),id:`live`,name:`live`,".modelValue":t.system.live?`1`:`0`,"has-feedback-for":x.value?.live?`error`:``,onModelValueChanged:Q,disabled:t.readOnly,"show-all-on-empty":``},[g(`craft-option`,{".choiceValue":`1`},[g(`div`,V,[f[5]||=g(`craft-indicator`,{variant:`success`},null,-1),g(`span`,null,e(c(v)(`Online`)),1)])],32),g(`craft-option`,{".choiceValue":`0`},[g(`div`,H,[f[6]||=g(`craft-indicator`,{variant:`danger`},null,-1),g(`span`,null,e(c(v)(`Offline`)),1)])],32),(r(!0),i(s,null,_(t.systemStatusOptions,t=>(r(),i(s,{key:t.label},[t.optgroup?(r(),i(s,{key:0},[],64)):(r(),i(`craft-option`,{key:1,".choiceValue":t.value},[g(`div`,W,[g(`craft-indicator`,{variant:t.value?`success`:`error`},null,8,G),g(`span`,K,e(t.label),1)])],40,U))],64))),128)),g(`craft-callout`,{slot:`after`,variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`,innerHTML:c(v)(`This can be set to an environment variable with a boolean value ({examples})`,{examples:`yes/no/true/false/on/off/0/1`})},null,8,q),g(`div`,J,[x.value.live?(r(),i(`ul`,Y,[g(`li`,null,e(x.value.live),1)])):h(``,!0)])],40,B),o(g(`craft-input`,{label:c(v)(`Retry Duration`),id:`retry-duration`,name:`retryDuration`,"onUpdate:modelValue":f[1]||=e=>c(Z).retryDuration=e,"has-feedback-for":x.value?.retryDuration?`error`:``,inputmode:`numeric`,maxlength:`4`,disabled:t.readOnly},[g(`div`,{slot:`help-text`,innerHTML:c(v)(`The number of seconds that the Retry-After HTTP header should be set to for 503 responses when the system is offline.`)},null,8,oe),x.value?.retryDuration?(r(),i(`ul`,se,[g(`li`,null,e(x.value.retryDuration),1)])):h(``,!0)],8,ae),[[u,c(Z).retryDuration]]),g(`craft-combobox`,{label:c(v)(`Time Zone`),id:`time-zone`,name:`timeZone`,".modelValue":c(Z).timeZone,onModelValueChanged:Q,"has-feedback-for":x.value?.timeZone?`error`:``,disabled:t.readOnly,"show-all-on-empty":``},[(r(!0),i(s,null,_(t.timezoneOptions,t=>(r(),i(`craft-option`,{key:t.value,".choiceValue":t.value},e(t.label)+e(t.data?.hint?` — ${t.data.hint}`:``),41,le))),128)),f[7]||=g(`craft-callout`,{slot:`after`,variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},[m(` This can be set to an environment variable with a value of a `),g(`a`,{href:`https://www.php.net/manual/en/timezones.php`,rel:`noopener`,target:`_blank`},`supported time zone`),m(`. `)],-1),x.value?.timeZone?(r(),i(`ul`,X,[g(`li`,null,e(x.value.timeZone),1)])):h(``,!0)],40,ce)])])]),_:1},8,[`title`])],32))}}),[[`__scopeId`,`data-v-0665d962`]]);export{Z as default}; \ No newline at end of file +import{$ as e,E as t,J as n,L as r,S as i,T as a,Y as o,b as ee,h as s,lt as c,m as l,p as u,s as d,t as f,v as p,w as m,x as h,y as g,z as _}from"./_plugin-vue_export-helper.js";import{r as v}from"./nav-item-9g3ebwBJ.js";import{n as te}from"./useAnnouncer.js";import{n as ne}from"./dist.js";import{n as y}from"./wayfinder.js";import{t as re}from"./AppLayout.js";import{t as b}from"./CalloutReadOnly.js";var x=e=>({url:x.url(e),method:`get`});x.definition={methods:[`get`,`head`],url:`/admin/settings/general`},x.url=e=>x.definition.url+y(e),x.get=e=>({url:x.url(e),method:`get`}),x.head=e=>({url:x.url(e),method:`head`});var S=e=>({url:S.url(e),method:`post`});S.definition={methods:[`post`],url:`/admin/settings/general`},S.url=e=>S.definition.url+y(e),S.post=e=>({url:S.url(e),method:`post`});var C={key:0,class:`flex gap-1 items-center text-sm`},w={key:1,class:`tw:flex tw:gap-1 tw:items-center tw:text-sm`},T={key:0},E=[`loading`],D={slot:`invoker`,variant:`accent`,type:`button`,icon:``},O=[`label`],k={slot:`content`},A={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},j={class:`grid gap-3 p-5`},M={key:0,variant:`danger`,icon:`triangle-exclamation`},N={slot:`title`,class:`tw:font-bold`},P=[`label`,`has-feedback-for`,`disabled`],F=[`.choiceValue`,`.hint`],I={slot:`after`},L={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},R={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},z={slot:`feedback`},ie={key:0,class:`error-list`},B=[`label`,`.modelValue`,`has-feedback-for`,`disabled`],V={class:`tw:flex tw:items-center tw:gap-1`},H={class:`tw:flex tw:items-center tw:gap-1`},U=[`.choiceValue`],W={class:`tw:flex tw:items-center tw:gap-1`},G=[`variant`],K={class:`tw:font-mono`},q=[`innerHTML`],J={slot:`feedback`},Y={key:0,class:`error-list`},ae=[`label`,`has-feedback-for`,`disabled`],oe=[`innerHTML`],se={key:0,class:`error-list`,slot:`feedback`},ce=[`label`,`.modelValue`,`has-feedback-for`,`disabled`],le=[`.choiceValue`],X={key:0,class:`error-list`,slot:`feedback`},Z=f(t({__name:`SettingsGeneralPage`,props:{readOnly:{type:Boolean},system:{},nameSuggestions:{},timezoneOptions:{},systemStatusOptions:{},saveUrl:{},flash:{},errors:{}},setup(t){let f=t,y=p(()=>f.flash),x=p(()=>f.errors),Z=d({name:f.system.name,live:f.system.live,retryDuration:f.system.retryDuration,timeZone:f.system.timeZone});function Q(e){let t=e.target;t&&(Z[t.name]=t.modelValue)}ne(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),$())});function $(){Z.clearErrors().submit(S())}return(d,f)=>(r(),i(`form`,{onSubmit:l($,[`prevent`])},[a(re,{title:c(v)(`General Settings`)},{actions:n(()=>[a(te,null,{default:n(()=>[c(Z).recentlySuccessful&&y.value?.success?(r(),i(`div`,C,[f[2]||=g(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),m(` `+e(y.value.success),1)])):h(``,!0),c(Z).hasErrors?(r(),i(`div`,w,[f[3]||=g(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),m(` `+e(c(v)(`Could not save settings`)),1)])):h(``,!0)]),_:1}),t.readOnly?h(``,!0):(r(),i(`craft-button-group`,T,[g(`craft-button`,{type:`submit`,variant:`accent`,loading:c(Z).processing},e(c(v)(`Save`)),9,E),g(`craft-action-menu`,null,[g(`craft-button`,D,[g(`craft-icon`,{name:`chevron-down`,label:c(v)(`More actions`)},null,8,O)]),g(`div`,k,[g(`craft-action-item`,{onClick:$},[m(e(c(v)(`Save and continue editing`))+` `,1),f[4]||=g(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)])])])]))]),default:n(()=>[g(`div`,A,[t.readOnly?(r(),ee(b,{key:0})):h(``,!0),g(`div`,j,[c(Z).hasErrors?(r(),i(`craft-callout`,M,[g(`div`,N,e(c(v)(`Could not save settings`)),1),g(`ul`,null,[(r(!0),i(s,null,_(x.value,(t,n)=>(r(),i(`li`,null,e(t),1))),256))])])):h(``,!0),o(g(`craft-combobox`,{label:c(v)(`System Name`),id:`name`,name:`name`,"onUpdate:modelValue":f[0]||=e=>c(Z).name=e,"has-feedback-for":x.value?.name?`error`:``,disabled:t.readOnly,"require-option-match":!1,"show-all-on-empty":``},[(r(!0),i(s,null,_(t.nameSuggestions,(t,n)=>(r(),i(s,{key:n},[(r(!0),i(s,null,_(t.data,t=>(r(),i(`craft-option`,{key:t.name,".choiceValue":t.name,".hint":t.hint},e(t.name),41,F))),128))],64))),128)),g(`div`,I,[g(`craft-callout`,L,[m(e(c(v)(`This can begin with an environment variable.`))+` `,1),g(`a`,R,e(c(v)(`Learn more`)),1)])]),g(`div`,z,[x.value?.name?(r(),i(`ul`,ie,[g(`li`,null,e(x.value.name),1)])):h(``,!0)])],8,P),[[u,c(Z).name]]),g(`craft-combobox`,{label:c(v)(`System Status`),id:`live`,name:`live`,".modelValue":t.system.live?`1`:`0`,"has-feedback-for":x.value?.live?`error`:``,onModelValueChanged:Q,disabled:t.readOnly,"show-all-on-empty":``},[g(`craft-option`,{".choiceValue":`1`},[g(`div`,V,[f[5]||=g(`craft-indicator`,{variant:`success`},null,-1),g(`span`,null,e(c(v)(`Online`)),1)])],32),g(`craft-option`,{".choiceValue":`0`},[g(`div`,H,[f[6]||=g(`craft-indicator`,{variant:`danger`},null,-1),g(`span`,null,e(c(v)(`Offline`)),1)])],32),(r(!0),i(s,null,_(t.systemStatusOptions,t=>(r(),i(s,{key:t.label},[t.optgroup?(r(),i(s,{key:0},[],64)):(r(),i(`craft-option`,{key:1,".choiceValue":t.value},[g(`div`,W,[g(`craft-indicator`,{variant:t.value?`success`:`error`},null,8,G),g(`span`,K,e(t.label),1)])],40,U))],64))),128)),g(`craft-callout`,{slot:`after`,variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`,innerHTML:c(v)(`This can be set to an environment variable with a boolean value ({examples})`,{examples:`yes/no/true/false/on/off/0/1`})},null,8,q),g(`div`,J,[x.value.live?(r(),i(`ul`,Y,[g(`li`,null,e(x.value.live),1)])):h(``,!0)])],40,B),o(g(`craft-input`,{label:c(v)(`Retry Duration`),id:`retry-duration`,name:`retryDuration`,"onUpdate:modelValue":f[1]||=e=>c(Z).retryDuration=e,"has-feedback-for":x.value?.retryDuration?`error`:``,inputmode:`numeric`,maxlength:`4`,disabled:t.readOnly},[g(`div`,{slot:`help-text`,innerHTML:c(v)(`The number of seconds that the Retry-After HTTP header should be set to for 503 responses when the system is offline.`)},null,8,oe),x.value?.retryDuration?(r(),i(`ul`,se,[g(`li`,null,e(x.value.retryDuration),1)])):h(``,!0)],8,ae),[[u,c(Z).retryDuration]]),g(`craft-combobox`,{label:c(v)(`Time Zone`),id:`time-zone`,name:`timeZone`,".modelValue":c(Z).timeZone,onModelValueChanged:Q,"has-feedback-for":x.value?.timeZone?`error`:``,disabled:t.readOnly,"show-all-on-empty":``},[(r(!0),i(s,null,_(t.timezoneOptions,t=>(r(),i(`craft-option`,{key:t.value,".choiceValue":t.value},e(t.label)+e(t.data?.hint?` — ${t.data.hint}`:``),41,le))),128)),f[7]||=g(`craft-callout`,{slot:`after`,variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},[m(` This can be set to an environment variable with a value of a `),g(`a`,{href:`https://www.php.net/manual/en/timezones.php`,rel:`noopener`,target:`_blank`},`supported time zone`),m(`. `)],-1),x.value?.timeZone?(r(),i(`ul`,X,[g(`li`,null,e(x.value.timeZone),1)])):h(``,!0)],40,ce)])])]),_:1},8,[`title`])],32))}}),[[`__scopeId`,`data-v-c64a1879`]]);export{Z as default}; \ No newline at end of file diff --git a/resources/build/SettingsSectionsEditPage.js b/resources/build/SettingsSectionsEditPage.js index 7646341278c..4094dddbb94 100644 --- a/resources/build/SettingsSectionsEditPage.js +++ b/resources/build/SettingsSectionsEditPage.js @@ -1 +1 @@ -import{$ as e,B as t,E as n,J as r,L as i,M as a,N as o,S as s,T as c,U as l,b as u,dt as d,ft as f,h as p,it as m,k as h,l as g,lt as _,m as ee,s as te,t as v,v as y,w as b,x,y as S,z as C}from"./_plugin-vue_export-helper.js";import{r as w}from"./nav-item-9g3ebwBJ.js";import{i as T,n as ne,r as re,t as E}from"./AdminTable.js";import{n as D}from"./Select.js";import{t as O}from"./Pane.js";import{n as ie}from"./useAnnouncer.js";import{n as ae}from"./dist.js";import{n as k,r as oe,t as A}from"./wayfinder.js";import{t as j}from"./CraftInput.js";import{t as se}from"./AppLayout.js";import{t as ce}from"./CalloutReadOnly.js";import{n as le,t as M}from"./useEditableTable.js";import{a as ue}from"./SectionsController.js";import{t as N}from"./useInputGenerator.js";var de=[`.modelValue`,`has-feedbck-for`],P={slot:`feedback`},F={key:0,class:`error-list`},I=n({name:`CraftInputHandle`,__name:`CraftInputHandle`,props:a({error:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=l(n,`modelValue`);return(a,c)=>(i(),s(`craft-input-handle`,o(a.$attrs,{".modelValue":r.value,onModelValueChanged:c[0]||=e=>r.value=e.target?.modelValue,"has-feedbck-for":n.error?`error`:``}),[t(a.$slots,`default`),S(`div`,P,[n.error?(i(),s(`ul`,F,[S(`li`,null,e(n.error),1)])):x(``,!0)])],48,de))}}),L={type:`button`,slot:`invoker`,icon:``,size:`small`,variant:`inherit`,appearance:`plain`},R=[`name`,`label`],z={slot:`content`,class:`m-sm`},B=[`onClick`],V=[`onClick`],H=v(n({__name:`ActionMenu`,props:{icon:{default:`ellipsis`},label:{default:w(`Actions`)},actions:{}},setup(t){let n=t,r=y(()=>n.actions.filter(e=>e.variant&&e.variant===`danger`)),a=y(()=>n.actions.filter(e=>!e.variant||e.variant!==`danger`));return(n,c)=>(i(),s(`craft-action-menu`,null,[S(`craft-button`,L,[S(`craft-icon`,{name:t.icon,label:t.label},null,8,R)]),S(`div`,z,[(i(!0),s(p,null,C(a.value,(t,n)=>(i(),s(`craft-action-item`,o({key:`safe-${n}`,onClick:e=>t.onClick?.()},{ref_for:!0},t),e(t.label),17,B))),128)),c[0]||=S(`hr`,{class:`m-0`},null,-1),(i(!0),s(p,null,C(r.value,(t,n)=>(i(),s(`craft-action-item`,o({key:`dangerous-${n}`,onClick:e=>t.onClick?.()},{ref_for:!0},t),e(t.label),17,V))),128))])]))}}),[[`__scopeId`,`data-v-3697a5e3`]]),U=e=>({url:U.url(e),method:`get`});U.definition={methods:[`get`,`head`],url:`/admin/actions/entry-types/table-data`},U.url=e=>U.definition.url+k(e),U.get=e=>({url:U.url(e),method:`get`}),U.head=e=>({url:U.url(e),method:`head`});var W=(e,t)=>({url:W.url(e,t),method:`get`});W.definition={methods:[`get`,`head`],url:`/admin/actions/entry-types/edit/{entryType?}`},W.url=(e,t)=>{(typeof e==`string`||typeof e==`number`)&&(e={entryType:e}),typeof e==`object`&&!Array.isArray(e)&&`id`in e&&(e={entryType:e.id}),Array.isArray(e)&&(e={entryType:e[0]}),e=A(e),oe(e,[`entryType`]);let n={entryType:typeof e?.entryType==`object`?e.entryType.id:e?.entryType};return W.definition.url.replace(`{entryType?}`,n.entryType?.toString()??``).replace(/\/+$/,``)+k(t)},W.get=(e,t)=>({url:W.url(e,t),method:`get`}),W.head=(e,t)=>({url:W.url(e,t),method:`head`});var G=(e,t)=>({url:G.url(e,t),method:`get`});G.definition={methods:[`get`,`head`],url:`/admin/settings/entry-types/{entryType}`},G.url=(e,t)=>{(typeof e==`string`||typeof e==`number`)&&(e={entryType:e}),typeof e==`object`&&!Array.isArray(e)&&`id`in e&&(e={entryType:e.id}),Array.isArray(e)&&(e={entryType:e[0]}),e=A(e);let n={entryType:typeof e.entryType==`object`?e.entryType.id:e.entryType};return G.definition.url.replace(`{entryType}`,n.entryType.toString()).replace(/\/+$/,``)+k(t)},G.get=(e,t)=>({url:G.url(e,t),method:`get`}),G.head=(e,t)=>({url:G.url(e,t),method:`head`});var K=e=>({url:K.url(e),method:`get`});K.definition={methods:[`get`,`head`],url:`/admin/actions/entry-types/new`},K.url=e=>K.definition.url+k(e),K.get=e=>({url:K.url(e),method:`get`}),K.head=e=>({url:K.url(e),method:`head`});var q=e=>({url:q.url(e),method:`get`});q.definition={methods:[`get`,`head`],url:`/admin/settings/entry-types/new`},q.url=e=>q.definition.url+k(e),q.get=e=>({url:q.url(e),method:`get`}),q.head=e=>({url:q.url(e),method:`head`});var fe={"/admin/actions/entry-types/new":K,"/admin/settings/entry-types/new":q},J=e=>({url:J.url(e),method:`post`});J.definition={methods:[`post`],url:`/admin/actions/entry-types/save`},J.url=e=>J.definition.url+k(e),J.post=e=>({url:J.url(e),method:`post`});var Y=e=>({url:Y.url(e),method:`post`});Y.definition={methods:[`post`],url:`/admin/actions/entry-types/delete`},Y.url=e=>Y.definition.url+k(e),Y.post=e=>({url:Y.url(e),method:`post`});var X=e=>({url:X.url(e),method:`post`});X.definition={methods:[`post`],url:`/admin/actions/entry-types/render-override-settings`},X.url=e=>X.definition.url+k(e),X.post=e=>({url:X.url(e),method:`post`});var Z=e=>({url:Z.url(e),method:`post`});Z.definition={methods:[`post`],url:`/admin/actions/entry-types/apply-override-settings`},Z.url=e=>Z.definition.url+k(e),Z.post=e=>({url:Z.url(e),method:`post`});var Q=e=>({url:Q.url(e),method:`get`});Q.definition={methods:[`get`,`head`],url:`/admin/settings/entry-types`},Q.url=e=>Q.definition.url+k(e),Q.get=e=>({url:Q.url(e),method:`get`}),Q.head=e=>({url:Q.url(e),method:`head`});var pe=[`icon`,`data-color`],me=[`data-id`],he={class:`font-bold`},ge={slot:`suffix`,class:`flex gap-1 items-center`},_e={class:`flex gap-2 mt-3 items-center`},ve={key:0},ye={type:`button`,slot:`invoker`,appearance:`filled`},be={slot:`content`},xe={class:`p-2`},Se={key:0,class:`p-2`},Ce=[`onClick`,`icon`,`checked`,`data-color`],we=[`href`],Te=v(n({__name:`EntryTypeSelect`,props:{modelValue:{},types:{},actions:{}},emits:[`update:modelValue`],setup(t,{emit:n}){let a=n,o=t,l=y(()=>o.modelValue.map(e=>o.types?.find(t=>t.id===e)??null).filter(Boolean)),u=m(``),d=y(()=>o.types?.filter(e=>e.name.includes(u.value)||e.handle.includes(u.value)));function f(e){let t=[...o.modelValue];t.includes(e.id)?t.splice(t.indexOf(e.id),1):t.push(e.id),a(`update:modelValue`,t)}function h(e){let t=[...o.modelValue];t.includes(e)&&t.splice(t.indexOf(e),1),a(`update:modelValue`,t)}return(n,a)=>(i(),s(p,null,[S(`div`,null,[(i(!0),s(p,null,C(l.value,t=>(i(),s(p,null,[t?(i(),s(`craft-chip`,{key:0,icon:t.icon,"data-color":t.color?.value??`white`},[S(`div`,{"data-id":t.id},[S(`div`,he,e(t.name),1),S(`code`,null,e(t.handle),1)],8,me),S(`div`,ge,[c(H,{actions:[{label:_(w)(`Settings`),icon:`gear`},{label:_(w)(`Remove`),variant:`danger`,icon:`x`,onClick:()=>h(t.id)}]},null,8,[`actions`]),c(re,{variant:`inherit`})])],8,pe)):x(``,!0)],64))),256))]),S(`div`,_e,[t.types?.length?(i(),s(`craft-action-menu`,ve,[S(`craft-button`,ye,[a[1]||=S(`craft-icon`,{name:`chevron-down`,slot:`prefix`},null,-1),b(` `+e(_(w)(`Choose`)),1)]),S(`div`,be,[S(`div`,xe,[c(j,{label:_(w)(`Search`),modelValue:u.value,"onUpdate:modelValue":a[0]||=e=>u.value=e,"label-sr-only":``},{default:r(()=>[...a[2]||=[S(`craft-icon`,{name:`search`,slot:`prefix`},null,-1)]]),_:1},8,[`label`,`modelValue`])]),a[3]||=S(`hr`,{class:`m-0`},null,-1),d.value.length<1?(i(),s(`div`,Se,[c(ne,{template:`No entry types match “{query}”`,params:{query:u.value}},null,8,[`params`])])):(i(!0),s(p,{key:1},C(d.value,n=>(i(),s(`craft-action-item`,{key:n.id,onClick:e=>f(n),type:`checkbox`,icon:n.icon??`empty`,checked:t.modelValue.includes(n.id),"data-color":n.color?.value??`white`},[S(`div`,null,[b(e(n.name)+` `,1),S(`pre`,null,e(n.handle),1)])],8,Ce))),128))])])):x(``,!0),S(`a`,{href:_(fe)[`/admin/settings/entry-types/new`]().url,class:``},[a[4]||=S(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),b(` `+e(_(w)(`Create`)),1)],8,we)])],64))}}),[[`__scopeId`,`data-v-69cf6612`]]),Ee=n({__name:`SiteSettingsTable`,props:{modelValue:{},selectedType:{},isMultisite:{type:Boolean,default:!1},isHeadless:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=t,a=e,o=g(),s=y(()=>o.props.homepageUri),l=y(()=>o.props.templateOptions),d=y(()=>({name:!0,enabled:a.isMultisite,singleHomepage:a.selectedType===`single`,singleUri:a.selectedType===`single`,uriFormat:a.selectedType!==`single`,template:!a.isHeadless,enabledByDefault:a.selectedType!==`single`})),{table:f}=M({data:()=>a.modelValue,key:`handle`,name:`sites`,columnVisibility:()=>d.value,onChange:e=>n(`update:modelValue`,e),columns:({columnHelper:e})=>[e.accessor(`name`,{header:w(`Site`),cell:({getValue:e})=>e(),meta:{cellTag:`th`}}),e.lightswitch(`enabled`,{header:w(`Enabled`),size:80,meta:{cellClass:`bg-[var(--c-color-neutral-fill-quiet)]`},label:w(`Enabled`)}),e.checkbox(`singleHomepage`,{header:()=>h(`craft-icon`,{name:`home`,label:w(`Homepage`)}),size:44,meta:{cellClass:`text-center`,headerClass:`justify-center`},onChange:(e,{row:t})=>{if(e){let e={...a.modelValue};e[t.original.handle].singleUri=s.value??``,n(`update:modelValue`,e)}else{let e={...a.modelValue};e[t.original.handle].singleUri=``,n(`update:modelValue`,e)}},disabled:e=>!e.original.enabled}),e.text(`singleUri`,{header:w(`URI`),class:`font-mono text-xs`,placeholder:w(`Leave blank if the entry doesn't have a URL`),disabled:e=>!e.original.enabled||e.original.singleHomepage,meta:{headerTip:w(`What the entry URI should be for the site. Leave blank if the entry doesn’t have a URL.`)}}),e.text(`uriFormat`,{header:w(`Entry URI Format`),class:`font-mono text-xs`,placeholder:w(`Leave blank if the entry doesn't have a URL`),disabled:e=>!e.original.enabled,meta:{headerTip:w(`What entry URIs should look like for the site. Leave blank if entries don’t have URLs.`)}}),e.autocomplete(`template`,{header:w(`Template`),class:`font-mono text-xs !px-[var(--_cell-spacing)]`,options:l.value,disabled:e=>!e.original.enabled,meta:{headerTip:w(`Which template should be loaded when an entry’s URL is requested.`)}}),e.lightswitch(`enabledByDefault`,{header:w(`Default Status`),size:40,disabled:e=>!e.original.enabled})]});return(e,t)=>(i(),u(O,{padding:0,appearance:`raised`},{default:r(()=>[c(E,{table:_(f),spacing:_(T).Relaxed,reorderable:!1},null,8,[`table`,`spacing`])]),_:1}))}}),De=[`name`,`label`],Oe=n({__name:`DeleteButton`,props:{label:{default:w(`Delete item`)},icon:{default:`x`}},emits:[`click`],setup(e,{emit:t}){let n=t;return(t,r)=>(i(),s(`craft-button`,o({type:`button`,onClick:r[0]||=e=>n(`click`),size:`small`,appearance:`plain`,variant:`danger`},t.$attrs),[S(`craft-icon`,{name:e.icon,label:e.label},null,8,De)],16))}}),ke={key:0,class:`border border-dashed border-neutral-border-quiet rounded-bl-md rounded-br-md border-t-0 p-1 pt-2 -mt-1`},Ae=n({__name:`PreviewTargetsTable`,props:{modelValue:{},name:{default:`previewTargets`},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(t,{emit:n}){let a=n,o=t,{table:l}=M({data:()=>o.modelValue,name:o.name,onChange:e=>a(`update:modelValue`,e),columns:({columnHelper:e})=>[e.text(`label`,{header:w(`Label`),disabled:()=>o.disabled}),e.text(`urlFormat`,{header:w(`URL Format`),class:`font-mono text-xs`,disabled:()=>o.disabled}),e.lightswitch(`refresh`,{header:w(`Auto-Refresh`),disabled:()=>o.disabled}),e.display({id:`actions`,header:w(`Actions`),meta:{headerSrOnly:!0},cell:({row:e})=>h(`div`,{class:`flex justify-end gap-2`},[h(Oe,{disabled:o.disabled,onClick:()=>{let t=[...o.modelValue];t.splice(e.index,1),a(`update:modelValue`,t)}})])})]});function u(){a(`update:modelValue`,[...o.modelValue,{label:``,urlFormat:``,refresh:!0}])}return(n,a)=>(i(),s(p,null,[c(O,{padding:0,appearance:`raised`},{default:r(()=>[c(E,{table:_(l),spacing:_(T).Relaxed,reorderable:!1},null,8,[`table`,`spacing`])]),_:1}),t.disabled?x(``,!0):(i(),s(`div`,ke,[S(`craft-button`,{type:`button`,size:`small`,onClick:u,class:`w-full`,appearance:`plain`},e(_(w)(`Add a target`)),1)]))],64))}}),je={key:0,class:`flex gap-1 items-center text-sm`},Me={key:1,class:`flex gap-1 items-center text-sm`},Ne={key:0},Pe=[`loading`],Fe={slot:`content`},Ie={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},Le={class:`grid gap-3 p-5`},Re={key:0,variant:`danger`,icon:`triangle-exclamation`},ze={slot:`title`,class:`font-bold`},Be=[`value`],Ve={slot:`feedback`},He={key:0,class:`error-list`},Ue={slot:`feedback`},We={key:0,class:`error-list`},Ge={slot:`input`},Ke=[`value`],qe={key:0,slot:`after`},Je={variant:`danger`,appearance:`plain`,class:`p-0`,icon:`triangle-exclamation`},Ye={slot:`feedback`},Xe={key:0,class:`error-list`},Ze={class:`grid gap-3 p-5`},Qe={class:`font-bold text-sm`},$e={class:`text-sm text-neutral-500 mb-2`},et={class:`grid gap-6 p-5`},tt={class:`font-bold text-sm`},$={class:`text-sm text-neutral-500 mb-2`},nt={slot:`input`},rt=[`value`],it={key:0,slot:`after`},at={variant:`danger`,appearance:`plain`,class:`p-0`,icon:`triangle-exclamation`},ot={class:`grid gap-3 p-5`},st={slot:`feedback`},ct={key:0,class:`error-list`},lt={slot:`input`},ut=[`value`],dt={class:`grid gap-3 p-5`},ft={class:`font-bold text-sm`},pt={class:`text-sm text-neutral-500 mb-2`},mt={class:`grid gap-3 p-5`},ht={slot:`feedback`},gt={key:0,class:`error-list`},_t=n({__name:`SettingsSectionsEditPage`,props:{title:{},crumbs:{},section:{},brandNew:{type:Boolean},typeOptions:{},entryTypes:{},propagationOptions:{},placementOptions:{},siteSettings:{},isMultiSite:{type:Boolean},headlessMode:{type:Boolean},readOnly:{type:Boolean},flash:{},errors:{}},setup(t){let n=t,a=te({sectionId:n.section.id,name:n.section.name??``,handle:n.section.handle??``,type:n.section.type,entryTypes:n.section.entryTypes?.map(e=>e.id)??[],enableVersioning:n.section.enableVersioning,maxAuthors:n.section.maxAuthors??1,maxLevels:n.section.maxLevels??``,propagationMethod:n.section.propagationMethod,defaultPlacement:n.section.defaultPlacement,previewTargets:n.section.previewTargets??[],sites:Object.fromEntries(n.siteSettings.map(e=>[e.handle,{enabled:e.enabled,siteId:e.siteId??null,name:e.name??``,singleHomepage:!1,singleUri:e.uriFormat??``,uriFormat:e.uriFormat??``,template:e.template??``,enabledByDefault:e.enabledByDefault}]))}),o=y(()=>a.type===`structure`),l=y(()=>a.type===`channel`||a.type===`structure`),m=N(()=>a.name,e=>a.handle=f(e)),h=N(()=>a.name,e=>{if(!a.sites)return;let t=d(e);a.sites=Object.fromEntries(Object.entries(a.sites).map(([e,n])=>[e,{...n,singleUri:t&&!n.singleHomepage?`${t}`:n.singleUri,uriFormat:t?`${t}/{slug}`:``,template:t?`${t}/_entry.twig`:``}]))});n.brandNew||(m.stop(),h.stop()),ae(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),g())});function g(){a.clearErrors().submit(ue())}return(n,d)=>(i(),s(`form`,{onSubmit:ee(g,[`prevent`])},[c(se,{title:t.title,debug:{form:_(a),$props:n.$props}},{actions:r(()=>[c(ie,null,{default:r(()=>[_(a).recentlySuccessful&&t.flash?.success?(i(),s(`div`,je,[d[12]||=S(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),b(` `+e(t.flash.success),1)])):x(``,!0),_(a).hasErrors?(i(),s(`div`,Me,[d[13]||=S(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),b(` `+e(_(w)(`Could not save settings`)),1)])):x(``,!0)]),_:1}),t.readOnly?x(``,!0):(i(),s(`craft-button-group`,Ne,[S(`craft-button`,{type:`submit`,variant:`primary`,loading:_(a).processing},e(_(w)(`Save`)),9,Pe),S(`craft-action-menu`,null,[d[15]||=S(`craft-button`,{slot:`invoker`,variant:`primary`,type:`button`,icon:``},[S(`craft-icon`,{name:`chevron-down`})],-1),S(`div`,Fe,[S(`craft-action-item`,{onClick:g},[b(e(_(w)(`Save and continue editing`))+` `,1),d[14]||=S(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)])])])]))]),default:r(()=>[S(`div`,Ie,[t.readOnly?(i(),u(ce,{key:0})):x(``,!0),S(`div`,Le,[_(a).hasErrors?(i(),s(`craft-callout`,Re,[S(`div`,ze,e(_(w)(`Could not save settings`)),1),S(`ul`,null,[(i(!0),s(p,null,C(_(a).errors,(t,n)=>(i(),s(`li`,{key:n},e(t),1))),128))])])):x(``,!0),t.section.id?(i(),s(`input`,{key:1,type:`hidden`,name:`sectionId`,value:t.section.id},null,8,Be)):x(``,!0),c(j,{label:_(w)(`Name`),"help-text":_(w)(`What this section will be called in the control panel.`),id:`name`,name:`name`,modelValue:_(a).name,"onUpdate:modelValue":d[0]||=e=>_(a).name=e,disabled:t.readOnly,"has-feedback-for":_(a).errors?.name?`error`:``,required:``,autofocus:``},{default:r(()=>[S(`div`,Ve,[_(a).errors?.name?(i(),s(`ul`,He,[S(`li`,null,e(_(a).errors.name),1)])):x(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`]),c(I,{label:_(w)(`Handle`),"help-text":_(w)(`How you'll refer to this section in the templates.`),id:`handle`,name:`handle`,modelValue:_(a).handle,"onUpdate:modelValue":d[1]||=e=>_(a).handle=e,disabled:t.readOnly,"has-feedback-for":_(a).errors?.handle?`error`:``,required:``,onChange:d[2]||=e=>_(m).markDirty()},{default:r(()=>[S(`div`,Ue,[_(a).errors?.handle?(i(),s(`ul`,We,[S(`li`,null,e(_(a).errors.handle),1)])):x(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`]),c(le,{label:_(w)(`Enable versioning for entries in this section`),id:`enableVersioning`,name:`enableVersioning`,disabled:t.readOnly,modelValue:_(a).enableVersioning,"onUpdate:modelValue":d[3]||=e=>_(a).enableVersioning=e},null,8,[`label`,`disabled`,`modelValue`]),c(D,{label:_(w)(`Section Type`),"help-text":_(w)(`What type of section is this?`),id:`type`,name:`type`,modelValue:_(a).type,"onUpdate:modelValue":d[4]||=e=>_(a).type=e,disabled:t.readOnly,"has-feedback-for":_(a).errors?.type?`error`:``},{default:r(()=>[S(`select`,Ge,[(i(!0),s(p,null,C(t.typeOptions,t=>(i(),s(`option`,{key:t.value,value:t.value},e(t.label),9,Ke))),128))]),t.section.id&&_(a).type!==`single`?(i(),s(`div`,qe,[S(`craft-callout`,Je,e(_(w)(`Changing this may result in data loss.`)),1)])):x(``,!0),S(`div`,Ye,[_(a).errors?.type?(i(),s(`ul`,Xe,[S(`li`,null,e(_(a).errors.type),1)])):x(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`])]),d[17]||=S(`hr`,null,null,-1),S(`div`,Ze,[S(`div`,null,[S(`h3`,Qe,e(_(w)(`Entry Types`)),1),S(`p`,$e,e(_(w)(`Choose the types of entries that can be included in this section.`)),1),c(Te,{types:t.entryTypes,modelValue:_(a).entryTypes,"onUpdate:modelValue":d[5]||=e=>_(a).entryTypes=e},null,8,[`types`,`modelValue`])])]),d[18]||=S(`hr`,null,null,-1),S(`div`,et,[S(`div`,null,[S(`h3`,tt,e(_(w)(`Site settings`)),1),S(`p`,$,e(_(w)(`Choose which sites this section should be available in, and configure the site-specific settings.`)),1),c(Ee,{"is-multisite":t.isMultiSite,"is-headless":t.headlessMode,"selected-type":_(a).type,modelValue:_(a).sites,"onUpdate:modelValue":d[6]||=e=>_(a).sites=e},null,8,[`is-multisite`,`is-headless`,`selected-type`,`modelValue`])]),t.isMultiSite&&l.value?(i(),u(D,{key:0,label:_(w)(`Propagation Method`),"help-text":_(w)(`Of the enabled sites above, which sites should entries in this section be saved to?`),id:`propagationMethod`,name:`propagationMethod`,modelValue:_(a).propagationMethod,"onUpdate:modelValue":d[7]||=e=>_(a).propagationMethod=e,disabled:t.readOnly},{default:r(()=>[S(`select`,nt,[(i(!0),s(p,null,C(t.propagationOptions,t=>(i(),s(`option`,{key:t.value,value:t.value},e(t.label),9,rt))),128))]),t.section.id&&t.section.propagationMethod!==`none`&&t.siteSettings.length>1?(i(),s(`div`,it,[S(`craft-callout`,at,e(_(w)(`Changing this may result in data loss.`)),1)])):x(``,!0)]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`])):x(``,!0)]),o.value?(i(),s(p,{key:1},[d[16]||=S(`hr`,null,null,-1),S(`div`,ot,[c(j,{label:_(w)(`Max Levels`),"help-text":_(w)(`The maximum number of levels this section can have.`),id:`maxLevels`,name:`maxLevels`,modelValue:_(a).maxLevels,"onUpdate:modelValue":d[8]||=e=>_(a).maxLevels=e,disabled:t.readOnly,inputmode:`numeric`,size:`5`,"has-feedback-for":_(a).errors?.maxLevels?`error`:``},{default:r(()=>[S(`div`,st,[_(a).errors?.maxLevels?(i(),s(`ul`,ct,[S(`li`,null,e(_(a).errors.maxLevels),1)])):x(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`]),c(D,{label:_(w)(`Default {type} Placement`,{type:_(w)(`Entry`)}),"help-text":_(w)(`Where new {type} should be placed by default in the structure.`,{type:_(w)(`entries`)}),id:`defaultPlacement`,name:`defaultPlacement`,modelValue:_(a).defaultPlacement,"onUpdate:modelValue":d[9]||=e=>_(a).defaultPlacement=e,disabled:t.readOnly},{default:r(()=>[S(`select`,lt,[(i(!0),s(p,null,C(t.placementOptions,t=>(i(),s(`option`,{key:t.value,value:t.value},e(t.label),9,ut))),128))])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`])])],64)):x(``,!0),d[19]||=S(`hr`,null,null,-1),S(`div`,dt,[S(`div`,null,[S(`h3`,ft,e(_(w)(`Preview Targets`)),1),S(`p`,pt,e(_(w)(`Locations that should be available for previewing entries in this section.`)),1),c(Ae,{modelValue:_(a).previewTargets,"onUpdate:modelValue":d[10]||=e=>_(a).previewTargets=e,disabled:t.readOnly},null,8,[`modelValue`,`disabled`])])]),d[20]||=S(`hr`,null,null,-1),S(`div`,mt,[c(j,{label:_(w)(`Max Authors`),"help-text":_(w)(`The maximum number of authors that entries in this section can have.`),id:`maxAuthors`,name:`maxAuthors`,modelValue:_(a).maxAuthors,"onUpdate:modelValue":d[11]||=e=>_(a).maxAuthors=e,disabled:t.readOnly,inputmode:`numeric`,maxlength:`5`,"has-feedback-for":_(a).errors?.maxAuthors?`error`:``},{default:r(()=>[S(`div`,ht,[_(a).errors?.maxAuthors?(i(),s(`ul`,gt,[S(`li`,null,e(_(a).errors.maxAuthors),1)])):x(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`])])])]),_:1},8,[`title`,`debug`])],32))}});export{_t as default}; \ No newline at end of file +import{$ as e,B as t,E as n,J as r,L as i,M as a,N as o,S as s,T as c,U as l,b as u,dt as d,ft as f,h as p,it as m,k as h,l as g,lt as _,m as v,s as ee,t as y,v as b,w as x,x as S,y as C,z as w}from"./_plugin-vue_export-helper.js";import{r as T}from"./nav-item-9g3ebwBJ.js";import{i as E,n as te,r as ne,t as D}from"./AdminTable.js";import{n as O}from"./Select.js";import{t as k}from"./Pane.js";import{n as re}from"./useAnnouncer.js";import{a as A,n as ie}from"./dist.js";import{n as j,r as ae,t as M}from"./wayfinder.js";import{t as N}from"./CraftInput.js";import{t as oe}from"./AppLayout.js";import{t as se}from"./CalloutReadOnly.js";import{n as ce,t as P}from"./useEditableTable.js";import{a as le}from"./SectionsController.js";import{t as F}from"./useInputGenerator.js";var ue=[`.modelValue`,`has-feedbck-for`],de={slot:`feedback`},I={key:0,class:`error-list`},L=n({name:`CraftInputHandle`,__name:`CraftInputHandle`,props:a({error:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=l(n,`modelValue`);return(a,c)=>(i(),s(`craft-input-handle`,o(a.$attrs,{".modelValue":r.value,onModelValueChanged:c[0]||=e=>r.value=e.target?.modelValue,"has-feedbck-for":n.error?`error`:``}),[t(a.$slots,`default`),C(`div`,de,[n.error?(i(),s(`ul`,I,[C(`li`,null,e(n.error),1)])):S(``,!0)])],48,ue))}}),R={type:`button`,slot:`invoker`,icon:``,size:`small`,variant:`inherit`,appearance:`plain`},z=[`name`,`label`],B={slot:`content`,class:`m-sm`},V=[`onClick`],H=[`onClick`],fe=y(n({__name:`ActionMenu`,props:{icon:{default:`ellipsis`},label:{default:T(`Actions`)},actions:{}},setup(t){let n=t,r=b(()=>n.actions.filter(e=>e&&!!e.label)),a=b(()=>r.value.filter(e=>e.variant&&e.variant===`danger`)),c=b(()=>r.value.filter(e=>!e.variant||e.variant!==`danger`));return(n,r)=>(i(),s(`craft-action-menu`,null,[C(`craft-button`,R,[C(`craft-icon`,{name:t.icon,label:t.label},null,8,z)]),C(`div`,B,[(i(!0),s(p,null,w(c.value,(t,n)=>(i(),s(`craft-action-item`,o({key:`safe-${n}`,onClick:e=>t.onClick?.()},{ref_for:!0},t),e(t.label),17,V))),128)),r[0]||=C(`hr`,{class:`m-0`},null,-1),(i(!0),s(p,null,w(a.value,(t,n)=>(i(),s(`craft-action-item`,o({key:`dangerous-${n}`,onClick:e=>t.onClick?.()},{ref_for:!0},t),e(t.label),17,H))),128))])]))}}),[[`__scopeId`,`data-v-c8dfaa4c`]]),U=e=>({url:U.url(e),method:`get`});U.definition={methods:[`get`,`head`],url:`/admin/actions/entry-types/table-data`},U.url=e=>U.definition.url+j(e),U.get=e=>({url:U.url(e),method:`get`}),U.head=e=>({url:U.url(e),method:`head`});var W=(e,t)=>({url:W.url(e,t),method:`get`});W.definition={methods:[`get`,`head`],url:`/admin/actions/entry-types/edit/{entryType?}`},W.url=(e,t)=>{(typeof e==`string`||typeof e==`number`)&&(e={entryType:e}),typeof e==`object`&&!Array.isArray(e)&&`id`in e&&(e={entryType:e.id}),Array.isArray(e)&&(e={entryType:e[0]}),e=M(e),ae(e,[`entryType`]);let n={entryType:typeof e?.entryType==`object`?e.entryType.id:e?.entryType};return W.definition.url.replace(`{entryType?}`,n.entryType?.toString()??``).replace(/\/+$/,``)+j(t)},W.get=(e,t)=>({url:W.url(e,t),method:`get`}),W.head=(e,t)=>({url:W.url(e,t),method:`head`});var G=(e,t)=>({url:G.url(e,t),method:`get`});G.definition={methods:[`get`,`head`],url:`/admin/settings/entry-types/{entryType}`},G.url=(e,t)=>{(typeof e==`string`||typeof e==`number`)&&(e={entryType:e}),typeof e==`object`&&!Array.isArray(e)&&`id`in e&&(e={entryType:e.id}),Array.isArray(e)&&(e={entryType:e[0]}),e=M(e);let n={entryType:typeof e.entryType==`object`?e.entryType.id:e.entryType};return G.definition.url.replace(`{entryType}`,n.entryType.toString()).replace(/\/+$/,``)+j(t)},G.get=(e,t)=>({url:G.url(e,t),method:`get`}),G.head=(e,t)=>({url:G.url(e,t),method:`head`});var K=e=>({url:K.url(e),method:`get`});K.definition={methods:[`get`,`head`],url:`/admin/actions/entry-types/new`},K.url=e=>K.definition.url+j(e),K.get=e=>({url:K.url(e),method:`get`}),K.head=e=>({url:K.url(e),method:`head`});var q=e=>({url:q.url(e),method:`get`});q.definition={methods:[`get`,`head`],url:`/admin/settings/entry-types/new`},q.url=e=>q.definition.url+j(e),q.get=e=>({url:q.url(e),method:`get`}),q.head=e=>({url:q.url(e),method:`head`});var pe={"/admin/actions/entry-types/new":K,"/admin/settings/entry-types/new":q},J=e=>({url:J.url(e),method:`post`});J.definition={methods:[`post`],url:`/admin/actions/entry-types/save`},J.url=e=>J.definition.url+j(e),J.post=e=>({url:J.url(e),method:`post`});var Y=e=>({url:Y.url(e),method:`post`});Y.definition={methods:[`post`],url:`/admin/actions/entry-types/delete`},Y.url=e=>Y.definition.url+j(e),Y.post=e=>({url:Y.url(e),method:`post`});var X=e=>({url:X.url(e),method:`post`});X.definition={methods:[`post`],url:`/admin/actions/entry-types/render-override-settings`},X.url=e=>X.definition.url+j(e),X.post=e=>({url:X.url(e),method:`post`});var Z=e=>({url:Z.url(e),method:`post`});Z.definition={methods:[`post`],url:`/admin/actions/entry-types/apply-override-settings`},Z.url=e=>Z.definition.url+j(e),Z.post=e=>({url:Z.url(e),method:`post`});var Q=e=>({url:Q.url(e),method:`get`});Q.definition={methods:[`get`,`head`],url:`/admin/settings/entry-types`},Q.url=e=>Q.definition.url+j(e),Q.get=e=>({url:Q.url(e),method:`get`}),Q.head=e=>({url:Q.url(e),method:`head`});var me=[`icon`,`data-color`],he=[`data-id`],ge={class:`font-bold`},_e={slot:`suffix`,class:`flex gap-1 items-center`},ve={class:`flex gap-2 mt-3 items-center`},ye={key:0},be={key:0,type:`button`,slot:`invoker`,appearance:`solid`},xe={slot:`content`},Se={class:`p-2`},Ce={key:0,class:`p-2`},we=[`onClick`,`icon`,`checked`,`data-color`],Te=[`href`],Ee=y(n({__name:`EntryTypeSelect`,props:{modelValue:{},types:{},actions:{}},emits:[`update:modelValue`],setup(t,{emit:n}){let a=n,o=t,{readOnly:l}=A(),d=b(()=>o.modelValue.map(e=>o.types?.find(t=>t.id===e)??null).filter(Boolean)),f=m(``),h=b(()=>o.types?.filter(e=>e.name.includes(f.value)||e.handle.includes(f.value)));function g(e){let t=[...o.modelValue];t.includes(e.id)?t.splice(t.indexOf(e.id),1):t.push(e.id),a(`update:modelValue`,t)}function v(e){let t=[...o.modelValue];t.includes(e)&&t.splice(t.indexOf(e),1),a(`update:modelValue`,t)}return(n,a)=>(i(),s(p,null,[C(`div`,null,[(i(!0),s(p,null,w(d.value,t=>(i(),s(p,null,[t?(i(),s(`craft-chip`,{key:0,icon:t.icon,"data-color":t.color?.value??`white`},[C(`div`,{"data-id":t.id},[C(`div`,ge,e(t.name),1),C(`code`,null,e(t.handle),1)],8,he),C(`div`,_e,[c(fe,{actions:[{label:_(T)(`Settings`),icon:`gear`},...[_(l)?null:{label:_(T)(`Remove`),variant:`danger`,icon:`x`,onClick:()=>v(t.id)}]]},null,8,[`actions`]),_(l)?S(``,!0):(i(),u(ne,{key:0,variant:`inherit`}))])],8,me)):S(``,!0)],64))),256))]),C(`div`,ve,[t.types?.length?(i(),s(`craft-action-menu`,ye,[_(l)?S(``,!0):(i(),s(`craft-button`,be,[a[1]||=C(`craft-icon`,{name:`chevron-down`,slot:`prefix`},null,-1),x(` `+e(_(T)(`Choose`)),1)])),C(`div`,xe,[C(`div`,Se,[c(N,{label:_(T)(`Search`),modelValue:f.value,"onUpdate:modelValue":a[0]||=e=>f.value=e,"label-sr-only":``},{default:r(()=>[...a[2]||=[C(`craft-icon`,{name:`search`,slot:`prefix`},null,-1)]]),_:1},8,[`label`,`modelValue`])]),a[3]||=C(`hr`,{class:`m-0`},null,-1),h.value.length<1?(i(),s(`div`,Ce,[c(te,{template:`No entry types match “{query}”`,params:{query:f.value}},null,8,[`params`])])):(i(!0),s(p,{key:1},w(h.value,n=>(i(),s(`craft-action-item`,{key:n.id,onClick:e=>g(n),type:`checkbox`,icon:n.icon??`empty`,checked:t.modelValue.includes(n.id),"data-color":n.color?.value??`white`},[C(`div`,null,[x(e(n.name)+` `,1),C(`pre`,null,e(n.handle),1)])],8,we))),128))])])):S(``,!0),_(l)?S(``,!0):(i(),s(`a`,{key:1,href:_(pe)[`/admin/settings/entry-types/new`]().url,class:``},[a[4]||=C(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),x(` `+e(_(T)(`Create`)),1)],8,Te))])],64))}}),[[`__scopeId`,`data-v-cc6fb7ff`]]),$=n({__name:`SiteSettingsTable`,props:{modelValue:{},selectedType:{},isMultisite:{type:Boolean,default:!1},isHeadless:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=t,a=e,o=g(),s=b(()=>o.props.homepageUri),l=b(()=>o.props.templateOptions),d=b(()=>({name:!0,enabled:a.isMultisite,singleHomepage:a.selectedType===`single`,singleUri:a.selectedType===`single`,uriFormat:a.selectedType!==`single`,template:!a.isHeadless,enabledByDefault:a.selectedType!==`single`})),{table:f}=P({data:()=>a.modelValue,key:`handle`,name:`sites`,columnVisibility:()=>d.value,onChange:e=>n(`update:modelValue`,e),columns:({columnHelper:e})=>[e.accessor(`name`,{header:T(`Site`),cell:({getValue:e})=>e(),meta:{cellTag:`th`}}),e.lightswitch(`enabled`,{header:T(`Enabled`),size:80,meta:{cellClass:`bg-[var(--c-color-neutral-fill-quiet)]`},label:T(`Enabled`)}),e.checkbox(`singleHomepage`,{header:()=>h(`craft-icon`,{name:`home`,label:T(`Homepage`)}),size:44,meta:{cellClass:`text-center`,headerClass:`justify-center`},onChange:(e,{row:t})=>{if(e){let e={...a.modelValue};e[t.original.handle].singleUri=s.value??``,n(`update:modelValue`,e)}else{let e={...a.modelValue};e[t.original.handle].singleUri=``,n(`update:modelValue`,e)}},disabled:e=>!e.original.enabled}),e.text(`singleUri`,{header:T(`URI`),class:`font-mono text-xs`,placeholder:T(`Leave blank if the entry doesn't have a URL`),disabled:e=>!e.original.enabled||e.original.singleHomepage,meta:{headerTip:T(`What the entry URI should be for the site. Leave blank if the entry doesn’t have a URL.`)}}),e.text(`uriFormat`,{header:T(`Entry URI Format`),class:`font-mono text-xs`,placeholder:T(`Leave blank if the entry doesn't have a URL`),disabled:e=>!e.original.enabled,meta:{headerTip:T(`What entry URIs should look like for the site. Leave blank if entries don’t have URLs.`)}}),e.autocomplete(`template`,{header:T(`Template`),class:`font-mono text-xs !px-[var(--_cell-spacing)]`,options:l.value,disabled:e=>!e.original.enabled,meta:{headerTip:T(`Which template should be loaded when an entry’s URL is requested.`)}}),e.lightswitch(`enabledByDefault`,{header:T(`Default Status`),size:40,disabled:e=>!e.original.enabled})]});return(e,t)=>(i(),u(k,{padding:0,appearance:`raised`},{default:r(()=>[c(D,{table:_(f),spacing:_(E).Relaxed,reorderable:!1},null,8,[`table`,`spacing`])]),_:1}))}}),De=[`name`,`label`],Oe=n({__name:`DeleteButton`,props:{label:{default:T(`Delete item`)},icon:{default:`x`}},emits:[`click`],setup(e,{emit:t}){let n=t;return(t,r)=>(i(),s(`craft-button`,o({type:`button`,onClick:r[0]||=e=>n(`click`),size:`small`,appearance:`plain`,variant:`danger`},t.$attrs),[C(`craft-icon`,{name:e.icon,label:e.label},null,8,De)],16))}}),ke={key:0,class:`border border-dashed border-neutral-border-quiet rounded-bl-md rounded-br-md border-t-0 p-1 pt-2 -mt-1`},Ae=n({__name:`PreviewTargetsTable`,props:{modelValue:{},name:{default:`previewTargets`},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(t,{emit:n}){let a=n,o=t,{table:l}=P({data:()=>o.modelValue,name:o.name,onChange:e=>a(`update:modelValue`,e),columns:({columnHelper:e})=>[e.text(`label`,{header:T(`Label`),disabled:()=>o.disabled}),e.text(`urlFormat`,{header:T(`URL Format`),class:`font-mono text-xs`,disabled:()=>o.disabled}),e.lightswitch(`refresh`,{header:T(`Auto-Refresh`),disabled:()=>o.disabled}),e.display({id:`actions`,header:T(`Actions`),meta:{headerSrOnly:!0},cell:({row:e})=>h(`div`,{class:`flex justify-end gap-2`},[h(Oe,{disabled:o.disabled,onClick:()=>{let t=[...o.modelValue];t.splice(e.index,1),a(`update:modelValue`,t)}})])})]});function u(){a(`update:modelValue`,[...o.modelValue,{label:``,urlFormat:``,refresh:!0}])}return(n,a)=>(i(),s(p,null,[c(k,{padding:0,appearance:`raised`},{default:r(()=>[c(D,{table:_(l),spacing:_(E).Relaxed,reorderable:!1},null,8,[`table`,`spacing`])]),_:1}),t.disabled?S(``,!0):(i(),s(`div`,ke,[C(`craft-button`,{type:`button`,size:`small`,onClick:u,class:`w-full`,appearance:`plain`},e(_(T)(`Add a target`)),1)]))],64))}}),je={key:0,class:`flex gap-1 items-center text-sm`},Me={key:1,class:`flex gap-1 items-center text-sm`},Ne={key:0},Pe=[`loading`],Fe={slot:`content`},Ie={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},Le={class:`grid gap-3 p-5`},Re={key:0,variant:`danger`,icon:`triangle-exclamation`},ze={slot:`title`,class:`font-bold`},Be=[`value`],Ve={slot:`feedback`},He={key:0,class:`error-list`},Ue={slot:`feedback`},We={key:0,class:`error-list`},Ge={slot:`input`},Ke=[`value`],qe={key:0,slot:`after`},Je={variant:`danger`,appearance:`plain`,class:`p-0`,icon:`triangle-exclamation`},Ye={slot:`feedback`},Xe={key:0,class:`error-list`},Ze={class:`grid gap-3 p-5`},Qe={class:`font-bold text-sm`},$e={class:`text-sm text-neutral-500 mb-2`},et={class:`grid gap-6 p-5`},tt={class:`font-bold text-sm`},nt={class:`text-sm text-neutral-500 mb-2`},rt={slot:`input`},it=[`value`],at={key:0,slot:`after`},ot={variant:`danger`,appearance:`plain`,class:`p-0`,icon:`triangle-exclamation`},st={class:`grid gap-3 p-5`},ct={slot:`feedback`},lt={key:0,class:`error-list`},ut={slot:`input`},dt=[`value`],ft={class:`grid gap-3 p-5`},pt={class:`font-bold text-sm`},mt={class:`text-sm text-neutral-500 mb-2`},ht={class:`grid gap-3 p-5`},gt={slot:`feedback`},_t={key:0,class:`error-list`},vt=n({__name:`SettingsSectionsEditPage`,props:{title:{},crumbs:{},section:{},brandNew:{type:Boolean},typeOptions:{},entryTypes:{},propagationOptions:{},placementOptions:{},siteSettings:{},isMultiSite:{type:Boolean},headlessMode:{type:Boolean},flash:{},errors:{}},setup(t){let n=t,{readOnly:a}=A(),o=ee({sectionId:n.section.id,name:n.section.name??``,handle:n.section.handle??``,type:n.section.type,entryTypes:n.section.entryTypes?.map(e=>e.id)??[],enableVersioning:n.section.enableVersioning,maxAuthors:n.section.maxAuthors??1,maxLevels:n.section.maxLevels??``,propagationMethod:n.section.propagationMethod,defaultPlacement:n.section.defaultPlacement,previewTargets:n.section.previewTargets??[],sites:Object.fromEntries(n.siteSettings.map(e=>[e.handle,{enabled:e.enabled,siteId:e.siteId??null,name:e.name??``,singleHomepage:!1,singleUri:e.uriFormat??``,uriFormat:e.uriFormat??``,template:e.template??``,enabledByDefault:e.enabledByDefault}]))}),l=b(()=>o.type===`structure`),m=b(()=>o.type===`channel`||o.type===`structure`),h=F(()=>o.name,e=>o.handle=f(e)),g=F(()=>o.name,e=>{if(!o.sites)return;let t=d(e);o.sites=Object.fromEntries(Object.entries(o.sites).map(([e,n])=>[e,{...n,singleUri:t&&!n.singleHomepage?`${t}`:n.singleUri,uriFormat:t?`${t}/{slug}`:``,template:t?`${t}/_entry.twig`:``}]))});n.brandNew||(h.stop(),g.stop()),ie(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),y())});function y(){o.clearErrors().submit(le())}return(n,d)=>(i(),s(`form`,{onSubmit:v(y,[`prevent`])},[c(oe,{title:t.title,debug:{form:_(o),$props:n.$props}},{actions:r(()=>[c(re,null,{default:r(()=>[_(o).recentlySuccessful&&t.flash?.success?(i(),s(`div`,je,[d[12]||=C(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),x(` `+e(t.flash.success),1)])):S(``,!0),_(o).hasErrors?(i(),s(`div`,Me,[d[13]||=C(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),x(` `+e(_(T)(`Could not save settings`)),1)])):S(``,!0)]),_:1}),_(a)?S(``,!0):(i(),s(`craft-button-group`,Ne,[C(`craft-button`,{type:`submit`,variant:`accent`,loading:_(o).processing},e(_(T)(`Save`)),9,Pe),C(`craft-action-menu`,null,[d[15]||=C(`craft-button`,{slot:`invoker`,variant:`accent`,type:`button`,icon:``},[C(`craft-icon`,{name:`chevron-down`})],-1),C(`div`,Fe,[C(`craft-action-item`,{onClick:y},[x(e(_(T)(`Save and continue editing`))+` `,1),d[14]||=C(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)])])])]))]),default:r(()=>[C(`div`,Ie,[_(a)?(i(),u(se,{key:0})):S(``,!0),C(`div`,Le,[_(o).hasErrors?(i(),s(`craft-callout`,Re,[C(`div`,ze,e(_(T)(`Could not save settings`)),1),C(`ul`,null,[(i(!0),s(p,null,w(_(o).errors,(t,n)=>(i(),s(`li`,{key:n},e(t),1))),128))])])):S(``,!0),t.section.id?(i(),s(`input`,{key:1,type:`hidden`,name:`sectionId`,value:t.section.id},null,8,Be)):S(``,!0),c(N,{label:_(T)(`Name`),"help-text":_(T)(`What this section will be called in the control panel.`),id:`name`,name:`name`,modelValue:_(o).name,"onUpdate:modelValue":d[0]||=e=>_(o).name=e,disabled:_(a),"has-feedback-for":_(o).errors?.name?`error`:``,required:``,autofocus:``},{default:r(()=>[C(`div`,Ve,[_(o).errors?.name?(i(),s(`ul`,He,[C(`li`,null,e(_(o).errors.name),1)])):S(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`]),c(L,{label:_(T)(`Handle`),"help-text":_(T)(`How you'll refer to this section in the templates.`),id:`handle`,name:`handle`,modelValue:_(o).handle,"onUpdate:modelValue":d[1]||=e=>_(o).handle=e,disabled:_(a),"has-feedback-for":_(o).errors?.handle?`error`:``,required:``,onChange:d[2]||=e=>_(h).markDirty()},{default:r(()=>[C(`div`,Ue,[_(o).errors?.handle?(i(),s(`ul`,We,[C(`li`,null,e(_(o).errors.handle),1)])):S(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`]),c(ce,{label:_(T)(`Enable versioning for entries in this section`),id:`enableVersioning`,name:`enableVersioning`,disabled:_(a),modelValue:_(o).enableVersioning,"onUpdate:modelValue":d[3]||=e=>_(o).enableVersioning=e},null,8,[`label`,`disabled`,`modelValue`]),c(O,{label:_(T)(`Section Type`),"help-text":_(T)(`What type of section is this?`),id:`type`,name:`type`,modelValue:_(o).type,"onUpdate:modelValue":d[4]||=e=>_(o).type=e,disabled:_(a),"has-feedback-for":_(o).errors?.type?`error`:``},{default:r(()=>[C(`select`,Ge,[(i(!0),s(p,null,w(t.typeOptions,t=>(i(),s(`option`,{key:t.value,value:t.value},e(t.label),9,Ke))),128))]),t.section.id&&_(o).type!==`single`?(i(),s(`div`,qe,[C(`craft-callout`,Je,e(_(T)(`Changing this may result in data loss.`)),1)])):S(``,!0),C(`div`,Ye,[_(o).errors?.type?(i(),s(`ul`,Xe,[C(`li`,null,e(_(o).errors.type),1)])):S(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`])]),d[17]||=C(`hr`,null,null,-1),C(`div`,Ze,[C(`div`,null,[C(`h3`,Qe,e(_(T)(`Entry Types`)),1),C(`p`,$e,e(_(T)(`Choose the types of entries that can be included in this section.`)),1),c(Ee,{types:t.entryTypes,modelValue:_(o).entryTypes,"onUpdate:modelValue":d[5]||=e=>_(o).entryTypes=e},null,8,[`types`,`modelValue`])])]),d[18]||=C(`hr`,null,null,-1),C(`div`,et,[C(`div`,null,[C(`h3`,tt,e(_(T)(`Site settings`)),1),C(`p`,nt,e(_(T)(`Choose which sites this section should be available in, and configure the site-specific settings.`)),1),c($,{"is-multisite":t.isMultiSite,"is-headless":t.headlessMode,"selected-type":_(o).type,modelValue:_(o).sites,"onUpdate:modelValue":d[6]||=e=>_(o).sites=e},null,8,[`is-multisite`,`is-headless`,`selected-type`,`modelValue`])]),t.isMultiSite&&m.value?(i(),u(O,{key:0,label:_(T)(`Propagation Method`),"help-text":_(T)(`Of the enabled sites above, which sites should entries in this section be saved to?`),id:`propagationMethod`,name:`propagationMethod`,modelValue:_(o).propagationMethod,"onUpdate:modelValue":d[7]||=e=>_(o).propagationMethod=e,disabled:_(a)},{default:r(()=>[C(`select`,rt,[(i(!0),s(p,null,w(t.propagationOptions,t=>(i(),s(`option`,{key:t.value,value:t.value},e(t.label),9,it))),128))]),t.section.id&&t.section.propagationMethod!==`none`&&t.siteSettings.length>1?(i(),s(`div`,at,[C(`craft-callout`,ot,e(_(T)(`Changing this may result in data loss.`)),1)])):S(``,!0)]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`])):S(``,!0)]),l.value?(i(),s(p,{key:1},[d[16]||=C(`hr`,null,null,-1),C(`div`,st,[c(N,{label:_(T)(`Max Levels`),"help-text":_(T)(`The maximum number of levels this section can have.`),id:`maxLevels`,name:`maxLevels`,modelValue:_(o).maxLevels,"onUpdate:modelValue":d[8]||=e=>_(o).maxLevels=e,disabled:_(a),inputmode:`numeric`,size:`5`,"has-feedback-for":_(o).errors?.maxLevels?`error`:``},{default:r(()=>[C(`div`,ct,[_(o).errors?.maxLevels?(i(),s(`ul`,lt,[C(`li`,null,e(_(o).errors.maxLevels),1)])):S(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`]),c(O,{label:_(T)(`Default {type} Placement`,{type:_(T)(`Entry`)}),"help-text":_(T)(`Where new {type} should be placed by default in the structure.`,{type:_(T)(`entries`)}),id:`defaultPlacement`,name:`defaultPlacement`,modelValue:_(o).defaultPlacement,"onUpdate:modelValue":d[9]||=e=>_(o).defaultPlacement=e,disabled:_(a)},{default:r(()=>[C(`select`,ut,[(i(!0),s(p,null,w(t.placementOptions,t=>(i(),s(`option`,{key:t.value,value:t.value},e(t.label),9,dt))),128))])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`])])],64)):S(``,!0),d[19]||=C(`hr`,null,null,-1),C(`div`,ft,[C(`div`,null,[C(`h3`,pt,e(_(T)(`Preview Targets`)),1),C(`p`,mt,e(_(T)(`Locations that should be available for previewing entries in this section.`)),1),c(Ae,{modelValue:_(o).previewTargets,"onUpdate:modelValue":d[10]||=e=>_(o).previewTargets=e,disabled:_(a)},null,8,[`modelValue`,`disabled`])])]),d[20]||=C(`hr`,null,null,-1),C(`div`,ht,[c(N,{label:_(T)(`Max Authors`),"help-text":_(T)(`The maximum number of authors that entries in this section can have.`),id:`maxAuthors`,name:`maxAuthors`,modelValue:_(o).maxAuthors,"onUpdate:modelValue":d[11]||=e=>_(o).maxAuthors=e,disabled:_(a),inputmode:`numeric`,maxlength:`5`,"has-feedback-for":_(o).errors?.maxAuthors?`error`:``},{default:r(()=>[C(`div`,gt,[_(o).errors?.maxAuthors?(i(),s(`ul`,_t,[C(`li`,null,e(_(o).errors.maxAuthors),1)])):S(``,!0)])]),_:1},8,[`label`,`help-text`,`modelValue`,`disabled`,`has-feedback-for`])])])]),_:1},8,[`title`,`debug`])],32))}});export{vt as default}; \ No newline at end of file diff --git a/resources/build/SettingsSectionsIndexPage.js b/resources/build/SettingsSectionsIndexPage.js index 05122d00b09..eac095f1d23 100644 --- a/resources/build/SettingsSectionsIndexPage.js +++ b/resources/build/SettingsSectionsIndexPage.js @@ -1 +1 @@ -import{$ as e,E as t,J as n,L as r,S as i,T as a,b as o,i as s,it as c,k as l,lt as u,m as d,s as f,ut as p,v as m,w as h,y as g}from"./_plugin-vue_export-helper.js";import{r as _}from"./nav-item-9g3ebwBJ.js";import{a as v,o as y,s as b,t as x}from"./AdminTable.js";import{t as S}from"./Pane.js";import{a as C}from"./useAnnouncer.js";import{t as w}from"./AppLayout.js";import{i as T,n as E,r as D,t as O}from"./SectionsController.js";var k=[`loading`],A=[`label`],j=t({__name:`DeleteSectionButton`,props:{section:{}},setup(e){let t=e,n=f({id:t.section.id});function a(){confirm(_(`Are you sure you want to delete “{name}” and all its entries?`,{name:t.section.name}))&&n.submit(E())}return(e,t)=>(r(),i(`form`,{onSubmit:d(a,[`prevent`]),method:`post`},[g(`craft-button`,{variant:`danger`,type:`submit`,size:`small`,icon:``,appearance:`plain`,loading:u(n).processing},[g(`craft-icon`,{label:u(_)(`Delete section`),name:`x`},null,8,A)],8,k)],32))}}),M={class:`flex gap-1 items-center`},N=[`label`,`value`],P=[`loading`],F=t({__name:`SettingsSectionsIndexPage`,props:{title:{},data:{},pagination:{},sort:{},searchTerm:{},emptyMessage:{},readOnly:{type:Boolean}},setup(t){let i=t,d=y(),f=c([d.accessor(`name`,{header:_(`Name`),cell:({row:e,getValue:t})=>l(`a`,{class:`font-bold`,href:D[`/admin/settings/sections/{section}`](e.original.id).url},t())}),d.accessor(`handle`,{header:_(`Handle`),cell:({getValue:e})=>l(`craft-copy-attribute`,{value:e()},e())}),d.accessor(`type`,{header:_(`Type`)}),d.display({id:`actions`,cell:({row:e})=>l(`div`,{class:`flex justify-end items-center gap-2`},l(j,{section:e.original}))})]),E=m(()=>i.pagination.current_page?i.pagination.current_page-1:0),k=window.Craft?.pageTrigger??`page`,A=c({pageIndex:E.value,pageSize:i.pagination.per_page}),F=c(i.sort?i.sort.map(e=>({id:e.field,desc:e.direction===`desc`})):[]),I=v({get data(){return i.data},get columns(){return f.value},getCoreRowModel:b(),manualPagination:!0,manualSorting:!0,rowCount:i.pagination.total,enableMultiSort:!0,enableSortingRemoval:!1,state:{get pagination(){return A.value},get sorting(){return F.value}},onSortingChange:e=>{let t=(typeof e==`function`?e(F.value):e).reduce((e,t,n)=>(e[n]={field:t.id,direction:t.desc?`desc`:`asc`},e),{}),n=new URLSearchParams(window.location.search);p.visit(T({query:{...Object.fromEntries(n),sort:t,[k]:1}}),{only:[`data`,`sort`],preserveScroll:!0})},onPaginationChange:e=>{let t=typeof e==`function`?e(A.value):e,n=new URLSearchParams(window.location.search);p.visit(T({query:{...Object.fromEntries(n),[k]:t.pageIndex+1,per_page:t.pageSize}}),{only:[`data`,`pagination`],preserveScroll:!0})}});return(i,c)=>(r(),o(w,{title:t.title},{actions:n(()=>[a(C,{as:`craft-button`,variant:`primary`,href:u(O)()},{default:n(()=>[c[0]||=g(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),h(` `+e(u(_)(`New section`)),1)]),_:1},8,[`href`])]),default:n(()=>[a(S,{padding:0,appearance:`raised`},{default:n(()=>[a(x,{spacing:`relaxed`,title:t.title,table:u(I),reorderable:!1,from:t.pagination.from,to:t.pagination.to,total:t.pagination.total,"enable-adjust-page-size":!0},{"search-form":n(()=>[a(u(s),{action:u(T)()},{default:n(({processing:n})=>[g(`div`,M,[g(`craft-input`,{name:`search`,label:u(_)(`Search term`),value:t.searchTerm,"label-sr-only":``},null,8,N),g(`craft-button`,{type:`submit`,loading:n},e(u(_)(`Search`)),9,P)])]),_:1},8,[`action`])]),_:1},8,[`title`,`table`,`from`,`to`,`total`])]),_:1})]),_:1},8,[`title`]))}});export{F as default}; \ No newline at end of file +import{$ as e,E as t,J as n,L as r,S as i,T as a,b as o,i as s,it as c,k as l,lt as u,m as d,s as f,ut as p,v as m,w as h,x as g,y as _}from"./_plugin-vue_export-helper.js";import{r as v}from"./nav-item-9g3ebwBJ.js";import{a as y,o as b,s as x,t as S}from"./AdminTable.js";import{t as C}from"./Pane.js";import{a as w}from"./useAnnouncer.js";import{a as T}from"./dist.js";import{t as E}from"./AppLayout.js";import{t as D}from"./CalloutReadOnly.js";import{i as O,n as k,r as A,t as j}from"./SectionsController.js";var M=[`loading`],N=[`label`],P=t({__name:`DeleteSectionButton`,props:{section:{}},setup(e){let t=e,n=f({id:t.section.id});function a(){confirm(v(`Are you sure you want to delete “{name}” and all its entries?`,{name:t.section.name}))&&n.submit(k())}return(e,t)=>(r(),i(`form`,{onSubmit:d(a,[`prevent`]),method:`post`},[_(`craft-button`,{variant:`danger`,type:`submit`,size:`small`,icon:``,appearance:`plain`,loading:u(n).processing},[_(`craft-icon`,{label:u(v)(`Delete section`),name:`x`},null,8,N)],8,M)],32))}}),F={class:`flex gap-1 items-center`},I=[`label`,`value`],L=[`loading`],R=t({__name:`SettingsSectionsIndexPage`,props:{title:{},data:{},pagination:{},sort:{},searchTerm:{},emptyMessage:{}},setup(t){let i=t,{readOnly:d}=T(),f=b(),k=c([f.accessor(`name`,{header:v(`Name`),cell:({row:e,getValue:t})=>l(`a`,{class:`font-bold`,href:A[`/admin/settings/sections/{section}`](e.original.id).url},t())}),f.accessor(`handle`,{header:v(`Handle`),cell:({getValue:e})=>l(`craft-copy-attribute`,{value:e()},e())}),f.accessor(`type`,{header:v(`Type`)}),f.display({id:`actions`,cell:({row:e})=>l(`div`,{class:`flex justify-end items-center gap-2`},l(P,{section:e.original}))})]),M=m(()=>i.pagination.current_page?i.pagination.current_page-1:0),N=window.Craft?.pageTrigger??`page`,R=c({pageIndex:M.value,pageSize:i.pagination.per_page}),z=c(i.sort?i.sort.map(e=>({id:e.field,desc:e.direction===`desc`})):[]),B=y({get data(){return i.data},get columns(){return k.value},getCoreRowModel:x(),manualPagination:!0,manualSorting:!0,rowCount:i.pagination.total,enableMultiSort:!0,enableSortingRemoval:!1,state:{get pagination(){return R.value},get sorting(){return z.value},get columnVisibility(){return{actions:!d}}},onSortingChange:e=>{let t=(typeof e==`function`?e(z.value):e).reduce((e,t,n)=>(e[n]={field:t.id,direction:t.desc?`desc`:`asc`},e),{}),n=new URLSearchParams(window.location.search);p.visit(O({query:{...Object.fromEntries(n),sort:t,[N]:1}}),{only:[`data`,`sort`],preserveScroll:!0})},onPaginationChange:e=>{let t=typeof e==`function`?e(R.value):e,n=new URLSearchParams(window.location.search);p.visit(O({query:{...Object.fromEntries(n),[N]:t.pageIndex+1,per_page:t.pageSize}}),{only:[`data`,`pagination`],preserveScroll:!0})}});return(i,c)=>(r(),o(E,{title:t.title},{actions:n(()=>[u(d)?g(``,!0):(r(),o(w,{key:0,as:`craft-button`,variant:`accent`,href:u(j)()},{default:n(()=>[c[0]||=_(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),h(` `+e(u(v)(`New section`)),1)]),_:1},8,[`href`]))]),default:n(()=>[u(d)?(r(),o(D,{key:0})):g(``,!0),a(C,{padding:0,appearance:`raised`},{default:n(()=>[a(S,{spacing:`relaxed`,title:t.title,table:u(B),reorderable:!1,from:t.pagination.from,to:t.pagination.to,total:t.pagination.total,"enable-adjust-page-size":!0},{"search-form":n(()=>[a(u(s),{action:u(O)()},{default:n(({processing:n})=>[_(`div`,F,[_(`craft-input`,{name:`search`,label:u(v)(`Search term`),value:t.searchTerm,"label-sr-only":``},null,8,I),_(`craft-button`,{type:`submit`,loading:n},e(u(v)(`Search`)),9,L)])]),_:1},8,[`action`])]),_:1},8,[`title`,`table`,`from`,`to`,`total`])]),_:1})]),_:1},8,[`title`]))}});export{R as default}; \ No newline at end of file diff --git a/resources/build/SettingsSitesEdit.js b/resources/build/SettingsSitesEdit.js index 3ae9b820322..0dc1bef712c 100644 --- a/resources/build/SettingsSitesEdit.js +++ b/resources/build/SettingsSitesEdit.js @@ -1 +1 @@ -import{$ as e,E as t,G as n,J as r,L as i,S as a,T as o,Y as s,b as c,ft as l,h as u,it as d,l as f,lt as p,m,p as h,pt as ee,s as g,v as _,w as v,x as y,y as b,z as x}from"./_plugin-vue_export-helper.js";import{r as S}from"./nav-item-9g3ebwBJ.js";import{n as C}from"./useAnnouncer.js";import{n as w}from"./ModalForm.js";import{n as T}from"./dist.js";import{t as E}from"./InputCombobox.js";import{t as D}from"./CraftCombobox.js";import{t as O}from"./AppLayout.js";import{t as k}from"./CalloutReadOnly.js";import{t as A}from"./useInputGenerator.js";import{a as j,t as M}from"./DeleteSiteModal.js";var te={key:0,variant:`danger`,icon:`triangle-exclamation`},ne={slot:`title`,class:`tw:font-bold`},re=[`label`,`help-text`,`.modelValue`],ie={slot:`input`},ae=[`value`],N={key:0,class:`error-list`,slot:`feedback`},P={key:1,slot:`after`},F={variant:`danger`,appearance:`plain`,class:`p-0`,icon:`triangle-exclamation`},I={class:`sr-only`},L=[`label`,`disabled`],R={slot:`after`},z={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},B={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},V={slot:`feedback`},H={key:0,class:`error-list`},U=[`label`,`help-text`,`has-feedback-for`],W={slot:`feedback`},G={key:0,class:`error-list`},K=[`innerHTML`],q=[`label`,`disabled`,`has-feedback-for`],J=[`active`,`checked`,`hint`],oe={class:`inline-flex items-center gap-1`},se=[`variant`],ce={key:0},le={key:1},ue={slot:`after`},de={key:0,variant:`warning`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},fe=[`innerHTML`],pe={slot:`feedback`},me={key:0,class:`error-list`},he=[`label`,`help-text`,`disabled`,`checked`],ge=[`label`,`disabled`,`checked`],_e={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},Y={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},X=t({__name:`SiteFields`,props:{inertiaForm:{},readOnly:{type:Boolean,default:!1}},setup(t){let d=t,m=f();function g(e){return e.value.startsWith(`$`)||e.value.startsWith(`@`)?{...e,data:{...e.data||{},hint:e.data?.boolean===`1`?S(`Enabled`):S(`Disabled`)}}:e}let C=_(()=>d.inertiaForm),w=_(()=>m.props.isMultisite),T=_(()=>m.props.groupOptions),O=_(()=>m.props.nameSuggestions),k=_(()=>m.props.languageOptions),j=_(()=>m.props.booleanEnvOptions.map(e=>e.type===`optgroup`?{...e,options:e.options.map(g)}:g(e))),M=_(()=>m.props.baseUrlSuggestions),X=_(()=>m.props.site);n(`handle`),n(`baseUrl`);let Z=_({get(){return C.value.enabled?`1`:`0`},set(e){C.value.enabled=e}}),Q=A(()=>C.value.name,e=>C.value.handle=l(e)),$=A(()=>C.value.name,e=>C.value.baseUrl=ee(e,{prefix:`$`,suffix:`_URL`}));return C.value.id&&(Q.stop(),$.stop()),(n,l)=>(i(),a(u,null,[C.value?.hasErrors?(i(),a(`craft-callout`,te,[b(`div`,ne,e(p(S)(`Could not save settings`)),1),b(`ul`,null,[(i(!0),a(u,null,x(C.value.errors,(t,n)=>(i(),a(`li`,{key:n},e(t),1))),128))])])):y(``,!0),C.value.id?s((i(),a(`input`,{key:1,name:`id`,"onUpdate:modelValue":l[0]||=e=>C.value.id=e,type:`hidden`},null,512)),[[h,C.value.id]]):y(``,!0),b(`craft-select`,{label:p(S)(`Group`),"help-text":p(S)(`Which group should this site belong to?`),name:`group`,id:`group`,".modelValue":C.value.group,onModelValueChanged:l[1]||=e=>C.value.group=e.target?.modelValue},[b(`select`,ie,[(i(!0),a(u,null,x(T.value,t=>(i(),a(`option`,{key:t.value,value:t.value},e(t.label),9,ae))),128))]),C.value.errors?.group?(i(),a(`ul`,N,[(i(!0),a(u,null,x(C.value.errors?.group,t=>(i(),a(`li`,null,e(t),1))),256))])):y(``,!0),C.value?.id&&w.value?(i(),a(`div`,P,[b(`craft-callout`,F,[b(`span`,I,e(p(S)(`Warning:`)),1),v(` `+e(p(S)(`Changing this may result in data loss.`)),1)])])):y(``,!0)],40,re),b(`craft-input`,{label:p(S)(`Name`),id:`name`,name:`name`,disabled:t.readOnly},[o(E,{slot:`input`,modelValue:C.value.name,"onUpdate:modelValue":l[2]||=e=>C.value.name=e,options:O.value},null,8,[`modelValue`,`options`]),b(`div`,R,[b(`craft-callout`,z,[v(e(p(S)(`This can begin with an environment variable.`))+` `,1),b(`a`,B,e(p(S)(`Learn more`)),1)])]),b(`div`,V,[C.value.errors?.name?(i(),a(`ul`,H,[b(`li`,null,e(C.value.errors.name),1)])):y(``,!0)])],8,L),s(b(`craft-input-handle`,{label:p(S)(`Handle`),"help-text":p(S)(`How you’ll refer to this site in the templates.`),ref:`handle`,id:`handle`,name:`handle`,"has-feedback-for":C.value.errors?.handle?`error`:``,"onUpdate:modelValue":l[3]||=e=>C.value.handle=e},[b(`div`,W,[C.value.errors?.handle?(i(),a(`ul`,G,[b(`li`,null,e(C.value.errors.handle),1)])):y(``,!0)])],8,U),[[h,C.value.handle]]),o(D,{modelValue:C.value.language,"onUpdate:modelValue":l[4]||=e=>C.value.language=e,label:p(S)(`Language`),name:`language`,id:`site-language`,"help-text":p(S)(`The language content in this site will use.`),disabled:t.readOnly,error:C.value.errors?.language,options:k.value},{after:r(()=>[b(`craft-callout`,{variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`,innerHTML:p(S)(`This can be set to an environment variable with a valid language ID ({examples}).`,{examples:`en/en-GB`})},null,8,K)]),_:1},8,[`modelValue`,`label`,`help-text`,`disabled`,`error`,`options`]),w.value||!X.value.id?(i(),a(`craft-input`,{key:2,label:p(S)(`Status`),name:`enabled`,id:`enabled`,disabled:t.readOnly,"has-feedback-for":C.value.errors?.enabled?`error`:``},[o(E,{slot:`input`,modelValue:Z.value,"onUpdate:modelValue":l[5]||=e=>Z.value=e,options:j.value,"require-option-match":!0},{option:r(({active:t,selected:n,option:r})=>[b(`craft-option`,{active:t,checked:n,hint:r.data?.hint},[b(`div`,oe,[b(`craft-indicator`,{variant:r.data?.boolean===`1`?`success`:`empty`},null,8,se),r.label.startsWith(`$`)||r.label.startsWith(`@`)?(i(),a(`code`,ce,e(r.label),1)):(i(),a(`span`,le,e(r.label),1))])],8,J)]),_:1},8,[`modelValue`,`options`]),b(`div`,ue,[X.value.primary?(i(),a(`craft-callout`,de,e(p(S)(`The primary site cannot be disabled.`)),1)):y(``,!0),b(`craft-callout`,{variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`,innerHTML:p(S)(`This can be set to an environment variable with a boolean value ({examples})`,{examples:`yes/no/true/false/on/off/0/1`})},null,8,fe)]),b(`div`,pe,[C.value.errors?.enabled?(i(),a(`ul`,me,[b(`li`,null,e(C.value.errors.enabled),1)])):y(``,!0)])],8,q)):y(``,!0),(w.value||!X.value.id)&&!X.value.primary?(i(),a(u,{key:3},[X.value.primary?y(``,!0):(i(),a(`craft-switch`,{key:0,label:p(S)(`Make this the primary site`),"help-text":p(S)(`The primary site will be loaded by default on the front end.`),disabled:t.readOnly,checked:C.value.primary,onCheckedChanged:l[6]||=e=>C.value.primary=e.target?.checked},null,40,he))],64)):y(``,!0),b(`craft-switch`,{label:p(S)(`This site has its own base URL`),id:`has-urls`,name:`hasUrls`,disabled:t.readOnly,checked:C.value.hasUrls,onCheckedChanged:l[7]||=e=>C.value.hasUrls=e.target?.checked},null,40,ge),C.value.hasUrls?(i(),c(D,{key:4,modelValue:C.value.baseUrl,"onUpdate:modelValue":l[8]||=e=>C.value.baseUrl=e,label:p(S)(`Base URL`),"help-text":p(S)(`The base URL for the site.`),id:`base-url`,name:`baseUrl`,error:C.value.errors?.baseUrl,disabled:t.readOnly,options:M.value},{after:r(()=>[b(`craft-callout`,_e,[v(e(p(S)(`This can begin with an environment variable or alias.`))+` `,1),b(`a`,Y,e(p(S)(`Learn more`)),1)])]),_:1},8,[`modelValue`,`label`,`help-text`,`error`,`disabled`,`options`])):y(``,!0)],64))}}),Z={key:0,size:`small`,inline:``},Q={key:0,class:`flex gap-1 items-center text-sm`},$={key:1,class:`tw:flex tw:gap-1 tw:items-center tw:text-sm`},ve={key:0},ye=[`loading`],be={slot:`content`},xe={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},Se={class:`grid gap-3 p-5`},Ce=t({__name:`SettingsSitesEdit`,props:{title:{},crumbs:{},readOnly:{type:Boolean},site:{},groupId:{},flash:{},errors:{},isMultisite:{type:Boolean}},setup(t){let n=t,s=g({siteId:n.site.id??null,group:n.groupId,name:n.site.nameRaw,handle:n.site.handle,language:n.site.languageRaw,enabled:n.site.enabledRaw,hasUrls:n.site.hasUrls,primary:n.site.primary,baseUrl:n.site.baseUrlRaw??``});T(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),l())});function l(){s.clearErrors().submit(j())}let f=d(!1);return(d,h)=>(i(),a(u,null,[b(`form`,{onSubmit:m(l,[`prevent`])},[o(O,{title:t.title,debug:d.$props},{"title-badge":r(()=>[o(w,{variant:t.site.enabled?`success`:`default`},{default:r(()=>[v(e(t.site.enabled?p(S)(`Enabled`):p(S)(`Disabled`)),1)]),_:1},8,[`variant`]),t.site.primary?(i(),a(`craft-callout`,Z,[b(`span`,null,e(p(S)(`Primary`)),1)])):y(``,!0)]),actions:r(()=>[o(C,null,{default:r(()=>[p(s).recentlySuccessful&&t.flash?.success?(i(),a(`div`,Q,[h[2]||=b(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),v(` `+e(t.flash.success),1)])):y(``,!0),p(s).hasErrors?(i(),a(`div`,$,[h[3]||=b(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),v(` `+e(p(S)(`Could not save settings`)),1)])):y(``,!0)]),_:1}),t.readOnly?y(``,!0):(i(),a(`craft-button-group`,ve,[b(`craft-button`,{type:`submit`,variant:`primary`,loading:p(s).processing},e(p(S)(`Save`)),9,ye),b(`craft-action-menu`,null,[h[6]||=b(`craft-button`,{slot:`invoker`,variant:`primary`,type:`button`,icon:``},[b(`craft-icon`,{name:`chevron-down`})],-1),b(`div`,be,[b(`craft-action-item`,{onClick:l},[v(e(p(S)(`Save and continue editing`))+` `,1),h[4]||=b(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)]),t.site.id&&!t.site.primary?(i(),a(u,{key:0},[h[5]||=b(`hr`,null,null,-1),b(`craft-action-item`,{onClick:h[0]||=e=>f.value=!0,variant:`danger`},e(p(S)(`Delete site`)),1)],64)):y(``,!0)])])]))]),default:r(()=>[b(`div`,xe,[t.readOnly?(i(),c(k,{key:0})):y(``,!0),b(`div`,Se,[o(X,{"inertia-form":p(s),"read-only":t.readOnly},null,8,[`inertia-form`,`read-only`])])])]),_:1},8,[`title`,`debug`])],32),t.site.primary?y(``,!0):(i(),c(M,{key:0,onClose:h[1]||=e=>f.value=!1,open:f.value,site:n.site},null,8,[`open`,`site`]))],64))}});export{Ce as default}; \ No newline at end of file +import{$ as e,E as t,G as n,J as r,L as i,S as a,T as o,Y as s,b as c,ft as l,h as u,it as d,l as f,lt as p,m,p as h,pt as g,s as _,v,w as y,x as b,y as x,z as S}from"./_plugin-vue_export-helper.js";import{r as C}from"./nav-item-9g3ebwBJ.js";import{n as w}from"./useAnnouncer.js";import{n as T}from"./ModalForm.js";import{a as E,n as D}from"./dist.js";import{t as O}from"./InputCombobox.js";import{t as k}from"./CraftCombobox.js";import{t as A}from"./AppLayout.js";import{t as j}from"./CalloutReadOnly.js";import{t as M}from"./useInputGenerator.js";import{a as N,t as P}from"./DeleteSiteModal.js";var ee={key:0,variant:`danger`,icon:`triangle-exclamation`},te={slot:`title`,class:`tw:font-bold`},ne=[`label`,`help-text`,`.modelValue`,`disabled`],re={slot:`input`},ie=[`value`],ae={key:0,class:`error-list`,slot:`feedback`},oe={key:1,slot:`after`},F={variant:`danger`,appearance:`plain`,class:`p-0`,icon:`triangle-exclamation`},I={class:`sr-only`},L=[`label`,`disabled`],R={slot:`after`},z={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},B={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},V={slot:`feedback`},H={key:0,class:`error-list`},U=[`label`,`help-text`,`has-feedback-for`,`disabled`],W={slot:`feedback`},G={key:0,class:`error-list`},K=[`innerHTML`],q=[`label`,`disabled`,`has-feedback-for`],se=[`active`,`checked`,`hint`],ce={class:`inline-flex items-center gap-1`},le=[`variant`],ue={key:0},de={key:1},fe={slot:`after`},pe={key:0,variant:`warning`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},me=[`innerHTML`],he={slot:`feedback`},ge={key:0,class:`error-list`},_e=[`label`,`help-text`,`disabled`,`checked`],ve=[`label`,`disabled`,`checked`],J={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},ye={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},Y=t({__name:`SiteFields`,props:{inertiaForm:{}},setup(t){let d=t,m=f(),{readOnly:_}=E();function w(e){return e.value.startsWith(`$`)||e.value.startsWith(`@`)?{...e,data:{...e.data||{},hint:e.data?.boolean===`1`?C(`Enabled`):C(`Disabled`)}}:e}let T=v(()=>d.inertiaForm),D=v(()=>m.props.isMultisite),A=v(()=>m.props.groupOptions),j=v(()=>m.props.nameSuggestions),N=v(()=>m.props.languageOptions),P=v(()=>m.props.booleanEnvOptions.map(e=>e.type===`optgroup`?{...e,options:e.options.map(w)}:w(e))),Y=v(()=>m.props.baseUrlSuggestions),X=v(()=>m.props.site);n(`handle`),n(`baseUrl`);let Z=v({get(){return T.value.enabled?`1`:`0`},set(e){T.value.enabled=e}}),Q=M(()=>T.value.name,e=>T.value.handle=l(e)),$=M(()=>T.value.name,e=>T.value.baseUrl=g(e,{prefix:`$`,suffix:`_URL`}));return T.value.id&&(Q.stop(),$.stop()),(t,n)=>(i(),a(u,null,[T.value?.hasErrors?(i(),a(`craft-callout`,ee,[x(`div`,te,e(p(C)(`Could not save settings`)),1),x(`ul`,null,[(i(!0),a(u,null,S(T.value.errors,(t,n)=>(i(),a(`li`,{key:n},e(t),1))),128))])])):b(``,!0),T.value.id?s((i(),a(`input`,{key:1,name:`id`,"onUpdate:modelValue":n[0]||=e=>T.value.id=e,type:`hidden`},null,512)),[[h,T.value.id]]):b(``,!0),x(`craft-select`,{label:p(C)(`Group`),"help-text":p(C)(`Which group should this site belong to?`),name:`group`,id:`group`,".modelValue":T.value.group,onModelValueChanged:n[1]||=e=>T.value.group=e.target?.modelValue,disabled:p(_)},[x(`select`,re,[(i(!0),a(u,null,S(A.value,t=>(i(),a(`option`,{key:t.value,value:t.value},e(t.label),9,ie))),128))]),T.value.errors?.group?(i(),a(`ul`,ae,[(i(!0),a(u,null,S(T.value.errors?.group,t=>(i(),a(`li`,null,e(t),1))),256))])):b(``,!0),T.value?.id&&D.value?(i(),a(`div`,oe,[x(`craft-callout`,F,[x(`span`,I,e(p(C)(`Warning:`)),1),y(` `+e(p(C)(`Changing this may result in data loss.`)),1)])])):b(``,!0)],40,ne),x(`craft-input`,{label:p(C)(`Name`),id:`name`,name:`name`,disabled:p(_)},[o(O,{slot:`input`,modelValue:T.value.name,"onUpdate:modelValue":n[2]||=e=>T.value.name=e,options:j.value},null,8,[`modelValue`,`options`]),x(`div`,R,[x(`craft-callout`,z,[y(e(p(C)(`This can begin with an environment variable.`))+` `,1),x(`a`,B,e(p(C)(`Learn more`)),1)])]),x(`div`,V,[T.value.errors?.name?(i(),a(`ul`,H,[x(`li`,null,e(T.value.errors.name),1)])):b(``,!0)])],8,L),s(x(`craft-input-handle`,{label:p(C)(`Handle`),"help-text":p(C)(`How you’ll refer to this site in the templates.`),ref:`handle`,id:`handle`,name:`handle`,"has-feedback-for":T.value.errors?.handle?`error`:``,disabled:p(_),"onUpdate:modelValue":n[3]||=e=>T.value.handle=e},[x(`div`,W,[T.value.errors?.handle?(i(),a(`ul`,G,[x(`li`,null,e(T.value.errors.handle),1)])):b(``,!0)])],8,U),[[h,T.value.handle]]),o(k,{modelValue:T.value.language,"onUpdate:modelValue":n[4]||=e=>T.value.language=e,label:p(C)(`Language`),name:`language`,id:`site-language`,"help-text":p(C)(`The language content in this site will use.`),disabled:p(_),error:T.value.errors?.language,options:N.value},{after:r(()=>[x(`craft-callout`,{variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`,innerHTML:p(C)(`This can be set to an environment variable with a valid language ID ({examples}).`,{examples:`en/en-GB`})},null,8,K)]),_:1},8,[`modelValue`,`label`,`help-text`,`disabled`,`error`,`options`]),D.value||!X.value.id?(i(),a(`craft-input`,{key:2,label:p(C)(`Status`),name:`enabled`,id:`enabled`,disabled:p(_),"has-feedback-for":T.value.errors?.enabled?`error`:``},[o(O,{slot:`input`,modelValue:Z.value,"onUpdate:modelValue":n[5]||=e=>Z.value=e,options:P.value,"require-option-match":!0},{option:r(({active:t,selected:n,option:r})=>[x(`craft-option`,{active:t,checked:n,hint:r.data?.hint},[x(`div`,ce,[x(`craft-indicator`,{variant:r.data?.boolean===`1`?`success`:`empty`},null,8,le),r.label.startsWith(`$`)||r.label.startsWith(`@`)?(i(),a(`code`,ue,e(r.label),1)):(i(),a(`span`,de,e(r.label),1))])],8,se)]),_:1},8,[`modelValue`,`options`]),x(`div`,fe,[X.value.primary?(i(),a(`craft-callout`,pe,e(p(C)(`The primary site cannot be disabled.`)),1)):b(``,!0),x(`craft-callout`,{variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`,innerHTML:p(C)(`This can be set to an environment variable with a boolean value ({examples})`,{examples:`yes/no/true/false/on/off/0/1`})},null,8,me)]),x(`div`,he,[T.value.errors?.enabled?(i(),a(`ul`,ge,[x(`li`,null,e(T.value.errors.enabled),1)])):b(``,!0)])],8,q)):b(``,!0),(D.value||!X.value.id)&&!X.value.primary?(i(),a(u,{key:3},[X.value.primary?b(``,!0):(i(),a(`craft-switch`,{key:0,label:p(C)(`Make this the primary site`),"help-text":p(C)(`The primary site will be loaded by default on the front end.`),disabled:p(_),checked:T.value.primary,onCheckedChanged:n[6]||=e=>T.value.primary=e.target?.checked},null,40,_e))],64)):b(``,!0),x(`craft-switch`,{label:p(C)(`This site has its own base URL`),id:`has-urls`,name:`hasUrls`,disabled:p(_),checked:T.value.hasUrls,onCheckedChanged:n[7]||=e=>T.value.hasUrls=e.target?.checked},null,40,ve),T.value.hasUrls?(i(),c(k,{key:4,modelValue:T.value.baseUrl,"onUpdate:modelValue":n[8]||=e=>T.value.baseUrl=e,label:p(C)(`Base URL`),"help-text":p(C)(`The base URL for the site.`),id:`base-url`,name:`baseUrl`,error:T.value.errors?.baseUrl,disabled:p(_),options:Y.value},{after:r(()=>[x(`craft-callout`,J,[y(e(p(C)(`This can begin with an environment variable or alias.`))+` `,1),x(`a`,ye,e(p(C)(`Learn more`)),1)])]),_:1},8,[`modelValue`,`label`,`help-text`,`error`,`disabled`,`options`])):b(``,!0)],64))}}),X={key:0,size:`small`,inline:``},Z={key:0,class:`flex gap-1 items-center text-sm`},Q={key:1,class:`tw:flex tw:gap-1 tw:items-center tw:text-sm`},$={key:0},be=[`loading`],xe={slot:`content`},Se={class:`bg-white border border-neutral-border-quiet rounded-sm shadow-sm`},Ce={class:`grid gap-3 p-5`},we=t({__name:`SettingsSitesEdit`,props:{title:{},crumbs:{},site:{},groupId:{},flash:{},errors:{},isMultisite:{type:Boolean}},setup(t){let n=t,s=_({siteId:n.site.id??null,group:n.groupId,name:n.site.nameRaw,handle:n.site.handle,language:n.site.languageRaw,enabled:n.site.enabledRaw,hasUrls:n.site.hasUrls,primary:n.site.primary,baseUrl:n.site.baseUrlRaw??``}),{readOnly:l}=E();D(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),f())});function f(){s.clearErrors().submit(N())}let h=d(!1);return(d,g)=>(i(),a(u,null,[x(`form`,{onSubmit:m(f,[`prevent`])},[o(A,{title:t.title,debug:d.$props},{"title-badge":r(()=>[o(T,{variant:t.site.enabled?`success`:`default`},{default:r(()=>[y(e(t.site.enabled?p(C)(`Enabled`):p(C)(`Disabled`)),1)]),_:1},8,[`variant`]),t.site.primary?(i(),a(`craft-callout`,X,[x(`span`,null,e(p(C)(`Primary`)),1)])):b(``,!0)]),actions:r(()=>[o(w,null,{default:r(()=>[p(s).recentlySuccessful&&t.flash?.success?(i(),a(`div`,Z,[g[2]||=x(`craft-icon`,{name:`circle-check`,style:{color:`var(--c-color-success-fill-loud)`}},null,-1),y(` `+e(t.flash.success),1)])):b(``,!0),p(s).hasErrors?(i(),a(`div`,Q,[g[3]||=x(`craft-icon`,{name:`triangle-exclamation`,style:{color:`var(--c-color-danger-fill-loud)`}},null,-1),y(` `+e(p(C)(`Could not save settings`)),1)])):b(``,!0)]),_:1}),p(l)?b(``,!0):(i(),a(`craft-button-group`,$,[x(`craft-button`,{type:`submit`,variant:`accent`,loading:p(s).processing},e(p(C)(`Save`)),9,be),x(`craft-action-menu`,null,[g[6]||=x(`craft-button`,{slot:`invoker`,variant:`accent`,type:`button`,icon:``},[x(`craft-icon`,{name:`chevron-down`})],-1),x(`div`,xe,[x(`craft-action-item`,{onClick:f},[y(e(p(C)(`Save and continue editing`))+` `,1),g[4]||=x(`craft-shortcut`,{slot:`suffix`,class:`ml-2`},`S`,-1)]),t.site.id&&!t.site.primary?(i(),a(u,{key:0},[g[5]||=x(`hr`,null,null,-1),x(`craft-action-item`,{onClick:g[0]||=e=>h.value=!0,variant:`danger`},e(p(C)(`Delete site`)),1)],64)):b(``,!0)])])]))]),default:r(()=>[x(`div`,Se,[p(l)?(i(),c(j,{key:0})):b(``,!0),x(`div`,Ce,[o(Y,{"inertia-form":p(s)},null,8,[`inertia-form`])])])]),_:1},8,[`title`,`debug`])],32),t.site.primary?b(``,!0):(i(),c(P,{key:0,onClose:g[1]||=e=>h.value=!1,open:h.value,site:n.site},null,8,[`open`,`site`]))],64))}});export{we as default}; \ No newline at end of file diff --git a/resources/build/SettingsSitesIndex.js b/resources/build/SettingsSitesIndex.js index 743f9e85a3f..5dd3d40aece 100644 --- a/resources/build/SettingsSitesIndex.js +++ b/resources/build/SettingsSitesIndex.js @@ -1 +1 @@ -import{$ as e,E as t,J as n,K as r,L as i,P as a,S as o,T as s,Y as ee,b as c,h as l,it as u,k as d,lt as f,m as p,p as te,r as ne,s as m,t as h,ut as g,v as _,w as v,x as y,y as b,z as re}from"./_plugin-vue_export-helper.js";import{r as x}from"./nav-item-9g3ebwBJ.js";import{a as S,o as C,s as w,t as T}from"./AdminTable.js";import{a as E}from"./useAnnouncer.js";import{n as D,t as ie}from"./ModalForm.js";import{n as O,t as k}from"./wayfinder.js";import{t as ae}from"./InputCombobox.js";import{t as A}from"./CalloutReadOnly.js";import{i as j,n as M,r as N,t as P}from"./DeleteSiteModal.js";import{t as F}from"./IndexLayout.js";var I=e=>({url:I.url(e),method:`post`});I.definition={methods:[`post`],url:`/admin/settings/site-groups`},I.url=e=>I.definition.url+O(e),I.post=e=>({url:I.url(e),method:`post`});var L=(e,t)=>({url:L.url(e,t),method:`delete`});L.definition={methods:[`delete`],url:`/admin/settings/site-groups/{groupId}`},L.url=(e,t)=>{(typeof e==`string`||typeof e==`number`)&&(e={groupId:e}),Array.isArray(e)&&(e={groupId:e[0]}),e=k(e);let n={groupId:e.groupId};return L.definition.url.replace(`{groupId}`,n.groupId.toString()).replace(/\/+$/,``)+O(t)},L.delete=(e,t)=>({url:L.url(e,t),method:`delete`});var R=[`disabled`],z=t({__name:`DeleteSiteButton`,props:{site:{}},setup(e){let t=u(!1);return(n,r)=>(i(),o(`div`,null,[b(`craft-button`,{size:`small`,icon:``,type:`button`,variant:`danger`,appearance:`plain`,disabled:e.site.primary,onClick:r[0]||=e=>t.value=!0},[...r[2]||=[b(`craft-icon`,{name:`x`,label:`t('Delete site'`},null,-1)]],8,R),s(P,{site:e.site,open:t.value,onClose:r[1]||=e=>t.value=!1},null,8,[`site`,`open`])]))}}),B=e=>({url:B.url(e),method:`get`});B.definition={methods:[`get`,`head`],url:`/admin/settings/sites`},B.url=e=>B.definition.url+O(e),B.get=e=>({url:B.url(e),method:`get`}),B.head=e=>({url:B.url(e),method:`head`}),Object.assign(B,B);var V={class:`flex gap-2 items-center`},H={class:`title text-xl`},U={key:0},W={type:`button`,icon:``,size:`small`,slot:`invoker`},G=[`label`],K={slot:`content`},q=[`disabled`],J={class:`-mx-2`},oe=[`href`,`active`],se={class:`mt-4 flex gap-2`},ce={class:`border-neutral-border-quiet rounded p-2 bg-white`},le={key:2,class:`py-20`},ue={class:`w-[60ch] mx-auto text-center grid gap-3 justify-items-center text-gray-500`},de=[`label`,`help-text`],fe={slot:`after`},pe={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},me={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},Y=[`label`,`help-text`,`has-feedback-for`],he={slot:`after`},ge={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},_e={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},ve={slot:`feedback`},ye={key:0,class:`error-list`},X=h(t({__name:`SettingsSitesIndex`,props:{readOnly:{type:Boolean},group:{},groups:{},sites:{},nameSuggestions:{},flash:{}},setup(t){let h=t,O=u(!1),k=C(),P=m({id:h.group?.id??null,name:h.group?.name??``});function R(){P.clearErrors().submit(I(),{onSuccess:()=>{O.value=!1,P.reset()}})}function X(e){e===`create`?(P.name=``,P.id=null):e===`update`&&(P.name=h.group?.rawName??h.group?.name??``,P.id=h.group?.id??null),O.value=!0}let Z=u(h.sites.map(e=>e.id)),Q=_(()=>Z.value.map(e=>h.sites.find(t=>t.id===e)).filter(Boolean));r(Z,(e,t)=>{a(()=>{g.post(j(),{ids:[...e]},{preserveScroll:!0,preserveState:!0,onError:()=>{Z.value=t}})})});function be(e,t){let n=[...Z.value],[r]=n.splice(e,1);n.splice(t,0,r),Z.value=n}let xe=u([k.accessor(`name`,{header:()=>x(`Name`),cell:({row:e,getValue:t})=>d(E,{href:N.url(e.original.id)},()=>d(`div`,{class:`flex gap-2`},[d(`craft-indicator`,{variant:e.original.enabled?`success`:`empty`}),d(`span`,t())]))}),k.accessor(`handle`,{header:()=>x(`Handle`),cell:e=>d(`code`,e.getValue())}),k.accessor(`enabled`,{header:()=>x(`Status`),cell:e=>d(D,{variant:e.getValue()?`success`:`default`},()=>e.getValue()?x(`Enabled`):x(`Disabled`))}),k.accessor(`language`,{header:()=>x(`Language`),cell:e=>d(`code`,e.getValue())}),k.accessor(`primary`,{header:()=>x(`Primary`),cell:e=>e.getValue()?d(`craft-icon`,{name:`check`}):``}),k.accessor(`baseUrl`,{header:()=>x(`Base URL`),cell:e=>d(`code`,e.getValue())}),k.accessor(`group.name`,{id:`group`,header:()=>x(`Group`)}),k.display({id:`actions`,cell:({row:e})=>d(`div`,{class:`flex justify-end`},[d(z,{site:e.original,disabled:e.original.primary,class:`whitespace-normal`})]),meta:{wrap:!0}})]),Se=S({get data(){return Q.value},get columns(){return xe.value},getCoreRowModel:w(),getRowId:e=>e.id.toString(),enableSorting:!1,defaultColumn:{size:`auto`,minSize:50,maxSize:200}});function Ce(){h.group?.id&&confirm(x(`Are you sure you want to delete this group?`))&&g.delete(L({groupId:h.group.id}))}let $=_(()=>h.group?.name?h.group.name:x(`Sites`));return(r,a)=>(i(),o(l,null,[s(F,{debug:{form:f(P),$props:r.$props},"full-width":!0,title:$.value},{title:n(()=>[b(`div`,V,[b(`h1`,H,e($.value),1),t.group?.id?(i(),o(`craft-action-menu`,U,[b(`craft-button`,W,[b(`craft-icon`,{name:`gear`,label:f(x)(`Site group Actions`)},null,8,G)]),b(`div`,K,[b(`craft-action-item`,{onClick:a[0]||=p(e=>X(`update`),[`prevent`])},e(f(x)(`Rename Group`)),1),b(`craft-action-item`,{variant:`danger`,disabled:Q.value.length>0,onClick:p(Ce,[`prevent`])},e(f(x)(`Delete Group`)),9,q)])])):y(``,!0)])]),actions:n(()=>[s(E,{as:`craft-button`,href:f(M)({query:{groupId:t.group?.id}}).url,variant:`primary`,appearance:`button`},{default:n(()=>[a[5]||=b(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),v(` `+e(f(x)(`New Site`)),1)]),_:1},8,[`href`])]),"interior-nav":n(({state:r})=>[b(`craft-nav-list`,J,[b(`craft-nav-item`,{href:f(B).url(),active:!t.group},e(f(x)(`All Sites`)),9,oe),(i(!0),o(l,null,re(t.groups,r=>(i(),c(E,{as:`craft-nav-item`,key:r.id,href:f(B).url({query:{groupId:r.id}}),active:t.group&&r.id===t.group.id,block:``},{default:n(()=>[v(e(r.name),1)]),_:2},1032,[`href`,`active`]))),128))]),b(`div`,se,[b(`craft-button`,{type:`button`,onClick:a[1]||=e=>X(`create`),size:`small`},[a[6]||=b(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),v(` `+e(f(x)(`New Group`)),1)])])]),default:n(()=>[b(`div`,null,[t.readOnly?(i(),c(A,{key:0})):y(``,!0),Q.value.length?(i(),c(T,{key:1,table:f(Se),"read-only":t.readOnly,reorderable:!!t.group?.id,spacing:`relaxed`,onReorder:be},{"drag-preview":n(({row:t})=>[b(`div`,ce,e(t.original.name),1)]),_:1},8,[`table`,`read-only`,`reorderable`])):(i(),o(`div`,le,[b(`div`,ue,[a[8]||=b(`craft-icon`,{name:`light/earth-americas`,style:{"font-size":`calc(48rem / 16)`}},null,-1),b(`p`,null,e(f(x)(`No sites exist for this group yet.`)),1),s(E,{as:`craft-button`,href:f(M)({query:{groupId:t.group?.id}}).url,appearance:`button`},{default:n(()=>[a[7]||=b(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),v(` `+e(f(x)(`New Site`)),1)]),_:1},8,[`href`])])]))])]),_:1},8,[`debug`,`title`]),s(ie,{"is-active":O.value,onClose:a[4]||=e=>{O.value=!1,f(P).reset()},onSubmit:R,loading:f(P).processing},{default:n(()=>[ee(b(`craft-input`,{name:`id`,id:`id`,"onUpdate:modelValue":a[2]||=e=>f(P).id=e,type:`hidden`},null,512),[[te,f(P).id]]),s(f(ne),{data:`nameSuggestions`},{fallback:n(()=>[b(`craft-input`,{readonly:``,name:`readonly-name`,label:f(x)(`Group Name`),"help-text":f(x)(`What this group will be called in the control panel.`)},[b(`div`,fe,[b(`craft-callout`,pe,[v(e(f(x)(`This can begin with an environment variable.`))+` `,1),b(`a`,me,e(f(x)(`Learn more`)),1)])])],8,de)]),default:n(()=>[b(`craft-input`,{label:f(x)(`Group Name`),id:`name`,name:`name`,required:``,"help-text":f(x)(`What this group will be called in the control panel.`),"has-feedback-for":f(P).errors?.name?`error`:``},[s(ae,{options:t.nameSuggestions,modelValue:f(P).name,"onUpdate:modelValue":a[3]||=e=>f(P).name=e,slot:`input`},null,8,[`options`,`modelValue`]),b(`div`,he,[b(`craft-callout`,ge,[v(e(f(x)(`This can begin with an environment variable.`))+` `,1),b(`a`,_e,e(f(x)(`Learn more`)),1)])]),b(`div`,ve,[f(P).errors?.name?(i(),o(`ul`,ye,[b(`li`,null,e(f(P).errors.name),1)])):y(``,!0)])],8,Y)]),_:1})]),_:1},8,[`is-active`,`loading`])],64))}}),[[`__scopeId`,`data-v-87fd6160`]]);export{X as default}; \ No newline at end of file +import{$ as e,E as t,J as n,K as r,L as i,P as a,S as o,T as s,Y as ee,b as c,h as l,it as u,k as d,lt as f,m as p,p as m,r as te,s as h,t as g,ut as _,v,w as y,x as b,y as x,z as S}from"./_plugin-vue_export-helper.js";import{r as C}from"./nav-item-9g3ebwBJ.js";import{a as w,o as ne,s as re,t as ie}from"./AdminTable.js";import{a as T}from"./useAnnouncer.js";import{n as E,t as D}from"./ModalForm.js";import{a as O}from"./dist.js";import{n as k,t as A}from"./wayfinder.js";import{t as ae}from"./InputCombobox.js";import{t as j}from"./CalloutReadOnly.js";import{i as M,n as N,r as P,t as F}from"./DeleteSiteModal.js";import{t as I}from"./IndexLayout.js";var L=e=>({url:L.url(e),method:`post`});L.definition={methods:[`post`],url:`/admin/settings/site-groups`},L.url=e=>L.definition.url+k(e),L.post=e=>({url:L.url(e),method:`post`});var R=(e,t)=>({url:R.url(e,t),method:`delete`});R.definition={methods:[`delete`],url:`/admin/settings/site-groups/{groupId}`},R.url=(e,t)=>{(typeof e==`string`||typeof e==`number`)&&(e={groupId:e}),Array.isArray(e)&&(e={groupId:e[0]}),e=A(e);let n={groupId:e.groupId};return R.definition.url.replace(`{groupId}`,n.groupId.toString()).replace(/\/+$/,``)+k(t)},R.delete=(e,t)=>({url:R.url(e,t),method:`delete`});var z=[`disabled`],B=t({__name:`DeleteSiteButton`,props:{site:{}},setup(e){let t=u(!1);return(n,r)=>(i(),o(`div`,null,[x(`craft-button`,{size:`small`,icon:``,type:`button`,variant:`danger`,appearance:`plain`,disabled:e.site.primary,onClick:r[0]||=e=>t.value=!0},[...r[2]||=[x(`craft-icon`,{name:`x`,label:`t('Delete site'`},null,-1)]],8,z),s(F,{site:e.site,open:t.value,onClose:r[1]||=e=>t.value=!1},null,8,[`site`,`open`])]))}}),V=e=>({url:V.url(e),method:`get`});V.definition={methods:[`get`,`head`],url:`/admin/settings/sites`},V.url=e=>V.definition.url+k(e),V.get=e=>({url:V.url(e),method:`get`}),V.head=e=>({url:V.url(e),method:`head`}),Object.assign(V,V);var H={class:`flex gap-2 items-center`},U={class:`title text-xl`},W={key:0},G={type:`button`,icon:``,size:`small`,slot:`invoker`},K=[`label`],q={slot:`content`},J=[`disabled`],oe={class:`-mx-2`},se=[`href`,`active`],ce={key:0,class:`mt-4 flex gap-2`},le={class:`border-neutral-border-quiet rounded p-2 bg-white`},ue={key:2,class:`py-20`},de={class:`w-[60ch] mx-auto text-center grid gap-3 justify-items-center text-gray-500`},fe=[`label`,`help-text`],pe={slot:`after`},me={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},he={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},ge=[`label`,`help-text`,`has-feedback-for`],_e={slot:`after`},ve={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},ye={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},be={slot:`feedback`},xe={key:0,class:`error-list`},Y=g(t({__name:`SettingsSitesIndex`,props:{group:{},groups:{},sites:{},nameSuggestions:{},flash:{}},setup(t){let g=t,k=u(!1),A=ne(),{readOnly:F}=O(),z=h({id:g.group?.id??null,name:g.group?.name??``});function Y(){z.clearErrors().submit(L(),{onSuccess:()=>{k.value=!1,z.reset()}})}function X(e){e===`create`?(z.name=``,z.id=null):e===`update`&&(z.name=g.group?.rawName??g.group?.name??``,z.id=g.group?.id??null),k.value=!0}let Z=u(g.sites.map(e=>e.id)),Q=v(()=>Z.value.map(e=>g.sites.find(t=>t.id===e)).filter(Boolean));r(Z,(e,t)=>{a(()=>{_.post(M(),{ids:[...e]},{preserveScroll:!0,preserveState:!0,onError:()=>{Z.value=t}})})});function Se(e,t){let n=[...Z.value],[r]=n.splice(e,1);n.splice(t,0,r),Z.value=n}let Ce=u([A.accessor(`name`,{header:()=>C(`Name`),cell:({row:e,getValue:t})=>d(T,{href:P.url(e.original.id)},()=>d(`div`,{class:`flex gap-2`},[d(`craft-indicator`,{variant:e.original.enabled?`success`:`empty`}),d(`span`,t())]))}),A.accessor(`handle`,{header:()=>C(`Handle`),cell:e=>d(`code`,e.getValue())}),A.accessor(`enabled`,{header:()=>C(`Status`),cell:e=>d(E,{variant:e.getValue()?`success`:`default`},()=>e.getValue()?C(`Enabled`):C(`Disabled`))}),A.accessor(`language`,{header:()=>C(`Language`),cell:e=>d(`code`,e.getValue())}),A.accessor(`primary`,{header:()=>C(`Primary`),cell:e=>e.getValue()?d(`craft-icon`,{name:`check`}):``}),A.accessor(`baseUrl`,{header:()=>C(`Base URL`),cell:e=>d(`code`,e.getValue())}),A.accessor(`group.name`,{id:`group`,header:()=>C(`Group`)}),A.display({id:`actions`,cell:({row:e})=>d(`div`,{class:`flex justify-end`},[d(B,{site:e.original,disabled:e.original.primary,class:`whitespace-normal`})]),meta:{wrap:!0}})]),we=w({get data(){return Q.value},get columns(){return Ce.value},state:{get columnVisibility(){return{actions:!F}}},getCoreRowModel:re(),getRowId:e=>e.id.toString(),enableSorting:!1,defaultColumn:{size:`auto`,minSize:50,maxSize:200}});function Te(){g.group?.id&&confirm(C(`Are you sure you want to delete this group?`))&&_.delete(R({groupId:g.group.id}))}let $=v(()=>g.group?.name?g.group.name:C(`Sites`));return(r,a)=>(i(),o(l,null,[s(I,{debug:{form:f(z),$props:r.$props},"full-width":!0,title:$.value},{title:n(()=>[x(`div`,H,[x(`h1`,U,e($.value),1),t.group?.id&&!f(F)?(i(),o(`craft-action-menu`,W,[x(`craft-button`,G,[x(`craft-icon`,{name:`gear`,label:f(C)(`Site group Actions`)},null,8,K)]),x(`div`,q,[x(`craft-action-item`,{onClick:a[0]||=p(e=>X(`update`),[`prevent`])},e(f(C)(`Rename Group`)),1),x(`craft-action-item`,{variant:`danger`,disabled:Q.value.length>0,onClick:p(Te,[`prevent`])},e(f(C)(`Delete Group`)),9,J)])])):b(``,!0)])]),actions:n(()=>[f(F)?b(``,!0):(i(),c(T,{key:0,as:`craft-button`,href:f(N)({query:{groupId:t.group?.id}}).url,variant:`accent`,appearance:`button`},{default:n(()=>[a[5]||=x(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),y(` `+e(f(C)(`New Site`)),1)]),_:1},8,[`href`]))]),"interior-nav":n(({state:r})=>[x(`craft-nav-list`,oe,[x(`craft-nav-item`,{href:f(V).url(),active:!t.group},e(f(C)(`All Sites`)),9,se),(i(!0),o(l,null,S(t.groups,r=>(i(),c(T,{as:`craft-nav-item`,key:r.id,href:f(V).url({query:{groupId:r.id}}),active:t.group&&r.id===t.group.id,block:``},{default:n(()=>[y(e(r.name),1)]),_:2},1032,[`href`,`active`]))),128))]),f(F)?b(``,!0):(i(),o(`div`,ce,[x(`craft-button`,{type:`button`,onClick:a[1]||=e=>X(`create`),size:`small`},[a[6]||=x(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),y(` `+e(f(C)(`New Group`)),1)])]))]),default:n(()=>[x(`div`,null,[f(F)?(i(),c(j,{key:0})):b(``,!0),Q.value.length?(i(),c(ie,{key:1,table:f(we),"read-only":f(F),reorderable:!!t.group?.id,spacing:`relaxed`,onReorder:Se},{"drag-preview":n(({row:t})=>[x(`div`,le,e(t.original.name),1)]),_:1},8,[`table`,`read-only`,`reorderable`])):(i(),o(`div`,ue,[x(`div`,de,[a[8]||=x(`craft-icon`,{name:`light/earth-americas`,style:{"font-size":`calc(48rem / 16)`}},null,-1),x(`p`,null,e(f(C)(`No sites exist for this group yet.`)),1),f(F)?b(``,!0):(i(),c(T,{key:0,as:`craft-button`,href:f(N)({query:{groupId:t.group?.id}}).url,appearance:`button`},{default:n(()=>[a[7]||=x(`craft-icon`,{name:`plus`,slot:`prefix`},null,-1),y(` `+e(f(C)(`New Site`)),1)]),_:1},8,[`href`]))])]))])]),_:1},8,[`debug`,`title`]),s(D,{"is-active":k.value,onClose:a[4]||=e=>{k.value=!1,f(z).reset()},onSubmit:Y,loading:f(z).processing},{default:n(()=>[ee(x(`craft-input`,{name:`id`,id:`id`,"onUpdate:modelValue":a[2]||=e=>f(z).id=e,type:`hidden`},null,512),[[m,f(z).id]]),s(f(te),{data:`nameSuggestions`},{fallback:n(()=>[x(`craft-input`,{readonly:``,name:`readonly-name`,label:f(C)(`Group Name`),"help-text":f(C)(`What this group will be called in the control panel.`)},[x(`div`,pe,[x(`craft-callout`,me,[y(e(f(C)(`This can begin with an environment variable.`))+` `,1),x(`a`,he,e(f(C)(`Learn more`)),1)])])],8,fe)]),default:n(()=>[x(`craft-input`,{label:f(C)(`Group Name`),id:`name`,name:`name`,required:``,"help-text":f(C)(`What this group will be called in the control panel.`),"has-feedback-for":f(z).errors?.name?`error`:``},[s(ae,{options:t.nameSuggestions,modelValue:f(z).name,"onUpdate:modelValue":a[3]||=e=>f(z).name=e,slot:`input`},null,8,[`options`,`modelValue`]),x(`div`,_e,[x(`craft-callout`,ve,[y(e(f(C)(`This can begin with an environment variable.`))+` `,1),x(`a`,ye,e(f(C)(`Learn more`)),1)])]),x(`div`,be,[f(z).errors?.name?(i(),o(`ul`,xe,[x(`li`,null,e(f(z).errors.name),1)])):b(``,!0)])],8,ge)]),_:1})]),_:1},8,[`is-active`,`loading`])],64))}}),[[`__scopeId`,`data-v-05636dd3`]]);export{Y as default}; \ No newline at end of file diff --git a/resources/build/Updater.js b/resources/build/Updater.js index 42eb790ee7b..6b3feca75dd 100644 --- a/resources/build/Updater.js +++ b/resources/build/Updater.js @@ -2,4 +2,4 @@ import{$ as e,E as t,F as n,K as r,L as i,S as a,T as o,a as s,h as c,it as l,lt ----------------------------------------------------------- -`+n.value.errorDetails),`mailto:${e.email}?subject=${t}&body=${encodeURIComponent(r)}`}return{state:n,isLoading:r,hasError:i,isFinished:a,executeAction:o,handleOptionClick:c,getEmailLink:d}}var y={class:`updater`},b={class:`updater-graphic`},x={key:0,visible:!0,class:`spinner`},S={key:1,name:`circle-check`,class:`icon-success`},C={key:2,name:`alert-circle`,class:`icon-error`},w={class:`updater-status`},T=[`innerHTML`],E={key:0,class:`error-details`,tabindex:`0`},D=[`innerHTML`],O=[`innerHTML`],k={key:0,class:`updater-options`},A=[`href`,`target`],j=[`onClick`,`variant`],M=d(t({__name:`Updater`,props:{title:{},initialState:{},actionPrefix:{},returnUrl:{}},setup(t){let l=t,{state:d,isLoading:f,hasError:g,isFinished:_,executeAction:M,handleOptionClick:N,getEmailLink:P}=v(l.actionPrefix,l.initialState);function F(e){return e.replace(/\n{2,}/g,`

`).replace(/\n/g,`
`).replace(/`(.*?)`/g,`$1`)}function I(){setTimeout(()=>{window.location.href=d.value.returnUrl||l.returnUrl||`/admin/dashboard`},750)}function L(e){return!!(e.url||e.email)}function R(e){return e.url?e.url:e.email?P(e):`#`}return n(()=>{l.initialState.nextAction&&M(l.initialState.nextAction)}),r(_,e=>{e&&I()}),(n,r)=>(i(),a(c,null,[o(u(s),{title:t.title},null,8,[`title`]),m(`div`,y,[m(`div`,b,[u(f)&&!u(g)?(i(),a(`craft-spinner`,x)):u(_)?(i(),a(`craft-icon`,S)):u(g)?(i(),a(`craft-icon`,C)):p(``,!0)]),m(`div`,w,[u(d).error?(i(),a(c,{key:0},[m(`p`,{class:`error-message`,innerHTML:F(u(d).error)},null,8,T),u(d).errorDetails?(i(),a(`div`,E,[m(`p`,{innerHTML:F(u(d).errorDetails)},null,8,D)])):p(``,!0)],64)):u(d).status?(i(),a(`p`,{key:1,innerHTML:F(u(d).status)},null,8,O)):p(``,!0)]),u(d).options&&!u(f)?(i(),a(`div`,k,[(i(!0),a(c,null,h(u(d).options,t=>(i(),a(c,{key:t.label},[L(t)?(i(),a(`a`,{key:0,href:R(t),target:t.url?`_blank`:void 0,class:`btn big`},e(t.label),9,A)):(i(),a(`craft-button`,{key:1,type:`button`,onClick:e=>u(N)(t),variant:t.submit?`primary`:`default`,size:`lg`},e(t.label),9,j))],64))),128))])):p(``,!0)])],64))}}),[[`__scopeId`,`data-v-5a0085ac`]]);export{M as default}; \ No newline at end of file +`+n.value.errorDetails),`mailto:${e.email}?subject=${t}&body=${encodeURIComponent(r)}`}return{state:n,isLoading:r,hasError:i,isFinished:a,executeAction:o,handleOptionClick:c,getEmailLink:d}}var y={class:`updater`},b={class:`updater-graphic`},x={key:0,visible:!0,class:`spinner`},S={key:1,name:`circle-check`,class:`icon-success`},C={key:2,name:`alert-circle`,class:`icon-error`},w={class:`updater-status`},T=[`innerHTML`],E={key:0,class:`error-details`,tabindex:`0`},D=[`innerHTML`],O=[`innerHTML`],k={key:0,class:`updater-options`},A=[`href`,`target`],j=[`onClick`,`variant`],M=d(t({__name:`Updater`,props:{title:{},initialState:{},actionPrefix:{},returnUrl:{}},setup(t){let l=t,{state:d,isLoading:f,hasError:g,isFinished:_,executeAction:M,handleOptionClick:N,getEmailLink:P}=v(l.actionPrefix,l.initialState);function F(e){return e.replace(/\n{2,}/g,`

`).replace(/\n/g,`
`).replace(/`(.*?)`/g,`$1`)}function I(){setTimeout(()=>{window.location.href=d.value.returnUrl||l.returnUrl||`/admin/dashboard`},750)}function L(e){return!!(e.url||e.email)}function R(e){return e.url?e.url:e.email?P(e):`#`}return n(()=>{l.initialState.nextAction&&M(l.initialState.nextAction)}),r(_,e=>{e&&I()}),(n,r)=>(i(),a(c,null,[o(u(s),{title:t.title},null,8,[`title`]),m(`div`,y,[m(`div`,b,[u(f)&&!u(g)?(i(),a(`craft-spinner`,x)):u(_)?(i(),a(`craft-icon`,S)):u(g)?(i(),a(`craft-icon`,C)):p(``,!0)]),m(`div`,w,[u(d).error?(i(),a(c,{key:0},[m(`p`,{class:`error-message`,innerHTML:F(u(d).error)},null,8,T),u(d).errorDetails?(i(),a(`div`,E,[m(`p`,{innerHTML:F(u(d).errorDetails)},null,8,D)])):p(``,!0)],64)):u(d).status?(i(),a(`p`,{key:1,innerHTML:F(u(d).status)},null,8,O)):p(``,!0)]),u(d).options&&!u(f)?(i(),a(`div`,k,[(i(!0),a(c,null,h(u(d).options,t=>(i(),a(c,{key:t.label},[L(t)?(i(),a(`a`,{key:0,href:R(t),target:t.url?`_blank`:void 0,class:`btn big`},e(t.label),9,A)):(i(),a(`craft-button`,{key:1,type:`button`,onClick:e=>u(N)(t),variant:t.submit?`accent`:`neutral`,size:`lg`},e(t.label),9,j))],64))),128))])):p(``,!0)])],64))}}),[[`__scopeId`,`data-v-87fe8f29`]]);export{M as default}; \ No newline at end of file diff --git a/resources/build/_plugin-vue_export-helper.js b/resources/build/_plugin-vue_export-helper.js index a34e961b907..3738dc75057 100644 --- a/resources/build/_plugin-vue_export-helper.js +++ b/resources/build/_plugin-vue_export-helper.js @@ -871,11 +871,11 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; min-height: var(--c-button-height, var(--c-size-control-md)); min-width: var(--c-button-width, var(--c-size-control-md)); white-space: nowrap; + border-width: var(--c-button-border-width, 1px); + border-style: var(--c-button-border-style, solid); /* Colorable styles */ color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); - border-width: var(--c-button-border-width, 1px); - border-style: var(--c-button-border-style, solid); border-color: var( --c-color-border-loud, var(--c-color-neutral-border-loud) @@ -888,22 +888,17 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; @media (hover: hover) { :host(:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-loud, var(--c-button-default-fill)), - var(--c-color-mix-hover) + background-color: hsl( + from var(--c-color-fill-loud, var(--c-button-default-fill)) h s + calc(l - 5) ); color: var(--c-color-on-loud); } } :host(:not(:disabled):not(.loading):active) { - color: var(--c-color-on-loud); - background-color: color-mix( - in oklab, - var(--c-color-fill-loud, var(--c-color-neutral-fill-normal)), - var(--c-color-mix-active) - ); + color: var(--_active-color); + background-color: var(--_active-background-color); } /* @@ -967,101 +962,82 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; Appearances */ - /* Plain */ - :host([appearance~='plain']) { + /* Plain & Outline (Shared) */ + :host([appearance~='plain']), + :host([appearance~='outline']) { background-color: transparent; - border-color: transparent; - color: inherit; + color: var(--c-color-on-quiet); } - :host([appearance~='plain']:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-button-default-fill)), - var(--c-color-mix-hover) + :host([appearance~='plain']:hover), + :host([appearance~='outline']:hover) { + background-color: hsl( + from var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)) h s + calc(l - 5) ); - color: var(--c-color-on-quiet); } - :host([appearance~='plain']:active) { - color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)), - var(--c-color-mix-active) + :host([appearance~='plain']:active), + :host([appearance~='outline']:active) { + --_active-background-color: hsl( + from var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)) h s + calc(l - 8) ); + --_active-color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); } - /* Filled */ - :host([appearance~='filled']) { - background-color: var( - --c-color-fill-normal, - var(--c-color-neutral-fill-normal) - ); + /* Plain */ + :host([appearance~='plain']) { border-color: transparent; - color: var(--c-color-on-normal, var(--c-color-neutral-on-normal)); } - :host([appearance~='filled']:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-normal, var(--c-color-neutral-fill-normal)), - var(--c-color-mix-hover) + /* Solid */ + :host([appearance~='solid']) { + background-color: var( + --c-color-fill-loud, + var(--c-color-neutral-fill-loud) ); - color: var(--c-color-on-normal, var(--c-color-neutral-on-normal)); + border-color: transparent; + color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); } - :host([appearance~='filled']:active) { - color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)), - var(--c-color-mix-active) + :host([appearance~='solid']:hover) { + background-color: hsl( + from var(--c-color-fill-loud, var(--c-color-neutral-fill-loud)) h s + calc(l - 5) ); + color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); } - /* Dashed */ - :host([appearance~='dashed']) { - background-color: transparent; - border-color: var(--c-color-border-normal); - border-style: dashed; - color: var(--c-color-on-quiet); - } - - :host([appearance~='dashed']:hover) { - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-button-default-fill)), - var(--c-color-mix-hover) + :host([appearance~='solid']:active) { + --_active-background-color: hsl( + from var(--c-color-fill-loud, var(--c-color-neutral-fill-loud)) h s + calc(l - 10) ); - color: var(--c-color-on-quiet); + --_active-color: var(--c-color-on-loud, var(--c-color-neutral-on-loud)); } - :host([appearance~='dashed']:active) { - color: var(--c-color-on-quiet, var(--c-color-neutral-on-quiet)); - background-color: color-mix( - in oklab, - var(--c-color-fill-quiet, var(--c-color-neutral-fill-quiet)), - var(--c-color-mix-active) - ); + /* Outline */ + :host([appearance~='outline']) { + border-color: var(--c-color-border-loud); } /* Variants (aka fill colors) */ - :host([variant~='primary']) { - --c-color-fill-loud: var(--c-color-brand-fill-loud); - --c-color-fill-normal: var(--c-color-brand-fill-normal); - --c-color-fill-quiet: var(--c-color-brand-fill-quiet); - --c-color-border-loud: var(--c-color-brand-border-loud); - --c-color-border-normal: var(--c-color-brand-border-normal); - --c-color-border-quiet: var(--c-color-brand-border-quiet); - --c-color-on-loud: var(--c-color-brand-on-loud); - --c-color-on-normal: var(--c-color-brand-on-normal); - --c-color-on-quiet: var(--c-color-brand-on-quiet); + :host([variant~='accent']) { + --c-color-fill-loud: var(--c-color-accent-fill-loud); + --c-color-fill-normal: var(--c-color-accent-fill-normal); + --c-color-fill-quiet: var(--c-color-accent-fill-quiet); + --c-color-border-loud: var(--c-color-accent-border-loud); + --c-color-border-normal: var(--c-color-accent-border-normal); + --c-color-border-quiet: var(--c-color-accent-border-quiet); + --c-color-on-loud: var(--c-color-accent-on-loud); + --c-color-on-normal: var(--c-color-accent-on-normal); + --c-color-on-quiet: var(--c-color-accent-on-quiet); } - :host([variant='default']) { + :host([variant='neutral']) { --c-color-fill-loud: var(--c-color-neutral-fill-loud); --c-color-fill-normal: var(--c-color-neutral-fill-normal); --c-color-fill-quiet: var(--c-color-neutral-fill-quiet); @@ -1136,7 +1112,7 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; transform: translateX(-100%); } } -`,ri=Object.prototype.toString;function ii(e){return typeof e==`function`||ri.call(e)===`[object Function]`}function ai(e){var t=Number(e);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))}var oi=2**53-1;function si(e){var t=ai(e);return Math.min(Math.max(t,0),oi)}function ci(e,t){var n=Array,r=Object(e);if(e==null)throw TypeError(`Array.from requires an array-like object - not null or undefined`);if(t!==void 0&&!ii(t))throw TypeError(`Array.from: when provided, the second argument must be a function`);for(var i=si(r.length),a=ii(n)?Object(new n(i)):Array(i),o=0,s;o`u`?Set:function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ui(this,e),pi(this,`items`,void 0),this.items=t}return fi(e,[{key:`add`,value:function(e){return this.has(e)===!1&&this.items.push(e),this}},{key:`clear`,value:function(){this.items=[]}},{key:`delete`,value:function(e){var t=this.items.length;return this.items=this.items.filter(function(t){return t!==e}),t!==this.items.length}},{key:`forEach`,value:function(e){var t=this;this.items.forEach(function(n){e(n,n,t)})}},{key:`has`,value:function(e){return this.items.indexOf(e)!==-1}},{key:`size`,get:function(){return this.items.length}}])}();function _i(e){return e.localName??e.tagName.toLowerCase()}var vi={article:`article`,aside:`complementary`,button:`button`,datalist:`listbox`,dd:`definition`,details:`group`,dialog:`dialog`,dt:`term`,fieldset:`group`,figure:`figure`,form:`form`,footer:`contentinfo`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,header:`banner`,hr:`separator`,html:`document`,legend:`legend`,li:`listitem`,math:`math`,main:`main`,menu:`list`,nav:`navigation`,ol:`list`,optgroup:`group`,option:`option`,output:`status`,progress:`progressbar`,section:`region`,summary:`button`,table:`table`,tbody:`rowgroup`,textarea:`textbox`,tfoot:`rowgroup`,td:`cell`,th:`columnheader`,thead:`rowgroup`,tr:`row`,ul:`list`},yi={caption:new Set([`aria-label`,`aria-labelledby`]),code:new Set([`aria-label`,`aria-labelledby`]),deletion:new Set([`aria-label`,`aria-labelledby`]),emphasis:new Set([`aria-label`,`aria-labelledby`]),generic:new Set([`aria-label`,`aria-labelledby`,`aria-roledescription`]),insertion:new Set([`aria-label`,`aria-labelledby`]),none:new Set([`aria-label`,`aria-labelledby`]),paragraph:new Set([`aria-label`,`aria-labelledby`]),presentation:new Set([`aria-label`,`aria-labelledby`]),strong:new Set([`aria-label`,`aria-labelledby`]),subscript:new Set([`aria-label`,`aria-labelledby`]),superscript:new Set([`aria-label`,`aria-labelledby`])};function bi(e,t){return[`aria-atomic`,`aria-busy`,`aria-controls`,`aria-current`,`aria-description`,`aria-describedby`,`aria-details`,`aria-dropeffect`,`aria-flowto`,`aria-grabbed`,`aria-hidden`,`aria-keyshortcuts`,`aria-label`,`aria-labelledby`,`aria-live`,`aria-owns`,`aria-relevant`,`aria-roledescription`].some(function(n){var r;return e.hasAttribute(n)&&!((r=yi[t])!=null&&r.has(n))})}function xi(e,t){return bi(e,t)}function Si(e){var t=wi(e);if(t===null||Ti.indexOf(t)!==-1){var n=Ci(e);if(Ti.indexOf(t||``)===-1||xi(e,n||``))return n}return t}function Ci(e){var t=vi[_i(e)];if(t!==void 0)return t;switch(_i(e)){case`a`:case`area`:case`link`:if(e.hasAttribute(`href`))return`link`;break;case`img`:return e.getAttribute(`alt`)===``&&!xi(e,`img`)?`presentation`:`img`;case`input`:var n=e.type;switch(n){case`button`:case`image`:case`reset`:case`submit`:return`button`;case`checkbox`:case`radio`:return n;case`range`:return`slider`;case`email`:case`tel`:case`text`:case`url`:return e.hasAttribute(`list`)?`combobox`:`textbox`;case`search`:return e.hasAttribute(`list`)?`combobox`:`searchbox`;case`number`:return`spinbutton`;default:return null}case`select`:return e.hasAttribute(`multiple`)||e.size>1?`listbox`:`combobox`}return null}function wi(e){var t=e.getAttribute(`role`);if(t!==null){var n=t.trim().split(` `)[0];if(n.length>0)return n}return null}var Ti=[`presentation`,`none`];function Ei(e){return e!==null&&e.nodeType===e.ELEMENT_NODE}function Di(e){return Ei(e)&&_i(e)===`caption`}function Oi(e){return Ei(e)&&_i(e)===`input`}function ki(e){return Ei(e)&&_i(e)===`optgroup`}function Ai(e){return Ei(e)&&_i(e)===`select`}function ji(e){return Ei(e)&&_i(e)===`table`}function Mi(e){return Ei(e)&&_i(e)===`textarea`}function Ni(e){var t=(e.ownerDocument===null?e:e.ownerDocument).defaultView;if(t===null)throw TypeError(`no window available`);return t}function Pi(e){return Ei(e)&&_i(e)===`fieldset`}function Fi(e){return Ei(e)&&_i(e)===`legend`}function Ii(e){return Ei(e)&&_i(e)===`slot`}function Li(e){return Ei(e)&&e.ownerSVGElement!==void 0}function Ri(e){return Ei(e)&&_i(e)===`svg`}function zi(e){return Li(e)&&_i(e)===`title`}function Bi(e,t){if(Ei(e)&&e.hasAttribute(t)){var n=e.getAttribute(t).split(` `),r=e.getRootNode?e.getRootNode():e.ownerDocument;return n.map(function(e){return r.getElementById(e)}).filter(function(e){return e!==null})}return[]}function Vi(e,t){return Ei(e)?t.indexOf(Si(e))!==-1:!1}function Hi(e){return e.trim().replace(/\s\s+/g,` `)}function Ui(e,t){if(!Ei(e))return!1;if(e.hasAttribute(`hidden`)||e.getAttribute(`aria-hidden`)===`true`)return!0;var n=t(e);return n.getPropertyValue(`display`)===`none`||n.getPropertyValue(`visibility`)===`hidden`}function Wi(e){return Vi(e,[`button`,`combobox`,`listbox`,`textbox`])||Gi(e,`range`)}function Gi(e,t){if(!Ei(e))return!1;switch(t){case`range`:return Vi(e,[`meter`,`progressbar`,`scrollbar`,`slider`,`spinbutton`]);default:throw TypeError(`No knowledge about abstract role '${t}'. This is likely a bug :(`)}}function Ki(e,t){var n=ci(e.querySelectorAll(t));return Bi(e,`aria-owns`).forEach(function(e){n.push.apply(n,ci(e.querySelectorAll(t)))}),n}function qi(e){return Ai(e)?e.selectedOptions||Ki(e,`[selected]`):Ki(e,`[aria-selected="true"]`)}function Ji(e){return Vi(e,Ti)}function Yi(e){return Di(e)}function Xi(e){return Vi(e,[`button`,`cell`,`checkbox`,`columnheader`,`gridcell`,`heading`,`label`,`legend`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`row`,`rowheader`,`switch`,`tab`,`tooltip`,`treeitem`])}function Zi(e){return!1}function Qi(e){return Oi(e)||Mi(e)?e.value:e.textContent||``}function $i(e){var t=e.getPropertyValue(`content`);return/^["'].*["']$/.test(t)?t.slice(1,-1):``}function ea(e){var t=_i(e);return t===`button`||t===`input`&&e.getAttribute(`type`)!==`hidden`||t===`meter`||t===`output`||t===`progress`||t===`select`||t===`textarea`}function ta(e){if(ea(e))return e;var t=null;return e.childNodes.forEach(function(e){if(t===null&&Ei(e)){var n=ta(e);n!==null&&(t=n)}}),t}function na(e){if(e.control!==void 0)return e.control;var t=e.getAttribute(`for`);return t===null?ta(e):e.ownerDocument.getElementById(t)}function ra(e){var t=e.labels;if(t===null)return t;if(t!==void 0)return ci(t);if(!ea(e))return null;var n=e.ownerDocument;return ci(n.querySelectorAll(`label`)).filter(function(t){return na(t)===e})}function ia(e){var t=e.assignedNodes();return t.length===0?ci(e.childNodes):t}function aa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new gi,r=typeof Map>`u`?void 0:new Map,i=Ni(e),a=t.compute,o=a===void 0?`name`:a,s=t.computedStyleSupportsPseudoElements,c=s===void 0?t.getComputedStyle!==void 0:s,l=t.getComputedStyle,u=l===void 0?i.getComputedStyle.bind(i):l,d=t.hidden,f=d===void 0?!1:d,p=function(e,t){if(t!==void 0)throw Error(`use uncachedGetComputedStyle directly for pseudo elements`);if(r===void 0)return u(e);var n=r.get(e);if(n)return n;var i=u(e,t);return r.set(e,i),i};function m(e,t){var n=``;if(Ei(e)&&c&&(n=`${$i(u(e,`::before`))} ${n}`),(Ii(e)?ia(e):ci(e.childNodes).concat(Bi(e,`aria-owns`))).forEach(function(e){var r=v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),i=(Ei(e)?p(e).getPropertyValue(`display`):`inline`)===`inline`?``:` `;n+=`${i}${r}${i}`}),Ei(e)&&c){var r=$i(u(e,`::after`));n=`${n} ${r}`}return n.trim()}function h(e,t){var r=e.getAttributeNode(t);return r!==null&&!n.has(r)&&r.value.trim()!==``?(n.add(r),r.value):null}function g(e){return Ei(e)?h(e,`title`):null}function _(e){if(!Ei(e))return null;if(Pi(e)){n.add(e);for(var t=ci(e.childNodes),r=0;r0}).join(` `);if(Oi(e)&&e.type===`image`){var _=h(e,`alt`);if(_!==null)return _;var y=h(e,`title`);return y===null?`Submit Query`:y}if(Vi(e,[`button`])){var b=m(e,{isEmbeddedInLabel:!1,isReferenced:!1});if(b!==``)return b}return null}function v(e,t){if(n.has(e))return``;if(!f&&Ui(e,p)&&!t.isReferenced)return n.add(e),``;var r=Ei(e)?e.getAttributeNode(`aria-labelledby`):null,i=r!==null&&!n.has(r)?Bi(e,`aria-labelledby`):[];if(o===`name`&&!t.isReferenced&&i.length>0)return n.add(r),i.map(function(e){return v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(` `);var a=t.recursion&&Wi(e)&&o===`name`;if(!a){var s=(Ei(e)&&e.getAttribute(`aria-label`)||``).trim();if(s!==``&&o===`name`)return n.add(e),s;if(!Ji(e)){var c=_(e);if(c!==null)return n.add(e),c}}if(Vi(e,[`menu`]))return n.add(e),``;if(a||t.isEmbeddedInLabel||t.isReferenced){if(Vi(e,[`combobox`,`listbox`])){n.add(e);var l=qi(e);return l.length===0?Oi(e)?e.value:``:ci(l).map(function(e){return v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(` `)}if(Gi(e,`range`))return n.add(e),e.hasAttribute(`aria-valuetext`)?e.getAttribute(`aria-valuetext`):e.hasAttribute(`aria-valuenow`)?e.getAttribute(`aria-valuenow`):e.getAttribute(`value`)||``;if(Vi(e,[`textbox`]))return n.add(e),Qi(e)}if(Xi(e)||Ei(e)&&t.isReferenced||Yi(e)||Zi(e)){var u=m(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1});if(u!==``)return n.add(e),u}if(e.nodeType===e.TEXT_NODE)return n.add(e),e.textContent||``;if(t.recursion)return n.add(e),m(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1});var d=g(e);return d===null?(n.add(e),``):(n.add(e),d)}return Hi(v(e,{isEmbeddedInLabel:!1,isReferenced:o===`description`,recursion:!1}))}function oa(e){return Vi(e,[`caption`,`code`,`deletion`,`emphasis`,`generic`,`insertion`,`none`,`paragraph`,`presentation`,`strong`,`subscript`,`superscript`])}function sa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return oa(e)?``:aa(e,t)}var ca=class extends ti{constructor(...e){super(...e),this.appearance=`accent`,this.variant=`default`,this.size=`medium`,this.loading=!1,this.align=`center`,this._hasAccessibilityError=!1}static get styles(){return[...super.styles,ni]}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete;let t=this.querySelectorAll(`craft-icon, craft-spinner`);await Promise.all(Array.from(t).map(e=>e.updateComplete)),this.accessibleName||=sa(this),this._hasAccessibilityError=!this.accessibleName||this.accessibleName.trim()===``}render(){return r` +`,ri=Object.prototype.toString;function ii(e){return typeof e==`function`||ri.call(e)===`[object Function]`}function ai(e){var t=Number(e);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))}var oi=2**53-1;function si(e){var t=ai(e);return Math.min(Math.max(t,0),oi)}function ci(e,t){var n=Array,r=Object(e);if(e==null)throw TypeError(`Array.from requires an array-like object - not null or undefined`);if(t!==void 0&&!ii(t))throw TypeError(`Array.from: when provided, the second argument must be a function`);for(var i=si(r.length),a=ii(n)?Object(new n(i)):Array(i),o=0,s;o`u`?Set:function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ui(this,e),pi(this,`items`,void 0),this.items=t}return fi(e,[{key:`add`,value:function(e){return this.has(e)===!1&&this.items.push(e),this}},{key:`clear`,value:function(){this.items=[]}},{key:`delete`,value:function(e){var t=this.items.length;return this.items=this.items.filter(function(t){return t!==e}),t!==this.items.length}},{key:`forEach`,value:function(e){var t=this;this.items.forEach(function(n){e(n,n,t)})}},{key:`has`,value:function(e){return this.items.indexOf(e)!==-1}},{key:`size`,get:function(){return this.items.length}}])}();function _i(e){return e.localName??e.tagName.toLowerCase()}var vi={article:`article`,aside:`complementary`,button:`button`,datalist:`listbox`,dd:`definition`,details:`group`,dialog:`dialog`,dt:`term`,fieldset:`group`,figure:`figure`,form:`form`,footer:`contentinfo`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,header:`banner`,hr:`separator`,html:`document`,legend:`legend`,li:`listitem`,math:`math`,main:`main`,menu:`list`,nav:`navigation`,ol:`list`,optgroup:`group`,option:`option`,output:`status`,progress:`progressbar`,section:`region`,summary:`button`,table:`table`,tbody:`rowgroup`,textarea:`textbox`,tfoot:`rowgroup`,td:`cell`,th:`columnheader`,thead:`rowgroup`,tr:`row`,ul:`list`},yi={caption:new Set([`aria-label`,`aria-labelledby`]),code:new Set([`aria-label`,`aria-labelledby`]),deletion:new Set([`aria-label`,`aria-labelledby`]),emphasis:new Set([`aria-label`,`aria-labelledby`]),generic:new Set([`aria-label`,`aria-labelledby`,`aria-roledescription`]),insertion:new Set([`aria-label`,`aria-labelledby`]),none:new Set([`aria-label`,`aria-labelledby`]),paragraph:new Set([`aria-label`,`aria-labelledby`]),presentation:new Set([`aria-label`,`aria-labelledby`]),strong:new Set([`aria-label`,`aria-labelledby`]),subscript:new Set([`aria-label`,`aria-labelledby`]),superscript:new Set([`aria-label`,`aria-labelledby`])};function bi(e,t){return[`aria-atomic`,`aria-busy`,`aria-controls`,`aria-current`,`aria-description`,`aria-describedby`,`aria-details`,`aria-dropeffect`,`aria-flowto`,`aria-grabbed`,`aria-hidden`,`aria-keyshortcuts`,`aria-label`,`aria-labelledby`,`aria-live`,`aria-owns`,`aria-relevant`,`aria-roledescription`].some(function(n){var r;return e.hasAttribute(n)&&!((r=yi[t])!=null&&r.has(n))})}function xi(e,t){return bi(e,t)}function Si(e){var t=wi(e);if(t===null||Ti.indexOf(t)!==-1){var n=Ci(e);if(Ti.indexOf(t||``)===-1||xi(e,n||``))return n}return t}function Ci(e){var t=vi[_i(e)];if(t!==void 0)return t;switch(_i(e)){case`a`:case`area`:case`link`:if(e.hasAttribute(`href`))return`link`;break;case`img`:return e.getAttribute(`alt`)===``&&!xi(e,`img`)?`presentation`:`img`;case`input`:var n=e.type;switch(n){case`button`:case`image`:case`reset`:case`submit`:return`button`;case`checkbox`:case`radio`:return n;case`range`:return`slider`;case`email`:case`tel`:case`text`:case`url`:return e.hasAttribute(`list`)?`combobox`:`textbox`;case`search`:return e.hasAttribute(`list`)?`combobox`:`searchbox`;case`number`:return`spinbutton`;default:return null}case`select`:return e.hasAttribute(`multiple`)||e.size>1?`listbox`:`combobox`}return null}function wi(e){var t=e.getAttribute(`role`);if(t!==null){var n=t.trim().split(` `)[0];if(n.length>0)return n}return null}var Ti=[`presentation`,`none`];function Ei(e){return e!==null&&e.nodeType===e.ELEMENT_NODE}function Di(e){return Ei(e)&&_i(e)===`caption`}function Oi(e){return Ei(e)&&_i(e)===`input`}function ki(e){return Ei(e)&&_i(e)===`optgroup`}function Ai(e){return Ei(e)&&_i(e)===`select`}function ji(e){return Ei(e)&&_i(e)===`table`}function Mi(e){return Ei(e)&&_i(e)===`textarea`}function Ni(e){var t=(e.ownerDocument===null?e:e.ownerDocument).defaultView;if(t===null)throw TypeError(`no window available`);return t}function Pi(e){return Ei(e)&&_i(e)===`fieldset`}function Fi(e){return Ei(e)&&_i(e)===`legend`}function Ii(e){return Ei(e)&&_i(e)===`slot`}function Li(e){return Ei(e)&&e.ownerSVGElement!==void 0}function Ri(e){return Ei(e)&&_i(e)===`svg`}function zi(e){return Li(e)&&_i(e)===`title`}function Bi(e,t){if(Ei(e)&&e.hasAttribute(t)){var n=e.getAttribute(t).split(` `),r=e.getRootNode?e.getRootNode():e.ownerDocument;return n.map(function(e){return r.getElementById(e)}).filter(function(e){return e!==null})}return[]}function Vi(e,t){return Ei(e)?t.indexOf(Si(e))!==-1:!1}function Hi(e){return e.trim().replace(/\s\s+/g,` `)}function Ui(e,t){if(!Ei(e))return!1;if(e.hasAttribute(`hidden`)||e.getAttribute(`aria-hidden`)===`true`)return!0;var n=t(e);return n.getPropertyValue(`display`)===`none`||n.getPropertyValue(`visibility`)===`hidden`}function Wi(e){return Vi(e,[`button`,`combobox`,`listbox`,`textbox`])||Gi(e,`range`)}function Gi(e,t){if(!Ei(e))return!1;switch(t){case`range`:return Vi(e,[`meter`,`progressbar`,`scrollbar`,`slider`,`spinbutton`]);default:throw TypeError(`No knowledge about abstract role '${t}'. This is likely a bug :(`)}}function Ki(e,t){var n=ci(e.querySelectorAll(t));return Bi(e,`aria-owns`).forEach(function(e){n.push.apply(n,ci(e.querySelectorAll(t)))}),n}function qi(e){return Ai(e)?e.selectedOptions||Ki(e,`[selected]`):Ki(e,`[aria-selected="true"]`)}function Ji(e){return Vi(e,Ti)}function Yi(e){return Di(e)}function Xi(e){return Vi(e,[`button`,`cell`,`checkbox`,`columnheader`,`gridcell`,`heading`,`label`,`legend`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`row`,`rowheader`,`switch`,`tab`,`tooltip`,`treeitem`])}function Zi(e){return!1}function Qi(e){return Oi(e)||Mi(e)?e.value:e.textContent||``}function $i(e){var t=e.getPropertyValue(`content`);return/^["'].*["']$/.test(t)?t.slice(1,-1):``}function ea(e){var t=_i(e);return t===`button`||t===`input`&&e.getAttribute(`type`)!==`hidden`||t===`meter`||t===`output`||t===`progress`||t===`select`||t===`textarea`}function ta(e){if(ea(e))return e;var t=null;return e.childNodes.forEach(function(e){if(t===null&&Ei(e)){var n=ta(e);n!==null&&(t=n)}}),t}function na(e){if(e.control!==void 0)return e.control;var t=e.getAttribute(`for`);return t===null?ta(e):e.ownerDocument.getElementById(t)}function ra(e){var t=e.labels;if(t===null)return t;if(t!==void 0)return ci(t);if(!ea(e))return null;var n=e.ownerDocument;return ci(n.querySelectorAll(`label`)).filter(function(t){return na(t)===e})}function ia(e){var t=e.assignedNodes();return t.length===0?ci(e.childNodes):t}function aa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new gi,r=typeof Map>`u`?void 0:new Map,i=Ni(e),a=t.compute,o=a===void 0?`name`:a,s=t.computedStyleSupportsPseudoElements,c=s===void 0?t.getComputedStyle!==void 0:s,l=t.getComputedStyle,u=l===void 0?i.getComputedStyle.bind(i):l,d=t.hidden,f=d===void 0?!1:d,p=function(e,t){if(t!==void 0)throw Error(`use uncachedGetComputedStyle directly for pseudo elements`);if(r===void 0)return u(e);var n=r.get(e);if(n)return n;var i=u(e,t);return r.set(e,i),i};function m(e,t){var n=``;if(Ei(e)&&c&&(n=`${$i(u(e,`::before`))} ${n}`),(Ii(e)?ia(e):ci(e.childNodes).concat(Bi(e,`aria-owns`))).forEach(function(e){var r=v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),i=(Ei(e)?p(e).getPropertyValue(`display`):`inline`)===`inline`?``:` `;n+=`${i}${r}${i}`}),Ei(e)&&c){var r=$i(u(e,`::after`));n=`${n} ${r}`}return n.trim()}function h(e,t){var r=e.getAttributeNode(t);return r!==null&&!n.has(r)&&r.value.trim()!==``?(n.add(r),r.value):null}function g(e){return Ei(e)?h(e,`title`):null}function _(e){if(!Ei(e))return null;if(Pi(e)){n.add(e);for(var t=ci(e.childNodes),r=0;r0}).join(` `);if(Oi(e)&&e.type===`image`){var _=h(e,`alt`);if(_!==null)return _;var y=h(e,`title`);return y===null?`Submit Query`:y}if(Vi(e,[`button`])){var b=m(e,{isEmbeddedInLabel:!1,isReferenced:!1});if(b!==``)return b}return null}function v(e,t){if(n.has(e))return``;if(!f&&Ui(e,p)&&!t.isReferenced)return n.add(e),``;var r=Ei(e)?e.getAttributeNode(`aria-labelledby`):null,i=r!==null&&!n.has(r)?Bi(e,`aria-labelledby`):[];if(o===`name`&&!t.isReferenced&&i.length>0)return n.add(r),i.map(function(e){return v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(` `);var a=t.recursion&&Wi(e)&&o===`name`;if(!a){var s=(Ei(e)&&e.getAttribute(`aria-label`)||``).trim();if(s!==``&&o===`name`)return n.add(e),s;if(!Ji(e)){var c=_(e);if(c!==null)return n.add(e),c}}if(Vi(e,[`menu`]))return n.add(e),``;if(a||t.isEmbeddedInLabel||t.isReferenced){if(Vi(e,[`combobox`,`listbox`])){n.add(e);var l=qi(e);return l.length===0?Oi(e)?e.value:``:ci(l).map(function(e){return v(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(` `)}if(Gi(e,`range`))return n.add(e),e.hasAttribute(`aria-valuetext`)?e.getAttribute(`aria-valuetext`):e.hasAttribute(`aria-valuenow`)?e.getAttribute(`aria-valuenow`):e.getAttribute(`value`)||``;if(Vi(e,[`textbox`]))return n.add(e),Qi(e)}if(Xi(e)||Ei(e)&&t.isReferenced||Yi(e)||Zi(e)){var u=m(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1});if(u!==``)return n.add(e),u}if(e.nodeType===e.TEXT_NODE)return n.add(e),e.textContent||``;if(t.recursion)return n.add(e),m(e,{isEmbeddedInLabel:t.isEmbeddedInLabel,isReferenced:!1});var d=g(e);return d===null?(n.add(e),``):(n.add(e),d)}return Hi(v(e,{isEmbeddedInLabel:!1,isReferenced:o===`description`,recursion:!1}))}function oa(e){return Vi(e,[`caption`,`code`,`deletion`,`emphasis`,`generic`,`insertion`,`none`,`paragraph`,`presentation`,`strong`,`subscript`,`superscript`])}function sa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return oa(e)?``:aa(e,t)}var ca=class extends ti{constructor(...e){super(...e),this.appearance=`solid`,this.variant=`neutral`,this.size=`medium`,this.loading=!1,this.align=`center`,this._hasAccessibilityError=!1}static get styles(){return[...super.styles,ni]}async firstUpdated(e){super.firstUpdated(e),await this.updateComplete;let t=this.querySelectorAll(`craft-icon, craft-spinner`);await Promise.all(Array.from(t).map(e=>e.updateComplete)),this.accessibleName||=sa(this),this._hasAccessibilityError=!this.accessibleName||this.accessibleName.trim()===``}render(){return r`

${this.checked?r``:c} @@ -4832,28 +4808,58 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; style="font-size: 0.8em" >
- `}parser(e){return e===``?super.parser(e):e}_getTextboxValueFromOption(e){return e?e.textContent?.trim()||``:super._getTextboxValueFromOption(e)}};customElements.get(`craft-combobox`)||customElements.define(`craft-combobox`,$l);var eu=class extends l{constructor(...e){super(...e),this.variant=T.Default,this.label=null}render(){return r` - `}};eu.styles=[il,a` + `}};tu.styles=[eu,a` .indicator { display: inline-flex; aspect-ratio: 1; width: var(--c-indicator-size, 0.5em); border-radius: var(--c-radius-full); - color: var(--c-color-on-loud); - background-color: var(--c-color-fill-loud); - border: 1px solid var(--c-color-border-loud); + color: var(--c-color-static-on); + background-color: var(--c-color-static-fill); + border: 1px solid var(--c-color-static-border); } .indicator--empty { background-color: var(--c-color-neutral-fill-quiet); border: 1px solid var(--c-color-neutral-border-normal); } - `],t([u({reflect:!0})],eu.prototype,`variant`,void 0),t([u()],eu.prototype,`label`,void 0),customElements.get(`craft-indicator`)||customElements.define(`craft-indicator`,eu);var tu=class extends l{constructor(){super(),this.alt=!1,this.shift=!1,this.os=`Unknown`,this.os=this.detectOS()}connectedCallback(){super.connectedCallback(),this.os===`Unknown`&&(this.os=this.detectOS())}detectOS(){let e=navigator.platform.toLowerCase();return e.includes(`mac`)||/iphone|ipad|ipod/.test(e)?`Mac`:e.includes(`win`)?`Windows`:e.includes(`linux`)?`Linux`:`Unknown`}renderShortcutPrefix(){switch(this.os){case`Mac`:return`${this.alt?`⌥`:``}${this.shift?`⇧`:``}⌘`;case`Linux`:return`Super+${this.alt?`Alt+`:``}${this.shift?`Shift+`:``}`;default:return`Ctrl+${this.alt?`Alt+`:``}${this.shift?`Shift+`:``}`}}render(){return r`${this.renderShortcutPrefix()}`}};tu.styles=a` + >`}};nu.styles=a` :host { display: inline-flex; } @@ -4866,7 +4872,7 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; border-radius: var(--c-radius-sm); box-shadow: var(--c-shadow-sm); } - `,t([u({type:Boolean})],tu.prototype,`alt`,void 0),t([u({type:Boolean})],tu.prototype,`shift`,void 0),t([u()],tu.prototype,`os`,void 0),customElements.get(`craft-shortcut`)||customElements.define(`craft-shortcut`,tu);var nu=a` + `,t([u({type:Boolean})],nu.prototype,`alt`,void 0),t([u({type:Boolean})],nu.prototype,`shift`,void 0),t([u()],nu.prototype,`os`,void 0),customElements.get(`craft-shortcut`)||customElements.define(`craft-shortcut`,nu);var ru=a` :host { --_height: var(--c-progress-bar-height, 0.375rem); --_radius: var(--c-progress-bar-radius, var(--c-radius-full)); @@ -4963,7 +4969,7 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; white-space: nowrap; border: 0; } -`,ru=new WeakMap,iu=class extends l{constructor(...e){super(...e),this.progress=0,this.total=0,this.processed=0,this.showStatus=!1,this.pending=!1,this.smooth=!1,this.label=`Progress`,ee(this,ru,0)}updated(e){if((e.has(`total`)||e.has(`processed`))&&this.total>0){let e=Math.min(100,Math.round(this.processed/this.total*100));e>=100&&D(ru,this)<100&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,composed:!0})),this.progress=e}e.has(`progress`)&&(this.progress>0&&this.pending&&(this.pending=!1),w(ru,this,this.progress))}get progressPercent(){return Math.min(100,Math.max(0,this.progress))}get statusText(){return this.total>0?`${this.processed} / ${this.total}`:`${this.progressPercent}%`}reset(){this.progress=0,this.processed=0,this.pending=!0,w(ru,this,0)}show(){this.hidden=!1}hide(){this.hidden=!0}render(){let e={width:this.pending?`100%`:`${this.progressPercent}%`};return r` +`,iu=new WeakMap,au=class extends l{constructor(...e){super(...e),this.progress=0,this.total=0,this.processed=0,this.showStatus=!1,this.pending=!1,this.smooth=!1,this.label=`Progress`,ee(this,iu,0)}updated(e){if((e.has(`total`)||e.has(`processed`))&&this.total>0){let e=Math.min(100,Math.round(this.processed/this.total*100));e>=100&&D(iu,this)<100&&this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,composed:!0})),this.progress=e}e.has(`progress`)&&(this.progress>0&&this.pending&&(this.pending=!1),w(iu,this,this.progress))}get progressPercent(){return Math.min(100,Math.max(0,this.progress))}get statusText(){return this.total>0?`${this.processed} / ${this.total}`:`${this.progressPercent}%`}reset(){this.progress=0,this.processed=0,this.pending=!0,w(iu,this,0)}show(){this.hidden=!1}hide(){this.hidden=!0}render(){let e={width:this.pending?`100%`:`${this.progressPercent}%`};return r`
${this.pending?`Loading`:`${this.progressPercent}%`} - `}};iu.styles=[nu],t([u({type:Number})],iu.prototype,`progress`,void 0),t([u({type:Number})],iu.prototype,`total`,void 0),t([u({type:Number})],iu.prototype,`processed`,void 0),t([u({type:Boolean,attribute:`show-status`})],iu.prototype,`showStatus`,void 0),t([u({type:Boolean,reflect:!0})],iu.prototype,`pending`,void 0),t([u({type:Boolean})],iu.prototype,`smooth`,void 0),t([u({type:String})],iu.prototype,`label`,void 0),customElements.get(`craft-progress-bar`)||customElements.define(`craft-progress-bar`,iu);var au=class extends Io(Bo(l)){connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`radiogroup`)}resetGroup(){let e;this.formElements.forEach(t=>{typeof t.resetGroup==`function`?t.resetGroup():typeof t.reset==`function`&&(t.reset(),t.checked&&(e=t.choiceValue))}),this.modelValue=e,this.resetInteractionState()}},ou=class extends Ro(Vo){connectedCallback(){super.connectedCallback(),this.type=`radio`}},su=class extends au{static get styles(){return[...super.styles,pa,a` + `}};au.styles=[ru],t([u({type:Number})],au.prototype,`progress`,void 0),t([u({type:Number})],au.prototype,`total`,void 0),t([u({type:Number})],au.prototype,`processed`,void 0),t([u({type:Boolean,attribute:`show-status`})],au.prototype,`showStatus`,void 0),t([u({type:Boolean,reflect:!0})],au.prototype,`pending`,void 0),t([u({type:Boolean})],au.prototype,`smooth`,void 0),t([u({type:String})],au.prototype,`label`,void 0),customElements.get(`craft-progress-bar`)||customElements.define(`craft-progress-bar`,au);var ou=class extends Io(Bo(l)){connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`radiogroup`)}resetGroup(){let e;this.formElements.forEach(t=>{typeof t.resetGroup==`function`?t.resetGroup():typeof t.reset==`function`&&(t.reset(),t.checked&&(e=t.choiceValue))}),this.modelValue=e,this.resetInteractionState()}},su=class extends Ro(Vo){connectedCallback(){super.connectedCallback(),this.type=`radio`}},cu=class extends ou{static get styles(){return[...super.styles,pa,a` .input-group { display: grid; gap: var(--c-spacing-xs); } - `]}};customElements.get(`craft-radio-group`)||customElements.define(`craft-radio-group`,su);var cu=class extends ou{static get styles(){return[...super.styles,a` + `]}};customElements.get(`craft-radio-group`)||customElements.define(`craft-radio-group`,cu);var lu=class extends su{static get styles(){return[...super.styles,a` /* same as checkbox, potentially consolidate */ :host { gap: var(--c-spacing-sm); } - `]}};customElements.get(`craft-radio`)||customElements.define(`craft-radio`,cu);var lu=class e{constructor(t={}){this.config={...e.defaultCookieOptions,...t}}set(e,t,n={}){let{path:r,domain:i,maxAge:a,expires:o,secure:s,sameSite:c,prefix:l}=Object.assign({},this.config,n),u=`${this.config.prefix}:${e}=${encodeURIComponent(t)}`;r&&(u+=`;path=${r}`),i&&(u+=`;domain=${i}`),a?u+=`;max-age-in-seconds=${a}`:o&&(u+=`;expires=${o.toUTCString()}`),s&&(u+=`;secure`),document.cookie=u}get(e){return document.cookie.replace(RegExp(`(?:(?:^|.*;\\s*)${this.config.prefix}:${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),`$1`)}remove(e){this.set(e,``,{expires:new Date(`1970-01-01T00:00:00`)})}};lu.defaultCookieOptions={path:`/`,domain:null,secure:!1,sameSite:`strict`,prefix:`Craft`};var uu=class{constructor(){this.refreshPromise=null,this.tokenName=null,this.tokenValue=null,this.refreshPromise=null}async getToken(){return this.tokenValue||await this.refreshToken(),this.tokenValue}async refreshToken(){return this.refreshPromise||=pu.get(`users/session-info`).then(({data:e})=>{let{csrfTokenName:t,csrfTokenValue:n}=e;return this.tokenName=t??null,this.tokenValue=n??null,this.tokenValue}).finally(()=>{this.refreshPromise=null}),this.refreshPromise}clearToken(){this.tokenValue=null}};function du(e=``){return`/admin/actions/${e}`}function fu(){return{"X-Registered-Asset-Bundles":[...new Set(Cp.registeredAssetBundles)].join(`,`),"X-Registered-Js-Files":[...new Set(Cp.registeredJsFiles)].join(`,`)}}var pu=E.create({baseURL:du()}),mu=new uu;pu.interceptors.request.use(async e=>{e.headers.set(`X-Requested-With`,`XMLHttpRequest`);let t=fu();return Object.entries(t).forEach(([t,n])=>{e.headers.set(t,n)}),e}),pu.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status===419||e.response?.status===403&&!t._retry){t._retry=!0;try{return mu.clearToken(),t.headers[`X-CSRF-Token`]=await mu.refreshToken(),E(t)}catch(e){return console.error(`Failed to refresh CSRF token:`,e),Promise.reject(e)}}return Promise.reject(e)});var hu=!1,gu=null;async function _u(e){if(!hu){if(gu)return gu;hu=!0;try{return(await pu.post(`app/api-headers`,void 0,{cancelToken:e})).data}catch{}finally{hu=!1}}}var vu=E.create({baseURL:`https://api.craftcms.com/v1/`});async function yu(e){return gu?Object.entries(gu).forEach(([t,n])=>{e.headers.set(t,n)}):(e.params=e.params||{},e.params.processCraftHeaders=1),e}async function bu(e,t){if(gu)return;let{data:n}=await pu.post(`app/process-api-response-headers`,{headers:e},{cancelToken:t});return gu=n,hu=!1,gu}async function xu(e){return await bu(e.headers,e.config.cancelToken),e}vu.interceptors.request.use(async e=>{let{cancelToken:t}=e,n=await _u(t);n&&Object.entries(n).forEach(([t,n])=>{e.headers.set(t,n)});let r={...e,params:{...Cp.apiParams||{},...e.params,v:new Date().getTime()}};return n||(r.params.processCraftHeaders=1),Cp.httpProxy&&(r.proxy=Cp.httpProxy),r}),vu.interceptors.request.use(yu),vu.interceptors.response.use(xu);var Su={START:`asset-indexes/start-indexing`,STOP:`asset-indexes/stop-indexing-session`,PROCESS:`asset-indexes/process-indexing-session`,OVERVIEW:`asset-indexes/indexing-session-overview`,FINISH:`asset-indexes/finish-indexing-session`},Cu=new WeakMap,wu=new WeakMap,Tu=new WeakMap,Eu=new WeakMap,Du=new WeakMap,Ou=new WeakMap,ku=new WeakMap,L=new WeakSet,Au=class{constructor(e={}){C(this,L),ee(this,Cu,new Map),ee(this,wu,null),ee(this,Tu,0),ee(this,Eu,[]),ee(this,Du,[]),ee(this,Ou,new Set),ee(this,ku,new Map);let{existingSessions:t=[],maxConcurrentConnections:n=3,autoResume:r=!0}=e;this.maxConcurrentConnections=n;for(let e of t)D(Cu,this).set(e.id,e);r&&(S(L,this,Pu).call(this),D(wu,this)!==null&&S(L,this,Fu).call(this))}getSessions(){return Array.from(D(Cu,this).values())}getCurrentSessionId(){return D(wu,this)}isProcessing(){return D(Tu,this)>0}on(e,t){return D(ku,this).has(e)||D(ku,this).set(e,new Set),D(ku,this).get(e).add(t),()=>{D(ku,this).get(e)?.delete(t)}}async startIndexing(e){let t=await pu.post(Su.START,e),{data:n}=t;return n.session&&(D(Cu,this).set(n.session.id,n.session),w(wu,this,n.session.id),S(L,this,Mu).call(this),n.stop||S(L,this,Fu).call(this)),n.stop&&S(L,this,Nu).call(this,n.stop),t}stopSession(e){S(L,this,Iu).call(this,e),S(L,this,Lu).call(this,{sessionId:e,action:Su.STOP,params:{sessionId:e},priority:!0})}getSessionOverview(e){S(L,this,Lu).call(this,{sessionId:e,action:Su.OVERVIEW,params:{sessionId:e},priority:!0})}finishSession(e){S(L,this,Lu).call(this,{sessionId:e.sessionId,action:Su.FINISH,params:e,priority:!0})}destroy(){D(Cu,this).clear(),w(Eu,this,[]),w(Du,this,[]),D(ku,this).clear(),w(wu,this,null),w(Tu,this,0)}};function ju(e,t){D(ku,this).get(e)?.forEach(e=>e(t))}function Mu(e){S(L,this,ju).call(this,`change`,{sessions:this.getSessions(),currentSessionId:D(wu,this),reviewSessionId:e})}function Nu(e){D(Cu,this).delete(e),D(wu,this)===e&&w(wu,this,null),S(L,this,Mu).call(this)}function Pu(){for(let[e,t]of D(Cu,this))if(!t.actionRequired&&!D(Ou,this).has(e)){w(wu,this,e);return}w(wu,this,null)}function Fu(){if(D(wu,this)||S(L,this,Pu).call(this),!D(wu,this))return;let e=D(Cu,this).get(D(wu,this));if(!e)return;let t=e.totalEntries-e.processedEntries,n=this.maxConcurrentConnections-D(Tu,this),r=Math.min(n,t);for(let t=0;tt.sessionId!==e))}function Lu(e){e.priority?D(Du,this).push(e):D(Eu,this).push(e),S(L,this,Ru).call(this)}function Ru(){if(!(D(Eu,this).length+D(Du,this).length===0||D(Tu,this)>=this.maxConcurrentConnections))for(;D(Eu,this).length+D(Du,this).length>0&&D(Tu,this)0?D(Du,this).shift():D(Eu,this).shift();S(L,this,zu).call(this,t)}}async function zu(e){try{let t=await pu.post(e.action,e.params);S(L,this,Bu).call(this,t.data)}catch(t){S(L,this,Vu).call(this,t,e)}finally{var t;w(Tu,this,(t=D(Tu,this),t--,t)),S(L,this,Ru).call(this)}}function Bu(e){let t;e.session&&(D(Cu,this).set(e.session.id,e.session),S(L,this,Pu).call(this),e.session.actionRequired&&!e.skipDialog?D(Ou,this).has(e.session.id)||(t=e.session.id):D(Ou,this).has(e.session.id)||S(L,this,Fu).call(this)),S(L,this,Pu).call(this),e.stop&&(D(Cu,this).delete(e.stop),D(wu,this)===e.stop&&w(wu,this,null)),S(L,this,Mu).call(this,t),D(Cu,this).size===0&&S(L,this,ju).call(this,`complete`,{})}function Vu(e,t){S(L,this,Pu).call(this);let n=e?.response?.data?.message||e.message||`An error occurred during indexing.`;S(L,this,ju).call(this,`error`,{message:n,sessionId:t.sessionId}),S(L,this,Ru).call(this)}var Hu=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Uu=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Wu,Gu=class{formatToParts(e){let t=[];for(let n of e)t.push({type:`element`,value:n}),t.push({type:`literal`,value:`, `});return t.slice(0,-1)}},Ku=typeof Intl<`u`&&Intl.ListFormat||Gu,qu=[[`years`,`year`],[`months`,`month`],[`weeks`,`week`],[`days`,`day`],[`hours`,`hour`],[`minutes`,`minute`],[`seconds`,`second`],[`milliseconds`,`millisecond`]],Ju={minimumIntegerDigits:2},Yu=class{constructor(e,t={}){Wu.set(this,void 0);let n=String(t.style||`short`);n!==`long`&&n!==`short`&&n!==`narrow`&&n!==`digital`&&(n=`short`);let r=n===`digital`?`numeric`:n,i=t.hours||r;r=i===`2-digit`?`numeric`:i;let a=t.minutes||r;r=a===`2-digit`?`numeric`:a;let o=t.seconds||r;r=o===`2-digit`?`numeric`:o;let s=t.milliseconds||r;Hu(this,Wu,{locale:e,style:n,years:t.years||n===`digital`?`short`:n,yearsDisplay:t.yearsDisplay===`always`?`always`:`auto`,months:t.months||n===`digital`?`short`:n,monthsDisplay:t.monthsDisplay===`always`?`always`:`auto`,weeks:t.weeks||n===`digital`?`short`:n,weeksDisplay:t.weeksDisplay===`always`?`always`:`auto`,days:t.days||n===`digital`?`short`:n,daysDisplay:t.daysDisplay===`always`?`always`:`auto`,hours:i,hoursDisplay:t.hoursDisplay===`always`||n===`digital`?`always`:`auto`,minutes:a,minutesDisplay:t.minutesDisplay===`always`||n===`digital`?`always`:`auto`,seconds:o,secondsDisplay:t.secondsDisplay===`always`||n===`digital`?`always`:`auto`,milliseconds:s,millisecondsDisplay:t.millisecondsDisplay===`always`?`always`:`auto`},`f`)}resolvedOptions(){return Uu(this,Wu,`f`)}formatToParts(e){let t=[],n=Uu(this,Wu,`f`),r=n.style,i=n.locale;for(let[a,o]of qu){let s=e[a];if(n[`${a}Display`]===`auto`&&!s)continue;let c=n[a],l=c===`2-digit`?Ju:c===`numeric`?{}:{style:`unit`,unit:o,unitDisplay:c},u=new Intl.NumberFormat(i,l).format(s);a===`months`&&(c===`narrow`||r===`narrow`&&u.endsWith(`m`))&&(u=u.replace(/(\d+)m$/,`$1mo`)),t.push(u)}return new Ku(i,{type:`unit`,style:r===`digital`?`short`:r}).formatToParts(t)}format(e){return this.formatToParts(e).map(e=>e.value).join(``)}};Wu=new WeakMap;var Xu=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,Zu=[`year`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`],Qu=e=>Xu.test(e),$u=class e{constructor(e=0,t=0,n=0,r=0,i=0,a=0,o=0,s=0){this.years=e,this.months=t,this.weeks=n,this.days=r,this.hours=i,this.minutes=a,this.seconds=o,this.milliseconds=s,this.years||=0,this.sign||=Math.sign(this.years),this.months||=0,this.sign||=Math.sign(this.months),this.weeks||=0,this.sign||=Math.sign(this.weeks),this.days||=0,this.sign||=Math.sign(this.days),this.hours||=0,this.sign||=Math.sign(this.hours),this.minutes||=0,this.sign||=Math.sign(this.minutes),this.seconds||=0,this.sign||=Math.sign(this.seconds),this.milliseconds||=0,this.sign||=Math.sign(this.milliseconds),this.blank=this.sign===0}abs(){return new e(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){if(typeof t==`string`){let n=String(t).trim(),r=n.startsWith(`-`)?-1:1,i=n.match(Xu)?.slice(1).map(e=>(Number(e)||0)*r);return i?new e(...i):new e}else if(typeof t==`object`){let{years:n,months:r,weeks:i,days:a,hours:o,minutes:s,seconds:c,milliseconds:l}=t;return new e(n,r,i,a,o,s,c,l)}throw RangeError(`invalid duration`)}static compare(t,n){let r=Date.now(),i=Math.abs(ed(r,e.from(t)).getTime()-r),a=Math.abs(ed(r,e.from(n)).getTime()-r);return i>a?-1:+(i=0?d*i:0,f>=1?(u-d*12)*i:0,0,f>=3?(l-u*30)*i:0,f>=4?(c-l*24)*i:0,f>=5?(s-c*60)*i:0,f>=6?(o-s*60)*i:0,f>=7?(a-o*1e3)*i:0)}function nd(e,{relativeTo:t=Date.now()}={}){if(t=new Date(t),e.blank)return e;let n=e.sign,r=Math.abs(e.years),i=Math.abs(e.months),a=Math.abs(e.weeks),o=Math.abs(e.days),s=Math.abs(e.hours),c=Math.abs(e.minutes),l=Math.abs(e.seconds),u=Math.abs(e.milliseconds);u>=900&&(l+=Math.round(u/1e3)),(l||c||s||o||a||i||r)&&(u=0),l>=55&&(c+=Math.round(l/60)),(c||s||o||a||i||r)&&(l=0),c>=55&&(s+=Math.round(c/60)),(s||o||a||i||r)&&(c=0),o&&s>=12&&(o+=Math.round(s/24)),!o&&s>=21&&(o+=Math.round(s/24)),(o||a||i||r)&&(s=0);let d=t.getFullYear(),f=t.getMonth(),p=t.getDate();if(o>=27||r+i+o){let e=new Date(t);e.setDate(1),e.setMonth(f+i*n+1),e.setDate(0);let s=Math.max(0,p-e.getDate()),c=new Date(t);c.setFullYear(d+r*n),c.setDate(p-s),c.setMonth(f+i*n),c.setDate(p-s+o*n);let l=c.getFullYear()-t.getFullYear(),u=c.getMonth()-t.getMonth(),m=Math.abs(Math.round((Number(c)-Number(t))/864e5))+s,h=Math.abs(l*12+u);m<27?(o>=6?(a+=Math.round(o/7),o=0):o=m,i=r=0):h<=11?(i=h,r=0):(i=0,r=l*n),(i||r)&&(o=0)}return r&&(i=0),a>=4&&(i+=Math.round(a/4)),(i||r)&&(a=0),o&&a&&!i&&!r&&(a+=Math.round(o/7),o=0),new $u(r*n,i*n,a*n,o*n,s*n,c*n,l*n,u*n)}function rd(e,t){let n=nd(e,t);if(n.blank)return[0,`second`];for(let e of Zu){if(e===`millisecond`)continue;let t=n[`${e}s`];if(t)return[t,e]}return[0,`second`]}var R=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},id=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},z,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd=globalThis.HTMLElement||null,xd=new $u,Sd=new $u(0,0,0,0,0,1),Cd=class extends Event{constructor(e,t,n,r){super(`relative-time-updated`,{bubbles:!0,composed:!0}),this.oldText=e,this.newText=t,this.oldTitle=n,this.newTitle=r}};function wd(e){if(!e.date)return 1/0;if(e.format===`duration`||e.format===`elapsed`){let t=e.precision;if(t===`second`)return 1e3;if(t===`minute`)return 60*1e3}let t=Math.abs(Date.now()-e.date.getTime());return t<60*1e3?1e3:t<3600*1e3?60*1e3:3600*1e3}var Td=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(e){if(this.elements.has(e))return;this.elements.add(e);let t=e.date;if(t&&t.getTime()){let t=wd(e),n=Date.now()+t;nthis.update(),t),this.time=n)}}unobserve(e){this.elements.has(e)&&this.elements.delete(e)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let e=1/0;for(let t of this.elements)e=Math.min(e,wd(t)),t.update();this.time=Math.min(3600*1e3,e),this.timer=setTimeout(()=>this.update(),this.time),this.time+=Date.now()}},Ed=class extends bd{constructor(){super(...arguments),z.add(this),ad.set(this,!1),od.set(this,!1),cd.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:`open`}):this),yd.set(this,null)}static define(e=`relative-time`,t=customElements){return t.define(e,this),this}get timeZone(){return this.closest(`[time-zone]`)?.getAttribute(`time-zone`)||this.ownerDocument.documentElement.getAttribute(`time-zone`)||void 0}static get observedAttributes(){return[`second`,`minute`,`hour`,`weekday`,`day`,`month`,`year`,`time-zone-name`,`prefix`,`threshold`,`tense`,`precision`,`format`,`format-style`,`no-title`,`datetime`,`lang`,`title`,`aria-hidden`,`time-zone`]}get onRelativeTimeUpdated(){return R(this,yd,`f`)}set onRelativeTimeUpdated(e){R(this,yd,`f`)&&this.removeEventListener(`relative-time-updated`,R(this,yd,`f`)),id(this,yd,typeof e==`object`||typeof e==`function`?e:null,`f`),typeof e==`function`&&this.addEventListener(`relative-time-updated`,e)}get second(){let e=this.getAttribute(`second`);if(e===`numeric`||e===`2-digit`)return e}set second(e){this.setAttribute(`second`,e||``)}get minute(){let e=this.getAttribute(`minute`);if(e===`numeric`||e===`2-digit`)return e}set minute(e){this.setAttribute(`minute`,e||``)}get hour(){let e=this.getAttribute(`hour`);if(e===`numeric`||e===`2-digit`)return e}set hour(e){this.setAttribute(`hour`,e||``)}get weekday(){let e=this.getAttribute(`weekday`);if(e===`long`||e===`short`||e===`narrow`)return e;if(this.format===`datetime`&&e!==``)return this.formatStyle}set weekday(e){this.setAttribute(`weekday`,e||``)}get day(){let e=this.getAttribute(`day`)??`numeric`;if(e===`numeric`||e===`2-digit`)return e}set day(e){this.setAttribute(`day`,e||``)}get month(){let e=this.format,t=this.getAttribute(`month`);if(t!==``&&(t??=e===`datetime`?this.formatStyle:`short`,t===`numeric`||t===`2-digit`||t===`short`||t===`long`||t===`narrow`))return t}set month(e){this.setAttribute(`month`,e||``)}get year(){let e=this.getAttribute(`year`);if(e===`numeric`||e===`2-digit`)return e;if(!this.hasAttribute(`year`)&&new Date().getUTCFullYear()!==this.date?.getUTCFullYear())return`numeric`}set year(e){this.setAttribute(`year`,e||``)}get timeZoneName(){let e=this.getAttribute(`time-zone-name`);if(e===`long`||e===`short`||e===`shortOffset`||e===`longOffset`||e===`shortGeneric`||e===`longGeneric`)return e}set timeZoneName(e){this.setAttribute(`time-zone-name`,e||``)}get prefix(){return this.getAttribute(`prefix`)??(this.format===`datetime`?``:`on`)}set prefix(e){this.setAttribute(`prefix`,e)}get threshold(){let e=this.getAttribute(`threshold`);return e&&Qu(e)?e:`P30D`}set threshold(e){this.setAttribute(`threshold`,e)}get tense(){let e=this.getAttribute(`tense`);return e===`past`?`past`:e===`future`?`future`:`auto`}set tense(e){this.setAttribute(`tense`,e)}get precision(){let e=this.getAttribute(`precision`);return Zu.includes(e)?e:this.format===`micro`?`minute`:`second`}set precision(e){this.setAttribute(`precision`,e)}get format(){let e=this.getAttribute(`format`);return e===`datetime`?`datetime`:e===`relative`?`relative`:e===`duration`?`duration`:e===`micro`?`micro`:e===`elapsed`?`elapsed`:`auto`}set format(e){this.setAttribute(`format`,e)}get formatStyle(){let e=this.getAttribute(`format-style`);if(e===`long`)return`long`;if(e===`short`)return`short`;if(e===`narrow`)return`narrow`;let t=this.format;return t===`elapsed`||t===`micro`?`narrow`:t===`datetime`?`short`:`long`}set formatStyle(e){this.setAttribute(`format-style`,e)}get noTitle(){return this.hasAttribute(`no-title`)}set noTitle(e){this.toggleAttribute(`no-title`,e)}get datetime(){return this.getAttribute(`datetime`)||``}set datetime(e){this.setAttribute(`datetime`,e)}get date(){let e=Date.parse(this.datetime);return Number.isNaN(e)?null:new Date(e)}set date(e){this.datetime=e?.toISOString()||``}connectedCallback(){this.update()}disconnectedCallback(){Td.unobserve(this)}attributeChangedCallback(e,t,n){t!==n&&(e===`title`&&id(this,ad,n!==null&&(this.date&&R(this,z,`m`,ld).call(this,this.date))!==n,`f`),!R(this,od,`f`)&&!(e===`title`&&R(this,ad,`f`))&&id(this,od,(async()=>{await Promise.resolve(),this.update(),id(this,od,!1,`f`)})(),`f`))}update(){let e=R(this,cd,`f`).textContent||this.textContent||``,t=this.getAttribute(`title`)||``,n=t,r=this.date;if(typeof Intl>`u`||!Intl.DateTimeFormat||!r){R(this,cd,`f`).textContent=e;return}let i=Date.now();R(this,ad,`f`)||(n=R(this,z,`m`,ld).call(this,r)||``,n&&!this.noTitle&&this.setAttribute(`title`,n));let a=td(r,this.precision,i),o=R(this,z,`m`,ud).call(this,a),s=e,c=R(this,z,`m`,vd).call(this,o);s=c?R(this,z,`m`,gd).call(this,r):o===`duration`?R(this,z,`m`,dd).call(this,a):o===`relative`?R(this,z,`m`,fd).call(this,a):R(this,z,`m`,pd).call(this,r),s?R(this,z,`m`,_d).call(this,s):this.shadowRoot===R(this,cd,`f`)&&this.textContent&&R(this,z,`m`,_d).call(this,this.textContent),(s!==e||n!==t)&&this.dispatchEvent(new Cd(e,s,t,n)),o===`relative`||o===`duration`||c&&(R(this,z,`m`,md).call(this,r)||R(this,z,`m`,hd).call(this,r))?Td.observe(this):Td.unobserve(this)}};ad=new WeakMap,od=new WeakMap,cd=new WeakMap,yd=new WeakMap,z=new WeakSet,sd=function(){let e=this.closest(`[lang]`)?.getAttribute(`lang`)||this.ownerDocument.documentElement.getAttribute(`lang`);try{return new Intl.Locale(e??``).toString()}catch{return`default`}},ld=function(e){return new Intl.DateTimeFormat(R(this,z,`a`,sd),{day:`numeric`,month:`short`,year:`numeric`,hour:`numeric`,minute:`2-digit`,timeZoneName:`short`,timeZone:this.timeZone}).format(e)},ud=function(e){let t=this.format;if(t===`datetime`)return`datetime`;if(t===`duration`||t===`elapsed`||t===`micro`)return`duration`;if((t===`auto`||t===`relative`)&&typeof Intl<`u`&&Intl.RelativeTimeFormat){let t=this.tense;if(t===`past`||t===`future`||$u.compare(e,this.threshold)===1)return`relative`}return`datetime`},dd=function(e){let t=R(this,z,`a`,sd),n=this.format,r=this.formatStyle,i=this.tense,a=xd;n===`micro`?(e=nd(e),a=Sd,e.months===0&&(this.tense===`past`&&e.sign!==-1||this.tense===`future`&&e.sign!==1)&&(e=Sd)):(i===`past`&&e.sign!==-1||i===`future`&&e.sign!==1)&&(e=a);let o=`${this.precision}sDisplay`;return e.blank?a.toLocaleString(t,{style:r,[o]:`always`}):e.abs().toLocaleString(t,{style:r})},fd=function(e){let t=new Intl.RelativeTimeFormat(R(this,z,`a`,sd),{numeric:`auto`,style:this.formatStyle}),n=this.tense;n===`future`&&e.sign!==1&&(e=xd),n===`past`&&e.sign!==-1&&(e=xd);let[r,i]=rd(e);return i===`second`&&r<10?t.format(0,this.precision===`millisecond`?`second`:this.precision):t.format(r,i)},pd=function(e){let t=new Intl.DateTimeFormat(R(this,z,`a`,sd),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName,timeZone:this.timeZone});return`${this.prefix} ${t.format(e)}`.trim()},md=function(e){let t=new Date,n=new Intl.DateTimeFormat(R(this,z,`a`,sd),{timeZone:this.timeZone,year:`numeric`,month:`2-digit`,day:`2-digit`});return n.format(t)===n.format(e)},hd=function(e){let t=new Date,n=new Intl.DateTimeFormat(R(this,z,`a`,sd),{timeZone:this.timeZone,year:`numeric`});return n.format(t)===n.format(e)},gd=function(e){let t={hour:`numeric`,minute:`2-digit`,timeZoneName:`short`,timeZone:this.timeZone};if(R(this,z,`m`,md).call(this,e)){let n=new Intl.RelativeTimeFormat(R(this,z,`a`,sd),{numeric:`auto`}).format(0,`day`);n=n.charAt(0).toLocaleUpperCase(R(this,z,`a`,sd))+n.slice(1);let r=new Intl.DateTimeFormat(R(this,z,`a`,sd),t).format(e);return`${n} ${r}`}let n=Object.assign(Object.assign({},t),{day:`numeric`,month:`short`});return R(this,z,`m`,hd).call(this,e)?new Intl.DateTimeFormat(R(this,z,`a`,sd),n).format(e):new Intl.DateTimeFormat(R(this,z,`a`,sd),Object.assign(Object.assign({},n),{year:`numeric`})).format(e)},_d=function(e){if(this.hasAttribute(`aria-hidden`)&&this.getAttribute(`aria-hidden`)===`true`){let t=document.createElement(`span`);t.setAttribute(`aria-hidden`,`true`),t.textContent=e,R(this,cd,`f`).replaceChildren(t)}else R(this,cd,`f`).textContent=e},vd=function(e){return e===`duration`?!1:this.ownerDocument.documentElement.getAttribute(`data-prefers-absolute-time`)===`true`||this.ownerDocument.body?.getAttribute(`data-prefers-absolute-time`)===`true`};var Dd=typeof globalThis<`u`?globalThis:window;try{Dd.RelativeTimeElement=Ed.define()}catch(e){if(!(Dd.DOMException&&e instanceof DOMException&&e.name===`NotSupportedError`)&&!(e instanceof ReferenceError))throw e}var Od=class extends Uo{static get styles(){return[...super.styles,a` + `]}};customElements.get(`craft-radio`)||customElements.define(`craft-radio`,lu);var uu=class e{constructor(t={}){this.config={...e.defaultCookieOptions,...t}}set(e,t,n={}){let{path:r,domain:i,maxAge:a,expires:o,secure:s,sameSite:c,prefix:l}=Object.assign({},this.config,n),u=`${this.config.prefix}:${e}=${encodeURIComponent(t)}`;r&&(u+=`;path=${r}`),i&&(u+=`;domain=${i}`),a?u+=`;max-age-in-seconds=${a}`:o&&(u+=`;expires=${o.toUTCString()}`),s&&(u+=`;secure`),document.cookie=u}get(e){return document.cookie.replace(RegExp(`(?:(?:^|.*;\\s*)${this.config.prefix}:${e}\\s*\\=\\s*([^;]*).*$)|^.*$`),`$1`)}remove(e){this.set(e,``,{expires:new Date(`1970-01-01T00:00:00`)})}};uu.defaultCookieOptions={path:`/`,domain:null,secure:!1,sameSite:`strict`,prefix:`Craft`};var du=class{constructor(){this.refreshPromise=null,this.tokenName=null,this.tokenValue=null,this.refreshPromise=null}async getToken(){return this.tokenValue||await this.refreshToken(),this.tokenValue}async refreshToken(){return this.refreshPromise||=mu.get(`users/session-info`).then(({data:e})=>{let{csrfTokenName:t,csrfTokenValue:n}=e;return this.tokenName=t??null,this.tokenValue=n??null,this.tokenValue}).finally(()=>{this.refreshPromise=null}),this.refreshPromise}clearToken(){this.tokenValue=null}};function fu(e=``){return`/admin/actions/${e}`}function pu(){return{"X-Registered-Asset-Bundles":[...new Set(Cp.registeredAssetBundles)].join(`,`),"X-Registered-Js-Files":[...new Set(Cp.registeredJsFiles)].join(`,`)}}var mu=E.create({baseURL:fu()}),hu=new du;mu.interceptors.request.use(async e=>{e.headers.set(`X-Requested-With`,`XMLHttpRequest`);let t=pu();return Object.entries(t).forEach(([t,n])=>{e.headers.set(t,n)}),e}),mu.interceptors.response.use(e=>e,async e=>{let t=e.config;if(e.response?.status===419||e.response?.status===403&&!t._retry){t._retry=!0;try{return hu.clearToken(),t.headers[`X-CSRF-Token`]=await hu.refreshToken(),E(t)}catch(e){return console.error(`Failed to refresh CSRF token:`,e),Promise.reject(e)}}return Promise.reject(e)});var gu=!1,_u=null;async function vu(e){if(!gu){if(_u)return _u;gu=!0;try{return(await mu.post(`app/api-headers`,void 0,{cancelToken:e})).data}catch{}finally{gu=!1}}}var yu=E.create({baseURL:`https://api.craftcms.com/v1/`});async function bu(e){return _u?Object.entries(_u).forEach(([t,n])=>{e.headers.set(t,n)}):(e.params=e.params||{},e.params.processCraftHeaders=1),e}async function xu(e,t){if(_u)return;let{data:n}=await mu.post(`app/process-api-response-headers`,{headers:e},{cancelToken:t});return _u=n,gu=!1,_u}async function Su(e){return await xu(e.headers,e.config.cancelToken),e}yu.interceptors.request.use(async e=>{let{cancelToken:t}=e,n=await vu(t);n&&Object.entries(n).forEach(([t,n])=>{e.headers.set(t,n)});let r={...e,params:{...Cp.apiParams||{},...e.params,v:new Date().getTime()}};return n||(r.params.processCraftHeaders=1),Cp.httpProxy&&(r.proxy=Cp.httpProxy),r}),yu.interceptors.request.use(bu),yu.interceptors.response.use(Su);var Cu={START:`asset-indexes/start-indexing`,STOP:`asset-indexes/stop-indexing-session`,PROCESS:`asset-indexes/process-indexing-session`,OVERVIEW:`asset-indexes/indexing-session-overview`,FINISH:`asset-indexes/finish-indexing-session`},wu=new WeakMap,Tu=new WeakMap,Eu=new WeakMap,Du=new WeakMap,Ou=new WeakMap,ku=new WeakMap,Au=new WeakMap,L=new WeakSet,ju=class{constructor(e={}){C(this,L),ee(this,wu,new Map),ee(this,Tu,null),ee(this,Eu,0),ee(this,Du,[]),ee(this,Ou,[]),ee(this,ku,new Set),ee(this,Au,new Map);let{existingSessions:t=[],maxConcurrentConnections:n=3,autoResume:r=!0}=e;this.maxConcurrentConnections=n;for(let e of t)D(wu,this).set(e.id,e);r&&(S(L,this,Fu).call(this),D(Tu,this)!==null&&S(L,this,Iu).call(this))}getSessions(){return Array.from(D(wu,this).values())}getCurrentSessionId(){return D(Tu,this)}isProcessing(){return D(Eu,this)>0}on(e,t){return D(Au,this).has(e)||D(Au,this).set(e,new Set),D(Au,this).get(e).add(t),()=>{D(Au,this).get(e)?.delete(t)}}async startIndexing(e){let t=await mu.post(Cu.START,e),{data:n}=t;return n.session&&(D(wu,this).set(n.session.id,n.session),w(Tu,this,n.session.id),S(L,this,Nu).call(this),n.stop||S(L,this,Iu).call(this)),n.stop&&S(L,this,Pu).call(this,n.stop),t}stopSession(e){S(L,this,Lu).call(this,e),S(L,this,Ru).call(this,{sessionId:e,action:Cu.STOP,params:{sessionId:e},priority:!0})}getSessionOverview(e){S(L,this,Ru).call(this,{sessionId:e,action:Cu.OVERVIEW,params:{sessionId:e},priority:!0})}finishSession(e){S(L,this,Ru).call(this,{sessionId:e.sessionId,action:Cu.FINISH,params:e,priority:!0})}destroy(){D(wu,this).clear(),w(Du,this,[]),w(Ou,this,[]),D(Au,this).clear(),w(Tu,this,null),w(Eu,this,0)}};function Mu(e,t){D(Au,this).get(e)?.forEach(e=>e(t))}function Nu(e){S(L,this,Mu).call(this,`change`,{sessions:this.getSessions(),currentSessionId:D(Tu,this),reviewSessionId:e})}function Pu(e){D(wu,this).delete(e),D(Tu,this)===e&&w(Tu,this,null),S(L,this,Nu).call(this)}function Fu(){for(let[e,t]of D(wu,this))if(!t.actionRequired&&!D(ku,this).has(e)){w(Tu,this,e);return}w(Tu,this,null)}function Iu(){if(D(Tu,this)||S(L,this,Fu).call(this),!D(Tu,this))return;let e=D(wu,this).get(D(Tu,this));if(!e)return;let t=e.totalEntries-e.processedEntries,n=this.maxConcurrentConnections-D(Eu,this),r=Math.min(n,t);for(let t=0;tt.sessionId!==e))}function Ru(e){e.priority?D(Ou,this).push(e):D(Du,this).push(e),S(L,this,zu).call(this)}function zu(){if(!(D(Du,this).length+D(Ou,this).length===0||D(Eu,this)>=this.maxConcurrentConnections))for(;D(Du,this).length+D(Ou,this).length>0&&D(Eu,this)0?D(Ou,this).shift():D(Du,this).shift();S(L,this,Bu).call(this,t)}}async function Bu(e){try{let t=await mu.post(e.action,e.params);S(L,this,Vu).call(this,t.data)}catch(t){S(L,this,Hu).call(this,t,e)}finally{var t;w(Eu,this,(t=D(Eu,this),t--,t)),S(L,this,zu).call(this)}}function Vu(e){let t;e.session&&(D(wu,this).set(e.session.id,e.session),S(L,this,Fu).call(this),e.session.actionRequired&&!e.skipDialog?D(ku,this).has(e.session.id)||(t=e.session.id):D(ku,this).has(e.session.id)||S(L,this,Iu).call(this)),S(L,this,Fu).call(this),e.stop&&(D(wu,this).delete(e.stop),D(Tu,this)===e.stop&&w(Tu,this,null)),S(L,this,Nu).call(this,t),D(wu,this).size===0&&S(L,this,Mu).call(this,`complete`,{})}function Hu(e,t){S(L,this,Fu).call(this);let n=e?.response?.data?.message||e.message||`An error occurred during indexing.`;S(L,this,Mu).call(this,`error`,{message:n,sessionId:t.sessionId}),S(L,this,zu).call(this)}var Uu=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Wu=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Gu,Ku=class{formatToParts(e){let t=[];for(let n of e)t.push({type:`element`,value:n}),t.push({type:`literal`,value:`, `});return t.slice(0,-1)}},qu=typeof Intl<`u`&&Intl.ListFormat||Ku,Ju=[[`years`,`year`],[`months`,`month`],[`weeks`,`week`],[`days`,`day`],[`hours`,`hour`],[`minutes`,`minute`],[`seconds`,`second`],[`milliseconds`,`millisecond`]],Yu={minimumIntegerDigits:2},Xu=class{constructor(e,t={}){Gu.set(this,void 0);let n=String(t.style||`short`);n!==`long`&&n!==`short`&&n!==`narrow`&&n!==`digital`&&(n=`short`);let r=n===`digital`?`numeric`:n,i=t.hours||r;r=i===`2-digit`?`numeric`:i;let a=t.minutes||r;r=a===`2-digit`?`numeric`:a;let o=t.seconds||r;r=o===`2-digit`?`numeric`:o;let s=t.milliseconds||r;Uu(this,Gu,{locale:e,style:n,years:t.years||n===`digital`?`short`:n,yearsDisplay:t.yearsDisplay===`always`?`always`:`auto`,months:t.months||n===`digital`?`short`:n,monthsDisplay:t.monthsDisplay===`always`?`always`:`auto`,weeks:t.weeks||n===`digital`?`short`:n,weeksDisplay:t.weeksDisplay===`always`?`always`:`auto`,days:t.days||n===`digital`?`short`:n,daysDisplay:t.daysDisplay===`always`?`always`:`auto`,hours:i,hoursDisplay:t.hoursDisplay===`always`||n===`digital`?`always`:`auto`,minutes:a,minutesDisplay:t.minutesDisplay===`always`||n===`digital`?`always`:`auto`,seconds:o,secondsDisplay:t.secondsDisplay===`always`||n===`digital`?`always`:`auto`,milliseconds:s,millisecondsDisplay:t.millisecondsDisplay===`always`?`always`:`auto`},`f`)}resolvedOptions(){return Wu(this,Gu,`f`)}formatToParts(e){let t=[],n=Wu(this,Gu,`f`),r=n.style,i=n.locale;for(let[a,o]of Ju){let s=e[a];if(n[`${a}Display`]===`auto`&&!s)continue;let c=n[a],l=c===`2-digit`?Yu:c===`numeric`?{}:{style:`unit`,unit:o,unitDisplay:c},u=new Intl.NumberFormat(i,l).format(s);a===`months`&&(c===`narrow`||r===`narrow`&&u.endsWith(`m`))&&(u=u.replace(/(\d+)m$/,`$1mo`)),t.push(u)}return new qu(i,{type:`unit`,style:r===`digital`?`short`:r}).formatToParts(t)}format(e){return this.formatToParts(e).map(e=>e.value).join(``)}};Gu=new WeakMap;var Zu=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,Qu=[`year`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`],$u=e=>Zu.test(e),ed=class e{constructor(e=0,t=0,n=0,r=0,i=0,a=0,o=0,s=0){this.years=e,this.months=t,this.weeks=n,this.days=r,this.hours=i,this.minutes=a,this.seconds=o,this.milliseconds=s,this.years||=0,this.sign||=Math.sign(this.years),this.months||=0,this.sign||=Math.sign(this.months),this.weeks||=0,this.sign||=Math.sign(this.weeks),this.days||=0,this.sign||=Math.sign(this.days),this.hours||=0,this.sign||=Math.sign(this.hours),this.minutes||=0,this.sign||=Math.sign(this.minutes),this.seconds||=0,this.sign||=Math.sign(this.seconds),this.milliseconds||=0,this.sign||=Math.sign(this.milliseconds),this.blank=this.sign===0}abs(){return new e(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){if(typeof t==`string`){let n=String(t).trim(),r=n.startsWith(`-`)?-1:1,i=n.match(Zu)?.slice(1).map(e=>(Number(e)||0)*r);return i?new e(...i):new e}else if(typeof t==`object`){let{years:n,months:r,weeks:i,days:a,hours:o,minutes:s,seconds:c,milliseconds:l}=t;return new e(n,r,i,a,o,s,c,l)}throw RangeError(`invalid duration`)}static compare(t,n){let r=Date.now(),i=Math.abs(td(r,e.from(t)).getTime()-r),a=Math.abs(td(r,e.from(n)).getTime()-r);return i>a?-1:+(i=0?d*i:0,f>=1?(u-d*12)*i:0,0,f>=3?(l-u*30)*i:0,f>=4?(c-l*24)*i:0,f>=5?(s-c*60)*i:0,f>=6?(o-s*60)*i:0,f>=7?(a-o*1e3)*i:0)}function rd(e,{relativeTo:t=Date.now()}={}){if(t=new Date(t),e.blank)return e;let n=e.sign,r=Math.abs(e.years),i=Math.abs(e.months),a=Math.abs(e.weeks),o=Math.abs(e.days),s=Math.abs(e.hours),c=Math.abs(e.minutes),l=Math.abs(e.seconds),u=Math.abs(e.milliseconds);u>=900&&(l+=Math.round(u/1e3)),(l||c||s||o||a||i||r)&&(u=0),l>=55&&(c+=Math.round(l/60)),(c||s||o||a||i||r)&&(l=0),c>=55&&(s+=Math.round(c/60)),(s||o||a||i||r)&&(c=0),o&&s>=12&&(o+=Math.round(s/24)),!o&&s>=21&&(o+=Math.round(s/24)),(o||a||i||r)&&(s=0);let d=t.getFullYear(),f=t.getMonth(),p=t.getDate();if(o>=27||r+i+o){let e=new Date(t);e.setDate(1),e.setMonth(f+i*n+1),e.setDate(0);let s=Math.max(0,p-e.getDate()),c=new Date(t);c.setFullYear(d+r*n),c.setDate(p-s),c.setMonth(f+i*n),c.setDate(p-s+o*n);let l=c.getFullYear()-t.getFullYear(),u=c.getMonth()-t.getMonth(),m=Math.abs(Math.round((Number(c)-Number(t))/864e5))+s,h=Math.abs(l*12+u);m<27?(o>=6?(a+=Math.round(o/7),o=0):o=m,i=r=0):h<=11?(i=h,r=0):(i=0,r=l*n),(i||r)&&(o=0)}return r&&(i=0),a>=4&&(i+=Math.round(a/4)),(i||r)&&(a=0),o&&a&&!i&&!r&&(a+=Math.round(o/7),o=0),new ed(r*n,i*n,a*n,o*n,s*n,c*n,l*n,u*n)}function id(e,t){let n=rd(e,t);if(n.blank)return[0,`second`];for(let e of Qu){if(e===`millisecond`)continue;let t=n[`${e}s`];if(t)return[t,e]}return[0,`second`]}var R=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},ad=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},z,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd=globalThis.HTMLElement||null,Sd=new ed,Cd=new ed(0,0,0,0,0,1),wd=class extends Event{constructor(e,t,n,r){super(`relative-time-updated`,{bubbles:!0,composed:!0}),this.oldText=e,this.newText=t,this.oldTitle=n,this.newTitle=r}};function Td(e){if(!e.date)return 1/0;if(e.format===`duration`||e.format===`elapsed`){let t=e.precision;if(t===`second`)return 1e3;if(t===`minute`)return 60*1e3}let t=Math.abs(Date.now()-e.date.getTime());return t<60*1e3?1e3:t<3600*1e3?60*1e3:3600*1e3}var Ed=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(e){if(this.elements.has(e))return;this.elements.add(e);let t=e.date;if(t&&t.getTime()){let t=Td(e),n=Date.now()+t;nthis.update(),t),this.time=n)}}unobserve(e){this.elements.has(e)&&this.elements.delete(e)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let e=1/0;for(let t of this.elements)e=Math.min(e,Td(t)),t.update();this.time=Math.min(3600*1e3,e),this.timer=setTimeout(()=>this.update(),this.time),this.time+=Date.now()}},Dd=class extends xd{constructor(){super(...arguments),z.add(this),od.set(this,!1),sd.set(this,!1),ld.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:`open`}):this),bd.set(this,null)}static define(e=`relative-time`,t=customElements){return t.define(e,this),this}get timeZone(){return this.closest(`[time-zone]`)?.getAttribute(`time-zone`)||this.ownerDocument.documentElement.getAttribute(`time-zone`)||void 0}static get observedAttributes(){return[`second`,`minute`,`hour`,`weekday`,`day`,`month`,`year`,`time-zone-name`,`prefix`,`threshold`,`tense`,`precision`,`format`,`format-style`,`no-title`,`datetime`,`lang`,`title`,`aria-hidden`,`time-zone`]}get onRelativeTimeUpdated(){return R(this,bd,`f`)}set onRelativeTimeUpdated(e){R(this,bd,`f`)&&this.removeEventListener(`relative-time-updated`,R(this,bd,`f`)),ad(this,bd,typeof e==`object`||typeof e==`function`?e:null,`f`),typeof e==`function`&&this.addEventListener(`relative-time-updated`,e)}get second(){let e=this.getAttribute(`second`);if(e===`numeric`||e===`2-digit`)return e}set second(e){this.setAttribute(`second`,e||``)}get minute(){let e=this.getAttribute(`minute`);if(e===`numeric`||e===`2-digit`)return e}set minute(e){this.setAttribute(`minute`,e||``)}get hour(){let e=this.getAttribute(`hour`);if(e===`numeric`||e===`2-digit`)return e}set hour(e){this.setAttribute(`hour`,e||``)}get weekday(){let e=this.getAttribute(`weekday`);if(e===`long`||e===`short`||e===`narrow`)return e;if(this.format===`datetime`&&e!==``)return this.formatStyle}set weekday(e){this.setAttribute(`weekday`,e||``)}get day(){let e=this.getAttribute(`day`)??`numeric`;if(e===`numeric`||e===`2-digit`)return e}set day(e){this.setAttribute(`day`,e||``)}get month(){let e=this.format,t=this.getAttribute(`month`);if(t!==``&&(t??=e===`datetime`?this.formatStyle:`short`,t===`numeric`||t===`2-digit`||t===`short`||t===`long`||t===`narrow`))return t}set month(e){this.setAttribute(`month`,e||``)}get year(){let e=this.getAttribute(`year`);if(e===`numeric`||e===`2-digit`)return e;if(!this.hasAttribute(`year`)&&new Date().getUTCFullYear()!==this.date?.getUTCFullYear())return`numeric`}set year(e){this.setAttribute(`year`,e||``)}get timeZoneName(){let e=this.getAttribute(`time-zone-name`);if(e===`long`||e===`short`||e===`shortOffset`||e===`longOffset`||e===`shortGeneric`||e===`longGeneric`)return e}set timeZoneName(e){this.setAttribute(`time-zone-name`,e||``)}get prefix(){return this.getAttribute(`prefix`)??(this.format===`datetime`?``:`on`)}set prefix(e){this.setAttribute(`prefix`,e)}get threshold(){let e=this.getAttribute(`threshold`);return e&&$u(e)?e:`P30D`}set threshold(e){this.setAttribute(`threshold`,e)}get tense(){let e=this.getAttribute(`tense`);return e===`past`?`past`:e===`future`?`future`:`auto`}set tense(e){this.setAttribute(`tense`,e)}get precision(){let e=this.getAttribute(`precision`);return Qu.includes(e)?e:this.format===`micro`?`minute`:`second`}set precision(e){this.setAttribute(`precision`,e)}get format(){let e=this.getAttribute(`format`);return e===`datetime`?`datetime`:e===`relative`?`relative`:e===`duration`?`duration`:e===`micro`?`micro`:e===`elapsed`?`elapsed`:`auto`}set format(e){this.setAttribute(`format`,e)}get formatStyle(){let e=this.getAttribute(`format-style`);if(e===`long`)return`long`;if(e===`short`)return`short`;if(e===`narrow`)return`narrow`;let t=this.format;return t===`elapsed`||t===`micro`?`narrow`:t===`datetime`?`short`:`long`}set formatStyle(e){this.setAttribute(`format-style`,e)}get noTitle(){return this.hasAttribute(`no-title`)}set noTitle(e){this.toggleAttribute(`no-title`,e)}get datetime(){return this.getAttribute(`datetime`)||``}set datetime(e){this.setAttribute(`datetime`,e)}get date(){let e=Date.parse(this.datetime);return Number.isNaN(e)?null:new Date(e)}set date(e){this.datetime=e?.toISOString()||``}connectedCallback(){this.update()}disconnectedCallback(){Ed.unobserve(this)}attributeChangedCallback(e,t,n){t!==n&&(e===`title`&&ad(this,od,n!==null&&(this.date&&R(this,z,`m`,ud).call(this,this.date))!==n,`f`),!R(this,sd,`f`)&&!(e===`title`&&R(this,od,`f`))&&ad(this,sd,(async()=>{await Promise.resolve(),this.update(),ad(this,sd,!1,`f`)})(),`f`))}update(){let e=R(this,ld,`f`).textContent||this.textContent||``,t=this.getAttribute(`title`)||``,n=t,r=this.date;if(typeof Intl>`u`||!Intl.DateTimeFormat||!r){R(this,ld,`f`).textContent=e;return}let i=Date.now();R(this,od,`f`)||(n=R(this,z,`m`,ud).call(this,r)||``,n&&!this.noTitle&&this.setAttribute(`title`,n));let a=nd(r,this.precision,i),o=R(this,z,`m`,dd).call(this,a),s=e,c=R(this,z,`m`,yd).call(this,o);s=c?R(this,z,`m`,_d).call(this,r):o===`duration`?R(this,z,`m`,fd).call(this,a):o===`relative`?R(this,z,`m`,pd).call(this,a):R(this,z,`m`,md).call(this,r),s?R(this,z,`m`,vd).call(this,s):this.shadowRoot===R(this,ld,`f`)&&this.textContent&&R(this,z,`m`,vd).call(this,this.textContent),(s!==e||n!==t)&&this.dispatchEvent(new wd(e,s,t,n)),o===`relative`||o===`duration`||c&&(R(this,z,`m`,hd).call(this,r)||R(this,z,`m`,gd).call(this,r))?Ed.observe(this):Ed.unobserve(this)}};od=new WeakMap,sd=new WeakMap,ld=new WeakMap,bd=new WeakMap,z=new WeakSet,cd=function(){let e=this.closest(`[lang]`)?.getAttribute(`lang`)||this.ownerDocument.documentElement.getAttribute(`lang`);try{return new Intl.Locale(e??``).toString()}catch{return`default`}},ud=function(e){return new Intl.DateTimeFormat(R(this,z,`a`,cd),{day:`numeric`,month:`short`,year:`numeric`,hour:`numeric`,minute:`2-digit`,timeZoneName:`short`,timeZone:this.timeZone}).format(e)},dd=function(e){let t=this.format;if(t===`datetime`)return`datetime`;if(t===`duration`||t===`elapsed`||t===`micro`)return`duration`;if((t===`auto`||t===`relative`)&&typeof Intl<`u`&&Intl.RelativeTimeFormat){let t=this.tense;if(t===`past`||t===`future`||ed.compare(e,this.threshold)===1)return`relative`}return`datetime`},fd=function(e){let t=R(this,z,`a`,cd),n=this.format,r=this.formatStyle,i=this.tense,a=Sd;n===`micro`?(e=rd(e),a=Cd,e.months===0&&(this.tense===`past`&&e.sign!==-1||this.tense===`future`&&e.sign!==1)&&(e=Cd)):(i===`past`&&e.sign!==-1||i===`future`&&e.sign!==1)&&(e=a);let o=`${this.precision}sDisplay`;return e.blank?a.toLocaleString(t,{style:r,[o]:`always`}):e.abs().toLocaleString(t,{style:r})},pd=function(e){let t=new Intl.RelativeTimeFormat(R(this,z,`a`,cd),{numeric:`auto`,style:this.formatStyle}),n=this.tense;n===`future`&&e.sign!==1&&(e=Sd),n===`past`&&e.sign!==-1&&(e=Sd);let[r,i]=id(e);return i===`second`&&r<10?t.format(0,this.precision===`millisecond`?`second`:this.precision):t.format(r,i)},md=function(e){let t=new Intl.DateTimeFormat(R(this,z,`a`,cd),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName,timeZone:this.timeZone});return`${this.prefix} ${t.format(e)}`.trim()},hd=function(e){let t=new Date,n=new Intl.DateTimeFormat(R(this,z,`a`,cd),{timeZone:this.timeZone,year:`numeric`,month:`2-digit`,day:`2-digit`});return n.format(t)===n.format(e)},gd=function(e){let t=new Date,n=new Intl.DateTimeFormat(R(this,z,`a`,cd),{timeZone:this.timeZone,year:`numeric`});return n.format(t)===n.format(e)},_d=function(e){let t={hour:`numeric`,minute:`2-digit`,timeZoneName:`short`,timeZone:this.timeZone};if(R(this,z,`m`,hd).call(this,e)){let n=new Intl.RelativeTimeFormat(R(this,z,`a`,cd),{numeric:`auto`}).format(0,`day`);n=n.charAt(0).toLocaleUpperCase(R(this,z,`a`,cd))+n.slice(1);let r=new Intl.DateTimeFormat(R(this,z,`a`,cd),t).format(e);return`${n} ${r}`}let n=Object.assign(Object.assign({},t),{day:`numeric`,month:`short`});return R(this,z,`m`,gd).call(this,e)?new Intl.DateTimeFormat(R(this,z,`a`,cd),n).format(e):new Intl.DateTimeFormat(R(this,z,`a`,cd),Object.assign(Object.assign({},n),{year:`numeric`})).format(e)},vd=function(e){if(this.hasAttribute(`aria-hidden`)&&this.getAttribute(`aria-hidden`)===`true`){let t=document.createElement(`span`);t.setAttribute(`aria-hidden`,`true`),t.textContent=e,R(this,ld,`f`).replaceChildren(t)}else R(this,ld,`f`).textContent=e},yd=function(e){return e===`duration`?!1:this.ownerDocument.documentElement.getAttribute(`data-prefers-absolute-time`)===`true`||this.ownerDocument.body?.getAttribute(`data-prefers-absolute-time`)===`true`};var Od=typeof globalThis<`u`?globalThis:window;try{Od.RelativeTimeElement=Dd.define()}catch(e){if(!(Od.DOMException&&e instanceof DOMException&&e.name===`NotSupportedError`)&&!(e instanceof ReferenceError))throw e}var kd=class extends Uo{static get styles(){return[...super.styles,a` .input-group__input { font-family: var(--c-font-mono); font-size: 0.9em; } - `]}constructor(){super(),this.autocorrect=!1}firstUpdated(e){super.firstUpdated(e),this._inputNode?.setAttribute(`autocapitalize`,`off`)}};customElements.get(`craft-input-handle`)||customElements.define(`craft-input-handle`,Od),us();var kd={Á:`A`,á:`a`,Ä:`A`,ä:`a`,À:`A`,à:`a`,Â:`A`,â:`a`,É:`E`,é:`e`,Ë:`E`,ë:`e`,È:`E`,è:`e`,Ê:`E`,ê:`e`,Í:`I`,í:`i`,Ï:`I`,ï:`i`,Ì:`I`,ì:`i`,Î:`I`,î:`i`,Ó:`O`,ó:`o`,Ö:`O`,ö:`o`,Ò:`O`,ò:`o`,Ô:`O`,ô:`o`,Ú:`U`,ú:`u`,Ü:`U`,ü:`u`,Ù:`U`,ù:`u`,Û:`U`,û:`u`,Ý:`Y`,ý:`y`,Ÿ:`Y`,А:`A`,Б:`B`,В:`V`,Г:`G`,Д:`D`,Ѓ:`Gj`,Е:`E`,Ж:`Z`,З:`Z`,Ѕ:`Dz`,И:`I`,Ј:`j`,К:`K`,Л:`L`,Љ:`Lj`,М:`M`,Н:`N`,Њ:`Nj`,О:`O`,П:`P`,Р:`R`,С:`S`,Т:`T`,Ќ:`Kj`,У:`U`,Ф:`F`,Х:`X`,Ц:`C`,Ч:`C`,Џ:`Dz`,Ш:`S`,а:`a`,б:`b`,в:`v`,г:`g`,д:`d`,ѓ:`gj`,е:`e`,ж:`z`,з:`z`,ѕ:`dz`,и:`i`,ј:`j`,к:`k`,л:`l`,љ:`lj`,м:`m`,н:`n`,њ:`nj`,о:`o`,п:`p`,р:`r`,с:`s`,т:`t`,ќ:`kj`,у:`u`,ф:`f`,х:`x`,ц:`c`,ч:`c`,џ:`dz`,ш:`s`,æ:`ae`,ǽ:`ae`,Ã:`A`,Å:`A`,Ǻ:`A`,Ă:`A`,Ǎ:`A`,Æ:`AE`,Ǽ:`AE`,ã:`a`,å:`a`,ǻ:`a`,ă:`a`,ǎ:`a`,ª:`a`,Ĉ:`C`,Ċ:`C`,Ç:`C`,ç:`c`,ĉ:`c`,ċ:`c`,Ð:`D`,Đ:`D`,ð:`d`,đ:`d`,Ĕ:`E`,Ė:`E`,ĕ:`e`,ė:`e`,ƒ:`f`,Ĝ:`G`,Ġ:`G`,ĝ:`g`,ġ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ĭ:`I`,Ǐ:`I`,Į:`I`,IJ:`IJ`,ĩ:`i`,ĭ:`i`,ǐ:`i`,į:`i`,ij:`ij`,Ĵ:`J`,ĵ:`j`,Ĺ:`L`,Ľ:`L`,Ŀ:`L`,ĺ:`l`,ľ:`l`,ŀ:`l`,Ñ:`N`,ñ:`n`,ʼn:`n`,Õ:`O`,Ō:`O`,Ŏ:`O`,Ǒ:`O`,Ő:`O`,Ơ:`O`,Ø:`O`,Ǿ:`O`,Œ:`OE`,õ:`o`,ō:`o`,ŏ:`o`,ǒ:`o`,ő:`o`,ơ:`o`,ø:`o`,ǿ:`o`,º:`o`,œ:`oe`,Ŕ:`R`,Ŗ:`R`,ŕ:`r`,ŗ:`r`,Ŝ:`S`,Ș:`S`,ŝ:`s`,ș:`s`,ſ:`s`,Ţ:`T`,Ț:`T`,Ŧ:`T`,Þ:`TH`,ţ:`t`,ț:`t`,ŧ:`t`,þ:`th`,Ũ:`U`,Ŭ:`U`,Ű:`U`,Ų:`U`,Ư:`U`,Ǔ:`U`,Ǖ:`U`,Ǘ:`U`,Ǚ:`U`,Ǜ:`U`,ũ:`u`,ŭ:`u`,ű:`u`,ų:`u`,ư:`u`,ǔ:`u`,ǖ:`u`,ǘ:`u`,ǚ:`u`,ǜ:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ÿ:`y`,ŷ:`y`,ΑΥ:`AU`,ΑΎ:`AU`,Αυ:`Au`,Αύ:`Au`,ΕΊ:`I`,ΕΙ:`I`,Ει:`Ei`,ΕΥ:`EF`,ΕΎ:`EU`,Εί:`I`,Ευ:`Ef`,Εύ:`Eu`,ΟΙ:`I`,ΟΊ:`I`,ΟΥ:`U`,ΟΎ:`OU`,Οι:`Oi`,Οί:`I`,Ου:`Oy`,Ού:`Ou`,ΥΙ:`I`,ΎΙ:`I`,Υι:`Yi`,Ύι:`I`,ΥΊ:`I`,Υί:`I`,αυ:`au`,αύ:`au`,εί:`i`,ει:`ei`,ευ:`ef`,εύ:`eu`,οι:`oi`,οί:`i`,ου:`oy`,ού:`ou`,υι:`yi`,ύι:`i`,υί:`i`,Α:`A`,Ά:`A`,Β:`B`,Δ:`D`,Ε:`E`,Έ:`E`,Φ:`F`,Γ:`G`,Η:`H`,Ή:`I`,Ι:`I`,Ί:`I`,Ϊ:`I`,Κ:`K`,Ξ:`Ks`,Λ:`L`,Μ:`M`,Ν:`N`,Π:`P`,Ο:`O`,Ό:`O`,Ψ:`Ps`,Ρ:`R`,Σ:`S`,Τ:`T`,Θ:`Th`,Ω:`O`,Ώ:`W`,Χ:`X`,ϒ:`Y`,Υ:`Y`,Ύ:`Y`,Ϋ:`Y`,Ζ:`Z`,α:`a`,ά:`a`,β:`v`,δ:`d`,ε:`e`,έ:`e`,φ:`f`,γ:`gh`,η:`i`,ή:`i`,ι:`i`,ί:`i`,ϊ:`i`,ΐ:`i`,κ:`k`,ξ:`ks`,λ:`l`,μ:`m`,ν:`n`,ο:`o`,ό:`o`,π:`p`,ψ:`ps`,ρ:`r`,σ:`s`,ς:`s`,τ:`t`,ϑ:`th`,θ:`th`,ϐ:`v`,ω:`o`,ώ:`w`,χ:`kh`,υ:`i`,ύ:`y`,ΰ:`y`,ϋ:`y`,ζ:`z`,अ:`a`,आ:`aa`,ए:`e`,ई:`ii`,ऍ:`ei`,ऎ:`ae`,ऐ:`ai`,इ:`i`,ओ:`o`,ऑ:`oi`,ऒ:`oii`,ऊ:`uu`,औ:`ou`,उ:`u`,ब:`B`,भ:`Bha`,च:`Ca`,छ:`Chha`,ड:`Da`,ढ:`Dha`,फ:`Fa`,फ़:`Fi`,ग:`Ga`,घ:`Gha`,ग़:`Ghi`,ह:`Ha`,ज:`Ja`,झ:`Jha`,क:`Ka`,ख:`Kha`,ख़:`Khi`,ल:`L`,ळ:`Li`,ऌ:`Li`,ऴ:`Lii`,ॡ:`Lii`,म:`Ma`,न:`Na`,ङ:`Na`,ञ:`Nia`,ण:`Nae`,ऩ:`Ni`,ॐ:`oms`,प:`Pa`,क़:`Qi`,र:`Ra`,ऋ:`Ri`,ॠ:`Ri`,ऱ:`Ri`,स:`Sa`,श:`Sha`,ष:`Shha`,ट:`Ta`,त:`Ta`,ठ:`Tha`,द:`Tha`,थ:`Tha`,ध:`Thha`,ड़:`ugDha`,ढ़:`ugDhha`,व:`Va`,य:`Ya`,य़:`Yi`,ज़:`Za`,Ա:`A`,Բ:`B`,Գ:`G`,Դ:`D`,Ե:`E`,Զ:`Z`,Է:`E`,Ը:`Y`,Թ:`Th`,Ժ:`Zh`,Ի:`I`,Լ:`L`,Խ:`Kh`,Ծ:`Ts`,Կ:`K`,Հ:`H`,Ձ:`Dz`,Ղ:`Gh`,Ճ:`Tch`,Մ:`M`,Յ:`Y`,Ն:`N`,Շ:`Sh`,Ո:`Vo`,Չ:`Ch`,Պ:`P`,Ջ:`J`,Ռ:`R`,Ս:`S`,Վ:`V`,Տ:`T`,Ր:`R`,Ց:`C`,Ւ:`u`,Փ:`Ph`,Ք:`Q`,և:`ev`,Օ:`O`,Ֆ:`F`,ա:`a`,բ:`b`,գ:`g`,դ:`d`,ե:`e`,զ:`z`,է:`e`,ը:`y`,թ:`th`,ժ:`zh`,ի:`i`,լ:`l`,խ:`kh`,ծ:`ts`,կ:`k`,հ:`h`,ձ:`dz`,ղ:`gh`,ճ:`tch`,մ:`m`,յ:`y`,ն:`n`,շ:`sh`,ո:`vo`,չ:`ch`,պ:`p`,ջ:`j`,ռ:`r`,ս:`s`,վ:`v`,տ:`t`,ր:`r`,ց:`c`,ւ:`u`,փ:`ph`,ք:`q`,օ:`o`,ֆ:`f`,Ž:`Z`,Ň:`N`,Ş:`S`,ž:`z`,ň:`n`,ş:`s`,ı:`i`,İ:`I`,ğ:`g`,Ğ:`G`,ьо:`yo`,Й:`i`,Щ:`Shh`,Ъ:`Ie`,Ь:``,Ю:`Iu`,Я:`Ia`,й:`i`,щ:`shh`,ъ:`ie`,ь:``,ю:`iu`,я:`ia`,Ē:`E`,ē:`e`,န်ုပ်:`nub`,"ောင်":`aung`,"ိုက်":`aik`,"ိုဒ်":`ok`,"ိုင်":`aing`,"ိုလ်":`ol`,"ေါင်":`aung`,သြော:`aw`,"ောက်":`auk`,"ိတ်":`eik`,"ုတ်":`ok`,"ုန်":`on`,"ေတ်":`it`,"ုဒ်":`ait`,"ာန်":`an`,"ိန်":`ein`,"ွတ်":`ut`,"ေါ်":`aw`,"ွန်":`un`,"ိပ်":`eik`,"ုပ်":`ok`,"ွပ်":`ut`,"ိမ်":`ein`,"ုမ်":`on`,"ော်":`aw`,"ွမ်":`un`,က်:`et`,"ေါ":`aw`,"ော":`aw`,"ျွ":`ywa`,"ြွ":`yw`,"ို":`o`,"ုံ":`on`,တ်:`at`,င်:`in`,ည်:`i`,ဒ်:`d`,န်:`an`,ပ်:`at`,မ်:`an`,စျ:`za`,ယ်:`e`,ဉ်:`in`,စ်:`it`,"ိံ":`ein`,"ဲ":`e`,"း":``,"ာ":`a`,"ါ":`a`,"ေ":`e`,"ံ":`an`,"ိ":`i`,"ီ":`i`,"ု":`u`,"ူ":`u`,"်":`at`,"္":``,"့":``,က:`k`,"၉":`9`,တ:`t`,ရ:`ya`,ယ:`y`,မ:`m`,ဘ:`ba`,ဗ:`b`,ဖ:`pa`,ပ:`p`,န:`n`,ဓ:`da`,ဒ:`d`,ထ:`ta`,ဏ:`na`,ဝ:`w`,ဎ:`da`,ဍ:`d`,ဌ:`ta`,ဋ:`t`,ည:`ny`,ဇ:`z`,ဆ:`sa`,စ:`s`,င:`ng`,ဃ:`ga`,ဂ:`g`,လ:`l`,သ:`th`,"၈":`8`,ဩ:`aw`,ခ:`kh`,"၆":`6`,"၅":`5`,"၄":`4`,"၃":`3`,"၂":`2`,"၁":`1`,"၀":`0`,"၌":`hnaik`,"၍":`ywae`,ဪ:`aw`,ဦ:`-u`,ဟ:`h`,ဉ:`u`,ဤ:`-i`,ဣ:`i`,"၏":`-e`,ဧ:`e`,"ှ":`h`,"ွ":`w`,"ျ":`ya`,"ြ":`y`,အ:`a`,ဠ:`la`,"၇":`7`,DŽ:`DZ`,Dž:`Dz`,dž:`dz`,DZ:`DZ`,Dz:`Dz`,dz:`dz`,LJ:`LJ`,Lj:`Lj`,lj:`lj`,NJ:`NJ`,Nj:`Nj`,nj:`nj`,č:`c`,Č:`C`,ć:`c`,Ć:`C`,š:`s`,Š:`S`,ა:`a`,ბ:`b`,გ:`g`,დ:`d`,ე:`e`,ვ:`v`,ზ:`z`,თ:`t`,ი:`i`,კ:`k`,ლ:`l`,მ:`m`,ნ:`n`,ო:`o`,პ:`p`,ჟ:`zh`,რ:`r`,ს:`s`,ტ:`t`,უ:`u`,ფ:`f`,ქ:`q`,ღ:`gh`,ყ:`y`,შ:`sh`,ჩ:`ch`,ც:`ts`,ძ:`dz`,წ:`ts`,ჭ:`ch`,ხ:`kh`,ჯ:`j`,ჰ:`h`,Ё:`E`,ё:`e`,Ы:`Y`,ы:`y`,Э:`E`,э:`e`,І:`I`,і:`i`,Ѳ:`F`,ѳ:`f`,Ѣ:`E`,ѣ:`e`,Ѵ:`I`,ѵ:`i`,Є:`Je`,є:`je`,Ѥ:`Je`,ѥ:`je`,Ꙋ:`U`,ꙋ:`u`,Ѡ:`O`,ѡ:`o`,Ѿ:`Ot`,ѿ:`ot`,Ѫ:`U`,ѫ:`u`,Ѧ:`Ja`,ѧ:`ja`,Ѭ:`Ju`,ѭ:`ju`,Ѩ:`Ja`,ѩ:`Ja`,Ѯ:`Ks`,ѯ:`ks`,Ѱ:`Ps`,ѱ:`ps`,Ґ:`G`,ґ:`g`,Ї:`Yi`,ї:`yi`,Ә:`A`,Ғ:`G`,Қ:`Q`,Ң:`N`,Ө:`O`,Ұ:`U`,Ү:`U`,Һ:`H`,ә:`a`,ғ:`g`,қ:`q`,ң:`n`,ө:`o`,ұ:`u`,ү:`u`,һ:`h`,ď:`d`,Ď:`D`,ě:`e`,Ě:`E`,ř:`r`,Ř:`R`,ť:`t`,Ť:`T`,ů:`u`,Ů:`U`,ą:`a`,ę:`e`,ł:`l`,ń:`n`,ś:`s`,ź:`z`,ż:`z`,Ą:`A`,Ę:`E`,Ł:`L`,Ń:`N`,Ś:`S`,Ź:`Z`,Ż:`Z`,ā:`a`,ģ:`g`,ī:`i`,ķ:`k`,ļ:`l`,ņ:`n`,ū:`u`,Ā:`A`,Ģ:`G`,Ī:`I`,Ķ:`k`,Ļ:`L`,Ņ:`N`,Ū:`U`,Ả:`A`,Ạ:`A`,Ắ:`A`,Ằ:`A`,Ẳ:`A`,Ẵ:`A`,Ặ:`A`,Ấ:`A`,Ầ:`A`,Ẩ:`A`,Ẫ:`A`,Ậ:`A`,ả:`a`,ạ:`a`,ắ:`a`,ằ:`a`,ẳ:`a`,ẵ:`a`,ặ:`a`,ấ:`a`,ầ:`a`,ẩ:`a`,ẫ:`a`,ậ:`a`,Ẻ:`E`,Ẽ:`E`,Ẹ:`E`,Ế:`E`,Ề:`E`,Ể:`E`,Ễ:`E`,Ệ:`E`,ẻ:`e`,ẽ:`e`,ẹ:`e`,ế:`e`,ề:`e`,ể:`e`,ễ:`e`,ệ:`e`,Ỉ:`I`,Ị:`I`,ỉ:`i`,ị:`i`,Ỏ:`O`,Ọ:`O`,Ố:`O`,Ồ:`O`,Ổ:`O`,Ỗ:`O`,Ộ:`O`,Ớ:`O`,Ờ:`O`,Ở:`O`,Ỡ:`O`,Ợ:`O`,ỏ:`o`,ọ:`o`,ố:`o`,ồ:`o`,ổ:`o`,ỗ:`o`,ộ:`o`,ớ:`o`,ờ:`o`,ở:`o`,ỡ:`o`,ợ:`o`,Ủ:`U`,Ụ:`U`,Ứ:`U`,Ừ:`U`,Ử:`U`,Ữ:`U`,Ự:`U`,ủ:`u`,ụ:`u`,ứ:`u`,ừ:`u`,ử:`u`,ữ:`u`,ự:`u`,Ỳ:`Y`,Ỷ:`Y`,Ỹ:`Y`,Ỵ:`Y`,ỳ:`y`,ỷ:`y`,ỹ:`y`,ỵ:`y`,ا:`a`,ب:`b`,پ:`p`,ت:`t`,ث:`th`,ج:`g`,چ:`ch`,ح:`h`,خ:`kh`,د:`d`,ذ:`th`,ر:`r`,ز:`z`,س:`s`,ش:`sh`,ص:`s`,ض:`d`,ط:`t`,ظ:`th`,ع:`aa`,غ:`gh`,ف:`f`,ق:`k`,ک:`k`,گ:`g`,ل:`l`,ژ:`zh`,ك:`k`,م:`m`,ن:`n`,ه:`h`,و:`o`,ی:`y`,آ:`a`,"٠":`0`,"١":`1`,"٢":`2`,"٣":`3`,"٤":`4`,"٥":`5`,"٦":`6`,"٧":`7`,"٨":`8`,"٩":`9`,أ:`a`,ي:`y`,إ:`a`,ؤ:`o`,ئ:`y`,ء:`aa`,ђ:`dj`,ћ:`c`,Ђ:`Dj`,Ћ:`C`,ə:`e`,Ə:`E`,ß:`ss`,ẞ:`SS`,ভ্ল:`vl`,পশ:`psh`,ব্ধ:`bdh`,ব্জ:`bj`,ব্দ:`bd`,ব্ব:`bb`,ব্ল:`bl`,ভ:`v`,ব:`b`,চ্ঞ:`cNG`,চ্ছ:`cch`,চ্চ:`cc`,ছ:`ch`,চ:`c`,ধ্ন:`dhn`,ধ্ম:`dhm`,দ্ঘ:`dgh`,দ্ধ:`ddh`,দ্ভ:`dv`,দ্ম:`dm`,ড্ড:`DD`,ঢ:`Dh`,ধ:`dh`,দ্গ:`dg`,দ্দ:`dd`,ড:`D`,দ:`d`,"।":`.`,ঘ্ন:`Ghn`,গ্ধ:`Gdh`,গ্ণ:`GN`,গ্ন:`Gn`,গ্ম:`Gm`,গ্ল:`Gl`,জ্ঞ:`jNG`,ঘ:`Gh`,গ:`g`,হ্ণ:`hN`,হ্ন:`hn`,হ্ম:`hm`,হ্ল:`hl`,হ:`h`,জ্ঝ:`jjh`,ঝ:`jh`,জ্জ:`jj`,জ:`j`,ক্ষ্ণ:`kxN`,ক্ষ্ম:`kxm`,ক্ষ:`ksh`,কশ:`ksh`,ক্ক:`kk`,ক্ট:`kT`,ক্ত:`kt`,ক্ল:`kl`,ক্স:`ks`,খ:`kh`,ক:`k`,ল্ভ:`lv`,ল্ধ:`ldh`,লখ:`lkh`,লঘ:`lgh`,লফ:`lph`,ল্ক:`lk`,ল্গ:`lg`,ল্ট:`lT`,ল্ড:`lD`,ল্প:`lp`,ল্ম:`lm`,ল্ল:`ll`,ল্ব:`lb`,ল:`l`,ম্থ:`mth`,ম্ফ:`mf`,ম্ভ:`mv`,মপ্ল:`mpl`,ম্ন:`mn`,ম্প:`mp`,ম্ম:`mm`,ম্ল:`ml`,ম্ব:`mb`,ম:`m`,"০":`0`,"১":`1`,"২":`2`,"৩":`3`,"৪":`4`,"৫":`5`,"৬":`6`,"৭":`7`,"৮":`8`,"৯":`9`,ঙ্ক্ষ:`Ngkx`,ঞ্ছ:`nch`,ঙ্ঘ:`ngh`,ঙ্খ:`nkh`,ঞ্ঝ:`njh`,ঙ্গৌ:`ngOU`,ঙ্গৈ:`ngOI`,ঞ্চ:`nc`,ঙ্ক:`nk`,ঙ্ষ:`Ngx`,ঙ্গ:`ngo`,ঙ্ম:`Ngm`,ঞ্জ:`nj`,ন্ধ:`ndh`,ন্ঠ:`nTh`,ণ্ঠ:`NTh`,ন্থ:`nth`,ঙ্গা:`nga`,ঙ্গি:`ngi`,ঙ্গী:`ngI`,ঙ্গু:`ngu`,ঙ্গূ:`ngU`,ঙ্গে:`nge`,ঙ্গো:`ngO`,ণ্ঢ:`NDh`,নশ:`nsh`,ঙর:`Ngr`,ঞর:`NGr`,"ংর":`ngr`,ঙ:`Ng`,ঞ:`NG`,"ং":`ng`,ন্ন:`nn`,ণ্ণ:`NN`,ণ্ন:`Nn`,ন্ম:`nm`,ণ্ম:`Nm`,ন্দ:`nd`,ন্ট:`nT`,ণ্ট:`NT`,ন্ড:`nD`,ণ্ড:`ND`,ন্ত:`nt`,ন্স:`ns`,ন:`n`,ণ:`N`,"ৈ":`OI`,"ৌ":`OU`,"ো":`O`,ঐ:`OI`,ঔ:`OU`,অ:`o`,ও:`oo`,ফ্ল:`fl`,প্ট:`pT`,প্ত:`pt`,প্ন:`pn`,প্প:`pp`,প্ল:`pl`,প্স:`ps`,ফ:`f`,প:`p`,"ৃ":`rri`,ঋ:`rri`,রর‍্য:`rry`,"্র্য":`ry`,"্রর":`rr`,ড়্গ:`Rg`,ঢ়:`Rh`,ড়:`R`,র:`r`,"্র":`r`,শ্ছ:`Sch`,ষ্ঠ:`ShTh`,ষ্ফ:`Shf`,স্ক্ল:`skl`,স্খ:`skh`,স্থ:`sth`,স্ফ:`sf`,শ্চ:`Sc`,শ্ত:`St`,শ্ন:`Sn`,শ্ম:`Sm`,শ্ল:`Sl`,ষ্ক:`Shk`,ষ্ট:`ShT`,ষ্ণ:`ShN`,ষ্প:`Shp`,ষ্ম:`Shm`,স্প্ল:`spl`,স্ক:`sk`,স্ট:`sT`,স্ত:`st`,স্ন:`sn`,স্প:`sp`,স্ম:`sm`,স্ল:`sl`,শ:`S`,ষ:`Sh`,স:`s`,"ু":`u`,উ:`u`,অ্য:`oZ`,ত্থ:`tth`,ৎ:`tt`,ট্ট:`TT`,ট্ম:`Tm`,ঠ:`Th`,ত্ন:`tn`,ত্ম:`tm`,থ:`th`,ত্ত:`tt`,ট:`T`,ত:`t`,অ্যা:`AZ`,"া":`a`,আ:`a`,য়া:`ya`,য়:`y`,"ি":`i`,ই:`i`,"ী":`ee`,ঈ:`ee`,"ূ":`uu`,ঊ:`uu`,"ে":`e`,এ:`e`,য:`z`,"্য":`Z`,ইয়:`y`,ওয়:`w`,"্ব":`w`,এক্স:`x`,"ঃ":`:`,"ঁ":`nn`,"্‌":``,"˚":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,"௦":`0`,"௧":`1`,"௨":`2`,"௩":`3`,"௪":`4`,"௫":`5`,"௬":`6`,"௭":`7`,"௮":`8`,"௯":`9`,"௰":`10`,"௱":`100`,"௲":`1000`,Ꜳ:`AA`,ꜳ:`aa`,Ꜵ:`AO`,ꜵ:`ao`,Ꜷ:`AU`,ꜷ:`au`,Ꜹ:`AV`,ꜹ:`av`,Ꜻ:`av`,ꜻ:`av`,Ꜽ:`AY`,ꜽ:`ay`,ȸ:`db`,ʣ:`dz`,ʥ:`dz`,ʤ:`dezh`,"🙰":`et`,ff:`ff`,ffi:`ffi`,ffl:`ffl`,fi:`fi`,fl:`fl`,ʩ:`feng`,ʪ:`ls`,ʫ:`lz`,ɮ:`lezh`,ȹ:`qp`,ʨ:`tc`,ʦ:`ts`,ʧ:`tesh`,Ꝏ:`OO`,ꝏ:`oo`,st:`st`,ſt:`st`,Ꜩ:`TZ`,ꜩ:`tz`,ᵫ:`ue`,Aι:`Ai`,αι:`ai`,ἀ:`a`,ἁ:`a`,ἂ:`a`,ἃ:`a`,ἄ:`a`,ἅ:`a`,ἆ:`a`,ἇ:`a`,Ἀ:`A`,Ἁ:`A`,Ἂ:`A`,Ἃ:`A`,Ἄ:`A`,Ἅ:`A`,Ἆ:`A`,Ἇ:`A`,ᾰ:`a`,ᾱ:`a`,ᾲ:`a`,ᾳ:`a`,ᾴ:`a`,ᾶ:`a`,ᾷ:`a`,Ᾰ:`A`,Ᾱ:`A`,Ὰ:`A`,Ά:`A`,ᾼ:`A`,A̧:`A`,a̧:`a`,Ⱥ:`A`,ⱥ:`a`,Ȧ:`A`,ȧ:`a`,Ɓ:`B`,C̈:`C`,c̈:`c`,C̨:`C`,c̨:`c`,Ȼ:`C`,ȼ:`c`,C̀:`C`,c̀:`c`,C̣:`C`,c̣:`c`,C̄:`C`,c̄:`c`,C̃:`C`,c̃:`c`,Ȩ:`E`,ȩ:`e`,Ɇ:`E`,ɇ:`e`,I̧:`I`,i̧:`i`,Ɨ:`I`,ɨ:`i`,i:`i`,J́́:`J`,j́:`j`,J̀̀:`J`,j̀:`j`,J̈:`J`,j̈:`j`,J̧:`J`,j̧:`j`,J̨:`J`,j̨:`j`,Ɉ:`J`,ɉ:`j`,J̌:`J`,ǰ:`j`,J̇:`J`,j:`j`,J̣:`J`,j̣:`j`,J̄:`J`,j̄:`j`,J̃:`J`,j̃:`j`,ĸ:`k`,L̀:`L`,l̀:`l`,L̂:`L`,l̂:`l`,L̈:`L`,l̈:`l`,L̨:`L`,l̨:`l`,Ƚ:`L`,ƚ:`l`,L̇:`L`,l̇:`l`,Ḷ:`L`,ḷ:`l`,L̄:`L`,l̄:`l`,L̃:`L`,l̃:`l`,Ŋ:`N`,ŋ:`n`,Ǹ:`N`,ǹ:`n`,N̂:`N`,n̂:`n`,N̈:`N`,n̈:`n`,N̨:`N`,n̨:`n`,Ꞥ:`N`,ꞥ:`n`,Ṅ:`N`,ṅ:`n`,Ṇ:`N`,ṇ:`n`,N̄:`N`,n̄:`n`,O̧:`O`,o̧:`o`,Ǫ:`O`,ǫ:`o`,Ɵ:`O`,ɵ:`o`,Ȯ:`O`,ȯ:`o`,S̀:`S`,s̀:`s`,Ŝ̀:`S`,S̈:`S`,s̈:`s`,S̨:`S`,s̨:`s`,Ꞩ:`S`,ꞩ:`s`,Ṡ:`S`,ṡ:`s`,Ṣ:`S`,ṣ:`s`,S̄:`S`,s̄:`s`,S̃:`S`,s̃:`s`,T́:`T`,t́:`t`,T̀:`T`,t̀:`t`,T̂:`T`,t̂:`t`,T̈:`T`,ẗ:`t`,T̨:`T`,t̨:`t`,Ⱦ:`T`,ⱦ:`t`,Ṫ:`T`,ṫ:`t`,Ṭ:`T`,ṭ:`t`,T̄:`T`,t̄:`t`,T̃:`T`,t̃:`t`,U̧:`U`,u̧:`u`,Ʉ:`U`,ʉ:`u`,U̇:`U`,u̇:`u`,Ʊ:`U`,ʊ:`u`,Ẁ:`W`,ẁ:`w`,Ẃ:`W`,ẃ:`w`,Ẅ:`W`,ẅ:`w`,Ꙗ:`Ja`,ꙗ:`ja`,Y̧:`Y`,y̧:`y`,Y̨:`Y`,y̨:`y`,Ɏ:`Y`,ɏ:`y`,Y̌:`Y`,y̌:`y`,Ẏ:`Y`,ẏ:`y`,Ȳ:`Y`,ȳ:`y`,Z̀:`Z`,z̀:`z`,Ẑ:`Z`,ẑ:`z`,Z̈:`Z`,z̈:`z`,Z̧:`Z`,z̧:`z`,Z̨:`Z`,z̨:`z`,Ƶ:`Z`,ƶ:`z`,Ẓ:`Z`,ẓ:`z`,Z̄:`Z`,z̄:`z`,Z̃:`Z`,z̃:`z`,"\xA0":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `,"\u2028":` `,"\u2029":` `,"​":` `," ":` `," ":` `," ":` `,ᅠ:` `,"«":`<<`,"»":`>>`,"‘":`'`,"’":`'`,"‚":`'`,"‛":`'`,"“":`"`,"”":`"`,"„":`"`,"‟":`"`,"‹":`'`,"›":`'`,"–":`-`,"—":`-`,"…":`...`,"€":`EUR`,$:`$`,"₢":`Cr`,"₣":`Fr.`,"£":`PS`,"₤":`L.`,ℳ:`M`,"₥":`mil`,"₦":`N`,"₧":`Pts`,"₨":`Rs`,රු:`LKR`,ரூ:`LKR`,"௹":`Rs`,रू:`NPR`,"₹":`Rs`,"૱":`Rs`,"₩":`W`,"₪":`NS`,"₸":`KZT`,"₫":`D`,"֏":`AMD`,"₭":`K`,"₺":`TL`,"₼":`AZN`,"₮":`T`,"₯":`Dr`,"₲":`PYG`,"₾":`GEL`,"₳":`ARA`,"₴":`UAH`,"₽":`RUB`,"₵":`GHS`,"₡":`CL`,"¢":`c`,"¥":`YEN`,円:`JPY`,"৳":`BDT`,元:`CNY`,"﷼":`SAR`,"៛":`KR`,"₠":`ECU`,"¤":`$?`,"฿":`THB`,"؋":`AFN`};function Ad(e,t=kd){e=e.normalize(`NFC`);let n=``,r;for(let i=0;i/g,``);r=r.replace(/['"‘’“”ʻ\[\]\(\)\{\}:]/g,``),r=r.toLowerCase(),r=Ad(r),n.allowNonAlphaStart||(r=r.replace(/^[^a-z]+/,``));let i=r.split(/[^a-z0-9]+/).filter(Boolean);if(r=``,n.handleCasing===`snake`)return i.join(`_`);for(let e=0;e/g,``);return t=t.toLowerCase(),t=Ad(t),t=t.replace(/^[^a-z]+/,``),t=t.replace(/[^a-z0-9]+$/,``),t.split(/[^a-z0-9]+/).filter(Boolean).join(`-`)}function Pd(e){return typeof e==`symbol`||e instanceof Symbol}var Fd=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function Id(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Ld(){}function Rd(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function zd(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Bd(e){if(Rd(e))return e;if(Array.isArray(e)||zd(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Vd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Hd(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ud=`[object RegExp]`,Wd=`[object String]`,Gd=`[object Number]`,Kd=`[object Boolean]`,qd=`[object Arguments]`,Jd=`[object Symbol]`,Yd=`[object Date]`,Xd=`[object Map]`,Zd=`[object Set]`,Qd=`[object Array]`,$d=`[object Function]`,ef=`[object ArrayBuffer]`,tf=`[object Object]`,nf=`[object Error]`,rf=`[object DataView]`,af=`[object Uint8Array]`,of=`[object Uint8ClampedArray]`,sf=`[object Uint16Array]`,cf=`[object Uint32Array]`,lf=`[object BigUint64Array]`,uf=`[object Int8Array]`,df=`[object Int16Array]`,ff=`[object Int32Array]`,pf=`[object BigInt64Array]`,mf=`[object Float32Array]`,hf=`[object Float64Array]`;function gf(e){return Fd.Buffer!==void 0&&Fd.Buffer.isBuffer(e)}function _f(e,t){return vf(e,void 0,e,new Map,t)}function vf(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(Rd(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;aEf(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case Qd:case af:case of:case sf:case cf:case lf:case uf:case df:case ff:case pf:case mf:case hf:if(gf(e)!==gf(t)||e.length!==t.length)return!1;for(let i=0;i=0}var Af={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function jf(e){return e.replace(/[&<>"']/g,e=>Af[e])}function Mf(e){return e!=null&&typeof e!=`function`&&kf(e.length)}function Nf(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function Pf(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Ff(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Ff).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function If(e){if(Array.isArray(e))return e.map(Pf);if(typeof e==`symbol`)return[e];e=Ff(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(Hd(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),yf(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Gd:case Wd:case Kd:{let t=new e.constructor(e?.valueOf());return yf(t,e),t}case qd:{let t={};return yf(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Vf(e){return Bf(e)}var Hf=/^(?:0|[1-9]\d*)$/;function Uf(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{let r=e[t];(!(Object.hasOwn(e,t)&&wf(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function Qf(e,t,n,r){if(e==null&&!zf(e))return e;let i;i=Xf(t,e)?[t]:Array.isArray(t)?t:If(t);let a=n(Lf(e,i)),o=e;for(let t=0;tn,()=>void 0)}function ep(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Id(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function tp(e){return zd(e)}function np(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;etypeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0,sp=e=>e instanceof FormData?!0:op(e)||typeof e==`object`&&!!e&&Object.values(e).some(e=>sp(e)),cp=class extends Error{response;constructor(e){super(`HTTP error ${e.status}`),this.name=`HttpResponseError`,this.response=e}},lp=class extends Error{constructor(e=`Request was cancelled`){super(e),this.name=`HttpCancelledError`}},up=class extends Error{constructor(e=`Network error`){super(e),this.name=`HttpNetworkError`}};function dp(e){let t=new URLSearchParams;return Object.entries(e).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(n=>t.append(`${e}[]`,String(n))):typeof n==`object`?t.append(e,JSON.stringify(n)):t.append(e,String(n)))}),t.toString()}function fp(e,t,n){if(t&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=t.replace(/\/$/,``)+`/`+e.replace(/^\//,``)),n&&Object.keys(n).length>0){let t=dp(n);t&&(e+=(e.includes(`?`)?`&`:`?`)+t)}return e}function pp(){return typeof window>`u`?null:window.axios?.defaults?.headers?.common?.[`X-Requested-With`]??null}function mp(e,t=new FormData,n=null){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&hp(t,n?`${n}[${r}]`:r,e[r]);return t}function hp(e,t,n){if(Array.isArray(n))return n.forEach((n,r)=>hp(e,`${t}[${r}]`,n));if(n instanceof Date)return e.append(t,n.toISOString());if(typeof File<`u`&&n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);mp(n,e,t)}function gp(e,t){if(e!=null)return e instanceof FormData?e:typeof e==`object`&&sp(e)?mp(e):typeof e==`object`||t[`Content-Type`]?.includes(`application/json`)?JSON.stringify(e):String(e)}function _p(e){let t={};return e.forEach((e,n)=>{t[n.toLowerCase()]=e}),t}function vp(e={}){let t=e.xsrfCookieName??`XSRF-TOKEN`,n=e.xsrfHeaderName??`X-XSRF-TOKEN`;function r(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(^|;\\s*)`+t+`=([^;]*)`));return e?decodeURIComponent(e[2]):null}return{setXsrfCookieName(e){t=e},setXsrfHeaderName(e){n=e},async request(e){let t=fp(e.url,e.baseURL,e.params),i=e.method.toUpperCase(),a={},o=pp();o&&(a[`X-Requested-With`]=o),e.data!==void 0&&![`GET`,`DELETE`].includes(i)&&!(e.data instanceof FormData)&&!sp(e.data)&&(a[`Content-Type`]=`application/json`),e.headers&&Object.entries(e.headers).forEach(([e,t])=>{t!==void 0&&(a[e]=String(t))});let s=r();s&&![`GET`,`HEAD`,`OPTIONS`].includes(i)&&(a[n]=s);let c=e.signal,l,u=e.timeout??3e4;if(u>0&&!c){let e=new AbortController;c=e.signal,l=setTimeout(()=>e.abort(),u)}let d=[`GET`,`DELETE`].includes(i)?void 0:gp(e.data,a);d instanceof FormData&&delete a[`Content-Type`];try{let n=await fetch(t,{method:i,headers:a,body:d,signal:c,credentials:e.credentials??`same-origin`});l&&clearTimeout(l);let r;r=n.headers.get(`content-type`)?.includes(`application/json`)?await n.json():await n.text();let o={status:n.status,data:r,headers:_p(n.headers)};if(!n.ok)throw new cp(o);return o}catch(e){throw l&&clearTimeout(l),e instanceof cp?e:e instanceof DOMException&&e.name===`AbortError`?new lp:e instanceof TypeError?new up(e.message):e}}}}var yp=vp(),bp=yp,xp=void 0,Sp=void 0,wp=`same-origin`,Tp=e=>`${e.method}:${e.baseURL??xp??``}${e.url}`,Ep=e=>e.status===204&&e.headers[`precognition-success`]===`true`,Dp={},Op={get:(e,t={},n={})=>Ap(kp(`get`,e,t,n)),post:(e,t={},n={})=>Ap(kp(`post`,e,t,n)),patch:(e,t={},n={})=>Ap(kp(`patch`,e,t,n)),put:(e,t={},n={})=>Ap(kp(`put`,e,t,n)),delete:(e,t={},n={})=>Ap(kp(`delete`,e,t,n)),useHttpClient(e){return bp=e,Op},withBaseURL(e){return xp=e,Op},withTimeout(e){return Sp=e,Op},withCredentials(e){return wp=typeof e==`string`?e:e?`include`:`omit`,Op},fingerprintRequestsUsing(e){return Tp=e===null?()=>null:e,Op},determineSuccessUsing(e){return Ep=e,Op},withXsrfCookieName(e){return yp.setXsrfCookieName(e),Op},withXsrfHeaderName(e){return yp.setXsrfHeaderName(e),Op}},kp=(e,t,n,r)=>({url:t,method:e,...r,...[`get`,`delete`].includes(e)?{params:ip({},n,r?.params)}:{data:ip({},n,r?.data)}}),Ap=(e={})=>{let t=[jp,Np,Pp].reduce((e,t)=>t(e),e);return(t.onBefore??(()=>!0))()===!1?Promise.resolve(null):((t.onStart??(()=>null))(),bp.request({method:t.method,url:t.url,baseURL:t.baseURL??xp,data:t.data,params:t.params,headers:t.headers,signal:t.signal,timeout:t.timeout,credentials:wp}).then(async e=>{t.precognitive&&Fp(e);let n=e.status,r=e;return t.precognitive&&t.onPrecognitionSuccess&&Ep(e)&&(r=await Promise.resolve(t.onPrecognitionSuccess(e)??r)),t.onSuccess&&Mp(n)&&(r=await Promise.resolve(t.onSuccess(r)??r)),(Lp(t,n)??(e=>e))(r)??r},e=>{if(Ip(e))return Promise.reject(e);let n=e;return t.precognitive&&Fp(n.response),(Lp(t,n.response.status)??((e,t)=>Promise.reject(t)))(n.response,n)}).finally(t.onFinish??(()=>null)))},jp=e=>{let t=e.only??e.validate;return{...e,timeout:e.timeout??Sp,precognitive:e.precognitive!==!1,fingerprint:e.fingerprint===void 0?Tp(e,bp):e.fingerprint,headers:{...e.headers,Accept:`application/json`,"Content-Type":Rp(e),...e.precognitive===!1?{}:{Precognition:!0},...t?{"Precognition-Validate-Only":Array.from(t).join()}:{}}}},Mp=e=>e>=200&&e<300,Np=e=>typeof e.fingerprint==`string`?(Dp[e.fingerprint]?.abort(),delete Dp[e.fingerprint],e):e,Pp=e=>typeof e.fingerprint!=`string`||e.signal||!e.precognitive?e:(Dp[e.fingerprint]=new AbortController,{...e,signal:Dp[e.fingerprint].signal}),Fp=e=>{if(e.headers?.precognition!==`true`)throw Error(`Did not receive a Precognition response. Ensure you have the Precognition middleware in place for the route.`)},Ip=e=>!(e instanceof cp)||typeof e.response?.status!=`number`,Lp=(e,t)=>({401:e.onUnauthorized,403:e.onForbidden,404:e.onNotFound,409:e.onConflict,422:e.onValidationError,423:e.onLocked})[t],Rp=e=>e.headers?.[`Content-Type`]??e.headers?.[`Content-type`]??e.headers?.[`content-type`]??(sp(e.data)?`multipart/form-data`:`application/json`),zp=(e,t)=>{if(!e.includes(`*`))return[e];let n=e.split(`.`),r=[``];for(let e of n)if(e===`*`){let e=[];for(let n of r){let r=n?Lf(t,n):t;if(Array.isArray(r))for(let t=0;tt?`${t}.${e}`:e);return r},Bp=(e,t)=>t.includes(`*`)?RegExp(`^`+t.replace(/\./g,`\\.`).replace(/\*/g,`[^.]+`)+`$`).test(e):e===t,Vp=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.some(t=>Bp(e,t)))),Hp=(e,t={})=>{let n={errorsChanged:[],touchedChanged:[],validatingChanged:[],validatedChanged:[]},r=!1,i=!1,a=e=>e===i?[]:(i=e,n.validatingChanged),o=[],s=e=>{let t=[...new Set(e)];return o.length!==t.length||!t.every(e=>o.includes(e))?(o=t,n.validatedChanged):[]},c=()=>o.filter(e=>d[e]===void 0),l=[],u=e=>{let t=[...new Set(e)];return l.length!==t.length||!t.every(e=>l.includes(e))?(l=t,n.touchedChanged):[]},d={},f=e=>{let t=Wp(e);return Of(d,t)?[]:(d=t,n.errorsChanged)},p=e=>{let t={...d};return delete t[Gp(e)],f(t)},m=()=>Object.keys(d).length>0,h=1500,g=e=>{h=e,S.cancel(),S=x()},_=t,v=null,y=[],b=null,x=()=>ep(t=>{e({get:(e,n={},r={})=>Op.get(e,T(n),C(r,t,n)),post:(e,n={},r={})=>Op.post(e,T(n),C(r,t,n)),patch:(e,n={},r={})=>Op.patch(e,T(n),C(r,t,n)),put:(e,n={},r={})=>Op.put(e,T(n),C(r,t,n)),delete:(e,n={},r={})=>Op.delete(e,T(n),C(r,t,n))}).catch(e=>e instanceof lp||e instanceof cp&&e.response?.status===422?null:Promise.reject(e))},h,{leading:!0,trailing:!0}),S=x(),C=(e,t,n={})=>{let r={...e,...t},i=Array.from(r.only??r.validate??l);return{...t,...ip({},e,t),only:i,timeout:r.timeout??5e3,onValidationError:(e,t)=>([...s([...o,...i]),...f(ip(Vp({...d},i),e.data.errors))].forEach(e=>e()),r.onValidationError?r.onValidationError(e,t):Promise.reject(t)),onSuccess:e=>(s([...o,...i]).forEach(e=>e()),r.onSuccess?r.onSuccess(e):e),onPrecognitionSuccess:e=>([...s([...o,...i]),...f(Vp({...d},i))].forEach(e=>e()),r.onPrecognitionSuccess?r.onPrecognitionSuccess(e):e),onBefore:()=>{let e=l.some(e=>e.includes(`*`)),t=e?[...new Set(l.flatMap(e=>zp(e,n)))]:l;return r.onBeforeValidation&&r.onBeforeValidation({data:n,touched:t},{data:_,touched:y})===!1||(r.onBefore||(()=>!0))()===!1?!1:(e&&u(t).forEach(e=>e()),b=l,v=n,!0)},onStart:()=>{a(!0).forEach(e=>e()),(r.onStart??(()=>null))()},onFinish:()=>{a(!1).forEach(e=>e()),y=b,_=v,b=v=null,(r.onFinish??(()=>null))()}}},w=(e,t,n)=>{if(e===void 0){let e=Array.from(n?.only??n?.validate??[]);u([...l,...e]).forEach(e=>e()),S(n??{});return}if(op(t)&&!r){console.warn(`Precognition file validation is not active. Call the "validateFiles" function on your form to enable it.`);return}e=Gp(e),(e.includes(`*`)||Lf(_,e)!==t)&&(u([e,...l]).forEach(e=>e()),S(n??{}))},T=e=>r===!1?Kp(e):e,E={touched:()=>l,validate(e,t,n){return typeof e==`object`&&!(`target`in e)&&(n=e,e=t=void 0),w(e,t,n),E},touch(e){let t=Array.isArray(e)?e:[Gp(e)];return u([...l,...t]).forEach(e=>e()),E},validating:()=>i,valid:c,errors:()=>d,hasErrors:m,setErrors(e){return f(e).forEach(e=>e()),E},forgetError(e){return p(e).forEach(e=>e()),E},defaults(e){return t=e,_=e,E},reset(...e){if(e.length===0)u([]).forEach(e=>e());else{let n=[...l];e.forEach(e=>{n.includes(e)&&n.splice(n.indexOf(e),1),$f(_,e,Lf(t,e))}),u(n).forEach(e=>e())}return E},setTimeout(e){return g(e),E},on(e,t){return n[e].push(t),E},validateFiles(){return r=!0,E},withoutFileValidation(){return r=!1,E}};return E},Up=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:Array.isArray(e[n])?e[n][0]:e[n]}),{}),Wp=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:typeof e[n]==`string`?[e[n]]:e[n]}),{}),Gp=e=>typeof e==`string`?e:e.target.name,Kp=e=>{let t={...e};return Object.keys(t).forEach(e=>{let n=t[e];if(n!==null){if(op(n)){delete t[e];return}if(Array.isArray(n)){t[e]=Object.values(Kp({...n}));return}if(typeof n==`object`){t[e]=Kp(t[e]);return}}}),t},qp=new class{config={};defaults;constructor(e){this.defaults=e}extend(e){return e&&(this.defaults={...this.defaults,...e}),this}replace(e){this.config=e}get(e){return Gf(this.config,e)?Lf(this.config,e):Lf(this.defaults,e)}set(e,t){typeof e==`string`?$f(this.config,e,t):Object.entries(e).forEach(([e,t])=>{$f(this.config,e,t)})}}({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0,withAllErrors:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function Jp(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function Yp(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var Xp=e=>Yp(`before`,{cancelable:!0,detail:{visit:e}}),Zp=e=>Yp(`error`,{detail:{errors:e}}),Qp=e=>Yp(`networkError`,{cancelable:!0,detail:{error:e}}),$p=e=>Yp(`finish`,{detail:{visit:e}}),em=e=>Yp(`httpException`,{cancelable:!0,detail:{response:e}}),tm=e=>Yp(`beforeUpdate`,{detail:{page:e}}),nm=e=>Yp(`navigate`,{detail:{page:e}}),rm=e=>Yp(`progress`,{detail:{progress:e}}),im=e=>Yp(`start`,{detail:{visit:e}}),am=e=>Yp(`success`,{detail:{page:e}}),om=(e,t)=>Yp(`prefetched`,{detail:{fetchedAt:Date.now(),response:e,visit:t}}),sm=e=>Yp(`prefetching`,{detail:{visit:e}}),cm=e=>Yp(`flash`,{detail:{flash:e}}),lm=class{static locationVisitKey=`inertiaLocationVisit`;static set(e,t){typeof window<`u`&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if(typeof window<`u`)return JSON.parse(window.sessionStorage.getItem(e)||`null`)}static merge(e,t){let n=this.get(e);n===null?this.set(e,t):this.set(e,{...n,...t})}static remove(e){typeof window<`u`&&window.sessionStorage.removeItem(e)}static removeNested(e,t){let n=this.get(e);n!==null&&(delete n[t],this.set(e,n))}static exists(e){try{return this.get(e)!==null}catch{return!1}}static clear(){typeof window<`u`&&window.sessionStorage.clear()}},um=async e=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);let t=hm(),n=await vm(await ym());if(!n)throw Error(`Unable to encrypt history`);return await pm(t,n,e)},dm={key:`historyKey`,iv:`historyIv`},fm=async e=>{let t=hm(),n=await ym();if(!n)throw Error(`Unable to decrypt history`);return await mm(t,n,e)},pm=async(e,t,n)=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=new TextEncoder,i=JSON.stringify(n),a=new Uint8Array(i.length*3),o=r.encodeInto(i,a);return window.crypto.subtle.encrypt({name:`AES-GCM`,iv:e},t,a.subarray(0,o.written))},mm=async(e,t,n)=>{if(window.crypto.subtle===void 0)return console.warn(`Decryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=await window.crypto.subtle.decrypt({name:`AES-GCM`,iv:e},t,n);return JSON.parse(new TextDecoder().decode(r))},hm=()=>{let e=lm.get(dm.iv);if(e)return new Uint8Array(e);let t=window.crypto.getRandomValues(new Uint8Array(12));return lm.set(dm.iv,Array.from(t)),t},gm=async()=>window.crypto.subtle===void 0?(console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(null)):window.crypto.subtle.generateKey({name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]),_m=async e=>{if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve();let t=await window.crypto.subtle.exportKey(`raw`,e);lm.set(dm.key,Array.from(new Uint8Array(t)))},vm=async e=>{if(e)return e;let t=await gm();return t?(await _m(t),t):null},ym=async()=>{let e=lm.get(dm.key);return e?await window.crypto.subtle.importKey(`raw`,new Uint8Array(e),{name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]):null},bm=(e,t,n)=>{if(e===t)return!0;for(let r in e)if(!n.includes(r)&&e[r]!==t[r]&&!xm(e[r],t[r]))return!1;for(let r in t)if(!n.includes(r)&&!(r in e))return!1;return!0},xm=(e,t)=>{switch(typeof e){case`object`:return bm(e,t,[]);case`function`:return e.toString()===t.toString();default:return e===t}},Sm={ms:1,s:1e3,m:1e3*60,h:1e3*60*60,d:1e3*60*60*24},Cm=e=>{if(typeof e==`number`)return e;for(let[t,n]of Object.entries(Sm))if(e.endsWith(t))return parseFloat(e)*n;return parseInt(e)},wm=new class{cached=[];inFlightRequests=[];removalTimers=[];currentUseId=null;add(e,t,{cacheFor:n,cacheTags:r}){if(this.findInFlight(e))return Promise.resolve();let i=this.findCached(e);if(!e.fresh&&i&&i.staleTimestamp>Date.now())return Promise.resolve();let[a,o]=this.extractStaleValues(n),s=new Promise((n,r)=>{t({...e,onCancel:()=>{this.remove(e),e.onCancel(),r()},onError:t=>{this.remove(e),e.onError(t),r()},onPrefetching(t){e.onPrefetching(t)},onPrefetched(t,n){e.onPrefetched(t,n)},onPrefetchResponse(e){n(e)},onPrefetchError(t){wm.removeFromInFlight(e),r(t)}})}).then(t=>{this.remove(e);let n=t.getPageResponse();V.mergeOncePropsIntoResponse(n),this.cached.push({params:{...e},staleTimestamp:Date.now()+a,expiresAt:Date.now()+o,response:s,singleUse:o===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(r)?r:[r]});let i=this.getShortestOncePropTtl(n);return this.scheduleForRemoval(e,i?Math.min(o,i):o),this.removeFromInFlight(e),t.handlePrefetch(),t});return this.inFlightRequests.push({params:{...e},response:s,staleTimestamp:null,inFlight:!0}),s}removeAll(){this.cached=[],this.removalTimers.forEach(e=>{clearTimeout(e.timer)}),this.removalTimers=[]}removeByTags(e){this.cached=this.cached.filter(t=>!t.tags.some(t=>e.includes(t)))}remove(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)),this.clearTimer(e)}removeFromInFlight(e){this.inFlightRequests=this.inFlightRequests.filter(t=>!this.paramsAreEqual(t.params,e))}extractStaleValues(e){let[t,n]=this.cacheForToStaleAndExpires(e);return[Cm(t),Cm(n)]}cacheForToStaleAndExpires(e){if(!Array.isArray(e))return[e,e];switch(e.length){case 0:return[0,0];case 1:return[e[0],e[0]];default:return[e[0],e[1]]}}clearTimer(e){let t=this.removalTimers.find(t=>this.paramsAreEqual(t.params,e));t&&(clearTimeout(t.timer),this.removalTimers=this.removalTimers.filter(e=>e!==t))}scheduleForRemoval(e,t){if(!(typeof window>`u`)&&(this.clearTimer(e),t>0)){let n=window.setTimeout(()=>this.remove(e),t);this.removalTimers.push({params:e,timer:n})}}get(e){return this.findCached(e)||this.findInFlight(e)}use(e,t){let n=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=n,e.response.then(e=>{if(this.currentUseId===n)return e.mergeParams({...t,onPrefetched:()=>{}}),this.removeSingleUseItems(t),e.handle()})}removeSingleUseItems(e){this.cached=this.cached.filter(t=>this.paramsAreEqual(t.params,e)?!t.singleUse:!0)}findCached(e){return this.cached.find(t=>this.paramsAreEqual(t.params,e))||null}findInFlight(e){return this.inFlightRequests.find(t=>this.paramsAreEqual(t.params,e))||null}withoutPurposePrefetchHeader(e){let t=B(e);return t.headers.Purpose===`prefetch`&&delete t.headers.Purpose,t}paramsAreEqual(e,t){return bm(this.withoutPurposePrefetchHeader(e),this.withoutPurposePrefetchHeader(t),[`showProgress`,`replace`,`prefetch`,`preserveScroll`,`preserveState`,`onBefore`,`onBeforeUpdate`,`onStart`,`onProgress`,`onFinish`,`onCancel`,`onSuccess`,`onError`,`onFlash`,`onPrefetched`,`onCancelToken`,`onPrefetching`,`async`,`viewTransition`,`optimistic`,`component`,`pageProps`])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(e=>{e.response.then(t=>{let n=t.getPageResponse();V.mergeOncePropsIntoResponse(n,{force:!0});for(let[e,t]of Object.entries(n.deferredProps??{})){let r=t.filter(e=>Lf(n.props,e)===void 0);r.length>0?n.deferredProps[e]=r:delete n.deferredProps[e]}let r=this.getShortestOncePropTtl(n);if(r===null)return;let i=e.expiresAt-Date.now(),a=Math.min(i,r);a>0?this.scheduleForRemoval(e.params,a):this.remove(e.params)})})}getShortestOncePropTtl(e){let t=Object.values(e.onceProps??{}).map(e=>e.expiresAt).filter(e=>!!e);return t.length===0?null:Math.min(...t)-Date.now()}},Tm=(e,t=1)=>{window.requestAnimationFrame(()=>{t>1?Tm(e,t-1):e()})},Em=e=>{if(typeof window>`u`)return null;let t=document.querySelector(`script[data-page="${e}"][type="application/json"]`);return t?.textContent?JSON.parse(t.textContent):null},Dm=typeof window>`u`,Om=!Dm&&/Firefox/i.test(window.navigator.userAgent),km=class{static save(){H.saveScrollPositions(this.getScrollRegions())}static getScrollRegions(){return Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))}static regions(){return document.querySelectorAll(`[scroll-region]`)}static scrollToTop(){if(Om&&getComputedStyle(document.documentElement).scrollBehavior===`smooth`)return Tm(()=>window.scrollTo(0,0),2);window.scrollTo(0,0)}static reset(){!Dm&&window.location.hash||this.scrollToTop(),this.regions().forEach(e=>{typeof e.scrollTo==`function`?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.save(),this.scrollToAnchor()}static scrollToAnchor(){let e=Dm?null:window.location.hash;e&&setTimeout(()=>{let t=document.getElementById(e.slice(1));t?t.scrollIntoView():this.scrollToTop()})}static restore(e){Dm||window.requestAnimationFrame(()=>{this.restoreDocument(),this.restoreScrollRegions(e)})}static restoreScrollRegions(e){Dm||this.regions().forEach((t,n)=>{let r=e[n];r&&(typeof t.scrollTo==`function`?t.scrollTo(r.left,r.top):(t.scrollTop=r.top,t.scrollLeft=r.left))})}static restoreDocument(){let e=H.getDocumentScrollPosition();window.scrollTo(e.left,e.top)}static onScroll(e){let t=e.target;typeof t.hasAttribute==`function`&&t.hasAttribute(`scroll-region`)&&this.save()}static onWindowScroll(){H.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}},Am=e=>typeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0;function jm(e){return Am(e)||e instanceof FormData&&Array.from(e.values()).some(e=>jm(e))||typeof e==`object`&&!!e&&Object.values(e).some(e=>jm(e))}var Mm=e=>e instanceof FormData;function Nm(e,t=new FormData,n=null,r=`brackets`){e||={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&Fm(t,Pm(n,i,`indices`),e[i],r);return t}function Pm(e,t,n){return e?n===`brackets`?`${e}[]`:`${e}[${t}]`:t}function Fm(e,t,n,r){if(Array.isArray(n))return Array.from(n.keys()).forEach(i=>Fm(e,Pm(t,i.toString(),r),n[i],r));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);Nm(n,e,t,r)}function Im(e){return/\[\d+\]/.test(decodeURIComponent(e.search))}function Lm(e){if(!e||e===`?`)return{};let t={};return e.replace(/^\?/,``).split(`&`).filter(Boolean).forEach(e=>{let[n,r]=zm(e);Vm(t,Bm(n),Bm(r))}),t}function Rm(e,t){let n=[];return Um(e,``,n,t),n.length?`?`+n.join(`&`):``}function zm(e){let t=e.indexOf(`=`);return t===-1?[e,``]:[e.substring(0,t),e.substring(t+1)]}function Bm(e){return decodeURIComponent(e.replace(/\+/g,` `))}function Vm(e,t,n){let r=Hm(t),i=e;for(;r.length>1;){let e=r.shift(),t=r[0]===``;(typeof i[e]!=`object`||i[e]===null)&&(i[e]=t?[]:{}),i=i[e]}let a=r.shift();a===``&&Array.isArray(i)?i.push(n):i[a]=n}function Hm(e){let t=[],n=e.split(`[`)[0];n&&t.push(n);let r,i=/\[([^\]]*)\]/g;for(;(r=i.exec(e))!==null;)t.push(r[1]);return t}function Um(e,t,n,r){if(e!==void 0){if(e===null){n.push(`${t}=`);return}if(Array.isArray(e)){e.forEach((e,i)=>{Um(e,r===`indices`?`${t}[${i}]`:`${t}[]`,n,r)});return}if(typeof e==`object`){Object.keys(e).forEach(i=>{Um(e[i],t?`${t}[${i}]`:i,n,r)});return}n.push(`${t}=${encodeURIComponent(String(e))}`)}}function Wm(e){return new URL(e.toString(),typeof window>`u`?void 0:window.location.toString())}var Gm=(e,t,n,r,i)=>{let a=typeof e==`string`?Wm(e):e;if((jm(t)||r)&&!Mm(t)&&(qp.get(`form.forceIndicesArrayFormatInFormData`)&&(i=`indices`),t=Nm(t,new FormData,null,i)),Mm(t))return[a,t];let[o,s]=Km(n,a,t,i);return[Wm(o),s]};function Km(e,t,n,r=`brackets`){let i=e===`get`&&!Mm(n)&&Object.keys(n).length>0,a=$m(t.toString()),o=a||t.toString().startsWith(`/`)||t.toString()===``,s=!o&&!t.toString().startsWith(`#`)&&!t.toString().startsWith(`?`),c=/^[.]{1,2}([/]|$)/.test(t.toString()),l=t.toString().includes(`?`)||i,u=t.toString().includes(`#`),d=new URL(t.toString(),typeof window>`u`?`http://localhost`:window.location.toString());if(i){let e=Im(d)?`indices`:r;d.search=Rm({...Lm(d.search),...n},e)}return[[a?`${d.protocol}//${d.host}`:``,o?d.pathname:``,s?d.pathname.substring(+!c):``,l?d.search:``,u?d.hash:``].join(``),i?{}:n]}function qm(e){return e=new URL(e.href),e.hash=``,e}var Jm=(e,t)=>{e.hash&&!t.hash&&qm(e).href===t.href&&(t.hash=e.hash)},Ym=(e,t)=>qm(e).href===qm(t).href,Xm=(e,t)=>e.origin===t.origin&&e.pathname===t.pathname;function Zm(e){return typeof e==`object`&&!!e&&e!==void 0&&`url`in e&&`method`in e}function Qm(e){return e.component?typeof e.component==`string`?e.component:(console.error(`The "component" property on the URL method pair received multiple components (${Object.keys(e.component).join(`, `)}), but only a single component string is supported for instant visits. Use the withComponent() method to specify which component to use.`),null):null}function $m(e){return/^([a-z][a-z0-9+.-]*:)?\/\/[^/]/i.test(e)}var V=new class{page;swapComponent;resolveComponent;onFlashCallback;componentId={};listeners=[];isFirstPageLoad=!0;cleared=!1;pendingDeferredProps=null;historyQuotaExceeded=!1;optimisticBaseline={};pendingOptimistics=[];optimisticCounter=0;init({initialPage:e,swapComponent:t,resolveComponent:n,onFlash:r}){return this.page={...e,flash:e.flash??{}},this.swapComponent=t,this.resolveComponent=n,this.onFlashCallback=r,ah.on(`historyQuotaExceeded`,()=>{this.historyQuotaExceeded=!0}),this}set(e,{replace:t=!1,preserveScroll:n=!1,preserveState:r=!1,viewTransition:i=!1}={}){Object.keys(e.deferredProps||{}).length&&(this.pendingDeferredProps={deferredProps:e.deferredProps,component:e.component,url:e.url},e.initialDeferredProps===void 0&&(e.initialDeferredProps=e.deferredProps)),this.componentId={};let a=this.componentId;return e.clearHistory&&H.clear(),this.resolve(e.component,e).then(o=>{if(a!==this.componentId)return;e.rememberedState??={};let s=typeof window>`u`,c=s?new URL(e.url):window.location,l=!s&&n?km.getScrollRegions():[];t||=Ym(Wm(e.url),c);let u={...e,flash:{}};return new Promise(e=>t?H.replaceState(u,e):H.pushState(u,e)).then(()=>{let a=!this.isTheSame(e);if(!a&&Object.keys(e.props.errors||{}).length>0&&(i=!1),this.page=e,this.cleared=!1,this.hasOnceProps()&&wm.updateCachedOncePropsFromCurrentPage(),a&&this.fireEventsFor(`newComponent`),this.isFirstPageLoad&&this.fireEventsFor(`firstLoad`),this.isFirstPageLoad=!1,this.historyQuotaExceeded){this.historyQuotaExceeded=!1;return}return this.swap({component:o,page:e,preserveState:r,viewTransition:i}).then(()=>{n?window.requestAnimationFrame(()=>km.restoreScrollRegions(l)):km.reset(),this.pendingDeferredProps&&this.pendingDeferredProps.component===e.component&&this.pendingDeferredProps.url===e.url&&ah.fireInternalEvent(`loadDeferredProps`,this.pendingDeferredProps.deferredProps),this.pendingDeferredProps=null,t||nm(e)})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component,e).then(n=>(this.page=e,this.cleared=!1,H.setCurrent(e),this.swap({component:n,page:e,preserveState:t,viewTransition:!1})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}getWithoutFlashData(){return{...this.page,flash:{}}}hasOnceProps(){return Object.keys(this.page.onceProps??{}).length>0}merge(e){this.page={...this.page,...e}}setPropsQuietly(e){return this.page={...this.page,props:e},this.resolve(this.page.component,this.page).then(e=>this.swap({component:e,page:this.page,preserveState:!0,viewTransition:!1}))}setFlash(e){this.page={...this.page,flash:e},this.onFlashCallback?.(e)}setUrlHash(e){this.page.url.includes(e)||(this.page.url+=e)}remember(e){this.page.rememberedState=e}swap({component:e,page:t,preserveState:n,viewTransition:r}){let i=()=>this.swapComponent({component:e,page:t,preserveState:n});if(!r||!document?.startViewTransition||document.visibilityState===`hidden`)return i();let a=typeof r==`boolean`?()=>null:r;return new Promise(e=>{a(document.startViewTransition(()=>i().then(e)))})}resolve(e,t){return Promise.resolve(this.resolveComponent(e,t))}nextOptimisticId(){return++this.optimisticCounter}setBaseline(e,t){e in this.optimisticBaseline||(this.optimisticBaseline[e]=t)}updateBaseline(e,t){e in this.optimisticBaseline&&(this.optimisticBaseline[e]=t)}hasBaseline(e){return e in this.optimisticBaseline}registerOptimistic(e,t){this.pendingOptimistics.push({id:e,callback:t})}unregisterOptimistic(e){this.pendingOptimistics=this.pendingOptimistics.filter(t=>t.id!==e)}replayOptimistics(){let e=Object.keys(this.optimisticBaseline);if(e.length===0)return{};let t=B(this.page.props);for(let n of e)t[n]=B(this.optimisticBaseline[n]);for(let{callback:e}of this.pendingOptimistics){let n=e(B(t));n&&Object.assign(t,n)}let n={};for(let r of e)n[r]=t[r];return n}pendingOptimisticCount(){return this.pendingOptimistics.length}clearOptimisticState(){this.optimisticBaseline={},this.pendingOptimistics=[]}isTheSame(e){return this.page.component===e.component}on(e,t){return this.listeners.push({event:e,callback:t}),()=>{this.listeners=this.listeners.filter(n=>n.event!==e&&n.callback!==t)}}fireEventsFor(e){this.listeners.filter(t=>t.event===e).forEach(e=>e.callback())}mergeOncePropsIntoResponse(e,{force:t=!1}={}){Object.entries(e.onceProps??{}).forEach(([n,r])=>{let i=this.page.onceProps?.[n];i!==void 0&&(t||Lf(e.props,r.prop)===void 0)&&($f(e.props,r.prop,Lf(this.page.props,i.prop)),e.onceProps[n].expiresAt=i.expiresAt)})}},eh=class{items=[];processingPromise=null;add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??=this.processNext().finally(()=>{this.processingPromise=null}),this.processingPromise}processNext(){let e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}},th=typeof window>`u`,nh=new eh,rh=!th&&/CriOS/.test(window.navigator.userAgent),ih=class{rememberedState=`rememberedState`;scrollRegions=`scrollRegions`;preserveUrl=!1;current={};initialState=null;remember(e,t){this.replaceState({...V.getWithoutFlashData(),rememberedState:{...V.get()?.rememberedState??{},[t]:e}})}restore(e){if(!th)return this.current[this.rememberedState]?.[e]===void 0?this.initialState?.[this.rememberedState]?.[e]:this.current[this.rememberedState]?.[e]}pushState(e,t=null){if(!th){if(this.preserveUrl){t&&t();return}this.current=e,nh.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doPushState({page:n},e.url).then(()=>t?.());return rh?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}clonePageProps(e){try{return structuredClone(e.props),e}catch{return{...e,props:B(e.props)}}}getPageData(e){let t=this.clonePageProps(e);return new Promise(n=>e.encryptHistory?um(t).then(n):n(t))}processQueue(){return nh.process()}decrypt(e=null){if(th)return Promise.resolve(e??V.get());let t=e??window.history.state?.page;return this.decryptPageData(t).then(e=>{if(!e)throw Error(`Unable to decrypt history`);return this.initialState===null?this.initialState=e??void 0:this.current=e??{},e})}decryptPageData(e){return e instanceof ArrayBuffer?fm(e):Promise.resolve(e)}saveScrollPositions(e){nh.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!Of(this.getScrollRegions(),e))return this.doReplaceState({page:window.history.state.page,scrollRegions:e})}))}saveDocumentScrollPosition(e){nh.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!Of(this.getDocumentScrollPosition(),e))return this.doReplaceState({page:window.history.state.page,documentScrollPosition:e})}))}getScrollRegions(){return window.history.state?.scrollRegions||[]}getDocumentScrollPosition(){return window.history.state?.documentScrollPosition||{top:0,left:0}}replaceState(e,t=null){if(Of(this.current,e)){t&&t();return}let{flash:n,...r}=e;if(V.merge(r),!th){if(this.preserveUrl){t&&t();return}this.current=e,nh.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doReplaceState({page:n},e.url).then(()=>t?.());return rh?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}isHistoryThrottleError(e){return e instanceof Error&&e.name===`SecurityError`&&(e.message.includes(`history.pushState`)||e.message.includes(`history.replaceState`))}isQuotaExceededError(e){return e instanceof Error&&e.name===`QuotaExceededError`}withThrottleProtection(e){return Promise.resolve().then(()=>{try{return e()}catch(e){if(!this.isHistoryThrottleError(e))throw e;console.error(e.message)}})}doReplaceState(e,t){return this.withThrottleProtection(()=>{window.history.replaceState({...e,scrollRegions:e.scrollRegions??window.history.state?.scrollRegions,documentScrollPosition:e.documentScrollPosition??window.history.state?.documentScrollPosition},``,t)})}doPushState(e,t){return this.withThrottleProtection(()=>{try{window.history.pushState(e,``,t)}catch(e){if(!this.isQuotaExceededError(e))throw e;ah.fireInternalEvent(`historyQuotaExceeded`,t)}})}getState(e,t){return this.current?.[e]??t}deleteState(e){this.current[e]!==void 0&&(delete this.current[e],this.replaceState(this.current))}clearInitialState(e){this.initialState&&this.initialState[e]!==void 0&&delete this.initialState[e]}browserHasHistoryEntry(){return!th&&!!window.history.state?.page}clear(){lm.remove(dm.key),lm.remove(dm.iv)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}};typeof window<`u`&&window.history.scrollRestoration&&(window.history.scrollRestoration=`manual`);var H=new ih,ah=new class{internalListeners=[];init(){typeof window<`u`&&(window.addEventListener(`popstate`,this.handlePopstateEvent.bind(this)),window.addEventListener(`pageshow`,this.handlePageshowEvent.bind(this)),window.addEventListener(`scroll`,Jp(km.onWindowScroll.bind(km),100),!0)),typeof document<`u`&&document.addEventListener(`scroll`,Jp(km.onScroll.bind(km),100),!0)}onGlobalEvent(e,t){return this.registerListener(`inertia:${e}`,(e=>{let n=t(e);e.cancelable&&!e.defaultPrevented&&n===!1&&e.preventDefault()}))}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(e=>e.listener!==t)}}onMissingHistoryItem(){V.clear(),this.fireInternalEvent(`missingHistoryItem`)}fireInternalEvent(e,...t){this.internalListeners.filter(t=>t.event===e).forEach(e=>e.listener(...t))}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePageshowEvent(e){e.persisted&&H.decrypt().catch(()=>this.onMissingHistoryItem())}handlePopstateEvent(e){let t=e.state||null;if(t===null){let e=Wm(V.get().url);e.hash=window.location.hash,H.replaceState({...V.getWithoutFlashData(),url:e.href}),km.reset();return}if(!H.isValidState(t))return this.onMissingHistoryItem();H.decrypt(t.page).then(e=>{if(V.get().version!==e.version){this.onMissingHistoryItem();return}Pg.cancelAll({prefetch:!1}),V.setQuietly(e,{preserveState:!1}).then(()=>{km.restore(H.getScrollRegions()),nm(V.get());let t={},n=V.get().props;for(let[r,i]of Object.entries(e.initialDeferredProps??e.deferredProps??{})){let e=i.filter(e=>Lf(n,e)===void 0);e.length>0&&(t[r]=e)}Object.keys(t).length>0&&this.fireInternalEvent(`loadDeferredProps`,t)})}).catch(()=>{this.onMissingHistoryItem()})}},oh=new class{type;constructor(){this.type=this.resolveType()}resolveType(){return typeof window>`u`?`navigate`:window.performance?.getEntriesByType(`navigation`)[0]?.type??`navigate`}get(){return this.type}isBackForward(){return this.type===`back_forward`}isReload(){return this.type===`reload`}},sh=class{static handle(){this.clearRememberedStateOnReload(),[this.handleBackForward,this.handleLocation,this.handleDefault].find(e=>e.bind(this)())}static clearRememberedStateOnReload(){oh.isReload()&&(H.deleteState(H.rememberedState),H.clearInitialState(H.rememberedState))}static handleBackForward(){if(!oh.isBackForward()||!H.browserHasHistoryEntry())return!1;let e=H.getScrollRegions();return H.decrypt().then(t=>{V.set(t,{preserveScroll:!0,preserveState:!0}).then(()=>{km.restore(e),nm(V.get())})}).catch(()=>{ah.onMissingHistoryItem()}),!0}static handleLocation(){if(!lm.exists(lm.locationVisitKey))return!1;let e=lm.get(lm.locationVisitKey)||{};return lm.remove(lm.locationVisitKey),typeof window<`u`&&V.setUrlHash(window.location.hash),H.decrypt(V.get()).then(()=>{let t=H.getState(H.rememberedState,{}),n=H.getScrollRegions();V.remember(t),V.set(V.get(),{preserveScroll:e.preserveScroll,preserveState:!0}).then(()=>{e.preserveScroll&&km.restore(n),this.fireInitialEvents()})}).catch(()=>{ah.onMissingHistoryItem()}),!0}static handleDefault(){typeof window<`u`&&V.setUrlHash(window.location.hash),V.set(V.get(),{preserveScroll:!0,preserveState:!0}).then(()=>{oh.isReload()?km.restore(H.getScrollRegions()):km.scrollToAnchor(),this.fireInitialEvents()})}static fireInitialEvents(){let e=V.get();nm(e),Object.keys(e.flash).length>0&&queueMicrotask(()=>cm(e.flash))}},ch=class{id=null;throttle=!1;keepAlive=!1;cb;interval;cbCount=0;constructor(e,t,n){this.keepAlive=n.keepAlive??!1,this.cb=t,this.interval=e,(n.autoStart??!0)&&this.start()}stop(){this.id&&clearInterval(this.id)}start(){typeof window>`u`||(this.stop(),this.id=window.setInterval(()=>{(!this.throttle||this.cbCount%10==0)&&this.cb(),this.throttle&&this.cbCount++},this.interval))}isInBackground(e){this.throttle=this.keepAlive?!1:e,this.throttle&&(this.cbCount=0)}},lh=new class{polls=[];constructor(){this.setupVisibilityListener()}add(e,t,n){let r=new ch(e,t,n);return this.polls.push(r),{stop:()=>r.stop(),start:()=>r.start()}}clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){typeof document>`u`||document.addEventListener(`visibilitychange`,()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},uh=new class{requestHandlers=[];responseHandlers=[];errorHandlers=[];onRequest(e){return this.requestHandlers.push(e),()=>{this.requestHandlers=this.requestHandlers.filter(t=>t!==e)}}onResponse(e){return this.responseHandlers.push(e),()=>{this.responseHandlers=this.responseHandlers.filter(t=>t!==e)}}onError(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}async processRequest(e){let t=e;for(let e of this.requestHandlers)t=await e(t);return t}async processResponse(e){let t=e;for(let e of this.responseHandlers)t=await e(t);return t}async processError(e){for(let t of this.errorHandlers)await t(e)}},dh=class extends Error{code;url;constructor(e,t,n){super(n?`${e} (${n})`:e),this.name=`HttpError`,this.code=t,this.url=n}},fh=class extends dh{response;constructor(e,t,n){super(e,`ERR_HTTP_RESPONSE`,n),this.name=`HttpResponseError`,this.response=t}},ph=class extends dh{constructor(e=`Request was cancelled`,t){super(e,`ERR_CANCELLED`,t),this.name=`HttpCancelledError`}},mh=class extends dh{cause;constructor(e,t,n){super(e,`ERR_NETWORK`,t),this.name=`HttpNetworkError`,this.cause=n}};function hh(e){let t=document.cookie.match(RegExp(`(^|;\\s*)(`+e+`)=([^;]*)`));return t?decodeURIComponent(t[3]):null}function gh(e){let t={};return e.getAllResponseHeaders().split(`\r -`).forEach(e=>{let n=e.indexOf(`:`);n>0&&(t[e.slice(0,n).toLowerCase().trim()]=e.slice(n+1).trim())}),t}function _h(e,t){if(!t.headers)return;let n=t.data instanceof FormData;Object.entries(t.headers).forEach(([t,r])=>{(t.toLowerCase()!==`content-type`||!n)&&e.setRequestHeader(t,String(r))})}function vh(e,t){if(!t||Object.keys(t).length===0)return e;let[n]=Km(`get`,e,t);return n}var yh=class{xsrfCookieName;xsrfHeaderName;constructor(e={}){this.xsrfCookieName=e.xsrfCookieName??`XSRF-TOKEN`,this.xsrfHeaderName=e.xsrfHeaderName??`X-XSRF-TOKEN`}async request(e){let t=await uh.processRequest(e);try{let e=await this.doRequest(t);return await uh.processResponse(e)}catch(e){throw(e instanceof fh||e instanceof mh||e instanceof ph)&&await uh.processError(e),e}}doRequest(e){return new Promise((t,n)=>{let r=new XMLHttpRequest,i=vh(e.url,e.params);r.open(e.method.toUpperCase(),i,!0);let a=hh(this.xsrfCookieName);a&&r.setRequestHeader(this.xsrfHeaderName,a);let o=null;e.data!==null&&e.data!==void 0&&(e.data instanceof FormData?o=e.data:typeof e.data==`object`?(o=JSON.stringify(e.data),!e.headers?.[`Content-Type`]&&!e.headers?.[`content-type`]&&r.setRequestHeader(`Content-Type`,`application/json`)):o=String(e.data)),_h(r,e),e.onUploadProgress&&(r.upload.onprogress=t=>{let n=t.lengthComputable?t.loaded/t.total:void 0;e.onUploadProgress({progress:n,percentage:n?Math.round(n*100):0,loaded:t.loaded,total:t.lengthComputable?t.total:void 0})}),e.signal&&e.signal.addEventListener(`abort`,()=>r.abort()),r.onabort=()=>n(new ph(`Request was cancelled`,e.url)),r.onerror=()=>n(new mh(`Network error`,e.url)),r.onload=()=>{let i={status:r.status,data:r.responseText,headers:gh(r)};r.status>=400?n(new fh(`Request failed with status ${r.status}`,i,e.url)):t(i)},r.send(o)})}},bh=new yh;function xh(e){return!(`request`in e)}var Sh={getClient(){return bh},setClient(e){if(!xh(e)){bh=e;return}bh=new yh(e),e.xsrfCookieName&&Op.withXsrfCookieName(e.xsrfCookieName),e.xsrfHeaderName&&Op.withXsrfHeaderName(e.xsrfHeaderName)},onRequest:uh.onRequest.bind(uh),onResponse:uh.onResponse.bind(uh),onError:uh.onError.bind(uh),processRequest:uh.processRequest.bind(uh),processResponse:uh.processResponse.bind(uh),processError:uh.processError.bind(uh)},Ch=class e{callbacks=[];params;constructor(e){if(!e.prefetch)this.params=e;else{let t={onBefore:this.wrapCallback(e,`onBefore`),onBeforeUpdate:this.wrapCallback(e,`onBeforeUpdate`),onStart:this.wrapCallback(e,`onStart`),onProgress:this.wrapCallback(e,`onProgress`),onFinish:this.wrapCallback(e,`onFinish`),onCancel:this.wrapCallback(e,`onCancel`),onSuccess:this.wrapCallback(e,`onSuccess`),onError:this.wrapCallback(e,`onError`),onHttpException:this.wrapCallback(e,`onHttpException`),onNetworkError:this.wrapCallback(e,`onNetworkError`),onFlash:this.wrapCallback(e,`onFlash`),onCancelToken:this.wrapCallback(e,`onCancelToken`),onPrefetched:this.wrapCallback(e,`onPrefetched`),onPrefetching:this.wrapCallback(e,`onPrefetching`)};this.params={...e,...t,onPrefetchResponse:e.onPrefetchResponse||(()=>{}),onPrefetchError:e.onPrefetchError||(()=>{})}}}static create(t){return new e(t)}data(){return this.params.method===`get`?null:this.params.data}queryParams(){return this.params.method===`get`?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}isPrefetch(){return this.params.prefetch===!0}isDeferredPropsRequest(){return this.params.deferredProps===!0}onCancelToken(e){this.params.onCancelToken({cancel:e})}markAsFinished(){this.params.completed=!0,this.params.cancelled=!1,this.params.interrupted=!1}markAsCancelled({cancelled:e=!0,interrupted:t=!1}){this.params.onCancel(),this.params.completed=!1,this.params.cancelled=e,this.params.interrupted=t}wasCancelledAtAll(){return this.params.cancelled||this.params.interrupted}onFinish(){this.params.onFinish(this.params)}onStart(){this.params.onStart(this.params)}onPrefetching(){this.params.onPrefetching(this.params)}onPrefetchResponse(e){this.params.onPrefetchResponse&&this.params.onPrefetchResponse(e)}onPrefetchError(e){this.params.onPrefetchError&&this.params.onPrefetchError(e)}all(){return this.params}headers(){let e={...this.params.headers};this.isPartial()&&(e[`X-Inertia-Partial-Component`]=V.get().component);let t=this.params.only.concat(this.params.reset);return t.length>0&&(e[`X-Inertia-Partial-Data`]=t.join(`,`)),this.params.except.length>0&&(e[`X-Inertia-Partial-Except`]=this.params.except.join(`,`)),this.params.reset.length>0&&(e[`X-Inertia-Reset`]=this.params.reset.join(`,`)),this.params.errorBag&&this.params.errorBag.length>0&&(e[`X-Inertia-Error-Bag`]=this.params.errorBag),e}setPreserveOptions(t){this.params.preserveScroll=e.resolvePreserveOption(this.params.preserveScroll,t),this.params.preserveState=e.resolvePreserveOption(this.params.preserveState,t)}runCallbacks(){this.callbacks.forEach(({name:e,args:t})=>{this.params[e](...t)})}merge(e){this.params={...this.params,...e}}wrapCallback(e,t){return(...n)=>{this.recordCallback(t,n),e[t](...n)}}recordCallback(e,t){this.callbacks.push({name:e,args:t})}static resolvePreserveOption(e,t){return typeof e==`function`?e(t):e===`errors`?Object.keys(t.props.errors||{}).length>0:e}},wh={createIframeAndPage(e){typeof e==`object`&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.
${JSON.stringify(e)}`);let t=document.createElement(`html`);t.innerHTML=e,t.querySelectorAll(`a`).forEach(e=>e.setAttribute(`target`,`_top`));let n=document.createElement(`iframe`);return n.style.backgroundColor=`white`,n.style.borderRadius=`5px`,n.style.width=`100%`,n.style.height=`100%`,{iframe:n,page:t}},show(e){let{iframe:t,page:n}=this.createIframeAndPage(e);t.style.boxSizing=`border-box`,t.style.display=`block`;let r=document.createElement(`dialog`);r.id=`inertia-error-dialog`,Object.assign(r.style,{width:`calc(100vw - 100px)`,height:`calc(100vh - 100px)`,padding:`0`,margin:`auto`,border:`none`,backgroundColor:`transparent`});let i=document.createElement(`style`);if(i.textContent=` + `]}constructor(){super(),this.autocorrect=!1}firstUpdated(e){super.firstUpdated(e),this._inputNode?.setAttribute(`autocapitalize`,`off`)}};customElements.get(`craft-input-handle`)||customElements.define(`craft-input-handle`,kd),us();var Ad={Á:`A`,á:`a`,Ä:`A`,ä:`a`,À:`A`,à:`a`,Â:`A`,â:`a`,É:`E`,é:`e`,Ë:`E`,ë:`e`,È:`E`,è:`e`,Ê:`E`,ê:`e`,Í:`I`,í:`i`,Ï:`I`,ï:`i`,Ì:`I`,ì:`i`,Î:`I`,î:`i`,Ó:`O`,ó:`o`,Ö:`O`,ö:`o`,Ò:`O`,ò:`o`,Ô:`O`,ô:`o`,Ú:`U`,ú:`u`,Ü:`U`,ü:`u`,Ù:`U`,ù:`u`,Û:`U`,û:`u`,Ý:`Y`,ý:`y`,Ÿ:`Y`,А:`A`,Б:`B`,В:`V`,Г:`G`,Д:`D`,Ѓ:`Gj`,Е:`E`,Ж:`Z`,З:`Z`,Ѕ:`Dz`,И:`I`,Ј:`j`,К:`K`,Л:`L`,Љ:`Lj`,М:`M`,Н:`N`,Њ:`Nj`,О:`O`,П:`P`,Р:`R`,С:`S`,Т:`T`,Ќ:`Kj`,У:`U`,Ф:`F`,Х:`X`,Ц:`C`,Ч:`C`,Џ:`Dz`,Ш:`S`,а:`a`,б:`b`,в:`v`,г:`g`,д:`d`,ѓ:`gj`,е:`e`,ж:`z`,з:`z`,ѕ:`dz`,и:`i`,ј:`j`,к:`k`,л:`l`,љ:`lj`,м:`m`,н:`n`,њ:`nj`,о:`o`,п:`p`,р:`r`,с:`s`,т:`t`,ќ:`kj`,у:`u`,ф:`f`,х:`x`,ц:`c`,ч:`c`,џ:`dz`,ш:`s`,æ:`ae`,ǽ:`ae`,Ã:`A`,Å:`A`,Ǻ:`A`,Ă:`A`,Ǎ:`A`,Æ:`AE`,Ǽ:`AE`,ã:`a`,å:`a`,ǻ:`a`,ă:`a`,ǎ:`a`,ª:`a`,Ĉ:`C`,Ċ:`C`,Ç:`C`,ç:`c`,ĉ:`c`,ċ:`c`,Ð:`D`,Đ:`D`,ð:`d`,đ:`d`,Ĕ:`E`,Ė:`E`,ĕ:`e`,ė:`e`,ƒ:`f`,Ĝ:`G`,Ġ:`G`,ĝ:`g`,ġ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ĭ:`I`,Ǐ:`I`,Į:`I`,IJ:`IJ`,ĩ:`i`,ĭ:`i`,ǐ:`i`,į:`i`,ij:`ij`,Ĵ:`J`,ĵ:`j`,Ĺ:`L`,Ľ:`L`,Ŀ:`L`,ĺ:`l`,ľ:`l`,ŀ:`l`,Ñ:`N`,ñ:`n`,ʼn:`n`,Õ:`O`,Ō:`O`,Ŏ:`O`,Ǒ:`O`,Ő:`O`,Ơ:`O`,Ø:`O`,Ǿ:`O`,Œ:`OE`,õ:`o`,ō:`o`,ŏ:`o`,ǒ:`o`,ő:`o`,ơ:`o`,ø:`o`,ǿ:`o`,º:`o`,œ:`oe`,Ŕ:`R`,Ŗ:`R`,ŕ:`r`,ŗ:`r`,Ŝ:`S`,Ș:`S`,ŝ:`s`,ș:`s`,ſ:`s`,Ţ:`T`,Ț:`T`,Ŧ:`T`,Þ:`TH`,ţ:`t`,ț:`t`,ŧ:`t`,þ:`th`,Ũ:`U`,Ŭ:`U`,Ű:`U`,Ų:`U`,Ư:`U`,Ǔ:`U`,Ǖ:`U`,Ǘ:`U`,Ǚ:`U`,Ǜ:`U`,ũ:`u`,ŭ:`u`,ű:`u`,ų:`u`,ư:`u`,ǔ:`u`,ǖ:`u`,ǘ:`u`,ǚ:`u`,ǜ:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ÿ:`y`,ŷ:`y`,ΑΥ:`AU`,ΑΎ:`AU`,Αυ:`Au`,Αύ:`Au`,ΕΊ:`I`,ΕΙ:`I`,Ει:`Ei`,ΕΥ:`EF`,ΕΎ:`EU`,Εί:`I`,Ευ:`Ef`,Εύ:`Eu`,ΟΙ:`I`,ΟΊ:`I`,ΟΥ:`U`,ΟΎ:`OU`,Οι:`Oi`,Οί:`I`,Ου:`Oy`,Ού:`Ou`,ΥΙ:`I`,ΎΙ:`I`,Υι:`Yi`,Ύι:`I`,ΥΊ:`I`,Υί:`I`,αυ:`au`,αύ:`au`,εί:`i`,ει:`ei`,ευ:`ef`,εύ:`eu`,οι:`oi`,οί:`i`,ου:`oy`,ού:`ou`,υι:`yi`,ύι:`i`,υί:`i`,Α:`A`,Ά:`A`,Β:`B`,Δ:`D`,Ε:`E`,Έ:`E`,Φ:`F`,Γ:`G`,Η:`H`,Ή:`I`,Ι:`I`,Ί:`I`,Ϊ:`I`,Κ:`K`,Ξ:`Ks`,Λ:`L`,Μ:`M`,Ν:`N`,Π:`P`,Ο:`O`,Ό:`O`,Ψ:`Ps`,Ρ:`R`,Σ:`S`,Τ:`T`,Θ:`Th`,Ω:`O`,Ώ:`W`,Χ:`X`,ϒ:`Y`,Υ:`Y`,Ύ:`Y`,Ϋ:`Y`,Ζ:`Z`,α:`a`,ά:`a`,β:`v`,δ:`d`,ε:`e`,έ:`e`,φ:`f`,γ:`gh`,η:`i`,ή:`i`,ι:`i`,ί:`i`,ϊ:`i`,ΐ:`i`,κ:`k`,ξ:`ks`,λ:`l`,μ:`m`,ν:`n`,ο:`o`,ό:`o`,π:`p`,ψ:`ps`,ρ:`r`,σ:`s`,ς:`s`,τ:`t`,ϑ:`th`,θ:`th`,ϐ:`v`,ω:`o`,ώ:`w`,χ:`kh`,υ:`i`,ύ:`y`,ΰ:`y`,ϋ:`y`,ζ:`z`,अ:`a`,आ:`aa`,ए:`e`,ई:`ii`,ऍ:`ei`,ऎ:`ae`,ऐ:`ai`,इ:`i`,ओ:`o`,ऑ:`oi`,ऒ:`oii`,ऊ:`uu`,औ:`ou`,उ:`u`,ब:`B`,भ:`Bha`,च:`Ca`,छ:`Chha`,ड:`Da`,ढ:`Dha`,फ:`Fa`,फ़:`Fi`,ग:`Ga`,घ:`Gha`,ग़:`Ghi`,ह:`Ha`,ज:`Ja`,झ:`Jha`,क:`Ka`,ख:`Kha`,ख़:`Khi`,ल:`L`,ळ:`Li`,ऌ:`Li`,ऴ:`Lii`,ॡ:`Lii`,म:`Ma`,न:`Na`,ङ:`Na`,ञ:`Nia`,ण:`Nae`,ऩ:`Ni`,ॐ:`oms`,प:`Pa`,क़:`Qi`,र:`Ra`,ऋ:`Ri`,ॠ:`Ri`,ऱ:`Ri`,स:`Sa`,श:`Sha`,ष:`Shha`,ट:`Ta`,त:`Ta`,ठ:`Tha`,द:`Tha`,थ:`Tha`,ध:`Thha`,ड़:`ugDha`,ढ़:`ugDhha`,व:`Va`,य:`Ya`,य़:`Yi`,ज़:`Za`,Ա:`A`,Բ:`B`,Գ:`G`,Դ:`D`,Ե:`E`,Զ:`Z`,Է:`E`,Ը:`Y`,Թ:`Th`,Ժ:`Zh`,Ի:`I`,Լ:`L`,Խ:`Kh`,Ծ:`Ts`,Կ:`K`,Հ:`H`,Ձ:`Dz`,Ղ:`Gh`,Ճ:`Tch`,Մ:`M`,Յ:`Y`,Ն:`N`,Շ:`Sh`,Ո:`Vo`,Չ:`Ch`,Պ:`P`,Ջ:`J`,Ռ:`R`,Ս:`S`,Վ:`V`,Տ:`T`,Ր:`R`,Ց:`C`,Ւ:`u`,Փ:`Ph`,Ք:`Q`,և:`ev`,Օ:`O`,Ֆ:`F`,ա:`a`,բ:`b`,գ:`g`,դ:`d`,ե:`e`,զ:`z`,է:`e`,ը:`y`,թ:`th`,ժ:`zh`,ի:`i`,լ:`l`,խ:`kh`,ծ:`ts`,կ:`k`,հ:`h`,ձ:`dz`,ղ:`gh`,ճ:`tch`,մ:`m`,յ:`y`,ն:`n`,շ:`sh`,ո:`vo`,չ:`ch`,պ:`p`,ջ:`j`,ռ:`r`,ս:`s`,վ:`v`,տ:`t`,ր:`r`,ց:`c`,ւ:`u`,փ:`ph`,ք:`q`,օ:`o`,ֆ:`f`,Ž:`Z`,Ň:`N`,Ş:`S`,ž:`z`,ň:`n`,ş:`s`,ı:`i`,İ:`I`,ğ:`g`,Ğ:`G`,ьо:`yo`,Й:`i`,Щ:`Shh`,Ъ:`Ie`,Ь:``,Ю:`Iu`,Я:`Ia`,й:`i`,щ:`shh`,ъ:`ie`,ь:``,ю:`iu`,я:`ia`,Ē:`E`,ē:`e`,န်ုပ်:`nub`,"ောင်":`aung`,"ိုက်":`aik`,"ိုဒ်":`ok`,"ိုင်":`aing`,"ိုလ်":`ol`,"ေါင်":`aung`,သြော:`aw`,"ောက်":`auk`,"ိတ်":`eik`,"ုတ်":`ok`,"ုန်":`on`,"ေတ်":`it`,"ုဒ်":`ait`,"ာန်":`an`,"ိန်":`ein`,"ွတ်":`ut`,"ေါ်":`aw`,"ွန်":`un`,"ိပ်":`eik`,"ုပ်":`ok`,"ွပ်":`ut`,"ိမ်":`ein`,"ုမ်":`on`,"ော်":`aw`,"ွမ်":`un`,က်:`et`,"ေါ":`aw`,"ော":`aw`,"ျွ":`ywa`,"ြွ":`yw`,"ို":`o`,"ုံ":`on`,တ်:`at`,င်:`in`,ည်:`i`,ဒ်:`d`,န်:`an`,ပ်:`at`,မ်:`an`,စျ:`za`,ယ်:`e`,ဉ်:`in`,စ်:`it`,"ိံ":`ein`,"ဲ":`e`,"း":``,"ာ":`a`,"ါ":`a`,"ေ":`e`,"ံ":`an`,"ိ":`i`,"ီ":`i`,"ု":`u`,"ူ":`u`,"်":`at`,"္":``,"့":``,က:`k`,"၉":`9`,တ:`t`,ရ:`ya`,ယ:`y`,မ:`m`,ဘ:`ba`,ဗ:`b`,ဖ:`pa`,ပ:`p`,န:`n`,ဓ:`da`,ဒ:`d`,ထ:`ta`,ဏ:`na`,ဝ:`w`,ဎ:`da`,ဍ:`d`,ဌ:`ta`,ဋ:`t`,ည:`ny`,ဇ:`z`,ဆ:`sa`,စ:`s`,င:`ng`,ဃ:`ga`,ဂ:`g`,လ:`l`,သ:`th`,"၈":`8`,ဩ:`aw`,ခ:`kh`,"၆":`6`,"၅":`5`,"၄":`4`,"၃":`3`,"၂":`2`,"၁":`1`,"၀":`0`,"၌":`hnaik`,"၍":`ywae`,ဪ:`aw`,ဦ:`-u`,ဟ:`h`,ဉ:`u`,ဤ:`-i`,ဣ:`i`,"၏":`-e`,ဧ:`e`,"ှ":`h`,"ွ":`w`,"ျ":`ya`,"ြ":`y`,အ:`a`,ဠ:`la`,"၇":`7`,DŽ:`DZ`,Dž:`Dz`,dž:`dz`,DZ:`DZ`,Dz:`Dz`,dz:`dz`,LJ:`LJ`,Lj:`Lj`,lj:`lj`,NJ:`NJ`,Nj:`Nj`,nj:`nj`,č:`c`,Č:`C`,ć:`c`,Ć:`C`,š:`s`,Š:`S`,ა:`a`,ბ:`b`,გ:`g`,დ:`d`,ე:`e`,ვ:`v`,ზ:`z`,თ:`t`,ი:`i`,კ:`k`,ლ:`l`,მ:`m`,ნ:`n`,ო:`o`,პ:`p`,ჟ:`zh`,რ:`r`,ს:`s`,ტ:`t`,უ:`u`,ფ:`f`,ქ:`q`,ღ:`gh`,ყ:`y`,შ:`sh`,ჩ:`ch`,ც:`ts`,ძ:`dz`,წ:`ts`,ჭ:`ch`,ხ:`kh`,ჯ:`j`,ჰ:`h`,Ё:`E`,ё:`e`,Ы:`Y`,ы:`y`,Э:`E`,э:`e`,І:`I`,і:`i`,Ѳ:`F`,ѳ:`f`,Ѣ:`E`,ѣ:`e`,Ѵ:`I`,ѵ:`i`,Є:`Je`,є:`je`,Ѥ:`Je`,ѥ:`je`,Ꙋ:`U`,ꙋ:`u`,Ѡ:`O`,ѡ:`o`,Ѿ:`Ot`,ѿ:`ot`,Ѫ:`U`,ѫ:`u`,Ѧ:`Ja`,ѧ:`ja`,Ѭ:`Ju`,ѭ:`ju`,Ѩ:`Ja`,ѩ:`Ja`,Ѯ:`Ks`,ѯ:`ks`,Ѱ:`Ps`,ѱ:`ps`,Ґ:`G`,ґ:`g`,Ї:`Yi`,ї:`yi`,Ә:`A`,Ғ:`G`,Қ:`Q`,Ң:`N`,Ө:`O`,Ұ:`U`,Ү:`U`,Һ:`H`,ә:`a`,ғ:`g`,қ:`q`,ң:`n`,ө:`o`,ұ:`u`,ү:`u`,һ:`h`,ď:`d`,Ď:`D`,ě:`e`,Ě:`E`,ř:`r`,Ř:`R`,ť:`t`,Ť:`T`,ů:`u`,Ů:`U`,ą:`a`,ę:`e`,ł:`l`,ń:`n`,ś:`s`,ź:`z`,ż:`z`,Ą:`A`,Ę:`E`,Ł:`L`,Ń:`N`,Ś:`S`,Ź:`Z`,Ż:`Z`,ā:`a`,ģ:`g`,ī:`i`,ķ:`k`,ļ:`l`,ņ:`n`,ū:`u`,Ā:`A`,Ģ:`G`,Ī:`I`,Ķ:`k`,Ļ:`L`,Ņ:`N`,Ū:`U`,Ả:`A`,Ạ:`A`,Ắ:`A`,Ằ:`A`,Ẳ:`A`,Ẵ:`A`,Ặ:`A`,Ấ:`A`,Ầ:`A`,Ẩ:`A`,Ẫ:`A`,Ậ:`A`,ả:`a`,ạ:`a`,ắ:`a`,ằ:`a`,ẳ:`a`,ẵ:`a`,ặ:`a`,ấ:`a`,ầ:`a`,ẩ:`a`,ẫ:`a`,ậ:`a`,Ẻ:`E`,Ẽ:`E`,Ẹ:`E`,Ế:`E`,Ề:`E`,Ể:`E`,Ễ:`E`,Ệ:`E`,ẻ:`e`,ẽ:`e`,ẹ:`e`,ế:`e`,ề:`e`,ể:`e`,ễ:`e`,ệ:`e`,Ỉ:`I`,Ị:`I`,ỉ:`i`,ị:`i`,Ỏ:`O`,Ọ:`O`,Ố:`O`,Ồ:`O`,Ổ:`O`,Ỗ:`O`,Ộ:`O`,Ớ:`O`,Ờ:`O`,Ở:`O`,Ỡ:`O`,Ợ:`O`,ỏ:`o`,ọ:`o`,ố:`o`,ồ:`o`,ổ:`o`,ỗ:`o`,ộ:`o`,ớ:`o`,ờ:`o`,ở:`o`,ỡ:`o`,ợ:`o`,Ủ:`U`,Ụ:`U`,Ứ:`U`,Ừ:`U`,Ử:`U`,Ữ:`U`,Ự:`U`,ủ:`u`,ụ:`u`,ứ:`u`,ừ:`u`,ử:`u`,ữ:`u`,ự:`u`,Ỳ:`Y`,Ỷ:`Y`,Ỹ:`Y`,Ỵ:`Y`,ỳ:`y`,ỷ:`y`,ỹ:`y`,ỵ:`y`,ا:`a`,ب:`b`,پ:`p`,ت:`t`,ث:`th`,ج:`g`,چ:`ch`,ح:`h`,خ:`kh`,د:`d`,ذ:`th`,ر:`r`,ز:`z`,س:`s`,ش:`sh`,ص:`s`,ض:`d`,ط:`t`,ظ:`th`,ع:`aa`,غ:`gh`,ف:`f`,ق:`k`,ک:`k`,گ:`g`,ل:`l`,ژ:`zh`,ك:`k`,م:`m`,ن:`n`,ه:`h`,و:`o`,ی:`y`,آ:`a`,"٠":`0`,"١":`1`,"٢":`2`,"٣":`3`,"٤":`4`,"٥":`5`,"٦":`6`,"٧":`7`,"٨":`8`,"٩":`9`,أ:`a`,ي:`y`,إ:`a`,ؤ:`o`,ئ:`y`,ء:`aa`,ђ:`dj`,ћ:`c`,Ђ:`Dj`,Ћ:`C`,ə:`e`,Ə:`E`,ß:`ss`,ẞ:`SS`,ভ্ল:`vl`,পশ:`psh`,ব্ধ:`bdh`,ব্জ:`bj`,ব্দ:`bd`,ব্ব:`bb`,ব্ল:`bl`,ভ:`v`,ব:`b`,চ্ঞ:`cNG`,চ্ছ:`cch`,চ্চ:`cc`,ছ:`ch`,চ:`c`,ধ্ন:`dhn`,ধ্ম:`dhm`,দ্ঘ:`dgh`,দ্ধ:`ddh`,দ্ভ:`dv`,দ্ম:`dm`,ড্ড:`DD`,ঢ:`Dh`,ধ:`dh`,দ্গ:`dg`,দ্দ:`dd`,ড:`D`,দ:`d`,"।":`.`,ঘ্ন:`Ghn`,গ্ধ:`Gdh`,গ্ণ:`GN`,গ্ন:`Gn`,গ্ম:`Gm`,গ্ল:`Gl`,জ্ঞ:`jNG`,ঘ:`Gh`,গ:`g`,হ্ণ:`hN`,হ্ন:`hn`,হ্ম:`hm`,হ্ল:`hl`,হ:`h`,জ্ঝ:`jjh`,ঝ:`jh`,জ্জ:`jj`,জ:`j`,ক্ষ্ণ:`kxN`,ক্ষ্ম:`kxm`,ক্ষ:`ksh`,কশ:`ksh`,ক্ক:`kk`,ক্ট:`kT`,ক্ত:`kt`,ক্ল:`kl`,ক্স:`ks`,খ:`kh`,ক:`k`,ল্ভ:`lv`,ল্ধ:`ldh`,লখ:`lkh`,লঘ:`lgh`,লফ:`lph`,ল্ক:`lk`,ল্গ:`lg`,ল্ট:`lT`,ল্ড:`lD`,ল্প:`lp`,ল্ম:`lm`,ল্ল:`ll`,ল্ব:`lb`,ল:`l`,ম্থ:`mth`,ম্ফ:`mf`,ম্ভ:`mv`,মপ্ল:`mpl`,ম্ন:`mn`,ম্প:`mp`,ম্ম:`mm`,ম্ল:`ml`,ম্ব:`mb`,ম:`m`,"০":`0`,"১":`1`,"২":`2`,"৩":`3`,"৪":`4`,"৫":`5`,"৬":`6`,"৭":`7`,"৮":`8`,"৯":`9`,ঙ্ক্ষ:`Ngkx`,ঞ্ছ:`nch`,ঙ্ঘ:`ngh`,ঙ্খ:`nkh`,ঞ্ঝ:`njh`,ঙ্গৌ:`ngOU`,ঙ্গৈ:`ngOI`,ঞ্চ:`nc`,ঙ্ক:`nk`,ঙ্ষ:`Ngx`,ঙ্গ:`ngo`,ঙ্ম:`Ngm`,ঞ্জ:`nj`,ন্ধ:`ndh`,ন্ঠ:`nTh`,ণ্ঠ:`NTh`,ন্থ:`nth`,ঙ্গা:`nga`,ঙ্গি:`ngi`,ঙ্গী:`ngI`,ঙ্গু:`ngu`,ঙ্গূ:`ngU`,ঙ্গে:`nge`,ঙ্গো:`ngO`,ণ্ঢ:`NDh`,নশ:`nsh`,ঙর:`Ngr`,ঞর:`NGr`,"ংর":`ngr`,ঙ:`Ng`,ঞ:`NG`,"ং":`ng`,ন্ন:`nn`,ণ্ণ:`NN`,ণ্ন:`Nn`,ন্ম:`nm`,ণ্ম:`Nm`,ন্দ:`nd`,ন্ট:`nT`,ণ্ট:`NT`,ন্ড:`nD`,ণ্ড:`ND`,ন্ত:`nt`,ন্স:`ns`,ন:`n`,ণ:`N`,"ৈ":`OI`,"ৌ":`OU`,"ো":`O`,ঐ:`OI`,ঔ:`OU`,অ:`o`,ও:`oo`,ফ্ল:`fl`,প্ট:`pT`,প্ত:`pt`,প্ন:`pn`,প্প:`pp`,প্ল:`pl`,প্স:`ps`,ফ:`f`,প:`p`,"ৃ":`rri`,ঋ:`rri`,রর‍্য:`rry`,"্র্য":`ry`,"্রর":`rr`,ড়্গ:`Rg`,ঢ়:`Rh`,ড়:`R`,র:`r`,"্র":`r`,শ্ছ:`Sch`,ষ্ঠ:`ShTh`,ষ্ফ:`Shf`,স্ক্ল:`skl`,স্খ:`skh`,স্থ:`sth`,স্ফ:`sf`,শ্চ:`Sc`,শ্ত:`St`,শ্ন:`Sn`,শ্ম:`Sm`,শ্ল:`Sl`,ষ্ক:`Shk`,ষ্ট:`ShT`,ষ্ণ:`ShN`,ষ্প:`Shp`,ষ্ম:`Shm`,স্প্ল:`spl`,স্ক:`sk`,স্ট:`sT`,স্ত:`st`,স্ন:`sn`,স্প:`sp`,স্ম:`sm`,স্ল:`sl`,শ:`S`,ষ:`Sh`,স:`s`,"ু":`u`,উ:`u`,অ্য:`oZ`,ত্থ:`tth`,ৎ:`tt`,ট্ট:`TT`,ট্ম:`Tm`,ঠ:`Th`,ত্ন:`tn`,ত্ম:`tm`,থ:`th`,ত্ত:`tt`,ট:`T`,ত:`t`,অ্যা:`AZ`,"া":`a`,আ:`a`,য়া:`ya`,য়:`y`,"ি":`i`,ই:`i`,"ী":`ee`,ঈ:`ee`,"ূ":`uu`,ঊ:`uu`,"ে":`e`,এ:`e`,য:`z`,"্য":`Z`,ইয়:`y`,ওয়:`w`,"্ব":`w`,এক্স:`x`,"ঃ":`:`,"ঁ":`nn`,"্‌":``,"˚":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,"௦":`0`,"௧":`1`,"௨":`2`,"௩":`3`,"௪":`4`,"௫":`5`,"௬":`6`,"௭":`7`,"௮":`8`,"௯":`9`,"௰":`10`,"௱":`100`,"௲":`1000`,Ꜳ:`AA`,ꜳ:`aa`,Ꜵ:`AO`,ꜵ:`ao`,Ꜷ:`AU`,ꜷ:`au`,Ꜹ:`AV`,ꜹ:`av`,Ꜻ:`av`,ꜻ:`av`,Ꜽ:`AY`,ꜽ:`ay`,ȸ:`db`,ʣ:`dz`,ʥ:`dz`,ʤ:`dezh`,"🙰":`et`,ff:`ff`,ffi:`ffi`,ffl:`ffl`,fi:`fi`,fl:`fl`,ʩ:`feng`,ʪ:`ls`,ʫ:`lz`,ɮ:`lezh`,ȹ:`qp`,ʨ:`tc`,ʦ:`ts`,ʧ:`tesh`,Ꝏ:`OO`,ꝏ:`oo`,st:`st`,ſt:`st`,Ꜩ:`TZ`,ꜩ:`tz`,ᵫ:`ue`,Aι:`Ai`,αι:`ai`,ἀ:`a`,ἁ:`a`,ἂ:`a`,ἃ:`a`,ἄ:`a`,ἅ:`a`,ἆ:`a`,ἇ:`a`,Ἀ:`A`,Ἁ:`A`,Ἂ:`A`,Ἃ:`A`,Ἄ:`A`,Ἅ:`A`,Ἆ:`A`,Ἇ:`A`,ᾰ:`a`,ᾱ:`a`,ᾲ:`a`,ᾳ:`a`,ᾴ:`a`,ᾶ:`a`,ᾷ:`a`,Ᾰ:`A`,Ᾱ:`A`,Ὰ:`A`,Ά:`A`,ᾼ:`A`,A̧:`A`,a̧:`a`,Ⱥ:`A`,ⱥ:`a`,Ȧ:`A`,ȧ:`a`,Ɓ:`B`,C̈:`C`,c̈:`c`,C̨:`C`,c̨:`c`,Ȼ:`C`,ȼ:`c`,C̀:`C`,c̀:`c`,C̣:`C`,c̣:`c`,C̄:`C`,c̄:`c`,C̃:`C`,c̃:`c`,Ȩ:`E`,ȩ:`e`,Ɇ:`E`,ɇ:`e`,I̧:`I`,i̧:`i`,Ɨ:`I`,ɨ:`i`,i:`i`,J́́:`J`,j́:`j`,J̀̀:`J`,j̀:`j`,J̈:`J`,j̈:`j`,J̧:`J`,j̧:`j`,J̨:`J`,j̨:`j`,Ɉ:`J`,ɉ:`j`,J̌:`J`,ǰ:`j`,J̇:`J`,j:`j`,J̣:`J`,j̣:`j`,J̄:`J`,j̄:`j`,J̃:`J`,j̃:`j`,ĸ:`k`,L̀:`L`,l̀:`l`,L̂:`L`,l̂:`l`,L̈:`L`,l̈:`l`,L̨:`L`,l̨:`l`,Ƚ:`L`,ƚ:`l`,L̇:`L`,l̇:`l`,Ḷ:`L`,ḷ:`l`,L̄:`L`,l̄:`l`,L̃:`L`,l̃:`l`,Ŋ:`N`,ŋ:`n`,Ǹ:`N`,ǹ:`n`,N̂:`N`,n̂:`n`,N̈:`N`,n̈:`n`,N̨:`N`,n̨:`n`,Ꞥ:`N`,ꞥ:`n`,Ṅ:`N`,ṅ:`n`,Ṇ:`N`,ṇ:`n`,N̄:`N`,n̄:`n`,O̧:`O`,o̧:`o`,Ǫ:`O`,ǫ:`o`,Ɵ:`O`,ɵ:`o`,Ȯ:`O`,ȯ:`o`,S̀:`S`,s̀:`s`,Ŝ̀:`S`,S̈:`S`,s̈:`s`,S̨:`S`,s̨:`s`,Ꞩ:`S`,ꞩ:`s`,Ṡ:`S`,ṡ:`s`,Ṣ:`S`,ṣ:`s`,S̄:`S`,s̄:`s`,S̃:`S`,s̃:`s`,T́:`T`,t́:`t`,T̀:`T`,t̀:`t`,T̂:`T`,t̂:`t`,T̈:`T`,ẗ:`t`,T̨:`T`,t̨:`t`,Ⱦ:`T`,ⱦ:`t`,Ṫ:`T`,ṫ:`t`,Ṭ:`T`,ṭ:`t`,T̄:`T`,t̄:`t`,T̃:`T`,t̃:`t`,U̧:`U`,u̧:`u`,Ʉ:`U`,ʉ:`u`,U̇:`U`,u̇:`u`,Ʊ:`U`,ʊ:`u`,Ẁ:`W`,ẁ:`w`,Ẃ:`W`,ẃ:`w`,Ẅ:`W`,ẅ:`w`,Ꙗ:`Ja`,ꙗ:`ja`,Y̧:`Y`,y̧:`y`,Y̨:`Y`,y̨:`y`,Ɏ:`Y`,ɏ:`y`,Y̌:`Y`,y̌:`y`,Ẏ:`Y`,ẏ:`y`,Ȳ:`Y`,ȳ:`y`,Z̀:`Z`,z̀:`z`,Ẑ:`Z`,ẑ:`z`,Z̈:`Z`,z̈:`z`,Z̧:`Z`,z̧:`z`,Z̨:`Z`,z̨:`z`,Ƶ:`Z`,ƶ:`z`,Ẓ:`Z`,ẓ:`z`,Z̄:`Z`,z̄:`z`,Z̃:`Z`,z̃:`z`,"\xA0":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `," ":` `,"\u2028":` `,"\u2029":` `,"​":` `," ":` `," ":` `," ":` `,ᅠ:` `,"«":`<<`,"»":`>>`,"‘":`'`,"’":`'`,"‚":`'`,"‛":`'`,"“":`"`,"”":`"`,"„":`"`,"‟":`"`,"‹":`'`,"›":`'`,"–":`-`,"—":`-`,"…":`...`,"€":`EUR`,$:`$`,"₢":`Cr`,"₣":`Fr.`,"£":`PS`,"₤":`L.`,ℳ:`M`,"₥":`mil`,"₦":`N`,"₧":`Pts`,"₨":`Rs`,රු:`LKR`,ரூ:`LKR`,"௹":`Rs`,रू:`NPR`,"₹":`Rs`,"૱":`Rs`,"₩":`W`,"₪":`NS`,"₸":`KZT`,"₫":`D`,"֏":`AMD`,"₭":`K`,"₺":`TL`,"₼":`AZN`,"₮":`T`,"₯":`Dr`,"₲":`PYG`,"₾":`GEL`,"₳":`ARA`,"₴":`UAH`,"₽":`RUB`,"₵":`GHS`,"₡":`CL`,"¢":`c`,"¥":`YEN`,円:`JPY`,"৳":`BDT`,元:`CNY`,"﷼":`SAR`,"៛":`KR`,"₠":`ECU`,"¤":`$?`,"฿":`THB`,"؋":`AFN`};function jd(e,t=Ad){e=e.normalize(`NFC`);let n=``,r;for(let i=0;i/g,``);r=r.replace(/['"‘’“”ʻ\[\]\(\)\{\}:]/g,``),r=r.toLowerCase(),r=jd(r),n.allowNonAlphaStart||(r=r.replace(/^[^a-z]+/,``));let i=r.split(/[^a-z0-9]+/).filter(Boolean);if(r=``,n.handleCasing===`snake`)return i.join(`_`);for(let e=0;e/g,``);return t=t.toLowerCase(),t=jd(t),t=t.replace(/^[^a-z]+/,``),t=t.replace(/[^a-z0-9]+$/,``),t.split(/[^a-z0-9]+/).filter(Boolean).join(`-`)}function Fd(e){return typeof e==`symbol`||e instanceof Symbol}var Id=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function Ld(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Rd(){}function zd(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function Bd(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Vd(e){if(zd(e))return e;if(Array.isArray(e)||Bd(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Hd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ud(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Wd=`[object RegExp]`,Gd=`[object String]`,Kd=`[object Number]`,qd=`[object Boolean]`,Jd=`[object Arguments]`,Yd=`[object Symbol]`,Xd=`[object Date]`,Zd=`[object Map]`,Qd=`[object Set]`,$d=`[object Array]`,ef=`[object Function]`,tf=`[object ArrayBuffer]`,nf=`[object Object]`,rf=`[object Error]`,af=`[object DataView]`,of=`[object Uint8Array]`,sf=`[object Uint8ClampedArray]`,cf=`[object Uint16Array]`,lf=`[object Uint32Array]`,uf=`[object BigUint64Array]`,df=`[object Int8Array]`,ff=`[object Int16Array]`,pf=`[object Int32Array]`,mf=`[object BigInt64Array]`,hf=`[object Float32Array]`,gf=`[object Float64Array]`;function _f(e){return Id.Buffer!==void 0&&Id.Buffer.isBuffer(e)}function vf(e,t){return yf(e,void 0,e,new Map,t)}function yf(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(zd(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;aDf(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case $d:case of:case sf:case cf:case lf:case uf:case df:case ff:case pf:case mf:case hf:case gf:if(_f(e)!==_f(t)||e.length!==t.length)return!1;for(let i=0;i=0}var jf={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Mf(e){return e.replace(/[&<>"']/g,e=>jf[e])}function Nf(e){return e!=null&&typeof e!=`function`&&Af(e.length)}function Pf(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function Ff(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function If(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(If).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Lf(e){if(Array.isArray(e))return e.map(Ff);if(typeof e==`symbol`)return[e];e=If(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(Ud(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),bf(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Kd:case Gd:case qd:{let t=new e.constructor(e?.valueOf());return bf(t,e),t}case Jd:{let t={};return bf(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Hf(e){return Vf(e)}var Uf=/^(?:0|[1-9]\d*)$/;function Wf(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{let r=e[t];(!(Object.hasOwn(e,t)&&Tf(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function $f(e,t,n,r){if(e==null&&!Bf(e))return e;let i;i=Zf(t,e)?[t]:Array.isArray(t)?t:Lf(t);let a=n(Rf(e,i)),o=e;for(let t=0;tn,()=>void 0)}function tp(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Ld(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function np(e){return Bd(e)}function rp(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;etypeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0,cp=e=>e instanceof FormData?!0:sp(e)||typeof e==`object`&&!!e&&Object.values(e).some(e=>cp(e)),lp=class extends Error{response;constructor(e){super(`HTTP error ${e.status}`),this.name=`HttpResponseError`,this.response=e}},up=class extends Error{constructor(e=`Request was cancelled`){super(e),this.name=`HttpCancelledError`}},dp=class extends Error{constructor(e=`Network error`){super(e),this.name=`HttpNetworkError`}};function fp(e){let t=new URLSearchParams;return Object.entries(e).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(n=>t.append(`${e}[]`,String(n))):typeof n==`object`?t.append(e,JSON.stringify(n)):t.append(e,String(n)))}),t.toString()}function pp(e,t,n){if(t&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=t.replace(/\/$/,``)+`/`+e.replace(/^\//,``)),n&&Object.keys(n).length>0){let t=fp(n);t&&(e+=(e.includes(`?`)?`&`:`?`)+t)}return e}function mp(){return typeof window>`u`?null:window.axios?.defaults?.headers?.common?.[`X-Requested-With`]??null}function hp(e,t=new FormData,n=null){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&gp(t,n?`${n}[${r}]`:r,e[r]);return t}function gp(e,t,n){if(Array.isArray(n))return n.forEach((n,r)=>gp(e,`${t}[${r}]`,n));if(n instanceof Date)return e.append(t,n.toISOString());if(typeof File<`u`&&n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);hp(n,e,t)}function _p(e,t){if(e!=null)return e instanceof FormData?e:typeof e==`object`&&cp(e)?hp(e):typeof e==`object`||t[`Content-Type`]?.includes(`application/json`)?JSON.stringify(e):String(e)}function vp(e){let t={};return e.forEach((e,n)=>{t[n.toLowerCase()]=e}),t}function yp(e={}){let t=e.xsrfCookieName??`XSRF-TOKEN`,n=e.xsrfHeaderName??`X-XSRF-TOKEN`;function r(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(^|;\\s*)`+t+`=([^;]*)`));return e?decodeURIComponent(e[2]):null}return{setXsrfCookieName(e){t=e},setXsrfHeaderName(e){n=e},async request(e){let t=pp(e.url,e.baseURL,e.params),i=e.method.toUpperCase(),a={},o=mp();o&&(a[`X-Requested-With`]=o),e.data!==void 0&&![`GET`,`DELETE`].includes(i)&&!(e.data instanceof FormData)&&!cp(e.data)&&(a[`Content-Type`]=`application/json`),e.headers&&Object.entries(e.headers).forEach(([e,t])=>{t!==void 0&&(a[e]=String(t))});let s=r();s&&![`GET`,`HEAD`,`OPTIONS`].includes(i)&&(a[n]=s);let c=e.signal,l,u=e.timeout??3e4;if(u>0&&!c){let e=new AbortController;c=e.signal,l=setTimeout(()=>e.abort(),u)}let d=[`GET`,`DELETE`].includes(i)?void 0:_p(e.data,a);d instanceof FormData&&delete a[`Content-Type`];try{let n=await fetch(t,{method:i,headers:a,body:d,signal:c,credentials:e.credentials??`same-origin`});l&&clearTimeout(l);let r;r=n.headers.get(`content-type`)?.includes(`application/json`)?await n.json():await n.text();let o={status:n.status,data:r,headers:vp(n.headers)};if(!n.ok)throw new lp(o);return o}catch(e){throw l&&clearTimeout(l),e instanceof lp?e:e instanceof DOMException&&e.name===`AbortError`?new up:e instanceof TypeError?new dp(e.message):e}}}}var bp=yp(),xp=bp,Sp=void 0,wp=void 0,Tp=`same-origin`,Ep=e=>`${e.method}:${e.baseURL??Sp??``}${e.url}`,Dp=e=>e.status===204&&e.headers[`precognition-success`]===`true`,Op={},kp={get:(e,t={},n={})=>jp(Ap(`get`,e,t,n)),post:(e,t={},n={})=>jp(Ap(`post`,e,t,n)),patch:(e,t={},n={})=>jp(Ap(`patch`,e,t,n)),put:(e,t={},n={})=>jp(Ap(`put`,e,t,n)),delete:(e,t={},n={})=>jp(Ap(`delete`,e,t,n)),useHttpClient(e){return xp=e,kp},withBaseURL(e){return Sp=e,kp},withTimeout(e){return wp=e,kp},withCredentials(e){return Tp=typeof e==`string`?e:e?`include`:`omit`,kp},fingerprintRequestsUsing(e){return Ep=e===null?()=>null:e,kp},determineSuccessUsing(e){return Dp=e,kp},withXsrfCookieName(e){return bp.setXsrfCookieName(e),kp},withXsrfHeaderName(e){return bp.setXsrfHeaderName(e),kp}},Ap=(e,t,n,r)=>({url:t,method:e,...r,...[`get`,`delete`].includes(e)?{params:ap({},n,r?.params)}:{data:ap({},n,r?.data)}}),jp=(e={})=>{let t=[Mp,Pp,Fp].reduce((e,t)=>t(e),e);return(t.onBefore??(()=>!0))()===!1?Promise.resolve(null):((t.onStart??(()=>null))(),xp.request({method:t.method,url:t.url,baseURL:t.baseURL??Sp,data:t.data,params:t.params,headers:t.headers,signal:t.signal,timeout:t.timeout,credentials:Tp}).then(async e=>{t.precognitive&&Ip(e);let n=e.status,r=e;return t.precognitive&&t.onPrecognitionSuccess&&Dp(e)&&(r=await Promise.resolve(t.onPrecognitionSuccess(e)??r)),t.onSuccess&&Np(n)&&(r=await Promise.resolve(t.onSuccess(r)??r)),(Rp(t,n)??(e=>e))(r)??r},e=>{if(Lp(e))return Promise.reject(e);let n=e;return t.precognitive&&Ip(n.response),(Rp(t,n.response.status)??((e,t)=>Promise.reject(t)))(n.response,n)}).finally(t.onFinish??(()=>null)))},Mp=e=>{let t=e.only??e.validate;return{...e,timeout:e.timeout??wp,precognitive:e.precognitive!==!1,fingerprint:e.fingerprint===void 0?Ep(e,xp):e.fingerprint,headers:{...e.headers,Accept:`application/json`,"Content-Type":zp(e),...e.precognitive===!1?{}:{Precognition:!0},...t?{"Precognition-Validate-Only":Array.from(t).join()}:{}}}},Np=e=>e>=200&&e<300,Pp=e=>typeof e.fingerprint==`string`?(Op[e.fingerprint]?.abort(),delete Op[e.fingerprint],e):e,Fp=e=>typeof e.fingerprint!=`string`||e.signal||!e.precognitive?e:(Op[e.fingerprint]=new AbortController,{...e,signal:Op[e.fingerprint].signal}),Ip=e=>{if(e.headers?.precognition!==`true`)throw Error(`Did not receive a Precognition response. Ensure you have the Precognition middleware in place for the route.`)},Lp=e=>!(e instanceof lp)||typeof e.response?.status!=`number`,Rp=(e,t)=>({401:e.onUnauthorized,403:e.onForbidden,404:e.onNotFound,409:e.onConflict,422:e.onValidationError,423:e.onLocked})[t],zp=e=>e.headers?.[`Content-Type`]??e.headers?.[`Content-type`]??e.headers?.[`content-type`]??(cp(e.data)?`multipart/form-data`:`application/json`),Bp=(e,t)=>{if(!e.includes(`*`))return[e];let n=e.split(`.`),r=[``];for(let e of n)if(e===`*`){let e=[];for(let n of r){let r=n?Rf(t,n):t;if(Array.isArray(r))for(let t=0;tt?`${t}.${e}`:e);return r},Vp=(e,t)=>t.includes(`*`)?RegExp(`^`+t.replace(/\./g,`\\.`).replace(/\*/g,`[^.]+`)+`$`).test(e):e===t,Hp=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.some(t=>Vp(e,t)))),Up=(e,t={})=>{let n={errorsChanged:[],touchedChanged:[],validatingChanged:[],validatedChanged:[]},r=!1,i=!1,a=e=>e===i?[]:(i=e,n.validatingChanged),o=[],s=e=>{let t=[...new Set(e)];return o.length!==t.length||!t.every(e=>o.includes(e))?(o=t,n.validatedChanged):[]},c=()=>o.filter(e=>d[e]===void 0),l=[],u=e=>{let t=[...new Set(e)];return l.length!==t.length||!t.every(e=>l.includes(e))?(l=t,n.touchedChanged):[]},d={},f=e=>{let t=Gp(e);return kf(d,t)?[]:(d=t,n.errorsChanged)},p=e=>{let t={...d};return delete t[Kp(e)],f(t)},m=()=>Object.keys(d).length>0,h=1500,g=e=>{h=e,S.cancel(),S=x()},_=t,v=null,y=[],b=null,x=()=>tp(t=>{e({get:(e,n={},r={})=>kp.get(e,T(n),C(r,t,n)),post:(e,n={},r={})=>kp.post(e,T(n),C(r,t,n)),patch:(e,n={},r={})=>kp.patch(e,T(n),C(r,t,n)),put:(e,n={},r={})=>kp.put(e,T(n),C(r,t,n)),delete:(e,n={},r={})=>kp.delete(e,T(n),C(r,t,n))}).catch(e=>e instanceof up||e instanceof lp&&e.response?.status===422?null:Promise.reject(e))},h,{leading:!0,trailing:!0}),S=x(),C=(e,t,n={})=>{let r={...e,...t},i=Array.from(r.only??r.validate??l);return{...t,...ap({},e,t),only:i,timeout:r.timeout??5e3,onValidationError:(e,t)=>([...s([...o,...i]),...f(ap(Hp({...d},i),e.data.errors))].forEach(e=>e()),r.onValidationError?r.onValidationError(e,t):Promise.reject(t)),onSuccess:e=>(s([...o,...i]).forEach(e=>e()),r.onSuccess?r.onSuccess(e):e),onPrecognitionSuccess:e=>([...s([...o,...i]),...f(Hp({...d},i))].forEach(e=>e()),r.onPrecognitionSuccess?r.onPrecognitionSuccess(e):e),onBefore:()=>{let e=l.some(e=>e.includes(`*`)),t=e?[...new Set(l.flatMap(e=>Bp(e,n)))]:l;return r.onBeforeValidation&&r.onBeforeValidation({data:n,touched:t},{data:_,touched:y})===!1||(r.onBefore||(()=>!0))()===!1?!1:(e&&u(t).forEach(e=>e()),b=l,v=n,!0)},onStart:()=>{a(!0).forEach(e=>e()),(r.onStart??(()=>null))()},onFinish:()=>{a(!1).forEach(e=>e()),y=b,_=v,b=v=null,(r.onFinish??(()=>null))()}}},w=(e,t,n)=>{if(e===void 0){let e=Array.from(n?.only??n?.validate??[]);u([...l,...e]).forEach(e=>e()),S(n??{});return}if(sp(t)&&!r){console.warn(`Precognition file validation is not active. Call the "validateFiles" function on your form to enable it.`);return}e=Kp(e),(e.includes(`*`)||Rf(_,e)!==t)&&(u([e,...l]).forEach(e=>e()),S(n??{}))},T=e=>r===!1?qp(e):e,E={touched:()=>l,validate(e,t,n){return typeof e==`object`&&!(`target`in e)&&(n=e,e=t=void 0),w(e,t,n),E},touch(e){let t=Array.isArray(e)?e:[Kp(e)];return u([...l,...t]).forEach(e=>e()),E},validating:()=>i,valid:c,errors:()=>d,hasErrors:m,setErrors(e){return f(e).forEach(e=>e()),E},forgetError(e){return p(e).forEach(e=>e()),E},defaults(e){return t=e,_=e,E},reset(...e){if(e.length===0)u([]).forEach(e=>e());else{let n=[...l];e.forEach(e=>{n.includes(e)&&n.splice(n.indexOf(e),1),ep(_,e,Rf(t,e))}),u(n).forEach(e=>e())}return E},setTimeout(e){return g(e),E},on(e,t){return n[e].push(t),E},validateFiles(){return r=!0,E},withoutFileValidation(){return r=!1,E}};return E},Wp=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:Array.isArray(e[n])?e[n][0]:e[n]}),{}),Gp=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:typeof e[n]==`string`?[e[n]]:e[n]}),{}),Kp=e=>typeof e==`string`?e:e.target.name,qp=e=>{let t={...e};return Object.keys(t).forEach(e=>{let n=t[e];if(n!==null){if(sp(n)){delete t[e];return}if(Array.isArray(n)){t[e]=Object.values(qp({...n}));return}if(typeof n==`object`){t[e]=qp(t[e]);return}}}),t},Jp=new class{config={};defaults;constructor(e){this.defaults=e}extend(e){return e&&(this.defaults={...this.defaults,...e}),this}replace(e){this.config=e}get(e){return Kf(this.config,e)?Rf(this.config,e):Rf(this.defaults,e)}set(e,t){typeof e==`string`?ep(this.config,e,t):Object.entries(e).forEach(([e,t])=>{ep(this.config,e,t)})}}({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0,withAllErrors:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function Yp(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function Xp(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var Zp=e=>Xp(`before`,{cancelable:!0,detail:{visit:e}}),Qp=e=>Xp(`error`,{detail:{errors:e}}),$p=e=>Xp(`networkError`,{cancelable:!0,detail:{error:e}}),em=e=>Xp(`finish`,{detail:{visit:e}}),tm=e=>Xp(`httpException`,{cancelable:!0,detail:{response:e}}),nm=e=>Xp(`beforeUpdate`,{detail:{page:e}}),rm=e=>Xp(`navigate`,{detail:{page:e}}),im=e=>Xp(`progress`,{detail:{progress:e}}),am=e=>Xp(`start`,{detail:{visit:e}}),om=e=>Xp(`success`,{detail:{page:e}}),sm=(e,t)=>Xp(`prefetched`,{detail:{fetchedAt:Date.now(),response:e,visit:t}}),cm=e=>Xp(`prefetching`,{detail:{visit:e}}),lm=e=>Xp(`flash`,{detail:{flash:e}}),um=class{static locationVisitKey=`inertiaLocationVisit`;static set(e,t){typeof window<`u`&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if(typeof window<`u`)return JSON.parse(window.sessionStorage.getItem(e)||`null`)}static merge(e,t){let n=this.get(e);n===null?this.set(e,t):this.set(e,{...n,...t})}static remove(e){typeof window<`u`&&window.sessionStorage.removeItem(e)}static removeNested(e,t){let n=this.get(e);n!==null&&(delete n[t],this.set(e,n))}static exists(e){try{return this.get(e)!==null}catch{return!1}}static clear(){typeof window<`u`&&window.sessionStorage.clear()}},dm=async e=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);let t=gm(),n=await ym(await bm());if(!n)throw Error(`Unable to encrypt history`);return await mm(t,n,e)},fm={key:`historyKey`,iv:`historyIv`},pm=async e=>{let t=gm(),n=await bm();if(!n)throw Error(`Unable to decrypt history`);return await hm(t,n,e)},mm=async(e,t,n)=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=new TextEncoder,i=JSON.stringify(n),a=new Uint8Array(i.length*3),o=r.encodeInto(i,a);return window.crypto.subtle.encrypt({name:`AES-GCM`,iv:e},t,a.subarray(0,o.written))},hm=async(e,t,n)=>{if(window.crypto.subtle===void 0)return console.warn(`Decryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=await window.crypto.subtle.decrypt({name:`AES-GCM`,iv:e},t,n);return JSON.parse(new TextDecoder().decode(r))},gm=()=>{let e=um.get(fm.iv);if(e)return new Uint8Array(e);let t=window.crypto.getRandomValues(new Uint8Array(12));return um.set(fm.iv,Array.from(t)),t},_m=async()=>window.crypto.subtle===void 0?(console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(null)):window.crypto.subtle.generateKey({name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]),vm=async e=>{if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve();let t=await window.crypto.subtle.exportKey(`raw`,e);um.set(fm.key,Array.from(new Uint8Array(t)))},ym=async e=>{if(e)return e;let t=await _m();return t?(await vm(t),t):null},bm=async()=>{let e=um.get(fm.key);return e?await window.crypto.subtle.importKey(`raw`,new Uint8Array(e),{name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]):null},xm=(e,t,n)=>{if(e===t)return!0;for(let r in e)if(!n.includes(r)&&e[r]!==t[r]&&!Sm(e[r],t[r]))return!1;for(let r in t)if(!n.includes(r)&&!(r in e))return!1;return!0},Sm=(e,t)=>{switch(typeof e){case`object`:return xm(e,t,[]);case`function`:return e.toString()===t.toString();default:return e===t}},Cm={ms:1,s:1e3,m:1e3*60,h:1e3*60*60,d:1e3*60*60*24},wm=e=>{if(typeof e==`number`)return e;for(let[t,n]of Object.entries(Cm))if(e.endsWith(t))return parseFloat(e)*n;return parseInt(e)},Tm=new class{cached=[];inFlightRequests=[];removalTimers=[];currentUseId=null;add(e,t,{cacheFor:n,cacheTags:r}){if(this.findInFlight(e))return Promise.resolve();let i=this.findCached(e);if(!e.fresh&&i&&i.staleTimestamp>Date.now())return Promise.resolve();let[a,o]=this.extractStaleValues(n),s=new Promise((n,r)=>{t({...e,onCancel:()=>{this.remove(e),e.onCancel(),r()},onError:t=>{this.remove(e),e.onError(t),r()},onPrefetching(t){e.onPrefetching(t)},onPrefetched(t,n){e.onPrefetched(t,n)},onPrefetchResponse(e){n(e)},onPrefetchError(t){Tm.removeFromInFlight(e),r(t)}})}).then(t=>{this.remove(e);let n=t.getPageResponse();V.mergeOncePropsIntoResponse(n),this.cached.push({params:{...e},staleTimestamp:Date.now()+a,expiresAt:Date.now()+o,response:s,singleUse:o===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(r)?r:[r]});let i=this.getShortestOncePropTtl(n);return this.scheduleForRemoval(e,i?Math.min(o,i):o),this.removeFromInFlight(e),t.handlePrefetch(),t});return this.inFlightRequests.push({params:{...e},response:s,staleTimestamp:null,inFlight:!0}),s}removeAll(){this.cached=[],this.removalTimers.forEach(e=>{clearTimeout(e.timer)}),this.removalTimers=[]}removeByTags(e){this.cached=this.cached.filter(t=>!t.tags.some(t=>e.includes(t)))}remove(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)),this.clearTimer(e)}removeFromInFlight(e){this.inFlightRequests=this.inFlightRequests.filter(t=>!this.paramsAreEqual(t.params,e))}extractStaleValues(e){let[t,n]=this.cacheForToStaleAndExpires(e);return[wm(t),wm(n)]}cacheForToStaleAndExpires(e){if(!Array.isArray(e))return[e,e];switch(e.length){case 0:return[0,0];case 1:return[e[0],e[0]];default:return[e[0],e[1]]}}clearTimer(e){let t=this.removalTimers.find(t=>this.paramsAreEqual(t.params,e));t&&(clearTimeout(t.timer),this.removalTimers=this.removalTimers.filter(e=>e!==t))}scheduleForRemoval(e,t){if(!(typeof window>`u`)&&(this.clearTimer(e),t>0)){let n=window.setTimeout(()=>this.remove(e),t);this.removalTimers.push({params:e,timer:n})}}get(e){return this.findCached(e)||this.findInFlight(e)}use(e,t){let n=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=n,e.response.then(e=>{if(this.currentUseId===n)return e.mergeParams({...t,onPrefetched:()=>{}}),this.removeSingleUseItems(t),e.handle()})}removeSingleUseItems(e){this.cached=this.cached.filter(t=>this.paramsAreEqual(t.params,e)?!t.singleUse:!0)}findCached(e){return this.cached.find(t=>this.paramsAreEqual(t.params,e))||null}findInFlight(e){return this.inFlightRequests.find(t=>this.paramsAreEqual(t.params,e))||null}withoutPurposePrefetchHeader(e){let t=B(e);return t.headers.Purpose===`prefetch`&&delete t.headers.Purpose,t}paramsAreEqual(e,t){return xm(this.withoutPurposePrefetchHeader(e),this.withoutPurposePrefetchHeader(t),[`showProgress`,`replace`,`prefetch`,`preserveScroll`,`preserveState`,`onBefore`,`onBeforeUpdate`,`onStart`,`onProgress`,`onFinish`,`onCancel`,`onSuccess`,`onError`,`onFlash`,`onPrefetched`,`onCancelToken`,`onPrefetching`,`async`,`viewTransition`,`optimistic`,`component`,`pageProps`])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(e=>{e.response.then(t=>{let n=t.getPageResponse();V.mergeOncePropsIntoResponse(n,{force:!0});for(let[e,t]of Object.entries(n.deferredProps??{})){let r=t.filter(e=>Rf(n.props,e)===void 0);r.length>0?n.deferredProps[e]=r:delete n.deferredProps[e]}let r=this.getShortestOncePropTtl(n);if(r===null)return;let i=e.expiresAt-Date.now(),a=Math.min(i,r);a>0?this.scheduleForRemoval(e.params,a):this.remove(e.params)})})}getShortestOncePropTtl(e){let t=Object.values(e.onceProps??{}).map(e=>e.expiresAt).filter(e=>!!e);return t.length===0?null:Math.min(...t)-Date.now()}},Em=(e,t=1)=>{window.requestAnimationFrame(()=>{t>1?Em(e,t-1):e()})},Dm=e=>{if(typeof window>`u`)return null;let t=document.querySelector(`script[data-page="${e}"][type="application/json"]`);return t?.textContent?JSON.parse(t.textContent):null},Om=typeof window>`u`,km=!Om&&/Firefox/i.test(window.navigator.userAgent),Am=class{static save(){H.saveScrollPositions(this.getScrollRegions())}static getScrollRegions(){return Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))}static regions(){return document.querySelectorAll(`[scroll-region]`)}static scrollToTop(){if(km&&getComputedStyle(document.documentElement).scrollBehavior===`smooth`)return Em(()=>window.scrollTo(0,0),2);window.scrollTo(0,0)}static reset(){!Om&&window.location.hash||this.scrollToTop(),this.regions().forEach(e=>{typeof e.scrollTo==`function`?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.save(),this.scrollToAnchor()}static scrollToAnchor(){let e=Om?null:window.location.hash;e&&setTimeout(()=>{let t=document.getElementById(e.slice(1));t?t.scrollIntoView():this.scrollToTop()})}static restore(e){Om||window.requestAnimationFrame(()=>{this.restoreDocument(),this.restoreScrollRegions(e)})}static restoreScrollRegions(e){Om||this.regions().forEach((t,n)=>{let r=e[n];r&&(typeof t.scrollTo==`function`?t.scrollTo(r.left,r.top):(t.scrollTop=r.top,t.scrollLeft=r.left))})}static restoreDocument(){let e=H.getDocumentScrollPosition();window.scrollTo(e.left,e.top)}static onScroll(e){let t=e.target;typeof t.hasAttribute==`function`&&t.hasAttribute(`scroll-region`)&&this.save()}static onWindowScroll(){H.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}},jm=e=>typeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0;function Mm(e){return jm(e)||e instanceof FormData&&Array.from(e.values()).some(e=>Mm(e))||typeof e==`object`&&!!e&&Object.values(e).some(e=>Mm(e))}var Nm=e=>e instanceof FormData;function Pm(e,t=new FormData,n=null,r=`brackets`){e||={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&Im(t,Fm(n,i,`indices`),e[i],r);return t}function Fm(e,t,n){return e?n===`brackets`?`${e}[]`:`${e}[${t}]`:t}function Im(e,t,n,r){if(Array.isArray(n))return Array.from(n.keys()).forEach(i=>Im(e,Fm(t,i.toString(),r),n[i],r));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);Pm(n,e,t,r)}function Lm(e){return/\[\d+\]/.test(decodeURIComponent(e.search))}function Rm(e){if(!e||e===`?`)return{};let t={};return e.replace(/^\?/,``).split(`&`).filter(Boolean).forEach(e=>{let[n,r]=Bm(e);Hm(t,Vm(n),Vm(r))}),t}function zm(e,t){let n=[];return Wm(e,``,n,t),n.length?`?`+n.join(`&`):``}function Bm(e){let t=e.indexOf(`=`);return t===-1?[e,``]:[e.substring(0,t),e.substring(t+1)]}function Vm(e){return decodeURIComponent(e.replace(/\+/g,` `))}function Hm(e,t,n){let r=Um(t),i=e;for(;r.length>1;){let e=r.shift(),t=r[0]===``;(typeof i[e]!=`object`||i[e]===null)&&(i[e]=t?[]:{}),i=i[e]}let a=r.shift();a===``&&Array.isArray(i)?i.push(n):i[a]=n}function Um(e){let t=[],n=e.split(`[`)[0];n&&t.push(n);let r,i=/\[([^\]]*)\]/g;for(;(r=i.exec(e))!==null;)t.push(r[1]);return t}function Wm(e,t,n,r){if(e!==void 0){if(e===null){n.push(`${t}=`);return}if(Array.isArray(e)){e.forEach((e,i)=>{Wm(e,r===`indices`?`${t}[${i}]`:`${t}[]`,n,r)});return}if(typeof e==`object`){Object.keys(e).forEach(i=>{Wm(e[i],t?`${t}[${i}]`:i,n,r)});return}n.push(`${t}=${encodeURIComponent(String(e))}`)}}function Gm(e){return new URL(e.toString(),typeof window>`u`?void 0:window.location.toString())}var Km=(e,t,n,r,i)=>{let a=typeof e==`string`?Gm(e):e;if((Mm(t)||r)&&!Nm(t)&&(Jp.get(`form.forceIndicesArrayFormatInFormData`)&&(i=`indices`),t=Pm(t,new FormData,null,i)),Nm(t))return[a,t];let[o,s]=qm(n,a,t,i);return[Gm(o),s]};function qm(e,t,n,r=`brackets`){let i=e===`get`&&!Nm(n)&&Object.keys(n).length>0,a=eh(t.toString()),o=a||t.toString().startsWith(`/`)||t.toString()===``,s=!o&&!t.toString().startsWith(`#`)&&!t.toString().startsWith(`?`),c=/^[.]{1,2}([/]|$)/.test(t.toString()),l=t.toString().includes(`?`)||i,u=t.toString().includes(`#`),d=new URL(t.toString(),typeof window>`u`?`http://localhost`:window.location.toString());if(i){let e=Lm(d)?`indices`:r;d.search=zm({...Rm(d.search),...n},e)}return[[a?`${d.protocol}//${d.host}`:``,o?d.pathname:``,s?d.pathname.substring(+!c):``,l?d.search:``,u?d.hash:``].join(``),i?{}:n]}function Jm(e){return e=new URL(e.href),e.hash=``,e}var Ym=(e,t)=>{e.hash&&!t.hash&&Jm(e).href===t.href&&(t.hash=e.hash)},Xm=(e,t)=>Jm(e).href===Jm(t).href,Zm=(e,t)=>e.origin===t.origin&&e.pathname===t.pathname;function Qm(e){return typeof e==`object`&&!!e&&e!==void 0&&`url`in e&&`method`in e}function $m(e){return e.component?typeof e.component==`string`?e.component:(console.error(`The "component" property on the URL method pair received multiple components (${Object.keys(e.component).join(`, `)}), but only a single component string is supported for instant visits. Use the withComponent() method to specify which component to use.`),null):null}function eh(e){return/^([a-z][a-z0-9+.-]*:)?\/\/[^/]/i.test(e)}var V=new class{page;swapComponent;resolveComponent;onFlashCallback;componentId={};listeners=[];isFirstPageLoad=!0;cleared=!1;pendingDeferredProps=null;historyQuotaExceeded=!1;optimisticBaseline={};pendingOptimistics=[];optimisticCounter=0;init({initialPage:e,swapComponent:t,resolveComponent:n,onFlash:r}){return this.page={...e,flash:e.flash??{}},this.swapComponent=t,this.resolveComponent=n,this.onFlashCallback=r,oh.on(`historyQuotaExceeded`,()=>{this.historyQuotaExceeded=!0}),this}set(e,{replace:t=!1,preserveScroll:n=!1,preserveState:r=!1,viewTransition:i=!1}={}){Object.keys(e.deferredProps||{}).length&&(this.pendingDeferredProps={deferredProps:e.deferredProps,component:e.component,url:e.url},e.initialDeferredProps===void 0&&(e.initialDeferredProps=e.deferredProps)),this.componentId={};let a=this.componentId;return e.clearHistory&&H.clear(),this.resolve(e.component,e).then(o=>{if(a!==this.componentId)return;e.rememberedState??={};let s=typeof window>`u`,c=s?new URL(e.url):window.location,l=!s&&n?Am.getScrollRegions():[];t||=Xm(Gm(e.url),c);let u={...e,flash:{}};return new Promise(e=>t?H.replaceState(u,e):H.pushState(u,e)).then(()=>{let a=!this.isTheSame(e);if(!a&&Object.keys(e.props.errors||{}).length>0&&(i=!1),this.page=e,this.cleared=!1,this.hasOnceProps()&&Tm.updateCachedOncePropsFromCurrentPage(),a&&this.fireEventsFor(`newComponent`),this.isFirstPageLoad&&this.fireEventsFor(`firstLoad`),this.isFirstPageLoad=!1,this.historyQuotaExceeded){this.historyQuotaExceeded=!1;return}return this.swap({component:o,page:e,preserveState:r,viewTransition:i}).then(()=>{n?window.requestAnimationFrame(()=>Am.restoreScrollRegions(l)):Am.reset(),this.pendingDeferredProps&&this.pendingDeferredProps.component===e.component&&this.pendingDeferredProps.url===e.url&&oh.fireInternalEvent(`loadDeferredProps`,this.pendingDeferredProps.deferredProps),this.pendingDeferredProps=null,t||rm(e)})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component,e).then(n=>(this.page=e,this.cleared=!1,H.setCurrent(e),this.swap({component:n,page:e,preserveState:t,viewTransition:!1})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}getWithoutFlashData(){return{...this.page,flash:{}}}hasOnceProps(){return Object.keys(this.page.onceProps??{}).length>0}merge(e){this.page={...this.page,...e}}setPropsQuietly(e){return this.page={...this.page,props:e},this.resolve(this.page.component,this.page).then(e=>this.swap({component:e,page:this.page,preserveState:!0,viewTransition:!1}))}setFlash(e){this.page={...this.page,flash:e},this.onFlashCallback?.(e)}setUrlHash(e){this.page.url.includes(e)||(this.page.url+=e)}remember(e){this.page.rememberedState=e}swap({component:e,page:t,preserveState:n,viewTransition:r}){let i=()=>this.swapComponent({component:e,page:t,preserveState:n});if(!r||!document?.startViewTransition||document.visibilityState===`hidden`)return i();let a=typeof r==`boolean`?()=>null:r;return new Promise(e=>{a(document.startViewTransition(()=>i().then(e)))})}resolve(e,t){return Promise.resolve(this.resolveComponent(e,t))}nextOptimisticId(){return++this.optimisticCounter}setBaseline(e,t){e in this.optimisticBaseline||(this.optimisticBaseline[e]=t)}updateBaseline(e,t){e in this.optimisticBaseline&&(this.optimisticBaseline[e]=t)}hasBaseline(e){return e in this.optimisticBaseline}registerOptimistic(e,t){this.pendingOptimistics.push({id:e,callback:t})}unregisterOptimistic(e){this.pendingOptimistics=this.pendingOptimistics.filter(t=>t.id!==e)}replayOptimistics(){let e=Object.keys(this.optimisticBaseline);if(e.length===0)return{};let t=B(this.page.props);for(let n of e)t[n]=B(this.optimisticBaseline[n]);for(let{callback:e}of this.pendingOptimistics){let n=e(B(t));n&&Object.assign(t,n)}let n={};for(let r of e)n[r]=t[r];return n}pendingOptimisticCount(){return this.pendingOptimistics.length}clearOptimisticState(){this.optimisticBaseline={},this.pendingOptimistics=[]}isTheSame(e){return this.page.component===e.component}on(e,t){return this.listeners.push({event:e,callback:t}),()=>{this.listeners=this.listeners.filter(n=>n.event!==e&&n.callback!==t)}}fireEventsFor(e){this.listeners.filter(t=>t.event===e).forEach(e=>e.callback())}mergeOncePropsIntoResponse(e,{force:t=!1}={}){Object.entries(e.onceProps??{}).forEach(([n,r])=>{let i=this.page.onceProps?.[n];i!==void 0&&(t||Rf(e.props,r.prop)===void 0)&&(ep(e.props,r.prop,Rf(this.page.props,i.prop)),e.onceProps[n].expiresAt=i.expiresAt)})}},th=class{items=[];processingPromise=null;add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??=this.processNext().finally(()=>{this.processingPromise=null}),this.processingPromise}processNext(){let e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}},nh=typeof window>`u`,rh=new th,ih=!nh&&/CriOS/.test(window.navigator.userAgent),ah=class{rememberedState=`rememberedState`;scrollRegions=`scrollRegions`;preserveUrl=!1;current={};initialState=null;remember(e,t){this.replaceState({...V.getWithoutFlashData(),rememberedState:{...V.get()?.rememberedState??{},[t]:e}})}restore(e){if(!nh)return this.current[this.rememberedState]?.[e]===void 0?this.initialState?.[this.rememberedState]?.[e]:this.current[this.rememberedState]?.[e]}pushState(e,t=null){if(!nh){if(this.preserveUrl){t&&t();return}this.current=e,rh.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doPushState({page:n},e.url).then(()=>t?.());return ih?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}clonePageProps(e){try{return structuredClone(e.props),e}catch{return{...e,props:B(e.props)}}}getPageData(e){let t=this.clonePageProps(e);return new Promise(n=>e.encryptHistory?dm(t).then(n):n(t))}processQueue(){return rh.process()}decrypt(e=null){if(nh)return Promise.resolve(e??V.get());let t=e??window.history.state?.page;return this.decryptPageData(t).then(e=>{if(!e)throw Error(`Unable to decrypt history`);return this.initialState===null?this.initialState=e??void 0:this.current=e??{},e})}decryptPageData(e){return e instanceof ArrayBuffer?pm(e):Promise.resolve(e)}saveScrollPositions(e){rh.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!kf(this.getScrollRegions(),e))return this.doReplaceState({page:window.history.state.page,scrollRegions:e})}))}saveDocumentScrollPosition(e){rh.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!kf(this.getDocumentScrollPosition(),e))return this.doReplaceState({page:window.history.state.page,documentScrollPosition:e})}))}getScrollRegions(){return window.history.state?.scrollRegions||[]}getDocumentScrollPosition(){return window.history.state?.documentScrollPosition||{top:0,left:0}}replaceState(e,t=null){if(kf(this.current,e)){t&&t();return}let{flash:n,...r}=e;if(V.merge(r),!nh){if(this.preserveUrl){t&&t();return}this.current=e,rh.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doReplaceState({page:n},e.url).then(()=>t?.());return ih?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}isHistoryThrottleError(e){return e instanceof Error&&e.name===`SecurityError`&&(e.message.includes(`history.pushState`)||e.message.includes(`history.replaceState`))}isQuotaExceededError(e){return e instanceof Error&&e.name===`QuotaExceededError`}withThrottleProtection(e){return Promise.resolve().then(()=>{try{return e()}catch(e){if(!this.isHistoryThrottleError(e))throw e;console.error(e.message)}})}doReplaceState(e,t){return this.withThrottleProtection(()=>{window.history.replaceState({...e,scrollRegions:e.scrollRegions??window.history.state?.scrollRegions,documentScrollPosition:e.documentScrollPosition??window.history.state?.documentScrollPosition},``,t)})}doPushState(e,t){return this.withThrottleProtection(()=>{try{window.history.pushState(e,``,t)}catch(e){if(!this.isQuotaExceededError(e))throw e;oh.fireInternalEvent(`historyQuotaExceeded`,t)}})}getState(e,t){return this.current?.[e]??t}deleteState(e){this.current[e]!==void 0&&(delete this.current[e],this.replaceState(this.current))}clearInitialState(e){this.initialState&&this.initialState[e]!==void 0&&delete this.initialState[e]}browserHasHistoryEntry(){return!nh&&!!window.history.state?.page}clear(){um.remove(fm.key),um.remove(fm.iv)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}};typeof window<`u`&&window.history.scrollRestoration&&(window.history.scrollRestoration=`manual`);var H=new ah,oh=new class{internalListeners=[];init(){typeof window<`u`&&(window.addEventListener(`popstate`,this.handlePopstateEvent.bind(this)),window.addEventListener(`pageshow`,this.handlePageshowEvent.bind(this)),window.addEventListener(`scroll`,Yp(Am.onWindowScroll.bind(Am),100),!0)),typeof document<`u`&&document.addEventListener(`scroll`,Yp(Am.onScroll.bind(Am),100),!0)}onGlobalEvent(e,t){return this.registerListener(`inertia:${e}`,(e=>{let n=t(e);e.cancelable&&!e.defaultPrevented&&n===!1&&e.preventDefault()}))}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(e=>e.listener!==t)}}onMissingHistoryItem(){V.clear(),this.fireInternalEvent(`missingHistoryItem`)}fireInternalEvent(e,...t){this.internalListeners.filter(t=>t.event===e).forEach(e=>e.listener(...t))}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePageshowEvent(e){e.persisted&&H.decrypt().catch(()=>this.onMissingHistoryItem())}handlePopstateEvent(e){let t=e.state||null;if(t===null){let e=Gm(V.get().url);e.hash=window.location.hash,H.replaceState({...V.getWithoutFlashData(),url:e.href}),Am.reset();return}if(!H.isValidState(t))return this.onMissingHistoryItem();H.decrypt(t.page).then(e=>{if(V.get().version!==e.version){this.onMissingHistoryItem();return}Fg.cancelAll({prefetch:!1}),V.setQuietly(e,{preserveState:!1}).then(()=>{Am.restore(H.getScrollRegions()),rm(V.get());let t={},n=V.get().props;for(let[r,i]of Object.entries(e.initialDeferredProps??e.deferredProps??{})){let e=i.filter(e=>Rf(n,e)===void 0);e.length>0&&(t[r]=e)}Object.keys(t).length>0&&this.fireInternalEvent(`loadDeferredProps`,t)})}).catch(()=>{this.onMissingHistoryItem()})}},sh=new class{type;constructor(){this.type=this.resolveType()}resolveType(){return typeof window>`u`?`navigate`:window.performance?.getEntriesByType(`navigation`)[0]?.type??`navigate`}get(){return this.type}isBackForward(){return this.type===`back_forward`}isReload(){return this.type===`reload`}},ch=class{static handle(){this.clearRememberedStateOnReload(),[this.handleBackForward,this.handleLocation,this.handleDefault].find(e=>e.bind(this)())}static clearRememberedStateOnReload(){sh.isReload()&&(H.deleteState(H.rememberedState),H.clearInitialState(H.rememberedState))}static handleBackForward(){if(!sh.isBackForward()||!H.browserHasHistoryEntry())return!1;let e=H.getScrollRegions();return H.decrypt().then(t=>{V.set(t,{preserveScroll:!0,preserveState:!0}).then(()=>{Am.restore(e),rm(V.get())})}).catch(()=>{oh.onMissingHistoryItem()}),!0}static handleLocation(){if(!um.exists(um.locationVisitKey))return!1;let e=um.get(um.locationVisitKey)||{};return um.remove(um.locationVisitKey),typeof window<`u`&&V.setUrlHash(window.location.hash),H.decrypt(V.get()).then(()=>{let t=H.getState(H.rememberedState,{}),n=H.getScrollRegions();V.remember(t),V.set(V.get(),{preserveScroll:e.preserveScroll,preserveState:!0}).then(()=>{e.preserveScroll&&Am.restore(n),this.fireInitialEvents()})}).catch(()=>{oh.onMissingHistoryItem()}),!0}static handleDefault(){typeof window<`u`&&V.setUrlHash(window.location.hash),V.set(V.get(),{preserveScroll:!0,preserveState:!0}).then(()=>{sh.isReload()?Am.restore(H.getScrollRegions()):Am.scrollToAnchor(),this.fireInitialEvents()})}static fireInitialEvents(){let e=V.get();rm(e),Object.keys(e.flash).length>0&&queueMicrotask(()=>lm(e.flash))}},lh=class{id=null;throttle=!1;keepAlive=!1;cb;interval;cbCount=0;constructor(e,t,n){this.keepAlive=n.keepAlive??!1,this.cb=t,this.interval=e,(n.autoStart??!0)&&this.start()}stop(){this.id&&clearInterval(this.id)}start(){typeof window>`u`||(this.stop(),this.id=window.setInterval(()=>{(!this.throttle||this.cbCount%10==0)&&this.cb(),this.throttle&&this.cbCount++},this.interval))}isInBackground(e){this.throttle=this.keepAlive?!1:e,this.throttle&&(this.cbCount=0)}},uh=new class{polls=[];constructor(){this.setupVisibilityListener()}add(e,t,n){let r=new lh(e,t,n);return this.polls.push(r),{stop:()=>r.stop(),start:()=>r.start()}}clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){typeof document>`u`||document.addEventListener(`visibilitychange`,()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},dh=new class{requestHandlers=[];responseHandlers=[];errorHandlers=[];onRequest(e){return this.requestHandlers.push(e),()=>{this.requestHandlers=this.requestHandlers.filter(t=>t!==e)}}onResponse(e){return this.responseHandlers.push(e),()=>{this.responseHandlers=this.responseHandlers.filter(t=>t!==e)}}onError(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}async processRequest(e){let t=e;for(let e of this.requestHandlers)t=await e(t);return t}async processResponse(e){let t=e;for(let e of this.responseHandlers)t=await e(t);return t}async processError(e){for(let t of this.errorHandlers)await t(e)}},fh=class extends Error{code;url;constructor(e,t,n){super(n?`${e} (${n})`:e),this.name=`HttpError`,this.code=t,this.url=n}},ph=class extends fh{response;constructor(e,t,n){super(e,`ERR_HTTP_RESPONSE`,n),this.name=`HttpResponseError`,this.response=t}},mh=class extends fh{constructor(e=`Request was cancelled`,t){super(e,`ERR_CANCELLED`,t),this.name=`HttpCancelledError`}},hh=class extends fh{cause;constructor(e,t,n){super(e,`ERR_NETWORK`,t),this.name=`HttpNetworkError`,this.cause=n}};function gh(e){let t=document.cookie.match(RegExp(`(^|;\\s*)(`+e+`)=([^;]*)`));return t?decodeURIComponent(t[3]):null}function _h(e){let t={};return e.getAllResponseHeaders().split(`\r +`).forEach(e=>{let n=e.indexOf(`:`);n>0&&(t[e.slice(0,n).toLowerCase().trim()]=e.slice(n+1).trim())}),t}function vh(e,t){if(!t.headers)return;let n=t.data instanceof FormData;Object.entries(t.headers).forEach(([t,r])=>{(t.toLowerCase()!==`content-type`||!n)&&e.setRequestHeader(t,String(r))})}function yh(e,t){if(!t||Object.keys(t).length===0)return e;let[n]=qm(`get`,e,t);return n}var bh=class{xsrfCookieName;xsrfHeaderName;constructor(e={}){this.xsrfCookieName=e.xsrfCookieName??`XSRF-TOKEN`,this.xsrfHeaderName=e.xsrfHeaderName??`X-XSRF-TOKEN`}async request(e){let t=await dh.processRequest(e);try{let e=await this.doRequest(t);return await dh.processResponse(e)}catch(e){throw(e instanceof ph||e instanceof hh||e instanceof mh)&&await dh.processError(e),e}}doRequest(e){return new Promise((t,n)=>{let r=new XMLHttpRequest,i=yh(e.url,e.params);r.open(e.method.toUpperCase(),i,!0);let a=gh(this.xsrfCookieName);a&&r.setRequestHeader(this.xsrfHeaderName,a);let o=null;e.data!==null&&e.data!==void 0&&(e.data instanceof FormData?o=e.data:typeof e.data==`object`?(o=JSON.stringify(e.data),!e.headers?.[`Content-Type`]&&!e.headers?.[`content-type`]&&r.setRequestHeader(`Content-Type`,`application/json`)):o=String(e.data)),vh(r,e),e.onUploadProgress&&(r.upload.onprogress=t=>{let n=t.lengthComputable?t.loaded/t.total:void 0;e.onUploadProgress({progress:n,percentage:n?Math.round(n*100):0,loaded:t.loaded,total:t.lengthComputable?t.total:void 0})}),e.signal&&e.signal.addEventListener(`abort`,()=>r.abort()),r.onabort=()=>n(new mh(`Request was cancelled`,e.url)),r.onerror=()=>n(new hh(`Network error`,e.url)),r.onload=()=>{let i={status:r.status,data:r.responseText,headers:_h(r)};r.status>=400?n(new ph(`Request failed with status ${r.status}`,i,e.url)):t(i)},r.send(o)})}},xh=new bh;function Sh(e){return!(`request`in e)}var Ch={getClient(){return xh},setClient(e){if(!Sh(e)){xh=e;return}xh=new bh(e),e.xsrfCookieName&&kp.withXsrfCookieName(e.xsrfCookieName),e.xsrfHeaderName&&kp.withXsrfHeaderName(e.xsrfHeaderName)},onRequest:dh.onRequest.bind(dh),onResponse:dh.onResponse.bind(dh),onError:dh.onError.bind(dh),processRequest:dh.processRequest.bind(dh),processResponse:dh.processResponse.bind(dh),processError:dh.processError.bind(dh)},wh=class e{callbacks=[];params;constructor(e){if(!e.prefetch)this.params=e;else{let t={onBefore:this.wrapCallback(e,`onBefore`),onBeforeUpdate:this.wrapCallback(e,`onBeforeUpdate`),onStart:this.wrapCallback(e,`onStart`),onProgress:this.wrapCallback(e,`onProgress`),onFinish:this.wrapCallback(e,`onFinish`),onCancel:this.wrapCallback(e,`onCancel`),onSuccess:this.wrapCallback(e,`onSuccess`),onError:this.wrapCallback(e,`onError`),onHttpException:this.wrapCallback(e,`onHttpException`),onNetworkError:this.wrapCallback(e,`onNetworkError`),onFlash:this.wrapCallback(e,`onFlash`),onCancelToken:this.wrapCallback(e,`onCancelToken`),onPrefetched:this.wrapCallback(e,`onPrefetched`),onPrefetching:this.wrapCallback(e,`onPrefetching`)};this.params={...e,...t,onPrefetchResponse:e.onPrefetchResponse||(()=>{}),onPrefetchError:e.onPrefetchError||(()=>{})}}}static create(t){return new e(t)}data(){return this.params.method===`get`?null:this.params.data}queryParams(){return this.params.method===`get`?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}isPrefetch(){return this.params.prefetch===!0}isDeferredPropsRequest(){return this.params.deferredProps===!0}onCancelToken(e){this.params.onCancelToken({cancel:e})}markAsFinished(){this.params.completed=!0,this.params.cancelled=!1,this.params.interrupted=!1}markAsCancelled({cancelled:e=!0,interrupted:t=!1}){this.params.onCancel(),this.params.completed=!1,this.params.cancelled=e,this.params.interrupted=t}wasCancelledAtAll(){return this.params.cancelled||this.params.interrupted}onFinish(){this.params.onFinish(this.params)}onStart(){this.params.onStart(this.params)}onPrefetching(){this.params.onPrefetching(this.params)}onPrefetchResponse(e){this.params.onPrefetchResponse&&this.params.onPrefetchResponse(e)}onPrefetchError(e){this.params.onPrefetchError&&this.params.onPrefetchError(e)}all(){return this.params}headers(){let e={...this.params.headers};this.isPartial()&&(e[`X-Inertia-Partial-Component`]=V.get().component);let t=this.params.only.concat(this.params.reset);return t.length>0&&(e[`X-Inertia-Partial-Data`]=t.join(`,`)),this.params.except.length>0&&(e[`X-Inertia-Partial-Except`]=this.params.except.join(`,`)),this.params.reset.length>0&&(e[`X-Inertia-Reset`]=this.params.reset.join(`,`)),this.params.errorBag&&this.params.errorBag.length>0&&(e[`X-Inertia-Error-Bag`]=this.params.errorBag),e}setPreserveOptions(t){this.params.preserveScroll=e.resolvePreserveOption(this.params.preserveScroll,t),this.params.preserveState=e.resolvePreserveOption(this.params.preserveState,t)}runCallbacks(){this.callbacks.forEach(({name:e,args:t})=>{this.params[e](...t)})}merge(e){this.params={...this.params,...e}}wrapCallback(e,t){return(...n)=>{this.recordCallback(t,n),e[t](...n)}}recordCallback(e,t){this.callbacks.push({name:e,args:t})}static resolvePreserveOption(e,t){return typeof e==`function`?e(t):e===`errors`?Object.keys(t.props.errors||{}).length>0:e}},Th={createIframeAndPage(e){typeof e==`object`&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.
${JSON.stringify(e)}`);let t=document.createElement(`html`);t.innerHTML=e,t.querySelectorAll(`a`).forEach(e=>e.setAttribute(`target`,`_top`));let n=document.createElement(`iframe`);return n.style.backgroundColor=`white`,n.style.borderRadius=`5px`,n.style.width=`100%`,n.style.height=`100%`,{iframe:n,page:t}},show(e){let{iframe:t,page:n}=this.createIframeAndPage(e);t.style.boxSizing=`border-box`,t.style.display=`block`;let r=document.createElement(`dialog`);r.id=`inertia-error-dialog`,Object.assign(r.style,{width:`calc(100vw - 100px)`,height:`calc(100vh - 100px)`,padding:`0`,margin:`auto`,border:`none`,backgroundColor:`transparent`});let i=document.createElement(`style`);if(i.textContent=` dialog#inertia-error-dialog::backdrop { background-color: rgba(0, 0, 0, 0.6); } @@ -5009,8 +5015,8 @@ import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js"; dialog#inertia-error-dialog:focus { outline: none; } - `,document.head.appendChild(i),r.addEventListener(`click`,e=>{e.target===r&&r.close()}),r.addEventListener(`close`,()=>{i.remove(),r.remove()}),r.appendChild(t),document.body.prepend(r),r.showModal(),r.focus(),!t.contentWindow)throw Error(`iframe not yet ready.`);t.contentWindow.document.open(),t.contentWindow.document.write(n.outerHTML),t.contentWindow.document.close()}},Th=new eh,Eh=class e{constructor(e,t,n){this.requestParams=e,this.response=t,this.originatingPage=n}wasPrefetched=!1;processed=!1;static create(t,n,r){return new e(t,n,r)}isProcessed(){return this.processed}async handlePrefetch(){Ym(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return Th.add(()=>this.process())}async process(){if(this.requestParams.all().prefetch)return this.wasPrefetched=!0,this.requestParams.all().prefetch=!1,this.requestParams.all().onPrefetched(this.response,this.requestParams.all()),om(this.response,this.requestParams.all()),Promise.resolve();if(this.requestParams.runCallbacks(),this.processed=!0,!this.isInertiaResponse())return this.handleNonInertiaResponse();if(this.isHttpException()){let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)===!1||!em(e))return}await H.processQueue(),H.preserveUrl=this.requestParams.all().preserveUrl,await this.setPage();let{flash:e}=V.get();Object.keys(e).length>0&&!this.requestParams.isDeferredPropsRequest()&&(cm(e),this.requestParams.all().onFlash(e));let t=V.get().props.errors||{};if(Object.keys(t).length>0){let e=this.getScopedErrors(t);return Zp(e),this.requestParams.all().onError(e)}Pg.flushByCacheTags(this.requestParams.all().invalidateCacheTags||[]),this.wasPrefetched||Pg.flush(V.get().url),am(V.get()),await this.requestParams.all().onSuccess(V.get()),H.preserveUrl=!1}mergeParams(e){this.requestParams.merge(e)}getPageResponse(){let e=this.getDataFromResponse(this.response.data);return typeof e==`object`?this.response.data={...e,flash:e.flash??{}}:this.response.data=e}async handleNonInertiaResponse(){if(this.isInertiaRedirect()){Pg.visit(this.getHeader(`x-inertia-redirect`),{...this.requestParams.all(),method:`get`,data:{}});return}if(this.isLocationVisit()){let e=Wm(this.getHeader(`x-inertia-location`));return Jm(this.requestParams.all().url,e),this.locationVisit(e)}let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)!==!1&&em(e))return wh.show(e.data)}isInertiaResponse(){return this.hasHeader(`x-inertia`)}isHttpException(){return this.response.status>=400}hasStatus(e){return this.response.status===e}getHeader(e){return this.response.headers[e]}hasHeader(e){return this.getHeader(e)!==void 0}isInertiaRedirect(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-redirect`)}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-location`)}locationVisit(e){try{if(lm.set(lm.locationVisitKey,{preserveScroll:this.requestParams.all().preserveScroll===!0}),typeof window>`u`)return;Ym(window.location,e)?window.location.reload():window.location.href=e.href}catch{return!1}}async setPage(){let e=this.getPageResponse();return this.shouldSetPage(e)?(this.mergeProps(e),V.mergeOncePropsIntoResponse(e),this.preserveOptimisticProps(e),this.preserveEqualProps(e),await this.setRememberedState(e),this.requestParams.setPreserveOptions(e),e.url=H.preserveUrl?V.get().url:this.pageUrl(e),this.requestParams.all().onBeforeUpdate(e),tm(e),V.set(e,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState,viewTransition:this.requestParams.all().viewTransition})):Promise.resolve()}getDataFromResponse(e){if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}}shouldSetPage(e){if(!this.requestParams.all().async||this.originatingPage.component!==e.component)return!0;if(this.originatingPage.component!==V.get().component)return!1;let t=Wm(this.originatingPage.url),n=Wm(V.get().url);return t.origin===n.origin&&t.pathname===n.pathname}pageUrl(e){let t=Wm(e.url);return e.preserveFragment?t.hash=this.requestParams.all().url.hash:Jm(this.requestParams.all().url,t),t.pathname+t.search+t.hash}preserveOptimisticProps(e){if(Pg.hasPendingOptimistic())for(let t of Object.keys(e.props))V.hasBaseline(t)&&(V.updateBaseline(t,e.props[t]),e.props[t]=V.get().props[t])}preserveEqualProps(e){if(e.component!==V.get().component)return;let t=V.get().props;Object.entries(e.props).forEach(([n,r])=>{Of(r,t[n])&&(e.props[n]=t[n])})}mergeProps(e){if(!this.requestParams.isPartial()||e.component!==V.get().component)return;let t=e.mergeProps||[],n=e.prependProps||[],r=e.deepMergeProps||[],i=e.matchPropsOn||[],a=(t,n)=>{let r=Lf(V.get().props,t),a=Lf(e.props,t);if(Array.isArray(a)){let o=this.mergeOrMatchItems(r||[],a,t,i,n);$f(e.props,t,o)}else if(typeof a==`object`&&a){let n={...r||{},...a};$f(e.props,t,n)}};t.forEach(e=>a(e,!0)),n.forEach(e=>a(e,!1)),r.forEach(t=>{let n=Lf(V.get().props,t),r=Lf(e.props,t),a=(e,t,n)=>Array.isArray(t)?this.mergeOrMatchItems(e,t,n,i):typeof t==`object`&&t?Object.keys(t).reduce((r,i)=>(r[i]=a(e?e[i]:void 0,t[i],`${n}.${i}`),r),{...e}):t;$f(e.props,t,a(n,r,t))});let o=new Set([...this.requestParams.all().only,...this.requestParams.all().except].filter(e=>e.includes(`.`)).map(e=>e.split(`.`)[0]));for(let t of o){let n=V.get().props[t];this.isObject(n)&&this.isObject(e.props[t])&&(e.props[t]=this.deepMergeObjects(n,e.props[t]))}e.props={...V.get().props,...e.props},this.shouldPreserveErrors(e)&&(e.props.errors=V.get().props.errors),V.get().scrollProps&&(e.scrollProps={...V.get().scrollProps||{},...e.scrollProps||{}}),V.hasOnceProps()&&(e.onceProps={...V.get().onceProps||{},...e.onceProps||{}}),this.requestParams.isDeferredPropsRequest()&&(e.flash={...V.get().flash});let s=V.get().initialDeferredProps;s&&Object.keys(s).length>0&&(e.initialDeferredProps=s)}shouldPreserveErrors(e){if(!this.requestParams.all().preserveErrors)return!1;let t=V.get().props.errors;if(!t||Object.keys(t).length===0)return!1;let n=e.props.errors;return!(n&&Object.keys(n).length>0)}isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}deepMergeObjects(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];this.isObject(i)&&this.isObject(a)?n[r]=this.deepMergeObjects(i,a):n[r]=a}return n}mergeOrMatchItems(e,t,n,r,i=!0){let a=Array.isArray(e)?e:[],o=r.find(e=>e.split(`.`).slice(0,-1).join(`.`)===n);if(!o)return i?[...a,...t]:[...t,...a];let s=o.split(`.`).pop()||``,c=new Map;return t.forEach(e=>{this.hasUniqueProperty(e,s)&&c.set(e[s],e)}),i?this.appendWithMatching(a,t,c,s):this.prependWithMatching(a,t,c,s)}appendWithMatching(e,t,n,r){let i=e.map(e=>this.hasUniqueProperty(e,r)&&n.has(e[r])?n.get(e[r]):e),a=t.filter(t=>this.hasUniqueProperty(t,r)?!e.some(e=>this.hasUniqueProperty(e,r)&&e[r]===t[r]):!0);return[...i,...a]}prependWithMatching(e,t,n,r){let i=e.filter(e=>this.hasUniqueProperty(e,r)?!n.has(e[r]):!0);return[...t,...i]}hasUniqueProperty(e,t){return e&&typeof e==`object`&&t in e}async setRememberedState(e){let t=await H.getState(H.rememberedState,{});this.requestParams.all().preserveState&&t&&e.component===V.get().component&&(e.rememberedState=t)}getScopedErrors(e){return this.requestParams.all().errorBag?e[this.requestParams.all().errorBag||``]||{}:e}},Dh=class e{constructor(e,t,{optimistic:n=!1}={}){this.page=t,this.requestParams=Ch.create(e),this.cancelToken=new AbortController,this.optimistic=n}response;cancelToken;requestParams;requestHasFinished=!1;optimistic;static create(t,n,r){return new e(t,n,r)}isPrefetch(){return this.requestParams.isPrefetch()}isOptimistic(){return this.optimistic}isPendingOptimistic(){return this.isOptimistic()&&(!this.response||!this.response.isProcessed())}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),im(this.requestParams.all()),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),sm(this.requestParams.all()));let e=this.requestParams.all().prefetch;return Sh.getClient().request({method:this.requestParams.all().method,url:qm(this.requestParams.all().url).href,data:this.requestParams.data(),signal:this.cancelToken.signal,headers:this.getHeaders(),onUploadProgress:this.onProgress.bind(this)}).then(e=>(this.response=Eh.create(this.requestParams,e,this.page),this.response.handle())).catch(e=>e instanceof fh?(this.response=Eh.create(this.requestParams,e.response,this.page),this.response.handle()):Promise.reject(e)).catch(t=>{if(!(t instanceof ph)&&this.requestParams.all().onNetworkError(t)!==!1&&Qp(t))return e&&this.requestParams.onPrefetchError(t),Promise.reject(t)}).finally(()=>{this.finish(),e&&this.response&&this.requestParams.onPrefetchResponse(this.response)})}finish(){this.requestParams.wasCancelledAtAll()||(this.requestParams.markAsFinished(),this.fireFinishEvents())}fireFinishEvents(){this.requestHasFinished||(this.requestHasFinished=!0,$p(this.requestParams.all()),this.requestParams.onFinish())}cancel({cancelled:e=!1,interrupted:t=!1}){this.requestHasFinished||(this.cancelToken.abort(),this.requestParams.markAsCancelled({cancelled:e,interrupted:t}),this.fireFinishEvents())}onProgress(e){this.requestParams.data()instanceof FormData&&(rm(e),this.requestParams.all().onProgress(e))}getHeaders(){let e={...this.requestParams.headers(),Accept:`text/html, application/xhtml+xml`,"X-Requested-With":`XMLHttpRequest`,"X-Inertia":!0},t=V.get();t.version&&(e[`X-Inertia-Version`]=t.version);let n=Object.entries(t.onceProps||{}).filter(([,e])=>Lf(t.props,e.prop)===void 0?!1:!e.expiresAt||e.expiresAt>Date.now()).map(([e])=>e);return n.length>0&&(e[`X-Inertia-Except-Once-Props`]=n.join(`,`)),e}},Oh=class{requests=[];maxConcurrent;interruptible;constructor({maxConcurrent:e,interruptible:t}){this.maxConcurrent=e,this.interruptible=t}send(e){this.requests.push(e),e.send().finally(()=>{this.requests=this.requests.filter(t=>t!==e)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight({prefetch:e=!0,optimistic:t=!0}={}){this.requests.filter(t=>e||!t.isPrefetch()).filter(e=>t||!e.isOptimistic()).forEach(e=>e.cancel({cancelled:!0}))}cancel({cancelled:e=!1,interrupted:t=!1}={},n=!1){!n&&!this.shouldCancel()||this.requests.shift()?.cancel({cancelled:e,interrupted:t})}shouldCancel(){return this.interruptible&&this.requests.length>=this.maxConcurrent}hasPendingOptimistic(){return this.requests.some(e=>e.isPendingOptimistic())}},kh=()=>{},Ah=class{syncRequestStream=new Oh({maxConcurrent:1,interruptible:!0});asyncRequestStream=new Oh({maxConcurrent:1/0,interruptible:!1});clientVisitQueue=new eh;pendingOptimisticCallback=void 0;init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}){V.init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}),sh.handle(),ah.init(),ah.on(`missingHistoryItem`,()=>{typeof window<`u`&&this.visit(window.location.href,{preserveState:!0,preserveScroll:!0,replace:!0})}),ah.on(`loadDeferredProps`,e=>{this.loadDeferredProps(e)}),ah.on(`historyQuotaExceeded`,e=>{window.location.href=e})}optimistic(e){return this.pendingOptimisticCallback=e,this}get(e,t={},n={}){return this.visit(e,{...n,method:`get`,data:t})}post(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`post`,data:t})}put(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`put`,data:t})}patch(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`patch`,data:t})}delete(e,t={}){return this.visit(e,{preserveState:!0,...t,method:`delete`})}reload(e={}){return this.doReload(e)}doReload(e={}){if(!(typeof window>`u`))return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0,async:!0,headers:{...e.headers||{},"Cache-Control":`no-cache`}})}remember(e,t=`default`){H.remember(e,t)}restore(e=`default`){return H.restore(e)}on(e,t){return typeof window>`u`?()=>{}:ah.onGlobalEvent(e,t)}hasPendingOptimistic(){return this.asyncRequestStream.hasPendingOptimistic()}cancelAll({async:e=!0,prefetch:t=!0,sync:n=!0}={}){e&&this.asyncRequestStream.cancelInFlight({prefetch:t}),n&&this.syncRequestStream.cancelInFlight()}poll(e,t={},n={}){return lh.add(e,()=>this.reload({preserveErrors:!0,...t}),{autoStart:n.autoStart??!0,keepAlive:n.keepAlive??!1})}visit(e,t={}){t.optimistic=t.optimistic??this.pendingOptimisticCallback,this.pendingOptimisticCallback=void 0,t.optimistic&&(t.async=t.async??!0);let n=this.getPendingVisit(e,{...t,showProgress:t.showProgress??(!t.async||!!t.optimistic)}),r=this.getVisitEvents(t);if(r.onBefore(n)===!1||!Xp(n))return;let i=Wm(V.get().url);(n.only.length>0||n.except.length>0||n.reset.length>0?Xm(n.url,i):Ym(n.url,i))||this.asyncRequestStream.cancelInFlight({prefetch:!1,optimistic:!1}),n.async||this.syncRequestStream.interruptInFlight(),t.optimistic&&this.applyOptimisticUpdate(t.optimistic,r),!V.isCleared()&&!n.preserveUrl&&km.save();let a={...n,...r},o=()=>{let e=wm.get(a);e?(bg.reveal(e.inFlight),wm.use(e,a)):(bg.reveal(!0),(n.async?this.asyncRequestStream:this.syncRequestStream).send(Dh.create(a,V.get(),{optimistic:!!t.optimistic})))};Array.isArray(n.component)&&(console.error(`The "component" prop received an array of components (${n.component.join(`, `)}), but only a single component string is supported for instant visits. Pass an explicit component name instead.`),n.component=null),n.component?H.processQueue().then(()=>{this.performInstantSwap(n).then(()=>{a.preserveState=!0,a.replace=!0,a.viewTransition=!1,o()})}):o()}getCached(e,t={}){return wm.findCached(this.getPrefetchParams(e,t))}flush(e,t={}){wm.remove(this.getPrefetchParams(e,t))}flushAll(){wm.removeAll()}flushByCacheTags(e){wm.removeByTags(Array.isArray(e)?e:[e])}getPrefetching(e,t={}){return wm.findInFlight(this.getPrefetchParams(e,t))}prefetch(e,t={},n={}){if((t.method??(Zm(e)?e.method:`get`))!==`get`)throw Error(`Prefetch requests must use the GET method`);let r=this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1});if(r.url.origin+r.url.pathname+r.url.search===window.location.origin+window.location.pathname+window.location.search)return;let i=this.getVisitEvents(t);if(i.onBefore(r)===!1||!Xp(r))return;bg.hide(),this.asyncRequestStream.interruptInFlight();let a={...r,...i};new Promise(e=>{let t=()=>{V.get()?e():setTimeout(t,50)};t()}).then(()=>{wm.add(a,e=>{this.asyncRequestStream.send(Dh.create(e,V.get()))},{cacheFor:qp.get(`prefetch.cacheFor`),cacheTags:[],...n})})}clearHistory(){H.clear()}decryptHistory(){return H.decrypt()}resolveComponent(e,t){return V.resolve(e,t)}replace(e){this.clientVisit(e,{replace:!0})}replaceProp(e,t,n){this.replace({preserveScroll:!0,preserveState:!0,props(n){let r=typeof t==`function`?t(Lf(n,e),n):t;return $f(B(n),e,r)},...n||{}})}appendToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[...e,r]},n)}prependToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[r,...e]},n)}push(e){this.clientVisit(e)}flash(e,t){let n=V.get().flash,r;if(typeof e==`function`)r=e(n);else if(typeof e==`string`)r={...n,[e]:t};else if(e&&Object.keys(e).length)r={...n,...e};else return;V.setFlash(r),Object.keys(r).length&&cm(r)}clientVisit(e,{replace:t=!1}={}){this.clientVisitQueue.add(()=>this.performClientVisit(e,{replace:t}))}performClientVisit(e,{replace:t=!1}={}){let n=V.get(),r=typeof e.props==`function`?Object.fromEntries(Object.values(n.onceProps??{}).map(e=>[e.prop,Lf(n.props,e.prop)])):{},i=typeof e.props==`function`?e.props(n.props,r):e.props??n.props,a=typeof e.flash==`function`?e.flash(n.flash):e.flash,{viewTransition:o,onError:s,onFinish:c,onFlash:l,onSuccess:u,...d}=e,f={...n,...d,flash:a??{},props:i},p=Ch.resolvePreserveOption(e.preserveScroll??!1,f),m=Ch.resolvePreserveOption(e.preserveState??!1,f);return V.set(f,{replace:t,preserveScroll:p,preserveState:m,viewTransition:o}).then(()=>{let t=V.get().flash;Object.keys(t).length>0&&(cm(t),l?.(t));let n=V.get().props.errors||{};if(Object.keys(n).length===0){u?.(V.get());return}let r=e.errorBag?n[e.errorBag||``]||{}:n;s?.(r)}).finally(()=>c?.(e))}performInstantSwap(e){let t=V.get(),n=Object.fromEntries((t.sharedProps??[]).filter(e=>e in t.props).map(e=>[e,t.props[e]])),r=typeof e.pageProps==`function`?e.pageProps(B(t.props),B(n)):e.pageProps,i=r===null?{...n}:{...r},a={component:e.component,url:e.url.pathname+e.url.search+e.url.hash,version:t.version,props:{...i,errors:{}},flash:{},clearHistory:!1,encryptHistory:t.encryptHistory,sharedProps:t.sharedProps,rememberedState:{}};return V.set(a,{replace:e.replace,preserveScroll:Ch.resolvePreserveOption(e.preserveScroll,a),preserveState:!1,viewTransition:e.viewTransition})}getPrefetchParams(e,t){return{...this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),...this.getVisitEvents(t)}}getPendingVisit(e,t){if(Zm(e)){let n=e;e=n.url,t.method=t.method??n.method}let n=qp.get(`visitOptions`),r=n&&n(e.toString(),B(t))||{},i={method:`get`,data:{},replace:!1,preserveScroll:!1,preserveState:!1,only:[],except:[],headers:{},errorBag:``,forceFormData:!1,queryStringArrayFormat:`brackets`,async:!1,showProgress:!0,fresh:!1,reset:[],preserveUrl:!1,preserveErrors:!1,prefetch:!1,invalidateCacheTags:[],viewTransition:!1,component:null,pageProps:null,...t,...r},[a,o]=Gm(e,i.data,i.method,i.forceFormData,i.queryStringArrayFormat),s={cancelled:!1,completed:!1,interrupted:!1,...i,url:a,data:o};return s.prefetch&&(s.headers.Purpose=`prefetch`),s}getVisitEvents(e){return{onCancelToken:e.onCancelToken||kh,onBefore:e.onBefore||kh,onBeforeUpdate:e.onBeforeUpdate||kh,onStart:e.onStart||kh,onProgress:e.onProgress||kh,onFinish:e.onFinish||kh,onCancel:e.onCancel||kh,onSuccess:e.onSuccess||kh,onError:e.onError||kh,onHttpException:e.onHttpException||kh,onNetworkError:e.onNetworkError||kh,onFlash:e.onFlash||kh,onPrefetched:e.onPrefetched||kh,onPrefetching:e.onPrefetching||kh}}applyOptimisticUpdate(e,t){let n=V.get().props,r=e(B(n));if(!r)return;let i=[];for(let e of Object.keys(r))Of(n[e],r[e])||i.push(e);if(i.length===0)return;let a=V.nextOptimisticId(),o=V.get().component;for(let e of i)V.setBaseline(e,B(n[e]));V.registerOptimistic(a,e),V.setPropsQuietly({...n,...r});let s=!0,c=t.onSuccess;t.onSuccess=e=>(s=!1,c(e));let l=t.onFinish;t.onFinish=e=>{if(V.unregisterOptimistic(a),s&&V.get().component===o){let e=V.replayOptimistics();Object.keys(e).length>0&&V.setPropsQuietly({...V.get().props,...e})}return V.pendingOptimisticCount()===0&&V.clearOptimisticState(),l(e)}}loadDeferredProps(e){e&&Object.values(e).forEach(e=>{this.doReload({only:e,deferredProps:!0,preserveErrors:!0})})}},jh=class{static createWayfinderCallback(...e){return()=>e.length===1?Zm(e[0])?e[0]:e[0]():{method:typeof e[0]==`function`?e[0]():e[0],url:typeof e[1]==`function`?e[1]():e[1]}}static parseUseFormArguments(...e){return e.length===0?{rememberKey:null,data:{},precognitionEndpoint:null}:e.length===1?{rememberKey:null,data:e[0],precognitionEndpoint:null}:e.length===2?typeof e[0]==`string`?{rememberKey:e[0],data:e[1],precognitionEndpoint:null}:{rememberKey:null,data:e[1],precognitionEndpoint:this.createWayfinderCallback(e[0])}:{rememberKey:null,data:e[2],precognitionEndpoint:this.createWayfinderCallback(e[0],e[1])}}static parseSubmitArguments(e,t){return e.length===3||e.length===2&&typeof e[0]==`string`?{method:e[0],url:e[1],options:e[2]??{}}:Zm(e[0])?{...e[0],options:e[1]??{}}:{...t(),options:e[0]??{}}}static mergeHeadersForValidation(e,t,n){let r=e=>(e.headers={...n??{},...e.headers??{}},e);return e&&typeof e==`object`&&!(`target`in e)?e=r(e):t&&typeof t==`object`?t=r(t):typeof e==`string`?t=r(t??{}):e=r(e??{}),[e,t]}};function Mh(e){return e.includes(`.`)?e.replace(/\\\./g,`__ESCAPED_DOT__`).split(/(\[[^\]]*\])/).filter(Boolean).map(e=>e.startsWith(`[`)&&e.endsWith(`]`)?e:e.split(`.`).reduce((e,t,n)=>n===0?t:`${e}[${t}]`)).join(``).replace(/__ESCAPED_DOT__/g,`.`):e}function Nh(e){let t=[],n=/([^\[\]]+)|\[(\d*)\]/g,r;for(;(r=n.exec(e))!==null;)r[1]===void 0?r[2]!==void 0&&t.push(r[2]===``?``:Number(r[2])):t.push(r[1]);return t}function Ph(e,t,n){let r=e;for(let e=0;e/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);return t.length===n.length&&n.length>0&&n[0]===0&&n.every((e,t)=>e===t)}function Ih(e){if(Array.isArray(e))return e.map(Ih);if(typeof e!=`object`||!e||Am(e))return e;if(Fh(e)){let t=[];for(let n=0;n/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);$f(t,n,e.length>0?[...e.map(e=>i[e]),r]:[r])}else $f(t,n,[r]);continue}Ph(t,e.map(String),r)}return Ih(t)}var Rh={buildDOMElement(e){let t=document.createElement(`template`);t.innerHTML=e;let n=t.content.firstChild;if(!e.startsWith(`