From 5ddd141e227c07091aafefb4fcc497519218ab8d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 07:12:45 +0000 Subject: [PATCH 1/2] feat(bricks): class documentation tooltips in builder Add the editor-side consumer for the class-hints feature. A scoped, delegated hover listener inside the Bricks settings panel / class manager shows a styled tooltip with the class description + category, reading the data localized by class-rebemer-enqueue.php (window.slashedBricksEditor.showClassHints / classHints). - editor-app/src/lib/class-hints.js: pure resolveClassName() matcher plus DOM glue (scoped listener, styled tooltip, lifecycle). - main.js: init on start() (tied to the AbortController signal), destroy() on unload. - panel.css: .rebemer-class-hint tooltip styles. - tests/class-hints.test.js: unit tests for resolveClassName. - ci.yml: add classes-hints.json to the docs-freshness check. - rebuilt editor-app bundle. Co-Authored-By: Jack Granatowski --- .github/workflows/ci.yml | 1 + package.json | 2 +- .../bricks/assets/editor-app/app.css | 2 +- .../bricks/assets/editor-app/app.js | 8 +- .../bricks/editor-app/src/lib/class-hints.js | 270 ++++++++++++++++++ .../bricks/editor-app/src/main.js | 11 + .../bricks/editor-app/src/styles/panel.css | 31 ++ tests/class-hints.test.js | 67 +++++ 8 files changed, 386 insertions(+), 6 deletions(-) create mode 100644 plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js create mode 100644 tests/class-hints.test.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca7f1d7a..1173d04c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,7 @@ jobs: - run: git diff --exit-code docs/tokens.md || (echo "::error::docs/tokens.md is stale — run 'npm run docs' and commit" && exit 1) - run: git diff --exit-code docs/classes.md || (echo "::error::docs/classes.md is stale — run 'npm run docs' and commit" && exit 1) - run: git diff --exit-code plugins/SLASHED-for-WP/integrations/bricks/data/inventory.json || (echo "::error::inventory.json is stale — run 'npm run docs' and commit" && exit 1) + - run: git diff --exit-code plugins/SLASHED-for-WP/data/classes-hints.json || (echo "::error::classes-hints.json is stale — run 'npm run docs' and commit" && exit 1) test: name: Regression tests diff --git a/package.json b/package.json index ed61b637..d1ce0ce1 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", + "pretest": "npm run build && node --test tests/element-types.test.js tests/class-hints.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/assets/editor-app/app.css b/plugins/SLASHED-for-WP/integrations/bricks/assets/editor-app/app.css index 78640d46..5b4827ad 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)} +#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)} 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 7289e46f..3238a8af 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,7 @@ -var ms=Object.defineProperty;var Yr=e=>{throw TypeError(e)};var bs=(e,t,n)=>t in e?ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var le=(e,t,n)=>bs(e,typeof t!="symbol"?t+"":t,n),or=(e,t,n)=>t.has(e)||Yr("Cannot "+n);var f=(e,t,n)=>(or(e,t,"read from private field"),n?n.call(e):t.get(e)),S=(e,t,n)=>t.has(e)?Yr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),k=(e,t,n,r)=>(or(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),N=(e,t,n)=>(or(e,t,"access private method"),n);var Ir=Array.isArray,ys=Array.prototype.indexOf,wt=Array.prototype.includes,Jn=Array.from,ws=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,ks=Object.getOwnPropertyDescriptors,Es=Object.prototype,Ss=Array.prototype,mi=Object.getPrototypeOf,Jr=Object.isExtensible;const Cs=()=>{};function xs(e){for(var t=0;t{e=r,t=i});return{promise:n,resolve:e,reject:t}}const ne=2,Wt=4,Xn=8,yi=1<<24,Pe=16,Be=32,ut=64,_r=128,Me=512,$=1024,te=2048,Ue=4096,ae=8192,Oe=16384,Rt=32768,vr=1<<25,Vt=65536,Hn=1<<17,As=1<<18,Zt=1<<19,Ts=1<<20,ze=1<<25,Mt=65536,qn=1<<21,Bt=1<<22,ot=1<<23,kt=Symbol("$state"),Ms=Symbol("legacy props"),Os=Symbol(""),In=Symbol("attributes"),pr=Symbol("class"),gr=Symbol("style"),nn=Symbol("text"),Ln=Symbol("form reset"),Zn=new class extends Error{constructor(){super(...arguments);le(this,"name","StaleReactionError");le(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ns(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Rs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Is(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ls(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ps(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ds(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Fs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Bs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function js(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hs(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function qs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ks(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const zs=1,Us=2,wi=4,Gs=8,Ws=16,Vs=1,Ys=4,Js=8,Xs=16,Zs=1,Qs=2,Z=Symbol("uninitialized"),ki="http://www.w3.org/1999/xhtml";function $s(){console.warn("https://svelte.dev/e/derived_inert")}function eo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function to(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ei(e){return e===this.v}function no(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Si(e){return!no(e,this.v)}let he=null;function Yt(e){he=e}function bn(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,r:O,l:null}}function yn(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)Gi(r)}return t.i=!0,he=t.p,{}}function Ci(){return!0}let dt=[];function xi(){var e=dt;dt=[],xs(e)}function at(e){if(dt.length===0&&!an){var t=dt;queueMicrotask(()=>{t===dt&&xi()})}dt.push(e)}function ro(){for(;dt.length>0;)xi()}function Ai(e){var t=O;if(t===null)return M.f|=ot,e;if((t.f&Rt)===0&&(t.f&Wt)===0)throw e;it(e,t)}function it(e,t){for(;t!==null;){if((t.f&_r)!==0){if((t.f&Rt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const io=-7169;function U(e,t){e.f=e.f&io|t}function Lr(e){(e.f&Me)!==0||e.deps===null?U(e,$):U(e,Ue)}function Ti(e){if(e!==null)for(const t of e)(t.f&ne)===0||(t.f&Mt)===0||(t.f^=Mt,Ti(t.deps))}function Mi(e,t,n){(e.f&te)!==0?t.add(e):(e.f&Ue)!==0&&n.add(e),Ti(e.deps),U(e,$)}let On=!1;function so(e){var t=On;try{return On=!1,[e(),On]}finally{On=t}}let ar=null,Lt=null,x=null,mr=null,De=null,br=null,an=!1,lr=!1,Dt=null,Pn=null;var Xr=0;let oo=1;var Ht,tt,vt,qt,Kt,pt,zt,Ve,hn,pe,_n,nt,He,qe,Ut,gt,I,yr,rn,wr,Oi,Ni,Dn,ao,kr,Pt;const Wn=class Wn{constructor(){S(this,I);le(this,"id",oo++);S(this,Ht,!1);le(this,"linked",!0);S(this,tt,null);S(this,vt,null);le(this,"async_deriveds",new Map);le(this,"current",new Map);le(this,"previous",new Map);le(this,"unblocked",new Set);S(this,qt,new Set);S(this,Kt,new Set);S(this,pt,new Set);S(this,zt,0);S(this,Ve,new Map);S(this,hn,null);S(this,pe,[]);S(this,_n,[]);S(this,nt,new Set);S(this,He,new Set);S(this,qe,new Map);S(this,Ut,new Set);le(this,"is_fork",!1);S(this,gt,!1)}skip_effect(t){f(this,qe).has(t)||f(this,qe).set(t,{d:[],m:[]}),f(this,Ut).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=f(this,qe).get(t);if(r){f(this,qe).delete(t);for(var i of r.d)U(i,te),n(i);for(i of r.m)U(i,Ue),n(i)}f(this,Ut).add(t)}capture(t,n,r=!1){t.v!==Z&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&ot)===0&&(this.current.set(t,[n,r]),De?.set(t,n)),this.is_fork||(t.v=n)}activate(){x=this}deactivate(){x=null,De=null}flush(){try{lr=!0,x=this,N(this,I,rn).call(this)}finally{Xr=0,br=null,Dt=null,Pn=null,lr=!1,x=null,De=null,Et.clear()}}discard(){for(const t of f(this,Kt))t(this);f(this,Kt).clear(),f(this,pt).clear(),N(this,I,Pt).call(this)}register_created_effect(t){f(this,_n).push(t)}increment(t,n){if(k(this,zt,f(this,zt)+1),t){let r=f(this,Ve).get(n)??0;f(this,Ve).set(n,r+1)}}decrement(t,n){if(k(this,zt,f(this,zt)-1),t){let r=f(this,Ve).get(n)??0;r===1?f(this,Ve).delete(n):f(this,Ve).set(n,r-1)}f(this,gt)||(k(this,gt,!0),at(()=>{k(this,gt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)f(this,nt).add(r);for(const r of n)f(this,He).add(r);t.clear(),n.clear()}oncommit(t){f(this,qt).add(t)}ondiscard(t){f(this,Kt).add(t)}on_fork_commit(t){f(this,pt).add(t)}run_fork_commit_callbacks(){for(const t of f(this,pt))t(this);f(this,pt).clear()}settled(){return(f(this,hn)??k(this,hn,bi())).promise}static ensure(){var t;if(x===null){const n=x=new Wn;N(t=n,I,kr).call(t),!lr&&!an&&at(()=>{f(n,Ht)||n.flush()})}return x}apply(){{De=null;return}}schedule(t){if(br=t,t.b?.is_pending&&(t.f&(Wt|Xn|yi))!==0&&(t.f&Rt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Dt!==null&&n===O&&(M===null||(M.f&ne)===0))return;if((r&(ut|Be))!==0){if((r&$)===0)return;n.f^=$}}f(this,pe).push(n)}};Ht=new WeakMap,tt=new WeakMap,vt=new WeakMap,qt=new WeakMap,Kt=new WeakMap,pt=new WeakMap,zt=new WeakMap,Ve=new WeakMap,hn=new WeakMap,pe=new WeakMap,_n=new WeakMap,nt=new WeakMap,He=new WeakMap,qe=new WeakMap,Ut=new WeakMap,gt=new WeakMap,I=new WeakSet,yr=function(){if(this.is_fork)return!0;for(const r of f(this,Ve).keys()){for(var t=r,n=!1;t.parent!==null;){if(f(this,qe).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},rn=function(){var a,c,h;if(k(this,Ht,!0),Xr++>1e3&&(N(this,I,Pt).call(this),fo()),!N(this,I,yr).call(this)){for(const u of f(this,nt))f(this,He).delete(u),U(u,te),this.schedule(u);for(const u of f(this,He))U(u,Ue),this.schedule(u)}const t=f(this,pe);k(this,pe,[]),this.apply();var n=Dt=[],r=[],i=Pn=[];for(const u of t)try{N(this,I,wr).call(this,u,n,r)}catch(d){throw Li(u),d}if(x=null,i.length>0){var s=Wn.ensure();for(const u of i)s.schedule(u)}if(Dt=null,Pn=null,N(this,I,yr).call(this)){N(this,I,Dn).call(this,r),N(this,I,Dn).call(this,n);for(const[u,d]of f(this,qe))Ii(u,d);i.length>0&&N(a=x,I,rn).call(a);return}const o=N(this,I,Oi).call(this);if(o){N(c=o,I,Ni).call(c,this);return}f(this,nt).clear(),f(this,He).clear();for(const u of f(this,qt))u(this);f(this,qt).clear(),mr=this,Zr(r),Zr(n),mr=null,f(this,hn)?.resolve();var l=x;if(this.linked&&f(this,zt)===0&&N(this,I,Pt).call(this),f(this,pe).length>0){l===null&&(l=this,N(this,I,kr).call(this));const u=l;f(u,pe).push(...f(this,pe).filter(d=>!f(u,pe).includes(d)))}l!==null&&N(h=l,I,rn).call(h)},wr=function(t,n,r){t.f^=$;for(var i=t.first;i!==null;){var s=i.f,o=(s&(Be|ut))!==0,l=o&&(s&$)!==0,a=l||(s&ae)!==0||f(this,qe).has(i);if(!a&&i.fn!==null){o?i.f^=$:(s&Wt)!==0?n.push(i):kn(i)&&((s&Pe)!==0&&f(this,He).add(i),Xt(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}}},Oi=function(){for(var t=f(this,tt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=f(t,tt)}return null},Ni=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 a of s){var o=a.f;if((o&ne)!==0)n(a);else{var l=a;o&(Bt|Pe)&&!this.async_deriveds.has(l)&&(f(this,He).delete(l),U(l,te),this.schedule(l))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>t.discard()),N(r=t,I,Pt).call(r),x=this,N(this,I,rn).call(this)},Dn=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,Ut))u.unskip_effect(d,_=>{var v;(_.f&(Pe|Bt))!==0?u.schedule(_):N(v=u,I,Dn).call(v,[_])});u.activate();var s=new Set,o=new Map;for(var l of n)Ri(l,i,s,o);o=new Map;var a=[...u.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(a.length>0)for(const d of f(this,_n))(d.f&(Oe|ae|Hn))===0&&Pr(d,a,o)&&((d.f&(Bt|Pe))!==0?(U(d,te),u.schedule(d)):f(u,nt).add(d));if(f(u,pe).length>0&&!f(u,gt)){u.apply();for(var c of f(u,pe))N(h=u,I,wr).call(h,c,[],[]);k(u,pe,[])}u.deactivate()}}}},kr=function(){Lt===null?ar=Lt=this:(k(Lt,vt,this),k(this,tt,Lt)),Lt=this},Pt=function(){var t=f(this,tt),n=f(this,vt);t===null?ar=n:k(t,vt,n),n===null?Lt=t:k(n,tt,t),this.linked=!1};let Ot=Wn;function lo(e){var t=an;an=!0;try{for(var n;;){if(ro(),x===null)return n;x.flush()}}finally{an=t}}function fo(){try{Fs()}catch(e){it(e,br)}}let We=null;function Zr(e){var t=e.length;if(t!==0){for(var n=0;n0)){Et.clear();for(const i of We){if((i.f&(Oe|ae))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)We.has(o)&&(We.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(Oe|ae))===0&&Xt(a)}}We.clear()}}We=null}}function Ri(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?Ri(i,t,n,r):(s&(Bt|Pe))!==0&&(s&te)===0&&Pr(i,t,r)&&(U(i,te),Dr(i))}}function Pr(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(wt.call(t,i))return!0;if((i.f&ne)!==0&&Pr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Dr(e){x.schedule(e)}function Ii(e,t){if(!((e.f&Be)!==0&&(e.f&$)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&Ue)!==0&&t.m.push(e),U(e,$);for(var n=e.first;n!==null;)Ii(n,t),n=n.next}}function Li(e){U(e,$);for(var t=e.first;t!==null;)Li(t),t=t.next}function uo(e){let t=0,n=Nt(0),r;return()=>{jr()&&(g(n),$n(()=>(t===0&&(r=Qt(()=>e(()=>ln(n)))),t+=1,()=>{at(()=>{t-=1,t===0&&(r?.(),r=void 0,ln(n))})})))}}var co=Vt|Zt;function ho(e,t,n,r){new _o(e,t,n,r)}var Se,Rr,Ce,mt,fe,xe,re,ge,Ye,bt,rt,Gt,vn,pn,Je,Vn,G,vo,po,go,Er,Fn,Bn,Sr,Cr;class _o{constructor(t,n,r,i){S(this,G);le(this,"parent");le(this,"is_pending",!1);le(this,"transform_error");S(this,Se);S(this,Rr,null);S(this,Ce);S(this,mt);S(this,fe);S(this,xe,null);S(this,re,null);S(this,ge,null);S(this,Ye,null);S(this,bt,0);S(this,rt,0);S(this,Gt,!1);S(this,vn,new Set);S(this,pn,new Set);S(this,Je,null);S(this,Vn,uo(()=>(k(this,Je,Nt(f(this,bt))),()=>{k(this,Je,null)})));k(this,Se,t),k(this,Ce,n),k(this,mt,s=>{var o=O;o.b=this,o.f|=_r,r(s)}),this.parent=O.b,this.transform_error=i??this.parent?.transform_error??(s=>s),k(this,fe,Kr(()=>{N(this,G,Er).call(this)},co))}defer_effect(t){Mi(t,f(this,vn),f(this,pn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,Ce).pending}update_pending_count(t,n){N(this,G,Sr).call(this,t,n),k(this,bt,f(this,bt)+t),!(!f(this,Je)||f(this,Gt))&&(k(this,Gt,!0),at(()=>{k(this,Gt,!1),f(this,Je)&&Jt(f(this,Je),f(this,bt))}))}get_effect_pending(){return f(this,Vn).call(this),g(f(this,Je))}error(t){if(!f(this,Ce).onerror&&!f(this,Ce).failed)throw t;x?.is_fork?(f(this,xe)&&x.skip_effect(f(this,xe)),f(this,re)&&x.skip_effect(f(this,re)),f(this,ge)&&x.skip_effect(f(this,ge)),x.on_fork_commit(()=>{N(this,G,Cr).call(this,t)})):N(this,G,Cr).call(this,t)}}Se=new WeakMap,Rr=new WeakMap,Ce=new WeakMap,mt=new WeakMap,fe=new WeakMap,xe=new WeakMap,re=new WeakMap,ge=new WeakMap,Ye=new WeakMap,bt=new WeakMap,rt=new WeakMap,Gt=new WeakMap,vn=new WeakMap,pn=new WeakMap,Je=new WeakMap,Vn=new WeakMap,G=new WeakSet,vo=function(){try{k(this,xe,Ae(()=>f(this,mt).call(this,f(this,Se))))}catch(t){this.error(t)}},po=function(t){const n=f(this,Ce).failed;n&&k(this,ge,Ae(()=>{n(f(this,Se),()=>t,()=>()=>{})}))},go=function(){const t=f(this,Ce).pending;t&&(this.is_pending=!0,k(this,re,Ae(()=>t(f(this,Se)))),at(()=>{var n=k(this,Ye,document.createDocumentFragment()),r=Xe();n.append(r),k(this,xe,N(this,G,Bn).call(this,()=>Ae(()=>f(this,mt).call(this,r)))),f(this,rt)===0&&(f(this,Se).before(n),k(this,Ye,null),St(f(this,re),()=>{k(this,re,null)}),N(this,G,Fn).call(this,x))}))},Er=function(){try{if(this.is_pending=this.has_pending_snippet(),k(this,rt,0),k(this,bt,0),k(this,xe,Ae(()=>{f(this,mt).call(this,f(this,Se))})),f(this,rt)>0){var t=k(this,Ye,document.createDocumentFragment());Gr(f(this,xe),t);const n=f(this,Ce).pending;k(this,re,Ae(()=>n(f(this,Se))))}else N(this,G,Fn).call(this,x)}catch(n){this.error(n)}},Fn=function(t){this.is_pending=!1,t.transfer_effects(f(this,vn),f(this,pn))},Bn=function(t){var n=O,r=M,i=he;Ge(f(this,fe)),Re(f(this,fe)),Yt(f(this,fe).ctx);try{return Ot.ensure(),t()}catch(s){return Ai(s),null}finally{Ge(n),Re(r),Yt(i)}},Sr=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&N(r=this.parent,G,Sr).call(r,t,n);return}k(this,rt,f(this,rt)+t),f(this,rt)===0&&(N(this,G,Fn).call(this,n),f(this,re)&&St(f(this,re),()=>{k(this,re,null)}),f(this,Ye)&&(f(this,Se).before(f(this,Ye)),k(this,Ye,null)))},Cr=function(t){f(this,xe)&&(de(f(this,xe)),k(this,xe,null)),f(this,re)&&(de(f(this,re)),k(this,re,null)),f(this,ge)&&(de(f(this,ge)),k(this,ge,null));var n=f(this,Ce).onerror;let r=f(this,Ce).failed;var i=!1,s=!1;const o=()=>{if(i){to();return}i=!0,s&&Ks(),f(this,ge)!==null&&St(f(this,ge),()=>{k(this,ge,null)}),N(this,G,Bn).call(this,()=>{N(this,G,Er).call(this)})},l=a=>{try{s=!0,n?.(a,o),s=!1}catch(c){it(c,f(this,fe)&&f(this,fe).parent)}r&&k(this,ge,N(this,G,Bn).call(this,()=>{try{return Ae(()=>{var c=O;c.b=this,c.f|=_r,r(f(this,Se),()=>a,()=>o)})}catch(c){return it(c,f(this,fe).parent),null}}))};at(()=>{var a;try{a=this.transform_error(t)}catch(c){it(c,f(this,fe)&&f(this,fe).parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,c=>it(c,f(this,fe)&&f(this,fe).parent)):l(a)})};function mo(e,t,n,r){const i=cn;var s=e.filter(d=>!d.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=O,l=bo(),a=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function c(d){if((o.f&Oe)===0){l();try{r(d)}catch(_){it(_,o)}Kn()}}var h=Pi();if(n.length===0){a.then(()=>c(t.map(i))).finally(h);return}function u(){Promise.all(n.map(d=>yo(d))).then(d=>c([...t.map(i),...d])).catch(d=>it(d,o)).finally(h)}a?a.then(()=>{l(),u(),Kn()}):u()}function bo(){var e=O,t=M,n=he,r=x;return function(s=!0){Ge(e),Re(t),Yt(n),s&&(e.f&Oe)===0&&(r?.activate(),r?.apply())}}function Kn(e=!0){Ge(null),Re(null),Yt(null),e&&x?.deactivate()}function Pi(){var e=O,t=e.b,n=x,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 cn(e){var t=ne|te;return O!==null&&(O.f|=Zt),{ctx:he,deps:null,effects:null,equals:Ei,f:t,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:O,ac:null}}const Nn=Symbol("obsolete");function yo(e,t,n){let r=O;r===null&&Rs();var i=void 0,s=Nt(Z),o=!M,l=new Set;return Io(()=>{var a=O,c=bi();i=c.promise;try{Promise.resolve(e()).then(c.resolve,_=>{_!==Zn&&c.reject(_)}).finally(Kn)}catch(_){c.reject(_),Kn()}var h=x;if(o){if((a.f&Rt)!==0)var u=Pi();if(r.b.is_rendered())h.async_deriveds.get(a)?.reject(Nn);else for(const _ of l.values())_.reject(Nn);l.add(c),h.async_deriveds.set(a,c)}const d=(_,v=void 0)=>{u?.(),l.delete(c),v!==Nn&&(h.activate(),v?(s.f|=ot,Jt(s,v)):((s.f&ot)!==0&&(s.f^=ot),Jt(s,_)),h.deactivate())};c.promise.then(d,_=>d(null,_||"unknown"))}),Hr(()=>{for(const a of l)a.reject(Nn)}),new Promise(a=>{function c(h){function u(){h===i?a(s):c(i)}h.then(u,u)}c(i)})}function be(e){const t=cn(e);return Zi(t),t}function Di(e){const t=cn(e);return t.equals=Si,t}function wo(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!ji&&So()}return t}function So(){ji=!1;for(const e of zn){(e.f&$)!==0&&U(e,Ue);let t;try{t=kn(e)}catch{t=!0}t&&Xt(e)}zn.clear()}function ln(e){Q(e,e.v+1)}function Hi(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s{if(Ct===s)return l();var a=M,c=Ct;Re(null),ti(s);var h=l();return Re(a),ti(c),h};return r&&n.set("length",oe(e.length)),new Proxy(e,{defineProperty(l,a,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&js();var h=n.get(a);return h===void 0?o(()=>{var u=oe(c.value);return n.set(a,u),u}):Q(h,c.value,!0),!0},deleteProperty(l,a){var c=n.get(a);if(c===void 0){if(a in l){const h=o(()=>oe(Z));n.set(a,h),ln(i)}}else Q(c,Z),ln(i);return!0},get(l,a,c){if(a===kt)return e;var h=n.get(a),u=a in l;if(h===void 0&&(!u||Ft(l,a)?.writable)&&(h=o(()=>{var _=st(u?l[a]:Z),v=oe(_);return v}),n.set(a,h)),h!==void 0){var d=g(h);return d===Z?void 0:d}return Reflect.get(l,a,c)},getOwnPropertyDescriptor(l,a){var c=Reflect.getOwnPropertyDescriptor(l,a);if(c&&"value"in c){var h=n.get(a);h&&(c.value=g(h))}else if(c===void 0){var u=n.get(a),d=u?.v;if(u!==void 0&&d!==Z)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(l,a){if(a===kt)return!0;var c=n.get(a),h=c!==void 0&&c.v!==Z||Reflect.has(l,a);if(c!==void 0||O!==null&&(!h||Ft(l,a)?.writable)){c===void 0&&(c=o(()=>{var d=h?st(l[a]):Z,_=oe(d);return _}),n.set(a,c));var u=g(c);if(u===Z)return!1}return h},set(l,a,c,h){var u=n.get(a),d=a in l;if(r&&a==="length")for(var _=c;_oe(Z)),n.set(_+"",v))}if(u===void 0)(!d||Ft(l,a)?.writable)&&(u=o(()=>oe(void 0)),Q(u,st(c)),n.set(a,u));else{d=u.v!==Z;var b=o(()=>st(c));Q(u,b)}var p=Reflect.getOwnPropertyDescriptor(l,a);if(p?.set&&p.set.call(h,c),!d){if(r&&typeof a=="string"){var m=n.get("length"),w=Number(a);Number.isInteger(w)&&w>=m.v&&Q(m,w+1)}ln(i)}return!0},ownKeys(l){g(i);var a=Reflect.ownKeys(l).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 l)&&a.push(c);return a},setPrototypeOf(){Hs()}})}function Qr(e){try{if(e!==null&&typeof e=="object"&&kt in e)return e[kt]}catch{}return e}function Co(e,t){return Object.is(Qr(e),Qr(t))}var xr,qi,Ki,zi;function xo(){if(xr===void 0){xr=window,qi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ki=Ft(t,"firstChild").get,zi=Ft(t,"nextSibling").get,Jr(e)&&(e[pr]=void 0,e[In]=null,e[gr]=void 0,e.__e=void 0),Jr(n)&&(n[nn]=void 0)}}function Xe(e=""){return document.createTextNode(e)}function Un(e){return Ki.call(e)}function wn(e){return zi.call(e)}function L(e,t){return Un(e)}function jt(e,t=!1){{var n=Un(e);return n instanceof Comment&&n.data===""?wn(n):n}}function R(e,t=1,n=!1){let r=e;for(;t--;)r=wn(r);return r}function Ao(e){e.textContent=""}function Ui(){return!1}function To(e,t,n){return document.createElementNS(ki,e,void 0)}let $r=!1;function Mo(){$r||($r=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Ln]?.()})},{capture:!0}))}function Qn(e){var t=M,n=O;Re(null),Ge(null);try{return e()}finally{Re(t),Ge(n)}}function Br(e,t,n,r=n){e.addEventListener(t,()=>Qn(n));const i=e[Ln];i?e[Ln]=()=>{i(),r(!0)}:e[Ln]=()=>r(!0),Mo()}function Oo(e){O===null&&(M===null&&Ds(),Ps()),Ze&&Ls()}function No(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Qe(e,t){var n=O;n!==null&&(n.f&ae)!==0&&(e|=ae);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};x?.register_created_effect(r);var i=r;if((e&Wt)!==0)Dt!==null?Dt.push(r):Ot.ensure().schedule(r);else if(t!==null){try{Xt(r)}catch(o){throw de(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Zt)===0&&(i=i.first,(e&Pe)!==0&&(e&Vt)!==0&&i!==null&&(i.f|=Vt))}if(i!==null&&(i.parent=n,n!==null&&No(i,n),M!==null&&(M.f&ne)!==0&&(e&ut)===0)){var s=M;(s.effects??(s.effects=[])).push(i)}return r}function jr(){return M!==null&&!Fe}function Hr(e){const t=Qe(Xn,null);return U(t,$),t.teardown=e,t}function qr(e){Oo();var t=O.f,n=!M&&(t&Be)!==0&&(t&Rt)===0;if(n){var r=he;(r.e??(r.e=[])).push(e)}else return Gi(e)}function Gi(e){return Qe(Wt|Ts,e)}function Ro(e){Ot.ensure();const t=Qe(ut|Zt,e);return(n={})=>new Promise(r=>{n.outro?St(t,()=>{de(t),r(void 0)}):(de(t),r(void 0))})}function Wi(e){return Qe(Wt,e)}function Io(e){return Qe(Bt|Zt,e)}function $n(e,t=0){return Qe(Xn|t,e)}function se(e,t=[],n=[],r=[]){mo(r,t,n,i=>{Qe(Xn,()=>e(...i.map(g)))})}function Kr(e,t=0){var n=Qe(Pe|t,e);return n}function Ae(e){return Qe(Be|Zt,e)}function Vi(e){var t=e.teardown;if(t!==null){const n=Ze,r=M;ei(!0),Re(null);try{t.call(null)}finally{ei(n),Re(r)}}}function zr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Qn(()=>{i.abort(Zn)});var r=n.next;(n.f&ut)!==0?n.parent=null:de(n,t),n=r}}function Lo(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Be)===0&&de(t),t=n}}function de(e,t=!0){var n=!1;(t||(e.f&As)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Po(e.nodes.start,e.nodes.end),n=!0),U(e,vr),zr(e,t&&!n),dn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Vi(e),e.f^=vr,e.f|=Oe;var i=e.parent;i!==null&&i.first!==null&&Yi(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Po(e,t){for(;e!==null;){var n=e===t?null:wn(e);e.remove(),e=n}}function Yi(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 St(e,t,n=!0){var r=[];Ji(e,r,!0);var i=()=>{n&&de(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var l of r)l.out(o)}else i()}function Ji(e,t,n){if((e.f&ae)===0){e.f^=ae;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next;if((i.f&ut)===0){var o=(i.f&Vt)!==0||(i.f&Be)!==0&&(e.f&Pe)!==0;Ji(i,t,o?n:!1)}i=s}}}function Ur(e){Xi(e,!0)}function Xi(e,t){if((e.f&ae)!==0){e.f^=ae,(e.f&$)===0&&(U(e,te),Ot.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Vt)!==0||(n.f&Be)!==0;Xi(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 Gr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:wn(n);t.append(n),n=i}}let jn=!1,Ze=!1;function ei(e){Ze=e}let M=null,Fe=!1;function Re(e){M=e}let O=null;function Ge(e){O=e}let Ne=null;function Zi(e){M!==null&&(Ne===null?Ne=[e]:Ne.push(e))}let ue=null,ve=0,Ee=null;function Do(e){Ee=e}let Qi=1,ht=0,Ct=ht;function ti(e){Ct=e}function $i(){return++Qi}function kn(e){var t=e.f;if((t&te)!==0)return!0;if(t&ne&&(e.f&=~Mt),(t&Ue)!==0){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}(t&Me)!==0&&De===null&&U(e,$)}return!1}function es(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ne!==null&&wt.call(Ne,e)))for(var i=0;i{e.ac.abort(Zn)}),e.ac=null);try{e.f|=qn;var h=e.fn,u=h();e.f|=Rt;var d=e.deps,_=x?.is_fork;if(ue!==null){var v;if(_||dn(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"?at(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Ko(e,t,n,r,i){var s={capture:r,passive:i},o=qo(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Hr(()=>{t.removeEventListener(e,o,s)})}function lt(e,t,n){(t[_t]??(t[_t]={}))[e]=n}function er(e){for(var t=0;t{throw p});throw d}}finally{e[_t]=t,delete e.currentTarget,Re(h),Ge(u)}}}const zo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Uo(e){return zo?.createHTML(e)??e}function Go(e){var t=To("template");return t.innerHTML=Uo(e.replaceAll("","")),t.content}function Gn(e,t){var n=O;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=(t&Zs)!==0,r=(t&Qs)!==0,i,s=!e.startsWith("");return()=>{i===void 0&&(i=Go(s?e:""+e),n||(i=Un(i)));var o=r||qi?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=Un(o),a=o.lastChild;Gn(l,a)}else Gn(o,o);return o}}function Wo(e=""){{var t=Xe(e+"");return Gn(t,t),t}}function Vo(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Xe();return e.append(t,n),Gn(t,n),e}function z(e,t){e!==null&&e.before(t)}function ce(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[nn]??(e[nn]=e.nodeValue))&&(e[nn]=n,e.nodeValue=`${n}`)}function ss(e,t){return Yo(e,t)}const Rn=new Map;function Yo(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:l}){xo();var a=void 0,c=Ro(()=>{var h=n??t.appendChild(Xe());ho(h,{pending:()=>{}},_=>{bn({});var v=he;s&&(v.c=s),i&&(r.$$events=i),a=e(_,r)||{},yn()},l);var u=new Set,d=_=>{for(var v=0;v<_.length;v++){var b=_[v];if(!u.has(b)){u.add(b);var p=Ho(b);for(const C of[t,document]){var m=Rn.get(C);m===void 0&&(m=new Map,Rn.set(C,m));var w=m.get(b);w===void 0?(C.addEventListener(b,Tr,{passive:p}),m.set(b,1)):m.set(b,w+1)}}}};return d(Jn(is)),Ar.add(d),()=>{for(var _ of u)for(const p of[t,document]){var v=Rn.get(p),b=v.get(_);--b==0?(p.removeEventListener(_,Tr),v.delete(_),v.size===0&&Rn.delete(p)):v.set(_,b)}Ar.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return Mr.set(a,c),a}let Mr=new WeakMap;function tr(e,t){const n=Mr.get(e);return n?(Mr.delete(e),n(t)):Promise.resolve()}var Le,Ke,me,yt,gn,mn,Yn;class Jo{constructor(t,n=!0){le(this,"anchor");S(this,Le,new Map);S(this,Ke,new Map);S(this,me,new Map);S(this,yt,new Set);S(this,gn,!0);S(this,mn,t=>{if(f(this,Le).has(t)){var n=f(this,Le).get(t),r=f(this,Ke).get(n);if(r)Ur(r),f(this,yt).delete(n);else{var i=f(this,me).get(n);i&&(f(this,Ke).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,Le)){if(f(this,Le).delete(s),s===t)break;const l=f(this,me).get(o);l&&(de(l.effect),f(this,me).delete(o))}for(const[s,o]of f(this,Ke)){if(s===n||f(this,yt).has(s))continue;const l=()=>{if(Array.from(f(this,Le).values()).includes(s)){var c=document.createDocumentFragment();Gr(o,c),c.append(Xe()),f(this,me).set(s,{effect:o,fragment:c})}else de(o);f(this,yt).delete(s),f(this,Ke).delete(s)};f(this,gn)||!r?(f(this,yt).add(s),St(o,l,!1)):l()}}});S(this,Yn,t=>{f(this,Le).delete(t);const n=Array.from(f(this,Le).values());for(const[r,i]of f(this,me))n.includes(r)||(de(i.effect),f(this,me).delete(r))});this.anchor=t,k(this,gn,n)}ensure(t,n){var r=x,i=Ui();if(n&&!f(this,Ke).has(t)&&!f(this,me).has(t))if(i){var s=document.createDocumentFragment(),o=Xe();s.append(o),f(this,me).set(t,{effect:Ae(()=>n(o)),fragment:s})}else f(this,Ke).set(t,Ae(()=>n(this.anchor)));if(f(this,Le).set(r,t),i){for(const[l,a]of f(this,Ke))l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of f(this,me))l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(f(this,mn)),r.ondiscard(f(this,Yn))}else f(this,mn).call(this,r)}}Le=new WeakMap,Ke=new WeakMap,me=new WeakMap,yt=new WeakMap,gn=new WeakMap,mn=new WeakMap,Yn=new WeakMap;function ie(e,t,n=!1){var r=new Jo(e),i=n?Vt:0;function s(o,l){r.ensure(o,l)}Kr(()=>{var o=!1;t((l,a=0)=>{o=!0,s(a,l)}),o||s(-1,null)},i)}function Xo(e,t){return t}function Zo(e,t,n){for(var r=[],i=t.length,s,o=t.length,l=0;l{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var d=e.outrogroups;Or(e,Jn(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var a=r.length===0&&n!==null;if(a){var c=n,h=c.parentNode;Ao(h),h.append(c),e.items.clear()}Or(e,t,!a)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function Or(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const o of e.pending.values())for(const l of o)r.add(e.items.get(l).e)}for(var i=0;i{var C=n();return Ir(C)?C:C==null?[]:Jn(C)}),d,_=new Map,v=!0;function b(C){(w.effect.f&Oe)===0&&(w.pending.delete(C),w.fallback=h,Qo(w,d,o,t,r),h!==null&&(d.length===0?(h.f&ze)===0?Ur(h):(h.f^=ze,sn(h,null,o)):St(h,()=>{h=null})))}function p(C){w.pending.delete(C)}var m=Kr(()=>{d=g(u);for(var C=d.length,T=new Set,H=x,ee=Ui(),Y=0;Ys(o)):(h=Ae(()=>s(ri??(ri=Xe()))),h.f|=ze)),C>T.size&&Is(),!v)if(_.set(H,T),ee){for(const[ct,je]of l)T.has(ct)||H.skip_effect(je.e);H.oncommit(b),H.ondiscard(p)}else b(H);g(u)}),w={effect:m,items:l,pending:_,outrogroups:null,fallback:h};v=!1}function tn(e){for(;e!==null&&(e.f&Be)===0;)e=e.next;return e}function Qo(e,t,n,r,i){var s=(r&Gs)!==0,o=t.length,l=e.items,a=tn(e.effect.first),c,h=null,u,d=[],_=[],v,b,p,m;if(s)for(m=0;m0){var ye=(r&wi)!==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()}Zo(e,Y,ye)}}s&&at(()=>{if(u!==void 0)for(p of u)p.nodes?.a?.apply()})}function $o(e,t,n,r,i,s,o,l){var a=(o&zs)!==0?(o&Ws)===0?Eo(n,!1,!1):Nt(n):null,c=(o&Us)!==0?Nt(i):null;return{v:a,i:c,e:Ae(()=>(s(t,a??n,c??i,l),()=>{e.delete(r)}))}}function sn(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=wn(r);if(s.before(r),r===i)return;r=o}}function et(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const ii=[...` -\r\f \v\uFEFF`];function ea(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 l=o+s;(o===0||ii.includes(r[o-1]))&&(l===r.length||ii.includes(r[l]))?r=(o===0?"":r.substring(0,o))+r.substring(l+1):o=l}}return r===""?null:r}function ta(e,t){return e==null?null:String(e)}function Wr(e,t,n,r,i,s){var o=e[pr];if(o!==n||o===void 0){var l=ea(n,r,s);l==null?e.removeAttribute("class"):e.className=l,e[pr]=n}else if(s&&i!==s)for(var a in s){var c=!!s[a];(i==null||c!==!!i[a])&&e.classList.toggle(a,c)}return s}function na(e,t,n,r){var i=e[gr];if(i!==t){var s=ta(t);s==null?e.removeAttribute("style"):e.style.cssText=s,e[gr]=t}return r}function as(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Ir(t))return eo();for(var r of e.options)r.selected=t.includes(fn(r));return}for(r of e.options){var i=fn(r);if(Co(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function ra(e){var t=new MutationObserver(()=>{as(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Hr(()=>{t.disconnect()})}function ia(e,t,n=t){var r=new WeakSet,i=!0;Br(e,"change",s=>{var o=s?"[selected]":":checked",l;if(e.multiple)l=[].map.call(e.querySelectorAll(o),fn);else{var a=e.querySelector(o)??e.querySelector("option:not([disabled])");l=a&&fn(a)}n(l),e.__value=l,x!==null&&r.add(x)}),Wi(()=>{var s=t();if(e===document.activeElement){var o=x;if(r.has(o))return}if(as(e,s,i),i&&s===void 0){var l=e.querySelector(":checked");l!==null&&(s=fn(l),n(s))}e.__value=s,i=!1}),ra(e)}function fn(e){return"__value"in e?e.__value:e.value}const sa=Symbol("is custom element"),oa=Symbol("is html");function xt(e,t,n,r){var i=aa(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Os]=n),n==null?e.removeAttribute(t):typeof n!="string"&&la(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function aa(e){return e[In]??(e[In]={[sa]:e.nodeName.includes("-"),[oa]:e.namespaceURI===ki})}var si=new Map;function la(e){var t=e.getAttribute("is")||e.nodeName,n=si.get(t);if(n)return n;si.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=mi(i)}return n}function oi(e,t,n=t){var r=new WeakSet;Br(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=fr(e)?ur(s):s,n(s),x!==null&&r.add(x),await Bo(),s!==(s=t())){var o=e.selectionStart,l=e.selectionEnd,a=e.value.length;if(e.value=s??"",l!==null){var c=e.value.length;o===l&&l===a&&c>a?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=o,e.selectionEnd=Math.min(l,c))}}}),Qt(t)==null&&e.value&&(n(fr(e)?ur(e.value):e.value),x!==null&&r.add(x)),$n(()=>{var i=t();if(e===document.activeElement){var s=x;if(r.has(s))return}fr(e)&&i===ur(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function ls(e,t,n=t){Br(e,"change",r=>{var i=r?e.defaultChecked:e.checked;n(i)}),Qt(t)==null&&n(e.checked),$n(()=>{var r=t();e.checked=!!r})}function fr(e){var t=e.type;return t==="number"||t==="range"}function ur(e){return e===""?null:+e}function cr(e,t){return e===t||e?.[kt]===t}function fa(e={},t,n,r){var i=he.r,s=O;return Wi(()=>{var o,l;return $n(()=>{o=l,l=[],Qt(()=>{cr(n(...l),e)||(t(e,...l),o&&cr(n(...o),e)&&t(null,...o))})}),()=>{let a=s;for(;a!==i&&a.parent!==null&&a.parent.f&vr;)a=a.parent;const c=()=>{l&&cr(n(...l),e)&&t(null,...l)},h=a.teardown;a.teardown=()=>{c(),h?.()}}}),e}function un(e,t,n,r){var i=!0,s=(n&Js)!==0,o=(n&Xs)!==0,l=r,a=!0,c=void 0,h=()=>o&&i?(c??(c=cn(r)),g(c)):(a&&(a=!1,l=o?Qt(r):r),l);let u;if(s){var d=kt in e||Ms in e;u=Ft(e,t)?.set??(d&&t in e?T=>e[t]=T:void 0)}var _,v=!1;s?[_,v]=so(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=h(),u&&(Bs(),u(_)));var b;if(b=()=>{var T=e[t];return T===void 0?h():(a=!0,T)},(n&Ys)===0)return b;if(u){var p=e.$$legacy;return(function(T,H){return arguments.length>0?((!H||p||v)&&u(H?b():T),T):b()})}var m=!1,w=((n&Vs)!==0?cn:Di)(()=>(m=!1,b()));s&&g(w);var C=O;return(function(T,H){if(arguments.length>0){const ee=H?g(w):s?st(T):T;return Q(w,ee),m=!0,l!==void 0&&(l=ee),T}return Ze&&m||(C.f&Oe)!==0?w.v:g(w)})}function ua(e){he===null&&Ns(),qr(()=>{const t=Qt(e);if(typeof t=="function")return t})}const fs="[data-v-app]",ca=["header","content","footer"];let Te=null,Ie=null;function da(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 ha(){if(typeof document>"u")return!1;const t=document.querySelector(fs)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(Te=null,!1):(Te=t,Ie=null,!0)}function _a(){if(Ie!==null)return Ie;const e=typeof document<"u"?document.querySelector(fs)?.__vue_app__:null;if(!e)return Ie=!1,!1;const t=e.config?.globalProperties??{};if(typeof Te?.$history?.pause=="function"&&typeof Te?.$history?.resume=="function")return Ie={pause:()=>Te.$history.pause(),resume:()=>Te.$history.resume()},Ie;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(Ie={pause:()=>n.history.pause(),resume:()=>n.history.resume()},Ie):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(Ie={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},Ie):(Ie=!1,!1)}function va(e){const t=_a();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function ft(e){if(!Te||!e)return null;for(const t of ca){const n=Te[t];if(!Array.isArray(n))continue;const r=n.find(i=>i&&i.id===e);if(r)return r}return null}function pa(e){const t=ft(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return us(t,1,n),n}function us(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const i=ft(r);i&&(n.push({id:i.id,depth:t,label:i.label,name:i.name,settings:i.settings}),us(i,t+1,n))}}function cs(){return Te?Te.globalClasses:[]}function dr(e,t){if(!Te)throw new Error("rebemer: not ready");const n=Te.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=da(i);return n.push({id:s,name:e,settings:t||{}}),s}function ai(e,t){const n=ft(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 li(e,t){const n=ft(e);n&&(n.label=t)}const ga="5";var gi;typeof window<"u"&&((gi=window.__svelte??(window.__svelte={})).v??(gi.v=new Set)).add(ga);var ma=V('reBEM');function ba(e,t){bn(t,!0);function n(i){i.stopPropagation(),i.preventDefault(),t.onActivate?.(t.elementId)}var r=ma();se(()=>{xt(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),xt(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),lt("click",r,n),lt("keydown",r,i=>(i.key==="Enter"||i.key===" ")&&n(i)),z(e,r),yn()}er(["click","keydown"]);function At(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 ya=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,wa=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function ka(e){return e?wa.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:ya.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 Ea(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 Sa=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function Ca(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))nr.has(n)||Sa.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const xa=new Set(["add","rename","replace","modifier","migrate"]),fi=new Set(["user","label"]);function ds({rootId:e,rows:t,mode:n}){if(!xa.has(n))return{ok:!1,ops:[],error:`Invalid mode: ${n}`};const r=t.find(l=>l.id===e);if(!r)return{ok:!1,ops:[],error:"Root row missing."};const i=At(r.name);if(!i)return{ok:!1,ops:[],error:"Block name is empty."};const s=[];for(const l of t){if(!l.include)continue;const a=l.id===e;let c;if(a)c=i;else{const u=At(l.name);if(!u)continue;c=`${i}__${u}`}let h=c;if(n==="modifier"){const u=At(l.modifier);if(!u)continue;h=`${c}--${u}`}s.push({row:l,isRoot:a,finalClass:h,suggestedFrom:l.suggestedFrom||"fallback"})}if(s.length===0)return{ok:!1,ops:[],error:"No rows to apply. Include at least one row."};const o=Ma(s,n);return o.ok?{ok:!0,ops:s}:{ok:!1,ops:[],error:o.error}}function Aa({rootId:e,rows:t,mode:n,syncLabels:r}){const i=ds({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),l=At(o?.name??""),a=cs();if(n==="migrate"){const u=Ta(s,a);if(!u.ok)return u}const c=new Map;for(const u of s){const d=ft(u.row.id);if(!d)continue;const _={classIds:ui(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{va(()=>{for(const u of s){const d=ft(u.row.id);if(!d)continue;const _=ui(d.settings);let v={};if(n==="rename"&&_.length>0){const m=a.find(w=>w&&w.id===_[0]);m&&m.settings&&(v=JSON.parse(JSON.stringify(m.settings)))}else n==="migrate"&&(v=hs(d.settings,u.row.migrateKeys));if(n==="migrate"){const m=a.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=dr(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=dr(w,{});C.includes(T)||C.push(T)}p=C.includes(b)?C:[...C,b];break}case"rename":{const m=[b],w=_.length>0?a.find(C=>C&&C.id===_[0]):null;if(w){const C=w.name+"--";for(let T=1;T<_.length;T++){const H=a.find(ee=>ee&&ee.id===_[T]);if(H)if(H.name.startsWith(C)){const ee=H.name.slice(w.name.length),Y=H.settings?JSON.parse(JSON.stringify(H.settings)):{};m.push(dr(u.finalClass+ee,Y))}else m.push(_[T])}}p=m;break}case"replace":p=[b];break}if(ai(u.row.id,p),n==="migrate"&&Oa(d.settings,u.row.migrateKeys),r&&n!=="modifier"){const m=Na(u.finalClass,l);m&&li(u.row.id,m)}h++}})}catch(u){for(const[_,v]of c)try{if(ai(_,v.classIds),v.migrateKeys){const b=ft(_);b&&b.settings&&Object.assign(b.settings,v.migrateKeys)}v.label!==null&&li(_,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 Ta(e,t){for(const n of e){const r=t.find(a=>a&&a.name===n.finalClass);if(!r)continue;const i=ft(n.row.id);if(!i)continue;const s=hs(i.settings,n.row.migrateKeys),o=r.settings&&typeof r.settings=="object"?r.settings:{},l=[];for(const[a,c]of Object.entries(s))Object.prototype.hasOwnProperty.call(o,a)&&JSON.stringify(o[a])!==JSON.stringify(c)&&l.push(a.replace(/^_/,""));if(l.length>0){const a=l.join(", ");return{ok:!1,error:`Migrate blocked: existing class "${n.finalClass}" has conflicting values for ${a}. Pick a different name or use Add mode.`}}}return{ok:!0}}function Ma(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(l=>fi.has(l.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 l of i)fi.has(l.suggestedFrom)||(l.finalClass=`${r}-${o++}`,l.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 hs(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 Oa(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 ui(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function Na(e,t){let n=e;return n===t?ci(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),ci(n.replace(/-/g," ")))}function ci(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const Ra=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"}),_s=new Set(["section","container","block","div"]);function Ia(e,t="item"){return!e||typeof e!="string"||_s.has(e)?t:Ra[e]||t}function hr(e){return typeof e=="string"&&_s.has(e)}const La=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function Pa(e,t,n){const r=new Set(e.filter(Boolean)),i=(..._)=>_.some(v=>r.has(v)),s=i("button","button-group"),o=i("heading"),l=i("text-basic","text"),a=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&&!l?"actions":a&&!l&&!o&&!s?"media":o&&!l&&!s?"header":l&&!o&&!s?"body":o&&l?"content":o&&s?"header":u&&!l&&!o?"icon-group":d?"list-wrap":n>1?t===0?"header":t===n-1?"footer":"body":"content"}var Da=V('suggested'),Fa=V(' '),Ba=V(''),ja=V('

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

