From ac22c1a426c0d3aaa210ca94fc3924fa5132012a Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Jun 2026 04:09:00 +0000 Subject: [PATCH 1/3] feat(bricks): add in-builder Color System panel with light/dark preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A floating Color System panel for the Bricks builder, launched from a corner pill. Browses every --sf-color-* token grouped by brand/status family (shades & tints, transparent steps, semantic aliases) plus a combined Semantic group. Leans into SLASHED's adaptive light-dark() model: each swatch previews BOTH variants at once (diagonal split in "Both" mode), and the Light/Dark toggle drives the live canvas [data-theme] so real elements adapt while browsing. Picking a swatch copies its var(--sf-color-*) reference and applies it to the selected element's chosen target (background / text / border) — always the variable, never a baked hex, so elements stay theme- and dark-mode-aware. Degrades to copy-only with no selection. - color-resolver: add resolve_dark() deriving dark sources + semantic tokens via the framework's own dark formulas; share the family-scale builder between modes. - inventory: add get_color_hex_map_dark() (cached, override-aware). - rebemer-enqueue: localise the ordered token list + light/dark hex maps behind a new slashed_bricks/show_color_panel filter. - editor-app: pure, unit-tested color-model.js (grouping/filter/value helpers) + ColorApp/ColorPanel/ColorSwatch/ColorLauncher Svelte UI; bricks-api gains active-element detection and color application. - tests/color-model.test.js wired into the pretest suite. https://claude.ai/code/session_01HPTgyrXeZBfqrwFpa78d3F --- package.json | 2 +- .../integrations/bricks/README.md | 10 + .../bricks/assets/editor-app/app.css | 2 +- .../bricks/assets/editor-app/app.js | 10 +- .../editor-app/src/components/ColorApp.svelte | 23 ++ .../src/components/ColorLauncher.svelte | 24 ++ .../src/components/ColorPanel.svelte | 247 +++++++++++++ .../src/components/ColorSwatch.svelte | 36 ++ .../bricks/editor-app/src/lib/bricks-api.js | 93 +++++ .../bricks/editor-app/src/lib/color-model.js | 340 ++++++++++++++++++ .../bricks/editor-app/src/main.js | 37 +- .../bricks/editor-app/src/styles/panel.css | 234 ++++++++++++ .../bricks/includes/class-color-resolver.php | 231 +++++++++++- .../bricks/includes/class-inventory.php | 41 ++- .../bricks/includes/class-rebemer-enqueue.php | 31 ++ tests/color-model.test.js | 205 +++++++++++ 16 files changed, 1542 insertions(+), 24 deletions(-) create mode 100644 plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorApp.svelte create mode 100644 plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorLauncher.svelte create mode 100644 plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte create mode 100644 plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorSwatch.svelte create mode 100644 plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js create mode 100644 tests/color-model.test.js diff --git a/package.json b/package.json index d1ce0ce1..a2b2e72d 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "version-sync": "node scripts/version-sync.js", "lint:css": "stylelint \"**/*.css\"", "lint:css:fix": "stylelint \"**/*.css\" --fix", - "pretest": "npm run build && node --test tests/element-types.test.js tests/class-hints.test.js", + "pretest": "npm run build && node --test tests/element-types.test.js tests/class-hints.test.js tests/color-model.test.js", "test": "playwright test", "test:install": "playwright install --with-deps chromium firefox webkit", "release": "release-it", diff --git a/plugins/SLASHED-for-WP/integrations/bricks/README.md b/plugins/SLASHED-for-WP/integrations/bricks/README.md index 78bb21d3..3fed90f6 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/README.md +++ b/plugins/SLASHED-for-WP/integrations/bricks/README.md @@ -11,6 +11,7 @@ A WordPress plugin that integrates the [SLASHED](https://github.com/codeslash-de - **Variable-Picker Swatches** - Paints a colour square next to each `--sf-color-*` entry in the Bricks variable-picker dropdown, builder-side only. Because the variables stay empty-valued, Bricks has no value to draw a swatch from; the square is rendered from a server-resolved hex map so dark/light stays 100% framework-driven and nothing is written to `:root`. Purely additive and fail-silent: if Bricks ever changes the picker markup you lose the squares, never the picker. Restores the swatch affordance lost when the Color Palette is disabled on Bricks 2.2+. Toggle with the `slashed_bricks/show_color_swatches` filter - **Dynamic Detection** - The integration parses the loaded CSS bundle at runtime, so registrations stay in sync with whichever bundle (`essential` / `optimal` / `full`) and SLASHED release is active. There is no hand-curated list to drift out of date. - **reBEMer** - Subtree-scoped BEM class manager inside the Bricks builder structure panel: add / rename / replace classes for an element and its children in one transaction, with reference-count preflight (REST), snapshot+rollback, reserved-name guard against SLASHED utilities, and Cmd/Ctrl-Z undo. See [docs/rebemer.md](../../docs/rebemer.md) for the full design. +- **Color System Panel** - A floating in-builder browser for every `--sf-color-*` token, launched from a pill in the builder corner. Tokens are grouped the way the framework organises colour (the six brand families and five status families, each split into shades/tints, transparent steps, and named semantic aliases, plus a combined Semantic group for page-level tokens like text/bg/border/link). Its differentiator over a single-mode palette: because every SLASHED token is an adaptive `light-dark()` value, each swatch previews **both** variants at once (the "Both" mode splits a swatch on the diagonal — light top-left, dark bottom-right), and the Light/Dark toggle drives the live canvas `[data-theme]` so real elements adapt as you browse. Picking a swatch copies its `var(--sf-color-*)` reference to the clipboard **and** applies it to the selected element's chosen target (background / text / border) — always the variable, never a baked hex, so the element stays theme- and dark-mode-aware. With nothing selected it degrades to copy-only. Light/dark hex previews are server-resolved (`Slashed_Bricks_Color_Resolver`) so no SLASHED stylesheet needs loading in the builder chrome. Toggle with the `slashed_bricks/show_color_panel` filter. ## Requirements @@ -105,6 +106,15 @@ Control whether colour swatches are painted next to `--sf-color-*` entries in th add_filter( 'slashed_bricks/show_color_swatches', '__return_false' ); ``` +#### `slashed_bricks/show_color_panel` + +Control whether the in-builder **Color System Panel** (and its launcher pill) is loaded (see Color System Panel above). Defaults to `true`. Returning `false` skips localising the panel's token list and light/dark hex maps, so no extra data is sent to the builder. + +```php +// Hide the Color System panel. +add_filter( 'slashed_bricks/show_color_panel', '__return_false' ); +``` + #### `slashed_bricks/registered_variables` Filter the CSS variables array before registration with Bricks. diff --git a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css index 90a50fd2..29c2e3f4 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css +++ b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css @@ -1 +1 @@ -#slashed-rebemer-host{--rebemer-bg: #161a1d;--rebemer-fg: #e1e1e1;--rebemer-fg-muted: #8a8d95;--rebemer-border: #3d4752;--rebemer-accent: #e2b93b;--rebemer-accent-hover: #ffd042;--rebemer-input-bg: #293038;--rebemer-input-border: #3d4752;--rebemer-error: #ff4c4c;--rebemer-success: #4ade80;--rebemer-radius: 4px;--rebemer-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif}.rebemer-badge-host{display:inline-flex;align-items:center;align-self:center;flex:0 0 auto;margin:0 4px;opacity:0;pointer-events:none;transition:opacity 80ms linear}.structure-item:hover .rebemer-badge-host,.structure-item:focus-within .rebemer-badge-host,li[data-id]:hover>.rebemer-badge-host,li[data-id]:focus-within>.rebemer-badge-host{opacity:1;pointer-events:auto}.rebemer-badge{font:600 9px/1 var(--rebemer-font, "Inter", -apple-system, BlinkMacSystemFont, sans-serif);letter-spacing:0;text-transform:none;color:var(--rebemer-fg-muted, #8a8d95);display:inline;background:transparent;padding:1px 3px;margin:0;cursor:pointer;border-radius:2px;pointer-events:auto}.rebemer-badge:hover{color:var(--rebemer-accent, #e2b93b);background:#e2b93b14}.rebemer-badge:focus-visible{outline:1px dotted var(--rebemer-accent, #e2b93b);outline-offset:1px;color:var(--rebemer-accent, #e2b93b)}.rebemer-panel{position:fixed;top:80px;left:50%;transform:translate(-50%);width:440px;max-width:calc(100vw - 40px);max-height:80vh;z-index:100000;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);box-shadow:0 10px 40px #0009;display:flex;flex-direction:column;font:12px/1.45 var(--rebemer-font);overflow:hidden;outline:none}.rebemer-panel__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--rebemer-border)}.rebemer-panel__title{margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff}.rebemer-panel__subject{color:var(--rebemer-accent);text-transform:none;font-weight:500}.rebemer-panel__close{background:transparent;border:0;font-size:18px;color:var(--rebemer-fg-muted);cursor:pointer;padding:2px 6px}.rebemer-panel__close:hover{color:#fff}.rebemer-panel__toolbar{padding:10px 14px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--rebemer-border)}.rebemer-field{display:flex;flex-direction:column;gap:4px;font-size:11px}.rebemer-field--inline{flex-direction:row;align-items:center;gap:6px}.rebemer-field__label{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:10px}.rebemer-field select,.rebemer-field input[type=text]{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);padding:4px 6px;font:inherit}.rebemer-field select:focus,.rebemer-field input:focus{outline:1px solid var(--rebemer-accent)}.rebemer-panel__mode-hint{margin:0;padding:5px 14px;font-size:11px;color:var(--rebemer-fg-muted);background:var(--rebemer-bg);border-bottom:1px solid var(--rebemer-border);line-height:1.4}.rebemer-panel__notice{margin:0;padding:8px 14px;background:#e2b93b14;border-bottom:1px solid var(--rebemer-border);color:var(--rebemer-fg);font-size:11px;line-height:1.5}.rebemer-panel__notice--warn{background:#e2b93b29}.rebemer-panel__notice strong{color:var(--rebemer-accent);font-weight:600}.rebemer-panel__notice-skip{display:block;margin-top:2px;color:var(--rebemer-fg-muted)}.rebemer-panel__body{flex:1;overflow-y:auto;padding:8px 14px;display:flex;flex-direction:column;gap:6px}.rebemer-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--rebemer-radius);background:#ffffff05;margin-left:calc(var(--rebemer-row-depth, 0) * 12px)}.rebemer-row:hover{background:#ffffff0a}.rebemer-row--disabled{opacity:.45}.rebemer-row__include input{cursor:pointer}.rebemer-row__meta{display:flex;gap:6px;align-items:baseline;min-width:0}.rebemer-row__label{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rebemer-row__type{font-size:9px;color:var(--rebemer-fg-muted);text-transform:uppercase}.rebemer-row__hint{font-size:9px;color:var(--rebemer-accent);text-transform:uppercase;letter-spacing:.5px;background:#e2b93b1f;padding:1px 4px;border-radius:2px}.rebemer-row__inputs{grid-column:1 / -1;display:flex;gap:6px;align-items:center}.rebemer-row__name{flex:1;display:flex;align-items:stretch;background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);overflow:hidden}.rebemer-row__prefix{padding:4px 6px;background:#00000040;color:var(--rebemer-fg-muted);font-size:11px;border-right:1px solid var(--rebemer-input-border);white-space:nowrap}.rebemer-row__name input{background:transparent;border:0;outline:0;color:var(--rebemer-fg);font:inherit;padding:4px 6px;flex:1;min-width:0}.rebemer-row--suggested .rebemer-row__name input:not(:focus){color:var(--rebemer-fg-muted);font-style:italic}.rebemer-row__modifier{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);font:inherit;padding:4px 6px;width:90px}.rebemer-row__recommend{grid-column:1 / -1;margin:0;padding:6px 8px;background:#4ade8014;border-left:2px solid var(--rebemer-success);border-radius:2px;color:var(--rebemer-fg);font-size:11px;line-height:1.4}.rebemer-row__recommend code{background:#0000004d;padding:1px 4px;border-radius:2px;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-row__warn,.rebemer-row__info{grid-column:1 / -1;margin:0;padding:5px 8px;font-size:11px;line-height:1.4;border-radius:2px}.rebemer-row__warn{background:#e2b93b1f;border-left:2px solid #e2b93b;color:var(--rebemer-fg)}.rebemer-row__info{background:#63b3ed1a;border-left:2px solid #63b3ed;color:var(--rebemer-fg-muted)}.rebemer-row__chips{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px 0 0;font-size:10px}.rebemer-row__chips-label,.rebemer-row__chips-empty,.rebemer-row__chips-skip{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:9px}.rebemer-row__chips-skip{margin-left:auto;cursor:help;color:#c8a038}.rebemer-chip{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#0000004d;border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:2px 5px;border-radius:2px;white-space:nowrap}.rebemer-panel__footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid var(--rebemer-border)}.rebemer-btn{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:6px 12px;border-radius:var(--rebemer-radius);font:inherit;cursor:pointer}.rebemer-btn:hover{border-color:var(--rebemer-fg-muted)}.rebemer-btn--primary{background:var(--rebemer-accent);border-color:var(--rebemer-accent);color:var(--rebemer-bg);font-weight:600}.rebemer-btn--primary:hover{background:var(--rebemer-accent-hover);border-color:var(--rebemer-accent-hover)}.rebemer-toast{position:fixed;bottom:16px;right:16px;z-index:100002;background:var(--rebemer-input-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 12px;font:12px/1.45 var(--rebemer-font);cursor:pointer;box-shadow:0 4px 12px #0006}.rebemer-toast--success{border-color:var(--rebemer-success)}.rebemer-toast--error{border-color:var(--rebemer-error);color:var(--rebemer-error)}.rebemer-class-hint{position:fixed;z-index:100003;max-width:280px;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 10px;font:12px/1.45 var(--rebemer-font);box-shadow:0 6px 20px #00000080;pointer-events:none}.rebemer-class-hint[hidden]{display:none}.rebemer-class-hint__name{font:600 11px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-class-hint__cat{margin-left:6px;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.rebemer-class-hint__cat[hidden]{display:none}.rebemer-class-hint__desc{margin:4px 0 0;color:var(--rebemer-fg)}.slashed-var-swatch{flex:0 0 auto;display:inline-block;width:12px;height:12px;margin-right:7px;vertical-align:middle;border-radius:3px;border:1px solid rgba(127,127,127,.45);background-color:#fff;background-image:linear-gradient(var(--slashed-swatch-color, transparent),var(--slashed-swatch-color, transparent)),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%);background-position:0 0,0 0,4px 4px;background-size:auto,8px 8px,8px 8px} +#slashed-rebemer-host{--rebemer-bg: #161a1d;--rebemer-fg: #e1e1e1;--rebemer-fg-muted: #8a8d95;--rebemer-border: #3d4752;--rebemer-accent: #e2b93b;--rebemer-accent-hover: #ffd042;--rebemer-input-bg: #293038;--rebemer-input-border: #3d4752;--rebemer-error: #ff4c4c;--rebemer-success: #4ade80;--rebemer-radius: 4px;--rebemer-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif}.rebemer-badge-host{display:inline-flex;align-items:center;align-self:center;flex:0 0 auto;margin:0 4px;opacity:0;pointer-events:none;transition:opacity 80ms linear}.structure-item:hover .rebemer-badge-host,.structure-item:focus-within .rebemer-badge-host,li[data-id]:hover>.rebemer-badge-host,li[data-id]:focus-within>.rebemer-badge-host{opacity:1;pointer-events:auto}.rebemer-badge{font:600 9px/1 var(--rebemer-font, "Inter", -apple-system, BlinkMacSystemFont, sans-serif);letter-spacing:0;text-transform:none;color:var(--rebemer-fg-muted, #8a8d95);display:inline;background:transparent;padding:1px 3px;margin:0;cursor:pointer;border-radius:2px;pointer-events:auto}.rebemer-badge:hover{color:var(--rebemer-accent, #e2b93b);background:#e2b93b14}.rebemer-badge:focus-visible{outline:1px dotted var(--rebemer-accent, #e2b93b);outline-offset:1px;color:var(--rebemer-accent, #e2b93b)}.rebemer-panel{position:fixed;top:80px;left:50%;transform:translate(-50%);width:440px;max-width:calc(100vw - 40px);max-height:80vh;z-index:100000;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);box-shadow:0 10px 40px #0009;display:flex;flex-direction:column;font:12px/1.45 var(--rebemer-font);overflow:hidden;outline:none}.rebemer-panel__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--rebemer-border)}.rebemer-panel__title{margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff}.rebemer-panel__subject{color:var(--rebemer-accent);text-transform:none;font-weight:500}.rebemer-panel__close{background:transparent;border:0;font-size:18px;color:var(--rebemer-fg-muted);cursor:pointer;padding:2px 6px}.rebemer-panel__close:hover{color:#fff}.rebemer-panel__toolbar{padding:10px 14px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--rebemer-border)}.rebemer-field{display:flex;flex-direction:column;gap:4px;font-size:11px}.rebemer-field--inline{flex-direction:row;align-items:center;gap:6px}.rebemer-field__label{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:10px}.rebemer-field select,.rebemer-field input[type=text]{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);padding:4px 6px;font:inherit}.rebemer-field select:focus,.rebemer-field input:focus{outline:1px solid var(--rebemer-accent)}.rebemer-panel__mode-hint{margin:0;padding:5px 14px;font-size:11px;color:var(--rebemer-fg-muted);background:var(--rebemer-bg);border-bottom:1px solid var(--rebemer-border);line-height:1.4}.rebemer-panel__notice{margin:0;padding:8px 14px;background:#e2b93b14;border-bottom:1px solid var(--rebemer-border);color:var(--rebemer-fg);font-size:11px;line-height:1.5}.rebemer-panel__notice--warn{background:#e2b93b29}.rebemer-panel__notice strong{color:var(--rebemer-accent);font-weight:600}.rebemer-panel__notice-skip{display:block;margin-top:2px;color:var(--rebemer-fg-muted)}.rebemer-panel__body{flex:1;overflow-y:auto;padding:8px 14px;display:flex;flex-direction:column;gap:6px}.rebemer-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--rebemer-radius);background:#ffffff05;margin-left:calc(var(--rebemer-row-depth, 0) * 12px)}.rebemer-row:hover{background:#ffffff0a}.rebemer-row--disabled{opacity:.45}.rebemer-row__include input{cursor:pointer}.rebemer-row__meta{display:flex;gap:6px;align-items:baseline;min-width:0}.rebemer-row__label{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rebemer-row__type{font-size:9px;color:var(--rebemer-fg-muted);text-transform:uppercase}.rebemer-row__hint{font-size:9px;color:var(--rebemer-accent);text-transform:uppercase;letter-spacing:.5px;background:#e2b93b1f;padding:1px 4px;border-radius:2px}.rebemer-row__inputs{grid-column:1 / -1;display:flex;gap:6px;align-items:center}.rebemer-row__name{flex:1;display:flex;align-items:stretch;background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);overflow:hidden}.rebemer-row__prefix{padding:4px 6px;background:#00000040;color:var(--rebemer-fg-muted);font-size:11px;border-right:1px solid var(--rebemer-input-border);white-space:nowrap}.rebemer-row__name input{background:transparent;border:0;outline:0;color:var(--rebemer-fg);font:inherit;padding:4px 6px;flex:1;min-width:0}.rebemer-row--suggested .rebemer-row__name input:not(:focus){color:var(--rebemer-fg-muted);font-style:italic}.rebemer-row__modifier{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);font:inherit;padding:4px 6px;width:90px}.rebemer-row__recommend{grid-column:1 / -1;margin:0;padding:6px 8px;background:#4ade8014;border-left:2px solid var(--rebemer-success);border-radius:2px;color:var(--rebemer-fg);font-size:11px;line-height:1.4}.rebemer-row__recommend code{background:#0000004d;padding:1px 4px;border-radius:2px;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-row__warn,.rebemer-row__info{grid-column:1 / -1;margin:0;padding:5px 8px;font-size:11px;line-height:1.4;border-radius:2px}.rebemer-row__warn{background:#e2b93b1f;border-left:2px solid #e2b93b;color:var(--rebemer-fg)}.rebemer-row__info{background:#63b3ed1a;border-left:2px solid #63b3ed;color:var(--rebemer-fg-muted)}.rebemer-row__chips{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px 0 0;font-size:10px}.rebemer-row__chips-label,.rebemer-row__chips-empty,.rebemer-row__chips-skip{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:9px}.rebemer-row__chips-skip{margin-left:auto;cursor:help;color:#c8a038}.rebemer-chip{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#0000004d;border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:2px 5px;border-radius:2px;white-space:nowrap}.rebemer-panel__footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid var(--rebemer-border)}.rebemer-btn{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:6px 12px;border-radius:var(--rebemer-radius);font:inherit;cursor:pointer}.rebemer-btn:hover{border-color:var(--rebemer-fg-muted)}.rebemer-btn--primary{background:var(--rebemer-accent);border-color:var(--rebemer-accent);color:var(--rebemer-bg);font-weight:600}.rebemer-btn--primary:hover{background:var(--rebemer-accent-hover);border-color:var(--rebemer-accent-hover)}.rebemer-toast{position:fixed;bottom:16px;right:16px;z-index:100002;background:var(--rebemer-input-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 12px;font:12px/1.45 var(--rebemer-font);cursor:pointer;box-shadow:0 4px 12px #0006}.rebemer-toast--success{border-color:var(--rebemer-success)}.rebemer-toast--error{border-color:var(--rebemer-error);color:var(--rebemer-error)}.rebemer-class-hint{position:fixed;z-index:100003;max-width:280px;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 10px;font:12px/1.45 var(--rebemer-font);box-shadow:0 6px 20px #00000080;pointer-events:none}.rebemer-class-hint[hidden]{display:none}.rebemer-class-hint__name{font:600 11px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-class-hint__cat{margin-left:6px;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.rebemer-class-hint__cat[hidden]{display:none}.rebemer-class-hint__desc{margin:4px 0 0;color:var(--rebemer-fg)}.slashed-cp-launch{position:fixed;right:16px;bottom:16px;z-index:99999;display:inline-flex;align-items:center;gap:7px;padding:7px 12px;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:999px;font:600 11px/1 var(--rebemer-font);letter-spacing:.3px;cursor:pointer;box-shadow:0 4px 16px #00000073;transition:border-color .12s,color .12s,transform .12s}.slashed-cp-launch:hover{border-color:var(--rebemer-fg-muted);transform:translateY(-1px)}.slashed-cp-launch--on{border-color:var(--rebemer-accent);color:#fff}.slashed-cp-launch__dot{width:12px;height:12px;border-radius:50%;background:conic-gradient(from 210deg,#5b8cff,#b07cff,#ff6b6b,#ffd24a,#4ade80,#5b8cff);box-shadow:inset 0 0 0 1px #ffffff40}.slashed-cp-launch__txt{text-transform:uppercase}.slashed-cp{position:fixed;top:64px;right:16px;bottom:64px;width:372px;max-width:calc(100vw - 32px);z-index:100001;display:flex;flex-direction:column;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);box-shadow:0 12px 48px #0009;font:12px/1.45 var(--rebemer-font);overflow:hidden;outline:none}.slashed-cp__header{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--rebemer-border)}.slashed-cp__title{margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff;flex:1}.slashed-cp__close{background:transparent;border:0;font-size:18px;line-height:1;color:var(--rebemer-fg-muted);cursor:pointer;padding:2px 4px}.slashed-cp__close:hover{color:#fff}.slashed-cp__seg{display:inline-flex;border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);overflow:hidden}.slashed-cp__seg-btn{background:var(--rebemer-input-bg);border:0;border-left:1px solid var(--rebemer-input-border);color:var(--rebemer-fg-muted);font:600 10px/1 var(--rebemer-font);padding:5px 9px;cursor:pointer;text-transform:uppercase;letter-spacing:.4px}.slashed-cp__seg-btn:first-child{border-left:0}.slashed-cp__seg-btn--on{background:var(--rebemer-accent);color:var(--rebemer-bg)}.slashed-cp__toolbar{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-bottom:1px solid var(--rebemer-border)}.slashed-cp__search{width:100%;background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);font:inherit;padding:6px 8px;box-sizing:border-box}.slashed-cp__search:focus{outline:1px solid var(--rebemer-accent)}.slashed-cp__target{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.slashed-cp__target-label{font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.slashed-cp__chip{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:999px;color:var(--rebemer-fg-muted);font:600 10px/1 var(--rebemer-font);padding:4px 10px;cursor:pointer}.slashed-cp__chip--on{background:var(--rebemer-accent);border-color:var(--rebemer-accent);color:var(--rebemer-bg)}.slashed-cp__body{flex:1;overflow-y:auto;padding:6px 12px 12px}.slashed-cp__empty{color:var(--rebemer-fg-muted);font-size:11px;padding:12px 2px}.slashed-cp__group{padding:10px 0 6px;border-bottom:1px solid rgba(255,255,255,.05)}.slashed-cp__group:last-child{border-bottom:0}.slashed-cp__group-title{display:flex;align-items:center;gap:7px;margin:0 0 8px;font-size:11px;font-weight:700;color:#fff;text-transform:capitalize}.slashed-cp__group-count{font:600 9px/1 var(--rebemer-font);color:var(--rebemer-fg-muted);background:#ffffff0f;border-radius:999px;padding:2px 6px}.slashed-cp__section-label{margin:8px 0 5px;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.slashed-cp__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:7px 6px}.slashed-cp__cell{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}.slashed-cp__cap{font-size:9px;color:var(--rebemer-fg-muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slashed-cp__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.slashed-cp__list-item{display:flex;align-items:center;gap:8px}.slashed-cp__list-name{font-size:11px;color:var(--rebemer-fg);flex:0 0 auto}.slashed-cp__list-var{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-fg-muted);margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slashed-cp-swatch{width:28px;height:28px;flex:0 0 auto;padding:0;border:1px solid rgba(127,127,127,.45);border-radius:6px;background:none;cursor:pointer;position:relative;overflow:hidden}.slashed-cp-swatch:hover{border-color:var(--rebemer-accent)}.slashed-cp-swatch:focus-visible{outline:2px solid var(--rebemer-accent);outline-offset:1px}.slashed-cp-swatch__fill{position:absolute;inset:0;background:var(--cp-solid)}.slashed-cp-swatch--split .slashed-cp-swatch__fill{background:linear-gradient(135deg,var(--cp-l) 0 calc(50% - .5px),rgba(0,0,0,.35) calc(50% - .5px) calc(50% + .5px),var(--cp-d) calc(50% + .5px) 100%)}.slashed-cp-swatch--alpha{border-style:dashed}.slashed-cp__footer{display:flex;align-items:center;gap:10px;padding:8px 12px;border-top:1px solid var(--rebemer-border);font-size:10px;color:var(--rebemer-fg-muted)}.slashed-cp__hint{margin-left:auto}.slashed-cp__hint code,.slashed-cp__footer code{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.slashed-cp__legend{display:inline-flex;align-items:center;gap:5px}.slashed-cp__legend-sw{width:12px;height:12px;border-radius:3px;border:1px solid rgba(127,127,127,.45);background:linear-gradient(135deg,#fff 0 50%,#222 50% 100%)}.rebemer-toast--info{border-color:#63b3ed}.slashed-var-swatch{flex:0 0 auto;display:inline-block;width:12px;height:12px;margin-right:7px;vertical-align:middle;border-radius:3px;border:1px solid rgba(127,127,127,.45);background-color:#fff;background-image:linear-gradient(var(--slashed-swatch-color, transparent),var(--slashed-swatch-color, transparent)),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%);background-position:0 0,0 0,4px 4px;background-size:auto,8px 8px,8px 8px} diff --git a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js index 62700b72..03146389 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js @@ -1,7 +1,9 @@ -var Bs=Object.defineProperty;var ui=e=>{throw TypeError(e)};var js=(e,t,n)=>t in e?Bs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>js(e,typeof t!="symbol"?t+"":t,n),wr=(e,t,n)=>t.has(e)||ui("Cannot "+n);var f=(e,t,n)=>(wr(e,t,"read from private field"),n?n.call(e):t.get(e)),S=(e,t,n)=>t.has(e)?ui("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),E=(e,t,n,r)=>(wr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),N=(e,t,n)=>(wr(e,t,"access private method"),n);var Xr=Array.isArray,qs=Array.prototype.indexOf,St=Array.prototype.includes,ur=Array.from,Hs=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,Ks=Object.getOwnPropertyDescriptors,Ws=Object.prototype,zs=Array.prototype,Ri=Object.getPrototypeOf,ci=Object.isExtensible;const Us=()=>{};function Gs(e){for(var t=0;t{e=r,t=i});return{promise:n,resolve:e,reject:t}}const ne=2,Xt=4,cr=8,Di=1<<24,De=16,je=32,dt=64,Or=128,Me=512,Q=1024,te=2048,Ue=4096,le=8192,Ne=16384,Pt=32768,Mr=1<<25,Zt=65536,$n=1<<17,Vs=1<<18,tn=1<<19,Ys=1<<20,ze=1<<25,It=65536,Qn=1<<21,Ht=1<<22,at=1<<23,Ct=Symbol("$state"),Js=Symbol("legacy props"),Xs=Symbol(""),qn=Symbol("attributes"),Nr=Symbol("class"),Ir=Symbol("style"),ln=Symbol("text"),Hn=Symbol("form reset"),dr=new class extends Error{constructor(){super(...arguments);ae(this,"name","StaleReactionError");ae(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Zs(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function $s(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qs(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function eo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function to(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function no(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ro(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function io(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function so(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function oo(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function lo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ao(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const fo=1,uo=2,Fi=4,co=8,ho=16,_o=1,vo=4,po=8,go=16,mo=1,bo=2,Z=Symbol("uninitialized"),Bi="http://www.w3.org/1999/xhtml";function yo(){console.warn("https://svelte.dev/e/derived_inert")}function wo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Eo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ji(e){return e===this.v}function ko(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function qi(e){return!ko(e,this.v)}let he=null;function $t(e){he=e}function An(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,r:M,l:null}}function xn(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)ls(r)}return t.i=!0,he=t.p,{}}function Hi(){return!0}let vt=[];function Ki(){var e=vt;vt=[],Gs(e)}function ft(e){if(vt.length===0&&!cn){var t=vt;queueMicrotask(()=>{t===vt&&Ki()})}vt.push(e)}function So(){for(;vt.length>0;)Ki()}function Wi(e){var t=M;if(t===null)return O.f|=at,e;if((t.f&Pt)===0&&(t.f&Xt)===0)throw e;ot(e,t)}function ot(e,t){for(;t!==null;){if((t.f&Or)!==0){if((t.f&Pt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Co=-7169;function z(e,t){e.f=e.f&Co|t}function Zr(e){(e.f&Me)!==0||e.deps===null?z(e,Q):z(e,Ue)}function zi(e){if(e!==null)for(const t of e)(t.f&ne)===0||(t.f&It)===0||(t.f^=It,zi(t.deps))}function Ui(e,t,n){(e.f&te)!==0?t.add(e):(e.f&Ue)!==0&&n.add(e),zi(e.deps),z(e,Q)}let Fn=!1;function Ao(e){var t=Fn;try{return Fn=!1,[e(),Fn]}finally{Fn=t}}let Er=null,Ft=null,A=null,Lr=null,Fe=null,Rr=null,cn=!1,kr=!1,jt=null,Kn=null;var di=0;let xo=1;var zt,rt,mt,Ut,Gt,bt,Vt,Ye,yn,pe,wn,it,He,Ke,Yt,yt,L,Pr,an,Dr,Gi,Vi,Wn,To,Fr,Bt;const lr=class lr{constructor(){S(this,L);ae(this,"id",xo++);S(this,zt,!1);ae(this,"linked",!0);S(this,rt,null);S(this,mt,null);ae(this,"async_deriveds",new Map);ae(this,"current",new Map);ae(this,"previous",new Map);ae(this,"unblocked",new Set);S(this,Ut,new Set);S(this,Gt,new Set);S(this,bt,new Set);S(this,Vt,0);S(this,Ye,new Map);S(this,yn,null);S(this,pe,[]);S(this,wn,[]);S(this,it,new Set);S(this,He,new Set);S(this,Ke,new Map);S(this,Yt,new Set);ae(this,"is_fork",!1);S(this,yt,!1)}skip_effect(t){f(this,Ke).has(t)||f(this,Ke).set(t,{d:[],m:[]}),f(this,Yt).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=f(this,Ke).get(t);if(r){f(this,Ke).delete(t);for(var i of r.d)z(i,te),n(i);for(i of r.m)z(i,Ue),n(i)}f(this,Yt).add(t)}capture(t,n,r=!1){t.v!==Z&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&at)===0&&(this.current.set(t,[n,r]),Fe?.set(t,n)),this.is_fork||(t.v=n)}activate(){A=this}deactivate(){A=null,Fe=null}flush(){try{kr=!0,A=this,N(this,L,an).call(this)}finally{di=0,Rr=null,jt=null,Kn=null,kr=!1,A=null,Fe=null,At.clear()}}discard(){for(const t of f(this,Gt))t(this);f(this,Gt).clear(),f(this,bt).clear(),N(this,L,Bt).call(this)}register_created_effect(t){f(this,wn).push(t)}increment(t,n){if(E(this,Vt,f(this,Vt)+1),t){let r=f(this,Ye).get(n)??0;f(this,Ye).set(n,r+1)}}decrement(t,n){if(E(this,Vt,f(this,Vt)-1),t){let r=f(this,Ye).get(n)??0;r===1?f(this,Ye).delete(n):f(this,Ye).set(n,r-1)}f(this,yt)||(E(this,yt,!0),ft(()=>{E(this,yt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)f(this,it).add(r);for(const r of n)f(this,He).add(r);t.clear(),n.clear()}oncommit(t){f(this,Ut).add(t)}ondiscard(t){f(this,Gt).add(t)}on_fork_commit(t){f(this,bt).add(t)}run_fork_commit_callbacks(){for(const t of f(this,bt))t(this);f(this,bt).clear()}settled(){return(f(this,yn)??E(this,yn,Pi())).promise}static ensure(){var t;if(A===null){const n=A=new lr;N(t=n,L,Fr).call(t),!kr&&!cn&&ft(()=>{f(n,zt)||n.flush()})}return A}apply(){{Fe=null;return}}schedule(t){if(Rr=t,t.b?.is_pending&&(t.f&(Xt|cr|Di))!==0&&(t.f&Pt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(jt!==null&&n===M&&(O===null||(O.f&ne)===0))return;if((r&(dt|je))!==0){if((r&Q)===0)return;n.f^=Q}}f(this,pe).push(n)}};zt=new WeakMap,rt=new WeakMap,mt=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,bt=new WeakMap,Vt=new WeakMap,Ye=new WeakMap,yn=new WeakMap,pe=new WeakMap,wn=new WeakMap,it=new WeakMap,He=new WeakMap,Ke=new WeakMap,Yt=new WeakMap,yt=new WeakMap,L=new WeakSet,Pr=function(){if(this.is_fork)return!0;for(const r of f(this,Ye).keys()){for(var t=r,n=!1;t.parent!==null;){if(f(this,Ke).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},an=function(){var l,c,h;if(E(this,zt,!0),di++>1e3&&(N(this,L,Bt).call(this),Mo()),!N(this,L,Pr).call(this)){for(const u of f(this,it))f(this,He).delete(u),z(u,te),this.schedule(u);for(const u of f(this,He))z(u,Ue),this.schedule(u)}const t=f(this,pe);E(this,pe,[]),this.apply();var n=jt=[],r=[],i=Kn=[];for(const u of t)try{N(this,L,Dr).call(this,u,n,r)}catch(d){throw Xi(u),d}if(A=null,i.length>0){var s=lr.ensure();for(const u of i)s.schedule(u)}if(jt=null,Kn=null,N(this,L,Pr).call(this)){N(this,L,Wn).call(this,r),N(this,L,Wn).call(this,n);for(const[u,d]of f(this,Ke))Ji(u,d);i.length>0&&N(l=A,L,an).call(l);return}const o=N(this,L,Gi).call(this);if(o){N(c=o,L,Vi).call(c,this);return}f(this,it).clear(),f(this,He).clear();for(const u of f(this,Ut))u(this);f(this,Ut).clear(),Lr=this,hi(r),hi(n),Lr=null,f(this,yn)?.resolve();var a=A;if(this.linked&&f(this,Vt)===0&&N(this,L,Bt).call(this),f(this,pe).length>0){a===null&&(a=this,N(this,L,Fr).call(this));const u=a;f(u,pe).push(...f(this,pe).filter(d=>!f(u,pe).includes(d)))}a!==null&&N(h=a,L,an).call(h)},Dr=function(t,n,r){t.f^=Q;for(var i=t.first;i!==null;){var s=i.f,o=(s&(je|dt))!==0,a=o&&(s&Q)!==0,l=a||(s&le)!==0||f(this,Ke).has(i);if(!l&&i.fn!==null){o?i.f^=Q:(s&Xt)!==0?n.push(i):On(i)&&((s&De)!==0&&f(this,He).add(i),en(i));var c=i.first;if(c!==null){i=c;continue}}for(;i!==null;){var h=i.next;if(h!==null){i=h;break}i=i.parent}}},Gi=function(){for(var t=f(this,rt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=f(t,rt)}return null},Vi=function(t){var r;for(const[i,s]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,s);for(const[i,s]of t.async_deriveds){const o=this.async_deriveds.get(i);o&&s.promise.then(o.resolve)}const n=i=>{var s=i.reactions;if(s!==null)for(const l of s){var o=l.f;if((o&ne)!==0)n(l);else{var a=l;o&(Ht|De)&&!this.async_deriveds.has(a)&&(f(this,He).delete(a),z(a,te),this.schedule(a))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>t.discard()),N(r=t,L,Bt).call(r),A=this,N(this,L,an).call(this)},Wn=function(t){for(var n=0;n!this.current.has(d));if(i.length===0)t&&u.discard();else if(n.length>0){if(t)for(const d of f(this,Yt))u.unskip_effect(d,_=>{var v;(_.f&(De|Ht))!==0?u.schedule(_):N(v=u,L,Wn).call(v,[_])});u.activate();var s=new Set,o=new Map;for(var a of n)Yi(a,i,s,o);o=new Map;var l=[...u.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(l.length>0)for(const d of f(this,wn))(d.f&(Ne|le|$n))===0&&$r(d,l,o)&&((d.f&(Ht|De))!==0?(z(d,te),u.schedule(d)):f(u,it).add(d));if(f(u,pe).length>0&&!f(u,yt)){u.apply();for(var c of f(u,pe))N(h=u,L,Dr).call(h,c,[],[]);E(u,pe,[])}u.deactivate()}}}},Fr=function(){Ft===null?Er=Ft=this:(E(Ft,mt,this),E(this,rt,Ft)),Ft=this},Bt=function(){var t=f(this,rt),n=f(this,mt);t===null?Er=n:E(t,mt,n),n===null?Ft=t:E(n,rt,t),this.linked=!1};let Lt=lr;function Oo(e){var t=cn;cn=!0;try{for(var n;;){if(So(),A===null)return n;A.flush()}}finally{cn=t}}function Mo(){try{ro()}catch(e){ot(e,Rr)}}let Ve=null;function hi(e){var t=e.length;if(t!==0){for(var n=0;n0)){At.clear();for(const i of Ve){if((i.f&(Ne|le))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Ve.has(o)&&(Ve.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(Ne|le))===0&&en(l)}}Ve.clear()}}Ve=null}}function Yi(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&ne)!==0?Yi(i,t,n,r):(s&(Ht|De))!==0&&(s&te)===0&&$r(i,t,r)&&(z(i,te),Qr(i))}}function $r(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(St.call(t,i))return!0;if((i.f&ne)!==0&&$r(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Qr(e){A.schedule(e)}function Ji(e,t){if(!((e.f&je)!==0&&(e.f&Q)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&Ue)!==0&&t.m.push(e),z(e,Q);for(var n=e.first;n!==null;)Ji(n,t),n=n.next}}function Xi(e){z(e,Q);for(var t=e.first;t!==null;)Xi(t),t=t.next}function No(e){let t=0,n=Rt(0),r;return()=>{ni()&&(g(n),_r(()=>(t===0&&(r=nn(()=>e(()=>dn(n)))),t+=1,()=>{ft(()=>{t-=1,t===0&&(r?.(),r=void 0,dn(n))})})))}}var Io=Zt|tn;function Lo(e,t,n,r){new Ro(e,t,n,r)}var Ce,Jr,Ae,wt,fe,xe,re,ge,Je,Et,st,Jt,En,kn,Xe,ar,U,Po,Do,Fo,Br,zn,Un,jr,qr;class Ro{constructor(t,n,r,i){S(this,U);ae(this,"parent");ae(this,"is_pending",!1);ae(this,"transform_error");S(this,Ce);S(this,Jr,null);S(this,Ae);S(this,wt);S(this,fe);S(this,xe,null);S(this,re,null);S(this,ge,null);S(this,Je,null);S(this,Et,0);S(this,st,0);S(this,Jt,!1);S(this,En,new Set);S(this,kn,new Set);S(this,Xe,null);S(this,ar,No(()=>(E(this,Xe,Rt(f(this,Et))),()=>{E(this,Xe,null)})));E(this,Ce,t),E(this,Ae,n),E(this,wt,s=>{var o=M;o.b=this,o.f|=Or,r(s)}),this.parent=M.b,this.transform_error=i??this.parent?.transform_error??(s=>s),E(this,fe,si(()=>{N(this,U,Br).call(this)},Io))}defer_effect(t){Ui(t,f(this,En),f(this,kn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,Ae).pending}update_pending_count(t,n){N(this,U,jr).call(this,t,n),E(this,Et,f(this,Et)+t),!(!f(this,Xe)||f(this,Jt))&&(E(this,Jt,!0),ft(()=>{E(this,Jt,!1),f(this,Xe)&&Qt(f(this,Xe),f(this,Et))}))}get_effect_pending(){return f(this,ar).call(this),g(f(this,Xe))}error(t){if(!f(this,Ae).onerror&&!f(this,Ae).failed)throw t;A?.is_fork?(f(this,xe)&&A.skip_effect(f(this,xe)),f(this,re)&&A.skip_effect(f(this,re)),f(this,ge)&&A.skip_effect(f(this,ge)),A.on_fork_commit(()=>{N(this,U,qr).call(this,t)})):N(this,U,qr).call(this,t)}}Ce=new WeakMap,Jr=new WeakMap,Ae=new WeakMap,wt=new WeakMap,fe=new WeakMap,xe=new WeakMap,re=new WeakMap,ge=new WeakMap,Je=new WeakMap,Et=new WeakMap,st=new WeakMap,Jt=new WeakMap,En=new WeakMap,kn=new WeakMap,Xe=new WeakMap,ar=new WeakMap,U=new WeakSet,Po=function(){try{E(this,xe,Te(()=>f(this,wt).call(this,f(this,Ce))))}catch(t){this.error(t)}},Do=function(t){const n=f(this,Ae).failed;n&&E(this,ge,Te(()=>{n(f(this,Ce),()=>t,()=>()=>{})}))},Fo=function(){const t=f(this,Ae).pending;t&&(this.is_pending=!0,E(this,re,Te(()=>t(f(this,Ce)))),ft(()=>{var n=E(this,Je,document.createDocumentFragment()),r=$e();n.append(r),E(this,xe,N(this,U,Un).call(this,()=>Te(()=>f(this,wt).call(this,r)))),f(this,st)===0&&(f(this,Ce).before(n),E(this,Je,null),xt(f(this,re),()=>{E(this,re,null)}),N(this,U,zn).call(this,A))}))},Br=function(){try{if(this.is_pending=this.has_pending_snippet(),E(this,st,0),E(this,Et,0),E(this,xe,Te(()=>{f(this,wt).call(this,f(this,Ce))})),f(this,st)>0){var t=E(this,Je,document.createDocumentFragment());ai(f(this,xe),t);const n=f(this,Ae).pending;E(this,re,Te(()=>n(f(this,Ce))))}else N(this,U,zn).call(this,A)}catch(n){this.error(n)}},zn=function(t){this.is_pending=!1,t.transfer_effects(f(this,En),f(this,kn))},Un=function(t){var n=M,r=O,i=he;Ge(f(this,fe)),Le(f(this,fe)),$t(f(this,fe).ctx);try{return Lt.ensure(),t()}catch(s){return Wi(s),null}finally{Ge(n),Le(r),$t(i)}},jr=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&N(r=this.parent,U,jr).call(r,t,n);return}E(this,st,f(this,st)+t),f(this,st)===0&&(N(this,U,zn).call(this,n),f(this,re)&&xt(f(this,re),()=>{E(this,re,null)}),f(this,Je)&&(f(this,Ce).before(f(this,Je)),E(this,Je,null)))},qr=function(t){f(this,xe)&&(de(f(this,xe)),E(this,xe,null)),f(this,re)&&(de(f(this,re)),E(this,re,null)),f(this,ge)&&(de(f(this,ge)),E(this,ge,null));var n=f(this,Ae).onerror;let r=f(this,Ae).failed;var i=!1,s=!1;const o=()=>{if(i){Eo();return}i=!0,s&&ao(),f(this,ge)!==null&&xt(f(this,ge),()=>{E(this,ge,null)}),N(this,U,Un).call(this,()=>{N(this,U,Br).call(this)})},a=l=>{try{s=!0,n?.(l,o),s=!1}catch(c){ot(c,f(this,fe)&&f(this,fe).parent)}r&&E(this,ge,N(this,U,Un).call(this,()=>{try{return Te(()=>{var c=M;c.b=this,c.f|=Or,r(f(this,Ce),()=>l,()=>o)})}catch(c){return ot(c,f(this,fe).parent),null}}))};ft(()=>{var l;try{l=this.transform_error(t)}catch(c){ot(c,f(this,fe)&&f(this,fe).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,c=>ot(c,f(this,fe)&&f(this,fe).parent)):a(l)})};function Bo(e,t,n,r){const i=mn;var s=e.filter(d=>!d.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=M,a=jo(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function c(d){if((o.f&Ne)===0){a();try{r(d)}catch(_){ot(_,o)}er()}}var h=Zi();if(n.length===0){l.then(()=>c(t.map(i))).finally(h);return}function u(){Promise.all(n.map(d=>qo(d))).then(d=>c([...t.map(i),...d])).catch(d=>ot(d,o)).finally(h)}l?l.then(()=>{a(),u(),er()}):u()}function jo(){var e=M,t=O,n=he,r=A;return function(s=!0){Ge(e),Le(t),$t(n),s&&(e.f&Ne)===0&&(r?.activate(),r?.apply())}}function er(e=!0){Ge(null),Le(null),$t(null),e&&A?.deactivate()}function Zi(){var e=M,t=e.b,n=A,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function mn(e){var t=ne|te;return M!==null&&(M.f|=tn),{ctx:he,deps:null,effects:null,equals:ji,f:t,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:M,ac:null}}const Bn=Symbol("obsolete");function qo(e,t,n){let r=M;r===null&&$s();var i=void 0,s=Rt(Z),o=!O,a=new Set;return Qo(()=>{var l=M,c=Pi();i=c.promise;try{Promise.resolve(e()).then(c.resolve,_=>{_!==dr&&c.reject(_)}).finally(er)}catch(_){c.reject(_),er()}var h=A;if(o){if((l.f&Pt)!==0)var u=Zi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(Bn);else for(const _ of a.values())_.reject(Bn);a.add(c),h.async_deriveds.set(l,c)}const d=(_,v=void 0)=>{u?.(),a.delete(c),v!==Bn&&(h.activate(),v?(s.f|=at,Qt(s,v)):((s.f&at)!==0&&(s.f^=at),Qt(s,_)),h.deactivate())};c.promise.then(d,_=>d(null,_||"unknown"))}),ri(()=>{for(const l of a)l.reject(Bn)}),new Promise(l=>{function c(h){function u(){h===i?l(s):c(i)}h.then(u,u)}c(i)})}function be(e){const t=mn(e);return hs(t),t}function $i(e){const t=mn(e);return t.equals=qi,t}function Ho(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!ts&&zo()}return t}function zo(){ts=!1;for(const e of tr){(e.f&Q)!==0&&z(e,Ue);let t;try{t=On(e)}catch{t=!0}t&&en(e)}tr.clear()}function dn(e){$(e,e.v+1)}function ns(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s{if(Tt===s)return a();var l=O,c=Tt;Le(null),gi(s);var h=a();return Le(l),gi(c),h};return r&&n.set("length",oe(e.length)),new Proxy(e,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&so();var h=n.get(l);return h===void 0?o(()=>{var u=oe(c.value);return n.set(l,u),u}):$(h,c.value,!0),!0},deleteProperty(a,l){var c=n.get(l);if(c===void 0){if(l in a){const h=o(()=>oe(Z));n.set(l,h),dn(i)}}else $(c,Z),dn(i);return!0},get(a,l,c){if(l===Ct)return e;var h=n.get(l),u=l in a;if(h===void 0&&(!u||qt(a,l)?.writable)&&(h=o(()=>{var _=lt(u?a[l]:Z),v=oe(_);return v}),n.set(l,h)),h!==void 0){var d=g(h);return d===Z?void 0:d}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var h=n.get(l);h&&(c.value=g(h))}else if(c===void 0){var u=n.get(l),d=u?.v;if(u!==void 0&&d!==Z)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(a,l){if(l===Ct)return!0;var c=n.get(l),h=c!==void 0&&c.v!==Z||Reflect.has(a,l);if(c!==void 0||M!==null&&(!h||qt(a,l)?.writable)){c===void 0&&(c=o(()=>{var d=h?lt(a[l]):Z,_=oe(d);return _}),n.set(l,c));var u=g(c);if(u===Z)return!1}return h},set(a,l,c,h){var u=n.get(l),d=l in a;if(r&&l==="length")for(var _=c;_oe(Z)),n.set(_+"",v))}if(u===void 0)(!d||qt(a,l)?.writable)&&(u=o(()=>oe(void 0)),$(u,lt(c)),n.set(l,u));else{d=u.v!==Z;var b=o(()=>lt(c));$(u,b)}var p=Reflect.getOwnPropertyDescriptor(a,l);if(p?.set&&p.set.call(h,c),!d){if(r&&typeof l=="string"){var m=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=m.v&&$(m,w+1)}dn(i)}return!0},ownKeys(a){g(i);var l=Reflect.ownKeys(a).filter(u=>{var d=n.get(u);return d===void 0||d.v!==Z});for(var[c,h]of n)h.v!==Z&&!(c in a)&&l.push(c);return l},setPrototypeOf(){oo()}})}function _i(e){try{if(e!==null&&typeof e=="object"&&Ct in e)return e[Ct]}catch{}return e}function Uo(e,t){return Object.is(_i(e),_i(t))}var Hr,rs,is,ss;function Go(){if(Hr===void 0){Hr=window,rs=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;is=qt(t,"firstChild").get,ss=qt(t,"nextSibling").get,ci(e)&&(e[Nr]=void 0,e[qn]=null,e[Ir]=void 0,e.__e=void 0),ci(n)&&(n[ln]=void 0)}}function $e(e=""){return document.createTextNode(e)}function nr(e){return is.call(e)}function Tn(e){return ss.call(e)}function R(e,t){return nr(e)}function Kt(e,t=!1){{var n=nr(e);return n instanceof Comment&&n.data===""?Tn(n):n}}function I(e,t=1,n=!1){let r=e;for(;t--;)r=Tn(r);return r}function Vo(e){e.textContent=""}function os(){return!1}function Yo(e,t,n){return document.createElementNS(Bi,e,void 0)}let vi=!1;function Jo(){vi||(vi=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Hn]?.()})},{capture:!0}))}function hr(e){var t=O,n=M;Le(null),Ge(null);try{return e()}finally{Le(t),Ge(n)}}function ti(e,t,n,r=n){e.addEventListener(t,()=>hr(n));const i=e[Hn];i?e[Hn]=()=>{i(),r(!0)}:e[Hn]=()=>r(!0),Jo()}function Xo(e){M===null&&(O===null&&no(),to()),Qe&&eo()}function Zo(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function et(e,t){var n=M;n!==null&&(n.f&le)!==0&&(e|=le);var r={ctx:he,deps:null,nodes:null,f:e|te|Me,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};A?.register_created_effect(r);var i=r;if((e&Xt)!==0)jt!==null?jt.push(r):Lt.ensure().schedule(r);else if(t!==null){try{en(r)}catch(o){throw de(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&tn)===0&&(i=i.first,(e&De)!==0&&(e&Zt)!==0&&i!==null&&(i.f|=Zt))}if(i!==null&&(i.parent=n,n!==null&&Zo(i,n),O!==null&&(O.f&ne)!==0&&(e&dt)===0)){var s=O;(s.effects??(s.effects=[])).push(i)}return r}function ni(){return O!==null&&!Be}function ri(e){const t=et(cr,null);return z(t,Q),t.teardown=e,t}function ii(e){Xo();var t=M.f,n=!O&&(t&je)!==0&&(t&Pt)===0;if(n){var r=he;(r.e??(r.e=[])).push(e)}else return ls(e)}function ls(e){return et(Xt|Ys,e)}function $o(e){Lt.ensure();const t=et(dt|tn,e);return(n={})=>new Promise(r=>{n.outro?xt(t,()=>{de(t),r(void 0)}):(de(t),r(void 0))})}function as(e){return et(Xt,e)}function Qo(e){return et(Ht|tn,e)}function _r(e,t=0){return et(cr|t,e)}function se(e,t=[],n=[],r=[]){Bo(r,t,n,i=>{et(cr,()=>e(...i.map(g)))})}function si(e,t=0){var n=et(De|t,e);return n}function Te(e){return et(je|tn,e)}function fs(e){var t=e.teardown;if(t!==null){const n=Qe,r=O;pi(!0),Le(null);try{t.call(null)}finally{pi(n),Le(r)}}}function oi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&hr(()=>{i.abort(dr)});var r=n.next;(n.f&dt)!==0?n.parent=null:de(n,t),n=r}}function el(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&je)===0&&de(t),t=n}}function de(e,t=!0){var n=!1;(t||(e.f&Vs)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(tl(e.nodes.start,e.nodes.end),n=!0),z(e,Mr),oi(e,t&&!n),bn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();fs(e),e.f^=Mr,e.f|=Ne;var i=e.parent;i!==null&&i.first!==null&&us(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function tl(e,t){for(;e!==null;){var n=e===t?null:Tn(e);e.remove(),e=n}}function us(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function xt(e,t,n=!0){var r=[];cs(e,r,!0);var i=()=>{n&&de(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function cs(e,t,n){if((e.f&le)===0){e.f^=le;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next;if((i.f&dt)===0){var o=(i.f&Zt)!==0||(i.f&je)!==0&&(e.f&De)!==0;cs(i,t,o?n:!1)}i=s}}}function li(e){ds(e,!0)}function ds(e,t){if((e.f&le)!==0){e.f^=le,(e.f&Q)===0&&(z(e,te),Lt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Zt)!==0||(n.f&je)!==0;ds(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function ai(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Tn(n);t.append(n),n=i}}let Gn=!1,Qe=!1;function pi(e){Qe=e}let O=null,Be=!1;function Le(e){O=e}let M=null;function Ge(e){M=e}let Ie=null;function hs(e){O!==null&&(Ie===null?Ie=[e]:Ie.push(e))}let ue=null,ve=0,Se=null;function nl(e){Se=e}let _s=1,pt=0,Tt=pt;function gi(e){Tt=e}function vs(){return++_s}function On(e){var t=e.f;if((t&te)!==0)return!0;if(t&ne&&(e.f&=~It),(t&Ue)!==0){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}(t&Me)!==0&&Fe===null&&z(e,Q)}return!1}function ps(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ie!==null&&St.call(Ie,e)))for(var i=0;i{e.ac.abort(dr)}),e.ac=null);try{e.f|=Qn;var h=e.fn,u=h();e.f|=Pt;var d=e.deps,_=A?.is_fork;if(ue!==null){var v;if(_||bn(e,ve),d!==null&&ve>0)for(d.length=ve+ue.length,v=0;vn?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ft(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function al(e,t,n,r,i){var s={capture:r,passive:i},o=ll(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ri(()=>{t.removeEventListener(e,o,s)})}function ut(e,t,n){(t[gt]??(t[gt]={}))[e]=n}function vr(e){for(var t=0;t{throw p});throw d}}finally{e[gt]=t,delete e.currentTarget,Le(h),Ge(u)}}}const fl=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function ul(e){return fl?.createHTML(e)??e}function cl(e){var t=Yo("template");return t.innerHTML=ul(e.replaceAll("","")),t.content}function rr(e,t){var n=M;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=(t&mo)!==0,r=(t&bo)!==0,i,s=!e.startsWith("");return()=>{i===void 0&&(i=cl(s?e:""+e),n||(i=nr(i)));var o=r||rs?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=nr(o),l=o.lastChild;rr(a,l)}else rr(o,o);return o}}function dl(e=""){{var t=$e(e+"");return rr(t,t),t}}function hl(){var e=document.createDocumentFragment(),t=document.createComment(""),n=$e();return e.append(t,n),rr(t,n),e}function W(e,t){e!==null&&e.before(t)}function ce(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[ln]??(e[ln]=e.nodeValue))&&(e[ln]=n,e.nodeValue=`${n}`)}function ws(e,t){return _l(e,t)}const jn=new Map;function _l(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){Go();var l=void 0,c=$o(()=>{var h=n??t.appendChild($e());Lo(h,{pending:()=>{}},_=>{An({});var v=he;s&&(v.c=s),i&&(r.$$events=i),l=e(_,r)||{},xn()},a);var u=new Set,d=_=>{for(var v=0;v<_.length;v++){var b=_[v];if(!u.has(b)){u.add(b);var p=ol(b);for(const C of[t,document]){var m=jn.get(C);m===void 0&&(m=new Map,jn.set(C,m));var w=m.get(b);w===void 0?(C.addEventListener(b,Wr,{passive:p}),m.set(b,1)):m.set(b,w+1)}}}};return d(ur(ys)),Kr.add(d),()=>{for(var _ of u)for(const p of[t,document]){var v=jn.get(p),b=v.get(_);--b==0?(p.removeEventListener(_,Wr),v.delete(_),v.size===0&&jn.delete(p)):v.set(_,b)}Kr.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return zr.set(l,c),l}let zr=new WeakMap;function pr(e,t){const n=zr.get(e);return n?(zr.delete(e),n(t)):Promise.resolve()}var Pe,We,me,kt,Sn,Cn,fr;class vl{constructor(t,n=!0){ae(this,"anchor");S(this,Pe,new Map);S(this,We,new Map);S(this,me,new Map);S(this,kt,new Set);S(this,Sn,!0);S(this,Cn,t=>{if(f(this,Pe).has(t)){var n=f(this,Pe).get(t),r=f(this,We).get(n);if(r)li(r),f(this,kt).delete(n);else{var i=f(this,me).get(n);i&&(f(this,We).set(n,i.effect),f(this,me).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of f(this,Pe)){if(f(this,Pe).delete(s),s===t)break;const a=f(this,me).get(o);a&&(de(a.effect),f(this,me).delete(o))}for(const[s,o]of f(this,We)){if(s===n||f(this,kt).has(s))continue;const a=()=>{if(Array.from(f(this,Pe).values()).includes(s)){var c=document.createDocumentFragment();ai(o,c),c.append($e()),f(this,me).set(s,{effect:o,fragment:c})}else de(o);f(this,kt).delete(s),f(this,We).delete(s)};f(this,Sn)||!r?(f(this,kt).add(s),xt(o,a,!1)):a()}}});S(this,fr,t=>{f(this,Pe).delete(t);const n=Array.from(f(this,Pe).values());for(const[r,i]of f(this,me))n.includes(r)||(de(i.effect),f(this,me).delete(r))});this.anchor=t,E(this,Sn,n)}ensure(t,n){var r=A,i=os();if(n&&!f(this,We).has(t)&&!f(this,me).has(t))if(i){var s=document.createDocumentFragment(),o=$e();s.append(o),f(this,me).set(t,{effect:Te(()=>n(o)),fragment:s})}else f(this,We).set(t,Te(()=>n(this.anchor)));if(f(this,Pe).set(r,t),i){for(const[a,l]of f(this,We))a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of f(this,me))a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(f(this,Cn)),r.ondiscard(f(this,fr))}else f(this,Cn).call(this,r)}}Pe=new WeakMap,We=new WeakMap,me=new WeakMap,kt=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,fr=new WeakMap;function ie(e,t,n=!1){var r=new vl(e),i=n?Zt:0;function s(o,a){r.ensure(o,a)}si(()=>{var o=!1;t((a,l=0)=>{o=!0,s(l,a)}),o||s(-1,null)},i)}function pl(e,t){return t}function gl(e,t,n){for(var r=[],i=t.length,s,o=t.length,a=0;a{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var d=e.outrogroups;Ur(e,ur(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var c=n,h=c.parentNode;Vo(h),h.append(c),e.items.clear()}Ur(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function Ur(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const o of e.pending.values())for(const a of o)r.add(e.items.get(a).e)}for(var i=0;i{var C=n();return Xr(C)?C:C==null?[]:ur(C)}),d,_=new Map,v=!0;function b(C){(w.effect.f&Ne)===0&&(w.pending.delete(C),w.fallback=h,ml(w,d,o,t,r),h!==null&&(d.length===0?(h.f&ze)===0?li(h):(h.f^=ze,fn(h,null,o)):xt(h,()=>{h=null})))}function p(C){w.pending.delete(C)}var m=si(()=>{d=g(u);for(var C=d.length,T=new Set,q=A,ee=os(),Y=0;Ys(o)):(h=Te(()=>s(bi??(bi=$e()))),h.f|=ze)),C>T.size&&Qs(),!v)if(_.set(q,T),ee){for(const[_t,qe]of a)T.has(_t)||q.skip_effect(qe.e);q.oncommit(b),q.ondiscard(p)}else b(q);g(u)}),w={effect:m,items:a,pending:_,outrogroups:null,fallback:h};v=!1}function on(e){for(;e!==null&&(e.f&je)===0;)e=e.next;return e}function ml(e,t,n,r,i){var s=(r&co)!==0,o=t.length,a=e.items,l=on(e.effect.first),c,h=null,u,d=[],_=[],v,b,p,m;if(s)for(m=0;m0){var we=(r&Fi)!==0&&o===0?n:null;if(s){for(m=0;m<_e;m+=1)Y[m].nodes?.a?.measure();for(m=0;m<_e;m+=1)Y[m].nodes?.a?.fix()}gl(e,Y,we)}}s&&ft(()=>{if(u!==void 0)for(p of u)p.nodes?.a?.apply()})}function bl(e,t,n,r,i,s,o,a){var l=(o&fo)!==0?(o&ho)===0?Wo(n,!1,!1):Rt(n):null,c=(o&uo)!==0?Rt(i):null;return{v:l,i:c,e:Te(()=>(s(t,l??n,c??i,a),()=>{e.delete(r)}))}}function fn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&ze)===0?t.nodes.start:n;r!==null;){var o=Tn(r);if(s.before(r),r===i)return;r=o}}function nt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const yi=[...` -\r\f \v\uFEFF`];function yl(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;(o===0||yi.includes(r[o-1]))&&(a===r.length||yi.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function wl(e,t){return e==null?null:String(e)}function fi(e,t,n,r,i,s){var o=e[Nr];if(o!==n||o===void 0){var a=yl(n,r,s);a==null?e.removeAttribute("class"):e.className=a,e[Nr]=n}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function El(e,t,n,r){var i=e[Ir];if(i!==t){var s=wl(t);s==null?e.removeAttribute("style"):e.style.cssText=s,e[Ir]=t}return r}function ks(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Xr(t))return wo();for(var r of e.options)r.selected=t.includes(hn(r));return}for(r of e.options){var i=hn(r);if(Uo(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function kl(e){var t=new MutationObserver(()=>{ks(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ri(()=>{t.disconnect()})}function Sl(e,t,n=t){var r=new WeakSet,i=!0;ti(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),hn);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&hn(l)}n(a),e.__value=a,A!==null&&r.add(A)}),as(()=>{var s=t();if(e===document.activeElement){var o=A;if(r.has(o))return}if(ks(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=hn(a),n(s))}e.__value=s,i=!1}),kl(e)}function hn(e){return"__value"in e?e.__value:e.value}const Cl=Symbol("is custom element"),Al=Symbol("is html");function Ot(e,t,n,r){var i=xl(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Xs]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Tl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function xl(e){return e[qn]??(e[qn]={[Cl]:e.nodeName.includes("-"),[Al]:e.namespaceURI===Bi})}var wi=new Map;function Tl(e){var t=e.getAttribute("is")||e.nodeName,n=wi.get(t);if(n)return n;wi.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Ks(i);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.push(o);i=Ri(i)}return n}function Ei(e,t,n=t){var r=new WeakSet;ti(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=Sr(e)?Cr(s):s,n(s),A!==null&&r.add(A),await il(),s!==(s=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=s??"",a!==null){var c=e.value.length;o===a&&a===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=o,e.selectionEnd=Math.min(a,c))}}}),nn(t)==null&&e.value&&(n(Sr(e)?Cr(e.value):e.value),A!==null&&r.add(A)),_r(()=>{var i=t();if(e===document.activeElement){var s=A;if(r.has(s))return}Sr(e)&&i===Cr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Ss(e,t,n=t){ti(e,"change",r=>{var i=r?e.defaultChecked:e.checked;n(i)}),nn(t)==null&&n(e.checked),_r(()=>{var r=t();e.checked=!!r})}function Sr(e){var t=e.type;return t==="number"||t==="range"}function Cr(e){return e===""?null:+e}function Ar(e,t){return e===t||e?.[Ct]===t}function Ol(e={},t,n,r){var i=he.r,s=M;return as(()=>{var o,a;return _r(()=>{o=a,a=[],nn(()=>{Ar(n(...a),e)||(t(e,...a),o&&Ar(n(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&Mr;)l=l.parent;const c=()=>{a&&Ar(n(...a),e)&&t(null,...a)},h=l.teardown;l.teardown=()=>{c(),h?.()}}}),e}function _n(e,t,n,r){var i=!0,s=(n&po)!==0,o=(n&go)!==0,a=r,l=!0,c=void 0,h=()=>o&&i?(c??(c=mn(r)),g(c)):(l&&(l=!1,a=o?nn(r):r),a);let u;if(s){var d=Ct in e||Js in e;u=qt(e,t)?.set??(d&&t in e?T=>e[t]=T:void 0)}var _,v=!1;s?[_,v]=Ao(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=h(),u&&(io(),u(_)));var b;if(b=()=>{var T=e[t];return T===void 0?h():(l=!0,T)},(n&vo)===0)return b;if(u){var p=e.$$legacy;return(function(T,q){return arguments.length>0?((!q||p||v)&&u(q?b():T),T):b()})}var m=!1,w=((n&_o)!==0?mn:$i)(()=>(m=!1,b()));s&&g(w);var C=M;return(function(T,q){if(arguments.length>0){const ee=q?g(w):s?lt(T):T;return $(w,ee),m=!0,a!==void 0&&(a=ee),T}return Qe&&m||(C.f&Ne)!==0?w.v:g(w)})}function Ml(e){he===null&&Zs(),ii(()=>{const t=nn(e);if(typeof t=="function")return t})}const Cs="[data-v-app]",Nl=["header","content","footer"];let Oe=null,Re=null;function Il(e){const t=e instanceof Set?e:new Set(e||[]);for(let n=0;n<16;n++){const r=crypto.randomUUID().replace(/-/g,"").slice(0,8);if(!t.has(r))return r}throw new Error("rebemer: id collision exhausted")}function Ll(){if(typeof document>"u")return!1;const t=document.querySelector(Cs)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(Oe=null,!1):(Oe=t,Re=null,!0)}function Rl(){if(Re!==null)return Re;const e=typeof document<"u"?document.querySelector(Cs)?.__vue_app__:null;if(!e)return Re=!1,!1;const t=e.config?.globalProperties??{};if(typeof Oe?.$history?.pause=="function"&&typeof Oe?.$history?.resume=="function")return Re={pause:()=>Oe.$history.pause(),resume:()=>Oe.$history.resume()},Re;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(Re={pause:()=>n.history.pause(),resume:()=>n.history.resume()},Re):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(Re={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},Re):(Re=!1,!1)}function Pl(e){const t=Rl();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function ct(e){if(!Oe||!e)return null;for(const t of Nl){const n=Oe[t];if(!Array.isArray(n))continue;const r=n.find(i=>i&&i.id===e);if(r)return r}return null}function Dl(e){const t=ct(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return As(t,1,n),n}function As(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const i=ct(r);i&&(n.push({id:i.id,depth:t,label:i.label,name:i.name,settings:i.settings}),As(i,t+1,n))}}function xs(){return Oe?Oe.globalClasses:[]}function xr(e,t){if(!Oe)throw new Error("rebemer: not ready");const n=Oe.globalClasses,r=n.find(o=>o&&o.name===e);if(r)return r.id;const i=new Set(n.map(o=>o?.id).filter(Boolean)),s=Il(i);return n.push({id:s,name:e,settings:t||{}}),s}function ki(e,t){const n=ct(e);if(!n)return;n.settings||(n.settings={});const r=Array.isArray(t)?t:[];Array.isArray(n.settings._cssGlobalClasses)?n.settings._cssGlobalClasses.splice(0,n.settings._cssGlobalClasses.length,...r):n.settings._cssGlobalClasses=[...r]}function Si(e,t){const n=ct(e);n&&(n.label=t)}const ir="slashed-rebemer-host",Fl="slashed-class-hint",Ts=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],Bl=3;function jl(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n[0]==="."&&(n=n.slice(1)),!n.startsWith("sf-")&&!n.startsWith("is-"))||!Object.prototype.hasOwnProperty.call(t,n))return null;const r=t[n];return!r||typeof r.description!="string"?null:{name:n,description:r.description,category:r.category}}let Gr=!1,sr={},Ze=null,vn=null,ye=null;function ql(){if(Ze&&Ze.isConnected)return Ze;let e=document.getElementById(ir);e||(e=document.createElement("div"),e.id=ir,document.body.appendChild(e));const t=document.createElement("div");return t.id=Fl,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

',e.appendChild(t),Ze=t,t}function Os(e){let t=e;for(let n=0;t&&na&&n.top-s-i>=0&&(l=n.top-s-i);let c=n.left;c+r>o-4&&(c=Math.max(4,o-4-r)),c<4&&(c=4),e.style.top=`${Math.round(l)}px`,e.style.left=`${Math.round(c)}px`}function Ms(e,t){const n=ql();n.querySelector(".rebemer-class-hint__name").textContent=`.${t.name}`;const r=n.querySelector(".rebemer-class-hint__cat");r.textContent=t.category||"",r.hidden=!t.category,n.querySelector(".rebemer-class-hint__desc").textContent=t.description,n.hidden=!1,Hl(n,e),ye=e}function ht(){Ze&&(Ze.hidden=!0),ye=null}function Kl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${ir}`))return;if(!t.closest(Ts.join(","))){ye&&ht();return}const n=Os(t);if(!n){ye&&ht();return}n.el!==ye&&Ms(n.el,n.hint)}function Wl(e){if(!ye)return;const t=e.relatedTarget;t instanceof Node&&ye.contains(t)||ht()}function zl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${ir}`))return;if(!t.closest(Ts.join(","))){ye&&ht();return}const n=Os(t);if(!n){ye&&ht();return}n.el!==ye&&Ms(n.el,n.hint)}function Ul(e){if(!ye)return;const t=e.relatedTarget;t instanceof Node&&ye.contains(t)||ht()}function Gl(e){e.key==="Escape"&&ht()}function Vl(e,t,n={}){if(Vn(),Gr=!!e,sr=t&&typeof t=="object"?t:{},!Gr||Object.keys(sr).length===0)return;vn=new AbortController;const{signal:r}=vn,i={passive:!0,signal:r};document.addEventListener("mouseover",Kl,i),document.addEventListener("mouseout",Wl,i),document.addEventListener("focusin",zl,i),document.addEventListener("focusout",Ul,i),document.addEventListener("keydown",Gl,i),window.addEventListener("scroll",ht,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?Vn():n.signal.addEventListener("abort",Vn,{once:!0}))}function Vn(){vn&&(vn.abort(),vn=null),Ze&&(Ze.remove(),Ze=null),ye=null,Gr=!1,sr={}}const Yn="li.variable-picker-item",Jn="slashed-var-swatch",Yl=50,Jl=(e,...t)=>console[e]("[slashed-swatches]",...t);function Xl(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n.slice(0,2)!=="--"&&(n="--"+n.replace(/^-+/,"")),n.indexOf("--sf-color-")!==0))return null;const r=t[n];return typeof r=="string"&&r?r:null}let Vr=!1,or={},pn=null,Wt=null,Xn=null;function Zl(e){const t=e.querySelector(":scope > span[title]")||e.querySelector(":scope > span");if(t){const n=t.getAttribute("title");return n&&n.trim()?n.trim():(t.textContent||"").trim()}return(e.textContent||"").trim()}function $l(e){if(e.classList.contains("title")||e.classList.contains("category")){const r=e.querySelector(":scope > ."+Jn);r&&r.remove();return}const t=Xl(Zl(e),or);let n=e.querySelector(":scope > ."+Jn);if(!t){n&&n.remove();return}n||(n=document.createElement("span"),n.className=Jn,n.setAttribute("aria-hidden","true"),e.insertBefore(n,e.firstChild)),n.dataset.color!==t&&(n.style.setProperty("--slashed-swatch-color",t),n.dataset.color=t)}function Ns(){try{const e=document.querySelectorAll(Yn);for(const t of e)$l(t)}catch(e){Jl("warn","swatch pass failed",e)}}function Ql(){Wt===null&&(Wt=setTimeout(()=>{Wt=null,Ns()},Yl))}function ea(e){for(const t of e){const n=t.target;if(n&&n.nodeType===1&&n.closest&&n.closest(Yn))return!0;for(const r of t.addedNodes)if(r.nodeType===1&&(r.matches&&r.matches(Yn)||r.querySelector&&r.querySelector(Yn)))return!0}return!1}function ta(e,t,n={}){Zn(),Vr=!!e,or=t&&typeof t=="object"?t:{},!(!Vr||Object.keys(or).length===0)&&(Xn=new AbortController,pn=new MutationObserver(r=>{ea(r)&&Ql()}),pn.observe(document.body,{childList:!0,subtree:!0}),Ns(),n.signal&&(n.signal.aborted?Zn():n.signal.addEventListener("abort",Zn,{once:!0})))}function Zn(){Wt!==null&&(clearTimeout(Wt),Wt=null),pn&&(pn.disconnect(),pn=null),Xn&&(Xn.abort(),Xn=null);try{document.querySelectorAll("."+Jn).forEach(e=>e.remove())}catch{}Vr=!1,or={}}const na="5";var Li;typeof window<"u"&&((Li=window.__svelte??(window.__svelte={})).v??(Li.v=new Set)).add(na);var ra=V('reBEM');function ia(e,t){An(t,!0);function n(i){i.stopPropagation(),i.preventDefault(),t.onActivate?.(t.elementId)}var r=ra();se(()=>{Ot(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),Ot(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),ut("click",r,n),ut("keydown",r,i=>(i.key==="Enter"||i.key===" ")&&n(i)),W(e,r),xn()}vr(["click","keydown"]);function Mt(e){return e?String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x00-\x7f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}const sa=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,oa=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function la(e){return e?oa.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:sa.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const gr=new Set(["_padding","_padding_top","_padding_right","_padding_bottom","_padding_left","_margin","_margin_top","_margin_right","_margin_bottom","_margin_left","_width","_widthMin","_widthMax","_minWidth","_maxWidth","_height","_heightMin","_heightMax","_minHeight","_maxHeight","_aspectRatio","_overflow","_overflowX","_overflowY","_color","_background","_backgroundColor","_backgroundImage","_backgroundSize","_backgroundPosition","_backgroundRepeat","_backgroundAttachment","_backgroundBlendMode","_typography","_fontFamily","_fontSize","_fontWeight","_fontStyle","_lineHeight","_letterSpacing","_wordSpacing","_textAlign","_textTransform","_textDecoration","_textDecorationColor","_textShadow","_textIndent","_whiteSpace","_listStyleType","_listStylePosition","_border","_borderRadius","_borderColor","_borderStyle","_borderWidth","_outline","_outlineColor","_outlineStyle","_outlineWidth","_outlineOffset","_boxShadow","_filter","_backdropFilter","_opacity","_blendMode","_transform","_transformOrigin","_transition","_animation","_display","_flexDirection","_flexWrap","_flexGrow","_flexShrink","_flexBasis","_alignItems","_alignSelf","_alignContent","_justifyContent","_justifyItems","_justifySelf","_gap","_rowGap","_columnGap","_gridTemplateColumns","_gridTemplateRows","_gridGap","_gridAutoFlow","_gridAutoColumns","_gridAutoRows","_gridColumn","_gridRow","_gridArea","_position","_top","_right","_bottom","_left","_zIndex","_objectFit","_objectPosition","_cursor","_pointerEvents","_userSelect"]);function aa(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))gr.has(n)&&t.push(n);return t.sort(),t}const fa=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function ua(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))gr.has(n)||fa.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const ca=new Set(["add","rename","replace","modifier","migrate"]),Ci=new Set(["user","label"]);function Is({rootId:e,rows:t,mode:n}){if(!ca.has(n))return{ok:!1,ops:[],error:`Invalid mode: ${n}`};const r=t.find(a=>a.id===e);if(!r)return{ok:!1,ops:[],error:"Root row missing."};const i=Mt(r.name);if(!i)return{ok:!1,ops:[],error:"Block name is empty."};const s=[];for(const a of t){if(!a.include)continue;const l=a.id===e;let c;if(l)c=i;else{const u=Mt(a.name);if(!u)continue;c=`${i}__${u}`}let h=c;if(n==="modifier"){const u=Mt(a.modifier);if(!u)continue;h=`${c}--${u}`}s.push({row:a,isRoot:l,finalClass:h,suggestedFrom:a.suggestedFrom||"fallback"})}if(s.length===0)return{ok:!1,ops:[],error:"No rows to apply. Include at least one row."};const o=_a(s,n);return o.ok?{ok:!0,ops:s}:{ok:!1,ops:[],error:o.error}}function da({rootId:e,rows:t,mode:n,syncLabels:r}){const i=Is({rootId:e,rows:t,mode:n});if(!i.ok)return{ok:!1,error:i.error};const s=i.ops,o=t.find(u=>u.id===e),a=Mt(o?.name??""),l=xs();if(n==="migrate"){const u=ha(s,l);if(!u.ok)return u}const c=new Map;for(const u of s){const d=ct(u.row.id);if(!d)continue;const _={classIds:Ai(d.settings).slice(),label:r&&n!=="modifier"?d.label??"":null};if(n==="migrate"&&Array.isArray(u.row.migrateKeys)){const v={};for(const b of u.row.migrateKeys)Object.prototype.hasOwnProperty.call(d.settings||{},b)&&(v[b]=JSON.parse(JSON.stringify(d.settings[b])));_.migrateKeys=v}c.set(u.row.id,_)}let h=0;try{Pl(()=>{for(const u of s){const d=ct(u.row.id);if(!d)continue;const _=Ai(d.settings);let v={};if(n==="rename"&&_.length>0){const m=l.find(w=>w&&w.id===_[0]);m&&m.settings&&(v=JSON.parse(JSON.stringify(m.settings)))}else n==="migrate"&&(v=Ls(d.settings,u.row.migrateKeys));if(n==="migrate"){const m=l.find(w=>w&&w.name===u.finalClass);if(m){(!m.settings||typeof m.settings!="object")&&(m.settings={});for(const[w,C]of Object.entries(v))Object.prototype.hasOwnProperty.call(m.settings,w)||(m.settings[w]=C)}}const b=xr(u.finalClass,v);let p;switch(n){case"add":case"migrate":p=_.includes(b)?_:[..._,b];break;case"modifier":{const m=u.finalClass.indexOf("--"),w=m>=0?u.finalClass.slice(0,m):null;let C=[..._];if(w){const T=xr(w,{});C.includes(T)||C.push(T)}p=C.includes(b)?C:[...C,b];break}case"rename":{const m=[b],w=_.length>0?l.find(C=>C&&C.id===_[0]):null;if(w){const C=w.name+"--";for(let T=1;T<_.length;T++){const q=l.find(ee=>ee&&ee.id===_[T]);if(q)if(q.name.startsWith(C)){const ee=q.name.slice(w.name.length),Y=q.settings?JSON.parse(JSON.stringify(q.settings)):{};m.push(xr(u.finalClass+ee,Y))}else m.push(_[T])}}p=m;break}case"replace":p=[b];break}if(ki(u.row.id,p),n==="migrate"&&va(d.settings,u.row.migrateKeys),r&&n!=="modifier"){const m=pa(u.finalClass,a);m&&Si(u.row.id,m)}h++}})}catch(u){for(const[_,v]of c)try{if(ki(_,v.classIds),v.migrateKeys){const b=ct(_);b&&b.settings&&Object.assign(b.settings,v.migrateKeys)}v.label!==null&&Si(_,v.label)}catch{}const d=u instanceof Error?u.message:String(u);return console.warn("[reBEMer] apply failed after",h,"mutation(s), rolled back:",d),{ok:!1,error:`Operation failed and was rolled back: ${d}`}}return h===0?{ok:!1,error:"No elements were modified. The subtree may have changed."}:{ok:!0,count:h}}function ha(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const i=ct(n.row.id);if(!i)continue;const s=Ls(i.settings,n.row.migrateKeys),o=r.settings&&typeof r.settings=="object"?r.settings:{},a=[];for(const[l,c]of Object.entries(s))Object.prototype.hasOwnProperty.call(o,l)&&JSON.stringify(o[l])!==JSON.stringify(c)&&a.push(l.replace(/^_/,""));if(a.length>0){const l=a.join(", ");return{ok:!1,error:`Migrate blocked: existing class "${n.finalClass}" has conflicting values for ${l}. Pick a different name or use Add mode.`}}}return{ok:!0}}function _a(e,t){const n=new Map;for(const r of e){const i=n.get(r.finalClass)||[];i.push(r),n.set(r.finalClass,i)}for(const[r,i]of n){if(i.length===1||t==="modifier")continue;const s=i.filter(a=>Ci.has(a.suggestedFrom));if(s.length>1)return{ok:!1,error:`"${r}" is used by ${s.length} rows. Edit one to make it unique.`};let o=1;for(const a of i)Ci.has(a.suggestedFrom)||(a.finalClass=`${r}-${o++}`,a.suggestedFrom="auto-number")}if(t!=="modifier"){const r=new Map;for(const i of e){const s=r.get(i.finalClass);if(s)return{ok:!1,error:`"${i.finalClass}" is produced by 2 rows after auto-numbering (one ${s}, one ${i.suggestedFrom}). Pick a different name for one of them.`};r.set(i.finalClass,i.suggestedFrom)}}return{ok:!0}}function Ls(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)gr.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function va(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)gr.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function Ai(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function pa(e,t){let n=e;return n===t?xi(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),xi(n.replace(/-/g," ")))}function xi(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const ga=Object.freeze({heading:"heading","text-basic":"text",text:"text","text-link":"link",code:"code",image:"image",icon:"icon","icon-box":"icon",video:"video",audio:"audio",svg:"svg",logo:"logo",shape:"shape",button:"button","button-group":"buttons","nav-nested":"nav","nav-menu":"nav",list:"list",accordion:"accordion",tabs:"tabs",slider:"slider",carousel:"carousel",countdown:"countdown",counter:"counter",testimonials:"testimonials",pricing:"pricing",team:"team",form:"form",posts:"posts",template:"item"}),Rs=new Set(["section","container","block","div"]);function ma(e,t="item"){return!e||typeof e!="string"||Rs.has(e)?t:ga[e]||t}function Tr(e){return typeof e=="string"&&Rs.has(e)}const ba=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function ya(e,t,n){const r=new Set(e.filter(Boolean)),i=(..._)=>_.some(v=>r.has(v)),s=i("button","button-group"),o=i("heading"),a=i("text-basic","text"),l=i("image"),c=i("nav-nested","nav-menu"),h=i("form"),u=i("icon","icon-box"),d=i("list");return h?"form":c?"nav":s&&!o&&!a?"actions":l&&!a&&!o&&!s?"media":o&&!a&&!s?"header":a&&!o&&!s?"body":o&&a?"content":o&&s?"header":u&&!a&&!o?"icon-group":d?"list-wrap":n>1?t===0?"header":t===n-1?"footer":"body":"content"}var wa=V('suggested'),Ea=V(' '),ka=V(''),Sa=V('

Enter a modifier name — the base class will be added automatically if absent.

'),Ca=V('

This element has no existing classes. Rename will create a new class instead.

'),Aa=V('

'),xa=V(`A class named already exists. +var oo=Object.defineProperty;var Es=e=>{throw TypeError(e)};var ao=(e,t,n)=>t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>ao(e,typeof t!="symbol"?t+"":t,n),Nr=(e,t,n)=>t.has(e)||Es("Cannot "+n);var c=(e,t,n)=>(Nr(e,t,"read from private field"),n?n.call(e):t.get(e)),O=(e,t,n)=>t.has(e)?Es("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),T=(e,t,n,r)=>(Nr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),B=(e,t,n)=>(Nr(e,t,"access private method"),n);var cs=Array.isArray,lo=Array.prototype.indexOf,Dt=Array.prototype.includes,xr=Array.from,co=Object.defineProperty,an=Object.getOwnPropertyDescriptor,uo=Object.getOwnPropertyDescriptors,fo=Object.prototype,ho=Array.prototype,Xs=Object.getPrototypeOf,Ss=Object.isExtensible;const _o=()=>{};function po(e){for(var t=0;t{e=r,t=s});return{promise:n,resolve:e,reject:t}}const de=2,vn=4,Tr=8,Qs=1<<24,Ue=16,Ve=32,Et=64,Kr=128,Fe=512,le=1024,fe=2048,et=4096,ge=8192,Be=16384,Vt=32768,Wr=1<<25,gn=65536,hr=1<<17,vo=1<<18,wn=1<<19,go=1<<20,Qe=1<<25,Wt=65536,_r=1<<21,ln=1<<22,wt=1<<23,Ft=Symbol("$state"),mo=Symbol("legacy props"),bo=Symbol(""),tr=Symbol("attributes"),Ur=Symbol("class"),zr=Symbol("style"),xn=Symbol("text"),nr=Symbol("form reset"),Or=new class extends Error{constructor(){super(...arguments);be(this,"name","StaleReactionError");be(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function yo(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function wo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ko(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Eo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function So(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Co(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ao(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function xo(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function To(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Oo(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Mo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Lo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Io=1,Ro=2,$s=4,No=8,Po=16,Do=1,Fo=4,Bo=8,jo=16,Ho=1,qo=2,ae=Symbol("uninitialized"),ei="http://www.w3.org/1999/xhtml";function Ko(){console.warn("https://svelte.dev/e/derived_inert")}function Wo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Uo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ti(e){return e===this.v}function zo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ni(e){return!zo(e,this.v)}let Se=null;function mn(e){Se=e}function Yt(e,t=!1,n){Se={p:Se,i:!1,c:null,e:null,s:e,x:null,r:D,l:null}}function Jt(e){var t=Se,n=t.e;if(n!==null){t.e=null;for(var r of n)Ei(r)}return t.i=!0,Se=t.p,{}}function ri(){return!0}let xt=[];function si(){var e=xt;xt=[],po(e)}function kt(e){if(xt.length===0&&!Ln){var t=xt;queueMicrotask(()=>{t===xt&&si()})}xt.push(e)}function Go(){for(;xt.length>0;)si()}function ii(e){var t=D;if(t===null)return P.f|=wt,e;if((t.f&Vt)===0&&(t.f&vn)===0)throw e;bt(e,t)}function bt(e,t){for(;t!==null;){if((t.f&Kr)!==0){if((t.f&Vt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Vo=-7169;function te(e,t){e.f=e.f&Vo|t}function us(e){(e.f&Fe)!==0||e.deps===null?te(e,le):te(e,et)}function oi(e){if(e!==null)for(const t of e)(t.f&de)===0||(t.f&Wt)===0||(t.f^=Wt,oi(t.deps))}function ai(e,t,n){(e.f&fe)!==0?t.add(e):(e.f&et)!==0&&n.add(e),oi(e.deps),te(e,le)}let Zn=!1;function Yo(e){var t=Zn;try{return Zn=!1,[e(),Zn]}finally{Zn=t}}let Pr=null,nn=null,I=null,Gr=null,ze=null,Vr=null,Ln=!1,Dr=!1,sn=null,rr=null;var Cs=0;let Jo=1;var un,vt,Mt,fn,dn,Lt,hn,st,Hn,Ae,qn,gt,Je,Xe,_n,It,H,Yr,Tn,Jr,li,ci,sr,Xo,Xr,rn;const Sr=class Sr{constructor(){O(this,H);be(this,"id",Jo++);O(this,un,!1);be(this,"linked",!0);O(this,vt,null);O(this,Mt,null);be(this,"async_deriveds",new Map);be(this,"current",new Map);be(this,"previous",new Map);be(this,"unblocked",new Set);O(this,fn,new Set);O(this,dn,new Set);O(this,Lt,new Set);O(this,hn,0);O(this,st,new Map);O(this,Hn,null);O(this,Ae,[]);O(this,qn,[]);O(this,gt,new Set);O(this,Je,new Set);O(this,Xe,new Map);O(this,_n,new Set);be(this,"is_fork",!1);O(this,It,!1)}skip_effect(t){c(this,Xe).has(t)||c(this,Xe).set(t,{d:[],m:[]}),c(this,_n).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=c(this,Xe).get(t);if(r){c(this,Xe).delete(t);for(var s of r.d)te(s,fe),n(s);for(s of r.m)te(s,et),n(s)}c(this,_n).add(t)}capture(t,n,r=!1){t.v!==ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&wt)===0&&(this.current.set(t,[n,r]),ze?.set(t,n)),this.is_fork||(t.v=n)}activate(){I=this}deactivate(){I=null,ze=null}flush(){try{Dr=!0,I=this,B(this,H,Tn).call(this)}finally{Cs=0,Vr=null,sn=null,rr=null,Dr=!1,I=null,ze=null,Bt.clear()}}discard(){for(const t of c(this,dn))t(this);c(this,dn).clear(),c(this,Lt).clear(),B(this,H,rn).call(this)}register_created_effect(t){c(this,qn).push(t)}increment(t,n){if(T(this,hn,c(this,hn)+1),t){let r=c(this,st).get(n)??0;c(this,st).set(n,r+1)}}decrement(t,n){if(T(this,hn,c(this,hn)-1),t){let r=c(this,st).get(n)??0;r===1?c(this,st).delete(n):c(this,st).set(n,r-1)}c(this,It)||(T(this,It,!0),kt(()=>{T(this,It,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)c(this,gt).add(r);for(const r of n)c(this,Je).add(r);t.clear(),n.clear()}oncommit(t){c(this,fn).add(t)}ondiscard(t){c(this,dn).add(t)}on_fork_commit(t){c(this,Lt).add(t)}run_fork_commit_callbacks(){for(const t of c(this,Lt))t(this);c(this,Lt).clear()}settled(){return(c(this,Hn)??T(this,Hn,Zs())).promise}static ensure(){var t;if(I===null){const n=I=new Sr;B(t=n,H,Xr).call(t),!Dr&&!Ln&&kt(()=>{c(n,un)||n.flush()})}return I}apply(){{ze=null;return}}schedule(t){if(Vr=t,t.b?.is_pending&&(t.f&(vn|Tr|Qs))!==0&&(t.f&Vt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(sn!==null&&n===D&&(P===null||(P.f&de)===0))return;if((r&(Et|Ve))!==0){if((r&le)===0)return;n.f^=le}}c(this,Ae).push(n)}};un=new WeakMap,vt=new WeakMap,Mt=new WeakMap,fn=new WeakMap,dn=new WeakMap,Lt=new WeakMap,hn=new WeakMap,st=new WeakMap,Hn=new WeakMap,Ae=new WeakMap,qn=new WeakMap,gt=new WeakMap,Je=new WeakMap,Xe=new WeakMap,_n=new WeakMap,It=new WeakMap,H=new WeakSet,Yr=function(){if(this.is_fork)return!0;for(const r of c(this,st).keys()){for(var t=r,n=!1;t.parent!==null;){if(c(this,Xe).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Tn=function(){var l,f,h;if(T(this,un,!0),Cs++>1e3&&(B(this,H,rn).call(this),Qo()),!B(this,H,Yr).call(this)){for(const u of c(this,gt))c(this,Je).delete(u),te(u,fe),this.schedule(u);for(const u of c(this,Je))te(u,et),this.schedule(u)}const t=c(this,Ae);T(this,Ae,[]),this.apply();var n=sn=[],r=[],s=rr=[];for(const u of t)try{B(this,H,Jr).call(this,u,n,r)}catch(d){throw di(u),d}if(I=null,s.length>0){var i=Sr.ensure();for(const u of s)i.schedule(u)}if(sn=null,rr=null,B(this,H,Yr).call(this)){B(this,H,sr).call(this,r),B(this,H,sr).call(this,n);for(const[u,d]of c(this,Xe))fi(u,d);s.length>0&&B(l=I,H,Tn).call(l);return}const o=B(this,H,li).call(this);if(o){B(f=o,H,ci).call(f,this);return}c(this,gt).clear(),c(this,Je).clear();for(const u of c(this,fn))u(this);c(this,fn).clear(),Gr=this,As(r),As(n),Gr=null,c(this,Hn)?.resolve();var a=I;if(this.linked&&c(this,hn)===0&&B(this,H,rn).call(this),c(this,Ae).length>0){a===null&&(a=this,B(this,H,Xr).call(this));const u=a;c(u,Ae).push(...c(this,Ae).filter(d=>!c(u,Ae).includes(d)))}a!==null&&B(h=a,H,Tn).call(h)},Jr=function(t,n,r){t.f^=le;for(var s=t.first;s!==null;){var i=s.f,o=(i&(Ve|Et))!==0,a=o&&(i&le)!==0,l=a||(i&ge)!==0||c(this,Xe).has(s);if(!l&&s.fn!==null){o?s.f^=le:(i&vn)!==0?n.push(s):Vn(s)&&((i&Ue)!==0&&c(this,Je).add(s),yn(s));var f=s.first;if(f!==null){s=f;continue}}for(;s!==null;){var h=s.next;if(h!==null){s=h;break}s=s.parent}}},li=function(){for(var t=c(this,vt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=c(t,vt)}return null},ci=function(t){var r;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const o=this.async_deriveds.get(s);o&&i.promise.then(o.resolve)}const n=s=>{var i=s.reactions;if(i!==null)for(const l of i){var o=l.f;if((o&de)!==0)n(l);else{var a=l;o&(ln|Ue)&&!this.async_deriveds.has(a)&&(c(this,Je).delete(a),te(a,fe),this.schedule(a))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),B(r=t,H,rn).call(r),I=this,B(this,H,Tn).call(this)},sr=function(t){for(var n=0;n!this.current.has(d));if(s.length===0)t&&u.discard();else if(n.length>0){if(t)for(const d of c(this,_n))u.unskip_effect(d,p=>{var v;(p.f&(Ue|ln))!==0?u.schedule(p):B(v=u,H,sr).call(v,[p])});u.activate();var i=new Set,o=new Map;for(var a of n)ui(a,s,i,o);o=new Map;var l=[...u.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(l.length>0)for(const d of c(this,qn))(d.f&(Be|ge|hr))===0&&fs(d,l,o)&&((d.f&(ln|Ue))!==0?(te(d,fe),u.schedule(d)):c(u,gt).add(d));if(c(u,Ae).length>0&&!c(u,It)){u.apply();for(var f of c(u,Ae))B(h=u,H,Jr).call(h,f,[],[]);T(u,Ae,[])}u.deactivate()}}}},Xr=function(){nn===null?Pr=nn=this:(T(nn,Mt,this),T(this,vt,nn)),nn=this},rn=function(){var t=c(this,vt),n=c(this,Mt);t===null?Pr=n:T(t,Mt,n),n===null?nn=t:T(n,vt,t),this.linked=!1};let Ut=Sr;function Zo(e){var t=Ln;Ln=!0;try{for(var n;;){if(Go(),I===null)return n;I.flush()}}finally{Ln=t}}function Qo(){try{Ao()}catch(e){bt(e,Vr)}}let rt=null;function As(e){var t=e.length;if(t!==0){for(var n=0;n0)){Bt.clear();for(const s of rt){if((s.f&(Be|ge))!==0)continue;const i=[s];let o=s.parent;for(;o!==null;)rt.has(o)&&(rt.delete(o),i.push(o)),o=o.parent;for(let a=i.length-1;a>=0;a--){const l=i[a];(l.f&(Be|ge))===0&&yn(l)}}rt.clear()}}rt=null}}function ui(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&de)!==0?ui(s,t,n,r):(i&(ln|Ue))!==0&&(i&fe)===0&&fs(s,t,r)&&(te(s,fe),ds(s))}}function fs(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(Dt.call(t,s))return!0;if((s.f&de)!==0&&fs(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ds(e){I.schedule(e)}function fi(e,t){if(!((e.f&Ve)!==0&&(e.f&le)!==0)){(e.f&fe)!==0?t.d.push(e):(e.f&et)!==0&&t.m.push(e),te(e,le);for(var n=e.first;n!==null;)fi(n,t),n=n.next}}function di(e){te(e,le);for(var t=e.first;t!==null;)di(t),t=t.next}function $o(e){let t=0,n=zt(0),r;return()=>{ps()&&(_(n),Lr(()=>(t===0&&(r=kn(()=>e(()=>In(n)))),t+=1,()=>{kt(()=>{t-=1,t===0&&(r?.(),r=void 0,In(n))})})))}}var ea=gn|wn;function ta(e,t,n,r){new na(e,t,n,r)}var Re,ls,Ne,Rt,ye,Pe,ve,xe,it,Nt,mt,pn,Kn,Wn,ot,Cr,ne,ra,sa,ia,Zr,ir,or,Qr,$r;class na{constructor(t,n,r,s){O(this,ne);be(this,"parent");be(this,"is_pending",!1);be(this,"transform_error");O(this,Re);O(this,ls,null);O(this,Ne);O(this,Rt);O(this,ye);O(this,Pe,null);O(this,ve,null);O(this,xe,null);O(this,it,null);O(this,Nt,0);O(this,mt,0);O(this,pn,!1);O(this,Kn,new Set);O(this,Wn,new Set);O(this,ot,null);O(this,Cr,$o(()=>(T(this,ot,zt(c(this,Nt))),()=>{T(this,ot,null)})));T(this,Re,t),T(this,Ne,n),T(this,Rt,i=>{var o=D;o.b=this,o.f|=Kr,r(i)}),this.parent=D.b,this.transform_error=s??this.parent?.transform_error??(i=>i),T(this,ye,ms(()=>{B(this,ne,Zr).call(this)},ea))}defer_effect(t){ai(t,c(this,Kn),c(this,Wn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Ne).pending}update_pending_count(t,n){B(this,ne,Qr).call(this,t,n),T(this,Nt,c(this,Nt)+t),!(!c(this,ot)||c(this,pn))&&(T(this,pn,!0),kt(()=>{T(this,pn,!1),c(this,ot)&&bn(c(this,ot),c(this,Nt))}))}get_effect_pending(){return c(this,Cr).call(this),_(c(this,ot))}error(t){if(!c(this,Ne).onerror&&!c(this,Ne).failed)throw t;I?.is_fork?(c(this,Pe)&&I.skip_effect(c(this,Pe)),c(this,ve)&&I.skip_effect(c(this,ve)),c(this,xe)&&I.skip_effect(c(this,xe)),I.on_fork_commit(()=>{B(this,ne,$r).call(this,t)})):B(this,ne,$r).call(this,t)}}Re=new WeakMap,ls=new WeakMap,Ne=new WeakMap,Rt=new WeakMap,ye=new WeakMap,Pe=new WeakMap,ve=new WeakMap,xe=new WeakMap,it=new WeakMap,Nt=new WeakMap,mt=new WeakMap,pn=new WeakMap,Kn=new WeakMap,Wn=new WeakMap,ot=new WeakMap,Cr=new WeakMap,ne=new WeakSet,ra=function(){try{T(this,Pe,De(()=>c(this,Rt).call(this,c(this,Re))))}catch(t){this.error(t)}},sa=function(t){const n=c(this,Ne).failed;n&&T(this,xe,De(()=>{n(c(this,Re),()=>t,()=>()=>{})}))},ia=function(){const t=c(this,Ne).pending;t&&(this.is_pending=!0,T(this,ve,De(()=>t(c(this,Re)))),kt(()=>{var n=T(this,it,document.createDocumentFragment()),r=lt();n.append(r),T(this,Pe,B(this,ne,or).call(this,()=>De(()=>c(this,Rt).call(this,r)))),c(this,mt)===0&&(c(this,Re).before(n),T(this,it,null),jt(c(this,ve),()=>{T(this,ve,null)}),B(this,ne,ir).call(this,I))}))},Zr=function(){try{if(this.is_pending=this.has_pending_snippet(),T(this,mt,0),T(this,Nt,0),T(this,Pe,De(()=>{c(this,Rt).call(this,c(this,Re))})),c(this,mt)>0){var t=T(this,it,document.createDocumentFragment());ws(c(this,Pe),t);const n=c(this,Ne).pending;T(this,ve,De(()=>n(c(this,Re))))}else B(this,ne,ir).call(this,I)}catch(n){this.error(n)}},ir=function(t){this.is_pending=!1,t.transfer_effects(c(this,Kn),c(this,Wn))},or=function(t){var n=D,r=P,s=Se;tt(c(this,ye)),He(c(this,ye)),mn(c(this,ye).ctx);try{return Ut.ensure(),t()}catch(i){return ii(i),null}finally{tt(n),He(r),mn(s)}},Qr=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&B(r=this.parent,ne,Qr).call(r,t,n);return}T(this,mt,c(this,mt)+t),c(this,mt)===0&&(B(this,ne,ir).call(this,n),c(this,ve)&&jt(c(this,ve),()=>{T(this,ve,null)}),c(this,it)&&(c(this,Re).before(c(this,it)),T(this,it,null)))},$r=function(t){c(this,Pe)&&(Ee(c(this,Pe)),T(this,Pe,null)),c(this,ve)&&(Ee(c(this,ve)),T(this,ve,null)),c(this,xe)&&(Ee(c(this,xe)),T(this,xe,null));var n=c(this,Ne).onerror;let r=c(this,Ne).failed;var s=!1,i=!1;const o=()=>{if(s){Uo();return}s=!0,i&&Lo(),c(this,xe)!==null&&jt(c(this,xe),()=>{T(this,xe,null)}),B(this,ne,or).call(this,()=>{B(this,ne,Zr).call(this)})},a=l=>{try{i=!0,n?.(l,o),i=!1}catch(f){bt(f,c(this,ye)&&c(this,ye).parent)}r&&T(this,xe,B(this,ne,or).call(this,()=>{try{return De(()=>{var f=D;f.b=this,f.f|=Kr,r(c(this,Re),()=>l,()=>o)})}catch(f){return bt(f,c(this,ye).parent),null}}))};kt(()=>{var l;try{l=this.transform_error(t)}catch(f){bt(f,c(this,ye)&&c(this,ye).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,f=>bt(f,c(this,ye)&&c(this,ye).parent)):a(l)})};function oa(e,t,n,r){const s=Bn;var i=e.filter(d=>!d.settled);if(n.length===0&&i.length===0){r(t.map(s));return}var o=D,a=aa(),l=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function f(d){if((o.f&Be)===0){a();try{r(d)}catch(p){bt(p,o)}pr()}}var h=hi();if(n.length===0){l.then(()=>f(t.map(s))).finally(h);return}function u(){Promise.all(n.map(d=>la(d))).then(d=>f([...t.map(s),...d])).catch(d=>bt(d,o)).finally(h)}l?l.then(()=>{a(),u(),pr()}):u()}function aa(){var e=D,t=P,n=Se,r=I;return function(i=!0){tt(e),He(t),mn(n),i&&(e.f&Be)===0&&(r?.activate(),r?.apply())}}function pr(e=!0){tt(null),He(null),mn(null),e&&I?.deactivate()}function hi(){var e=D,t=e.b,n=I,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function Bn(e){var t=de|fe;return D!==null&&(D.f|=wn),{ctx:Se,deps:null,effects:null,equals:ti,f:t,fn:e,reactions:null,rv:0,v:ae,wv:0,parent:D,ac:null}}const Qn=Symbol("obsolete");function la(e,t,n){let r=D;r===null&&wo();var s=void 0,i=zt(ae),o=!P,a=new Set;return wa(()=>{var l=D,f=Zs();s=f.promise;try{Promise.resolve(e()).then(f.resolve,p=>{p!==Or&&f.reject(p)}).finally(pr)}catch(p){f.reject(p),pr()}var h=I;if(o){if((l.f&Vt)!==0)var u=hi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(Qn);else for(const p of a.values())p.reject(Qn);a.add(f),h.async_deriveds.set(l,f)}const d=(p,v=void 0)=>{u?.(),a.delete(f),v!==Qn&&(h.activate(),v?(i.f|=wt,bn(i,v)):((i.f&wt)!==0&&(i.f^=wt),bn(i,p)),h.deactivate())};f.promise.then(d,p=>d(null,p||"unknown"))}),vs(()=>{for(const l of a)l.reject(Qn)}),new Promise(l=>{function f(h){function u(){h===s?l(i):f(s)}h.then(u,u)}f(s)})}function ce(e){const t=Bn(e);return Oi(t),t}function _i(e){const t=Bn(e);return t.equals=ni,t}function ca(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!gi&&da()}return t}function da(){gi=!1;for(const e of vr){(e.f&le)!==0&&te(e,et);let t;try{t=Vn(e)}catch{t=!0}t&&yn(e)}vr.clear()}function In(e){V(e,e.v+1)}function mi(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,i=0;i{if(Ht===i)return a();var l=P,f=Ht;He(null),Ms(i);var h=a();return He(l),Ms(f),h};return r&&n.set("length",ie(e.length)),new Proxy(e,{defineProperty(a,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&To();var h=n.get(l);return h===void 0?o(()=>{var u=ie(f.value);return n.set(l,u),u}):V(h,f.value,!0),!0},deleteProperty(a,l){var f=n.get(l);if(f===void 0){if(l in a){const h=o(()=>ie(ae));n.set(l,h),In(s)}}else V(f,ae),In(s);return!0},get(a,l,f){if(l===Ft)return e;var h=n.get(l),u=l in a;if(h===void 0&&(!u||an(a,l)?.writable)&&(h=o(()=>{var p=yt(u?a[l]:ae),v=ie(p);return v}),n.set(l,h)),h!==void 0){var d=_(h);return d===ae?void 0:d}return Reflect.get(a,l,f)},getOwnPropertyDescriptor(a,l){var f=Reflect.getOwnPropertyDescriptor(a,l);if(f&&"value"in f){var h=n.get(l);h&&(f.value=_(h))}else if(f===void 0){var u=n.get(l),d=u?.v;if(u!==void 0&&d!==ae)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(a,l){if(l===Ft)return!0;var f=n.get(l),h=f!==void 0&&f.v!==ae||Reflect.has(a,l);if(f!==void 0||D!==null&&(!h||an(a,l)?.writable)){f===void 0&&(f=o(()=>{var d=h?yt(a[l]):ae,p=ie(d);return p}),n.set(l,f));var u=_(f);if(u===ae)return!1}return h},set(a,l,f,h){var u=n.get(l),d=l in a;if(r&&l==="length")for(var p=f;pie(ae)),n.set(p+"",v))}if(u===void 0)(!d||an(a,l)?.writable)&&(u=o(()=>ie(void 0)),V(u,yt(f)),n.set(l,u));else{d=u.v!==ae;var y=o(()=>yt(f));V(u,y)}var g=Reflect.getOwnPropertyDescriptor(a,l);if(g?.set&&g.set.call(h,f),!d){if(r&&typeof l=="string"){var m=n.get("length"),S=Number(l);Number.isInteger(S)&&S>=m.v&&V(m,S+1)}In(s)}return!0},ownKeys(a){_(s);var l=Reflect.ownKeys(a).filter(u=>{var d=n.get(u);return d===void 0||d.v!==ae});for(var[f,h]of n)h.v!==ae&&!(f in a)&&l.push(f);return l},setPrototypeOf(){Oo()}})}function xs(e){try{if(e!==null&&typeof e=="object"&&Ft in e)return e[Ft]}catch{}return e}function ha(e,t){return Object.is(xs(e),xs(t))}var gr,bi,yi,wi;function _a(){if(gr===void 0){gr=window,bi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;yi=an(t,"firstChild").get,wi=an(t,"nextSibling").get,Ss(e)&&(e[Ur]=void 0,e[tr]=null,e[zr]=void 0,e.__e=void 0),Ss(n)&&(n[xn]=void 0)}}function lt(e=""){return document.createTextNode(e)}function mr(e){return yi.call(e)}function Gn(e){return wi.call(e)}function E(e,t){return mr(e)}function ct(e,t=!1){{var n=mr(e);return n instanceof Comment&&n.data===""?Gn(n):n}}function k(e,t=1,n=!1){let r=e;for(;t--;)r=Gn(r);return r}function pa(e){e.textContent=""}function ki(){return!1}function va(e,t,n){return document.createElementNS(ei,e,void 0)}let Ts=!1;function ga(){Ts||(Ts=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[nr]?.()})},{capture:!0}))}function Mr(e){var t=P,n=D;He(null),tt(null);try{return e()}finally{He(t),tt(n)}}function _s(e,t,n,r=n){e.addEventListener(t,()=>Mr(n));const s=e[nr];s?e[nr]=()=>{s(),r(!0)}:e[nr]=()=>r(!0),ga()}function ma(e){D===null&&(P===null&&Co(),So()),ut&&Eo()}function ba(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ft(e,t){var n=D;n!==null&&(n.f&ge)!==0&&(e|=ge);var r={ctx:Se,deps:null,nodes:null,f:e|fe|Fe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};I?.register_created_effect(r);var s=r;if((e&vn)!==0)sn!==null?sn.push(r):Ut.ensure().schedule(r);else if(t!==null){try{yn(r)}catch(o){throw Ee(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&wn)===0&&(s=s.first,(e&Ue)!==0&&(e&gn)!==0&&s!==null&&(s.f|=gn))}if(s!==null&&(s.parent=n,n!==null&&ba(s,n),P!==null&&(P.f&de)!==0&&(e&Et)===0)){var i=P;(i.effects??(i.effects=[])).push(s)}return r}function ps(){return P!==null&&!Ge}function vs(e){const t=ft(Tr,null);return te(t,le),t.teardown=e,t}function gs(e){ma();var t=D.f,n=!P&&(t&Ve)!==0&&(t&Vt)===0;if(n){var r=Se;(r.e??(r.e=[])).push(e)}else return Ei(e)}function Ei(e){return ft(vn|go,e)}function ya(e){Ut.ensure();const t=ft(Et|wn,e);return(n={})=>new Promise(r=>{n.outro?jt(t,()=>{Ee(t),r(void 0)}):(Ee(t),r(void 0))})}function Si(e){return ft(vn,e)}function wa(e){return ft(ln|wn,e)}function Lr(e,t=0){return ft(Tr|t,e)}function Y(e,t=[],n=[],r=[]){oa(r,t,n,s=>{ft(Tr,()=>e(...s.map(_)))})}function ms(e,t=0){var n=ft(Ue|t,e);return n}function De(e){return ft(Ve|wn,e)}function Ci(e){var t=e.teardown;if(t!==null){const n=ut,r=P;Os(!0),He(null);try{t.call(null)}finally{Os(n),He(r)}}}function bs(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Mr(()=>{s.abort(Or)});var r=n.next;(n.f&Et)!==0?n.parent=null:Ee(n,t),n=r}}function ka(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Ve)===0&&Ee(t),t=n}}function Ee(e,t=!0){var n=!1;(t||(e.f&vo)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ea(e.nodes.start,e.nodes.end),n=!0),te(e,Wr),bs(e,t&&!n),jn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Ci(e),e.f^=Wr,e.f|=Be;var s=e.parent;s!==null&&s.first!==null&&Ai(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ea(e,t){for(;e!==null;){var n=e===t?null:Gn(e);e.remove(),e=n}}function Ai(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function jt(e,t,n=!0){var r=[];xi(e,r,!0);var s=()=>{n&&Ee(e),t&&t()},i=r.length;if(i>0){var o=()=>--i||s();for(var a of r)a.out(o)}else s()}function xi(e,t,n){if((e.f&ge)===0){e.f^=ge;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var s=e.first;s!==null;){var i=s.next;if((s.f&Et)===0){var o=(s.f&gn)!==0||(s.f&Ve)!==0&&(e.f&Ue)!==0;xi(s,t,o?n:!1)}s=i}}}function ys(e){Ti(e,!0)}function Ti(e,t){if((e.f&ge)!==0){e.f^=ge,(e.f&le)===0&&(te(e,fe),Ut.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&gn)!==0||(n.f&Ve)!==0;Ti(n,s?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const o of i)(o.is_global||t)&&o.in()}}function ws(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Gn(n);t.append(n),n=s}}let ar=!1,ut=!1;function Os(e){ut=e}let P=null,Ge=!1;function He(e){P=e}let D=null;function tt(e){D=e}let je=null;function Oi(e){P!==null&&(je===null?je=[e]:je.push(e))}let we=null,Ce=0,Ie=null;function Sa(e){Ie=e}let Mi=1,Tt=0,Ht=Tt;function Ms(e){Ht=e}function Li(){return++Mi}function Vn(e){var t=e.f;if((t&fe)!==0)return!0;if(t&de&&(e.f&=~Wt),(t&et)!==0){for(var n=e.deps,r=n.length,s=0;se.wv)return!0}(t&Fe)!==0&&ze===null&&te(e,le)}return!1}function Ii(e,t,n=!0){var r=e.reactions;if(r!==null&&!(je!==null&&Dt.call(je,e)))for(var s=0;s{e.ac.abort(Or)}),e.ac=null);try{e.f|=_r;var h=e.fn,u=h();e.f|=Vt;var d=e.deps,p=I?.is_fork;if(we!==null){var v;if(p||jn(e,Ce),d!==null&&Ce>0)for(d.length=Ce+we.length,v=0;vn?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?kt(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Fi(e,t,n,r,s){var i={capture:r,passive:s},o=Oa(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&vs(()=>{t.removeEventListener(e,o,i)})}function Oe(e,t,n){(t[Ot]??(t[Ot]={}))[e]=n}function Xt(e){for(var t=0;t{throw g});throw d}}finally{e[Ot]=t,delete e.currentTarget,He(h),tt(u)}}}const Ma=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function La(e){return Ma?.createHTML(e)??e}function Ia(e){var t=va("template");return t.innerHTML=La(e.replaceAll("","")),t.content}function br(e,t){var n=D;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var n=(t&Ho)!==0,r=(t&qo)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=Ia(i?e:""+e),n||(s=mr(s)));var o=r||bi?document.importNode(s,!0):s.cloneNode(!0);if(n){var a=mr(o),l=o.lastChild;br(a,l)}else br(o,o);return o}}function Ra(e=""){{var t=lt(e+"");return br(t,t),t}}function Na(){var e=document.createDocumentFragment(),t=document.createComment(""),n=lt();return e.append(t,n),br(t,n),e}function N(e,t){e!==null&&e.before(t)}function Q(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[xn]??(e[xn]=e.nodeValue))&&(e[xn]=n,e.nodeValue=`${n}`)}function ks(e,t){return Pa(e,t)}const $n=new Map;function Pa(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:o=!0,transformError:a}){_a();var l=void 0,f=ya(()=>{var h=n??t.appendChild(lt());ta(h,{pending:()=>{}},p=>{Yt({});var v=Se;i&&(v.c=i),s&&(r.$$events=s),l=e(p,r)||{},Jt()},a);var u=new Set,d=p=>{for(var v=0;v{for(var p of u)for(const g of[t,document]){var v=$n.get(g),y=v.get(p);--y==0?(g.removeEventListener(p,ts),v.delete(p),v.size===0&&$n.delete(g)):v.set(p,y)}es.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return ns.set(l,f),l}let ns=new WeakMap;function Yn(e,t){const n=ns.get(e);return n?(ns.delete(e),n(t)):Promise.resolve()}var We,Ze,Te,Pt,Un,zn,Ar;class Da{constructor(t,n=!0){be(this,"anchor");O(this,We,new Map);O(this,Ze,new Map);O(this,Te,new Map);O(this,Pt,new Set);O(this,Un,!0);O(this,zn,t=>{if(c(this,We).has(t)){var n=c(this,We).get(t),r=c(this,Ze).get(n);if(r)ys(r),c(this,Pt).delete(n);else{var s=c(this,Te).get(n);s&&(c(this,Ze).set(n,s.effect),c(this,Te).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,o]of c(this,We)){if(c(this,We).delete(i),i===t)break;const a=c(this,Te).get(o);a&&(Ee(a.effect),c(this,Te).delete(o))}for(const[i,o]of c(this,Ze)){if(i===n||c(this,Pt).has(i))continue;const a=()=>{if(Array.from(c(this,We).values()).includes(i)){var f=document.createDocumentFragment();ws(o,f),f.append(lt()),c(this,Te).set(i,{effect:o,fragment:f})}else Ee(o);c(this,Pt).delete(i),c(this,Ze).delete(i)};c(this,Un)||!r?(c(this,Pt).add(i),jt(o,a,!1)):a()}}});O(this,Ar,t=>{c(this,We).delete(t);const n=Array.from(c(this,We).values());for(const[r,s]of c(this,Te))n.includes(r)||(Ee(s.effect),c(this,Te).delete(r))});this.anchor=t,T(this,Un,n)}ensure(t,n){var r=I,s=ki();if(n&&!c(this,Ze).has(t)&&!c(this,Te).has(t))if(s){var i=document.createDocumentFragment(),o=lt();i.append(o),c(this,Te).set(t,{effect:De(()=>n(o)),fragment:i})}else c(this,Ze).set(t,De(()=>n(this.anchor)));if(c(this,We).set(r,t),s){for(const[a,l]of c(this,Ze))a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of c(this,Te))a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(c(this,zn)),r.ondiscard(c(this,Ar))}else c(this,zn).call(this,r)}}We=new WeakMap,Ze=new WeakMap,Te=new WeakMap,Pt=new WeakMap,Un=new WeakMap,zn=new WeakMap,Ar=new WeakMap;function se(e,t,n=!1){var r=new Da(e),s=n?gn:0;function i(o,a){r.ensure(o,a)}ms(()=>{var o=!1;t((a,l=0)=>{o=!0,i(l,a)}),o||i(-1,null)},s)}function Fa(e,t){return t}function Ba(e,t,n){for(var r=[],s=t.length,i,o=t.length,a=0;a{if(i){if(i.pending.delete(u),i.done.add(u),i.pending.size===0){var d=e.outrogroups;rs(e,xr(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var f=n,h=f.parentNode;pa(h),h.append(f),e.items.clear()}rs(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function rs(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const o of e.pending.values())for(const a of o)r.add(e.items.get(a).e)}for(var s=0;s{var x=n();return cs(x)?x:x==null?[]:xr(x)}),d,p=new Map,v=!0;function y(x){(S.effect.f&Be)===0&&(S.pending.delete(x),S.fallback=h,ja(S,d,o,t,r),h!==null&&(d.length===0?(h.f&Qe)===0?ys(h):(h.f^=Qe,On(h,null,o)):jt(h,()=>{h=null})))}function g(x){S.pending.delete(x)}var m=ms(()=>{d=_(u);for(var x=d.length,M=new Set,W=I,re=ki(),J=0;Ji(o)):(h=De(()=>i(Is??(Is=lt()))),h.f|=Qe)),x>M.size&&ko(),!v)if(p.set(W,M),re){for(const[nt,Le]of a)M.has(nt)||W.skip_effect(Le.e);W.oncommit(y),W.ondiscard(g)}else y(W);_(u)}),S={effect:m,items:a,pending:p,outrogroups:null,fallback:h};v=!1}function An(e){for(;e!==null&&(e.f&Ve)===0;)e=e.next;return e}function ja(e,t,n,r,s){var i=(r&No)!==0,o=t.length,a=e.items,l=An(e.effect.first),f,h=null,u,d=[],p=[],v,y,g,m;if(i)for(m=0;m0){var _e=(r&$s)!==0&&o===0?n:null;if(i){for(m=0;m{if(u!==void 0)for(g of u)g.nodes?.a?.apply()})}function Ha(e,t,n,r,s,i,o,a){var l=(o&Io)!==0?(o&Po)===0?fa(n,!1,!1):zt(n):null,f=(o&Ro)!==0?zt(s):null;return{v:l,i:f,e:De(()=>(i(t,l??n,f??s,a),()=>{e.delete(r)}))}}function On(e,t,n){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end,i=t&&(t.f&Qe)===0?t.nodes.start:n;r!==null;){var o=Gn(r);if(i.before(r),r===s)return;r=o}}function _t(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const Rs=[...` +\r\f \v\uFEFF`];function qa(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var s of Object.keys(n))if(n[s])r=r?r+" "+s:s;else if(r.length)for(var i=s.length,o=0;(o=r.indexOf(s,o))>=0;){var a=o+i;(o===0||Rs.includes(r[o-1]))&&(a===r.length||Rs.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function Ka(e,t){return e==null?null:String(e)}function Gt(e,t,n,r,s,i){var o=e[Ur];if(o!==n||o===void 0){var a=qa(n,r,i);a==null?e.removeAttribute("class"):e.className=a,e[Ur]=n}else if(i&&s!==i)for(var l in i){var f=!!i[l];(s==null||f!==!!s[l])&&e.classList.toggle(l,f)}return i}function Bi(e,t,n,r){var s=e[zr];if(s!==t){var i=Ka(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e[zr]=t}return r}function ji(e,t,n=!1){if(e.multiple){if(t==null)return;if(!cs(t))return Wo();for(var r of e.options)r.selected=t.includes(Rn(r));return}for(r of e.options){var s=Rn(r);if(ha(s,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Wa(e){var t=new MutationObserver(()=>{ji(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),vs(()=>{t.disconnect()})}function Ua(e,t,n=t){var r=new WeakSet,s=!0;_s(e,"change",i=>{var o=i?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),Rn);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&Rn(l)}n(a),e.__value=a,I!==null&&r.add(I)}),Si(()=>{var i=t();if(e===document.activeElement){var o=I;if(r.has(o))return}if(ji(e,i,s),s&&i===void 0){var a=e.querySelector(":checked");a!==null&&(i=Rn(a),n(i))}e.__value=i,s=!1}),Wa(e)}function Rn(e){return"__value"in e?e.__value:e.value}const za=Symbol("is custom element"),Ga=Symbol("is html");function ke(e,t,n,r){var s=Va(e);s[t]!==(s[t]=n)&&(t==="loading"&&(e[bo]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Ya(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Va(e){return e[tr]??(e[tr]={[za]:e.nodeName.includes("-"),[Ga]:e.namespaceURI===ei})}var Ns=new Map;function Ya(e){var t=e.getAttribute("is")||e.nodeName,n=Ns.get(t);if(n)return n;Ns.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=uo(s);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.push(o);s=Xs(s)}return n}function ss(e,t,n=t){var r=new WeakSet;_s(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=Fr(e)?Br(i):i,n(i),I!==null&&r.add(I),await Aa(),i!==(i=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=i??"",a!==null){var f=e.value.length;o===a&&a===l&&f>l?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=o,e.selectionEnd=Math.min(a,f))}}}),kn(t)==null&&e.value&&(n(Fr(e)?Br(e.value):e.value),I!==null&&r.add(I)),Lr(()=>{var s=t();if(e===document.activeElement){var i=I;if(r.has(i))return}Fr(e)&&s===Br(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Hi(e,t,n=t){_s(e,"change",r=>{var s=r?e.defaultChecked:e.checked;n(s)}),kn(t)==null&&n(e.checked),Lr(()=>{var r=t();e.checked=!!r})}function Fr(e){var t=e.type;return t==="number"||t==="range"}function Br(e){return e===""?null:+e}function jr(e,t){return e===t||e?.[Ft]===t}function Ja(e={},t,n,r){var s=Se.r,i=D;return Si(()=>{var o,a;return Lr(()=>{o=a,a=[],kn(()=>{jr(n(...a),e)||(t(e,...a),o&&jr(n(...o),e)&&t(null,...o))})}),()=>{let l=i;for(;l!==s&&l.parent!==null&&l.parent.f&Wr;)l=l.parent;const f=()=>{a&&jr(n(...a),e)&&t(null,...a)},h=l.teardown;l.teardown=()=>{f(),h?.()}}}),e}function Nn(e,t,n,r){var s=!0,i=(n&Bo)!==0,o=(n&jo)!==0,a=r,l=!0,f=void 0,h=()=>o&&s?(f??(f=Bn(r)),_(f)):(l&&(l=!1,a=o?kn(r):r),a);let u;if(i){var d=Ft in e||mo in e;u=an(e,t)?.set??(d&&t in e?M=>e[t]=M:void 0)}var p,v=!1;i?[p,v]=Yo(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=h(),u&&(xo(),u(p)));var y;if(y=()=>{var M=e[t];return M===void 0?h():(l=!0,M)},(n&Fo)===0)return y;if(u){var g=e.$$legacy;return(function(M,W){return arguments.length>0?((!W||g||v)&&u(W?y():M),M):y()})}var m=!1,S=((n&Do)!==0?Bn:_i)(()=>(m=!1,y()));i&&_(S);var x=D;return(function(M,W){if(arguments.length>0){const re=W?_(S):i?yt(M):M;return V(S,re),m=!0,a!==void 0&&(a=re),M}return ut&&m||(x.f&Be)!==0?S.v:_(S)})}function qi(e){Se===null&&yo(),gs(()=>{const t=kn(e);if(typeof t=="function")return t})}const Ki="[data-v-app]",Xa=["header","content","footer"];let ue=null,Ke=null;function Za(e){const t=e instanceof Set?e:new Set(e||[]);for(let n=0;n<16;n++){const r=crypto.randomUUID().replace(/-/g,"").slice(0,8);if(!t.has(r))return r}throw new Error("rebemer: id collision exhausted")}function Qa(){if(typeof document>"u")return!1;const t=document.querySelector(Ki)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(ue=null,!1):(ue=t,Ke=null,!0)}function $a(){if(Ke!==null)return Ke;const e=typeof document<"u"?document.querySelector(Ki)?.__vue_app__:null;if(!e)return Ke=!1,!1;const t=e.config?.globalProperties??{};if(typeof ue?.$history?.pause=="function"&&typeof ue?.$history?.resume=="function")return Ke={pause:()=>ue.$history.pause(),resume:()=>ue.$history.resume()},Ke;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(Ke={pause:()=>n.history.pause(),resume:()=>n.history.resume()},Ke):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(Ke={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},Ke):(Ke=!1,!1)}function Wi(e){const t=$a();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function $e(e){if(!ue||!e)return null;for(const t of Xa){const n=ue[t];if(!Array.isArray(n))continue;const r=n.find(s=>s&&s.id===e);if(r)return r}return null}function el(e){const t=$e(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return Ui(t,1,n),n}function Ui(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const s=$e(r);s&&(n.push({id:s.id,depth:t,label:s.label,name:s.name,settings:s.settings}),Ui(s,t+1,n))}}function zi(){return ue?ue.globalClasses:[]}function Hr(e,t){if(!ue)throw new Error("rebemer: not ready");const n=ue.globalClasses,r=n.find(o=>o&&o.name===e);if(r)return r.id;const s=new Set(n.map(o=>o?.id).filter(Boolean)),i=Za(s);return n.push({id:i,name:e,settings:t||{}}),i}function Ps(e,t){const n=$e(e);if(!n)return;n.settings||(n.settings={});const r=Array.isArray(t)?t:[];Array.isArray(n.settings._cssGlobalClasses)?n.settings._cssGlobalClasses.splice(0,n.settings._cssGlobalClasses.length,...r):n.settings._cssGlobalClasses=[...r]}function Ds(e,t){const n=$e(e);n&&(n.label=t)}function tl(){if(ue){const e=[ue.activeElement,ue.activeElementId,ue.activeId,ue.selectedElement];for(const t of e){if(t&&typeof t=="object"&&typeof t.id=="string"&&t.id)return t.id;if(typeof t=="string"&&t)return t}}if(typeof document<"u"){const t=document.querySelector("#bricks-structure li[data-id].active, #bricks-structure li[data-id].is-active")?.getAttribute("data-id");if(t)return t}return null}const nl={text:["_typography","color"],background:["_background","color"],border:["_border","color"]};function rl(e,t,n){const r=nl[t];if(!r)return!1;const s=$e(e);if(!s)return!1;(!s.settings||typeof s.settings!="object")&&(s.settings={});const[i,o]=r;return(!s.settings[i]||typeof s.settings[i]!="object")&&(s.settings[i]={}),s.settings[i][o]={raw:n},!0}function sl(e){const t=$e(e);return t&&typeof t.label=="string"?t.label:""}const yr="slashed-rebemer-host",il="slashed-class-hint",Gi=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],ol=3;function al(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n[0]==="."&&(n=n.slice(1)),!n.startsWith("sf-")&&!n.startsWith("is-"))||!Object.prototype.hasOwnProperty.call(t,n))return null;const r=t[n];return!r||typeof r.description!="string"?null:{name:n,description:r.description,category:r.category}}let is=!1,wr={},at=null,Pn=null,Me=null;function ll(){if(at&&at.isConnected)return at;let e=document.getElementById(yr);e||(e=document.createElement("div"),e.id=yr,document.body.appendChild(e));const t=document.createElement("div");return t.id=il,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

',e.appendChild(t),at=t,t}function Vi(e){let t=e;for(let n=0;t&&na&&n.top-i-s>=0&&(l=n.top-i-s);let f=n.left;f+r>o-4&&(f=Math.max(4,o-4-r)),f<4&&(f=4),e.style.top=`${Math.round(l)}px`,e.style.left=`${Math.round(f)}px`}function Yi(e,t){const n=ll();n.querySelector(".rebemer-class-hint__name").textContent=`.${t.name}`;const r=n.querySelector(".rebemer-class-hint__cat");r.textContent=t.category||"",r.hidden=!t.category,n.querySelector(".rebemer-class-hint__desc").textContent=t.description,n.hidden=!1,cl(n,e),Me=e}function St(){at&&(at.hidden=!0),Me=null}function ul(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${yr}`))return;if(!t.closest(Gi.join(","))){Me&&St();return}const n=Vi(t);if(!n){Me&&St();return}n.el!==Me&&Yi(n.el,n.hint)}function fl(e){if(!Me)return;const t=e.relatedTarget;t instanceof Node&&Me.contains(t)||St()}function dl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${yr}`))return;if(!t.closest(Gi.join(","))){Me&&St();return}const n=Vi(t);if(!n){Me&&St();return}n.el!==Me&&Yi(n.el,n.hint)}function hl(e){if(!Me)return;const t=e.relatedTarget;t instanceof Node&&Me.contains(t)||St()}function _l(e){e.key==="Escape"&&St()}function pl(e,t,n={}){if(lr(),is=!!e,wr=t&&typeof t=="object"?t:{},!is||Object.keys(wr).length===0)return;Pn=new AbortController;const{signal:r}=Pn,s={passive:!0,signal:r};document.addEventListener("mouseover",ul,s),document.addEventListener("mouseout",fl,s),document.addEventListener("focusin",dl,s),document.addEventListener("focusout",hl,s),document.addEventListener("keydown",_l,s),window.addEventListener("scroll",St,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?lr():n.signal.addEventListener("abort",lr,{once:!0}))}function lr(){Pn&&(Pn.abort(),Pn=null),at&&(at.remove(),at=null),Me=null,is=!1,wr={}}const cr="li.variable-picker-item",ur="slashed-var-swatch",vl=50,gl=(e,...t)=>console[e]("[slashed-swatches]",...t);function ml(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n.slice(0,2)!=="--"&&(n="--"+n.replace(/^-+/,"")),n.indexOf("--sf-color-")!==0))return null;const r=t[n];return typeof r=="string"&&r?r:null}let os=!1,kr={},Dn=null,cn=null,fr=null;function bl(e){const t=e.querySelector(":scope > span[title]")||e.querySelector(":scope > span");if(t){const n=t.getAttribute("title");return n&&n.trim()?n.trim():(t.textContent||"").trim()}return(e.textContent||"").trim()}function yl(e){if(e.classList.contains("title")||e.classList.contains("category")){const r=e.querySelector(":scope > ."+ur);r&&r.remove();return}const t=ml(bl(e),kr);let n=e.querySelector(":scope > ."+ur);if(!t){n&&n.remove();return}n||(n=document.createElement("span"),n.className=ur,n.setAttribute("aria-hidden","true"),e.insertBefore(n,e.firstChild)),n.dataset.color!==t&&(n.style.setProperty("--slashed-swatch-color",t),n.dataset.color=t)}function Ji(){try{const e=document.querySelectorAll(cr);for(const t of e)yl(t)}catch(e){gl("warn","swatch pass failed",e)}}function wl(){cn===null&&(cn=setTimeout(()=>{cn=null,Ji()},vl))}function kl(e){for(const t of e){const n=t.target;if(n&&n.nodeType===1&&n.closest&&n.closest(cr))return!0;for(const r of t.addedNodes)if(r.nodeType===1&&(r.matches&&r.matches(cr)||r.querySelector&&r.querySelector(cr)))return!0}return!1}function El(e,t,n={}){dr(),os=!!e,kr=t&&typeof t=="object"?t:{},!(!os||Object.keys(kr).length===0)&&(fr=new AbortController,Dn=new MutationObserver(r=>{kl(r)&&wl()}),Dn.observe(document.body,{childList:!0,subtree:!0}),Ji(),n.signal&&(n.signal.aborted?dr():n.signal.addEventListener("abort",dr,{once:!0})))}function dr(){cn!==null&&(clearTimeout(cn),cn=null),Dn&&(Dn.disconnect(),Dn=null),fr&&(fr.abort(),fr=null);try{document.querySelectorAll("."+ur).forEach(e=>e.remove())}catch{}os=!1,kr={}}const Sl="5";var Js;typeof window<"u"&&((Js=window.__svelte??(window.__svelte={})).v??(Js.v=new Set)).add(Sl);var Cl=F('reBEM');function Al(e,t){Yt(t,!0);function n(s){s.stopPropagation(),s.preventDefault(),t.onActivate?.(t.elementId)}var r=Cl();Y(()=>{ke(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),ke(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),Oe("click",r,n),Oe("keydown",r,s=>(s.key==="Enter"||s.key===" ")&&n(s)),N(e,r),Jt()}Xt(["click","keydown"]);function qt(e){return e?String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x00-\x7f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}const xl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Tl=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function Ol(e){return e?Tl.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:xl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const Ir=new Set(["_padding","_padding_top","_padding_right","_padding_bottom","_padding_left","_margin","_margin_top","_margin_right","_margin_bottom","_margin_left","_width","_widthMin","_widthMax","_minWidth","_maxWidth","_height","_heightMin","_heightMax","_minHeight","_maxHeight","_aspectRatio","_overflow","_overflowX","_overflowY","_color","_background","_backgroundColor","_backgroundImage","_backgroundSize","_backgroundPosition","_backgroundRepeat","_backgroundAttachment","_backgroundBlendMode","_typography","_fontFamily","_fontSize","_fontWeight","_fontStyle","_lineHeight","_letterSpacing","_wordSpacing","_textAlign","_textTransform","_textDecoration","_textDecorationColor","_textShadow","_textIndent","_whiteSpace","_listStyleType","_listStylePosition","_border","_borderRadius","_borderColor","_borderStyle","_borderWidth","_outline","_outlineColor","_outlineStyle","_outlineWidth","_outlineOffset","_boxShadow","_filter","_backdropFilter","_opacity","_blendMode","_transform","_transformOrigin","_transition","_animation","_display","_flexDirection","_flexWrap","_flexGrow","_flexShrink","_flexBasis","_alignItems","_alignSelf","_alignContent","_justifyContent","_justifyItems","_justifySelf","_gap","_rowGap","_columnGap","_gridTemplateColumns","_gridTemplateRows","_gridGap","_gridAutoFlow","_gridAutoColumns","_gridAutoRows","_gridColumn","_gridRow","_gridArea","_position","_top","_right","_bottom","_left","_zIndex","_objectFit","_objectPosition","_cursor","_pointerEvents","_userSelect"]);function Ml(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Ir.has(n)&&t.push(n);return t.sort(),t}const Ll=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function Il(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Ir.has(n)||Ll.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Rl=new Set(["add","rename","replace","modifier","migrate"]),Fs=new Set(["user","label"]);function Xi({rootId:e,rows:t,mode:n}){if(!Rl.has(n))return{ok:!1,ops:[],error:`Invalid mode: ${n}`};const r=t.find(a=>a.id===e);if(!r)return{ok:!1,ops:[],error:"Root row missing."};const s=qt(r.name);if(!s)return{ok:!1,ops:[],error:"Block name is empty."};const i=[];for(const a of t){if(!a.include)continue;const l=a.id===e;let f;if(l)f=s;else{const u=qt(a.name);if(!u)continue;f=`${s}__${u}`}let h=f;if(n==="modifier"){const u=qt(a.modifier);if(!u)continue;h=`${f}--${u}`}i.push({row:a,isRoot:l,finalClass:h,suggestedFrom:a.suggestedFrom||"fallback"})}if(i.length===0)return{ok:!1,ops:[],error:"No rows to apply. Include at least one row."};const o=Dl(i,n);return o.ok?{ok:!0,ops:i}:{ok:!1,ops:[],error:o.error}}function Nl({rootId:e,rows:t,mode:n,syncLabels:r}){const s=Xi({rootId:e,rows:t,mode:n});if(!s.ok)return{ok:!1,error:s.error};const i=s.ops,o=t.find(u=>u.id===e),a=qt(o?.name??""),l=zi();if(n==="migrate"){const u=Pl(i,l);if(!u.ok)return u}const f=new Map;for(const u of i){const d=$e(u.row.id);if(!d)continue;const p={classIds:Bs(d.settings).slice(),label:r&&n!=="modifier"?d.label??"":null};if(n==="migrate"&&Array.isArray(u.row.migrateKeys)){const v={};for(const y of u.row.migrateKeys)Object.prototype.hasOwnProperty.call(d.settings||{},y)&&(v[y]=JSON.parse(JSON.stringify(d.settings[y])));p.migrateKeys=v}f.set(u.row.id,p)}let h=0;try{Wi(()=>{for(const u of i){const d=$e(u.row.id);if(!d)continue;const p=Bs(d.settings);let v={};if(n==="rename"&&p.length>0){const m=l.find(S=>S&&S.id===p[0]);m&&m.settings&&(v=JSON.parse(JSON.stringify(m.settings)))}else n==="migrate"&&(v=Zi(d.settings,u.row.migrateKeys));if(n==="migrate"){const m=l.find(S=>S&&S.name===u.finalClass);if(m){(!m.settings||typeof m.settings!="object")&&(m.settings={});for(const[S,x]of Object.entries(v))Object.prototype.hasOwnProperty.call(m.settings,S)||(m.settings[S]=x)}}const y=Hr(u.finalClass,v);let g;switch(n){case"add":case"migrate":g=p.includes(y)?p:[...p,y];break;case"modifier":{const m=u.finalClass.indexOf("--"),S=m>=0?u.finalClass.slice(0,m):null;let x=[...p];if(S){const M=Hr(S,{});x.includes(M)||x.push(M)}g=x.includes(y)?x:[...x,y];break}case"rename":{const m=[y],S=p.length>0?l.find(x=>x&&x.id===p[0]):null;if(S){const x=S.name+"--";for(let M=1;Mre&&re.id===p[M]);if(W)if(W.name.startsWith(x)){const re=W.name.slice(S.name.length),J=W.settings?JSON.parse(JSON.stringify(W.settings)):{};m.push(Hr(u.finalClass+re,J))}else m.push(p[M])}}g=m;break}case"replace":g=[y];break}if(Ps(u.row.id,g),n==="migrate"&&Fl(d.settings,u.row.migrateKeys),r&&n!=="modifier"){const m=Bl(u.finalClass,a);m&&Ds(u.row.id,m)}h++}})}catch(u){for(const[p,v]of f)try{if(Ps(p,v.classIds),v.migrateKeys){const y=$e(p);y&&y.settings&&Object.assign(y.settings,v.migrateKeys)}v.label!==null&&Ds(p,v.label)}catch{}const d=u instanceof Error?u.message:String(u);return console.warn("[reBEMer] apply failed after",h,"mutation(s), rolled back:",d),{ok:!1,error:`Operation failed and was rolled back: ${d}`}}return h===0?{ok:!1,error:"No elements were modified. The subtree may have changed."}:{ok:!0,count:h}}function Pl(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const s=$e(n.row.id);if(!s)continue;const i=Zi(s.settings,n.row.migrateKeys),o=r.settings&&typeof r.settings=="object"?r.settings:{},a=[];for(const[l,f]of Object.entries(i))Object.prototype.hasOwnProperty.call(o,l)&&JSON.stringify(o[l])!==JSON.stringify(f)&&a.push(l.replace(/^_/,""));if(a.length>0){const l=a.join(", ");return{ok:!1,error:`Migrate blocked: existing class "${n.finalClass}" has conflicting values for ${l}. Pick a different name or use Add mode.`}}}return{ok:!0}}function Dl(e,t){const n=new Map;for(const r of e){const s=n.get(r.finalClass)||[];s.push(r),n.set(r.finalClass,s)}for(const[r,s]of n){if(s.length===1||t==="modifier")continue;const i=s.filter(a=>Fs.has(a.suggestedFrom));if(i.length>1)return{ok:!1,error:`"${r}" is used by ${i.length} rows. Edit one to make it unique.`};let o=1;for(const a of s)Fs.has(a.suggestedFrom)||(a.finalClass=`${r}-${o++}`,a.suggestedFrom="auto-number")}if(t!=="modifier"){const r=new Map;for(const s of e){const i=r.get(s.finalClass);if(i)return{ok:!1,error:`"${s.finalClass}" is produced by 2 rows after auto-numbering (one ${i}, one ${s.suggestedFrom}). Pick a different name for one of them.`};r.set(s.finalClass,s.suggestedFrom)}}return{ok:!0}}function Zi(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)Ir.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Fl(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)Ir.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function Bs(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function Bl(e,t){let n=e;return n===t?js(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),js(n.replace(/-/g," ")))}function js(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const jl=Object.freeze({heading:"heading","text-basic":"text",text:"text","text-link":"link",code:"code",image:"image",icon:"icon","icon-box":"icon",video:"video",audio:"audio",svg:"svg",logo:"logo",shape:"shape",button:"button","button-group":"buttons","nav-nested":"nav","nav-menu":"nav",list:"list",accordion:"accordion",tabs:"tabs",slider:"slider",carousel:"carousel",countdown:"countdown",counter:"counter",testimonials:"testimonials",pricing:"pricing",team:"team",form:"form",posts:"posts",template:"item"}),Qi=new Set(["section","container","block","div"]);function Hl(e,t="item"){return!e||typeof e!="string"||Qi.has(e)?t:jl[e]||t}function qr(e){return typeof e=="string"&&Qi.has(e)}const ql=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function Kl(e,t,n){const r=new Set(e.filter(Boolean)),s=(...p)=>p.some(v=>r.has(v)),i=s("button","button-group"),o=s("heading"),a=s("text-basic","text"),l=s("image"),f=s("nav-nested","nav-menu"),h=s("form"),u=s("icon","icon-box"),d=s("list");return h?"form":f?"nav":i&&!o&&!a?"actions":l&&!a&&!o&&!i?"media":o&&!a&&!i?"header":a&&!o&&!i?"body":o&&a?"content":o&&i?"header":u&&!a&&!o?"icon-group":d?"list-wrap":n>1?t===0?"header":t===n-1?"footer":"body":"content"}var Wl=F('suggested'),Ul=F(' '),zl=F(''),Gl=F('

Enter a modifier name — the base class will be added automatically if absent.

'),Vl=F('

This element has no existing classes. Rename will create a new class instead.

'),Yl=F('

'),Jl=F(`A class named already exists. On Apply, missing style keys will be merged into it. Conflicting - values block the migration — pick a different name or use Add.`,1),Ta=V(`A class named already exists + values block the migration — pick a different name or use Add.`,1),Xl=F(`A class named already exists globally. Apply will attach the existing class instead of - creating a duplicate.`,1),Oa=V('

'),Ma=V(' '),Na=V('Migrate: ',1),Ia=V('No migratable keys on this element.'),La=V(' '),Ra=V('
'),Pa=V('
');function Da(e,t){An(t,!0);let n=_n(t,"row",15),r=_n(t,"globalClasses",19,()=>[]),i=_n(t,"finalClassName",3,"");const s=be(()=>t.mode==="modifier"),o=be(()=>t.mode==="migrate"),a=be(()=>t.mode==="rename"),l=be(()=>!t.isRoot&&t.blockName?`${t.blockName}__`:""),c=be(()=>n().suggestedFrom==="element-type"||n().suggestedFrom==="fallback"),h=be(()=>!i()||!Array.isArray(r())||!n().include?null:r().find(y=>y&&y.name===i())||null);function u(){n().suggestedFrom!=="user"&&n(n().suggestedFrom="user",!0)}function d(y){return y.startsWith("_")?y.slice(1):y}var _=Pa();let v;var b=R(_),p=R(b),m=I(b,2),w=R(m),C=R(w),T=I(w,2),q=R(T),ee=I(T,2);{var Y=y=>{var F=wa();se(()=>Ot(F,"title",`Pre-filled from ${n().suggestedFrom==="element-type"?"Bricks element type":"fallback"}`)),W(y,F)};ie(ee,y=>{g(c)&&n().include&&y(Y)})}var _e=I(m,2),we=R(_e),H=R(we);{var _t=y=>{var F=Ea(),Ee=R(F);se(()=>ce(Ee,g(l))),W(y,F)};ie(H,y=>{g(l)&&y(_t)})}var qe=I(H,2),rn=I(we,2);{var Mn=y=>{var F=ka();se(()=>F.disabled=!n().include),ut("input",F,u),Ei(F,()=>n().modifier,Ee=>n(n().modifier=Ee,!0)),W(y,F)};ie(rn,y=>{g(s)&&y(Mn)})}var Nn=I(_e,2);{var In=y=>{var F=Sa();W(y,F)};ie(Nn,y=>{g(s)&&n().include&&!n().modifier&&y(In)})}var sn=I(Nn,2);{var br=y=>{var F=Ca();W(y,F)},Ln=y=>{var F=Aa(),Ee=R(F);se(()=>ce(Ee,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),W(y,F)};ie(sn,y=>{g(a)&&n().include&&n().currentClassCount===0?y(br):g(a)&&n().include&&n().currentClassCount>1&&y(Ln,1)})}var Rn=I(sn,2);{var Pn=y=>{var F=Oa(),Ee=R(F);{var k=x=>{var K=xa(),P=I(Kt(K)),J=R(P);se(()=>ce(J,i())),W(x,K)},B=x=>{var K=Ta(),P=I(Kt(K)),J=R(P);se(()=>ce(J,i())),W(x,K)};ie(Ee,x=>{g(o)?x(k):x(B,-1)})}W(y,F)};ie(Rn,y=>{g(h)&&y(Pn)})}var yr=I(Rn,2);{var Dn=y=>{var F=Ra(),Ee=R(F);{var k=P=>{var J=Na(),j=I(Kt(J),2);Es(j,17,()=>n().migrateKeys,pl,(ke,G)=>{var D=Ma(),X=R(D);se(tt=>{Ot(D,"title",`Will be lifted into ${(i()||"the new class")??""}`),ce(X,tt)},[()=>d(g(G))]),W(ke,D)}),W(P,J)},B=P=>{var J=Ia();W(P,J)};ie(Ee,P=>{n().migrateKeys?.length?P(k):P(B,-1)})}var x=I(Ee,2);{var K=P=>{var J=La(),j=R(J);se(()=>ce(j,`${n().skippedKeys.length??""} skipped`)),W(P,J)};ie(x,P=>{n().skippedKeys?.length&&P(K)})}W(y,F)};ie(yr,y=>{g(o)&&n().include&&y(Dn)})}se(y=>{v=fi(_,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":g(c)}),El(_,`--rebemer-row-depth: ${n().depth??0??""}`),ce(C,n().originalLabel),ce(q,y),Ot(qe,"placeholder",t.isRoot?"block-name":"element-name"),qe.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),Ss(p,()=>n().include,y=>n(n().include=y,!0)),ut("input",qe,u),Ei(qe,()=>n().name,y=>n(n().name=y,!0)),W(e,_),xn()}vr(["input"]);var Fa=V(" ");function Ba(e,t){An(t,!0);let n=_n(t,"kind",3,"info"),r=_n(t,"duration",3,3e3),i=oe(!0);ii(()=>{if(!g(i)||r()<=0)return;const c=setTimeout(()=>{$(i,!1),t.onDismiss?.()},r());return()=>clearTimeout(c)});const s=be(()=>n()==="error"?"alert":"status");var o=hl(),a=Kt(o);{var l=c=>{var h=Fa(),u=R(h);se(()=>{fi(h,1,`rebemer-toast rebemer-toast--${n()??""}`),Ot(h,"role",g(s)),Ot(h,"aria-live",n()==="error"?"assertive":"polite"),ce(u,t.message)}),ut("click",h,()=>{$(i,!1),t.onDismiss?.()}),W(c,h)};ie(a,c=>{g(i)&&c(l)})}W(e,o),xn()}vr(["click"]);var ja=V("Will migrate ",1),qa=V(' '),Ha=V(''),Ka=V(' ',1);function Wa(e,t){An(t,!0);const n={add:"Attaches a new BEM class to each element without removing any existing classes.",rename:"Replaces the first existing class with a new name, seeding its settings from the old class.",replace:"Replaces ALL existing classes with a single new BEM class (clean slate, no settings carried over).",modifier:"Appends a --modifier variant. The base class is auto-added to the element if absent.",migrate:"Lifts inline element styles (padding, color, typography, etc.) into a new global class."};let r=oe("add"),i=oe(!0),s=oe(lt([])),o=oe(lt([])),a=oe(null),l=oe(null);const c=be(()=>Mt(g(s)[0]?.name??"")),h=be(()=>g(s)[0]?.originalLabel??""),u=be(()=>{if(g(r)!=="migrate")return null;let k=0,B=0;for(const x of g(s))x.include&&(k+=x.migrateKeys?.length??0,B+=x.skippedKeys?.length??0);return{willMigrate:k,willSkip:B}}),d=be(()=>{if(g(s).length===0)return new Map;const k=Is({rootId:t.rootId,rows:g(s),mode:g(r)}),B=new Map;if(!k.ok)return B;for(const x of k.ops)B.set(x.row.id,x.finalClass);return B});Ml(()=>{const k=Dl(t.rootId);$(o,xs().slice(),!0);const B=k.map((x,K)=>{const P=K===0,J=x.label||"",j=Mt(J),ke=x.name||"";let G,D;return j?(G=j,D="label"):P?(G="block",D="fallback"):ke&&!Tr(ke)?(G=ma(ke,"item"),D="element-type"):(G="item",D="fallback"),{id:x.id,depth:x.depth,bricksType:ke,originalLabel:J||(P?"block":"element"),name:G,modifier:"",include:!0,suggestedFrom:D,migrateKeys:aa(x.settings),skippedKeys:ua(x.settings),currentClassCount:Array.isArray(x.settings?._cssGlobalClasses)?x.settings._cssGlobalClasses.filter(X=>typeof X=="string"&&X.length>0).length:0}});if(B.length>1){const x=new Map(k.map(j=>[j.id,[]])),K=[];for(const j of k){for(;K.length&&K[K.length-1].depth>=j.depth;)K.pop();K.length&&x.get(K[K.length-1].id).push(j.id),K.push(j)}const P=new Map(k.map(j=>[j.id,j])),J=new Map(B.map(j=>[j.id,j]));for(const[,j]of x){if(!j.length)continue;const ke=new Map;for(const D of j){const X=P.get(D)?.name;X&&ke.set(X,(ke.get(X)??0)+1)}const G=j.filter(D=>Tr(P.get(D)?.name??""));for(const D of j){const X=J.get(D),tt=P.get(D);if(!(!X||!tt||X.suggestedFrom==="label")){if(Tr(tt.name)){const Dt=(x.get(D)??[]).map(Fs=>P.get(Fs)?.name??"").filter(Boolean),Ds=G.indexOf(D);X.name=ya(Dt,Ds,G.length),X.suggestedFrom="element-type"}else if((ke.get(tt.name)??0)===1){const Dt=ba[tt.name];Dt&&(X.name=Dt,X.suggestedFrom="element-type")}}}}}$(s,B,!0)});function _(k){if(k.key==="Escape"){t.onClose?.();return}g(l)&&k.target instanceof Node&&g(l).contains(k.target)&&k.key==="Enter"&&(k.target?.tagName==="INPUT"||k.target?.tagName==="SELECT")&&(k.preventDefault(),b())}let v=null;function b(){const k=Mt(g(s)[0]?.name??""),B=la(k);if(!B.ok){$(a,{kind:"error",message:B.reason},!0);return}const x=da({rootId:t.rootId,rows:g(s),mode:g(r),syncLabels:g(i)});x.ok?($(a,{kind:"success",message:`Applied to ${x.count} element${x.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):$(a,{kind:"error",message:x.error},!0)}ii(()=>()=>{v&&clearTimeout(v)});var p=Ka();al("keydown",Hr,_);var m=Kt(p),w=R(m),C=R(w),T=I(R(C)),q=R(T),ee=I(C,2),Y=I(w,2),_e=R(Y),we=I(R(_e),2),H=R(we);H.value=H.__value="add";var _t=I(H);_t.value=_t.__value="rename";var qe=I(_t);qe.value=qe.__value="replace";var rn=I(qe);rn.value=rn.__value="modifier";var Mn=I(rn);Mn.value=Mn.__value="migrate";var Nn=I(_e,2),In=R(Nn),sn=I(Y,2),br=R(sn),Ln=I(sn,2);{var Rn=k=>{var B=Ha();let x;var K=R(B);{var P=G=>{var D=dl("No migratable style keys found on any included element. Apply will attach empty classes.");W(G,D)},J=G=>{var D=ja(),X=I(Kt(D)),tt=R(X),Dt=I(X);se(()=>{ce(tt,g(u).willMigrate),ce(Dt,` style key${g(u).willMigrate===1?"":"s"} into new classes.`)}),W(G,D)};ie(K,G=>{g(u).willMigrate===0?G(P):G(J,-1)})}var j=I(K,2);{var ke=G=>{var D=qa(),X=R(D);se(()=>ce(X,`${g(u).willSkip??""} key${g(u).willSkip===1?"":"s"} not on the allowlist will stay on the element.`)),W(G,D)};ie(j,G=>{g(u).willSkip>0&&G(ke)})}se(()=>x=fi(B,1,"rebemer-panel__notice",null,x,{"rebemer-panel__notice--warn":g(u).willSkip>0||g(u).willMigrate===0})),W(k,B)};ie(Ln,k=>{g(u)&&k(Rn)})}var Pn=I(Ln,2);Es(Pn,23,()=>g(s),k=>k.id,(k,B,x)=>{{let K=be(()=>g(B).id===t.rootId),P=be(()=>g(d).get(g(B).id)??"");Da(k,{get mode(){return g(r)},get blockName(){return g(c)},get isRoot(){return g(K)},get globalClasses(){return g(o)},get finalClassName(){return g(P)},get row(){return g(s)[g(x)]},set row(J){g(s)[g(x)]=J}})}});var yr=I(Pn,2),Dn=R(yr),y=I(Dn,2);Ol(m,k=>$(l,k),()=>g(l));var F=I(m,2);{var Ee=k=>{Ba(k,{get kind(){return g(a).kind},get message(){return g(a).message},onDismiss:()=>{$(a,null)}})};ie(F,k=>{g(a)&&k(Ee)})}se(()=>{ce(q,g(h)),In.disabled=g(r)==="modifier",ce(br,n[g(r)])}),ut("click",ee,()=>t.onClose?.()),Sl(we,()=>g(r),k=>$(r,k)),Ss(In,()=>g(i),k=>$(i,k)),ut("click",Dn,()=>t.onClose?.()),ut("click",y,b),W(e,p),xn()}vr(["click"]);const Ti="#bricks-structure",za="li[data-id]",Oi="slashed-rebemer-host",Ua=400,Ga=25,mr=(e,...t)=>console[e]("[reBEMer]",...t),Ps=new AbortController,{signal:gn}=Ps,Nt=new Map;let un=null;function Va(){let e=document.getElementById(Oi);return e||(e=document.createElement("div"),e.id=Oi,document.body.appendChild(e)),e}function Mi(){const e=window.slashedBricksEditor;e&&typeof e=="object"&&(Vl(e.showClassHints,e.classHints,{signal:gn}),ta(e.showColorSwatches,e.colorHexMap,{signal:gn}));let t=0;const n=()=>{if(!gn.aborted){if(Ll()){Ya();return}if(++t>=Ga){mr("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(n,Ua)}};n()}function Ya(){const e=document.querySelector(Ti);if(e){Ni(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(Ti);n&&(t.disconnect(),Ni(n))});t.observe(document.body,{childList:!0,subtree:!0}),gn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function Ni(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,Ii(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),gn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),Ii(e)}function Ii(e){for(const[n,r]of Nt)if(!r.host.isConnected){try{pr(r.instance)}catch(i){mr("warn","badge unmount failed",i)}Nt.delete(n)}const t=e.querySelectorAll(za);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const i=Nt.get(r);i&&i.host.isConnected&&n.contains(i.host)||Ja(n)}}function Ja(e){const t=e.getAttribute("data-id");if(!t)return;const n=e.querySelector(":scope > .structure-item")||e,r=n.querySelector(":scope > ul.actions")||n.querySelector(":scope > .actions")||n.querySelector(":scope > .structure-item-actions"),i=document.createElement("span");i.className="rebemer-badge-host",r?n.insertBefore(i,r):n.appendChild(i);const s=n.querySelector(":scope > .title, :scope > .structure-item-title, :scope > .name, :scope .label"),o=s?s.textContent.trim():"",a=ws(ia,{target:i,props:{elementId:t,label:o,onActivate:Xa}}),l=Nt.get(t);if(l){try{pr(l.instance)}catch(c){mr("warn","badge remount cleanup failed",c)}l.host.isConnected&&l.host.remove()}Nt.set(t,{instance:a,host:i})}function Xa(e){Yr();const t=document.createElement("div");Va().appendChild(t),un={instance:ws(Wa,{target:t,props:{rootId:e,onClose:Yr}}),node:t}}function Yr(){if(un){try{pr(un.instance)}catch(e){mr("warn","panel unmount failed",e)}un.node.remove(),un=null}}window.addEventListener("beforeunload",()=>{Ps.abort(),Yr(),Vn(),Zn();for(const{instance:e}of Nt.values())try{pr(e)}catch{}Nt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Mi,{once:!0}):Mi(); + creating a duplicate.`,1),Zl=F('

'),Ql=F(' '),$l=F('Migrate: ',1),ec=F('No migratable keys on this element.'),tc=F(' '),nc=F('
'),rc=F('
');function sc(e,t){Yt(t,!0);let n=Nn(t,"row",15),r=Nn(t,"globalClasses",19,()=>[]),s=Nn(t,"finalClassName",3,"");const i=ce(()=>t.mode==="modifier"),o=ce(()=>t.mode==="migrate"),a=ce(()=>t.mode==="rename"),l=ce(()=>!t.isRoot&&t.blockName?`${t.blockName}__`:""),f=ce(()=>n().suggestedFrom==="element-type"||n().suggestedFrom==="fallback"),h=ce(()=>!s()||!Array.isArray(r())||!n().include?null:r().find(b=>b&&b.name===s())||null);function u(){n().suggestedFrom!=="user"&&n(n().suggestedFrom="user",!0)}function d(b){return b.startsWith("_")?b.slice(1):b}var p=rc();let v;var y=E(p),g=E(y),m=k(y,2),S=E(m),x=E(S),M=k(S,2),W=E(M),re=k(M,2);{var J=b=>{var R=Wl();Y(()=>ke(R,"title",`Pre-filled from ${n().suggestedFrom==="element-type"?"Bricks element type":"fallback"}`)),N(b,R)};se(re,b=>{_(f)&&n().include&&b(J)})}var he=k(m,2),_e=E(he),U=E(_e);{var nt=b=>{var R=Ul(),$=E(R);Y(()=>Q($,_(l))),N(b,R)};se(U,b=>{_(l)&&b(nt)})}var Le=k(U,2),dt=k(_e,2);{var Ct=b=>{var R=zl();Y(()=>R.disabled=!n().include),Oe("input",R,u),ss(R,()=>n().modifier,$=>n(n().modifier=$,!0)),N(b,R)};se(dt,b=>{_(i)&&b(Ct)})}var Zt=k(he,2);{var Qt=b=>{var R=Gl();N(b,R)};se(Zt,b=>{_(i)&&n().include&&!n().modifier&&b(Qt)})}var At=k(Zt,2);{var En=b=>{var R=Vl();N(b,R)},$t=b=>{var R=Yl(),$=E(R);Y(()=>Q($,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),N(b,R)};se(At,b=>{_(a)&&n().include&&n().currentClassCount===0?b(En):_(a)&&n().include&&n().currentClassCount>1&&b($t,1)})}var en=k(At,2);{var tn=b=>{var R=Zl(),$=E(R);{var C=L=>{var G=Jl(),j=k(ct(G)),X=E(j);Y(()=>Q(X,s())),N(L,G)},z=L=>{var G=Xl(),j=k(ct(G)),X=E(j);Y(()=>Q(X,s())),N(L,G)};se($,L=>{_(o)?L(C):L(z,-1)})}N(b,R)};se(en,b=>{_(h)&&b(tn)})}var w=k(en,2);{var A=b=>{var R=nc(),$=E(R);{var C=j=>{var X=$l(),q=k(ct(X),2);pt(q,17,()=>n().migrateKeys,Fa,(me,Z)=>{var K=Ql(),ee=E(K);Y(oe=>{ke(K,"title",`Will be lifted into ${(s()||"the new class")??""}`),Q(ee,oe)},[()=>d(_(Z))]),N(me,K)}),N(j,X)},z=j=>{var X=ec();N(j,X)};se($,j=>{n().migrateKeys?.length?j(C):j(z,-1)})}var L=k($,2);{var G=j=>{var X=tc(),q=E(X);Y(()=>Q(q,`${n().skippedKeys.length??""} skipped`)),N(j,X)};se(L,j=>{n().skippedKeys?.length&&j(G)})}N(b,R)};se(w,b=>{_(o)&&n().include&&b(A)})}Y(b=>{v=Gt(p,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":_(f)}),Bi(p,`--rebemer-row-depth: ${n().depth??0??""}`),Q(x,n().originalLabel),Q(W,b),ke(Le,"placeholder",t.isRoot?"block-name":"element-name"),Le.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),Hi(g,()=>n().include,b=>n(n().include=b,!0)),Oe("input",Le,u),ss(Le,()=>n().name,b=>n(n().name=b,!0)),N(e,p),Jt()}Xt(["input"]);var ic=F(" ");function $i(e,t){Yt(t,!0);let n=Nn(t,"kind",3,"info"),r=Nn(t,"duration",3,3e3),s=ie(!0);gs(()=>{if(!_(s)||r()<=0)return;const f=setTimeout(()=>{V(s,!1),t.onDismiss?.()},r());return()=>clearTimeout(f)});const i=ce(()=>n()==="error"?"alert":"status");var o=Na(),a=ct(o);{var l=f=>{var h=ic(),u=E(h);Y(()=>{Gt(h,1,`rebemer-toast rebemer-toast--${n()??""}`),ke(h,"role",_(i)),ke(h,"aria-live",n()==="error"?"assertive":"polite"),Q(u,t.message)}),Oe("click",h,()=>{V(s,!1),t.onDismiss?.()}),N(f,h)};se(a,f=>{_(s)&&f(l)})}N(e,o),Jt()}Xt(["click"]);var oc=F("Will migrate ",1),ac=F(' '),lc=F(''),cc=F(' ',1);function uc(e,t){Yt(t,!0);const n={add:"Attaches a new BEM class to each element without removing any existing classes.",rename:"Replaces the first existing class with a new name, seeding its settings from the old class.",replace:"Replaces ALL existing classes with a single new BEM class (clean slate, no settings carried over).",modifier:"Appends a --modifier variant. The base class is auto-added to the element if absent.",migrate:"Lifts inline element styles (padding, color, typography, etc.) into a new global class."};let r=ie("add"),s=ie(!0),i=ie(yt([])),o=ie(yt([])),a=ie(null),l=ie(null);const f=ce(()=>qt(_(i)[0]?.name??"")),h=ce(()=>_(i)[0]?.originalLabel??""),u=ce(()=>{if(_(r)!=="migrate")return null;let C=0,z=0;for(const L of _(i))L.include&&(C+=L.migrateKeys?.length??0,z+=L.skippedKeys?.length??0);return{willMigrate:C,willSkip:z}}),d=ce(()=>{if(_(i).length===0)return new Map;const C=Xi({rootId:t.rootId,rows:_(i),mode:_(r)}),z=new Map;if(!C.ok)return z;for(const L of C.ops)z.set(L.row.id,L.finalClass);return z});qi(()=>{const C=el(t.rootId);V(o,zi().slice(),!0);const z=C.map((L,G)=>{const j=G===0,X=L.label||"",q=qt(X),me=L.name||"";let Z,K;return q?(Z=q,K="label"):j?(Z="block",K="fallback"):me&&!qr(me)?(Z=Hl(me,"item"),K="element-type"):(Z="item",K="fallback"),{id:L.id,depth:L.depth,bricksType:me,originalLabel:X||(j?"block":"element"),name:Z,modifier:"",include:!0,suggestedFrom:K,migrateKeys:Ml(L.settings),skippedKeys:Il(L.settings),currentClassCount:Array.isArray(L.settings?._cssGlobalClasses)?L.settings._cssGlobalClasses.filter(ee=>typeof ee=="string"&&ee.length>0).length:0}});if(z.length>1){const L=new Map(C.map(q=>[q.id,[]])),G=[];for(const q of C){for(;G.length&&G[G.length-1].depth>=q.depth;)G.pop();G.length&&L.get(G[G.length-1].id).push(q.id),G.push(q)}const j=new Map(C.map(q=>[q.id,q])),X=new Map(z.map(q=>[q.id,q]));for(const[,q]of L){if(!q.length)continue;const me=new Map;for(const K of q){const ee=j.get(K)?.name;ee&&me.set(ee,(me.get(ee)??0)+1)}const Z=q.filter(K=>qr(j.get(K)?.name??""));for(const K of q){const ee=X.get(K),oe=j.get(K);if(!(!ee||!oe||ee.suggestedFrom==="label")){if(qr(oe.name)){const pe=(L.get(K)??[]).map(ht=>j.get(ht)?.name??"").filter(Boolean),qe=Z.indexOf(K);ee.name=Kl(pe,qe,Z.length),ee.suggestedFrom="element-type"}else if((me.get(oe.name)??0)===1){const pe=ql[oe.name];pe&&(ee.name=pe,ee.suggestedFrom="element-type")}}}}}V(i,z,!0)});function p(C){if(C.key==="Escape"){t.onClose?.();return}_(l)&&C.target instanceof Node&&_(l).contains(C.target)&&C.key==="Enter"&&(C.target?.tagName==="INPUT"||C.target?.tagName==="SELECT")&&(C.preventDefault(),y())}let v=null;function y(){const C=qt(_(i)[0]?.name??""),z=Ol(C);if(!z.ok){V(a,{kind:"error",message:z.reason},!0);return}const L=Nl({rootId:t.rootId,rows:_(i),mode:_(r),syncLabels:_(s)});L.ok?(V(a,{kind:"success",message:`Applied to ${L.count} element${L.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):V(a,{kind:"error",message:L.error},!0)}gs(()=>()=>{v&&clearTimeout(v)});var g=cc();Fi("keydown",gr,p);var m=ct(g),S=E(m),x=E(S),M=k(E(x)),W=E(M),re=k(x,2),J=k(S,2),he=E(J),_e=k(E(he),2),U=E(_e);U.value=U.__value="add";var nt=k(U);nt.value=nt.__value="rename";var Le=k(nt);Le.value=Le.__value="replace";var dt=k(Le);dt.value=dt.__value="modifier";var Ct=k(dt);Ct.value=Ct.__value="migrate";var Zt=k(he,2),Qt=E(Zt),At=k(J,2),En=E(At),$t=k(At,2);{var en=C=>{var z=lc();let L;var G=E(z);{var j=Z=>{var K=Ra("No migratable style keys found on any included element. Apply will attach empty classes.");N(Z,K)},X=Z=>{var K=oc(),ee=k(ct(K)),oe=E(ee),pe=k(ee);Y(()=>{Q(oe,_(u).willMigrate),Q(pe,` style key${_(u).willMigrate===1?"":"s"} into new classes.`)}),N(Z,K)};se(G,Z=>{_(u).willMigrate===0?Z(j):Z(X,-1)})}var q=k(G,2);{var me=Z=>{var K=ac(),ee=E(K);Y(()=>Q(ee,`${_(u).willSkip??""} key${_(u).willSkip===1?"":"s"} not on the allowlist will stay on the element.`)),N(Z,K)};se(q,Z=>{_(u).willSkip>0&&Z(me)})}Y(()=>L=Gt(z,1,"rebemer-panel__notice",null,L,{"rebemer-panel__notice--warn":_(u).willSkip>0||_(u).willMigrate===0})),N(C,z)};se($t,C=>{_(u)&&C(en)})}var tn=k($t,2);pt(tn,23,()=>_(i),C=>C.id,(C,z,L)=>{{let G=ce(()=>_(z).id===t.rootId),j=ce(()=>_(d).get(_(z).id)??"");sc(C,{get mode(){return _(r)},get blockName(){return _(f)},get isRoot(){return _(G)},get globalClasses(){return _(o)},get finalClassName(){return _(j)},get row(){return _(i)[_(L)]},set row(X){_(i)[_(L)]=X}})}});var w=k(tn,2),A=E(w),b=k(A,2);Ja(m,C=>V(l,C),()=>_(l));var R=k(m,2);{var $=C=>{$i(C,{get kind(){return _(a).kind},get message(){return _(a).message},onDismiss:()=>{V(a,null)}})};se(R,C=>{_(a)&&C($)})}Y(()=>{Q(W,_(h)),Qt.disabled=_(r)==="modifier",Q(En,n[_(r)])}),Oe("click",re,()=>t.onClose?.()),Ua(_e,()=>_(r),C=>V(r,C)),Hi(Qt,()=>_(s),C=>V(s,C)),Oe("click",A,()=>t.onClose?.()),Oe("click",b,y),N(e,g),Jt()}Xt(["click"]);var fc=F('');function dc(e,t){var n=fc();let r;Y(()=>{r=Gt(n,1,"slashed-cp-launch",null,r,{"slashed-cp-launch--on":t.open}),ke(n,"aria-pressed",t.open)}),Oe("click",n,function(...s){t.onToggle?.apply(this,s)}),N(e,n)}Xt(["click"]);const Hs="--sf-color-",eo=["primary","secondary","tertiary","action","neutral","base"],to=["success","warning","error","info","danger"],qs=["a5","a10","a20","a30","a40","a50","a60","a70","a80","a90","a95"],Ks=["superlight","xlight","lighter","darker","xdark","superdark","hover","active","strong","subtle","muted","ghost"],er=["text","heading","bg","surface","well","raised","overlay","inverse","border","link","code","selection","mark","dim"],hc=e=>new Set(e),_c=hc([...eo,...to]);function pc(e){if(typeof e!="string"||e.indexOf(Hs)!==0)return null;const t=e.slice(Hs.length);if(!t||t==="scheme")return null;const n=t.indexOf("-"),r=n===-1?t:t.slice(0,n);if(!_c.has(r))return{family:"semantic",kind:"semantic",step:null,key:t};const s=n===-1?"":t.slice(n+1);return s===""?{family:r,kind:"base",step:null,key:t}:s==="light"?null:/^[0-9]+$/.test(s)?{family:r,kind:"scale",step:Number(s),key:t}:/^a[0-9]+$/.test(s)?{family:r,kind:"alpha",step:s,key:t}:{family:r,kind:"alias",step:s,key:t}}function vc(e){return e.kind==="alpha"?!0:/(?:^|-)(?:subtle|muted|ghost|translucent|overlay|dim|underline)$/.test(e.key)}function gc(e){switch(e.kind){case"base":return Er(e.family);case"scale":return String(e.step);case"alpha":return String(e.step).toUpperCase();case"alias":return Er(String(e.step));case"semantic":default:return mc(e.key)}}function Er(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function mc(e){return e.split("--").map(n=>n.split("-").map(Er).join(" ")).join(" · ")}function bc(e,t,n,r){const s=n[e];if(typeof s!="string"||!s)return null;const i=typeof r[e]=="string"&&r[e]?r[e]:s;return{var:e,name:e.slice(2),label:gc(t),light:s,dark:i,alpha:vc(t)}}function yc(e,t){const n={base:0,scale:1,alias:2,alpha:3};if(n[e.info.kind]!==n[t.info.kind])return n[e.info.kind]-n[t.info.kind];if(e.info.kind==="scale")return e.info.step-t.info.step;if(e.info.kind==="alpha")return qs.indexOf(e.info.step)-qs.indexOf(t.info.step);if(e.info.kind==="alias"){const r=Ks.indexOf(e.info.step),s=Ks.indexOf(t.info.step);return(r===-1?999:r)-(s===-1?999:s)}return 0}function wc(e,t){const n=er.findIndex(o=>e.info.key===o||e.info.key.startsWith(o+"-")),r=er.findIndex(o=>t.info.key===o||t.info.key.startsWith(o+"-")),s=n===-1?er.length:n,i=r===-1?er.length:r;return s!==i?s-i:e.info.key.localeCompare(t.info.key)}function kc(e,t,n){const r=Array.isArray(e)?e:[],s=t&&typeof t=="object"?t:{},i=n&&typeof n=="object"?n:{},o=new Map,a=[];for(const h of r){const u=pc(h);if(!u)continue;const d=bc(h,u,s,i);if(!d)continue;const p={swatch:d,info:u};if(u.family==="semantic"){a.push(p);continue}o.has(u.family)||o.set(u.family,[]),o.get(u.family).push(p)}const l=[],f=(h,u)=>{const d=o.get(h);if(!d||d.length===0)return;d.sort(yc);const p=d.filter(m=>m.info.kind==="base"||m.info.kind==="scale"),v=d.filter(m=>m.info.kind==="alias"),y=d.filter(m=>m.info.kind==="alpha"),g=[];p.length&&g.push({id:"scale",label:"Shades & tints",swatches:p.map(m=>m.swatch)}),y.length&&g.push({id:"alpha",label:"Transparent",swatches:y.map(m=>m.swatch)}),v.length&&g.push({id:"alias",label:"Semantic",swatches:v.map(m=>m.swatch)}),l.push({id:h,label:Er(h),type:u,count:d.length,sections:g})};for(const h of eo)f(h,"brand");for(const h of to)f(h,"status");return a.length&&(a.sort(wc),l.push({id:"semantic",label:"Semantic",type:"semantic",count:a.length,sections:[{id:"all",label:"",swatches:a.map(h=>h.swatch)}]})),{groups:l}}function Ec(e,t){const n=String(t||"").trim().toLowerCase();if(!n)return e;if(!e||!Array.isArray(e.groups))return{groups:[]};const r=[];for(const s of e.groups){const i=[];for(const o of s.sections){const a=o.swatches.filter(l=>l.name.toLowerCase().includes(n)||l.label.toLowerCase().includes(n)||s.label.toLowerCase().includes(n));a.length&&i.push({...o,swatches:a})}if(i.length){const o=i.reduce((a,l)=>a+l.swatches.length,0);r.push({...s,sections:i,count:o})}}return{groups:r}}function Sc(e){return`var(${e.var})`}function Cc(e,t){return t==="dark"?e.dark:e.light}var Ac=F('');function Ws(e,t){Yt(t,!0);const n=ce(()=>`${t.swatch.name} +light ${t.swatch.light} · dark ${t.swatch.dark} +click: apply + copy var(${t.swatch.var})`);var r=Ac();let s;Y(i=>{s=Gt(r,1,"slashed-cp-swatch",null,s,{"slashed-cp-swatch--alpha":t.swatch.alpha,"slashed-cp-swatch--split":t.mode==="both"}),Bi(r,`--cp-l:${t.swatch.light??""}; --cp-d:${t.swatch.dark??""}; --cp-solid:${i??""};`),ke(r,"title",_(n)),ke(r,"aria-label",`${t.swatch.name} — apply and copy`)},[()=>Cc(t.swatch,t.mode==="dark"?"dark":"light")]),Oe("click",r,()=>t.onPick(t.swatch)),N(e,r),Jt()}Xt(["click"]);var xc=F(''),Tc=F(''),Oc=F('

'),Mc=F(''),Lc=F('
  • '),Ic=F('
      '),Rc=F('
      '),Nc=F('
      '),Pc=F(" ",1),Dc=F('

      '),Fc=F(''),Bc=F(' ',1);function jc(e,t){Yt(t,!0);const n=[{id:"background",label:"Background"},{id:"text",label:"Text"},{id:"border",label:"Border"}],r=[{id:"both",label:"Both"},{id:"light",label:"Light"},{id:"dark",label:"Dark"}];let s=ie("both"),i=ie("background"),o=ie(""),a=ie(null);const l=ce(()=>kc(t.source?.variables,t.source?.light,t.source?.dark)),f=ce(()=>Ec(_(l),_(o))),h=ce(()=>_(l).groups.reduce((w,A)=>w+A.count,0)),u=ce(()=>n.find(w=>w.id===_(i))?.label??_(i));let d;function p(){if(typeof document>"u")return null;const w=document.querySelector('iframe#bricks-builder-iframe, iframe[name="bricks-builder-iframe"], #bricks-builder-area iframe');try{return w?.contentDocument?.documentElement??null}catch{return null}}function v(w){const A=p();if(A)try{d===void 0&&(d=A.getAttribute("data-theme")),w==="light"||w==="dark"?A.setAttribute("data-theme",w):d===null?A.removeAttribute("data-theme"):A.setAttribute("data-theme",d)}catch{}}function y(){const w=p();if(!(!w||d===void 0))try{d===null?w.removeAttribute("data-theme"):w.setAttribute("data-theme",d)}catch{}}function g(w){V(s,w,!0),v(w)}qi(()=>()=>y());async function m(w){try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(w),!0}catch{}try{const A=document.createElement("textarea");A.value=w,A.style.position="fixed",A.style.opacity="0",document.body.appendChild(A),A.select();const b=document.execCommand("copy");return A.remove(),b}catch{return!1}}async function S(w){const A=Sc(w),b=await m(A),R=tl();if(R){let $=!1;if(Wi(()=>{$=rl(R,_(i),A)}),$){const C=sl(R)||"element";V(a,{kind:"success",message:`${_(u)} of “${C}” → ${w.name}`},!0);return}}V(a,b?{kind:"info",message:`Copied ${A} — paste into any Bricks colour field`}:{kind:"error",message:`Couldn't copy ${A}`},!0)}function x(w){w.key==="Escape"&&t.onClose?.()}var M=Bc();Fi("keydown",gr,x);var W=ct(M),re=E(W),J=k(E(re),2);pt(J,21,()=>r,w=>w.id,(w,A)=>{var b=xc();let R;var $=E(b);Y(()=>{R=Gt(b,1,"slashed-cp__seg-btn",null,R,{"slashed-cp__seg-btn--on":_(s)===_(A).id}),ke(b,"aria-pressed",_(s)===_(A).id),Q($,_(A).label)}),Oe("click",b,()=>g(_(A).id)),N(w,b)});var he=k(J,2),_e=k(re,2),U=E(_e),nt=k(U,2),Le=k(E(nt),2);pt(Le,17,()=>n,w=>w.id,(w,A)=>{var b=Tc();let R;var $=E(b);Y(()=>{R=Gt(b,1,"slashed-cp__chip",null,R,{"slashed-cp__chip--on":_(i)===_(A).id}),ke(b,"aria-pressed",_(i)===_(A).id),Q($,_(A).label)}),Oe("click",b,()=>V(i,_(A).id,!0)),N(w,b)});var dt=k(_e,2),Ct=E(dt);{var Zt=w=>{var A=Oc(),b=E(A);Y(()=>Q(b,`No colours match “${_(o)??""}”.`)),N(w,A)};se(Ct,w=>{_(f).groups.length===0&&w(Zt)})}var Qt=k(Ct,2);pt(Qt,17,()=>_(f).groups,w=>w.id,(w,A)=>{var b=Dc(),R=E(b),$=E(R),C=k($),z=E(C),L=k(R,2);pt(L,17,()=>_(A).sections,G=>G.id,(G,j)=>{var X=Pc(),q=ct(X);{var me=oe=>{var pe=Mc(),qe=E(pe);Y(()=>Q(qe,_(j).label)),N(oe,pe)};se(q,oe=>{_(j).label&&oe(me)})}var Z=k(q,2);{var K=oe=>{var pe=Ic();pt(pe,21,()=>_(j).swatches,qe=>qe.var,(qe,ht)=>{var Sn=Lc(),Cn=E(Sn);Ws(Cn,{get swatch(){return _(ht)},get mode(){return _(s)},onPick:S});var Xn=k(Cn,2),Rr=E(Xn),so=k(Xn,2),io=E(so);Y(()=>{Q(Rr,_(ht).label),Q(io,_(ht).name)}),N(qe,Sn)}),N(oe,pe)},ee=oe=>{var pe=Nc();pt(pe,21,()=>_(j).swatches,qe=>qe.var,(qe,ht)=>{var Sn=Rc(),Cn=E(Sn);Ws(Cn,{get swatch(){return _(ht)},get mode(){return _(s)},onPick:S});var Xn=k(Cn,2),Rr=E(Xn);Y(()=>Q(Rr,_(ht).label)),N(qe,Sn)}),N(oe,pe)};se(Z,oe=>{_(A).type==="semantic"?oe(K):oe(ee,-1)})}N(G,X)}),Y(()=>{ke(b,"data-type",_(A).type),Q($,`${_(A).label??""} `),Q(z,_(A).count)}),N(w,b)});var At=k(dt,2),En=E(At);{var $t=w=>{var A=Fc();N(w,A)};se(En,w=>{_(s)==="both"&&w($t)})}var en=k(W,2);{var tn=w=>{$i(w,{get kind(){return _(a).kind},get message(){return _(a).message},onDismiss:()=>{V(a,null)}})};se(en,w=>{_(a)&&w(tn)})}Y(()=>ke(U,"placeholder",`Search ${_(h)} colours…`)),Oe("click",he,()=>t.onClose?.()),ss(U,()=>_(o),w=>V(o,w)),N(e,M),Jt()}Xt(["click"]);var Hc=F(" ",1);function qc(e,t){let n=ie(!1);var r=Hc(),s=ct(r);dc(s,{get open(){return _(n)},onToggle:()=>V(n,!_(n))});var i=k(s,2);{var o=a=>{jc(a,{get source(){return t.source},onClose:()=>V(n,!1)})};se(i,a=>{_(n)&&a(o)})}N(e,r)}const Us="#bricks-structure",Kc="li[data-id]",zs="slashed-rebemer-host",Wc=400,Uc=25,Jn=(e,...t)=>console[e]("[reBEMer]",...t),no=new AbortController,{signal:Fn}=no,Kt=new Map;let Mn=null,on=null;function ro(){let e=document.getElementById(zs);return e||(e=document.createElement("div"),e.id=zs,document.body.appendChild(e)),e}let Ye=null;function Gs(){Ye=window.slashedBricksEditor,Ye&&typeof Ye=="object"&&(pl(Ye.showClassHints,Ye.classHints,{signal:Fn}),El(Ye.showColorSwatches,Ye.colorHexMap,{signal:Fn}));let e=0;const t=()=>{if(!Fn.aborted){if(Qa()){zc();return}if(++e>=Uc){Jn("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(t,Wc)}};t()}function zc(){Vc();const e=document.querySelector(Us);if(e){Vs(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(Us);n&&(t.disconnect(),Vs(n))});t.observe(document.body,{childList:!0,subtree:!0}),Fn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function Vs(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,Ys(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),Fn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),Ys(e)}function Ys(e){for(const[n,r]of Kt)if(!r.host.isConnected){try{Yn(r.instance)}catch(s){Jn("warn","badge unmount failed",s)}Kt.delete(n)}const t=e.querySelectorAll(Kc);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const s=Kt.get(r);s&&s.host.isConnected&&n.contains(s.host)||Gc(n)}}function Gc(e){const t=e.getAttribute("data-id");if(!t)return;const n=e.querySelector(":scope > .structure-item")||e,r=n.querySelector(":scope > ul.actions")||n.querySelector(":scope > .actions")||n.querySelector(":scope > .structure-item-actions"),s=document.createElement("span");s.className="rebemer-badge-host",r?n.insertBefore(s,r):n.appendChild(s);const i=n.querySelector(":scope > .title, :scope > .structure-item-title, :scope > .name, :scope .label"),o=i?i.textContent.trim():"",a=ks(Al,{target:s,props:{elementId:t,label:o,onActivate:Jc}}),l=Kt.get(t);if(l){try{Yn(l.instance)}catch(f){Jn("warn","badge remount cleanup failed",f)}l.host.isConnected&&l.host.remove()}Kt.set(t,{instance:a,host:s})}function Vc(){if(on)return;const e=Ye&&Ye.colorPanel;if(!Ye?.showColorPanel||!e||!Array.isArray(e.variables)||e.variables.length===0)return;const t=document.createElement("div");ro().appendChild(t),on={instance:ks(qc,{target:t,props:{source:e}}),node:t}}function Yc(){if(on){try{Yn(on.instance)}catch(e){Jn("warn","color app unmount failed",e)}on.node.remove(),on=null}}function Jc(e){as();const t=document.createElement("div");ro().appendChild(t),Mn={instance:ks(uc,{target:t,props:{rootId:e,onClose:as}}),node:t}}function as(){if(Mn){try{Yn(Mn.instance)}catch(e){Jn("warn","panel unmount failed",e)}Mn.node.remove(),Mn=null}}window.addEventListener("beforeunload",()=>{no.abort(),as(),Yc(),lr(),dr();for(const{instance:e}of Kt.values())try{Yn(e)}catch{}Kt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Gs,{once:!0}):Gs(); //# sourceMappingURL=app.js.map diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorApp.svelte b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorApp.svelte new file mode 100644 index 00000000..96bd0e53 --- /dev/null +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorApp.svelte @@ -0,0 +1,23 @@ + + + (open = !open)} /> + +{#if open} + (open = false)} /> +{/if} diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorLauncher.svelte b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorLauncher.svelte new file mode 100644 index 00000000..277d6019 --- /dev/null +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorLauncher.svelte @@ -0,0 +1,24 @@ + + + diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte new file mode 100644 index 00000000..41acfe09 --- /dev/null +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte @@ -0,0 +1,247 @@ + + + + + + +{#if toast} + { toast = null; }} /> +{/if} diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorSwatch.svelte b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorSwatch.svelte new file mode 100644 index 00000000..830ecb0b --- /dev/null +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorSwatch.svelte @@ -0,0 +1,36 @@ + + + diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js index 6dfa8796..151b8a34 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js @@ -220,3 +220,96 @@ export function setElementLabel(id, label) { const el = findElement(id); if (el) el.label = label; } + +/** + * Resolve the id of the element the user currently has selected, or null. + * + * Bricks does not publish a stable JS handle for "the active element", and + * the internal key has shifted across versions. We probe a few known shapes + * on `$_state` first, then fall back to scraping the active row in the + * structure panel (`#bricks-structure li[data-id].…active…`) — DOM-based and + * version-tolerant, matching how main.js already reads that panel. Returns + * null when nothing is selected (the Color panel then degrades to copy-only). + */ +export function getActiveElementId() { + // 1. Known $_state shapes (newest-first). Each may be an element object + // ({id,…}) or a bare id string depending on the Bricks build. + if (_state) { + const candidates = [ + _state.activeElement, + _state.activeElementId, + _state.activeId, + _state.selectedElement, + ]; + for (const c of candidates) { + if (c && typeof c === 'object' && typeof c.id === 'string' && c.id) return c.id; + if (typeof c === 'string' && c) return c; + } + } + + // 2. DOM fallback: the active structure-panel row. + if (typeof document !== 'undefined') { + // `.active` / `.is-active` only — avoid a broad [class*="active"] that + // would also match `inactive`. + const row = document.querySelector( + '#bricks-structure li[data-id].active, #bricks-structure li[data-id].is-active' + ); + const id = row?.getAttribute('data-id'); + if (id) return id; + } + + return null; +} + +/** + * Bricks element-settings path for each Color-panel apply target. + * + * These are the standard Bricks "_" style controls; a colour control stores + * an object whose `raw` field carries the literal CSS value (so a + * `var(--sf-color-*)` reference round-trips intact). We only ever write + * `raw`, leaving any sibling hex/hsl/rgb fields untouched. + * + * @type {Record} + */ +const COLOR_TARGETS = { + text: ['_typography', 'color'], + background: ['_background', 'color'], + border: ['_border', 'color'], +}; + +/** The apply targets the Color panel offers, in display order. */ +export const COLOR_TARGET_KEYS = Object.keys(COLOR_TARGETS); + +/** + * Apply a colour value to one of an element's style controls. + * + * Mutates the reactive `el.settings` proxy in place (same approach as + * setElementClasses), so Vue picks up the change and the canvas repaints. + * Returns true on success, false when the element or target is unknown — + * the caller treats false as "fell back to clipboard only". + * + * @param {string} id Element id. + * @param {string} target One of COLOR_TARGET_KEYS. + * @param {string} rawValue e.g. "var(--sf-color-primary)". + * @returns {boolean} + */ +export function setElementColor(id, target, rawValue) { + const path = COLOR_TARGETS[target]; + if (!path) return false; + const el = findElement(id); + if (!el) return false; + + if (!el.settings || typeof el.settings !== 'object') el.settings = {}; + const [group, key] = path; + if (!el.settings[group] || typeof el.settings[group] !== 'object') { + el.settings[group] = {}; + } + el.settings[group][key] = { raw: rawValue }; + return true; +} + +/** Human label for an element id (structure-panel label), or '' when unknown. */ +export function getElementLabel(id) { + const el = findElement(id); + return el && typeof el.label === 'string' ? el.label : ''; +} diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js new file mode 100644 index 00000000..931986f5 --- /dev/null +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js @@ -0,0 +1,340 @@ +/** + * Color System model — pure, DOM-free, unit-tested. + * + * Turns the flat inventory localised by class-rebemer-enqueue.php + * (`colorPanel.variables` + `colorPanel.light` / `colorPanel.dark` hex maps) + * into the ordered, grouped model the ColorPanel renders. + * + * Why a model layer: + * - The inventory is a flat list of ~275 `--sf-color-*` names with no + * inherent grouping. Rendering it raw would be a wall of swatches. + * - The framework organises colour by *family* (the six brand families and + * five status families) and, within each, by *kind*: a base swatch, a + * numeric tint/shade scale (50–950), translucent alpha steps (a5–a95), + * and named semantic aliases (hover, subtle, …). Everything that isn't a + * family token (text, bg, border, link, …) collects into one "Semantic" + * group. This mirrors `class-colors.php`'s server-side grouping so the + * two stay conceptually aligned. + * - Each swatch carries BOTH its light and dark hex so the panel can show + * the adaptive pair at a glance — the differentiator over a single-mode + * palette browser. + * + * Everything here is data-shaping only; no Bricks, no DOM. The DOM/Bricks + * glue lives in the Svelte components and bricks-api.js. + * + * @module color-model + */ + +const PREFIX = '--sf-color-'; + +/** Brand families, in canonical display order. */ +export const BRAND_FAMILIES = ['primary', 'secondary', 'tertiary', 'action', 'neutral', 'base']; + +/** Status families, in canonical display order. */ +export const STATUS_FAMILIES = ['success', 'warning', 'error', 'info', 'danger']; + +/** Numeric scale steps, light → dark. */ +const SCALE_STEPS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]; + +/** Alpha steps, most → least transparent. */ +const ALPHA_STEPS = ['a5', 'a10', 'a20', 'a30', 'a40', 'a50', 'a60', 'a70', 'a80', 'a90', 'a95']; + +/** Named semantic aliases, ordered light → dark → translucent. */ +const ALIAS_ORDER = [ + 'superlight', 'xlight', 'lighter', 'darker', 'xdark', 'superdark', + 'hover', 'active', 'strong', 'subtle', 'muted', 'ghost', +]; + +/** + * Preferred ordering for the catch-all "Semantic" group. Tokens whose key + * starts with one of these prefixes sort in this order; anything else falls + * to the end, alphabetically. Keeps the most-reached-for page tokens (text, + * surfaces, borders, links) at the top. + */ +const SEMANTIC_PREFIX_ORDER = [ + 'text', 'heading', 'bg', 'surface', 'well', 'raised', 'overlay', 'inverse', + 'border', 'link', 'code', 'selection', 'mark', 'dim', +]; + +const SET = (arr) => new Set(arr); +const ALL_FAMILIES = SET([...BRAND_FAMILIES, ...STATUS_FAMILIES]); + +/** + * Classify a single `--sf-color-*` variable. + * + * Pure. Returns the structured descriptor used to bucket the token into its + * family + section, or null for anything that isn't a colour token we render + * (e.g. `--sf-color-scheme`, or a `-light` source duplicate of its base). + * + * @param {string} varName e.g. "--sf-color-primary-50" or "--sf-color-text--muted". + * @returns {{ family: string, kind: 'base'|'scale'|'alpha'|'alias'|'semantic', step: (number|string|null), key: string } | null} + */ +export function classifyVar(varName) { + if (typeof varName !== 'string' || varName.indexOf(PREFIX) !== 0) return null; + + const key = varName.slice(PREFIX.length); + if (!key) return null; + + // Non-colour token that shares the namespace. + if (key === 'scheme') return null; + + const firstDash = key.indexOf('-'); + const family = firstDash === -1 ? key : key.slice(0, firstDash); + + if (!ALL_FAMILIES.has(family)) { + // Everything that isn't a brand/status family is a page-level semantic + // token (text, bg, border, link, …). + return { family: 'semantic', kind: 'semantic', step: null, key }; + } + + const suffix = firstDash === -1 ? '' : key.slice(firstDash + 1); + + if (suffix === '') { + return { family, kind: 'base', step: null, key }; + } + + // The `-light` source token duplicates the base swatch — skip to avoid a + // visual dupe (the base swatch already represents the resolved colour). + if (suffix === 'light') return null; + + if (/^[0-9]+$/.test(suffix)) { + return { family, kind: 'scale', step: Number(suffix), key }; + } + if (/^a[0-9]+$/.test(suffix)) { + return { family, kind: 'alpha', step: suffix, key }; + } + return { family, kind: 'alias', step: suffix, key }; +} + +/** + * Whether a token is translucent (its swatch needs a checkerboard underlay). + * + * @param {{ kind: string, key: string }} info + * @returns {boolean} + */ +function isTranslucent(info) { + if (info.kind === 'alpha') return true; + // Named alpha-ish aliases and semantic overlays that resolve to a + // translucent value in the framework. + return /(?:^|-)(?:subtle|muted|ghost|translucent|overlay|dim|underline)$/.test(info.key); +} + +/** + * Human label for a swatch, given its classification. + * + * @param {{ family: string, kind: string, step: (number|string|null), key: string }} info + * @returns {string} + */ +export function swatchLabel(info) { + switch (info.kind) { + case 'base': + return capitalize(info.family); + case 'scale': + return String(info.step); + case 'alpha': + return String(info.step).toUpperCase(); + case 'alias': + return capitalize(String(info.step)); + case 'semantic': + default: + return humanizeKey(info.key); + } +} + +function capitalize(s) { + return s ? s.charAt(0).toUpperCase() + s.slice(1) : s; +} + +/** + * Humanize a full token key for the semantic group. + * "text--secondary" → "Text · Secondary" + * "border--subtle" → "Border · Subtle" + * "bg--hover" → "Bg · Hover" + */ +function humanizeKey(key) { + const parts = key.split('--'); + return parts + .map((p) => p.split('-').map(capitalize).join(' ')) + .join(' · '); +} + +/** + * Build one swatch descriptor. + * + * @param {string} varName + * @param {object} info classification + * @param {Record} light + * @param {Record} dark + * @returns {{ var: string, name: string, label: string, light: string, dark: string, alpha: boolean } | null} + */ +function buildSwatch(varName, info, light, dark) { + const l = light[varName]; + if (typeof l !== 'string' || !l) return null; // no preview value → skip + const d = (typeof dark[varName] === 'string' && dark[varName]) ? dark[varName] : l; + return { + var: varName, + name: varName.slice(2), // drop the leading "--" for display ("sf-color-…") + label: swatchLabel(info), + light: l, + dark: d, + alpha: isTranslucent(info), + }; +} + +/** + * Section sort comparator within a family. + */ +function compareInFamily(a, b) { + // base first, then scale (numeric), then alias (curated), then alpha. + const rank = { base: 0, scale: 1, alias: 2, alpha: 3 }; + if (rank[a.info.kind] !== rank[b.info.kind]) return rank[a.info.kind] - rank[b.info.kind]; + if (a.info.kind === 'scale') return a.info.step - b.info.step; + if (a.info.kind === 'alpha') return ALPHA_STEPS.indexOf(a.info.step) - ALPHA_STEPS.indexOf(b.info.step); + if (a.info.kind === 'alias') { + const ai = ALIAS_ORDER.indexOf(a.info.step); + const bi = ALIAS_ORDER.indexOf(b.info.step); + return (ai === -1 ? 999 : ai) - (bi === -1 ? 999 : bi); + } + return 0; +} + +/** + * Semantic group sort comparator. + */ +function compareSemantic(a, b) { + const ai = SEMANTIC_PREFIX_ORDER.findIndex((p) => a.info.key === p || a.info.key.startsWith(p + '-')); + const bi = SEMANTIC_PREFIX_ORDER.findIndex((p) => b.info.key === p || b.info.key.startsWith(p + '-')); + const ar = ai === -1 ? SEMANTIC_PREFIX_ORDER.length : ai; + const br = bi === -1 ? SEMANTIC_PREFIX_ORDER.length : bi; + if (ar !== br) return ar - br; + return a.info.key.localeCompare(b.info.key); +} + +/** + * Build the full grouped colour model. + * + * @param {string[]} variables Ordered `--sf-color-*` names from the inventory. + * @param {Record} light Light-mode hex map. + * @param {Record} dark Dark-mode hex map. + * @returns {{ groups: Array<{ id: string, label: string, type: 'brand'|'status'|'semantic', count: number, sections: Array<{ id: string, label: string, swatches: object[] }> }> }} + */ +export function buildColorModel(variables, light, dark) { + const vars = Array.isArray(variables) ? variables : []; + const lightMap = light && typeof light === 'object' ? light : {}; + const darkMap = dark && typeof dark === 'object' ? dark : {}; + + // family id → { base:[], scale:[], alias:[], alpha:[] } | semantic: [] + const byFamily = new Map(); + const semantic = []; + + for (const varName of vars) { + const info = classifyVar(varName); + if (!info) continue; + const swatch = buildSwatch(varName, info, lightMap, darkMap); + if (!swatch) continue; + const entry = { swatch, info }; + + if (info.family === 'semantic') { + semantic.push(entry); + continue; + } + if (!byFamily.has(info.family)) byFamily.set(info.family, []); + byFamily.get(info.family).push(entry); + } + + const groups = []; + + const pushFamily = (family, type) => { + const entries = byFamily.get(family); + if (!entries || entries.length === 0) return; + entries.sort(compareInFamily); + + // Split into the three rendered sections. + const scale = entries.filter((e) => e.info.kind === 'base' || e.info.kind === 'scale'); + const alias = entries.filter((e) => e.info.kind === 'alias'); + const alpha = entries.filter((e) => e.info.kind === 'alpha'); + + const sections = []; + if (scale.length) sections.push({ id: 'scale', label: 'Shades & tints', swatches: scale.map((e) => e.swatch) }); + if (alpha.length) sections.push({ id: 'alpha', label: 'Transparent', swatches: alpha.map((e) => e.swatch) }); + if (alias.length) sections.push({ id: 'alias', label: 'Semantic', swatches: alias.map((e) => e.swatch) }); + + groups.push({ + id: family, + label: capitalize(family), + type, + count: entries.length, + sections, + }); + }; + + for (const f of BRAND_FAMILIES) pushFamily(f, 'brand'); + for (const f of STATUS_FAMILIES) pushFamily(f, 'status'); + + if (semantic.length) { + semantic.sort(compareSemantic); + groups.push({ + id: 'semantic', + label: 'Semantic', + type: 'semantic', + count: semantic.length, + sections: [{ id: 'all', label: '', swatches: semantic.map((e) => e.swatch) }], + }); + } + + return { groups }; +} + +/** + * Filter a built model by a free-text query, returning a new model whose + * groups/sections only contain matching swatches (empty sections and groups + * are dropped). Matches against the token name and the human label, + * case-insensitively. An empty query returns the model unchanged. + * + * @param {{ groups: object[] }} model + * @param {string} query + * @returns {{ groups: object[] }} + */ +export function filterModel(model, query) { + const q = String(query || '').trim().toLowerCase(); + if (!q) return model; + if (!model || !Array.isArray(model.groups)) return { groups: [] }; + + const groups = []; + for (const group of model.groups) { + const sections = []; + for (const section of group.sections) { + const swatches = section.swatches.filter( + (s) => s.name.toLowerCase().includes(q) || s.label.toLowerCase().includes(q) || group.label.toLowerCase().includes(q) + ); + if (swatches.length) sections.push({ ...section, swatches }); + } + if (sections.length) { + const count = sections.reduce((n, s) => n + s.swatches.length, 0); + groups.push({ ...group, sections, count }); + } + } + return { groups }; +} + +/** + * The CSS value applied/copied for a swatch — always the live framework + * variable so the result tracks theme + dark mode, never a baked hex. + * + * @param {{ var: string }} swatch + * @returns {string} + */ +export function swatchValue(swatch) { + return `var(${swatch.var})`; +} + +/** + * The hex to render for a swatch given the preview mode. + * + * @param {{ light: string, dark: string }} swatch + * @param {'light'|'dark'} mode + * @returns {string} + */ +export function swatchHex(swatch, mode) { + return mode === 'dark' ? swatch.dark : swatch.light; +} diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/main.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/main.js index 05c8eae7..56a5bfaf 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/main.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/main.js @@ -22,6 +22,7 @@ import * as classHints from './lib/class-hints.js'; import * as colorSwatches from './lib/color-swatches.js'; import BemBadge from './components/BemBadge.svelte'; import BemPanel from './components/BemPanel.svelte'; +import ColorApp from './components/ColorApp.svelte'; import './styles/panel.css'; const STRUCTURE_PANEL_SELECTOR = '#bricks-structure'; @@ -41,6 +42,9 @@ const badgeInstances = new Map(); /** @type {{ instance: any, node: HTMLElement } | null} */ let activePanel = null; +/** @type {{ instance: any, node: HTMLElement } | null} */ +let colorApp = null; + function ensureHost() { let host = document.getElementById(HOST_ID); @@ -52,12 +56,14 @@ function ensureHost() { return host; } +/** Config injected by class-rebemer-enqueue.php via wp_localize_script. */ +let cfg = null; + function start() { // Class documentation tooltips are independent of the reBEMer badge // pipeline below: they hook the Bricks settings panel / class manager, // not the structure panel, so they run even if the Vue probe fails. - // Config is injected by class-rebemer-enqueue.php via wp_localize_script. - const cfg = window.slashedBricksEditor; + cfg = window.slashedBricksEditor; if (cfg && typeof cfg === 'object') { classHints.init(cfg.showClassHints, cfg.classHints, { signal }); colorSwatches.init(cfg.showColorSwatches, cfg.colorHexMap, { signal }); @@ -80,6 +86,11 @@ function start() { } function onProbed() { + // Color System panel: mount once the Bricks app is confirmed (apply needs + // the live state). Independent of the structure-panel badge pipeline — the + // launcher is reachable from anywhere in the builder. + mountColorApp(); + // The structure panel may not be in the DOM yet on first paint; // observe body once for its arrival, then narrow to the panel. const existing = document.querySelector(STRUCTURE_PANEL_SELECTOR); @@ -214,6 +225,27 @@ function injectBadgeInto(li) { badgeInstances.set(elementId, { instance, host }); } +function mountColorApp() { + if (colorApp) return; // already mounted + const src = cfg && cfg.colorPanel; + if (!cfg?.showColorPanel || !src || !Array.isArray(src.variables) || src.variables.length === 0) { + return; // disabled, or no token data to show + } + const node = document.createElement('div'); + ensureHost().appendChild(node); + colorApp = { + instance: mount(ColorApp, { target: node, props: { source: src } }), + node, + }; +} + +function unmountColorApp() { + if (!colorApp) return; + try { unmount(colorApp.instance); } catch (err) { log('warn', 'color app unmount failed', err); } + colorApp.node.remove(); + colorApp = null; +} + function openPanel(elementId) { closePanel(); const node = document.createElement('div'); @@ -238,6 +270,7 @@ function closePanel() { window.addEventListener('beforeunload', () => { controller.abort(); closePanel(); + unmountColorApp(); classHints.destroy(); colorSwatches.destroy(); for (const { instance } of badgeInstances.values()) { diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css index a73108d0..ff4bad7b 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css @@ -354,6 +354,240 @@ li[data-id]:focus-within > .rebemer-badge-host { .rebemer-class-hint__cat[hidden] { display: none; } .rebemer-class-hint__desc { margin: 4px 0 0; color: var(--rebemer-fg); } +/* ===================================================================== + Color System panel + --------------------------------------------------------------------- + A floating browser for the framework's --sf-color-* tokens. Scoped to + .slashed-cp* so nothing leaks into the Bricks UI; inherits the shared + --rebemer-* theme vars declared on #slashed-rebemer-host above. + ===================================================================== */ + +/* Launcher pill — pinned bottom-right, out of Bricks' toolbar paths. */ +.slashed-cp-launch { + position: fixed; + right: 16px; + bottom: 16px; + z-index: 99999; + display: inline-flex; + align-items: center; + gap: 7px; + padding: 7px 12px; + background: var(--rebemer-bg); + color: var(--rebemer-fg); + border: 1px solid var(--rebemer-border); + border-radius: 999px; + font: 600 11px/1 var(--rebemer-font); + letter-spacing: .3px; + cursor: pointer; + box-shadow: 0 4px 16px rgba(0, 0, 0, .45); + transition: border-color 120ms, color 120ms, transform 120ms; +} +.slashed-cp-launch:hover { border-color: var(--rebemer-fg-muted); transform: translateY(-1px); } +.slashed-cp-launch--on { border-color: var(--rebemer-accent); color: #fff; } +.slashed-cp-launch__dot { + width: 12px; + height: 12px; + border-radius: 50%; + /* A four-stop conic ring nods at the brand families (primary → action). */ + background: conic-gradient(from 210deg, #5b8cff, #b07cff, #ff6b6b, #ffd24a, #4ade80, #5b8cff); + box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); +} +.slashed-cp-launch__txt { text-transform: uppercase; } + +/* Panel shell — right-docked, tall, scrolls internally. */ +.slashed-cp { + position: fixed; + top: 64px; + right: 16px; + bottom: 64px; + width: 372px; + max-width: calc(100vw - 32px); + z-index: 100001; + display: flex; + flex-direction: column; + background: var(--rebemer-bg); + color: var(--rebemer-fg); + border: 1px solid var(--rebemer-border); + border-radius: var(--rebemer-radius); + box-shadow: 0 12px 48px rgba(0, 0, 0, .6); + font: 12px/1.45 var(--rebemer-font); + overflow: hidden; + outline: none; +} + +.slashed-cp__header { + display: flex; + align-items: center; + gap: 10px; + padding: 10px 12px; + border-bottom: 1px solid var(--rebemer-border); +} +.slashed-cp__title { + margin: 0; + font-size: 11px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: .5px; + color: #fff; + flex: 1; +} +.slashed-cp__close { + background: transparent; + border: 0; + font-size: 18px; + line-height: 1; + color: var(--rebemer-fg-muted); + cursor: pointer; + padding: 2px 4px; +} +.slashed-cp__close:hover { color: #fff; } + +/* Segmented control (preview mode) + chips (apply target) share a look. */ +.slashed-cp__seg { display: inline-flex; border: 1px solid var(--rebemer-input-border); border-radius: var(--rebemer-radius); overflow: hidden; } +.slashed-cp__seg-btn { + background: var(--rebemer-input-bg); + border: 0; + border-left: 1px solid var(--rebemer-input-border); + color: var(--rebemer-fg-muted); + font: 600 10px/1 var(--rebemer-font); + padding: 5px 9px; + cursor: pointer; + text-transform: uppercase; + letter-spacing: .4px; +} +.slashed-cp__seg-btn:first-child { border-left: 0; } +.slashed-cp__seg-btn--on { background: var(--rebemer-accent); color: var(--rebemer-bg); } + +.slashed-cp__toolbar { + display: flex; + flex-direction: column; + gap: 8px; + padding: 10px 12px; + border-bottom: 1px solid var(--rebemer-border); +} +.slashed-cp__search { + width: 100%; + background: var(--rebemer-input-bg); + border: 1px solid var(--rebemer-input-border); + border-radius: var(--rebemer-radius); + color: var(--rebemer-fg); + font: inherit; + padding: 6px 8px; + box-sizing: border-box; +} +.slashed-cp__search:focus { outline: 1px solid var(--rebemer-accent); } +.slashed-cp__target { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } +.slashed-cp__target-label { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--rebemer-fg-muted); } +.slashed-cp__chip { + background: var(--rebemer-input-bg); + border: 1px solid var(--rebemer-input-border); + border-radius: 999px; + color: var(--rebemer-fg-muted); + font: 600 10px/1 var(--rebemer-font); + padding: 4px 10px; + cursor: pointer; +} +.slashed-cp__chip--on { background: var(--rebemer-accent); border-color: var(--rebemer-accent); color: var(--rebemer-bg); } + +.slashed-cp__body { flex: 1; overflow-y: auto; padding: 6px 12px 12px; } +.slashed-cp__empty { color: var(--rebemer-fg-muted); font-size: 11px; padding: 12px 2px; } + +.slashed-cp__group { padding: 10px 0 6px; border-bottom: 1px solid rgba(255, 255, 255, .05); } +.slashed-cp__group:last-child { border-bottom: 0; } +.slashed-cp__group-title { + display: flex; + align-items: center; + gap: 7px; + margin: 0 0 8px; + font-size: 11px; + font-weight: 700; + color: #fff; + text-transform: capitalize; +} +.slashed-cp__group-count { + font: 600 9px/1 var(--rebemer-font); + color: var(--rebemer-fg-muted); + background: rgba(255, 255, 255, .06); + border-radius: 999px; + padding: 2px 6px; +} +.slashed-cp__section-label { + margin: 8px 0 5px; + font-size: 9px; + text-transform: uppercase; + letter-spacing: .5px; + color: var(--rebemer-fg-muted); +} + +/* Family grid: small captioned squares. */ +.slashed-cp__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 7px 6px; } +.slashed-cp__cell { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; } +.slashed-cp__cap { font-size: 9px; color: var(--rebemer-fg-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + +/* Semantic list: swatch + label + token name. */ +.slashed-cp__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; } +.slashed-cp__list-item { display: flex; align-items: center; gap: 8px; } +.slashed-cp__list-name { font-size: 11px; color: var(--rebemer-fg); flex: 0 0 auto; } +.slashed-cp__list-var { + font: 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; + color: var(--rebemer-fg-muted); + margin-left: auto; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* The swatch itself. */ +.slashed-cp-swatch { + width: 28px; + height: 28px; + flex: 0 0 auto; + padding: 0; + border: 1px solid rgba(127, 127, 127, .45); + border-radius: 6px; + background: none; + cursor: pointer; + position: relative; + overflow: hidden; +} +.slashed-cp-swatch:hover { border-color: var(--rebemer-accent); } +.slashed-cp-swatch:focus-visible { outline: 2px solid var(--rebemer-accent); outline-offset: 1px; } +.slashed-cp-swatch__fill { position: absolute; inset: 0; background: var(--cp-solid); } +/* Both-mode: diagonal split — light top-left, dark bottom-right, hairline seam. */ +.slashed-cp-swatch--split .slashed-cp-swatch__fill { + background: linear-gradient( + 135deg, + var(--cp-l) 0 calc(50% - 0.5px), + rgba(0, 0, 0, .35) calc(50% - 0.5px) calc(50% + 0.5px), + var(--cp-d) calc(50% + 0.5px) 100% + ); +} +/* Translucent tokens: dashed ring hints the value is non-opaque (the + resolved hex is an opaque approximation, so real alpha can't show). */ +.slashed-cp-swatch--alpha { border-style: dashed; } + +.slashed-cp__footer { + display: flex; + align-items: center; + gap: 10px; + padding: 8px 12px; + border-top: 1px solid var(--rebemer-border); + font-size: 10px; + color: var(--rebemer-fg-muted); +} +.slashed-cp__hint { margin-left: auto; } +.slashed-cp__hint code, +.slashed-cp__footer code { font: 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--rebemer-accent); } +.slashed-cp__legend { display: inline-flex; align-items: center; gap: 5px; } +.slashed-cp__legend-sw { + width: 12px; height: 12px; border-radius: 3px; + border: 1px solid rgba(127, 127, 127, .45); + background: linear-gradient(135deg, #fff 0 50%, #222 50% 100%); +} + +/* Info-variant toast (Color panel copy-only feedback). */ +.rebemer-toast--info { border-color: #63b3ed; } + /* Variable-picker colour swatch — a small square prepended to each `--sf-color-*` row in the Bricks variable dropdown by color-swatches.js. The colour is set inline via the diff --git a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php index f0204397..cb8c4689 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php +++ b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php @@ -113,20 +113,70 @@ class Slashed_Bricks_Color_Resolver { ); /** - * Resolve color values into a hex map for all --sf-color-* variables. + * Resolve color values into a LIGHT-mode hex map for all --sf-color-* variables. * * @param array $color_values Associative array from the CSS parser. * @return array Map of variable name to hex string. */ public static function resolve( $color_values ) { - $hex_map = array(); - - // Determine source oklch values for each family. $sources = self::resolve_sources( $color_values ); - $families = array_keys( self::$default_sources ); + // Light-mode family scales composite alpha steps over white. + $hex_map = self::build_family_scales( $sources, array( 255, 255, 255 ) ); + + // Semantic tokens with reasonable light-mode defaults. + $hex_map = self::resolve_semantic_tokens( $hex_map, $sources ); + + return $hex_map; + } + + /** + * Resolve color values into a DARK-mode hex map for all --sf-color-* variables. + * + * Mirrors the framework's dark auto-derivation (core/tokens.css): each + * family's dark source is lightened from its light source via + * clamp(0.65, 0.95 - l*0.5, 0.88) (base inverts via clamp(0.16, 1.18 - l, 0.24)), + * then the same scale/alpha/alias machinery runs on the dark sources. + * Semantic tokens use the direction-flipped dark formulas. Alpha steps + * composite over the dark base surface rather than white. + * + * Like resolve(), the output is an intentional approximation for builder + * swatch previews, not a pixel-perfect replica of browser-rendered + * light-dark() / relative-color output. + * + * @param array $color_values Associative array from the CSS parser. + * @return array Map of variable name to hex string. + */ + public static function resolve_dark( $color_values ) { + $light_sources = self::resolve_sources( $color_values ); + $dark_sources = self::derive_dark_sources( $light_sources ); + + // Alpha swatches composite over the dark base surface, not white, so + // translucent tokens read the way they do on a dark page. + $base_dark_hex = isset( $dark_sources['base'] ) + ? self::oklch_to_hex( $dark_sources['base'][0], $dark_sources['base'][1], $dark_sources['base'][2] ) + : '#1a1b1e'; + + $hex_map = self::build_family_scales( $dark_sources, self::hex_to_rgb( $base_dark_hex ) ); + $hex_map = self::resolve_semantic_tokens_dark( $hex_map, $dark_sources, $light_sources ); + + return $hex_map; + } - foreach ( $families as $family ) { + /** + * Build the per-family scale/alpha/alias hex map from resolved sources. + * + * Shared by both the light and dark resolvers — only the source oklch + * values and the alpha-compositing backdrop differ between modes. + * + * @param array $sources Family => [L, C, H]. + * @param array $backdrop_rgb [r, g, b] the alpha steps composite over. + * @return array + */ + private static function build_family_scales( $sources, $backdrop_rgb ) { + $hex_map = array(); + + foreach ( array_keys( self::$default_sources ) as $family ) { if ( ! isset( $sources[ $family ] ) ) { continue; } @@ -136,8 +186,8 @@ public static function resolve( $color_values ) { // The base (500 step) is the direct conversion. // -light is the same source color (the @property initial-value). - $hex_map[ '--sf-color-' . $family ] = $family_hex; - $hex_map[ '--sf-color-' . $family . '-500' ] = $family_hex; + $hex_map[ '--sf-color-' . $family ] = $family_hex; + $hex_map[ '--sf-color-' . $family . '-500' ] = $family_hex; $hex_map[ '--sf-color-' . $family . '-light' ] = $family_hex; // Light steps (50-400): interpolate toward white in oklch. @@ -158,11 +208,11 @@ public static function resolve( $color_values ) { $hex_map[ '--sf-color-' . $family . '-' . $step ] = self::oklch_to_hex( $step_l, $step_c, $oklch[2] ); } - // Alpha steps: opaque swatch approximation composited over white. + // Alpha steps: opaque swatch approximation composited over the + // mode backdrop (white in light mode, dark base in dark mode). $family_rgb = self::hex_to_rgb( $family_hex ); - $white_rgb = array( 255, 255, 255 ); foreach ( self::$alpha_steps as $suffix => $pct ) { - $mixed = self::mix_rgb( $family_rgb, $white_rgb, $pct ); + $mixed = self::mix_rgb( $family_rgb, $backdrop_rgb, $pct ); $hex_map[ '--sf-color-' . $family . '-' . $suffix ] = self::rgb_to_hex( $mixed ); } @@ -175,12 +225,35 @@ public static function resolve( $color_values ) { } } - // Semantic tokens with reasonable defaults. - $hex_map = self::resolve_semantic_tokens( $hex_map, $sources ); - return $hex_map; } + /** + * Derive per-family dark oklch sources from the light sources. + * + * Brand + status: clamp(0.65, 0.95 - l*0.5, 0.88) lightness, chroma * 0.9. + * Base inverts: clamp(0.16, 1.18 - l, 0.24) lightness, chroma * 0.5. + * (Matches the auto-derivation formulas in core/tokens.css.) + * + * @param array $light_sources Family => [L, C, H]. + * @return array + */ + private static function derive_dark_sources( $light_sources ) { + $dark = array(); + foreach ( $light_sources as $family => $lch ) { + list( $l, $c, $h ) = $lch; + if ( 'base' === $family ) { + $dl = max( 0.16, min( 1.18 - $l, 0.24 ) ); + $dc = $c * 0.5; + } else { + $dl = max( 0.65, min( 0.95 - $l * 0.5, 0.88 ) ); + $dc = $c * 0.9; + } + $dark[ $family ] = array( $dl, $dc, $h ); + } + return $dark; + } + /** * Resolve source oklch values from parsed color_values. * @@ -384,6 +457,136 @@ private static function resolve_semantic_tokens( $hex_map, $sources ) { return $hex_map; } + /** + * Resolve dark-mode semantic tokens (text, bg, surface, border, link…). + * + * Ports the direction-flipped dark formulas from core/tokens.css: surfaces + * derive from the dark base source, text/border from the dark neutral + * source, links from the dark action source. Alpha-composited tokens mix + * over the dark base instead of white. text-on-* stays mode-agnostic + * (chosen from the resolved family luminance). + * + * @param array $hex_map Family scales already built (dark). + * @param array $d Dark sources (family => [L,C,H]). + * @param array $light_sources Light sources — needed for selection-bg, + * whose dark formula references action-light. + * @return array + */ + private static function resolve_semantic_tokens_dark( $hex_map, $d, $light_sources ) { + $light_text = '#f0f0f5'; + $dark_text = '#1c1c2e'; + + $base_hex = isset( $hex_map['--sf-color-base'] ) ? $hex_map['--sf-color-base'] : '#1a1b1e'; + $base_rgb = self::hex_to_rgb( $base_hex ); + + // ---- Base-derived surfaces ---- + if ( isset( $d['base'] ) ) { + list( $bl, $bc, $bh ) = $d['base']; + $hex_map['--sf-color-surface'] = $base_hex; + $hex_map['--sf-color-bg'] = self::oklch_to_hex( min( 1.0, $bl + 0.02 ), $bc, $bh ); + $hex_map['--sf-color-well'] = self::oklch_to_hex( max( 0.0, $bl - 0.02 ), $bc, $bh ); + $hex_map['--sf-color-raised'] = self::oklch_to_hex( min( 1.0, $bl + 0.04 ), $bc, $bh ); + $hex_map['--sf-color-overlay'] = $base_hex; + $hex_map['--sf-color-inverse'] = self::oklch_to_hex( max( 0.0, 1.0 - $bl ), $bc, $bh ); + } + + // ---- Neutral-derived text + border (dark formulas) ---- + if ( isset( $d['neutral'] ) ) { + list( $nl, $nc, $nh ) = $d['neutral']; + $neutral_hex = isset( $hex_map['--sf-color-neutral'] ) ? $hex_map['--sf-color-neutral'] : self::oklch_to_hex( $nl, $nc, $nh ); + $neutral_rgb = self::hex_to_rgb( $neutral_hex ); + + $hex_map['--sf-color-text'] = self::oklch_to_hex( max( 0.70, min( $nl + 0.25, 1.0 ) ), $nc, $nh ); + $hex_map['--sf-color-heading'] = $hex_map['--sf-color-text']; + $hex_map['--sf-color-text--secondary'] = self::oklch_to_hex( max( 0.55, min( $nl + 0.1, 0.90 ) ), $nc, $nh ); + $hex_map['--sf-color-text--muted'] = $neutral_hex; + $hex_map['--sf-color-text--placeholder']= self::oklch_to_hex( max( 0.35, min( $nl - 0.1, 0.65 ) ), $nc, $nh ); + $hex_map['--sf-color-text--disabled'] = self::oklch_to_hex( max( 0.25, min( $nl - 0.2, 0.55 ) ), $nc, $nh ); + $hex_map['--sf-color-text--inverse'] = self::oklch_to_hex( max( 0.05, min( $nl - 0.4, 0.35 ) ), $nc, $nh ); + + $hex_map['--sf-color-border'] = self::oklch_to_hex( max( 0.25, min( $nl - 0.3, 0.55 ) ), 0.005, $nh ); + $hex_map['--sf-color-border--subtle'] = self::oklch_to_hex( max( 0.20, min( $nl - 0.38, 0.45 ) ), 0.005, $nh ); + $hex_map['--sf-color-border--strong'] = self::oklch_to_hex( max( 0.38, min( $nl - 0.1, 0.65 ) ), 0.02, $nh ); + $hex_map['--sf-color-border--muted'] = $hex_map['--sf-color-border--subtle']; + $hex_map['--sf-color-border--translucent'] = self::rgb_to_hex( self::mix_rgb( $neutral_rgb, $base_rgb, 0.15 ) ); + $hex_map['--sf-color-border--disabled'] = self::rgb_to_hex( self::mix_rgb( self::hex_to_rgb( $hex_map['--sf-color-border--subtle'] ), $base_rgb, 0.5 ) ); + + $hex_map['--sf-color-bg--hover'] = self::rgb_to_hex( self::mix_rgb( $neutral_rgb, $base_rgb, 0.08 ) ); + $hex_map['--sf-color-bg--active'] = self::rgb_to_hex( self::mix_rgb( $neutral_rgb, $base_rgb, 0.12 ) ); + } + + $hex_map['--sf-color-border--focus'] = isset( $hex_map['--sf-color-action'] ) ? $hex_map['--sf-color-action'] : '#5b8cff'; + + // ---- Action-derived links (dark formulas: lighten toward a floor) ---- + if ( isset( $d['action'] ) ) { + list( $al, $ac, $ah ) = $d['action']; + $action_hex = isset( $hex_map['--sf-color-action'] ) ? $hex_map['--sf-color-action'] : self::oklch_to_hex( $al, $ac, $ah ); + $action_rgb = self::hex_to_rgb( $action_hex ); + + $hex_map['--sf-color-link'] = self::oklch_to_hex( max( 0.68, $al ), $ac, $ah ); + $hex_map['--sf-color-link--hover'] = self::oklch_to_hex( max( $al + 0.10, 0.68 ), $ac, $ah ); + $hex_map['--sf-color-link--active'] = self::oklch_to_hex( max( $al + 0.15, 0.74 ), $ac, $ah ); + $hex_map['--sf-color-link--visited'] = self::oklch_to_hex( max( 0.68, $al ), $ac, fmod( $ah + 60.0, 360.0 ) ); + $hex_map['--sf-color-link--underline'] = self::rgb_to_hex( self::mix_rgb( $action_rgb, $base_rgb, 0.30 ) ); + + $hex_map['--sf-color-bg--selected'] = self::rgb_to_hex( self::mix_rgb( $action_rgb, $base_rgb, 0.10 ) ); + $hex_map['--sf-color-bg--focus'] = self::rgb_to_hex( self::mix_rgb( $action_rgb, $base_rgb, 0.06 ) ); + } + + $hex_map['--sf-color-link--disabled'] = isset( $hex_map['--sf-color-text--disabled'] ) ? $hex_map['--sf-color-text--disabled'] : '#6b6b78'; + $hex_map['--sf-color-bg--disabled'] = isset( $hex_map['--sf-color-well'] ) ? $hex_map['--sf-color-well'] : '#222'; + + // ---- Code (code-bg = well; dark well → light code text) ---- + $hex_map['--sf-color-code-bg'] = isset( $hex_map['--sf-color-well'] ) ? $hex_map['--sf-color-well'] : '#222'; + $hex_map['--sf-color-code-text'] = $light_text; + + // ---- Text-on-color (mode-agnostic: from the resolved dark family L) ---- + $on_families = array( 'primary', 'secondary', 'tertiary', 'action', 'neutral', 'success', 'warning', 'error', 'info', 'danger' ); + foreach ( $on_families as $family ) { + if ( ! isset( $d[ $family ] ) ) { + continue; + } + $hex_map[ '--sf-color-text--on-' . $family ] = ( $d[ $family ][0] < 0.6 ) ? $light_text : $dark_text; + } + $hex_map['--sf-color-text--on-base'] = isset( $hex_map['--sf-color-text'] ) ? $hex_map['--sf-color-text'] : $light_text; + $hex_map['--sf-color-text--on-inverse'] = isset( $hex_map['--sf-color-text--inverse'] ) ? $hex_map['--sf-color-text--inverse'] : $dark_text; + + // ---- Selection + mark ---- + // Dark selection-bg references action-LIGHT lightness; composite at ~0.55 over base. + if ( isset( $light_sources['action'] ) ) { + list( $la, $lc, $lh ) = $light_sources['action']; + $sel_l = max( 0.62, min( 0.93 - $la * 0.4, 0.78 ) ); + $sel_rgb = self::hex_to_rgb( self::oklch_to_hex( $sel_l, $lc, $lh ) ); + $hex_map['--sf-color-selection-bg'] = self::rgb_to_hex( self::mix_rgb( $sel_rgb, $base_rgb, 0.55 ) ); + } elseif ( isset( $hex_map['--sf-color-bg--selected'] ) ) { + $hex_map['--sf-color-selection-bg'] = $hex_map['--sf-color-bg--selected']; + } + $hex_map['--sf-color-selection-text'] = isset( $hex_map['--sf-color-text'] ) ? $hex_map['--sf-color-text'] : $light_text; + if ( isset( $hex_map['--sf-color-warning'] ) ) { + $hex_map['--sf-color-mark-bg'] = self::rgb_to_hex( self::mix_rgb( self::hex_to_rgb( $hex_map['--sf-color-warning'] ), $base_rgb, 0.25 ) ); + } + $hex_map['--sf-color-mark-text'] = isset( $hex_map['--sf-color-text'] ) ? $hex_map['--sf-color-text'] : $light_text; + $hex_map['--sf-color-dim'] = '#808080'; + + // ---- Status strong variants (dark: lighten by offset toward 1) ---- + $status_strong_offsets = array( + 'success' => 0.15, + 'warning' => 0.05, + 'error' => 0.15, + 'info' => 0.15, + 'danger' => 0.15, + ); + foreach ( $status_strong_offsets as $family => $l_offset ) { + if ( ! isset( $d[ $family ] ) ) { + continue; + } + list( $sl, $sc, $sh ) = $d[ $family ]; + $hex_map[ '--sf-color-' . $family . '-strong' ] = self::oklch_to_hex( max( 0.0, min( $sl + $l_offset, 1.0 ) ), $sc, $sh ); + } + + return $hex_map; + } + /** * Parse an oklch() string into L, C, H components. * diff --git a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php index 13e7e648..6fca260a 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php +++ b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php @@ -60,6 +60,13 @@ class Slashed_Bricks_Inventory { */ private static $hex_map_cache = null; + /** + * Per-request cache for the resolved DARK-mode color hex map. + * + * @var array|null + */ + private static $hex_map_dark_cache = null; + /** * Get the full inventory, resolving and caching on first access. * @@ -150,8 +157,9 @@ private static function sanitize_inventory( $inventory ) { * Reset the per-request cache. Mostly useful for tests. */ public static function flush() { - self::$cache = null; - self::$hex_map_cache = null; + self::$cache = null; + self::$hex_map_cache = null; + self::$hex_map_dark_cache = null; } /** @@ -180,6 +188,35 @@ public static function get_color_hex_map() { return self::$hex_map_cache; } + /** + * Get the resolved DARK-mode hex color map for all --sf-color-* variables. + * + * Companion to get_color_hex_map(); used by the editor Color System panel + * to preview every token's dark variant alongside its light value. + * + * @return array Map of variable name to hex string. + */ + public static function get_color_hex_map_dark() { + if ( null !== self::$hex_map_dark_cache ) { + return self::$hex_map_dark_cache; + } + + $inv = self::get(); + + $color_values = isset( $inv['color_values'] ) ? $inv['color_values'] : array(); + + // Merge admin-saved color overrides so dark previews track the same + // customized -light source tokens the light map uses. + $admin_overrides = self::get_admin_color_overrides(); + if ( ! empty( $admin_overrides ) ) { + $color_values = array_merge( $color_values, $admin_overrides ); + } + + self::$hex_map_dark_cache = Slashed_Bricks_Color_Resolver::resolve_dark( $color_values ); + + return self::$hex_map_dark_cache; + } + /** * Read admin-saved color overrides and map them to CSS variable names. * diff --git a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-rebemer-enqueue.php b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-rebemer-enqueue.php index d8a1b164..56bf6ccd 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-rebemer-enqueue.php +++ b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-rebemer-enqueue.php @@ -62,6 +62,35 @@ public function enqueue() { ? Slashed_Bricks_Inventory::get_color_hex_map() : array(); + /** + * Toggle the in-builder Color System panel. + * + * The panel (see editor-app ColorPanel.svelte) is a floating browser + * for the framework's `--sf-color-*` tokens that previews every + * token's light AND dark variant at once, applies a chosen colour to + * the selected element (text / background / border), and copies the + * `var(--sf-color-*)` reference. Filter to false to hide its launcher. + * + * @param bool $enabled Default true. + */ + $show_color_panel = (bool) apply_filters( 'slashed_bricks/show_color_panel', true ); + + // The panel needs the ordered token list plus both hex maps to build + // its grouped model and dual-mode swatches. Light reuses the swatch + // map already resolved above when available. + $color_panel_data = array( + 'variables' => array(), + 'light' => array(), + 'dark' => array(), + ); + if ( $show_color_panel && class_exists( 'Slashed_Bricks_Inventory' ) ) { + $color_panel_data['variables'] = Slashed_Bricks_Inventory::get_color_variables(); + $color_panel_data['light'] = ! empty( $color_hex_map ) + ? $color_hex_map + : Slashed_Bricks_Inventory::get_color_hex_map(); + $color_panel_data['dark'] = Slashed_Bricks_Inventory::get_color_hex_map_dark(); + } + wp_localize_script( self::SCRIPT_HANDLE, 'slashedBricksEditor', @@ -70,6 +99,8 @@ public function enqueue() { 'classHints' => Slashed_Token_Page::get_class_hints(), 'showColorSwatches' => $show_color_swatches, 'colorHexMap' => $color_hex_map, + 'showColorPanel' => $show_color_panel, + 'colorPanel' => $color_panel_data, ) ); } diff --git a/tests/color-model.test.js b/tests/color-model.test.js new file mode 100644 index 00000000..660b052d --- /dev/null +++ b/tests/color-model.test.js @@ -0,0 +1,205 @@ +/** + * Unit tests for the Color System model (node:test, no browser needed). + * + * Run: node --test tests/color-model.test.js + * Also executed automatically via the `pretest` npm script before Playwright. + */ +import { test, describe } from 'node:test'; +import assert from 'node:assert/strict'; +import { + classifyVar, + swatchLabel, + buildColorModel, + filterModel, + swatchValue, + swatchHex, + BRAND_FAMILIES, + STATUS_FAMILIES, +} from '../plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js'; + +describe('classifyVar', () => { + test('base family token', () => { + assert.deepEqual(classifyVar('--sf-color-primary'), { + family: 'primary', kind: 'base', step: null, key: 'primary', + }); + }); + + test('numeric scale step', () => { + assert.deepEqual(classifyVar('--sf-color-primary-300'), { + family: 'primary', kind: 'scale', step: 300, key: 'primary-300', + }); + }); + + test('alpha step', () => { + assert.deepEqual(classifyVar('--sf-color-action-a20'), { + family: 'action', kind: 'alpha', step: 'a20', key: 'action-a20', + }); + }); + + test('named alias', () => { + assert.deepEqual(classifyVar('--sf-color-primary-hover'), { + family: 'primary', kind: 'alias', step: 'hover', key: 'primary-hover', + }); + }); + + test('status family is recognised', () => { + assert.equal(classifyVar('--sf-color-success-200').family, 'success'); + }); + + test('non-family token falls into semantic', () => { + assert.deepEqual(classifyVar('--sf-color-text--secondary'), { + family: 'semantic', kind: 'semantic', step: null, key: 'text--secondary', + }); + }); + + test('-light source token is skipped (dupe of base)', () => { + assert.equal(classifyVar('--sf-color-primary-light'), null); + }); + + test('--sf-color-scheme is skipped', () => { + assert.equal(classifyVar('--sf-color-scheme'), null); + }); + + test('non-color var is rejected', () => { + assert.equal(classifyVar('--sf-space-4'), null); + assert.equal(classifyVar('not-a-var'), null); + }); +}); + +describe('swatchLabel', () => { + test('base → capitalised family', () => { + assert.equal(swatchLabel({ family: 'primary', kind: 'base', step: null, key: 'primary' }), 'Primary'); + }); + test('scale → step number', () => { + assert.equal(swatchLabel({ family: 'primary', kind: 'scale', step: 300, key: 'primary-300' }), '300'); + }); + test('alpha → uppercased', () => { + assert.equal(swatchLabel({ family: 'action', kind: 'alpha', step: 'a20', key: 'action-a20' }), 'A20'); + }); + test('semantic → humanised with separators', () => { + assert.equal(swatchLabel({ family: 'semantic', kind: 'semantic', step: null, key: 'text--secondary' }), 'Text · Secondary'); + }); +}); + +describe('buildColorModel', () => { + const vars = [ + '--sf-color-primary', + '--sf-color-primary-light', // skipped + '--sf-color-primary-50', + '--sf-color-primary-500', + '--sf-color-primary-900', + '--sf-color-primary-a20', + '--sf-color-primary-hover', + '--sf-color-success', + '--sf-color-text', + '--sf-color-text--muted', + '--sf-color-scheme', // skipped + ]; + const light = { + '--sf-color-primary': '#3b5bdb', + '--sf-color-primary-50': '#edf0fc', + '--sf-color-primary-500': '#3b5bdb', + '--sf-color-primary-900': '#1a2a66', + '--sf-color-primary-a20': '#d8def7', + '--sf-color-primary-hover': '#2f49af', + '--sf-color-success': '#2f9e44', + '--sf-color-text': '#1c1c2e', + '--sf-color-text--muted': '#6e6e82', + }; + const dark = { + '--sf-color-primary': '#748ffc', + '--sf-color-text': '#e8e8f0', + }; + + test('groups brand, status, semantic in order', () => { + const { groups } = buildColorModel(vars, light, dark); + assert.deepEqual(groups.map((g) => g.id), ['primary', 'success', 'semantic']); + assert.deepEqual(groups.map((g) => g.type), ['brand', 'status', 'semantic']); + }); + + test('-light and scheme are excluded from counts', () => { + const { groups } = buildColorModel(vars, light, dark); + const primary = groups.find((g) => g.id === 'primary'); + // base, 50, 500, 900, a20, hover = 6 (light + scheme excluded) + assert.equal(primary.count, 6); + }); + + test('swatch with no light hex is dropped', () => { + const { groups } = buildColorModel(['--sf-color-primary-700'], {}, {}); + assert.equal(groups.length, 0); + }); + + test('dark falls back to light when missing', () => { + const { groups } = buildColorModel(['--sf-color-success'], light, {}); + const sw = groups[0].sections[0].swatches[0]; + assert.equal(sw.dark, sw.light); + assert.equal(sw.dark, '#2f9e44'); + }); + + test('family sections split into shades / transparent / semantic', () => { + const { groups } = buildColorModel(vars, light, dark); + const primary = groups.find((g) => g.id === 'primary'); + assert.deepEqual(primary.sections.map((s) => s.id), ['scale', 'alpha', 'alias']); + // scale section keeps base first, then ascending steps. + const scaleLabels = primary.sections[0].swatches.map((s) => s.label); + assert.deepEqual(scaleLabels, ['Primary', '50', '500', '900']); + }); + + test('swatch name drops the leading --', () => { + const { groups } = buildColorModel(['--sf-color-primary'], light, dark); + assert.equal(groups[0].sections[0].swatches[0].name, 'sf-color-primary'); + }); + + test('handles missing / malformed input safely', () => { + assert.deepEqual(buildColorModel(undefined, undefined, undefined), { groups: [] }); + assert.deepEqual(buildColorModel(null, null, null), { groups: [] }); + }); + + test('every brand/status family slug is a known constant', () => { + for (const f of [...BRAND_FAMILIES, ...STATUS_FAMILIES]) { + assert.equal(typeof f, 'string'); + } + }); +}); + +describe('filterModel', () => { + const vars = ['--sf-color-primary', '--sf-color-primary-50', '--sf-color-success']; + const light = { + '--sf-color-primary': '#3b5bdb', + '--sf-color-primary-50': '#edf0fc', + '--sf-color-success': '#2f9e44', + }; + const model = buildColorModel(vars, light, {}); + + test('empty query returns the model unchanged', () => { + assert.equal(filterModel(model, ''), model); + assert.equal(filterModel(model, ' '), model); + }); + + test('filters by token name', () => { + const out = filterModel(model, 'success'); + assert.deepEqual(out.groups.map((g) => g.id), ['success']); + }); + + test('matching a group label keeps its swatches', () => { + const out = filterModel(model, 'primary'); + assert.equal(out.groups.length, 1); + assert.equal(out.groups[0].id, 'primary'); + assert.equal(out.groups[0].count, 2); + }); + + test('no match yields empty groups', () => { + assert.deepEqual(filterModel(model, 'zzz'), { groups: [] }); + }); +}); + +describe('value + hex helpers', () => { + const swatch = { var: '--sf-color-primary', light: '#aaa', dark: '#222' }; + test('swatchValue wraps in var()', () => { + assert.equal(swatchValue(swatch), 'var(--sf-color-primary)'); + }); + test('swatchHex picks by mode', () => { + assert.equal(swatchHex(swatch, 'light'), '#aaa'); + assert.equal(swatchHex(swatch, 'dark'), '#222'); + }); +}); From a3f37637eabffec7856fa0db60c14f0a1cf9d851 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Jun 2026 04:14:11 +0000 Subject: [PATCH 2/3] feat(bricks): honor dark overrides + guided grouping in Color System panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses two gaps in the Color System panel: 1. Custom dark variants were ignored. resolve_dark() always auto-derived the dark value from the light source, so a user's explicit dark override (admin Dark-mode overrides, theme, or hand-written CSS) was not reflected. derive_dark_sources() now honours an explicit --sf-color-{family}-dark exactly like the framework's CSS fallback chain — var(--sf-color-X-dark, ) — and the whole dark scale (shades/tints/alpha/aliases/semantics) follows the override. The inventory's admin-override reader now also surfaces brand_dark_* / status_dark_* (gated by the same dark_overrides_enabled flag the CSS generator uses), so the preview matches the emitted CSS. 2. Organized, guided grouping. Each family group now carries a role tagline ("Interactive & links") and a when-to-use hint, shown in the group header, so users know which colour is which and when to reach for it. The catch-all Semantic group is split into purpose-based labelled subsections (Text on color, Text, Interactive states, Surfaces, Borders, Links, Selection & marks, Code) instead of one flat list — against the real inventory every token lands in a named section with nothing left over. color-model.js gains FAMILY_INFO + semantic subgrouping (pure, covered by new unit tests). https://claude.ai/code/session_01HPTgyrXeZBfqrwFpa78d3F --- .../bricks/assets/editor-app/app.css | 2 +- .../bricks/assets/editor-app/app.js | 10 +-- .../src/components/ColorPanel.svelte | 12 ++-- .../bricks/editor-app/src/lib/color-model.js | 66 ++++++++++++++++++- .../bricks/editor-app/src/styles/panel.css | 19 +++++- .../bricks/includes/class-color-resolver.php | 33 ++++++++-- .../bricks/includes/class-inventory.php | 40 +++++++++-- tests/color-model.test.js | 62 +++++++++++++++++ 8 files changed, 218 insertions(+), 26 deletions(-) diff --git a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css index 29c2e3f4..ab832ef2 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css +++ b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css @@ -1 +1 @@ -#slashed-rebemer-host{--rebemer-bg: #161a1d;--rebemer-fg: #e1e1e1;--rebemer-fg-muted: #8a8d95;--rebemer-border: #3d4752;--rebemer-accent: #e2b93b;--rebemer-accent-hover: #ffd042;--rebemer-input-bg: #293038;--rebemer-input-border: #3d4752;--rebemer-error: #ff4c4c;--rebemer-success: #4ade80;--rebemer-radius: 4px;--rebemer-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif}.rebemer-badge-host{display:inline-flex;align-items:center;align-self:center;flex:0 0 auto;margin:0 4px;opacity:0;pointer-events:none;transition:opacity 80ms linear}.structure-item:hover .rebemer-badge-host,.structure-item:focus-within .rebemer-badge-host,li[data-id]:hover>.rebemer-badge-host,li[data-id]:focus-within>.rebemer-badge-host{opacity:1;pointer-events:auto}.rebemer-badge{font:600 9px/1 var(--rebemer-font, "Inter", -apple-system, BlinkMacSystemFont, sans-serif);letter-spacing:0;text-transform:none;color:var(--rebemer-fg-muted, #8a8d95);display:inline;background:transparent;padding:1px 3px;margin:0;cursor:pointer;border-radius:2px;pointer-events:auto}.rebemer-badge:hover{color:var(--rebemer-accent, #e2b93b);background:#e2b93b14}.rebemer-badge:focus-visible{outline:1px dotted var(--rebemer-accent, #e2b93b);outline-offset:1px;color:var(--rebemer-accent, #e2b93b)}.rebemer-panel{position:fixed;top:80px;left:50%;transform:translate(-50%);width:440px;max-width:calc(100vw - 40px);max-height:80vh;z-index:100000;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);box-shadow:0 10px 40px #0009;display:flex;flex-direction:column;font:12px/1.45 var(--rebemer-font);overflow:hidden;outline:none}.rebemer-panel__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--rebemer-border)}.rebemer-panel__title{margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff}.rebemer-panel__subject{color:var(--rebemer-accent);text-transform:none;font-weight:500}.rebemer-panel__close{background:transparent;border:0;font-size:18px;color:var(--rebemer-fg-muted);cursor:pointer;padding:2px 6px}.rebemer-panel__close:hover{color:#fff}.rebemer-panel__toolbar{padding:10px 14px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--rebemer-border)}.rebemer-field{display:flex;flex-direction:column;gap:4px;font-size:11px}.rebemer-field--inline{flex-direction:row;align-items:center;gap:6px}.rebemer-field__label{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:10px}.rebemer-field select,.rebemer-field input[type=text]{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);padding:4px 6px;font:inherit}.rebemer-field select:focus,.rebemer-field input:focus{outline:1px solid var(--rebemer-accent)}.rebemer-panel__mode-hint{margin:0;padding:5px 14px;font-size:11px;color:var(--rebemer-fg-muted);background:var(--rebemer-bg);border-bottom:1px solid var(--rebemer-border);line-height:1.4}.rebemer-panel__notice{margin:0;padding:8px 14px;background:#e2b93b14;border-bottom:1px solid var(--rebemer-border);color:var(--rebemer-fg);font-size:11px;line-height:1.5}.rebemer-panel__notice--warn{background:#e2b93b29}.rebemer-panel__notice strong{color:var(--rebemer-accent);font-weight:600}.rebemer-panel__notice-skip{display:block;margin-top:2px;color:var(--rebemer-fg-muted)}.rebemer-panel__body{flex:1;overflow-y:auto;padding:8px 14px;display:flex;flex-direction:column;gap:6px}.rebemer-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--rebemer-radius);background:#ffffff05;margin-left:calc(var(--rebemer-row-depth, 0) * 12px)}.rebemer-row:hover{background:#ffffff0a}.rebemer-row--disabled{opacity:.45}.rebemer-row__include input{cursor:pointer}.rebemer-row__meta{display:flex;gap:6px;align-items:baseline;min-width:0}.rebemer-row__label{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rebemer-row__type{font-size:9px;color:var(--rebemer-fg-muted);text-transform:uppercase}.rebemer-row__hint{font-size:9px;color:var(--rebemer-accent);text-transform:uppercase;letter-spacing:.5px;background:#e2b93b1f;padding:1px 4px;border-radius:2px}.rebemer-row__inputs{grid-column:1 / -1;display:flex;gap:6px;align-items:center}.rebemer-row__name{flex:1;display:flex;align-items:stretch;background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);overflow:hidden}.rebemer-row__prefix{padding:4px 6px;background:#00000040;color:var(--rebemer-fg-muted);font-size:11px;border-right:1px solid var(--rebemer-input-border);white-space:nowrap}.rebemer-row__name input{background:transparent;border:0;outline:0;color:var(--rebemer-fg);font:inherit;padding:4px 6px;flex:1;min-width:0}.rebemer-row--suggested .rebemer-row__name input:not(:focus){color:var(--rebemer-fg-muted);font-style:italic}.rebemer-row__modifier{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);font:inherit;padding:4px 6px;width:90px}.rebemer-row__recommend{grid-column:1 / -1;margin:0;padding:6px 8px;background:#4ade8014;border-left:2px solid var(--rebemer-success);border-radius:2px;color:var(--rebemer-fg);font-size:11px;line-height:1.4}.rebemer-row__recommend code{background:#0000004d;padding:1px 4px;border-radius:2px;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-row__warn,.rebemer-row__info{grid-column:1 / -1;margin:0;padding:5px 8px;font-size:11px;line-height:1.4;border-radius:2px}.rebemer-row__warn{background:#e2b93b1f;border-left:2px solid #e2b93b;color:var(--rebemer-fg)}.rebemer-row__info{background:#63b3ed1a;border-left:2px solid #63b3ed;color:var(--rebemer-fg-muted)}.rebemer-row__chips{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px 0 0;font-size:10px}.rebemer-row__chips-label,.rebemer-row__chips-empty,.rebemer-row__chips-skip{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:9px}.rebemer-row__chips-skip{margin-left:auto;cursor:help;color:#c8a038}.rebemer-chip{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#0000004d;border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:2px 5px;border-radius:2px;white-space:nowrap}.rebemer-panel__footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid var(--rebemer-border)}.rebemer-btn{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:6px 12px;border-radius:var(--rebemer-radius);font:inherit;cursor:pointer}.rebemer-btn:hover{border-color:var(--rebemer-fg-muted)}.rebemer-btn--primary{background:var(--rebemer-accent);border-color:var(--rebemer-accent);color:var(--rebemer-bg);font-weight:600}.rebemer-btn--primary:hover{background:var(--rebemer-accent-hover);border-color:var(--rebemer-accent-hover)}.rebemer-toast{position:fixed;bottom:16px;right:16px;z-index:100002;background:var(--rebemer-input-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 12px;font:12px/1.45 var(--rebemer-font);cursor:pointer;box-shadow:0 4px 12px #0006}.rebemer-toast--success{border-color:var(--rebemer-success)}.rebemer-toast--error{border-color:var(--rebemer-error);color:var(--rebemer-error)}.rebemer-class-hint{position:fixed;z-index:100003;max-width:280px;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 10px;font:12px/1.45 var(--rebemer-font);box-shadow:0 6px 20px #00000080;pointer-events:none}.rebemer-class-hint[hidden]{display:none}.rebemer-class-hint__name{font:600 11px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-class-hint__cat{margin-left:6px;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.rebemer-class-hint__cat[hidden]{display:none}.rebemer-class-hint__desc{margin:4px 0 0;color:var(--rebemer-fg)}.slashed-cp-launch{position:fixed;right:16px;bottom:16px;z-index:99999;display:inline-flex;align-items:center;gap:7px;padding:7px 12px;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:999px;font:600 11px/1 var(--rebemer-font);letter-spacing:.3px;cursor:pointer;box-shadow:0 4px 16px #00000073;transition:border-color .12s,color .12s,transform .12s}.slashed-cp-launch:hover{border-color:var(--rebemer-fg-muted);transform:translateY(-1px)}.slashed-cp-launch--on{border-color:var(--rebemer-accent);color:#fff}.slashed-cp-launch__dot{width:12px;height:12px;border-radius:50%;background:conic-gradient(from 210deg,#5b8cff,#b07cff,#ff6b6b,#ffd24a,#4ade80,#5b8cff);box-shadow:inset 0 0 0 1px #ffffff40}.slashed-cp-launch__txt{text-transform:uppercase}.slashed-cp{position:fixed;top:64px;right:16px;bottom:64px;width:372px;max-width:calc(100vw - 32px);z-index:100001;display:flex;flex-direction:column;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);box-shadow:0 12px 48px #0009;font:12px/1.45 var(--rebemer-font);overflow:hidden;outline:none}.slashed-cp__header{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--rebemer-border)}.slashed-cp__title{margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff;flex:1}.slashed-cp__close{background:transparent;border:0;font-size:18px;line-height:1;color:var(--rebemer-fg-muted);cursor:pointer;padding:2px 4px}.slashed-cp__close:hover{color:#fff}.slashed-cp__seg{display:inline-flex;border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);overflow:hidden}.slashed-cp__seg-btn{background:var(--rebemer-input-bg);border:0;border-left:1px solid var(--rebemer-input-border);color:var(--rebemer-fg-muted);font:600 10px/1 var(--rebemer-font);padding:5px 9px;cursor:pointer;text-transform:uppercase;letter-spacing:.4px}.slashed-cp__seg-btn:first-child{border-left:0}.slashed-cp__seg-btn--on{background:var(--rebemer-accent);color:var(--rebemer-bg)}.slashed-cp__toolbar{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-bottom:1px solid var(--rebemer-border)}.slashed-cp__search{width:100%;background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);font:inherit;padding:6px 8px;box-sizing:border-box}.slashed-cp__search:focus{outline:1px solid var(--rebemer-accent)}.slashed-cp__target{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.slashed-cp__target-label{font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.slashed-cp__chip{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:999px;color:var(--rebemer-fg-muted);font:600 10px/1 var(--rebemer-font);padding:4px 10px;cursor:pointer}.slashed-cp__chip--on{background:var(--rebemer-accent);border-color:var(--rebemer-accent);color:var(--rebemer-bg)}.slashed-cp__body{flex:1;overflow-y:auto;padding:6px 12px 12px}.slashed-cp__empty{color:var(--rebemer-fg-muted);font-size:11px;padding:12px 2px}.slashed-cp__group{padding:10px 0 6px;border-bottom:1px solid rgba(255,255,255,.05)}.slashed-cp__group:last-child{border-bottom:0}.slashed-cp__group-title{display:flex;align-items:center;gap:7px;margin:0 0 8px;font-size:11px;font-weight:700;color:#fff;text-transform:capitalize}.slashed-cp__group-count{font:600 9px/1 var(--rebemer-font);color:var(--rebemer-fg-muted);background:#ffffff0f;border-radius:999px;padding:2px 6px}.slashed-cp__section-label{margin:8px 0 5px;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.slashed-cp__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:7px 6px}.slashed-cp__cell{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}.slashed-cp__cap{font-size:9px;color:var(--rebemer-fg-muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slashed-cp__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.slashed-cp__list-item{display:flex;align-items:center;gap:8px}.slashed-cp__list-name{font-size:11px;color:var(--rebemer-fg);flex:0 0 auto}.slashed-cp__list-var{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-fg-muted);margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slashed-cp-swatch{width:28px;height:28px;flex:0 0 auto;padding:0;border:1px solid rgba(127,127,127,.45);border-radius:6px;background:none;cursor:pointer;position:relative;overflow:hidden}.slashed-cp-swatch:hover{border-color:var(--rebemer-accent)}.slashed-cp-swatch:focus-visible{outline:2px solid var(--rebemer-accent);outline-offset:1px}.slashed-cp-swatch__fill{position:absolute;inset:0;background:var(--cp-solid)}.slashed-cp-swatch--split .slashed-cp-swatch__fill{background:linear-gradient(135deg,var(--cp-l) 0 calc(50% - .5px),rgba(0,0,0,.35) calc(50% - .5px) calc(50% + .5px),var(--cp-d) calc(50% + .5px) 100%)}.slashed-cp-swatch--alpha{border-style:dashed}.slashed-cp__footer{display:flex;align-items:center;gap:10px;padding:8px 12px;border-top:1px solid var(--rebemer-border);font-size:10px;color:var(--rebemer-fg-muted)}.slashed-cp__hint{margin-left:auto}.slashed-cp__hint code,.slashed-cp__footer code{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.slashed-cp__legend{display:inline-flex;align-items:center;gap:5px}.slashed-cp__legend-sw{width:12px;height:12px;border-radius:3px;border:1px solid rgba(127,127,127,.45);background:linear-gradient(135deg,#fff 0 50%,#222 50% 100%)}.rebemer-toast--info{border-color:#63b3ed}.slashed-var-swatch{flex:0 0 auto;display:inline-block;width:12px;height:12px;margin-right:7px;vertical-align:middle;border-radius:3px;border:1px solid rgba(127,127,127,.45);background-color:#fff;background-image:linear-gradient(var(--slashed-swatch-color, transparent),var(--slashed-swatch-color, transparent)),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%);background-position:0 0,0 0,4px 4px;background-size:auto,8px 8px,8px 8px} +#slashed-rebemer-host{--rebemer-bg: #161a1d;--rebemer-fg: #e1e1e1;--rebemer-fg-muted: #8a8d95;--rebemer-border: #3d4752;--rebemer-accent: #e2b93b;--rebemer-accent-hover: #ffd042;--rebemer-input-bg: #293038;--rebemer-input-border: #3d4752;--rebemer-error: #ff4c4c;--rebemer-success: #4ade80;--rebemer-radius: 4px;--rebemer-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif}.rebemer-badge-host{display:inline-flex;align-items:center;align-self:center;flex:0 0 auto;margin:0 4px;opacity:0;pointer-events:none;transition:opacity 80ms linear}.structure-item:hover .rebemer-badge-host,.structure-item:focus-within .rebemer-badge-host,li[data-id]:hover>.rebemer-badge-host,li[data-id]:focus-within>.rebemer-badge-host{opacity:1;pointer-events:auto}.rebemer-badge{font:600 9px/1 var(--rebemer-font, "Inter", -apple-system, BlinkMacSystemFont, sans-serif);letter-spacing:0;text-transform:none;color:var(--rebemer-fg-muted, #8a8d95);display:inline;background:transparent;padding:1px 3px;margin:0;cursor:pointer;border-radius:2px;pointer-events:auto}.rebemer-badge:hover{color:var(--rebemer-accent, #e2b93b);background:#e2b93b14}.rebemer-badge:focus-visible{outline:1px dotted var(--rebemer-accent, #e2b93b);outline-offset:1px;color:var(--rebemer-accent, #e2b93b)}.rebemer-panel{position:fixed;top:80px;left:50%;transform:translate(-50%);width:440px;max-width:calc(100vw - 40px);max-height:80vh;z-index:100000;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);box-shadow:0 10px 40px #0009;display:flex;flex-direction:column;font:12px/1.45 var(--rebemer-font);overflow:hidden;outline:none}.rebemer-panel__header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--rebemer-border)}.rebemer-panel__title{margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff}.rebemer-panel__subject{color:var(--rebemer-accent);text-transform:none;font-weight:500}.rebemer-panel__close{background:transparent;border:0;font-size:18px;color:var(--rebemer-fg-muted);cursor:pointer;padding:2px 6px}.rebemer-panel__close:hover{color:#fff}.rebemer-panel__toolbar{padding:10px 14px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--rebemer-border)}.rebemer-field{display:flex;flex-direction:column;gap:4px;font-size:11px}.rebemer-field--inline{flex-direction:row;align-items:center;gap:6px}.rebemer-field__label{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:10px}.rebemer-field select,.rebemer-field input[type=text]{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);padding:4px 6px;font:inherit}.rebemer-field select:focus,.rebemer-field input:focus{outline:1px solid var(--rebemer-accent)}.rebemer-panel__mode-hint{margin:0;padding:5px 14px;font-size:11px;color:var(--rebemer-fg-muted);background:var(--rebemer-bg);border-bottom:1px solid var(--rebemer-border);line-height:1.4}.rebemer-panel__notice{margin:0;padding:8px 14px;background:#e2b93b14;border-bottom:1px solid var(--rebemer-border);color:var(--rebemer-fg);font-size:11px;line-height:1.5}.rebemer-panel__notice--warn{background:#e2b93b29}.rebemer-panel__notice strong{color:var(--rebemer-accent);font-weight:600}.rebemer-panel__notice-skip{display:block;margin-top:2px;color:var(--rebemer-fg-muted)}.rebemer-panel__body{flex:1;overflow-y:auto;padding:8px 14px;display:flex;flex-direction:column;gap:6px}.rebemer-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--rebemer-radius);background:#ffffff05;margin-left:calc(var(--rebemer-row-depth, 0) * 12px)}.rebemer-row:hover{background:#ffffff0a}.rebemer-row--disabled{opacity:.45}.rebemer-row__include input{cursor:pointer}.rebemer-row__meta{display:flex;gap:6px;align-items:baseline;min-width:0}.rebemer-row__label{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rebemer-row__type{font-size:9px;color:var(--rebemer-fg-muted);text-transform:uppercase}.rebemer-row__hint{font-size:9px;color:var(--rebemer-accent);text-transform:uppercase;letter-spacing:.5px;background:#e2b93b1f;padding:1px 4px;border-radius:2px}.rebemer-row__inputs{grid-column:1 / -1;display:flex;gap:6px;align-items:center}.rebemer-row__name{flex:1;display:flex;align-items:stretch;background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);overflow:hidden}.rebemer-row__prefix{padding:4px 6px;background:#00000040;color:var(--rebemer-fg-muted);font-size:11px;border-right:1px solid var(--rebemer-input-border);white-space:nowrap}.rebemer-row__name input{background:transparent;border:0;outline:0;color:var(--rebemer-fg);font:inherit;padding:4px 6px;flex:1;min-width:0}.rebemer-row--suggested .rebemer-row__name input:not(:focus){color:var(--rebemer-fg-muted);font-style:italic}.rebemer-row__modifier{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);font:inherit;padding:4px 6px;width:90px}.rebemer-row__recommend{grid-column:1 / -1;margin:0;padding:6px 8px;background:#4ade8014;border-left:2px solid var(--rebemer-success);border-radius:2px;color:var(--rebemer-fg);font-size:11px;line-height:1.4}.rebemer-row__recommend code{background:#0000004d;padding:1px 4px;border-radius:2px;font:11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-row__warn,.rebemer-row__info{grid-column:1 / -1;margin:0;padding:5px 8px;font-size:11px;line-height:1.4;border-radius:2px}.rebemer-row__warn{background:#e2b93b1f;border-left:2px solid #e2b93b;color:var(--rebemer-fg)}.rebemer-row__info{background:#63b3ed1a;border-left:2px solid #63b3ed;color:var(--rebemer-fg-muted)}.rebemer-row__chips{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:4px 0 0;font-size:10px}.rebemer-row__chips-label,.rebemer-row__chips-empty,.rebemer-row__chips-skip{color:var(--rebemer-fg-muted);text-transform:uppercase;letter-spacing:.5px;font-size:9px}.rebemer-row__chips-skip{margin-left:auto;cursor:help;color:#c8a038}.rebemer-chip{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#0000004d;border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:2px 5px;border-radius:2px;white-space:nowrap}.rebemer-panel__footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid var(--rebemer-border)}.rebemer-btn{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);color:var(--rebemer-fg);padding:6px 12px;border-radius:var(--rebemer-radius);font:inherit;cursor:pointer}.rebemer-btn:hover{border-color:var(--rebemer-fg-muted)}.rebemer-btn--primary{background:var(--rebemer-accent);border-color:var(--rebemer-accent);color:var(--rebemer-bg);font-weight:600}.rebemer-btn--primary:hover{background:var(--rebemer-accent-hover);border-color:var(--rebemer-accent-hover)}.rebemer-toast{position:fixed;bottom:16px;right:16px;z-index:100002;background:var(--rebemer-input-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 12px;font:12px/1.45 var(--rebemer-font);cursor:pointer;box-shadow:0 4px 12px #0006}.rebemer-toast--success{border-color:var(--rebemer-success)}.rebemer-toast--error{border-color:var(--rebemer-error);color:var(--rebemer-error)}.rebemer-class-hint{position:fixed;z-index:100003;max-width:280px;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);padding:8px 10px;font:12px/1.45 var(--rebemer-font);box-shadow:0 6px 20px #00000080;pointer-events:none}.rebemer-class-hint[hidden]{display:none}.rebemer-class-hint__name{font:600 11px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.rebemer-class-hint__cat{margin-left:6px;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.rebemer-class-hint__cat[hidden]{display:none}.rebemer-class-hint__desc{margin:4px 0 0;color:var(--rebemer-fg)}.slashed-cp-launch{position:fixed;right:16px;bottom:16px;z-index:99999;display:inline-flex;align-items:center;gap:7px;padding:7px 12px;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:999px;font:600 11px/1 var(--rebemer-font);letter-spacing:.3px;cursor:pointer;box-shadow:0 4px 16px #00000073;transition:border-color .12s,color .12s,transform .12s}.slashed-cp-launch:hover{border-color:var(--rebemer-fg-muted);transform:translateY(-1px)}.slashed-cp-launch--on{border-color:var(--rebemer-accent);color:#fff}.slashed-cp-launch__dot{width:12px;height:12px;border-radius:50%;background:conic-gradient(from 210deg,#5b8cff,#b07cff,#ff6b6b,#ffd24a,#4ade80,#5b8cff);box-shadow:inset 0 0 0 1px #ffffff40}.slashed-cp-launch__txt{text-transform:uppercase}.slashed-cp{position:fixed;top:64px;right:16px;bottom:64px;width:372px;max-width:calc(100vw - 32px);z-index:100001;display:flex;flex-direction:column;background:var(--rebemer-bg);color:var(--rebemer-fg);border:1px solid var(--rebemer-border);border-radius:var(--rebemer-radius);box-shadow:0 12px 48px #0009;font:12px/1.45 var(--rebemer-font);overflow:hidden;outline:none}.slashed-cp__header{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--rebemer-border)}.slashed-cp__title{margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#fff;flex:1}.slashed-cp__close{background:transparent;border:0;font-size:18px;line-height:1;color:var(--rebemer-fg-muted);cursor:pointer;padding:2px 4px}.slashed-cp__close:hover{color:#fff}.slashed-cp__seg{display:inline-flex;border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);overflow:hidden}.slashed-cp__seg-btn{background:var(--rebemer-input-bg);border:0;border-left:1px solid var(--rebemer-input-border);color:var(--rebemer-fg-muted);font:600 10px/1 var(--rebemer-font);padding:5px 9px;cursor:pointer;text-transform:uppercase;letter-spacing:.4px}.slashed-cp__seg-btn:first-child{border-left:0}.slashed-cp__seg-btn--on{background:var(--rebemer-accent);color:var(--rebemer-bg)}.slashed-cp__toolbar{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-bottom:1px solid var(--rebemer-border)}.slashed-cp__search{width:100%;background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:var(--rebemer-radius);color:var(--rebemer-fg);font:inherit;padding:6px 8px;box-sizing:border-box}.slashed-cp__search:focus{outline:1px solid var(--rebemer-accent)}.slashed-cp__target{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.slashed-cp__target-label{font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.slashed-cp__chip{background:var(--rebemer-input-bg);border:1px solid var(--rebemer-input-border);border-radius:999px;color:var(--rebemer-fg-muted);font:600 10px/1 var(--rebemer-font);padding:4px 10px;cursor:pointer}.slashed-cp__chip--on{background:var(--rebemer-accent);border-color:var(--rebemer-accent);color:var(--rebemer-bg)}.slashed-cp__body{flex:1;overflow-y:auto;padding:6px 12px 12px}.slashed-cp__empty{color:var(--rebemer-fg-muted);font-size:11px;padding:12px 2px}.slashed-cp__group{padding:10px 0 6px;border-bottom:1px solid rgba(255,255,255,.05)}.slashed-cp__group:last-child{border-bottom:0}.slashed-cp__group-head{margin:0 0 8px}.slashed-cp__group-title{display:flex;align-items:baseline;gap:7px;margin:0;font-size:11px;font-weight:700;color:#fff;text-transform:capitalize}.slashed-cp__group-tag{font-size:10px;font-weight:500;color:var(--rebemer-fg-muted);text-transform:none}.slashed-cp__group-count{margin-left:auto;font:600 9px/1 var(--rebemer-font);color:var(--rebemer-fg-muted);background:#ffffff0f;border-radius:999px;padding:2px 6px;text-transform:none}.slashed-cp__group-use{margin:2px 0 0;font-size:10px;line-height:1.4;color:var(--rebemer-fg-muted)}.slashed-cp__section-label{margin:8px 0 5px;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:var(--rebemer-fg-muted)}.slashed-cp__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:7px 6px}.slashed-cp__cell{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}.slashed-cp__cap{font-size:9px;color:var(--rebemer-fg-muted);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slashed-cp__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.slashed-cp__list-item{display:flex;align-items:center;gap:8px}.slashed-cp__list-name{font-size:11px;color:var(--rebemer-fg);flex:0 0 auto}.slashed-cp__list-var{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-fg-muted);margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slashed-cp-swatch{width:28px;height:28px;flex:0 0 auto;padding:0;border:1px solid rgba(127,127,127,.45);border-radius:6px;background:none;cursor:pointer;position:relative;overflow:hidden}.slashed-cp-swatch:hover{border-color:var(--rebemer-accent)}.slashed-cp-swatch:focus-visible{outline:2px solid var(--rebemer-accent);outline-offset:1px}.slashed-cp-swatch__fill{position:absolute;inset:0;background:var(--cp-solid)}.slashed-cp-swatch--split .slashed-cp-swatch__fill{background:linear-gradient(135deg,var(--cp-l) 0 calc(50% - .5px),rgba(0,0,0,.35) calc(50% - .5px) calc(50% + .5px),var(--cp-d) calc(50% + .5px) 100%)}.slashed-cp-swatch--alpha{border-style:dashed}.slashed-cp__footer{display:flex;align-items:center;gap:10px;padding:8px 12px;border-top:1px solid var(--rebemer-border);font-size:10px;color:var(--rebemer-fg-muted)}.slashed-cp__hint{margin-left:auto}.slashed-cp__hint code,.slashed-cp__footer code{font:10px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--rebemer-accent)}.slashed-cp__legend{display:inline-flex;align-items:center;gap:5px}.slashed-cp__legend-sw{width:12px;height:12px;border-radius:3px;border:1px solid rgba(127,127,127,.45);background:linear-gradient(135deg,#fff 0 50%,#222 50% 100%)}.rebemer-toast--info{border-color:#63b3ed}.slashed-var-swatch{flex:0 0 auto;display:inline-block;width:12px;height:12px;margin-right:7px;vertical-align:middle;border-radius:3px;border:1px solid rgba(127,127,127,.45);background-color:#fff;background-image:linear-gradient(var(--slashed-swatch-color, transparent),var(--slashed-swatch-color, transparent)),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%),linear-gradient(45deg,rgba(127,127,127,.35) 25%,transparent 25%,transparent 75%,rgba(127,127,127,.35) 75%);background-position:0 0,0 0,4px 4px;background-size:auto,8px 8px,8px 8px} diff --git a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js index 03146389..9115d546 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js @@ -1,9 +1,9 @@ -var oo=Object.defineProperty;var Es=e=>{throw TypeError(e)};var ao=(e,t,n)=>t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>ao(e,typeof t!="symbol"?t+"":t,n),Nr=(e,t,n)=>t.has(e)||Es("Cannot "+n);var c=(e,t,n)=>(Nr(e,t,"read from private field"),n?n.call(e):t.get(e)),O=(e,t,n)=>t.has(e)?Es("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),T=(e,t,n,r)=>(Nr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),B=(e,t,n)=>(Nr(e,t,"access private method"),n);var cs=Array.isArray,lo=Array.prototype.indexOf,Dt=Array.prototype.includes,xr=Array.from,co=Object.defineProperty,an=Object.getOwnPropertyDescriptor,uo=Object.getOwnPropertyDescriptors,fo=Object.prototype,ho=Array.prototype,Xs=Object.getPrototypeOf,Ss=Object.isExtensible;const _o=()=>{};function po(e){for(var t=0;t{e=r,t=s});return{promise:n,resolve:e,reject:t}}const de=2,vn=4,Tr=8,Qs=1<<24,Ue=16,Ve=32,Et=64,Kr=128,Fe=512,le=1024,fe=2048,et=4096,ge=8192,Be=16384,Vt=32768,Wr=1<<25,gn=65536,hr=1<<17,vo=1<<18,wn=1<<19,go=1<<20,Qe=1<<25,Wt=65536,_r=1<<21,ln=1<<22,wt=1<<23,Ft=Symbol("$state"),mo=Symbol("legacy props"),bo=Symbol(""),tr=Symbol("attributes"),Ur=Symbol("class"),zr=Symbol("style"),xn=Symbol("text"),nr=Symbol("form reset"),Or=new class extends Error{constructor(){super(...arguments);be(this,"name","StaleReactionError");be(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function yo(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function wo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ko(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Eo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function So(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Co(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ao(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function xo(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function To(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Oo(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Mo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Lo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Io=1,Ro=2,$s=4,No=8,Po=16,Do=1,Fo=4,Bo=8,jo=16,Ho=1,qo=2,ae=Symbol("uninitialized"),ei="http://www.w3.org/1999/xhtml";function Ko(){console.warn("https://svelte.dev/e/derived_inert")}function Wo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Uo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ti(e){return e===this.v}function zo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ni(e){return!zo(e,this.v)}let Se=null;function mn(e){Se=e}function Yt(e,t=!1,n){Se={p:Se,i:!1,c:null,e:null,s:e,x:null,r:D,l:null}}function Jt(e){var t=Se,n=t.e;if(n!==null){t.e=null;for(var r of n)Ei(r)}return t.i=!0,Se=t.p,{}}function ri(){return!0}let xt=[];function si(){var e=xt;xt=[],po(e)}function kt(e){if(xt.length===0&&!Ln){var t=xt;queueMicrotask(()=>{t===xt&&si()})}xt.push(e)}function Go(){for(;xt.length>0;)si()}function ii(e){var t=D;if(t===null)return P.f|=wt,e;if((t.f&Vt)===0&&(t.f&vn)===0)throw e;bt(e,t)}function bt(e,t){for(;t!==null;){if((t.f&Kr)!==0){if((t.f&Vt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Vo=-7169;function te(e,t){e.f=e.f&Vo|t}function us(e){(e.f&Fe)!==0||e.deps===null?te(e,le):te(e,et)}function oi(e){if(e!==null)for(const t of e)(t.f&de)===0||(t.f&Wt)===0||(t.f^=Wt,oi(t.deps))}function ai(e,t,n){(e.f&fe)!==0?t.add(e):(e.f&et)!==0&&n.add(e),oi(e.deps),te(e,le)}let Zn=!1;function Yo(e){var t=Zn;try{return Zn=!1,[e(),Zn]}finally{Zn=t}}let Pr=null,nn=null,I=null,Gr=null,ze=null,Vr=null,Ln=!1,Dr=!1,sn=null,rr=null;var Cs=0;let Jo=1;var un,vt,Mt,fn,dn,Lt,hn,st,Hn,Ae,qn,gt,Je,Xe,_n,It,H,Yr,Tn,Jr,li,ci,sr,Xo,Xr,rn;const Sr=class Sr{constructor(){O(this,H);be(this,"id",Jo++);O(this,un,!1);be(this,"linked",!0);O(this,vt,null);O(this,Mt,null);be(this,"async_deriveds",new Map);be(this,"current",new Map);be(this,"previous",new Map);be(this,"unblocked",new Set);O(this,fn,new Set);O(this,dn,new Set);O(this,Lt,new Set);O(this,hn,0);O(this,st,new Map);O(this,Hn,null);O(this,Ae,[]);O(this,qn,[]);O(this,gt,new Set);O(this,Je,new Set);O(this,Xe,new Map);O(this,_n,new Set);be(this,"is_fork",!1);O(this,It,!1)}skip_effect(t){c(this,Xe).has(t)||c(this,Xe).set(t,{d:[],m:[]}),c(this,_n).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=c(this,Xe).get(t);if(r){c(this,Xe).delete(t);for(var s of r.d)te(s,fe),n(s);for(s of r.m)te(s,et),n(s)}c(this,_n).add(t)}capture(t,n,r=!1){t.v!==ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&wt)===0&&(this.current.set(t,[n,r]),ze?.set(t,n)),this.is_fork||(t.v=n)}activate(){I=this}deactivate(){I=null,ze=null}flush(){try{Dr=!0,I=this,B(this,H,Tn).call(this)}finally{Cs=0,Vr=null,sn=null,rr=null,Dr=!1,I=null,ze=null,Bt.clear()}}discard(){for(const t of c(this,dn))t(this);c(this,dn).clear(),c(this,Lt).clear(),B(this,H,rn).call(this)}register_created_effect(t){c(this,qn).push(t)}increment(t,n){if(T(this,hn,c(this,hn)+1),t){let r=c(this,st).get(n)??0;c(this,st).set(n,r+1)}}decrement(t,n){if(T(this,hn,c(this,hn)-1),t){let r=c(this,st).get(n)??0;r===1?c(this,st).delete(n):c(this,st).set(n,r-1)}c(this,It)||(T(this,It,!0),kt(()=>{T(this,It,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)c(this,gt).add(r);for(const r of n)c(this,Je).add(r);t.clear(),n.clear()}oncommit(t){c(this,fn).add(t)}ondiscard(t){c(this,dn).add(t)}on_fork_commit(t){c(this,Lt).add(t)}run_fork_commit_callbacks(){for(const t of c(this,Lt))t(this);c(this,Lt).clear()}settled(){return(c(this,Hn)??T(this,Hn,Zs())).promise}static ensure(){var t;if(I===null){const n=I=new Sr;B(t=n,H,Xr).call(t),!Dr&&!Ln&&kt(()=>{c(n,un)||n.flush()})}return I}apply(){{ze=null;return}}schedule(t){if(Vr=t,t.b?.is_pending&&(t.f&(vn|Tr|Qs))!==0&&(t.f&Vt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(sn!==null&&n===D&&(P===null||(P.f&de)===0))return;if((r&(Et|Ve))!==0){if((r&le)===0)return;n.f^=le}}c(this,Ae).push(n)}};un=new WeakMap,vt=new WeakMap,Mt=new WeakMap,fn=new WeakMap,dn=new WeakMap,Lt=new WeakMap,hn=new WeakMap,st=new WeakMap,Hn=new WeakMap,Ae=new WeakMap,qn=new WeakMap,gt=new WeakMap,Je=new WeakMap,Xe=new WeakMap,_n=new WeakMap,It=new WeakMap,H=new WeakSet,Yr=function(){if(this.is_fork)return!0;for(const r of c(this,st).keys()){for(var t=r,n=!1;t.parent!==null;){if(c(this,Xe).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Tn=function(){var l,f,h;if(T(this,un,!0),Cs++>1e3&&(B(this,H,rn).call(this),Qo()),!B(this,H,Yr).call(this)){for(const u of c(this,gt))c(this,Je).delete(u),te(u,fe),this.schedule(u);for(const u of c(this,Je))te(u,et),this.schedule(u)}const t=c(this,Ae);T(this,Ae,[]),this.apply();var n=sn=[],r=[],s=rr=[];for(const u of t)try{B(this,H,Jr).call(this,u,n,r)}catch(d){throw di(u),d}if(I=null,s.length>0){var i=Sr.ensure();for(const u of s)i.schedule(u)}if(sn=null,rr=null,B(this,H,Yr).call(this)){B(this,H,sr).call(this,r),B(this,H,sr).call(this,n);for(const[u,d]of c(this,Xe))fi(u,d);s.length>0&&B(l=I,H,Tn).call(l);return}const o=B(this,H,li).call(this);if(o){B(f=o,H,ci).call(f,this);return}c(this,gt).clear(),c(this,Je).clear();for(const u of c(this,fn))u(this);c(this,fn).clear(),Gr=this,As(r),As(n),Gr=null,c(this,Hn)?.resolve();var a=I;if(this.linked&&c(this,hn)===0&&B(this,H,rn).call(this),c(this,Ae).length>0){a===null&&(a=this,B(this,H,Xr).call(this));const u=a;c(u,Ae).push(...c(this,Ae).filter(d=>!c(u,Ae).includes(d)))}a!==null&&B(h=a,H,Tn).call(h)},Jr=function(t,n,r){t.f^=le;for(var s=t.first;s!==null;){var i=s.f,o=(i&(Ve|Et))!==0,a=o&&(i&le)!==0,l=a||(i&ge)!==0||c(this,Xe).has(s);if(!l&&s.fn!==null){o?s.f^=le:(i&vn)!==0?n.push(s):Vn(s)&&((i&Ue)!==0&&c(this,Je).add(s),yn(s));var f=s.first;if(f!==null){s=f;continue}}for(;s!==null;){var h=s.next;if(h!==null){s=h;break}s=s.parent}}},li=function(){for(var t=c(this,vt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=c(t,vt)}return null},ci=function(t){var r;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const o=this.async_deriveds.get(s);o&&i.promise.then(o.resolve)}const n=s=>{var i=s.reactions;if(i!==null)for(const l of i){var o=l.f;if((o&de)!==0)n(l);else{var a=l;o&(ln|Ue)&&!this.async_deriveds.has(a)&&(c(this,Je).delete(a),te(a,fe),this.schedule(a))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),B(r=t,H,rn).call(r),I=this,B(this,H,Tn).call(this)},sr=function(t){for(var n=0;n!this.current.has(d));if(s.length===0)t&&u.discard();else if(n.length>0){if(t)for(const d of c(this,_n))u.unskip_effect(d,p=>{var v;(p.f&(Ue|ln))!==0?u.schedule(p):B(v=u,H,sr).call(v,[p])});u.activate();var i=new Set,o=new Map;for(var a of n)ui(a,s,i,o);o=new Map;var l=[...u.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(l.length>0)for(const d of c(this,qn))(d.f&(Be|ge|hr))===0&&fs(d,l,o)&&((d.f&(ln|Ue))!==0?(te(d,fe),u.schedule(d)):c(u,gt).add(d));if(c(u,Ae).length>0&&!c(u,It)){u.apply();for(var f of c(u,Ae))B(h=u,H,Jr).call(h,f,[],[]);T(u,Ae,[])}u.deactivate()}}}},Xr=function(){nn===null?Pr=nn=this:(T(nn,Mt,this),T(this,vt,nn)),nn=this},rn=function(){var t=c(this,vt),n=c(this,Mt);t===null?Pr=n:T(t,Mt,n),n===null?nn=t:T(n,vt,t),this.linked=!1};let Ut=Sr;function Zo(e){var t=Ln;Ln=!0;try{for(var n;;){if(Go(),I===null)return n;I.flush()}}finally{Ln=t}}function Qo(){try{Ao()}catch(e){bt(e,Vr)}}let rt=null;function As(e){var t=e.length;if(t!==0){for(var n=0;n0)){Bt.clear();for(const s of rt){if((s.f&(Be|ge))!==0)continue;const i=[s];let o=s.parent;for(;o!==null;)rt.has(o)&&(rt.delete(o),i.push(o)),o=o.parent;for(let a=i.length-1;a>=0;a--){const l=i[a];(l.f&(Be|ge))===0&&yn(l)}}rt.clear()}}rt=null}}function ui(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&de)!==0?ui(s,t,n,r):(i&(ln|Ue))!==0&&(i&fe)===0&&fs(s,t,r)&&(te(s,fe),ds(s))}}function fs(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(Dt.call(t,s))return!0;if((s.f&de)!==0&&fs(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ds(e){I.schedule(e)}function fi(e,t){if(!((e.f&Ve)!==0&&(e.f&le)!==0)){(e.f&fe)!==0?t.d.push(e):(e.f&et)!==0&&t.m.push(e),te(e,le);for(var n=e.first;n!==null;)fi(n,t),n=n.next}}function di(e){te(e,le);for(var t=e.first;t!==null;)di(t),t=t.next}function $o(e){let t=0,n=zt(0),r;return()=>{ps()&&(_(n),Lr(()=>(t===0&&(r=kn(()=>e(()=>In(n)))),t+=1,()=>{kt(()=>{t-=1,t===0&&(r?.(),r=void 0,In(n))})})))}}var ea=gn|wn;function ta(e,t,n,r){new na(e,t,n,r)}var Re,ls,Ne,Rt,ye,Pe,ve,xe,it,Nt,mt,pn,Kn,Wn,ot,Cr,ne,ra,sa,ia,Zr,ir,or,Qr,$r;class na{constructor(t,n,r,s){O(this,ne);be(this,"parent");be(this,"is_pending",!1);be(this,"transform_error");O(this,Re);O(this,ls,null);O(this,Ne);O(this,Rt);O(this,ye);O(this,Pe,null);O(this,ve,null);O(this,xe,null);O(this,it,null);O(this,Nt,0);O(this,mt,0);O(this,pn,!1);O(this,Kn,new Set);O(this,Wn,new Set);O(this,ot,null);O(this,Cr,$o(()=>(T(this,ot,zt(c(this,Nt))),()=>{T(this,ot,null)})));T(this,Re,t),T(this,Ne,n),T(this,Rt,i=>{var o=D;o.b=this,o.f|=Kr,r(i)}),this.parent=D.b,this.transform_error=s??this.parent?.transform_error??(i=>i),T(this,ye,ms(()=>{B(this,ne,Zr).call(this)},ea))}defer_effect(t){ai(t,c(this,Kn),c(this,Wn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Ne).pending}update_pending_count(t,n){B(this,ne,Qr).call(this,t,n),T(this,Nt,c(this,Nt)+t),!(!c(this,ot)||c(this,pn))&&(T(this,pn,!0),kt(()=>{T(this,pn,!1),c(this,ot)&&bn(c(this,ot),c(this,Nt))}))}get_effect_pending(){return c(this,Cr).call(this),_(c(this,ot))}error(t){if(!c(this,Ne).onerror&&!c(this,Ne).failed)throw t;I?.is_fork?(c(this,Pe)&&I.skip_effect(c(this,Pe)),c(this,ve)&&I.skip_effect(c(this,ve)),c(this,xe)&&I.skip_effect(c(this,xe)),I.on_fork_commit(()=>{B(this,ne,$r).call(this,t)})):B(this,ne,$r).call(this,t)}}Re=new WeakMap,ls=new WeakMap,Ne=new WeakMap,Rt=new WeakMap,ye=new WeakMap,Pe=new WeakMap,ve=new WeakMap,xe=new WeakMap,it=new WeakMap,Nt=new WeakMap,mt=new WeakMap,pn=new WeakMap,Kn=new WeakMap,Wn=new WeakMap,ot=new WeakMap,Cr=new WeakMap,ne=new WeakSet,ra=function(){try{T(this,Pe,De(()=>c(this,Rt).call(this,c(this,Re))))}catch(t){this.error(t)}},sa=function(t){const n=c(this,Ne).failed;n&&T(this,xe,De(()=>{n(c(this,Re),()=>t,()=>()=>{})}))},ia=function(){const t=c(this,Ne).pending;t&&(this.is_pending=!0,T(this,ve,De(()=>t(c(this,Re)))),kt(()=>{var n=T(this,it,document.createDocumentFragment()),r=lt();n.append(r),T(this,Pe,B(this,ne,or).call(this,()=>De(()=>c(this,Rt).call(this,r)))),c(this,mt)===0&&(c(this,Re).before(n),T(this,it,null),jt(c(this,ve),()=>{T(this,ve,null)}),B(this,ne,ir).call(this,I))}))},Zr=function(){try{if(this.is_pending=this.has_pending_snippet(),T(this,mt,0),T(this,Nt,0),T(this,Pe,De(()=>{c(this,Rt).call(this,c(this,Re))})),c(this,mt)>0){var t=T(this,it,document.createDocumentFragment());ws(c(this,Pe),t);const n=c(this,Ne).pending;T(this,ve,De(()=>n(c(this,Re))))}else B(this,ne,ir).call(this,I)}catch(n){this.error(n)}},ir=function(t){this.is_pending=!1,t.transfer_effects(c(this,Kn),c(this,Wn))},or=function(t){var n=D,r=P,s=Se;tt(c(this,ye)),He(c(this,ye)),mn(c(this,ye).ctx);try{return Ut.ensure(),t()}catch(i){return ii(i),null}finally{tt(n),He(r),mn(s)}},Qr=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&B(r=this.parent,ne,Qr).call(r,t,n);return}T(this,mt,c(this,mt)+t),c(this,mt)===0&&(B(this,ne,ir).call(this,n),c(this,ve)&&jt(c(this,ve),()=>{T(this,ve,null)}),c(this,it)&&(c(this,Re).before(c(this,it)),T(this,it,null)))},$r=function(t){c(this,Pe)&&(Ee(c(this,Pe)),T(this,Pe,null)),c(this,ve)&&(Ee(c(this,ve)),T(this,ve,null)),c(this,xe)&&(Ee(c(this,xe)),T(this,xe,null));var n=c(this,Ne).onerror;let r=c(this,Ne).failed;var s=!1,i=!1;const o=()=>{if(s){Uo();return}s=!0,i&&Lo(),c(this,xe)!==null&&jt(c(this,xe),()=>{T(this,xe,null)}),B(this,ne,or).call(this,()=>{B(this,ne,Zr).call(this)})},a=l=>{try{i=!0,n?.(l,o),i=!1}catch(f){bt(f,c(this,ye)&&c(this,ye).parent)}r&&T(this,xe,B(this,ne,or).call(this,()=>{try{return De(()=>{var f=D;f.b=this,f.f|=Kr,r(c(this,Re),()=>l,()=>o)})}catch(f){return bt(f,c(this,ye).parent),null}}))};kt(()=>{var l;try{l=this.transform_error(t)}catch(f){bt(f,c(this,ye)&&c(this,ye).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,f=>bt(f,c(this,ye)&&c(this,ye).parent)):a(l)})};function oa(e,t,n,r){const s=Bn;var i=e.filter(d=>!d.settled);if(n.length===0&&i.length===0){r(t.map(s));return}var o=D,a=aa(),l=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function f(d){if((o.f&Be)===0){a();try{r(d)}catch(p){bt(p,o)}pr()}}var h=hi();if(n.length===0){l.then(()=>f(t.map(s))).finally(h);return}function u(){Promise.all(n.map(d=>la(d))).then(d=>f([...t.map(s),...d])).catch(d=>bt(d,o)).finally(h)}l?l.then(()=>{a(),u(),pr()}):u()}function aa(){var e=D,t=P,n=Se,r=I;return function(i=!0){tt(e),He(t),mn(n),i&&(e.f&Be)===0&&(r?.activate(),r?.apply())}}function pr(e=!0){tt(null),He(null),mn(null),e&&I?.deactivate()}function hi(){var e=D,t=e.b,n=I,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function Bn(e){var t=de|fe;return D!==null&&(D.f|=wn),{ctx:Se,deps:null,effects:null,equals:ti,f:t,fn:e,reactions:null,rv:0,v:ae,wv:0,parent:D,ac:null}}const Qn=Symbol("obsolete");function la(e,t,n){let r=D;r===null&&wo();var s=void 0,i=zt(ae),o=!P,a=new Set;return wa(()=>{var l=D,f=Zs();s=f.promise;try{Promise.resolve(e()).then(f.resolve,p=>{p!==Or&&f.reject(p)}).finally(pr)}catch(p){f.reject(p),pr()}var h=I;if(o){if((l.f&Vt)!==0)var u=hi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(Qn);else for(const p of a.values())p.reject(Qn);a.add(f),h.async_deriveds.set(l,f)}const d=(p,v=void 0)=>{u?.(),a.delete(f),v!==Qn&&(h.activate(),v?(i.f|=wt,bn(i,v)):((i.f&wt)!==0&&(i.f^=wt),bn(i,p)),h.deactivate())};f.promise.then(d,p=>d(null,p||"unknown"))}),vs(()=>{for(const l of a)l.reject(Qn)}),new Promise(l=>{function f(h){function u(){h===s?l(i):f(s)}h.then(u,u)}f(s)})}function ce(e){const t=Bn(e);return Oi(t),t}function _i(e){const t=Bn(e);return t.equals=ni,t}function ca(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!gi&&da()}return t}function da(){gi=!1;for(const e of vr){(e.f&le)!==0&&te(e,et);let t;try{t=Vn(e)}catch{t=!0}t&&yn(e)}vr.clear()}function In(e){V(e,e.v+1)}function mi(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,i=0;i{if(Ht===i)return a();var l=P,f=Ht;He(null),Ms(i);var h=a();return He(l),Ms(f),h};return r&&n.set("length",ie(e.length)),new Proxy(e,{defineProperty(a,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&To();var h=n.get(l);return h===void 0?o(()=>{var u=ie(f.value);return n.set(l,u),u}):V(h,f.value,!0),!0},deleteProperty(a,l){var f=n.get(l);if(f===void 0){if(l in a){const h=o(()=>ie(ae));n.set(l,h),In(s)}}else V(f,ae),In(s);return!0},get(a,l,f){if(l===Ft)return e;var h=n.get(l),u=l in a;if(h===void 0&&(!u||an(a,l)?.writable)&&(h=o(()=>{var p=yt(u?a[l]:ae),v=ie(p);return v}),n.set(l,h)),h!==void 0){var d=_(h);return d===ae?void 0:d}return Reflect.get(a,l,f)},getOwnPropertyDescriptor(a,l){var f=Reflect.getOwnPropertyDescriptor(a,l);if(f&&"value"in f){var h=n.get(l);h&&(f.value=_(h))}else if(f===void 0){var u=n.get(l),d=u?.v;if(u!==void 0&&d!==ae)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(a,l){if(l===Ft)return!0;var f=n.get(l),h=f!==void 0&&f.v!==ae||Reflect.has(a,l);if(f!==void 0||D!==null&&(!h||an(a,l)?.writable)){f===void 0&&(f=o(()=>{var d=h?yt(a[l]):ae,p=ie(d);return p}),n.set(l,f));var u=_(f);if(u===ae)return!1}return h},set(a,l,f,h){var u=n.get(l),d=l in a;if(r&&l==="length")for(var p=f;pie(ae)),n.set(p+"",v))}if(u===void 0)(!d||an(a,l)?.writable)&&(u=o(()=>ie(void 0)),V(u,yt(f)),n.set(l,u));else{d=u.v!==ae;var y=o(()=>yt(f));V(u,y)}var g=Reflect.getOwnPropertyDescriptor(a,l);if(g?.set&&g.set.call(h,f),!d){if(r&&typeof l=="string"){var m=n.get("length"),S=Number(l);Number.isInteger(S)&&S>=m.v&&V(m,S+1)}In(s)}return!0},ownKeys(a){_(s);var l=Reflect.ownKeys(a).filter(u=>{var d=n.get(u);return d===void 0||d.v!==ae});for(var[f,h]of n)h.v!==ae&&!(f in a)&&l.push(f);return l},setPrototypeOf(){Oo()}})}function xs(e){try{if(e!==null&&typeof e=="object"&&Ft in e)return e[Ft]}catch{}return e}function ha(e,t){return Object.is(xs(e),xs(t))}var gr,bi,yi,wi;function _a(){if(gr===void 0){gr=window,bi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;yi=an(t,"firstChild").get,wi=an(t,"nextSibling").get,Ss(e)&&(e[Ur]=void 0,e[tr]=null,e[zr]=void 0,e.__e=void 0),Ss(n)&&(n[xn]=void 0)}}function lt(e=""){return document.createTextNode(e)}function mr(e){return yi.call(e)}function Gn(e){return wi.call(e)}function E(e,t){return mr(e)}function ct(e,t=!1){{var n=mr(e);return n instanceof Comment&&n.data===""?Gn(n):n}}function k(e,t=1,n=!1){let r=e;for(;t--;)r=Gn(r);return r}function pa(e){e.textContent=""}function ki(){return!1}function va(e,t,n){return document.createElementNS(ei,e,void 0)}let Ts=!1;function ga(){Ts||(Ts=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[nr]?.()})},{capture:!0}))}function Mr(e){var t=P,n=D;He(null),tt(null);try{return e()}finally{He(t),tt(n)}}function _s(e,t,n,r=n){e.addEventListener(t,()=>Mr(n));const s=e[nr];s?e[nr]=()=>{s(),r(!0)}:e[nr]=()=>r(!0),ga()}function ma(e){D===null&&(P===null&&Co(),So()),ut&&Eo()}function ba(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ft(e,t){var n=D;n!==null&&(n.f&ge)!==0&&(e|=ge);var r={ctx:Se,deps:null,nodes:null,f:e|fe|Fe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};I?.register_created_effect(r);var s=r;if((e&vn)!==0)sn!==null?sn.push(r):Ut.ensure().schedule(r);else if(t!==null){try{yn(r)}catch(o){throw Ee(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&wn)===0&&(s=s.first,(e&Ue)!==0&&(e&gn)!==0&&s!==null&&(s.f|=gn))}if(s!==null&&(s.parent=n,n!==null&&ba(s,n),P!==null&&(P.f&de)!==0&&(e&Et)===0)){var i=P;(i.effects??(i.effects=[])).push(s)}return r}function ps(){return P!==null&&!Ge}function vs(e){const t=ft(Tr,null);return te(t,le),t.teardown=e,t}function gs(e){ma();var t=D.f,n=!P&&(t&Ve)!==0&&(t&Vt)===0;if(n){var r=Se;(r.e??(r.e=[])).push(e)}else return Ei(e)}function Ei(e){return ft(vn|go,e)}function ya(e){Ut.ensure();const t=ft(Et|wn,e);return(n={})=>new Promise(r=>{n.outro?jt(t,()=>{Ee(t),r(void 0)}):(Ee(t),r(void 0))})}function Si(e){return ft(vn,e)}function wa(e){return ft(ln|wn,e)}function Lr(e,t=0){return ft(Tr|t,e)}function Y(e,t=[],n=[],r=[]){oa(r,t,n,s=>{ft(Tr,()=>e(...s.map(_)))})}function ms(e,t=0){var n=ft(Ue|t,e);return n}function De(e){return ft(Ve|wn,e)}function Ci(e){var t=e.teardown;if(t!==null){const n=ut,r=P;Os(!0),He(null);try{t.call(null)}finally{Os(n),He(r)}}}function bs(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Mr(()=>{s.abort(Or)});var r=n.next;(n.f&Et)!==0?n.parent=null:Ee(n,t),n=r}}function ka(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Ve)===0&&Ee(t),t=n}}function Ee(e,t=!0){var n=!1;(t||(e.f&vo)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ea(e.nodes.start,e.nodes.end),n=!0),te(e,Wr),bs(e,t&&!n),jn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Ci(e),e.f^=Wr,e.f|=Be;var s=e.parent;s!==null&&s.first!==null&&Ai(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ea(e,t){for(;e!==null;){var n=e===t?null:Gn(e);e.remove(),e=n}}function Ai(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function jt(e,t,n=!0){var r=[];xi(e,r,!0);var s=()=>{n&&Ee(e),t&&t()},i=r.length;if(i>0){var o=()=>--i||s();for(var a of r)a.out(o)}else s()}function xi(e,t,n){if((e.f&ge)===0){e.f^=ge;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var s=e.first;s!==null;){var i=s.next;if((s.f&Et)===0){var o=(s.f&gn)!==0||(s.f&Ve)!==0&&(e.f&Ue)!==0;xi(s,t,o?n:!1)}s=i}}}function ys(e){Ti(e,!0)}function Ti(e,t){if((e.f&ge)!==0){e.f^=ge,(e.f&le)===0&&(te(e,fe),Ut.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&gn)!==0||(n.f&Ve)!==0;Ti(n,s?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const o of i)(o.is_global||t)&&o.in()}}function ws(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Gn(n);t.append(n),n=s}}let ar=!1,ut=!1;function Os(e){ut=e}let P=null,Ge=!1;function He(e){P=e}let D=null;function tt(e){D=e}let je=null;function Oi(e){P!==null&&(je===null?je=[e]:je.push(e))}let we=null,Ce=0,Ie=null;function Sa(e){Ie=e}let Mi=1,Tt=0,Ht=Tt;function Ms(e){Ht=e}function Li(){return++Mi}function Vn(e){var t=e.f;if((t&fe)!==0)return!0;if(t&de&&(e.f&=~Wt),(t&et)!==0){for(var n=e.deps,r=n.length,s=0;se.wv)return!0}(t&Fe)!==0&&ze===null&&te(e,le)}return!1}function Ii(e,t,n=!0){var r=e.reactions;if(r!==null&&!(je!==null&&Dt.call(je,e)))for(var s=0;s{e.ac.abort(Or)}),e.ac=null);try{e.f|=_r;var h=e.fn,u=h();e.f|=Vt;var d=e.deps,p=I?.is_fork;if(we!==null){var v;if(p||jn(e,Ce),d!==null&&Ce>0)for(d.length=Ce+we.length,v=0;vn?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?kt(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Fi(e,t,n,r,s){var i={capture:r,passive:s},o=Oa(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&vs(()=>{t.removeEventListener(e,o,i)})}function Oe(e,t,n){(t[Ot]??(t[Ot]={}))[e]=n}function Xt(e){for(var t=0;t{throw g});throw d}}finally{e[Ot]=t,delete e.currentTarget,He(h),tt(u)}}}const Ma=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function La(e){return Ma?.createHTML(e)??e}function Ia(e){var t=va("template");return t.innerHTML=La(e.replaceAll("","")),t.content}function br(e,t){var n=D;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var n=(t&Ho)!==0,r=(t&qo)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=Ia(i?e:""+e),n||(s=mr(s)));var o=r||bi?document.importNode(s,!0):s.cloneNode(!0);if(n){var a=mr(o),l=o.lastChild;br(a,l)}else br(o,o);return o}}function Ra(e=""){{var t=lt(e+"");return br(t,t),t}}function Na(){var e=document.createDocumentFragment(),t=document.createComment(""),n=lt();return e.append(t,n),br(t,n),e}function N(e,t){e!==null&&e.before(t)}function Q(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[xn]??(e[xn]=e.nodeValue))&&(e[xn]=n,e.nodeValue=`${n}`)}function ks(e,t){return Pa(e,t)}const $n=new Map;function Pa(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:o=!0,transformError:a}){_a();var l=void 0,f=ya(()=>{var h=n??t.appendChild(lt());ta(h,{pending:()=>{}},p=>{Yt({});var v=Se;i&&(v.c=i),s&&(r.$$events=s),l=e(p,r)||{},Jt()},a);var u=new Set,d=p=>{for(var v=0;v{for(var p of u)for(const g of[t,document]){var v=$n.get(g),y=v.get(p);--y==0?(g.removeEventListener(p,ts),v.delete(p),v.size===0&&$n.delete(g)):v.set(p,y)}es.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return ns.set(l,f),l}let ns=new WeakMap;function Yn(e,t){const n=ns.get(e);return n?(ns.delete(e),n(t)):Promise.resolve()}var We,Ze,Te,Pt,Un,zn,Ar;class Da{constructor(t,n=!0){be(this,"anchor");O(this,We,new Map);O(this,Ze,new Map);O(this,Te,new Map);O(this,Pt,new Set);O(this,Un,!0);O(this,zn,t=>{if(c(this,We).has(t)){var n=c(this,We).get(t),r=c(this,Ze).get(n);if(r)ys(r),c(this,Pt).delete(n);else{var s=c(this,Te).get(n);s&&(c(this,Ze).set(n,s.effect),c(this,Te).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,o]of c(this,We)){if(c(this,We).delete(i),i===t)break;const a=c(this,Te).get(o);a&&(Ee(a.effect),c(this,Te).delete(o))}for(const[i,o]of c(this,Ze)){if(i===n||c(this,Pt).has(i))continue;const a=()=>{if(Array.from(c(this,We).values()).includes(i)){var f=document.createDocumentFragment();ws(o,f),f.append(lt()),c(this,Te).set(i,{effect:o,fragment:f})}else Ee(o);c(this,Pt).delete(i),c(this,Ze).delete(i)};c(this,Un)||!r?(c(this,Pt).add(i),jt(o,a,!1)):a()}}});O(this,Ar,t=>{c(this,We).delete(t);const n=Array.from(c(this,We).values());for(const[r,s]of c(this,Te))n.includes(r)||(Ee(s.effect),c(this,Te).delete(r))});this.anchor=t,T(this,Un,n)}ensure(t,n){var r=I,s=ki();if(n&&!c(this,Ze).has(t)&&!c(this,Te).has(t))if(s){var i=document.createDocumentFragment(),o=lt();i.append(o),c(this,Te).set(t,{effect:De(()=>n(o)),fragment:i})}else c(this,Ze).set(t,De(()=>n(this.anchor)));if(c(this,We).set(r,t),s){for(const[a,l]of c(this,Ze))a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of c(this,Te))a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(c(this,zn)),r.ondiscard(c(this,Ar))}else c(this,zn).call(this,r)}}We=new WeakMap,Ze=new WeakMap,Te=new WeakMap,Pt=new WeakMap,Un=new WeakMap,zn=new WeakMap,Ar=new WeakMap;function se(e,t,n=!1){var r=new Da(e),s=n?gn:0;function i(o,a){r.ensure(o,a)}ms(()=>{var o=!1;t((a,l=0)=>{o=!0,i(l,a)}),o||i(-1,null)},s)}function Fa(e,t){return t}function Ba(e,t,n){for(var r=[],s=t.length,i,o=t.length,a=0;a{if(i){if(i.pending.delete(u),i.done.add(u),i.pending.size===0){var d=e.outrogroups;rs(e,xr(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var f=n,h=f.parentNode;pa(h),h.append(f),e.items.clear()}rs(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function rs(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const o of e.pending.values())for(const a of o)r.add(e.items.get(a).e)}for(var s=0;s{var x=n();return cs(x)?x:x==null?[]:xr(x)}),d,p=new Map,v=!0;function y(x){(S.effect.f&Be)===0&&(S.pending.delete(x),S.fallback=h,ja(S,d,o,t,r),h!==null&&(d.length===0?(h.f&Qe)===0?ys(h):(h.f^=Qe,On(h,null,o)):jt(h,()=>{h=null})))}function g(x){S.pending.delete(x)}var m=ms(()=>{d=_(u);for(var x=d.length,M=new Set,W=I,re=ki(),J=0;Ji(o)):(h=De(()=>i(Is??(Is=lt()))),h.f|=Qe)),x>M.size&&ko(),!v)if(p.set(W,M),re){for(const[nt,Le]of a)M.has(nt)||W.skip_effect(Le.e);W.oncommit(y),W.ondiscard(g)}else y(W);_(u)}),S={effect:m,items:a,pending:p,outrogroups:null,fallback:h};v=!1}function An(e){for(;e!==null&&(e.f&Ve)===0;)e=e.next;return e}function ja(e,t,n,r,s){var i=(r&No)!==0,o=t.length,a=e.items,l=An(e.effect.first),f,h=null,u,d=[],p=[],v,y,g,m;if(i)for(m=0;m0){var _e=(r&$s)!==0&&o===0?n:null;if(i){for(m=0;m{if(u!==void 0)for(g of u)g.nodes?.a?.apply()})}function Ha(e,t,n,r,s,i,o,a){var l=(o&Io)!==0?(o&Po)===0?fa(n,!1,!1):zt(n):null,f=(o&Ro)!==0?zt(s):null;return{v:l,i:f,e:De(()=>(i(t,l??n,f??s,a),()=>{e.delete(r)}))}}function On(e,t,n){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end,i=t&&(t.f&Qe)===0?t.nodes.start:n;r!==null;){var o=Gn(r);if(i.before(r),r===s)return;r=o}}function _t(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const Rs=[...` -\r\f \v\uFEFF`];function qa(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var s of Object.keys(n))if(n[s])r=r?r+" "+s:s;else if(r.length)for(var i=s.length,o=0;(o=r.indexOf(s,o))>=0;){var a=o+i;(o===0||Rs.includes(r[o-1]))&&(a===r.length||Rs.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function Ka(e,t){return e==null?null:String(e)}function Gt(e,t,n,r,s,i){var o=e[Ur];if(o!==n||o===void 0){var a=qa(n,r,i);a==null?e.removeAttribute("class"):e.className=a,e[Ur]=n}else if(i&&s!==i)for(var l in i){var f=!!i[l];(s==null||f!==!!s[l])&&e.classList.toggle(l,f)}return i}function Bi(e,t,n,r){var s=e[zr];if(s!==t){var i=Ka(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e[zr]=t}return r}function ji(e,t,n=!1){if(e.multiple){if(t==null)return;if(!cs(t))return Wo();for(var r of e.options)r.selected=t.includes(Rn(r));return}for(r of e.options){var s=Rn(r);if(ha(s,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Wa(e){var t=new MutationObserver(()=>{ji(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),vs(()=>{t.disconnect()})}function Ua(e,t,n=t){var r=new WeakSet,s=!0;_s(e,"change",i=>{var o=i?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),Rn);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&Rn(l)}n(a),e.__value=a,I!==null&&r.add(I)}),Si(()=>{var i=t();if(e===document.activeElement){var o=I;if(r.has(o))return}if(ji(e,i,s),s&&i===void 0){var a=e.querySelector(":checked");a!==null&&(i=Rn(a),n(i))}e.__value=i,s=!1}),Wa(e)}function Rn(e){return"__value"in e?e.__value:e.value}const za=Symbol("is custom element"),Ga=Symbol("is html");function ke(e,t,n,r){var s=Va(e);s[t]!==(s[t]=n)&&(t==="loading"&&(e[bo]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Ya(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Va(e){return e[tr]??(e[tr]={[za]:e.nodeName.includes("-"),[Ga]:e.namespaceURI===ei})}var Ns=new Map;function Ya(e){var t=e.getAttribute("is")||e.nodeName,n=Ns.get(t);if(n)return n;Ns.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=uo(s);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.push(o);s=Xs(s)}return n}function ss(e,t,n=t){var r=new WeakSet;_s(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=Fr(e)?Br(i):i,n(i),I!==null&&r.add(I),await Aa(),i!==(i=t())){var o=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=i??"",a!==null){var f=e.value.length;o===a&&a===l&&f>l?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=o,e.selectionEnd=Math.min(a,f))}}}),kn(t)==null&&e.value&&(n(Fr(e)?Br(e.value):e.value),I!==null&&r.add(I)),Lr(()=>{var s=t();if(e===document.activeElement){var i=I;if(r.has(i))return}Fr(e)&&s===Br(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Hi(e,t,n=t){_s(e,"change",r=>{var s=r?e.defaultChecked:e.checked;n(s)}),kn(t)==null&&n(e.checked),Lr(()=>{var r=t();e.checked=!!r})}function Fr(e){var t=e.type;return t==="number"||t==="range"}function Br(e){return e===""?null:+e}function jr(e,t){return e===t||e?.[Ft]===t}function Ja(e={},t,n,r){var s=Se.r,i=D;return Si(()=>{var o,a;return Lr(()=>{o=a,a=[],kn(()=>{jr(n(...a),e)||(t(e,...a),o&&jr(n(...o),e)&&t(null,...o))})}),()=>{let l=i;for(;l!==s&&l.parent!==null&&l.parent.f&Wr;)l=l.parent;const f=()=>{a&&jr(n(...a),e)&&t(null,...a)},h=l.teardown;l.teardown=()=>{f(),h?.()}}}),e}function Nn(e,t,n,r){var s=!0,i=(n&Bo)!==0,o=(n&jo)!==0,a=r,l=!0,f=void 0,h=()=>o&&s?(f??(f=Bn(r)),_(f)):(l&&(l=!1,a=o?kn(r):r),a);let u;if(i){var d=Ft in e||mo in e;u=an(e,t)?.set??(d&&t in e?M=>e[t]=M:void 0)}var p,v=!1;i?[p,v]=Yo(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=h(),u&&(xo(),u(p)));var y;if(y=()=>{var M=e[t];return M===void 0?h():(l=!0,M)},(n&Fo)===0)return y;if(u){var g=e.$$legacy;return(function(M,W){return arguments.length>0?((!W||g||v)&&u(W?y():M),M):y()})}var m=!1,S=((n&Do)!==0?Bn:_i)(()=>(m=!1,y()));i&&_(S);var x=D;return(function(M,W){if(arguments.length>0){const re=W?_(S):i?yt(M):M;return V(S,re),m=!0,a!==void 0&&(a=re),M}return ut&&m||(x.f&Be)!==0?S.v:_(S)})}function qi(e){Se===null&&yo(),gs(()=>{const t=kn(e);if(typeof t=="function")return t})}const Ki="[data-v-app]",Xa=["header","content","footer"];let ue=null,Ke=null;function Za(e){const t=e instanceof Set?e:new Set(e||[]);for(let n=0;n<16;n++){const r=crypto.randomUUID().replace(/-/g,"").slice(0,8);if(!t.has(r))return r}throw new Error("rebemer: id collision exhausted")}function Qa(){if(typeof document>"u")return!1;const t=document.querySelector(Ki)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(ue=null,!1):(ue=t,Ke=null,!0)}function $a(){if(Ke!==null)return Ke;const e=typeof document<"u"?document.querySelector(Ki)?.__vue_app__:null;if(!e)return Ke=!1,!1;const t=e.config?.globalProperties??{};if(typeof ue?.$history?.pause=="function"&&typeof ue?.$history?.resume=="function")return Ke={pause:()=>ue.$history.pause(),resume:()=>ue.$history.resume()},Ke;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(Ke={pause:()=>n.history.pause(),resume:()=>n.history.resume()},Ke):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(Ke={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},Ke):(Ke=!1,!1)}function Wi(e){const t=$a();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function $e(e){if(!ue||!e)return null;for(const t of Xa){const n=ue[t];if(!Array.isArray(n))continue;const r=n.find(s=>s&&s.id===e);if(r)return r}return null}function el(e){const t=$e(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return Ui(t,1,n),n}function Ui(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const s=$e(r);s&&(n.push({id:s.id,depth:t,label:s.label,name:s.name,settings:s.settings}),Ui(s,t+1,n))}}function zi(){return ue?ue.globalClasses:[]}function Hr(e,t){if(!ue)throw new Error("rebemer: not ready");const n=ue.globalClasses,r=n.find(o=>o&&o.name===e);if(r)return r.id;const s=new Set(n.map(o=>o?.id).filter(Boolean)),i=Za(s);return n.push({id:i,name:e,settings:t||{}}),i}function Ps(e,t){const n=$e(e);if(!n)return;n.settings||(n.settings={});const r=Array.isArray(t)?t:[];Array.isArray(n.settings._cssGlobalClasses)?n.settings._cssGlobalClasses.splice(0,n.settings._cssGlobalClasses.length,...r):n.settings._cssGlobalClasses=[...r]}function Ds(e,t){const n=$e(e);n&&(n.label=t)}function tl(){if(ue){const e=[ue.activeElement,ue.activeElementId,ue.activeId,ue.selectedElement];for(const t of e){if(t&&typeof t=="object"&&typeof t.id=="string"&&t.id)return t.id;if(typeof t=="string"&&t)return t}}if(typeof document<"u"){const t=document.querySelector("#bricks-structure li[data-id].active, #bricks-structure li[data-id].is-active")?.getAttribute("data-id");if(t)return t}return null}const nl={text:["_typography","color"],background:["_background","color"],border:["_border","color"]};function rl(e,t,n){const r=nl[t];if(!r)return!1;const s=$e(e);if(!s)return!1;(!s.settings||typeof s.settings!="object")&&(s.settings={});const[i,o]=r;return(!s.settings[i]||typeof s.settings[i]!="object")&&(s.settings[i]={}),s.settings[i][o]={raw:n},!0}function sl(e){const t=$e(e);return t&&typeof t.label=="string"?t.label:""}const yr="slashed-rebemer-host",il="slashed-class-hint",Gi=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],ol=3;function al(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n[0]==="."&&(n=n.slice(1)),!n.startsWith("sf-")&&!n.startsWith("is-"))||!Object.prototype.hasOwnProperty.call(t,n))return null;const r=t[n];return!r||typeof r.description!="string"?null:{name:n,description:r.description,category:r.category}}let is=!1,wr={},at=null,Pn=null,Me=null;function ll(){if(at&&at.isConnected)return at;let e=document.getElementById(yr);e||(e=document.createElement("div"),e.id=yr,document.body.appendChild(e));const t=document.createElement("div");return t.id=il,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

      ',e.appendChild(t),at=t,t}function Vi(e){let t=e;for(let n=0;t&&na&&n.top-i-s>=0&&(l=n.top-i-s);let f=n.left;f+r>o-4&&(f=Math.max(4,o-4-r)),f<4&&(f=4),e.style.top=`${Math.round(l)}px`,e.style.left=`${Math.round(f)}px`}function Yi(e,t){const n=ll();n.querySelector(".rebemer-class-hint__name").textContent=`.${t.name}`;const r=n.querySelector(".rebemer-class-hint__cat");r.textContent=t.category||"",r.hidden=!t.category,n.querySelector(".rebemer-class-hint__desc").textContent=t.description,n.hidden=!1,cl(n,e),Me=e}function St(){at&&(at.hidden=!0),Me=null}function ul(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${yr}`))return;if(!t.closest(Gi.join(","))){Me&&St();return}const n=Vi(t);if(!n){Me&&St();return}n.el!==Me&&Yi(n.el,n.hint)}function fl(e){if(!Me)return;const t=e.relatedTarget;t instanceof Node&&Me.contains(t)||St()}function dl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${yr}`))return;if(!t.closest(Gi.join(","))){Me&&St();return}const n=Vi(t);if(!n){Me&&St();return}n.el!==Me&&Yi(n.el,n.hint)}function hl(e){if(!Me)return;const t=e.relatedTarget;t instanceof Node&&Me.contains(t)||St()}function _l(e){e.key==="Escape"&&St()}function pl(e,t,n={}){if(lr(),is=!!e,wr=t&&typeof t=="object"?t:{},!is||Object.keys(wr).length===0)return;Pn=new AbortController;const{signal:r}=Pn,s={passive:!0,signal:r};document.addEventListener("mouseover",ul,s),document.addEventListener("mouseout",fl,s),document.addEventListener("focusin",dl,s),document.addEventListener("focusout",hl,s),document.addEventListener("keydown",_l,s),window.addEventListener("scroll",St,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?lr():n.signal.addEventListener("abort",lr,{once:!0}))}function lr(){Pn&&(Pn.abort(),Pn=null),at&&(at.remove(),at=null),Me=null,is=!1,wr={}}const cr="li.variable-picker-item",ur="slashed-var-swatch",vl=50,gl=(e,...t)=>console[e]("[slashed-swatches]",...t);function ml(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n.slice(0,2)!=="--"&&(n="--"+n.replace(/^-+/,"")),n.indexOf("--sf-color-")!==0))return null;const r=t[n];return typeof r=="string"&&r?r:null}let os=!1,kr={},Dn=null,cn=null,fr=null;function bl(e){const t=e.querySelector(":scope > span[title]")||e.querySelector(":scope > span");if(t){const n=t.getAttribute("title");return n&&n.trim()?n.trim():(t.textContent||"").trim()}return(e.textContent||"").trim()}function yl(e){if(e.classList.contains("title")||e.classList.contains("category")){const r=e.querySelector(":scope > ."+ur);r&&r.remove();return}const t=ml(bl(e),kr);let n=e.querySelector(":scope > ."+ur);if(!t){n&&n.remove();return}n||(n=document.createElement("span"),n.className=ur,n.setAttribute("aria-hidden","true"),e.insertBefore(n,e.firstChild)),n.dataset.color!==t&&(n.style.setProperty("--slashed-swatch-color",t),n.dataset.color=t)}function Ji(){try{const e=document.querySelectorAll(cr);for(const t of e)yl(t)}catch(e){gl("warn","swatch pass failed",e)}}function wl(){cn===null&&(cn=setTimeout(()=>{cn=null,Ji()},vl))}function kl(e){for(const t of e){const n=t.target;if(n&&n.nodeType===1&&n.closest&&n.closest(cr))return!0;for(const r of t.addedNodes)if(r.nodeType===1&&(r.matches&&r.matches(cr)||r.querySelector&&r.querySelector(cr)))return!0}return!1}function El(e,t,n={}){dr(),os=!!e,kr=t&&typeof t=="object"?t:{},!(!os||Object.keys(kr).length===0)&&(fr=new AbortController,Dn=new MutationObserver(r=>{kl(r)&&wl()}),Dn.observe(document.body,{childList:!0,subtree:!0}),Ji(),n.signal&&(n.signal.aborted?dr():n.signal.addEventListener("abort",dr,{once:!0})))}function dr(){cn!==null&&(clearTimeout(cn),cn=null),Dn&&(Dn.disconnect(),Dn=null),fr&&(fr.abort(),fr=null);try{document.querySelectorAll("."+ur).forEach(e=>e.remove())}catch{}os=!1,kr={}}const Sl="5";var Js;typeof window<"u"&&((Js=window.__svelte??(window.__svelte={})).v??(Js.v=new Set)).add(Sl);var Cl=F('reBEM');function Al(e,t){Yt(t,!0);function n(s){s.stopPropagation(),s.preventDefault(),t.onActivate?.(t.elementId)}var r=Cl();Y(()=>{ke(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),ke(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),Oe("click",r,n),Oe("keydown",r,s=>(s.key==="Enter"||s.key===" ")&&n(s)),N(e,r),Jt()}Xt(["click","keydown"]);function qt(e){return e?String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x00-\x7f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}const xl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Tl=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function Ol(e){return e?Tl.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:xl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const Ir=new Set(["_padding","_padding_top","_padding_right","_padding_bottom","_padding_left","_margin","_margin_top","_margin_right","_margin_bottom","_margin_left","_width","_widthMin","_widthMax","_minWidth","_maxWidth","_height","_heightMin","_heightMax","_minHeight","_maxHeight","_aspectRatio","_overflow","_overflowX","_overflowY","_color","_background","_backgroundColor","_backgroundImage","_backgroundSize","_backgroundPosition","_backgroundRepeat","_backgroundAttachment","_backgroundBlendMode","_typography","_fontFamily","_fontSize","_fontWeight","_fontStyle","_lineHeight","_letterSpacing","_wordSpacing","_textAlign","_textTransform","_textDecoration","_textDecorationColor","_textShadow","_textIndent","_whiteSpace","_listStyleType","_listStylePosition","_border","_borderRadius","_borderColor","_borderStyle","_borderWidth","_outline","_outlineColor","_outlineStyle","_outlineWidth","_outlineOffset","_boxShadow","_filter","_backdropFilter","_opacity","_blendMode","_transform","_transformOrigin","_transition","_animation","_display","_flexDirection","_flexWrap","_flexGrow","_flexShrink","_flexBasis","_alignItems","_alignSelf","_alignContent","_justifyContent","_justifyItems","_justifySelf","_gap","_rowGap","_columnGap","_gridTemplateColumns","_gridTemplateRows","_gridGap","_gridAutoFlow","_gridAutoColumns","_gridAutoRows","_gridColumn","_gridRow","_gridArea","_position","_top","_right","_bottom","_left","_zIndex","_objectFit","_objectPosition","_cursor","_pointerEvents","_userSelect"]);function Ml(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Ir.has(n)&&t.push(n);return t.sort(),t}const Ll=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function Il(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Ir.has(n)||Ll.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Rl=new Set(["add","rename","replace","modifier","migrate"]),Fs=new Set(["user","label"]);function Xi({rootId:e,rows:t,mode:n}){if(!Rl.has(n))return{ok:!1,ops:[],error:`Invalid mode: ${n}`};const r=t.find(a=>a.id===e);if(!r)return{ok:!1,ops:[],error:"Root row missing."};const s=qt(r.name);if(!s)return{ok:!1,ops:[],error:"Block name is empty."};const i=[];for(const a of t){if(!a.include)continue;const l=a.id===e;let f;if(l)f=s;else{const u=qt(a.name);if(!u)continue;f=`${s}__${u}`}let h=f;if(n==="modifier"){const u=qt(a.modifier);if(!u)continue;h=`${f}--${u}`}i.push({row:a,isRoot:l,finalClass:h,suggestedFrom:a.suggestedFrom||"fallback"})}if(i.length===0)return{ok:!1,ops:[],error:"No rows to apply. Include at least one row."};const o=Dl(i,n);return o.ok?{ok:!0,ops:i}:{ok:!1,ops:[],error:o.error}}function Nl({rootId:e,rows:t,mode:n,syncLabels:r}){const s=Xi({rootId:e,rows:t,mode:n});if(!s.ok)return{ok:!1,error:s.error};const i=s.ops,o=t.find(u=>u.id===e),a=qt(o?.name??""),l=zi();if(n==="migrate"){const u=Pl(i,l);if(!u.ok)return u}const f=new Map;for(const u of i){const d=$e(u.row.id);if(!d)continue;const p={classIds:Bs(d.settings).slice(),label:r&&n!=="modifier"?d.label??"":null};if(n==="migrate"&&Array.isArray(u.row.migrateKeys)){const v={};for(const y of u.row.migrateKeys)Object.prototype.hasOwnProperty.call(d.settings||{},y)&&(v[y]=JSON.parse(JSON.stringify(d.settings[y])));p.migrateKeys=v}f.set(u.row.id,p)}let h=0;try{Wi(()=>{for(const u of i){const d=$e(u.row.id);if(!d)continue;const p=Bs(d.settings);let v={};if(n==="rename"&&p.length>0){const m=l.find(S=>S&&S.id===p[0]);m&&m.settings&&(v=JSON.parse(JSON.stringify(m.settings)))}else n==="migrate"&&(v=Zi(d.settings,u.row.migrateKeys));if(n==="migrate"){const m=l.find(S=>S&&S.name===u.finalClass);if(m){(!m.settings||typeof m.settings!="object")&&(m.settings={});for(const[S,x]of Object.entries(v))Object.prototype.hasOwnProperty.call(m.settings,S)||(m.settings[S]=x)}}const y=Hr(u.finalClass,v);let g;switch(n){case"add":case"migrate":g=p.includes(y)?p:[...p,y];break;case"modifier":{const m=u.finalClass.indexOf("--"),S=m>=0?u.finalClass.slice(0,m):null;let x=[...p];if(S){const M=Hr(S,{});x.includes(M)||x.push(M)}g=x.includes(y)?x:[...x,y];break}case"rename":{const m=[y],S=p.length>0?l.find(x=>x&&x.id===p[0]):null;if(S){const x=S.name+"--";for(let M=1;Mre&&re.id===p[M]);if(W)if(W.name.startsWith(x)){const re=W.name.slice(S.name.length),J=W.settings?JSON.parse(JSON.stringify(W.settings)):{};m.push(Hr(u.finalClass+re,J))}else m.push(p[M])}}g=m;break}case"replace":g=[y];break}if(Ps(u.row.id,g),n==="migrate"&&Fl(d.settings,u.row.migrateKeys),r&&n!=="modifier"){const m=Bl(u.finalClass,a);m&&Ds(u.row.id,m)}h++}})}catch(u){for(const[p,v]of f)try{if(Ps(p,v.classIds),v.migrateKeys){const y=$e(p);y&&y.settings&&Object.assign(y.settings,v.migrateKeys)}v.label!==null&&Ds(p,v.label)}catch{}const d=u instanceof Error?u.message:String(u);return console.warn("[reBEMer] apply failed after",h,"mutation(s), rolled back:",d),{ok:!1,error:`Operation failed and was rolled back: ${d}`}}return h===0?{ok:!1,error:"No elements were modified. The subtree may have changed."}:{ok:!0,count:h}}function Pl(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const s=$e(n.row.id);if(!s)continue;const i=Zi(s.settings,n.row.migrateKeys),o=r.settings&&typeof r.settings=="object"?r.settings:{},a=[];for(const[l,f]of Object.entries(i))Object.prototype.hasOwnProperty.call(o,l)&&JSON.stringify(o[l])!==JSON.stringify(f)&&a.push(l.replace(/^_/,""));if(a.length>0){const l=a.join(", ");return{ok:!1,error:`Migrate blocked: existing class "${n.finalClass}" has conflicting values for ${l}. Pick a different name or use Add mode.`}}}return{ok:!0}}function Dl(e,t){const n=new Map;for(const r of e){const s=n.get(r.finalClass)||[];s.push(r),n.set(r.finalClass,s)}for(const[r,s]of n){if(s.length===1||t==="modifier")continue;const i=s.filter(a=>Fs.has(a.suggestedFrom));if(i.length>1)return{ok:!1,error:`"${r}" is used by ${i.length} rows. Edit one to make it unique.`};let o=1;for(const a of s)Fs.has(a.suggestedFrom)||(a.finalClass=`${r}-${o++}`,a.suggestedFrom="auto-number")}if(t!=="modifier"){const r=new Map;for(const s of e){const i=r.get(s.finalClass);if(i)return{ok:!1,error:`"${s.finalClass}" is produced by 2 rows after auto-numbering (one ${i}, one ${s.suggestedFrom}). Pick a different name for one of them.`};r.set(s.finalClass,s.suggestedFrom)}}return{ok:!0}}function Zi(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)Ir.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Fl(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)Ir.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function Bs(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function Bl(e,t){let n=e;return n===t?js(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),js(n.replace(/-/g," ")))}function js(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const jl=Object.freeze({heading:"heading","text-basic":"text",text:"text","text-link":"link",code:"code",image:"image",icon:"icon","icon-box":"icon",video:"video",audio:"audio",svg:"svg",logo:"logo",shape:"shape",button:"button","button-group":"buttons","nav-nested":"nav","nav-menu":"nav",list:"list",accordion:"accordion",tabs:"tabs",slider:"slider",carousel:"carousel",countdown:"countdown",counter:"counter",testimonials:"testimonials",pricing:"pricing",team:"team",form:"form",posts:"posts",template:"item"}),Qi=new Set(["section","container","block","div"]);function Hl(e,t="item"){return!e||typeof e!="string"||Qi.has(e)?t:jl[e]||t}function qr(e){return typeof e=="string"&&Qi.has(e)}const ql=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function Kl(e,t,n){const r=new Set(e.filter(Boolean)),s=(...p)=>p.some(v=>r.has(v)),i=s("button","button-group"),o=s("heading"),a=s("text-basic","text"),l=s("image"),f=s("nav-nested","nav-menu"),h=s("form"),u=s("icon","icon-box"),d=s("list");return h?"form":f?"nav":i&&!o&&!a?"actions":l&&!a&&!o&&!i?"media":o&&!a&&!i?"header":a&&!o&&!i?"body":o&&a?"content":o&&i?"header":u&&!a&&!o?"icon-group":d?"list-wrap":n>1?t===0?"header":t===n-1?"footer":"body":"content"}var Wl=F('suggested'),Ul=F(' '),zl=F(''),Gl=F('

      Enter a modifier name — the base class will be added automatically if absent.

      '),Vl=F('

      This element has no existing classes. Rename will create a new class instead.

      '),Yl=F('

      '),Jl=F(`A class named already exists. +var ha=Object.defineProperty;var Ts=e=>{throw TypeError(e)};var _a=(e,t,n)=>t in e?ha(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>_a(e,typeof t!="symbol"?t+"":t,n),Br=(e,t,n)=>t.has(e)||Ts("Cannot "+n);var u=(e,t,n)=>(Br(e,t,"read from private field"),n?n.call(e):t.get(e)),O=(e,t,n)=>t.has(e)?Ts("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),T=(e,t,n,r)=>(Br(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(Br(e,t,"access private method"),n);var _s=Array.isArray,pa=Array.prototype.indexOf,Ft=Array.prototype.includes,Or=Array.from,va=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,ga=Object.getOwnPropertyDescriptors,ma=Object.prototype,ba=Array.prototype,ni=Object.getPrototypeOf,Os=Object.isExtensible;const ya=()=>{};function wa(e){for(var t=0;t{e=r,t=s});return{promise:n,resolve:e,reject:t}}const fe=2,mn=4,Mr=8,si=1<<24,We=16,ze=32,St=64,Vr=128,Pe=512,oe=1024,ue=2048,$e=4096,pe=8192,De=16384,Yt=32768,Yr=1<<25,bn=65536,pr=1<<17,ka=1<<18,En=1<<19,Ea=1<<20,Ze=1<<25,Ut=65536,vr=1<<21,un=1<<22,kt=1<<23,Bt=Symbol("$state"),Sa=Symbol("legacy props"),Ca=Symbol(""),rr=Symbol("attributes"),Jr=Symbol("class"),Xr=Symbol("style"),On=Symbol("text"),sr=Symbol("form reset"),Ir=new class extends Error{constructor(){super(...arguments);ge(this,"name","StaleReactionError");ge(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function xa(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Aa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ta(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Oa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ma(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ia(e){throw new Error("https://svelte.dev/e/effect_orphan")}function La(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ra(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Na(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Da(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ba=1,ja=2,ii=4,Ha=8,qa=16,Wa=1,Ka=4,Ua=8,za=16,Ga=1,Va=2,ae=Symbol("uninitialized"),ai="http://www.w3.org/1999/xhtml";function Ya(){console.warn("https://svelte.dev/e/derived_inert")}function Ja(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Xa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function oi(e){return e===this.v}function Za(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function li(e){return!Za(e,this.v)}let ke=null;function yn(e){ke=e}function Jt(e,t=!1,n){ke={p:ke,i:!1,c:null,e:null,s:e,x:null,r:B,l:null}}function Xt(e){var t=ke,n=t.e;if(n!==null){t.e=null;for(var r of n)Oi(r)}return t.i=!0,ke=t.p,{}}function ci(){return!0}let Tt=[];function ui(){var e=Tt;Tt=[],wa(e)}function Et(e){if(Tt.length===0&&!Rn){var t=Tt;queueMicrotask(()=>{t===Tt&&ui()})}Tt.push(e)}function Qa(){for(;Tt.length>0;)ui()}function fi(e){var t=B;if(t===null)return F.f|=kt,e;if((t.f&Yt)===0&&(t.f&mn)===0)throw e;yt(e,t)}function yt(e,t){for(;t!==null;){if((t.f&Vr)!==0){if((t.f&Yt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const $a=-7169;function ne(e,t){e.f=e.f&$a|t}function ps(e){(e.f&Pe)!==0||e.deps===null?ne(e,oe):ne(e,$e)}function di(e){if(e!==null)for(const t of e)(t.f&fe)===0||(t.f&Ut)===0||(t.f^=Ut,di(t.deps))}function hi(e,t,n){(e.f&ue)!==0?t.add(e):(e.f&$e)!==0&&n.add(e),di(e.deps),ne(e,oe)}let $n=!1;function eo(e){var t=$n;try{return $n=!1,[e(),$n]}finally{$n=t}}let jr=null,sn=null,L=null,Zr=null,Ke=null,Qr=null,Rn=!1,Hr=!1,on=null,ir=null;var Ms=0;let to=1;var dn,gt,It,hn,_n,Lt,pn,st,Wn,Se,Kn,mt,Ye,Je,vn,Rt,q,$r,Mn,es,_i,pi,ar,no,ts,an;const xr=class xr{constructor(){O(this,q);ge(this,"id",to++);O(this,dn,!1);ge(this,"linked",!0);O(this,gt,null);O(this,It,null);ge(this,"async_deriveds",new Map);ge(this,"current",new Map);ge(this,"previous",new Map);ge(this,"unblocked",new Set);O(this,hn,new Set);O(this,_n,new Set);O(this,Lt,new Set);O(this,pn,0);O(this,st,new Map);O(this,Wn,null);O(this,Se,[]);O(this,Kn,[]);O(this,mt,new Set);O(this,Ye,new Set);O(this,Je,new Map);O(this,vn,new Set);ge(this,"is_fork",!1);O(this,Rt,!1)}skip_effect(t){u(this,Je).has(t)||u(this,Je).set(t,{d:[],m:[]}),u(this,vn).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=u(this,Je).get(t);if(r){u(this,Je).delete(t);for(var s of r.d)ne(s,ue),n(s);for(s of r.m)ne(s,$e),n(s)}u(this,vn).add(t)}capture(t,n,r=!1){t.v!==ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&kt)===0&&(this.current.set(t,[n,r]),Ke?.set(t,n)),this.is_fork||(t.v=n)}activate(){L=this}deactivate(){L=null,Ke=null}flush(){try{Hr=!0,L=this,H(this,q,Mn).call(this)}finally{Ms=0,Qr=null,on=null,ir=null,Hr=!1,L=null,Ke=null,jt.clear()}}discard(){for(const t of u(this,_n))t(this);u(this,_n).clear(),u(this,Lt).clear(),H(this,q,an).call(this)}register_created_effect(t){u(this,Kn).push(t)}increment(t,n){if(T(this,pn,u(this,pn)+1),t){let r=u(this,st).get(n)??0;u(this,st).set(n,r+1)}}decrement(t,n){if(T(this,pn,u(this,pn)-1),t){let r=u(this,st).get(n)??0;r===1?u(this,st).delete(n):u(this,st).set(n,r-1)}u(this,Rt)||(T(this,Rt,!0),Et(()=>{T(this,Rt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)u(this,mt).add(r);for(const r of n)u(this,Ye).add(r);t.clear(),n.clear()}oncommit(t){u(this,hn).add(t)}ondiscard(t){u(this,_n).add(t)}on_fork_commit(t){u(this,Lt).add(t)}run_fork_commit_callbacks(){for(const t of u(this,Lt))t(this);u(this,Lt).clear()}settled(){return(u(this,Wn)??T(this,Wn,ri())).promise}static ensure(){var t;if(L===null){const n=L=new xr;H(t=n,q,ts).call(t),!Hr&&!Rn&&Et(()=>{u(n,dn)||n.flush()})}return L}apply(){{Ke=null;return}}schedule(t){if(Qr=t,t.b?.is_pending&&(t.f&(mn|Mr|si))!==0&&(t.f&Yt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(on!==null&&n===B&&(F===null||(F.f&fe)===0))return;if((r&(St|ze))!==0){if((r&oe)===0)return;n.f^=oe}}u(this,Se).push(n)}};dn=new WeakMap,gt=new WeakMap,It=new WeakMap,hn=new WeakMap,_n=new WeakMap,Lt=new WeakMap,pn=new WeakMap,st=new WeakMap,Wn=new WeakMap,Se=new WeakMap,Kn=new WeakMap,mt=new WeakMap,Ye=new WeakMap,Je=new WeakMap,vn=new WeakMap,Rt=new WeakMap,q=new WeakSet,$r=function(){if(this.is_fork)return!0;for(const r of u(this,st).keys()){for(var t=r,n=!1;t.parent!==null;){if(u(this,Je).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Mn=function(){var l,f,h;if(T(this,dn,!0),Ms++>1e3&&(H(this,q,an).call(this),so()),!H(this,q,$r).call(this)){for(const c of u(this,mt))u(this,Ye).delete(c),ne(c,ue),this.schedule(c);for(const c of u(this,Ye))ne(c,$e),this.schedule(c)}const t=u(this,Se);T(this,Se,[]),this.apply();var n=on=[],r=[],s=ir=[];for(const c of t)try{H(this,q,es).call(this,c,n,r)}catch(d){throw mi(c),d}if(L=null,s.length>0){var i=xr.ensure();for(const c of s)i.schedule(c)}if(on=null,ir=null,H(this,q,$r).call(this)){H(this,q,ar).call(this,r),H(this,q,ar).call(this,n);for(const[c,d]of u(this,Je))gi(c,d);s.length>0&&H(l=L,q,Mn).call(l);return}const a=H(this,q,_i).call(this);if(a){H(f=a,q,pi).call(f,this);return}u(this,mt).clear(),u(this,Ye).clear();for(const c of u(this,hn))c(this);u(this,hn).clear(),Zr=this,Is(r),Is(n),Zr=null,u(this,Wn)?.resolve();var o=L;if(this.linked&&u(this,pn)===0&&H(this,q,an).call(this),u(this,Se).length>0){o===null&&(o=this,H(this,q,ts).call(this));const c=o;u(c,Se).push(...u(this,Se).filter(d=>!u(c,Se).includes(d)))}o!==null&&H(h=o,q,Mn).call(h)},es=function(t,n,r){t.f^=oe;for(var s=t.first;s!==null;){var i=s.f,a=(i&(ze|St))!==0,o=a&&(i&oe)!==0,l=o||(i&pe)!==0||u(this,Je).has(s);if(!l&&s.fn!==null){a?s.f^=oe:(i&mn)!==0?n.push(s):Jn(s)&&((i&We)!==0&&u(this,Ye).add(s),kn(s));var f=s.first;if(f!==null){s=f;continue}}for(;s!==null;){var h=s.next;if(h!==null){s=h;break}s=s.parent}}},_i=function(){for(var t=u(this,gt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=u(t,gt)}return null},pi=function(t){var r;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const a=this.async_deriveds.get(s);a&&i.promise.then(a.resolve)}const n=s=>{var i=s.reactions;if(i!==null)for(const l of i){var a=l.f;if((a&fe)!==0)n(l);else{var o=l;a&(un|We)&&!this.async_deriveds.has(o)&&(u(this,Ye).delete(o),ne(o,ue),this.schedule(o))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),H(r=t,q,an).call(r),L=this,H(this,q,Mn).call(this)},ar=function(t){for(var n=0;n!this.current.has(d));if(s.length===0)t&&c.discard();else if(n.length>0){if(t)for(const d of u(this,vn))c.unskip_effect(d,p=>{var v;(p.f&(We|un))!==0?c.schedule(p):H(v=c,q,ar).call(v,[p])});c.activate();var i=new Set,a=new Map;for(var o of n)vi(o,s,i,a);a=new Map;var l=[...c.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(l.length>0)for(const d of u(this,Kn))(d.f&(De|pe|pr))===0&&vs(d,l,a)&&((d.f&(un|We))!==0?(ne(d,ue),c.schedule(d)):u(c,mt).add(d));if(u(c,Se).length>0&&!u(c,Rt)){c.apply();for(var f of u(c,Se))H(h=c,q,es).call(h,f,[],[]);T(c,Se,[])}c.deactivate()}}}},ts=function(){sn===null?jr=sn=this:(T(sn,It,this),T(this,gt,sn)),sn=this},an=function(){var t=u(this,gt),n=u(this,It);t===null?jr=n:T(t,It,n),n===null?sn=t:T(n,gt,t),this.linked=!1};let zt=xr;function ro(e){var t=Rn;Rn=!0;try{for(var n;;){if(Qa(),L===null)return n;L.flush()}}finally{Rn=t}}function so(){try{La()}catch(e){yt(e,Qr)}}let rt=null;function Is(e){var t=e.length;if(t!==0){for(var n=0;n0)){jt.clear();for(const s of rt){if((s.f&(De|pe))!==0)continue;const i=[s];let a=s.parent;for(;a!==null;)rt.has(a)&&(rt.delete(a),i.push(a)),a=a.parent;for(let o=i.length-1;o>=0;o--){const l=i[o];(l.f&(De|pe))===0&&kn(l)}}rt.clear()}}rt=null}}function vi(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&fe)!==0?vi(s,t,n,r):(i&(un|We))!==0&&(i&ue)===0&&vs(s,t,r)&&(ne(s,ue),gs(s))}}function vs(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(Ft.call(t,s))return!0;if((s.f&fe)!==0&&vs(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function gs(e){L.schedule(e)}function gi(e,t){if(!((e.f&ze)!==0&&(e.f&oe)!==0)){(e.f&ue)!==0?t.d.push(e):(e.f&$e)!==0&&t.m.push(e),ne(e,oe);for(var n=e.first;n!==null;)gi(n,t),n=n.next}}function mi(e){ne(e,oe);for(var t=e.first;t!==null;)mi(t),t=t.next}function io(e){let t=0,n=Gt(0),r;return()=>{ys()&&(_(n),Rr(()=>(t===0&&(r=Sn(()=>e(()=>Nn(n)))),t+=1,()=>{Et(()=>{t-=1,t===0&&(r?.(),r=void 0,Nn(n))})})))}}var ao=bn|En;function oo(e,t,n,r){new lo(e,t,n,r)}var Ie,hs,Le,Nt,me,Re,_e,Ce,it,Pt,bt,gn,Un,zn,at,Ar,re,co,uo,fo,ns,or,lr,rs,ss;class lo{constructor(t,n,r,s){O(this,re);ge(this,"parent");ge(this,"is_pending",!1);ge(this,"transform_error");O(this,Ie);O(this,hs,null);O(this,Le);O(this,Nt);O(this,me);O(this,Re,null);O(this,_e,null);O(this,Ce,null);O(this,it,null);O(this,Pt,0);O(this,bt,0);O(this,gn,!1);O(this,Un,new Set);O(this,zn,new Set);O(this,at,null);O(this,Ar,io(()=>(T(this,at,Gt(u(this,Pt))),()=>{T(this,at,null)})));T(this,Ie,t),T(this,Le,n),T(this,Nt,i=>{var a=B;a.b=this,a.f|=Vr,r(i)}),this.parent=B.b,this.transform_error=s??this.parent?.transform_error??(i=>i),T(this,me,Es(()=>{H(this,re,ns).call(this)},ao))}defer_effect(t){hi(t,u(this,Un),u(this,zn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!u(this,Le).pending}update_pending_count(t,n){H(this,re,rs).call(this,t,n),T(this,Pt,u(this,Pt)+t),!(!u(this,at)||u(this,gn))&&(T(this,gn,!0),Et(()=>{T(this,gn,!1),u(this,at)&&wn(u(this,at),u(this,Pt))}))}get_effect_pending(){return u(this,Ar).call(this),_(u(this,at))}error(t){if(!u(this,Le).onerror&&!u(this,Le).failed)throw t;L?.is_fork?(u(this,Re)&&L.skip_effect(u(this,Re)),u(this,_e)&&L.skip_effect(u(this,_e)),u(this,Ce)&&L.skip_effect(u(this,Ce)),L.on_fork_commit(()=>{H(this,re,ss).call(this,t)})):H(this,re,ss).call(this,t)}}Ie=new WeakMap,hs=new WeakMap,Le=new WeakMap,Nt=new WeakMap,me=new WeakMap,Re=new WeakMap,_e=new WeakMap,Ce=new WeakMap,it=new WeakMap,Pt=new WeakMap,bt=new WeakMap,gn=new WeakMap,Un=new WeakMap,zn=new WeakMap,at=new WeakMap,Ar=new WeakMap,re=new WeakSet,co=function(){try{T(this,Re,Ne(()=>u(this,Nt).call(this,u(this,Ie))))}catch(t){this.error(t)}},uo=function(t){const n=u(this,Le).failed;n&&T(this,Ce,Ne(()=>{n(u(this,Ie),()=>t,()=>()=>{})}))},fo=function(){const t=u(this,Le).pending;t&&(this.is_pending=!0,T(this,_e,Ne(()=>t(u(this,Ie)))),Et(()=>{var n=T(this,it,document.createDocumentFragment()),r=lt();n.append(r),T(this,Re,H(this,re,lr).call(this,()=>Ne(()=>u(this,Nt).call(this,r)))),u(this,bt)===0&&(u(this,Ie).before(n),T(this,it,null),Ht(u(this,_e),()=>{T(this,_e,null)}),H(this,re,or).call(this,L))}))},ns=function(){try{if(this.is_pending=this.has_pending_snippet(),T(this,bt,0),T(this,Pt,0),T(this,Re,Ne(()=>{u(this,Nt).call(this,u(this,Ie))})),u(this,bt)>0){var t=T(this,it,document.createDocumentFragment());xs(u(this,Re),t);const n=u(this,Le).pending;T(this,_e,Ne(()=>n(u(this,Ie))))}else H(this,re,or).call(this,L)}catch(n){this.error(n)}},or=function(t){this.is_pending=!1,t.transfer_effects(u(this,Un),u(this,zn))},lr=function(t){var n=B,r=F,s=ke;et(u(this,me)),Be(u(this,me)),yn(u(this,me).ctx);try{return zt.ensure(),t()}catch(i){return fi(i),null}finally{et(n),Be(r),yn(s)}},rs=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&H(r=this.parent,re,rs).call(r,t,n);return}T(this,bt,u(this,bt)+t),u(this,bt)===0&&(H(this,re,or).call(this,n),u(this,_e)&&Ht(u(this,_e),()=>{T(this,_e,null)}),u(this,it)&&(u(this,Ie).before(u(this,it)),T(this,it,null)))},ss=function(t){u(this,Re)&&(we(u(this,Re)),T(this,Re,null)),u(this,_e)&&(we(u(this,_e)),T(this,_e,null)),u(this,Ce)&&(we(u(this,Ce)),T(this,Ce,null));var n=u(this,Le).onerror;let r=u(this,Le).failed;var s=!1,i=!1;const a=()=>{if(s){Xa();return}s=!0,i&&Fa(),u(this,Ce)!==null&&Ht(u(this,Ce),()=>{T(this,Ce,null)}),H(this,re,lr).call(this,()=>{H(this,re,ns).call(this)})},o=l=>{try{i=!0,n?.(l,a),i=!1}catch(f){yt(f,u(this,me)&&u(this,me).parent)}r&&T(this,Ce,H(this,re,lr).call(this,()=>{try{return Ne(()=>{var f=B;f.b=this,f.f|=Vr,r(u(this,Ie),()=>l,()=>a)})}catch(f){return yt(f,u(this,me).parent),null}}))};Et(()=>{var l;try{l=this.transform_error(t)}catch(f){yt(f,u(this,me)&&u(this,me).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(o,f=>yt(f,u(this,me)&&u(this,me).parent)):o(l)})};function ho(e,t,n,r){const s=Hn;var i=e.filter(d=>!d.settled);if(n.length===0&&i.length===0){r(t.map(s));return}var a=B,o=_o(),l=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function f(d){if((a.f&De)===0){o();try{r(d)}catch(p){yt(p,a)}gr()}}var h=bi();if(n.length===0){l.then(()=>f(t.map(s))).finally(h);return}function c(){Promise.all(n.map(d=>po(d))).then(d=>f([...t.map(s),...d])).catch(d=>yt(d,a)).finally(h)}l?l.then(()=>{o(),c(),gr()}):c()}function _o(){var e=B,t=F,n=ke,r=L;return function(i=!0){et(e),Be(t),yn(n),i&&(e.f&De)===0&&(r?.activate(),r?.apply())}}function gr(e=!0){et(null),Be(null),yn(null),e&&L?.deactivate()}function bi(){var e=B,t=e.b,n=L,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function Hn(e){var t=fe|ue;return B!==null&&(B.f|=En),{ctx:ke,deps:null,effects:null,equals:oi,f:t,fn:e,reactions:null,rv:0,v:ae,wv:0,parent:B,ac:null}}const er=Symbol("obsolete");function po(e,t,n){let r=B;r===null&&Aa();var s=void 0,i=Gt(ae),a=!F,o=new Set;return To(()=>{var l=B,f=ri();s=f.promise;try{Promise.resolve(e()).then(f.resolve,p=>{p!==Ir&&f.reject(p)}).finally(gr)}catch(p){f.reject(p),gr()}var h=L;if(a){if((l.f&Yt)!==0)var c=bi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(er);else for(const p of o.values())p.reject(er);o.add(f),h.async_deriveds.set(l,f)}const d=(p,v=void 0)=>{c?.(),o.delete(f),v!==er&&(h.activate(),v?(i.f|=kt,wn(i,v)):((i.f&kt)!==0&&(i.f^=kt),wn(i,p)),h.deactivate())};f.promise.then(d,p=>d(null,p||"unknown"))}),ws(()=>{for(const l of o)l.reject(er)}),new Promise(l=>{function f(h){function c(){h===s?l(i):f(s)}h.then(c,c)}f(s)})}function le(e){const t=Hn(e);return Pi(t),t}function yi(e){const t=Hn(e);return t.equals=li,t}function vo(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!Ei&&bo()}return t}function bo(){Ei=!1;for(const e of mr){(e.f&oe)!==0&&ne(e,$e);let t;try{t=Jn(e)}catch{t=!0}t&&kn(e)}mr.clear()}function Nn(e){J(e,e.v+1)}function Si(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,i=0;i{if(qt===i)return o();var l=F,f=qt;Be(null),Ps(i);var h=o();return Be(l),Ps(f),h};return r&&n.set("length",ie(e.length)),new Proxy(e,{defineProperty(o,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Na();var h=n.get(l);return h===void 0?a(()=>{var c=ie(f.value);return n.set(l,c),c}):J(h,f.value,!0),!0},deleteProperty(o,l){var f=n.get(l);if(f===void 0){if(l in o){const h=a(()=>ie(ae));n.set(l,h),Nn(s)}}else J(f,ae),Nn(s);return!0},get(o,l,f){if(l===Bt)return e;var h=n.get(l),c=l in o;if(h===void 0&&(!c||cn(o,l)?.writable)&&(h=a(()=>{var p=wt(c?o[l]:ae),v=ie(p);return v}),n.set(l,h)),h!==void 0){var d=_(h);return d===ae?void 0:d}return Reflect.get(o,l,f)},getOwnPropertyDescriptor(o,l){var f=Reflect.getOwnPropertyDescriptor(o,l);if(f&&"value"in f){var h=n.get(l);h&&(f.value=_(h))}else if(f===void 0){var c=n.get(l),d=c?.v;if(c!==void 0&&d!==ae)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(o,l){if(l===Bt)return!0;var f=n.get(l),h=f!==void 0&&f.v!==ae||Reflect.has(o,l);if(f!==void 0||B!==null&&(!h||cn(o,l)?.writable)){f===void 0&&(f=a(()=>{var d=h?wt(o[l]):ae,p=ie(d);return p}),n.set(l,f));var c=_(f);if(c===ae)return!1}return h},set(o,l,f,h){var c=n.get(l),d=l in o;if(r&&l==="length")for(var p=f;pie(ae)),n.set(p+"",v))}if(c===void 0)(!d||cn(o,l)?.writable)&&(c=a(()=>ie(void 0)),J(c,wt(f)),n.set(l,c));else{d=c.v!==ae;var y=a(()=>wt(f));J(c,y)}var g=Reflect.getOwnPropertyDescriptor(o,l);if(g?.set&&g.set.call(h,f),!d){if(r&&typeof l=="string"){var m=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=m.v&&J(m,w+1)}Nn(s)}return!0},ownKeys(o){_(s);var l=Reflect.ownKeys(o).filter(c=>{var d=n.get(c);return d===void 0||d.v!==ae});for(var[f,h]of n)h.v!==ae&&!(f in o)&&l.push(f);return l},setPrototypeOf(){Pa()}})}function Ls(e){try{if(e!==null&&typeof e=="object"&&Bt in e)return e[Bt]}catch{}return e}function yo(e,t){return Object.is(Ls(e),Ls(t))}var br,Ci,xi,Ai;function wo(){if(br===void 0){br=window,Ci=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;xi=cn(t,"firstChild").get,Ai=cn(t,"nextSibling").get,Os(e)&&(e[Jr]=void 0,e[rr]=null,e[Xr]=void 0,e.__e=void 0),Os(n)&&(n[On]=void 0)}}function lt(e=""){return document.createTextNode(e)}function yr(e){return xi.call(e)}function Yn(e){return Ai.call(e)}function E(e,t){return yr(e)}function ct(e,t=!1){{var n=yr(e);return n instanceof Comment&&n.data===""?Yn(n):n}}function S(e,t=1,n=!1){let r=e;for(;t--;)r=Yn(r);return r}function ko(e){e.textContent=""}function Ti(){return!1}function Eo(e,t,n){return document.createElementNS(ai,e,void 0)}let Rs=!1;function So(){Rs||(Rs=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[sr]?.()})},{capture:!0}))}function Lr(e){var t=F,n=B;Be(null),et(null);try{return e()}finally{Be(t),et(n)}}function bs(e,t,n,r=n){e.addEventListener(t,()=>Lr(n));const s=e[sr];s?e[sr]=()=>{s(),r(!0)}:e[sr]=()=>r(!0),So()}function Co(e){B===null&&(F===null&&Ia(),Ma()),ut&&Oa()}function xo(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ft(e,t){var n=B;n!==null&&(n.f&pe)!==0&&(e|=pe);var r={ctx:ke,deps:null,nodes:null,f:e|ue|Pe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};L?.register_created_effect(r);var s=r;if((e&mn)!==0)on!==null?on.push(r):zt.ensure().schedule(r);else if(t!==null){try{kn(r)}catch(a){throw we(r),a}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&En)===0&&(s=s.first,(e&We)!==0&&(e&bn)!==0&&s!==null&&(s.f|=bn))}if(s!==null&&(s.parent=n,n!==null&&xo(s,n),F!==null&&(F.f&fe)!==0&&(e&St)===0)){var i=F;(i.effects??(i.effects=[])).push(s)}return r}function ys(){return F!==null&&!Ue}function ws(e){const t=ft(Mr,null);return ne(t,oe),t.teardown=e,t}function ks(e){Co();var t=B.f,n=!F&&(t&ze)!==0&&(t&Yt)===0;if(n){var r=ke;(r.e??(r.e=[])).push(e)}else return Oi(e)}function Oi(e){return ft(mn|Ea,e)}function Ao(e){zt.ensure();const t=ft(St|En,e);return(n={})=>new Promise(r=>{n.outro?Ht(t,()=>{we(t),r(void 0)}):(we(t),r(void 0))})}function Mi(e){return ft(mn,e)}function To(e){return ft(un|En,e)}function Rr(e,t=0){return ft(Mr|t,e)}function Y(e,t=[],n=[],r=[]){ho(r,t,n,s=>{ft(Mr,()=>e(...s.map(_)))})}function Es(e,t=0){var n=ft(We|t,e);return n}function Ne(e){return ft(ze|En,e)}function Ii(e){var t=e.teardown;if(t!==null){const n=ut,r=F;Ns(!0),Be(null);try{t.call(null)}finally{Ns(n),Be(r)}}}function Ss(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Lr(()=>{s.abort(Ir)});var r=n.next;(n.f&St)!==0?n.parent=null:we(n,t),n=r}}function Oo(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ze)===0&&we(t),t=n}}function we(e,t=!0){var n=!1;(t||(e.f&ka)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Mo(e.nodes.start,e.nodes.end),n=!0),ne(e,Yr),Ss(e,t&&!n),qn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Ii(e),e.f^=Yr,e.f|=De;var s=e.parent;s!==null&&s.first!==null&&Li(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Mo(e,t){for(;e!==null;){var n=e===t?null:Yn(e);e.remove(),e=n}}function Li(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ht(e,t,n=!0){var r=[];Ri(e,r,!0);var s=()=>{n&&we(e),t&&t()},i=r.length;if(i>0){var a=()=>--i||s();for(var o of r)o.out(a)}else s()}function Ri(e,t,n){if((e.f&pe)===0){e.f^=pe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var i=s.next;if((s.f&St)===0){var a=(s.f&bn)!==0||(s.f&ze)!==0&&(e.f&We)!==0;Ri(s,t,a?n:!1)}s=i}}}function Cs(e){Ni(e,!0)}function Ni(e,t){if((e.f&pe)!==0){e.f^=pe,(e.f&oe)===0&&(ne(e,ue),zt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&bn)!==0||(n.f&ze)!==0;Ni(n,s?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||t)&&a.in()}}function xs(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Yn(n);t.append(n),n=s}}let cr=!1,ut=!1;function Ns(e){ut=e}let F=null,Ue=!1;function Be(e){F=e}let B=null;function et(e){B=e}let Fe=null;function Pi(e){F!==null&&(Fe===null?Fe=[e]:Fe.push(e))}let be=null,Ee=0,Me=null;function Io(e){Me=e}let Di=1,Ot=0,qt=Ot;function Ps(e){qt=e}function Fi(){return++Di}function Jn(e){var t=e.f;if((t&ue)!==0)return!0;if(t&fe&&(e.f&=~Ut),(t&$e)!==0){for(var n=e.deps,r=n.length,s=0;se.wv)return!0}(t&Pe)!==0&&Ke===null&&ne(e,oe)}return!1}function Bi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Fe!==null&&Ft.call(Fe,e)))for(var s=0;s{e.ac.abort(Ir)}),e.ac=null);try{e.f|=vr;var h=e.fn,c=h();e.f|=Yt;var d=e.deps,p=L?.is_fork;if(be!==null){var v;if(p||qn(e,Ee),d!==null&&Ee>0)for(d.length=Ee+be.length,v=0;vn?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Et(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ki(e,t,n,r,s){var i={capture:r,passive:s},a=Do(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ws(()=>{t.removeEventListener(e,a,i)})}function Ae(e,t,n){(t[Mt]??(t[Mt]={}))[e]=n}function Zt(e){for(var t=0;t{throw g});throw d}}finally{e[Mt]=t,delete e.currentTarget,Be(h),et(c)}}}const Fo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Bo(e){return Fo?.createHTML(e)??e}function jo(e){var t=Eo("template");return t.innerHTML=Bo(e.replaceAll("","")),t.content}function wr(e,t){var n=B;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function P(e,t){var n=(t&Ga)!==0,r=(t&Va)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=jo(i?e:""+e),n||(s=yr(s)));var a=r||Ci?document.importNode(s,!0):s.cloneNode(!0);if(n){var o=yr(a),l=a.lastChild;wr(o,l)}else wr(a,a);return a}}function Ho(e=""){{var t=lt(e+"");return wr(t,t),t}}function qo(){var e=document.createDocumentFragment(),t=document.createComment(""),n=lt();return e.append(t,n),wr(t,n),e}function R(e,t){e!==null&&e.before(t)}function Z(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[On]??(e[On]=e.nodeValue))&&(e[On]=n,e.nodeValue=`${n}`)}function As(e,t){return Wo(e,t)}const tr=new Map;function Wo(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:a=!0,transformError:o}){wo();var l=void 0,f=Ao(()=>{var h=n??t.appendChild(lt());oo(h,{pending:()=>{}},p=>{Jt({});var v=ke;i&&(v.c=i),s&&(r.$$events=s),l=e(p,r)||{},Xt()},o);var c=new Set,d=p=>{for(var v=0;v{for(var p of c)for(const g of[t,document]){var v=tr.get(g),y=v.get(p);--y==0?(g.removeEventListener(p,as),v.delete(p),v.size===0&&tr.delete(g)):v.set(p,y)}is.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return os.set(l,f),l}let os=new WeakMap;function Xn(e,t){const n=os.get(e);return n?(os.delete(e),n(t)):Promise.resolve()}var qe,Xe,xe,Dt,Gn,Vn,Tr;class Ko{constructor(t,n=!0){ge(this,"anchor");O(this,qe,new Map);O(this,Xe,new Map);O(this,xe,new Map);O(this,Dt,new Set);O(this,Gn,!0);O(this,Vn,t=>{if(u(this,qe).has(t)){var n=u(this,qe).get(t),r=u(this,Xe).get(n);if(r)Cs(r),u(this,Dt).delete(n);else{var s=u(this,xe).get(n);s&&(u(this,Xe).set(n,s.effect),u(this,xe).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,a]of u(this,qe)){if(u(this,qe).delete(i),i===t)break;const o=u(this,xe).get(a);o&&(we(o.effect),u(this,xe).delete(a))}for(const[i,a]of u(this,Xe)){if(i===n||u(this,Dt).has(i))continue;const o=()=>{if(Array.from(u(this,qe).values()).includes(i)){var f=document.createDocumentFragment();xs(a,f),f.append(lt()),u(this,xe).set(i,{effect:a,fragment:f})}else we(a);u(this,Dt).delete(i),u(this,Xe).delete(i)};u(this,Gn)||!r?(u(this,Dt).add(i),Ht(a,o,!1)):o()}}});O(this,Tr,t=>{u(this,qe).delete(t);const n=Array.from(u(this,qe).values());for(const[r,s]of u(this,xe))n.includes(r)||(we(s.effect),u(this,xe).delete(r))});this.anchor=t,T(this,Gn,n)}ensure(t,n){var r=L,s=Ti();if(n&&!u(this,Xe).has(t)&&!u(this,xe).has(t))if(s){var i=document.createDocumentFragment(),a=lt();i.append(a),u(this,xe).set(t,{effect:Ne(()=>n(a)),fragment:i})}else u(this,Xe).set(t,Ne(()=>n(this.anchor)));if(u(this,qe).set(r,t),s){for(const[o,l]of u(this,Xe))o===t?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of u(this,xe))o===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(u(this,Vn)),r.ondiscard(u(this,Tr))}else u(this,Vn).call(this,r)}}qe=new WeakMap,Xe=new WeakMap,xe=new WeakMap,Dt=new WeakMap,Gn=new WeakMap,Vn=new WeakMap,Tr=new WeakMap;function $(e,t,n=!1){var r=new Ko(e),s=n?bn:0;function i(a,o){r.ensure(a,o)}Es(()=>{var a=!1;t((o,l=0)=>{a=!0,i(l,o)}),a||i(-1,null)},s)}function Uo(e,t){return t}function zo(e,t,n){for(var r=[],s=t.length,i,a=t.length,o=0;o{if(i){if(i.pending.delete(c),i.done.add(c),i.pending.size===0){var d=e.outrogroups;ls(e,Or(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=r.length===0&&n!==null;if(l){var f=n,h=f.parentNode;ko(h),h.append(f),e.items.clear()}ls(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function ls(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const a of e.pending.values())for(const o of a)r.add(e.items.get(o).e)}for(var s=0;s{var A=n();return _s(A)?A:A==null?[]:Or(A)}),d,p=new Map,v=!0;function y(A){(w.effect.f&De)===0&&(w.pending.delete(A),w.fallback=h,Go(w,d,a,t,r),h!==null&&(d.length===0?(h.f&Ze)===0?Cs(h):(h.f^=Ze,In(h,null,a)):Ht(h,()=>{h=null})))}function g(A){w.pending.delete(A)}var m=Es(()=>{d=_(c);for(var A=d.length,M=new Set,U=L,se=Ti(),Q=0;Qi(a)):(h=Ne(()=>i(Fs??(Fs=lt()))),h.f|=Ze)),A>M.size&&Ta(),!v)if(p.set(U,M),se){for(const[tt,Oe]of o)M.has(tt)||U.skip_effect(Oe.e);U.oncommit(y),U.ondiscard(g)}else y(U);_(c)}),w={effect:m,items:o,pending:p,outrogroups:null,fallback:h};v=!1}function Tn(e){for(;e!==null&&(e.f&ze)===0;)e=e.next;return e}function Go(e,t,n,r,s){var i=(r&Ha)!==0,a=t.length,o=e.items,l=Tn(e.effect.first),f,h=null,c,d=[],p=[],v,y,g,m;if(i)for(m=0;m0){var he=(r&ii)!==0&&a===0?n:null;if(i){for(m=0;m{if(c!==void 0)for(g of c)g.nodes?.a?.apply()})}function Vo(e,t,n,r,s,i,a,o){var l=(a&Ba)!==0?(a&qa)===0?mo(n,!1,!1):Gt(n):null,f=(a&ja)!==0?Gt(s):null;return{v:l,i:f,e:Ne(()=>(i(t,l??n,f??s,o),()=>{e.delete(r)}))}}function In(e,t,n){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end,i=t&&(t.f&Ze)===0?t.nodes.start:n;r!==null;){var a=Yn(r);if(i.before(r),r===s)return;r=a}}function pt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const Bs=[...` +\r\f \v\uFEFF`];function Yo(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var s of Object.keys(n))if(n[s])r=r?r+" "+s:s;else if(r.length)for(var i=s.length,a=0;(a=r.indexOf(s,a))>=0;){var o=a+i;(a===0||Bs.includes(r[a-1]))&&(o===r.length||Bs.includes(r[o]))?r=(a===0?"":r.substring(0,a))+r.substring(o+1):a=o}}return r===""?null:r}function Jo(e,t){return e==null?null:String(e)}function Vt(e,t,n,r,s,i){var a=e[Jr];if(a!==n||a===void 0){var o=Yo(n,r,i);o==null?e.removeAttribute("class"):e.className=o,e[Jr]=n}else if(i&&s!==i)for(var l in i){var f=!!i[l];(s==null||f!==!!s[l])&&e.classList.toggle(l,f)}return i}function Ui(e,t,n,r){var s=e[Xr];if(s!==t){var i=Jo(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e[Xr]=t}return r}function zi(e,t,n=!1){if(e.multiple){if(t==null)return;if(!_s(t))return Ja();for(var r of e.options)r.selected=t.includes(Pn(r));return}for(r of e.options){var s=Pn(r);if(yo(s,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Xo(e){var t=new MutationObserver(()=>{zi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ws(()=>{t.disconnect()})}function Zo(e,t,n=t){var r=new WeakSet,s=!0;bs(e,"change",i=>{var a=i?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Pn);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Pn(l)}n(o),e.__value=o,L!==null&&r.add(L)}),Mi(()=>{var i=t();if(e===document.activeElement){var a=L;if(r.has(a))return}if(zi(e,i,s),s&&i===void 0){var o=e.querySelector(":checked");o!==null&&(i=Pn(o),n(i))}e.__value=i,s=!1}),Xo(e)}function Pn(e){return"__value"in e?e.__value:e.value}const Qo=Symbol("is custom element"),$o=Symbol("is html");function ye(e,t,n,r){var s=el(e);s[t]!==(s[t]=n)&&(t==="loading"&&(e[Ca]=n),n==null?e.removeAttribute(t):typeof n!="string"&&tl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function el(e){return e[rr]??(e[rr]={[Qo]:e.nodeName.includes("-"),[$o]:e.namespaceURI===ai})}var js=new Map;function tl(e){var t=e.getAttribute("is")||e.nodeName,n=js.get(t);if(n)return n;js.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=ga(s);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.push(a);s=ni(s)}return n}function cs(e,t,n=t){var r=new WeakSet;bs(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=qr(e)?Wr(i):i,n(i),L!==null&&r.add(L),await Ro(),i!==(i=t())){var a=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=i??"",o!==null){var f=e.value.length;a===o&&o===l&&f>l?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=a,e.selectionEnd=Math.min(o,f))}}}),Sn(t)==null&&e.value&&(n(qr(e)?Wr(e.value):e.value),L!==null&&r.add(L)),Rr(()=>{var s=t();if(e===document.activeElement){var i=L;if(r.has(i))return}qr(e)&&s===Wr(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Gi(e,t,n=t){bs(e,"change",r=>{var s=r?e.defaultChecked:e.checked;n(s)}),Sn(t)==null&&n(e.checked),Rr(()=>{var r=t();e.checked=!!r})}function qr(e){var t=e.type;return t==="number"||t==="range"}function Wr(e){return e===""?null:+e}function Kr(e,t){return e===t||e?.[Bt]===t}function nl(e={},t,n,r){var s=ke.r,i=B;return Mi(()=>{var a,o;return Rr(()=>{a=o,o=[],Sn(()=>{Kr(n(...o),e)||(t(e,...o),a&&Kr(n(...a),e)&&t(null,...a))})}),()=>{let l=i;for(;l!==s&&l.parent!==null&&l.parent.f&Yr;)l=l.parent;const f=()=>{o&&Kr(n(...o),e)&&t(null,...o)},h=l.teardown;l.teardown=()=>{f(),h?.()}}}),e}function Dn(e,t,n,r){var s=!0,i=(n&Ua)!==0,a=(n&za)!==0,o=r,l=!0,f=void 0,h=()=>a&&s?(f??(f=Hn(r)),_(f)):(l&&(l=!1,o=a?Sn(r):r),o);let c;if(i){var d=Bt in e||Sa in e;c=cn(e,t)?.set??(d&&t in e?M=>e[t]=M:void 0)}var p,v=!1;i?[p,v]=eo(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=h(),c&&(Ra(),c(p)));var y;if(y=()=>{var M=e[t];return M===void 0?h():(l=!0,M)},(n&Ka)===0)return y;if(c){var g=e.$$legacy;return(function(M,U){return arguments.length>0?((!U||g||v)&&c(U?y():M),M):y()})}var m=!1,w=((n&Wa)!==0?Hn:yi)(()=>(m=!1,y()));i&&_(w);var A=B;return(function(M,U){if(arguments.length>0){const se=U?_(w):i?wt(M):M;return J(w,se),m=!0,o!==void 0&&(o=se),M}return ut&&m||(A.f&De)!==0?w.v:_(w)})}function Vi(e){ke===null&&xa(),ks(()=>{const t=Sn(e);if(typeof t=="function")return t})}const Yi="[data-v-app]",rl=["header","content","footer"];let ce=null,He=null;function sl(e){const t=e instanceof Set?e:new Set(e||[]);for(let n=0;n<16;n++){const r=crypto.randomUUID().replace(/-/g,"").slice(0,8);if(!t.has(r))return r}throw new Error("rebemer: id collision exhausted")}function il(){if(typeof document>"u")return!1;const t=document.querySelector(Yi)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(ce=null,!1):(ce=t,He=null,!0)}function al(){if(He!==null)return He;const e=typeof document<"u"?document.querySelector(Yi)?.__vue_app__:null;if(!e)return He=!1,!1;const t=e.config?.globalProperties??{};if(typeof ce?.$history?.pause=="function"&&typeof ce?.$history?.resume=="function")return He={pause:()=>ce.$history.pause(),resume:()=>ce.$history.resume()},He;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(He={pause:()=>n.history.pause(),resume:()=>n.history.resume()},He):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(He={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},He):(He=!1,!1)}function Ji(e){const t=al();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function Qe(e){if(!ce||!e)return null;for(const t of rl){const n=ce[t];if(!Array.isArray(n))continue;const r=n.find(s=>s&&s.id===e);if(r)return r}return null}function ol(e){const t=Qe(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return Xi(t,1,n),n}function Xi(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const s=Qe(r);s&&(n.push({id:s.id,depth:t,label:s.label,name:s.name,settings:s.settings}),Xi(s,t+1,n))}}function Zi(){return ce?ce.globalClasses:[]}function Ur(e,t){if(!ce)throw new Error("rebemer: not ready");const n=ce.globalClasses,r=n.find(a=>a&&a.name===e);if(r)return r.id;const s=new Set(n.map(a=>a?.id).filter(Boolean)),i=sl(s);return n.push({id:i,name:e,settings:t||{}}),i}function Hs(e,t){const n=Qe(e);if(!n)return;n.settings||(n.settings={});const r=Array.isArray(t)?t:[];Array.isArray(n.settings._cssGlobalClasses)?n.settings._cssGlobalClasses.splice(0,n.settings._cssGlobalClasses.length,...r):n.settings._cssGlobalClasses=[...r]}function qs(e,t){const n=Qe(e);n&&(n.label=t)}function ll(){if(ce){const e=[ce.activeElement,ce.activeElementId,ce.activeId,ce.selectedElement];for(const t of e){if(t&&typeof t=="object"&&typeof t.id=="string"&&t.id)return t.id;if(typeof t=="string"&&t)return t}}if(typeof document<"u"){const t=document.querySelector("#bricks-structure li[data-id].active, #bricks-structure li[data-id].is-active")?.getAttribute("data-id");if(t)return t}return null}const cl={text:["_typography","color"],background:["_background","color"],border:["_border","color"]};function ul(e,t,n){const r=cl[t];if(!r)return!1;const s=Qe(e);if(!s)return!1;(!s.settings||typeof s.settings!="object")&&(s.settings={});const[i,a]=r;return(!s.settings[i]||typeof s.settings[i]!="object")&&(s.settings[i]={}),s.settings[i][a]={raw:n},!0}function fl(e){const t=Qe(e);return t&&typeof t.label=="string"?t.label:""}const kr="slashed-rebemer-host",dl="slashed-class-hint",Qi=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],hl=3;function _l(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n[0]==="."&&(n=n.slice(1)),!n.startsWith("sf-")&&!n.startsWith("is-"))||!Object.prototype.hasOwnProperty.call(t,n))return null;const r=t[n];return!r||typeof r.description!="string"?null:{name:n,description:r.description,category:r.category}}let us=!1,Er={},ot=null,Fn=null,Te=null;function pl(){if(ot&&ot.isConnected)return ot;let e=document.getElementById(kr);e||(e=document.createElement("div"),e.id=kr,document.body.appendChild(e));const t=document.createElement("div");return t.id=dl,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

      ',e.appendChild(t),ot=t,t}function $i(e){let t=e;for(let n=0;t&&no&&n.top-i-s>=0&&(l=n.top-i-s);let f=n.left;f+r>a-4&&(f=Math.max(4,a-4-r)),f<4&&(f=4),e.style.top=`${Math.round(l)}px`,e.style.left=`${Math.round(f)}px`}function ea(e,t){const n=pl();n.querySelector(".rebemer-class-hint__name").textContent=`.${t.name}`;const r=n.querySelector(".rebemer-class-hint__cat");r.textContent=t.category||"",r.hidden=!t.category,n.querySelector(".rebemer-class-hint__desc").textContent=t.description,n.hidden=!1,vl(n,e),Te=e}function Ct(){ot&&(ot.hidden=!0),Te=null}function gl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${kr}`))return;if(!t.closest(Qi.join(","))){Te&&Ct();return}const n=$i(t);if(!n){Te&&Ct();return}n.el!==Te&&ea(n.el,n.hint)}function ml(e){if(!Te)return;const t=e.relatedTarget;t instanceof Node&&Te.contains(t)||Ct()}function bl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${kr}`))return;if(!t.closest(Qi.join(","))){Te&&Ct();return}const n=$i(t);if(!n){Te&&Ct();return}n.el!==Te&&ea(n.el,n.hint)}function yl(e){if(!Te)return;const t=e.relatedTarget;t instanceof Node&&Te.contains(t)||Ct()}function wl(e){e.key==="Escape"&&Ct()}function kl(e,t,n={}){if(ur(),us=!!e,Er=t&&typeof t=="object"?t:{},!us||Object.keys(Er).length===0)return;Fn=new AbortController;const{signal:r}=Fn,s={passive:!0,signal:r};document.addEventListener("mouseover",gl,s),document.addEventListener("mouseout",ml,s),document.addEventListener("focusin",bl,s),document.addEventListener("focusout",yl,s),document.addEventListener("keydown",wl,s),window.addEventListener("scroll",Ct,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?ur():n.signal.addEventListener("abort",ur,{once:!0}))}function ur(){Fn&&(Fn.abort(),Fn=null),ot&&(ot.remove(),ot=null),Te=null,us=!1,Er={}}const fr="li.variable-picker-item",dr="slashed-var-swatch",El=50,Sl=(e,...t)=>console[e]("[slashed-swatches]",...t);function Cl(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n.slice(0,2)!=="--"&&(n="--"+n.replace(/^-+/,"")),n.indexOf("--sf-color-")!==0))return null;const r=t[n];return typeof r=="string"&&r?r:null}let fs=!1,Sr={},Bn=null,fn=null,hr=null;function xl(e){const t=e.querySelector(":scope > span[title]")||e.querySelector(":scope > span");if(t){const n=t.getAttribute("title");return n&&n.trim()?n.trim():(t.textContent||"").trim()}return(e.textContent||"").trim()}function Al(e){if(e.classList.contains("title")||e.classList.contains("category")){const r=e.querySelector(":scope > ."+dr);r&&r.remove();return}const t=Cl(xl(e),Sr);let n=e.querySelector(":scope > ."+dr);if(!t){n&&n.remove();return}n||(n=document.createElement("span"),n.className=dr,n.setAttribute("aria-hidden","true"),e.insertBefore(n,e.firstChild)),n.dataset.color!==t&&(n.style.setProperty("--slashed-swatch-color",t),n.dataset.color=t)}function ta(){try{const e=document.querySelectorAll(fr);for(const t of e)Al(t)}catch(e){Sl("warn","swatch pass failed",e)}}function Tl(){fn===null&&(fn=setTimeout(()=>{fn=null,ta()},El))}function Ol(e){for(const t of e){const n=t.target;if(n&&n.nodeType===1&&n.closest&&n.closest(fr))return!0;for(const r of t.addedNodes)if(r.nodeType===1&&(r.matches&&r.matches(fr)||r.querySelector&&r.querySelector(fr)))return!0}return!1}function Ml(e,t,n={}){_r(),fs=!!e,Sr=t&&typeof t=="object"?t:{},!(!fs||Object.keys(Sr).length===0)&&(hr=new AbortController,Bn=new MutationObserver(r=>{Ol(r)&&Tl()}),Bn.observe(document.body,{childList:!0,subtree:!0}),ta(),n.signal&&(n.signal.aborted?_r():n.signal.addEventListener("abort",_r,{once:!0})))}function _r(){fn!==null&&(clearTimeout(fn),fn=null),Bn&&(Bn.disconnect(),Bn=null),hr&&(hr.abort(),hr=null);try{document.querySelectorAll("."+dr).forEach(e=>e.remove())}catch{}fs=!1,Sr={}}const Il="5";var ti;typeof window<"u"&&((ti=window.__svelte??(window.__svelte={})).v??(ti.v=new Set)).add(Il);var Ll=P('reBEM');function Rl(e,t){Jt(t,!0);function n(s){s.stopPropagation(),s.preventDefault(),t.onActivate?.(t.elementId)}var r=Ll();Y(()=>{ye(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),ye(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),Ae("click",r,n),Ae("keydown",r,s=>(s.key==="Enter"||s.key===" ")&&n(s)),R(e,r),Xt()}Zt(["click","keydown"]);function Wt(e){return e?String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x00-\x7f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}const Nl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Pl=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function Dl(e){return e?Pl.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:Nl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const Nr=new Set(["_padding","_padding_top","_padding_right","_padding_bottom","_padding_left","_margin","_margin_top","_margin_right","_margin_bottom","_margin_left","_width","_widthMin","_widthMax","_minWidth","_maxWidth","_height","_heightMin","_heightMax","_minHeight","_maxHeight","_aspectRatio","_overflow","_overflowX","_overflowY","_color","_background","_backgroundColor","_backgroundImage","_backgroundSize","_backgroundPosition","_backgroundRepeat","_backgroundAttachment","_backgroundBlendMode","_typography","_fontFamily","_fontSize","_fontWeight","_fontStyle","_lineHeight","_letterSpacing","_wordSpacing","_textAlign","_textTransform","_textDecoration","_textDecorationColor","_textShadow","_textIndent","_whiteSpace","_listStyleType","_listStylePosition","_border","_borderRadius","_borderColor","_borderStyle","_borderWidth","_outline","_outlineColor","_outlineStyle","_outlineWidth","_outlineOffset","_boxShadow","_filter","_backdropFilter","_opacity","_blendMode","_transform","_transformOrigin","_transition","_animation","_display","_flexDirection","_flexWrap","_flexGrow","_flexShrink","_flexBasis","_alignItems","_alignSelf","_alignContent","_justifyContent","_justifyItems","_justifySelf","_gap","_rowGap","_columnGap","_gridTemplateColumns","_gridTemplateRows","_gridGap","_gridAutoFlow","_gridAutoColumns","_gridAutoRows","_gridColumn","_gridRow","_gridArea","_position","_top","_right","_bottom","_left","_zIndex","_objectFit","_objectPosition","_cursor","_pointerEvents","_userSelect"]);function Fl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Nr.has(n)&&t.push(n);return t.sort(),t}const Bl=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function jl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Nr.has(n)||Bl.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Hl=new Set(["add","rename","replace","modifier","migrate"]),Ws=new Set(["user","label"]);function na({rootId:e,rows:t,mode:n}){if(!Hl.has(n))return{ok:!1,ops:[],error:`Invalid mode: ${n}`};const r=t.find(o=>o.id===e);if(!r)return{ok:!1,ops:[],error:"Root row missing."};const s=Wt(r.name);if(!s)return{ok:!1,ops:[],error:"Block name is empty."};const i=[];for(const o of t){if(!o.include)continue;const l=o.id===e;let f;if(l)f=s;else{const c=Wt(o.name);if(!c)continue;f=`${s}__${c}`}let h=f;if(n==="modifier"){const c=Wt(o.modifier);if(!c)continue;h=`${f}--${c}`}i.push({row:o,isRoot:l,finalClass:h,suggestedFrom:o.suggestedFrom||"fallback"})}if(i.length===0)return{ok:!1,ops:[],error:"No rows to apply. Include at least one row."};const a=Kl(i,n);return a.ok?{ok:!0,ops:i}:{ok:!1,ops:[],error:a.error}}function ql({rootId:e,rows:t,mode:n,syncLabels:r}){const s=na({rootId:e,rows:t,mode:n});if(!s.ok)return{ok:!1,error:s.error};const i=s.ops,a=t.find(c=>c.id===e),o=Wt(a?.name??""),l=Zi();if(n==="migrate"){const c=Wl(i,l);if(!c.ok)return c}const f=new Map;for(const c of i){const d=Qe(c.row.id);if(!d)continue;const p={classIds:Ks(d.settings).slice(),label:r&&n!=="modifier"?d.label??"":null};if(n==="migrate"&&Array.isArray(c.row.migrateKeys)){const v={};for(const y of c.row.migrateKeys)Object.prototype.hasOwnProperty.call(d.settings||{},y)&&(v[y]=JSON.parse(JSON.stringify(d.settings[y])));p.migrateKeys=v}f.set(c.row.id,p)}let h=0;try{Ji(()=>{for(const c of i){const d=Qe(c.row.id);if(!d)continue;const p=Ks(d.settings);let v={};if(n==="rename"&&p.length>0){const m=l.find(w=>w&&w.id===p[0]);m&&m.settings&&(v=JSON.parse(JSON.stringify(m.settings)))}else n==="migrate"&&(v=ra(d.settings,c.row.migrateKeys));if(n==="migrate"){const m=l.find(w=>w&&w.name===c.finalClass);if(m){(!m.settings||typeof m.settings!="object")&&(m.settings={});for(const[w,A]of Object.entries(v))Object.prototype.hasOwnProperty.call(m.settings,w)||(m.settings[w]=A)}}const y=Ur(c.finalClass,v);let g;switch(n){case"add":case"migrate":g=p.includes(y)?p:[...p,y];break;case"modifier":{const m=c.finalClass.indexOf("--"),w=m>=0?c.finalClass.slice(0,m):null;let A=[...p];if(w){const M=Ur(w,{});A.includes(M)||A.push(M)}g=A.includes(y)?A:[...A,y];break}case"rename":{const m=[y],w=p.length>0?l.find(A=>A&&A.id===p[0]):null;if(w){const A=w.name+"--";for(let M=1;Mse&&se.id===p[M]);if(U)if(U.name.startsWith(A)){const se=U.name.slice(w.name.length),Q=U.settings?JSON.parse(JSON.stringify(U.settings)):{};m.push(Ur(c.finalClass+se,Q))}else m.push(p[M])}}g=m;break}case"replace":g=[y];break}if(Hs(c.row.id,g),n==="migrate"&&Ul(d.settings,c.row.migrateKeys),r&&n!=="modifier"){const m=zl(c.finalClass,o);m&&qs(c.row.id,m)}h++}})}catch(c){for(const[p,v]of f)try{if(Hs(p,v.classIds),v.migrateKeys){const y=Qe(p);y&&y.settings&&Object.assign(y.settings,v.migrateKeys)}v.label!==null&&qs(p,v.label)}catch{}const d=c instanceof Error?c.message:String(c);return console.warn("[reBEMer] apply failed after",h,"mutation(s), rolled back:",d),{ok:!1,error:`Operation failed and was rolled back: ${d}`}}return h===0?{ok:!1,error:"No elements were modified. The subtree may have changed."}:{ok:!0,count:h}}function Wl(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const s=Qe(n.row.id);if(!s)continue;const i=ra(s.settings,n.row.migrateKeys),a=r.settings&&typeof r.settings=="object"?r.settings:{},o=[];for(const[l,f]of Object.entries(i))Object.prototype.hasOwnProperty.call(a,l)&&JSON.stringify(a[l])!==JSON.stringify(f)&&o.push(l.replace(/^_/,""));if(o.length>0){const l=o.join(", ");return{ok:!1,error:`Migrate blocked: existing class "${n.finalClass}" has conflicting values for ${l}. Pick a different name or use Add mode.`}}}return{ok:!0}}function Kl(e,t){const n=new Map;for(const r of e){const s=n.get(r.finalClass)||[];s.push(r),n.set(r.finalClass,s)}for(const[r,s]of n){if(s.length===1||t==="modifier")continue;const i=s.filter(o=>Ws.has(o.suggestedFrom));if(i.length>1)return{ok:!1,error:`"${r}" is used by ${i.length} rows. Edit one to make it unique.`};let a=1;for(const o of s)Ws.has(o.suggestedFrom)||(o.finalClass=`${r}-${a++}`,o.suggestedFrom="auto-number")}if(t!=="modifier"){const r=new Map;for(const s of e){const i=r.get(s.finalClass);if(i)return{ok:!1,error:`"${s.finalClass}" is produced by 2 rows after auto-numbering (one ${i}, one ${s.suggestedFrom}). Pick a different name for one of them.`};r.set(s.finalClass,s.suggestedFrom)}}return{ok:!0}}function ra(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)Nr.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Ul(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)Nr.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function Ks(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function zl(e,t){let n=e;return n===t?Us(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),Us(n.replace(/-/g," ")))}function Us(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const Gl=Object.freeze({heading:"heading","text-basic":"text",text:"text","text-link":"link",code:"code",image:"image",icon:"icon","icon-box":"icon",video:"video",audio:"audio",svg:"svg",logo:"logo",shape:"shape",button:"button","button-group":"buttons","nav-nested":"nav","nav-menu":"nav",list:"list",accordion:"accordion",tabs:"tabs",slider:"slider",carousel:"carousel",countdown:"countdown",counter:"counter",testimonials:"testimonials",pricing:"pricing",team:"team",form:"form",posts:"posts",template:"item"}),sa=new Set(["section","container","block","div"]);function Vl(e,t="item"){return!e||typeof e!="string"||sa.has(e)?t:Gl[e]||t}function zr(e){return typeof e=="string"&&sa.has(e)}const Yl=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function Jl(e,t,n){const r=new Set(e.filter(Boolean)),s=(...p)=>p.some(v=>r.has(v)),i=s("button","button-group"),a=s("heading"),o=s("text-basic","text"),l=s("image"),f=s("nav-nested","nav-menu"),h=s("form"),c=s("icon","icon-box"),d=s("list");return h?"form":f?"nav":i&&!a&&!o?"actions":l&&!o&&!a&&!i?"media":a&&!o&&!i?"header":o&&!a&&!i?"body":a&&o?"content":a&&i?"header":c&&!o&&!a?"icon-group":d?"list-wrap":n>1?t===0?"header":t===n-1?"footer":"body":"content"}var Xl=P('suggested'),Zl=P(' '),Ql=P(''),$l=P('

      Enter a modifier name — the base class will be added automatically if absent.

      '),ec=P('

      This element has no existing classes. Rename will create a new class instead.

      '),tc=P('

      '),nc=P(`A class named already exists. On Apply, missing style keys will be merged into it. Conflicting - values block the migration — pick a different name or use Add.`,1),Xl=F(`A class named already exists + values block the migration — pick a different name or use Add.`,1),rc=P(`A class named already exists globally. Apply will attach the existing class instead of - creating a duplicate.`,1),Zl=F('

      '),Ql=F(' '),$l=F('Migrate: ',1),ec=F('No migratable keys on this element.'),tc=F(' '),nc=F('
      '),rc=F('
      ');function sc(e,t){Yt(t,!0);let n=Nn(t,"row",15),r=Nn(t,"globalClasses",19,()=>[]),s=Nn(t,"finalClassName",3,"");const i=ce(()=>t.mode==="modifier"),o=ce(()=>t.mode==="migrate"),a=ce(()=>t.mode==="rename"),l=ce(()=>!t.isRoot&&t.blockName?`${t.blockName}__`:""),f=ce(()=>n().suggestedFrom==="element-type"||n().suggestedFrom==="fallback"),h=ce(()=>!s()||!Array.isArray(r())||!n().include?null:r().find(b=>b&&b.name===s())||null);function u(){n().suggestedFrom!=="user"&&n(n().suggestedFrom="user",!0)}function d(b){return b.startsWith("_")?b.slice(1):b}var p=rc();let v;var y=E(p),g=E(y),m=k(y,2),S=E(m),x=E(S),M=k(S,2),W=E(M),re=k(M,2);{var J=b=>{var R=Wl();Y(()=>ke(R,"title",`Pre-filled from ${n().suggestedFrom==="element-type"?"Bricks element type":"fallback"}`)),N(b,R)};se(re,b=>{_(f)&&n().include&&b(J)})}var he=k(m,2),_e=E(he),U=E(_e);{var nt=b=>{var R=Ul(),$=E(R);Y(()=>Q($,_(l))),N(b,R)};se(U,b=>{_(l)&&b(nt)})}var Le=k(U,2),dt=k(_e,2);{var Ct=b=>{var R=zl();Y(()=>R.disabled=!n().include),Oe("input",R,u),ss(R,()=>n().modifier,$=>n(n().modifier=$,!0)),N(b,R)};se(dt,b=>{_(i)&&b(Ct)})}var Zt=k(he,2);{var Qt=b=>{var R=Gl();N(b,R)};se(Zt,b=>{_(i)&&n().include&&!n().modifier&&b(Qt)})}var At=k(Zt,2);{var En=b=>{var R=Vl();N(b,R)},$t=b=>{var R=Yl(),$=E(R);Y(()=>Q($,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),N(b,R)};se(At,b=>{_(a)&&n().include&&n().currentClassCount===0?b(En):_(a)&&n().include&&n().currentClassCount>1&&b($t,1)})}var en=k(At,2);{var tn=b=>{var R=Zl(),$=E(R);{var C=L=>{var G=Jl(),j=k(ct(G)),X=E(j);Y(()=>Q(X,s())),N(L,G)},z=L=>{var G=Xl(),j=k(ct(G)),X=E(j);Y(()=>Q(X,s())),N(L,G)};se($,L=>{_(o)?L(C):L(z,-1)})}N(b,R)};se(en,b=>{_(h)&&b(tn)})}var w=k(en,2);{var A=b=>{var R=nc(),$=E(R);{var C=j=>{var X=$l(),q=k(ct(X),2);pt(q,17,()=>n().migrateKeys,Fa,(me,Z)=>{var K=Ql(),ee=E(K);Y(oe=>{ke(K,"title",`Will be lifted into ${(s()||"the new class")??""}`),Q(ee,oe)},[()=>d(_(Z))]),N(me,K)}),N(j,X)},z=j=>{var X=ec();N(j,X)};se($,j=>{n().migrateKeys?.length?j(C):j(z,-1)})}var L=k($,2);{var G=j=>{var X=tc(),q=E(X);Y(()=>Q(q,`${n().skippedKeys.length??""} skipped`)),N(j,X)};se(L,j=>{n().skippedKeys?.length&&j(G)})}N(b,R)};se(w,b=>{_(o)&&n().include&&b(A)})}Y(b=>{v=Gt(p,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":_(f)}),Bi(p,`--rebemer-row-depth: ${n().depth??0??""}`),Q(x,n().originalLabel),Q(W,b),ke(Le,"placeholder",t.isRoot?"block-name":"element-name"),Le.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),Hi(g,()=>n().include,b=>n(n().include=b,!0)),Oe("input",Le,u),ss(Le,()=>n().name,b=>n(n().name=b,!0)),N(e,p),Jt()}Xt(["input"]);var ic=F(" ");function $i(e,t){Yt(t,!0);let n=Nn(t,"kind",3,"info"),r=Nn(t,"duration",3,3e3),s=ie(!0);gs(()=>{if(!_(s)||r()<=0)return;const f=setTimeout(()=>{V(s,!1),t.onDismiss?.()},r());return()=>clearTimeout(f)});const i=ce(()=>n()==="error"?"alert":"status");var o=Na(),a=ct(o);{var l=f=>{var h=ic(),u=E(h);Y(()=>{Gt(h,1,`rebemer-toast rebemer-toast--${n()??""}`),ke(h,"role",_(i)),ke(h,"aria-live",n()==="error"?"assertive":"polite"),Q(u,t.message)}),Oe("click",h,()=>{V(s,!1),t.onDismiss?.()}),N(f,h)};se(a,f=>{_(s)&&f(l)})}N(e,o),Jt()}Xt(["click"]);var oc=F("Will migrate ",1),ac=F(' '),lc=F(''),cc=F(' ',1);function uc(e,t){Yt(t,!0);const n={add:"Attaches a new BEM class to each element without removing any existing classes.",rename:"Replaces the first existing class with a new name, seeding its settings from the old class.",replace:"Replaces ALL existing classes with a single new BEM class (clean slate, no settings carried over).",modifier:"Appends a --modifier variant. The base class is auto-added to the element if absent.",migrate:"Lifts inline element styles (padding, color, typography, etc.) into a new global class."};let r=ie("add"),s=ie(!0),i=ie(yt([])),o=ie(yt([])),a=ie(null),l=ie(null);const f=ce(()=>qt(_(i)[0]?.name??"")),h=ce(()=>_(i)[0]?.originalLabel??""),u=ce(()=>{if(_(r)!=="migrate")return null;let C=0,z=0;for(const L of _(i))L.include&&(C+=L.migrateKeys?.length??0,z+=L.skippedKeys?.length??0);return{willMigrate:C,willSkip:z}}),d=ce(()=>{if(_(i).length===0)return new Map;const C=Xi({rootId:t.rootId,rows:_(i),mode:_(r)}),z=new Map;if(!C.ok)return z;for(const L of C.ops)z.set(L.row.id,L.finalClass);return z});qi(()=>{const C=el(t.rootId);V(o,zi().slice(),!0);const z=C.map((L,G)=>{const j=G===0,X=L.label||"",q=qt(X),me=L.name||"";let Z,K;return q?(Z=q,K="label"):j?(Z="block",K="fallback"):me&&!qr(me)?(Z=Hl(me,"item"),K="element-type"):(Z="item",K="fallback"),{id:L.id,depth:L.depth,bricksType:me,originalLabel:X||(j?"block":"element"),name:Z,modifier:"",include:!0,suggestedFrom:K,migrateKeys:Ml(L.settings),skippedKeys:Il(L.settings),currentClassCount:Array.isArray(L.settings?._cssGlobalClasses)?L.settings._cssGlobalClasses.filter(ee=>typeof ee=="string"&&ee.length>0).length:0}});if(z.length>1){const L=new Map(C.map(q=>[q.id,[]])),G=[];for(const q of C){for(;G.length&&G[G.length-1].depth>=q.depth;)G.pop();G.length&&L.get(G[G.length-1].id).push(q.id),G.push(q)}const j=new Map(C.map(q=>[q.id,q])),X=new Map(z.map(q=>[q.id,q]));for(const[,q]of L){if(!q.length)continue;const me=new Map;for(const K of q){const ee=j.get(K)?.name;ee&&me.set(ee,(me.get(ee)??0)+1)}const Z=q.filter(K=>qr(j.get(K)?.name??""));for(const K of q){const ee=X.get(K),oe=j.get(K);if(!(!ee||!oe||ee.suggestedFrom==="label")){if(qr(oe.name)){const pe=(L.get(K)??[]).map(ht=>j.get(ht)?.name??"").filter(Boolean),qe=Z.indexOf(K);ee.name=Kl(pe,qe,Z.length),ee.suggestedFrom="element-type"}else if((me.get(oe.name)??0)===1){const pe=ql[oe.name];pe&&(ee.name=pe,ee.suggestedFrom="element-type")}}}}}V(i,z,!0)});function p(C){if(C.key==="Escape"){t.onClose?.();return}_(l)&&C.target instanceof Node&&_(l).contains(C.target)&&C.key==="Enter"&&(C.target?.tagName==="INPUT"||C.target?.tagName==="SELECT")&&(C.preventDefault(),y())}let v=null;function y(){const C=qt(_(i)[0]?.name??""),z=Ol(C);if(!z.ok){V(a,{kind:"error",message:z.reason},!0);return}const L=Nl({rootId:t.rootId,rows:_(i),mode:_(r),syncLabels:_(s)});L.ok?(V(a,{kind:"success",message:`Applied to ${L.count} element${L.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):V(a,{kind:"error",message:L.error},!0)}gs(()=>()=>{v&&clearTimeout(v)});var g=cc();Fi("keydown",gr,p);var m=ct(g),S=E(m),x=E(S),M=k(E(x)),W=E(M),re=k(x,2),J=k(S,2),he=E(J),_e=k(E(he),2),U=E(_e);U.value=U.__value="add";var nt=k(U);nt.value=nt.__value="rename";var Le=k(nt);Le.value=Le.__value="replace";var dt=k(Le);dt.value=dt.__value="modifier";var Ct=k(dt);Ct.value=Ct.__value="migrate";var Zt=k(he,2),Qt=E(Zt),At=k(J,2),En=E(At),$t=k(At,2);{var en=C=>{var z=lc();let L;var G=E(z);{var j=Z=>{var K=Ra("No migratable style keys found on any included element. Apply will attach empty classes.");N(Z,K)},X=Z=>{var K=oc(),ee=k(ct(K)),oe=E(ee),pe=k(ee);Y(()=>{Q(oe,_(u).willMigrate),Q(pe,` style key${_(u).willMigrate===1?"":"s"} into new classes.`)}),N(Z,K)};se(G,Z=>{_(u).willMigrate===0?Z(j):Z(X,-1)})}var q=k(G,2);{var me=Z=>{var K=ac(),ee=E(K);Y(()=>Q(ee,`${_(u).willSkip??""} key${_(u).willSkip===1?"":"s"} not on the allowlist will stay on the element.`)),N(Z,K)};se(q,Z=>{_(u).willSkip>0&&Z(me)})}Y(()=>L=Gt(z,1,"rebemer-panel__notice",null,L,{"rebemer-panel__notice--warn":_(u).willSkip>0||_(u).willMigrate===0})),N(C,z)};se($t,C=>{_(u)&&C(en)})}var tn=k($t,2);pt(tn,23,()=>_(i),C=>C.id,(C,z,L)=>{{let G=ce(()=>_(z).id===t.rootId),j=ce(()=>_(d).get(_(z).id)??"");sc(C,{get mode(){return _(r)},get blockName(){return _(f)},get isRoot(){return _(G)},get globalClasses(){return _(o)},get finalClassName(){return _(j)},get row(){return _(i)[_(L)]},set row(X){_(i)[_(L)]=X}})}});var w=k(tn,2),A=E(w),b=k(A,2);Ja(m,C=>V(l,C),()=>_(l));var R=k(m,2);{var $=C=>{$i(C,{get kind(){return _(a).kind},get message(){return _(a).message},onDismiss:()=>{V(a,null)}})};se(R,C=>{_(a)&&C($)})}Y(()=>{Q(W,_(h)),Qt.disabled=_(r)==="modifier",Q(En,n[_(r)])}),Oe("click",re,()=>t.onClose?.()),Ua(_e,()=>_(r),C=>V(r,C)),Hi(Qt,()=>_(s),C=>V(s,C)),Oe("click",A,()=>t.onClose?.()),Oe("click",b,y),N(e,g),Jt()}Xt(["click"]);var fc=F('');function dc(e,t){var n=fc();let r;Y(()=>{r=Gt(n,1,"slashed-cp-launch",null,r,{"slashed-cp-launch--on":t.open}),ke(n,"aria-pressed",t.open)}),Oe("click",n,function(...s){t.onToggle?.apply(this,s)}),N(e,n)}Xt(["click"]);const Hs="--sf-color-",eo=["primary","secondary","tertiary","action","neutral","base"],to=["success","warning","error","info","danger"],qs=["a5","a10","a20","a30","a40","a50","a60","a70","a80","a90","a95"],Ks=["superlight","xlight","lighter","darker","xdark","superdark","hover","active","strong","subtle","muted","ghost"],er=["text","heading","bg","surface","well","raised","overlay","inverse","border","link","code","selection","mark","dim"],hc=e=>new Set(e),_c=hc([...eo,...to]);function pc(e){if(typeof e!="string"||e.indexOf(Hs)!==0)return null;const t=e.slice(Hs.length);if(!t||t==="scheme")return null;const n=t.indexOf("-"),r=n===-1?t:t.slice(0,n);if(!_c.has(r))return{family:"semantic",kind:"semantic",step:null,key:t};const s=n===-1?"":t.slice(n+1);return s===""?{family:r,kind:"base",step:null,key:t}:s==="light"?null:/^[0-9]+$/.test(s)?{family:r,kind:"scale",step:Number(s),key:t}:/^a[0-9]+$/.test(s)?{family:r,kind:"alpha",step:s,key:t}:{family:r,kind:"alias",step:s,key:t}}function vc(e){return e.kind==="alpha"?!0:/(?:^|-)(?:subtle|muted|ghost|translucent|overlay|dim|underline)$/.test(e.key)}function gc(e){switch(e.kind){case"base":return Er(e.family);case"scale":return String(e.step);case"alpha":return String(e.step).toUpperCase();case"alias":return Er(String(e.step));case"semantic":default:return mc(e.key)}}function Er(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function mc(e){return e.split("--").map(n=>n.split("-").map(Er).join(" ")).join(" · ")}function bc(e,t,n,r){const s=n[e];if(typeof s!="string"||!s)return null;const i=typeof r[e]=="string"&&r[e]?r[e]:s;return{var:e,name:e.slice(2),label:gc(t),light:s,dark:i,alpha:vc(t)}}function yc(e,t){const n={base:0,scale:1,alias:2,alpha:3};if(n[e.info.kind]!==n[t.info.kind])return n[e.info.kind]-n[t.info.kind];if(e.info.kind==="scale")return e.info.step-t.info.step;if(e.info.kind==="alpha")return qs.indexOf(e.info.step)-qs.indexOf(t.info.step);if(e.info.kind==="alias"){const r=Ks.indexOf(e.info.step),s=Ks.indexOf(t.info.step);return(r===-1?999:r)-(s===-1?999:s)}return 0}function wc(e,t){const n=er.findIndex(o=>e.info.key===o||e.info.key.startsWith(o+"-")),r=er.findIndex(o=>t.info.key===o||t.info.key.startsWith(o+"-")),s=n===-1?er.length:n,i=r===-1?er.length:r;return s!==i?s-i:e.info.key.localeCompare(t.info.key)}function kc(e,t,n){const r=Array.isArray(e)?e:[],s=t&&typeof t=="object"?t:{},i=n&&typeof n=="object"?n:{},o=new Map,a=[];for(const h of r){const u=pc(h);if(!u)continue;const d=bc(h,u,s,i);if(!d)continue;const p={swatch:d,info:u};if(u.family==="semantic"){a.push(p);continue}o.has(u.family)||o.set(u.family,[]),o.get(u.family).push(p)}const l=[],f=(h,u)=>{const d=o.get(h);if(!d||d.length===0)return;d.sort(yc);const p=d.filter(m=>m.info.kind==="base"||m.info.kind==="scale"),v=d.filter(m=>m.info.kind==="alias"),y=d.filter(m=>m.info.kind==="alpha"),g=[];p.length&&g.push({id:"scale",label:"Shades & tints",swatches:p.map(m=>m.swatch)}),y.length&&g.push({id:"alpha",label:"Transparent",swatches:y.map(m=>m.swatch)}),v.length&&g.push({id:"alias",label:"Semantic",swatches:v.map(m=>m.swatch)}),l.push({id:h,label:Er(h),type:u,count:d.length,sections:g})};for(const h of eo)f(h,"brand");for(const h of to)f(h,"status");return a.length&&(a.sort(wc),l.push({id:"semantic",label:"Semantic",type:"semantic",count:a.length,sections:[{id:"all",label:"",swatches:a.map(h=>h.swatch)}]})),{groups:l}}function Ec(e,t){const n=String(t||"").trim().toLowerCase();if(!n)return e;if(!e||!Array.isArray(e.groups))return{groups:[]};const r=[];for(const s of e.groups){const i=[];for(const o of s.sections){const a=o.swatches.filter(l=>l.name.toLowerCase().includes(n)||l.label.toLowerCase().includes(n)||s.label.toLowerCase().includes(n));a.length&&i.push({...o,swatches:a})}if(i.length){const o=i.reduce((a,l)=>a+l.swatches.length,0);r.push({...s,sections:i,count:o})}}return{groups:r}}function Sc(e){return`var(${e.var})`}function Cc(e,t){return t==="dark"?e.dark:e.light}var Ac=F('');function Ws(e,t){Yt(t,!0);const n=ce(()=>`${t.swatch.name} + creating a duplicate.`,1),sc=P('

      '),ic=P(' '),ac=P('Migrate: ',1),oc=P('No migratable keys on this element.'),lc=P(' '),cc=P('
      '),uc=P('
      ');function fc(e,t){Jt(t,!0);let n=Dn(t,"row",15),r=Dn(t,"globalClasses",19,()=>[]),s=Dn(t,"finalClassName",3,"");const i=le(()=>t.mode==="modifier"),a=le(()=>t.mode==="migrate"),o=le(()=>t.mode==="rename"),l=le(()=>!t.isRoot&&t.blockName?`${t.blockName}__`:""),f=le(()=>n().suggestedFrom==="element-type"||n().suggestedFrom==="fallback"),h=le(()=>!s()||!Array.isArray(r())||!n().include?null:r().find(b=>b&&b.name===s())||null);function c(){n().suggestedFrom!=="user"&&n(n().suggestedFrom="user",!0)}function d(b){return b.startsWith("_")?b.slice(1):b}var p=uc();let v;var y=E(p),g=E(y),m=S(y,2),w=E(m),A=E(w),M=S(w,2),U=E(M),se=S(M,2);{var Q=b=>{var N=Xl();Y(()=>ye(N,"title",`Pre-filled from ${n().suggestedFrom==="element-type"?"Bricks element type":"fallback"}`)),R(b,N)};$(se,b=>{_(f)&&n().include&&b(Q)})}var de=S(m,2),he=E(de),z=E(he);{var tt=b=>{var N=Zl(),ee=E(N);Y(()=>Z(ee,_(l))),R(b,N)};$(z,b=>{_(l)&&b(tt)})}var Oe=S(z,2),dt=S(he,2);{var xt=b=>{var N=Ql();Y(()=>N.disabled=!n().include),Ae("input",N,c),cs(N,()=>n().modifier,ee=>n(n().modifier=ee,!0)),R(b,N)};$(dt,b=>{_(i)&&b(xt)})}var Qt=S(de,2);{var $t=b=>{var N=$l();R(b,N)};$(Qt,b=>{_(i)&&n().include&&!n().modifier&&b($t)})}var At=S(Qt,2);{var Cn=b=>{var N=ec();R(b,N)},en=b=>{var N=tc(),ee=E(N);Y(()=>Z(ee,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),R(b,N)};$(At,b=>{_(o)&&n().include&&n().currentClassCount===0?b(Cn):_(o)&&n().include&&n().currentClassCount>1&&b(en,1)})}var tn=S(At,2);{var nn=b=>{var N=sc(),ee=E(N);{var x=I=>{var X=nc(),K=S(ct(X)),te=E(K);Y(()=>Z(te,s())),R(I,X)},W=I=>{var X=rc(),K=S(ct(X)),te=E(K);Y(()=>Z(te,s())),R(I,X)};$(ee,I=>{_(a)?I(x):I(W,-1)})}R(b,N)};$(tn,b=>{_(h)&&b(nn)})}var k=S(tn,2);{var C=b=>{var N=cc(),ee=E(N);{var x=K=>{var te=ac(),G=S(ct(te),2);vt(G,17,()=>n().migrateKeys,Uo,(ve,j)=>{var D=ic(),V=E(D);Y(je=>{ye(D,"title",`Will be lifted into ${(s()||"the new class")??""}`),Z(V,je)},[()=>d(_(j))]),R(ve,D)}),R(K,te)},W=K=>{var te=oc();R(K,te)};$(ee,K=>{n().migrateKeys?.length?K(x):K(W,-1)})}var I=S(ee,2);{var X=K=>{var te=lc(),G=E(te);Y(()=>Z(G,`${n().skippedKeys.length??""} skipped`)),R(K,te)};$(I,K=>{n().skippedKeys?.length&&K(X)})}R(b,N)};$(k,b=>{_(a)&&n().include&&b(C)})}Y(b=>{v=Vt(p,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":_(f)}),Ui(p,`--rebemer-row-depth: ${n().depth??0??""}`),Z(A,n().originalLabel),Z(U,b),ye(Oe,"placeholder",t.isRoot?"block-name":"element-name"),Oe.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),Gi(g,()=>n().include,b=>n(n().include=b,!0)),Ae("input",Oe,c),cs(Oe,()=>n().name,b=>n(n().name=b,!0)),R(e,p),Xt()}Zt(["input"]);var dc=P(" ");function ia(e,t){Jt(t,!0);let n=Dn(t,"kind",3,"info"),r=Dn(t,"duration",3,3e3),s=ie(!0);ks(()=>{if(!_(s)||r()<=0)return;const f=setTimeout(()=>{J(s,!1),t.onDismiss?.()},r());return()=>clearTimeout(f)});const i=le(()=>n()==="error"?"alert":"status");var a=qo(),o=ct(a);{var l=f=>{var h=dc(),c=E(h);Y(()=>{Vt(h,1,`rebemer-toast rebemer-toast--${n()??""}`),ye(h,"role",_(i)),ye(h,"aria-live",n()==="error"?"assertive":"polite"),Z(c,t.message)}),Ae("click",h,()=>{J(s,!1),t.onDismiss?.()}),R(f,h)};$(o,f=>{_(s)&&f(l)})}R(e,a),Xt()}Zt(["click"]);var hc=P("Will migrate ",1),_c=P(' '),pc=P(''),vc=P(' ',1);function gc(e,t){Jt(t,!0);const n={add:"Attaches a new BEM class to each element without removing any existing classes.",rename:"Replaces the first existing class with a new name, seeding its settings from the old class.",replace:"Replaces ALL existing classes with a single new BEM class (clean slate, no settings carried over).",modifier:"Appends a --modifier variant. The base class is auto-added to the element if absent.",migrate:"Lifts inline element styles (padding, color, typography, etc.) into a new global class."};let r=ie("add"),s=ie(!0),i=ie(wt([])),a=ie(wt([])),o=ie(null),l=ie(null);const f=le(()=>Wt(_(i)[0]?.name??"")),h=le(()=>_(i)[0]?.originalLabel??""),c=le(()=>{if(_(r)!=="migrate")return null;let x=0,W=0;for(const I of _(i))I.include&&(x+=I.migrateKeys?.length??0,W+=I.skippedKeys?.length??0);return{willMigrate:x,willSkip:W}}),d=le(()=>{if(_(i).length===0)return new Map;const x=na({rootId:t.rootId,rows:_(i),mode:_(r)}),W=new Map;if(!x.ok)return W;for(const I of x.ops)W.set(I.row.id,I.finalClass);return W});Vi(()=>{const x=ol(t.rootId);J(a,Zi().slice(),!0);const W=x.map((I,X)=>{const K=X===0,te=I.label||"",G=Wt(te),ve=I.name||"";let j,D;return G?(j=G,D="label"):K?(j="block",D="fallback"):ve&&!zr(ve)?(j=Vl(ve,"item"),D="element-type"):(j="item",D="fallback"),{id:I.id,depth:I.depth,bricksType:ve,originalLabel:te||(K?"block":"element"),name:j,modifier:"",include:!0,suggestedFrom:D,migrateKeys:Fl(I.settings),skippedKeys:jl(I.settings),currentClassCount:Array.isArray(I.settings?._cssGlobalClasses)?I.settings._cssGlobalClasses.filter(V=>typeof V=="string"&&V.length>0).length:0}});if(W.length>1){const I=new Map(x.map(G=>[G.id,[]])),X=[];for(const G of x){for(;X.length&&X[X.length-1].depth>=G.depth;)X.pop();X.length&&I.get(X[X.length-1].id).push(G.id),X.push(G)}const K=new Map(x.map(G=>[G.id,G])),te=new Map(W.map(G=>[G.id,G]));for(const[,G]of I){if(!G.length)continue;const ve=new Map;for(const D of G){const V=K.get(D)?.name;V&&ve.set(V,(ve.get(V)??0)+1)}const j=G.filter(D=>zr(K.get(D)?.name??""));for(const D of G){const V=te.get(D),je=K.get(D);if(!(!V||!je||V.suggestedFrom==="label")){if(zr(je.name)){const ht=(I.get(D)??[]).map(Dr=>K.get(Dr)?.name??"").filter(Boolean),Pr=j.indexOf(D);V.name=Jl(ht,Pr,j.length),V.suggestedFrom="element-type"}else if((ve.get(je.name)??0)===1){const ht=Yl[je.name];ht&&(V.name=ht,V.suggestedFrom="element-type")}}}}}J(i,W,!0)});function p(x){if(x.key==="Escape"){t.onClose?.();return}_(l)&&x.target instanceof Node&&_(l).contains(x.target)&&x.key==="Enter"&&(x.target?.tagName==="INPUT"||x.target?.tagName==="SELECT")&&(x.preventDefault(),y())}let v=null;function y(){const x=Wt(_(i)[0]?.name??""),W=Dl(x);if(!W.ok){J(o,{kind:"error",message:W.reason},!0);return}const I=ql({rootId:t.rootId,rows:_(i),mode:_(r),syncLabels:_(s)});I.ok?(J(o,{kind:"success",message:`Applied to ${I.count} element${I.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):J(o,{kind:"error",message:I.error},!0)}ks(()=>()=>{v&&clearTimeout(v)});var g=vc();Ki("keydown",br,p);var m=ct(g),w=E(m),A=E(w),M=S(E(A)),U=E(M),se=S(A,2),Q=S(w,2),de=E(Q),he=S(E(de),2),z=E(he);z.value=z.__value="add";var tt=S(z);tt.value=tt.__value="rename";var Oe=S(tt);Oe.value=Oe.__value="replace";var dt=S(Oe);dt.value=dt.__value="modifier";var xt=S(dt);xt.value=xt.__value="migrate";var Qt=S(de,2),$t=E(Qt),At=S(Q,2),Cn=E(At),en=S(At,2);{var tn=x=>{var W=pc();let I;var X=E(W);{var K=j=>{var D=Ho("No migratable style keys found on any included element. Apply will attach empty classes.");R(j,D)},te=j=>{var D=hc(),V=S(ct(D)),je=E(V),ht=S(V);Y(()=>{Z(je,_(c).willMigrate),Z(ht,` style key${_(c).willMigrate===1?"":"s"} into new classes.`)}),R(j,D)};$(X,j=>{_(c).willMigrate===0?j(K):j(te,-1)})}var G=S(X,2);{var ve=j=>{var D=_c(),V=E(D);Y(()=>Z(V,`${_(c).willSkip??""} key${_(c).willSkip===1?"":"s"} not on the allowlist will stay on the element.`)),R(j,D)};$(G,j=>{_(c).willSkip>0&&j(ve)})}Y(()=>I=Vt(W,1,"rebemer-panel__notice",null,I,{"rebemer-panel__notice--warn":_(c).willSkip>0||_(c).willMigrate===0})),R(x,W)};$(en,x=>{_(c)&&x(tn)})}var nn=S(en,2);vt(nn,23,()=>_(i),x=>x.id,(x,W,I)=>{{let X=le(()=>_(W).id===t.rootId),K=le(()=>_(d).get(_(W).id)??"");fc(x,{get mode(){return _(r)},get blockName(){return _(f)},get isRoot(){return _(X)},get globalClasses(){return _(a)},get finalClassName(){return _(K)},get row(){return _(i)[_(I)]},set row(te){_(i)[_(I)]=te}})}});var k=S(nn,2),C=E(k),b=S(C,2);nl(m,x=>J(l,x),()=>_(l));var N=S(m,2);{var ee=x=>{ia(x,{get kind(){return _(o).kind},get message(){return _(o).message},onDismiss:()=>{J(o,null)}})};$(N,x=>{_(o)&&x(ee)})}Y(()=>{Z(U,_(h)),$t.disabled=_(r)==="modifier",Z(Cn,n[_(r)])}),Ae("click",se,()=>t.onClose?.()),Zo(he,()=>_(r),x=>J(r,x)),Gi($t,()=>_(s),x=>J(s,x)),Ae("click",C,()=>t.onClose?.()),Ae("click",b,y),R(e,g),Xt()}Zt(["click"]);var mc=P('');function bc(e,t){var n=mc();let r;Y(()=>{r=Vt(n,1,"slashed-cp-launch",null,r,{"slashed-cp-launch--on":t.open}),ye(n,"aria-pressed",t.open)}),Ae("click",n,function(...s){t.onToggle?.apply(this,s)}),R(e,n)}Zt(["click"]);const zs="--sf-color-",aa=["primary","secondary","tertiary","action","neutral","base"],oa=["success","warning","error","info","danger"],Gs=["a5","a10","a20","a30","a40","a50","a60","a70","a80","a90","a95"],Vs=["superlight","xlight","lighter","darker","xdark","superdark","hover","active","strong","subtle","muted","ghost"],nr=["text","heading","bg","surface","well","raised","overlay","inverse","border","link","code","selection","mark","dim"],yc=e=>new Set(e),wc=yc([...aa,...oa]),Ys={primary:{tagline:"Brand identity & main emphasis",use:"Headlines, primary buttons, key brand moments."},secondary:{tagline:"Supporting brand tone",use:"Secondary surfaces and muted brand accents."},tertiary:{tagline:"Accent / highlight",use:"Badges, tags, decorative highlights."},action:{tagline:"Interactive & links",use:"Links, focus rings, anything clickable."},neutral:{tagline:"Text, icons & dividers",use:"Body text, borders, neutral UI chrome."},base:{tagline:"Page & surface backgrounds",use:"Page background and raised surfaces."},success:{tagline:"Positive / confirmation",use:"Success messages and valid state."},warning:{tagline:"Caution",use:"Warnings and at-risk / pending state."},error:{tagline:"Form & validation errors",use:"Invalid inputs and error messages."},info:{tagline:"Informational",use:"Tips and neutral notices."},danger:{tagline:"Destructive actions",use:"Delete / remove and irreversible actions."},semantic:{tagline:"Ready-made role tokens",use:"Pre-wired roles that already adapt to light/dark."}},Gr=[{id:"text-on",label:"Text on color",match:e=>e.startsWith("text--on")},{id:"text",label:"Text",match:e=>e==="text"||e==="heading"||e.startsWith("text-")},{id:"state",label:"Interactive states",match:e=>e.startsWith("bg--")},{id:"surface",label:"Surfaces & backgrounds",match:e=>["bg","surface","well","raised","overlay","inverse"].some(t=>e===t||e.startsWith(t+"-"))},{id:"border",label:"Borders",match:e=>e==="border"||e.startsWith("border-")},{id:"link",label:"Links",match:e=>e==="link"||e.startsWith("link-")},{id:"select",label:"Selection & marks",match:e=>e.startsWith("selection")||e.startsWith("mark")||e==="dim"},{id:"code",label:"Code",match:e=>e.startsWith("code")}];function kc(e){if(typeof e!="string"||e.indexOf(zs)!==0)return null;const t=e.slice(zs.length);if(!t||t==="scheme")return null;const n=t.indexOf("-"),r=n===-1?t:t.slice(0,n);if(!wc.has(r))return{family:"semantic",kind:"semantic",step:null,key:t};const s=n===-1?"":t.slice(n+1);return s===""?{family:r,kind:"base",step:null,key:t}:s==="light"?null:/^[0-9]+$/.test(s)?{family:r,kind:"scale",step:Number(s),key:t}:/^a[0-9]+$/.test(s)?{family:r,kind:"alpha",step:s,key:t}:{family:r,kind:"alias",step:s,key:t}}function Ec(e){return e.kind==="alpha"?!0:/(?:^|-)(?:subtle|muted|ghost|translucent|overlay|dim|underline)$/.test(e.key)}function Sc(e){switch(e.kind){case"base":return Cr(e.family);case"scale":return String(e.step);case"alpha":return String(e.step).toUpperCase();case"alias":return Cr(String(e.step));case"semantic":default:return Cc(e.key)}}function Cr(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function Cc(e){return e.split("--").map(n=>n.split("-").map(Cr).join(" ")).join(" · ")}function xc(e,t,n,r){const s=n[e];if(typeof s!="string"||!s)return null;const i=typeof r[e]=="string"&&r[e]?r[e]:s;return{var:e,name:e.slice(2),label:Sc(t),light:s,dark:i,alpha:Ec(t)}}function Ac(e,t){const n={base:0,scale:1,alias:2,alpha:3};if(n[e.info.kind]!==n[t.info.kind])return n[e.info.kind]-n[t.info.kind];if(e.info.kind==="scale")return e.info.step-t.info.step;if(e.info.kind==="alpha")return Gs.indexOf(e.info.step)-Gs.indexOf(t.info.step);if(e.info.kind==="alias"){const r=Vs.indexOf(e.info.step),s=Vs.indexOf(t.info.step);return(r===-1?999:r)-(s===-1?999:s)}return 0}function Tc(e,t){const n=nr.findIndex(a=>e.info.key===a||e.info.key.startsWith(a+"-")),r=nr.findIndex(a=>t.info.key===a||t.info.key.startsWith(a+"-")),s=n===-1?nr.length:n,i=r===-1?nr.length:r;return s!==i?s-i:e.info.key.localeCompare(t.info.key)}function Oc(e,t,n){const r=Array.isArray(e)?e:[],s=t&&typeof t=="object"?t:{},i=n&&typeof n=="object"?n:{},a=new Map,o=[];for(const h of r){const c=kc(h);if(!c)continue;const d=xc(h,c,s,i);if(!d)continue;const p={swatch:d,info:c};if(c.family==="semantic"){o.push(p);continue}a.has(c.family)||a.set(c.family,[]),a.get(c.family).push(p)}const l=[],f=(h,c)=>{const d=a.get(h);if(!d||d.length===0)return;d.sort(Ac);const p=d.filter(w=>w.info.kind==="base"||w.info.kind==="scale"),v=d.filter(w=>w.info.kind==="alias"),y=d.filter(w=>w.info.kind==="alpha"),g=[];p.length&&g.push({id:"scale",label:"Shades & tints",swatches:p.map(w=>w.swatch)}),y.length&&g.push({id:"alpha",label:"Transparent",swatches:y.map(w=>w.swatch)}),v.length&&g.push({id:"alias",label:"Semantic",swatches:v.map(w=>w.swatch)});const m=Ys[h]||{};l.push({id:h,label:Cr(h),type:c,count:d.length,tagline:m.tagline||"",use:m.use||"",sections:g})};for(const h of aa)f(h,"brand");for(const h of oa)f(h,"status");if(o.length){o.sort(Tc);const h=new Map(Gr.map(v=>[v.id,[]])),c=[];for(const v of o){const y=Gr.find(g=>g.match(v.info.key));y?h.get(y.id).push(v.swatch):c.push(v.swatch)}const d=[];for(const v of Gr){const y=h.get(v.id);y.length&&d.push({id:v.id,label:v.label,swatches:y})}c.length&&d.push({id:"other",label:"Other",swatches:c});const p=Ys.semantic||{};l.push({id:"semantic",label:"Semantic",type:"semantic",count:o.length,tagline:p.tagline||"",use:p.use||"",sections:d})}return{groups:l}}function Mc(e,t){const n=String(t||"").trim().toLowerCase();if(!n)return e;if(!e||!Array.isArray(e.groups))return{groups:[]};const r=[];for(const s of e.groups){const i=[];for(const a of s.sections){const o=a.swatches.filter(l=>l.name.toLowerCase().includes(n)||l.label.toLowerCase().includes(n)||s.label.toLowerCase().includes(n));o.length&&i.push({...a,swatches:o})}if(i.length){const a=i.reduce((o,l)=>o+l.swatches.length,0);r.push({...s,sections:i,count:a})}}return{groups:r}}function Ic(e){return`var(${e.var})`}function Lc(e,t){return t==="dark"?e.dark:e.light}var Rc=P('');function Js(e,t){Jt(t,!0);const n=le(()=>`${t.swatch.name} light ${t.swatch.light} · dark ${t.swatch.dark} -click: apply + copy var(${t.swatch.var})`);var r=Ac();let s;Y(i=>{s=Gt(r,1,"slashed-cp-swatch",null,s,{"slashed-cp-swatch--alpha":t.swatch.alpha,"slashed-cp-swatch--split":t.mode==="both"}),Bi(r,`--cp-l:${t.swatch.light??""}; --cp-d:${t.swatch.dark??""}; --cp-solid:${i??""};`),ke(r,"title",_(n)),ke(r,"aria-label",`${t.swatch.name} — apply and copy`)},[()=>Cc(t.swatch,t.mode==="dark"?"dark":"light")]),Oe("click",r,()=>t.onPick(t.swatch)),N(e,r),Jt()}Xt(["click"]);var xc=F(''),Tc=F(''),Oc=F('

      '),Mc=F(''),Lc=F('
    • '),Ic=F('
        '),Rc=F('
        '),Nc=F('
        '),Pc=F(" ",1),Dc=F('

        '),Fc=F(''),Bc=F(' ',1);function jc(e,t){Yt(t,!0);const n=[{id:"background",label:"Background"},{id:"text",label:"Text"},{id:"border",label:"Border"}],r=[{id:"both",label:"Both"},{id:"light",label:"Light"},{id:"dark",label:"Dark"}];let s=ie("both"),i=ie("background"),o=ie(""),a=ie(null);const l=ce(()=>kc(t.source?.variables,t.source?.light,t.source?.dark)),f=ce(()=>Ec(_(l),_(o))),h=ce(()=>_(l).groups.reduce((w,A)=>w+A.count,0)),u=ce(()=>n.find(w=>w.id===_(i))?.label??_(i));let d;function p(){if(typeof document>"u")return null;const w=document.querySelector('iframe#bricks-builder-iframe, iframe[name="bricks-builder-iframe"], #bricks-builder-area iframe');try{return w?.contentDocument?.documentElement??null}catch{return null}}function v(w){const A=p();if(A)try{d===void 0&&(d=A.getAttribute("data-theme")),w==="light"||w==="dark"?A.setAttribute("data-theme",w):d===null?A.removeAttribute("data-theme"):A.setAttribute("data-theme",d)}catch{}}function y(){const w=p();if(!(!w||d===void 0))try{d===null?w.removeAttribute("data-theme"):w.setAttribute("data-theme",d)}catch{}}function g(w){V(s,w,!0),v(w)}qi(()=>()=>y());async function m(w){try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(w),!0}catch{}try{const A=document.createElement("textarea");A.value=w,A.style.position="fixed",A.style.opacity="0",document.body.appendChild(A),A.select();const b=document.execCommand("copy");return A.remove(),b}catch{return!1}}async function S(w){const A=Sc(w),b=await m(A),R=tl();if(R){let $=!1;if(Wi(()=>{$=rl(R,_(i),A)}),$){const C=sl(R)||"element";V(a,{kind:"success",message:`${_(u)} of “${C}” → ${w.name}`},!0);return}}V(a,b?{kind:"info",message:`Copied ${A} — paste into any Bricks colour field`}:{kind:"error",message:`Couldn't copy ${A}`},!0)}function x(w){w.key==="Escape"&&t.onClose?.()}var M=Bc();Fi("keydown",gr,x);var W=ct(M),re=E(W),J=k(E(re),2);pt(J,21,()=>r,w=>w.id,(w,A)=>{var b=xc();let R;var $=E(b);Y(()=>{R=Gt(b,1,"slashed-cp__seg-btn",null,R,{"slashed-cp__seg-btn--on":_(s)===_(A).id}),ke(b,"aria-pressed",_(s)===_(A).id),Q($,_(A).label)}),Oe("click",b,()=>g(_(A).id)),N(w,b)});var he=k(J,2),_e=k(re,2),U=E(_e),nt=k(U,2),Le=k(E(nt),2);pt(Le,17,()=>n,w=>w.id,(w,A)=>{var b=Tc();let R;var $=E(b);Y(()=>{R=Gt(b,1,"slashed-cp__chip",null,R,{"slashed-cp__chip--on":_(i)===_(A).id}),ke(b,"aria-pressed",_(i)===_(A).id),Q($,_(A).label)}),Oe("click",b,()=>V(i,_(A).id,!0)),N(w,b)});var dt=k(_e,2),Ct=E(dt);{var Zt=w=>{var A=Oc(),b=E(A);Y(()=>Q(b,`No colours match “${_(o)??""}”.`)),N(w,A)};se(Ct,w=>{_(f).groups.length===0&&w(Zt)})}var Qt=k(Ct,2);pt(Qt,17,()=>_(f).groups,w=>w.id,(w,A)=>{var b=Dc(),R=E(b),$=E(R),C=k($),z=E(C),L=k(R,2);pt(L,17,()=>_(A).sections,G=>G.id,(G,j)=>{var X=Pc(),q=ct(X);{var me=oe=>{var pe=Mc(),qe=E(pe);Y(()=>Q(qe,_(j).label)),N(oe,pe)};se(q,oe=>{_(j).label&&oe(me)})}var Z=k(q,2);{var K=oe=>{var pe=Ic();pt(pe,21,()=>_(j).swatches,qe=>qe.var,(qe,ht)=>{var Sn=Lc(),Cn=E(Sn);Ws(Cn,{get swatch(){return _(ht)},get mode(){return _(s)},onPick:S});var Xn=k(Cn,2),Rr=E(Xn),so=k(Xn,2),io=E(so);Y(()=>{Q(Rr,_(ht).label),Q(io,_(ht).name)}),N(qe,Sn)}),N(oe,pe)},ee=oe=>{var pe=Nc();pt(pe,21,()=>_(j).swatches,qe=>qe.var,(qe,ht)=>{var Sn=Rc(),Cn=E(Sn);Ws(Cn,{get swatch(){return _(ht)},get mode(){return _(s)},onPick:S});var Xn=k(Cn,2),Rr=E(Xn);Y(()=>Q(Rr,_(ht).label)),N(qe,Sn)}),N(oe,pe)};se(Z,oe=>{_(A).type==="semantic"?oe(K):oe(ee,-1)})}N(G,X)}),Y(()=>{ke(b,"data-type",_(A).type),Q($,`${_(A).label??""} `),Q(z,_(A).count)}),N(w,b)});var At=k(dt,2),En=E(At);{var $t=w=>{var A=Fc();N(w,A)};se(En,w=>{_(s)==="both"&&w($t)})}var en=k(W,2);{var tn=w=>{$i(w,{get kind(){return _(a).kind},get message(){return _(a).message},onDismiss:()=>{V(a,null)}})};se(en,w=>{_(a)&&w(tn)})}Y(()=>ke(U,"placeholder",`Search ${_(h)} colours…`)),Oe("click",he,()=>t.onClose?.()),ss(U,()=>_(o),w=>V(o,w)),N(e,M),Jt()}Xt(["click"]);var Hc=F(" ",1);function qc(e,t){let n=ie(!1);var r=Hc(),s=ct(r);dc(s,{get open(){return _(n)},onToggle:()=>V(n,!_(n))});var i=k(s,2);{var o=a=>{jc(a,{get source(){return t.source},onClose:()=>V(n,!1)})};se(i,a=>{_(n)&&a(o)})}N(e,r)}const Us="#bricks-structure",Kc="li[data-id]",zs="slashed-rebemer-host",Wc=400,Uc=25,Jn=(e,...t)=>console[e]("[reBEMer]",...t),no=new AbortController,{signal:Fn}=no,Kt=new Map;let Mn=null,on=null;function ro(){let e=document.getElementById(zs);return e||(e=document.createElement("div"),e.id=zs,document.body.appendChild(e)),e}let Ye=null;function Gs(){Ye=window.slashedBricksEditor,Ye&&typeof Ye=="object"&&(pl(Ye.showClassHints,Ye.classHints,{signal:Fn}),El(Ye.showColorSwatches,Ye.colorHexMap,{signal:Fn}));let e=0;const t=()=>{if(!Fn.aborted){if(Qa()){zc();return}if(++e>=Uc){Jn("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(t,Wc)}};t()}function zc(){Vc();const e=document.querySelector(Us);if(e){Vs(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(Us);n&&(t.disconnect(),Vs(n))});t.observe(document.body,{childList:!0,subtree:!0}),Fn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function Vs(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,Ys(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),Fn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),Ys(e)}function Ys(e){for(const[n,r]of Kt)if(!r.host.isConnected){try{Yn(r.instance)}catch(s){Jn("warn","badge unmount failed",s)}Kt.delete(n)}const t=e.querySelectorAll(Kc);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const s=Kt.get(r);s&&s.host.isConnected&&n.contains(s.host)||Gc(n)}}function Gc(e){const t=e.getAttribute("data-id");if(!t)return;const n=e.querySelector(":scope > .structure-item")||e,r=n.querySelector(":scope > ul.actions")||n.querySelector(":scope > .actions")||n.querySelector(":scope > .structure-item-actions"),s=document.createElement("span");s.className="rebemer-badge-host",r?n.insertBefore(s,r):n.appendChild(s);const i=n.querySelector(":scope > .title, :scope > .structure-item-title, :scope > .name, :scope .label"),o=i?i.textContent.trim():"",a=ks(Al,{target:s,props:{elementId:t,label:o,onActivate:Jc}}),l=Kt.get(t);if(l){try{Yn(l.instance)}catch(f){Jn("warn","badge remount cleanup failed",f)}l.host.isConnected&&l.host.remove()}Kt.set(t,{instance:a,host:s})}function Vc(){if(on)return;const e=Ye&&Ye.colorPanel;if(!Ye?.showColorPanel||!e||!Array.isArray(e.variables)||e.variables.length===0)return;const t=document.createElement("div");ro().appendChild(t),on={instance:ks(qc,{target:t,props:{source:e}}),node:t}}function Yc(){if(on){try{Yn(on.instance)}catch(e){Jn("warn","color app unmount failed",e)}on.node.remove(),on=null}}function Jc(e){as();const t=document.createElement("div");ro().appendChild(t),Mn={instance:ks(uc,{target:t,props:{rootId:e,onClose:as}}),node:t}}function as(){if(Mn){try{Yn(Mn.instance)}catch(e){Jn("warn","panel unmount failed",e)}Mn.node.remove(),Mn=null}}window.addEventListener("beforeunload",()=>{no.abort(),as(),Yc(),lr(),dr();for(const{instance:e}of Kt.values())try{Yn(e)}catch{}Kt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Gs,{once:!0}):Gs(); +click: apply + copy var(${t.swatch.var})`);var r=Rc();let s;Y(i=>{s=Vt(r,1,"slashed-cp-swatch",null,s,{"slashed-cp-swatch--alpha":t.swatch.alpha,"slashed-cp-swatch--split":t.mode==="both"}),Ui(r,`--cp-l:${t.swatch.light??""}; --cp-d:${t.swatch.dark??""}; --cp-solid:${i??""};`),ye(r,"title",_(n)),ye(r,"aria-label",`${t.swatch.name} — apply and copy`)},[()=>Lc(t.swatch,t.mode==="dark"?"dark":"light")]),Ae("click",r,()=>t.onPick(t.swatch)),R(e,r),Xt()}Zt(["click"]);var Nc=P(''),Pc=P(''),Dc=P('

        '),Fc=P(' '),Bc=P('

        '),jc=P(''),Hc=P('
      • '),qc=P('
          '),Wc=P('
          '),Kc=P('
          '),Uc=P(" ",1),zc=P('

          '),Gc=P(''),Vc=P(' ',1);function Yc(e,t){Jt(t,!0);const n=[{id:"background",label:"Background"},{id:"text",label:"Text"},{id:"border",label:"Border"}],r=[{id:"both",label:"Both"},{id:"light",label:"Light"},{id:"dark",label:"Dark"}];let s=ie("both"),i=ie("background"),a=ie(""),o=ie(null);const l=le(()=>Oc(t.source?.variables,t.source?.light,t.source?.dark)),f=le(()=>Mc(_(l),_(a))),h=le(()=>_(l).groups.reduce((k,C)=>k+C.count,0)),c=le(()=>n.find(k=>k.id===_(i))?.label??_(i));let d;function p(){if(typeof document>"u")return null;const k=document.querySelector('iframe#bricks-builder-iframe, iframe[name="bricks-builder-iframe"], #bricks-builder-area iframe');try{return k?.contentDocument?.documentElement??null}catch{return null}}function v(k){const C=p();if(C)try{d===void 0&&(d=C.getAttribute("data-theme")),k==="light"||k==="dark"?C.setAttribute("data-theme",k):d===null?C.removeAttribute("data-theme"):C.setAttribute("data-theme",d)}catch{}}function y(){const k=p();if(!(!k||d===void 0))try{d===null?k.removeAttribute("data-theme"):k.setAttribute("data-theme",d)}catch{}}function g(k){J(s,k,!0),v(k)}Vi(()=>()=>y());async function m(k){try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(k),!0}catch{}try{const C=document.createElement("textarea");C.value=k,C.style.position="fixed",C.style.opacity="0",document.body.appendChild(C),C.select();const b=document.execCommand("copy");return C.remove(),b}catch{return!1}}async function w(k){const C=Ic(k),b=await m(C),N=ll();if(N){let ee=!1;if(Ji(()=>{ee=ul(N,_(i),C)}),ee){const x=fl(N)||"element";J(o,{kind:"success",message:`${_(c)} of “${x}” → ${k.name}`},!0);return}}J(o,b?{kind:"info",message:`Copied ${C} — paste into any Bricks colour field`}:{kind:"error",message:`Couldn't copy ${C}`},!0)}function A(k){k.key==="Escape"&&t.onClose?.()}var M=Vc();Ki("keydown",br,A);var U=ct(M),se=E(U),Q=S(E(se),2);vt(Q,21,()=>r,k=>k.id,(k,C)=>{var b=Nc();let N;var ee=E(b);Y(()=>{N=Vt(b,1,"slashed-cp__seg-btn",null,N,{"slashed-cp__seg-btn--on":_(s)===_(C).id}),ye(b,"aria-pressed",_(s)===_(C).id),Z(ee,_(C).label)}),Ae("click",b,()=>g(_(C).id)),R(k,b)});var de=S(Q,2),he=S(se,2),z=E(he),tt=S(z,2),Oe=S(E(tt),2);vt(Oe,17,()=>n,k=>k.id,(k,C)=>{var b=Pc();let N;var ee=E(b);Y(()=>{N=Vt(b,1,"slashed-cp__chip",null,N,{"slashed-cp__chip--on":_(i)===_(C).id}),ye(b,"aria-pressed",_(i)===_(C).id),Z(ee,_(C).label)}),Ae("click",b,()=>J(i,_(C).id,!0)),R(k,b)});var dt=S(he,2),xt=E(dt);{var Qt=k=>{var C=Dc(),b=E(C);Y(()=>Z(b,`No colours match “${_(a)??""}”.`)),R(k,C)};$(xt,k=>{_(f).groups.length===0&&k(Qt)})}var $t=S(xt,2);vt($t,17,()=>_(f).groups,k=>k.id,(k,C)=>{var b=zc(),N=E(b),ee=E(N),x=E(ee),W=S(x);{var I=j=>{var D=Fc(),V=E(D);Y(()=>Z(V,_(C).tagline)),R(j,D)};$(W,j=>{_(C).tagline&&j(I)})}var X=S(W,2),K=E(X),te=S(ee,2);{var G=j=>{var D=Bc(),V=E(D);Y(()=>Z(V,_(C).use)),R(j,D)};$(te,j=>{_(C).use&&j(G)})}var ve=S(N,2);vt(ve,17,()=>_(C).sections,j=>j.id,(j,D)=>{var V=Uc(),je=ct(V);{var ht=Ge=>{var _t=jc(),nt=E(_t);Y(()=>Z(nt,_(D).label)),R(Ge,_t)};$(je,Ge=>{_(D).label&&Ge(ht)})}var Pr=S(je,2);{var Dr=Ge=>{var _t=qc();vt(_t,21,()=>_(D).swatches,nt=>nt.var,(nt,rn)=>{var xn=Hc(),An=E(xn);Js(An,{get swatch(){return _(rn)},get mode(){return _(s)},onPick:w});var Qn=S(An,2),Fr=E(Qn),fa=S(Qn,2),da=E(fa);Y(()=>{Z(Fr,_(rn).label),Z(da,_(rn).name)}),R(nt,xn)}),R(Ge,_t)},ua=Ge=>{var _t=Kc();vt(_t,21,()=>_(D).swatches,nt=>nt.var,(nt,rn)=>{var xn=Wc(),An=E(xn);Js(An,{get swatch(){return _(rn)},get mode(){return _(s)},onPick:w});var Qn=S(An,2),Fr=E(Qn);Y(()=>Z(Fr,_(rn).label)),R(nt,xn)}),R(Ge,_t)};$(Pr,Ge=>{_(C).type==="semantic"?Ge(Dr):Ge(ua,-1)})}R(j,V)}),Y(()=>{ye(b,"data-type",_(C).type),Z(x,`${_(C).label??""} `),Z(K,_(C).count)}),R(k,b)});var At=S(dt,2),Cn=E(At);{var en=k=>{var C=Gc();R(k,C)};$(Cn,k=>{_(s)==="both"&&k(en)})}var tn=S(U,2);{var nn=k=>{ia(k,{get kind(){return _(o).kind},get message(){return _(o).message},onDismiss:()=>{J(o,null)}})};$(tn,k=>{_(o)&&k(nn)})}Y(()=>ye(z,"placeholder",`Search ${_(h)} colours…`)),Ae("click",de,()=>t.onClose?.()),cs(z,()=>_(a),k=>J(a,k)),R(e,M),Xt()}Zt(["click"]);var Jc=P(" ",1);function Xc(e,t){let n=ie(!1);var r=Jc(),s=ct(r);bc(s,{get open(){return _(n)},onToggle:()=>J(n,!_(n))});var i=S(s,2);{var a=o=>{Yc(o,{get source(){return t.source},onClose:()=>J(n,!1)})};$(i,o=>{_(n)&&o(a)})}R(e,r)}const Xs="#bricks-structure",Zc="li[data-id]",Zs="slashed-rebemer-host",Qc=400,$c=25,Zn=(e,...t)=>console[e]("[reBEMer]",...t),la=new AbortController,{signal:jn}=la,Kt=new Map;let Ln=null,ln=null;function ca(){let e=document.getElementById(Zs);return e||(e=document.createElement("div"),e.id=Zs,document.body.appendChild(e)),e}let Ve=null;function Qs(){Ve=window.slashedBricksEditor,Ve&&typeof Ve=="object"&&(kl(Ve.showClassHints,Ve.classHints,{signal:jn}),Ml(Ve.showColorSwatches,Ve.colorHexMap,{signal:jn}));let e=0;const t=()=>{if(!jn.aborted){if(il()){eu();return}if(++e>=$c){Zn("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(t,Qc)}};t()}function eu(){nu();const e=document.querySelector(Xs);if(e){$s(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(Xs);n&&(t.disconnect(),$s(n))});t.observe(document.body,{childList:!0,subtree:!0}),jn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function $s(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,ei(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),jn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),ei(e)}function ei(e){for(const[n,r]of Kt)if(!r.host.isConnected){try{Xn(r.instance)}catch(s){Zn("warn","badge unmount failed",s)}Kt.delete(n)}const t=e.querySelectorAll(Zc);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const s=Kt.get(r);s&&s.host.isConnected&&n.contains(s.host)||tu(n)}}function tu(e){const t=e.getAttribute("data-id");if(!t)return;const n=e.querySelector(":scope > .structure-item")||e,r=n.querySelector(":scope > ul.actions")||n.querySelector(":scope > .actions")||n.querySelector(":scope > .structure-item-actions"),s=document.createElement("span");s.className="rebemer-badge-host",r?n.insertBefore(s,r):n.appendChild(s);const i=n.querySelector(":scope > .title, :scope > .structure-item-title, :scope > .name, :scope .label"),a=i?i.textContent.trim():"",o=As(Rl,{target:s,props:{elementId:t,label:a,onActivate:su}}),l=Kt.get(t);if(l){try{Xn(l.instance)}catch(f){Zn("warn","badge remount cleanup failed",f)}l.host.isConnected&&l.host.remove()}Kt.set(t,{instance:o,host:s})}function nu(){if(ln)return;const e=Ve&&Ve.colorPanel;if(!Ve?.showColorPanel||!e||!Array.isArray(e.variables)||e.variables.length===0)return;const t=document.createElement("div");ca().appendChild(t),ln={instance:As(Xc,{target:t,props:{source:e}}),node:t}}function ru(){if(ln){try{Xn(ln.instance)}catch(e){Zn("warn","color app unmount failed",e)}ln.node.remove(),ln=null}}function su(e){ds();const t=document.createElement("div");ca().appendChild(t),Ln={instance:As(gc,{target:t,props:{rootId:e,onClose:ds}}),node:t}}function ds(){if(Ln){try{Xn(Ln.instance)}catch(e){Zn("warn","panel unmount failed",e)}Ln.node.remove(),Ln=null}}window.addEventListener("beforeunload",()=>{la.abort(),ds(),ru(),ur(),_r();for(const{instance:e}of Kt.values())try{Xn(e)}catch{}Kt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qs,{once:!0}):Qs(); //# sourceMappingURL=app.js.map diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte index 41acfe09..c60a5dd1 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte @@ -199,10 +199,14 @@ {#each model.groups as group (group.id)}
          -

          - {group.label} - {group.count} -

          +
          +

          + {group.label} + {#if group.tagline}{group.tagline}{/if} + {group.count} +

          + {#if group.use}

          {group.use}

          {/if} +
          {#each group.sections as section (section.id)} {#if section.label} diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js index 931986f5..ffe35645 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js @@ -59,6 +59,45 @@ const SEMANTIC_PREFIX_ORDER = [ const SET = (arr) => new Set(arr); const ALL_FAMILIES = SET([...BRAND_FAMILIES, ...STATUS_FAMILIES]); +/** + * Role + when-to-use copy per group, so the panel reads as a guided system + * rather than an anonymous swatch wall. `tagline` is the one-line role shown + * next to the group name; `use` is the short "reach for this when…" hint. + */ +export const FAMILY_INFO = { + primary: { tagline: 'Brand identity & main emphasis', use: 'Headlines, primary buttons, key brand moments.' }, + secondary: { tagline: 'Supporting brand tone', use: 'Secondary surfaces and muted brand accents.' }, + tertiary: { tagline: 'Accent / highlight', use: 'Badges, tags, decorative highlights.' }, + action: { tagline: 'Interactive & links', use: 'Links, focus rings, anything clickable.' }, + neutral: { tagline: 'Text, icons & dividers', use: 'Body text, borders, neutral UI chrome.' }, + base: { tagline: 'Page & surface backgrounds', use: 'Page background and raised surfaces.' }, + success: { tagline: 'Positive / confirmation', use: 'Success messages and valid state.' }, + warning: { tagline: 'Caution', use: 'Warnings and at-risk / pending state.' }, + error: { tagline: 'Form & validation errors', use: 'Invalid inputs and error messages.' }, + info: { tagline: 'Informational', use: 'Tips and neutral notices.' }, + danger: { tagline: 'Destructive actions', use: 'Delete / remove and irreversible actions.' }, + semantic: { tagline: 'Ready-made role tokens', use: 'Pre-wired roles that already adapt to light/dark.' }, +}; + +/** + * Purpose-based subsections for the catch-all Semantic group, in display + * order. The first matcher a token's key satisfies wins; anything unmatched + * collects into "Other". This is what lets a user scan "Text", "Surfaces", + * "Borders", "Links"… instead of one long alphabetical list. + */ +const SEMANTIC_SUBGROUPS = [ + { id: 'text-on', label: 'Text on color', match: (k) => k.startsWith('text--on') }, + { id: 'text', label: 'Text', match: (k) => k === 'text' || k === 'heading' || k.startsWith('text-') }, + // Interactive bg states (bg--hover/active/…) before surfaces so the plain + // surface tokens (bg, surface, well, raised, overlay, inverse) stay clean. + { id: 'state', label: 'Interactive states', match: (k) => k.startsWith('bg--') }, + { id: 'surface', label: 'Surfaces & backgrounds', match: (k) => ['bg', 'surface', 'well', 'raised', 'overlay', 'inverse'].some((p) => k === p || k.startsWith(p + '-')) }, + { id: 'border', label: 'Borders', match: (k) => k === 'border' || k.startsWith('border-') }, + { id: 'link', label: 'Links', match: (k) => k === 'link' || k.startsWith('link-') }, + { id: 'select', label: 'Selection & marks', match: (k) => k.startsWith('selection') || k.startsWith('mark') || k === 'dim' }, + { id: 'code', label: 'Code', match: (k) => k.startsWith('code') }, +]; + /** * Classify a single `--sf-color-*` variable. * @@ -259,11 +298,14 @@ export function buildColorModel(variables, light, dark) { if (alpha.length) sections.push({ id: 'alpha', label: 'Transparent', swatches: alpha.map((e) => e.swatch) }); if (alias.length) sections.push({ id: 'alias', label: 'Semantic', swatches: alias.map((e) => e.swatch) }); + const info = FAMILY_INFO[family] || {}; groups.push({ id: family, label: capitalize(family), type, count: entries.length, + tagline: info.tagline || '', + use: info.use || '', sections, }); }; @@ -273,12 +315,34 @@ export function buildColorModel(variables, light, dark) { if (semantic.length) { semantic.sort(compareSemantic); + + // Bucket the page-level tokens into purpose-based subsections so the + // group reads as "Text / Surfaces / Borders / Links / …" rather than one + // long list. Unmatched tokens fall to a trailing "Other" section. + const buckets = new Map(SEMANTIC_SUBGROUPS.map((g) => [g.id, []])); + const other = []; + for (const entry of semantic) { + const sub = SEMANTIC_SUBGROUPS.find((g) => g.match(entry.info.key)); + if (sub) buckets.get(sub.id).push(entry.swatch); + else other.push(entry.swatch); + } + + const sections = []; + for (const sub of SEMANTIC_SUBGROUPS) { + const swatches = buckets.get(sub.id); + if (swatches.length) sections.push({ id: sub.id, label: sub.label, swatches }); + } + if (other.length) sections.push({ id: 'other', label: 'Other', swatches: other }); + + const info = FAMILY_INFO.semantic || {}; groups.push({ id: 'semantic', label: 'Semantic', type: 'semantic', count: semantic.length, - sections: [{ id: 'all', label: '', swatches: semantic.map((e) => e.swatch) }], + tagline: info.tagline || '', + use: info.use || '', + sections, }); } diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css index ff4bad7b..dbeb6edc 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/styles/panel.css @@ -494,22 +494,37 @@ li[data-id]:focus-within > .rebemer-badge-host { .slashed-cp__group { padding: 10px 0 6px; border-bottom: 1px solid rgba(255, 255, 255, .05); } .slashed-cp__group:last-child { border-bottom: 0; } +.slashed-cp__group-head { margin: 0 0 8px; } .slashed-cp__group-title { display: flex; - align-items: center; + align-items: baseline; gap: 7px; - margin: 0 0 8px; + margin: 0; font-size: 11px; font-weight: 700; color: #fff; text-transform: capitalize; } +.slashed-cp__group-tag { + font-size: 10px; + font-weight: 500; + color: var(--rebemer-fg-muted); + text-transform: none; +} .slashed-cp__group-count { + margin-left: auto; font: 600 9px/1 var(--rebemer-font); color: var(--rebemer-fg-muted); background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 2px 6px; + text-transform: none; +} +.slashed-cp__group-use { + margin: 2px 0 0; + font-size: 10px; + line-height: 1.4; + color: var(--rebemer-fg-muted); } .slashed-cp__section-label { margin: 8px 0 5px; diff --git a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php index cb8c4689..87cc1fb5 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php +++ b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-color-resolver.php @@ -149,7 +149,7 @@ public static function resolve( $color_values ) { */ public static function resolve_dark( $color_values ) { $light_sources = self::resolve_sources( $color_values ); - $dark_sources = self::derive_dark_sources( $light_sources ); + $dark_sources = self::derive_dark_sources( $light_sources, $color_values ); // Alpha swatches composite over the dark base surface, not white, so // translucent tokens read the way they do on a dark page. @@ -229,18 +229,39 @@ private static function build_family_scales( $sources, $backdrop_rgb ) { } /** - * Derive per-family dark oklch sources from the light sources. - * - * Brand + status: clamp(0.65, 0.95 - l*0.5, 0.88) lightness, chroma * 0.9. - * Base inverts: clamp(0.16, 1.18 - l, 0.24) lightness, chroma * 0.5. + * Derive per-family dark oklch sources. + * + * Honours an explicit `--sf-color-{family}-dark` override exactly as the + * framework CSS does — `var(--sf-color-X-dark, )` — so a user who + * sets a custom dark colour (via the admin Dark-mode overrides, a theme, + * or hand-written CSS) sees that value previewed, not the auto-derivation. + * Only when no parseable override is present does it fall back to the + * framework formula: + * Brand + status: clamp(0.65, 0.95 - l*0.5, 0.88) lightness, chroma * 0.9. + * Base inverts: clamp(0.16, 1.18 - l, 0.24) lightness, chroma * 0.5. * (Matches the auto-derivation formulas in core/tokens.css.) * * @param array $light_sources Family => [L, C, H]. + * @param array $color_values Parsed values; may carry `-dark` overrides. * @return array */ - private static function derive_dark_sources( $light_sources ) { + private static function derive_dark_sources( $light_sources, $color_values = array() ) { $dark = array(); foreach ( $light_sources as $family => $lch ) { + // 1. Explicit per-mode override wins (matches the CSS fallback chain). + $override_key = '--sf-color-' . $family . '-dark'; + if ( isset( $color_values[ $override_key ] ) && '' !== trim( (string) $color_values[ $override_key ] ) ) { + $parsed = self::parse_oklch( $color_values[ $override_key ] ); + if ( null === $parsed ) { + $parsed = self::hex_to_oklch( $color_values[ $override_key ] ); + } + if ( null !== $parsed ) { + $dark[ $family ] = $parsed; + continue; + } + } + + // 2. Auto-derive from the light source. list( $l, $c, $h ) = $lch; if ( 'base' === $family ) { $dl = max( 0.16, min( 1.18 - $l, 0.24 ) ); diff --git a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php index 6fca260a..2ff86fcc 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php +++ b/plugins/SLASHED-for-WP/integrations/bricks/includes/class-inventory.php @@ -221,8 +221,14 @@ public static function get_color_hex_map_dark() { * Read admin-saved color overrides and map them to CSS variable names. * * Mirrors the mapping logic in Slashed_CSS_Generator::generate_color_declarations(): - * - brand_primary -> --sf-color-primary-light - * - status_success -> --sf-color-success-light + * - brand_primary -> --sf-color-primary-light + * - status_success -> --sf-color-success-light + * - brand_dark_primary -> --sf-color-primary-dark (when dark overrides on) + * - status_dark_success -> --sf-color-success-dark (when dark overrides on) + * + * Both the `-light` source and any explicit `-dark` override are returned + * so the light AND dark hex maps stay in sync with what the generated CSS + * actually emits — the dark resolver honours `-dark` over auto-derivation. * * @return array Map of CSS variable name to color value. */ @@ -236,17 +242,16 @@ private static function get_admin_color_overrides() { $settings = $tokens['colors']; $overrides = array(); - // Brand colors: brand_primary -> --sf-color-primary-light. - $brand_colors = array( 'primary', 'secondary', 'tertiary', 'action', 'neutral', 'base' ); + $brand_colors = array( 'primary', 'secondary', 'tertiary', 'action', 'neutral', 'base' ); + $status_colors = array( 'success', 'warning', 'error', 'info', 'danger' ); + + // Light source tokens: brand_primary -> --sf-color-primary-light. foreach ( $brand_colors as $color ) { $key = 'brand_' . $color; if ( ! empty( $settings[ $key ] ) && is_string( $settings[ $key ] ) ) { $overrides[ '--sf-color-' . $color . '-light' ] = $settings[ $key ]; } } - - // Status colors: status_success -> --sf-color-success-light. - $status_colors = array( 'success', 'warning', 'error', 'info', 'danger' ); foreach ( $status_colors as $color ) { $key = 'status_' . $color; if ( ! empty( $settings[ $key ] ) && is_string( $settings[ $key ] ) ) { @@ -254,6 +259,27 @@ private static function get_admin_color_overrides() { } } + // Explicit dark overrides — gated by the same flag the CSS generator + // uses, so the preview matches the emitted CSS. When the flag is off, + // dark stays auto-derived from the light source (no -dark keys emitted). + $dark_enabled = ! isset( $settings['dark_overrides_enabled'] ) + || '0' !== $settings['dark_overrides_enabled']; + + if ( $dark_enabled ) { + foreach ( $brand_colors as $color ) { + $key = 'brand_dark_' . $color; + if ( ! empty( $settings[ $key ] ) && is_string( $settings[ $key ] ) ) { + $overrides[ '--sf-color-' . $color . '-dark' ] = $settings[ $key ]; + } + } + foreach ( $status_colors as $color ) { + $key = 'status_dark_' . $color; + if ( ! empty( $settings[ $key ] ) && is_string( $settings[ $key ] ) ) { + $overrides[ '--sf-color-' . $color . '-dark' ] = $settings[ $key ]; + } + } + } + return $overrides; } diff --git a/tests/color-model.test.js b/tests/color-model.test.js index 660b052d..a5b0bf1d 100644 --- a/tests/color-model.test.js +++ b/tests/color-model.test.js @@ -15,6 +15,7 @@ import { swatchHex, BRAND_FAMILIES, STATUS_FAMILIES, + FAMILY_INFO, } from '../plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js'; describe('classifyVar', () => { @@ -160,6 +161,67 @@ describe('buildColorModel', () => { assert.equal(typeof f, 'string'); } }); + + test('groups carry role + when-to-use copy', () => { + const { groups } = buildColorModel(vars, light, dark); + const primary = groups.find((g) => g.id === 'primary'); + assert.equal(primary.tagline, FAMILY_INFO.primary.tagline); + assert.equal(primary.use, FAMILY_INFO.primary.use); + // every brand + status family has guidance defined. + for (const f of [...BRAND_FAMILIES, ...STATUS_FAMILIES, 'semantic']) { + assert.ok(FAMILY_INFO[f] && FAMILY_INFO[f].tagline && FAMILY_INFO[f].use, `missing info for ${f}`); + } + }); +}); + +describe('semantic subgrouping', () => { + const vars = [ + '--sf-color-text', + '--sf-color-text--muted', + '--sf-color-text--on-primary', + '--sf-color-bg', + '--sf-color-surface', + '--sf-color-bg--hover', + '--sf-color-border', + '--sf-color-border--subtle', + '--sf-color-link', + '--sf-color-link--hover', + '--sf-color-selection-bg', + '--sf-color-mark-bg', + '--sf-color-code-bg', + ]; + const light = Object.fromEntries(vars.map((v) => [v, '#abcabc'])); + const model = buildColorModel(vars, light, {}); + const semantic = model.groups.find((g) => g.id === 'semantic'); + + test('semantic group splits into purpose-based labelled sections', () => { + const ids = semantic.sections.map((s) => s.id); + // Order is fixed: text-on, text, state, surface, border, link, select, code. + assert.deepEqual(ids, ['text-on', 'text', 'state', 'surface', 'border', 'link', 'select', 'code']); + for (const s of semantic.sections) assert.ok(s.label, `section ${s.id} has a label`); + }); + + test('interactive bg states are separated from plain surfaces', () => { + const state = semantic.sections.find((s) => s.id === 'state'); + const surface = semantic.sections.find((s) => s.id === 'surface'); + assert.deepEqual(state.swatches.map((s) => s.var), ['--sf-color-bg--hover']); + assert.deepEqual( + surface.swatches.map((s) => s.var).sort(), + ['--sf-color-bg', '--sf-color-surface'] + ); + }); + + test('text-on-color is its own section, separate from Text', () => { + const on = semantic.sections.find((s) => s.id === 'text-on'); + const text = semantic.sections.find((s) => s.id === 'text'); + assert.deepEqual(on.swatches.map((s) => s.var), ['--sf-color-text--on-primary']); + assert.ok(text.swatches.every((s) => !s.var.includes('--on-'))); + }); + + test('section counts roll up to the group count', () => { + const total = semantic.sections.reduce((n, s) => n + s.swatches.length, 0); + assert.equal(total, semantic.count); + }); }); describe('filterModel', () => { From 89be8cd43a6471c8313d9cedb2037f3a382d0e8d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 2 Jun 2026 04:27:48 +0000 Subject: [PATCH 3/3] refactor(bricks): address PR #193 review feedback - color-model: drop the unused SCALE_STEPS constant (CodeQL dead-code); add a deterministic lexical tiebreaker for unranked aliases; note the JS/PHP family-list mirror so the three definitions stay in sync. - bricks-api: clarify that setElementColor intentionally writes a minimal { raw } object (Bricks can't resolve a CSS var to hex/hsl/rgb at edit time), rather than implying it preserves sibling fields. - ColorPanel: when an element is selected but apply fails (e.g. a stale id from the DOM fallback), say so instead of the generic copy-only toast. https://claude.ai/code/session_01HPTgyrXeZBfqrwFpa78d3F --- .../integrations/bricks/assets/editor-app/app.js | 8 ++++---- .../editor-app/src/components/ColorPanel.svelte | 10 ++++++++-- .../bricks/editor-app/src/lib/bricks-api.js | 6 ++++-- .../bricks/editor-app/src/lib/color-model.js | 13 +++++++++---- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js index 9115d546..e10a926b 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.js @@ -1,9 +1,9 @@ -var ha=Object.defineProperty;var Ts=e=>{throw TypeError(e)};var _a=(e,t,n)=>t in e?ha(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>_a(e,typeof t!="symbol"?t+"":t,n),Br=(e,t,n)=>t.has(e)||Ts("Cannot "+n);var u=(e,t,n)=>(Br(e,t,"read from private field"),n?n.call(e):t.get(e)),O=(e,t,n)=>t.has(e)?Ts("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),T=(e,t,n,r)=>(Br(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(Br(e,t,"access private method"),n);var _s=Array.isArray,pa=Array.prototype.indexOf,Ft=Array.prototype.includes,Or=Array.from,va=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,ga=Object.getOwnPropertyDescriptors,ma=Object.prototype,ba=Array.prototype,ni=Object.getPrototypeOf,Os=Object.isExtensible;const ya=()=>{};function wa(e){for(var t=0;t{e=r,t=s});return{promise:n,resolve:e,reject:t}}const fe=2,mn=4,Mr=8,si=1<<24,We=16,ze=32,St=64,Vr=128,Pe=512,oe=1024,ue=2048,$e=4096,pe=8192,De=16384,Yt=32768,Yr=1<<25,bn=65536,pr=1<<17,ka=1<<18,En=1<<19,Ea=1<<20,Ze=1<<25,Ut=65536,vr=1<<21,un=1<<22,kt=1<<23,Bt=Symbol("$state"),Sa=Symbol("legacy props"),Ca=Symbol(""),rr=Symbol("attributes"),Jr=Symbol("class"),Xr=Symbol("style"),On=Symbol("text"),sr=Symbol("form reset"),Ir=new class extends Error{constructor(){super(...arguments);ge(this,"name","StaleReactionError");ge(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function xa(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Aa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ta(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Oa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ma(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ia(e){throw new Error("https://svelte.dev/e/effect_orphan")}function La(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ra(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Na(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Da(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ba=1,ja=2,ii=4,Ha=8,qa=16,Wa=1,Ka=4,Ua=8,za=16,Ga=1,Va=2,ae=Symbol("uninitialized"),ai="http://www.w3.org/1999/xhtml";function Ya(){console.warn("https://svelte.dev/e/derived_inert")}function Ja(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Xa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function oi(e){return e===this.v}function Za(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function li(e){return!Za(e,this.v)}let ke=null;function yn(e){ke=e}function Jt(e,t=!1,n){ke={p:ke,i:!1,c:null,e:null,s:e,x:null,r:B,l:null}}function Xt(e){var t=ke,n=t.e;if(n!==null){t.e=null;for(var r of n)Oi(r)}return t.i=!0,ke=t.p,{}}function ci(){return!0}let Tt=[];function ui(){var e=Tt;Tt=[],wa(e)}function Et(e){if(Tt.length===0&&!Rn){var t=Tt;queueMicrotask(()=>{t===Tt&&ui()})}Tt.push(e)}function Qa(){for(;Tt.length>0;)ui()}function fi(e){var t=B;if(t===null)return F.f|=kt,e;if((t.f&Yt)===0&&(t.f&mn)===0)throw e;yt(e,t)}function yt(e,t){for(;t!==null;){if((t.f&Vr)!==0){if((t.f&Yt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const $a=-7169;function ne(e,t){e.f=e.f&$a|t}function ps(e){(e.f&Pe)!==0||e.deps===null?ne(e,oe):ne(e,$e)}function di(e){if(e!==null)for(const t of e)(t.f&fe)===0||(t.f&Ut)===0||(t.f^=Ut,di(t.deps))}function hi(e,t,n){(e.f&ue)!==0?t.add(e):(e.f&$e)!==0&&n.add(e),di(e.deps),ne(e,oe)}let $n=!1;function eo(e){var t=$n;try{return $n=!1,[e(),$n]}finally{$n=t}}let jr=null,sn=null,L=null,Zr=null,Ke=null,Qr=null,Rn=!1,Hr=!1,on=null,ir=null;var Ms=0;let to=1;var dn,gt,It,hn,_n,Lt,pn,st,Wn,Se,Kn,mt,Ye,Je,vn,Rt,q,$r,Mn,es,_i,pi,ar,no,ts,an;const xr=class xr{constructor(){O(this,q);ge(this,"id",to++);O(this,dn,!1);ge(this,"linked",!0);O(this,gt,null);O(this,It,null);ge(this,"async_deriveds",new Map);ge(this,"current",new Map);ge(this,"previous",new Map);ge(this,"unblocked",new Set);O(this,hn,new Set);O(this,_n,new Set);O(this,Lt,new Set);O(this,pn,0);O(this,st,new Map);O(this,Wn,null);O(this,Se,[]);O(this,Kn,[]);O(this,mt,new Set);O(this,Ye,new Set);O(this,Je,new Map);O(this,vn,new Set);ge(this,"is_fork",!1);O(this,Rt,!1)}skip_effect(t){u(this,Je).has(t)||u(this,Je).set(t,{d:[],m:[]}),u(this,vn).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=u(this,Je).get(t);if(r){u(this,Je).delete(t);for(var s of r.d)ne(s,ue),n(s);for(s of r.m)ne(s,$e),n(s)}u(this,vn).add(t)}capture(t,n,r=!1){t.v!==ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&kt)===0&&(this.current.set(t,[n,r]),Ke?.set(t,n)),this.is_fork||(t.v=n)}activate(){L=this}deactivate(){L=null,Ke=null}flush(){try{Hr=!0,L=this,H(this,q,Mn).call(this)}finally{Ms=0,Qr=null,on=null,ir=null,Hr=!1,L=null,Ke=null,jt.clear()}}discard(){for(const t of u(this,_n))t(this);u(this,_n).clear(),u(this,Lt).clear(),H(this,q,an).call(this)}register_created_effect(t){u(this,Kn).push(t)}increment(t,n){if(T(this,pn,u(this,pn)+1),t){let r=u(this,st).get(n)??0;u(this,st).set(n,r+1)}}decrement(t,n){if(T(this,pn,u(this,pn)-1),t){let r=u(this,st).get(n)??0;r===1?u(this,st).delete(n):u(this,st).set(n,r-1)}u(this,Rt)||(T(this,Rt,!0),Et(()=>{T(this,Rt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)u(this,mt).add(r);for(const r of n)u(this,Ye).add(r);t.clear(),n.clear()}oncommit(t){u(this,hn).add(t)}ondiscard(t){u(this,_n).add(t)}on_fork_commit(t){u(this,Lt).add(t)}run_fork_commit_callbacks(){for(const t of u(this,Lt))t(this);u(this,Lt).clear()}settled(){return(u(this,Wn)??T(this,Wn,ri())).promise}static ensure(){var t;if(L===null){const n=L=new xr;H(t=n,q,ts).call(t),!Hr&&!Rn&&Et(()=>{u(n,dn)||n.flush()})}return L}apply(){{Ke=null;return}}schedule(t){if(Qr=t,t.b?.is_pending&&(t.f&(mn|Mr|si))!==0&&(t.f&Yt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(on!==null&&n===B&&(F===null||(F.f&fe)===0))return;if((r&(St|ze))!==0){if((r&oe)===0)return;n.f^=oe}}u(this,Se).push(n)}};dn=new WeakMap,gt=new WeakMap,It=new WeakMap,hn=new WeakMap,_n=new WeakMap,Lt=new WeakMap,pn=new WeakMap,st=new WeakMap,Wn=new WeakMap,Se=new WeakMap,Kn=new WeakMap,mt=new WeakMap,Ye=new WeakMap,Je=new WeakMap,vn=new WeakMap,Rt=new WeakMap,q=new WeakSet,$r=function(){if(this.is_fork)return!0;for(const r of u(this,st).keys()){for(var t=r,n=!1;t.parent!==null;){if(u(this,Je).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Mn=function(){var l,f,h;if(T(this,dn,!0),Ms++>1e3&&(H(this,q,an).call(this),so()),!H(this,q,$r).call(this)){for(const c of u(this,mt))u(this,Ye).delete(c),ne(c,ue),this.schedule(c);for(const c of u(this,Ye))ne(c,$e),this.schedule(c)}const t=u(this,Se);T(this,Se,[]),this.apply();var n=on=[],r=[],s=ir=[];for(const c of t)try{H(this,q,es).call(this,c,n,r)}catch(d){throw mi(c),d}if(L=null,s.length>0){var i=xr.ensure();for(const c of s)i.schedule(c)}if(on=null,ir=null,H(this,q,$r).call(this)){H(this,q,ar).call(this,r),H(this,q,ar).call(this,n);for(const[c,d]of u(this,Je))gi(c,d);s.length>0&&H(l=L,q,Mn).call(l);return}const a=H(this,q,_i).call(this);if(a){H(f=a,q,pi).call(f,this);return}u(this,mt).clear(),u(this,Ye).clear();for(const c of u(this,hn))c(this);u(this,hn).clear(),Zr=this,Is(r),Is(n),Zr=null,u(this,Wn)?.resolve();var o=L;if(this.linked&&u(this,pn)===0&&H(this,q,an).call(this),u(this,Se).length>0){o===null&&(o=this,H(this,q,ts).call(this));const c=o;u(c,Se).push(...u(this,Se).filter(d=>!u(c,Se).includes(d)))}o!==null&&H(h=o,q,Mn).call(h)},es=function(t,n,r){t.f^=oe;for(var s=t.first;s!==null;){var i=s.f,a=(i&(ze|St))!==0,o=a&&(i&oe)!==0,l=o||(i&pe)!==0||u(this,Je).has(s);if(!l&&s.fn!==null){a?s.f^=oe:(i&mn)!==0?n.push(s):Jn(s)&&((i&We)!==0&&u(this,Ye).add(s),kn(s));var f=s.first;if(f!==null){s=f;continue}}for(;s!==null;){var h=s.next;if(h!==null){s=h;break}s=s.parent}}},_i=function(){for(var t=u(this,gt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=u(t,gt)}return null},pi=function(t){var r;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const a=this.async_deriveds.get(s);a&&i.promise.then(a.resolve)}const n=s=>{var i=s.reactions;if(i!==null)for(const l of i){var a=l.f;if((a&fe)!==0)n(l);else{var o=l;a&(un|We)&&!this.async_deriveds.has(o)&&(u(this,Ye).delete(o),ne(o,ue),this.schedule(o))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),H(r=t,q,an).call(r),L=this,H(this,q,Mn).call(this)},ar=function(t){for(var n=0;n!this.current.has(d));if(s.length===0)t&&c.discard();else if(n.length>0){if(t)for(const d of u(this,vn))c.unskip_effect(d,p=>{var v;(p.f&(We|un))!==0?c.schedule(p):H(v=c,q,ar).call(v,[p])});c.activate();var i=new Set,a=new Map;for(var o of n)vi(o,s,i,a);a=new Map;var l=[...c.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(l.length>0)for(const d of u(this,Kn))(d.f&(De|pe|pr))===0&&vs(d,l,a)&&((d.f&(un|We))!==0?(ne(d,ue),c.schedule(d)):u(c,mt).add(d));if(u(c,Se).length>0&&!u(c,Rt)){c.apply();for(var f of u(c,Se))H(h=c,q,es).call(h,f,[],[]);T(c,Se,[])}c.deactivate()}}}},ts=function(){sn===null?jr=sn=this:(T(sn,It,this),T(this,gt,sn)),sn=this},an=function(){var t=u(this,gt),n=u(this,It);t===null?jr=n:T(t,It,n),n===null?sn=t:T(n,gt,t),this.linked=!1};let zt=xr;function ro(e){var t=Rn;Rn=!0;try{for(var n;;){if(Qa(),L===null)return n;L.flush()}}finally{Rn=t}}function so(){try{La()}catch(e){yt(e,Qr)}}let rt=null;function Is(e){var t=e.length;if(t!==0){for(var n=0;n0)){jt.clear();for(const s of rt){if((s.f&(De|pe))!==0)continue;const i=[s];let a=s.parent;for(;a!==null;)rt.has(a)&&(rt.delete(a),i.push(a)),a=a.parent;for(let o=i.length-1;o>=0;o--){const l=i[o];(l.f&(De|pe))===0&&kn(l)}}rt.clear()}}rt=null}}function vi(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&fe)!==0?vi(s,t,n,r):(i&(un|We))!==0&&(i&ue)===0&&vs(s,t,r)&&(ne(s,ue),gs(s))}}function vs(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(Ft.call(t,s))return!0;if((s.f&fe)!==0&&vs(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function gs(e){L.schedule(e)}function gi(e,t){if(!((e.f&ze)!==0&&(e.f&oe)!==0)){(e.f&ue)!==0?t.d.push(e):(e.f&$e)!==0&&t.m.push(e),ne(e,oe);for(var n=e.first;n!==null;)gi(n,t),n=n.next}}function mi(e){ne(e,oe);for(var t=e.first;t!==null;)mi(t),t=t.next}function io(e){let t=0,n=Gt(0),r;return()=>{ys()&&(_(n),Rr(()=>(t===0&&(r=Sn(()=>e(()=>Nn(n)))),t+=1,()=>{Et(()=>{t-=1,t===0&&(r?.(),r=void 0,Nn(n))})})))}}var ao=bn|En;function oo(e,t,n,r){new lo(e,t,n,r)}var Ie,hs,Le,Nt,me,Re,_e,Ce,it,Pt,bt,gn,Un,zn,at,Ar,re,co,uo,fo,ns,or,lr,rs,ss;class lo{constructor(t,n,r,s){O(this,re);ge(this,"parent");ge(this,"is_pending",!1);ge(this,"transform_error");O(this,Ie);O(this,hs,null);O(this,Le);O(this,Nt);O(this,me);O(this,Re,null);O(this,_e,null);O(this,Ce,null);O(this,it,null);O(this,Pt,0);O(this,bt,0);O(this,gn,!1);O(this,Un,new Set);O(this,zn,new Set);O(this,at,null);O(this,Ar,io(()=>(T(this,at,Gt(u(this,Pt))),()=>{T(this,at,null)})));T(this,Ie,t),T(this,Le,n),T(this,Nt,i=>{var a=B;a.b=this,a.f|=Vr,r(i)}),this.parent=B.b,this.transform_error=s??this.parent?.transform_error??(i=>i),T(this,me,Es(()=>{H(this,re,ns).call(this)},ao))}defer_effect(t){hi(t,u(this,Un),u(this,zn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!u(this,Le).pending}update_pending_count(t,n){H(this,re,rs).call(this,t,n),T(this,Pt,u(this,Pt)+t),!(!u(this,at)||u(this,gn))&&(T(this,gn,!0),Et(()=>{T(this,gn,!1),u(this,at)&&wn(u(this,at),u(this,Pt))}))}get_effect_pending(){return u(this,Ar).call(this),_(u(this,at))}error(t){if(!u(this,Le).onerror&&!u(this,Le).failed)throw t;L?.is_fork?(u(this,Re)&&L.skip_effect(u(this,Re)),u(this,_e)&&L.skip_effect(u(this,_e)),u(this,Ce)&&L.skip_effect(u(this,Ce)),L.on_fork_commit(()=>{H(this,re,ss).call(this,t)})):H(this,re,ss).call(this,t)}}Ie=new WeakMap,hs=new WeakMap,Le=new WeakMap,Nt=new WeakMap,me=new WeakMap,Re=new WeakMap,_e=new WeakMap,Ce=new WeakMap,it=new WeakMap,Pt=new WeakMap,bt=new WeakMap,gn=new WeakMap,Un=new WeakMap,zn=new WeakMap,at=new WeakMap,Ar=new WeakMap,re=new WeakSet,co=function(){try{T(this,Re,Ne(()=>u(this,Nt).call(this,u(this,Ie))))}catch(t){this.error(t)}},uo=function(t){const n=u(this,Le).failed;n&&T(this,Ce,Ne(()=>{n(u(this,Ie),()=>t,()=>()=>{})}))},fo=function(){const t=u(this,Le).pending;t&&(this.is_pending=!0,T(this,_e,Ne(()=>t(u(this,Ie)))),Et(()=>{var n=T(this,it,document.createDocumentFragment()),r=lt();n.append(r),T(this,Re,H(this,re,lr).call(this,()=>Ne(()=>u(this,Nt).call(this,r)))),u(this,bt)===0&&(u(this,Ie).before(n),T(this,it,null),Ht(u(this,_e),()=>{T(this,_e,null)}),H(this,re,or).call(this,L))}))},ns=function(){try{if(this.is_pending=this.has_pending_snippet(),T(this,bt,0),T(this,Pt,0),T(this,Re,Ne(()=>{u(this,Nt).call(this,u(this,Ie))})),u(this,bt)>0){var t=T(this,it,document.createDocumentFragment());xs(u(this,Re),t);const n=u(this,Le).pending;T(this,_e,Ne(()=>n(u(this,Ie))))}else H(this,re,or).call(this,L)}catch(n){this.error(n)}},or=function(t){this.is_pending=!1,t.transfer_effects(u(this,Un),u(this,zn))},lr=function(t){var n=B,r=F,s=ke;et(u(this,me)),Be(u(this,me)),yn(u(this,me).ctx);try{return zt.ensure(),t()}catch(i){return fi(i),null}finally{et(n),Be(r),yn(s)}},rs=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&H(r=this.parent,re,rs).call(r,t,n);return}T(this,bt,u(this,bt)+t),u(this,bt)===0&&(H(this,re,or).call(this,n),u(this,_e)&&Ht(u(this,_e),()=>{T(this,_e,null)}),u(this,it)&&(u(this,Ie).before(u(this,it)),T(this,it,null)))},ss=function(t){u(this,Re)&&(we(u(this,Re)),T(this,Re,null)),u(this,_e)&&(we(u(this,_e)),T(this,_e,null)),u(this,Ce)&&(we(u(this,Ce)),T(this,Ce,null));var n=u(this,Le).onerror;let r=u(this,Le).failed;var s=!1,i=!1;const a=()=>{if(s){Xa();return}s=!0,i&&Fa(),u(this,Ce)!==null&&Ht(u(this,Ce),()=>{T(this,Ce,null)}),H(this,re,lr).call(this,()=>{H(this,re,ns).call(this)})},o=l=>{try{i=!0,n?.(l,a),i=!1}catch(f){yt(f,u(this,me)&&u(this,me).parent)}r&&T(this,Ce,H(this,re,lr).call(this,()=>{try{return Ne(()=>{var f=B;f.b=this,f.f|=Vr,r(u(this,Ie),()=>l,()=>a)})}catch(f){return yt(f,u(this,me).parent),null}}))};Et(()=>{var l;try{l=this.transform_error(t)}catch(f){yt(f,u(this,me)&&u(this,me).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(o,f=>yt(f,u(this,me)&&u(this,me).parent)):o(l)})};function ho(e,t,n,r){const s=Hn;var i=e.filter(d=>!d.settled);if(n.length===0&&i.length===0){r(t.map(s));return}var a=B,o=_o(),l=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function f(d){if((a.f&De)===0){o();try{r(d)}catch(p){yt(p,a)}gr()}}var h=bi();if(n.length===0){l.then(()=>f(t.map(s))).finally(h);return}function c(){Promise.all(n.map(d=>po(d))).then(d=>f([...t.map(s),...d])).catch(d=>yt(d,a)).finally(h)}l?l.then(()=>{o(),c(),gr()}):c()}function _o(){var e=B,t=F,n=ke,r=L;return function(i=!0){et(e),Be(t),yn(n),i&&(e.f&De)===0&&(r?.activate(),r?.apply())}}function gr(e=!0){et(null),Be(null),yn(null),e&&L?.deactivate()}function bi(){var e=B,t=e.b,n=L,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function Hn(e){var t=fe|ue;return B!==null&&(B.f|=En),{ctx:ke,deps:null,effects:null,equals:oi,f:t,fn:e,reactions:null,rv:0,v:ae,wv:0,parent:B,ac:null}}const er=Symbol("obsolete");function po(e,t,n){let r=B;r===null&&Aa();var s=void 0,i=Gt(ae),a=!F,o=new Set;return To(()=>{var l=B,f=ri();s=f.promise;try{Promise.resolve(e()).then(f.resolve,p=>{p!==Ir&&f.reject(p)}).finally(gr)}catch(p){f.reject(p),gr()}var h=L;if(a){if((l.f&Yt)!==0)var c=bi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(er);else for(const p of o.values())p.reject(er);o.add(f),h.async_deriveds.set(l,f)}const d=(p,v=void 0)=>{c?.(),o.delete(f),v!==er&&(h.activate(),v?(i.f|=kt,wn(i,v)):((i.f&kt)!==0&&(i.f^=kt),wn(i,p)),h.deactivate())};f.promise.then(d,p=>d(null,p||"unknown"))}),ws(()=>{for(const l of o)l.reject(er)}),new Promise(l=>{function f(h){function c(){h===s?l(i):f(s)}h.then(c,c)}f(s)})}function le(e){const t=Hn(e);return Pi(t),t}function yi(e){const t=Hn(e);return t.equals=li,t}function vo(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!Ei&&bo()}return t}function bo(){Ei=!1;for(const e of mr){(e.f&oe)!==0&&ne(e,$e);let t;try{t=Jn(e)}catch{t=!0}t&&kn(e)}mr.clear()}function Nn(e){J(e,e.v+1)}function Si(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,i=0;i{if(qt===i)return o();var l=F,f=qt;Be(null),Ps(i);var h=o();return Be(l),Ps(f),h};return r&&n.set("length",ie(e.length)),new Proxy(e,{defineProperty(o,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Na();var h=n.get(l);return h===void 0?a(()=>{var c=ie(f.value);return n.set(l,c),c}):J(h,f.value,!0),!0},deleteProperty(o,l){var f=n.get(l);if(f===void 0){if(l in o){const h=a(()=>ie(ae));n.set(l,h),Nn(s)}}else J(f,ae),Nn(s);return!0},get(o,l,f){if(l===Bt)return e;var h=n.get(l),c=l in o;if(h===void 0&&(!c||cn(o,l)?.writable)&&(h=a(()=>{var p=wt(c?o[l]:ae),v=ie(p);return v}),n.set(l,h)),h!==void 0){var d=_(h);return d===ae?void 0:d}return Reflect.get(o,l,f)},getOwnPropertyDescriptor(o,l){var f=Reflect.getOwnPropertyDescriptor(o,l);if(f&&"value"in f){var h=n.get(l);h&&(f.value=_(h))}else if(f===void 0){var c=n.get(l),d=c?.v;if(c!==void 0&&d!==ae)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(o,l){if(l===Bt)return!0;var f=n.get(l),h=f!==void 0&&f.v!==ae||Reflect.has(o,l);if(f!==void 0||B!==null&&(!h||cn(o,l)?.writable)){f===void 0&&(f=a(()=>{var d=h?wt(o[l]):ae,p=ie(d);return p}),n.set(l,f));var c=_(f);if(c===ae)return!1}return h},set(o,l,f,h){var c=n.get(l),d=l in o;if(r&&l==="length")for(var p=f;pie(ae)),n.set(p+"",v))}if(c===void 0)(!d||cn(o,l)?.writable)&&(c=a(()=>ie(void 0)),J(c,wt(f)),n.set(l,c));else{d=c.v!==ae;var y=a(()=>wt(f));J(c,y)}var g=Reflect.getOwnPropertyDescriptor(o,l);if(g?.set&&g.set.call(h,f),!d){if(r&&typeof l=="string"){var m=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=m.v&&J(m,w+1)}Nn(s)}return!0},ownKeys(o){_(s);var l=Reflect.ownKeys(o).filter(c=>{var d=n.get(c);return d===void 0||d.v!==ae});for(var[f,h]of n)h.v!==ae&&!(f in o)&&l.push(f);return l},setPrototypeOf(){Pa()}})}function Ls(e){try{if(e!==null&&typeof e=="object"&&Bt in e)return e[Bt]}catch{}return e}function yo(e,t){return Object.is(Ls(e),Ls(t))}var br,Ci,xi,Ai;function wo(){if(br===void 0){br=window,Ci=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;xi=cn(t,"firstChild").get,Ai=cn(t,"nextSibling").get,Os(e)&&(e[Jr]=void 0,e[rr]=null,e[Xr]=void 0,e.__e=void 0),Os(n)&&(n[On]=void 0)}}function lt(e=""){return document.createTextNode(e)}function yr(e){return xi.call(e)}function Yn(e){return Ai.call(e)}function E(e,t){return yr(e)}function ct(e,t=!1){{var n=yr(e);return n instanceof Comment&&n.data===""?Yn(n):n}}function S(e,t=1,n=!1){let r=e;for(;t--;)r=Yn(r);return r}function ko(e){e.textContent=""}function Ti(){return!1}function Eo(e,t,n){return document.createElementNS(ai,e,void 0)}let Rs=!1;function So(){Rs||(Rs=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[sr]?.()})},{capture:!0}))}function Lr(e){var t=F,n=B;Be(null),et(null);try{return e()}finally{Be(t),et(n)}}function bs(e,t,n,r=n){e.addEventListener(t,()=>Lr(n));const s=e[sr];s?e[sr]=()=>{s(),r(!0)}:e[sr]=()=>r(!0),So()}function Co(e){B===null&&(F===null&&Ia(),Ma()),ut&&Oa()}function xo(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ft(e,t){var n=B;n!==null&&(n.f&pe)!==0&&(e|=pe);var r={ctx:ke,deps:null,nodes:null,f:e|ue|Pe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};L?.register_created_effect(r);var s=r;if((e&mn)!==0)on!==null?on.push(r):zt.ensure().schedule(r);else if(t!==null){try{kn(r)}catch(a){throw we(r),a}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&En)===0&&(s=s.first,(e&We)!==0&&(e&bn)!==0&&s!==null&&(s.f|=bn))}if(s!==null&&(s.parent=n,n!==null&&xo(s,n),F!==null&&(F.f&fe)!==0&&(e&St)===0)){var i=F;(i.effects??(i.effects=[])).push(s)}return r}function ys(){return F!==null&&!Ue}function ws(e){const t=ft(Mr,null);return ne(t,oe),t.teardown=e,t}function ks(e){Co();var t=B.f,n=!F&&(t&ze)!==0&&(t&Yt)===0;if(n){var r=ke;(r.e??(r.e=[])).push(e)}else return Oi(e)}function Oi(e){return ft(mn|Ea,e)}function Ao(e){zt.ensure();const t=ft(St|En,e);return(n={})=>new Promise(r=>{n.outro?Ht(t,()=>{we(t),r(void 0)}):(we(t),r(void 0))})}function Mi(e){return ft(mn,e)}function To(e){return ft(un|En,e)}function Rr(e,t=0){return ft(Mr|t,e)}function Y(e,t=[],n=[],r=[]){ho(r,t,n,s=>{ft(Mr,()=>e(...s.map(_)))})}function Es(e,t=0){var n=ft(We|t,e);return n}function Ne(e){return ft(ze|En,e)}function Ii(e){var t=e.teardown;if(t!==null){const n=ut,r=F;Ns(!0),Be(null);try{t.call(null)}finally{Ns(n),Be(r)}}}function Ss(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Lr(()=>{s.abort(Ir)});var r=n.next;(n.f&St)!==0?n.parent=null:we(n,t),n=r}}function Oo(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ze)===0&&we(t),t=n}}function we(e,t=!0){var n=!1;(t||(e.f&ka)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Mo(e.nodes.start,e.nodes.end),n=!0),ne(e,Yr),Ss(e,t&&!n),qn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Ii(e),e.f^=Yr,e.f|=De;var s=e.parent;s!==null&&s.first!==null&&Li(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Mo(e,t){for(;e!==null;){var n=e===t?null:Yn(e);e.remove(),e=n}}function Li(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ht(e,t,n=!0){var r=[];Ri(e,r,!0);var s=()=>{n&&we(e),t&&t()},i=r.length;if(i>0){var a=()=>--i||s();for(var o of r)o.out(a)}else s()}function Ri(e,t,n){if((e.f&pe)===0){e.f^=pe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var i=s.next;if((s.f&St)===0){var a=(s.f&bn)!==0||(s.f&ze)!==0&&(e.f&We)!==0;Ri(s,t,a?n:!1)}s=i}}}function Cs(e){Ni(e,!0)}function Ni(e,t){if((e.f&pe)!==0){e.f^=pe,(e.f&oe)===0&&(ne(e,ue),zt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&bn)!==0||(n.f&ze)!==0;Ni(n,s?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||t)&&a.in()}}function xs(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Yn(n);t.append(n),n=s}}let cr=!1,ut=!1;function Ns(e){ut=e}let F=null,Ue=!1;function Be(e){F=e}let B=null;function et(e){B=e}let Fe=null;function Pi(e){F!==null&&(Fe===null?Fe=[e]:Fe.push(e))}let be=null,Ee=0,Me=null;function Io(e){Me=e}let Di=1,Ot=0,qt=Ot;function Ps(e){qt=e}function Fi(){return++Di}function Jn(e){var t=e.f;if((t&ue)!==0)return!0;if(t&fe&&(e.f&=~Ut),(t&$e)!==0){for(var n=e.deps,r=n.length,s=0;se.wv)return!0}(t&Pe)!==0&&Ke===null&&ne(e,oe)}return!1}function Bi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Fe!==null&&Ft.call(Fe,e)))for(var s=0;s{e.ac.abort(Ir)}),e.ac=null);try{e.f|=vr;var h=e.fn,c=h();e.f|=Yt;var d=e.deps,p=L?.is_fork;if(be!==null){var v;if(p||qn(e,Ee),d!==null&&Ee>0)for(d.length=Ee+be.length,v=0;vn?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Et(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ki(e,t,n,r,s){var i={capture:r,passive:s},a=Do(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ws(()=>{t.removeEventListener(e,a,i)})}function Ae(e,t,n){(t[Mt]??(t[Mt]={}))[e]=n}function Zt(e){for(var t=0;t{throw g});throw d}}finally{e[Mt]=t,delete e.currentTarget,Be(h),et(c)}}}const Fo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Bo(e){return Fo?.createHTML(e)??e}function jo(e){var t=Eo("template");return t.innerHTML=Bo(e.replaceAll("","")),t.content}function wr(e,t){var n=B;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function P(e,t){var n=(t&Ga)!==0,r=(t&Va)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=jo(i?e:""+e),n||(s=yr(s)));var a=r||Ci?document.importNode(s,!0):s.cloneNode(!0);if(n){var o=yr(a),l=a.lastChild;wr(o,l)}else wr(a,a);return a}}function Ho(e=""){{var t=lt(e+"");return wr(t,t),t}}function qo(){var e=document.createDocumentFragment(),t=document.createComment(""),n=lt();return e.append(t,n),wr(t,n),e}function R(e,t){e!==null&&e.before(t)}function Z(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[On]??(e[On]=e.nodeValue))&&(e[On]=n,e.nodeValue=`${n}`)}function As(e,t){return Wo(e,t)}const tr=new Map;function Wo(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:a=!0,transformError:o}){wo();var l=void 0,f=Ao(()=>{var h=n??t.appendChild(lt());oo(h,{pending:()=>{}},p=>{Jt({});var v=ke;i&&(v.c=i),s&&(r.$$events=s),l=e(p,r)||{},Xt()},o);var c=new Set,d=p=>{for(var v=0;v{for(var p of c)for(const g of[t,document]){var v=tr.get(g),y=v.get(p);--y==0?(g.removeEventListener(p,as),v.delete(p),v.size===0&&tr.delete(g)):v.set(p,y)}is.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return os.set(l,f),l}let os=new WeakMap;function Xn(e,t){const n=os.get(e);return n?(os.delete(e),n(t)):Promise.resolve()}var qe,Xe,xe,Dt,Gn,Vn,Tr;class Ko{constructor(t,n=!0){ge(this,"anchor");O(this,qe,new Map);O(this,Xe,new Map);O(this,xe,new Map);O(this,Dt,new Set);O(this,Gn,!0);O(this,Vn,t=>{if(u(this,qe).has(t)){var n=u(this,qe).get(t),r=u(this,Xe).get(n);if(r)Cs(r),u(this,Dt).delete(n);else{var s=u(this,xe).get(n);s&&(u(this,Xe).set(n,s.effect),u(this,xe).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,a]of u(this,qe)){if(u(this,qe).delete(i),i===t)break;const o=u(this,xe).get(a);o&&(we(o.effect),u(this,xe).delete(a))}for(const[i,a]of u(this,Xe)){if(i===n||u(this,Dt).has(i))continue;const o=()=>{if(Array.from(u(this,qe).values()).includes(i)){var f=document.createDocumentFragment();xs(a,f),f.append(lt()),u(this,xe).set(i,{effect:a,fragment:f})}else we(a);u(this,Dt).delete(i),u(this,Xe).delete(i)};u(this,Gn)||!r?(u(this,Dt).add(i),Ht(a,o,!1)):o()}}});O(this,Tr,t=>{u(this,qe).delete(t);const n=Array.from(u(this,qe).values());for(const[r,s]of u(this,xe))n.includes(r)||(we(s.effect),u(this,xe).delete(r))});this.anchor=t,T(this,Gn,n)}ensure(t,n){var r=L,s=Ti();if(n&&!u(this,Xe).has(t)&&!u(this,xe).has(t))if(s){var i=document.createDocumentFragment(),a=lt();i.append(a),u(this,xe).set(t,{effect:Ne(()=>n(a)),fragment:i})}else u(this,Xe).set(t,Ne(()=>n(this.anchor)));if(u(this,qe).set(r,t),s){for(const[o,l]of u(this,Xe))o===t?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of u(this,xe))o===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(u(this,Vn)),r.ondiscard(u(this,Tr))}else u(this,Vn).call(this,r)}}qe=new WeakMap,Xe=new WeakMap,xe=new WeakMap,Dt=new WeakMap,Gn=new WeakMap,Vn=new WeakMap,Tr=new WeakMap;function $(e,t,n=!1){var r=new Ko(e),s=n?bn:0;function i(a,o){r.ensure(a,o)}Es(()=>{var a=!1;t((o,l=0)=>{a=!0,i(l,o)}),a||i(-1,null)},s)}function Uo(e,t){return t}function zo(e,t,n){for(var r=[],s=t.length,i,a=t.length,o=0;o{if(i){if(i.pending.delete(c),i.done.add(c),i.pending.size===0){var d=e.outrogroups;ls(e,Or(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=r.length===0&&n!==null;if(l){var f=n,h=f.parentNode;ko(h),h.append(f),e.items.clear()}ls(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function ls(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const a of e.pending.values())for(const o of a)r.add(e.items.get(o).e)}for(var s=0;s{var A=n();return _s(A)?A:A==null?[]:Or(A)}),d,p=new Map,v=!0;function y(A){(w.effect.f&De)===0&&(w.pending.delete(A),w.fallback=h,Go(w,d,a,t,r),h!==null&&(d.length===0?(h.f&Ze)===0?Cs(h):(h.f^=Ze,In(h,null,a)):Ht(h,()=>{h=null})))}function g(A){w.pending.delete(A)}var m=Es(()=>{d=_(c);for(var A=d.length,M=new Set,U=L,se=Ti(),Q=0;Qi(a)):(h=Ne(()=>i(Fs??(Fs=lt()))),h.f|=Ze)),A>M.size&&Ta(),!v)if(p.set(U,M),se){for(const[tt,Oe]of o)M.has(tt)||U.skip_effect(Oe.e);U.oncommit(y),U.ondiscard(g)}else y(U);_(c)}),w={effect:m,items:o,pending:p,outrogroups:null,fallback:h};v=!1}function Tn(e){for(;e!==null&&(e.f&ze)===0;)e=e.next;return e}function Go(e,t,n,r,s){var i=(r&Ha)!==0,a=t.length,o=e.items,l=Tn(e.effect.first),f,h=null,c,d=[],p=[],v,y,g,m;if(i)for(m=0;m0){var he=(r&ii)!==0&&a===0?n:null;if(i){for(m=0;m{if(c!==void 0)for(g of c)g.nodes?.a?.apply()})}function Vo(e,t,n,r,s,i,a,o){var l=(a&Ba)!==0?(a&qa)===0?mo(n,!1,!1):Gt(n):null,f=(a&ja)!==0?Gt(s):null;return{v:l,i:f,e:Ne(()=>(i(t,l??n,f??s,o),()=>{e.delete(r)}))}}function In(e,t,n){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end,i=t&&(t.f&Ze)===0?t.nodes.start:n;r!==null;){var a=Yn(r);if(i.before(r),r===s)return;r=a}}function pt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const Bs=[...` -\r\f \v\uFEFF`];function Yo(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var s of Object.keys(n))if(n[s])r=r?r+" "+s:s;else if(r.length)for(var i=s.length,a=0;(a=r.indexOf(s,a))>=0;){var o=a+i;(a===0||Bs.includes(r[a-1]))&&(o===r.length||Bs.includes(r[o]))?r=(a===0?"":r.substring(0,a))+r.substring(o+1):a=o}}return r===""?null:r}function Jo(e,t){return e==null?null:String(e)}function Vt(e,t,n,r,s,i){var a=e[Jr];if(a!==n||a===void 0){var o=Yo(n,r,i);o==null?e.removeAttribute("class"):e.className=o,e[Jr]=n}else if(i&&s!==i)for(var l in i){var f=!!i[l];(s==null||f!==!!s[l])&&e.classList.toggle(l,f)}return i}function Ui(e,t,n,r){var s=e[Xr];if(s!==t){var i=Jo(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e[Xr]=t}return r}function zi(e,t,n=!1){if(e.multiple){if(t==null)return;if(!_s(t))return Ja();for(var r of e.options)r.selected=t.includes(Pn(r));return}for(r of e.options){var s=Pn(r);if(yo(s,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Xo(e){var t=new MutationObserver(()=>{zi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ws(()=>{t.disconnect()})}function Zo(e,t,n=t){var r=new WeakSet,s=!0;bs(e,"change",i=>{var a=i?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Pn);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Pn(l)}n(o),e.__value=o,L!==null&&r.add(L)}),Mi(()=>{var i=t();if(e===document.activeElement){var a=L;if(r.has(a))return}if(zi(e,i,s),s&&i===void 0){var o=e.querySelector(":checked");o!==null&&(i=Pn(o),n(i))}e.__value=i,s=!1}),Xo(e)}function Pn(e){return"__value"in e?e.__value:e.value}const Qo=Symbol("is custom element"),$o=Symbol("is html");function ye(e,t,n,r){var s=el(e);s[t]!==(s[t]=n)&&(t==="loading"&&(e[Ca]=n),n==null?e.removeAttribute(t):typeof n!="string"&&tl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function el(e){return e[rr]??(e[rr]={[Qo]:e.nodeName.includes("-"),[$o]:e.namespaceURI===ai})}var js=new Map;function tl(e){var t=e.getAttribute("is")||e.nodeName,n=js.get(t);if(n)return n;js.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=ga(s);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.push(a);s=ni(s)}return n}function cs(e,t,n=t){var r=new WeakSet;bs(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=qr(e)?Wr(i):i,n(i),L!==null&&r.add(L),await Ro(),i!==(i=t())){var a=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=i??"",o!==null){var f=e.value.length;a===o&&o===l&&f>l?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=a,e.selectionEnd=Math.min(o,f))}}}),Sn(t)==null&&e.value&&(n(qr(e)?Wr(e.value):e.value),L!==null&&r.add(L)),Rr(()=>{var s=t();if(e===document.activeElement){var i=L;if(r.has(i))return}qr(e)&&s===Wr(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Gi(e,t,n=t){bs(e,"change",r=>{var s=r?e.defaultChecked:e.checked;n(s)}),Sn(t)==null&&n(e.checked),Rr(()=>{var r=t();e.checked=!!r})}function qr(e){var t=e.type;return t==="number"||t==="range"}function Wr(e){return e===""?null:+e}function Kr(e,t){return e===t||e?.[Bt]===t}function nl(e={},t,n,r){var s=ke.r,i=B;return Mi(()=>{var a,o;return Rr(()=>{a=o,o=[],Sn(()=>{Kr(n(...o),e)||(t(e,...o),a&&Kr(n(...a),e)&&t(null,...a))})}),()=>{let l=i;for(;l!==s&&l.parent!==null&&l.parent.f&Yr;)l=l.parent;const f=()=>{o&&Kr(n(...o),e)&&t(null,...o)},h=l.teardown;l.teardown=()=>{f(),h?.()}}}),e}function Dn(e,t,n,r){var s=!0,i=(n&Ua)!==0,a=(n&za)!==0,o=r,l=!0,f=void 0,h=()=>a&&s?(f??(f=Hn(r)),_(f)):(l&&(l=!1,o=a?Sn(r):r),o);let c;if(i){var d=Bt in e||Sa in e;c=cn(e,t)?.set??(d&&t in e?M=>e[t]=M:void 0)}var p,v=!1;i?[p,v]=eo(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=h(),c&&(Ra(),c(p)));var y;if(y=()=>{var M=e[t];return M===void 0?h():(l=!0,M)},(n&Ka)===0)return y;if(c){var g=e.$$legacy;return(function(M,U){return arguments.length>0?((!U||g||v)&&c(U?y():M),M):y()})}var m=!1,w=((n&Wa)!==0?Hn:yi)(()=>(m=!1,y()));i&&_(w);var A=B;return(function(M,U){if(arguments.length>0){const se=U?_(w):i?wt(M):M;return J(w,se),m=!0,o!==void 0&&(o=se),M}return ut&&m||(A.f&De)!==0?w.v:_(w)})}function Vi(e){ke===null&&xa(),ks(()=>{const t=Sn(e);if(typeof t=="function")return t})}const Yi="[data-v-app]",rl=["header","content","footer"];let ce=null,He=null;function sl(e){const t=e instanceof Set?e:new Set(e||[]);for(let n=0;n<16;n++){const r=crypto.randomUUID().replace(/-/g,"").slice(0,8);if(!t.has(r))return r}throw new Error("rebemer: id collision exhausted")}function il(){if(typeof document>"u")return!1;const t=document.querySelector(Yi)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(ce=null,!1):(ce=t,He=null,!0)}function al(){if(He!==null)return He;const e=typeof document<"u"?document.querySelector(Yi)?.__vue_app__:null;if(!e)return He=!1,!1;const t=e.config?.globalProperties??{};if(typeof ce?.$history?.pause=="function"&&typeof ce?.$history?.resume=="function")return He={pause:()=>ce.$history.pause(),resume:()=>ce.$history.resume()},He;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(He={pause:()=>n.history.pause(),resume:()=>n.history.resume()},He):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(He={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},He):(He=!1,!1)}function Ji(e){const t=al();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function Qe(e){if(!ce||!e)return null;for(const t of rl){const n=ce[t];if(!Array.isArray(n))continue;const r=n.find(s=>s&&s.id===e);if(r)return r}return null}function ol(e){const t=Qe(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return Xi(t,1,n),n}function Xi(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const s=Qe(r);s&&(n.push({id:s.id,depth:t,label:s.label,name:s.name,settings:s.settings}),Xi(s,t+1,n))}}function Zi(){return ce?ce.globalClasses:[]}function Ur(e,t){if(!ce)throw new Error("rebemer: not ready");const n=ce.globalClasses,r=n.find(a=>a&&a.name===e);if(r)return r.id;const s=new Set(n.map(a=>a?.id).filter(Boolean)),i=sl(s);return n.push({id:i,name:e,settings:t||{}}),i}function Hs(e,t){const n=Qe(e);if(!n)return;n.settings||(n.settings={});const r=Array.isArray(t)?t:[];Array.isArray(n.settings._cssGlobalClasses)?n.settings._cssGlobalClasses.splice(0,n.settings._cssGlobalClasses.length,...r):n.settings._cssGlobalClasses=[...r]}function qs(e,t){const n=Qe(e);n&&(n.label=t)}function ll(){if(ce){const e=[ce.activeElement,ce.activeElementId,ce.activeId,ce.selectedElement];for(const t of e){if(t&&typeof t=="object"&&typeof t.id=="string"&&t.id)return t.id;if(typeof t=="string"&&t)return t}}if(typeof document<"u"){const t=document.querySelector("#bricks-structure li[data-id].active, #bricks-structure li[data-id].is-active")?.getAttribute("data-id");if(t)return t}return null}const cl={text:["_typography","color"],background:["_background","color"],border:["_border","color"]};function ul(e,t,n){const r=cl[t];if(!r)return!1;const s=Qe(e);if(!s)return!1;(!s.settings||typeof s.settings!="object")&&(s.settings={});const[i,a]=r;return(!s.settings[i]||typeof s.settings[i]!="object")&&(s.settings[i]={}),s.settings[i][a]={raw:n},!0}function fl(e){const t=Qe(e);return t&&typeof t.label=="string"?t.label:""}const kr="slashed-rebemer-host",dl="slashed-class-hint",Qi=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],hl=3;function _l(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n[0]==="."&&(n=n.slice(1)),!n.startsWith("sf-")&&!n.startsWith("is-"))||!Object.prototype.hasOwnProperty.call(t,n))return null;const r=t[n];return!r||typeof r.description!="string"?null:{name:n,description:r.description,category:r.category}}let us=!1,Er={},ot=null,Fn=null,Te=null;function pl(){if(ot&&ot.isConnected)return ot;let e=document.getElementById(kr);e||(e=document.createElement("div"),e.id=kr,document.body.appendChild(e));const t=document.createElement("div");return t.id=dl,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

          ',e.appendChild(t),ot=t,t}function $i(e){let t=e;for(let n=0;t&&no&&n.top-i-s>=0&&(l=n.top-i-s);let f=n.left;f+r>a-4&&(f=Math.max(4,a-4-r)),f<4&&(f=4),e.style.top=`${Math.round(l)}px`,e.style.left=`${Math.round(f)}px`}function ea(e,t){const n=pl();n.querySelector(".rebemer-class-hint__name").textContent=`.${t.name}`;const r=n.querySelector(".rebemer-class-hint__cat");r.textContent=t.category||"",r.hidden=!t.category,n.querySelector(".rebemer-class-hint__desc").textContent=t.description,n.hidden=!1,vl(n,e),Te=e}function Ct(){ot&&(ot.hidden=!0),Te=null}function gl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${kr}`))return;if(!t.closest(Qi.join(","))){Te&&Ct();return}const n=$i(t);if(!n){Te&&Ct();return}n.el!==Te&&ea(n.el,n.hint)}function ml(e){if(!Te)return;const t=e.relatedTarget;t instanceof Node&&Te.contains(t)||Ct()}function bl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${kr}`))return;if(!t.closest(Qi.join(","))){Te&&Ct();return}const n=$i(t);if(!n){Te&&Ct();return}n.el!==Te&&ea(n.el,n.hint)}function yl(e){if(!Te)return;const t=e.relatedTarget;t instanceof Node&&Te.contains(t)||Ct()}function wl(e){e.key==="Escape"&&Ct()}function kl(e,t,n={}){if(ur(),us=!!e,Er=t&&typeof t=="object"?t:{},!us||Object.keys(Er).length===0)return;Fn=new AbortController;const{signal:r}=Fn,s={passive:!0,signal:r};document.addEventListener("mouseover",gl,s),document.addEventListener("mouseout",ml,s),document.addEventListener("focusin",bl,s),document.addEventListener("focusout",yl,s),document.addEventListener("keydown",wl,s),window.addEventListener("scroll",Ct,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?ur():n.signal.addEventListener("abort",ur,{once:!0}))}function ur(){Fn&&(Fn.abort(),Fn=null),ot&&(ot.remove(),ot=null),Te=null,us=!1,Er={}}const fr="li.variable-picker-item",dr="slashed-var-swatch",El=50,Sl=(e,...t)=>console[e]("[slashed-swatches]",...t);function Cl(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n.slice(0,2)!=="--"&&(n="--"+n.replace(/^-+/,"")),n.indexOf("--sf-color-")!==0))return null;const r=t[n];return typeof r=="string"&&r?r:null}let fs=!1,Sr={},Bn=null,fn=null,hr=null;function xl(e){const t=e.querySelector(":scope > span[title]")||e.querySelector(":scope > span");if(t){const n=t.getAttribute("title");return n&&n.trim()?n.trim():(t.textContent||"").trim()}return(e.textContent||"").trim()}function Al(e){if(e.classList.contains("title")||e.classList.contains("category")){const r=e.querySelector(":scope > ."+dr);r&&r.remove();return}const t=Cl(xl(e),Sr);let n=e.querySelector(":scope > ."+dr);if(!t){n&&n.remove();return}n||(n=document.createElement("span"),n.className=dr,n.setAttribute("aria-hidden","true"),e.insertBefore(n,e.firstChild)),n.dataset.color!==t&&(n.style.setProperty("--slashed-swatch-color",t),n.dataset.color=t)}function ta(){try{const e=document.querySelectorAll(fr);for(const t of e)Al(t)}catch(e){Sl("warn","swatch pass failed",e)}}function Tl(){fn===null&&(fn=setTimeout(()=>{fn=null,ta()},El))}function Ol(e){for(const t of e){const n=t.target;if(n&&n.nodeType===1&&n.closest&&n.closest(fr))return!0;for(const r of t.addedNodes)if(r.nodeType===1&&(r.matches&&r.matches(fr)||r.querySelector&&r.querySelector(fr)))return!0}return!1}function Ml(e,t,n={}){_r(),fs=!!e,Sr=t&&typeof t=="object"?t:{},!(!fs||Object.keys(Sr).length===0)&&(hr=new AbortController,Bn=new MutationObserver(r=>{Ol(r)&&Tl()}),Bn.observe(document.body,{childList:!0,subtree:!0}),ta(),n.signal&&(n.signal.aborted?_r():n.signal.addEventListener("abort",_r,{once:!0})))}function _r(){fn!==null&&(clearTimeout(fn),fn=null),Bn&&(Bn.disconnect(),Bn=null),hr&&(hr.abort(),hr=null);try{document.querySelectorAll("."+dr).forEach(e=>e.remove())}catch{}fs=!1,Sr={}}const Il="5";var ti;typeof window<"u"&&((ti=window.__svelte??(window.__svelte={})).v??(ti.v=new Set)).add(Il);var Ll=P('reBEM');function Rl(e,t){Jt(t,!0);function n(s){s.stopPropagation(),s.preventDefault(),t.onActivate?.(t.elementId)}var r=Ll();Y(()=>{ye(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),ye(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),Ae("click",r,n),Ae("keydown",r,s=>(s.key==="Enter"||s.key===" ")&&n(s)),R(e,r),Xt()}Zt(["click","keydown"]);function Wt(e){return e?String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x00-\x7f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}const Nl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Pl=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function Dl(e){return e?Pl.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:Nl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const Nr=new Set(["_padding","_padding_top","_padding_right","_padding_bottom","_padding_left","_margin","_margin_top","_margin_right","_margin_bottom","_margin_left","_width","_widthMin","_widthMax","_minWidth","_maxWidth","_height","_heightMin","_heightMax","_minHeight","_maxHeight","_aspectRatio","_overflow","_overflowX","_overflowY","_color","_background","_backgroundColor","_backgroundImage","_backgroundSize","_backgroundPosition","_backgroundRepeat","_backgroundAttachment","_backgroundBlendMode","_typography","_fontFamily","_fontSize","_fontWeight","_fontStyle","_lineHeight","_letterSpacing","_wordSpacing","_textAlign","_textTransform","_textDecoration","_textDecorationColor","_textShadow","_textIndent","_whiteSpace","_listStyleType","_listStylePosition","_border","_borderRadius","_borderColor","_borderStyle","_borderWidth","_outline","_outlineColor","_outlineStyle","_outlineWidth","_outlineOffset","_boxShadow","_filter","_backdropFilter","_opacity","_blendMode","_transform","_transformOrigin","_transition","_animation","_display","_flexDirection","_flexWrap","_flexGrow","_flexShrink","_flexBasis","_alignItems","_alignSelf","_alignContent","_justifyContent","_justifyItems","_justifySelf","_gap","_rowGap","_columnGap","_gridTemplateColumns","_gridTemplateRows","_gridGap","_gridAutoFlow","_gridAutoColumns","_gridAutoRows","_gridColumn","_gridRow","_gridArea","_position","_top","_right","_bottom","_left","_zIndex","_objectFit","_objectPosition","_cursor","_pointerEvents","_userSelect"]);function Fl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Nr.has(n)&&t.push(n);return t.sort(),t}const Bl=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function jl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Nr.has(n)||Bl.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Hl=new Set(["add","rename","replace","modifier","migrate"]),Ws=new Set(["user","label"]);function na({rootId:e,rows:t,mode:n}){if(!Hl.has(n))return{ok:!1,ops:[],error:`Invalid mode: ${n}`};const r=t.find(o=>o.id===e);if(!r)return{ok:!1,ops:[],error:"Root row missing."};const s=Wt(r.name);if(!s)return{ok:!1,ops:[],error:"Block name is empty."};const i=[];for(const o of t){if(!o.include)continue;const l=o.id===e;let f;if(l)f=s;else{const c=Wt(o.name);if(!c)continue;f=`${s}__${c}`}let h=f;if(n==="modifier"){const c=Wt(o.modifier);if(!c)continue;h=`${f}--${c}`}i.push({row:o,isRoot:l,finalClass:h,suggestedFrom:o.suggestedFrom||"fallback"})}if(i.length===0)return{ok:!1,ops:[],error:"No rows to apply. Include at least one row."};const a=Kl(i,n);return a.ok?{ok:!0,ops:i}:{ok:!1,ops:[],error:a.error}}function ql({rootId:e,rows:t,mode:n,syncLabels:r}){const s=na({rootId:e,rows:t,mode:n});if(!s.ok)return{ok:!1,error:s.error};const i=s.ops,a=t.find(c=>c.id===e),o=Wt(a?.name??""),l=Zi();if(n==="migrate"){const c=Wl(i,l);if(!c.ok)return c}const f=new Map;for(const c of i){const d=Qe(c.row.id);if(!d)continue;const p={classIds:Ks(d.settings).slice(),label:r&&n!=="modifier"?d.label??"":null};if(n==="migrate"&&Array.isArray(c.row.migrateKeys)){const v={};for(const y of c.row.migrateKeys)Object.prototype.hasOwnProperty.call(d.settings||{},y)&&(v[y]=JSON.parse(JSON.stringify(d.settings[y])));p.migrateKeys=v}f.set(c.row.id,p)}let h=0;try{Ji(()=>{for(const c of i){const d=Qe(c.row.id);if(!d)continue;const p=Ks(d.settings);let v={};if(n==="rename"&&p.length>0){const m=l.find(w=>w&&w.id===p[0]);m&&m.settings&&(v=JSON.parse(JSON.stringify(m.settings)))}else n==="migrate"&&(v=ra(d.settings,c.row.migrateKeys));if(n==="migrate"){const m=l.find(w=>w&&w.name===c.finalClass);if(m){(!m.settings||typeof m.settings!="object")&&(m.settings={});for(const[w,A]of Object.entries(v))Object.prototype.hasOwnProperty.call(m.settings,w)||(m.settings[w]=A)}}const y=Ur(c.finalClass,v);let g;switch(n){case"add":case"migrate":g=p.includes(y)?p:[...p,y];break;case"modifier":{const m=c.finalClass.indexOf("--"),w=m>=0?c.finalClass.slice(0,m):null;let A=[...p];if(w){const M=Ur(w,{});A.includes(M)||A.push(M)}g=A.includes(y)?A:[...A,y];break}case"rename":{const m=[y],w=p.length>0?l.find(A=>A&&A.id===p[0]):null;if(w){const A=w.name+"--";for(let M=1;Mse&&se.id===p[M]);if(U)if(U.name.startsWith(A)){const se=U.name.slice(w.name.length),Q=U.settings?JSON.parse(JSON.stringify(U.settings)):{};m.push(Ur(c.finalClass+se,Q))}else m.push(p[M])}}g=m;break}case"replace":g=[y];break}if(Hs(c.row.id,g),n==="migrate"&&Ul(d.settings,c.row.migrateKeys),r&&n!=="modifier"){const m=zl(c.finalClass,o);m&&qs(c.row.id,m)}h++}})}catch(c){for(const[p,v]of f)try{if(Hs(p,v.classIds),v.migrateKeys){const y=Qe(p);y&&y.settings&&Object.assign(y.settings,v.migrateKeys)}v.label!==null&&qs(p,v.label)}catch{}const d=c instanceof Error?c.message:String(c);return console.warn("[reBEMer] apply failed after",h,"mutation(s), rolled back:",d),{ok:!1,error:`Operation failed and was rolled back: ${d}`}}return h===0?{ok:!1,error:"No elements were modified. The subtree may have changed."}:{ok:!0,count:h}}function Wl(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const s=Qe(n.row.id);if(!s)continue;const i=ra(s.settings,n.row.migrateKeys),a=r.settings&&typeof r.settings=="object"?r.settings:{},o=[];for(const[l,f]of Object.entries(i))Object.prototype.hasOwnProperty.call(a,l)&&JSON.stringify(a[l])!==JSON.stringify(f)&&o.push(l.replace(/^_/,""));if(o.length>0){const l=o.join(", ");return{ok:!1,error:`Migrate blocked: existing class "${n.finalClass}" has conflicting values for ${l}. Pick a different name or use Add mode.`}}}return{ok:!0}}function Kl(e,t){const n=new Map;for(const r of e){const s=n.get(r.finalClass)||[];s.push(r),n.set(r.finalClass,s)}for(const[r,s]of n){if(s.length===1||t==="modifier")continue;const i=s.filter(o=>Ws.has(o.suggestedFrom));if(i.length>1)return{ok:!1,error:`"${r}" is used by ${i.length} rows. Edit one to make it unique.`};let a=1;for(const o of s)Ws.has(o.suggestedFrom)||(o.finalClass=`${r}-${a++}`,o.suggestedFrom="auto-number")}if(t!=="modifier"){const r=new Map;for(const s of e){const i=r.get(s.finalClass);if(i)return{ok:!1,error:`"${s.finalClass}" is produced by 2 rows after auto-numbering (one ${i}, one ${s.suggestedFrom}). Pick a different name for one of them.`};r.set(s.finalClass,s.suggestedFrom)}}return{ok:!0}}function ra(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)Nr.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Ul(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)Nr.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function Ks(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function zl(e,t){let n=e;return n===t?Us(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),Us(n.replace(/-/g," ")))}function Us(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const Gl=Object.freeze({heading:"heading","text-basic":"text",text:"text","text-link":"link",code:"code",image:"image",icon:"icon","icon-box":"icon",video:"video",audio:"audio",svg:"svg",logo:"logo",shape:"shape",button:"button","button-group":"buttons","nav-nested":"nav","nav-menu":"nav",list:"list",accordion:"accordion",tabs:"tabs",slider:"slider",carousel:"carousel",countdown:"countdown",counter:"counter",testimonials:"testimonials",pricing:"pricing",team:"team",form:"form",posts:"posts",template:"item"}),sa=new Set(["section","container","block","div"]);function Vl(e,t="item"){return!e||typeof e!="string"||sa.has(e)?t:Gl[e]||t}function zr(e){return typeof e=="string"&&sa.has(e)}const Yl=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function Jl(e,t,n){const r=new Set(e.filter(Boolean)),s=(...p)=>p.some(v=>r.has(v)),i=s("button","button-group"),a=s("heading"),o=s("text-basic","text"),l=s("image"),f=s("nav-nested","nav-menu"),h=s("form"),c=s("icon","icon-box"),d=s("list");return h?"form":f?"nav":i&&!a&&!o?"actions":l&&!o&&!a&&!i?"media":a&&!o&&!i?"header":o&&!a&&!i?"body":a&&o?"content":a&&i?"header":c&&!o&&!a?"icon-group":d?"list-wrap":n>1?t===0?"header":t===n-1?"footer":"body":"content"}var Xl=P('suggested'),Zl=P(' '),Ql=P(''),$l=P('

          Enter a modifier name — the base class will be added automatically if absent.

          '),ec=P('

          This element has no existing classes. Rename will create a new class instead.

          '),tc=P('

          '),nc=P(`A class named already exists. +var ha=Object.defineProperty;var Ts=e=>{throw TypeError(e)};var pa=(e,t,n)=>t in e?ha(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>pa(e,typeof t!="symbol"?t+"":t,n),Br=(e,t,n)=>t.has(e)||Ts("Cannot "+n);var u=(e,t,n)=>(Br(e,t,"read from private field"),n?n.call(e):t.get(e)),O=(e,t,n)=>t.has(e)?Ts("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),T=(e,t,n,r)=>(Br(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(Br(e,t,"access private method"),n);var ps=Array.isArray,_a=Array.prototype.indexOf,Ft=Array.prototype.includes,Or=Array.from,va=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,ga=Object.getOwnPropertyDescriptors,ma=Object.prototype,ba=Array.prototype,ni=Object.getPrototypeOf,Os=Object.isExtensible;const ya=()=>{};function wa(e){for(var t=0;t{e=r,t=s});return{promise:n,resolve:e,reject:t}}const fe=2,mn=4,Mr=8,si=1<<24,We=16,ze=32,St=64,Vr=128,Pe=512,oe=1024,ue=2048,$e=4096,_e=8192,De=16384,Yt=32768,Yr=1<<25,bn=65536,_r=1<<17,ka=1<<18,En=1<<19,Ea=1<<20,Ze=1<<25,Ut=65536,vr=1<<21,un=1<<22,kt=1<<23,Bt=Symbol("$state"),Sa=Symbol("legacy props"),Ca=Symbol(""),rr=Symbol("attributes"),Jr=Symbol("class"),Xr=Symbol("style"),On=Symbol("text"),sr=Symbol("form reset"),Ir=new class extends Error{constructor(){super(...arguments);ge(this,"name","StaleReactionError");ge(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function xa(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Aa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ta(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Oa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ma(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ia(e){throw new Error("https://svelte.dev/e/effect_orphan")}function La(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ra(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Na(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Pa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Da(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Ba=1,ja=2,ii=4,Ha=8,qa=16,Wa=1,Ka=4,Ua=8,za=16,Ga=1,Va=2,ae=Symbol("uninitialized"),ai="http://www.w3.org/1999/xhtml";function Ya(){console.warn("https://svelte.dev/e/derived_inert")}function Ja(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Xa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function oi(e){return e===this.v}function Za(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function li(e){return!Za(e,this.v)}let ke=null;function yn(e){ke=e}function Jt(e,t=!1,n){ke={p:ke,i:!1,c:null,e:null,s:e,x:null,r:B,l:null}}function Xt(e){var t=ke,n=t.e;if(n!==null){t.e=null;for(var r of n)Oi(r)}return t.i=!0,ke=t.p,{}}function ci(){return!0}let Tt=[];function ui(){var e=Tt;Tt=[],wa(e)}function Et(e){if(Tt.length===0&&!Rn){var t=Tt;queueMicrotask(()=>{t===Tt&&ui()})}Tt.push(e)}function Qa(){for(;Tt.length>0;)ui()}function fi(e){var t=B;if(t===null)return F.f|=kt,e;if((t.f&Yt)===0&&(t.f&mn)===0)throw e;yt(e,t)}function yt(e,t){for(;t!==null;){if((t.f&Vr)!==0){if((t.f&Yt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const $a=-7169;function ne(e,t){e.f=e.f&$a|t}function _s(e){(e.f&Pe)!==0||e.deps===null?ne(e,oe):ne(e,$e)}function di(e){if(e!==null)for(const t of e)(t.f&fe)===0||(t.f&Ut)===0||(t.f^=Ut,di(t.deps))}function hi(e,t,n){(e.f&ue)!==0?t.add(e):(e.f&$e)!==0&&n.add(e),di(e.deps),ne(e,oe)}let $n=!1;function eo(e){var t=$n;try{return $n=!1,[e(),$n]}finally{$n=t}}let jr=null,sn=null,L=null,Zr=null,Ke=null,Qr=null,Rn=!1,Hr=!1,on=null,ir=null;var Ms=0;let to=1;var dn,gt,It,hn,pn,Lt,_n,st,Wn,Se,Kn,mt,Ye,Je,vn,Rt,q,$r,Mn,es,pi,_i,ar,no,ts,an;const xr=class xr{constructor(){O(this,q);ge(this,"id",to++);O(this,dn,!1);ge(this,"linked",!0);O(this,gt,null);O(this,It,null);ge(this,"async_deriveds",new Map);ge(this,"current",new Map);ge(this,"previous",new Map);ge(this,"unblocked",new Set);O(this,hn,new Set);O(this,pn,new Set);O(this,Lt,new Set);O(this,_n,0);O(this,st,new Map);O(this,Wn,null);O(this,Se,[]);O(this,Kn,[]);O(this,mt,new Set);O(this,Ye,new Set);O(this,Je,new Map);O(this,vn,new Set);ge(this,"is_fork",!1);O(this,Rt,!1)}skip_effect(t){u(this,Je).has(t)||u(this,Je).set(t,{d:[],m:[]}),u(this,vn).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=u(this,Je).get(t);if(r){u(this,Je).delete(t);for(var s of r.d)ne(s,ue),n(s);for(s of r.m)ne(s,$e),n(s)}u(this,vn).add(t)}capture(t,n,r=!1){t.v!==ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&kt)===0&&(this.current.set(t,[n,r]),Ke?.set(t,n)),this.is_fork||(t.v=n)}activate(){L=this}deactivate(){L=null,Ke=null}flush(){try{Hr=!0,L=this,H(this,q,Mn).call(this)}finally{Ms=0,Qr=null,on=null,ir=null,Hr=!1,L=null,Ke=null,jt.clear()}}discard(){for(const t of u(this,pn))t(this);u(this,pn).clear(),u(this,Lt).clear(),H(this,q,an).call(this)}register_created_effect(t){u(this,Kn).push(t)}increment(t,n){if(T(this,_n,u(this,_n)+1),t){let r=u(this,st).get(n)??0;u(this,st).set(n,r+1)}}decrement(t,n){if(T(this,_n,u(this,_n)-1),t){let r=u(this,st).get(n)??0;r===1?u(this,st).delete(n):u(this,st).set(n,r-1)}u(this,Rt)||(T(this,Rt,!0),Et(()=>{T(this,Rt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)u(this,mt).add(r);for(const r of n)u(this,Ye).add(r);t.clear(),n.clear()}oncommit(t){u(this,hn).add(t)}ondiscard(t){u(this,pn).add(t)}on_fork_commit(t){u(this,Lt).add(t)}run_fork_commit_callbacks(){for(const t of u(this,Lt))t(this);u(this,Lt).clear()}settled(){return(u(this,Wn)??T(this,Wn,ri())).promise}static ensure(){var t;if(L===null){const n=L=new xr;H(t=n,q,ts).call(t),!Hr&&!Rn&&Et(()=>{u(n,dn)||n.flush()})}return L}apply(){{Ke=null;return}}schedule(t){if(Qr=t,t.b?.is_pending&&(t.f&(mn|Mr|si))!==0&&(t.f&Yt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(on!==null&&n===B&&(F===null||(F.f&fe)===0))return;if((r&(St|ze))!==0){if((r&oe)===0)return;n.f^=oe}}u(this,Se).push(n)}};dn=new WeakMap,gt=new WeakMap,It=new WeakMap,hn=new WeakMap,pn=new WeakMap,Lt=new WeakMap,_n=new WeakMap,st=new WeakMap,Wn=new WeakMap,Se=new WeakMap,Kn=new WeakMap,mt=new WeakMap,Ye=new WeakMap,Je=new WeakMap,vn=new WeakMap,Rt=new WeakMap,q=new WeakSet,$r=function(){if(this.is_fork)return!0;for(const r of u(this,st).keys()){for(var t=r,n=!1;t.parent!==null;){if(u(this,Je).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},Mn=function(){var l,f,h;if(T(this,dn,!0),Ms++>1e3&&(H(this,q,an).call(this),so()),!H(this,q,$r).call(this)){for(const c of u(this,mt))u(this,Ye).delete(c),ne(c,ue),this.schedule(c);for(const c of u(this,Ye))ne(c,$e),this.schedule(c)}const t=u(this,Se);T(this,Se,[]),this.apply();var n=on=[],r=[],s=ir=[];for(const c of t)try{H(this,q,es).call(this,c,n,r)}catch(d){throw mi(c),d}if(L=null,s.length>0){var i=xr.ensure();for(const c of s)i.schedule(c)}if(on=null,ir=null,H(this,q,$r).call(this)){H(this,q,ar).call(this,r),H(this,q,ar).call(this,n);for(const[c,d]of u(this,Je))gi(c,d);s.length>0&&H(l=L,q,Mn).call(l);return}const a=H(this,q,pi).call(this);if(a){H(f=a,q,_i).call(f,this);return}u(this,mt).clear(),u(this,Ye).clear();for(const c of u(this,hn))c(this);u(this,hn).clear(),Zr=this,Is(r),Is(n),Zr=null,u(this,Wn)?.resolve();var o=L;if(this.linked&&u(this,_n)===0&&H(this,q,an).call(this),u(this,Se).length>0){o===null&&(o=this,H(this,q,ts).call(this));const c=o;u(c,Se).push(...u(this,Se).filter(d=>!u(c,Se).includes(d)))}o!==null&&H(h=o,q,Mn).call(h)},es=function(t,n,r){t.f^=oe;for(var s=t.first;s!==null;){var i=s.f,a=(i&(ze|St))!==0,o=a&&(i&oe)!==0,l=o||(i&_e)!==0||u(this,Je).has(s);if(!l&&s.fn!==null){a?s.f^=oe:(i&mn)!==0?n.push(s):Jn(s)&&((i&We)!==0&&u(this,Ye).add(s),kn(s));var f=s.first;if(f!==null){s=f;continue}}for(;s!==null;){var h=s.next;if(h!==null){s=h;break}s=s.parent}}},pi=function(){for(var t=u(this,gt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=u(t,gt)}return null},_i=function(t){var r;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const a=this.async_deriveds.get(s);a&&i.promise.then(a.resolve)}const n=s=>{var i=s.reactions;if(i!==null)for(const l of i){var a=l.f;if((a&fe)!==0)n(l);else{var o=l;a&(un|We)&&!this.async_deriveds.has(o)&&(u(this,Ye).delete(o),ne(o,ue),this.schedule(o))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),H(r=t,q,an).call(r),L=this,H(this,q,Mn).call(this)},ar=function(t){for(var n=0;n!this.current.has(d));if(s.length===0)t&&c.discard();else if(n.length>0){if(t)for(const d of u(this,vn))c.unskip_effect(d,_=>{var v;(_.f&(We|un))!==0?c.schedule(_):H(v=c,q,ar).call(v,[_])});c.activate();var i=new Set,a=new Map;for(var o of n)vi(o,s,i,a);a=new Map;var l=[...c.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(l.length>0)for(const d of u(this,Kn))(d.f&(De|_e|_r))===0&&vs(d,l,a)&&((d.f&(un|We))!==0?(ne(d,ue),c.schedule(d)):u(c,mt).add(d));if(u(c,Se).length>0&&!u(c,Rt)){c.apply();for(var f of u(c,Se))H(h=c,q,es).call(h,f,[],[]);T(c,Se,[])}c.deactivate()}}}},ts=function(){sn===null?jr=sn=this:(T(sn,It,this),T(this,gt,sn)),sn=this},an=function(){var t=u(this,gt),n=u(this,It);t===null?jr=n:T(t,It,n),n===null?sn=t:T(n,gt,t),this.linked=!1};let zt=xr;function ro(e){var t=Rn;Rn=!0;try{for(var n;;){if(Qa(),L===null)return n;L.flush()}}finally{Rn=t}}function so(){try{La()}catch(e){yt(e,Qr)}}let rt=null;function Is(e){var t=e.length;if(t!==0){for(var n=0;n0)){jt.clear();for(const s of rt){if((s.f&(De|_e))!==0)continue;const i=[s];let a=s.parent;for(;a!==null;)rt.has(a)&&(rt.delete(a),i.push(a)),a=a.parent;for(let o=i.length-1;o>=0;o--){const l=i[o];(l.f&(De|_e))===0&&kn(l)}}rt.clear()}}rt=null}}function vi(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&fe)!==0?vi(s,t,n,r):(i&(un|We))!==0&&(i&ue)===0&&vs(s,t,r)&&(ne(s,ue),gs(s))}}function vs(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(Ft.call(t,s))return!0;if((s.f&fe)!==0&&vs(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function gs(e){L.schedule(e)}function gi(e,t){if(!((e.f&ze)!==0&&(e.f&oe)!==0)){(e.f&ue)!==0?t.d.push(e):(e.f&$e)!==0&&t.m.push(e),ne(e,oe);for(var n=e.first;n!==null;)gi(n,t),n=n.next}}function mi(e){ne(e,oe);for(var t=e.first;t!==null;)mi(t),t=t.next}function io(e){let t=0,n=Gt(0),r;return()=>{ys()&&(p(n),Rr(()=>(t===0&&(r=Sn(()=>e(()=>Nn(n)))),t+=1,()=>{Et(()=>{t-=1,t===0&&(r?.(),r=void 0,Nn(n))})})))}}var ao=bn|En;function oo(e,t,n,r){new lo(e,t,n,r)}var Ie,hs,Le,Nt,me,Re,pe,Ce,it,Pt,bt,gn,Un,zn,at,Ar,re,co,uo,fo,ns,or,lr,rs,ss;class lo{constructor(t,n,r,s){O(this,re);ge(this,"parent");ge(this,"is_pending",!1);ge(this,"transform_error");O(this,Ie);O(this,hs,null);O(this,Le);O(this,Nt);O(this,me);O(this,Re,null);O(this,pe,null);O(this,Ce,null);O(this,it,null);O(this,Pt,0);O(this,bt,0);O(this,gn,!1);O(this,Un,new Set);O(this,zn,new Set);O(this,at,null);O(this,Ar,io(()=>(T(this,at,Gt(u(this,Pt))),()=>{T(this,at,null)})));T(this,Ie,t),T(this,Le,n),T(this,Nt,i=>{var a=B;a.b=this,a.f|=Vr,r(i)}),this.parent=B.b,this.transform_error=s??this.parent?.transform_error??(i=>i),T(this,me,Es(()=>{H(this,re,ns).call(this)},ao))}defer_effect(t){hi(t,u(this,Un),u(this,zn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!u(this,Le).pending}update_pending_count(t,n){H(this,re,rs).call(this,t,n),T(this,Pt,u(this,Pt)+t),!(!u(this,at)||u(this,gn))&&(T(this,gn,!0),Et(()=>{T(this,gn,!1),u(this,at)&&wn(u(this,at),u(this,Pt))}))}get_effect_pending(){return u(this,Ar).call(this),p(u(this,at))}error(t){if(!u(this,Le).onerror&&!u(this,Le).failed)throw t;L?.is_fork?(u(this,Re)&&L.skip_effect(u(this,Re)),u(this,pe)&&L.skip_effect(u(this,pe)),u(this,Ce)&&L.skip_effect(u(this,Ce)),L.on_fork_commit(()=>{H(this,re,ss).call(this,t)})):H(this,re,ss).call(this,t)}}Ie=new WeakMap,hs=new WeakMap,Le=new WeakMap,Nt=new WeakMap,me=new WeakMap,Re=new WeakMap,pe=new WeakMap,Ce=new WeakMap,it=new WeakMap,Pt=new WeakMap,bt=new WeakMap,gn=new WeakMap,Un=new WeakMap,zn=new WeakMap,at=new WeakMap,Ar=new WeakMap,re=new WeakSet,co=function(){try{T(this,Re,Ne(()=>u(this,Nt).call(this,u(this,Ie))))}catch(t){this.error(t)}},uo=function(t){const n=u(this,Le).failed;n&&T(this,Ce,Ne(()=>{n(u(this,Ie),()=>t,()=>()=>{})}))},fo=function(){const t=u(this,Le).pending;t&&(this.is_pending=!0,T(this,pe,Ne(()=>t(u(this,Ie)))),Et(()=>{var n=T(this,it,document.createDocumentFragment()),r=lt();n.append(r),T(this,Re,H(this,re,lr).call(this,()=>Ne(()=>u(this,Nt).call(this,r)))),u(this,bt)===0&&(u(this,Ie).before(n),T(this,it,null),Ht(u(this,pe),()=>{T(this,pe,null)}),H(this,re,or).call(this,L))}))},ns=function(){try{if(this.is_pending=this.has_pending_snippet(),T(this,bt,0),T(this,Pt,0),T(this,Re,Ne(()=>{u(this,Nt).call(this,u(this,Ie))})),u(this,bt)>0){var t=T(this,it,document.createDocumentFragment());xs(u(this,Re),t);const n=u(this,Le).pending;T(this,pe,Ne(()=>n(u(this,Ie))))}else H(this,re,or).call(this,L)}catch(n){this.error(n)}},or=function(t){this.is_pending=!1,t.transfer_effects(u(this,Un),u(this,zn))},lr=function(t){var n=B,r=F,s=ke;et(u(this,me)),Be(u(this,me)),yn(u(this,me).ctx);try{return zt.ensure(),t()}catch(i){return fi(i),null}finally{et(n),Be(r),yn(s)}},rs=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&H(r=this.parent,re,rs).call(r,t,n);return}T(this,bt,u(this,bt)+t),u(this,bt)===0&&(H(this,re,or).call(this,n),u(this,pe)&&Ht(u(this,pe),()=>{T(this,pe,null)}),u(this,it)&&(u(this,Ie).before(u(this,it)),T(this,it,null)))},ss=function(t){u(this,Re)&&(we(u(this,Re)),T(this,Re,null)),u(this,pe)&&(we(u(this,pe)),T(this,pe,null)),u(this,Ce)&&(we(u(this,Ce)),T(this,Ce,null));var n=u(this,Le).onerror;let r=u(this,Le).failed;var s=!1,i=!1;const a=()=>{if(s){Xa();return}s=!0,i&&Fa(),u(this,Ce)!==null&&Ht(u(this,Ce),()=>{T(this,Ce,null)}),H(this,re,lr).call(this,()=>{H(this,re,ns).call(this)})},o=l=>{try{i=!0,n?.(l,a),i=!1}catch(f){yt(f,u(this,me)&&u(this,me).parent)}r&&T(this,Ce,H(this,re,lr).call(this,()=>{try{return Ne(()=>{var f=B;f.b=this,f.f|=Vr,r(u(this,Ie),()=>l,()=>a)})}catch(f){return yt(f,u(this,me).parent),null}}))};Et(()=>{var l;try{l=this.transform_error(t)}catch(f){yt(f,u(this,me)&&u(this,me).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(o,f=>yt(f,u(this,me)&&u(this,me).parent)):o(l)})};function ho(e,t,n,r){const s=Hn;var i=e.filter(d=>!d.settled);if(n.length===0&&i.length===0){r(t.map(s));return}var a=B,o=po(),l=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function f(d){if((a.f&De)===0){o();try{r(d)}catch(_){yt(_,a)}gr()}}var h=bi();if(n.length===0){l.then(()=>f(t.map(s))).finally(h);return}function c(){Promise.all(n.map(d=>_o(d))).then(d=>f([...t.map(s),...d])).catch(d=>yt(d,a)).finally(h)}l?l.then(()=>{o(),c(),gr()}):c()}function po(){var e=B,t=F,n=ke,r=L;return function(i=!0){et(e),Be(t),yn(n),i&&(e.f&De)===0&&(r?.activate(),r?.apply())}}function gr(e=!0){et(null),Be(null),yn(null),e&&L?.deactivate()}function bi(){var e=B,t=e.b,n=L,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function Hn(e){var t=fe|ue;return B!==null&&(B.f|=En),{ctx:ke,deps:null,effects:null,equals:oi,f:t,fn:e,reactions:null,rv:0,v:ae,wv:0,parent:B,ac:null}}const er=Symbol("obsolete");function _o(e,t,n){let r=B;r===null&&Aa();var s=void 0,i=Gt(ae),a=!F,o=new Set;return To(()=>{var l=B,f=ri();s=f.promise;try{Promise.resolve(e()).then(f.resolve,_=>{_!==Ir&&f.reject(_)}).finally(gr)}catch(_){f.reject(_),gr()}var h=L;if(a){if((l.f&Yt)!==0)var c=bi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(er);else for(const _ of o.values())_.reject(er);o.add(f),h.async_deriveds.set(l,f)}const d=(_,v=void 0)=>{c?.(),o.delete(f),v!==er&&(h.activate(),v?(i.f|=kt,wn(i,v)):((i.f&kt)!==0&&(i.f^=kt),wn(i,_)),h.deactivate())};f.promise.then(d,_=>d(null,_||"unknown"))}),ws(()=>{for(const l of o)l.reject(er)}),new Promise(l=>{function f(h){function c(){h===s?l(i):f(s)}h.then(c,c)}f(s)})}function le(e){const t=Hn(e);return Pi(t),t}function yi(e){const t=Hn(e);return t.equals=li,t}function vo(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!Ei&&bo()}return t}function bo(){Ei=!1;for(const e of mr){(e.f&oe)!==0&&ne(e,$e);let t;try{t=Jn(e)}catch{t=!0}t&&kn(e)}mr.clear()}function Nn(e){U(e,e.v+1)}function Si(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,i=0;i{if(qt===i)return o();var l=F,f=qt;Be(null),Ps(i);var h=o();return Be(l),Ps(f),h};return r&&n.set("length",ie(e.length)),new Proxy(e,{defineProperty(o,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Na();var h=n.get(l);return h===void 0?a(()=>{var c=ie(f.value);return n.set(l,c),c}):U(h,f.value,!0),!0},deleteProperty(o,l){var f=n.get(l);if(f===void 0){if(l in o){const h=a(()=>ie(ae));n.set(l,h),Nn(s)}}else U(f,ae),Nn(s);return!0},get(o,l,f){if(l===Bt)return e;var h=n.get(l),c=l in o;if(h===void 0&&(!c||cn(o,l)?.writable)&&(h=a(()=>{var _=wt(c?o[l]:ae),v=ie(_);return v}),n.set(l,h)),h!==void 0){var d=p(h);return d===ae?void 0:d}return Reflect.get(o,l,f)},getOwnPropertyDescriptor(o,l){var f=Reflect.getOwnPropertyDescriptor(o,l);if(f&&"value"in f){var h=n.get(l);h&&(f.value=p(h))}else if(f===void 0){var c=n.get(l),d=c?.v;if(c!==void 0&&d!==ae)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(o,l){if(l===Bt)return!0;var f=n.get(l),h=f!==void 0&&f.v!==ae||Reflect.has(o,l);if(f!==void 0||B!==null&&(!h||cn(o,l)?.writable)){f===void 0&&(f=a(()=>{var d=h?wt(o[l]):ae,_=ie(d);return _}),n.set(l,f));var c=p(f);if(c===ae)return!1}return h},set(o,l,f,h){var c=n.get(l),d=l in o;if(r&&l==="length")for(var _=f;_ie(ae)),n.set(_+"",v))}if(c===void 0)(!d||cn(o,l)?.writable)&&(c=a(()=>ie(void 0)),U(c,wt(f)),n.set(l,c));else{d=c.v!==ae;var y=a(()=>wt(f));U(c,y)}var g=Reflect.getOwnPropertyDescriptor(o,l);if(g?.set&&g.set.call(h,f),!d){if(r&&typeof l=="string"){var m=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=m.v&&U(m,w+1)}Nn(s)}return!0},ownKeys(o){p(s);var l=Reflect.ownKeys(o).filter(c=>{var d=n.get(c);return d===void 0||d.v!==ae});for(var[f,h]of n)h.v!==ae&&!(f in o)&&l.push(f);return l},setPrototypeOf(){Pa()}})}function Ls(e){try{if(e!==null&&typeof e=="object"&&Bt in e)return e[Bt]}catch{}return e}function yo(e,t){return Object.is(Ls(e),Ls(t))}var br,Ci,xi,Ai;function wo(){if(br===void 0){br=window,Ci=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;xi=cn(t,"firstChild").get,Ai=cn(t,"nextSibling").get,Os(e)&&(e[Jr]=void 0,e[rr]=null,e[Xr]=void 0,e.__e=void 0),Os(n)&&(n[On]=void 0)}}function lt(e=""){return document.createTextNode(e)}function yr(e){return xi.call(e)}function Yn(e){return Ai.call(e)}function S(e,t){return yr(e)}function ct(e,t=!1){{var n=yr(e);return n instanceof Comment&&n.data===""?Yn(n):n}}function C(e,t=1,n=!1){let r=e;for(;t--;)r=Yn(r);return r}function ko(e){e.textContent=""}function Ti(){return!1}function Eo(e,t,n){return document.createElementNS(ai,e,void 0)}let Rs=!1;function So(){Rs||(Rs=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[sr]?.()})},{capture:!0}))}function Lr(e){var t=F,n=B;Be(null),et(null);try{return e()}finally{Be(t),et(n)}}function bs(e,t,n,r=n){e.addEventListener(t,()=>Lr(n));const s=e[sr];s?e[sr]=()=>{s(),r(!0)}:e[sr]=()=>r(!0),So()}function Co(e){B===null&&(F===null&&Ia(),Ma()),ut&&Oa()}function xo(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ft(e,t){var n=B;n!==null&&(n.f&_e)!==0&&(e|=_e);var r={ctx:ke,deps:null,nodes:null,f:e|ue|Pe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};L?.register_created_effect(r);var s=r;if((e&mn)!==0)on!==null?on.push(r):zt.ensure().schedule(r);else if(t!==null){try{kn(r)}catch(a){throw we(r),a}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&En)===0&&(s=s.first,(e&We)!==0&&(e&bn)!==0&&s!==null&&(s.f|=bn))}if(s!==null&&(s.parent=n,n!==null&&xo(s,n),F!==null&&(F.f&fe)!==0&&(e&St)===0)){var i=F;(i.effects??(i.effects=[])).push(s)}return r}function ys(){return F!==null&&!Ue}function ws(e){const t=ft(Mr,null);return ne(t,oe),t.teardown=e,t}function ks(e){Co();var t=B.f,n=!F&&(t&ze)!==0&&(t&Yt)===0;if(n){var r=ke;(r.e??(r.e=[])).push(e)}else return Oi(e)}function Oi(e){return ft(mn|Ea,e)}function Ao(e){zt.ensure();const t=ft(St|En,e);return(n={})=>new Promise(r=>{n.outro?Ht(t,()=>{we(t),r(void 0)}):(we(t),r(void 0))})}function Mi(e){return ft(mn,e)}function To(e){return ft(un|En,e)}function Rr(e,t=0){return ft(Mr|t,e)}function J(e,t=[],n=[],r=[]){ho(r,t,n,s=>{ft(Mr,()=>e(...s.map(p)))})}function Es(e,t=0){var n=ft(We|t,e);return n}function Ne(e){return ft(ze|En,e)}function Ii(e){var t=e.teardown;if(t!==null){const n=ut,r=F;Ns(!0),Be(null);try{t.call(null)}finally{Ns(n),Be(r)}}}function Ss(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Lr(()=>{s.abort(Ir)});var r=n.next;(n.f&St)!==0?n.parent=null:we(n,t),n=r}}function Oo(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ze)===0&&we(t),t=n}}function we(e,t=!0){var n=!1;(t||(e.f&ka)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Mo(e.nodes.start,e.nodes.end),n=!0),ne(e,Yr),Ss(e,t&&!n),qn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Ii(e),e.f^=Yr,e.f|=De;var s=e.parent;s!==null&&s.first!==null&&Li(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Mo(e,t){for(;e!==null;){var n=e===t?null:Yn(e);e.remove(),e=n}}function Li(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ht(e,t,n=!0){var r=[];Ri(e,r,!0);var s=()=>{n&&we(e),t&&t()},i=r.length;if(i>0){var a=()=>--i||s();for(var o of r)o.out(a)}else s()}function Ri(e,t,n){if((e.f&_e)===0){e.f^=_e;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var i=s.next;if((s.f&St)===0){var a=(s.f&bn)!==0||(s.f&ze)!==0&&(e.f&We)!==0;Ri(s,t,a?n:!1)}s=i}}}function Cs(e){Ni(e,!0)}function Ni(e,t){if((e.f&_e)!==0){e.f^=_e,(e.f&oe)===0&&(ne(e,ue),zt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&bn)!==0||(n.f&ze)!==0;Ni(n,s?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||t)&&a.in()}}function xs(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Yn(n);t.append(n),n=s}}let cr=!1,ut=!1;function Ns(e){ut=e}let F=null,Ue=!1;function Be(e){F=e}let B=null;function et(e){B=e}let Fe=null;function Pi(e){F!==null&&(Fe===null?Fe=[e]:Fe.push(e))}let be=null,Ee=0,Me=null;function Io(e){Me=e}let Di=1,Ot=0,qt=Ot;function Ps(e){qt=e}function Fi(){return++Di}function Jn(e){var t=e.f;if((t&ue)!==0)return!0;if(t&fe&&(e.f&=~Ut),(t&$e)!==0){for(var n=e.deps,r=n.length,s=0;se.wv)return!0}(t&Pe)!==0&&Ke===null&&ne(e,oe)}return!1}function Bi(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Fe!==null&&Ft.call(Fe,e)))for(var s=0;s{e.ac.abort(Ir)}),e.ac=null);try{e.f|=vr;var h=e.fn,c=h();e.f|=Yt;var d=e.deps,_=L?.is_fork;if(be!==null){var v;if(_||qn(e,Ee),d!==null&&Ee>0)for(d.length=Ee+be.length,v=0;vn?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Et(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ki(e,t,n,r,s){var i={capture:r,passive:s},a=Do(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ws(()=>{t.removeEventListener(e,a,i)})}function Ae(e,t,n){(t[Mt]??(t[Mt]={}))[e]=n}function Zt(e){for(var t=0;t{throw g});throw d}}finally{e[Mt]=t,delete e.currentTarget,Be(h),et(c)}}}const Fo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Bo(e){return Fo?.createHTML(e)??e}function jo(e){var t=Eo("template");return t.innerHTML=Bo(e.replaceAll("","")),t.content}function wr(e,t){var n=B;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function P(e,t){var n=(t&Ga)!==0,r=(t&Va)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=jo(i?e:""+e),n||(s=yr(s)));var a=r||Ci?document.importNode(s,!0):s.cloneNode(!0);if(n){var o=yr(a),l=a.lastChild;wr(o,l)}else wr(a,a);return a}}function Ho(e=""){{var t=lt(e+"");return wr(t,t),t}}function qo(){var e=document.createDocumentFragment(),t=document.createComment(""),n=lt();return e.append(t,n),wr(t,n),e}function R(e,t){e!==null&&e.before(t)}function Z(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[On]??(e[On]=e.nodeValue))&&(e[On]=n,e.nodeValue=`${n}`)}function As(e,t){return Wo(e,t)}const tr=new Map;function Wo(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:a=!0,transformError:o}){wo();var l=void 0,f=Ao(()=>{var h=n??t.appendChild(lt());oo(h,{pending:()=>{}},_=>{Jt({});var v=ke;i&&(v.c=i),s&&(r.$$events=s),l=e(_,r)||{},Xt()},o);var c=new Set,d=_=>{for(var v=0;v<_.length;v++){var y=_[v];if(!c.has(y)){c.add(y);var g=Po(y);for(const A of[t,document]){var m=tr.get(A);m===void 0&&(m=new Map,tr.set(A,m));var w=m.get(y);w===void 0?(A.addEventListener(y,as,{passive:g}),m.set(y,1)):m.set(y,w+1)}}}};return d(Or(Wi)),is.add(d),()=>{for(var _ of c)for(const g of[t,document]){var v=tr.get(g),y=v.get(_);--y==0?(g.removeEventListener(_,as),v.delete(_),v.size===0&&tr.delete(g)):v.set(_,y)}is.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return os.set(l,f),l}let os=new WeakMap;function Xn(e,t){const n=os.get(e);return n?(os.delete(e),n(t)):Promise.resolve()}var qe,Xe,xe,Dt,Gn,Vn,Tr;class Ko{constructor(t,n=!0){ge(this,"anchor");O(this,qe,new Map);O(this,Xe,new Map);O(this,xe,new Map);O(this,Dt,new Set);O(this,Gn,!0);O(this,Vn,t=>{if(u(this,qe).has(t)){var n=u(this,qe).get(t),r=u(this,Xe).get(n);if(r)Cs(r),u(this,Dt).delete(n);else{var s=u(this,xe).get(n);s&&(u(this,Xe).set(n,s.effect),u(this,xe).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,a]of u(this,qe)){if(u(this,qe).delete(i),i===t)break;const o=u(this,xe).get(a);o&&(we(o.effect),u(this,xe).delete(a))}for(const[i,a]of u(this,Xe)){if(i===n||u(this,Dt).has(i))continue;const o=()=>{if(Array.from(u(this,qe).values()).includes(i)){var f=document.createDocumentFragment();xs(a,f),f.append(lt()),u(this,xe).set(i,{effect:a,fragment:f})}else we(a);u(this,Dt).delete(i),u(this,Xe).delete(i)};u(this,Gn)||!r?(u(this,Dt).add(i),Ht(a,o,!1)):o()}}});O(this,Tr,t=>{u(this,qe).delete(t);const n=Array.from(u(this,qe).values());for(const[r,s]of u(this,xe))n.includes(r)||(we(s.effect),u(this,xe).delete(r))});this.anchor=t,T(this,Gn,n)}ensure(t,n){var r=L,s=Ti();if(n&&!u(this,Xe).has(t)&&!u(this,xe).has(t))if(s){var i=document.createDocumentFragment(),a=lt();i.append(a),u(this,xe).set(t,{effect:Ne(()=>n(a)),fragment:i})}else u(this,Xe).set(t,Ne(()=>n(this.anchor)));if(u(this,qe).set(r,t),s){for(const[o,l]of u(this,Xe))o===t?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of u(this,xe))o===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(u(this,Vn)),r.ondiscard(u(this,Tr))}else u(this,Vn).call(this,r)}}qe=new WeakMap,Xe=new WeakMap,xe=new WeakMap,Dt=new WeakMap,Gn=new WeakMap,Vn=new WeakMap,Tr=new WeakMap;function $(e,t,n=!1){var r=new Ko(e),s=n?bn:0;function i(a,o){r.ensure(a,o)}Es(()=>{var a=!1;t((o,l=0)=>{a=!0,i(l,o)}),a||i(-1,null)},s)}function Uo(e,t){return t}function zo(e,t,n){for(var r=[],s=t.length,i,a=t.length,o=0;o{if(i){if(i.pending.delete(c),i.done.add(c),i.pending.size===0){var d=e.outrogroups;ls(e,Or(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=r.length===0&&n!==null;if(l){var f=n,h=f.parentNode;ko(h),h.append(f),e.items.clear()}ls(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function ls(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const a of e.pending.values())for(const o of a)r.add(e.items.get(o).e)}for(var s=0;s{var A=n();return ps(A)?A:A==null?[]:Or(A)}),d,_=new Map,v=!0;function y(A){(w.effect.f&De)===0&&(w.pending.delete(A),w.fallback=h,Go(w,d,a,t,r),h!==null&&(d.length===0?(h.f&Ze)===0?Cs(h):(h.f^=Ze,In(h,null,a)):Ht(h,()=>{h=null})))}function g(A){w.pending.delete(A)}var m=Es(()=>{d=p(c);for(var A=d.length,M=new Set,z=L,se=Ti(),Q=0;Qi(a)):(h=Ne(()=>i(Fs??(Fs=lt()))),h.f|=Ze)),A>M.size&&Ta(),!v)if(_.set(z,M),se){for(const[tt,Oe]of o)M.has(tt)||z.skip_effect(Oe.e);z.oncommit(y),z.ondiscard(g)}else y(z);p(c)}),w={effect:m,items:o,pending:_,outrogroups:null,fallback:h};v=!1}function Tn(e){for(;e!==null&&(e.f&ze)===0;)e=e.next;return e}function Go(e,t,n,r,s){var i=(r&Ha)!==0,a=t.length,o=e.items,l=Tn(e.effect.first),f,h=null,c,d=[],_=[],v,y,g,m;if(i)for(m=0;m0){var he=(r&ii)!==0&&a===0?n:null;if(i){for(m=0;m{if(c!==void 0)for(g of c)g.nodes?.a?.apply()})}function Vo(e,t,n,r,s,i,a,o){var l=(a&Ba)!==0?(a&qa)===0?mo(n,!1,!1):Gt(n):null,f=(a&ja)!==0?Gt(s):null;return{v:l,i:f,e:Ne(()=>(i(t,l??n,f??s,o),()=>{e.delete(r)}))}}function In(e,t,n){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end,i=t&&(t.f&Ze)===0?t.nodes.start:n;r!==null;){var a=Yn(r);if(i.before(r),r===s)return;r=a}}function _t(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const Bs=[...` +\r\f \v\uFEFF`];function Yo(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var s of Object.keys(n))if(n[s])r=r?r+" "+s:s;else if(r.length)for(var i=s.length,a=0;(a=r.indexOf(s,a))>=0;){var o=a+i;(a===0||Bs.includes(r[a-1]))&&(o===r.length||Bs.includes(r[o]))?r=(a===0?"":r.substring(0,a))+r.substring(o+1):a=o}}return r===""?null:r}function Jo(e,t){return e==null?null:String(e)}function Vt(e,t,n,r,s,i){var a=e[Jr];if(a!==n||a===void 0){var o=Yo(n,r,i);o==null?e.removeAttribute("class"):e.className=o,e[Jr]=n}else if(i&&s!==i)for(var l in i){var f=!!i[l];(s==null||f!==!!s[l])&&e.classList.toggle(l,f)}return i}function Ui(e,t,n,r){var s=e[Xr];if(s!==t){var i=Jo(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e[Xr]=t}return r}function zi(e,t,n=!1){if(e.multiple){if(t==null)return;if(!ps(t))return Ja();for(var r of e.options)r.selected=t.includes(Pn(r));return}for(r of e.options){var s=Pn(r);if(yo(s,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Xo(e){var t=new MutationObserver(()=>{zi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ws(()=>{t.disconnect()})}function Zo(e,t,n=t){var r=new WeakSet,s=!0;bs(e,"change",i=>{var a=i?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(a),Pn);else{var l=e.querySelector(a)??e.querySelector("option:not([disabled])");o=l&&Pn(l)}n(o),e.__value=o,L!==null&&r.add(L)}),Mi(()=>{var i=t();if(e===document.activeElement){var a=L;if(r.has(a))return}if(zi(e,i,s),s&&i===void 0){var o=e.querySelector(":checked");o!==null&&(i=Pn(o),n(i))}e.__value=i,s=!1}),Xo(e)}function Pn(e){return"__value"in e?e.__value:e.value}const Qo=Symbol("is custom element"),$o=Symbol("is html");function ye(e,t,n,r){var s=el(e);s[t]!==(s[t]=n)&&(t==="loading"&&(e[Ca]=n),n==null?e.removeAttribute(t):typeof n!="string"&&tl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function el(e){return e[rr]??(e[rr]={[Qo]:e.nodeName.includes("-"),[$o]:e.namespaceURI===ai})}var js=new Map;function tl(e){var t=e.getAttribute("is")||e.nodeName,n=js.get(t);if(n)return n;js.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=ga(s);for(var a in r)r[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&n.push(a);s=ni(s)}return n}function cs(e,t,n=t){var r=new WeakSet;bs(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=qr(e)?Wr(i):i,n(i),L!==null&&r.add(L),await Ro(),i!==(i=t())){var a=e.selectionStart,o=e.selectionEnd,l=e.value.length;if(e.value=i??"",o!==null){var f=e.value.length;a===o&&o===l&&f>l?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=a,e.selectionEnd=Math.min(o,f))}}}),Sn(t)==null&&e.value&&(n(qr(e)?Wr(e.value):e.value),L!==null&&r.add(L)),Rr(()=>{var s=t();if(e===document.activeElement){var i=L;if(r.has(i))return}qr(e)&&s===Wr(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Gi(e,t,n=t){bs(e,"change",r=>{var s=r?e.defaultChecked:e.checked;n(s)}),Sn(t)==null&&n(e.checked),Rr(()=>{var r=t();e.checked=!!r})}function qr(e){var t=e.type;return t==="number"||t==="range"}function Wr(e){return e===""?null:+e}function Kr(e,t){return e===t||e?.[Bt]===t}function nl(e={},t,n,r){var s=ke.r,i=B;return Mi(()=>{var a,o;return Rr(()=>{a=o,o=[],Sn(()=>{Kr(n(...o),e)||(t(e,...o),a&&Kr(n(...a),e)&&t(null,...a))})}),()=>{let l=i;for(;l!==s&&l.parent!==null&&l.parent.f&Yr;)l=l.parent;const f=()=>{o&&Kr(n(...o),e)&&t(null,...o)},h=l.teardown;l.teardown=()=>{f(),h?.()}}}),e}function Dn(e,t,n,r){var s=!0,i=(n&Ua)!==0,a=(n&za)!==0,o=r,l=!0,f=void 0,h=()=>a&&s?(f??(f=Hn(r)),p(f)):(l&&(l=!1,o=a?Sn(r):r),o);let c;if(i){var d=Bt in e||Sa in e;c=cn(e,t)?.set??(d&&t in e?M=>e[t]=M:void 0)}var _,v=!1;i?[_,v]=eo(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=h(),c&&(Ra(),c(_)));var y;if(y=()=>{var M=e[t];return M===void 0?h():(l=!0,M)},(n&Ka)===0)return y;if(c){var g=e.$$legacy;return(function(M,z){return arguments.length>0?((!z||g||v)&&c(z?y():M),M):y()})}var m=!1,w=((n&Wa)!==0?Hn:yi)(()=>(m=!1,y()));i&&p(w);var A=B;return(function(M,z){if(arguments.length>0){const se=z?p(w):i?wt(M):M;return U(w,se),m=!0,o!==void 0&&(o=se),M}return ut&&m||(A.f&De)!==0?w.v:p(w)})}function Vi(e){ke===null&&xa(),ks(()=>{const t=Sn(e);if(typeof t=="function")return t})}const Yi="[data-v-app]",rl=["header","content","footer"];let ce=null,He=null;function sl(e){const t=e instanceof Set?e:new Set(e||[]);for(let n=0;n<16;n++){const r=crypto.randomUUID().replace(/-/g,"").slice(0,8);if(!t.has(r))return r}throw new Error("rebemer: id collision exhausted")}function il(){if(typeof document>"u")return!1;const t=document.querySelector(Yi)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(ce=null,!1):(ce=t,He=null,!0)}function al(){if(He!==null)return He;const e=typeof document<"u"?document.querySelector(Yi)?.__vue_app__:null;if(!e)return He=!1,!1;const t=e.config?.globalProperties??{};if(typeof ce?.$history?.pause=="function"&&typeof ce?.$history?.resume=="function")return He={pause:()=>ce.$history.pause(),resume:()=>ce.$history.resume()},He;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(He={pause:()=>n.history.pause(),resume:()=>n.history.resume()},He):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(He={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},He):(He=!1,!1)}function Ji(e){const t=al();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function Qe(e){if(!ce||!e)return null;for(const t of rl){const n=ce[t];if(!Array.isArray(n))continue;const r=n.find(s=>s&&s.id===e);if(r)return r}return null}function ol(e){const t=Qe(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return Xi(t,1,n),n}function Xi(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const s=Qe(r);s&&(n.push({id:s.id,depth:t,label:s.label,name:s.name,settings:s.settings}),Xi(s,t+1,n))}}function Zi(){return ce?ce.globalClasses:[]}function Ur(e,t){if(!ce)throw new Error("rebemer: not ready");const n=ce.globalClasses,r=n.find(a=>a&&a.name===e);if(r)return r.id;const s=new Set(n.map(a=>a?.id).filter(Boolean)),i=sl(s);return n.push({id:i,name:e,settings:t||{}}),i}function Hs(e,t){const n=Qe(e);if(!n)return;n.settings||(n.settings={});const r=Array.isArray(t)?t:[];Array.isArray(n.settings._cssGlobalClasses)?n.settings._cssGlobalClasses.splice(0,n.settings._cssGlobalClasses.length,...r):n.settings._cssGlobalClasses=[...r]}function qs(e,t){const n=Qe(e);n&&(n.label=t)}function ll(){if(ce){const e=[ce.activeElement,ce.activeElementId,ce.activeId,ce.selectedElement];for(const t of e){if(t&&typeof t=="object"&&typeof t.id=="string"&&t.id)return t.id;if(typeof t=="string"&&t)return t}}if(typeof document<"u"){const t=document.querySelector("#bricks-structure li[data-id].active, #bricks-structure li[data-id].is-active")?.getAttribute("data-id");if(t)return t}return null}const cl={text:["_typography","color"],background:["_background","color"],border:["_border","color"]};function ul(e,t,n){const r=cl[t];if(!r)return!1;const s=Qe(e);if(!s)return!1;(!s.settings||typeof s.settings!="object")&&(s.settings={});const[i,a]=r;return(!s.settings[i]||typeof s.settings[i]!="object")&&(s.settings[i]={}),s.settings[i][a]={raw:n},!0}function fl(e){const t=Qe(e);return t&&typeof t.label=="string"?t.label:""}const kr="slashed-rebemer-host",dl="slashed-class-hint",Qi=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],hl=3;function pl(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n[0]==="."&&(n=n.slice(1)),!n.startsWith("sf-")&&!n.startsWith("is-"))||!Object.prototype.hasOwnProperty.call(t,n))return null;const r=t[n];return!r||typeof r.description!="string"?null:{name:n,description:r.description,category:r.category}}let us=!1,Er={},ot=null,Fn=null,Te=null;function _l(){if(ot&&ot.isConnected)return ot;let e=document.getElementById(kr);e||(e=document.createElement("div"),e.id=kr,document.body.appendChild(e));const t=document.createElement("div");return t.id=dl,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

          ',e.appendChild(t),ot=t,t}function $i(e){let t=e;for(let n=0;t&&no&&n.top-i-s>=0&&(l=n.top-i-s);let f=n.left;f+r>a-4&&(f=Math.max(4,a-4-r)),f<4&&(f=4),e.style.top=`${Math.round(l)}px`,e.style.left=`${Math.round(f)}px`}function ea(e,t){const n=_l();n.querySelector(".rebemer-class-hint__name").textContent=`.${t.name}`;const r=n.querySelector(".rebemer-class-hint__cat");r.textContent=t.category||"",r.hidden=!t.category,n.querySelector(".rebemer-class-hint__desc").textContent=t.description,n.hidden=!1,vl(n,e),Te=e}function Ct(){ot&&(ot.hidden=!0),Te=null}function gl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${kr}`))return;if(!t.closest(Qi.join(","))){Te&&Ct();return}const n=$i(t);if(!n){Te&&Ct();return}n.el!==Te&&ea(n.el,n.hint)}function ml(e){if(!Te)return;const t=e.relatedTarget;t instanceof Node&&Te.contains(t)||Ct()}function bl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${kr}`))return;if(!t.closest(Qi.join(","))){Te&&Ct();return}const n=$i(t);if(!n){Te&&Ct();return}n.el!==Te&&ea(n.el,n.hint)}function yl(e){if(!Te)return;const t=e.relatedTarget;t instanceof Node&&Te.contains(t)||Ct()}function wl(e){e.key==="Escape"&&Ct()}function kl(e,t,n={}){if(ur(),us=!!e,Er=t&&typeof t=="object"?t:{},!us||Object.keys(Er).length===0)return;Fn=new AbortController;const{signal:r}=Fn,s={passive:!0,signal:r};document.addEventListener("mouseover",gl,s),document.addEventListener("mouseout",ml,s),document.addEventListener("focusin",bl,s),document.addEventListener("focusout",yl,s),document.addEventListener("keydown",wl,s),window.addEventListener("scroll",Ct,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?ur():n.signal.addEventListener("abort",ur,{once:!0}))}function ur(){Fn&&(Fn.abort(),Fn=null),ot&&(ot.remove(),ot=null),Te=null,us=!1,Er={}}const fr="li.variable-picker-item",dr="slashed-var-swatch",El=50,Sl=(e,...t)=>console[e]("[slashed-swatches]",...t);function Cl(e,t){if(!e||!t)return null;let n=String(e).trim();if(!n||/\s/.test(n)||(n.slice(0,2)!=="--"&&(n="--"+n.replace(/^-+/,"")),n.indexOf("--sf-color-")!==0))return null;const r=t[n];return typeof r=="string"&&r?r:null}let fs=!1,Sr={},Bn=null,fn=null,hr=null;function xl(e){const t=e.querySelector(":scope > span[title]")||e.querySelector(":scope > span");if(t){const n=t.getAttribute("title");return n&&n.trim()?n.trim():(t.textContent||"").trim()}return(e.textContent||"").trim()}function Al(e){if(e.classList.contains("title")||e.classList.contains("category")){const r=e.querySelector(":scope > ."+dr);r&&r.remove();return}const t=Cl(xl(e),Sr);let n=e.querySelector(":scope > ."+dr);if(!t){n&&n.remove();return}n||(n=document.createElement("span"),n.className=dr,n.setAttribute("aria-hidden","true"),e.insertBefore(n,e.firstChild)),n.dataset.color!==t&&(n.style.setProperty("--slashed-swatch-color",t),n.dataset.color=t)}function ta(){try{const e=document.querySelectorAll(fr);for(const t of e)Al(t)}catch(e){Sl("warn","swatch pass failed",e)}}function Tl(){fn===null&&(fn=setTimeout(()=>{fn=null,ta()},El))}function Ol(e){for(const t of e){const n=t.target;if(n&&n.nodeType===1&&n.closest&&n.closest(fr))return!0;for(const r of t.addedNodes)if(r.nodeType===1&&(r.matches&&r.matches(fr)||r.querySelector&&r.querySelector(fr)))return!0}return!1}function Ml(e,t,n={}){pr(),fs=!!e,Sr=t&&typeof t=="object"?t:{},!(!fs||Object.keys(Sr).length===0)&&(hr=new AbortController,Bn=new MutationObserver(r=>{Ol(r)&&Tl()}),Bn.observe(document.body,{childList:!0,subtree:!0}),ta(),n.signal&&(n.signal.aborted?pr():n.signal.addEventListener("abort",pr,{once:!0})))}function pr(){fn!==null&&(clearTimeout(fn),fn=null),Bn&&(Bn.disconnect(),Bn=null),hr&&(hr.abort(),hr=null);try{document.querySelectorAll("."+dr).forEach(e=>e.remove())}catch{}fs=!1,Sr={}}const Il="5";var ti;typeof window<"u"&&((ti=window.__svelte??(window.__svelte={})).v??(ti.v=new Set)).add(Il);var Ll=P('reBEM');function Rl(e,t){Jt(t,!0);function n(s){s.stopPropagation(),s.preventDefault(),t.onActivate?.(t.elementId)}var r=Ll();J(()=>{ye(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),ye(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),Ae("click",r,n),Ae("keydown",r,s=>(s.key==="Enter"||s.key===" ")&&n(s)),R(e,r),Xt()}Zt(["click","keydown"]);function Wt(e){return e?String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x00-\x7f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}const Nl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Pl=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function Dl(e){return e?Pl.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:Nl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const Nr=new Set(["_padding","_padding_top","_padding_right","_padding_bottom","_padding_left","_margin","_margin_top","_margin_right","_margin_bottom","_margin_left","_width","_widthMin","_widthMax","_minWidth","_maxWidth","_height","_heightMin","_heightMax","_minHeight","_maxHeight","_aspectRatio","_overflow","_overflowX","_overflowY","_color","_background","_backgroundColor","_backgroundImage","_backgroundSize","_backgroundPosition","_backgroundRepeat","_backgroundAttachment","_backgroundBlendMode","_typography","_fontFamily","_fontSize","_fontWeight","_fontStyle","_lineHeight","_letterSpacing","_wordSpacing","_textAlign","_textTransform","_textDecoration","_textDecorationColor","_textShadow","_textIndent","_whiteSpace","_listStyleType","_listStylePosition","_border","_borderRadius","_borderColor","_borderStyle","_borderWidth","_outline","_outlineColor","_outlineStyle","_outlineWidth","_outlineOffset","_boxShadow","_filter","_backdropFilter","_opacity","_blendMode","_transform","_transformOrigin","_transition","_animation","_display","_flexDirection","_flexWrap","_flexGrow","_flexShrink","_flexBasis","_alignItems","_alignSelf","_alignContent","_justifyContent","_justifyItems","_justifySelf","_gap","_rowGap","_columnGap","_gridTemplateColumns","_gridTemplateRows","_gridGap","_gridAutoFlow","_gridAutoColumns","_gridAutoRows","_gridColumn","_gridRow","_gridArea","_position","_top","_right","_bottom","_left","_zIndex","_objectFit","_objectPosition","_cursor","_pointerEvents","_userSelect"]);function Fl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Nr.has(n)&&t.push(n);return t.sort(),t}const Bl=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function jl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))Nr.has(n)||Bl.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Hl=new Set(["add","rename","replace","modifier","migrate"]),Ws=new Set(["user","label"]);function na({rootId:e,rows:t,mode:n}){if(!Hl.has(n))return{ok:!1,ops:[],error:`Invalid mode: ${n}`};const r=t.find(o=>o.id===e);if(!r)return{ok:!1,ops:[],error:"Root row missing."};const s=Wt(r.name);if(!s)return{ok:!1,ops:[],error:"Block name is empty."};const i=[];for(const o of t){if(!o.include)continue;const l=o.id===e;let f;if(l)f=s;else{const c=Wt(o.name);if(!c)continue;f=`${s}__${c}`}let h=f;if(n==="modifier"){const c=Wt(o.modifier);if(!c)continue;h=`${f}--${c}`}i.push({row:o,isRoot:l,finalClass:h,suggestedFrom:o.suggestedFrom||"fallback"})}if(i.length===0)return{ok:!1,ops:[],error:"No rows to apply. Include at least one row."};const a=Kl(i,n);return a.ok?{ok:!0,ops:i}:{ok:!1,ops:[],error:a.error}}function ql({rootId:e,rows:t,mode:n,syncLabels:r}){const s=na({rootId:e,rows:t,mode:n});if(!s.ok)return{ok:!1,error:s.error};const i=s.ops,a=t.find(c=>c.id===e),o=Wt(a?.name??""),l=Zi();if(n==="migrate"){const c=Wl(i,l);if(!c.ok)return c}const f=new Map;for(const c of i){const d=Qe(c.row.id);if(!d)continue;const _={classIds:Ks(d.settings).slice(),label:r&&n!=="modifier"?d.label??"":null};if(n==="migrate"&&Array.isArray(c.row.migrateKeys)){const v={};for(const y of c.row.migrateKeys)Object.prototype.hasOwnProperty.call(d.settings||{},y)&&(v[y]=JSON.parse(JSON.stringify(d.settings[y])));_.migrateKeys=v}f.set(c.row.id,_)}let h=0;try{Ji(()=>{for(const c of i){const d=Qe(c.row.id);if(!d)continue;const _=Ks(d.settings);let v={};if(n==="rename"&&_.length>0){const m=l.find(w=>w&&w.id===_[0]);m&&m.settings&&(v=JSON.parse(JSON.stringify(m.settings)))}else n==="migrate"&&(v=ra(d.settings,c.row.migrateKeys));if(n==="migrate"){const m=l.find(w=>w&&w.name===c.finalClass);if(m){(!m.settings||typeof m.settings!="object")&&(m.settings={});for(const[w,A]of Object.entries(v))Object.prototype.hasOwnProperty.call(m.settings,w)||(m.settings[w]=A)}}const y=Ur(c.finalClass,v);let g;switch(n){case"add":case"migrate":g=_.includes(y)?_:[..._,y];break;case"modifier":{const m=c.finalClass.indexOf("--"),w=m>=0?c.finalClass.slice(0,m):null;let A=[..._];if(w){const M=Ur(w,{});A.includes(M)||A.push(M)}g=A.includes(y)?A:[...A,y];break}case"rename":{const m=[y],w=_.length>0?l.find(A=>A&&A.id===_[0]):null;if(w){const A=w.name+"--";for(let M=1;M<_.length;M++){const z=l.find(se=>se&&se.id===_[M]);if(z)if(z.name.startsWith(A)){const se=z.name.slice(w.name.length),Q=z.settings?JSON.parse(JSON.stringify(z.settings)):{};m.push(Ur(c.finalClass+se,Q))}else m.push(_[M])}}g=m;break}case"replace":g=[y];break}if(Hs(c.row.id,g),n==="migrate"&&Ul(d.settings,c.row.migrateKeys),r&&n!=="modifier"){const m=zl(c.finalClass,o);m&&qs(c.row.id,m)}h++}})}catch(c){for(const[_,v]of f)try{if(Hs(_,v.classIds),v.migrateKeys){const y=Qe(_);y&&y.settings&&Object.assign(y.settings,v.migrateKeys)}v.label!==null&&qs(_,v.label)}catch{}const d=c instanceof Error?c.message:String(c);return console.warn("[reBEMer] apply failed after",h,"mutation(s), rolled back:",d),{ok:!1,error:`Operation failed and was rolled back: ${d}`}}return h===0?{ok:!1,error:"No elements were modified. The subtree may have changed."}:{ok:!0,count:h}}function Wl(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const s=Qe(n.row.id);if(!s)continue;const i=ra(s.settings,n.row.migrateKeys),a=r.settings&&typeof r.settings=="object"?r.settings:{},o=[];for(const[l,f]of Object.entries(i))Object.prototype.hasOwnProperty.call(a,l)&&JSON.stringify(a[l])!==JSON.stringify(f)&&o.push(l.replace(/^_/,""));if(o.length>0){const l=o.join(", ");return{ok:!1,error:`Migrate blocked: existing class "${n.finalClass}" has conflicting values for ${l}. Pick a different name or use Add mode.`}}}return{ok:!0}}function Kl(e,t){const n=new Map;for(const r of e){const s=n.get(r.finalClass)||[];s.push(r),n.set(r.finalClass,s)}for(const[r,s]of n){if(s.length===1||t==="modifier")continue;const i=s.filter(o=>Ws.has(o.suggestedFrom));if(i.length>1)return{ok:!1,error:`"${r}" is used by ${i.length} rows. Edit one to make it unique.`};let a=1;for(const o of s)Ws.has(o.suggestedFrom)||(o.finalClass=`${r}-${a++}`,o.suggestedFrom="auto-number")}if(t!=="modifier"){const r=new Map;for(const s of e){const i=r.get(s.finalClass);if(i)return{ok:!1,error:`"${s.finalClass}" is produced by 2 rows after auto-numbering (one ${i}, one ${s.suggestedFrom}). Pick a different name for one of them.`};r.set(s.finalClass,s.suggestedFrom)}}return{ok:!0}}function ra(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)Nr.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Ul(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)Nr.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function Ks(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function zl(e,t){let n=e;return n===t?Us(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),Us(n.replace(/-/g," ")))}function Us(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const Gl=Object.freeze({heading:"heading","text-basic":"text",text:"text","text-link":"link",code:"code",image:"image",icon:"icon","icon-box":"icon",video:"video",audio:"audio",svg:"svg",logo:"logo",shape:"shape",button:"button","button-group":"buttons","nav-nested":"nav","nav-menu":"nav",list:"list",accordion:"accordion",tabs:"tabs",slider:"slider",carousel:"carousel",countdown:"countdown",counter:"counter",testimonials:"testimonials",pricing:"pricing",team:"team",form:"form",posts:"posts",template:"item"}),sa=new Set(["section","container","block","div"]);function Vl(e,t="item"){return!e||typeof e!="string"||sa.has(e)?t:Gl[e]||t}function zr(e){return typeof e=="string"&&sa.has(e)}const Yl=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function Jl(e,t,n){const r=new Set(e.filter(Boolean)),s=(..._)=>_.some(v=>r.has(v)),i=s("button","button-group"),a=s("heading"),o=s("text-basic","text"),l=s("image"),f=s("nav-nested","nav-menu"),h=s("form"),c=s("icon","icon-box"),d=s("list");return h?"form":f?"nav":i&&!a&&!o?"actions":l&&!o&&!a&&!i?"media":a&&!o&&!i?"header":o&&!a&&!i?"body":a&&o?"content":a&&i?"header":c&&!o&&!a?"icon-group":d?"list-wrap":n>1?t===0?"header":t===n-1?"footer":"body":"content"}var Xl=P('suggested'),Zl=P(' '),Ql=P(''),$l=P('

          Enter a modifier name — the base class will be added automatically if absent.

          '),ec=P('

          This element has no existing classes. Rename will create a new class instead.

          '),tc=P('

          '),nc=P(`A class named already exists. On Apply, missing style keys will be merged into it. Conflicting values block the migration — pick a different name or use Add.`,1),rc=P(`A class named already exists globally. Apply will attach the existing class instead of - creating a duplicate.`,1),sc=P('

          '),ic=P(' '),ac=P('Migrate: ',1),oc=P('No migratable keys on this element.'),lc=P(' '),cc=P('
          '),uc=P('
          ');function fc(e,t){Jt(t,!0);let n=Dn(t,"row",15),r=Dn(t,"globalClasses",19,()=>[]),s=Dn(t,"finalClassName",3,"");const i=le(()=>t.mode==="modifier"),a=le(()=>t.mode==="migrate"),o=le(()=>t.mode==="rename"),l=le(()=>!t.isRoot&&t.blockName?`${t.blockName}__`:""),f=le(()=>n().suggestedFrom==="element-type"||n().suggestedFrom==="fallback"),h=le(()=>!s()||!Array.isArray(r())||!n().include?null:r().find(b=>b&&b.name===s())||null);function c(){n().suggestedFrom!=="user"&&n(n().suggestedFrom="user",!0)}function d(b){return b.startsWith("_")?b.slice(1):b}var p=uc();let v;var y=E(p),g=E(y),m=S(y,2),w=E(m),A=E(w),M=S(w,2),U=E(M),se=S(M,2);{var Q=b=>{var N=Xl();Y(()=>ye(N,"title",`Pre-filled from ${n().suggestedFrom==="element-type"?"Bricks element type":"fallback"}`)),R(b,N)};$(se,b=>{_(f)&&n().include&&b(Q)})}var de=S(m,2),he=E(de),z=E(he);{var tt=b=>{var N=Zl(),ee=E(N);Y(()=>Z(ee,_(l))),R(b,N)};$(z,b=>{_(l)&&b(tt)})}var Oe=S(z,2),dt=S(he,2);{var xt=b=>{var N=Ql();Y(()=>N.disabled=!n().include),Ae("input",N,c),cs(N,()=>n().modifier,ee=>n(n().modifier=ee,!0)),R(b,N)};$(dt,b=>{_(i)&&b(xt)})}var Qt=S(de,2);{var $t=b=>{var N=$l();R(b,N)};$(Qt,b=>{_(i)&&n().include&&!n().modifier&&b($t)})}var At=S(Qt,2);{var Cn=b=>{var N=ec();R(b,N)},en=b=>{var N=tc(),ee=E(N);Y(()=>Z(ee,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),R(b,N)};$(At,b=>{_(o)&&n().include&&n().currentClassCount===0?b(Cn):_(o)&&n().include&&n().currentClassCount>1&&b(en,1)})}var tn=S(At,2);{var nn=b=>{var N=sc(),ee=E(N);{var x=I=>{var X=nc(),K=S(ct(X)),te=E(K);Y(()=>Z(te,s())),R(I,X)},W=I=>{var X=rc(),K=S(ct(X)),te=E(K);Y(()=>Z(te,s())),R(I,X)};$(ee,I=>{_(a)?I(x):I(W,-1)})}R(b,N)};$(tn,b=>{_(h)&&b(nn)})}var k=S(tn,2);{var C=b=>{var N=cc(),ee=E(N);{var x=K=>{var te=ac(),G=S(ct(te),2);vt(G,17,()=>n().migrateKeys,Uo,(ve,j)=>{var D=ic(),V=E(D);Y(je=>{ye(D,"title",`Will be lifted into ${(s()||"the new class")??""}`),Z(V,je)},[()=>d(_(j))]),R(ve,D)}),R(K,te)},W=K=>{var te=oc();R(K,te)};$(ee,K=>{n().migrateKeys?.length?K(x):K(W,-1)})}var I=S(ee,2);{var X=K=>{var te=lc(),G=E(te);Y(()=>Z(G,`${n().skippedKeys.length??""} skipped`)),R(K,te)};$(I,K=>{n().skippedKeys?.length&&K(X)})}R(b,N)};$(k,b=>{_(a)&&n().include&&b(C)})}Y(b=>{v=Vt(p,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":_(f)}),Ui(p,`--rebemer-row-depth: ${n().depth??0??""}`),Z(A,n().originalLabel),Z(U,b),ye(Oe,"placeholder",t.isRoot?"block-name":"element-name"),Oe.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),Gi(g,()=>n().include,b=>n(n().include=b,!0)),Ae("input",Oe,c),cs(Oe,()=>n().name,b=>n(n().name=b,!0)),R(e,p),Xt()}Zt(["input"]);var dc=P(" ");function ia(e,t){Jt(t,!0);let n=Dn(t,"kind",3,"info"),r=Dn(t,"duration",3,3e3),s=ie(!0);ks(()=>{if(!_(s)||r()<=0)return;const f=setTimeout(()=>{J(s,!1),t.onDismiss?.()},r());return()=>clearTimeout(f)});const i=le(()=>n()==="error"?"alert":"status");var a=qo(),o=ct(a);{var l=f=>{var h=dc(),c=E(h);Y(()=>{Vt(h,1,`rebemer-toast rebemer-toast--${n()??""}`),ye(h,"role",_(i)),ye(h,"aria-live",n()==="error"?"assertive":"polite"),Z(c,t.message)}),Ae("click",h,()=>{J(s,!1),t.onDismiss?.()}),R(f,h)};$(o,f=>{_(s)&&f(l)})}R(e,a),Xt()}Zt(["click"]);var hc=P("Will migrate ",1),_c=P(' '),pc=P(''),vc=P(' ',1);function gc(e,t){Jt(t,!0);const n={add:"Attaches a new BEM class to each element without removing any existing classes.",rename:"Replaces the first existing class with a new name, seeding its settings from the old class.",replace:"Replaces ALL existing classes with a single new BEM class (clean slate, no settings carried over).",modifier:"Appends a --modifier variant. The base class is auto-added to the element if absent.",migrate:"Lifts inline element styles (padding, color, typography, etc.) into a new global class."};let r=ie("add"),s=ie(!0),i=ie(wt([])),a=ie(wt([])),o=ie(null),l=ie(null);const f=le(()=>Wt(_(i)[0]?.name??"")),h=le(()=>_(i)[0]?.originalLabel??""),c=le(()=>{if(_(r)!=="migrate")return null;let x=0,W=0;for(const I of _(i))I.include&&(x+=I.migrateKeys?.length??0,W+=I.skippedKeys?.length??0);return{willMigrate:x,willSkip:W}}),d=le(()=>{if(_(i).length===0)return new Map;const x=na({rootId:t.rootId,rows:_(i),mode:_(r)}),W=new Map;if(!x.ok)return W;for(const I of x.ops)W.set(I.row.id,I.finalClass);return W});Vi(()=>{const x=ol(t.rootId);J(a,Zi().slice(),!0);const W=x.map((I,X)=>{const K=X===0,te=I.label||"",G=Wt(te),ve=I.name||"";let j,D;return G?(j=G,D="label"):K?(j="block",D="fallback"):ve&&!zr(ve)?(j=Vl(ve,"item"),D="element-type"):(j="item",D="fallback"),{id:I.id,depth:I.depth,bricksType:ve,originalLabel:te||(K?"block":"element"),name:j,modifier:"",include:!0,suggestedFrom:D,migrateKeys:Fl(I.settings),skippedKeys:jl(I.settings),currentClassCount:Array.isArray(I.settings?._cssGlobalClasses)?I.settings._cssGlobalClasses.filter(V=>typeof V=="string"&&V.length>0).length:0}});if(W.length>1){const I=new Map(x.map(G=>[G.id,[]])),X=[];for(const G of x){for(;X.length&&X[X.length-1].depth>=G.depth;)X.pop();X.length&&I.get(X[X.length-1].id).push(G.id),X.push(G)}const K=new Map(x.map(G=>[G.id,G])),te=new Map(W.map(G=>[G.id,G]));for(const[,G]of I){if(!G.length)continue;const ve=new Map;for(const D of G){const V=K.get(D)?.name;V&&ve.set(V,(ve.get(V)??0)+1)}const j=G.filter(D=>zr(K.get(D)?.name??""));for(const D of G){const V=te.get(D),je=K.get(D);if(!(!V||!je||V.suggestedFrom==="label")){if(zr(je.name)){const ht=(I.get(D)??[]).map(Dr=>K.get(Dr)?.name??"").filter(Boolean),Pr=j.indexOf(D);V.name=Jl(ht,Pr,j.length),V.suggestedFrom="element-type"}else if((ve.get(je.name)??0)===1){const ht=Yl[je.name];ht&&(V.name=ht,V.suggestedFrom="element-type")}}}}}J(i,W,!0)});function p(x){if(x.key==="Escape"){t.onClose?.();return}_(l)&&x.target instanceof Node&&_(l).contains(x.target)&&x.key==="Enter"&&(x.target?.tagName==="INPUT"||x.target?.tagName==="SELECT")&&(x.preventDefault(),y())}let v=null;function y(){const x=Wt(_(i)[0]?.name??""),W=Dl(x);if(!W.ok){J(o,{kind:"error",message:W.reason},!0);return}const I=ql({rootId:t.rootId,rows:_(i),mode:_(r),syncLabels:_(s)});I.ok?(J(o,{kind:"success",message:`Applied to ${I.count} element${I.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):J(o,{kind:"error",message:I.error},!0)}ks(()=>()=>{v&&clearTimeout(v)});var g=vc();Ki("keydown",br,p);var m=ct(g),w=E(m),A=E(w),M=S(E(A)),U=E(M),se=S(A,2),Q=S(w,2),de=E(Q),he=S(E(de),2),z=E(he);z.value=z.__value="add";var tt=S(z);tt.value=tt.__value="rename";var Oe=S(tt);Oe.value=Oe.__value="replace";var dt=S(Oe);dt.value=dt.__value="modifier";var xt=S(dt);xt.value=xt.__value="migrate";var Qt=S(de,2),$t=E(Qt),At=S(Q,2),Cn=E(At),en=S(At,2);{var tn=x=>{var W=pc();let I;var X=E(W);{var K=j=>{var D=Ho("No migratable style keys found on any included element. Apply will attach empty classes.");R(j,D)},te=j=>{var D=hc(),V=S(ct(D)),je=E(V),ht=S(V);Y(()=>{Z(je,_(c).willMigrate),Z(ht,` style key${_(c).willMigrate===1?"":"s"} into new classes.`)}),R(j,D)};$(X,j=>{_(c).willMigrate===0?j(K):j(te,-1)})}var G=S(X,2);{var ve=j=>{var D=_c(),V=E(D);Y(()=>Z(V,`${_(c).willSkip??""} key${_(c).willSkip===1?"":"s"} not on the allowlist will stay on the element.`)),R(j,D)};$(G,j=>{_(c).willSkip>0&&j(ve)})}Y(()=>I=Vt(W,1,"rebemer-panel__notice",null,I,{"rebemer-panel__notice--warn":_(c).willSkip>0||_(c).willMigrate===0})),R(x,W)};$(en,x=>{_(c)&&x(tn)})}var nn=S(en,2);vt(nn,23,()=>_(i),x=>x.id,(x,W,I)=>{{let X=le(()=>_(W).id===t.rootId),K=le(()=>_(d).get(_(W).id)??"");fc(x,{get mode(){return _(r)},get blockName(){return _(f)},get isRoot(){return _(X)},get globalClasses(){return _(a)},get finalClassName(){return _(K)},get row(){return _(i)[_(I)]},set row(te){_(i)[_(I)]=te}})}});var k=S(nn,2),C=E(k),b=S(C,2);nl(m,x=>J(l,x),()=>_(l));var N=S(m,2);{var ee=x=>{ia(x,{get kind(){return _(o).kind},get message(){return _(o).message},onDismiss:()=>{J(o,null)}})};$(N,x=>{_(o)&&x(ee)})}Y(()=>{Z(U,_(h)),$t.disabled=_(r)==="modifier",Z(Cn,n[_(r)])}),Ae("click",se,()=>t.onClose?.()),Zo(he,()=>_(r),x=>J(r,x)),Gi($t,()=>_(s),x=>J(s,x)),Ae("click",C,()=>t.onClose?.()),Ae("click",b,y),R(e,g),Xt()}Zt(["click"]);var mc=P('');function bc(e,t){var n=mc();let r;Y(()=>{r=Vt(n,1,"slashed-cp-launch",null,r,{"slashed-cp-launch--on":t.open}),ye(n,"aria-pressed",t.open)}),Ae("click",n,function(...s){t.onToggle?.apply(this,s)}),R(e,n)}Zt(["click"]);const zs="--sf-color-",aa=["primary","secondary","tertiary","action","neutral","base"],oa=["success","warning","error","info","danger"],Gs=["a5","a10","a20","a30","a40","a50","a60","a70","a80","a90","a95"],Vs=["superlight","xlight","lighter","darker","xdark","superdark","hover","active","strong","subtle","muted","ghost"],nr=["text","heading","bg","surface","well","raised","overlay","inverse","border","link","code","selection","mark","dim"],yc=e=>new Set(e),wc=yc([...aa,...oa]),Ys={primary:{tagline:"Brand identity & main emphasis",use:"Headlines, primary buttons, key brand moments."},secondary:{tagline:"Supporting brand tone",use:"Secondary surfaces and muted brand accents."},tertiary:{tagline:"Accent / highlight",use:"Badges, tags, decorative highlights."},action:{tagline:"Interactive & links",use:"Links, focus rings, anything clickable."},neutral:{tagline:"Text, icons & dividers",use:"Body text, borders, neutral UI chrome."},base:{tagline:"Page & surface backgrounds",use:"Page background and raised surfaces."},success:{tagline:"Positive / confirmation",use:"Success messages and valid state."},warning:{tagline:"Caution",use:"Warnings and at-risk / pending state."},error:{tagline:"Form & validation errors",use:"Invalid inputs and error messages."},info:{tagline:"Informational",use:"Tips and neutral notices."},danger:{tagline:"Destructive actions",use:"Delete / remove and irreversible actions."},semantic:{tagline:"Ready-made role tokens",use:"Pre-wired roles that already adapt to light/dark."}},Gr=[{id:"text-on",label:"Text on color",match:e=>e.startsWith("text--on")},{id:"text",label:"Text",match:e=>e==="text"||e==="heading"||e.startsWith("text-")},{id:"state",label:"Interactive states",match:e=>e.startsWith("bg--")},{id:"surface",label:"Surfaces & backgrounds",match:e=>["bg","surface","well","raised","overlay","inverse"].some(t=>e===t||e.startsWith(t+"-"))},{id:"border",label:"Borders",match:e=>e==="border"||e.startsWith("border-")},{id:"link",label:"Links",match:e=>e==="link"||e.startsWith("link-")},{id:"select",label:"Selection & marks",match:e=>e.startsWith("selection")||e.startsWith("mark")||e==="dim"},{id:"code",label:"Code",match:e=>e.startsWith("code")}];function kc(e){if(typeof e!="string"||e.indexOf(zs)!==0)return null;const t=e.slice(zs.length);if(!t||t==="scheme")return null;const n=t.indexOf("-"),r=n===-1?t:t.slice(0,n);if(!wc.has(r))return{family:"semantic",kind:"semantic",step:null,key:t};const s=n===-1?"":t.slice(n+1);return s===""?{family:r,kind:"base",step:null,key:t}:s==="light"?null:/^[0-9]+$/.test(s)?{family:r,kind:"scale",step:Number(s),key:t}:/^a[0-9]+$/.test(s)?{family:r,kind:"alpha",step:s,key:t}:{family:r,kind:"alias",step:s,key:t}}function Ec(e){return e.kind==="alpha"?!0:/(?:^|-)(?:subtle|muted|ghost|translucent|overlay|dim|underline)$/.test(e.key)}function Sc(e){switch(e.kind){case"base":return Cr(e.family);case"scale":return String(e.step);case"alpha":return String(e.step).toUpperCase();case"alias":return Cr(String(e.step));case"semantic":default:return Cc(e.key)}}function Cr(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function Cc(e){return e.split("--").map(n=>n.split("-").map(Cr).join(" ")).join(" · ")}function xc(e,t,n,r){const s=n[e];if(typeof s!="string"||!s)return null;const i=typeof r[e]=="string"&&r[e]?r[e]:s;return{var:e,name:e.slice(2),label:Sc(t),light:s,dark:i,alpha:Ec(t)}}function Ac(e,t){const n={base:0,scale:1,alias:2,alpha:3};if(n[e.info.kind]!==n[t.info.kind])return n[e.info.kind]-n[t.info.kind];if(e.info.kind==="scale")return e.info.step-t.info.step;if(e.info.kind==="alpha")return Gs.indexOf(e.info.step)-Gs.indexOf(t.info.step);if(e.info.kind==="alias"){const r=Vs.indexOf(e.info.step),s=Vs.indexOf(t.info.step);return(r===-1?999:r)-(s===-1?999:s)}return 0}function Tc(e,t){const n=nr.findIndex(a=>e.info.key===a||e.info.key.startsWith(a+"-")),r=nr.findIndex(a=>t.info.key===a||t.info.key.startsWith(a+"-")),s=n===-1?nr.length:n,i=r===-1?nr.length:r;return s!==i?s-i:e.info.key.localeCompare(t.info.key)}function Oc(e,t,n){const r=Array.isArray(e)?e:[],s=t&&typeof t=="object"?t:{},i=n&&typeof n=="object"?n:{},a=new Map,o=[];for(const h of r){const c=kc(h);if(!c)continue;const d=xc(h,c,s,i);if(!d)continue;const p={swatch:d,info:c};if(c.family==="semantic"){o.push(p);continue}a.has(c.family)||a.set(c.family,[]),a.get(c.family).push(p)}const l=[],f=(h,c)=>{const d=a.get(h);if(!d||d.length===0)return;d.sort(Ac);const p=d.filter(w=>w.info.kind==="base"||w.info.kind==="scale"),v=d.filter(w=>w.info.kind==="alias"),y=d.filter(w=>w.info.kind==="alpha"),g=[];p.length&&g.push({id:"scale",label:"Shades & tints",swatches:p.map(w=>w.swatch)}),y.length&&g.push({id:"alpha",label:"Transparent",swatches:y.map(w=>w.swatch)}),v.length&&g.push({id:"alias",label:"Semantic",swatches:v.map(w=>w.swatch)});const m=Ys[h]||{};l.push({id:h,label:Cr(h),type:c,count:d.length,tagline:m.tagline||"",use:m.use||"",sections:g})};for(const h of aa)f(h,"brand");for(const h of oa)f(h,"status");if(o.length){o.sort(Tc);const h=new Map(Gr.map(v=>[v.id,[]])),c=[];for(const v of o){const y=Gr.find(g=>g.match(v.info.key));y?h.get(y.id).push(v.swatch):c.push(v.swatch)}const d=[];for(const v of Gr){const y=h.get(v.id);y.length&&d.push({id:v.id,label:v.label,swatches:y})}c.length&&d.push({id:"other",label:"Other",swatches:c});const p=Ys.semantic||{};l.push({id:"semantic",label:"Semantic",type:"semantic",count:o.length,tagline:p.tagline||"",use:p.use||"",sections:d})}return{groups:l}}function Mc(e,t){const n=String(t||"").trim().toLowerCase();if(!n)return e;if(!e||!Array.isArray(e.groups))return{groups:[]};const r=[];for(const s of e.groups){const i=[];for(const a of s.sections){const o=a.swatches.filter(l=>l.name.toLowerCase().includes(n)||l.label.toLowerCase().includes(n)||s.label.toLowerCase().includes(n));o.length&&i.push({...a,swatches:o})}if(i.length){const a=i.reduce((o,l)=>o+l.swatches.length,0);r.push({...s,sections:i,count:a})}}return{groups:r}}function Ic(e){return`var(${e.var})`}function Lc(e,t){return t==="dark"?e.dark:e.light}var Rc=P('');function Js(e,t){Jt(t,!0);const n=le(()=>`${t.swatch.name} + creating a duplicate.`,1),sc=P('

          '),ic=P(' '),ac=P('Migrate: ',1),oc=P('No migratable keys on this element.'),lc=P(' '),cc=P('
          '),uc=P('
          ');function fc(e,t){Jt(t,!0);let n=Dn(t,"row",15),r=Dn(t,"globalClasses",19,()=>[]),s=Dn(t,"finalClassName",3,"");const i=le(()=>t.mode==="modifier"),a=le(()=>t.mode==="migrate"),o=le(()=>t.mode==="rename"),l=le(()=>!t.isRoot&&t.blockName?`${t.blockName}__`:""),f=le(()=>n().suggestedFrom==="element-type"||n().suggestedFrom==="fallback"),h=le(()=>!s()||!Array.isArray(r())||!n().include?null:r().find(b=>b&&b.name===s())||null);function c(){n().suggestedFrom!=="user"&&n(n().suggestedFrom="user",!0)}function d(b){return b.startsWith("_")?b.slice(1):b}var _=uc();let v;var y=S(_),g=S(y),m=C(y,2),w=S(m),A=S(w),M=C(w,2),z=S(M),se=C(M,2);{var Q=b=>{var N=Xl();J(()=>ye(N,"title",`Pre-filled from ${n().suggestedFrom==="element-type"?"Bricks element type":"fallback"}`)),R(b,N)};$(se,b=>{p(f)&&n().include&&b(Q)})}var de=C(m,2),he=S(de),G=S(he);{var tt=b=>{var N=Zl(),ee=S(N);J(()=>Z(ee,p(l))),R(b,N)};$(G,b=>{p(l)&&b(tt)})}var Oe=C(G,2),dt=C(he,2);{var xt=b=>{var N=Ql();J(()=>N.disabled=!n().include),Ae("input",N,c),cs(N,()=>n().modifier,ee=>n(n().modifier=ee,!0)),R(b,N)};$(dt,b=>{p(i)&&b(xt)})}var Qt=C(de,2);{var $t=b=>{var N=$l();R(b,N)};$(Qt,b=>{p(i)&&n().include&&!n().modifier&&b($t)})}var At=C(Qt,2);{var Cn=b=>{var N=ec();R(b,N)},en=b=>{var N=tc(),ee=S(N);J(()=>Z(ee,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),R(b,N)};$(At,b=>{p(o)&&n().include&&n().currentClassCount===0?b(Cn):p(o)&&n().include&&n().currentClassCount>1&&b(en,1)})}var tn=C(At,2);{var nn=b=>{var N=sc(),ee=S(N);{var x=I=>{var X=nc(),K=C(ct(X)),te=S(K);J(()=>Z(te,s())),R(I,X)},W=I=>{var X=rc(),K=C(ct(X)),te=S(K);J(()=>Z(te,s())),R(I,X)};$(ee,I=>{p(a)?I(x):I(W,-1)})}R(b,N)};$(tn,b=>{p(h)&&b(nn)})}var k=C(tn,2);{var E=b=>{var N=cc(),ee=S(N);{var x=K=>{var te=ac(),V=C(ct(te),2);vt(V,17,()=>n().migrateKeys,Uo,(ve,j)=>{var D=ic(),Y=S(D);J(je=>{ye(D,"title",`Will be lifted into ${(s()||"the new class")??""}`),Z(Y,je)},[()=>d(p(j))]),R(ve,D)}),R(K,te)},W=K=>{var te=oc();R(K,te)};$(ee,K=>{n().migrateKeys?.length?K(x):K(W,-1)})}var I=C(ee,2);{var X=K=>{var te=lc(),V=S(te);J(()=>Z(V,`${n().skippedKeys.length??""} skipped`)),R(K,te)};$(I,K=>{n().skippedKeys?.length&&K(X)})}R(b,N)};$(k,b=>{p(a)&&n().include&&b(E)})}J(b=>{v=Vt(_,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":p(f)}),Ui(_,`--rebemer-row-depth: ${n().depth??0??""}`),Z(A,n().originalLabel),Z(z,b),ye(Oe,"placeholder",t.isRoot?"block-name":"element-name"),Oe.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),Gi(g,()=>n().include,b=>n(n().include=b,!0)),Ae("input",Oe,c),cs(Oe,()=>n().name,b=>n(n().name=b,!0)),R(e,_),Xt()}Zt(["input"]);var dc=P(" ");function ia(e,t){Jt(t,!0);let n=Dn(t,"kind",3,"info"),r=Dn(t,"duration",3,3e3),s=ie(!0);ks(()=>{if(!p(s)||r()<=0)return;const f=setTimeout(()=>{U(s,!1),t.onDismiss?.()},r());return()=>clearTimeout(f)});const i=le(()=>n()==="error"?"alert":"status");var a=qo(),o=ct(a);{var l=f=>{var h=dc(),c=S(h);J(()=>{Vt(h,1,`rebemer-toast rebemer-toast--${n()??""}`),ye(h,"role",p(i)),ye(h,"aria-live",n()==="error"?"assertive":"polite"),Z(c,t.message)}),Ae("click",h,()=>{U(s,!1),t.onDismiss?.()}),R(f,h)};$(o,f=>{p(s)&&f(l)})}R(e,a),Xt()}Zt(["click"]);var hc=P("Will migrate ",1),pc=P(' '),_c=P(''),vc=P(' ',1);function gc(e,t){Jt(t,!0);const n={add:"Attaches a new BEM class to each element without removing any existing classes.",rename:"Replaces the first existing class with a new name, seeding its settings from the old class.",replace:"Replaces ALL existing classes with a single new BEM class (clean slate, no settings carried over).",modifier:"Appends a --modifier variant. The base class is auto-added to the element if absent.",migrate:"Lifts inline element styles (padding, color, typography, etc.) into a new global class."};let r=ie("add"),s=ie(!0),i=ie(wt([])),a=ie(wt([])),o=ie(null),l=ie(null);const f=le(()=>Wt(p(i)[0]?.name??"")),h=le(()=>p(i)[0]?.originalLabel??""),c=le(()=>{if(p(r)!=="migrate")return null;let x=0,W=0;for(const I of p(i))I.include&&(x+=I.migrateKeys?.length??0,W+=I.skippedKeys?.length??0);return{willMigrate:x,willSkip:W}}),d=le(()=>{if(p(i).length===0)return new Map;const x=na({rootId:t.rootId,rows:p(i),mode:p(r)}),W=new Map;if(!x.ok)return W;for(const I of x.ops)W.set(I.row.id,I.finalClass);return W});Vi(()=>{const x=ol(t.rootId);U(a,Zi().slice(),!0);const W=x.map((I,X)=>{const K=X===0,te=I.label||"",V=Wt(te),ve=I.name||"";let j,D;return V?(j=V,D="label"):K?(j="block",D="fallback"):ve&&!zr(ve)?(j=Vl(ve,"item"),D="element-type"):(j="item",D="fallback"),{id:I.id,depth:I.depth,bricksType:ve,originalLabel:te||(K?"block":"element"),name:j,modifier:"",include:!0,suggestedFrom:D,migrateKeys:Fl(I.settings),skippedKeys:jl(I.settings),currentClassCount:Array.isArray(I.settings?._cssGlobalClasses)?I.settings._cssGlobalClasses.filter(Y=>typeof Y=="string"&&Y.length>0).length:0}});if(W.length>1){const I=new Map(x.map(V=>[V.id,[]])),X=[];for(const V of x){for(;X.length&&X[X.length-1].depth>=V.depth;)X.pop();X.length&&I.get(X[X.length-1].id).push(V.id),X.push(V)}const K=new Map(x.map(V=>[V.id,V])),te=new Map(W.map(V=>[V.id,V]));for(const[,V]of I){if(!V.length)continue;const ve=new Map;for(const D of V){const Y=K.get(D)?.name;Y&&ve.set(Y,(ve.get(Y)??0)+1)}const j=V.filter(D=>zr(K.get(D)?.name??""));for(const D of V){const Y=te.get(D),je=K.get(D);if(!(!Y||!je||Y.suggestedFrom==="label")){if(zr(je.name)){const ht=(I.get(D)??[]).map(Dr=>K.get(Dr)?.name??"").filter(Boolean),Pr=j.indexOf(D);Y.name=Jl(ht,Pr,j.length),Y.suggestedFrom="element-type"}else if((ve.get(je.name)??0)===1){const ht=Yl[je.name];ht&&(Y.name=ht,Y.suggestedFrom="element-type")}}}}}U(i,W,!0)});function _(x){if(x.key==="Escape"){t.onClose?.();return}p(l)&&x.target instanceof Node&&p(l).contains(x.target)&&x.key==="Enter"&&(x.target?.tagName==="INPUT"||x.target?.tagName==="SELECT")&&(x.preventDefault(),y())}let v=null;function y(){const x=Wt(p(i)[0]?.name??""),W=Dl(x);if(!W.ok){U(o,{kind:"error",message:W.reason},!0);return}const I=ql({rootId:t.rootId,rows:p(i),mode:p(r),syncLabels:p(s)});I.ok?(U(o,{kind:"success",message:`Applied to ${I.count} element${I.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):U(o,{kind:"error",message:I.error},!0)}ks(()=>()=>{v&&clearTimeout(v)});var g=vc();Ki("keydown",br,_);var m=ct(g),w=S(m),A=S(w),M=C(S(A)),z=S(M),se=C(A,2),Q=C(w,2),de=S(Q),he=C(S(de),2),G=S(he);G.value=G.__value="add";var tt=C(G);tt.value=tt.__value="rename";var Oe=C(tt);Oe.value=Oe.__value="replace";var dt=C(Oe);dt.value=dt.__value="modifier";var xt=C(dt);xt.value=xt.__value="migrate";var Qt=C(de,2),$t=S(Qt),At=C(Q,2),Cn=S(At),en=C(At,2);{var tn=x=>{var W=_c();let I;var X=S(W);{var K=j=>{var D=Ho("No migratable style keys found on any included element. Apply will attach empty classes.");R(j,D)},te=j=>{var D=hc(),Y=C(ct(D)),je=S(Y),ht=C(Y);J(()=>{Z(je,p(c).willMigrate),Z(ht,` style key${p(c).willMigrate===1?"":"s"} into new classes.`)}),R(j,D)};$(X,j=>{p(c).willMigrate===0?j(K):j(te,-1)})}var V=C(X,2);{var ve=j=>{var D=pc(),Y=S(D);J(()=>Z(Y,`${p(c).willSkip??""} key${p(c).willSkip===1?"":"s"} not on the allowlist will stay on the element.`)),R(j,D)};$(V,j=>{p(c).willSkip>0&&j(ve)})}J(()=>I=Vt(W,1,"rebemer-panel__notice",null,I,{"rebemer-panel__notice--warn":p(c).willSkip>0||p(c).willMigrate===0})),R(x,W)};$(en,x=>{p(c)&&x(tn)})}var nn=C(en,2);vt(nn,23,()=>p(i),x=>x.id,(x,W,I)=>{{let X=le(()=>p(W).id===t.rootId),K=le(()=>p(d).get(p(W).id)??"");fc(x,{get mode(){return p(r)},get blockName(){return p(f)},get isRoot(){return p(X)},get globalClasses(){return p(a)},get finalClassName(){return p(K)},get row(){return p(i)[p(I)]},set row(te){p(i)[p(I)]=te}})}});var k=C(nn,2),E=S(k),b=C(E,2);nl(m,x=>U(l,x),()=>p(l));var N=C(m,2);{var ee=x=>{ia(x,{get kind(){return p(o).kind},get message(){return p(o).message},onDismiss:()=>{U(o,null)}})};$(N,x=>{p(o)&&x(ee)})}J(()=>{Z(z,p(h)),$t.disabled=p(r)==="modifier",Z(Cn,n[p(r)])}),Ae("click",se,()=>t.onClose?.()),Zo(he,()=>p(r),x=>U(r,x)),Gi($t,()=>p(s),x=>U(s,x)),Ae("click",E,()=>t.onClose?.()),Ae("click",b,y),R(e,g),Xt()}Zt(["click"]);var mc=P('');function bc(e,t){var n=mc();let r;J(()=>{r=Vt(n,1,"slashed-cp-launch",null,r,{"slashed-cp-launch--on":t.open}),ye(n,"aria-pressed",t.open)}),Ae("click",n,function(...s){t.onToggle?.apply(this,s)}),R(e,n)}Zt(["click"]);const zs="--sf-color-",aa=["primary","secondary","tertiary","action","neutral","base"],oa=["success","warning","error","info","danger"],Gs=["a5","a10","a20","a30","a40","a50","a60","a70","a80","a90","a95"],Vs=["superlight","xlight","lighter","darker","xdark","superdark","hover","active","strong","subtle","muted","ghost"],nr=["text","heading","bg","surface","well","raised","overlay","inverse","border","link","code","selection","mark","dim"],yc=e=>new Set(e),wc=yc([...aa,...oa]),Ys={primary:{tagline:"Brand identity & main emphasis",use:"Headlines, primary buttons, key brand moments."},secondary:{tagline:"Supporting brand tone",use:"Secondary surfaces and muted brand accents."},tertiary:{tagline:"Accent / highlight",use:"Badges, tags, decorative highlights."},action:{tagline:"Interactive & links",use:"Links, focus rings, anything clickable."},neutral:{tagline:"Text, icons & dividers",use:"Body text, borders, neutral UI chrome."},base:{tagline:"Page & surface backgrounds",use:"Page background and raised surfaces."},success:{tagline:"Positive / confirmation",use:"Success messages and valid state."},warning:{tagline:"Caution",use:"Warnings and at-risk / pending state."},error:{tagline:"Form & validation errors",use:"Invalid inputs and error messages."},info:{tagline:"Informational",use:"Tips and neutral notices."},danger:{tagline:"Destructive actions",use:"Delete / remove and irreversible actions."},semantic:{tagline:"Ready-made role tokens",use:"Pre-wired roles that already adapt to light/dark."}},Gr=[{id:"text-on",label:"Text on color",match:e=>e.startsWith("text--on")},{id:"text",label:"Text",match:e=>e==="text"||e==="heading"||e.startsWith("text-")},{id:"state",label:"Interactive states",match:e=>e.startsWith("bg--")},{id:"surface",label:"Surfaces & backgrounds",match:e=>["bg","surface","well","raised","overlay","inverse"].some(t=>e===t||e.startsWith(t+"-"))},{id:"border",label:"Borders",match:e=>e==="border"||e.startsWith("border-")},{id:"link",label:"Links",match:e=>e==="link"||e.startsWith("link-")},{id:"select",label:"Selection & marks",match:e=>e.startsWith("selection")||e.startsWith("mark")||e==="dim"},{id:"code",label:"Code",match:e=>e.startsWith("code")}];function kc(e){if(typeof e!="string"||e.indexOf(zs)!==0)return null;const t=e.slice(zs.length);if(!t||t==="scheme")return null;const n=t.indexOf("-"),r=n===-1?t:t.slice(0,n);if(!wc.has(r))return{family:"semantic",kind:"semantic",step:null,key:t};const s=n===-1?"":t.slice(n+1);return s===""?{family:r,kind:"base",step:null,key:t}:s==="light"?null:/^[0-9]+$/.test(s)?{family:r,kind:"scale",step:Number(s),key:t}:/^a[0-9]+$/.test(s)?{family:r,kind:"alpha",step:s,key:t}:{family:r,kind:"alias",step:s,key:t}}function Ec(e){return e.kind==="alpha"?!0:/(?:^|-)(?:subtle|muted|ghost|translucent|overlay|dim|underline)$/.test(e.key)}function Sc(e){switch(e.kind){case"base":return Cr(e.family);case"scale":return String(e.step);case"alpha":return String(e.step).toUpperCase();case"alias":return Cr(String(e.step));case"semantic":default:return Cc(e.key)}}function Cr(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function Cc(e){return e.split("--").map(n=>n.split("-").map(Cr).join(" ")).join(" · ")}function xc(e,t,n,r){const s=n[e];if(typeof s!="string"||!s)return null;const i=typeof r[e]=="string"&&r[e]?r[e]:s;return{var:e,name:e.slice(2),label:Sc(t),light:s,dark:i,alpha:Ec(t)}}function Ac(e,t){const n={base:0,scale:1,alias:2,alpha:3};if(n[e.info.kind]!==n[t.info.kind])return n[e.info.kind]-n[t.info.kind];if(e.info.kind==="scale")return e.info.step-t.info.step;if(e.info.kind==="alpha")return Gs.indexOf(e.info.step)-Gs.indexOf(t.info.step);if(e.info.kind==="alias"){const r=Vs.indexOf(e.info.step),s=Vs.indexOf(t.info.step),i=r===-1?999:r,a=s===-1?999:s;return i!==a?i-a:String(e.info.step).localeCompare(String(t.info.step))}return 0}function Tc(e,t){const n=nr.findIndex(a=>e.info.key===a||e.info.key.startsWith(a+"-")),r=nr.findIndex(a=>t.info.key===a||t.info.key.startsWith(a+"-")),s=n===-1?nr.length:n,i=r===-1?nr.length:r;return s!==i?s-i:e.info.key.localeCompare(t.info.key)}function Oc(e,t,n){const r=Array.isArray(e)?e:[],s=t&&typeof t=="object"?t:{},i=n&&typeof n=="object"?n:{},a=new Map,o=[];for(const h of r){const c=kc(h);if(!c)continue;const d=xc(h,c,s,i);if(!d)continue;const _={swatch:d,info:c};if(c.family==="semantic"){o.push(_);continue}a.has(c.family)||a.set(c.family,[]),a.get(c.family).push(_)}const l=[],f=(h,c)=>{const d=a.get(h);if(!d||d.length===0)return;d.sort(Ac);const _=d.filter(w=>w.info.kind==="base"||w.info.kind==="scale"),v=d.filter(w=>w.info.kind==="alias"),y=d.filter(w=>w.info.kind==="alpha"),g=[];_.length&&g.push({id:"scale",label:"Shades & tints",swatches:_.map(w=>w.swatch)}),y.length&&g.push({id:"alpha",label:"Transparent",swatches:y.map(w=>w.swatch)}),v.length&&g.push({id:"alias",label:"Semantic",swatches:v.map(w=>w.swatch)});const m=Ys[h]||{};l.push({id:h,label:Cr(h),type:c,count:d.length,tagline:m.tagline||"",use:m.use||"",sections:g})};for(const h of aa)f(h,"brand");for(const h of oa)f(h,"status");if(o.length){o.sort(Tc);const h=new Map(Gr.map(v=>[v.id,[]])),c=[];for(const v of o){const y=Gr.find(g=>g.match(v.info.key));y?h.get(y.id).push(v.swatch):c.push(v.swatch)}const d=[];for(const v of Gr){const y=h.get(v.id);y.length&&d.push({id:v.id,label:v.label,swatches:y})}c.length&&d.push({id:"other",label:"Other",swatches:c});const _=Ys.semantic||{};l.push({id:"semantic",label:"Semantic",type:"semantic",count:o.length,tagline:_.tagline||"",use:_.use||"",sections:d})}return{groups:l}}function Mc(e,t){const n=String(t||"").trim().toLowerCase();if(!n)return e;if(!e||!Array.isArray(e.groups))return{groups:[]};const r=[];for(const s of e.groups){const i=[];for(const a of s.sections){const o=a.swatches.filter(l=>l.name.toLowerCase().includes(n)||l.label.toLowerCase().includes(n)||s.label.toLowerCase().includes(n));o.length&&i.push({...a,swatches:o})}if(i.length){const a=i.reduce((o,l)=>o+l.swatches.length,0);r.push({...s,sections:i,count:a})}}return{groups:r}}function Ic(e){return`var(${e.var})`}function Lc(e,t){return t==="dark"?e.dark:e.light}var Rc=P('');function Js(e,t){Jt(t,!0);const n=le(()=>`${t.swatch.name} light ${t.swatch.light} · dark ${t.swatch.dark} -click: apply + copy var(${t.swatch.var})`);var r=Rc();let s;Y(i=>{s=Vt(r,1,"slashed-cp-swatch",null,s,{"slashed-cp-swatch--alpha":t.swatch.alpha,"slashed-cp-swatch--split":t.mode==="both"}),Ui(r,`--cp-l:${t.swatch.light??""}; --cp-d:${t.swatch.dark??""}; --cp-solid:${i??""};`),ye(r,"title",_(n)),ye(r,"aria-label",`${t.swatch.name} — apply and copy`)},[()=>Lc(t.swatch,t.mode==="dark"?"dark":"light")]),Ae("click",r,()=>t.onPick(t.swatch)),R(e,r),Xt()}Zt(["click"]);var Nc=P(''),Pc=P(''),Dc=P('

          '),Fc=P(' '),Bc=P('

          '),jc=P(''),Hc=P('
        • '),qc=P('
            '),Wc=P('
            '),Kc=P('
            '),Uc=P(" ",1),zc=P('

            '),Gc=P(''),Vc=P(' ',1);function Yc(e,t){Jt(t,!0);const n=[{id:"background",label:"Background"},{id:"text",label:"Text"},{id:"border",label:"Border"}],r=[{id:"both",label:"Both"},{id:"light",label:"Light"},{id:"dark",label:"Dark"}];let s=ie("both"),i=ie("background"),a=ie(""),o=ie(null);const l=le(()=>Oc(t.source?.variables,t.source?.light,t.source?.dark)),f=le(()=>Mc(_(l),_(a))),h=le(()=>_(l).groups.reduce((k,C)=>k+C.count,0)),c=le(()=>n.find(k=>k.id===_(i))?.label??_(i));let d;function p(){if(typeof document>"u")return null;const k=document.querySelector('iframe#bricks-builder-iframe, iframe[name="bricks-builder-iframe"], #bricks-builder-area iframe');try{return k?.contentDocument?.documentElement??null}catch{return null}}function v(k){const C=p();if(C)try{d===void 0&&(d=C.getAttribute("data-theme")),k==="light"||k==="dark"?C.setAttribute("data-theme",k):d===null?C.removeAttribute("data-theme"):C.setAttribute("data-theme",d)}catch{}}function y(){const k=p();if(!(!k||d===void 0))try{d===null?k.removeAttribute("data-theme"):k.setAttribute("data-theme",d)}catch{}}function g(k){J(s,k,!0),v(k)}Vi(()=>()=>y());async function m(k){try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(k),!0}catch{}try{const C=document.createElement("textarea");C.value=k,C.style.position="fixed",C.style.opacity="0",document.body.appendChild(C),C.select();const b=document.execCommand("copy");return C.remove(),b}catch{return!1}}async function w(k){const C=Ic(k),b=await m(C),N=ll();if(N){let ee=!1;if(Ji(()=>{ee=ul(N,_(i),C)}),ee){const x=fl(N)||"element";J(o,{kind:"success",message:`${_(c)} of “${x}” → ${k.name}`},!0);return}}J(o,b?{kind:"info",message:`Copied ${C} — paste into any Bricks colour field`}:{kind:"error",message:`Couldn't copy ${C}`},!0)}function A(k){k.key==="Escape"&&t.onClose?.()}var M=Vc();Ki("keydown",br,A);var U=ct(M),se=E(U),Q=S(E(se),2);vt(Q,21,()=>r,k=>k.id,(k,C)=>{var b=Nc();let N;var ee=E(b);Y(()=>{N=Vt(b,1,"slashed-cp__seg-btn",null,N,{"slashed-cp__seg-btn--on":_(s)===_(C).id}),ye(b,"aria-pressed",_(s)===_(C).id),Z(ee,_(C).label)}),Ae("click",b,()=>g(_(C).id)),R(k,b)});var de=S(Q,2),he=S(se,2),z=E(he),tt=S(z,2),Oe=S(E(tt),2);vt(Oe,17,()=>n,k=>k.id,(k,C)=>{var b=Pc();let N;var ee=E(b);Y(()=>{N=Vt(b,1,"slashed-cp__chip",null,N,{"slashed-cp__chip--on":_(i)===_(C).id}),ye(b,"aria-pressed",_(i)===_(C).id),Z(ee,_(C).label)}),Ae("click",b,()=>J(i,_(C).id,!0)),R(k,b)});var dt=S(he,2),xt=E(dt);{var Qt=k=>{var C=Dc(),b=E(C);Y(()=>Z(b,`No colours match “${_(a)??""}”.`)),R(k,C)};$(xt,k=>{_(f).groups.length===0&&k(Qt)})}var $t=S(xt,2);vt($t,17,()=>_(f).groups,k=>k.id,(k,C)=>{var b=zc(),N=E(b),ee=E(N),x=E(ee),W=S(x);{var I=j=>{var D=Fc(),V=E(D);Y(()=>Z(V,_(C).tagline)),R(j,D)};$(W,j=>{_(C).tagline&&j(I)})}var X=S(W,2),K=E(X),te=S(ee,2);{var G=j=>{var D=Bc(),V=E(D);Y(()=>Z(V,_(C).use)),R(j,D)};$(te,j=>{_(C).use&&j(G)})}var ve=S(N,2);vt(ve,17,()=>_(C).sections,j=>j.id,(j,D)=>{var V=Uc(),je=ct(V);{var ht=Ge=>{var _t=jc(),nt=E(_t);Y(()=>Z(nt,_(D).label)),R(Ge,_t)};$(je,Ge=>{_(D).label&&Ge(ht)})}var Pr=S(je,2);{var Dr=Ge=>{var _t=qc();vt(_t,21,()=>_(D).swatches,nt=>nt.var,(nt,rn)=>{var xn=Hc(),An=E(xn);Js(An,{get swatch(){return _(rn)},get mode(){return _(s)},onPick:w});var Qn=S(An,2),Fr=E(Qn),fa=S(Qn,2),da=E(fa);Y(()=>{Z(Fr,_(rn).label),Z(da,_(rn).name)}),R(nt,xn)}),R(Ge,_t)},ua=Ge=>{var _t=Kc();vt(_t,21,()=>_(D).swatches,nt=>nt.var,(nt,rn)=>{var xn=Wc(),An=E(xn);Js(An,{get swatch(){return _(rn)},get mode(){return _(s)},onPick:w});var Qn=S(An,2),Fr=E(Qn);Y(()=>Z(Fr,_(rn).label)),R(nt,xn)}),R(Ge,_t)};$(Pr,Ge=>{_(C).type==="semantic"?Ge(Dr):Ge(ua,-1)})}R(j,V)}),Y(()=>{ye(b,"data-type",_(C).type),Z(x,`${_(C).label??""} `),Z(K,_(C).count)}),R(k,b)});var At=S(dt,2),Cn=E(At);{var en=k=>{var C=Gc();R(k,C)};$(Cn,k=>{_(s)==="both"&&k(en)})}var tn=S(U,2);{var nn=k=>{ia(k,{get kind(){return _(o).kind},get message(){return _(o).message},onDismiss:()=>{J(o,null)}})};$(tn,k=>{_(o)&&k(nn)})}Y(()=>ye(z,"placeholder",`Search ${_(h)} colours…`)),Ae("click",de,()=>t.onClose?.()),cs(z,()=>_(a),k=>J(a,k)),R(e,M),Xt()}Zt(["click"]);var Jc=P(" ",1);function Xc(e,t){let n=ie(!1);var r=Jc(),s=ct(r);bc(s,{get open(){return _(n)},onToggle:()=>J(n,!_(n))});var i=S(s,2);{var a=o=>{Yc(o,{get source(){return t.source},onClose:()=>J(n,!1)})};$(i,o=>{_(n)&&o(a)})}R(e,r)}const Xs="#bricks-structure",Zc="li[data-id]",Zs="slashed-rebemer-host",Qc=400,$c=25,Zn=(e,...t)=>console[e]("[reBEMer]",...t),la=new AbortController,{signal:jn}=la,Kt=new Map;let Ln=null,ln=null;function ca(){let e=document.getElementById(Zs);return e||(e=document.createElement("div"),e.id=Zs,document.body.appendChild(e)),e}let Ve=null;function Qs(){Ve=window.slashedBricksEditor,Ve&&typeof Ve=="object"&&(kl(Ve.showClassHints,Ve.classHints,{signal:jn}),Ml(Ve.showColorSwatches,Ve.colorHexMap,{signal:jn}));let e=0;const t=()=>{if(!jn.aborted){if(il()){eu();return}if(++e>=$c){Zn("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(t,Qc)}};t()}function eu(){nu();const e=document.querySelector(Xs);if(e){$s(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(Xs);n&&(t.disconnect(),$s(n))});t.observe(document.body,{childList:!0,subtree:!0}),jn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function $s(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,ei(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),jn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),ei(e)}function ei(e){for(const[n,r]of Kt)if(!r.host.isConnected){try{Xn(r.instance)}catch(s){Zn("warn","badge unmount failed",s)}Kt.delete(n)}const t=e.querySelectorAll(Zc);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const s=Kt.get(r);s&&s.host.isConnected&&n.contains(s.host)||tu(n)}}function tu(e){const t=e.getAttribute("data-id");if(!t)return;const n=e.querySelector(":scope > .structure-item")||e,r=n.querySelector(":scope > ul.actions")||n.querySelector(":scope > .actions")||n.querySelector(":scope > .structure-item-actions"),s=document.createElement("span");s.className="rebemer-badge-host",r?n.insertBefore(s,r):n.appendChild(s);const i=n.querySelector(":scope > .title, :scope > .structure-item-title, :scope > .name, :scope .label"),a=i?i.textContent.trim():"",o=As(Rl,{target:s,props:{elementId:t,label:a,onActivate:su}}),l=Kt.get(t);if(l){try{Xn(l.instance)}catch(f){Zn("warn","badge remount cleanup failed",f)}l.host.isConnected&&l.host.remove()}Kt.set(t,{instance:o,host:s})}function nu(){if(ln)return;const e=Ve&&Ve.colorPanel;if(!Ve?.showColorPanel||!e||!Array.isArray(e.variables)||e.variables.length===0)return;const t=document.createElement("div");ca().appendChild(t),ln={instance:As(Xc,{target:t,props:{source:e}}),node:t}}function ru(){if(ln){try{Xn(ln.instance)}catch(e){Zn("warn","color app unmount failed",e)}ln.node.remove(),ln=null}}function su(e){ds();const t=document.createElement("div");ca().appendChild(t),Ln={instance:As(gc,{target:t,props:{rootId:e,onClose:ds}}),node:t}}function ds(){if(Ln){try{Xn(Ln.instance)}catch(e){Zn("warn","panel unmount failed",e)}Ln.node.remove(),Ln=null}}window.addEventListener("beforeunload",()=>{la.abort(),ds(),ru(),ur(),_r();for(const{instance:e}of Kt.values())try{Xn(e)}catch{}Kt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qs,{once:!0}):Qs(); +click: apply + copy var(${t.swatch.var})`);var r=Rc();let s;J(i=>{s=Vt(r,1,"slashed-cp-swatch",null,s,{"slashed-cp-swatch--alpha":t.swatch.alpha,"slashed-cp-swatch--split":t.mode==="both"}),Ui(r,`--cp-l:${t.swatch.light??""}; --cp-d:${t.swatch.dark??""}; --cp-solid:${i??""};`),ye(r,"title",p(n)),ye(r,"aria-label",`${t.swatch.name} — apply and copy`)},[()=>Lc(t.swatch,t.mode==="dark"?"dark":"light")]),Ae("click",r,()=>t.onPick(t.swatch)),R(e,r),Xt()}Zt(["click"]);var Nc=P(''),Pc=P(''),Dc=P('

            '),Fc=P(' '),Bc=P('

            '),jc=P(''),Hc=P('
          • '),qc=P('
              '),Wc=P('
              '),Kc=P('
              '),Uc=P(" ",1),zc=P('

              '),Gc=P(''),Vc=P(' ',1);function Yc(e,t){Jt(t,!0);const n=[{id:"background",label:"Background"},{id:"text",label:"Text"},{id:"border",label:"Border"}],r=[{id:"both",label:"Both"},{id:"light",label:"Light"},{id:"dark",label:"Dark"}];let s=ie("both"),i=ie("background"),a=ie(""),o=ie(null);const l=le(()=>Oc(t.source?.variables,t.source?.light,t.source?.dark)),f=le(()=>Mc(p(l),p(a))),h=le(()=>p(l).groups.reduce((k,E)=>k+E.count,0)),c=le(()=>n.find(k=>k.id===p(i))?.label??p(i));let d;function _(){if(typeof document>"u")return null;const k=document.querySelector('iframe#bricks-builder-iframe, iframe[name="bricks-builder-iframe"], #bricks-builder-area iframe');try{return k?.contentDocument?.documentElement??null}catch{return null}}function v(k){const E=_();if(E)try{d===void 0&&(d=E.getAttribute("data-theme")),k==="light"||k==="dark"?E.setAttribute("data-theme",k):d===null?E.removeAttribute("data-theme"):E.setAttribute("data-theme",d)}catch{}}function y(){const k=_();if(!(!k||d===void 0))try{d===null?k.removeAttribute("data-theme"):k.setAttribute("data-theme",d)}catch{}}function g(k){U(s,k,!0),v(k)}Vi(()=>()=>y());async function m(k){try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(k),!0}catch{}try{const E=document.createElement("textarea");E.value=k,E.style.position="fixed",E.style.opacity="0",document.body.appendChild(E),E.select();const b=document.execCommand("copy");return E.remove(),b}catch{return!1}}async function w(k){const E=Ic(k),b=await m(E),N=ll();if(N){let ee=!1;if(Ji(()=>{ee=ul(N,p(i),E)}),ee){const x=fl(N)||"element";U(o,{kind:"success",message:`${p(c)} of “${x}” → ${k.name}`},!0)}else U(o,b?{kind:"info",message:`Copied ${E} — couldn't apply to the selected element`}:{kind:"error",message:`Couldn't apply or copy ${E}`},!0);return}U(o,b?{kind:"info",message:`Copied ${E} — select an element or paste into any Bricks colour field`}:{kind:"error",message:`Couldn't copy ${E}`},!0)}function A(k){k.key==="Escape"&&t.onClose?.()}var M=Vc();Ki("keydown",br,A);var z=ct(M),se=S(z),Q=C(S(se),2);vt(Q,21,()=>r,k=>k.id,(k,E)=>{var b=Nc();let N;var ee=S(b);J(()=>{N=Vt(b,1,"slashed-cp__seg-btn",null,N,{"slashed-cp__seg-btn--on":p(s)===p(E).id}),ye(b,"aria-pressed",p(s)===p(E).id),Z(ee,p(E).label)}),Ae("click",b,()=>g(p(E).id)),R(k,b)});var de=C(Q,2),he=C(se,2),G=S(he),tt=C(G,2),Oe=C(S(tt),2);vt(Oe,17,()=>n,k=>k.id,(k,E)=>{var b=Pc();let N;var ee=S(b);J(()=>{N=Vt(b,1,"slashed-cp__chip",null,N,{"slashed-cp__chip--on":p(i)===p(E).id}),ye(b,"aria-pressed",p(i)===p(E).id),Z(ee,p(E).label)}),Ae("click",b,()=>U(i,p(E).id,!0)),R(k,b)});var dt=C(he,2),xt=S(dt);{var Qt=k=>{var E=Dc(),b=S(E);J(()=>Z(b,`No colours match “${p(a)??""}”.`)),R(k,E)};$(xt,k=>{p(f).groups.length===0&&k(Qt)})}var $t=C(xt,2);vt($t,17,()=>p(f).groups,k=>k.id,(k,E)=>{var b=zc(),N=S(b),ee=S(N),x=S(ee),W=C(x);{var I=j=>{var D=Fc(),Y=S(D);J(()=>Z(Y,p(E).tagline)),R(j,D)};$(W,j=>{p(E).tagline&&j(I)})}var X=C(W,2),K=S(X),te=C(ee,2);{var V=j=>{var D=Bc(),Y=S(D);J(()=>Z(Y,p(E).use)),R(j,D)};$(te,j=>{p(E).use&&j(V)})}var ve=C(N,2);vt(ve,17,()=>p(E).sections,j=>j.id,(j,D)=>{var Y=Uc(),je=ct(Y);{var ht=Ge=>{var pt=jc(),nt=S(pt);J(()=>Z(nt,p(D).label)),R(Ge,pt)};$(je,Ge=>{p(D).label&&Ge(ht)})}var Pr=C(je,2);{var Dr=Ge=>{var pt=qc();vt(pt,21,()=>p(D).swatches,nt=>nt.var,(nt,rn)=>{var xn=Hc(),An=S(xn);Js(An,{get swatch(){return p(rn)},get mode(){return p(s)},onPick:w});var Qn=C(An,2),Fr=S(Qn),fa=C(Qn,2),da=S(fa);J(()=>{Z(Fr,p(rn).label),Z(da,p(rn).name)}),R(nt,xn)}),R(Ge,pt)},ua=Ge=>{var pt=Kc();vt(pt,21,()=>p(D).swatches,nt=>nt.var,(nt,rn)=>{var xn=Wc(),An=S(xn);Js(An,{get swatch(){return p(rn)},get mode(){return p(s)},onPick:w});var Qn=C(An,2),Fr=S(Qn);J(()=>Z(Fr,p(rn).label)),R(nt,xn)}),R(Ge,pt)};$(Pr,Ge=>{p(E).type==="semantic"?Ge(Dr):Ge(ua,-1)})}R(j,Y)}),J(()=>{ye(b,"data-type",p(E).type),Z(x,`${p(E).label??""} `),Z(K,p(E).count)}),R(k,b)});var At=C(dt,2),Cn=S(At);{var en=k=>{var E=Gc();R(k,E)};$(Cn,k=>{p(s)==="both"&&k(en)})}var tn=C(z,2);{var nn=k=>{ia(k,{get kind(){return p(o).kind},get message(){return p(o).message},onDismiss:()=>{U(o,null)}})};$(tn,k=>{p(o)&&k(nn)})}J(()=>ye(G,"placeholder",`Search ${p(h)} colours…`)),Ae("click",de,()=>t.onClose?.()),cs(G,()=>p(a),k=>U(a,k)),R(e,M),Xt()}Zt(["click"]);var Jc=P(" ",1);function Xc(e,t){let n=ie(!1);var r=Jc(),s=ct(r);bc(s,{get open(){return p(n)},onToggle:()=>U(n,!p(n))});var i=C(s,2);{var a=o=>{Yc(o,{get source(){return t.source},onClose:()=>U(n,!1)})};$(i,o=>{p(n)&&o(a)})}R(e,r)}const Xs="#bricks-structure",Zc="li[data-id]",Zs="slashed-rebemer-host",Qc=400,$c=25,Zn=(e,...t)=>console[e]("[reBEMer]",...t),la=new AbortController,{signal:jn}=la,Kt=new Map;let Ln=null,ln=null;function ca(){let e=document.getElementById(Zs);return e||(e=document.createElement("div"),e.id=Zs,document.body.appendChild(e)),e}let Ve=null;function Qs(){Ve=window.slashedBricksEditor,Ve&&typeof Ve=="object"&&(kl(Ve.showClassHints,Ve.classHints,{signal:jn}),Ml(Ve.showColorSwatches,Ve.colorHexMap,{signal:jn}));let e=0;const t=()=>{if(!jn.aborted){if(il()){eu();return}if(++e>=$c){Zn("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(t,Qc)}};t()}function eu(){nu();const e=document.querySelector(Xs);if(e){$s(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(Xs);n&&(t.disconnect(),$s(n))});t.observe(document.body,{childList:!0,subtree:!0}),jn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function $s(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,ei(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),jn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),ei(e)}function ei(e){for(const[n,r]of Kt)if(!r.host.isConnected){try{Xn(r.instance)}catch(s){Zn("warn","badge unmount failed",s)}Kt.delete(n)}const t=e.querySelectorAll(Zc);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const s=Kt.get(r);s&&s.host.isConnected&&n.contains(s.host)||tu(n)}}function tu(e){const t=e.getAttribute("data-id");if(!t)return;const n=e.querySelector(":scope > .structure-item")||e,r=n.querySelector(":scope > ul.actions")||n.querySelector(":scope > .actions")||n.querySelector(":scope > .structure-item-actions"),s=document.createElement("span");s.className="rebemer-badge-host",r?n.insertBefore(s,r):n.appendChild(s);const i=n.querySelector(":scope > .title, :scope > .structure-item-title, :scope > .name, :scope .label"),a=i?i.textContent.trim():"",o=As(Rl,{target:s,props:{elementId:t,label:a,onActivate:su}}),l=Kt.get(t);if(l){try{Xn(l.instance)}catch(f){Zn("warn","badge remount cleanup failed",f)}l.host.isConnected&&l.host.remove()}Kt.set(t,{instance:o,host:s})}function nu(){if(ln)return;const e=Ve&&Ve.colorPanel;if(!Ve?.showColorPanel||!e||!Array.isArray(e.variables)||e.variables.length===0)return;const t=document.createElement("div");ca().appendChild(t),ln={instance:As(Xc,{target:t,props:{source:e}}),node:t}}function ru(){if(ln){try{Xn(ln.instance)}catch(e){Zn("warn","color app unmount failed",e)}ln.node.remove(),ln=null}}function su(e){ds();const t=document.createElement("div");ca().appendChild(t),Ln={instance:As(gc,{target:t,props:{rootId:e,onClose:ds}}),node:t}}function ds(){if(Ln){try{Xn(Ln.instance)}catch(e){Zn("warn","panel unmount failed",e)}Ln.node.remove(),Ln=null}}window.addEventListener("beforeunload",()=>{la.abort(),ds(),ru(),ur(),pr();for(const{instance:e}of Kt.values())try{Xn(e)}catch{}Kt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qs,{once:!0}):Qs(); //# sourceMappingURL=app.js.map diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte index c60a5dd1..f522a3af 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/components/ColorPanel.svelte @@ -137,12 +137,18 @@ if (applied) { const label = api.getElementLabel(id) || 'element'; toast = { kind: 'success', message: `${targetLabel} of “${label}” → ${swatch.name}` }; - return; + } else { + // We had a selection but couldn't write to it (e.g. a stale id from + // the DOM fallback). Say so rather than implying nothing was selected. + toast = copied + ? { kind: 'info', message: `Copied ${value} — couldn't apply to the selected element` } + : { kind: 'error', message: `Couldn't apply or copy ${value}` }; } + return; } toast = copied - ? { kind: 'info', message: `Copied ${value} — paste into any Bricks colour field` } + ? { kind: 'info', message: `Copied ${value} — select an element or paste into any Bricks colour field` } : { kind: 'error', message: `Couldn't copy ${value}` }; } diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js index 151b8a34..d16de72d 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/bricks-api.js @@ -266,8 +266,10 @@ export function getActiveElementId() { * * These are the standard Bricks "_" style controls; a colour control stores * an object whose `raw` field carries the literal CSS value (so a - * `var(--sf-color-*)` reference round-trips intact). We only ever write - * `raw`, leaving any sibling hex/hsl/rgb fields untouched. + * `var(--sf-color-*)` reference round-trips intact). We deliberately write a + * minimal `{ raw }` object — Bricks can't resolve a CSS variable to + * hex/hsl/rgb at edit time, so those sibling fields have no meaningful value + * to set here. * * @type {Record} */ diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js index ffe35645..affca390 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/color-model.js @@ -27,15 +27,16 @@ const PREFIX = '--sf-color-'; +// These family lists mirror the PHP side (class-color-resolver.php +// `$default_sources` and class-inventory.php's brand/status arrays). They +// change rarely; if you add or rename a family, update all three in sync. + /** Brand families, in canonical display order. */ export const BRAND_FAMILIES = ['primary', 'secondary', 'tertiary', 'action', 'neutral', 'base']; /** Status families, in canonical display order. */ export const STATUS_FAMILIES = ['success', 'warning', 'error', 'info', 'danger']; -/** Numeric scale steps, light → dark. */ -const SCALE_STEPS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]; - /** Alpha steps, most → least transparent. */ const ALPHA_STEPS = ['a5', 'a10', 'a20', 'a30', 'a40', 'a50', 'a60', 'a70', 'a80', 'a90', 'a95']; @@ -232,7 +233,11 @@ function compareInFamily(a, b) { if (a.info.kind === 'alias') { const ai = ALIAS_ORDER.indexOf(a.info.step); const bi = ALIAS_ORDER.indexOf(b.info.step); - return (ai === -1 ? 999 : ai) - (bi === -1 ? 999 : bi); + const ar = ai === -1 ? 999 : ai; + const br = bi === -1 ? 999 : bi; + if (ar !== br) return ar - br; + // Both unranked → lexical tiebreaker for a stable, reproducible order. + return String(a.info.step).localeCompare(String(b.info.step)); } return 0; }