'),Ha=V('

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

'),qa=V('

'),Ka=V(`A class named already exists. +var xs=Object.defineProperty;var ni=e=>{throw TypeError(e)};var As=(e,t,n)=>t in e?xs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>As(e,typeof t!="symbol"?t+"":t,n),hr=(e,t,n)=>t.has(e)||ni("Cannot "+n);var f=(e,t,n)=>(hr(e,t,"read from private field"),n?n.call(e):t.get(e)),S=(e,t,n)=>t.has(e)?ni("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),k=(e,t,n,r)=>(hr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),I=(e,t,n)=>(hr(e,t,"access private method"),n);var Kr=Array.isArray,Ts=Array.prototype.indexOf,Et=Array.prototype.includes,nr=Array.from,Os=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,Ms=Object.getOwnPropertyDescriptors,Is=Object.prototype,Ns=Array.prototype,xi=Object.getPrototypeOf,ri=Object.isExtensible;const Rs=()=>{};function Ls(e){for(var t=0;t{e=r,t=i});return{promise:n,resolve:e,reject:t}}const ne=2,Yt=4,rr=8,Ti=1<<24,Pe=16,Be=32,dt=64,wr=128,Oe=512,$=1024,te=2048,ze=4096,le=8192,Me=16384,Lt=32768,kr=1<<25,Jt=65536,Un=1<<17,Ps=1<<18,$t=1<<19,Ds=1<<20,We=1<<25,It=65536,Gn=1<<21,Ht=1<<22,lt=1<<23,St=Symbol("$state"),Fs=Symbol("legacy props"),Bs=Symbol(""),Fn=Symbol("attributes"),Er=Symbol("class"),Sr=Symbol("style"),sn=Symbol("text"),Bn=Symbol("form reset"),ir=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 js(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Hs(){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 Ks(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ws(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function zs(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Us(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Gs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Vs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ys(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Js(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Xs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Zs=1,Qs=2,Oi=4,$s=8,eo=16,to=1,no=4,ro=8,io=16,so=1,oo=2,Z=Symbol("uninitialized"),Mi="http://www.w3.org/1999/xhtml";function lo(){console.warn("https://svelte.dev/e/derived_inert")}function ao(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function fo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ii(e){return e===this.v}function uo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ni(e){return!uo(e,this.v)}let he=null;function Xt(e){he=e}function En(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,r:M,l:null}}function Sn(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)$i(r)}return t.i=!0,he=t.p,{}}function Ri(){return!0}let _t=[];function Li(){var e=_t;_t=[],Ls(e)}function at(e){if(_t.length===0&&!fn){var t=_t;queueMicrotask(()=>{t===_t&&Li()})}_t.push(e)}function co(){for(;_t.length>0;)Li()}function Pi(e){var t=M;if(t===null)return O.f|=lt,e;if((t.f&Lt)===0&&(t.f&Yt)===0)throw e;st(e,t)}function st(e,t){for(;t!==null;){if((t.f&wr)!==0){if((t.f&Lt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const ho=-7169;function z(e,t){e.f=e.f&ho|t}function Wr(e){(e.f&Oe)!==0||e.deps===null?z(e,$):z(e,ze)}function Di(e){if(e!==null)for(const t of e)(t.f&ne)===0||(t.f&It)===0||(t.f^=It,Di(t.deps))}function Fi(e,t,n){(e.f&te)!==0?t.add(e):(e.f&ze)!==0&&n.add(e),Di(e.deps),z(e,$)}let Ln=!1;function _o(e){var t=Ln;try{return Ln=!1,[e(),Ln]}finally{Ln=t}}let _r=null,Dt=null,x=null,Cr=null,De=null,xr=null,fn=!1,vr=!1,Bt=null,jn=null;var ii=0;let vo=1;var Kt,nt,gt,Wt,zt,mt,Ut,Ve,gn,pe,mn,rt,He,qe,Gt,bt,R,Ar,on,Tr,Bi,ji,Hn,po,Or,Ft;const $n=class $n{constructor(){S(this,R);ae(this,"id",vo++);S(this,Kt,!1);ae(this,"linked",!0);S(this,nt,null);S(this,gt,null);ae(this,"async_deriveds",new Map);ae(this,"current",new Map);ae(this,"previous",new Map);ae(this,"unblocked",new Set);S(this,Wt,new Set);S(this,zt,new Set);S(this,mt,new Set);S(this,Ut,0);S(this,Ve,new Map);S(this,gn,null);S(this,pe,[]);S(this,mn,[]);S(this,rt,new Set);S(this,He,new Set);S(this,qe,new Map);S(this,Gt,new Set);ae(this,"is_fork",!1);S(this,bt,!1)}skip_effect(t){f(this,qe).has(t)||f(this,qe).set(t,{d:[],m:[]}),f(this,Gt).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=f(this,qe).get(t);if(r){f(this,qe).delete(t);for(var i of r.d)z(i,te),n(i);for(i of r.m)z(i,ze),n(i)}f(this,Gt).add(t)}capture(t,n,r=!1){t.v!==Z&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f<)===0&&(this.current.set(t,[n,r]),De?.set(t,n)),this.is_fork||(t.v=n)}activate(){x=this}deactivate(){x=null,De=null}flush(){try{vr=!0,x=this,I(this,R,on).call(this)}finally{ii=0,xr=null,Bt=null,jn=null,vr=!1,x=null,De=null,Ct.clear()}}discard(){for(const t of f(this,zt))t(this);f(this,zt).clear(),f(this,mt).clear(),I(this,R,Ft).call(this)}register_created_effect(t){f(this,mn).push(t)}increment(t,n){if(k(this,Ut,f(this,Ut)+1),t){let r=f(this,Ve).get(n)??0;f(this,Ve).set(n,r+1)}}decrement(t,n){if(k(this,Ut,f(this,Ut)-1),t){let r=f(this,Ve).get(n)??0;r===1?f(this,Ve).delete(n):f(this,Ve).set(n,r-1)}f(this,bt)||(k(this,bt,!0),at(()=>{k(this,bt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)f(this,rt).add(r);for(const r of n)f(this,He).add(r);t.clear(),n.clear()}oncommit(t){f(this,Wt).add(t)}ondiscard(t){f(this,zt).add(t)}on_fork_commit(t){f(this,mt).add(t)}run_fork_commit_callbacks(){for(const t of f(this,mt))t(this);f(this,mt).clear()}settled(){return(f(this,gn)??k(this,gn,Ai())).promise}static ensure(){var t;if(x===null){const n=x=new $n;I(t=n,R,Or).call(t),!vr&&!fn&&at(()=>{f(n,Kt)||n.flush()})}return x}apply(){{De=null;return}}schedule(t){if(xr=t,t.b?.is_pending&&(t.f&(Yt|rr|Ti))!==0&&(t.f&Lt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Bt!==null&&n===M&&(O===null||(O.f&ne)===0))return;if((r&(dt|Be))!==0){if((r&$)===0)return;n.f^=$}}f(this,pe).push(n)}};Kt=new WeakMap,nt=new WeakMap,gt=new WeakMap,Wt=new WeakMap,zt=new WeakMap,mt=new WeakMap,Ut=new WeakMap,Ve=new WeakMap,gn=new WeakMap,pe=new WeakMap,mn=new WeakMap,rt=new WeakMap,He=new WeakMap,qe=new WeakMap,Gt=new WeakMap,bt=new WeakMap,R=new WeakSet,Ar=function(){if(this.is_fork)return!0;for(const r of f(this,Ve).keys()){for(var t=r,n=!1;t.parent!==null;){if(f(this,qe).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},on=function(){var l,c,h;if(k(this,Kt,!0),ii++>1e3&&(I(this,R,Ft).call(this),mo()),!I(this,R,Ar).call(this)){for(const u of f(this,rt))f(this,He).delete(u),z(u,te),this.schedule(u);for(const u of f(this,He))z(u,ze),this.schedule(u)}const t=f(this,pe);k(this,pe,[]),this.apply();var n=Bt=[],r=[],i=jn=[];for(const u of t)try{I(this,R,Tr).call(this,u,n,r)}catch(d){throw Ki(u),d}if(x=null,i.length>0){var s=$n.ensure();for(const u of i)s.schedule(u)}if(Bt=null,jn=null,I(this,R,Ar).call(this)){I(this,R,Hn).call(this,r),I(this,R,Hn).call(this,n);for(const[u,d]of f(this,qe))qi(u,d);i.length>0&&I(l=x,R,on).call(l);return}const o=I(this,R,Bi).call(this);if(o){I(c=o,R,ji).call(c,this);return}f(this,rt).clear(),f(this,He).clear();for(const u of f(this,Wt))u(this);f(this,Wt).clear(),Cr=this,si(r),si(n),Cr=null,f(this,gn)?.resolve();var a=x;if(this.linked&&f(this,Ut)===0&&I(this,R,Ft).call(this),f(this,pe).length>0){a===null&&(a=this,I(this,R,Or).call(this));const u=a;f(u,pe).push(...f(this,pe).filter(d=>!f(u,pe).includes(d)))}a!==null&&I(h=a,R,on).call(h)},Tr=function(t,n,r){t.f^=$;for(var i=t.first;i!==null;){var s=i.f,o=(s&(Be|dt))!==0,a=o&&(s&$)!==0,l=a||(s&le)!==0||f(this,qe).has(i);if(!l&&i.fn!==null){o?i.f^=$:(s&Yt)!==0?n.push(i):xn(i)&&((s&Pe)!==0&&f(this,He).add(i),Qt(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}}},Bi=function(){for(var t=f(this,nt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=f(t,nt)}return null},ji=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|Pe)&&!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()),I(r=t,R,Ft).call(r),x=this,I(this,R,on).call(this)},Hn=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,Gt))u.unskip_effect(d,_=>{var v;(_.f&(Pe|Ht))!==0?u.schedule(_):I(v=u,R,Hn).call(v,[_])});u.activate();var s=new Set,o=new Map;for(var a of n)Hi(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,mn))(d.f&(Me|le|Un))===0&&zr(d,l,o)&&((d.f&(Ht|Pe))!==0?(z(d,te),u.schedule(d)):f(u,rt).add(d));if(f(u,pe).length>0&&!f(u,bt)){u.apply();for(var c of f(u,pe))I(h=u,R,Tr).call(h,c,[],[]);k(u,pe,[])}u.deactivate()}}}},Or=function(){Dt===null?_r=Dt=this:(k(Dt,gt,this),k(this,nt,Dt)),Dt=this},Ft=function(){var t=f(this,nt),n=f(this,gt);t===null?_r=n:k(t,gt,n),n===null?Dt=t:k(n,nt,t),this.linked=!1};let Nt=$n;function go(e){var t=fn;fn=!0;try{for(var n;;){if(co(),x===null)return n;x.flush()}}finally{fn=t}}function mo(){try{Us()}catch(e){st(e,xr)}}let Ge=null;function si(e){var t=e.length;if(t!==0){for(var n=0;n0)){Ct.clear();for(const i of Ge){if((i.f&(Me|le))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Ge.has(o)&&(Ge.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(Me|le))===0&&Qt(l)}}Ge.clear()}}Ge=null}}function Hi(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?Hi(i,t,n,r):(s&(Ht|Pe))!==0&&(s&te)===0&&zr(i,t,r)&&(z(i,te),Ur(i))}}function zr(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(Et.call(t,i))return!0;if((i.f&ne)!==0&&zr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Ur(e){x.schedule(e)}function qi(e,t){if(!((e.f&Be)!==0&&(e.f&$)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&ze)!==0&&t.m.push(e),z(e,$);for(var n=e.first;n!==null;)qi(n,t),n=n.next}}function Ki(e){z(e,$);for(var t=e.first;t!==null;)Ki(t),t=t.next}function bo(e){let t=0,n=Rt(0),r;return()=>{Yr()&&(g(n),or(()=>(t===0&&(r=en(()=>e(()=>un(n)))),t+=1,()=>{at(()=>{t-=1,t===0&&(r?.(),r=void 0,un(n))})})))}}var yo=Jt|$t;function wo(e,t,n,r){new ko(e,t,n,r)}var Se,qr,Ce,yt,fe,xe,re,ge,Ye,wt,it,Vt,bn,yn,Je,er,U,Eo,So,Co,Mr,qn,Kn,Ir,Nr;class ko{constructor(t,n,r,i){S(this,U);ae(this,"parent");ae(this,"is_pending",!1);ae(this,"transform_error");S(this,Se);S(this,qr,null);S(this,Ce);S(this,yt);S(this,fe);S(this,xe,null);S(this,re,null);S(this,ge,null);S(this,Ye,null);S(this,wt,0);S(this,it,0);S(this,Vt,!1);S(this,bn,new Set);S(this,yn,new Set);S(this,Je,null);S(this,er,bo(()=>(k(this,Je,Rt(f(this,wt))),()=>{k(this,Je,null)})));k(this,Se,t),k(this,Ce,n),k(this,yt,s=>{var o=M;o.b=this,o.f|=wr,r(s)}),this.parent=M.b,this.transform_error=i??this.parent?.transform_error??(s=>s),k(this,fe,Zr(()=>{I(this,U,Mr).call(this)},yo))}defer_effect(t){Fi(t,f(this,bn),f(this,yn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,Ce).pending}update_pending_count(t,n){I(this,U,Ir).call(this,t,n),k(this,wt,f(this,wt)+t),!(!f(this,Je)||f(this,Vt))&&(k(this,Vt,!0),at(()=>{k(this,Vt,!1),f(this,Je)&&Zt(f(this,Je),f(this,wt))}))}get_effect_pending(){return f(this,er).call(this),g(f(this,Je))}error(t){if(!f(this,Ce).onerror&&!f(this,Ce).failed)throw t;x?.is_fork?(f(this,xe)&&x.skip_effect(f(this,xe)),f(this,re)&&x.skip_effect(f(this,re)),f(this,ge)&&x.skip_effect(f(this,ge)),x.on_fork_commit(()=>{I(this,U,Nr).call(this,t)})):I(this,U,Nr).call(this,t)}}Se=new WeakMap,qr=new WeakMap,Ce=new WeakMap,yt=new WeakMap,fe=new WeakMap,xe=new WeakMap,re=new WeakMap,ge=new WeakMap,Ye=new WeakMap,wt=new WeakMap,it=new WeakMap,Vt=new WeakMap,bn=new WeakMap,yn=new WeakMap,Je=new WeakMap,er=new WeakMap,U=new WeakSet,Eo=function(){try{k(this,xe,Ae(()=>f(this,yt).call(this,f(this,Se))))}catch(t){this.error(t)}},So=function(t){const n=f(this,Ce).failed;n&&k(this,ge,Ae(()=>{n(f(this,Se),()=>t,()=>()=>{})}))},Co=function(){const t=f(this,Ce).pending;t&&(this.is_pending=!0,k(this,re,Ae(()=>t(f(this,Se)))),at(()=>{var n=k(this,Ye,document.createDocumentFragment()),r=Ze();n.append(r),k(this,xe,I(this,U,Kn).call(this,()=>Ae(()=>f(this,yt).call(this,r)))),f(this,it)===0&&(f(this,Se).before(n),k(this,Ye,null),xt(f(this,re),()=>{k(this,re,null)}),I(this,U,qn).call(this,x))}))},Mr=function(){try{if(this.is_pending=this.has_pending_snippet(),k(this,it,0),k(this,wt,0),k(this,xe,Ae(()=>{f(this,yt).call(this,f(this,Se))})),f(this,it)>0){var t=k(this,Ye,document.createDocumentFragment());ei(f(this,xe),t);const n=f(this,Ce).pending;k(this,re,Ae(()=>n(f(this,Se))))}else I(this,U,qn).call(this,x)}catch(n){this.error(n)}},qn=function(t){this.is_pending=!1,t.transfer_effects(f(this,bn),f(this,yn))},Kn=function(t){var n=M,r=O,i=he;Ue(f(this,fe)),Ne(f(this,fe)),Xt(f(this,fe).ctx);try{return Nt.ensure(),t()}catch(s){return Pi(s),null}finally{Ue(n),Ne(r),Xt(i)}},Ir=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&I(r=this.parent,U,Ir).call(r,t,n);return}k(this,it,f(this,it)+t),f(this,it)===0&&(I(this,U,qn).call(this,n),f(this,re)&&xt(f(this,re),()=>{k(this,re,null)}),f(this,Ye)&&(f(this,Se).before(f(this,Ye)),k(this,Ye,null)))},Nr=function(t){f(this,xe)&&(de(f(this,xe)),k(this,xe,null)),f(this,re)&&(de(f(this,re)),k(this,re,null)),f(this,ge)&&(de(f(this,ge)),k(this,ge,null));var n=f(this,Ce).onerror;let r=f(this,Ce).failed;var i=!1,s=!1;const o=()=>{if(i){fo();return}i=!0,s&&Xs(),f(this,ge)!==null&&xt(f(this,ge),()=>{k(this,ge,null)}),I(this,U,Kn).call(this,()=>{I(this,U,Mr).call(this)})},a=l=>{try{s=!0,n?.(l,o),s=!1}catch(c){st(c,f(this,fe)&&f(this,fe).parent)}r&&k(this,ge,I(this,U,Kn).call(this,()=>{try{return Ae(()=>{var c=M;c.b=this,c.f|=wr,r(f(this,Se),()=>l,()=>o)})}catch(c){return st(c,f(this,fe).parent),null}}))};at(()=>{var l;try{l=this.transform_error(t)}catch(c){st(c,f(this,fe)&&f(this,fe).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,c=>st(c,f(this,fe)&&f(this,fe).parent)):a(l)})};function xo(e,t,n,r){const i=_n;var s=e.filter(d=>!d.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=M,a=Ao(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function c(d){if((o.f&Me)===0){a();try{r(d)}catch(_){st(_,o)}Vn()}}var h=Wi();if(n.length===0){l.then(()=>c(t.map(i))).finally(h);return}function u(){Promise.all(n.map(d=>To(d))).then(d=>c([...t.map(i),...d])).catch(d=>st(d,o)).finally(h)}l?l.then(()=>{a(),u(),Vn()}):u()}function Ao(){var e=M,t=O,n=he,r=x;return function(s=!0){Ue(e),Ne(t),Xt(n),s&&(e.f&Me)===0&&(r?.activate(),r?.apply())}}function Vn(e=!0){Ue(null),Ne(null),Xt(null),e&&x?.deactivate()}function Wi(){var e=M,t=e.b,n=x,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 _n(e){var t=ne|te;return M!==null&&(M.f|=$t),{ctx:he,deps:null,effects:null,equals:Ii,f:t,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:M,ac:null}}const Pn=Symbol("obsolete");function To(e,t,n){let r=M;r===null&&Hs();var i=void 0,s=Rt(Z),o=!O,a=new Set;return qo(()=>{var l=M,c=Ai();i=c.promise;try{Promise.resolve(e()).then(c.resolve,_=>{_!==ir&&c.reject(_)}).finally(Vn)}catch(_){c.reject(_),Vn()}var h=x;if(o){if((l.f&Lt)!==0)var u=Wi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(Pn);else for(const _ of a.values())_.reject(Pn);a.add(c),h.async_deriveds.set(l,c)}const d=(_,v=void 0)=>{u?.(),a.delete(c),v!==Pn&&(h.activate(),v?(s.f|=lt,Zt(s,v)):((s.f<)!==0&&(s.f^=lt),Zt(s,_)),h.deactivate())};c.promise.then(d,_=>d(null,_||"unknown"))}),Jr(()=>{for(const l of a)l.reject(Pn)}),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=_n(e);return ss(t),t}function zi(e){const t=_n(e);return t.equals=Ni,t}function Oo(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!Vi&&No()}return t}function No(){Vi=!1;for(const e of Yn){(e.f&$)!==0&&z(e,ze);let t;try{t=xn(e)}catch{t=!0}t&&Qt(e)}Yn.clear()}function un(e){Q(e,e.v+1)}function Yi(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s{if(At===s)return a();var l=O,c=At;Ne(null),fi(s);var h=a();return Ne(l),fi(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)&&Vs();var h=n.get(l);return h===void 0?o(()=>{var u=oe(c.value);return n.set(l,u),u}):Q(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),un(i)}}else Q(c,Z),un(i);return!0},get(a,l,c){if(l===St)return e;var h=n.get(l),u=l in a;if(h===void 0&&(!u||jt(a,l)?.writable)&&(h=o(()=>{var _=ot(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===St)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||jt(a,l)?.writable)){c===void 0&&(c=o(()=>{var d=h?ot(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||jt(a,l)?.writable)&&(u=o(()=>oe(void 0)),Q(u,ot(c)),n.set(l,u));else{d=u.v!==Z;var b=o(()=>ot(c));Q(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&&Q(m,w+1)}un(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(){Ys()}})}function oi(e){try{if(e!==null&&typeof e=="object"&&St in e)return e[St]}catch{}return e}function Ro(e,t){return Object.is(oi(e),oi(t))}var Rr,Ji,Xi,Zi;function Lo(){if(Rr===void 0){Rr=window,Ji=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xi=jt(t,"firstChild").get,Zi=jt(t,"nextSibling").get,ri(e)&&(e[Er]=void 0,e[Fn]=null,e[Sr]=void 0,e.__e=void 0),ri(n)&&(n[sn]=void 0)}}function Ze(e=""){return document.createTextNode(e)}function Jn(e){return Xi.call(e)}function Cn(e){return Zi.call(e)}function L(e,t){return Jn(e)}function qt(e,t=!1){{var n=Jn(e);return n instanceof Comment&&n.data===""?Cn(n):n}}function N(e,t=1,n=!1){let r=e;for(;t--;)r=Cn(r);return r}function Po(e){e.textContent=""}function Qi(){return!1}function Do(e,t,n){return document.createElementNS(Mi,e,void 0)}let li=!1;function Fo(){li||(li=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Bn]?.()})},{capture:!0}))}function sr(e){var t=O,n=M;Ne(null),Ue(null);try{return e()}finally{Ne(t),Ue(n)}}function Vr(e,t,n,r=n){e.addEventListener(t,()=>sr(n));const i=e[Bn];i?e[Bn]=()=>{i(),r(!0)}:e[Bn]=()=>r(!0),Fo()}function Bo(e){M===null&&(O===null&&zs(),Ws()),Qe&&Ks()}function jo(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function $e(e,t){var n=M;n!==null&&(n.f&le)!==0&&(e|=le);var r={ctx:he,deps:null,nodes:null,f:e|te|Oe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};x?.register_created_effect(r);var i=r;if((e&Yt)!==0)Bt!==null?Bt.push(r):Nt.ensure().schedule(r);else if(t!==null){try{Qt(r)}catch(o){throw de(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&$t)===0&&(i=i.first,(e&Pe)!==0&&(e&Jt)!==0&&i!==null&&(i.f|=Jt))}if(i!==null&&(i.parent=n,n!==null&&jo(i,n),O!==null&&(O.f&ne)!==0&&(e&dt)===0)){var s=O;(s.effects??(s.effects=[])).push(i)}return r}function Yr(){return O!==null&&!Fe}function Jr(e){const t=$e(rr,null);return z(t,$),t.teardown=e,t}function Xr(e){Bo();var t=M.f,n=!O&&(t&Be)!==0&&(t&Lt)===0;if(n){var r=he;(r.e??(r.e=[])).push(e)}else return $i(e)}function $i(e){return $e(Yt|Ds,e)}function Ho(e){Nt.ensure();const t=$e(dt|$t,e);return(n={})=>new Promise(r=>{n.outro?xt(t,()=>{de(t),r(void 0)}):(de(t),r(void 0))})}function es(e){return $e(Yt,e)}function qo(e){return $e(Ht|$t,e)}function or(e,t=0){return $e(rr|t,e)}function se(e,t=[],n=[],r=[]){xo(r,t,n,i=>{$e(rr,()=>e(...i.map(g)))})}function Zr(e,t=0){var n=$e(Pe|t,e);return n}function Ae(e){return $e(Be|$t,e)}function ts(e){var t=e.teardown;if(t!==null){const n=Qe,r=O;ai(!0),Ne(null);try{t.call(null)}finally{ai(n),Ne(r)}}}function Qr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&sr(()=>{i.abort(ir)});var r=n.next;(n.f&dt)!==0?n.parent=null:de(n,t),n=r}}function Ko(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Be)===0&&de(t),t=n}}function de(e,t=!0){var n=!1;(t||(e.f&Ps)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Wo(e.nodes.start,e.nodes.end),n=!0),z(e,kr),Qr(e,t&&!n),vn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();ts(e),e.f^=kr,e.f|=Me;var i=e.parent;i!==null&&i.first!==null&&ns(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Wo(e,t){for(;e!==null;){var n=e===t?null:Cn(e);e.remove(),e=n}}function ns(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=[];rs(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 rs(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&Jt)!==0||(i.f&Be)!==0&&(e.f&Pe)!==0;rs(i,t,o?n:!1)}i=s}}}function $r(e){is(e,!0)}function is(e,t){if((e.f&le)!==0){e.f^=le,(e.f&$)===0&&(z(e,te),Nt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Jt)!==0||(n.f&Be)!==0;is(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 ei(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Cn(n);t.append(n),n=i}}let Wn=!1,Qe=!1;function ai(e){Qe=e}let O=null,Fe=!1;function Ne(e){O=e}let M=null;function Ue(e){M=e}let Ie=null;function ss(e){O!==null&&(Ie===null?Ie=[e]:Ie.push(e))}let ue=null,ve=0,Ee=null;function zo(e){Ee=e}let os=1,vt=0,At=vt;function fi(e){At=e}function ls(){return++os}function xn(e){var t=e.f;if((t&te)!==0)return!0;if(t&ne&&(e.f&=~It),(t&ze)!==0){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}(t&Oe)!==0&&De===null&&z(e,$)}return!1}function as(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ie!==null&&Et.call(Ie,e)))for(var i=0;i{e.ac.abort(ir)}),e.ac=null);try{e.f|=Gn;var h=e.fn,u=h();e.f|=Lt;var d=e.deps,_=x?.is_fork;if(ue!==null){var v;if(_||vn(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"?at(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Xo(e,t,n,r,i){var s={capture:r,passive:i},o=Jo(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Jr(()=>{t.removeEventListener(e,o,s)})}function ft(e,t,n){(t[pt]??(t[pt]={}))[e]=n}function lr(e){for(var t=0;t{throw p});throw d}}finally{e[pt]=t,delete e.currentTarget,Ne(h),Ue(u)}}}const Zo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Qo(e){return Zo?.createHTML(e)??e}function $o(e){var t=Do("template");return t.innerHTML=Qo(e.replaceAll("","")),t.content}function Xn(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&so)!==0,r=(t&oo)!==0,i,s=!e.startsWith("");return()=>{i===void 0&&(i=$o(s?e:""+e),n||(i=Jn(i)));var o=r||Ji?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=Jn(o),l=o.lastChild;Xn(a,l)}else Xn(o,o);return o}}function el(e=""){{var t=Ze(e+"");return Xn(t,t),t}}function tl(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Ze();return e.append(t,n),Xn(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[sn]??(e[sn]=e.nodeValue))&&(e[sn]=n,e.nodeValue=`${n}`)}function hs(e,t){return nl(e,t)}const Dn=new Map;function nl(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){Lo();var l=void 0,c=Ho(()=>{var h=n??t.appendChild(Ze());wo(h,{pending:()=>{}},_=>{En({});var v=he;s&&(v.c=s),i&&(r.$$events=i),l=e(_,r)||{},Sn()},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=Yo(b);for(const C of[t,document]){var m=Dn.get(C);m===void 0&&(m=new Map,Dn.set(C,m));var w=m.get(b);w===void 0?(C.addEventListener(b,Pr,{passive:p}),m.set(b,1)):m.set(b,w+1)}}}};return d(nr(ds)),Lr.add(d),()=>{for(var _ of u)for(const p of[t,document]){var v=Dn.get(p),b=v.get(_);--b==0?(p.removeEventListener(_,Pr),v.delete(_),v.size===0&&Dn.delete(p)):v.set(_,b)}Lr.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return Dr.set(l,c),l}let Dr=new WeakMap;function ar(e,t){const n=Dr.get(e);return n?(Dr.delete(e),n(t)):Promise.resolve()}var Le,Ke,me,kt,wn,kn,tr;class rl{constructor(t,n=!0){ae(this,"anchor");S(this,Le,new Map);S(this,Ke,new Map);S(this,me,new Map);S(this,kt,new Set);S(this,wn,!0);S(this,kn,t=>{if(f(this,Le).has(t)){var n=f(this,Le).get(t),r=f(this,Ke).get(n);if(r)$r(r),f(this,kt).delete(n);else{var i=f(this,me).get(n);i&&(f(this,Ke).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,Le)){if(f(this,Le).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,Ke)){if(s===n||f(this,kt).has(s))continue;const a=()=>{if(Array.from(f(this,Le).values()).includes(s)){var c=document.createDocumentFragment();ei(o,c),c.append(Ze()),f(this,me).set(s,{effect:o,fragment:c})}else de(o);f(this,kt).delete(s),f(this,Ke).delete(s)};f(this,wn)||!r?(f(this,kt).add(s),xt(o,a,!1)):a()}}});S(this,tr,t=>{f(this,Le).delete(t);const n=Array.from(f(this,Le).values());for(const[r,i]of f(this,me))n.includes(r)||(de(i.effect),f(this,me).delete(r))});this.anchor=t,k(this,wn,n)}ensure(t,n){var r=x,i=Qi();if(n&&!f(this,Ke).has(t)&&!f(this,me).has(t))if(i){var s=document.createDocumentFragment(),o=Ze();s.append(o),f(this,me).set(t,{effect:Ae(()=>n(o)),fragment:s})}else f(this,Ke).set(t,Ae(()=>n(this.anchor)));if(f(this,Le).set(r,t),i){for(const[a,l]of f(this,Ke))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,kn)),r.ondiscard(f(this,tr))}else f(this,kn).call(this,r)}}Le=new WeakMap,Ke=new WeakMap,me=new WeakMap,kt=new WeakMap,wn=new WeakMap,kn=new WeakMap,tr=new WeakMap;function ie(e,t,n=!1){var r=new rl(e),i=n?Jt:0;function s(o,a){r.ensure(o,a)}Zr(()=>{var o=!1;t((a,l=0)=>{o=!0,s(l,a)}),o||s(-1,null)},i)}function il(e,t){return t}function sl(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;Fr(e,nr(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;Po(h),h.append(c),e.items.clear()}Fr(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function Fr(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 Kr(C)?C:C==null?[]:nr(C)}),d,_=new Map,v=!0;function b(C){(w.effect.f&Me)===0&&(w.pending.delete(C),w.fallback=h,ol(w,d,o,t,r),h!==null&&(d.length===0?(h.f&We)===0?$r(h):(h.f^=We,ln(h,null,o)):xt(h,()=>{h=null})))}function p(C){w.pending.delete(C)}var m=Zr(()=>{d=g(u);for(var C=d.length,T=new Set,H=x,ee=Qi(),Y=0;Ys(o)):(h=Ae(()=>s(ci??(ci=Ze()))),h.f|=We)),C>T.size&&qs(),!v)if(_.set(H,T),ee){for(const[ht,je]of a)T.has(ht)||H.skip_effect(je.e);H.oncommit(b),H.ondiscard(p)}else b(H);g(u)}),w={effect:m,items:a,pending:_,outrogroups:null,fallback:h};v=!1}function rn(e){for(;e!==null&&(e.f&Be)===0;)e=e.next;return e}function ol(e,t,n,r,i){var s=(r&$s)!==0,o=t.length,a=e.items,l=rn(e.effect.first),c,h=null,u,d=[],_=[],v,b,p,m;if(s)for(m=0;m0){var ye=(r&Oi)!==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()}sl(e,Y,ye)}}s&&at(()=>{if(u!==void 0)for(p of u)p.nodes?.a?.apply()})}function ll(e,t,n,r,i,s,o,a){var l=(o&Zs)!==0?(o&eo)===0?Io(n,!1,!1):Rt(n):null,c=(o&Qs)!==0?Rt(i):null;return{v:l,i:c,e:Ae(()=>(s(t,l??n,c??i,a),()=>{e.delete(r)}))}}function ln(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&We)===0?t.nodes.start:n;r!==null;){var o=Cn(r);if(s.before(r),r===i)return;r=o}}function tt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const di=[...` +\r\f \v\uFEFF`];function al(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||di.includes(r[o-1]))&&(a===r.length||di.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function fl(e,t){return e==null?null:String(e)}function ti(e,t,n,r,i,s){var o=e[Er];if(o!==n||o===void 0){var a=al(n,r,s);a==null?e.removeAttribute("class"):e.className=a,e[Er]=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 ul(e,t,n,r){var i=e[Sr];if(i!==t){var s=fl(t);s==null?e.removeAttribute("style"):e.style.cssText=s,e[Sr]=t}return r}function vs(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Kr(t))return ao();for(var r of e.options)r.selected=t.includes(cn(r));return}for(r of e.options){var i=cn(r);if(Ro(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function cl(e){var t=new MutationObserver(()=>{vs(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Jr(()=>{t.disconnect()})}function dl(e,t,n=t){var r=new WeakSet,i=!0;Vr(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),cn);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&cn(l)}n(a),e.__value=a,x!==null&&r.add(x)}),es(()=>{var s=t();if(e===document.activeElement){var o=x;if(r.has(o))return}if(vs(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=cn(a),n(s))}e.__value=s,i=!1}),cl(e)}function cn(e){return"__value"in e?e.__value:e.value}const hl=Symbol("is custom element"),_l=Symbol("is html");function Tt(e,t,n,r){var i=vl(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Bs]=n),n==null?e.removeAttribute(t):typeof n!="string"&&pl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function vl(e){return e[Fn]??(e[Fn]={[hl]:e.nodeName.includes("-"),[_l]:e.namespaceURI===Mi})}var hi=new Map;function pl(e){var t=e.getAttribute("is")||e.nodeName,n=hi.get(t);if(n)return n;hi.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Ms(i);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.push(o);i=xi(i)}return n}function _i(e,t,n=t){var r=new WeakSet;Vr(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=pr(e)?gr(s):s,n(s),x!==null&&r.add(x),await Go(),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))}}}),en(t)==null&&e.value&&(n(pr(e)?gr(e.value):e.value),x!==null&&r.add(x)),or(()=>{var i=t();if(e===document.activeElement){var s=x;if(r.has(s))return}pr(e)&&i===gr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function ps(e,t,n=t){Vr(e,"change",r=>{var i=r?e.defaultChecked:e.checked;n(i)}),en(t)==null&&n(e.checked),or(()=>{var r=t();e.checked=!!r})}function pr(e){var t=e.type;return t==="number"||t==="range"}function gr(e){return e===""?null:+e}function mr(e,t){return e===t||e?.[St]===t}function gl(e={},t,n,r){var i=he.r,s=M;return es(()=>{var o,a;return or(()=>{o=a,a=[],en(()=>{mr(n(...a),e)||(t(e,...a),o&&mr(n(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&kr;)l=l.parent;const c=()=>{a&&mr(n(...a),e)&&t(null,...a)},h=l.teardown;l.teardown=()=>{c(),h?.()}}}),e}function dn(e,t,n,r){var i=!0,s=(n&ro)!==0,o=(n&io)!==0,a=r,l=!0,c=void 0,h=()=>o&&i?(c??(c=_n(r)),g(c)):(l&&(l=!1,a=o?en(r):r),a);let u;if(s){var d=St in e||Fs in e;u=jt(e,t)?.set??(d&&t in e?T=>e[t]=T:void 0)}var _,v=!1;s?[_,v]=_o(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=h(),u&&(Gs(),u(_)));var b;if(b=()=>{var T=e[t];return T===void 0?h():(l=!0,T)},(n&no)===0)return b;if(u){var p=e.$$legacy;return(function(T,H){return arguments.length>0?((!H||p||v)&&u(H?b():T),T):b()})}var m=!1,w=((n&to)!==0?_n:zi)(()=>(m=!1,b()));s&&g(w);var C=M;return(function(T,H){if(arguments.length>0){const ee=H?g(w):s?ot(T):T;return Q(w,ee),m=!0,a!==void 0&&(a=ee),T}return Qe&&m||(C.f&Me)!==0?w.v:g(w)})}function ml(e){he===null&&js(),Xr(()=>{const t=en(e);if(typeof t=="function")return t})}const gs="[data-v-app]",bl=["header","content","footer"];let Te=null,Re=null;function yl(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 wl(){if(typeof document>"u")return!1;const t=document.querySelector(gs)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(Te=null,!1):(Te=t,Re=null,!0)}function kl(){if(Re!==null)return Re;const e=typeof document<"u"?document.querySelector(gs)?.__vue_app__:null;if(!e)return Re=!1,!1;const t=e.config?.globalProperties??{};if(typeof Te?.$history?.pause=="function"&&typeof Te?.$history?.resume=="function")return Re={pause:()=>Te.$history.pause(),resume:()=>Te.$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 El(e){const t=kl();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function ut(e){if(!Te||!e)return null;for(const t of bl){const n=Te[t];if(!Array.isArray(n))continue;const r=n.find(i=>i&&i.id===e);if(r)return r}return null}function Sl(e){const t=ut(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return ms(t,1,n),n}function ms(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const i=ut(r);i&&(n.push({id:i.id,depth:t,label:i.label,name:i.name,settings:i.settings}),ms(i,t+1,n))}}function bs(){return Te?Te.globalClasses:[]}function br(e,t){if(!Te)throw new Error("rebemer: not ready");const n=Te.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=yl(i);return n.push({id:s,name:e,settings:t||{}}),s}function vi(e,t){const n=ut(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 pi(e,t){const n=ut(e);n&&(n.label=t)}const Br="slashed-rebemer-host",Cl="slashed-class-hint",xl=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],Al=3;function Tl(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 jr=!1,Zn={},Xe=null,hn=null,ct=null;function Ol(){if(Xe&&Xe.isConnected)return Xe;let e=document.getElementById(Br);e||(e=document.createElement("div"),e.id=Br,document.body.appendChild(e));const t=document.createElement("div");return t.id=Cl,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

',e.appendChild(t),Xe=t,t}function Ml(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 Nl(e,t){const n=Ol();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,Il(n,e),ct=e}function pn(){Xe&&(Xe.hidden=!0),ct=null}function Rl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${Br}`))return;if(!t.closest(xl.join(","))){ct&&pn();return}const n=Ml(t);if(!n){ct&&pn();return}n.el!==ct&&Nl(n.el,n.hint)}function Ll(e){if(!ct)return;const t=e.relatedTarget;t instanceof Node&&ct.contains(t)||pn()}function Pl(e){e.key==="Escape"&&pn()}function Dl(e,t,n={}){if(zn(),jr=!!e,Zn=t&&typeof t=="object"?t:{},!jr||Object.keys(Zn).length===0)return;hn=new AbortController;const{signal:r}=hn,i={passive:!0,signal:r};document.addEventListener("mouseover",Rl,i),document.addEventListener("mouseout",Ll,i),document.addEventListener("keydown",Pl,i),window.addEventListener("scroll",pn,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?zn():n.signal.addEventListener("abort",zn,{once:!0}))}function zn(){hn&&(hn.abort(),hn=null),Xe&&(Xe.remove(),Xe=null),ct=null,jr=!1,Zn={}}const Fl="5";var Ci;typeof window<"u"&&((Ci=window.__svelte??(window.__svelte={})).v??(Ci.v=new Set)).add(Fl);var Bl=V('reBEM');function jl(e,t){En(t,!0);function n(i){i.stopPropagation(),i.preventDefault(),t.onActivate?.(t.elementId)}var r=Bl();se(()=>{Tt(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),Tt(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),ft("click",r,n),ft("keydown",r,i=>(i.key==="Enter"||i.key===" ")&&n(i)),W(e,r),Sn()}lr(["click","keydown"]);function Ot(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 Hl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,ql=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function Kl(e){return e?ql.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:Hl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const fr=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 Wl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))fr.has(n)&&t.push(n);return t.sort(),t}const zl=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function Ul(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))fr.has(n)||zl.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Gl=new Set(["add","rename","replace","modifier","migrate"]),gi=new Set(["user","label"]);function ys({rootId:e,rows:t,mode:n}){if(!Gl.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=Ot(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=Ot(a.name);if(!u)continue;c=`${i}__${u}`}let h=c;if(n==="modifier"){const u=Ot(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=Jl(s,n);return o.ok?{ok:!0,ops:s}:{ok:!1,ops:[],error:o.error}}function Vl({rootId:e,rows:t,mode:n,syncLabels:r}){const i=ys({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=Ot(o?.name??""),l=bs();if(n==="migrate"){const u=Yl(s,l);if(!u.ok)return u}const c=new Map;for(const u of s){const d=ut(u.row.id);if(!d)continue;const _={classIds:mi(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{El(()=>{for(const u of s){const d=ut(u.row.id);if(!d)continue;const _=mi(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=ws(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=br(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=br(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 H=l.find(ee=>ee&&ee.id===_[T]);if(H)if(H.name.startsWith(C)){const ee=H.name.slice(w.name.length),Y=H.settings?JSON.parse(JSON.stringify(H.settings)):{};m.push(br(u.finalClass+ee,Y))}else m.push(_[T])}}p=m;break}case"replace":p=[b];break}if(vi(u.row.id,p),n==="migrate"&&Xl(d.settings,u.row.migrateKeys),r&&n!=="modifier"){const m=Zl(u.finalClass,a);m&&pi(u.row.id,m)}h++}})}catch(u){for(const[_,v]of c)try{if(vi(_,v.classIds),v.migrateKeys){const b=ut(_);b&&b.settings&&Object.assign(b.settings,v.migrateKeys)}v.label!==null&&pi(_,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 Yl(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const i=ut(n.row.id);if(!i)continue;const s=ws(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 Jl(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=>gi.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)gi.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 ws(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)fr.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Xl(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)fr.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function mi(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?bi(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),bi(n.replace(/-/g," ")))}function bi(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const Ql=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"}),ks=new Set(["section","container","block","div"]);function $l(e,t="item"){return!e||typeof e!="string"||ks.has(e)?t:Ql[e]||t}function yr(e){return typeof e=="string"&&ks.has(e)}const ea=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function ta(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 na=V('suggested'),ra=V(' '),ia=V(''),sa=V('

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

'),oa=V('

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

'),la=V('

'),aa=V(`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),za=V(`A class named already exists + values block the migration — pick a different name or use Add.`,1),fa=V(`A class named already exists globally. Apply will attach the existing class instead of - creating a duplicate.`,1),Ua=V('

'),Ga=V(' '),Wa=V('Migrate: ',1),Va=V('No migratable keys on this element.'),Ya=V(' '),Ja=V('
'),Xa=V('
');function Za(e,t){bn(t,!0);let n=un(t,"row",15),r=un(t,"globalClasses",19,()=>[]),i=un(t,"finalClassName",3,"");const s=be(()=>t.mode==="modifier"),o=be(()=>t.mode==="migrate"),l=be(()=>t.mode==="rename"),a=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 _=Xa();let v;var b=L(_),p=L(b),m=R(b,2),w=L(m),C=L(w),T=R(w,2),H=L(T),ee=R(T,2);{var Y=y=>{var F=Da();se(()=>xt(F,"title",`Pre-filled from ${n().suggestedFrom==="element-type"?"Bricks element type":"fallback"}`)),z(y,F)};ie(ee,y=>{g(c)&&n().include&&y(Y)})}var _e=R(m,2),ye=L(_e),q=L(ye);{var ct=y=>{var F=Fa(),we=L(F);se(()=>ce(we,g(a))),z(y,F)};ie(q,y=>{g(a)&&y(ct)})}var je=R(q,2),$t=R(ye,2);{var En=y=>{var F=Ba();se(()=>F.disabled=!n().include),lt("input",F,u),oi(F,()=>n().modifier,we=>n(n().modifier=we,!0)),z(y,F)};ie($t,y=>{g(s)&&y(En)})}var Sn=R(_e,2);{var Cn=y=>{var F=ja();z(y,F)};ie(Sn,y=>{g(s)&&n().include&&!n().modifier&&y(Cn)})}var en=R(Sn,2);{var ir=y=>{var F=Ha();z(y,F)},xn=y=>{var F=qa(),we=L(F);se(()=>ce(we,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),z(y,F)};ie(en,y=>{g(l)&&n().include&&n().currentClassCount===0?y(ir):g(l)&&n().include&&n().currentClassCount>1&&y(xn,1)})}var An=R(en,2);{var Tn=y=>{var F=Ua(),we=L(F);{var E=A=>{var K=Ka(),P=R(jt(K)),J=L(P);se(()=>ce(J,i())),z(A,K)},B=A=>{var K=za(),P=R(jt(K)),J=L(P);se(()=>ce(J,i())),z(A,K)};ie(we,A=>{g(o)?A(E):A(B,-1)})}z(y,F)};ie(An,y=>{g(h)&&y(Tn)})}var sr=R(An,2);{var Mn=y=>{var F=Ja(),we=L(F);{var E=P=>{var J=Wa(),j=R(jt(J),2);os(j,17,()=>n().migrateKeys,Xo,(ke,W)=>{var D=Ga(),X=L(D);se($e=>{xt(D,"title",`Will be lifted into ${(i()||"the new class")??""}`),ce(X,$e)},[()=>d(g(W))]),z(ke,D)}),z(P,J)},B=P=>{var J=Va();z(P,J)};ie(we,P=>{n().migrateKeys?.length?P(E):P(B,-1)})}var A=R(we,2);{var K=P=>{var J=Ya(),j=L(J);se(()=>ce(j,`${n().skippedKeys.length??""} skipped`)),z(P,J)};ie(A,P=>{n().skippedKeys?.length&&P(K)})}z(y,F)};ie(sr,y=>{g(o)&&n().include&&y(Mn)})}se(y=>{v=Wr(_,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":g(c)}),na(_,`--rebemer-row-depth: ${n().depth??0??""}`),ce(C,n().originalLabel),ce(H,y),xt(je,"placeholder",t.isRoot?"block-name":"element-name"),je.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),ls(p,()=>n().include,y=>n(n().include=y,!0)),lt("input",je,u),oi(je,()=>n().name,y=>n(n().name=y,!0)),z(e,_),yn()}er(["input"]);var Qa=V(" ");function $a(e,t){bn(t,!0);let n=un(t,"kind",3,"info"),r=un(t,"duration",3,3e3),i=oe(!0);qr(()=>{if(!g(i)||r()<=0)return;const c=setTimeout(()=>{Q(i,!1),t.onDismiss?.()},r());return()=>clearTimeout(c)});const s=be(()=>n()==="error"?"alert":"status");var o=Vo(),l=jt(o);{var a=c=>{var h=Qa(),u=L(h);se(()=>{Wr(h,1,`rebemer-toast rebemer-toast--${n()??""}`),xt(h,"role",g(s)),xt(h,"aria-live",n()==="error"?"assertive":"polite"),ce(u,t.message)}),lt("click",h,()=>{Q(i,!1),t.onDismiss?.()}),z(c,h)};ie(l,c=>{g(i)&&c(a)})}z(e,o),yn()}er(["click"]);var el=V("Will migrate ",1),tl=V(' '),nl=V(''),rl=V(' ',1);function il(e,t){bn(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(st([])),o=oe(st([])),l=oe(null),a=oe(null);const c=be(()=>At(g(s)[0]?.name??"")),h=be(()=>g(s)[0]?.originalLabel??""),u=be(()=>{if(g(r)!=="migrate")return null;let E=0,B=0;for(const A of g(s))A.include&&(E+=A.migrateKeys?.length??0,B+=A.skippedKeys?.length??0);return{willMigrate:E,willSkip:B}}),d=be(()=>{if(g(s).length===0)return new Map;const E=ds({rootId:t.rootId,rows:g(s),mode:g(r)}),B=new Map;if(!E.ok)return B;for(const A of E.ops)B.set(A.row.id,A.finalClass);return B});ua(()=>{const E=pa(t.rootId);Q(o,cs().slice(),!0);const B=E.map((A,K)=>{const P=K===0,J=A.label||"",j=At(J),ke=A.name||"";let W,D;return j?(W=j,D="label"):P?(W="block",D="fallback"):ke&&!hr(ke)?(W=Ia(ke,"item"),D="element-type"):(W="item",D="fallback"),{id:A.id,depth:A.depth,bricksType:ke,originalLabel:J||(P?"block":"element"),name:W,modifier:"",include:!0,suggestedFrom:D,migrateKeys:Ea(A.settings),skippedKeys:Ca(A.settings),currentClassCount:Array.isArray(A.settings?._cssGlobalClasses)?A.settings._cssGlobalClasses.filter(X=>typeof X=="string"&&X.length>0).length:0}});if(B.length>1){const A=new Map(E.map(j=>[j.id,[]])),K=[];for(const j of E){for(;K.length&&K[K.length-1].depth>=j.depth;)K.pop();K.length&&A.get(K[K.length-1].id).push(j.id),K.push(j)}const P=new Map(E.map(j=>[j.id,j])),J=new Map(B.map(j=>[j.id,j]));for(const[,j]of A){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 W=j.filter(D=>hr(P.get(D)?.name??""));for(const D of j){const X=J.get(D),$e=P.get(D);if(!(!X||!$e||X.suggestedFrom==="label")){if(hr($e.name)){const It=(A.get(D)??[]).map(gs=>P.get(gs)?.name??"").filter(Boolean),ps=W.indexOf(D);X.name=Pa(It,ps,W.length),X.suggestedFrom="element-type"}else if((ke.get($e.name)??0)===1){const It=La[$e.name];It&&(X.name=It,X.suggestedFrom="element-type")}}}}}Q(s,B,!0)});function _(E){if(E.key==="Escape"){t.onClose?.();return}g(a)&&E.target instanceof Node&&g(a).contains(E.target)&&E.key==="Enter"&&(E.target?.tagName==="INPUT"||E.target?.tagName==="SELECT")&&(E.preventDefault(),b())}let v=null;function b(){const E=At(g(s)[0]?.name??""),B=ka(E);if(!B.ok){Q(l,{kind:"error",message:B.reason},!0);return}const A=Aa({rootId:t.rootId,rows:g(s),mode:g(r),syncLabels:g(i)});A.ok?(Q(l,{kind:"success",message:`Applied to ${A.count} element${A.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):Q(l,{kind:"error",message:A.error},!0)}qr(()=>()=>{v&&clearTimeout(v)});var p=rl();Ko("keydown",xr,_);var m=jt(p),w=L(m),C=L(w),T=R(L(C)),H=L(T),ee=R(C,2),Y=R(w,2),_e=L(Y),ye=R(L(_e),2),q=L(ye);q.value=q.__value="add";var ct=R(q);ct.value=ct.__value="rename";var je=R(ct);je.value=je.__value="replace";var $t=R(je);$t.value=$t.__value="modifier";var En=R($t);En.value=En.__value="migrate";var Sn=R(_e,2),Cn=L(Sn),en=R(Y,2),ir=L(en),xn=R(en,2);{var An=E=>{var B=nl();let A;var K=L(B);{var P=W=>{var D=Wo("No migratable style keys found on any included element. Apply will attach empty classes.");z(W,D)},J=W=>{var D=el(),X=R(jt(D)),$e=L(X),It=R(X);se(()=>{ce($e,g(u).willMigrate),ce(It,` style key${g(u).willMigrate===1?"":"s"} into new classes.`)}),z(W,D)};ie(K,W=>{g(u).willMigrate===0?W(P):W(J,-1)})}var j=R(K,2);{var ke=W=>{var D=tl(),X=L(D);se(()=>ce(X,`${g(u).willSkip??""} key${g(u).willSkip===1?"":"s"} not on the allowlist will stay on the element.`)),z(W,D)};ie(j,W=>{g(u).willSkip>0&&W(ke)})}se(()=>A=Wr(B,1,"rebemer-panel__notice",null,A,{"rebemer-panel__notice--warn":g(u).willSkip>0||g(u).willMigrate===0})),z(E,B)};ie(xn,E=>{g(u)&&E(An)})}var Tn=R(xn,2);os(Tn,23,()=>g(s),E=>E.id,(E,B,A)=>{{let K=be(()=>g(B).id===t.rootId),P=be(()=>g(d).get(g(B).id)??"");Za(E,{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(A)]},set row(J){g(s)[g(A)]=J}})}});var sr=R(Tn,2),Mn=L(sr),y=R(Mn,2);fa(m,E=>Q(a,E),()=>g(a));var F=R(m,2);{var we=E=>{$a(E,{get kind(){return g(l).kind},get message(){return g(l).message},onDismiss:()=>{Q(l,null)}})};ie(F,E=>{g(l)&&E(we)})}se(()=>{ce(H,g(h)),Cn.disabled=g(r)==="modifier",ce(ir,n[g(r)])}),lt("click",ee,()=>t.onClose?.()),ia(ye,()=>g(r),E=>Q(r,E)),ls(Cn,()=>g(i),E=>Q(i,E)),lt("click",Mn,()=>t.onClose?.()),lt("click",y,b),z(e,p),yn()}er(["click"]);const di="#bricks-structure",sl="li[data-id]",hi="slashed-rebemer-host",ol=400,al=25,rr=(e,...t)=>console[e]("[reBEMer]",...t),vs=new AbortController,{signal:Vr}=vs,Tt=new Map;let on=null;function ll(){let e=document.getElementById(hi);return e||(e=document.createElement("div"),e.id=hi,document.body.appendChild(e)),e}function _i(){let e=0;const t=()=>{if(!Vr.aborted){if(ha()){fl();return}if(++e>=al){rr("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(t,ol)}};t()}function fl(){const e=document.querySelector(di);if(e){vi(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(di);n&&(t.disconnect(),vi(n))});t.observe(document.body,{childList:!0,subtree:!0}),Vr.addEventListener("abort",()=>t.disconnect(),{once:!0})}function vi(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,pi(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),Vr.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),pi(e)}function pi(e){for(const[n,r]of Tt)if(!r.host.isConnected){try{tr(r.instance)}catch(i){rr("warn","badge unmount failed",i)}Tt.delete(n)}const t=e.querySelectorAll(sl);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const i=Tt.get(r);i&&i.host.isConnected&&n.contains(i.host)||ul(n)}}function ul(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():"",l=ss(ba,{target:i,props:{elementId:t,label:o,onActivate:cl}}),a=Tt.get(t);if(a){try{tr(a.instance)}catch(c){rr("warn","badge remount cleanup failed",c)}a.host.isConnected&&a.host.remove()}Tt.set(t,{instance:l,host:i})}function cl(e){Nr();const t=document.createElement("div");ll().appendChild(t),on={instance:ss(il,{target:t,props:{rootId:e,onClose:Nr}}),node:t}}function Nr(){if(on){try{tr(on.instance)}catch(e){rr("warn","panel unmount failed",e)}on.node.remove(),on=null}}window.addEventListener("beforeunload",()=>{vs.abort(),Nr();for(const{instance:e}of Tt.values())try{tr(e)}catch{}Tt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_i,{once:!0}):_i(); + creating a duplicate.`,1),ua=V('

'),ca=V(' '),da=V('Migrate: ',1),ha=V('No migratable keys on this element.'),_a=V(' '),va=V('
'),pa=V('
');function ga(e,t){En(t,!0);let n=dn(t,"row",15),r=dn(t,"globalClasses",19,()=>[]),i=dn(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=L(_),p=L(b),m=N(b,2),w=L(m),C=L(w),T=N(w,2),H=L(T),ee=N(T,2);{var Y=y=>{var F=na();se(()=>Tt(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=N(m,2),ye=L(_e),q=L(ye);{var ht=y=>{var F=ra(),we=L(F);se(()=>ce(we,g(l))),W(y,F)};ie(q,y=>{g(l)&&y(ht)})}var je=N(q,2),tn=N(ye,2);{var An=y=>{var F=ia();se(()=>F.disabled=!n().include),ft("input",F,u),_i(F,()=>n().modifier,we=>n(n().modifier=we,!0)),W(y,F)};ie(tn,y=>{g(s)&&y(An)})}var Tn=N(_e,2);{var On=y=>{var F=sa();W(y,F)};ie(Tn,y=>{g(s)&&n().include&&!n().modifier&&y(On)})}var nn=N(Tn,2);{var cr=y=>{var F=oa();W(y,F)},Mn=y=>{var F=la(),we=L(F);se(()=>ce(we,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),W(y,F)};ie(nn,y=>{g(a)&&n().include&&n().currentClassCount===0?y(cr):g(a)&&n().include&&n().currentClassCount>1&&y(Mn,1)})}var In=N(nn,2);{var Nn=y=>{var F=ua(),we=L(F);{var E=A=>{var K=aa(),P=N(qt(K)),J=L(P);se(()=>ce(J,i())),W(A,K)},B=A=>{var K=fa(),P=N(qt(K)),J=L(P);se(()=>ce(J,i())),W(A,K)};ie(we,A=>{g(o)?A(E):A(B,-1)})}W(y,F)};ie(In,y=>{g(h)&&y(Nn)})}var dr=N(In,2);{var Rn=y=>{var F=va(),we=L(F);{var E=P=>{var J=da(),j=N(qt(J),2);_s(j,17,()=>n().migrateKeys,il,(ke,G)=>{var D=ca(),X=L(D);se(et=>{Tt(D,"title",`Will be lifted into ${(i()||"the new class")??""}`),ce(X,et)},[()=>d(g(G))]),W(ke,D)}),W(P,J)},B=P=>{var J=ha();W(P,J)};ie(we,P=>{n().migrateKeys?.length?P(E):P(B,-1)})}var A=N(we,2);{var K=P=>{var J=_a(),j=L(J);se(()=>ce(j,`${n().skippedKeys.length??""} skipped`)),W(P,J)};ie(A,P=>{n().skippedKeys?.length&&P(K)})}W(y,F)};ie(dr,y=>{g(o)&&n().include&&y(Rn)})}se(y=>{v=ti(_,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":g(c)}),ul(_,`--rebemer-row-depth: ${n().depth??0??""}`),ce(C,n().originalLabel),ce(H,y),Tt(je,"placeholder",t.isRoot?"block-name":"element-name"),je.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),ps(p,()=>n().include,y=>n(n().include=y,!0)),ft("input",je,u),_i(je,()=>n().name,y=>n(n().name=y,!0)),W(e,_),Sn()}lr(["input"]);var ma=V(" ");function ba(e,t){En(t,!0);let n=dn(t,"kind",3,"info"),r=dn(t,"duration",3,3e3),i=oe(!0);Xr(()=>{if(!g(i)||r()<=0)return;const c=setTimeout(()=>{Q(i,!1),t.onDismiss?.()},r());return()=>clearTimeout(c)});const s=be(()=>n()==="error"?"alert":"status");var o=tl(),a=qt(o);{var l=c=>{var h=ma(),u=L(h);se(()=>{ti(h,1,`rebemer-toast rebemer-toast--${n()??""}`),Tt(h,"role",g(s)),Tt(h,"aria-live",n()==="error"?"assertive":"polite"),ce(u,t.message)}),ft("click",h,()=>{Q(i,!1),t.onDismiss?.()}),W(c,h)};ie(a,c=>{g(i)&&c(l)})}W(e,o),Sn()}lr(["click"]);var ya=V("Will migrate ",1),wa=V(' '),ka=V(''),Ea=V(' ',1);function Sa(e,t){En(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(ot([])),o=oe(ot([])),a=oe(null),l=oe(null);const c=be(()=>Ot(g(s)[0]?.name??"")),h=be(()=>g(s)[0]?.originalLabel??""),u=be(()=>{if(g(r)!=="migrate")return null;let E=0,B=0;for(const A of g(s))A.include&&(E+=A.migrateKeys?.length??0,B+=A.skippedKeys?.length??0);return{willMigrate:E,willSkip:B}}),d=be(()=>{if(g(s).length===0)return new Map;const E=ys({rootId:t.rootId,rows:g(s),mode:g(r)}),B=new Map;if(!E.ok)return B;for(const A of E.ops)B.set(A.row.id,A.finalClass);return B});ml(()=>{const E=Sl(t.rootId);Q(o,bs().slice(),!0);const B=E.map((A,K)=>{const P=K===0,J=A.label||"",j=Ot(J),ke=A.name||"";let G,D;return j?(G=j,D="label"):P?(G="block",D="fallback"):ke&&!yr(ke)?(G=$l(ke,"item"),D="element-type"):(G="item",D="fallback"),{id:A.id,depth:A.depth,bricksType:ke,originalLabel:J||(P?"block":"element"),name:G,modifier:"",include:!0,suggestedFrom:D,migrateKeys:Wl(A.settings),skippedKeys:Ul(A.settings),currentClassCount:Array.isArray(A.settings?._cssGlobalClasses)?A.settings._cssGlobalClasses.filter(X=>typeof X=="string"&&X.length>0).length:0}});if(B.length>1){const A=new Map(E.map(j=>[j.id,[]])),K=[];for(const j of E){for(;K.length&&K[K.length-1].depth>=j.depth;)K.pop();K.length&&A.get(K[K.length-1].id).push(j.id),K.push(j)}const P=new Map(E.map(j=>[j.id,j])),J=new Map(B.map(j=>[j.id,j]));for(const[,j]of A){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=>yr(P.get(D)?.name??""));for(const D of j){const X=J.get(D),et=P.get(D);if(!(!X||!et||X.suggestedFrom==="label")){if(yr(et.name)){const Pt=(A.get(D)??[]).map(Cs=>P.get(Cs)?.name??"").filter(Boolean),Ss=G.indexOf(D);X.name=ta(Pt,Ss,G.length),X.suggestedFrom="element-type"}else if((ke.get(et.name)??0)===1){const Pt=ea[et.name];Pt&&(X.name=Pt,X.suggestedFrom="element-type")}}}}}Q(s,B,!0)});function _(E){if(E.key==="Escape"){t.onClose?.();return}g(l)&&E.target instanceof Node&&g(l).contains(E.target)&&E.key==="Enter"&&(E.target?.tagName==="INPUT"||E.target?.tagName==="SELECT")&&(E.preventDefault(),b())}let v=null;function b(){const E=Ot(g(s)[0]?.name??""),B=Kl(E);if(!B.ok){Q(a,{kind:"error",message:B.reason},!0);return}const A=Vl({rootId:t.rootId,rows:g(s),mode:g(r),syncLabels:g(i)});A.ok?(Q(a,{kind:"success",message:`Applied to ${A.count} element${A.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):Q(a,{kind:"error",message:A.error},!0)}Xr(()=>()=>{v&&clearTimeout(v)});var p=Ea();Xo("keydown",Rr,_);var m=qt(p),w=L(m),C=L(w),T=N(L(C)),H=L(T),ee=N(C,2),Y=N(w,2),_e=L(Y),ye=N(L(_e),2),q=L(ye);q.value=q.__value="add";var ht=N(q);ht.value=ht.__value="rename";var je=N(ht);je.value=je.__value="replace";var tn=N(je);tn.value=tn.__value="modifier";var An=N(tn);An.value=An.__value="migrate";var Tn=N(_e,2),On=L(Tn),nn=N(Y,2),cr=L(nn),Mn=N(nn,2);{var In=E=>{var B=ka();let A;var K=L(B);{var P=G=>{var D=el("No migratable style keys found on any included element. Apply will attach empty classes.");W(G,D)},J=G=>{var D=ya(),X=N(qt(D)),et=L(X),Pt=N(X);se(()=>{ce(et,g(u).willMigrate),ce(Pt,` 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=N(K,2);{var ke=G=>{var D=wa(),X=L(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(()=>A=ti(B,1,"rebemer-panel__notice",null,A,{"rebemer-panel__notice--warn":g(u).willSkip>0||g(u).willMigrate===0})),W(E,B)};ie(Mn,E=>{g(u)&&E(In)})}var Nn=N(Mn,2);_s(Nn,23,()=>g(s),E=>E.id,(E,B,A)=>{{let K=be(()=>g(B).id===t.rootId),P=be(()=>g(d).get(g(B).id)??"");ga(E,{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(A)]},set row(J){g(s)[g(A)]=J}})}});var dr=N(Nn,2),Rn=L(dr),y=N(Rn,2);gl(m,E=>Q(l,E),()=>g(l));var F=N(m,2);{var we=E=>{ba(E,{get kind(){return g(a).kind},get message(){return g(a).message},onDismiss:()=>{Q(a,null)}})};ie(F,E=>{g(a)&&E(we)})}se(()=>{ce(H,g(h)),On.disabled=g(r)==="modifier",ce(cr,n[g(r)])}),ft("click",ee,()=>t.onClose?.()),dl(ye,()=>g(r),E=>Q(r,E)),ps(On,()=>g(i),E=>Q(i,E)),ft("click",Rn,()=>t.onClose?.()),ft("click",y,b),W(e,p),Sn()}lr(["click"]);const yi="#bricks-structure",Ca="li[data-id]",wi="slashed-rebemer-host",xa=400,Aa=25,ur=(e,...t)=>console[e]("[reBEMer]",...t),Es=new AbortController,{signal:Qn}=Es,Mt=new Map;let an=null;function Ta(){let e=document.getElementById(wi);return e||(e=document.createElement("div"),e.id=wi,document.body.appendChild(e)),e}function ki(){const e=window.slashedBricksEditor;e&&typeof e=="object"&&Dl(e.showClassHints,e.classHints,{signal:Qn});let t=0;const n=()=>{if(!Qn.aborted){if(wl()){Oa();return}if(++t>=Aa){ur("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(n,xa)}};n()}function Oa(){const e=document.querySelector(yi);if(e){Ei(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(yi);n&&(t.disconnect(),Ei(n))});t.observe(document.body,{childList:!0,subtree:!0}),Qn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function Ei(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,Si(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),Qn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),Si(e)}function Si(e){for(const[n,r]of Mt)if(!r.host.isConnected){try{ar(r.instance)}catch(i){ur("warn","badge unmount failed",i)}Mt.delete(n)}const t=e.querySelectorAll(Ca);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const i=Mt.get(r);i&&i.host.isConnected&&n.contains(i.host)||Ma(n)}}function Ma(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=hs(jl,{target:i,props:{elementId:t,label:o,onActivate:Ia}}),l=Mt.get(t);if(l){try{ar(l.instance)}catch(c){ur("warn","badge remount cleanup failed",c)}l.host.isConnected&&l.host.remove()}Mt.set(t,{instance:a,host:i})}function Ia(e){Hr();const t=document.createElement("div");Ta().appendChild(t),an={instance:hs(Sa,{target:t,props:{rootId:e,onClose:Hr}}),node:t}}function Hr(){if(an){try{ar(an.instance)}catch(e){ur("warn","panel unmount failed",e)}an.node.remove(),an=null}}window.addEventListener("beforeunload",()=>{Es.abort(),Hr(),zn();for(const{instance:e}of Mt.values())try{ar(e)}catch{}Mt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ki,{once:!0}):ki(); //# sourceMappingURL=app.js.map diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js new file mode 100644 index 00000000..4c310f35 --- /dev/null +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js @@ -0,0 +1,270 @@ +/** + * Class documentation hints for the Bricks builder. + * + * When the "Show class hints" plugin setting is enabled, hovering a + * SLASHED class name inside the Bricks UI (the element's CSS-class list + * in the settings panel, the class autocomplete dropdown, or the global + * class manager) shows a small styled tooltip describing what the class + * does, plus its category. + * + * Design notes — why this looks the way it does: + * + * - **Scoped, not body-wide.** A single delegated `mouseover` listener + * is cheap, but acting on *every* hovered node on the page is not: + * it risks tagging unrelated text and fighting Bricks' own DOM. We + * only react when the hovered node sits inside a known Bricks panel + * container (see `BRICKS_CONTAINERS`) and never inside our own + * reBEMer host. + * + * - **Exact match on a known key only.** `resolveClassName()` rejects + * anything that isn't a single `sf-*` / `is-*` token present in the + * hint map. Because container rows carry lots of text, multi-word + * `textContent` is rejected outright — so climbing a few ancestors + * to find the label wrapper can't accidentally match a big row. + * + * - **Styled tooltip, not the native `title` attribute.** `title` is + * slow to appear, unstyled, and mutating Bricks' nodes is invasive. + * We render our own element into the reBEMer host so it inherits the + * panel theme and never touches Bricks' DOM. + * + * - **Graceful degradation.** If Bricks restructures and none of the + * known containers exist, the feature simply does nothing — matching + * the rest of the integration's "bail out silently" philosophy. + * + * @module class-hints + */ + +const HOST_ID = 'slashed-rebemer-host'; +const TOOLTIP_ID = 'slashed-class-hint'; + +// Containers inside which a hovered class name is worth a tooltip. The +// element settings panel (`#bricks-panel`) holds the per-element class +// list and the class autocomplete; the global class manager renders its +// own popup. Listed defensively — extras cost nothing and missing ones +// just mean no hint in that region. +const BRICKS_CONTAINERS = [ + '#bricks-panel', + '.bricks-class-manager', + '#bricks-class-manager', + '[data-control="cssClasses"]', +]; + +// How many ancestors to climb from the hovered node looking for the +// element that wholly represents a single class label. Bricks wraps the +// class text in a span/li; the pointer often lands on that text node's +// element directly, occasionally on a child glyph. Three is plenty. +const MAX_CLIMB = 3; + +/** + * Resolve a raw text string to a hint, or null. + * + * Pure and DOM-free so it can be unit tested with `node --test`. + * Accepts the visible label of a class (with or without a leading dot), + * and returns the matching hint enriched with the resolved `name`, or + * `null` when the text is not a single known `sf-*` / `is-*` class. + * + * @param {string} raw - Candidate text (e.g. ".sf-stack" or "sf-stack"). + * @param {Record} hints + * @returns {{ name: string, description: string, category: string } | null} + */ +export function resolveClassName(raw, hints) { + if (!raw || !hints) return null; + + let token = String(raw).trim(); + if (!token) return null; + + // A single class label has no internal whitespace. Rejecting + // multi-token strings is what keeps us from matching whole rows. + if (/\s/.test(token)) return null; + + // Strip a single leading dot (class lists sometimes render ".sf-x"). + if (token[0] === '.') token = token.slice(1); + + if (!token.startsWith('sf-') && !token.startsWith('is-')) return null; + + if (!Object.prototype.hasOwnProperty.call(hints, token)) return null; + + const hint = hints[token]; + if (!hint || typeof hint.description !== 'string') return null; + + return { name: token, description: hint.description, category: hint.category }; +} + +// ----- DOM glue (only runs in the browser) --------------------------- + +let _enabled = false; +let _hints = {}; +let _tooltip = null; +let _controller = null; +let _currentTarget = null; + +function ensureTooltip() { + if (_tooltip && _tooltip.isConnected) return _tooltip; + + let host = document.getElementById(HOST_ID); + if (!host) { + host = document.createElement('div'); + host.id = HOST_ID; + document.body.appendChild(host); + } + + const el = document.createElement('div'); + el.id = TOOLTIP_ID; + el.className = 'rebemer-class-hint'; + el.setAttribute('role', 'tooltip'); + el.hidden = true; + el.innerHTML = + '' + + '' + + '

'; + host.appendChild(el); + + _tooltip = el; + return el; +} + +/** + * Walk up from the hovered node to find the element that represents a + * single known class, returning `{ el, hint }` or null. + * + * @param {Element|null} start + * @returns {{ el: Element, hint: { name: string, description: string, category: string } } | null} + */ +function findHintTarget(start) { + let el = start; + for (let depth = 0; el && depth < MAX_CLIMB; depth++) { + if (el.nodeType === 1) { + const hint = resolveClassName(el.textContent, _hints); + if (hint) return { el, hint }; + } + el = el.parentElement; + } + return null; +} + +function position(el, target) { + const r = target.getBoundingClientRect(); + // Measure after making it visible-but-transparent so width/height read. + const tw = el.offsetWidth; + const th = el.offsetHeight; + const gap = 8; + const vw = document.documentElement.clientWidth; + const vh = document.documentElement.clientHeight; + + // Prefer below the target; flip above if it would overflow the viewport. + let top = r.bottom + gap; + if (top + th > vh && r.top - gap - th >= 0) top = r.top - gap - th; + + // Left-align to the target, clamped into the viewport. + let left = r.left; + if (left + tw > vw - 4) left = Math.max(4, vw - 4 - tw); + if (left < 4) left = 4; + + el.style.top = `${Math.round(top)}px`; + el.style.left = `${Math.round(left)}px`; +} + +function show(target, hint) { + const el = ensureTooltip(); + el.querySelector('.rebemer-class-hint__name').textContent = `.${hint.name}`; + const cat = el.querySelector('.rebemer-class-hint__cat'); + cat.textContent = hint.category || ''; + cat.hidden = !hint.category; + el.querySelector('.rebemer-class-hint__desc').textContent = hint.description; + + el.hidden = false; + position(el, target); + _currentTarget = target; +} + +function hide() { + if (_tooltip) _tooltip.hidden = true; + _currentTarget = null; +} + +function onMouseOver(event) { + const target = event.target; + if (!(target instanceof Element)) return; + + // Never react to our own UI. + if (target.closest(`#${HOST_ID}`)) return; + + // Only inside known Bricks panel regions. + if (!target.closest(BRICKS_CONTAINERS.join(','))) { + if (_currentTarget) hide(); + return; + } + + const match = findHintTarget(target); + if (!match) { + if (_currentTarget) hide(); + return; + } + if (match.el === _currentTarget) return; // already showing for this node + show(match.el, match.hint); +} + +function onMouseOut(event) { + if (!_currentTarget) return; + // Hide only when the pointer truly leaves the labelled element. + const to = event.relatedTarget; + if (to instanceof Node && _currentTarget.contains(to)) return; + hide(); +} + +function onKeyDown(event) { + if (event.key === 'Escape') hide(); +} + +/** + * Initialise class hints. + * + * Safe to call when disabled (no-ops) and idempotent (a second call + * tears down the first). Pass an `AbortSignal` to have the listeners + * removed automatically when the host aborts, matching how the reBEMer + * entry point manages its own lifecycle. + * + * @param {boolean} enabled + * @param {Record} hints + * @param {{ signal?: AbortSignal }} [options] + */ +export function init(enabled, hints, options = {}) { + destroy(); + + _enabled = !!enabled; + _hints = hints && typeof hints === 'object' ? hints : {}; + if (!_enabled || Object.keys(_hints).length === 0) return; + + _controller = new AbortController(); + const { signal } = _controller; + const opts = { passive: true, signal }; + + document.addEventListener('mouseover', onMouseOver, opts); + document.addEventListener('mouseout', onMouseOut, opts); + document.addEventListener('keydown', onKeyDown, opts); + // The tooltip is anchored to a fixed viewport position; hide it on + // scroll rather than chase a moving target. + window.addEventListener('scroll', hide, { capture: true, passive: true, signal }); + + if (options.signal) { + if (options.signal.aborted) destroy(); + else options.signal.addEventListener('abort', destroy, { once: true }); + } +} + +/** + * Tear down listeners and remove the tooltip element. + */ +export function destroy() { + if (_controller) { + _controller.abort(); + _controller = null; + } + if (_tooltip) { + _tooltip.remove(); + _tooltip = null; + } + _currentTarget = null; + _enabled = false; + _hints = {}; +} 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 a94d6b22..ca20ae92 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 @@ -18,6 +18,7 @@ */ import { mount, unmount } from 'svelte'; import * as api from './lib/bricks-api.js'; +import * as classHints from './lib/class-hints.js'; import BemBadge from './components/BemBadge.svelte'; import BemPanel from './components/BemPanel.svelte'; import './styles/panel.css'; @@ -51,6 +52,15 @@ function ensureHost() { } 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; + if (cfg && typeof cfg === 'object') { + classHints.init(cfg.showClassHints, cfg.classHints, { signal }); + } + let attempts = 0; const tryProbe = () => { if (signal.aborted) return; @@ -226,6 +236,7 @@ function closePanel() { window.addEventListener('beforeunload', () => { controller.abort(); closePanel(); + classHints.destroy(); for (const { instance } of badgeInstances.values()) { try { unmount(instance); } catch { /* ignore */ } } 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 d88fbf45..0366aeee 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 @@ -322,3 +322,34 @@ li[data-id]:focus-within > .rebemer-badge-host { .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 rgba(0,0,0,.4); } .rebemer-toast--success { border-color: var(--rebemer-success); } .rebemer-toast--error { border-color: var(--rebemer-error); color: var(--rebemer-error); } + +/* Class hint tooltip — shown on hover over a SLASHED class in the + Bricks settings panel / class manager. Positioned imperatively + (fixed top/left set in class-hints.js); styling only here. */ +.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 rgba(0, 0, 0, .5); + 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); } diff --git a/tests/class-hints.test.js b/tests/class-hints.test.js new file mode 100644 index 00000000..61aaca25 --- /dev/null +++ b/tests/class-hints.test.js @@ -0,0 +1,67 @@ +/** + * Unit tests for resolveClassName (node:test, no browser needed). + * + * Run: node --test tests/class-hints.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 { resolveClassName } from '../plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js'; + +const HINTS = { + 'sf-stack': { description: 'Flex column with even spacing.', category: 'Layout' }, + 'sf-stack--xl': { description: 'Flex column with even spacing.', category: 'Layout' }, + 'is-hidden': { description: 'Hides the element.', category: 'States' }, +}; + +describe('resolveClassName', () => { + test('plain sf- class resolves', () => { + assert.deepEqual(resolveClassName('sf-stack', HINTS), { + name: 'sf-stack', description: 'Flex column with even spacing.', category: 'Layout', + }); + }); + + test('leading dot is stripped', () => { + assert.equal(resolveClassName('.sf-stack', HINTS)?.name, 'sf-stack'); + }); + + test('surrounding whitespace is trimmed', () => { + assert.equal(resolveClassName(' sf-stack ', HINTS)?.name, 'sf-stack'); + }); + + test('modifier class resolves on its own key', () => { + assert.equal(resolveClassName('sf-stack--xl', HINTS)?.name, 'sf-stack--xl'); + }); + + test('is- state class resolves', () => { + assert.equal(resolveClassName('is-hidden', HINTS)?.category, 'States'); + }); + + test('unknown class returns null', () => { + assert.equal(resolveClassName('sf-nope', HINTS), null); + }); + + test('non-sf/is prefix returns null', () => { + assert.equal(resolveClassName('container', HINTS), null); + }); + + test('multi-token strings (whole rows) return null', () => { + assert.equal(resolveClassName('sf-stack and more text', HINTS), null); + assert.equal(resolveClassName('Section sf-stack', HINTS), null); + }); + + test('empty / nullish input returns null', () => { + assert.equal(resolveClassName('', HINTS), null); + assert.equal(resolveClassName(null, HINTS), null); + assert.equal(resolveClassName(undefined, HINTS), null); + }); + + test('missing hints map returns null', () => { + assert.equal(resolveClassName('sf-stack', null), null); + }); + + test('inherited Object prototype keys are not treated as hints', () => { + assert.equal(resolveClassName('toString', HINTS), null); + assert.equal(resolveClassName('sf-constructor', HINTS), null); + }); +}); From db69f7dcef489825b1e0ea3840bfeb0ae74065dd Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 07:28:16 +0000 Subject: [PATCH 2/2] feat(bricks): show class hints for keyboard focus, not just hover Mirror the mouseover/mouseout handlers with focusin/focusout so users navigating the Bricks class list via keyboard get the same tooltip. Reuses findHintTarget/show/hide and the existing container scoping. Addresses CodeRabbit review on #180. Co-Authored-By: Jack Granatowski --- .../bricks/assets/editor-app/app.js | 8 +++--- .../bricks/editor-app/src/lib/class-hints.js | 28 +++++++++++++++++++ 2 files changed, 32 insertions(+), 4 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 3238a8af..8316e0a3 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,7 @@ -var xs=Object.defineProperty;var ni=e=>{throw TypeError(e)};var As=(e,t,n)=>t in e?xs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>As(e,typeof t!="symbol"?t+"":t,n),hr=(e,t,n)=>t.has(e)||ni("Cannot "+n);var f=(e,t,n)=>(hr(e,t,"read from private field"),n?n.call(e):t.get(e)),S=(e,t,n)=>t.has(e)?ni("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),k=(e,t,n,r)=>(hr(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),I=(e,t,n)=>(hr(e,t,"access private method"),n);var Kr=Array.isArray,Ts=Array.prototype.indexOf,Et=Array.prototype.includes,nr=Array.from,Os=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,Ms=Object.getOwnPropertyDescriptors,Is=Object.prototype,Ns=Array.prototype,xi=Object.getPrototypeOf,ri=Object.isExtensible;const Rs=()=>{};function Ls(e){for(var t=0;t{e=r,t=i});return{promise:n,resolve:e,reject:t}}const ne=2,Yt=4,rr=8,Ti=1<<24,Pe=16,Be=32,dt=64,wr=128,Oe=512,$=1024,te=2048,ze=4096,le=8192,Me=16384,Lt=32768,kr=1<<25,Jt=65536,Un=1<<17,Ps=1<<18,$t=1<<19,Ds=1<<20,We=1<<25,It=65536,Gn=1<<21,Ht=1<<22,lt=1<<23,St=Symbol("$state"),Fs=Symbol("legacy props"),Bs=Symbol(""),Fn=Symbol("attributes"),Er=Symbol("class"),Sr=Symbol("style"),sn=Symbol("text"),Bn=Symbol("form reset"),ir=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 js(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Hs(){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 Ks(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ws(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function zs(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Us(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Gs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Vs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ys(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Js(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Xs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Zs=1,Qs=2,Oi=4,$s=8,eo=16,to=1,no=4,ro=8,io=16,so=1,oo=2,Z=Symbol("uninitialized"),Mi="http://www.w3.org/1999/xhtml";function lo(){console.warn("https://svelte.dev/e/derived_inert")}function ao(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function fo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ii(e){return e===this.v}function uo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ni(e){return!uo(e,this.v)}let he=null;function Xt(e){he=e}function En(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,r:M,l:null}}function Sn(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)$i(r)}return t.i=!0,he=t.p,{}}function Ri(){return!0}let _t=[];function Li(){var e=_t;_t=[],Ls(e)}function at(e){if(_t.length===0&&!fn){var t=_t;queueMicrotask(()=>{t===_t&&Li()})}_t.push(e)}function co(){for(;_t.length>0;)Li()}function Pi(e){var t=M;if(t===null)return O.f|=lt,e;if((t.f&Lt)===0&&(t.f&Yt)===0)throw e;st(e,t)}function st(e,t){for(;t!==null;){if((t.f&wr)!==0){if((t.f&Lt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const ho=-7169;function z(e,t){e.f=e.f&ho|t}function Wr(e){(e.f&Oe)!==0||e.deps===null?z(e,$):z(e,ze)}function Di(e){if(e!==null)for(const t of e)(t.f&ne)===0||(t.f&It)===0||(t.f^=It,Di(t.deps))}function Fi(e,t,n){(e.f&te)!==0?t.add(e):(e.f&ze)!==0&&n.add(e),Di(e.deps),z(e,$)}let Ln=!1;function _o(e){var t=Ln;try{return Ln=!1,[e(),Ln]}finally{Ln=t}}let _r=null,Dt=null,x=null,Cr=null,De=null,xr=null,fn=!1,vr=!1,Bt=null,jn=null;var ii=0;let vo=1;var Kt,nt,gt,Wt,zt,mt,Ut,Ve,gn,pe,mn,rt,He,qe,Gt,bt,R,Ar,on,Tr,Bi,ji,Hn,po,Or,Ft;const $n=class $n{constructor(){S(this,R);ae(this,"id",vo++);S(this,Kt,!1);ae(this,"linked",!0);S(this,nt,null);S(this,gt,null);ae(this,"async_deriveds",new Map);ae(this,"current",new Map);ae(this,"previous",new Map);ae(this,"unblocked",new Set);S(this,Wt,new Set);S(this,zt,new Set);S(this,mt,new Set);S(this,Ut,0);S(this,Ve,new Map);S(this,gn,null);S(this,pe,[]);S(this,mn,[]);S(this,rt,new Set);S(this,He,new Set);S(this,qe,new Map);S(this,Gt,new Set);ae(this,"is_fork",!1);S(this,bt,!1)}skip_effect(t){f(this,qe).has(t)||f(this,qe).set(t,{d:[],m:[]}),f(this,Gt).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=f(this,qe).get(t);if(r){f(this,qe).delete(t);for(var i of r.d)z(i,te),n(i);for(i of r.m)z(i,ze),n(i)}f(this,Gt).add(t)}capture(t,n,r=!1){t.v!==Z&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f<)===0&&(this.current.set(t,[n,r]),De?.set(t,n)),this.is_fork||(t.v=n)}activate(){x=this}deactivate(){x=null,De=null}flush(){try{vr=!0,x=this,I(this,R,on).call(this)}finally{ii=0,xr=null,Bt=null,jn=null,vr=!1,x=null,De=null,Ct.clear()}}discard(){for(const t of f(this,zt))t(this);f(this,zt).clear(),f(this,mt).clear(),I(this,R,Ft).call(this)}register_created_effect(t){f(this,mn).push(t)}increment(t,n){if(k(this,Ut,f(this,Ut)+1),t){let r=f(this,Ve).get(n)??0;f(this,Ve).set(n,r+1)}}decrement(t,n){if(k(this,Ut,f(this,Ut)-1),t){let r=f(this,Ve).get(n)??0;r===1?f(this,Ve).delete(n):f(this,Ve).set(n,r-1)}f(this,bt)||(k(this,bt,!0),at(()=>{k(this,bt,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)f(this,rt).add(r);for(const r of n)f(this,He).add(r);t.clear(),n.clear()}oncommit(t){f(this,Wt).add(t)}ondiscard(t){f(this,zt).add(t)}on_fork_commit(t){f(this,mt).add(t)}run_fork_commit_callbacks(){for(const t of f(this,mt))t(this);f(this,mt).clear()}settled(){return(f(this,gn)??k(this,gn,Ai())).promise}static ensure(){var t;if(x===null){const n=x=new $n;I(t=n,R,Or).call(t),!vr&&!fn&&at(()=>{f(n,Kt)||n.flush()})}return x}apply(){{De=null;return}}schedule(t){if(xr=t,t.b?.is_pending&&(t.f&(Yt|rr|Ti))!==0&&(t.f&Lt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Bt!==null&&n===M&&(O===null||(O.f&ne)===0))return;if((r&(dt|Be))!==0){if((r&$)===0)return;n.f^=$}}f(this,pe).push(n)}};Kt=new WeakMap,nt=new WeakMap,gt=new WeakMap,Wt=new WeakMap,zt=new WeakMap,mt=new WeakMap,Ut=new WeakMap,Ve=new WeakMap,gn=new WeakMap,pe=new WeakMap,mn=new WeakMap,rt=new WeakMap,He=new WeakMap,qe=new WeakMap,Gt=new WeakMap,bt=new WeakMap,R=new WeakSet,Ar=function(){if(this.is_fork)return!0;for(const r of f(this,Ve).keys()){for(var t=r,n=!1;t.parent!==null;){if(f(this,qe).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},on=function(){var l,c,h;if(k(this,Kt,!0),ii++>1e3&&(I(this,R,Ft).call(this),mo()),!I(this,R,Ar).call(this)){for(const u of f(this,rt))f(this,He).delete(u),z(u,te),this.schedule(u);for(const u of f(this,He))z(u,ze),this.schedule(u)}const t=f(this,pe);k(this,pe,[]),this.apply();var n=Bt=[],r=[],i=jn=[];for(const u of t)try{I(this,R,Tr).call(this,u,n,r)}catch(d){throw Ki(u),d}if(x=null,i.length>0){var s=$n.ensure();for(const u of i)s.schedule(u)}if(Bt=null,jn=null,I(this,R,Ar).call(this)){I(this,R,Hn).call(this,r),I(this,R,Hn).call(this,n);for(const[u,d]of f(this,qe))qi(u,d);i.length>0&&I(l=x,R,on).call(l);return}const o=I(this,R,Bi).call(this);if(o){I(c=o,R,ji).call(c,this);return}f(this,rt).clear(),f(this,He).clear();for(const u of f(this,Wt))u(this);f(this,Wt).clear(),Cr=this,si(r),si(n),Cr=null,f(this,gn)?.resolve();var a=x;if(this.linked&&f(this,Ut)===0&&I(this,R,Ft).call(this),f(this,pe).length>0){a===null&&(a=this,I(this,R,Or).call(this));const u=a;f(u,pe).push(...f(this,pe).filter(d=>!f(u,pe).includes(d)))}a!==null&&I(h=a,R,on).call(h)},Tr=function(t,n,r){t.f^=$;for(var i=t.first;i!==null;){var s=i.f,o=(s&(Be|dt))!==0,a=o&&(s&$)!==0,l=a||(s&le)!==0||f(this,qe).has(i);if(!l&&i.fn!==null){o?i.f^=$:(s&Yt)!==0?n.push(i):xn(i)&&((s&Pe)!==0&&f(this,He).add(i),Qt(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}}},Bi=function(){for(var t=f(this,nt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=f(t,nt)}return null},ji=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|Pe)&&!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()),I(r=t,R,Ft).call(r),x=this,I(this,R,on).call(this)},Hn=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,Gt))u.unskip_effect(d,_=>{var v;(_.f&(Pe|Ht))!==0?u.schedule(_):I(v=u,R,Hn).call(v,[_])});u.activate();var s=new Set,o=new Map;for(var a of n)Hi(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,mn))(d.f&(Me|le|Un))===0&&zr(d,l,o)&&((d.f&(Ht|Pe))!==0?(z(d,te),u.schedule(d)):f(u,rt).add(d));if(f(u,pe).length>0&&!f(u,bt)){u.apply();for(var c of f(u,pe))I(h=u,R,Tr).call(h,c,[],[]);k(u,pe,[])}u.deactivate()}}}},Or=function(){Dt===null?_r=Dt=this:(k(Dt,gt,this),k(this,nt,Dt)),Dt=this},Ft=function(){var t=f(this,nt),n=f(this,gt);t===null?_r=n:k(t,gt,n),n===null?Dt=t:k(n,nt,t),this.linked=!1};let Nt=$n;function go(e){var t=fn;fn=!0;try{for(var n;;){if(co(),x===null)return n;x.flush()}}finally{fn=t}}function mo(){try{Us()}catch(e){st(e,xr)}}let Ge=null;function si(e){var t=e.length;if(t!==0){for(var n=0;n0)){Ct.clear();for(const i of Ge){if((i.f&(Me|le))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)Ge.has(o)&&(Ge.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(Me|le))===0&&Qt(l)}}Ge.clear()}}Ge=null}}function Hi(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?Hi(i,t,n,r):(s&(Ht|Pe))!==0&&(s&te)===0&&zr(i,t,r)&&(z(i,te),Ur(i))}}function zr(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(Et.call(t,i))return!0;if((i.f&ne)!==0&&zr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Ur(e){x.schedule(e)}function qi(e,t){if(!((e.f&Be)!==0&&(e.f&$)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&ze)!==0&&t.m.push(e),z(e,$);for(var n=e.first;n!==null;)qi(n,t),n=n.next}}function Ki(e){z(e,$);for(var t=e.first;t!==null;)Ki(t),t=t.next}function bo(e){let t=0,n=Rt(0),r;return()=>{Yr()&&(g(n),or(()=>(t===0&&(r=en(()=>e(()=>un(n)))),t+=1,()=>{at(()=>{t-=1,t===0&&(r?.(),r=void 0,un(n))})})))}}var yo=Jt|$t;function wo(e,t,n,r){new ko(e,t,n,r)}var Se,qr,Ce,yt,fe,xe,re,ge,Ye,wt,it,Vt,bn,yn,Je,er,U,Eo,So,Co,Mr,qn,Kn,Ir,Nr;class ko{constructor(t,n,r,i){S(this,U);ae(this,"parent");ae(this,"is_pending",!1);ae(this,"transform_error");S(this,Se);S(this,qr,null);S(this,Ce);S(this,yt);S(this,fe);S(this,xe,null);S(this,re,null);S(this,ge,null);S(this,Ye,null);S(this,wt,0);S(this,it,0);S(this,Vt,!1);S(this,bn,new Set);S(this,yn,new Set);S(this,Je,null);S(this,er,bo(()=>(k(this,Je,Rt(f(this,wt))),()=>{k(this,Je,null)})));k(this,Se,t),k(this,Ce,n),k(this,yt,s=>{var o=M;o.b=this,o.f|=wr,r(s)}),this.parent=M.b,this.transform_error=i??this.parent?.transform_error??(s=>s),k(this,fe,Zr(()=>{I(this,U,Mr).call(this)},yo))}defer_effect(t){Fi(t,f(this,bn),f(this,yn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,Ce).pending}update_pending_count(t,n){I(this,U,Ir).call(this,t,n),k(this,wt,f(this,wt)+t),!(!f(this,Je)||f(this,Vt))&&(k(this,Vt,!0),at(()=>{k(this,Vt,!1),f(this,Je)&&Zt(f(this,Je),f(this,wt))}))}get_effect_pending(){return f(this,er).call(this),g(f(this,Je))}error(t){if(!f(this,Ce).onerror&&!f(this,Ce).failed)throw t;x?.is_fork?(f(this,xe)&&x.skip_effect(f(this,xe)),f(this,re)&&x.skip_effect(f(this,re)),f(this,ge)&&x.skip_effect(f(this,ge)),x.on_fork_commit(()=>{I(this,U,Nr).call(this,t)})):I(this,U,Nr).call(this,t)}}Se=new WeakMap,qr=new WeakMap,Ce=new WeakMap,yt=new WeakMap,fe=new WeakMap,xe=new WeakMap,re=new WeakMap,ge=new WeakMap,Ye=new WeakMap,wt=new WeakMap,it=new WeakMap,Vt=new WeakMap,bn=new WeakMap,yn=new WeakMap,Je=new WeakMap,er=new WeakMap,U=new WeakSet,Eo=function(){try{k(this,xe,Ae(()=>f(this,yt).call(this,f(this,Se))))}catch(t){this.error(t)}},So=function(t){const n=f(this,Ce).failed;n&&k(this,ge,Ae(()=>{n(f(this,Se),()=>t,()=>()=>{})}))},Co=function(){const t=f(this,Ce).pending;t&&(this.is_pending=!0,k(this,re,Ae(()=>t(f(this,Se)))),at(()=>{var n=k(this,Ye,document.createDocumentFragment()),r=Ze();n.append(r),k(this,xe,I(this,U,Kn).call(this,()=>Ae(()=>f(this,yt).call(this,r)))),f(this,it)===0&&(f(this,Se).before(n),k(this,Ye,null),xt(f(this,re),()=>{k(this,re,null)}),I(this,U,qn).call(this,x))}))},Mr=function(){try{if(this.is_pending=this.has_pending_snippet(),k(this,it,0),k(this,wt,0),k(this,xe,Ae(()=>{f(this,yt).call(this,f(this,Se))})),f(this,it)>0){var t=k(this,Ye,document.createDocumentFragment());ei(f(this,xe),t);const n=f(this,Ce).pending;k(this,re,Ae(()=>n(f(this,Se))))}else I(this,U,qn).call(this,x)}catch(n){this.error(n)}},qn=function(t){this.is_pending=!1,t.transfer_effects(f(this,bn),f(this,yn))},Kn=function(t){var n=M,r=O,i=he;Ue(f(this,fe)),Ne(f(this,fe)),Xt(f(this,fe).ctx);try{return Nt.ensure(),t()}catch(s){return Pi(s),null}finally{Ue(n),Ne(r),Xt(i)}},Ir=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&I(r=this.parent,U,Ir).call(r,t,n);return}k(this,it,f(this,it)+t),f(this,it)===0&&(I(this,U,qn).call(this,n),f(this,re)&&xt(f(this,re),()=>{k(this,re,null)}),f(this,Ye)&&(f(this,Se).before(f(this,Ye)),k(this,Ye,null)))},Nr=function(t){f(this,xe)&&(de(f(this,xe)),k(this,xe,null)),f(this,re)&&(de(f(this,re)),k(this,re,null)),f(this,ge)&&(de(f(this,ge)),k(this,ge,null));var n=f(this,Ce).onerror;let r=f(this,Ce).failed;var i=!1,s=!1;const o=()=>{if(i){fo();return}i=!0,s&&Xs(),f(this,ge)!==null&&xt(f(this,ge),()=>{k(this,ge,null)}),I(this,U,Kn).call(this,()=>{I(this,U,Mr).call(this)})},a=l=>{try{s=!0,n?.(l,o),s=!1}catch(c){st(c,f(this,fe)&&f(this,fe).parent)}r&&k(this,ge,I(this,U,Kn).call(this,()=>{try{return Ae(()=>{var c=M;c.b=this,c.f|=wr,r(f(this,Se),()=>l,()=>o)})}catch(c){return st(c,f(this,fe).parent),null}}))};at(()=>{var l;try{l=this.transform_error(t)}catch(c){st(c,f(this,fe)&&f(this,fe).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,c=>st(c,f(this,fe)&&f(this,fe).parent)):a(l)})};function xo(e,t,n,r){const i=_n;var s=e.filter(d=>!d.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=M,a=Ao(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function c(d){if((o.f&Me)===0){a();try{r(d)}catch(_){st(_,o)}Vn()}}var h=Wi();if(n.length===0){l.then(()=>c(t.map(i))).finally(h);return}function u(){Promise.all(n.map(d=>To(d))).then(d=>c([...t.map(i),...d])).catch(d=>st(d,o)).finally(h)}l?l.then(()=>{a(),u(),Vn()}):u()}function Ao(){var e=M,t=O,n=he,r=x;return function(s=!0){Ue(e),Ne(t),Xt(n),s&&(e.f&Me)===0&&(r?.activate(),r?.apply())}}function Vn(e=!0){Ue(null),Ne(null),Xt(null),e&&x?.deactivate()}function Wi(){var e=M,t=e.b,n=x,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 _n(e){var t=ne|te;return M!==null&&(M.f|=$t),{ctx:he,deps:null,effects:null,equals:Ii,f:t,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:M,ac:null}}const Pn=Symbol("obsolete");function To(e,t,n){let r=M;r===null&&Hs();var i=void 0,s=Rt(Z),o=!O,a=new Set;return qo(()=>{var l=M,c=Ai();i=c.promise;try{Promise.resolve(e()).then(c.resolve,_=>{_!==ir&&c.reject(_)}).finally(Vn)}catch(_){c.reject(_),Vn()}var h=x;if(o){if((l.f&Lt)!==0)var u=Wi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(Pn);else for(const _ of a.values())_.reject(Pn);a.add(c),h.async_deriveds.set(l,c)}const d=(_,v=void 0)=>{u?.(),a.delete(c),v!==Pn&&(h.activate(),v?(s.f|=lt,Zt(s,v)):((s.f<)!==0&&(s.f^=lt),Zt(s,_)),h.deactivate())};c.promise.then(d,_=>d(null,_||"unknown"))}),Jr(()=>{for(const l of a)l.reject(Pn)}),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=_n(e);return ss(t),t}function zi(e){const t=_n(e);return t.equals=Ni,t}function Oo(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!Vi&&No()}return t}function No(){Vi=!1;for(const e of Yn){(e.f&$)!==0&&z(e,ze);let t;try{t=xn(e)}catch{t=!0}t&&Qt(e)}Yn.clear()}function un(e){Q(e,e.v+1)}function Yi(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s{if(At===s)return a();var l=O,c=At;Ne(null),fi(s);var h=a();return Ne(l),fi(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)&&Vs();var h=n.get(l);return h===void 0?o(()=>{var u=oe(c.value);return n.set(l,u),u}):Q(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),un(i)}}else Q(c,Z),un(i);return!0},get(a,l,c){if(l===St)return e;var h=n.get(l),u=l in a;if(h===void 0&&(!u||jt(a,l)?.writable)&&(h=o(()=>{var _=ot(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===St)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||jt(a,l)?.writable)){c===void 0&&(c=o(()=>{var d=h?ot(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||jt(a,l)?.writable)&&(u=o(()=>oe(void 0)),Q(u,ot(c)),n.set(l,u));else{d=u.v!==Z;var b=o(()=>ot(c));Q(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&&Q(m,w+1)}un(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(){Ys()}})}function oi(e){try{if(e!==null&&typeof e=="object"&&St in e)return e[St]}catch{}return e}function Ro(e,t){return Object.is(oi(e),oi(t))}var Rr,Ji,Xi,Zi;function Lo(){if(Rr===void 0){Rr=window,Ji=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xi=jt(t,"firstChild").get,Zi=jt(t,"nextSibling").get,ri(e)&&(e[Er]=void 0,e[Fn]=null,e[Sr]=void 0,e.__e=void 0),ri(n)&&(n[sn]=void 0)}}function Ze(e=""){return document.createTextNode(e)}function Jn(e){return Xi.call(e)}function Cn(e){return Zi.call(e)}function L(e,t){return Jn(e)}function qt(e,t=!1){{var n=Jn(e);return n instanceof Comment&&n.data===""?Cn(n):n}}function N(e,t=1,n=!1){let r=e;for(;t--;)r=Cn(r);return r}function Po(e){e.textContent=""}function Qi(){return!1}function Do(e,t,n){return document.createElementNS(Mi,e,void 0)}let li=!1;function Fo(){li||(li=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Bn]?.()})},{capture:!0}))}function sr(e){var t=O,n=M;Ne(null),Ue(null);try{return e()}finally{Ne(t),Ue(n)}}function Vr(e,t,n,r=n){e.addEventListener(t,()=>sr(n));const i=e[Bn];i?e[Bn]=()=>{i(),r(!0)}:e[Bn]=()=>r(!0),Fo()}function Bo(e){M===null&&(O===null&&zs(),Ws()),Qe&&Ks()}function jo(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function $e(e,t){var n=M;n!==null&&(n.f&le)!==0&&(e|=le);var r={ctx:he,deps:null,nodes:null,f:e|te|Oe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};x?.register_created_effect(r);var i=r;if((e&Yt)!==0)Bt!==null?Bt.push(r):Nt.ensure().schedule(r);else if(t!==null){try{Qt(r)}catch(o){throw de(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&$t)===0&&(i=i.first,(e&Pe)!==0&&(e&Jt)!==0&&i!==null&&(i.f|=Jt))}if(i!==null&&(i.parent=n,n!==null&&jo(i,n),O!==null&&(O.f&ne)!==0&&(e&dt)===0)){var s=O;(s.effects??(s.effects=[])).push(i)}return r}function Yr(){return O!==null&&!Fe}function Jr(e){const t=$e(rr,null);return z(t,$),t.teardown=e,t}function Xr(e){Bo();var t=M.f,n=!O&&(t&Be)!==0&&(t&Lt)===0;if(n){var r=he;(r.e??(r.e=[])).push(e)}else return $i(e)}function $i(e){return $e(Yt|Ds,e)}function Ho(e){Nt.ensure();const t=$e(dt|$t,e);return(n={})=>new Promise(r=>{n.outro?xt(t,()=>{de(t),r(void 0)}):(de(t),r(void 0))})}function es(e){return $e(Yt,e)}function qo(e){return $e(Ht|$t,e)}function or(e,t=0){return $e(rr|t,e)}function se(e,t=[],n=[],r=[]){xo(r,t,n,i=>{$e(rr,()=>e(...i.map(g)))})}function Zr(e,t=0){var n=$e(Pe|t,e);return n}function Ae(e){return $e(Be|$t,e)}function ts(e){var t=e.teardown;if(t!==null){const n=Qe,r=O;ai(!0),Ne(null);try{t.call(null)}finally{ai(n),Ne(r)}}}function Qr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&sr(()=>{i.abort(ir)});var r=n.next;(n.f&dt)!==0?n.parent=null:de(n,t),n=r}}function Ko(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Be)===0&&de(t),t=n}}function de(e,t=!0){var n=!1;(t||(e.f&Ps)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Wo(e.nodes.start,e.nodes.end),n=!0),z(e,kr),Qr(e,t&&!n),vn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();ts(e),e.f^=kr,e.f|=Me;var i=e.parent;i!==null&&i.first!==null&&ns(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Wo(e,t){for(;e!==null;){var n=e===t?null:Cn(e);e.remove(),e=n}}function ns(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=[];rs(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 rs(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&Jt)!==0||(i.f&Be)!==0&&(e.f&Pe)!==0;rs(i,t,o?n:!1)}i=s}}}function $r(e){is(e,!0)}function is(e,t){if((e.f&le)!==0){e.f^=le,(e.f&$)===0&&(z(e,te),Nt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Jt)!==0||(n.f&Be)!==0;is(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 ei(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Cn(n);t.append(n),n=i}}let Wn=!1,Qe=!1;function ai(e){Qe=e}let O=null,Fe=!1;function Ne(e){O=e}let M=null;function Ue(e){M=e}let Ie=null;function ss(e){O!==null&&(Ie===null?Ie=[e]:Ie.push(e))}let ue=null,ve=0,Ee=null;function zo(e){Ee=e}let os=1,vt=0,At=vt;function fi(e){At=e}function ls(){return++os}function xn(e){var t=e.f;if((t&te)!==0)return!0;if(t&ne&&(e.f&=~It),(t&ze)!==0){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}(t&Oe)!==0&&De===null&&z(e,$)}return!1}function as(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ie!==null&&Et.call(Ie,e)))for(var i=0;i{e.ac.abort(ir)}),e.ac=null);try{e.f|=Gn;var h=e.fn,u=h();e.f|=Lt;var d=e.deps,_=x?.is_fork;if(ue!==null){var v;if(_||vn(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"?at(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Xo(e,t,n,r,i){var s={capture:r,passive:i},o=Jo(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Jr(()=>{t.removeEventListener(e,o,s)})}function ft(e,t,n){(t[pt]??(t[pt]={}))[e]=n}function lr(e){for(var t=0;t{throw p});throw d}}finally{e[pt]=t,delete e.currentTarget,Ne(h),Ue(u)}}}const Zo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Qo(e){return Zo?.createHTML(e)??e}function $o(e){var t=Do("template");return t.innerHTML=Qo(e.replaceAll("","")),t.content}function Xn(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&so)!==0,r=(t&oo)!==0,i,s=!e.startsWith("");return()=>{i===void 0&&(i=$o(s?e:""+e),n||(i=Jn(i)));var o=r||Ji?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=Jn(o),l=o.lastChild;Xn(a,l)}else Xn(o,o);return o}}function el(e=""){{var t=Ze(e+"");return Xn(t,t),t}}function tl(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Ze();return e.append(t,n),Xn(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[sn]??(e[sn]=e.nodeValue))&&(e[sn]=n,e.nodeValue=`${n}`)}function hs(e,t){return nl(e,t)}const Dn=new Map;function nl(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){Lo();var l=void 0,c=Ho(()=>{var h=n??t.appendChild(Ze());wo(h,{pending:()=>{}},_=>{En({});var v=he;s&&(v.c=s),i&&(r.$$events=i),l=e(_,r)||{},Sn()},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=Yo(b);for(const C of[t,document]){var m=Dn.get(C);m===void 0&&(m=new Map,Dn.set(C,m));var w=m.get(b);w===void 0?(C.addEventListener(b,Pr,{passive:p}),m.set(b,1)):m.set(b,w+1)}}}};return d(nr(ds)),Lr.add(d),()=>{for(var _ of u)for(const p of[t,document]){var v=Dn.get(p),b=v.get(_);--b==0?(p.removeEventListener(_,Pr),v.delete(_),v.size===0&&Dn.delete(p)):v.set(_,b)}Lr.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return Dr.set(l,c),l}let Dr=new WeakMap;function ar(e,t){const n=Dr.get(e);return n?(Dr.delete(e),n(t)):Promise.resolve()}var Le,Ke,me,kt,wn,kn,tr;class rl{constructor(t,n=!0){ae(this,"anchor");S(this,Le,new Map);S(this,Ke,new Map);S(this,me,new Map);S(this,kt,new Set);S(this,wn,!0);S(this,kn,t=>{if(f(this,Le).has(t)){var n=f(this,Le).get(t),r=f(this,Ke).get(n);if(r)$r(r),f(this,kt).delete(n);else{var i=f(this,me).get(n);i&&(f(this,Ke).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,Le)){if(f(this,Le).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,Ke)){if(s===n||f(this,kt).has(s))continue;const a=()=>{if(Array.from(f(this,Le).values()).includes(s)){var c=document.createDocumentFragment();ei(o,c),c.append(Ze()),f(this,me).set(s,{effect:o,fragment:c})}else de(o);f(this,kt).delete(s),f(this,Ke).delete(s)};f(this,wn)||!r?(f(this,kt).add(s),xt(o,a,!1)):a()}}});S(this,tr,t=>{f(this,Le).delete(t);const n=Array.from(f(this,Le).values());for(const[r,i]of f(this,me))n.includes(r)||(de(i.effect),f(this,me).delete(r))});this.anchor=t,k(this,wn,n)}ensure(t,n){var r=x,i=Qi();if(n&&!f(this,Ke).has(t)&&!f(this,me).has(t))if(i){var s=document.createDocumentFragment(),o=Ze();s.append(o),f(this,me).set(t,{effect:Ae(()=>n(o)),fragment:s})}else f(this,Ke).set(t,Ae(()=>n(this.anchor)));if(f(this,Le).set(r,t),i){for(const[a,l]of f(this,Ke))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,kn)),r.ondiscard(f(this,tr))}else f(this,kn).call(this,r)}}Le=new WeakMap,Ke=new WeakMap,me=new WeakMap,kt=new WeakMap,wn=new WeakMap,kn=new WeakMap,tr=new WeakMap;function ie(e,t,n=!1){var r=new rl(e),i=n?Jt:0;function s(o,a){r.ensure(o,a)}Zr(()=>{var o=!1;t((a,l=0)=>{o=!0,s(l,a)}),o||s(-1,null)},i)}function il(e,t){return t}function sl(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;Fr(e,nr(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;Po(h),h.append(c),e.items.clear()}Fr(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function Fr(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 Kr(C)?C:C==null?[]:nr(C)}),d,_=new Map,v=!0;function b(C){(w.effect.f&Me)===0&&(w.pending.delete(C),w.fallback=h,ol(w,d,o,t,r),h!==null&&(d.length===0?(h.f&We)===0?$r(h):(h.f^=We,ln(h,null,o)):xt(h,()=>{h=null})))}function p(C){w.pending.delete(C)}var m=Zr(()=>{d=g(u);for(var C=d.length,T=new Set,H=x,ee=Qi(),Y=0;Ys(o)):(h=Ae(()=>s(ci??(ci=Ze()))),h.f|=We)),C>T.size&&qs(),!v)if(_.set(H,T),ee){for(const[ht,je]of a)T.has(ht)||H.skip_effect(je.e);H.oncommit(b),H.ondiscard(p)}else b(H);g(u)}),w={effect:m,items:a,pending:_,outrogroups:null,fallback:h};v=!1}function rn(e){for(;e!==null&&(e.f&Be)===0;)e=e.next;return e}function ol(e,t,n,r,i){var s=(r&$s)!==0,o=t.length,a=e.items,l=rn(e.effect.first),c,h=null,u,d=[],_=[],v,b,p,m;if(s)for(m=0;m0){var ye=(r&Oi)!==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()}sl(e,Y,ye)}}s&&at(()=>{if(u!==void 0)for(p of u)p.nodes?.a?.apply()})}function ll(e,t,n,r,i,s,o,a){var l=(o&Zs)!==0?(o&eo)===0?Io(n,!1,!1):Rt(n):null,c=(o&Qs)!==0?Rt(i):null;return{v:l,i:c,e:Ae(()=>(s(t,l??n,c??i,a),()=>{e.delete(r)}))}}function ln(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&We)===0?t.nodes.start:n;r!==null;){var o=Cn(r);if(s.before(r),r===i)return;r=o}}function tt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const di=[...` -\r\f \v\uFEFF`];function al(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||di.includes(r[o-1]))&&(a===r.length||di.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function fl(e,t){return e==null?null:String(e)}function ti(e,t,n,r,i,s){var o=e[Er];if(o!==n||o===void 0){var a=al(n,r,s);a==null?e.removeAttribute("class"):e.className=a,e[Er]=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 ul(e,t,n,r){var i=e[Sr];if(i!==t){var s=fl(t);s==null?e.removeAttribute("style"):e.style.cssText=s,e[Sr]=t}return r}function vs(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Kr(t))return ao();for(var r of e.options)r.selected=t.includes(cn(r));return}for(r of e.options){var i=cn(r);if(Ro(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function cl(e){var t=new MutationObserver(()=>{vs(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Jr(()=>{t.disconnect()})}function dl(e,t,n=t){var r=new WeakSet,i=!0;Vr(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),cn);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&cn(l)}n(a),e.__value=a,x!==null&&r.add(x)}),es(()=>{var s=t();if(e===document.activeElement){var o=x;if(r.has(o))return}if(vs(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=cn(a),n(s))}e.__value=s,i=!1}),cl(e)}function cn(e){return"__value"in e?e.__value:e.value}const hl=Symbol("is custom element"),_l=Symbol("is html");function Tt(e,t,n,r){var i=vl(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Bs]=n),n==null?e.removeAttribute(t):typeof n!="string"&&pl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function vl(e){return e[Fn]??(e[Fn]={[hl]:e.nodeName.includes("-"),[_l]:e.namespaceURI===Mi})}var hi=new Map;function pl(e){var t=e.getAttribute("is")||e.nodeName,n=hi.get(t);if(n)return n;hi.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Ms(i);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.push(o);i=xi(i)}return n}function _i(e,t,n=t){var r=new WeakSet;Vr(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=pr(e)?gr(s):s,n(s),x!==null&&r.add(x),await Go(),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))}}}),en(t)==null&&e.value&&(n(pr(e)?gr(e.value):e.value),x!==null&&r.add(x)),or(()=>{var i=t();if(e===document.activeElement){var s=x;if(r.has(s))return}pr(e)&&i===gr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function ps(e,t,n=t){Vr(e,"change",r=>{var i=r?e.defaultChecked:e.checked;n(i)}),en(t)==null&&n(e.checked),or(()=>{var r=t();e.checked=!!r})}function pr(e){var t=e.type;return t==="number"||t==="range"}function gr(e){return e===""?null:+e}function mr(e,t){return e===t||e?.[St]===t}function gl(e={},t,n,r){var i=he.r,s=M;return es(()=>{var o,a;return or(()=>{o=a,a=[],en(()=>{mr(n(...a),e)||(t(e,...a),o&&mr(n(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&kr;)l=l.parent;const c=()=>{a&&mr(n(...a),e)&&t(null,...a)},h=l.teardown;l.teardown=()=>{c(),h?.()}}}),e}function dn(e,t,n,r){var i=!0,s=(n&ro)!==0,o=(n&io)!==0,a=r,l=!0,c=void 0,h=()=>o&&i?(c??(c=_n(r)),g(c)):(l&&(l=!1,a=o?en(r):r),a);let u;if(s){var d=St in e||Fs in e;u=jt(e,t)?.set??(d&&t in e?T=>e[t]=T:void 0)}var _,v=!1;s?[_,v]=_o(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=h(),u&&(Gs(),u(_)));var b;if(b=()=>{var T=e[t];return T===void 0?h():(l=!0,T)},(n&no)===0)return b;if(u){var p=e.$$legacy;return(function(T,H){return arguments.length>0?((!H||p||v)&&u(H?b():T),T):b()})}var m=!1,w=((n&to)!==0?_n:zi)(()=>(m=!1,b()));s&&g(w);var C=M;return(function(T,H){if(arguments.length>0){const ee=H?g(w):s?ot(T):T;return Q(w,ee),m=!0,a!==void 0&&(a=ee),T}return Qe&&m||(C.f&Me)!==0?w.v:g(w)})}function ml(e){he===null&&js(),Xr(()=>{const t=en(e);if(typeof t=="function")return t})}const gs="[data-v-app]",bl=["header","content","footer"];let Te=null,Re=null;function yl(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 wl(){if(typeof document>"u")return!1;const t=document.querySelector(gs)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(Te=null,!1):(Te=t,Re=null,!0)}function kl(){if(Re!==null)return Re;const e=typeof document<"u"?document.querySelector(gs)?.__vue_app__:null;if(!e)return Re=!1,!1;const t=e.config?.globalProperties??{};if(typeof Te?.$history?.pause=="function"&&typeof Te?.$history?.resume=="function")return Re={pause:()=>Te.$history.pause(),resume:()=>Te.$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 El(e){const t=kl();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function ut(e){if(!Te||!e)return null;for(const t of bl){const n=Te[t];if(!Array.isArray(n))continue;const r=n.find(i=>i&&i.id===e);if(r)return r}return null}function Sl(e){const t=ut(e);if(!t)return[];const n=[{id:t.id,depth:0,label:t.label,name:t.name,settings:t.settings}];return ms(t,1,n),n}function ms(e,t,n){if(!(!e||!Array.isArray(e.children)))for(const r of e.children){const i=ut(r);i&&(n.push({id:i.id,depth:t,label:i.label,name:i.name,settings:i.settings}),ms(i,t+1,n))}}function bs(){return Te?Te.globalClasses:[]}function br(e,t){if(!Te)throw new Error("rebemer: not ready");const n=Te.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=yl(i);return n.push({id:s,name:e,settings:t||{}}),s}function vi(e,t){const n=ut(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 pi(e,t){const n=ut(e);n&&(n.label=t)}const Br="slashed-rebemer-host",Cl="slashed-class-hint",xl=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],Al=3;function Tl(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 jr=!1,Zn={},Xe=null,hn=null,ct=null;function Ol(){if(Xe&&Xe.isConnected)return Xe;let e=document.getElementById(Br);e||(e=document.createElement("div"),e.id=Br,document.body.appendChild(e));const t=document.createElement("div");return t.id=Cl,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

',e.appendChild(t),Xe=t,t}function Ml(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 Nl(e,t){const n=Ol();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,Il(n,e),ct=e}function pn(){Xe&&(Xe.hidden=!0),ct=null}function Rl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${Br}`))return;if(!t.closest(xl.join(","))){ct&&pn();return}const n=Ml(t);if(!n){ct&&pn();return}n.el!==ct&&Nl(n.el,n.hint)}function Ll(e){if(!ct)return;const t=e.relatedTarget;t instanceof Node&&ct.contains(t)||pn()}function Pl(e){e.key==="Escape"&&pn()}function Dl(e,t,n={}){if(zn(),jr=!!e,Zn=t&&typeof t=="object"?t:{},!jr||Object.keys(Zn).length===0)return;hn=new AbortController;const{signal:r}=hn,i={passive:!0,signal:r};document.addEventListener("mouseover",Rl,i),document.addEventListener("mouseout",Ll,i),document.addEventListener("keydown",Pl,i),window.addEventListener("scroll",pn,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?zn():n.signal.addEventListener("abort",zn,{once:!0}))}function zn(){hn&&(hn.abort(),hn=null),Xe&&(Xe.remove(),Xe=null),ct=null,jr=!1,Zn={}}const Fl="5";var Ci;typeof window<"u"&&((Ci=window.__svelte??(window.__svelte={})).v??(Ci.v=new Set)).add(Fl);var Bl=V('reBEM');function jl(e,t){En(t,!0);function n(i){i.stopPropagation(),i.preventDefault(),t.onActivate?.(t.elementId)}var r=Bl();se(()=>{Tt(r,"title",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer"),Tt(r,"aria-label",t.label?`Open reBEMer for ${t.label}`:"Open reBEMer")}),ft("click",r,n),ft("keydown",r,i=>(i.key==="Enter"||i.key===" ")&&n(i)),W(e,r),Sn()}lr(["click","keydown"]);function Ot(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 Hl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,ql=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function Kl(e){return e?ql.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:Hl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const fr=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 Wl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))fr.has(n)&&t.push(n);return t.sort(),t}const zl=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function Ul(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))fr.has(n)||zl.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Gl=new Set(["add","rename","replace","modifier","migrate"]),gi=new Set(["user","label"]);function ys({rootId:e,rows:t,mode:n}){if(!Gl.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=Ot(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=Ot(a.name);if(!u)continue;c=`${i}__${u}`}let h=c;if(n==="modifier"){const u=Ot(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=Jl(s,n);return o.ok?{ok:!0,ops:s}:{ok:!1,ops:[],error:o.error}}function Vl({rootId:e,rows:t,mode:n,syncLabels:r}){const i=ys({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=Ot(o?.name??""),l=bs();if(n==="migrate"){const u=Yl(s,l);if(!u.ok)return u}const c=new Map;for(const u of s){const d=ut(u.row.id);if(!d)continue;const _={classIds:mi(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{El(()=>{for(const u of s){const d=ut(u.row.id);if(!d)continue;const _=mi(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=ws(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=br(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=br(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 H=l.find(ee=>ee&&ee.id===_[T]);if(H)if(H.name.startsWith(C)){const ee=H.name.slice(w.name.length),Y=H.settings?JSON.parse(JSON.stringify(H.settings)):{};m.push(br(u.finalClass+ee,Y))}else m.push(_[T])}}p=m;break}case"replace":p=[b];break}if(vi(u.row.id,p),n==="migrate"&&Xl(d.settings,u.row.migrateKeys),r&&n!=="modifier"){const m=Zl(u.finalClass,a);m&&pi(u.row.id,m)}h++}})}catch(u){for(const[_,v]of c)try{if(vi(_,v.classIds),v.migrateKeys){const b=ut(_);b&&b.settings&&Object.assign(b.settings,v.migrateKeys)}v.label!==null&&pi(_,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 Yl(e,t){for(const n of e){const r=t.find(l=>l&&l.name===n.finalClass);if(!r)continue;const i=ut(n.row.id);if(!i)continue;const s=ws(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 Jl(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=>gi.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)gi.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 ws(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)fr.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Xl(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)fr.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function mi(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?bi(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),bi(n.replace(/-/g," ")))}function bi(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const Ql=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"}),ks=new Set(["section","container","block","div"]);function $l(e,t="item"){return!e||typeof e!="string"||ks.has(e)?t:Ql[e]||t}function yr(e){return typeof e=="string"&&ks.has(e)}const ea=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function ta(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 na=V('suggested'),ra=V(' '),ia=V(''),sa=V('

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

'),oa=V('

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

'),la=V('

'),aa=V(`A class named already exists. +var Os=Object.defineProperty;var ni=e=>{throw TypeError(e)};var Ms=(e,t,n)=>t in e?Os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>Ms(e,typeof t!="symbol"?t+"":t,n),_r=(e,t,n)=>t.has(e)||ni("Cannot "+n);var f=(e,t,n)=>(_r(e,t,"read from private field"),n?n.call(e):t.get(e)),S=(e,t,n)=>t.has(e)?ni("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),E=(e,t,n,r)=>(_r(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),I=(e,t,n)=>(_r(e,t,"access private method"),n);var Kr=Array.isArray,Is=Array.prototype.indexOf,St=Array.prototype.includes,rr=Array.from,Ns=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Rs=Object.getOwnPropertyDescriptors,Ls=Object.prototype,Ps=Array.prototype,xi=Object.getPrototypeOf,ri=Object.isExtensible;const Ds=()=>{};function Fs(e){for(var t=0;t{e=r,t=i});return{promise:n,resolve:e,reject:t}}const ne=2,Jt=4,ir=8,Ti=1<<24,De=16,je=32,dt=64,Er=128,Me=512,$=1024,te=2048,Ue=4096,le=8192,Ie=16384,Pt=32768,kr=1<<25,Xt=65536,Un=1<<17,Bs=1<<18,en=1<<19,js=1<<20,ze=1<<25,Nt=65536,Gn=1<<21,qt=1<<22,at=1<<23,Ct=Symbol("$state"),Hs=Symbol("legacy props"),qs=Symbol(""),Fn=Symbol("attributes"),Sr=Symbol("class"),Cr=Symbol("style"),on=Symbol("text"),Bn=Symbol("form reset"),sr=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 Ks(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ws(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zs(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Us(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Gs(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Vs(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ys(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Js(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Xs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Zs(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Qs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $s(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const eo=1,to=2,Oi=4,no=8,ro=16,io=1,so=4,oo=8,lo=16,ao=1,fo=2,Z=Symbol("uninitialized"),Mi="http://www.w3.org/1999/xhtml";function uo(){console.warn("https://svelte.dev/e/derived_inert")}function co(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ho(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ii(e){return e===this.v}function _o(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ni(e){return!_o(e,this.v)}let he=null;function Zt(e){he=e}function kn(e,t=!1,n){he={p:he,i:!1,c:null,e:null,s:e,x:null,r:M,l:null}}function Sn(e){var t=he,n=t.e;if(n!==null){t.e=null;for(var r of n)$i(r)}return t.i=!0,he=t.p,{}}function Ri(){return!0}let vt=[];function Li(){var e=vt;vt=[],Fs(e)}function ft(e){if(vt.length===0&&!un){var t=vt;queueMicrotask(()=>{t===vt&&Li()})}vt.push(e)}function vo(){for(;vt.length>0;)Li()}function Pi(e){var t=M;if(t===null)return O.f|=at,e;if((t.f&Pt)===0&&(t.f&Jt)===0)throw e;ot(e,t)}function ot(e,t){for(;t!==null;){if((t.f&Er)!==0){if((t.f&Pt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const po=-7169;function z(e,t){e.f=e.f&po|t}function Wr(e){(e.f&Me)!==0||e.deps===null?z(e,$):z(e,Ue)}function Di(e){if(e!==null)for(const t of e)(t.f&ne)===0||(t.f&Nt)===0||(t.f^=Nt,Di(t.deps))}function Fi(e,t,n){(e.f&te)!==0?t.add(e):(e.f&Ue)!==0&&n.add(e),Di(e.deps),z(e,$)}let Ln=!1;function go(e){var t=Ln;try{return Ln=!1,[e(),Ln]}finally{Ln=t}}let vr=null,Ft=null,x=null,xr=null,Fe=null,Ar=null,un=!1,pr=!1,jt=null,jn=null;var ii=0;let mo=1;var Wt,rt,mt,zt,Ut,bt,Gt,Ye,gn,pe,mn,it,qe,Ke,Vt,yt,R,Tr,ln,Or,Bi,ji,Hn,bo,Mr,Bt;const er=class er{constructor(){S(this,R);ae(this,"id",mo++);S(this,Wt,!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,zt,new Set);S(this,Ut,new Set);S(this,bt,new Set);S(this,Gt,0);S(this,Ye,new Map);S(this,gn,null);S(this,pe,[]);S(this,mn,[]);S(this,it,new Set);S(this,qe,new Set);S(this,Ke,new Map);S(this,Vt,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,Vt).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,Vt).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(){x=this}deactivate(){x=null,Fe=null}flush(){try{pr=!0,x=this,I(this,R,ln).call(this)}finally{ii=0,Ar=null,jt=null,jn=null,pr=!1,x=null,Fe=null,xt.clear()}}discard(){for(const t of f(this,Ut))t(this);f(this,Ut).clear(),f(this,bt).clear(),I(this,R,Bt).call(this)}register_created_effect(t){f(this,mn).push(t)}increment(t,n){if(E(this,Gt,f(this,Gt)+1),t){let r=f(this,Ye).get(n)??0;f(this,Ye).set(n,r+1)}}decrement(t,n){if(E(this,Gt,f(this,Gt)-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,qe).add(r);t.clear(),n.clear()}oncommit(t){f(this,zt).add(t)}ondiscard(t){f(this,Ut).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,gn)??E(this,gn,Ai())).promise}static ensure(){var t;if(x===null){const n=x=new er;I(t=n,R,Mr).call(t),!pr&&!un&&ft(()=>{f(n,Wt)||n.flush()})}return x}apply(){{Fe=null;return}}schedule(t){if(Ar=t,t.b?.is_pending&&(t.f&(Jt|ir|Ti))!==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&$)===0)return;n.f^=$}}f(this,pe).push(n)}};Wt=new WeakMap,rt=new WeakMap,mt=new WeakMap,zt=new WeakMap,Ut=new WeakMap,bt=new WeakMap,Gt=new WeakMap,Ye=new WeakMap,gn=new WeakMap,pe=new WeakMap,mn=new WeakMap,it=new WeakMap,qe=new WeakMap,Ke=new WeakMap,Vt=new WeakMap,yt=new WeakMap,R=new WeakSet,Tr=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},ln=function(){var l,c,h;if(E(this,Wt,!0),ii++>1e3&&(I(this,R,Bt).call(this),wo()),!I(this,R,Tr).call(this)){for(const u of f(this,it))f(this,qe).delete(u),z(u,te),this.schedule(u);for(const u of f(this,qe))z(u,Ue),this.schedule(u)}const t=f(this,pe);E(this,pe,[]),this.apply();var n=jt=[],r=[],i=jn=[];for(const u of t)try{I(this,R,Or).call(this,u,n,r)}catch(d){throw Ki(u),d}if(x=null,i.length>0){var s=er.ensure();for(const u of i)s.schedule(u)}if(jt=null,jn=null,I(this,R,Tr).call(this)){I(this,R,Hn).call(this,r),I(this,R,Hn).call(this,n);for(const[u,d]of f(this,Ke))qi(u,d);i.length>0&&I(l=x,R,ln).call(l);return}const o=I(this,R,Bi).call(this);if(o){I(c=o,R,ji).call(c,this);return}f(this,it).clear(),f(this,qe).clear();for(const u of f(this,zt))u(this);f(this,zt).clear(),xr=this,si(r),si(n),xr=null,f(this,gn)?.resolve();var a=x;if(this.linked&&f(this,Gt)===0&&I(this,R,Bt).call(this),f(this,pe).length>0){a===null&&(a=this,I(this,R,Mr).call(this));const u=a;f(u,pe).push(...f(this,pe).filter(d=>!f(u,pe).includes(d)))}a!==null&&I(h=a,R,ln).call(h)},Or=function(t,n,r){t.f^=$;for(var i=t.first;i!==null;){var s=i.f,o=(s&(je|dt))!==0,a=o&&(s&$)!==0,l=a||(s&le)!==0||f(this,Ke).has(i);if(!l&&i.fn!==null){o?i.f^=$:(s&Jt)!==0?n.push(i):xn(i)&&((s&De)!==0&&f(this,qe).add(i),$t(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}}},Bi=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},ji=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&(qt|De)&&!this.async_deriveds.has(a)&&(f(this,qe).delete(a),z(a,te),this.schedule(a))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>t.discard()),I(r=t,R,Bt).call(r),x=this,I(this,R,ln).call(this)},Hn=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,Vt))u.unskip_effect(d,_=>{var v;(_.f&(De|qt))!==0?u.schedule(_):I(v=u,R,Hn).call(v,[_])});u.activate();var s=new Set,o=new Map;for(var a of n)Hi(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,mn))(d.f&(Ie|le|Un))===0&&zr(d,l,o)&&((d.f&(qt|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))I(h=u,R,Or).call(h,c,[],[]);E(u,pe,[])}u.deactivate()}}}},Mr=function(){Ft===null?vr=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?vr=n:E(t,mt,n),n===null?Ft=t:E(n,rt,t),this.linked=!1};let Rt=er;function yo(e){var t=un;un=!0;try{for(var n;;){if(vo(),x===null)return n;x.flush()}}finally{un=t}}function wo(){try{Ys()}catch(e){ot(e,Ar)}}let Ve=null;function si(e){var t=e.length;if(t!==0){for(var n=0;n0)){xt.clear();for(const i of Ve){if((i.f&(Ie|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&(Ie|le))===0&&$t(l)}}Ve.clear()}}Ve=null}}function Hi(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?Hi(i,t,n,r):(s&(qt|De))!==0&&(s&te)===0&&zr(i,t,r)&&(z(i,te),Ur(i))}}function zr(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&&zr(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Ur(e){x.schedule(e)}function qi(e,t){if(!((e.f&je)!==0&&(e.f&$)!==0)){(e.f&te)!==0?t.d.push(e):(e.f&Ue)!==0&&t.m.push(e),z(e,$);for(var n=e.first;n!==null;)qi(n,t),n=n.next}}function Ki(e){z(e,$);for(var t=e.first;t!==null;)Ki(t),t=t.next}function Eo(e){let t=0,n=Lt(0),r;return()=>{Yr()&&(g(n),lr(()=>(t===0&&(r=tn(()=>e(()=>cn(n)))),t+=1,()=>{ft(()=>{t-=1,t===0&&(r?.(),r=void 0,cn(n))})})))}}var ko=Xt|en;function So(e,t,n,r){new Co(e,t,n,r)}var Ce,qr,xe,wt,fe,Ae,re,ge,Je,Et,st,Yt,bn,yn,Xe,tr,U,xo,Ao,To,Ir,qn,Kn,Nr,Rr;class Co{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,qr,null);S(this,xe);S(this,wt);S(this,fe);S(this,Ae,null);S(this,re,null);S(this,ge,null);S(this,Je,null);S(this,Et,0);S(this,st,0);S(this,Yt,!1);S(this,bn,new Set);S(this,yn,new Set);S(this,Xe,null);S(this,tr,Eo(()=>(E(this,Xe,Lt(f(this,Et))),()=>{E(this,Xe,null)})));E(this,Ce,t),E(this,xe,n),E(this,wt,s=>{var o=M;o.b=this,o.f|=Er,r(s)}),this.parent=M.b,this.transform_error=i??this.parent?.transform_error??(s=>s),E(this,fe,Zr(()=>{I(this,U,Ir).call(this)},ko))}defer_effect(t){Fi(t,f(this,bn),f(this,yn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,xe).pending}update_pending_count(t,n){I(this,U,Nr).call(this,t,n),E(this,Et,f(this,Et)+t),!(!f(this,Xe)||f(this,Yt))&&(E(this,Yt,!0),ft(()=>{E(this,Yt,!1),f(this,Xe)&&Qt(f(this,Xe),f(this,Et))}))}get_effect_pending(){return f(this,tr).call(this),g(f(this,Xe))}error(t){if(!f(this,xe).onerror&&!f(this,xe).failed)throw t;x?.is_fork?(f(this,Ae)&&x.skip_effect(f(this,Ae)),f(this,re)&&x.skip_effect(f(this,re)),f(this,ge)&&x.skip_effect(f(this,ge)),x.on_fork_commit(()=>{I(this,U,Rr).call(this,t)})):I(this,U,Rr).call(this,t)}}Ce=new WeakMap,qr=new WeakMap,xe=new WeakMap,wt=new WeakMap,fe=new WeakMap,Ae=new WeakMap,re=new WeakMap,ge=new WeakMap,Je=new WeakMap,Et=new WeakMap,st=new WeakMap,Yt=new WeakMap,bn=new WeakMap,yn=new WeakMap,Xe=new WeakMap,tr=new WeakMap,U=new WeakSet,xo=function(){try{E(this,Ae,Te(()=>f(this,wt).call(this,f(this,Ce))))}catch(t){this.error(t)}},Ao=function(t){const n=f(this,xe).failed;n&&E(this,ge,Te(()=>{n(f(this,Ce),()=>t,()=>()=>{})}))},To=function(){const t=f(this,xe).pending;t&&(this.is_pending=!0,E(this,re,Te(()=>t(f(this,Ce)))),ft(()=>{var n=E(this,Je,document.createDocumentFragment()),r=Qe();n.append(r),E(this,Ae,I(this,U,Kn).call(this,()=>Te(()=>f(this,wt).call(this,r)))),f(this,st)===0&&(f(this,Ce).before(n),E(this,Je,null),At(f(this,re),()=>{E(this,re,null)}),I(this,U,qn).call(this,x))}))},Ir=function(){try{if(this.is_pending=this.has_pending_snippet(),E(this,st,0),E(this,Et,0),E(this,Ae,Te(()=>{f(this,wt).call(this,f(this,Ce))})),f(this,st)>0){var t=E(this,Je,document.createDocumentFragment());ei(f(this,Ae),t);const n=f(this,xe).pending;E(this,re,Te(()=>n(f(this,Ce))))}else I(this,U,qn).call(this,x)}catch(n){this.error(n)}},qn=function(t){this.is_pending=!1,t.transfer_effects(f(this,bn),f(this,yn))},Kn=function(t){var n=M,r=O,i=he;Ge(f(this,fe)),Re(f(this,fe)),Zt(f(this,fe).ctx);try{return Rt.ensure(),t()}catch(s){return Pi(s),null}finally{Ge(n),Re(r),Zt(i)}},Nr=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&I(r=this.parent,U,Nr).call(r,t,n);return}E(this,st,f(this,st)+t),f(this,st)===0&&(I(this,U,qn).call(this,n),f(this,re)&&At(f(this,re),()=>{E(this,re,null)}),f(this,Je)&&(f(this,Ce).before(f(this,Je)),E(this,Je,null)))},Rr=function(t){f(this,Ae)&&(de(f(this,Ae)),E(this,Ae,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,xe).onerror;let r=f(this,xe).failed;var i=!1,s=!1;const o=()=>{if(i){ho();return}i=!0,s&&$s(),f(this,ge)!==null&&At(f(this,ge),()=>{E(this,ge,null)}),I(this,U,Kn).call(this,()=>{I(this,U,Ir).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,I(this,U,Kn).call(this,()=>{try{return Te(()=>{var c=M;c.b=this,c.f|=Er,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 Oo(e,t,n,r){const i=vn;var s=e.filter(d=>!d.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=M,a=Mo(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function c(d){if((o.f&Ie)===0){a();try{r(d)}catch(_){ot(_,o)}Vn()}}var h=Wi();if(n.length===0){l.then(()=>c(t.map(i))).finally(h);return}function u(){Promise.all(n.map(d=>Io(d))).then(d=>c([...t.map(i),...d])).catch(d=>ot(d,o)).finally(h)}l?l.then(()=>{a(),u(),Vn()}):u()}function Mo(){var e=M,t=O,n=he,r=x;return function(s=!0){Ge(e),Re(t),Zt(n),s&&(e.f&Ie)===0&&(r?.activate(),r?.apply())}}function Vn(e=!0){Ge(null),Re(null),Zt(null),e&&x?.deactivate()}function Wi(){var e=M,t=e.b,n=x,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 vn(e){var t=ne|te;return M!==null&&(M.f|=en),{ctx:he,deps:null,effects:null,equals:Ii,f:t,fn:e,reactions:null,rv:0,v:Z,wv:0,parent:M,ac:null}}const Pn=Symbol("obsolete");function Io(e,t,n){let r=M;r===null&&Ws();var i=void 0,s=Lt(Z),o=!O,a=new Set;return zo(()=>{var l=M,c=Ai();i=c.promise;try{Promise.resolve(e()).then(c.resolve,_=>{_!==sr&&c.reject(_)}).finally(Vn)}catch(_){c.reject(_),Vn()}var h=x;if(o){if((l.f&Pt)!==0)var u=Wi();if(r.b.is_rendered())h.async_deriveds.get(l)?.reject(Pn);else for(const _ of a.values())_.reject(Pn);a.add(c),h.async_deriveds.set(l,c)}const d=(_,v=void 0)=>{u?.(),a.delete(c),v!==Pn&&(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"))}),Jr(()=>{for(const l of a)l.reject(Pn)}),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=vn(e);return ss(t),t}function zi(e){const t=vn(e);return t.equals=Ni,t}function No(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!Vi&&Po()}return t}function Po(){Vi=!1;for(const e of Yn){(e.f&$)!==0&&z(e,Ue);let t;try{t=xn(e)}catch{t=!0}t&&$t(e)}Yn.clear()}function cn(e){Q(e,e.v+1)}function Yi(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;Re(null),fi(s);var h=a();return Re(l),fi(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)&&Xs();var h=n.get(l);return h===void 0?o(()=>{var u=oe(c.value);return n.set(l,u),u}):Q(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),cn(i)}}else Q(c,Z),cn(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||Ht(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||Ht(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||Ht(a,l)?.writable)&&(u=o(()=>oe(void 0)),Q(u,lt(c)),n.set(l,u));else{d=u.v!==Z;var b=o(()=>lt(c));Q(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&&Q(m,w+1)}cn(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(){Zs()}})}function oi(e){try{if(e!==null&&typeof e=="object"&&Ct in e)return e[Ct]}catch{}return e}function Do(e,t){return Object.is(oi(e),oi(t))}var Lr,Ji,Xi,Zi;function Fo(){if(Lr===void 0){Lr=window,Ji=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xi=Ht(t,"firstChild").get,Zi=Ht(t,"nextSibling").get,ri(e)&&(e[Sr]=void 0,e[Fn]=null,e[Cr]=void 0,e.__e=void 0),ri(n)&&(n[on]=void 0)}}function Qe(e=""){return document.createTextNode(e)}function Jn(e){return Xi.call(e)}function Cn(e){return Zi.call(e)}function L(e,t){return Jn(e)}function Kt(e,t=!1){{var n=Jn(e);return n instanceof Comment&&n.data===""?Cn(n):n}}function N(e,t=1,n=!1){let r=e;for(;t--;)r=Cn(r);return r}function Bo(e){e.textContent=""}function Qi(){return!1}function jo(e,t,n){return document.createElementNS(Mi,e,void 0)}let li=!1;function Ho(){li||(li=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Bn]?.()})},{capture:!0}))}function or(e){var t=O,n=M;Re(null),Ge(null);try{return e()}finally{Re(t),Ge(n)}}function Vr(e,t,n,r=n){e.addEventListener(t,()=>or(n));const i=e[Bn];i?e[Bn]=()=>{i(),r(!0)}:e[Bn]=()=>r(!0),Ho()}function qo(e){M===null&&(O===null&&Vs(),Gs()),$e&&Us()}function Ko(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};x?.register_created_effect(r);var i=r;if((e&Jt)!==0)jt!==null?jt.push(r):Rt.ensure().schedule(r);else if(t!==null){try{$t(r)}catch(o){throw de(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&en)===0&&(i=i.first,(e&De)!==0&&(e&Xt)!==0&&i!==null&&(i.f|=Xt))}if(i!==null&&(i.parent=n,n!==null&&Ko(i,n),O!==null&&(O.f&ne)!==0&&(e&dt)===0)){var s=O;(s.effects??(s.effects=[])).push(i)}return r}function Yr(){return O!==null&&!Be}function Jr(e){const t=et(ir,null);return z(t,$),t.teardown=e,t}function Xr(e){qo();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 $i(e)}function $i(e){return et(Jt|js,e)}function Wo(e){Rt.ensure();const t=et(dt|en,e);return(n={})=>new Promise(r=>{n.outro?At(t,()=>{de(t),r(void 0)}):(de(t),r(void 0))})}function es(e){return et(Jt,e)}function zo(e){return et(qt|en,e)}function lr(e,t=0){return et(ir|t,e)}function se(e,t=[],n=[],r=[]){Oo(r,t,n,i=>{et(ir,()=>e(...i.map(g)))})}function Zr(e,t=0){var n=et(De|t,e);return n}function Te(e){return et(je|en,e)}function ts(e){var t=e.teardown;if(t!==null){const n=$e,r=O;ai(!0),Re(null);try{t.call(null)}finally{ai(n),Re(r)}}}function Qr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&or(()=>{i.abort(sr)});var r=n.next;(n.f&dt)!==0?n.parent=null:de(n,t),n=r}}function Uo(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&Bs)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Go(e.nodes.start,e.nodes.end),n=!0),z(e,kr),Qr(e,t&&!n),pn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();ts(e),e.f^=kr,e.f|=Ie;var i=e.parent;i!==null&&i.first!==null&&ns(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Go(e,t){for(;e!==null;){var n=e===t?null:Cn(e);e.remove(),e=n}}function ns(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 At(e,t,n=!0){var r=[];rs(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 rs(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&Xt)!==0||(i.f&je)!==0&&(e.f&De)!==0;rs(i,t,o?n:!1)}i=s}}}function $r(e){is(e,!0)}function is(e,t){if((e.f&le)!==0){e.f^=le,(e.f&$)===0&&(z(e,te),Rt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Xt)!==0||(n.f&je)!==0;is(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 ei(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Cn(n);t.append(n),n=i}}let Wn=!1,$e=!1;function ai(e){$e=e}let O=null,Be=!1;function Re(e){O=e}let M=null;function Ge(e){M=e}let Ne=null;function ss(e){O!==null&&(Ne===null?Ne=[e]:Ne.push(e))}let ue=null,ve=0,Se=null;function Vo(e){Se=e}let os=1,pt=0,Tt=pt;function fi(e){Tt=e}function ls(){return++os}function xn(e){var t=e.f;if((t&te)!==0)return!0;if(t&ne&&(e.f&=~Nt),(t&Ue)!==0){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}(t&Me)!==0&&Fe===null&&z(e,$)}return!1}function as(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ne!==null&&St.call(Ne,e)))for(var i=0;i{e.ac.abort(sr)}),e.ac=null);try{e.f|=Gn;var h=e.fn,u=h();e.f|=Pt;var d=e.deps,_=x?.is_fork;if(ue!==null){var v;if(_||pn(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 $o(e,t,n,r,i){var s={capture:r,passive:i},o=Qo(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Jr(()=>{t.removeEventListener(e,o,s)})}function ut(e,t,n){(t[gt]??(t[gt]={}))[e]=n}function ar(e){for(var t=0;t{throw p});throw d}}finally{e[gt]=t,delete e.currentTarget,Re(h),Ge(u)}}}const el=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function tl(e){return el?.createHTML(e)??e}function nl(e){var t=jo("template");return t.innerHTML=tl(e.replaceAll("","")),t.content}function Xn(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&ao)!==0,r=(t&fo)!==0,i,s=!e.startsWith("");return()=>{i===void 0&&(i=nl(s?e:""+e),n||(i=Jn(i)));var o=r||Ji?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=Jn(o),l=o.lastChild;Xn(a,l)}else Xn(o,o);return o}}function rl(e=""){{var t=Qe(e+"");return Xn(t,t),t}}function il(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Qe();return e.append(t,n),Xn(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[on]??(e[on]=e.nodeValue))&&(e[on]=n,e.nodeValue=`${n}`)}function hs(e,t){return sl(e,t)}const Dn=new Map;function sl(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){Fo();var l=void 0,c=Wo(()=>{var h=n??t.appendChild(Qe());So(h,{pending:()=>{}},_=>{kn({});var v=he;s&&(v.c=s),i&&(r.$$events=i),l=e(_,r)||{},Sn()},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=Zo(b);for(const C of[t,document]){var m=Dn.get(C);m===void 0&&(m=new Map,Dn.set(C,m));var w=m.get(b);w===void 0?(C.addEventListener(b,Dr,{passive:p}),m.set(b,1)):m.set(b,w+1)}}}};return d(rr(ds)),Pr.add(d),()=>{for(var _ of u)for(const p of[t,document]){var v=Dn.get(p),b=v.get(_);--b==0?(p.removeEventListener(_,Dr),v.delete(_),v.size===0&&Dn.delete(p)):v.set(_,b)}Pr.delete(d),h!==n&&h.parentNode?.removeChild(h)}});return Fr.set(l,c),l}let Fr=new WeakMap;function fr(e,t){const n=Fr.get(e);return n?(Fr.delete(e),n(t)):Promise.resolve()}var Pe,We,me,kt,wn,En,nr;class ol{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,wn,!0);S(this,En,t=>{if(f(this,Pe).has(t)){var n=f(this,Pe).get(t),r=f(this,We).get(n);if(r)$r(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();ei(o,c),c.append(Qe()),f(this,me).set(s,{effect:o,fragment:c})}else de(o);f(this,kt).delete(s),f(this,We).delete(s)};f(this,wn)||!r?(f(this,kt).add(s),At(o,a,!1)):a()}}});S(this,nr,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,wn,n)}ensure(t,n){var r=x,i=Qi();if(n&&!f(this,We).has(t)&&!f(this,me).has(t))if(i){var s=document.createDocumentFragment(),o=Qe();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,En)),r.ondiscard(f(this,nr))}else f(this,En).call(this,r)}}Pe=new WeakMap,We=new WeakMap,me=new WeakMap,kt=new WeakMap,wn=new WeakMap,En=new WeakMap,nr=new WeakMap;function ie(e,t,n=!1){var r=new ol(e),i=n?Xt:0;function s(o,a){r.ensure(o,a)}Zr(()=>{var o=!1;t((a,l=0)=>{o=!0,s(l,a)}),o||s(-1,null)},i)}function ll(e,t){return t}function al(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;Br(e,rr(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;Bo(h),h.append(c),e.items.clear()}Br(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function Br(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 Kr(C)?C:C==null?[]:rr(C)}),d,_=new Map,v=!0;function b(C){(w.effect.f&Ie)===0&&(w.pending.delete(C),w.fallback=h,fl(w,d,o,t,r),h!==null&&(d.length===0?(h.f&ze)===0?$r(h):(h.f^=ze,an(h,null,o)):At(h,()=>{h=null})))}function p(C){w.pending.delete(C)}var m=Zr(()=>{d=g(u);for(var C=d.length,T=new Set,H=x,ee=Qi(),Y=0;Ys(o)):(h=Te(()=>s(ci??(ci=Qe()))),h.f|=ze)),C>T.size&&zs(),!v)if(_.set(H,T),ee){for(const[_t,He]of a)T.has(_t)||H.skip_effect(He.e);H.oncommit(b),H.ondiscard(p)}else b(H);g(u)}),w={effect:m,items:a,pending:_,outrogroups:null,fallback:h};v=!1}function sn(e){for(;e!==null&&(e.f&je)===0;)e=e.next;return e}function fl(e,t,n,r,i){var s=(r&no)!==0,o=t.length,a=e.items,l=sn(e.effect.first),c,h=null,u,d=[],_=[],v,b,p,m;if(s)for(m=0;m0){var we=(r&Oi)!==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()}al(e,Y,we)}}s&&ft(()=>{if(u!==void 0)for(p of u)p.nodes?.a?.apply()})}function ul(e,t,n,r,i,s,o,a){var l=(o&eo)!==0?(o&ro)===0?Lo(n,!1,!1):Lt(n):null,c=(o&to)!==0?Lt(i):null;return{v:l,i:c,e:Te(()=>(s(t,l??n,c??i,a),()=>{e.delete(r)}))}}function an(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=Cn(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 di=[...` +\r\f \v\uFEFF`];function cl(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||di.includes(r[o-1]))&&(a===r.length||di.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function dl(e,t){return e==null?null:String(e)}function ti(e,t,n,r,i,s){var o=e[Sr];if(o!==n||o===void 0){var a=cl(n,r,s);a==null?e.removeAttribute("class"):e.className=a,e[Sr]=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 hl(e,t,n,r){var i=e[Cr];if(i!==t){var s=dl(t);s==null?e.removeAttribute("style"):e.style.cssText=s,e[Cr]=t}return r}function vs(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Kr(t))return co();for(var r of e.options)r.selected=t.includes(dn(r));return}for(r of e.options){var i=dn(r);if(Do(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function _l(e){var t=new MutationObserver(()=>{vs(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Jr(()=>{t.disconnect()})}function vl(e,t,n=t){var r=new WeakSet,i=!0;Vr(e,"change",s=>{var o=s?"[selected]":":checked",a;if(e.multiple)a=[].map.call(e.querySelectorAll(o),dn);else{var l=e.querySelector(o)??e.querySelector("option:not([disabled])");a=l&&dn(l)}n(a),e.__value=a,x!==null&&r.add(x)}),es(()=>{var s=t();if(e===document.activeElement){var o=x;if(r.has(o))return}if(vs(e,s,i),i&&s===void 0){var a=e.querySelector(":checked");a!==null&&(s=dn(a),n(s))}e.__value=s,i=!1}),_l(e)}function dn(e){return"__value"in e?e.__value:e.value}const pl=Symbol("is custom element"),gl=Symbol("is html");function Ot(e,t,n,r){var i=ml(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[qs]=n),n==null?e.removeAttribute(t):typeof n!="string"&&bl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ml(e){return e[Fn]??(e[Fn]={[pl]:e.nodeName.includes("-"),[gl]:e.namespaceURI===Mi})}var hi=new Map;function bl(e){var t=e.getAttribute("is")||e.nodeName,n=hi.get(t);if(n)return n;hi.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Rs(i);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.push(o);i=xi(i)}return n}function _i(e,t,n=t){var r=new WeakSet;Vr(e,"input",async i=>{var s=i?e.defaultValue:e.value;if(s=gr(e)?mr(s):s,n(s),x!==null&&r.add(x),await Jo(),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))}}}),tn(t)==null&&e.value&&(n(gr(e)?mr(e.value):e.value),x!==null&&r.add(x)),lr(()=>{var i=t();if(e===document.activeElement){var s=x;if(r.has(s))return}gr(e)&&i===mr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function ps(e,t,n=t){Vr(e,"change",r=>{var i=r?e.defaultChecked:e.checked;n(i)}),tn(t)==null&&n(e.checked),lr(()=>{var r=t();e.checked=!!r})}function gr(e){var t=e.type;return t==="number"||t==="range"}function mr(e){return e===""?null:+e}function br(e,t){return e===t||e?.[Ct]===t}function yl(e={},t,n,r){var i=he.r,s=M;return es(()=>{var o,a;return lr(()=>{o=a,a=[],tn(()=>{br(n(...a),e)||(t(e,...a),o&&br(n(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&kr;)l=l.parent;const c=()=>{a&&br(n(...a),e)&&t(null,...a)},h=l.teardown;l.teardown=()=>{c(),h?.()}}}),e}function hn(e,t,n,r){var i=!0,s=(n&oo)!==0,o=(n&lo)!==0,a=r,l=!0,c=void 0,h=()=>o&&i?(c??(c=vn(r)),g(c)):(l&&(l=!1,a=o?tn(r):r),a);let u;if(s){var d=Ct in e||Hs in e;u=Ht(e,t)?.set??(d&&t in e?T=>e[t]=T:void 0)}var _,v=!1;s?[_,v]=go(()=>e[t]):_=e[t],_===void 0&&r!==void 0&&(_=h(),u&&(Js(),u(_)));var b;if(b=()=>{var T=e[t];return T===void 0?h():(l=!0,T)},(n&so)===0)return b;if(u){var p=e.$$legacy;return(function(T,H){return arguments.length>0?((!H||p||v)&&u(H?b():T),T):b()})}var m=!1,w=((n&io)!==0?vn:zi)(()=>(m=!1,b()));s&&g(w);var C=M;return(function(T,H){if(arguments.length>0){const ee=H?g(w):s?lt(T):T;return Q(w,ee),m=!0,a!==void 0&&(a=ee),T}return $e&&m||(C.f&Ie)!==0?w.v:g(w)})}function wl(e){he===null&&Ks(),Xr(()=>{const t=tn(e);if(typeof t=="function")return t})}const gs="[data-v-app]",El=["header","content","footer"];let Oe=null,Le=null;function kl(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 Sl(){if(typeof document>"u")return!1;const t=document.querySelector(gs)?.__vue_app__?.config?.globalProperties?.$_state;return!t||typeof t!="object"||!Array.isArray(t.globalClasses)?(Oe=null,!1):(Oe=t,Le=null,!0)}function Cl(){if(Le!==null)return Le;const e=typeof document<"u"?document.querySelector(gs)?.__vue_app__:null;if(!e)return Le=!1,!1;const t=e.config?.globalProperties??{};if(typeof Oe?.$history?.pause=="function"&&typeof Oe?.$history?.resume=="function")return Le={pause:()=>Oe.$history.pause(),resume:()=>Oe.$history.resume()},Le;const n=t.$_bricksData??t.bricksData;return typeof n?.history?.pause=="function"&&typeof n?.history?.resume=="function"?(Le={pause:()=>n.history.pause(),resume:()=>n.history.resume()},Le):typeof t.pauseHistory=="function"&&typeof t.resumeHistory=="function"?(Le={pause:()=>t.pauseHistory(),resume:()=>t.resumeHistory()},Le):(Le=!1,!1)}function xl(e){const t=Cl();if(t)try{t.pause(),e()}finally{t.resume()}else e()}function ct(e){if(!Oe||!e)return null;for(const t of El){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 Al(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 ms(t,1,n),n}function ms(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}),ms(i,t+1,n))}}function bs(){return Oe?Oe.globalClasses:[]}function yr(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=kl(i);return n.push({id:s,name:e,settings:t||{}}),s}function vi(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 pi(e,t){const n=ct(e);n&&(n.label=t)}const Zn="slashed-rebemer-host",Tl="slashed-class-hint",ys=["#bricks-panel",".bricks-class-manager","#bricks-class-manager",'[data-control="cssClasses"]'],Ol=3;function Ml(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 jr=!1,Qn={},Ze=null,_n=null,ye=null;function Il(){if(Ze&&Ze.isConnected)return Ze;let e=document.getElementById(Zn);e||(e=document.createElement("div"),e.id=Zn,document.body.appendChild(e));const t=document.createElement("div");return t.id=Tl,t.className="rebemer-class-hint",t.setAttribute("role","tooltip"),t.hidden=!0,t.innerHTML='

',e.appendChild(t),Ze=t,t}function ws(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 Es(e,t){const n=Il();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,Nl(n,e),ye=e}function ht(){Ze&&(Ze.hidden=!0),ye=null}function Rl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${Zn}`))return;if(!t.closest(ys.join(","))){ye&&ht();return}const n=ws(t);if(!n){ye&&ht();return}n.el!==ye&&Es(n.el,n.hint)}function Ll(e){if(!ye)return;const t=e.relatedTarget;t instanceof Node&&ye.contains(t)||ht()}function Pl(e){const t=e.target;if(!(t instanceof Element)||t.closest(`#${Zn}`))return;if(!t.closest(ys.join(","))){ye&&ht();return}const n=ws(t);if(!n){ye&&ht();return}n.el!==ye&&Es(n.el,n.hint)}function Dl(e){if(!ye)return;const t=e.relatedTarget;t instanceof Node&&ye.contains(t)||ht()}function Fl(e){e.key==="Escape"&&ht()}function Bl(e,t,n={}){if(zn(),jr=!!e,Qn=t&&typeof t=="object"?t:{},!jr||Object.keys(Qn).length===0)return;_n=new AbortController;const{signal:r}=_n,i={passive:!0,signal:r};document.addEventListener("mouseover",Rl,i),document.addEventListener("mouseout",Ll,i),document.addEventListener("focusin",Pl,i),document.addEventListener("focusout",Dl,i),document.addEventListener("keydown",Fl,i),window.addEventListener("scroll",ht,{capture:!0,passive:!0,signal:r}),n.signal&&(n.signal.aborted?zn():n.signal.addEventListener("abort",zn,{once:!0}))}function zn(){_n&&(_n.abort(),_n=null),Ze&&(Ze.remove(),Ze=null),ye=null,jr=!1,Qn={}}const jl="5";var Ci;typeof window<"u"&&((Ci=window.__svelte??(window.__svelte={})).v??(Ci.v=new Set)).add(jl);var Hl=V('reBEM');function ql(e,t){kn(t,!0);function n(i){i.stopPropagation(),i.preventDefault(),t.onActivate?.(t.elementId)}var r=Hl();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),Sn()}ar(["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 Kl=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Wl=new Set(["auto","inherit","initial","unset","revert","revert-layer","none"]);function zl(e){return e?Wl.has(e)?{ok:!1,reason:`"${e}" is a CSS keyword.`}:Kl.test(e)?{ok:!0}:{ok:!1,reason:"Use lowercase letters, digits, and hyphens."}:{ok:!1,reason:"Name is empty."}}const ur=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 Ul(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))ur.has(n)&&t.push(n);return t.sort(),t}const Gl=new Set(["_cssGlobalClasses","_cssClasses","_cssId","_attributes","_hidden","_hidden_lg","_hidden_md","_hidden_sm","_hidden_xl","_name","_label","_id","tag","children","parent"]);function Vl(e){if(!e||typeof e!="object")return[];const t=[];for(const n of Object.keys(e))ur.has(n)||Gl.has(n)||n.startsWith("_hidden_")||t.push(n);return t.sort(),t}const Yl=new Set(["add","rename","replace","modifier","migrate"]),gi=new Set(["user","label"]);function ks({rootId:e,rows:t,mode:n}){if(!Yl.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=Zl(s,n);return o.ok?{ok:!0,ops:s}:{ok:!1,ops:[],error:o.error}}function Jl({rootId:e,rows:t,mode:n,syncLabels:r}){const i=ks({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=bs();if(n==="migrate"){const u=Xl(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:mi(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{xl(()=>{for(const u of s){const d=ct(u.row.id);if(!d)continue;const _=mi(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=Ss(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=yr(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=yr(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 H=l.find(ee=>ee&&ee.id===_[T]);if(H)if(H.name.startsWith(C)){const ee=H.name.slice(w.name.length),Y=H.settings?JSON.parse(JSON.stringify(H.settings)):{};m.push(yr(u.finalClass+ee,Y))}else m.push(_[T])}}p=m;break}case"replace":p=[b];break}if(vi(u.row.id,p),n==="migrate"&&Ql(d.settings,u.row.migrateKeys),r&&n!=="modifier"){const m=$l(u.finalClass,a);m&&pi(u.row.id,m)}h++}})}catch(u){for(const[_,v]of c)try{if(vi(_,v.classIds),v.migrateKeys){const b=ct(_);b&&b.settings&&Object.assign(b.settings,v.migrateKeys)}v.label!==null&&pi(_,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 Xl(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=Ss(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 Zl(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=>gi.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)gi.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 Ss(e,t){if(!e||!Array.isArray(t))return{};const n={};for(const r of t)ur.has(r)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=JSON.parse(JSON.stringify(e[r])));return n}function Ql(e,t){if(!(!e||!Array.isArray(t)))for(const n of t)ur.has(n)&&Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}function mi(e){const t=e?._cssGlobalClasses;return t?(Array.isArray(t)?t:Object.values(t)).filter(r=>typeof r=="string"&&r.length>0):[]}function $l(e,t){let n=e;return n===t?bi(t.replace(/-/g," ")):(n.startsWith(t+"__")&&(n=n.slice(t.length+2)),n=n.replace(/--.+$/,""),bi(n.replace(/-/g," ")))}function bi(e){return e.replace(/(^|\s)([a-z])/g,(t,n,r)=>n+r.toUpperCase())}const ea=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"}),Cs=new Set(["section","container","block","div"]);function ta(e,t="item"){return!e||typeof e!="string"||Cs.has(e)?t:ea[e]||t}function wr(e){return typeof e=="string"&&Cs.has(e)}const na=Object.freeze({heading:"title","text-basic":"description",text:"description",button:"action","text-link":"link",logo:"logo",image:"image"});function ra(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 ia=V('suggested'),sa=V(' '),oa=V(''),la=V('

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

'),aa=V('

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

'),fa=V('

'),ua=V(`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),fa=V(`A class named already exists + values block the migration — pick a different name or use Add.`,1),ca=V(`A class named already exists globally. Apply will attach the existing class instead of - creating a duplicate.`,1),ua=V('

'),ca=V(' '),da=V('Migrate: ',1),ha=V('No migratable keys on this element.'),_a=V(' '),va=V('
'),pa=V('
');function ga(e,t){En(t,!0);let n=dn(t,"row",15),r=dn(t,"globalClasses",19,()=>[]),i=dn(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=L(_),p=L(b),m=N(b,2),w=L(m),C=L(w),T=N(w,2),H=L(T),ee=N(T,2);{var Y=y=>{var F=na();se(()=>Tt(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=N(m,2),ye=L(_e),q=L(ye);{var ht=y=>{var F=ra(),we=L(F);se(()=>ce(we,g(l))),W(y,F)};ie(q,y=>{g(l)&&y(ht)})}var je=N(q,2),tn=N(ye,2);{var An=y=>{var F=ia();se(()=>F.disabled=!n().include),ft("input",F,u),_i(F,()=>n().modifier,we=>n(n().modifier=we,!0)),W(y,F)};ie(tn,y=>{g(s)&&y(An)})}var Tn=N(_e,2);{var On=y=>{var F=sa();W(y,F)};ie(Tn,y=>{g(s)&&n().include&&!n().modifier&&y(On)})}var nn=N(Tn,2);{var cr=y=>{var F=oa();W(y,F)},Mn=y=>{var F=la(),we=L(F);se(()=>ce(we,`This element has ${n().currentClassCount??""} classes. Only the first will be renamed; modifiers matching it are renamed too.`)),W(y,F)};ie(nn,y=>{g(a)&&n().include&&n().currentClassCount===0?y(cr):g(a)&&n().include&&n().currentClassCount>1&&y(Mn,1)})}var In=N(nn,2);{var Nn=y=>{var F=ua(),we=L(F);{var E=A=>{var K=aa(),P=N(qt(K)),J=L(P);se(()=>ce(J,i())),W(A,K)},B=A=>{var K=fa(),P=N(qt(K)),J=L(P);se(()=>ce(J,i())),W(A,K)};ie(we,A=>{g(o)?A(E):A(B,-1)})}W(y,F)};ie(In,y=>{g(h)&&y(Nn)})}var dr=N(In,2);{var Rn=y=>{var F=va(),we=L(F);{var E=P=>{var J=da(),j=N(qt(J),2);_s(j,17,()=>n().migrateKeys,il,(ke,G)=>{var D=ca(),X=L(D);se(et=>{Tt(D,"title",`Will be lifted into ${(i()||"the new class")??""}`),ce(X,et)},[()=>d(g(G))]),W(ke,D)}),W(P,J)},B=P=>{var J=ha();W(P,J)};ie(we,P=>{n().migrateKeys?.length?P(E):P(B,-1)})}var A=N(we,2);{var K=P=>{var J=_a(),j=L(J);se(()=>ce(j,`${n().skippedKeys.length??""} skipped`)),W(P,J)};ie(A,P=>{n().skippedKeys?.length&&P(K)})}W(y,F)};ie(dr,y=>{g(o)&&n().include&&y(Rn)})}se(y=>{v=ti(_,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":g(c)}),ul(_,`--rebemer-row-depth: ${n().depth??0??""}`),ce(C,n().originalLabel),ce(H,y),Tt(je,"placeholder",t.isRoot?"block-name":"element-name"),je.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),ps(p,()=>n().include,y=>n(n().include=y,!0)),ft("input",je,u),_i(je,()=>n().name,y=>n(n().name=y,!0)),W(e,_),Sn()}lr(["input"]);var ma=V(" ");function ba(e,t){En(t,!0);let n=dn(t,"kind",3,"info"),r=dn(t,"duration",3,3e3),i=oe(!0);Xr(()=>{if(!g(i)||r()<=0)return;const c=setTimeout(()=>{Q(i,!1),t.onDismiss?.()},r());return()=>clearTimeout(c)});const s=be(()=>n()==="error"?"alert":"status");var o=tl(),a=qt(o);{var l=c=>{var h=ma(),u=L(h);se(()=>{ti(h,1,`rebemer-toast rebemer-toast--${n()??""}`),Tt(h,"role",g(s)),Tt(h,"aria-live",n()==="error"?"assertive":"polite"),ce(u,t.message)}),ft("click",h,()=>{Q(i,!1),t.onDismiss?.()}),W(c,h)};ie(a,c=>{g(i)&&c(l)})}W(e,o),Sn()}lr(["click"]);var ya=V("Will migrate ",1),wa=V(' '),ka=V(''),Ea=V(' ',1);function Sa(e,t){En(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(ot([])),o=oe(ot([])),a=oe(null),l=oe(null);const c=be(()=>Ot(g(s)[0]?.name??"")),h=be(()=>g(s)[0]?.originalLabel??""),u=be(()=>{if(g(r)!=="migrate")return null;let E=0,B=0;for(const A of g(s))A.include&&(E+=A.migrateKeys?.length??0,B+=A.skippedKeys?.length??0);return{willMigrate:E,willSkip:B}}),d=be(()=>{if(g(s).length===0)return new Map;const E=ys({rootId:t.rootId,rows:g(s),mode:g(r)}),B=new Map;if(!E.ok)return B;for(const A of E.ops)B.set(A.row.id,A.finalClass);return B});ml(()=>{const E=Sl(t.rootId);Q(o,bs().slice(),!0);const B=E.map((A,K)=>{const P=K===0,J=A.label||"",j=Ot(J),ke=A.name||"";let G,D;return j?(G=j,D="label"):P?(G="block",D="fallback"):ke&&!yr(ke)?(G=$l(ke,"item"),D="element-type"):(G="item",D="fallback"),{id:A.id,depth:A.depth,bricksType:ke,originalLabel:J||(P?"block":"element"),name:G,modifier:"",include:!0,suggestedFrom:D,migrateKeys:Wl(A.settings),skippedKeys:Ul(A.settings),currentClassCount:Array.isArray(A.settings?._cssGlobalClasses)?A.settings._cssGlobalClasses.filter(X=>typeof X=="string"&&X.length>0).length:0}});if(B.length>1){const A=new Map(E.map(j=>[j.id,[]])),K=[];for(const j of E){for(;K.length&&K[K.length-1].depth>=j.depth;)K.pop();K.length&&A.get(K[K.length-1].id).push(j.id),K.push(j)}const P=new Map(E.map(j=>[j.id,j])),J=new Map(B.map(j=>[j.id,j]));for(const[,j]of A){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=>yr(P.get(D)?.name??""));for(const D of j){const X=J.get(D),et=P.get(D);if(!(!X||!et||X.suggestedFrom==="label")){if(yr(et.name)){const Pt=(A.get(D)??[]).map(Cs=>P.get(Cs)?.name??"").filter(Boolean),Ss=G.indexOf(D);X.name=ta(Pt,Ss,G.length),X.suggestedFrom="element-type"}else if((ke.get(et.name)??0)===1){const Pt=ea[et.name];Pt&&(X.name=Pt,X.suggestedFrom="element-type")}}}}}Q(s,B,!0)});function _(E){if(E.key==="Escape"){t.onClose?.();return}g(l)&&E.target instanceof Node&&g(l).contains(E.target)&&E.key==="Enter"&&(E.target?.tagName==="INPUT"||E.target?.tagName==="SELECT")&&(E.preventDefault(),b())}let v=null;function b(){const E=Ot(g(s)[0]?.name??""),B=Kl(E);if(!B.ok){Q(a,{kind:"error",message:B.reason},!0);return}const A=Vl({rootId:t.rootId,rows:g(s),mode:g(r),syncLabels:g(i)});A.ok?(Q(a,{kind:"success",message:`Applied to ${A.count} element${A.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):Q(a,{kind:"error",message:A.error},!0)}Xr(()=>()=>{v&&clearTimeout(v)});var p=Ea();Xo("keydown",Rr,_);var m=qt(p),w=L(m),C=L(w),T=N(L(C)),H=L(T),ee=N(C,2),Y=N(w,2),_e=L(Y),ye=N(L(_e),2),q=L(ye);q.value=q.__value="add";var ht=N(q);ht.value=ht.__value="rename";var je=N(ht);je.value=je.__value="replace";var tn=N(je);tn.value=tn.__value="modifier";var An=N(tn);An.value=An.__value="migrate";var Tn=N(_e,2),On=L(Tn),nn=N(Y,2),cr=L(nn),Mn=N(nn,2);{var In=E=>{var B=ka();let A;var K=L(B);{var P=G=>{var D=el("No migratable style keys found on any included element. Apply will attach empty classes.");W(G,D)},J=G=>{var D=ya(),X=N(qt(D)),et=L(X),Pt=N(X);se(()=>{ce(et,g(u).willMigrate),ce(Pt,` 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=N(K,2);{var ke=G=>{var D=wa(),X=L(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(()=>A=ti(B,1,"rebemer-panel__notice",null,A,{"rebemer-panel__notice--warn":g(u).willSkip>0||g(u).willMigrate===0})),W(E,B)};ie(Mn,E=>{g(u)&&E(In)})}var Nn=N(Mn,2);_s(Nn,23,()=>g(s),E=>E.id,(E,B,A)=>{{let K=be(()=>g(B).id===t.rootId),P=be(()=>g(d).get(g(B).id)??"");ga(E,{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(A)]},set row(J){g(s)[g(A)]=J}})}});var dr=N(Nn,2),Rn=L(dr),y=N(Rn,2);gl(m,E=>Q(l,E),()=>g(l));var F=N(m,2);{var we=E=>{ba(E,{get kind(){return g(a).kind},get message(){return g(a).message},onDismiss:()=>{Q(a,null)}})};ie(F,E=>{g(a)&&E(we)})}se(()=>{ce(H,g(h)),On.disabled=g(r)==="modifier",ce(cr,n[g(r)])}),ft("click",ee,()=>t.onClose?.()),dl(ye,()=>g(r),E=>Q(r,E)),ps(On,()=>g(i),E=>Q(i,E)),ft("click",Rn,()=>t.onClose?.()),ft("click",y,b),W(e,p),Sn()}lr(["click"]);const yi="#bricks-structure",Ca="li[data-id]",wi="slashed-rebemer-host",xa=400,Aa=25,ur=(e,...t)=>console[e]("[reBEMer]",...t),Es=new AbortController,{signal:Qn}=Es,Mt=new Map;let an=null;function Ta(){let e=document.getElementById(wi);return e||(e=document.createElement("div"),e.id=wi,document.body.appendChild(e)),e}function ki(){const e=window.slashedBricksEditor;e&&typeof e=="object"&&Dl(e.showClassHints,e.classHints,{signal:Qn});let t=0;const n=()=>{if(!Qn.aborted){if(wl()){Oa();return}if(++t>=Aa){ur("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(n,xa)}};n()}function Oa(){const e=document.querySelector(yi);if(e){Ei(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(yi);n&&(t.disconnect(),Ei(n))});t.observe(document.body,{childList:!0,subtree:!0}),Qn.addEventListener("abort",()=>t.disconnect(),{once:!0})}function Ei(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,Si(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),Qn.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),Si(e)}function Si(e){for(const[n,r]of Mt)if(!r.host.isConnected){try{ar(r.instance)}catch(i){ur("warn","badge unmount failed",i)}Mt.delete(n)}const t=e.querySelectorAll(Ca);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const i=Mt.get(r);i&&i.host.isConnected&&n.contains(i.host)||Ma(n)}}function Ma(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=hs(jl,{target:i,props:{elementId:t,label:o,onActivate:Ia}}),l=Mt.get(t);if(l){try{ar(l.instance)}catch(c){ur("warn","badge remount cleanup failed",c)}l.host.isConnected&&l.host.remove()}Mt.set(t,{instance:a,host:i})}function Ia(e){Hr();const t=document.createElement("div");Ta().appendChild(t),an={instance:hs(Sa,{target:t,props:{rootId:e,onClose:Hr}}),node:t}}function Hr(){if(an){try{ar(an.instance)}catch(e){ur("warn","panel unmount failed",e)}an.node.remove(),an=null}}window.addEventListener("beforeunload",()=>{Es.abort(),Hr(),zn();for(const{instance:e}of Mt.values())try{ar(e)}catch{}Mt.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ki,{once:!0}):ki(); + creating a duplicate.`,1),da=V('

'),ha=V(' '),_a=V('Migrate: ',1),va=V('No migratable keys on this element.'),pa=V(' '),ga=V('
'),ma=V('
');function ba(e,t){kn(t,!0);let n=hn(t,"row",15),r=hn(t,"globalClasses",19,()=>[]),i=hn(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 _=ma();let v;var b=L(_),p=L(b),m=N(b,2),w=L(m),C=L(w),T=N(w,2),H=L(T),ee=N(T,2);{var Y=y=>{var F=ia();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=N(m,2),we=L(_e),q=L(we);{var _t=y=>{var F=sa(),Ee=L(F);se(()=>ce(Ee,g(l))),W(y,F)};ie(q,y=>{g(l)&&y(_t)})}var He=N(q,2),nn=N(we,2);{var An=y=>{var F=oa();se(()=>F.disabled=!n().include),ut("input",F,u),_i(F,()=>n().modifier,Ee=>n(n().modifier=Ee,!0)),W(y,F)};ie(nn,y=>{g(s)&&y(An)})}var Tn=N(_e,2);{var On=y=>{var F=la();W(y,F)};ie(Tn,y=>{g(s)&&n().include&&!n().modifier&&y(On)})}var rn=N(Tn,2);{var dr=y=>{var F=aa();W(y,F)},Mn=y=>{var F=fa(),Ee=L(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(rn,y=>{g(a)&&n().include&&n().currentClassCount===0?y(dr):g(a)&&n().include&&n().currentClassCount>1&&y(Mn,1)})}var In=N(rn,2);{var Nn=y=>{var F=da(),Ee=L(F);{var k=A=>{var K=ua(),P=N(Kt(K)),J=L(P);se(()=>ce(J,i())),W(A,K)},B=A=>{var K=ca(),P=N(Kt(K)),J=L(P);se(()=>ce(J,i())),W(A,K)};ie(Ee,A=>{g(o)?A(k):A(B,-1)})}W(y,F)};ie(In,y=>{g(h)&&y(Nn)})}var hr=N(In,2);{var Rn=y=>{var F=ga(),Ee=L(F);{var k=P=>{var J=_a(),j=N(Kt(J),2);_s(j,17,()=>n().migrateKeys,ll,(ke,G)=>{var D=ha(),X=L(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=va();W(P,J)};ie(Ee,P=>{n().migrateKeys?.length?P(k):P(B,-1)})}var A=N(Ee,2);{var K=P=>{var J=pa(),j=L(J);se(()=>ce(j,`${n().skippedKeys.length??""} skipped`)),W(P,J)};ie(A,P=>{n().skippedKeys?.length&&P(K)})}W(y,F)};ie(hr,y=>{g(o)&&n().include&&y(Rn)})}se(y=>{v=ti(_,1,"rebemer-row",null,v,{"rebemer-row--disabled":!n().include,"rebemer-row--suggested":g(c)}),hl(_,`--rebemer-row-depth: ${n().depth??0??""}`),ce(C,n().originalLabel),ce(H,y),Ot(He,"placeholder",t.isRoot?"block-name":"element-name"),He.disabled=!n().include},[()=>t.isRoot?"BLOCK":(n().bricksType||"ELEM").toUpperCase()]),ps(p,()=>n().include,y=>n(n().include=y,!0)),ut("input",He,u),_i(He,()=>n().name,y=>n(n().name=y,!0)),W(e,_),Sn()}ar(["input"]);var ya=V(" ");function wa(e,t){kn(t,!0);let n=hn(t,"kind",3,"info"),r=hn(t,"duration",3,3e3),i=oe(!0);Xr(()=>{if(!g(i)||r()<=0)return;const c=setTimeout(()=>{Q(i,!1),t.onDismiss?.()},r());return()=>clearTimeout(c)});const s=be(()=>n()==="error"?"alert":"status");var o=il(),a=Kt(o);{var l=c=>{var h=ya(),u=L(h);se(()=>{ti(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,()=>{Q(i,!1),t.onDismiss?.()}),W(c,h)};ie(a,c=>{g(i)&&c(l)})}W(e,o),Sn()}ar(["click"]);var Ea=V("Will migrate ",1),ka=V(' '),Sa=V(''),Ca=V(' ',1);function xa(e,t){kn(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 A of g(s))A.include&&(k+=A.migrateKeys?.length??0,B+=A.skippedKeys?.length??0);return{willMigrate:k,willSkip:B}}),d=be(()=>{if(g(s).length===0)return new Map;const k=ks({rootId:t.rootId,rows:g(s),mode:g(r)}),B=new Map;if(!k.ok)return B;for(const A of k.ops)B.set(A.row.id,A.finalClass);return B});wl(()=>{const k=Al(t.rootId);Q(o,bs().slice(),!0);const B=k.map((A,K)=>{const P=K===0,J=A.label||"",j=Mt(J),ke=A.name||"";let G,D;return j?(G=j,D="label"):P?(G="block",D="fallback"):ke&&!wr(ke)?(G=ta(ke,"item"),D="element-type"):(G="item",D="fallback"),{id:A.id,depth:A.depth,bricksType:ke,originalLabel:J||(P?"block":"element"),name:G,modifier:"",include:!0,suggestedFrom:D,migrateKeys:Ul(A.settings),skippedKeys:Vl(A.settings),currentClassCount:Array.isArray(A.settings?._cssGlobalClasses)?A.settings._cssGlobalClasses.filter(X=>typeof X=="string"&&X.length>0).length:0}});if(B.length>1){const A=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&&A.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 A){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=>wr(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(wr(tt.name)){const Dt=(A.get(D)??[]).map(Ts=>P.get(Ts)?.name??"").filter(Boolean),As=G.indexOf(D);X.name=ra(Dt,As,G.length),X.suggestedFrom="element-type"}else if((ke.get(tt.name)??0)===1){const Dt=na[tt.name];Dt&&(X.name=Dt,X.suggestedFrom="element-type")}}}}}Q(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=zl(k);if(!B.ok){Q(a,{kind:"error",message:B.reason},!0);return}const A=Jl({rootId:t.rootId,rows:g(s),mode:g(r),syncLabels:g(i)});A.ok?(Q(a,{kind:"success",message:`Applied to ${A.count} element${A.count!==1?"s":""}.`},!0),v&&clearTimeout(v),v=setTimeout(()=>t.onClose?.(),800)):Q(a,{kind:"error",message:A.error},!0)}Xr(()=>()=>{v&&clearTimeout(v)});var p=Ca();$o("keydown",Lr,_);var m=Kt(p),w=L(m),C=L(w),T=N(L(C)),H=L(T),ee=N(C,2),Y=N(w,2),_e=L(Y),we=N(L(_e),2),q=L(we);q.value=q.__value="add";var _t=N(q);_t.value=_t.__value="rename";var He=N(_t);He.value=He.__value="replace";var nn=N(He);nn.value=nn.__value="modifier";var An=N(nn);An.value=An.__value="migrate";var Tn=N(_e,2),On=L(Tn),rn=N(Y,2),dr=L(rn),Mn=N(rn,2);{var In=k=>{var B=Sa();let A;var K=L(B);{var P=G=>{var D=rl("No migratable style keys found on any included element. Apply will attach empty classes.");W(G,D)},J=G=>{var D=Ea(),X=N(Kt(D)),tt=L(X),Dt=N(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=N(K,2);{var ke=G=>{var D=ka(),X=L(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(()=>A=ti(B,1,"rebemer-panel__notice",null,A,{"rebemer-panel__notice--warn":g(u).willSkip>0||g(u).willMigrate===0})),W(k,B)};ie(Mn,k=>{g(u)&&k(In)})}var Nn=N(Mn,2);_s(Nn,23,()=>g(s),k=>k.id,(k,B,A)=>{{let K=be(()=>g(B).id===t.rootId),P=be(()=>g(d).get(g(B).id)??"");ba(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(A)]},set row(J){g(s)[g(A)]=J}})}});var hr=N(Nn,2),Rn=L(hr),y=N(Rn,2);yl(m,k=>Q(l,k),()=>g(l));var F=N(m,2);{var Ee=k=>{wa(k,{get kind(){return g(a).kind},get message(){return g(a).message},onDismiss:()=>{Q(a,null)}})};ie(F,k=>{g(a)&&k(Ee)})}se(()=>{ce(H,g(h)),On.disabled=g(r)==="modifier",ce(dr,n[g(r)])}),ut("click",ee,()=>t.onClose?.()),vl(we,()=>g(r),k=>Q(r,k)),ps(On,()=>g(i),k=>Q(i,k)),ut("click",Rn,()=>t.onClose?.()),ut("click",y,b),W(e,p),Sn()}ar(["click"]);const yi="#bricks-structure",Aa="li[data-id]",wi="slashed-rebemer-host",Ta=400,Oa=25,cr=(e,...t)=>console[e]("[reBEMer]",...t),xs=new AbortController,{signal:$n}=xs,It=new Map;let fn=null;function Ma(){let e=document.getElementById(wi);return e||(e=document.createElement("div"),e.id=wi,document.body.appendChild(e)),e}function Ei(){const e=window.slashedBricksEditor;e&&typeof e=="object"&&Bl(e.showClassHints,e.classHints,{signal:$n});let t=0;const n=()=>{if(!$n.aborted){if(Sl()){Ia();return}if(++t>=Oa){cr("warn","Bricks Vue app not detected after grace window — reBEMer disabled on this page.");return}setTimeout(n,Ta)}};n()}function Ia(){const e=document.querySelector(yi);if(e){ki(e);return}const t=new MutationObserver(()=>{const n=document.querySelector(yi);n&&(t.disconnect(),ki(n))});t.observe(document.body,{childList:!0,subtree:!0}),$n.addEventListener("abort",()=>t.disconnect(),{once:!0})}function ki(e){let t=null;const n=()=>{t===null&&(t=setTimeout(()=>{t=null,Si(e)},50))},r=new MutationObserver(n);r.observe(e,{childList:!0,subtree:!0}),$n.addEventListener("abort",()=>{r.disconnect(),t!==null&&clearTimeout(t)},{once:!0}),Si(e)}function Si(e){for(const[n,r]of It)if(!r.host.isConnected){try{fr(r.instance)}catch(i){cr("warn","badge unmount failed",i)}It.delete(n)}const t=e.querySelectorAll(Aa);for(const n of t){const r=n.getAttribute("data-id");if(!r)continue;const i=It.get(r);i&&i.host.isConnected&&n.contains(i.host)||Na(n)}}function Na(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=hs(ql,{target:i,props:{elementId:t,label:o,onActivate:Ra}}),l=It.get(t);if(l){try{fr(l.instance)}catch(c){cr("warn","badge remount cleanup failed",c)}l.host.isConnected&&l.host.remove()}It.set(t,{instance:a,host:i})}function Ra(e){Hr();const t=document.createElement("div");Ma().appendChild(t),fn={instance:hs(xa,{target:t,props:{rootId:e,onClose:Hr}}),node:t}}function Hr(){if(fn){try{fr(fn.instance)}catch(e){cr("warn","panel unmount failed",e)}fn.node.remove(),fn=null}}window.addEventListener("beforeunload",()=>{xs.abort(),Hr(),zn();for(const{instance:e}of It.values())try{fr(e)}catch{}It.clear()},{once:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ei,{once:!0}):Ei(); //# sourceMappingURL=app.js.map diff --git a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js index 4c310f35..2a4f5b4c 100644 --- a/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js +++ b/plugins/SLASHED-for-WP/integrations/bricks/editor-app/src/lib/class-hints.js @@ -212,6 +212,32 @@ function onMouseOut(event) { hide(); } +// Mirror the hover handlers for keyboard users: a class label focused +// via Tab gets the same tooltip a mouse hover would surface. +function onFocusIn(event) { + const target = event.target; + if (!(target instanceof Element)) return; + if (target.closest(`#${HOST_ID}`)) return; + if (!target.closest(BRICKS_CONTAINERS.join(','))) { + if (_currentTarget) hide(); + return; + } + const match = findHintTarget(target); + if (!match) { + if (_currentTarget) hide(); + return; + } + if (match.el === _currentTarget) return; + show(match.el, match.hint); +} + +function onFocusOut(event) { + if (!_currentTarget) return; + const to = event.relatedTarget; + if (to instanceof Node && _currentTarget.contains(to)) return; + hide(); +} + function onKeyDown(event) { if (event.key === 'Escape') hide(); } @@ -241,6 +267,8 @@ export function init(enabled, hints, options = {}) { document.addEventListener('mouseover', onMouseOver, opts); document.addEventListener('mouseout', onMouseOut, opts); + document.addEventListener('focusin', onFocusIn, opts); + document.addEventListener('focusout', onFocusOut, opts); document.addEventListener('keydown', onKeyDown, opts); // The tooltip is anchored to a fixed viewport position; hide it on // scroll rather than chase a moving target.