From 7e2de7b07701b168bb3cb6a5fedb73346fd78394 Mon Sep 17 00:00:00 2001 From: chaxus Date: Sun, 18 Oct 2026 22:54:52 +0800 Subject: [PATCH 1/7] fix(assistant): anchor speech disclosures and coordinate menus --- lib/agent-plugin/ui/speech-input.ts | 8 ++------ test/unit/agent-speech-input.test.ts | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/agent-plugin/ui/speech-input.ts b/lib/agent-plugin/ui/speech-input.ts index c96de9613..eab5ad6cc 100644 --- a/lib/agent-plugin/ui/speech-input.ts +++ b/lib/agent-plugin/ui/speech-input.ts @@ -99,12 +99,6 @@ export function mountSpeechInput(chat: SpeechComposer, allowed: () => boolean) { const bindPopup = () => { const popup = privacy.popoverContent; if (!popup) return; - // Keep the disclosure above the whole draft rather than over editable text. - const composer = root.closest('.cui-composer'); - if (composer) { - const clearance = privacy.getBoundingClientRect().top - composer.getBoundingClientRect().top; - popup.style.translate = `0 ${-Math.max(0, clearance)}px`; - } if (popup === boundPopup) return; boundPopup = popup; popup.classList.add('agent-speech-popover'); @@ -132,10 +126,12 @@ export function mountSpeechInput(chat: SpeechComposer, allowed: () => boolean) { scheduleDisclosure(); }; privacy.addEventListener('show', () => { + language.removeAttribute('open'); privacyToggle.setAttribute('aria-expanded', 'true'); bindPopup(); scheduleDisclosure(); }); + language.addEventListener('show', () => privacy.removeAttribute('open')); privacy.addEventListener('hide', () => { privacyToggle.setAttribute('aria-expanded', 'false'); pauseDisclosure(); diff --git a/test/unit/agent-speech-input.test.ts b/test/unit/agent-speech-input.test.ts index 2e1efe9a2..b2f4bd56c 100644 --- a/test/unit/agent-speech-input.test.ts +++ b/test/unit/agent-speech-input.test.ts @@ -297,6 +297,26 @@ it('dismisses speech privacy with Escape before cancelling active dictation', () expect(speech.isBusy()).toBe(false); }); +it('closes the speech disclosure as soon as the language menu opens', () => { + const { el, speech } = setup(); + const privacy = el.querySelector('.agent-speech-privacy')!; + const language = el.querySelector('.agent-speech-language')!; + expect(privacy.hasAttribute('open')).toBe(true); + language.dispatchEvent(new Event('show')); + expect(privacy.hasAttribute('open')).toBe(false); + expect(speech.isBusy()).toBe(true); +}); + +it('closes the language menu when the speech disclosure opens', () => { + const { el } = setup(); + const privacy = el.querySelector('.agent-speech-privacy')!; + const language = el.querySelector('.agent-speech-language')!; + privacy.removeAttribute('open'); + language.setAttribute('open', ''); + privacy.dispatchEvent(new Event('show')); + expect(language.hasAttribute('open')).toBe(false); +}); + it('expires the initial speech disclosure without ending listening', () => { vi.useFakeTimers(); try { From 415bd1c473a1a2729bc140a414994b56fd3d82f2 Mon Sep 17 00:00:00 2001 From: chaxus Date: Sun, 18 Oct 2026 22:54:52 +0800 Subject: [PATCH 2/7] fix(assistant): clarify controls and restore text insets --- lib/agent-plugin/ui/artifacts-view.ts | 14 ++- styles/assistant.css | 82 +++++++++++++---- test/e2e/agent-interface-affordances.spec.ts | 95 ++++++++++++++++++++ 3 files changed, 170 insertions(+), 21 deletions(-) create mode 100644 test/e2e/agent-interface-affordances.spec.ts diff --git a/lib/agent-plugin/ui/artifacts-view.ts b/lib/agent-plugin/ui/artifacts-view.ts index fa45f5004..7a495906a 100644 --- a/lib/agent-plugin/ui/artifacts-view.ts +++ b/lib/agent-plugin/ui/artifacts-view.ts @@ -434,16 +434,22 @@ export function createArtifactsView(options: { const data = document.createElement('textarea'); data.maxLength = 262144; const importForm = document.createElement('div'); - importForm.className = 'agent-artifact-editor'; + importForm.className = 'agent-artifact-editor agent-artifact-import'; body.append(importForm); data.setAttribute('aria-label', labels.import); - data.placeholder = labels.importHint; + data.placeholder = labels.import; const hint = document.createElement('p'); hint.textContent = labels.importHint; importForm.append( - title, + View('label') + .class('agent-artifact-import-field') + .children(View('span').text(labels.titleField), title) + .build(), hint, - data, + View('label') + .class('agent-artifact-import-field') + .children(View('span').text(labels.import), data) + .build(), button('saveNew', () => { void perform(async () => { let envelope: { schemaVersion?: unknown; payload?: unknown }; diff --git a/styles/assistant.css b/styles/assistant.css index a9c6fd3ea..df167b9d5 100644 --- a/styles/assistant.css +++ b/styles/assistant.css @@ -791,6 +791,7 @@ r-dropdown[role='listbox'] { gap: calc(var(--ran-space-1) / 2); } .agent-panel-header .agent-panel-title { + display: block; flex: 1; width: auto; justify-content: flex-start; @@ -800,6 +801,10 @@ r-dropdown[role='listbox'] { font-size: var(--ran-text-copy-2); letter-spacing: -0.02em; min-width: 0; + padding-inline: var(--ran-space-2); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; color: var(--ran-color-text); background: transparent; } @@ -922,29 +927,52 @@ r-dropdown[role='listbox'] { font-size: var(--ran-text-label-3); } .agent-enable-switch { - width: 40px; - height: 24px; + --agent-switch-track-width: calc(var(--ran-size-3) * 2); + --agent-switch-track-height: var(--ran-size-4); + --agent-switch-thumb-size: var(--ran-size-2); + --agent-switch-inset: calc((var(--agent-switch-track-height) - var(--agent-switch-thumb-size)) / 2); + position: relative; + width: calc(var(--ran-size-7) + var(--ran-size-1)); + height: var(--ran-size-7); flex: 0 0 auto; border: 0; border-radius: var(--ran-radius-full); - padding: calc(var(--ran-space-3) / 4); - background: var(--ran-color-text-disabled); + padding: 0; + background: transparent; cursor: pointer; } .agent-enable-switch::before { content: ''; display: block; - width: 18px; - height: 18px; + position: absolute; + z-index: 1; + top: 50%; + inset-inline-start: calc((100% - var(--agent-switch-track-width)) / 2 + var(--agent-switch-inset)); + translate: 0 -50%; + width: var(--agent-switch-thumb-size); + height: var(--agent-switch-thumb-size); border-radius: 50%; background: var(--ran-color-bg-elevated); transition: transform var(--ran-motion-duration-base); } -.agent-enable-switch[aria-checked='true'] { +.agent-enable-switch::after { + content: ''; + position: absolute; + top: 50%; + inset-inline-start: 50%; + translate: -50% -50%; + width: var(--agent-switch-track-width); + height: var(--agent-switch-track-height); + border-radius: inherit; + background: var(--ran-color-text-disabled); +} +.agent-enable-switch[aria-checked='true']::after { background: var(--ran-color-primary); } .agent-enable-switch[aria-checked='true']::before { - transform: translateX(16px); + transform: translateX( + calc(var(--agent-switch-track-width) - var(--agent-switch-thumb-size) - var(--agent-switch-inset) * 2) + ); } .agent-enable-switch:disabled { opacity: 0.5; @@ -1849,10 +1877,10 @@ r-dropdown[role='listbox'] { align-items: center; text-align: start; min-height: var(--ran-size-7); - padding: var(--ran-space-2) 0; - border: 0; + padding: var(--ran-space-2) var(--ran-space-3); + border: 1px solid var(--ran-color-border); border-radius: var(--ran-radius-sm); - background: transparent; + background: var(--ran-color-bg-elevated); color: var(--ran-color-text); font: inherit; cursor: pointer; @@ -1863,12 +1891,6 @@ r-dropdown[role='listbox'] { --agent-task-action-transition: none; transition: var(--agent-task-action-transition); } -.agent-panel .agent-task-action::after { - content: '↗'; - margin-inline-start: auto; - padding-inline-start: var(--ran-space-3); - color: var(--ran-color-text-secondary); -} .agent-panel .agent-task-action:hover { background: var(--ran-color-bg-muted); } @@ -2168,6 +2190,11 @@ r-dropdown[role='listbox'] { cursor: pointer; text-align: start; } +.agent-workspace-view button, +.agent-artifacts button { + border: 1px solid var(--ran-color-border); + background: var(--ran-color-bg-elevated); +} .agent-panel .cui-composer .agent-sources-toggle { min-height: var(--ran-size-7); padding: var(--ran-space-1) var(--ran-space-2); @@ -2243,14 +2270,17 @@ r-dropdown[role='listbox'] { } .agent-artifacts button:is([data-action='saveVersion'], [data-action='saveNew'], [data-action='accept']):enabled { background: var(--ran-color-primary); + border-color: var(--ran-color-primary); color: var(--ran-color-primary-text); } .agent-artifacts button:is([data-action='saveVersion'], [data-action='saveNew'], [data-action='accept']):hover:enabled { background: var(--ran-color-primary-hover); + border-color: var(--ran-color-primary-hover); } .agent-artifacts button:is([data-action='saveVersion'], [data-action='saveNew'], [data-action='accept']):active:enabled { background: var(--ran-color-primary-active); + border-color: var(--ran-color-primary-active); } .agent-history-options button:is(.agent-history-delete-current, .agent-history-delete-all, .agent-history-confirm):enabled, @@ -2266,6 +2296,10 @@ r-dropdown[role='listbox'] { font-size: var(--ran-text-label-2); } @media (pointer: coarse) { + .agent-enable-switch { + min-width: var(--app-control-touch); + min-height: var(--app-control-touch); + } .agent-panel :is(.agent-workspace-view, .agent-artifacts, .agent-history-options, .agent-view-header) button { min-height: var(--app-control-touch); min-width: var(--app-control-touch); @@ -2351,6 +2385,20 @@ r-dropdown[role='listbox'] { outline: 2px solid var(--ran-color-primary); outline-offset: 3px; } +.agent-artifact-import-field { + display: grid; + gap: var(--ran-space-2); + margin-block: var(--ran-space-3); + font-size: var(--ran-text-label-3); +} +.agent-artifact-import-field textarea { + min-height: 8em; + max-height: 40vh; +} +.agent-artifact-import-field :is(input, textarea):focus-visible { + outline: 2px solid var(--ran-color-primary); + outline-offset: 2px; +} .agent-artifact-actions button[data-action='apply'] { color: var(--ran-color-primary); font-weight: 600; diff --git a/test/e2e/agent-interface-affordances.spec.ts b/test/e2e/agent-interface-affordances.spec.ts new file mode 100644 index 000000000..4f28ee169 --- /dev/null +++ b/test/e2e/agent-interface-affordances.spec.ts @@ -0,0 +1,95 @@ +import { expect, test } from './lib/l0'; + +test.beforeEach(async ({ page }) => { + await page.addInitScript(() => localStorage.setItem('document-assistant-enabled', 'true')); + await page.goto('/editor?new=docx&locale=en'); + await page.waitForFunction(() => Boolean(window.__ooFrames.readyEditor())); + await page.frameLocator('iframe[name="frameEditor"]').locator('.agent-sidebar-entry').click(); + await page.locator('.agent-runtime-panel .agent-panel-title').click(); +}); + +for (const width of [360, 1280]) { + for (const theme of ['light', 'dark'] as const) { + test(`text controls and import fields remain recognizable at ${width}px in ${theme}`, async ({ page }, info) => { + await page.setViewportSize({ width, height: 900 }); + await page.emulateMedia({ colorScheme: theme }); + for (const selector of ['.agent-panel-title', '.agent-task-action']) { + const button = page.locator(`.agent-runtime-panel ${selector}`).first(); + await button.hover(); + const insets = await button.evaluate((el) => { + const style = getComputedStyle(el); + return [parseFloat(style.paddingInlineStart), parseFloat(style.paddingInlineEnd)]; + }); + expect(Math.min(...insets)).toBeGreaterThanOrEqual(8); + } + await page.locator('.agent-runtime-panel').screenshot({ path: info.outputPath(`chat-${width}-${theme}.png`) }); + await page.locator('.agent-workspace-toggle').click(); + const artifacts = page.locator('.agent-artifacts'); + const command = artifacts.getByRole('button', { name: 'Import structured result', exact: true }); + await expect(command).toHaveCSS('border-top-width', '1px'); + await command.click(); + const title = artifacts.getByRole('textbox', { name: 'Title', exact: true }); + const payload = artifacts.getByRole('textbox', { name: 'Import structured result', exact: true }); + for (const field of [title, payload]) { + await expect(field).toHaveCSS('border-top-width', '1px'); + expect( + await field.evaluate((el) => parseFloat(getComputedStyle(el).paddingInlineStart)), + ).toBeGreaterThanOrEqual(8); + } + await title.fill('Quarterly notes'); + await payload.fill('{"schemaVersion":1,"payload":{"kind":"table","columns":["Name"],"rows":[["Value"]]}}'); + await expect(artifacts.getByRole('button', { name: 'Save as new artifact', exact: true })).toBeEnabled(); + expect(await artifacts.evaluate((el) => el.scrollWidth - el.clientWidth)).toBeLessThan(2); + await page.locator('.agent-runtime-panel').screenshot({ path: info.outputPath(`import-${width}-${theme}.png`) }); + }); + } + + test(`speech overlays stay anchored and mutually exclusive at ${width}px`, async ({ page }, info) => { + await page.setViewportSize({ width, height: 900 }); + const privacy = page.locator('.agent-speech-privacy'); + const toggle = privacy.locator('button'); + const language = page.locator('.agent-speech-language'); + const popup = page.locator('.agent-speech-popover'); + await toggle.click(); + await expect(popup).toBeVisible(); + await expect + .poll(async () => { + const anchor = (await toggle.boundingBox())!; + const panel = (await popup.boundingBox())!; + return anchor.y - panel.y - panel.height; + }) + .toBeLessThanOrEqual(12); + const panel = (await popup.boundingBox())!; + expect(panel.x).toBeGreaterThanOrEqual(0); + expect(panel.x + panel.width).toBeLessThanOrEqual(width); + await page.locator('.agent-runtime-panel').screenshot({ path: info.outputPath(`speech-${width}.png`) }); + await language.click(); + await expect(language).toHaveAttribute('open', ''); + await expect(privacy).not.toHaveAttribute('open', ''); + await expect(popup).not.toBeVisible(); + await language.press('Escape'); + await expect(language).not.toHaveAttribute('open', ''); + await toggle.focus(); + await toggle.press('Enter'); + await expect(privacy).toHaveAttribute('open', ''); + await toggle.press('Escape'); + await expect(privacy).not.toHaveAttribute('open', ''); + await expect(toggle).toBeFocused(); + }); +} + +test.describe('touch controls', () => { + test.use({ hasTouch: true, viewport: { width: 360, height: 800 } }); + test('assistant switch keeps a full touch target around its compact track', async ({ page }) => { + await page.locator('.agent-panel-settings-toggle').click(); + await page.getByText('More settings', { exact: true }).click(); + const toggle = page.getByRole('switch', { name: 'Enable AI assistant', exact: true }); + await toggle.scrollIntoViewIfNeeded(); + const box = (await toggle.boundingBox())!; + expect(box.width).toBeGreaterThanOrEqual(44); + expect(box.height).toBeGreaterThanOrEqual(44); + await toggle.focus(); + await expect(toggle).toBeFocused(); + await expect(toggle).toHaveAttribute('aria-checked', 'true'); + }); +}); From 60c6bd01882f9e9aa97c5284aca3feb130ada91b Mon Sep 17 00:00:00 2001 From: chaxus Date: Sun, 18 Oct 2026 23:00:16 +0800 Subject: [PATCH 3/7] test(assistant): preserve touch targets and update layout assertions --- styles/assistant.css | 1 + test/e2e/agent-interface-affordances.spec.ts | 10 ++++++++++ test/e2e/agent-sidebar-layout.spec.ts | 19 +++++++++++-------- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/styles/assistant.css b/styles/assistant.css index df167b9d5..113ab7885 100644 --- a/styles/assistant.css +++ b/styles/assistant.css @@ -2307,6 +2307,7 @@ r-dropdown[role='listbox'] { .agent-workspace-view input:not([type='checkbox']):not([type='radio']):not([type='file']), .agent-artifact-editor > select, .agent-artifact-editor > input, + .agent-artifact-import-field > input, .agent-artifact-workflow form input, .agent-history-search-row { min-height: var(--app-control-touch); diff --git a/test/e2e/agent-interface-affordances.spec.ts b/test/e2e/agent-interface-affordances.spec.ts index 4f28ee169..3edfedacd 100644 --- a/test/e2e/agent-interface-affordances.spec.ts +++ b/test/e2e/agent-interface-affordances.spec.ts @@ -91,5 +91,15 @@ test.describe('touch controls', () => { await toggle.focus(); await expect(toggle).toBeFocused(); await expect(toggle).toHaveAttribute('aria-checked', 'true'); + await toggle.click({ position: { x: box.width / 2, y: 2 } }); + await expect.poll(() => page.evaluate(() => localStorage.getItem('document-assistant-enabled'))).toBe('false'); + }); + test('structured import keeps a full touch target after labeling the title field', async ({ page }) => { + await page.locator('.agent-workspace-toggle').click(); + await page.getByRole('button', { name: 'Import structured result', exact: true }).click(); + const title = page.getByRole('textbox', { name: 'Title', exact: true }); + expect((await title.boundingBox())!.height).toBeGreaterThanOrEqual(44); + await title.fill('Touch import'); + await expect(title).toHaveValue('Touch import'); }); }); diff --git a/test/e2e/agent-sidebar-layout.spec.ts b/test/e2e/agent-sidebar-layout.spec.ts index d7e55a5ea..f042668e2 100644 --- a/test/e2e/agent-sidebar-layout.spec.ts +++ b/test/e2e/agent-sidebar-layout.spec.ts @@ -8,18 +8,21 @@ for (const width of [320, 1280]) { await page.waitForFunction(() => Boolean(window.__ooFrames.readyEditor())); await page.frameLocator('iframe[name="frameEditor"]').locator('.agent-sidebar-entry').click(); const switchGeometry = await page.locator('.agent-onboarding .agent-enable-switch').evaluate((el) => { - const track = getComputedStyle(el); + const track = getComputedStyle(el, '::after'); const knob = getComputedStyle(el, '::before'); return { height: el.getBoundingClientRect().height, - top: Number.parseFloat(track.paddingTop), - bottom: Number.parseFloat(track.paddingBottom), + trackHeight: Number.parseFloat(track.height), + trackTop: Number.parseFloat(track.top), + knobTop: Number.parseFloat(knob.top), knob: Number.parseFloat(knob.height), }; }); - expect(switchGeometry.top).toBe(3); - expect(switchGeometry.top).toBe(switchGeometry.bottom); - expect(switchGeometry.top + switchGeometry.knob + switchGeometry.bottom).toBe(switchGeometry.height); + expect(switchGeometry.height).toBeGreaterThanOrEqual(32); + expect(switchGeometry.trackHeight).toBeLessThanOrEqual(switchGeometry.height); + expect(switchGeometry.knob).toBeLessThan(switchGeometry.trackHeight); + expect(switchGeometry.trackTop).toBe(switchGeometry.height / 2); + expect(switchGeometry.knobTop).toBe(switchGeometry.trackTop); await page.locator('.agent-onboarding .agent-enable-switch').click(); const panel = page.locator('.agent-runtime-panel'); await expect(panel).toHaveAttribute('data-view', 'settings'); @@ -28,8 +31,8 @@ for (const width of [320, 1280]) { await expect(page.locator('.cui-composer')).toBeVisible(); await expect(page.locator('.cui-empty')).toBeVisible(); const suggestion = page.locator('.agent-task-action').first(); - await expect(suggestion).toHaveCSS('border-top-width', '0px'); - await expect(suggestion).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)'); + await expect(suggestion).toHaveCSS('border-top-width', '1px'); + await expect(suggestion).not.toHaveCSS('background-color', 'rgba(0, 0, 0, 0)'); await page.locator('.agent-runtime-panel').screenshot({ path: testInfo.outputPath(`empty-${width}.png`) }); const alignment = await page.locator('.agent-runtime-panel').evaluate((panel) => { const left = (selector: string) => panel.querySelector(selector)!.getBoundingClientRect().left; From 028c1f689513d5c43025f25855a4d01b60a4683d Mon Sep 17 00:00:00 2001 From: chaxus Date: Sun, 18 Oct 2026 23:07:08 +0800 Subject: [PATCH 4/7] docs(assistant): record screenshot audit findings and validation --- .../2026-10-18-assistant-design-audit.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/explorations/2026-10-18-assistant-design-audit.md b/docs/explorations/2026-10-18-assistant-design-audit.md index 7eceb7755..3ca9123b8 100644 --- a/docs/explorations/2026-10-18-assistant-design-audit.md +++ b/docs/explorations/2026-10-18-assistant-design-audit.md @@ -102,3 +102,47 @@ stronger fill. announcing streamed tokens would break INTERACTION §3's "do not announce every streamed character". Adding one needs a design decision about what a polite announcement says when the answer is still being written. + +## Screenshot follow-up: text insets, disclosures and action affordances + +The screenshot review exposed five remaining usability defects. This follow-up starts +from document `d8ce247e` and ran `d7e324cc`; each repository carries its own PR and +retains separate implementation and regression-test commits. + +| Reported symptom | Reproduced cause | Change and owner | +| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| Header title touches its hover background | The text button has no inline padding | document: an 8px inline inset with ellipsis for long titles | +| Suggested task text touches both edges | Task rows use vertical padding only | document: 12px inline padding, an explicit border and surface fill | +| Speech privacy disclosure is too far above the icon | Application code adds a second upward translation after ranui positions the popup; the measured gap is about 52px | document: remove the extra translation and use the component's 8px anchor gap | +| Language menu and privacy disclosure overlap | Both controls can retain `open`; bubble-phase outside listeners also miss propagation-stopping clicks | document: mutually exclusive public `show`/`open` handling; ran: shared capture-based outside dismissal | +| Artifact import looks like ordinary text | The action has no border or fill; its form inherits the borderless artifact editor treatment | document: distinguish workspace actions and give the import form visible field labels, borders and text insets | + +The same review covered adjacent workspace actions, model settings, sources, artifacts, +composer controls, focus rings and touch geometry. The assistant enable switch keeps its +compact 40×24px track inside a 48×32px button, growing to at least 44px tall for coarse +pointers. The structured-import title field also retains a 44px touch target after being +wrapped in a visible label. Existing native labels, accessible names and disabled states +remain in use. + +The ran fix belongs to the shared floating controller rather than an application-specific +position override. Outside clicks dismiss sibling Select/Popover controls in either order; +clicks inside a nested portaled menu preserve its ancestor. A node-owned `Symbol.for` +records logical ownership across independently loaded component bundles. Local shadow-root +capture classifies events hidden by a closed root, while a document fallback handles clicks +outside that root. Listener teardown and pending fallback decisions are guarded against +disconnection and newer open/close transitions. + +Verification for the application follow-up: + +- Full unit suite: 252 files, 6,799 tests passed. +- Focused browser regression: 30 tests passed, including the new screenshot cases plus + sidebar layout, workspace consistency, sources/artifacts and composer behavior. +- Rendered checks include 360px/1280px, light/dark, keyboard activation/Escape/focus return, + touch hit targets, import validation and popup anchor distance. +- Type checking and the repository archive/format checks are part of the PR validation. + +The application still uses its pinned `ranui@0.5.0-alpha.6`: its disclosure coordination +uses existing public APIs and works independently of a future ranui release. The component +PR does not publish an npm version or change document's dependency lockfile. This follow-up +changes presentation and local floating interaction; model requests, persistence formats +and account-free frontend operation are unaffected. From 0392ed9322bc92750122bd1ea41f5b4a689d7b81 Mon Sep 17 00:00:00 2001 From: chaxus Date: Sun, 18 Oct 2026 23:29:41 +0800 Subject: [PATCH 5/7] test(assistant): click the visible draft outside speech disclosures --- test/e2e/agent-dictation.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/agent-dictation.spec.ts b/test/e2e/agent-dictation.spec.ts index dbf20603c..76315e355 100644 --- a/test/e2e/agent-dictation.spec.ts +++ b/test/e2e/agent-dictation.spec.ts @@ -283,8 +283,11 @@ for (const ext of ['docx', 'xlsx', 'pptx', 'pdf'] as const) { await expect(liveStatus).toContainText('Microphone permission denied'); await privacyToggle.click(); await expect(page.locator('.agent-speech-hint')).toContainText('Microphone permission denied'); - await input.click(); + // The anchored disclosure can cover the center of a tall draft. Click + // the visible text inset to exercise an actual outside click. + await input.click({ position: { x: 8, y: 8 } }); await expect(disclosure).not.toHaveAttribute('open'); + await expect(input).toBeFocused(); await page.locator('.agent-speech-mic').click(); await page.locator('.agent-speech-cancel').click(); await expect(input).toHaveValue(longDraft); From d0ef4a0bd598d2d446fc61d230e772890132363f Mon Sep 17 00:00:00 2001 From: chaxus Date: Mon, 19 Oct 2026 09:58:19 +0800 Subject: [PATCH 6/7] build(deps): adopt stable ranui and ranuts releases --- Dockerfile | 2 +- package.json | 6 +- packages/chat-ui/package.json | 4 +- packages/converter/package.json | 4 +- packages/shared/package.json | 2 +- pnpm-lock.yaml | 1061 +------------------------------ pnpm-workspace.yaml | 1 + 7 files changed, 39 insertions(+), 1041 deletions(-) diff --git a/Dockerfile b/Dockerfile index 058f4c238..20c9e554b 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=22 +ARG NODE_VERSION=24 FROM node:${NODE_VERSION} AS builder WORKDIR /app diff --git a/package.json b/package.json index 847d6ff7e..b3332a1fc 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "test:archive": "node bin/evaluation-archive.mjs" }, "engines": { - "node": ">=20.19.0" + "node": ">=24.0.0" }, "keywords": [ "onlyoffice", @@ -81,7 +81,7 @@ "@ranuts/converter": "workspace:*", "@ranuts/shared": "workspace:*", "pdfjs-dist": "5.4.624", - "ranui": "0.5.0-alpha.6", - "ranuts": "0.4.1-alpha.2" + "ranui": "0.5.0", + "ranuts": "0.5.0" } } diff --git a/packages/chat-ui/package.json b/packages/chat-ui/package.json index d24a3c40b..9e449c5a1 100644 --- a/packages/chat-ui/package.json +++ b/packages/chat-ui/package.json @@ -23,8 +23,8 @@ }, "dependencies": { "marked": "16.4.2", - "ranui": "0.5.0-alpha.6", - "ranuts": "0.4.1-alpha.2" + "ranui": "0.5.0", + "ranuts": "0.5.0" }, "devDependencies": { "typescript": "^6.0.3" diff --git a/packages/converter/package.json b/packages/converter/package.json index c91dfef50..6ddecb87a 100644 --- a/packages/converter/package.json +++ b/packages/converter/package.json @@ -23,8 +23,8 @@ }, "dependencies": { "@ranuts/shared": "workspace:*", - "ranui": "0.5.0-alpha.6", - "ranuts": "0.4.1-alpha.2" + "ranui": "0.5.0", + "ranuts": "0.5.0" }, "devDependencies": { "typescript": "^6.0.3" diff --git a/packages/shared/package.json b/packages/shared/package.json index 7466ea550..9fbdd095a 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -38,7 +38,7 @@ "prepare": "tsc -p tsconfig.json" }, "dependencies": { - "ranuts": "0.4.1-alpha.2" + "ranuts": "0.5.0" }, "devDependencies": { "typescript": "^6.0.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0be0e178..bd935ccf8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,11 +37,11 @@ importers: specifier: 5.4.624 version: 5.4.624 ranui: - specifier: 0.5.0-alpha.6 - version: 0.5.0-alpha.6(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) + specifier: 0.5.0 + version: 0.5.0 ranuts: - specifier: 0.4.1-alpha.2 - version: 0.4.1-alpha.2 + specifier: 0.5.0 + version: 0.5.0 devDependencies: '@playwright/test': specifier: ^1.64.0 @@ -108,11 +108,11 @@ importers: specifier: 16.4.2 version: 16.4.2 ranui: - specifier: 0.5.0-alpha.6 - version: 0.5.0-alpha.6(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) + specifier: 0.5.0 + version: 0.5.0 ranuts: - specifier: 0.4.1-alpha.2 - version: 0.4.1-alpha.2 + specifier: 0.5.0 + version: 0.5.0 devDependencies: typescript: specifier: ^6.0.3 @@ -124,11 +124,11 @@ importers: specifier: workspace:* version: link:../shared ranui: - specifier: 0.5.0-alpha.6 - version: 0.5.0-alpha.6(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) + specifier: 0.5.0 + version: 0.5.0 ranuts: - specifier: 0.4.1-alpha.2 - version: 0.4.1-alpha.2 + specifier: 0.5.0 + version: 0.5.0 devDependencies: typescript: specifier: ^6.0.3 @@ -137,8 +137,8 @@ importers: packages/shared: dependencies: ranuts: - specifier: 0.4.1-alpha.2 - version: 0.4.1-alpha.2 + specifier: 0.5.0 + version: 0.5.0 devDependencies: typescript: specifier: ^6.0.3 @@ -146,8 +146,9 @@ importers: packages: - '@antfu/install-pkg@2.1.0': - resolution: {integrity: sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw==} + '@alixex/ranview@0.2.0': + resolution: {integrity: sha512-0amq1DhpdJQiwGBe0n5CwsrgJvv0GuTuF1wDw+SPePPh9MdoP+pk2SY5E1I8MJ6wvC8beIWxII12KIbfbgIjRw==} + engines: {node: '>=24.0.0'} '@anthropic-ai/sdk@0.106.0': resolution: {integrity: sha512-ufwVvYNDBj2dzOGupBCTaNzBLxqcTnGOzI4z8Wouxlt+mT3J3HuOmatgCy1VmwCHOUueqZ41ERhm0O99OUcbWA==} @@ -191,9 +192,6 @@ packages: resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} - '@braintree/sanitize-url@7.1.2': - resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} - '@bramus/specificity@2.4.3': resolution: {integrity: sha512-0GEz8qJWokkUVYQYRukmkSHIFNoBH8QTreeHrAFbvz1XFYc3Y+puhMs8PQ5x8GNugiC2l5jvDBXKLbBIByeSBw==} hasBin: true @@ -201,9 +199,6 @@ packages: '@cfworker/json-schema@4.1.1': resolution: {integrity: sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==} - '@chevrotain/types@11.1.2': - resolution: {integrity: sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==} - '@csstools/color-helpers@6.1.2': resolution: {integrity: sha512-grhRy3OKmniaAEKXMjua5z/EODX0MSqBGjunw8+j/3HQjOnahs2AGhvEOIYVUWcU6ScApbhLhVrQTX8XqrMrow==} engines: {node: '>=20.19.0'} @@ -249,12 +244,6 @@ packages: '@noble/hashes': optional: true - '@iconify/types@2.0.0': - resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} - - '@iconify/utils@3.1.7': - resolution: {integrity: sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w==} - '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} @@ -284,9 +273,6 @@ packages: '@lit/reactive-element@2.1.2': resolution: {integrity: sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A==} - '@mermaid-js/parser@1.2.1': - resolution: {integrity: sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==} - '@mlc-ai/web-llm@0.2.85': resolution: {integrity: sha512-CwUiSAvDCYnmAZlpPMkurPHDfBLq6fvdRB3vRgoA894hRG/V/BSeY9bmMm6iIIU5VpjJxfb/dLPpJX2at0L9rw==} @@ -634,164 +620,9 @@ packages: '@streamparser/json@0.0.22': resolution: {integrity: sha512-b6gTSBjJ8G8SuO3Gbbj+zXbVx8NSs1EbpbMKpzGLWMdkR+98McH9bEjSz3+0mPJf68c5nxa3CrJHp5EQNXM6zQ==} - '@svta/cml-608@1.0.2': - resolution: {integrity: sha512-ZEJ68330gcLKfvVv6Qifr1HR7+GldDUxzkjqSbqRK7jHtHSLSV1JAyDwlYe8+C7ABuY1bp8MpgJ4/Gg+jl+pLQ==} - engines: {node: '>=20'} - - '@svta/cml-cmcd@2.3.2': - resolution: {integrity: sha512-SKBBjLmci0WK8HMjuv+36tVIMktonoOoxsXblOFZmB+ePPV2zjRMTD+2ZmE/1VEPJkKHENyhSjSHgJyeOlvZ1A==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-structured-field-values': 1.1.3 - '@svta/cml-utils': 1.5.0 - - '@svta/cml-cmsd@1.0.6': - resolution: {integrity: sha512-LUORV6bb0TbU4rSC2HoPqUCix1igLrXkRQXWiIyJo2OMzb14kAK/1jsW0mzY6up6w1GrjKQcjc6OwqJdo/zd/g==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-cta': 1.0.6 - '@svta/cml-structured-field-values': 1.1.3 - '@svta/cml-utils': 1.5.0 - - '@svta/cml-cta@1.0.6': - resolution: {integrity: sha512-l13/4myTX1EbRd38nY8J1umVY5UdR/nZO6CeKqVLXnMMIayg7/fu0TueZckjTA9Loal55MGK1xbHnXVjz7OUUw==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-structured-field-values': 1.1.3 - '@svta/cml-utils': 1.5.0 - - '@svta/cml-dash@1.0.6': - resolution: {integrity: sha512-4XtHYlPrzL/dRe/8XmRQoLnTo9S86tISgrl67eUqKl5MtNTpZBYTncuPrspslPZPZROBBWNrBuepYfYUtU9CKA==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-utils': 1.5.0 - - '@svta/cml-id3@1.0.6': - resolution: {integrity: sha512-63j8gkAnPOmOBWlp0hIZPvsIioZttdbg6/TgwITqMYbSLYVJ+6QGa/UtIP0I84NsfstANw6QdCn7i8SS08kn1A==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-utils': 1.5.0 - - '@svta/cml-request@1.0.12': - resolution: {integrity: sha512-4sJvnnoNpq58j2mCGP8k+MF6wVy/qa4gbt6kfT1dPIKmn3mPxw+JVfilhcWsUi+peK2yCZxOJJYyHj1cAcQE1w==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-cmcd': 2.3.2 - '@svta/cml-utils': 1.5.0 - '@svta/cml-xml': 1.1.4 - - '@svta/cml-structured-field-values@1.1.3': - resolution: {integrity: sha512-XqLzQOTznz6kh/nsSh8dy1kV7GQjL4csG+2U5EvLGhAqNuNUczbVg5EAsDobKDVg8xhdthdXx2UuwM+ZHQCxSg==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-utils': 1.5.0 - - '@svta/cml-utils@1.5.0': - resolution: {integrity: sha512-JMqclD7Akd+GSJiuaYNUHOP2wNtf/nauKeszlYeivSHfi0Lp3pmSW5PXDvJ2dO4aPmmSOQbF0ztTsW9Vcs2Whw==} - engines: {node: '>=20'} - - '@svta/cml-xml@1.1.4': - resolution: {integrity: sha512-jbixqjiJIc16SGxylHwiOzO+DuhkGfuP+fJ9AHeVJKdFDKnabgfCDpnp6dvZpZnjMj4nHvzVtuUV7RISPIwYXw==} - engines: {node: '>=20'} - peerDependencies: - '@svta/cml-utils': 1.5.0 - '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} - '@types/d3-array@3.2.2': - resolution: {integrity: sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==} - - '@types/d3-axis@3.0.6': - resolution: {integrity: sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==} - - '@types/d3-brush@3.0.6': - resolution: {integrity: sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==} - - '@types/d3-chord@3.0.6': - resolution: {integrity: sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==} - - '@types/d3-color@3.1.3': - resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==} - - '@types/d3-contour@3.0.6': - resolution: {integrity: sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==} - - '@types/d3-delaunay@6.0.4': - resolution: {integrity: sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==} - - '@types/d3-dispatch@3.0.7': - resolution: {integrity: sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==} - - '@types/d3-drag@3.0.7': - resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==} - - '@types/d3-dsv@3.0.7': - resolution: {integrity: sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==} - - '@types/d3-ease@3.0.2': - resolution: {integrity: sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==} - - '@types/d3-fetch@3.0.7': - resolution: {integrity: sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==} - - '@types/d3-force@3.0.10': - resolution: {integrity: sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==} - - '@types/d3-format@3.0.4': - resolution: {integrity: sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==} - - '@types/d3-geo@3.1.1': - resolution: {integrity: sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w==} - - '@types/d3-hierarchy@3.1.7': - resolution: {integrity: sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==} - - '@types/d3-interpolate@3.0.4': - resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==} - - '@types/d3-path@3.1.1': - resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==} - - '@types/d3-polygon@3.0.2': - resolution: {integrity: sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==} - - '@types/d3-quadtree@3.0.6': - resolution: {integrity: sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==} - - '@types/d3-random@3.0.4': - resolution: {integrity: sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==} - - '@types/d3-scale-chromatic@3.1.0': - resolution: {integrity: sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==} - - '@types/d3-scale@4.0.9': - resolution: {integrity: sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==} - - '@types/d3-selection@3.0.12': - resolution: {integrity: sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw==} - - '@types/d3-shape@3.2.0': - resolution: {integrity: sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw==} - - '@types/d3-time-format@4.0.3': - resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==} - - '@types/d3-time@3.0.4': - resolution: {integrity: sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==} - - '@types/d3-timer@3.0.2': - resolution: {integrity: sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==} - - '@types/d3-transition@3.0.9': - resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==} - - '@types/d3-zoom@3.0.9': - resolution: {integrity: sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA==} - - '@types/d3@7.4.3': - resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} - '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -801,9 +632,6 @@ packages: '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} - '@types/geojson@7946.0.16': - resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==} - '@types/hast@3.0.5': resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==} @@ -948,9 +776,6 @@ packages: '@ungap/structured-clone@1.4.0': resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} - '@upsetjs/venn.js@2.0.0': - resolution: {integrity: sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==} - '@vitest/coverage-v8@4.1.11': resolution: {integrity: sha512-8MVGEFnJIcdGjcbfKmeq8z0pZHH0JlVtoVZH9Q/qwUp6wyFnEJUBMrw9DCaj+ra3vShGmhavjalMIhPNxZAUcw==} peerDependencies: @@ -1002,9 +827,6 @@ packages: ast-v8-to-istanbul@1.0.7: resolution: {integrity: sha512-kFL68AG6ajd8fg248zwM9GQrUWEp79gsmjum34OEXjs4yHuUMZfYKwOLW9GMmB4oNvVrj+EAGxsP7ye2UR9UlA==} - bcp-47-match@2.0.3: - resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} - bidi-js@1.1.0: resolution: {integrity: sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==} @@ -1021,29 +843,12 @@ packages: character-entities-legacy@3.0.0: resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} - codem-isoboxer@0.3.10: - resolution: {integrity: sha512-eNk3TRV+xQMJ1PEj0FQGY8KD4m0GPxT487XJ+Iftm7mVa9WpPFDMWqPt+46buiP5j5Wzqe5oMIhqBcAeKfygSA==} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} - commander@7.2.0: - resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} - engines: {node: '>= 10'} - - commander@8.3.0: - resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} - engines: {node: '>= 12'} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cose-base@1.0.3: - resolution: {integrity: sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==} - - cose-base@2.2.0: - resolution: {integrity: sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==} - css-tree@3.2.1: resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} @@ -1051,179 +856,13 @@ packages: csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} - cytoscape-cose-bilkent@4.1.0: - resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==} - peerDependencies: - cytoscape: ^3.2.0 - - cytoscape-fcose@2.2.0: - resolution: {integrity: sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==} - peerDependencies: - cytoscape: ^3.2.0 - - cytoscape@3.34.3: - resolution: {integrity: sha512-yfYGhRcGAntq6YBD583j4n0Eg3jIxvWmZtz/5uz9UYkeIStSlMxuUja+ec5j3iBD8nv1rwaOAYMW09tBdkSeaQ==} - engines: {node: '>=0.10'} - - d3-array@2.12.1: - resolution: {integrity: sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==} - - d3-array@3.2.4: - resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} - engines: {node: '>=12'} - - d3-axis@3.0.0: - resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} - engines: {node: '>=12'} - - d3-brush@3.0.0: - resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} - engines: {node: '>=12'} - - d3-chord@3.0.1: - resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==} - engines: {node: '>=12'} - - d3-color@3.1.0: - resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} - engines: {node: '>=12'} - - d3-contour@4.0.2: - resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==} - engines: {node: '>=12'} - - d3-delaunay@6.0.4: - resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==} - engines: {node: '>=12'} - - d3-dispatch@3.0.1: - resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} - engines: {node: '>=12'} - - d3-drag@3.0.0: - resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} - engines: {node: '>=12'} - - d3-dsv@3.0.1: - resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} - engines: {node: '>=12'} - hasBin: true - - d3-ease@3.0.1: - resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} - engines: {node: '>=12'} - - d3-fetch@3.0.1: - resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==} - engines: {node: '>=12'} - - d3-force@3.0.0: - resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} - engines: {node: '>=12'} - - d3-format@3.1.2: - resolution: {integrity: sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==} - engines: {node: '>=12'} - - d3-geo@3.1.1: - resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==} - engines: {node: '>=12'} - - d3-hierarchy@3.1.2: - resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==} - engines: {node: '>=12'} - - d3-interpolate@3.0.1: - resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} - engines: {node: '>=12'} - - d3-path@1.0.9: - resolution: {integrity: sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==} - - d3-path@3.1.0: - resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} - engines: {node: '>=12'} - - d3-polygon@3.0.1: - resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==} - engines: {node: '>=12'} - - d3-quadtree@3.0.1: - resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} - engines: {node: '>=12'} - - d3-random@3.0.1: - resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} - engines: {node: '>=12'} - - d3-sankey@0.12.3: - resolution: {integrity: sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==} - - d3-scale-chromatic@3.1.0: - resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} - engines: {node: '>=12'} - - d3-scale@4.0.2: - resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} - engines: {node: '>=12'} - - d3-selection@3.0.0: - resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} - engines: {node: '>=12'} - - d3-shape@1.3.7: - resolution: {integrity: sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==} - - d3-shape@3.2.0: - resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} - engines: {node: '>=12'} - - d3-time-format@4.1.0: - resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} - engines: {node: '>=12'} - - d3-time@3.1.0: - resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} - engines: {node: '>=12'} - - d3-timer@3.0.1: - resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} - engines: {node: '>=12'} - - d3-transition@3.0.1: - resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} - engines: {node: '>=12'} - peerDependencies: - d3-selection: 2 - 3 - - d3-zoom@3.0.0: - resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} - engines: {node: '>=12'} - - d3@7.9.0: - resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} - engines: {node: '>=12'} - - dagre-d3-es@7.0.14: - resolution: {integrity: sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==} - - dashjs@5.2.0: - resolution: {integrity: sha512-2W2KHFN53Sk7+rtdnIfSUK/3Oov+hraMTeVZwDOTSCNKM1cQtFiJdblNzRMnl59a/QDseG7JW+PC9mh/B+CMcg==} - engines: {node: '>=20'} - data-urls@8.0.0: resolution: {integrity: sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==} engines: {node: ^22.14.0 || >=24.0.0} - dayjs@1.11.23: - resolution: {integrity: sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==} - decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} - delaunator@5.1.0: - resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==} - dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -1245,19 +884,9 @@ packages: es-module-lexer@2.3.2: resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} - es-toolkit@1.52.0: - resolution: {integrity: sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==} - - es6-promise@4.2.8: - resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} - events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - expect-type@1.4.0: resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} engines: {node: '>=12.0.0'} @@ -1266,9 +895,6 @@ packages: resolution: {integrity: sha512-CGnyrvbhPlWYMngksqrSSUT1BAVP49dZocrHuK0SvtR0D5TMs5wP0o3j7jexDJW01KSadjBp1M/71o/KR3nD1w==} engines: {node: '>=18'} - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-sha256@1.3.0: resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} @@ -1286,9 +912,6 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - hachure-fill@0.5.2: - resolution: {integrity: sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==} - has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -1299,42 +922,16 @@ packages: hast-util-whitespace@3.0.0: resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} - hls.js@1.6.17: - resolution: {integrity: sha512-NUplVGVuc1hSPwdB/9/cbRkUmLrYi75/hqiXKdA+l300pJNxDu96R7jRb2imDzWJqIUF4I5ThmAdp9GvOCXsuQ==} - html-encoding-sniffer@7.0.0: resolution: {integrity: sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==} engines: {node: ^22.13.0 || >=24.0.0} - html-entities@2.6.0: - resolution: {integrity: sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==} - html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} - iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - - immediate@3.0.6: - resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} - - import-meta-resolve@4.2.0: - resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} - - imsc@1.1.5: - resolution: {integrity: sha512-V8je+CGkcvGhgl2C1GlhqFFiUOIEdwXbXLiu1Fcubvvbo+g9inauqT3l0pNYXGoLPBj3jxtZz9t+wCopMkwadQ==} - - internmap@1.0.1: - resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} - - internmap@2.0.3: - resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} - engines: {node: '>=12'} - is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} @@ -1370,22 +967,6 @@ packages: resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==} engines: {node: '>=16'} - katex@0.18.2: - resolution: {integrity: sha512-3snve4y0SXTMequLim1FMiPvLGElySam0blN5xQZBqEY3lOJz1TnuaaiugnBZBqHzlSAGmFTYL7MCQkORuLKCA==} - hasBin: true - - khroma@2.1.0: - resolution: {integrity: sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==} - - layout-base@1.0.2: - resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==} - - layout-base@2.0.1: - resolution: {integrity: sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==} - - lie@3.1.1: - resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==} - lightningcss-android-arm64@1.33.0: resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} engines: {node: '>= 12.0.0'} @@ -1469,12 +1050,6 @@ packages: lit@3.3.3: resolution: {integrity: sha512-fycuvZg/hkpozL00lm1pEJH5nN/lr9ZXd6mJI2HSN4+Bzc+LDNdEApJ6HFbPkdFNHLvOplIIuJvxkS4XUxqirw==} - localforage@1.10.0: - resolution: {integrity: sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==} - - lodash-es@4.18.1: - resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} - loglevel@1.9.2: resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} engines: {node: '>= 0.6.0'} @@ -1509,9 +1084,6 @@ packages: mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} - mermaid@11.16.1: - resolution: {integrity: sha512-TQsq6u22fAn3rek5VOubrhKPo1g5hwC3FXUN9hiyupTckcYiGuuKGkNQrKYwGJkXUxZdojwRG46gsSCFZMDp4g==} - micromark-util-character@2.1.1: resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} @@ -1527,10 +1099,6 @@ packages: micromark-util-types@2.0.3: resolution: {integrity: sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==} - mpegts.js@1.8.1: - resolution: {integrity: sha512-mQ2daxqBaS+QmBYTmJMDUGwAOw08534b08KSyqUGkjkhuBODNod15j8pnRfVEIQVWulKNe201/6UqILe4m4YRQ==} - engines: {node: '>=20.9.0'} - nanoid@3.3.20: resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -1562,18 +1130,9 @@ packages: vite-plus: optional: true - package-manager-detector@1.9.0: - resolution: {integrity: sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==} - parse5@8.0.1: resolution: {integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==} - path-browserify@1.0.1: - resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - - path-data-parser@0.1.0: - resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} @@ -1598,12 +1157,6 @@ packages: engines: {node: '>=20'} hasBin: true - points-on-curve@0.2.0: - resolution: {integrity: sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==} - - points-on-path@0.2.1: - resolution: {integrity: sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==} - postcss@8.5.29: resolution: {integrity: sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ==} engines: {node: ^10 || ^12 || >=14} @@ -1620,13 +1173,13 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - ranui@0.5.0-alpha.6: - resolution: {integrity: sha512-5gUeGLFMpfASX69ZsrpBB/VlO4cT5EafCvB22+xqASVHZAA7YT+82pC6yqF7N5b5FJwzR66LZHjGeJBge5vDTA==} - engines: {node: '>=20.19.0'} + ranui@0.5.0: + resolution: {integrity: sha512-XYYbyHiVD56YZmw8HEbxIz9hpJQo/ytuVQrbTMKuG900Rvr/DvAo6fYRPTz5VNDzBBPIr3PjDmBBeJQOU7jJfg==} + engines: {node: '>=24.0.0'} - ranuts@0.4.1-alpha.2: - resolution: {integrity: sha512-e3VrZDnvQjnoK20yrWsV+EA0lrdrj9gwVn5jFVB8/XgFB4WN+fjpEIhVAJH+F5m0fc2Js9czB1UHN2Aju4DZlg==} - engines: {node: '>=23.10.0'} + ranuts@0.5.0: + resolution: {integrity: sha512-lpzx1NoyNHL+rkJaJApeOJDQewf8T6mxberuwu1Mb67s62H0OrKoMoXjmEB/9B74cFblfNt6jIfRBI+stQsU0w==} + engines: {node: '>=24.0.0'} regex-recursion@6.0.2: resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} @@ -1644,26 +1197,11 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - robust-predicates@3.0.3: - resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} - rolldown@1.2.13: resolution: {integrity: sha512-/5apOkwWxtACcQtZ5WlrAsKS4JwXVThQPJZ3RqIruRY9UG9M8e0VlXN068xum/JRKA4aIUoJ13ghe/kGCvidiQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - roughjs@4.6.6: - resolution: {integrity: sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==} - - rw@1.3.3: - resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} - - safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - - sax@1.2.1: - resolution: {integrity: sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==} - saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} @@ -1699,9 +1237,6 @@ packages: stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - stylis@4.4.0: - resolution: {integrity: sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==} - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -1746,10 +1281,6 @@ packages: ts-algebra@2.0.0: resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==} - ts-dedent@2.3.0: - resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} - engines: {node: '>=6.10'} - typescript@6.0.3: resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} @@ -1782,10 +1313,6 @@ packages: unist-util-visit@5.1.0: resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} - uuid@14.0.3: - resolution: {integrity: sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==} - hasBin: true - vfile-message@4.0.3: resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} @@ -1909,10 +1436,9 @@ packages: snapshots: - '@antfu/install-pkg@2.1.0': + '@alixex/ranview@0.2.0': dependencies: - package-manager-detector: 1.9.0 - tinyexec: 1.3.1 + ranuts: 0.5.0 '@anthropic-ai/sdk@0.106.0': dependencies: @@ -1951,16 +1477,12 @@ snapshots: '@bcoe/v8-coverage@1.0.2': {} - '@braintree/sanitize-url@7.1.2': {} - '@bramus/specificity@2.4.3': dependencies: css-tree: 3.2.1 '@cfworker/json-schema@4.1.1': {} - '@chevrotain/types@11.1.2': {} - '@csstools/color-helpers@6.1.2': {} '@csstools/css-calc@3.4.3(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2)': @@ -1987,14 +1509,6 @@ snapshots: '@exodus/bytes@1.16.0': {} - '@iconify/types@2.0.0': {} - - '@iconify/utils@3.1.7': - dependencies: - '@antfu/install-pkg': 2.1.0 - '@iconify/types': 2.0.0 - import-meta-resolve: 4.2.0 - '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/sourcemap-codec@1.6.0': {} @@ -2021,10 +1535,6 @@ snapshots: dependencies: '@lit-labs/ssr-dom-shim': 1.6.0 - '@mermaid-js/parser@1.2.1': - dependencies: - '@chevrotain/types': 11.1.2 - '@mlc-ai/web-llm@0.2.85(patch_hash=ab39c67b61b734014dc299766a9bffabb2e077b70bed48c7c4dec0af56af0599)': dependencies: loglevel: 1.9.2 @@ -2233,178 +1743,17 @@ snapshots: '@streamparser/json@0.0.22': {} - '@svta/cml-608@1.0.2': {} - - '@svta/cml-cmcd@2.3.2(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0)': - dependencies: - '@svta/cml-structured-field-values': 1.1.3(@svta/cml-utils@1.5.0) - '@svta/cml-utils': 1.5.0 - - '@svta/cml-cmsd@1.0.6(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0)': - dependencies: - '@svta/cml-cta': 1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) - '@svta/cml-structured-field-values': 1.1.3(@svta/cml-utils@1.5.0) - '@svta/cml-utils': 1.5.0 - - '@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0)': - dependencies: - '@svta/cml-structured-field-values': 1.1.3(@svta/cml-utils@1.5.0) - '@svta/cml-utils': 1.5.0 - - '@svta/cml-dash@1.0.6(@svta/cml-utils@1.5.0)': - dependencies: - '@svta/cml-utils': 1.5.0 - - '@svta/cml-id3@1.0.6(@svta/cml-utils@1.5.0)': - dependencies: - '@svta/cml-utils': 1.5.0 - - '@svta/cml-request@1.0.12(@svta/cml-cmcd@2.3.2(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0)(@svta/cml-xml@1.1.4(@svta/cml-utils@1.5.0))': - dependencies: - '@svta/cml-cmcd': 2.3.2(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) - '@svta/cml-utils': 1.5.0 - '@svta/cml-xml': 1.1.4(@svta/cml-utils@1.5.0) - - '@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0)': - dependencies: - '@svta/cml-utils': 1.5.0 - - '@svta/cml-utils@1.5.0': {} - - '@svta/cml-xml@1.1.4(@svta/cml-utils@1.5.0)': - dependencies: - '@svta/cml-utils': 1.5.0 - '@types/chai@5.2.3': dependencies: '@types/deep-eql': 4.0.2 assertion-error: 2.0.1 - '@types/d3-array@3.2.2': {} - - '@types/d3-axis@3.0.6': - dependencies: - '@types/d3-selection': 3.0.12 - - '@types/d3-brush@3.0.6': - dependencies: - '@types/d3-selection': 3.0.12 - - '@types/d3-chord@3.0.6': {} - - '@types/d3-color@3.1.3': {} - - '@types/d3-contour@3.0.6': - dependencies: - '@types/d3-array': 3.2.2 - '@types/geojson': 7946.0.16 - - '@types/d3-delaunay@6.0.4': {} - - '@types/d3-dispatch@3.0.7': {} - - '@types/d3-drag@3.0.7': - dependencies: - '@types/d3-selection': 3.0.12 - - '@types/d3-dsv@3.0.7': {} - - '@types/d3-ease@3.0.2': {} - - '@types/d3-fetch@3.0.7': - dependencies: - '@types/d3-dsv': 3.0.7 - - '@types/d3-force@3.0.10': {} - - '@types/d3-format@3.0.4': {} - - '@types/d3-geo@3.1.1': - dependencies: - '@types/geojson': 7946.0.16 - - '@types/d3-hierarchy@3.1.7': {} - - '@types/d3-interpolate@3.0.4': - dependencies: - '@types/d3-color': 3.1.3 - - '@types/d3-path@3.1.1': {} - - '@types/d3-polygon@3.0.2': {} - - '@types/d3-quadtree@3.0.6': {} - - '@types/d3-random@3.0.4': {} - - '@types/d3-scale-chromatic@3.1.0': {} - - '@types/d3-scale@4.0.9': - dependencies: - '@types/d3-time': 3.0.4 - - '@types/d3-selection@3.0.12': {} - - '@types/d3-shape@3.2.0': - dependencies: - '@types/d3-path': 3.1.1 - - '@types/d3-time-format@4.0.3': {} - - '@types/d3-time@3.0.4': {} - - '@types/d3-timer@3.0.2': {} - - '@types/d3-transition@3.0.9': - dependencies: - '@types/d3-selection': 3.0.12 - - '@types/d3-zoom@3.0.9': - dependencies: - '@types/d3-interpolate': 3.0.4 - '@types/d3-selection': 3.0.12 - - '@types/d3@7.4.3': - dependencies: - '@types/d3-array': 3.2.2 - '@types/d3-axis': 3.0.6 - '@types/d3-brush': 3.0.6 - '@types/d3-chord': 3.0.6 - '@types/d3-color': 3.1.3 - '@types/d3-contour': 3.0.6 - '@types/d3-delaunay': 6.0.4 - '@types/d3-dispatch': 3.0.7 - '@types/d3-drag': 3.0.7 - '@types/d3-dsv': 3.0.7 - '@types/d3-ease': 3.0.2 - '@types/d3-fetch': 3.0.7 - '@types/d3-force': 3.0.10 - '@types/d3-format': 3.0.4 - '@types/d3-geo': 3.1.1 - '@types/d3-hierarchy': 3.1.7 - '@types/d3-interpolate': 3.0.4 - '@types/d3-path': 3.1.1 - '@types/d3-polygon': 3.0.2 - '@types/d3-quadtree': 3.0.6 - '@types/d3-random': 3.0.4 - '@types/d3-scale': 4.0.9 - '@types/d3-scale-chromatic': 3.1.0 - '@types/d3-selection': 3.0.12 - '@types/d3-shape': 3.2.0 - '@types/d3-time': 3.0.4 - '@types/d3-time-format': 4.0.3 - '@types/d3-timer': 3.0.2 - '@types/d3-transition': 3.0.9 - '@types/d3-zoom': 3.0.9 - '@types/deep-eql@4.0.2': {} '@types/dom-chromium-installation-events@101.0.4': {} '@types/estree@1.0.9': {} - '@types/geojson@7946.0.16': {} - '@types/hast@3.0.5': dependencies: '@types/unist': 3.0.3 @@ -2489,11 +1838,6 @@ snapshots: '@ungap/structured-clone@1.4.0': {} - '@upsetjs/venn.js@2.0.0': - optionalDependencies: - d3-selection: 3.0.0 - d3-transition: 3.0.1(d3-selection@3.0.0) - '@vitest/coverage-v8@4.1.11(vitest@4.1.11)': dependencies: '@bcoe/v8-coverage': 1.0.2 @@ -2561,8 +1905,6 @@ snapshots: estree-walker: 3.0.3 js-tokens: 10.0.0 - bcp-47-match@2.0.3: {} - bidi-js@1.1.0: dependencies: require-from-string: 2.0.2 @@ -2575,24 +1917,10 @@ snapshots: character-entities-legacy@3.0.0: {} - codem-isoboxer@0.3.10: {} - comma-separated-tokens@2.0.3: {} - commander@7.2.0: {} - - commander@8.3.0: {} - convert-source-map@2.0.0: {} - cose-base@1.0.3: - dependencies: - layout-base: 1.0.2 - - cose-base@2.2.0: - dependencies: - layout-base: 2.0.1 - css-tree@3.2.1: dependencies: mdn-data: 2.27.1 @@ -2600,211 +1928,6 @@ snapshots: csstype@3.2.3: {} - cytoscape-cose-bilkent@4.1.0(cytoscape@3.34.3): - dependencies: - cose-base: 1.0.3 - cytoscape: 3.34.3 - - cytoscape-fcose@2.2.0(cytoscape@3.34.3): - dependencies: - cose-base: 2.2.0 - cytoscape: 3.34.3 - - cytoscape@3.34.3: {} - - d3-array@2.12.1: - dependencies: - internmap: 1.0.1 - - d3-array@3.2.4: - dependencies: - internmap: 2.0.3 - - d3-axis@3.0.0: {} - - d3-brush@3.0.0: - dependencies: - d3-dispatch: 3.0.1 - d3-drag: 3.0.0 - d3-interpolate: 3.0.1 - d3-selection: 3.0.0 - d3-transition: 3.0.1(d3-selection@3.0.0) - - d3-chord@3.0.1: - dependencies: - d3-path: 3.1.0 - - d3-color@3.1.0: {} - - d3-contour@4.0.2: - dependencies: - d3-array: 3.2.4 - - d3-delaunay@6.0.4: - dependencies: - delaunator: 5.1.0 - - d3-dispatch@3.0.1: {} - - d3-drag@3.0.0: - dependencies: - d3-dispatch: 3.0.1 - d3-selection: 3.0.0 - - d3-dsv@3.0.1: - dependencies: - commander: 7.2.0 - iconv-lite: 0.6.3 - rw: 1.3.3 - - d3-ease@3.0.1: {} - - d3-fetch@3.0.1: - dependencies: - d3-dsv: 3.0.1 - - d3-force@3.0.0: - dependencies: - d3-dispatch: 3.0.1 - d3-quadtree: 3.0.1 - d3-timer: 3.0.1 - - d3-format@3.1.2: {} - - d3-geo@3.1.1: - dependencies: - d3-array: 3.2.4 - - d3-hierarchy@3.1.2: {} - - d3-interpolate@3.0.1: - dependencies: - d3-color: 3.1.0 - - d3-path@1.0.9: {} - - d3-path@3.1.0: {} - - d3-polygon@3.0.1: {} - - d3-quadtree@3.0.1: {} - - d3-random@3.0.1: {} - - d3-sankey@0.12.3: - dependencies: - d3-array: 2.12.1 - d3-shape: 1.3.7 - - d3-scale-chromatic@3.1.0: - dependencies: - d3-color: 3.1.0 - d3-interpolate: 3.0.1 - - d3-scale@4.0.2: - dependencies: - d3-array: 3.2.4 - d3-format: 3.1.2 - d3-interpolate: 3.0.1 - d3-time: 3.1.0 - d3-time-format: 4.1.0 - - d3-selection@3.0.0: {} - - d3-shape@1.3.7: - dependencies: - d3-path: 1.0.9 - - d3-shape@3.2.0: - dependencies: - d3-path: 3.1.0 - - d3-time-format@4.1.0: - dependencies: - d3-time: 3.1.0 - - d3-time@3.1.0: - dependencies: - d3-array: 3.2.4 - - d3-timer@3.0.1: {} - - d3-transition@3.0.1(d3-selection@3.0.0): - dependencies: - d3-color: 3.1.0 - d3-dispatch: 3.0.1 - d3-ease: 3.0.1 - d3-interpolate: 3.0.1 - d3-selection: 3.0.0 - d3-timer: 3.0.1 - - d3-zoom@3.0.0: - dependencies: - d3-dispatch: 3.0.1 - d3-drag: 3.0.0 - d3-interpolate: 3.0.1 - d3-selection: 3.0.0 - d3-transition: 3.0.1(d3-selection@3.0.0) - - d3@7.9.0: - dependencies: - d3-array: 3.2.4 - d3-axis: 3.0.0 - d3-brush: 3.0.0 - d3-chord: 3.0.1 - d3-color: 3.1.0 - d3-contour: 4.0.2 - d3-delaunay: 6.0.4 - d3-dispatch: 3.0.1 - d3-drag: 3.0.0 - d3-dsv: 3.0.1 - d3-ease: 3.0.1 - d3-fetch: 3.0.1 - d3-force: 3.0.0 - d3-format: 3.1.2 - d3-geo: 3.1.1 - d3-hierarchy: 3.1.2 - d3-interpolate: 3.0.1 - d3-path: 3.1.0 - d3-polygon: 3.0.1 - d3-quadtree: 3.0.1 - d3-random: 3.0.1 - d3-scale: 4.0.2 - d3-scale-chromatic: 3.1.0 - d3-selection: 3.0.0 - d3-shape: 3.2.0 - d3-time: 3.1.0 - d3-time-format: 4.1.0 - d3-timer: 3.0.1 - d3-transition: 3.0.1(d3-selection@3.0.0) - d3-zoom: 3.0.0 - - dagre-d3-es@7.0.14: - dependencies: - d3: 7.9.0 - lodash-es: 4.18.1 - - dashjs@5.2.0(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0): - dependencies: - '@svta/cml-608': 1.0.2 - '@svta/cml-cmcd': 2.3.2(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) - '@svta/cml-cmsd': 1.0.6(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) - '@svta/cml-dash': 1.0.6(@svta/cml-utils@1.5.0) - '@svta/cml-id3': 1.0.6(@svta/cml-utils@1.5.0) - '@svta/cml-request': 1.0.12(@svta/cml-cmcd@2.3.2(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0)(@svta/cml-xml@1.1.4(@svta/cml-utils@1.5.0)) - '@svta/cml-xml': 1.1.4(@svta/cml-utils@1.5.0) - bcp-47-match: 2.0.3 - codem-isoboxer: 0.3.10 - fast-deep-equal: 3.1.3 - html-entities: 2.6.0 - imsc: 1.1.5 - localforage: 1.10.0 - path-browserify: 1.0.1 - transitivePeerDependencies: - - '@svta/cml-cta' - - '@svta/cml-structured-field-values' - - '@svta/cml-utils' - data-urls@8.0.0: dependencies: whatwg-mimetype: 5.0.0 @@ -2812,14 +1935,8 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' - dayjs@1.11.23: {} - decimal.js@10.6.0: {} - delaunator@5.1.0: - dependencies: - robust-predicates: 3.0.3 - dequal@2.0.3: {} detect-libc@2.1.2: {} @@ -2836,22 +1953,14 @@ snapshots: es-module-lexer@2.3.2: {} - es-toolkit@1.52.0: {} - - es6-promise@4.2.8: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.9 - events@3.3.0: {} - expect-type@1.4.0: {} fake-indexeddb@6.2.5: {} - fast-deep-equal@3.1.3: {} - fast-sha256@1.3.0: {} fdir@6.5.0(picomatch@4.0.7): @@ -2861,8 +1970,6 @@ snapshots: fsevents@2.3.3: optional: true - hachure-fill@0.5.2: {} - has-flag@4.0.0: {} hast-util-to-html@9.0.5: @@ -2883,36 +1990,16 @@ snapshots: dependencies: '@types/hast': 3.0.5 - hls.js@1.6.17: {} - html-encoding-sniffer@7.0.0: dependencies: '@exodus/bytes': 1.16.0 transitivePeerDependencies: - '@noble/hashes' - html-entities@2.6.0: {} - html-escaper@2.0.2: {} html-void-elements@3.0.0: {} - iconv-lite@0.6.3: - dependencies: - safer-buffer: 2.1.2 - - immediate@3.0.6: {} - - import-meta-resolve@4.2.0: {} - - imsc@1.1.5: - dependencies: - sax: 1.2.1 - - internmap@1.0.1: {} - - internmap@2.0.3: {} - is-potential-custom-element-name@1.0.1: {} istanbul-lib-coverage@3.2.2: {} @@ -2962,20 +2049,6 @@ snapshots: '@babel/runtime': 7.29.7 ts-algebra: 2.0.0 - katex@0.18.2: - dependencies: - commander: 8.3.0 - - khroma@2.1.0: {} - - layout-base@1.0.2: {} - - layout-base@2.0.1: {} - - lie@3.1.1: - dependencies: - immediate: 3.0.6 - lightningcss-android-arm64@1.33.0: optional: true @@ -3041,12 +2114,6 @@ snapshots: lit-element: 4.2.2 lit-html: 3.3.3 - localforage@1.10.0: - dependencies: - lie: 3.1.1 - - lodash-es@4.18.1: {} - loglevel@1.9.2: {} lru-cache@11.5.3: {} @@ -3083,30 +2150,6 @@ snapshots: mdn-data@2.27.1: {} - mermaid@11.16.1: - dependencies: - '@braintree/sanitize-url': 7.1.2 - '@iconify/utils': 3.1.7 - '@mermaid-js/parser': 1.2.1 - '@types/d3': 7.4.3 - '@upsetjs/venn.js': 2.0.0 - cytoscape: 3.34.3 - cytoscape-cose-bilkent: 4.1.0(cytoscape@3.34.3) - cytoscape-fcose: 2.2.0(cytoscape@3.34.3) - d3: 7.9.0 - d3-sankey: 0.12.3 - dagre-d3-es: 7.0.14 - dayjs: 1.11.23 - dompurify: 3.4.16 - es-toolkit: 1.52.0 - katex: 0.18.2 - khroma: 2.1.0 - marked: 16.4.2 - roughjs: 4.6.6 - stylis: 4.4.0 - ts-dedent: 2.3.0 - uuid: 14.0.3 - micromark-util-character@2.1.1: dependencies: micromark-util-symbol: 2.0.1 @@ -3124,11 +2167,6 @@ snapshots: micromark-util-types@2.0.3: {} - mpegts.js@1.8.1: - dependencies: - es6-promise: 4.2.8 - events: 3.3.0 - nanoid@3.3.20: {} node-readable-to-web-readable-stream@0.4.2: @@ -3166,16 +2204,10 @@ snapshots: '@oxlint/binding-win32-ia32-msvc': 1.87.0 '@oxlint/binding-win32-x64-msvc': 1.87.0 - package-manager-detector@1.9.0: {} - parse5@8.0.1: dependencies: entities: 8.1.0 - path-browserify@1.0.1: {} - - path-data-parser@0.1.0: {} - pathe@2.0.3: {} pdfjs-dist@5.4.624: @@ -3193,13 +2225,6 @@ snapshots: dependencies: playwright-core: 1.64.0 - points-on-curve@0.2.0: {} - - points-on-path@0.2.1: - dependencies: - path-data-parser: 0.1.0 - points-on-curve: 0.2.0 - postcss@8.5.29: dependencies: nanoid: 3.3.20 @@ -3212,24 +2237,17 @@ snapshots: punycode@2.3.1: {} - ranui@0.5.0-alpha.6(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0): + ranui@0.5.0: dependencies: - dashjs: 5.2.0(@svta/cml-cta@1.0.6(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0))(@svta/cml-structured-field-values@1.1.3(@svta/cml-utils@1.5.0))(@svta/cml-utils@1.5.0) + '@alixex/ranview': 0.2.0 dompurify: 3.4.16 - hls.js: 1.6.17 marked: 18.0.9 - mermaid: 11.16.1 - mpegts.js: 1.8.1 - ranuts: 0.4.1-alpha.2 + ranuts: 0.5.0 remend: 1.3.0 shiki: 4.4.3 temml: 0.13.4 - transitivePeerDependencies: - - '@svta/cml-cta' - - '@svta/cml-structured-field-values' - - '@svta/cml-utils' - ranuts@0.4.1-alpha.2: + ranuts@0.5.0: dependencies: jschardet: 3.1.4 @@ -3247,8 +2265,6 @@ snapshots: require-from-string@2.0.2: {} - robust-predicates@3.0.3: {} - rolldown@1.2.13: dependencies: '@oxc-project/types': 0.153.0 @@ -3270,19 +2286,6 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.2.13 '@rolldown/binding-win32-x64-msvc': 1.2.13 - roughjs@4.6.6: - dependencies: - hachure-fill: 0.5.2 - path-data-parser: 0.1.0 - points-on-curve: 0.2.0 - points-on-path: 0.2.1 - - rw@1.3.3: {} - - safer-buffer@2.1.2: {} - - sax@1.2.1: {} - saxes@6.0.0: dependencies: xmlchars: 2.2.0 @@ -3320,8 +2323,6 @@ snapshots: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 - stylis@4.4.0: {} - supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -3357,8 +2358,6 @@ snapshots: ts-algebra@2.0.0: {} - ts-dedent@2.3.0: {} - typescript@6.0.3: {} typescript@7.0.2: @@ -3411,8 +2410,6 @@ snapshots: unist-util-is: 6.0.1 unist-util-visit-parents: 6.0.2 - uuid@14.0.3: {} - vfile-message@4.0.3: dependencies: '@types/unist': 3.0.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c5d7bd039..7ed75da23 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,6 +3,7 @@ packages: minimumReleaseAgeExclude: - ranui - ranuts + - '@alixex/ranview@0.2.0' patchedDependencies: '@mlc-ai/web-llm@0.2.85': patches/@mlc-ai__web-llm@0.2.85.patch '@wllama/wllama@3.6.1': patches/@wllama__wllama@3.6.1.patch From 680b212059bacc638ac9ad256d195ebc013c9490 Mon Sep 17 00:00:00 2001 From: chaxus Date: Mon, 19 Oct 2026 09:58:23 +0800 Subject: [PATCH 7/7] build(ui): refresh vendored ranui assets and audit results --- .../2026-10-18-assistant-design-audit.md | 26 ++- public/ran-tokens.css | 2 +- public/ranui-iife/button.iife.js | 2 +- public/ranui-iife/card.iife.js | 2 +- public/ranui-iife/checkbox.iife.js | 2 +- public/ranui-iife/content.iife.js | 2 +- public/ranui-iife/input.iife.js | 193 +++--------------- public/ranui-iife/popover.iife.js | 2 +- public/ranui-iife/theme-switch.iife.js | 2 +- 9 files changed, 52 insertions(+), 181 deletions(-) diff --git a/docs/explorations/2026-10-18-assistant-design-audit.md b/docs/explorations/2026-10-18-assistant-design-audit.md index 3ca9123b8..4eeb54b36 100644 --- a/docs/explorations/2026-10-18-assistant-design-audit.md +++ b/docs/explorations/2026-10-18-assistant-design-audit.md @@ -135,14 +135,22 @@ disconnection and newer open/close transitions. Verification for the application follow-up: - Full unit suite: 252 files, 6,799 tests passed. -- Focused browser regression: 30 tests passed, including the new screenshot cases plus - sidebar layout, workspace consistency, sources/artifacts and composer behavior. +- Browser regression after the stable dependency upgrade: 47 tests passed, covering the + screenshot cases, sidebar layout, workspace consistency, dictation, history and themes. - Rendered checks include 360px/1280px, light/dark, keyboard activation/Escape/focus return, touch hit targets, import validation and popup anchor distance. -- Type checking and the repository archive/format checks are part of the PR validation. - -The application still uses its pinned `ranui@0.5.0-alpha.6`: its disclosure coordination -uses existing public APIs and works independently of a future ranui release. The component -PR does not publish an npm version or change document's dependency lockfile. This follow-up -changes presentation and local floating interaction; model requests, persistence formats -and account-free frontend operation are unaffected. +- The registry-backed frozen install, production build, type checking, Docker configuration + and repository archive/format checks passed, including 1,511 immutable evaluation records. + +The application disclosure coordination uses existing public APIs and was first validated +against the pinned `ranui@0.5.0-alpha.6`. The shared floating fix was merged in +[ran PR #428](https://github.com/chaxus/ran/pull/428) and released through the +[verified release workflow](https://github.com/chaxus/ran/actions/runs/39140435475). +Document now pins `ranui@0.5.0` and `ranuts@0.5.0` throughout its consuming workspaces; +ranui brings `@alixex/ranview@0.2.0` transitively. Its checked-in token stylesheet and +standalone component bundles are regenerated by `bin/build.sh` from the installed release. + +The published libraries require Node 24+, so the application engine requirement and Docker +builder move to Node 24 as well. This is a build-toolchain requirement; the application +continues to run in the browser. Model requests, persistence formats and account-free +frontend operation are unaffected. diff --git a/public/ran-tokens.css b/public/ran-tokens.css index 96e8099f9..aaa5b4cc2 100644 --- a/public/ran-tokens.css +++ b/public/ran-tokens.css @@ -1,2 +1,2 @@ /* VENDORED — DO NOT EDIT. Generated from ranui/dist/ranui.css (the ranui design-token :root layer) by bin/build.sh on every build, so it never drifts from the installed ranui version. Landing pages this so the --ran-* tokens resolve at first paint; static pages under public/ have no bundler and cannot import from node_modules. Source of truth: ranui in https://github.com/chaxus/ran (package: ranui) — change tokens there, not here. */ -:root{--ran-background-100: #ffffff;--ran-background-200: #fafafa;--ran-gray-100: #f2f2f2;--ran-gray-200: #ebebeb;--ran-gray-300: #e6e6e6;--ran-gray-400: #eaeaea;--ran-gray-500: #c9c9c9;--ran-gray-600: #a8a8a8;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #4d4d4d;--ran-gray-1000: #171717;--ran-gray-alpha-100: #0000000d;--ran-gray-alpha-200: #00000015;--ran-gray-alpha-300: #0000001a;--ran-gray-alpha-400: #00000014;--ran-gray-alpha-500: #00000036;--ran-gray-alpha-600: #0000003d;--ran-gray-alpha-700: #00000070;--ran-gray-alpha-800: #00000082;--ran-gray-alpha-900: #000000b3;--ran-gray-alpha-1000: #000000e8;--ran-blue-100: #f0f7ff;--ran-blue-200: #e9f4ff;--ran-blue-300: #dfefff;--ran-blue-400: #cae7ff;--ran-blue-500: #94ccff;--ran-blue-600: #48aeff;--ran-blue-700: #006bff;--ran-blue-800: #0059ec;--ran-blue-900: #005ff2;--ran-blue-1000: #002359;--ran-red-100: #ffeeef;--ran-red-200: #ffe8ea;--ran-red-300: #ffe3e4;--ran-red-400: #ffd7d6;--ran-red-500: #ffb1b3;--ran-red-600: #ff676d;--ran-red-700: #fc0035;--ran-red-800: #ea001d;--ran-red-900: #d8001b;--ran-red-1000: #47000c;--ran-amber-100: #fff6de;--ran-amber-200: #fff4cf;--ran-amber-300: #fff1c1;--ran-amber-400: #ffdc73;--ran-amber-500: #ffc543;--ran-amber-600: #ffa600;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #aa4d00;--ran-amber-1000: #561900;--ran-green-100: #ecfdec;--ran-green-200: #e5fce7;--ran-green-300: #d3fad1;--ran-green-400: #b9f5bc;--ran-green-500: #82eb8d;--ran-green-600: #4ce15e;--ran-green-700: #28a948;--ran-green-800: #279141;--ran-green-900: #107d32;--ran-green-1000: #003a00;--ran-color-primary: var(--ran-gray-1000);--ran-color-primary-hover: #383838;--ran-color-primary-active: #4d4d4d;--ran-color-primary-text: var(--ran-background-100);--ran-color-success: var(--ran-green-700);--ran-color-warning: var(--ran-amber-700);--ran-color-danger: var(--ran-red-700);--ran-color-bg: var(--ran-background-100);--ran-color-bg-subtle: var(--ran-background-200);--ran-color-bg-elevated: var(--ran-background-100);--ran-color-bg-muted: var(--ran-gray-100);--ran-color-bg-hover: var(--ran-gray-200);--ran-color-bg-active: var(--ran-gray-300);--ran-color-text: var(--ran-gray-1000);--ran-color-text-secondary: var(--ran-gray-900);--ran-color-text-disabled: var(--ran-gray-700);--ran-color-border: var(--ran-gray-400);--ran-color-border-secondary: var(--ran-gray-300);--ran-color-border-hover: var(--ran-gray-500);--ran-color-border-active: var(--ran-gray-600);--ran-color-link: var(--ran-blue-700);--ran-font-family: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ran-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--ran-font-size: 14px;--ran-line-height: 1.5715;--ran-text-heading-weight: 600;--ran-text-heading-tracking: -.03em;--ran-text-heading-1: 32px;--ran-text-heading-2: 24px;--ran-text-heading-3: 20px;--ran-text-heading-4: 16px;--ran-text-label-weight: 500;--ran-text-label-1: 14px;--ran-text-label-2: 13px;--ran-text-label-3: 12px;--ran-text-copy-weight: 400;--ran-text-copy-1: 16px;--ran-text-copy-2: 14px;--ran-text-button-size: 14px;--ran-text-button-weight: 500;--ran-text-button-line-height: 1;--ran-text-mono-weight-regular: 400;--ran-text-mono-weight-medium: 500;--ran-radius-sm: 6px;--ran-radius-md: 12px;--ran-radius-lg: 16px;--ran-radius-full: 9999px;--ran-space-1: 4px;--ran-space-2: 8px;--ran-space-3: 12px;--ran-space-4: 16px;--ran-space-6: 24px;--ran-space-8: 32px;--ran-space-10: 40px;--ran-space-16: 64px;--ran-space-24: 96px;--ran-size-1: 16px;--ran-size-2: 18px;--ran-size-3: 20px;--ran-size-4: 24px;--ran-size-5: 28px;--ran-size-6: 30px;--ran-size-7: 32px;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 4px -2px rgba(0, 0, 0, .05);--ran-shadow-menu: 0 2px 4px rgba(0, 0, 0, .05), 0 8px 24px -6px rgba(0, 0, 0, .14);--ran-shadow-modal: 0 4px 12px rgba(0, 0, 0, .08), 0 20px 48px -12px rgba(0, 0, 0, .22);--ran-z-modal: 1000;--ran-z-dropdown: 1100;--ran-z-message: 1200;--ran-focus-ring: 0 0 0 2px var(--ran-background-100), 0 0 0 4px var(--ran-blue-700);--ran-focus-ring-inverse-color: #fff;--ran-motion-duration-fast: .15s;--ran-motion-duration-base: .2s;--ran-motion-duration-slow: .35s;--ran-motion-ease-standard: cubic-bezier(.645, .045, .355, 1);--ran-motion-ease-snappy: cubic-bezier(.33, 0, .15, 1);--ran-motion-ease-spring: cubic-bezier(.34, 1.26, .5, 1);--ran-motion-ease-bouncy: cubic-bezier(.34, 1.56, .64, 1);--ran-motion-ease-smooth: cubic-bezier(.4, 0, .2, 1);--ran-skin-border-width: 1px;--ran-skin-border-style: solid;--ran-skin-raised-shadow: var(--ran-shadow-elevated);--ran-skin-font-family: var(--ran-font-family);--ran-skin-border-image-width: 4px}@media(prefers-color-scheme:dark){:root:not([data-ran-theme=light]):not([theme=light]):not(.light){--ran-background-100: #000000;--ran-background-200: #000000;--ran-gray-100: #1a1a1a;--ran-gray-200: #1f1f1f;--ran-gray-300: #292929;--ran-gray-400: #2e2e2e;--ran-gray-500: #454545;--ran-gray-600: #878787;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #a0a0a0;--ran-gray-1000: #ededed;--ran-gray-alpha-100: #ffffff12;--ran-gray-alpha-200: #ffffff17;--ran-gray-alpha-300: #ffffff21;--ran-gray-alpha-400: #ffffff24;--ran-gray-alpha-500: #ffffff3d;--ran-gray-alpha-600: #ffffff82;--ran-gray-alpha-700: #ffffff8a;--ran-gray-alpha-800: #ffffff78;--ran-gray-alpha-900: #ffffff9c;--ran-gray-alpha-1000: #ffffffeb;--ran-blue-100: #06193a;--ran-blue-200: #022248;--ran-blue-300: #002f62;--ran-blue-400: #003674;--ran-blue-500: #00418b;--ran-blue-600: #0090ff;--ran-blue-700: #006efe;--ran-blue-800: #005be7;--ran-blue-900: #47a8ff;--ran-blue-1000: #eaf6ff;--ran-red-100: #330a11;--ran-red-200: #440d13;--ran-red-300: #5d0e17;--ran-red-400: #6f101b;--ran-red-500: #88151f;--ran-red-600: #f32e40;--ran-red-700: #f13242;--ran-red-800: #e2162a;--ran-red-900: #ff565f;--ran-red-1000: #ffe9ed;--ran-amber-100: #2a1700;--ran-amber-200: #361900;--ran-amber-300: #502800;--ran-amber-400: #5b3000;--ran-amber-500: #703e00;--ran-amber-600: #ed9a00;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #ff9300;--ran-amber-1000: #fff3d5;--ran-green-100: #002608;--ran-green-200: #00320b;--ran-green-300: #003a0e;--ran-green-400: #004615;--ran-green-500: #006717;--ran-green-600: #00952d;--ran-green-700: #00ac3a;--ran-green-800: #009432;--ran-green-900: #00ca50;--ran-green-1000: #d8ffe4;--ran-color-bg-elevated: var(--ran-gray-100);--ran-color-primary-hover: #cccccc;--ran-color-primary-active: #b3b3b3;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .16);--ran-shadow-menu: 0 1px 1px rgba(0, 0, 0, .2), 0 4px 8px -4px rgba(0, 0, 0, .4), 0 16px 24px -8px rgba(0, 0, 0, .5);--ran-shadow-modal: 0 1px 1px rgba(0, 0, 0, .2), 0 8px 16px -4px rgba(0, 0, 0, .4), 0 24px 32px -8px rgba(0, 0, 0, .5)}}:root[data-ran-theme=dark],:root[theme=dark],:root.dark{--ran-background-100: #000000;--ran-background-200: #000000;--ran-gray-100: #1a1a1a;--ran-gray-200: #1f1f1f;--ran-gray-300: #292929;--ran-gray-400: #2e2e2e;--ran-gray-500: #454545;--ran-gray-600: #878787;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #a0a0a0;--ran-gray-1000: #ededed;--ran-gray-alpha-100: #ffffff12;--ran-gray-alpha-200: #ffffff17;--ran-gray-alpha-300: #ffffff21;--ran-gray-alpha-400: #ffffff24;--ran-gray-alpha-500: #ffffff3d;--ran-gray-alpha-600: #ffffff82;--ran-gray-alpha-700: #ffffff8a;--ran-gray-alpha-800: #ffffff78;--ran-gray-alpha-900: #ffffff9c;--ran-gray-alpha-1000: #ffffffeb;--ran-blue-100: #06193a;--ran-blue-200: #022248;--ran-blue-300: #002f62;--ran-blue-400: #003674;--ran-blue-500: #00418b;--ran-blue-600: #0090ff;--ran-blue-700: #006efe;--ran-blue-800: #005be7;--ran-blue-900: #47a8ff;--ran-blue-1000: #eaf6ff;--ran-red-100: #330a11;--ran-red-200: #440d13;--ran-red-300: #5d0e17;--ran-red-400: #6f101b;--ran-red-500: #88151f;--ran-red-600: #f32e40;--ran-red-700: #f13242;--ran-red-800: #e2162a;--ran-red-900: #ff565f;--ran-red-1000: #ffe9ed;--ran-amber-100: #2a1700;--ran-amber-200: #361900;--ran-amber-300: #502800;--ran-amber-400: #5b3000;--ran-amber-500: #703e00;--ran-amber-600: #ed9a00;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #ff9300;--ran-amber-1000: #fff3d5;--ran-green-100: #002608;--ran-green-200: #00320b;--ran-green-300: #003a0e;--ran-green-400: #004615;--ran-green-500: #006717;--ran-green-600: #00952d;--ran-green-700: #00ac3a;--ran-green-800: #009432;--ran-green-900: #00ca50;--ran-green-1000: #d8ffe4;--ran-color-bg-elevated: var(--ran-gray-100);--ran-color-primary-hover: #cccccc;--ran-color-primary-active: #b3b3b3;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .16);--ran-shadow-menu: 0 1px 1px rgba(0, 0, 0, .2), 0 4px 8px -4px rgba(0, 0, 0, .4), 0 16px 24px -8px rgba(0, 0, 0, .5);--ran-shadow-modal: 0 1px 1px rgba(0, 0, 0, .2), 0 8px 16px -4px rgba(0, 0, 0, .4), 0 24px 32px -8px rgba(0, 0, 0, .5)} +:root{--ran-background-100: #ffffff;--ran-background-200: #fafafa;--ran-gray-100: #f2f2f2;--ran-gray-200: #ebebeb;--ran-gray-300: #e6e6e6;--ran-gray-400: #eaeaea;--ran-gray-500: #c9c9c9;--ran-gray-600: #a8a8a8;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #4d4d4d;--ran-gray-1000: #171717;--ran-gray-alpha-100: #0000000d;--ran-gray-alpha-200: #00000015;--ran-gray-alpha-300: #0000001a;--ran-gray-alpha-400: #00000014;--ran-gray-alpha-500: #00000036;--ran-gray-alpha-600: #0000003d;--ran-gray-alpha-700: #00000070;--ran-gray-alpha-800: #00000082;--ran-gray-alpha-900: #000000b3;--ran-gray-alpha-1000: #000000e8;--ran-blue-100: #f0f7ff;--ran-blue-200: #e9f4ff;--ran-blue-300: #dfefff;--ran-blue-400: #cae7ff;--ran-blue-500: #94ccff;--ran-blue-600: #48aeff;--ran-blue-700: #006bff;--ran-blue-800: #0059ec;--ran-blue-900: #005ff2;--ran-blue-1000: #002359;--ran-red-100: #ffeeef;--ran-red-200: #ffe8ea;--ran-red-300: #ffe3e4;--ran-red-400: #ffd7d6;--ran-red-500: #ffb1b3;--ran-red-600: #ff676d;--ran-red-700: #fc0035;--ran-red-800: #ea001d;--ran-red-900: #d8001b;--ran-red-1000: #47000c;--ran-amber-100: #fff6de;--ran-amber-200: #fff4cf;--ran-amber-300: #fff1c1;--ran-amber-400: #ffdc73;--ran-amber-500: #ffc543;--ran-amber-600: #ffa600;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #aa4d00;--ran-amber-1000: #561900;--ran-green-100: #ecfdec;--ran-green-200: #e5fce7;--ran-green-300: #d3fad1;--ran-green-400: #b9f5bc;--ran-green-500: #82eb8d;--ran-green-600: #4ce15e;--ran-green-700: #28a948;--ran-green-800: #279141;--ran-green-900: #107d32;--ran-green-1000: #003a00;--ran-color-primary: var(--ran-gray-1000);--ran-color-primary-hover: #383838;--ran-color-primary-active: #4d4d4d;--ran-color-primary-text: var(--ran-background-100);--ran-color-success: var(--ran-green-700);--ran-color-warning: var(--ran-amber-700);--ran-color-danger: var(--ran-red-700);--ran-color-warning-foreground: var(--ran-amber-900);--ran-color-danger-foreground: var(--ran-red-900);--ran-color-bg: var(--ran-background-100);--ran-color-bg-subtle: var(--ran-background-200);--ran-color-bg-elevated: var(--ran-background-100);--ran-color-bg-muted: var(--ran-gray-100);--ran-color-bg-hover: var(--ran-gray-200);--ran-color-bg-active: var(--ran-gray-300);--ran-color-text: var(--ran-gray-1000);--ran-color-text-secondary: var(--ran-gray-900);--ran-color-text-disabled: var(--ran-gray-700);--ran-color-border: var(--ran-gray-400);--ran-color-border-secondary: var(--ran-gray-300);--ran-color-border-hover: var(--ran-gray-500);--ran-color-border-active: var(--ran-gray-600);--ran-color-link: var(--ran-blue-700);--ran-font-family: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--ran-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--ran-font-size: 14px;--ran-line-height: 1.5715;--ran-text-heading-weight: 600;--ran-text-heading-tracking: -.03em;--ran-text-heading-1: 32px;--ran-text-heading-2: 24px;--ran-text-heading-3: 20px;--ran-text-heading-4: 16px;--ran-text-label-weight: 500;--ran-text-label-1: 14px;--ran-text-label-2: 13px;--ran-text-label-3: 12px;--ran-text-copy-weight: 400;--ran-text-copy-1: 16px;--ran-text-copy-2: 14px;--ran-text-button-size: 14px;--ran-text-button-weight: 500;--ran-text-button-line-height: 1;--ran-text-mono-weight-regular: 400;--ran-text-mono-weight-medium: 500;--ran-radius-sm: 6px;--ran-radius-md: 12px;--ran-radius-lg: 16px;--ran-radius-full: 9999px;--ran-space-1: 4px;--ran-space-2: 8px;--ran-space-3: 12px;--ran-space-4: 16px;--ran-space-6: 24px;--ran-space-8: 32px;--ran-space-10: 40px;--ran-space-16: 64px;--ran-space-24: 96px;--ran-size-1: 16px;--ran-size-2: 18px;--ran-size-3: 20px;--ran-size-4: 24px;--ran-size-5: 28px;--ran-size-6: 30px;--ran-size-7: 32px;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 4px -2px rgba(0, 0, 0, .05);--ran-shadow-menu: 0 2px 4px rgba(0, 0, 0, .05), 0 8px 24px -6px rgba(0, 0, 0, .14);--ran-shadow-modal: 0 4px 12px rgba(0, 0, 0, .08), 0 20px 48px -12px rgba(0, 0, 0, .22);--ran-z-modal: 1000;--ran-z-dropdown: 1100;--ran-z-message: 1200;--ran-focus-ring: 0 0 0 2px var(--ran-background-100), 0 0 0 4px var(--ran-blue-700);--ran-focus-ring-inverse-color: #fff;--ran-motion-duration-fast: .15s;--ran-motion-duration-base: .2s;--ran-motion-duration-slow: .35s;--ran-motion-ease-standard: cubic-bezier(.645, .045, .355, 1);--ran-motion-ease-snappy: cubic-bezier(.33, 0, .15, 1);--ran-motion-ease-spring: cubic-bezier(.34, 1.26, .5, 1);--ran-motion-ease-bouncy: cubic-bezier(.34, 1.56, .64, 1);--ran-motion-ease-smooth: cubic-bezier(.4, 0, .2, 1);--ran-skin-border-width: 1px;--ran-skin-border-style: solid;--ran-skin-raised-shadow: var(--ran-shadow-elevated);--ran-skin-font-family: var(--ran-font-family);--ran-skin-border-image-width: 4px}@media(prefers-color-scheme:dark){:root:not([data-ran-theme=light]):not([theme=light]):not(.light){--ran-background-100: #000000;--ran-background-200: #000000;--ran-gray-100: #1a1a1a;--ran-gray-200: #1f1f1f;--ran-gray-300: #292929;--ran-gray-400: #2e2e2e;--ran-gray-500: #454545;--ran-gray-600: #878787;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #a0a0a0;--ran-gray-1000: #ededed;--ran-gray-alpha-100: #ffffff12;--ran-gray-alpha-200: #ffffff17;--ran-gray-alpha-300: #ffffff21;--ran-gray-alpha-400: #ffffff24;--ran-gray-alpha-500: #ffffff3d;--ran-gray-alpha-600: #ffffff82;--ran-gray-alpha-700: #ffffff8a;--ran-gray-alpha-800: #ffffff78;--ran-gray-alpha-900: #ffffff9c;--ran-gray-alpha-1000: #ffffffeb;--ran-blue-100: #06193a;--ran-blue-200: #022248;--ran-blue-300: #002f62;--ran-blue-400: #003674;--ran-blue-500: #00418b;--ran-blue-600: #0090ff;--ran-blue-700: #006efe;--ran-blue-800: #005be7;--ran-blue-900: #47a8ff;--ran-blue-1000: #eaf6ff;--ran-red-100: #330a11;--ran-red-200: #440d13;--ran-red-300: #5d0e17;--ran-red-400: #6f101b;--ran-red-500: #88151f;--ran-red-600: #f32e40;--ran-red-700: #f13242;--ran-red-800: #e2162a;--ran-red-900: #ff565f;--ran-red-1000: #ffe9ed;--ran-amber-100: #2a1700;--ran-amber-200: #361900;--ran-amber-300: #502800;--ran-amber-400: #5b3000;--ran-amber-500: #703e00;--ran-amber-600: #ed9a00;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #ff9300;--ran-amber-1000: #fff3d5;--ran-green-100: #002608;--ran-green-200: #00320b;--ran-green-300: #003a0e;--ran-green-400: #004615;--ran-green-500: #006717;--ran-green-600: #00952d;--ran-green-700: #00ac3a;--ran-green-800: #009432;--ran-green-900: #00ca50;--ran-green-1000: #d8ffe4;--ran-color-bg-elevated: var(--ran-gray-100);--ran-color-primary-hover: #cccccc;--ran-color-primary-active: #b3b3b3;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .16);--ran-shadow-menu: 0 1px 1px rgba(0, 0, 0, .2), 0 4px 8px -4px rgba(0, 0, 0, .4), 0 16px 24px -8px rgba(0, 0, 0, .5);--ran-shadow-modal: 0 1px 1px rgba(0, 0, 0, .2), 0 8px 16px -4px rgba(0, 0, 0, .4), 0 24px 32px -8px rgba(0, 0, 0, .5)}}:root[data-ran-theme=dark],:root[theme=dark],:root.dark{--ran-background-100: #000000;--ran-background-200: #000000;--ran-gray-100: #1a1a1a;--ran-gray-200: #1f1f1f;--ran-gray-300: #292929;--ran-gray-400: #2e2e2e;--ran-gray-500: #454545;--ran-gray-600: #878787;--ran-gray-700: #8f8f8f;--ran-gray-800: #7d7d7d;--ran-gray-900: #a0a0a0;--ran-gray-1000: #ededed;--ran-gray-alpha-100: #ffffff12;--ran-gray-alpha-200: #ffffff17;--ran-gray-alpha-300: #ffffff21;--ran-gray-alpha-400: #ffffff24;--ran-gray-alpha-500: #ffffff3d;--ran-gray-alpha-600: #ffffff82;--ran-gray-alpha-700: #ffffff8a;--ran-gray-alpha-800: #ffffff78;--ran-gray-alpha-900: #ffffff9c;--ran-gray-alpha-1000: #ffffffeb;--ran-blue-100: #06193a;--ran-blue-200: #022248;--ran-blue-300: #002f62;--ran-blue-400: #003674;--ran-blue-500: #00418b;--ran-blue-600: #0090ff;--ran-blue-700: #006efe;--ran-blue-800: #005be7;--ran-blue-900: #47a8ff;--ran-blue-1000: #eaf6ff;--ran-red-100: #330a11;--ran-red-200: #440d13;--ran-red-300: #5d0e17;--ran-red-400: #6f101b;--ran-red-500: #88151f;--ran-red-600: #f32e40;--ran-red-700: #f13242;--ran-red-800: #e2162a;--ran-red-900: #ff565f;--ran-red-1000: #ffe9ed;--ran-amber-100: #2a1700;--ran-amber-200: #361900;--ran-amber-300: #502800;--ran-amber-400: #5b3000;--ran-amber-500: #703e00;--ran-amber-600: #ed9a00;--ran-amber-700: #ffae00;--ran-amber-800: #ff9300;--ran-amber-900: #ff9300;--ran-amber-1000: #fff3d5;--ran-green-100: #002608;--ran-green-200: #00320b;--ran-green-300: #003a0e;--ran-green-400: #004615;--ran-green-500: #006717;--ran-green-600: #00952d;--ran-green-700: #00ac3a;--ran-green-800: #009432;--ran-green-900: #00ca50;--ran-green-1000: #d8ffe4;--ran-color-bg-elevated: var(--ran-gray-100);--ran-color-primary-hover: #cccccc;--ran-color-primary-active: #b3b3b3;--ran-shadow-elevated: 0 1px 2px rgba(0, 0, 0, .16);--ran-shadow-menu: 0 1px 1px rgba(0, 0, 0, .2), 0 4px 8px -4px rgba(0, 0, 0, .4), 0 16px 24px -8px rgba(0, 0, 0, .5);--ran-shadow-modal: 0 1px 1px rgba(0, 0, 0, .2), 0 8px 16px -4px rgba(0, 0, 0, .4), 0 24px 32px -8px rgba(0, 0, 0, .5)} diff --git a/public/ranui-iife/button.iife.js b/public/ranui-iife/button.iife.js index bc83361c4..2bb0d7c08 100644 --- a/public/ranui-iife/button.iife.js +++ b/public/ranui-iife/button.iife.js @@ -1 +1 @@ -var ranui_button=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}};Math.PI/180,180/Math.PI,2*Math.PI;var n=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var r=e=>typeof e==`function`,i=12e4,a=`__ranuts_bridge__`,o=`default`,s=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},c=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=o){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,s.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:a,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,a)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),a(Error(`Request timeout`)))},i),s=e=>{clearTimeout(o),a(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{s.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new c(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=()=>{if(typeof window<`u`){let e=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(e)?`ipad`:/android/.test(e)?`android`:/iphone/.test(e)?`iphone`:`pc`}return`pc`},ee=/["'&<>]/;function f(e){let t=``+e,n=ee.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ie=(e,t,n=re)=>{if(typeof document<`u`&&t&&!m(e,t,te)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},ae=(e,t,n=p)=>{if(typeof document<`u`&&t&&!m(e,t,ne)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var h=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(h),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(h);var oe=`:host{box-sizing:var(--ran-btn-box-sizing,border-box);position:var(--ran-btn-position,relative);display:var(--ran-btn-display,inline-flex);align-self:var(--ran-btn-align-self,flex-start);background-image:var(--ran-btn-background-image,none);box-shadow:var(--ran-btn-box-shadow,var(--ran-skin-raised-shadow,0 2px #00000004));border-radius:var(--ran-btn-border-radius,var(--ran-radius-sm,6px));cursor:var(--ran-btn-cursor,pointer);user-select:var(--ran-btn-user-select,none);touch-action:var(--ran-btn-touch-action,manipulation);overflow:var(--ran-btn-overflow,hidden);pointer-events:var(--ran-btn-pointer-events,auto)}:host .ran-btn{box-sizing:var(--ran-btn-surface-box-sizing,border-box);position:var(--ran-btn-surface-position,relative);display:var(--ran-btn-surface-display,block);background-image:var(--ran-btn-surface-background-image,none);cursor:var(--ran-btn-surface-cursor,pointer);transition:var(--ran-btn-surface-transition,opacity var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-standard,cubic-bezier(.645, .045, .355, 1)));user-select:var(--ran-btn-surface-user-select,none);touch-action:var(--ran-btn-surface-touch-action,manipulation);border-radius:var(--ran-btn-border-radius,var(--ran-radius-sm,6px));background:var(--ran-btn-surface-background,var(--ran-color-bg-elevated,#fff))}:host,:host(:active),:host(:focus){-webkit-tap-highlight-color:transparent;outline:0}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-surface-outline,0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline,2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset,2px)}:host([type=primary]) .ran-btn-content{background-color:var(--ran-btn-background,var(--ran-color-primary,#171717));background-image:var(--ran-btn-content-background-image,none);border-color:var(--ran-btn-border-color,var(--ran-color-primary,#171717));color:var(--ran-btn-color,var(--ran-color-primary-text,#fff))}:host([type=primary]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, var(--ran-color-primary-text,#fff) 10%, transparent 10.01%))}:host([type=primary]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-active-background,var(--ran-color-primary-active,#4d4d4d));border-color:var(--ran-btn-active-border-color,var(--ran-color-primary-active,#4d4d4d))}@media (width>=1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-hover-border-color,var(--ran-color-border-hover,#c9c9c9));color:var(--ran-btn-hover-color,var(--ran-color-text,#171717))}:host([type=primary]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-hover-background,var(--ran-color-primary-hover,#383838));border-color:var(--ran-btn-hover-border-color,var(--ran-color-primary-hover,#383838));color:var(--ran-btn-hover-color,var(--ran-color-primary-text,#fff))}:host([type=warning]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-warning-background,var(--ran-color-danger,#ff4d4f));color:var(--ran-btn-warning-color,#fff)}}:host([type=warning]) .ran-btn-content{border-color:var(--ran-btn-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-warning-background,var(--ran-color-danger,#ff4d4f));background-image:var(--ran-btn-content-background-image,none);color:var(--ran-btn-warning-color,#fff)}:host([type=warning]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type=text]){box-shadow:var(--ran-btn-text-box-shadow,none)}:host([type=text]) .ran-btn{background:var(--ran-btn-text-surface-background,transparent)}:host([type=text]) .ran-btn-content{border:var(--ran-btn-text-border,none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor,not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events,all);opacity:var(--ran-btn-disabled-opacity,.6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-surface-disabled-cursor,not-allowed);pointer-events:var(--ran-btn-surface-disabled-pointer-events,all);opacity:var(--ran-btn-surface-disabled-opacity,.6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform,translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity,.3);transition:var(--ran-btn-after-transition,0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-active-transform,scale(.96))}@media (width>=1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";width:100%;height:100%;left:var(--ran-x,0);top:var(--ran-y,0);pointer-events:none;background-image:radial-gradient(circle, var(--ran-gray-alpha-400,#00000014) 10%, transparent 10.01%);opacity:0;background-position:50%;background-repeat:no-repeat;transition:transform .3s,opacity .8s;display:block;position:absolute;transform:translate(-50%,-50%)scale(10)}}:host .slot{display:var(--ran-btn-slot-display,block)}:host([hidden]){display:none}.ran-btn-content{display:var(--ran-btn-content-display,flex);justify-content:var(--ran-btn-content-justify-content,space-between);align-items:var(--ran-btn-align-items,center);padding:var(--ran-btn-padding,var(--ran-space-2,8px) var(--ran-space-4,16px));border:var(--ran-btn-border,1px solid transparent);border-image-source:var(--ran-btn-border-image-source,none);border-image-slice:var(--ran-btn-border-image-slice,8);border-image-width:var(--ran-btn-border-image-width,var(--ran-skin-border-image-width,4px));border-radius:var(--ran-btn-border-radius,var(--ran-radius-sm,6px));border-color:var(--ran-btn-border-color,var(--ran-color-border,#eaeaea));color:var(--ran-btn-color,var(--ran-color-text,#000000d9));line-height:var(--ran-btn-line-height,var(--ran-text-button-line-height,1));font-size:var(--ran-btn-font-size,var(--ran-text-button-size,14px));font-weight:var(--ran-btn-font-weight,var(--ran-text-button-weight,500));font-family:var(--ran-btn-font-family,var(--ran-skin-font-family,inherit));white-space:var(--ran-btn-white-space,nowrap);text-align:var(--ran-btn-text-align,center);box-sizing:var(--ran-btn-content-box-sizing,border-box);transition:var(--ran-btn-transition,transform var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-spring,cubic-bezier(.34, 1.26, .5, 1)));border-image-outset:0;border-image-repeat:stretch}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right,var(--ran-space-1,4px))}@media (prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}`,g=typeof document>`u`,se=class{ac=null;get signal(){return this.ac??=new AbortController,this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},_=0,v=1,y=2,b=null,x=null,S=0,C=new Set,w=!1;function T(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ue(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)k(e,y);S===0&&de()}}]}function E(e){let t=ce(e,!0);return le(t),j(t),()=>N(t)}function D(e){let t={owned:[],cleanups:[],owner:x},n=x,r=b;x=t,b=null;try{return e(()=>fe(t))}finally{x=n,b=r}}function O(e){x&&x.cleanups.push(e)}function ce(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:y,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:x}}function le(e){x&&x.owned.push(e)}function ue(e){b&&(b.sources.add(e),e.observers.add(b))}function k(e,t){if(e.disposed||e.state>=t)return;let n=e.state===_;if(e.state=t,e.isEffect)C.add(e);else if(n)for(let t of e.observers)k(t,v)}function de(){if(!(S>0||w)){w=!0;try{for(;C.size>0;){let e=[...C];C.clear();for(let t of e)t.disposed||A(t)}}finally{w=!1}}}function A(e){if(!(e.disposed||e.state===_)){if(e.state===v)for(let t of e.sources)`fn`in t&&A(t);e.state===y&&j(e),e.state=_}}function j(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);M(e);let t=b,n=x;b=e,x=e,e.running=!0,e.state=_;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)k(t,y)}}finally{e.running=!1,b=t,x=n}}function M(e){for(let t of e.owned)N(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function N(e){e.disposed||(e.disposed=!0,M(e),e.observers.clear())}function fe(e){for(let t of e.owned)N(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function P(e){return f(e)}var pe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,me=`.#[`;function he(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var ge=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},_e=(e,t)=>{let n=t.trim();if(!n)return!1;let r=he(n);return r!==null&&r.every(t=>ge(e,t))},F=(e,t,n)=>{for(let r of e)pe(r)&&(_e(r,t)&&n.push(r),F(r.childrenList,t,n))},I=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?f(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}},L=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new I)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ve(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${P(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${P(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?f(e):(e instanceof I,e.serialize())).join(``):a+=f(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},ve=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}serialize(){return``}},R=()=>({current:null}),z=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(z(t)):e.concat(t),[]),B=e=>e==null?null:e instanceof U?e.build():typeof e==`string`?g?e:document.createTextNode(e):e,ye=(e,t)=>{if(g){H(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};E(()=>{let e=t();a();let n=document.createDocumentFragment();i=D(t=>(H(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),O(()=>i?.())},be=`__ranFor`,xe=e=>typeof e==`object`&&!!e&&e[be]===!0,Se=(e,t,n)=>{let[r,i]=T(t),a=null,o=D(t=>{let i=B(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},V=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Ce=(e,t)=>{if(g){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;O(()=>{for(let e of r.values())e.dispose();r.clear()}),E(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=Se(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();V(n,a),r=i})},we=`__ranIndex`,Te=e=>typeof e==`object`&&!!e&&e[we]===!0,Ee=(e,t,n)=>{let[r,i]=T(e),a=null,o=D(e=>{let i=B(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},De=(e,t)=>{if(g){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];O(()=>{for(let e of r)e.dispose();r=[]}),E(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}V(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{z(t).forEach(t=>{if(xe(t)){Ce(e,t);return}if(Te(t)){De(e,t);return}if(typeof t==`function`){ye(e,t);return}let n=B(t);n!=null&&e.appendChild(n)})},Oe=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),U=class{el;constructor(e,t){let n=t??(Oe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=g?new L(e):n?document.createElementNS(n,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?E(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{g?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return H(this.el,e),this}replaceChildren(...e){if(g){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ke(this.el,t,e)}build(){return this.el}serialize(){if(g)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ke=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return H(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(g)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return g?this.root.serialize():this.root.innerHTML}},W=e=>new U(e),G=()=>W(`div`),Ae=()=>W(`slot`),K=[!1,`false`,null,void 0],q=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!K.includes(n))},je=new Map;function Me(e,t){g?(je.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ne=typeof document<`u`?HTMLElement:L,Pe=`data-ranui`,Fe=`data-ranui-sheet`,J=(e,t)=>ie(e,t,Pe),Ie=(e,t)=>ae(e,t,Fe),Y=new WeakMap,X=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Z=new Map,Le=e=>{let t=Z.get(e);if(t!==void 0)return t;let n=e?`${e}\n${X}`:X;return Z.set(e,n),n},Re=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),J(r,Le(t)),r},Q=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},ze=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ie(t,a)};function Be(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var $=class extends Ne{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new se;debounceTimeId;static get observedAttributes(){return[`disabled`,`icon`,`effect`,`iconSize`,`type`,`aria-label`,`sheet`]}constructor(){super(),this._shadowDom=Re(this,oe);let e=R(),t=R(),n=G().class(`ran-btn`).attr(`part`,`button`).role(`button`).tabIndex(0).children(G().class(`ran-btn-content`).ref(e).attr(`part`,`content`).children(Ae().ref(t).class(`slot`))).build();this._shadowDom.appendChild(n),this._btn=n,this._btnContent=Q(e,`content`),this._slot=Q(t,`slot`)}get sheet(){return this.getAttribute(`sheet`)||``}set sheet(e){this.setAttribute(`sheet`,e||``),this.handlerExternalCss()}get disabled(){return q(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`)):(this.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`))}get iconSize(){return this.getAttribute(`iconSize`)||``}set iconSize(e){!e||e===`false`?this.removeAttribute(`iconSize`):(this.setAttribute(`iconSize`,e),this.setIcon())}get icon(){return this.getAttribute(`icon`)||``}set icon(e){!e||e===`false`?this.removeAttribute(`icon`):(this.setAttribute(`icon`,e),this.setIcon())}get effect(){return this.getAttribute(`effect`)||``}set effect(e){K.includes(e)||!e?this.removeAttribute(`effect`):this.setAttribute(`effect`,e)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}setIcon=()=>{if(typeof document>`u`||!this._slot)return;let e=this.icon;if(!e){this._iconElement&&=(this._iconElement.remove(),void 0);return}if(this._iconElement)this._iconElement.setAttribute(`name`,e);else{let t=this._shadowDom.querySelector(`r-icon`);t||(t=W(`r-icon`).attr(`color`,`currentColor`).class(`icon`).build(),this._slot.insertAdjacentElement(`beforebegin`,t)),this._iconElement=t,this._iconElement.setAttribute(`name`,e)}let t=Number.parseFloat(getComputedStyle(this._btnContent).fontSize)||14,n=this.iconSize||`${Math.round(t*1.15)}`;this._iconElement.setAttribute(`size`,String(n))};mousedown=e=>{if(d()===`pc`&&!this.disabled){this.debounceMouseEvent();let{left:t,top:n}=this.getBoundingClientRect();this._btn.style.setProperty(`--ran-x`,`${e.clientX-t}px`),this._btn.style.setProperty(`--ran-y`,`${e.clientY-n}px`)}};mouseup=()=>{d()===`pc`&&(this.debounceTimeId||=setTimeout(()=>{this._btn.style.removeProperty(`--ran-x`),this._btn.style.removeProperty(`--ran-y`),this.debounceMouseEvent()},600))};keydown=e=>{q(this)||Be(e)&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&=(clearTimeout(this.debounceTimeId),void 0)};handlerExternalCss=()=>{ze(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11yState=()=>{let e=q(this);this._btn.setAttribute(`aria-disabled`,e?`true`:`false`),this._btn.tabIndex=e?-1:0,e?(this.setAttribute(`aria-disabled`,`true`),this._btnContent.setAttribute(`disabled`,`true`)):(this.removeAttribute(`aria-disabled`),this._btnContent.removeAttribute(`disabled`))};connectedCallback(){this.handlerExternalCss(),this.setIcon(),this.syncA11yState(),this.syncAriaLabel(),this._events.on(this._btn,`mousedown`,this.mousedown).on(this._btn,`mouseup`,this.mouseup).on(this._btn,`keydown`,this.keydown)}disconnectedCallback(){this.debounceMouseEvent(),this._events.abort()}syncAriaLabel=()=>{let e=this.getAttribute(`aria-label`);e===null?this._btn.removeAttribute(`aria-label`):this._btn.setAttribute(`aria-label`,e)};attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._btnContent&&this.syncA11yState(),e===`aria-label`&&this.syncAriaLabel(),(e===`icon`||e===`iconSize`)&&this.setIcon(),e===`sheet`&&this.handlerExternalCss())}};return Me(`r-button`,$),e.Button=$,e.default=$,e})({}); \ No newline at end of file +var ranui_button=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=()=>{if(typeof window<`u`){let e=navigator.userAgent.toLowerCase();return/ipad|ipod/.test(e)?`ipad`:/android/.test(e)?`android`:/iphone/.test(e)?`iphone`:`pc`}return`pc`},n=/["'&<>]/;function r(e){let t=``+e,r=n.exec(t);if(!r)return t;let i,a=``,o=0,s=0;for(o=r.index;o{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},a=new Map,o=new Map,s=`data-adopted-style`,c=`data-adopted-sheet`,l=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},u=(e,t,n=s)=>{if(!(typeof document>`u`)&&t&&!l(e,t,a)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},ee=(e,t,n=c)=>{if(!(typeof document>`u`)&&t&&!l(e,t,o)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},te=`:host{box-sizing:var(--ran-btn-box-sizing,border-box);position:var(--ran-btn-position,relative);display:var(--ran-btn-display,inline-flex);align-self:var(--ran-btn-align-self,flex-start);background-image:var(--ran-btn-background-image,none);box-shadow:var(--ran-btn-box-shadow,var(--ran-skin-raised-shadow,0 2px #00000004));border-radius:var(--ran-btn-border-radius,var(--ran-radius-sm,6px));cursor:var(--ran-btn-cursor,pointer);user-select:var(--ran-btn-user-select,none);touch-action:var(--ran-btn-touch-action,manipulation);overflow:var(--ran-btn-overflow,hidden);pointer-events:var(--ran-btn-pointer-events,auto)}:host .ran-btn{box-sizing:var(--ran-btn-surface-box-sizing,border-box);position:var(--ran-btn-surface-position,relative);display:var(--ran-btn-surface-display,block);background-image:var(--ran-btn-surface-background-image,none);cursor:var(--ran-btn-surface-cursor,pointer);transition:var(--ran-btn-surface-transition,opacity var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-standard,cubic-bezier(.645, .045, .355, 1)));user-select:var(--ran-btn-surface-user-select,none);touch-action:var(--ran-btn-surface-touch-action,manipulation);border-radius:var(--ran-btn-border-radius,var(--ran-radius-sm,6px));background:var(--ran-btn-surface-background,var(--ran-color-bg-elevated,#fff))}:host,:host(:active),:host(:focus){-webkit-tap-highlight-color:transparent;outline:0}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:var(--ran-btn-surface-outline,0)}:host(:focus-visible){outline:var(--ran-btn-focus-outline,2px solid var(--ran-color-primary));outline-offset:var(--ran-btn-focus-outline-offset,2px)}:host([type=primary]) .ran-btn-content{background-color:var(--ran-btn-background,var(--ran-color-primary,#171717));background-image:var(--ran-btn-content-background-image,none);border-color:var(--ran-btn-border-color,var(--ran-color-primary,#171717));color:var(--ran-btn-color,var(--ran-color-primary-text,#fff))}:host([type=primary]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, var(--ran-color-primary-text,#fff) 10%, transparent 10.01%))}:host([type=primary]:not([disabled]):active) .ran-btn-content{background-color:var(--ran-btn-active-background,var(--ran-color-primary-active,#4d4d4d));border-color:var(--ran-btn-active-border-color,var(--ran-color-primary-active,#4d4d4d))}@media (width>=1024px){:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-hover-border-color,var(--ran-color-border-hover,#c9c9c9));color:var(--ran-btn-hover-color,var(--ran-color-text,#171717))}:host([type=primary]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-hover-background,var(--ran-color-primary-hover,#383838));border-color:var(--ran-btn-hover-border-color,var(--ran-color-primary-hover,#383838));color:var(--ran-btn-hover-color,var(--ran-color-primary-text,#fff))}:host([type=warning]:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-warning-background,var(--ran-color-danger,#ff4d4f));color:var(--ran-btn-warning-color,#fff)}}:host([type=warning]) .ran-btn-content{border-color:var(--ran-btn-warning-border-color,var(--ran-color-danger,#ff4d4f));background-color:var(--ran-btn-warning-background,var(--ran-color-danger,#ff4d4f));background-image:var(--ran-btn-content-background-image,none);color:var(--ran-btn-warning-color,#fff)}:host([type=warning]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image,radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type=text]){box-shadow:var(--ran-btn-text-box-shadow,none)}:host([type=text]) .ran-btn{background:var(--ran-btn-text-surface-background,transparent)}:host([type=text]) .ran-btn-content{border:var(--ran-btn-text-border,none)}:host([disabled]){cursor:var(--ran-btn-disabled-cursor,not-allowed);pointer-events:var(--ran-btn-disabled-pointer-events,all);opacity:var(--ran-btn-disabled-opacity,.6)}:host([disabled]) .ran-btn{cursor:var(--ran-btn-surface-disabled-cursor,not-allowed);pointer-events:var(--ran-btn-surface-disabled-pointer-events,all);opacity:var(--ran-btn-surface-disabled-opacity,.6)}:host(:not([disabled]):active) .ran-btn:after{transform:var(--ran-btn-after-transform,translate(-50%, -50%) scale(0));opacity:var(--ran-btn-after-opacity,.3);transition:var(--ran-btn-after-transition,0s)}:host(:not([disabled]):active) .ran-btn-content{transform:var(--ran-btn-active-transform,scale(.96))}@media (width>=1024px){:host(:not([disabled],[effect=false])) .ran-btn:after{content:"";width:100%;height:100%;left:var(--ran-x,0);top:var(--ran-y,0);pointer-events:none;background-image:radial-gradient(circle, var(--ran-gray-alpha-400,#00000014) 10%, transparent 10.01%);opacity:0;background-position:50%;background-repeat:no-repeat;transition:transform .3s,opacity .8s;display:block;position:absolute;transform:translate(-50%,-50%)scale(10)}}:host .slot{display:var(--ran-btn-slot-display,block)}:host([hidden]){display:none}.ran-btn-content{display:var(--ran-btn-content-display,flex);justify-content:var(--ran-btn-content-justify-content,space-between);align-items:var(--ran-btn-align-items,center);padding:var(--ran-btn-padding,var(--ran-space-2,8px) var(--ran-space-4,16px));border:var(--ran-btn-border,1px solid transparent);border-image-source:var(--ran-btn-border-image-source,none);border-image-slice:var(--ran-btn-border-image-slice,8);border-image-width:var(--ran-btn-border-image-width,var(--ran-skin-border-image-width,4px));border-radius:var(--ran-btn-border-radius,var(--ran-radius-sm,6px));border-color:var(--ran-btn-border-color,var(--ran-color-border,#eaeaea));color:var(--ran-btn-color,var(--ran-color-text,#000000d9));line-height:var(--ran-btn-line-height,var(--ran-text-button-line-height,1));font-size:var(--ran-btn-font-size,var(--ran-text-button-size,14px));font-weight:var(--ran-btn-font-weight,var(--ran-text-button-weight,500));font-family:var(--ran-btn-font-family,var(--ran-skin-font-family,inherit));white-space:var(--ran-btn-white-space,nowrap);text-align:var(--ran-btn-text-align,center);box-sizing:var(--ran-btn-content-box-sizing,border-box);transition:var(--ran-btn-transition,transform var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-spring,cubic-bezier(.34, 1.26, .5, 1)));border-image-outset:0;border-image-repeat:stretch}.ran-btn-content .icon{margin-right:var(--ran-btn-icon-margin-right,var(--ran-space-1,4px))}@media (prefers-reduced-motion:reduce){.ran-btn-content{transition:none}}`,d=typeof document>`u`,f=0,p=1,m=2,h=null,g=null,_=0,v=new Set,y=!1;function b(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(re(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)E(e,m);_===0&&ie()}}]}function x(e){let t=T(e,!0);return ne(t),O(t),()=>A(t)}function S(e){let t=h;h=null;try{return e()}finally{h=t}}function C(e){let t={owned:[],cleanups:[],owner:g},n=g,r=h;g=t,h=null;try{return e(()=>ae(t))}finally{g=n,h=r}}function w(e){g&&g.cleanups.push(e)}function T(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:m,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:g}}function ne(e){g&&g.owned.push(e)}function re(e){h&&(h.sources.add(e),e.observers.add(h))}function E(e,t){if(e.disposed||e.state>=t)return;let n=e.state===f;if(e.state=t,e.isEffect)v.add(e);else if(n)for(let t of e.observers)E(t,p)}function ie(){if(!(_>0||y)){y=!0;try{for(;v.size>0;){let e=[...v];v.clear();for(let t of e)t.disposed||D(t)}}finally{y=!1}}}function D(e){if(!(e.disposed||e.state===f)){if(e.state===p)for(let t of e.sources)`fn`in t&&D(t);e.state===m&&O(e),e.state=f}}function O(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);k(e);let t=h,n=g;h=e,g=e,e.running=!0,e.state=f;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)E(t,m)}}finally{e.running=!1,h=t,g=n}}function k(e){for(let t of e.owned)A(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function A(e){e.disposed||(e.disposed=!0,k(e),e.observers.clear())}function ae(e){for(let t of e.owned)A(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function j(e){return r(e)}var oe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,se=`.#[`;function ce(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var le=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},ue=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ce(n);return r!==null&&r.every(t=>le(e,t))},M=(e,t,n)=>{for(let r of e)oe(r)&&(ue(r,t)&&n.push(r),M(r.childrenList,t,n))},N=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?r(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}},de=new Map,P=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??de}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:r(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new N)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new fe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${j(t)}"`).join(``),i=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=i?` style="${j(i)}"`:``,o=``;return this.shadowRoot&&(o+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?o+=this._innerHTML:o+=this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof N,e.serialize())).join(``):o+=r(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!o?`<${t}${n}${a} />`:`<${t}${n}${a}>${o}`}},fe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}serialize(){return``}},F={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let n of t){if(n==null)continue;if(Array.isArray(n)){F.append(e,n);continue}if(typeof n==`function`){F.append(e,[n()]);continue}if(typeof n==`object`&&(`__ranFor`in n||`__ranIndex`in n))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=n instanceof R?n.build():typeof n==`string`&&!d?document.createTextNode(n):n;e.appendChild(t)}}},I=`http://www.w3.org/2000/svg`,L=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),R=class{runtime;el;constructor(e,t,n=F){this.runtime=n;let r=t??(L.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=d?new P(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{d?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(d){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new z(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(d)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},z=class{runtime;root;hostEl;constructor(e,t,n,r=F){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(d)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return d?this.root.serialize():this.root.innerHTML}},B=()=>({current:null}),V=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(V(t)):e.concat(t),[]),H=e=>e==null?null:e instanceof R?e.build():typeof e==`string`?d?e:document.createTextNode(e):e,pe=(e,t)=>{if(d){W(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};x(()=>{let e=t();a();let n=document.createDocumentFragment();i=C(t=>(W(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),w(()=>i?.())},me=`__ranFor`,he=e=>typeof e==`object`&&!!e&&e[me]===!0,ge=(e,t,n)=>{let[r,i]=b(t),a=null,o=C(t=>{let i=H(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},U=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},_e=(e,t)=>{if(d){(t.each()??[]).forEach((n,r)=>{let i=H(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;w(()=>{for(let e of r.values())e.dispose();r.clear()}),x(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Se()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=r.get(o);s?(r.delete(o),s.index(n)):s=ge(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();U(n,a),r=i})},ve=`__ranIndex`,ye=e=>typeof e==`object`&&!!e&&e[ve]===!0,be=(e,t,n)=>{let[r,i]=b(e),a=null,o=C(e=>{let i=H(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},xe=(e,t)=>{if(d){(t.each()??[]).forEach((n,r)=>{let i=H(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];w(()=>{for(let e of r)e.dispose();r=[]}),x(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}U(n,r.map(e=>e.node).filter(e=>e!=null))})},W=(e,t)=>{d?S(()=>G(e,t)):G(e,t)},G=(e,t)=>{V(t).forEach(t=>{if(he(t)){_e(e,t);return}if(ye(t)){xe(e,t);return}if(typeof t==`function`){pe(e,t);return}let n=H(t);n!=null&&e.appendChild(n)})},Se=()=>!1,Ce={bind(e,t){if(typeof e!=`function`){t(e);return}d?S(()=>t(e())):x(()=>t(e()))},append:W},we=class extends R{constructor(e,t){super(e,t,Ce)}};function Te(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,I),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:Ee,Div:K,Svg:De,Span:Oe,Slot:ke,ButtonBuilder:Ae,InputBuilder:je,Style:Me,Label:Ne,Ul:Pe,Li:Fe,Section:Ie,Article:Le,Nav:Re,Header:ze,Footer:Be,Main:Ve,DeclarativeShadow:He}=Te(we),Ue=new Map;function We(e,t){d?(Ue.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ge=typeof document<`u`?HTMLElement:P,Ke=[!1,`false`,null,void 0],q=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!Ke.includes(n))},J=`data-ranui`,qe=`data-ranui-sheet`,Je=(e,t)=>u(e,t,J),Ye=(e,t)=>ee(e,t,qe),Y=new WeakMap,X=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Z=new Map,Xe=e=>{let t=Z.get(e);if(t!==void 0)return t;let n=e?`${e}\n${X}`:X;return Z.set(e,n),n},Ze=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),Je(r,Xe(t)),r},Q=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},Qe=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ye(t,a)};function $e(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var $=class extends Ge{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new i;debounceTimeId;static get observedAttributes(){return[`disabled`,`icon`,`effect`,`iconSize`,`type`,`aria-label`,`sheet`]}constructor(){super(),this._shadowDom=Ze(this,te);let e=B(),t=B(),n=K().class(`ran-btn`).attr(`part`,`button`).role(`button`).tabIndex(0).children(K().class(`ran-btn-content`).ref(e).attr(`part`,`content`).children(ke().ref(t).class(`slot`))).build();this._shadowDom.appendChild(n),this._btn=n,this._btnContent=Q(e,`content`),this._slot=Q(t,`slot`)}get sheet(){return this.getAttribute(`sheet`)||``}set sheet(e){this.setAttribute(`sheet`,e||``),this.handlerExternalCss()}get disabled(){return q(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`)):(this.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`))}get iconSize(){return this.getAttribute(`iconSize`)||``}set iconSize(e){!e||e===`false`?this.removeAttribute(`iconSize`):(this.setAttribute(`iconSize`,e),this.setIcon())}get icon(){return this.getAttribute(`icon`)||``}set icon(e){!e||e===`false`?this.removeAttribute(`icon`):(this.setAttribute(`icon`,e),this.setIcon())}get effect(){return this.getAttribute(`effect`)!==`false`}set effect(e){!e||e===`false`?this.setAttribute(`effect`,`false`):this.removeAttribute(`effect`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}setIcon=()=>{if(typeof document>`u`||!this._slot)return;let e=this.icon;if(!e){this._iconElement&&=(this._iconElement.remove(),void 0);return}if(this._iconElement)this._iconElement.setAttribute(`name`,e);else{let t=this._shadowDom.querySelector(`r-icon`);t||(t=Ee(`r-icon`).attr(`color`,`currentColor`).class(`icon`).build(),this._slot.insertAdjacentElement(`beforebegin`,t)),this._iconElement=t,this._iconElement.setAttribute(`name`,e)}let t=Number.parseFloat(getComputedStyle(this._btnContent).fontSize)||14,n=this.iconSize||`${Math.round(t*1.15)}`;this._iconElement.setAttribute(`size`,String(n))};mousedown=e=>{if(t()===`pc`&&!this.disabled){this.debounceMouseEvent();let{left:t,top:n}=this.getBoundingClientRect();this._btn.style.setProperty(`--ran-x`,`${e.clientX-t}px`),this._btn.style.setProperty(`--ran-y`,`${e.clientY-n}px`)}};mouseup=()=>{t()===`pc`&&(this.debounceTimeId||=setTimeout(()=>{this._btn.style.removeProperty(`--ran-x`),this._btn.style.removeProperty(`--ran-y`),this.debounceMouseEvent()},600))};keydown=e=>{q(this)||$e(e)&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&=(clearTimeout(this.debounceTimeId),void 0)};handlerExternalCss=()=>{Qe(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11yState=()=>{let e=q(this);this._btn.setAttribute(`aria-disabled`,e?`true`:`false`),this._btn.tabIndex=e?-1:0,e?(this.setAttribute(`aria-disabled`,`true`),this._btnContent.setAttribute(`disabled`,`true`)):(this.removeAttribute(`aria-disabled`),this._btnContent.removeAttribute(`disabled`))};connectedCallback(){this.handlerExternalCss(),this.setIcon(),this.syncA11yState(),this.syncAriaLabel(),this._events.on(this._btn,`mousedown`,this.mousedown).on(this._btn,`mouseup`,this.mouseup).on(this._btn,`keydown`,this.keydown)}disconnectedCallback(){this.debounceMouseEvent(),this._events.abort()}syncAriaLabel=()=>{let e=this.getAttribute(`aria-label`);e===null?this._btn.removeAttribute(`aria-label`):this._btn.setAttribute(`aria-label`,e)};attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._btnContent&&this.syncA11yState(),e===`aria-label`&&this.syncAriaLabel(),(e===`icon`||e===`iconSize`)&&this.setIcon(),e===`sheet`&&this.handlerExternalCss())}};return We(`r-button`,$),e.Button=$,e.default=$,e})({}); \ No newline at end of file diff --git a/public/ranui-iife/card.iife.js b/public/ranui-iife/card.iife.js index 33dac7810..71dd4d919 100644 --- a/public/ranui-iife/card.iife.js +++ b/public/ranui-iife/card.iife.js @@ -1 +1 @@ -var ranui_card=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{display:var(--ran-card-display,block);box-sizing:border-box;min-height:var(--ran-card-min-height,0)}:host([hidden]){display:none}:host([hoverable]:hover) .ran-card{border-color:var(--ran-card-hover-border-color,var(--ran-color-border-hover,#c9c9c9));box-shadow:var(--ran-card-hover-shadow,var(--ran-shadow-elevated,0 1px 2px #0000000a))}.ran-card{align-content:start;gap:var(--ran-card-gap,var(--ran-space-4,16px));min-width:0;height:100%;padding:var(--ran-card-padding,var(--ran-space-4,16px));border-width:var(--ran-skin-border-width,1px);border-style:var(--ran-skin-border-style,solid);border-color:var(--ran-card-border-color,var(--ran-color-border,#eaeaea));border-radius:var(--ran-card-radius,var(--ran-radius-md));background:var(--ran-card-background,var(--ran-color-bg));box-shadow:var(--ran-card-shadow,none);box-sizing:border-box;display:grid}.ran-card-header{justify-content:space-between;align-items:flex-start;gap:var(--ran-card-header-gap,var(--ran-space-4,16px));display:flex}.ran-card-title-area{flex:1;min-width:0}.ran-card-title{color:var(--ran-card-title-color,var(--ran-color-text));font-size:var(--ran-card-title-font-size,var(--ran-text-heading-4,16px));font-weight:var(--ran-card-title-font-weight,var(--ran-text-heading-weight,600));letter-spacing:var(--ran-card-title-letter-spacing,var(--ran-text-heading-tracking,-.03em));margin:0;line-height:1.3}.ran-card-title:empty{display:none}.ran-card-description{margin:var(--ran-card-description-margin-top,var(--ran-space-1,4px)) 0 0;color:var(--ran-card-description-color,var(--ran-color-text-secondary));font-size:var(--ran-card-description-font-size,var(--ran-text-copy-2,14px));font-weight:var(--ran-card-description-font-weight,var(--ran-text-copy-weight,400));line-height:1.5}.ran-card-description:empty{display:none}.ran-card-body,.ran-card-footer{min-width:0}:host(:not([title]):not([description])) .ran-card-header{display:none}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)h(e,a);c===0&&re()}}]}function f(e){let t=ee(e,!0);return te(t),_(t),()=>y(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ie(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function te(e){s&&s.owned.push(e)}function ne(e){o&&(o.sources.add(e),e.observers.add(o))}function h(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)h(t,i)}function re(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||g(t)}}finally{u=!1}}}function g(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&g(t);e.state===a&&_(e),e.state=r}}function _(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);v(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)h(t,a)}}finally{e.running=!1,o=t,s=n}}function v(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function y(e){e.disposed||(e.disposed=!0,v(e),e.observers.clear())}function ie(e){for(let t of e.owned)y(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var ae=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}};Math.PI/180,180/Math.PI,2*Math.PI;var b=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var oe=e=>typeof e==`function`,se=12e4,ce=`__ranuts_bridge__`,le=`default`,x=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},ue=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=le){this.targetOrigin=t,this.channel=n,this.senderId=b(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,x.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ce,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(oe(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=b(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},se),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{x.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new ue(n,t,r);if(e||=b(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new ae;var S=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],C=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new C(S[0],3609767458),new C(S[1],602891725),new C(S[2],3964484399),new C(S[3],2173295548),new C(S[4],4081628472),new C(S[5],3053834265),new C(S[6],2937671579),new C(S[7],3664609560),new C(S[8],2734883394),new C(S[9],1164996542),new C(S[10],1323610764),new C(S[11],3590304994),new C(S[12],4068182383),new C(S[13],991336113),new C(S[14],633803317),new C(S[15],3479774868),new C(S[16],2666613458),new C(S[17],944711139),new C(S[18],2341262773),new C(S[19],2007800933),new C(S[20],1495990901),new C(S[21],1856431235),new C(S[22],3175218132),new C(S[23],2198950837),new C(S[24],3999719339),new C(S[25],766784016),new C(S[26],2566594879),new C(S[27],3203337956),new C(S[28],1034457026),new C(S[29],2466948901),new C(S[30],3758326383),new C(S[31],168717936),new C(S[32],1188179964),new C(S[33],1546045734),new C(S[34],1522805485),new C(S[35],2643833823),new C(S[36],2343527390),new C(S[37],1014477480),new C(S[38],1206759142),new C(S[39],344077627),new C(S[40],1290863460),new C(S[41],3158454273),new C(S[42],3505952657),new C(S[43],106217008),new C(S[44],3606008344),new C(S[45],1432725776),new C(S[46],1467031594),new C(S[47],851169720),new C(S[48],3100823752),new C(S[49],1363258195),new C(S[50],3750685593),new C(S[51],3785050280),new C(S[52],3318307427),new C(S[53],3812723403),new C(S[54],2003034995),new C(S[55],3602036899),new C(S[56],1575990012),new C(S[57],1125592928),new C(S[58],2716904306),new C(S[59],442776044),new C(S[60],593698344),new C(S[61],3733110249),new C(S[62],2999351573),new C(S[63],3815920427),new C(3391569614,3928383900),new C(3515267271,566280711),new C(3940187606,3454069534),new C(4118630271,4000239992),new C(116418474,1914138554),new C(174292421,2731055270),new C(289380356,3203993006),new C(460393269,320620315),new C(685471733,587496836),new C(852142971,1086792851),new C(1017036298,365543100),new C(1126000580,2618297676),new C(1288033470,3409855158),new C(1501505948,4234509866),new C(1607167915,987167468),new C(1816402316,1246189591),new C(0,1),new C(0,32898),new C(2147483648,32906),new C(2147483648,2147516416),new C(0,32907),new C(0,2147483649),new C(2147483648,2147516545),new C(2147483648,32777),new C(0,138),new C(0,136),new C(0,2147516425),new C(0,2147483658),new C(0,2147516555),new C(2147483648,139),new C(2147483648,32905),new C(2147483648,32771),new C(2147483648,32770),new C(2147483648,128),new C(0,32778),new C(2147483648,2147483658),new C(2147483648,2147516545),new C(2147483648,32896),new C(0,2147483649),new C(2147483648,2147516424);var de=/["'&<>]/;function w(e){let t=``+e,n=de.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},pe=(e,t,n=E)=>{if(typeof document<`u`&&t&&!O(e,t,fe)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},me=(e,t,n=D)=>{if(typeof document<`u`&&t&&!O(e,t,T)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var k=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(k),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(k);function A(e){return w(e)}var he=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ge=`.#[`;function _e(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var ve=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},j=(e,t)=>{let n=t.trim();if(!n)return!1;let r=_e(n);return r!==null&&r.every(t=>ve(e,t))},M=(e,t,n)=>{for(let r of e)he(r)&&(j(r,t)&&n.push(r),M(r.childrenList,t,n))},N=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?w(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}},P=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new N)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new F(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${A(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${A(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?w(e):(e instanceof N,e.serialize())).join(``):a+=w(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},F=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}serialize(){return``}},I=()=>({current:null}),L=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(L(t)):e.concat(t),[]),R=e=>e==null?null:e instanceof H?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ye=(e,t)=>{if(n){V(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(V(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},be=`__ranFor`,z=e=>typeof e==`object`&&!!e&&e[be]===!0,xe=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=R(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},B=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Se=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=xe(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();B(r,a),i=n})},Ce=`__ranIndex`,we=e=>typeof e==`object`&&!!e&&e[Ce]===!0,Te=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=R(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ee=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}B(r,i.map(e=>e.node).filter(e=>e!=null))})},V=(e,t)=>{L(t).forEach(t=>{if(z(t)){Se(e,t);return}if(we(t)){Ee(e,t);return}if(typeof t==`function`){ye(e,t);return}let n=R(t);n!=null&&e.appendChild(n)})},De=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),H=class{el;constructor(e,t){let r=t??(De.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new P(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return V(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new Oe(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Oe=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return V(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},U=e=>new H(e),W=()=>U(`div`),G=()=>U(`slot`),ke=new Map;function Ae(e,t){n?(ke.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var je=typeof document<`u`?HTMLElement:P,Me=`data-ranui`,Ne=`data-ranui-sheet`,Pe=(e,t)=>pe(e,t,Me),Fe=(e,t)=>me(e,t,Ne),K=new WeakMap,q=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,J=new Map,Ie=e=>{let t=J.get(e);if(t!==void 0)return t;let n=e?`${e}\n${q}`:q;return J.set(e,n),n},Le=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||K.get(e)||e.attachShadow(n);return K.set(e,r),Pe(r,Ie(t)),r},Y=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},X=(e,t,n=``)=>e.getAttribute(t)??n,Z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Q=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Fe(t,a)},$=class extends je{_shadowDom;_titleEl;_descriptionEl;_headerEl;_footerEl;static get observedAttributes(){return[`heading`,`description`,`sheet`,`hoverable`]}constructor(){super(),this._shadowDom=Le(this,t);let e=I(),n=I(),r=I(),i=I(),a=I(),o=W().class(`ran-card`).attr(`part`,`card`).children(W().class(`ran-card-header`).ref(e).attr(`part`,`header`).children(W().class(`ran-card-title-area`).children(W().class(`ran-card-title`).ref(n).attr(`part`,`title`),W().class(`ran-card-description`).ref(r).attr(`part`,`description`)),G().attr(`name`,`extra`).attr(`part`,`extra`)),W().class(`ran-card-body`).attr(`part`,`body`).children(G()),W().class(`ran-card-footer`).ref(i).attr(`part`,`footer`).children(G().attr(`name`,`footer`).ref(a))).build();this._shadowDom.appendChild(o),this._headerEl=Y(e,`header`),this._titleEl=Y(n,`title`),this._descriptionEl=Y(r,`description`),this._footerEl=Y(i,`footer`),this._footerEl.style.display=`none`;let s=Y(a,`slot[name="footer"]`);s.addEventListener(`slotchange`,()=>{this._footerEl.style.display=s.assignedElements().length>0?``:`none`})}get heading(){return X(this,`heading`)}set heading(e){Z(this,`heading`,e)}get description(){return X(this,`description`)}set description(e){Z(this,`description`,e)}get sheet(){return X(this,`sheet`)}set sheet(e){Z(this,`sheet`,e)}get hoverable(){return this.hasAttribute(`hoverable`)}set hoverable(e){e?this.setAttribute(`hoverable`,``):this.removeAttribute(`hoverable`)}_syncTitle(){this._titleEl.textContent=this.getAttribute(`heading`)??``}_syncDescription(){this._descriptionEl.textContent=this.getAttribute(`description`)??``}connectedCallback(){this._syncTitle(),this._syncDescription(),Q(this,this._shadowDom,`sheet`,null,this.sheet)}attributeChangedCallback(e,t,n){t!==n&&(e===`heading`&&this._syncTitle(),e===`description`&&this._syncDescription(),e===`sheet`&&Q(this,this._shadowDom,e,t,n))}};return Ae(`r-card`,$),e.Card=$,e.default=$,e})({}); \ No newline at end of file +var ranui_card=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{display:var(--ran-card-display,block);box-sizing:border-box;min-height:var(--ran-card-min-height,0)}:host([hidden]){display:none}:host([hoverable]:hover) .ran-card{border-color:var(--ran-card-hover-border-color,var(--ran-color-border-hover,#c9c9c9));box-shadow:var(--ran-card-hover-shadow,var(--ran-shadow-elevated,0 1px 2px #0000000a))}.ran-card{align-content:start;gap:var(--ran-card-gap,var(--ran-space-4,16px));min-width:0;height:100%;padding:var(--ran-card-padding,var(--ran-space-4,16px));border-width:var(--ran-skin-border-width,1px);border-style:var(--ran-skin-border-style,solid);border-color:var(--ran-card-border-color,var(--ran-color-border,#eaeaea));border-radius:var(--ran-card-radius,var(--ran-radius-md));background:var(--ran-card-background,var(--ran-color-bg));box-shadow:var(--ran-card-shadow,none);box-sizing:border-box;display:grid}.ran-card-header{justify-content:space-between;align-items:flex-start;gap:var(--ran-card-header-gap,var(--ran-space-4,16px));display:flex}.ran-card-title-area{flex:1;min-width:0}.ran-card-title{color:var(--ran-card-title-color,var(--ran-color-text));font-size:var(--ran-card-title-font-size,var(--ran-text-heading-4,16px));font-weight:var(--ran-card-title-font-weight,var(--ran-text-heading-weight,600));letter-spacing:var(--ran-card-title-letter-spacing,var(--ran-text-heading-tracking,-.03em));margin:0;line-height:1.3}.ran-card-title:empty{display:none}.ran-card-description{margin:var(--ran-card-description-margin-top,var(--ran-space-1,4px)) 0 0;color:var(--ran-card-description-color,var(--ran-color-text-secondary));font-size:var(--ran-card-description-font-size,var(--ran-text-copy-2,14px));font-weight:var(--ran-card-description-font-weight,var(--ran-text-copy-weight,400));line-height:1.5}.ran-card-description:empty{display:none}.ran-card-body,.ran-card-footer{min-width:0}:host(:not([title]):not([description])) .ran-card-header{display:none}`,n=typeof document>`u`,r=/["'&<>]/;function i(e){let t=``+e,n=r.exec(t);if(!n)return t;let i,a=``,o=0,s=0;for(o=n.index;o{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},te=(e,t,n=s)=>{if(!(typeof document>`u`)&&t&&!c(e,t,a)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},ne=(e,t,n=ee)=>{if(!(typeof document>`u`)&&t&&!c(e,t,o)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},l=0,u=1,d=2,f=null,p=null,m=0,h=new Set,g=!1;function _(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(C(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)w(e,d);m===0&&ie()}}]}function v(e){let t=re(e,!0);return S(t),E(t),()=>O(t)}function y(e){let t=f;f=null;try{return e()}finally{f=t}}function b(e){let t={owned:[],cleanups:[],owner:p},n=p,r=f;p=t,f=null;try{return e(()=>k(t))}finally{p=n,f=r}}function x(e){p&&p.cleanups.push(e)}function re(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:d,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:p}}function S(e){p&&p.owned.push(e)}function C(e){f&&(f.sources.add(e),e.observers.add(f))}function w(e,t){if(e.disposed||e.state>=t)return;let n=e.state===l;if(e.state=t,e.isEffect)h.add(e);else if(n)for(let t of e.observers)w(t,u)}function ie(){if(!(m>0||g)){g=!0;try{for(;h.size>0;){let e=[...h];h.clear();for(let t of e)t.disposed||T(t)}}finally{g=!1}}}function T(e){if(!(e.disposed||e.state===l)){if(e.state===u)for(let t of e.sources)`fn`in t&&T(t);e.state===d&&E(e),e.state=l}}function E(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);D(e);let t=f,n=p;f=e,p=e,e.running=!0,e.state=l;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)w(t,d)}}finally{e.running=!1,f=t,p=n}}function D(e){for(let t of e.owned)O(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function O(e){e.disposed||(e.disposed=!0,D(e),e.observers.clear())}function k(e){for(let t of e.owned)O(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function A(e){return i(e)}var ae=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,oe=`.#[`;function se(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var ce=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},le=(e,t)=>{let n=t.trim();if(!n)return!1;let r=se(n);return r!==null&&r.every(t=>ce(e,t))},j=(e,t,n)=>{for(let r of e)ae(r)&&(le(r,t)&&n.push(r),j(r.childrenList,t,n))},M=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return j(this.childrenList,e,t),t}},ue=new Map,N=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??ue}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:i(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new M)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new de(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return j(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${A(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=r?` style="${A(r)}"`:``,o=``;return this.shadowRoot&&(o+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?o+=this._innerHTML:o+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof M,e.serialize())).join(``):o+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!o?`<${t}${n}${a} />`:`<${t}${n}${a}>${o}`}},de=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return j(this.childrenList,e,t),t}serialize(){return``}},P={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let r of t){if(r==null)continue;if(Array.isArray(r)){P.append(e,r);continue}if(typeof r==`function`){P.append(e,[r()]);continue}if(typeof r==`object`&&(`__ranFor`in r||`__ranIndex`in r))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=r instanceof F?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},fe=`http://www.w3.org/2000/svg`,pe=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),F=class{runtime;el;constructor(e,t,r=P){this.runtime=r;let i=t??(pe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new N(e):i?document.createElementNS(i,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new me(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},me=class{runtime;root;hostEl;constructor(e,t,n,r=P){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},I=()=>({current:null}),L=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(L(t)):e.concat(t),[]),R=e=>e==null?null:e instanceof F?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,z=(e,t)=>{if(n){V(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};v(()=>{let e=t();o();let n=document.createDocumentFragment();a=b(t=>(V(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),x(()=>a?.())},he=`__ranFor`,ge=e=>typeof e==`object`&&!!e&&e[he]===!0,_e=(e,t,n)=>{let[r,i]=_(t),a=null,o=b(t=>{let i=R(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},B=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},ve=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;x(()=>{for(let e of i.values())e.dispose();i.clear()}),v(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o)){Ce()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=i.get(o);s?(i.delete(o),s.index(r)):s=_e(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();B(r,a),i=n})},ye=`__ranIndex`,be=e=>typeof e==`object`&&!!e&&e[ye]===!0,xe=(e,t,n)=>{let[r,i]=_(e),a=null,o=b(e=>{let i=R(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Se=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];x(()=>{for(let e of i)e.dispose();i=[]}),v(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}B(r,i.map(e=>e.node).filter(e=>e!=null))})},V=(e,t)=>{n?y(()=>H(e,t)):H(e,t)},H=(e,t)=>{L(t).forEach(t=>{if(ge(t)){ve(e,t);return}if(be(t)){Se(e,t);return}if(typeof t==`function`){z(e,t);return}let n=R(t);n!=null&&e.appendChild(n)})},Ce=()=>!1,we={bind(e,t){if(typeof e!=`function`){t(e);return}n?y(()=>t(e())):v(()=>t(e()))},append:V},Te=class extends F{constructor(e,t){super(e,t,we)}};function Ee(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,fe),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:De,Div:U,Svg:Oe,Span:ke,Slot:W,ButtonBuilder:Ae,InputBuilder:je,Style:Me,Label:Ne,Ul:Pe,Li:Fe,Section:Ie,Article:Le,Nav:Re,Header:ze,Footer:Be,Main:Ve,DeclarativeShadow:He}=Ee(Te),Ue=new Map;function We(e,t){n?(Ue.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ge=typeof document<`u`?HTMLElement:N,Ke=`data-ranui`,qe=`data-ranui-sheet`,Je=(e,t)=>te(e,t,Ke),Ye=(e,t)=>ne(e,t,qe),G=new WeakMap,K=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,q=new Map,J=e=>{let t=q.get(e);if(t!==void 0)return t;let n=e?`${e}\n${K}`:K;return q.set(e,n),n},Xe=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||G.get(e)||e.attachShadow(n);return G.set(e,r),Je(r,J(t)),r},Y=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},X=(e,t,n=``)=>e.getAttribute(t)??n,Z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Q=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ye(t,a)},$=class extends Ge{_shadowDom;_titleEl;_descriptionEl;_headerEl;_footerEl;static get observedAttributes(){return[`heading`,`description`,`sheet`,`hoverable`]}constructor(){super(),this._shadowDom=Xe(this,t);let e=I(),n=I(),r=I(),i=I(),a=I(),o=U().class(`ran-card`).attr(`part`,`card`).children(U().class(`ran-card-header`).ref(e).attr(`part`,`header`).children(U().class(`ran-card-title-area`).children(U().class(`ran-card-title`).ref(n).attr(`part`,`title`),U().class(`ran-card-description`).ref(r).attr(`part`,`description`)),W().attr(`name`,`extra`).attr(`part`,`extra`)),U().class(`ran-card-body`).attr(`part`,`body`).children(W()),U().class(`ran-card-footer`).ref(i).attr(`part`,`footer`).children(W().attr(`name`,`footer`).ref(a))).build();this._shadowDom.appendChild(o),this._headerEl=Y(e,`header`),this._titleEl=Y(n,`title`),this._descriptionEl=Y(r,`description`),this._footerEl=Y(i,`footer`),this._footerEl.style.display=`none`;let s=Y(a,`slot[name="footer"]`);s.addEventListener(`slotchange`,()=>{this._footerEl.style.display=s.assignedElements().length>0?``:`none`})}get heading(){return X(this,`heading`)}set heading(e){Z(this,`heading`,e)}get description(){return X(this,`description`)}set description(e){Z(this,`description`,e)}get sheet(){return X(this,`sheet`)}set sheet(e){Z(this,`sheet`,e)}get hoverable(){return this.hasAttribute(`hoverable`)}set hoverable(e){e?this.setAttribute(`hoverable`,``):this.removeAttribute(`hoverable`)}_syncTitle(){this._titleEl.textContent=this.getAttribute(`heading`)??``}_syncDescription(){this._descriptionEl.textContent=this.getAttribute(`description`)??``}connectedCallback(){this._syncTitle(),this._syncDescription(),Q(this,this._shadowDom,`sheet`,null,this.sheet)}attributeChangedCallback(e,t,n){t!==n&&(e===`heading`&&this._syncTitle(),e===`description`&&this._syncDescription(),e===`sheet`&&Q(this,this._shadowDom,e,t,n))}};return We(`r-card`,$),e.Card=$,e.default=$,e})({}); \ No newline at end of file diff --git a/public/ranui-iife/checkbox.iife.js b/public/ranui-iife/checkbox.iife.js index e2354dea1..416706010 100644 --- a/public/ranui-iife/checkbox.iife.js +++ b/public/ranui-iife/checkbox.iife.js @@ -1 +1 @@ -var ranui_checkbox=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}};Math.PI/180,180/Math.PI,2*Math.PI;var n=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var r=e=>typeof e==`function`,i=12e4,a=`__ranuts_bridge__`,o=`default`,s=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},c=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=o){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,s.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:a,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,a)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),a(Error(`Request timeout`)))},i),s=e=>{clearTimeout(o),a(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{s.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new c(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},ee=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},te=/["'&<>]/;function f(e){let t=``+e,n=te.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},oe=(e,t,n=ie)=>{if(typeof document<`u`&&t&&!p(e,t,ne)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},se=(e,t,n=ae)=>{if(typeof document<`u`&&t&&!p(e,t,re)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var m=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(m),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(m);var h=typeof document>`u`,g=class{ac=null;get signal(){return this.ac??=new AbortController,this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},_=0,v=1,y=2,b=null,x=null,S=0,C=new Set,w=!1;function T(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ue(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)k(e,y);S===0&&de()}}]}function E(e){let t=ce(e,!0);return le(t),j(t),()=>N(t)}function D(e){let t={owned:[],cleanups:[],owner:x},n=x,r=b;x=t,b=null;try{return e(()=>fe(t))}finally{x=n,b=r}}function O(e){x&&x.cleanups.push(e)}function ce(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:y,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:x}}function le(e){x&&x.owned.push(e)}function ue(e){b&&(b.sources.add(e),e.observers.add(b))}function k(e,t){if(e.disposed||e.state>=t)return;let n=e.state===_;if(e.state=t,e.isEffect)C.add(e);else if(n)for(let t of e.observers)k(t,v)}function de(){if(!(S>0||w)){w=!0;try{for(;C.size>0;){let e=[...C];C.clear();for(let t of e)t.disposed||A(t)}}finally{w=!1}}}function A(e){if(!(e.disposed||e.state===_)){if(e.state===v)for(let t of e.sources)`fn`in t&&A(t);e.state===y&&j(e),e.state=_}}function j(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);M(e);let t=b,n=x;b=e,x=e,e.running=!0,e.state=_;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)k(t,y)}}finally{e.running=!1,b=t,x=n}}function M(e){for(let t of e.owned)N(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function N(e){e.disposed||(e.disposed=!0,M(e),e.observers.clear())}function fe(e){for(let t of e.owned)N(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function P(e){return f(e)}var pe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,me=`.#[`;function he(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var ge=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},_e=(e,t)=>{let n=t.trim();if(!n)return!1;let r=he(n);return r!==null&&r.every(t=>ge(e,t))},F=(e,t,n)=>{for(let r of e)pe(r)&&(_e(r,t)&&n.push(r),F(r.childrenList,t,n))},I=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?f(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}},L=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new I)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new ve(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${P(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${P(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?f(e):(e instanceof I,e.serialize())).join(``):a+=f(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},ve=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}serialize(){return``}},R=()=>({current:null}),z=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(z(t)):e.concat(t),[]),B=e=>e==null?null:e instanceof U?e.build():typeof e==`string`?h?e:document.createTextNode(e):e,ye=(e,t)=>{if(h){H(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};E(()=>{let e=t();a();let n=document.createDocumentFragment();i=D(t=>(H(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),O(()=>i?.())},be=`__ranFor`,xe=e=>typeof e==`object`&&!!e&&e[be]===!0,Se=(e,t,n)=>{let[r,i]=T(t),a=null,o=D(t=>{let i=B(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},V=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Ce=(e,t)=>{if(h){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;O(()=>{for(let e of r.values())e.dispose();r.clear()}),E(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=Se(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();V(n,a),r=i})},we=`__ranIndex`,Te=e=>typeof e==`object`&&!!e&&e[we]===!0,Ee=(e,t,n)=>{let[r,i]=T(e),a=null,o=D(e=>{let i=B(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},De=(e,t)=>{if(h){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];O(()=>{for(let e of r)e.dispose();r=[]}),E(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}V(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{z(t).forEach(t=>{if(xe(t)){Ce(e,t);return}if(Te(t)){De(e,t);return}if(typeof t==`function`){ye(e,t);return}let n=B(t);n!=null&&e.appendChild(n)})},Oe=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),U=class{el;constructor(e,t){let n=t??(Oe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=h?new L(e):n?document.createElementNS(n,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?E(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{h?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return H(this.el,e),this}replaceChildren(...e){if(h){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ke(this.el,t,e)}build(){return this.el}serialize(){if(h)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ke=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return H(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(h)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return h?this.root.serialize():this.root.innerHTML}},W=e=>new U(e),G=()=>W(`div`),K=()=>W(`span`),Ae=()=>W(`slot`),je=()=>W(`input`),q=[!1,`false`,null,void 0],Me=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!q.includes(n))},Ne=new Map;function Pe(e,t){h?(Ne.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Fe=typeof document<`u`?HTMLElement:L,Ie=`data-ranui`,Le=`data-ranui-sheet`,Re=(e,t)=>oe(e,t,Ie),ze=(e,t)=>se(e,t,Le),J=new WeakMap,Y=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,X=new Map,Be=e=>{let t=X.get(e);if(t!==void 0)return t;let n=e?`${e}\n${Y}`:Y;return X.set(e,n),n},Ve=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||J.get(e)||e.attachShadow(n);return J.set(e,r),Re(r,Be(t)),r},Z=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},He=(e,t,n=``)=>e.getAttribute(t)??n,Q=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Ue=(e,t,n,r={})=>{if(n){e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`);return}e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`)},We=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&ze(t,a)};function Ge(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function Ke(e,t,n){let{disabled:r,required:i,isEmpty:a,message:o=`Please fill out this field.`,anchor:s,ariaTarget:c=e}=n;i?c.setAttribute(`aria-required`,`true`):c.removeAttribute(`aria-required`);let l=!r&&i&&a;l?c.setAttribute(`aria-invalid`,`true`):c.removeAttribute(`aria-invalid`),t&&(l?t.setValidity?.({valueMissing:!0},o,s):t.setValidity?.({}))}function qe(e){return e?.checkValidity?.()??!0}function Je(e){return e?.reportValidity?.()??!0}var Ye=`:host{position:var(--ran-checkbox-host-position,relative);display:var(--ran-checkbox-host-display,inline-flex);margin:var(--ran-checkbox-host-margin,0);padding:var(--ran-checkbox-host-padding,0);box-sizing:var(--ran-checkbox-host-box-sizing,border-box);list-style:var(--ran-checkbox-host-list-style,none)}:host([disabled]){opacity:var(--ran-checkbox-disabled-opacity,.6)}:host([disabled]) .ran-checkbox-input{cursor:var(--ran-checkbox-disabled-cursor,not-allowed);pointer-events:var(--ran-checkbox-disabled-pointer-events,all)}:host([disabled]) .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color,var(--ran-color-bg-muted,#f2f2f2));border:1px solid var(--ran-color-border,#eaeaea)}:host([disabled]) .ran-checkbox-inner:after{cursor:not-allowed;pointer-events:none;opacity:var(--ran-checkbox-tick-checked-opacity,1)}:host([disabled]) .ran-checkbox-checked .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color,var(--ran-color-bg-muted,#f2f2f2))}:host([disabled]) .ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-tick-checked-opacity,0)}:host([hidden]){display:none}.ran-checkbox-wrapper{align-items:center;gap:var(--ran-checkbox-label-gap,8px);cursor:pointer;line-height:1;display:inline-flex}.ran-checkbox-label{color:var(--ran-checkbox-label-color,var(--ran-color-text,#000000e0));font-size:var(--ran-checkbox-label-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-checkbox-label-font-weight,var(--ran-text-label-weight,500));font-family:var(--ran-checkbox-label-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-checkbox-label-line-height,1.5);-webkit-user-select:none;user-select:none}.ran-checkbox{position:var(--ran-checkbox-position,relative);display:var(--ran-checkbox-display,block);box-sizing:var(--ran-checkbox-box-sizing,border-box);margin:var(--ran-checkbox-margin,0);width:var(--ran-checkbox-width,var(--ran-size-1,16px));height:var(--ran-checkbox-height,var(--ran-size-1,16px));padding:var(--ran-checkbox-padding,0);color:var(--ran-checkbox-color,var(--ran-color-text,#000000e0));font-size:var(--ran-checkbox-font-size,var(--ran-text-label-1,14px));line-height:var(--ran-checkbox-line-height,1);list-style:var(--ran-checkbox-list-style,none);font-family:var(--ran-checkbox-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));white-space:var(--ran-checkbox-white-space,nowrap);cursor:var(--ran-checkbox-cursor,pointer);border-radius:var(--ran-checkbox-border-radius,4px)}.ran-checkbox-input{position:var(--ran-checkbox-input-position,absolute);inset:var(--ran-checkbox-input-inset,0);z-index:var(--ran-checkbox-input-z-index,1);cursor:var(--ran-checkbox-input-cursor,pointer);opacity:var(--ran-checkbox-input-opacity,0);margin:var(--ran-checkbox-input-margin,0)}.ran-checkbox-inner{box-sizing:var(--ran-checkbox-inner-box-sizing,border-box);display:var(--ran-checkbox-inner-display,block);width:var(--ran-checkbox-inner-width,var(--ran-size-1,16px));height:var(--ran-checkbox-inner-height,var(--ran-size-1,16px));direction:var(--ran-checkbox-inner-direction,ltr);background-color:var(--ran-checkbox-inner-background-color,var(--ran-color-bg-elevated,#fff));border:var(--ran-checkbox-inner-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-checkbox-inner-border-image-source,none);border-image-slice:var(--ran-checkbox-inner-border-image-slice,8);border-image-width:var(--ran-checkbox-inner-border-image-width,var(--ran-skin-border-image-width,4px));border-radius:var(--ran-checkbox-inner-border-radius,4px);border-collapse:var(--ran-checkbox-inner-border-collapse,separate);border-image-outset:0;border-image-repeat:stretch}.ran-checkbox-inner:after{box-sizing:var(--ran-checkbox-tick-box-sizing,border-box);position:var(--ran-checkbox-tick-position,absolute);top:var(--ran-checkbox-tick-top,50%);display:var(--ran-checkbox-tick-display,table);width:var(--ran-checkbox-tick-width,calc(16px / 14 * 5));height:var(--ran-checkbox-tick-height,calc(16px / 14 * 8));border:var(--ran-checkbox-tick-border,2px solid #fff);border-top:var(--ran-checkbox-tick-border-top,0);border-inline-start:var(--ran-checkbox-tick-border-inline-start,0);opacity:var(--ran-checkbox-tick-opacity,0);content:var(--ran-checkbox-tick-content,"");transition:var(--ran-checkbox-tick-transition,transform .1s cubic-bezier(.71, -.46, .88, .6), opacity .1s);transform:var(--ran-checkbox-tick-transform,rotate(45deg) scale(1) translate(-50%, -50%));inset-inline-start:var(--ran-checkbox-tick-inset-inline-start,25%)}.ran-checkbox-checked .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color,var(--ran-color-primary,#006bff));background-image:var(--ran-checkbox-checked-background-image,none);border:var(--ran-checkbox-checked-border,1px solid var(--ran-color-primary,#006bff));animation:var(--ran-checkbox-pop-animation,ran-checkbox-pop var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-bouncy,cubic-bezier(.34, 1.56, .64, 1)))}.ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-tick-checked-opacity,1)}.ran-checkbox:has(.ran-checkbox-input:focus-visible) .ran-checkbox-inner{box-shadow:var(--ran-checkbox-focus-box-shadow,var(--ran-focus-ring));border-color:var(--ran-checkbox-focus-border-color,var(--ran-color-primary,#171717))}@keyframes ran-checkbox-pop{0%{transform:scale(1)}45%{transform:scale(1.14)}to{transform:scale(1)}}@media (prefers-reduced-motion:reduce){.ran-checkbox-checked .ran-checkbox-inner{animation:none}}`,$=class extends Fe{static formAssociated=!0;_events=new g;_internals;checkInput;checkInner;context;container;_shadowDom;static get observedAttributes(){return[`disabled`,`checked`,`value`,`required`,`sheet`]}_defaultChecked=!1;_defaultCaptured=!1;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=Ve(this,Ye);let e=R(),t=R(),n=R(),r=G().class(`ran-checkbox-wrapper`).part(`wrapper`).children(G().class(`ran-checkbox`).ref(e).part(`checkbox`).children(je().class(`ran-checkbox-input`).ref(t).part(`input`).attr(`type`,`checkbox`),K().class(`ran-checkbox-inner`).ref(n).part(`inner`)),K().class(`ran-checkbox-label`).part(`label`).children(Ae())).build();this._shadowDom.appendChild(r),this.container=Z(e,`ran checkbox`),this.checkInput=Z(t,`input`),this.checkInner=Z(n,`inner`),this.checkInput.setAttribute(`aria-hidden`,`true`),this.checkInput.tabIndex=-1,this.context={checked:!1}}get disabled(){return Me(this)}set disabled(e){q.includes(e)?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}get required(){return this.hasAttribute(`required`)}set required(e){Ue(this,`required`,!(!e||e===`false`))}get value(){let e=this.getAttribute(`value`);return q.includes(e)&&(this.context.checked=!1),`${this.context.checked}`}set value(e){q.includes(e)?(this.setAttribute(`value`,`false`),this.context.checked=!1):(this.setAttribute(`value`,`true`),this.context.checked=!0),this.updateChecked()}get checked(){let e=this.getAttribute(`checked`);return q.includes(e)&&(this.context.checked=!1),this.context.checked}set checked(e){q.includes(e)?(this.setAttribute(`checked`,`false`),this.context.checked=!1):(this.setAttribute(`checked`,`true`),this.context.checked=!0),this.updateChecked()}get sheet(){return He(this,`sheet`)}set sheet(e){Q(this,`sheet`,e)}handlerExternalCss=()=>{We(this,this._shadowDom,`sheet`,null,this.sheet)};updateChecked=()=>{let{checked:e}=this.context;e?(this.setAttribute(`checked`,`true`),this.setAttribute(`value`,`true`),d(this.container,`ran-checkbox-checked`)):(this.setAttribute(`checked`,`false`),this.setAttribute(`value`,`false`),ee(this.container,`ran-checkbox-checked`)),this.syncA11yAndForm()};syncA11yAndForm=()=>{let{checked:e}=this.context;this.setAttribute(`role`,`checkbox`),this.setAttribute(`aria-checked`,e?`true`:`false`),this.disabled?(this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1):(this.removeAttribute(`aria-disabled`),(this.tabIndex<0||!this.hasAttribute(`tabindex`))&&(this.tabIndex=0)),this._internals?.setFormValue?.(e?this.getAttribute(`value`)||`true`:null),this._updateValidity()};_updateValidity=()=>{Ke(this,this._internals,{disabled:this.disabled,required:this.required,isEmpty:!this.context.checked,message:`Please check this box if you want to proceed.`,anchor:this})};checkValidity(){return qe(this._internals)}reportValidity(){return Je(this._internals)}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??``}formResetCallback(){this.checked=this._defaultChecked}update=()=>{this.updateChecked()};onChange=()=>{if(this.disabled)return;let{checked:e}=this.context;this.context.checked=!e,this.dispatchEvent(new CustomEvent(`change`,{detail:{checked:this.context.checked}})),this.update()};onKeydown=e=>{Ge(e)&&(e.preventDefault(),this.onChange())};connectedCallback(){this.handlerExternalCss(),this._defaultCaptured||=(this._defaultChecked=this.context.checked,!0),this._events.on(this,`click`,this.onChange),this._events.on(this,`keydown`,this.onKeydown),this.syncA11yAndForm()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`checked`&&(this.checked=n,this.value=n),e===`value`&&(this.checked=n,this.value=n),e===`disabled`?this.syncA11yAndForm():e===`required`&&this._updateValidity(),e===`sheet`&&this.handlerExternalCss())}};return Pe(`r-checkbox`,$),e.Checkbox=$,e.default=$,e})({}); \ No newline at end of file +var ranui_checkbox=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},n=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},r=/["'&<>]/;function i(e){let t=``+e,n=r.exec(t);if(!n)return t;let i,a=``,o=0,s=0;for(o=n.index;o{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},o=new Map,s=new Map,c=`data-adopted-style`,l=`data-adopted-sheet`,u=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},d=(e,t,n=c)=>{if(!(typeof document>`u`)&&t&&!u(e,t,o)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},ee=(e,t,n=l)=>{if(!(typeof document>`u`)&&t&&!u(e,t,s)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},f=typeof document>`u`,p=0,m=1,h=2,g=null,_=null,v=0,y=new Set,b=!1;function x(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(re(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)E(e,h);v===0&&ie()}}]}function S(e){let t=te(e,!0);return ne(t),O(t),()=>A(t)}function C(e){let t=g;g=null;try{return e()}finally{g=t}}function w(e){let t={owned:[],cleanups:[],owner:_},n=_,r=g;_=t,g=null;try{return e(()=>j(t))}finally{_=n,g=r}}function T(e){_&&_.cleanups.push(e)}function te(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:h,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:_}}function ne(e){_&&_.owned.push(e)}function re(e){g&&(g.sources.add(e),e.observers.add(g))}function E(e,t){if(e.disposed||e.state>=t)return;let n=e.state===p;if(e.state=t,e.isEffect)y.add(e);else if(n)for(let t of e.observers)E(t,m)}function ie(){if(!(v>0||b)){b=!0;try{for(;y.size>0;){let e=[...y];y.clear();for(let t of e)t.disposed||D(t)}}finally{b=!1}}}function D(e){if(!(e.disposed||e.state===p)){if(e.state===m)for(let t of e.sources)`fn`in t&&D(t);e.state===h&&O(e),e.state=p}}function O(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);k(e);let t=g,n=_;g=e,_=e,e.running=!0,e.state=p;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)E(t,h)}}finally{e.running=!1,g=t,_=n}}function k(e){for(let t of e.owned)A(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function A(e){e.disposed||(e.disposed=!0,k(e),e.observers.clear())}function j(e){for(let t of e.owned)A(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function M(e){return i(e)}var ae=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,oe=`.#[`;function se(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var ce=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},le=(e,t)=>{let n=t.trim();if(!n)return!1;let r=se(n);return r!==null&&r.every(t=>ce(e,t))},N=(e,t,n)=>{for(let r of e)ae(r)&&(le(r,t)&&n.push(r),N(r.childrenList,t,n))},P=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}},ue=new Map,F=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??ue}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:i(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new P)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new de(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${M(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=r?` style="${M(r)}"`:``,o=``;return this.shadowRoot&&(o+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?o+=this._innerHTML:o+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof P,e.serialize())).join(``):o+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!o?`<${t}${n}${a} />`:`<${t}${n}${a}>${o}`}},de=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}serialize(){return``}},I={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let n of t){if(n==null)continue;if(Array.isArray(n)){I.append(e,n);continue}if(typeof n==`function`){I.append(e,[n()]);continue}if(typeof n==`object`&&(`__ranFor`in n||`__ranIndex`in n))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=n instanceof L?n.build():typeof n==`string`&&!f?document.createTextNode(n):n;e.appendChild(t)}}},fe=`http://www.w3.org/2000/svg`,pe=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),L=class{runtime;el;constructor(e,t,n=I){this.runtime=n;let r=t??(pe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=f?new F(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{f?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(f){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new R(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(f)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},R=class{runtime;root;hostEl;constructor(e,t,n,r=I){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(f)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return f?this.root.serialize():this.root.innerHTML}},z=()=>({current:null}),B=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(B(t)):e.concat(t),[]),V=e=>e==null?null:e instanceof L?e.build():typeof e==`string`?f?e:document.createTextNode(e):e,me=(e,t)=>{if(f){U(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};S(()=>{let e=t();a();let n=document.createDocumentFragment();i=w(t=>(U(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),T(()=>i?.())},he=`__ranFor`,ge=e=>typeof e==`object`&&!!e&&e[he]===!0,_e=(e,t,n)=>{let[r,i]=x(t),a=null,o=w(t=>{let i=V(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},H=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},ve=(e,t)=>{if(f){(t.each()??[]).forEach((n,r)=>{let i=V(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;T(()=>{for(let e of r.values())e.dispose();r.clear()}),S(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Ce()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=r.get(o);s?(r.delete(o),s.index(n)):s=_e(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();H(n,a),r=i})},ye=`__ranIndex`,be=e=>typeof e==`object`&&!!e&&e[ye]===!0,xe=(e,t,n)=>{let[r,i]=x(e),a=null,o=w(e=>{let i=V(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Se=(e,t)=>{if(f){(t.each()??[]).forEach((n,r)=>{let i=V(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];T(()=>{for(let e of r)e.dispose();r=[]}),S(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}H(n,r.map(e=>e.node).filter(e=>e!=null))})},U=(e,t)=>{f?C(()=>W(e,t)):W(e,t)},W=(e,t)=>{B(t).forEach(t=>{if(ge(t)){ve(e,t);return}if(be(t)){Se(e,t);return}if(typeof t==`function`){me(e,t);return}let n=V(t);n!=null&&e.appendChild(n)})},Ce=()=>!1,we={bind(e,t){if(typeof e!=`function`){t(e);return}f?C(()=>t(e())):S(()=>t(e()))},append:U},Te=class extends L{constructor(e,t){super(e,t,we)}};function Ee(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,fe),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:De,Div:G,Svg:Oe,Span:K,Slot:ke,ButtonBuilder:Ae,InputBuilder:je,Style:Me,Label:Ne,Ul:Pe,Li:Fe,Section:Ie,Article:Le,Nav:Re,Header:ze,Footer:Be,Main:Ve,DeclarativeShadow:He}=Ee(Te),q=[!1,`false`,null,void 0],Ue=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!q.includes(n))},We=new Map;function Ge(e,t){f?(We.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ke=typeof document<`u`?HTMLElement:F,qe=`data-ranui`,Je=`data-ranui-sheet`,Ye=(e,t)=>d(e,t,qe),Xe=(e,t)=>ee(e,t,Je),J=new WeakMap,Y=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,X=new Map,Z=e=>{let t=X.get(e);if(t!==void 0)return t;let n=e?`${e}\n${Y}`:Y;return X.set(e,n),n},Ze=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||J.get(e)||e.attachShadow(n);return J.set(e,r),Ye(r,Z(t)),r},Q=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},Qe=(e,t,n=``)=>e.getAttribute(t)??n,$e=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},et=(e,t,n,r={})=>{if(n){e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`);return}e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`)},tt=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Xe(t,a)};function nt(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function rt(e,t,n){let{disabled:r,required:i,isEmpty:a,message:o=`Please fill out this field.`,anchor:s,ariaTarget:c=e}=n;i?c.setAttribute(`aria-required`,`true`):c.removeAttribute(`aria-required`);let l=!r&&i&&a;l?c.setAttribute(`aria-invalid`,`true`):c.removeAttribute(`aria-invalid`),t&&(l?t.setValidity?.({valueMissing:!0},o,s):t.setValidity?.({}))}function it(e){return e?.checkValidity?.()??!0}function at(e){return e?.reportValidity?.()??!0}var ot=`:host{position:var(--ran-checkbox-host-position,relative);display:var(--ran-checkbox-host-display,inline-flex);margin:var(--ran-checkbox-host-margin,0);padding:var(--ran-checkbox-host-padding,0);box-sizing:var(--ran-checkbox-host-box-sizing,border-box);list-style:var(--ran-checkbox-host-list-style,none)}:host([disabled]){opacity:var(--ran-checkbox-disabled-opacity,.6)}:host([disabled]) .ran-checkbox-input{cursor:var(--ran-checkbox-disabled-cursor,not-allowed);pointer-events:var(--ran-checkbox-disabled-pointer-events,all)}:host([disabled]) .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color,var(--ran-color-bg-muted,#f2f2f2));border:1px solid var(--ran-color-border,#eaeaea)}:host([disabled]) .ran-checkbox-inner:after{cursor:not-allowed;pointer-events:none;opacity:var(--ran-checkbox-tick-opacity,0);border-color:var(--ran-checkbox-disabled-tick-color,var(--ran-color-text-disabled,var(--ran-gray-600)))}:host([disabled]) .ran-checkbox-checked .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color,var(--ran-color-bg-muted,#f2f2f2))}:host([disabled]) .ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-tick-checked-opacity,1)}:host([hidden]){display:none}.ran-checkbox-wrapper{align-items:center;gap:var(--ran-checkbox-label-gap,8px);cursor:pointer;line-height:1;display:inline-flex}.ran-checkbox-label{color:var(--ran-checkbox-label-color,var(--ran-color-text,#000000e0));font-size:var(--ran-checkbox-label-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-checkbox-label-font-weight,var(--ran-text-label-weight,500));font-family:var(--ran-checkbox-label-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-checkbox-label-line-height,1.5);-webkit-user-select:none;user-select:none}.ran-checkbox{position:var(--ran-checkbox-position,relative);display:var(--ran-checkbox-display,block);box-sizing:var(--ran-checkbox-box-sizing,border-box);margin:var(--ran-checkbox-margin,0);width:var(--ran-checkbox-width,var(--ran-size-1,16px));height:var(--ran-checkbox-height,var(--ran-size-1,16px));padding:var(--ran-checkbox-padding,0);color:var(--ran-checkbox-color,var(--ran-color-text,#000000e0));font-size:var(--ran-checkbox-font-size,var(--ran-text-label-1,14px));line-height:var(--ran-checkbox-line-height,1);list-style:var(--ran-checkbox-list-style,none);font-family:var(--ran-checkbox-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));white-space:var(--ran-checkbox-white-space,nowrap);cursor:var(--ran-checkbox-cursor,pointer);border-radius:var(--ran-checkbox-border-radius,4px)}.ran-checkbox-input{position:var(--ran-checkbox-input-position,absolute);inset:var(--ran-checkbox-input-inset,0);z-index:var(--ran-checkbox-input-z-index,1);cursor:var(--ran-checkbox-input-cursor,pointer);opacity:var(--ran-checkbox-input-opacity,0);margin:var(--ran-checkbox-input-margin,0)}.ran-checkbox-inner{box-sizing:var(--ran-checkbox-inner-box-sizing,border-box);display:var(--ran-checkbox-inner-display,block);width:var(--ran-checkbox-inner-width,var(--ran-size-1,16px));height:var(--ran-checkbox-inner-height,var(--ran-size-1,16px));direction:var(--ran-checkbox-inner-direction,ltr);background-color:var(--ran-checkbox-inner-background-color,var(--ran-color-bg-elevated,#fff));border:var(--ran-checkbox-inner-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-checkbox-inner-border-image-source,none);border-image-slice:var(--ran-checkbox-inner-border-image-slice,8);border-image-width:var(--ran-checkbox-inner-border-image-width,var(--ran-skin-border-image-width,4px));border-radius:var(--ran-checkbox-inner-border-radius,4px);border-collapse:var(--ran-checkbox-inner-border-collapse,separate);border-image-outset:0;border-image-repeat:stretch}.ran-checkbox-inner:after{box-sizing:var(--ran-checkbox-tick-box-sizing,border-box);position:var(--ran-checkbox-tick-position,absolute);top:var(--ran-checkbox-tick-top,50%);display:var(--ran-checkbox-tick-display,table);width:var(--ran-checkbox-tick-width,calc(16px / 14 * 5));height:var(--ran-checkbox-tick-height,calc(16px / 14 * 8));border:var(--ran-checkbox-tick-border,2px solid #fff);border-top:var(--ran-checkbox-tick-border-top,0);border-inline-start:var(--ran-checkbox-tick-border-inline-start,0);opacity:var(--ran-checkbox-tick-opacity,0);content:var(--ran-checkbox-tick-content,"");transition:var(--ran-checkbox-tick-transition,transform .1s cubic-bezier(.71, -.46, .88, .6), opacity .1s);transform:var(--ran-checkbox-tick-transform,rotate(45deg) scale(1) translate(-50%, -50%));inset-inline-start:var(--ran-checkbox-tick-inset-inline-start,25%)}.ran-checkbox-checked .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color,var(--ran-color-primary,#006bff));background-image:var(--ran-checkbox-checked-background-image,none);border:var(--ran-checkbox-checked-border,1px solid var(--ran-color-primary,#006bff));animation:var(--ran-checkbox-pop-animation,ran-checkbox-pop var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-bouncy,cubic-bezier(.34, 1.56, .64, 1)))}.ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-tick-checked-opacity,1)}.ran-checkbox:has(.ran-checkbox-input:focus-visible) .ran-checkbox-inner{box-shadow:var(--ran-checkbox-focus-box-shadow,var(--ran-focus-ring));border-color:var(--ran-checkbox-focus-border-color,var(--ran-color-primary,#171717))}@keyframes ran-checkbox-pop{0%{transform:scale(1)}45%{transform:scale(1.14)}to{transform:scale(1)}}@media (prefers-reduced-motion:reduce){.ran-checkbox-checked .ran-checkbox-inner{animation:none}}`,$=class extends Ke{static formAssociated=!0;_events=new a;_internals;checkInput;checkInner;context;container;_shadowDom;static get observedAttributes(){return[`disabled`,`checked`,`value`,`required`,`sheet`]}_defaultChecked=!1;_defaultCaptured=!1;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=Ze(this,ot);let e=z(),t=z(),n=z(),r=G().class(`ran-checkbox-wrapper`).part(`wrapper`).children(G().class(`ran-checkbox`).ref(e).part(`checkbox`).children(je().class(`ran-checkbox-input`).ref(t).part(`input`).attr(`type`,`checkbox`),K().class(`ran-checkbox-inner`).ref(n).part(`inner`)),K().class(`ran-checkbox-label`).part(`label`).children(ke())).build();this._shadowDom.appendChild(r),this.container=Q(e,`ran checkbox`),this.checkInput=Q(t,`input`),this.checkInner=Q(n,`inner`),this.checkInput.setAttribute(`aria-hidden`,`true`),this.checkInput.tabIndex=-1,this.context={checked:!1}}get disabled(){return Ue(this)}set disabled(e){q.includes(e)?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}get required(){return this.hasAttribute(`required`)}set required(e){et(this,`required`,!(!e||e===`false`))}get value(){let e=this.getAttribute(`value`);return q.includes(e)&&(this.context.checked=!1),`${this.context.checked}`}set value(e){q.includes(e)?(this.setAttribute(`value`,`false`),this.context.checked=!1):(this.setAttribute(`value`,`true`),this.context.checked=!0),this.updateChecked()}get checked(){let e=this.getAttribute(`checked`);return q.includes(e)&&(this.context.checked=!1),this.context.checked}set checked(e){q.includes(e)?(this.setAttribute(`checked`,`false`),this.context.checked=!1):(this.setAttribute(`checked`,`true`),this.context.checked=!0),this.updateChecked()}get sheet(){return Qe(this,`sheet`)}set sheet(e){$e(this,`sheet`,e)}handlerExternalCss=()=>{tt(this,this._shadowDom,`sheet`,null,this.sheet)};updateChecked=()=>{let{checked:e}=this.context;e?(this.setAttribute(`checked`,`true`),this.setAttribute(`value`,`true`),t(this.container,`ran-checkbox-checked`)):(this.setAttribute(`checked`,`false`),this.setAttribute(`value`,`false`),n(this.container,`ran-checkbox-checked`)),this.syncA11yAndForm()};syncA11yAndForm=()=>{let{checked:e}=this.context;this.setAttribute(`role`,`checkbox`),this.setAttribute(`aria-checked`,e?`true`:`false`),this.disabled?(this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1):(this.removeAttribute(`aria-disabled`),(this.tabIndex<0||!this.hasAttribute(`tabindex`))&&(this.tabIndex=0)),this._internals?.setFormValue?.(e?this.getAttribute(`value`)||`true`:null),this._updateValidity()};_updateValidity=()=>{rt(this,this._internals,{disabled:this.disabled,required:this.required,isEmpty:!this.context.checked,message:`Please check this box if you want to proceed.`,anchor:this})};checkValidity(){return it(this._internals)}reportValidity(){return at(this._internals)}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??``}formResetCallback(){this.checked=this._defaultChecked}update=()=>{this.updateChecked()};onChange=()=>{if(this.disabled)return;let{checked:e}=this.context;this.context.checked=!e,this.dispatchEvent(new CustomEvent(`change`,{detail:{checked:this.context.checked}})),this.update()};onKeydown=e=>{nt(e)&&(e.preventDefault(),this.onChange())};connectedCallback(){this.handlerExternalCss(),this._defaultCaptured||=(this._defaultChecked=this.context.checked,!0),this._events.on(this,`click`,this.onChange),this._events.on(this,`keydown`,this.onKeydown),this.syncA11yAndForm()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`checked`&&(this.checked=n,this.value=n),e===`value`&&(this.checked=n,this.value=n),e===`disabled`?this.syncA11yAndForm():e===`required`&&this._updateValidity(),e===`sheet`&&this.handlerExternalCss())}};return Ge(`r-checkbox`,$),e.Checkbox=$,e.default=$,e})({}); \ No newline at end of file diff --git a/public/ranui-iife/content.iife.js b/public/ranui-iife/content.iife.js index 9d11784db..8be5c30d4 100644 --- a/public/ranui-iife/content.iife.js +++ b/public/ranui-iife/content.iife.js @@ -1 +1 @@ -var ranui_content=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{visibility:hidden;position:absolute}`,n=typeof document>`u`,r=0,i=1,a=2,o=null,s=null,c=0,l=new Set,u=!1;function d(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(g(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)_(e,a);c===0&&te()}}]}function f(e){let t=ee(e,!0);return h(t),y(t),()=>x(t)}function p(e){let t={owned:[],cleanups:[],owner:s},n=s,r=o;s=t,o=null;try{return e(()=>ne(t))}finally{s=n,o=r}}function m(e){s&&s.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:a,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:s}}function h(e){s&&s.owned.push(e)}function g(e){o&&(o.sources.add(e),e.observers.add(o))}function _(e,t){if(e.disposed||e.state>=t)return;let n=e.state===r;if(e.state=t,e.isEffect)l.add(e);else if(n)for(let t of e.observers)_(t,i)}function te(){if(!(c>0||u)){u=!0;try{for(;l.size>0;){let e=[...l];l.clear();for(let t of e)t.disposed||v(t)}}finally{u=!1}}}function v(e){if(!(e.disposed||e.state===r)){if(e.state===i)for(let t of e.sources)`fn`in t&&v(t);e.state===a&&y(e),e.state=r}}function y(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);b(e);let t=o,n=s;o=e,s=e,e.running=!0,e.state=r;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)_(t,a)}}finally{e.running=!1,o=t,s=n}}function b(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function x(e){e.disposed||(e.disposed=!0,b(e),e.observers.clear())}function ne(e){for(let t of e.owned)x(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var S=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}};Math.PI/180,180/Math.PI,2*Math.PI;var C=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var w=e=>typeof e==`function`,T=12e4,E=`__ranuts_bridge__`,D=`default`,O=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},re=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=D){this.targetOrigin=t,this.channel=n,this.senderId=C(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,O.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:E,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(w(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=C(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},T),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{O.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new re(n,t,r);if(e||=C(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new S;var k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],A=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new A(k[0],3609767458),new A(k[1],602891725),new A(k[2],3964484399),new A(k[3],2173295548),new A(k[4],4081628472),new A(k[5],3053834265),new A(k[6],2937671579),new A(k[7],3664609560),new A(k[8],2734883394),new A(k[9],1164996542),new A(k[10],1323610764),new A(k[11],3590304994),new A(k[12],4068182383),new A(k[13],991336113),new A(k[14],633803317),new A(k[15],3479774868),new A(k[16],2666613458),new A(k[17],944711139),new A(k[18],2341262773),new A(k[19],2007800933),new A(k[20],1495990901),new A(k[21],1856431235),new A(k[22],3175218132),new A(k[23],2198950837),new A(k[24],3999719339),new A(k[25],766784016),new A(k[26],2566594879),new A(k[27],3203337956),new A(k[28],1034457026),new A(k[29],2466948901),new A(k[30],3758326383),new A(k[31],168717936),new A(k[32],1188179964),new A(k[33],1546045734),new A(k[34],1522805485),new A(k[35],2643833823),new A(k[36],2343527390),new A(k[37],1014477480),new A(k[38],1206759142),new A(k[39],344077627),new A(k[40],1290863460),new A(k[41],3158454273),new A(k[42],3505952657),new A(k[43],106217008),new A(k[44],3606008344),new A(k[45],1432725776),new A(k[46],1467031594),new A(k[47],851169720),new A(k[48],3100823752),new A(k[49],1363258195),new A(k[50],3750685593),new A(k[51],3785050280),new A(k[52],3318307427),new A(k[53],3812723403),new A(k[54],2003034995),new A(k[55],3602036899),new A(k[56],1575990012),new A(k[57],1125592928),new A(k[58],2716904306),new A(k[59],442776044),new A(k[60],593698344),new A(k[61],3733110249),new A(k[62],2999351573),new A(k[63],3815920427),new A(3391569614,3928383900),new A(3515267271,566280711),new A(3940187606,3454069534),new A(4118630271,4000239992),new A(116418474,1914138554),new A(174292421,2731055270),new A(289380356,3203993006),new A(460393269,320620315),new A(685471733,587496836),new A(852142971,1086792851),new A(1017036298,365543100),new A(1126000580,2618297676),new A(1288033470,3409855158),new A(1501505948,4234509866),new A(1607167915,987167468),new A(1816402316,1246189591),new A(0,1),new A(0,32898),new A(2147483648,32906),new A(2147483648,2147516416),new A(0,32907),new A(0,2147483649),new A(2147483648,2147516545),new A(2147483648,32777),new A(0,138),new A(0,136),new A(0,2147516425),new A(0,2147483658),new A(0,2147516555),new A(2147483648,139),new A(2147483648,32905),new A(2147483648,32771),new A(2147483648,32770),new A(2147483648,128),new A(0,32778),new A(2147483648,2147483658),new A(2147483648,2147516545),new A(2147483648,32896),new A(0,2147483649),new A(2147483648,2147516424);var ie=/["'&<>]/;function j(e){let t=``+e,n=ie.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ce=(e,t,n=oe)=>{if(typeof document<`u`&&t&&!se(e,t,ae)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var M=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(M),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(M);function N(e){return j(e)}var P=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,F=`.#[`;function I(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var L=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},R=(e,t)=>{let n=t.trim();if(!n)return!1;let r=I(n);return r!==null&&r.every(t=>L(e,t))},z=(e,t,n)=>{for(let r of e)P(r)&&(R(r,t)&&n.push(r),z(r.childrenList,t,n))},B=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?j(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return z(this.childrenList,e,t),t}},V=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new B)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new H(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return z(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${N(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${N(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?j(e):(e instanceof B,e.serialize())).join(``):a+=j(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},H=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return z(this.childrenList,e,t),t}serialize(){return``}},U=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(U(t)):e.concat(t),[]),W=e=>e==null?null:e instanceof J?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,G=(e,t)=>{if(n){q(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};f(()=>{let e=t();o();let n=document.createDocumentFragment();a=p(t=>(q(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),m(()=>a?.())},le=`__ranFor`,ue=e=>typeof e==`object`&&!!e&&e[le]===!0,de=(e,t,n)=>{let[r,i]=d(t),a=null,o=p(t=>{let i=W(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},K=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},fe=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=W(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;m(()=>{for(let e of i.values())e.dispose();i.clear()}),f(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=de(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();K(r,a),i=n})},pe=`__ranIndex`,me=e=>typeof e==`object`&&!!e&&e[pe]===!0,he=(e,t,n)=>{let[r,i]=d(e),a=null,o=p(e=>{let i=W(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},ge=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=W(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];m(()=>{for(let e of i)e.dispose();i=[]}),f(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}K(r,i.map(e=>e.node).filter(e=>e!=null))})},q=(e,t)=>{U(t).forEach(t=>{if(ue(t)){fe(e,t);return}if(me(t)){ge(e,t);return}if(typeof t==`function`){G(e,t);return}let n=W(t);n!=null&&e.appendChild(n)})},_e=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),J=class{el;constructor(e,t){let r=t??(_e.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new V(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?f(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return q(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ve(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ve=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return q(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},ye=e=>new J(e),be=()=>ye(`slot`),xe=new Map;function Se(e,t){n?(xe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ce=typeof document<`u`?HTMLElement:V,we=`data-ranui`,Y=(e,t)=>ce(e,t,we),X=new WeakMap,Z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Q=new Map,Te=e=>{let t=Q.get(e);if(t!==void 0)return t;let n=e?`${e}\n${Z}`:Z;return Q.set(e,n),n},Ee=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||X.get(e)||e.attachShadow(n);return X.set(e,r),Y(r,Te(t)),r},$=class extends Ce{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=Ee(this,t);let e=be().class(`slot`).build();this._shadowDom.appendChild(e),this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}};return Se(`r-content`,$),e.Content=$,e.default=$,e})({}); \ No newline at end of file +var ranui_content=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{visibility:hidden;position:absolute}`,n=typeof document>`u`,r=/["'&<>]/;function i(e){let t=``+e,n=r.exec(t);if(!n)return t;let i,a=``,o=0,s=0;for(o=n.index;o{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},c=(e,t,n=o)=>{if(!(typeof document>`u`)&&t&&!s(e,t,a)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},l=0,u=1,d=2,f=null,p=null,m=0,h=new Set,g=!1;function _(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)S(e,d);m===0&&C()}}]}function v(e){let t=ee(e,!0);return te(t),T(t),()=>D(t)}function y(e){let t=f;f=null;try{return e()}finally{f=t}}function b(e){let t={owned:[],cleanups:[],owner:p},n=p,r=f;p=t,f=null;try{return e(()=>O(t))}finally{p=n,f=r}}function x(e){p&&p.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:d,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:p}}function te(e){p&&p.owned.push(e)}function ne(e){f&&(f.sources.add(e),e.observers.add(f))}function S(e,t){if(e.disposed||e.state>=t)return;let n=e.state===l;if(e.state=t,e.isEffect)h.add(e);else if(n)for(let t of e.observers)S(t,u)}function C(){if(!(m>0||g)){g=!0;try{for(;h.size>0;){let e=[...h];h.clear();for(let t of e)t.disposed||w(t)}}finally{g=!1}}}function w(e){if(!(e.disposed||e.state===l)){if(e.state===u)for(let t of e.sources)`fn`in t&&w(t);e.state===d&&T(e),e.state=l}}function T(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);E(e);let t=f,n=p;f=e,p=e,e.running=!0,e.state=l;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)S(t,d)}}finally{e.running=!1,f=t,p=n}}function E(e){for(let t of e.owned)D(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function D(e){e.disposed||(e.disposed=!0,E(e),e.observers.clear())}function O(e){for(let t of e.owned)D(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function k(e){return i(e)}var A=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,j=`.#[`;function M(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var re=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},ie=(e,t)=>{let n=t.trim();if(!n)return!1;let r=M(n);return r!==null&&r.every(t=>re(e,t))},N=(e,t,n)=>{for(let r of e)A(r)&&(ie(r,t)&&n.push(r),N(r.childrenList,t,n))},P=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}},ae=new Map,F=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??ae}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:i(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new P)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new oe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${k(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=r?` style="${k(r)}"`:``,o=``;return this.shadowRoot&&(o+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?o+=this._innerHTML:o+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof P,e.serialize())).join(``):o+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!o?`<${t}${n}${a} />`:`<${t}${n}${a}>${o}`}},oe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}serialize(){return``}},I={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let r of t){if(r==null)continue;if(Array.isArray(r)){I.append(e,r);continue}if(typeof r==`function`){I.append(e,[r()]);continue}if(typeof r==`object`&&(`__ranFor`in r||`__ranIndex`in r))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=r instanceof z?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},L=`http://www.w3.org/2000/svg`,R=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),z=class{runtime;el;constructor(e,t,r=I){this.runtime=r;let i=t??(R.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new F(e):i?document.createElementNS(i,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new B(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},B=class{runtime;root;hostEl;constructor(e,t,n,r=I){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},V=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(V(t)):e.concat(t),[]),H=e=>e==null?null:e instanceof z?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,U=(e,t)=>{if(n){J(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};v(()=>{let e=t();o();let n=document.createDocumentFragment();a=b(t=>(J(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),x(()=>a?.())},W=`__ranFor`,G=e=>typeof e==`object`&&!!e&&e[W]===!0,K=(e,t,n)=>{let[r,i]=_(t),a=null,o=b(t=>{let i=H(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},q=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},se=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=H(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;x(()=>{for(let e of i.values())e.dispose();i.clear()}),v(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o)){fe()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=i.get(o);s?(i.delete(o),s.index(r)):s=K(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();q(r,a),i=n})},ce=`__ranIndex`,le=e=>typeof e==`object`&&!!e&&e[ce]===!0,ue=(e,t,n)=>{let[r,i]=_(e),a=null,o=b(e=>{let i=H(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},de=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=H(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];x(()=>{for(let e of i)e.dispose();i=[]}),v(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}q(r,i.map(e=>e.node).filter(e=>e!=null))})},J=(e,t)=>{n?y(()=>Y(e,t)):Y(e,t)},Y=(e,t)=>{V(t).forEach(t=>{if(G(t)){se(e,t);return}if(le(t)){de(e,t);return}if(typeof t==`function`){U(e,t);return}let n=H(t);n!=null&&e.appendChild(n)})},fe=()=>!1,pe={bind(e,t){if(typeof e!=`function`){t(e);return}n?y(()=>t(e())):v(()=>t(e()))},append:J},me=class extends z{constructor(e,t){super(e,t,pe)}};function he(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,L),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:ge,Div:_e,Svg:ve,Span:ye,Slot:be,ButtonBuilder:xe,InputBuilder:Se,Style:Ce,Label:we,Ul:Te,Li:Ee,Section:De,Article:Oe,Nav:ke,Header:Ae,Footer:je,Main:Me,DeclarativeShadow:Ne}=he(me),Pe=new Map;function Fe(e,t){n?(Pe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ie=typeof document<`u`?HTMLElement:F,Le=`data-ranui`,Re=(e,t)=>c(e,t,Le),X=new WeakMap,Z=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Q=new Map,ze=e=>{let t=Q.get(e);if(t!==void 0)return t;let n=e?`${e}\n${Z}`:Z;return Q.set(e,n),n},Be=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||X.get(e)||e.attachShadow(n);return X.set(e,r),Re(r,ze(t)),r},$=class extends Ie{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=Be(this,t);let e=be().class(`slot`).build();this._shadowDom.appendChild(e),this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}};return Fe(`r-content`,$),e.Content=$,e.default=$,e})({}); \ No newline at end of file diff --git a/public/ranui-iife/input.iife.js b/public/ranui-iife/input.iife.js index 10047d3d8..ac95cd1f6 100644 --- a/public/ranui-iife/input.iife.js +++ b/public/ranui-iife/input.iife.js @@ -1,38 +1,38 @@ -var ranui_input=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=typeof document>`u`,a=class{ac=null;get signal(){return this.ac??=new AbortController,this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},o=0,s=1,c=2,l=null,u=null,ee=0,d=new Set,f=!1;function te(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ie(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,c);ee===0&&ae()}}]}function p(e){let t=ne(e,!0);return re(t),v(t),()=>b(t)}function m(e){let t={owned:[],cleanups:[],owner:u},n=u,r=l;u=t,l=null;try{return e(()=>oe(t))}finally{u=n,l=r}}function h(e){u&&u.cleanups.push(e)}function ne(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:c,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:u}}function re(e){u&&u.owned.push(e)}function ie(e){l&&(l.sources.add(e),e.observers.add(l))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===o;if(e.state=t,e.isEffect)d.add(e);else if(n)for(let t of e.observers)g(t,s)}function ae(){if(!(ee>0||f)){f=!0;try{for(;d.size>0;){let e=[...d];d.clear();for(let t of e)t.disposed||_(t)}}finally{f=!1}}}function _(e){if(!(e.disposed||e.state===o)){if(e.state===s)for(let t of e.sources)`fn`in t&&_(t);e.state===c&&v(e),e.state=o}}function v(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);y(e);let t=l,n=u;l=e,u=e,e.running=!0,e.state=o;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,c)}}finally{e.running=!1,l=t,u=n}}function y(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function b(e){e.disposed||(e.disposed=!0,y(e),e.observers.clear())}function oe(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var se=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}};Math.PI/180,180/Math.PI,2*Math.PI;var x=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var ce=e=>typeof e==`function`,le=12e4,ue=`__ranuts_bridge__`,de=`default`,fe=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},pe=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=de){this.targetOrigin=t,this.channel=n,this.senderId=x(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,fe.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:ue,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(ce(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=x(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},le),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{fe.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new pe(n,t,r);if(e||=x(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new se;var S=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],C=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new C(S[0],3609767458),new C(S[1],602891725),new C(S[2],3964484399),new C(S[3],2173295548),new C(S[4],4081628472),new C(S[5],3053834265),new C(S[6],2937671579),new C(S[7],3664609560),new C(S[8],2734883394),new C(S[9],1164996542),new C(S[10],1323610764),new C(S[11],3590304994),new C(S[12],4068182383),new C(S[13],991336113),new C(S[14],633803317),new C(S[15],3479774868),new C(S[16],2666613458),new C(S[17],944711139),new C(S[18],2341262773),new C(S[19],2007800933),new C(S[20],1495990901),new C(S[21],1856431235),new C(S[22],3175218132),new C(S[23],2198950837),new C(S[24],3999719339),new C(S[25],766784016),new C(S[26],2566594879),new C(S[27],3203337956),new C(S[28],1034457026),new C(S[29],2466948901),new C(S[30],3758326383),new C(S[31],168717936),new C(S[32],1188179964),new C(S[33],1546045734),new C(S[34],1522805485),new C(S[35],2643833823),new C(S[36],2343527390),new C(S[37],1014477480),new C(S[38],1206759142),new C(S[39],344077627),new C(S[40],1290863460),new C(S[41],3158454273),new C(S[42],3505952657),new C(S[43],106217008),new C(S[44],3606008344),new C(S[45],1432725776),new C(S[46],1467031594),new C(S[47],851169720),new C(S[48],3100823752),new C(S[49],1363258195),new C(S[50],3750685593),new C(S[51],3785050280),new C(S[52],3318307427),new C(S[53],3812723403),new C(S[54],2003034995),new C(S[55],3602036899),new C(S[56],1575990012),new C(S[57],1125592928),new C(S[58],2716904306),new C(S[59],442776044),new C(S[60],593698344),new C(S[61],3733110249),new C(S[62],2999351573),new C(S[63],3815920427),new C(3391569614,3928383900),new C(3515267271,566280711),new C(3940187606,3454069534),new C(4118630271,4000239992),new C(116418474,1914138554),new C(174292421,2731055270),new C(289380356,3203993006),new C(460393269,320620315),new C(685471733,587496836),new C(852142971,1086792851),new C(1017036298,365543100),new C(1126000580,2618297676),new C(1288033470,3409855158),new C(1501505948,4234509866),new C(1607167915,987167468),new C(1816402316,1246189591),new C(0,1),new C(0,32898),new C(2147483648,32906),new C(2147483648,2147516416),new C(0,32907),new C(0,2147483649),new C(2147483648,2147516545),new C(2147483648,32777),new C(0,138),new C(0,136),new C(0,2147516425),new C(0,2147483658),new C(0,2147516555),new C(2147483648,139),new C(2147483648,32905),new C(2147483648,32771),new C(2147483648,32770),new C(2147483648,128),new C(0,32778),new C(2147483648,2147483658),new C(2147483648,2147516545),new C(2147483648,32896),new C(0,2147483649),new C(2147483648,2147516424);var me=/["'&<>]/;function w(e){let t=``+e,n=me.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ye=(e,t,n=_e)=>{if(typeof document<`u`&&t&&!T(e,t,he)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},be=(e,t,n=ve)=>{if(typeof document<`u`&&t&&!T(e,t,ge)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var E=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(E),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(E);function D(e){return w(e)}var xe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,Se=`.#[`;function Ce(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var we=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},Te=(e,t)=>{let n=t.trim();if(!n)return!1;let r=Ce(n);return r!==null&&r.every(t=>we(e,t))},O=(e,t,n)=>{for(let r of e)xe(r)&&(Te(r,t)&&n.push(r),O(r.childrenList,t,n))},k=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?w(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}},Ee=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new k)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new De(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${D(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${D(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?w(e):(e instanceof k,e.serialize())).join(``):a+=w(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},De=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}serialize(){return``}},Oe=()=>({current:null}),ke=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(ke(t)):e.concat(t),[]),A=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?i?e:document.createTextNode(e):e,Ae=(e,t)=>{if(i){M(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let a=null,o=()=>{a?.(),a=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};p(()=>{let e=t();o();let n=document.createDocumentFragment();a=m(t=>(M(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),h(()=>a?.())},je=`__ranFor`,Me=e=>typeof e==`object`&&!!e&&e[je]===!0,Ne=(e,t,n)=>{let[r,i]=te(t),a=null,o=m(t=>{let i=A(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},j=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Pe=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;h(()=>{for(let e of r.values())e.dispose();r.clear()}),p(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=Ne(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();j(n,a),r=i})},Fe=`__ranIndex`,Ie=e=>typeof e==`object`&&!!e&&e[Fe]===!0,Le=(e,t,n)=>{let[r,i]=te(e),a=null,o=m(e=>{let i=A(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Re=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=A(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];h(()=>{for(let e of r)e.dispose();r=[]}),p(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}j(n,r.map(e=>e.node).filter(e=>e!=null))})},M=(e,t)=>{ke(t).forEach(t=>{if(Me(t)){Pe(e,t);return}if(Ie(t)){Re(e,t);return}if(typeof t==`function`){Ae(e,t);return}let n=A(t);n!=null&&e.appendChild(n)})},ze=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),N=class{el;constructor(e,t){let n=t??(ze.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=i?new Ee(e):n?document.createElementNS(n,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?p(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{i?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return M(this.el,e),this}replaceChildren(...e){if(i){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new Be(this.el,t,e)}build(){return this.el}serialize(){if(i)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Be=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return M(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(i)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return i?this.root.serialize():this.root.innerHTML}},P=e=>new N(e),F=()=>P(`div`),Ve=()=>P(`input`),He=()=>P(`label`),I=[!1,`false`,null,void 0],L=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!I.includes(n))},Ue=new Map;function R(e,t){i?(Ue.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var z=typeof document<`u`?HTMLElement:Ee,We=`data-ranui`,Ge=`data-ranui-sheet`,Ke=(e,t)=>ye(e,t,We),qe=(e,t)=>be(e,t,Ge),B=new WeakMap,V=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,H=new Map,Je=e=>{let t=H.get(e);if(t!==void 0)return t;let n=e?`${e}\n${V}`:V;return H.set(e,n),n},U=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||B.get(e)||e.attachShadow(n);return B.set(e,r),Ke(r,Je(t)),r},Ye=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},W=(e,t,n=``)=>e.getAttribute(t)??n,G=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Xe=(e,t,n,r={})=>{if(n){e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`);return}e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`)},K=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&qe(t,a)};function Ze(e,t,n){let{disabled:r,required:i,isEmpty:a,message:o=`Please fill out this field.`,anchor:s,ariaTarget:c=e}=n;i?c.setAttribute(`aria-required`,`true`):c.removeAttribute(`aria-required`);let l=!r&&i&&a;l?c.setAttribute(`aria-invalid`,`true`):c.removeAttribute(`aria-invalid`),t&&(l?t.setValidity?.({valueMissing:!0},o,s):t.setValidity?.({}))}function Qe(e){return e?.checkValidity?.()??!0}function $e(e){return e?.reportValidity?.()??!0}var et=`:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation,rotate);animation-duration:var(--ran-icon-host-spin-animation,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-host-spin-transform,rotate(360deg))}}`,tt=r({default:()=>q}),q,nt=n((()=>{q={success:!0,_identification:!0,data:`()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=typeof document>`u`,a=/["'&<>]/;function o(e){let t=``+e,n=a.exec(t);if(!n)return t;let r,i=``,o=0,s=0;for(o=n.index;o{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},ee=new Map,te=new Map,ne=`data-adopted-style`,re=`data-adopted-sheet`,c=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ie=(e,t,n=ne)=>{if(!(typeof document>`u`)&&t&&!c(e,t,ee)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},ae=(e,t,n=re)=>{if(!(typeof document>`u`)&&t&&!c(e,t,te)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},l=0,u=1,d=2,f=null,p=null,m=0,h=new Set,g=!1;function _(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ce(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)S(e,d);m===0&&le()}}]}function v(e){let t=oe(e,!0);return se(t),w(t),()=>E(t)}function y(e){let t=f;f=null;try{return e()}finally{f=t}}function b(e){let t={owned:[],cleanups:[],owner:p},n=p,r=f;p=t,f=null;try{return e(()=>ue(t))}finally{p=n,f=r}}function x(e){p&&p.cleanups.push(e)}function oe(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:d,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:p}}function se(e){p&&p.owned.push(e)}function ce(e){f&&(f.sources.add(e),e.observers.add(f))}function S(e,t){if(e.disposed||e.state>=t)return;let n=e.state===l;if(e.state=t,e.isEffect)h.add(e);else if(n)for(let t of e.observers)S(t,u)}function le(){if(!(m>0||g)){g=!0;try{for(;h.size>0;){let e=[...h];h.clear();for(let t of e)t.disposed||C(t)}}finally{g=!1}}}function C(e){if(!(e.disposed||e.state===l)){if(e.state===u)for(let t of e.sources)`fn`in t&&C(t);e.state===d&&w(e),e.state=l}}function w(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);T(e);let t=f,n=p;f=e,p=e,e.running=!0,e.state=l;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)S(t,d)}}finally{e.running=!1,f=t,p=n}}function T(e){for(let t of e.owned)E(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function E(e){e.disposed||(e.disposed=!0,T(e),e.observers.clear())}function ue(e){for(let t of e.owned)E(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function D(e){return o(e)}var de=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,fe=`.#[`;function pe(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var me=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},he=(e,t)=>{let n=t.trim();if(!n)return!1;let r=pe(n);return r!==null&&r.every(t=>me(e,t))},O=(e,t,n)=>{for(let r of e)de(r)&&(he(r,t)&&n.push(r),O(r.childrenList,t,n))},k=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?o(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}},ge=new Map,A=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??ge}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:o(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new k)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new _e(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${D(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${D(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?o(e):(e instanceof k,e.serialize())).join(``):a+=o(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},_e=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}serialize(){return``}},j={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let n of t){if(n==null)continue;if(Array.isArray(n)){j.append(e,n);continue}if(typeof n==`function`){j.append(e,[n()]);continue}if(typeof n==`object`&&(`__ranFor`in n||`__ranIndex`in n))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=n instanceof M?n.build():typeof n==`string`&&!i?document.createTextNode(n):n;e.appendChild(t)}}},ve=`http://www.w3.org/2000/svg`,ye=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),M=class{runtime;el;constructor(e,t,n=j){this.runtime=n;let r=t??(ye.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=i?new A(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{i?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(i){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new be(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(i)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},be=class{runtime;root;hostEl;constructor(e,t,n,r=j){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(i)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return i?this.root.serialize():this.root.innerHTML}},xe=()=>({current:null}),N=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(N(t)):e.concat(t),[]),P=e=>e==null?null:e instanceof M?e.build():typeof e==`string`?i?e:document.createTextNode(e):e,Se=(e,t)=>{if(i){I(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let a=null,o=()=>{a?.(),a=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};v(()=>{let e=t();o();let n=document.createDocumentFragment();a=b(t=>(I(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),x(()=>a?.())},Ce=`__ranFor`,we=e=>typeof e==`object`&&!!e&&e[Ce]===!0,Te=(e,t,n)=>{let[r,i]=_(t),a=null,o=b(t=>{let i=P(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},F=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Ee=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=P(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;x(()=>{for(let e of r.values())e.dispose();r.clear()}),v(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){je()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=r.get(o);s?(r.delete(o),s.index(n)):s=Te(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();F(n,a),r=i})},De=`__ranIndex`,Oe=e=>typeof e==`object`&&!!e&&e[De]===!0,ke=(e,t,n)=>{let[r,i]=_(e),a=null,o=b(e=>{let i=P(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ae=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=P(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];x(()=>{for(let e of r)e.dispose();r=[]}),v(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}F(n,r.map(e=>e.node).filter(e=>e!=null))})},I=(e,t)=>{i?y(()=>L(e,t)):L(e,t)},L=(e,t)=>{N(t).forEach(t=>{if(we(t)){Ee(e,t);return}if(Oe(t)){Ae(e,t);return}if(typeof t==`function`){Se(e,t);return}let n=P(t);n!=null&&e.appendChild(n)})},je=()=>!1,Me={bind(e,t){if(typeof e!=`function`){t(e);return}i?y(()=>t(e())):v(()=>t(e()))},append:I},Ne=class extends M{constructor(e,t){super(e,t,Me)}};function Pe(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,ve),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:R,Div:z,Svg:Fe,Span:Ie,Slot:Le,ButtonBuilder:Re,InputBuilder:ze,Style:Be,Label:Ve,Ul:He,Li:Ue,Section:We,Article:Ge,Nav:Ke,Header:qe,Footer:Je,Main:Ye,DeclarativeShadow:Xe}=Pe(Ne),B=[!1,`false`,null,void 0],V=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!!(t&&!B.includes(n))},Ze=new Map;function H(e,t){i?(Ze.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var U=typeof document<`u`?HTMLElement:A,Qe=`data-ranui`,$e=`data-ranui-sheet`,et=(e,t)=>ie(e,t,Qe),tt=(e,t)=>ae(e,t,$e),W=new WeakMap,G=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,K=new Map,nt=e=>{let t=K.get(e);if(t!==void 0)return t;let n=e?`${e}\n${G}`:G;return K.set(e,n),n},q=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||W.get(e)||e.attachShadow(n);return W.set(e,r),et(r,nt(t)),r},rt=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},J=(e,t,n=``)=>e.getAttribute(t)??n,Y=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},it=(e,t,n,r={})=>{if(n){e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`);return}e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`)},X=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&tt(t,a)};function at(e){return e?.checkValidity?.()??!0}function ot(e){return e?.reportValidity?.()??!0}var st=`:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-animation,rotate);animation-duration:var(--ran-icon-host-spin-animation,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-animation,infinite)}.ran-icon{display:var(--ran-icon-display,flex);align-items:var(--ran-icon-align-items,center);justify-content:var(--ran-icon-justify-content,center);color:var(--ran-icon-color,inherit);font-size:var(--ran-icon-font-size,1em);margin:var(--ran-icon-margin,0)}.ran-icon svg{width:var(--ran-icon-svg-width,1em);height:var(--ran-icon-svg-height,1em);fill:var(--ran-icon-svg-fill,currentColor);stroke:var(--ran-icon-svg-stroke,currentColor)}@keyframes rotate{to{transform:var(--ran-icon-host-spin-transform,rotate(360deg))}}`,ct=r({default:()=>Z}),Z,lt=n((()=>{Z=` -`}})),rt=r({default:()=>J}),J,it=n((()=>{J={success:!0,_identification:!0,data:``})),ut=r({default:()=>dt}),dt,ft=n((()=>{dt=` -`}})),at=r({default:()=>Y}),Y,ot=n((()=>{Y={success:!0,_identification:!0,data:``}})),st=r({default:()=>X}),X,ct=n((()=>{X={success:!0,_identification:!0,data:` -`}})),lt=r({default:()=>ut}),ut,dt=n((()=>{ut={success:!0,_identification:!0,data:``}})),ft=r({default:()=>pt}),pt,mt=n((()=>{pt={success:!0,_identification:!0,data:``}})),ht=r({default:()=>gt}),gt,_t=n((()=>{gt={success:!0,_identification:!0,data:``}})),vt=r({default:()=>yt}),yt,bt=n((()=>{yt={success:!0,_identification:!0,data:` -`}})),xt=r({default:()=>St}),St,Ct=n((()=>{St={success:!0,_identification:!0,data:``}})),wt=r({default:()=>Tt}),Tt,Et=n((()=>{Tt={success:!0,_identification:!0,data:``}})),Dt=r({default:()=>Ot}),Ot,kt=n((()=>{Ot={success:!0,_identification:!0,data:``}})),At=r({default:()=>jt}),jt,Mt=n((()=>{jt={success:!0,_identification:!0,data:``}})),Nt=r({default:()=>Pt}),Pt,Ft=n((()=>{Pt={success:!0,_identification:!0,data:``}})),It=r({default:()=>Lt}),Lt,Rt=n((()=>{Lt={success:!0,_identification:!0,data:` +`})),pt=r({default:()=>mt}),mt,ht=n((()=>{mt=``})),gt=r({default:()=>_t}),_t,vt=n((()=>{_t=` +`})),yt=r({default:()=>bt}),bt,xt=n((()=>{bt=``})),St=r({default:()=>Ct}),Ct,wt=n((()=>{Ct=``})),Tt=r({default:()=>Et}),Et,Dt=n((()=>{Et=``})),Ot=r({default:()=>kt}),kt,At=n((()=>{kt=` +`})),jt=r({default:()=>Mt}),Mt,Nt=n((()=>{Mt=``})),Pt=r({default:()=>Ft}),Ft,It=n((()=>{Ft=``})),Lt=r({default:()=>Rt}),Rt,zt=n((()=>{Rt=``})),Bt=r({default:()=>Vt}),Vt,Ht=n((()=>{Vt=``})),Ut=r({default:()=>Wt}),Wt,Gt=n((()=>{Wt=``})),Kt=r({default:()=>qt}),qt,Jt=n((()=>{qt=` -`}})),zt=r({default:()=>Bt}),Bt,Vt=n((()=>{Bt={success:!0,_identification:!0,data:` +`})),Yt=r({default:()=>Xt}),Xt,Zt=n((()=>{Xt=` -`}})),Ht=r({default:()=>Ut}),Ut,Wt=n((()=>{Ut={success:!0,_identification:!0,data:` +`})),Qt=r({default:()=>$t}),$t,en=n((()=>{$t=` -`}})),Gt=r({default:()=>Kt}),Kt,qt=n((()=>{Kt={success:!0,_identification:!0,data:``}})),Jt=r({default:()=>Yt}),Yt,Xt=n((()=>{Yt={success:!0,_identification:!0,data:` -`}})),Zt=r({default:()=>Qt}),Qt,$t=n((()=>{Qt={success:!0,_identification:!0,data:` +`})),tn=r({default:()=>nn}),nn,rn=n((()=>{nn=``})),an=r({default:()=>on}),on,sn=n((()=>{on=` +`})),cn=r({default:()=>ln}),ln,un=n((()=>{ln=` -`}})),en=r({default:()=>tn}),tn,nn=n((()=>{tn={success:!0,_identification:!0,data:``}})),rn=r({default:()=>an}),an,on=n((()=>{an={success:!0,_identification:!0,data:``}})),sn=r({default:()=>cn}),cn,ln=n((()=>{cn={success:!0,_identification:!0,data:` +`})),dn=r({default:()=>fn}),fn,pn=n((()=>{fn=``})),mn=r({default:()=>hn}),hn,gn=n((()=>{hn=``})),_n=r({default:()=>vn}),vn,yn=n((()=>{vn=` -`}})),un=r({default:()=>dn}),dn,fn=n((()=>{dn={success:!0,_identification:!0,data:` -`}})),pn=r({default:()=>mn}),mn,hn=n((()=>{mn={success:!0,_identification:!0,data:` `})),bn=r({default:()=>xn}),xn,Sn=n((()=>{xn=` +`})),Cn=r({default:()=>wn}),wn,Tn=n((()=>{wn=` -`}})),gn=r({default:()=>_n}),_n,vn=n((()=>{_n={success:!0,_identification:!0,data:``}})),yn=r({default:()=>bn}),bn,xn=n((()=>{bn={success:!0,_identification:!0,data:` +`})),En=r({default:()=>Dn}),Dn,On=n((()=>{Dn=``})),kn=r({default:()=>An}),An,jn=n((()=>{An=` -`}})),Sn=r({default:()=>Cn}),Cn,wn=n((()=>{Cn={success:!0,_identification:!0,data:` -`}})),Tn=r({default:()=>En}),En,Dn=n((()=>{En={success:!0,_identification:!0,data:``}})),On=r({default:()=>kn}),kn,An=n((()=>{kn={success:!0,_identification:!0,data:` -`}})),jn=r({default:()=>Mn}),Mn,Nn=n((()=>{Mn={success:!0,_identification:!0,data:` -`}})),Pn=r({default:()=>Fn}),Fn,In=n((()=>{Fn={success:!0,_identification:!0,data:` -`}})),Ln=r({default:()=>Rn}),Rn,zn=n((()=>{Rn={success:!0,_identification:!0,data:` -`}})),Bn=r({default:()=>Vn}),Vn,Hn=n((()=>{Vn={success:!0,_identification:!0,data:` -`}})),Un=r({default:()=>Wn}),Wn,Gn=n((()=>{Wn={success:!0,_identification:!0,data:` -`}})),Kn=r({default:()=>qn}),qn,Jn=n((()=>{qn={success:!0,_identification:!0,data:` -`}})),Yn=r({default:()=>Xn}),Xn,Zn=n((()=>{Xn={success:!0,_identification:!0,data:` -`}})),Qn=r({default:()=>$n}),$n,er=n((()=>{$n={success:!0,_identification:!0,data:``}})),tr=r({default:()=>nr}),nr,rr=n((()=>{nr={success:!0,_identification:!0,data:``}})),ir=r({default:()=>ar}),ar,or=n((()=>{ar={success:!0,_identification:!0,data:``}})),sr=r({default:()=>cr}),cr,lr=n((()=>{cr={success:!0,_identification:!0,data:` -`}})),ur=r({default:()=>dr}),dr,fr=n((()=>{dr={success:!0,_identification:!0,data:``}})),pr=r({default:()=>mr}),mr,hr=n((()=>{mr={success:!0,_identification:!0,data:``})),Mn=r({default:()=>Nn}),Nn,Pn=n((()=>{Nn=` +`})),Fn=r({default:()=>In}),In,Ln=n((()=>{In=``})),Rn=r({default:()=>zn}),zn,Bn=n((()=>{zn=` +`})),Vn=r({default:()=>Hn}),Hn,Un=n((()=>{Hn=` +`})),Wn=r({default:()=>Gn}),Gn,Kn=n((()=>{Gn=` +`})),qn=r({default:()=>Jn}),Jn,Yn=n((()=>{Jn=` +`})),Xn=r({default:()=>Zn}),Zn,Qn=n((()=>{Zn=` +`})),$n=r({default:()=>er}),er,tr=n((()=>{er=` +`})),nr=r({default:()=>rr}),rr,ir=n((()=>{rr=` +`})),ar=r({default:()=>or}),or,sr=n((()=>{or=` +`})),cr=r({default:()=>lr}),lr,ur=n((()=>{lr=``})),dr=r({default:()=>fr}),fr,pr=n((()=>{fr=``})),mr=r({default:()=>hr}),hr,gr=n((()=>{hr=``})),_r=r({default:()=>vr}),vr,yr=n((()=>{vr=` +`})),br=r({default:()=>xr}),xr,Sr=n((()=>{xr=``})),Cr=r({default:()=>wr}),wr,Tr=n((()=>{wr=` -`}})),gr=r({default:()=>_r}),_r,vr=n((()=>{_r={success:!0,_identification:!0,data:` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`}})),yr=r({default:()=>br}),br,xr=n((()=>{br={success:!0,_identification:!0,data:``}})),Sr=r({default:()=>Z}),Z,Cr=n((()=>{Z={success:!0,_identification:!0,data:` +`})),Er=r({default:()=>Dr}),Dr,Or=n((()=>{Dr=``})),kr=r({default:()=>Ar}),Ar,jr=n((()=>{Ar=` -`}})),wr=r({default:()=>Tr}),Tr,Er=n((()=>{Tr={success:!0,_identification:!0,data:``}})),Dr=r({default:()=>Or}),Or,kr=n((()=>{Or={success:!0,_identification:!0,data:` -`}})),Ar=r({default:()=>jr}),jr,Mr=n((()=>{jr={success:!0,_identification:!0,data:` -`}})),Nr=r({default:()=>Pr}),Pr,Fr=n((()=>{Pr={success:!0,_identification:!0,data:``}})),Ir=r({default:()=>Lr}),Lr,Rr=n((()=>{Lr={success:!0,_identification:!0,data:``}})),zr=r({default:()=>Br}),Br,Vr=n((()=>{Br={success:!0,_identification:!0,data:``}})),Hr=r({default:()=>Ur}),Ur,Wr=n((()=>{Ur={success:!0,_identification:!0,data:``}})),Gr=r({default:()=>Kr}),Kr,qr=n((()=>{Kr={success:!0,_identification:!0,data:``}})),Jr=!1,Yr=new Map,Xr=!1,Q=e=>/]/i.test(e),Zr=e=>{if(typeof e==`string`)return Q(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Q(n))return n;let r=t.default;if(typeof r==`string`&&Q(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Q(e.data))return e.data}},Qr=(e,t)=>{Xr=!0;let n=Zr(t);n&&(Yr.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},$r=Object.assign({"../../assets/icons/add-user.svg":()=>Promise.resolve().then(()=>(nt(),tt)).then(e=>e.default),"../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>(it(),rt)).then(e=>e.default),"../../assets/icons/book.svg":()=>Promise.resolve().then(()=>(ot(),at)).then(e=>e.default),"../../assets/icons/cast.svg":()=>Promise.resolve().then(()=>(ct(),st)).then(e=>e.default),"../../assets/icons/check-circle-fill.svg":()=>Promise.resolve().then(()=>(dt(),lt)).then(e=>e.default),"../../assets/icons/check-circle.svg":()=>Promise.resolve().then(()=>(mt(),ft)).then(e=>e.default),"../../assets/icons/check.svg":()=>Promise.resolve().then(()=>(_t(),ht)).then(e=>e.default),"../../assets/icons/chevron-down.svg":()=>Promise.resolve().then(()=>(bt(),vt)).then(e=>e.default),"../../assets/icons/close-circle-fill.svg":()=>Promise.resolve().then(()=>(Ct(),xt)).then(e=>e.default),"../../assets/icons/close-circle.svg":()=>Promise.resolve().then(()=>(Et(),wt)).then(e=>e.default),"../../assets/icons/close.svg":()=>Promise.resolve().then(()=>(kt(),Dt)).then(e=>e.default),"../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>(Mt(),At)).then(e=>e.default),"../../assets/icons/download.svg":()=>Promise.resolve().then(()=>(Ft(),Nt)).then(e=>e.default),"../../assets/icons/drop.svg":()=>Promise.resolve().then(()=>(Rt(),It)).then(e=>e.default),"../../assets/icons/eye-close.svg":()=>Promise.resolve().then(()=>(Vt(),zt)).then(e=>e.default),"../../assets/icons/eye.svg":()=>Promise.resolve().then(()=>(Wt(),Ht)).then(e=>e.default),"../../assets/icons/fullscreen.svg":()=>Promise.resolve().then(()=>(qt(),Gt)).then(e=>e.default),"../../assets/icons/github.svg":()=>Promise.resolve().then(()=>(Xt(),Jt)).then(e=>e.default),"../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>($t(),Zt)).then(e=>e.default),"../../assets/icons/home.svg":()=>Promise.resolve().then(()=>(nn(),en)).then(e=>e.default),"../../assets/icons/info-circle-fill.svg":()=>Promise.resolve().then(()=>(on(),rn)).then(e=>e.default),"../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>(ln(),sn)).then(e=>e.default),"../../assets/icons/issue.svg":()=>Promise.resolve().then(()=>(fn(),un)).then(e=>e.default),"../../assets/icons/loading-scene.svg":()=>Promise.resolve().then(()=>(hn(),pn)).then(e=>e.default),"../../assets/icons/loading.svg":()=>Promise.resolve().then(()=>(vn(),gn)).then(e=>e.default),"../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>(xn(),yn)).then(e=>e.default),"../../assets/icons/menu.svg":()=>Promise.resolve().then(()=>(wn(),Sn)).then(e=>e.default),"../../assets/icons/message.svg":()=>Promise.resolve().then(()=>(Dn(),Tn)).then(e=>e.default),"../../assets/icons/mic-off.svg":()=>Promise.resolve().then(()=>(An(),On)).then(e=>e.default),"../../assets/icons/mic.svg":()=>Promise.resolve().then(()=>(Nn(),jn)).then(e=>e.default),"../../assets/icons/more.svg":()=>Promise.resolve().then(()=>(In(),Pn)).then(e=>e.default),"../../assets/icons/pause.svg":()=>Promise.resolve().then(()=>(zn(),Ln)).then(e=>e.default),"../../assets/icons/pencil.svg":()=>Promise.resolve().then(()=>(Hn(),Bn)).then(e=>e.default),"../../assets/icons/pip.svg":()=>Promise.resolve().then(()=>(Gn(),Un)).then(e=>e.default),"../../assets/icons/play.svg":()=>Promise.resolve().then(()=>(Jn(),Kn)).then(e=>e.default),"../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>(Zn(),Yn)).then(e=>e.default),"../../assets/icons/power-off.svg":()=>Promise.resolve().then(()=>(er(),Qn)).then(e=>e.default),"../../assets/icons/preview.svg":()=>Promise.resolve().then(()=>(rr(),tr)).then(e=>e.default),"../../assets/icons/refresh.svg":()=>Promise.resolve().then(()=>(or(),ir)).then(e=>e.default),"../../assets/icons/search.svg":()=>Promise.resolve().then(()=>(lr(),sr)).then(e=>e.default),"../../assets/icons/setting.svg":()=>Promise.resolve().then(()=>(fr(),ur)).then(e=>e.default),"../../assets/icons/sort.svg":()=>Promise.resolve().then(()=>(hr(),pr)).then(e=>e.default),"../../assets/icons/sprite.svg":()=>Promise.resolve().then(()=>(vr(),gr)).then(e=>e.default),"../../assets/icons/team.svg":()=>Promise.resolve().then(()=>(xr(),yr)).then(e=>e.default),"../../assets/icons/unlock.svg":()=>Promise.resolve().then(()=>(Cr(),Sr)).then(e=>e.default),"../../assets/icons/user.svg":()=>Promise.resolve().then(()=>(Er(),wr)).then(e=>e.default),"../../assets/icons/volume-mute.svg":()=>Promise.resolve().then(()=>(kr(),Dr)).then(e=>e.default),"../../assets/icons/volume.svg":()=>Promise.resolve().then(()=>(Mr(),Ar)).then(e=>e.default),"../../assets/icons/warning-circle-fill.svg":()=>Promise.resolve().then(()=>(Fr(),Nr)).then(e=>e.default),"../../assets/icons/warning-circle.svg":()=>Promise.resolve().then(()=>(Rr(),Ir)).then(e=>e.default),"../../assets/icons/without-content.svg":()=>Promise.resolve().then(()=>(Vr(),zr)).then(e=>e.default),"../../assets/icons/zoom-in.svg":()=>Promise.resolve().then(()=>(Wr(),Hr)).then(e=>e.default),"../../assets/icons/zoom-out.svg":()=>Promise.resolve().then(()=>(qr(),Gr)).then(e=>e.default)}),ei={};for(let[e,t]of Object.entries($r)){let n=e.split(`/`).pop()?.replace(/\.svg$/,``);n&&n!==`sprite`&&(ei[n]=t)}R(`r-icon`,class extends z{isDev=Jr;_events=new a;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=U(this,et);let e=F().class(`ran-icon`).part(`ran-icon`).build();this._shadowDom.appendChild(e),this._div=e}get name(){return W(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return W(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return W(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return W(this,`aria-label`)}set ariaLabel(e){G(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return W(this,`sheet`)}set sheet(e){G(this,`sheet`,e)}handlerExternalCss=()=>{K(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e){if(e.startsWith(`{t().then(t=>{Qr(e,t)}).catch(t=>{this.isDev&&console.warn(`[ranui-icon] lazy load builtin failed: ${e}`,t)})};isSvgText=e=>Q(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=P(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}});var ti=`:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}.ran-input-label{display:var(--ran-input-label-display,block);margin-bottom:var(--ran-input-label-margin-bottom,var(--ran-space-1,4px));font-size:var(--ran-input-label-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-input-label-font-weight,var(--ran-text-label-weight,500));color:var(--ran-input-label-color,var(--ran-color-text,#171717))}:host([status=error]) .ran-input-label{color:var(--ran-input-label-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-label{color:var(--ran-input-label-warning-color,var(--ran-color-warning,#faad14))}:host([disabled]) .ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);align-items:var(--ran-input-align-items,center);width:var(--ran-input-width,100%);height:var(--ran-input-height,100%);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,var(--ran-text-label-3,12px));font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,var(--ran-skin-border-image-width,4px));border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,none);min-height:var(--ran-input-min-height,var(--ran-size-7,32px));border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:has(.ran-input-content:focus-visible){border-color:var(--ran-input-active-border-color,var(--ran-color-link,#006bff));box-shadow:var(--ran-input-active-box-shadow,var(--ran-focus-ring));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-border-hover,#c9c9c9));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,var(--ran-space-8,32px))}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";top:50%;right:var(--ran-input-status-icon-right,var(--ran-space-3,12px));width:var(--ran-input-status-icon-width,var(--ran-size-1,16px));height:var(--ran-input-status-icon-height,var(--ran-size-1,16px));pointer-events:none;position:absolute;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,var(--ran-size-6,30px));min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,var(--ran-text-copy-2,14px));line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,none);outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 var(--ran-space-1,4px));font-weight:var(--ran-input-content-font-weight,var(--ran-text-copy-weight,400));-webkit-tap-highlight-color:transparent}.ran-input-content:focus,.ran-input-content:focus-visible,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,none);box-shadow:var(--ran-input-content-hover-box-shadow,none)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,var(--ran-text-label-3,12px));font-weight:var(--ran-input-message-font-weight,var(--ran-text-label-weight,500));line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger,#ff4d4f))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning,#faad14))}`,ni=0,$=class extends z{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new a;_shadowDom;_input;_label;_inputContent;_icon;_message;_defaultValue=``;_defaultValueCaptured=!1;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=U(this,ti);let e=Oe(),t=F().class(`ran-input`).part(`input`).children(Ve().class(`ran-input-content`).ref(e).part(`content`)).build();this._shadowDom.appendChild(t),this._input=t,this._inputContent=Ye(e,`content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++ni}`)}focus(e){this._inputContent?.focus(e)}blur(){this._inputContent?.blur()}select(){this._inputContent?.select?.()}get value(){return this.getAttribute(`value`)||``}set value(e){e?(this.setAttribute(`value`,e),this._input.setAttribute(`value`,e)):(this.removeAttribute(`value`),this._input.removeAttribute(`value`)),this._internals?.setFormValue?.(this.getAttribute(`value`)??``),this._updateValidity()}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){Xe(this,`required`,!(!e||e===`false`))}get disabled(){return L(this)}set disabled(e){I.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return W(this,`sheet`)}set sheet(e){G(this,`sheet`,e)}handlerExternalCss=()=>{K(this,this._shadowDom,`sheet`,null,this.sheet)};_updateValidity=()=>{Ze(this,this._internals,{disabled:this.disabled,required:this.required,isEmpty:!this.value,anchor:this._inputContent,ariaTarget:this._inputContent})};checkValidity(){return Qe(this._internals)}reportValidity(){return $e(this._internals)}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??``}formResetCallback(){this.value=this._defaultValue}customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;this.value=t?.value||n||``,this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customKeydown=e=>{e.key!==`Enter`||e.isComposing||this._internals?.form?.requestSubmit()};customChange=()=>{this.value=this._inputContent?.value??this.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._label.remove(),void 0)):this._label?this._label.innerHTML=t:(this._label=He().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._shadowDom.insertBefore(this._label,this._input)))};listenType=(e,t)=>{e===`type`&&this._inputContent&&(t?this._inputContent.setAttribute(`type`,t):(this._inputContent.removeAttribute(`type`),this._inputContent.removeAttribute(`min`),this._inputContent.removeAttribute(`max`),this._inputContent.removeAttribute(`step`)))};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=F().class(`ran-input-message`).part(`message`).build(),this._message.id=`${this._inputContent.id}-message`,this._shadowDom.appendChild(this._message),this._inputContent.setAttribute(`aria-describedby`,this._message.id)),this._message.textContent=t):this._message&&=(this._inputContent.removeAttribute(`aria-describedby`),this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e))};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``),this._updateValidity())};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(I.includes(t)?this._input.removeAttribute(`disabled`):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this._updateValidity())};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=P(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&(this._inputContent.value=n,this._input.setAttribute(`value`,n))};connectedCallback(){this.handlerExternalCss(),this._defaultValueCaptured||=(this._defaultValue=this.value,!0),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),L(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._updateValidity(),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),this._events.on(this._inputContent,`keydown`,this.customKeydown),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}};return R(`r-input`,$),e.Input=$,e.default=$,e})({}); \ No newline at end of file +`})),Mr=r({default:()=>Nr}),Nr,Pr=n((()=>{Nr=``})),Fr=r({default:()=>Ir}),Ir,Lr=n((()=>{Ir=` +`})),Rr=r({default:()=>zr}),zr,Br=n((()=>{zr=` +`})),Vr=r({default:()=>Hr}),Hr,Ur=n((()=>{Hr=``})),Wr=r({default:()=>Gr}),Gr,Kr=n((()=>{Gr=``})),qr=r({default:()=>Jr}),Jr,Yr=n((()=>{Jr=``})),Xr=r({default:()=>Zr}),Zr,Qr=n((()=>{Zr=``})),$r=r({default:()=>ei}),ei,ti=n((()=>{ei=``})),ni=!1,ri=new Map,ii=!1,Q=e=>/]/i.test(e),ai=e=>{if(typeof e==`string`)return Q(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Q(n))return n;let r=t.default;if(typeof r==`string`&&Q(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Q(e.data))return e.data}},oi=(e,t)=>{ii=!0;let n=ai(t);n&&(ri.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},si=Object.assign({"../../assets/icons/add-user.svg":()=>Promise.resolve().then(()=>(lt(),ct)).then(e=>e.default),"../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>(ft(),ut)).then(e=>e.default),"../../assets/icons/book.svg":()=>Promise.resolve().then(()=>(ht(),pt)).then(e=>e.default),"../../assets/icons/cast.svg":()=>Promise.resolve().then(()=>(vt(),gt)).then(e=>e.default),"../../assets/icons/check-circle-fill.svg":()=>Promise.resolve().then(()=>(xt(),yt)).then(e=>e.default),"../../assets/icons/check-circle.svg":()=>Promise.resolve().then(()=>(wt(),St)).then(e=>e.default),"../../assets/icons/check.svg":()=>Promise.resolve().then(()=>(Dt(),Tt)).then(e=>e.default),"../../assets/icons/chevron-down.svg":()=>Promise.resolve().then(()=>(At(),Ot)).then(e=>e.default),"../../assets/icons/close-circle-fill.svg":()=>Promise.resolve().then(()=>(Nt(),jt)).then(e=>e.default),"../../assets/icons/close-circle.svg":()=>Promise.resolve().then(()=>(It(),Pt)).then(e=>e.default),"../../assets/icons/close.svg":()=>Promise.resolve().then(()=>(zt(),Lt)).then(e=>e.default),"../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>(Ht(),Bt)).then(e=>e.default),"../../assets/icons/download.svg":()=>Promise.resolve().then(()=>(Gt(),Ut)).then(e=>e.default),"../../assets/icons/drop.svg":()=>Promise.resolve().then(()=>(Jt(),Kt)).then(e=>e.default),"../../assets/icons/eye-close.svg":()=>Promise.resolve().then(()=>(Zt(),Yt)).then(e=>e.default),"../../assets/icons/eye.svg":()=>Promise.resolve().then(()=>(en(),Qt)).then(e=>e.default),"../../assets/icons/fullscreen.svg":()=>Promise.resolve().then(()=>(rn(),tn)).then(e=>e.default),"../../assets/icons/github.svg":()=>Promise.resolve().then(()=>(sn(),an)).then(e=>e.default),"../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>(un(),cn)).then(e=>e.default),"../../assets/icons/home.svg":()=>Promise.resolve().then(()=>(pn(),dn)).then(e=>e.default),"../../assets/icons/info-circle-fill.svg":()=>Promise.resolve().then(()=>(gn(),mn)).then(e=>e.default),"../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>(yn(),_n)).then(e=>e.default),"../../assets/icons/issue.svg":()=>Promise.resolve().then(()=>(Sn(),bn)).then(e=>e.default),"../../assets/icons/loading-scene.svg":()=>Promise.resolve().then(()=>(Tn(),Cn)).then(e=>e.default),"../../assets/icons/loading.svg":()=>Promise.resolve().then(()=>(On(),En)).then(e=>e.default),"../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>(jn(),kn)).then(e=>e.default),"../../assets/icons/menu.svg":()=>Promise.resolve().then(()=>(Pn(),Mn)).then(e=>e.default),"../../assets/icons/message.svg":()=>Promise.resolve().then(()=>(Ln(),Fn)).then(e=>e.default),"../../assets/icons/mic-off.svg":()=>Promise.resolve().then(()=>(Bn(),Rn)).then(e=>e.default),"../../assets/icons/mic.svg":()=>Promise.resolve().then(()=>(Un(),Vn)).then(e=>e.default),"../../assets/icons/more.svg":()=>Promise.resolve().then(()=>(Kn(),Wn)).then(e=>e.default),"../../assets/icons/pause.svg":()=>Promise.resolve().then(()=>(Yn(),qn)).then(e=>e.default),"../../assets/icons/pencil.svg":()=>Promise.resolve().then(()=>(Qn(),Xn)).then(e=>e.default),"../../assets/icons/pip.svg":()=>Promise.resolve().then(()=>(tr(),$n)).then(e=>e.default),"../../assets/icons/play.svg":()=>Promise.resolve().then(()=>(ir(),nr)).then(e=>e.default),"../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>(sr(),ar)).then(e=>e.default),"../../assets/icons/power-off.svg":()=>Promise.resolve().then(()=>(ur(),cr)).then(e=>e.default),"../../assets/icons/preview.svg":()=>Promise.resolve().then(()=>(pr(),dr)).then(e=>e.default),"../../assets/icons/refresh.svg":()=>Promise.resolve().then(()=>(gr(),mr)).then(e=>e.default),"../../assets/icons/search.svg":()=>Promise.resolve().then(()=>(yr(),_r)).then(e=>e.default),"../../assets/icons/setting.svg":()=>Promise.resolve().then(()=>(Sr(),br)).then(e=>e.default),"../../assets/icons/sort.svg":()=>Promise.resolve().then(()=>(Tr(),Cr)).then(e=>e.default),"../../assets/icons/team.svg":()=>Promise.resolve().then(()=>(Or(),Er)).then(e=>e.default),"../../assets/icons/unlock.svg":()=>Promise.resolve().then(()=>(jr(),kr)).then(e=>e.default),"../../assets/icons/user.svg":()=>Promise.resolve().then(()=>(Pr(),Mr)).then(e=>e.default),"../../assets/icons/volume-mute.svg":()=>Promise.resolve().then(()=>(Lr(),Fr)).then(e=>e.default),"../../assets/icons/volume.svg":()=>Promise.resolve().then(()=>(Br(),Rr)).then(e=>e.default),"../../assets/icons/warning-circle-fill.svg":()=>Promise.resolve().then(()=>(Ur(),Vr)).then(e=>e.default),"../../assets/icons/warning-circle.svg":()=>Promise.resolve().then(()=>(Kr(),Wr)).then(e=>e.default),"../../assets/icons/without-content.svg":()=>Promise.resolve().then(()=>(Yr(),qr)).then(e=>e.default),"../../assets/icons/zoom-in.svg":()=>Promise.resolve().then(()=>(Qr(),Xr)).then(e=>e.default),"../../assets/icons/zoom-out.svg":()=>Promise.resolve().then(()=>(ti(),$r)).then(e=>e.default)}),ci={};for(let[e,t]of Object.entries(si)){let n=e.split(`/`).pop()?.replace(/\.svg$/,``);n&&(ci[n]=t)}H(`r-icon`,class extends U{isDev=ni;_events=new s;static get observedAttributes(){return[`name`,`size`,`color`,`spin`,`decorative`,`aria-label`,`sheet`]}_icon;_div;_shadowDom;_onIconRegistered=e=>{let t=e.detail?.name;t&&t===this.name&&!this._icon&&this.setIcon()};constructor(){super(),this._shadowDom=q(this,st);let e=z().class(`ran-icon`).part(`ran-icon`).build();this._shadowDom.appendChild(e),this._div=e}get name(){return J(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return J(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return J(this,`color`)}set color(e){e&&this.setAttribute(`color`,e)}get spin(){return this.hasAttribute(`spin`)}set spin(e){e?this.setAttribute(`spin`,``):this.removeAttribute(`spin`)}get decorative(){let e=this.getAttribute(`decorative`);return e==null?!this.hasAttribute(`aria-label`):e!==`false`&&e!==`0`}set decorative(e){this.setAttribute(`decorative`,e?`true`:`false`)}get ariaLabel(){return J(this,`aria-label`)}set ariaLabel(e){Y(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return J(this,`sheet`)}set sheet(e){Y(this,`sheet`,e)}handlerExternalCss=()=>{X(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{if(this._icon){if(this.decorative){this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`);return}this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)}};setIcon=()=>{if(typeof document>`u`)return;this._icon&&=(this._icon.remove(),void 0);let e=this.name;if(e){if(e.startsWith(`{t().then(t=>{oi(e,t)}).catch(t=>{this.isDev&&console.warn(`[ranui-icon] lazy load builtin failed: ${e}`,t)})};isSvgText=e=>Q(e);parseSvg=e=>{let t=new window.DOMParser().parseFromString(e,`image/svg+xml`).documentElement;if(!t||t.tagName.toLowerCase()===`parsererror`||t.tagName.toLowerCase()!==`svg`)return;let n=new XMLSerializer().serializeToString(t),r=R(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(!(!i||i.tagName.toLowerCase()!==`svg`))return i};renderSvg=(e,t)=>{let n=this.parseSvg(e);n?(this._icon=n,this._icon.setAttribute(`part`,`icon-svg`),this._icon.setAttribute(`data-name`,t),this._div.appendChild(this._icon),this.setSize(),this.setColor(),this.setSpin(),this.syncA11y()):this.isDev&&console.warn(`[ranui-icon] parse svg failed: ${t}`)};setSize=()=>{if(this._icon){let e=this.size||`1em`;this._icon.setAttribute(`width`,e),this._icon.setAttribute(`height`,e);let t=/^\d+(\.\d+)?$/.test(e)?`${e}px`:e;this._icon.style.setProperty(`width`,t),this._icon.style.setProperty(`height`,t)}};setColor=()=>{if(this._icon){let e=this.color||`currentColor`;this._icon.style.setProperty(`color`,e),this._icon.style.setProperty(`fill`,e),this._icon.style.setProperty(`stroke`,e)}};setSpin=()=>{this.spin?this._div.classList.add(`ran-icon-spin`):this._div.classList.remove(`ran-icon-spin`)};connectedCallback(){this._events.on(window,`ranui-icon-registered`,this._onIconRegistered),this.handlerExternalCss(),this.setIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(e===`name`&&this.setIcon(),e===`size`&&this.setSize(),e===`color`&&this.setColor(),e===`spin`&&this.setSpin(),(e===`decorative`||e===`aria-label`)&&this.syncA11y(),e===`sheet`&&this.handlerExternalCss())}});var li=`:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,block);box-sizing:var(--ran-input-host-box-sizing,border-box)}.ran-input-label{display:var(--ran-input-label-display,block);margin-bottom:var(--ran-input-label-margin-bottom,var(--ran-space-1,4px));font-size:var(--ran-input-label-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-input-label-font-weight,var(--ran-text-label-weight,500));color:var(--ran-input-label-color,var(--ran-color-text,#171717))}:host([status=error]) .ran-input-label{color:var(--ran-input-label-error-color,var(--ran-color-danger-foreground,#d8001b))}:host([status=warning]) .ran-input-label{color:var(--ran-input-label-warning-color,var(--ran-color-warning-foreground,#aa4d00))}:host([disabled]) .ran-input-label{color:var(--ran-input-label-disabled-color,var(--ran-color-text-disabled,#999));cursor:var(--ran-input-label-disabled-cursor,not-allowed)}.ran-input{box-sizing:var(--ran-input-box-sizing,border-box);position:var(--ran-input-position,relative);display:var(--ran-input-display,flex);align-items:var(--ran-input-align-items,center);width:var(--ran-input-width,100%);height:var(--ran-input-height,100%);min-width:var(--ran-input-min-width,0);padding:var(--ran-input-padding,0px 0px 0px 4px);color:var(--ran-input-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-font-size,var(--ran-text-label-3,12px));font-family:var(--ran-input-font-family,var(--ran-skin-font-family,inherit));line-height:var(--ran-input-line-height,1.5715);background-color:var(--ran-input-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-background-image,none);border:var(--ran-input-border,1px solid var(--ran-color-border,#eaeaea));border-image-source:var(--ran-input-border-image-source,none);border-image-slice:var(--ran-input-border-image-slice,8);border-image-width:var(--ran-input-border-image-width,var(--ran-skin-border-image-width,4px));border-radius:var(--ran-input-border-radius,var(--ran-radius-sm,6px));transition:var(--ran-input-transition,none);min-height:var(--ran-input-min-height,var(--ran-size-7,32px));border-image-outset:0;border-image-repeat:stretch}.ran-input .ran-icon{display:var(--ran-input-icon-display,flex);align-items:var(--ran-input-icon-align-items,center);justify-content:var(--ran-input-icon-justify-content,center)}.ran-input:has(.ran-input-content:focus-visible){border-color:var(--ran-input-active-border-color,var(--ran-color-link,#006bff));box-shadow:var(--ran-input-active-box-shadow,var(--ran-focus-ring));border-right-width:var(--ran-input-active-border-right-width,1px);outline:var(--ran-input-active-outline,0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color,var(--ran-color-border-hover,#c9c9c9));border-right-width:var(--ran-input-hover-border-right-width,1px)}.ran-input[status=error] .ran-input-content,.ran-input[status=warning] .ran-input-content{padding-right:var(--ran-input-content-status-padding-right,var(--ran-space-8,32px))}.ran-input[status=error]:after,.ran-input[status=warning]:after{content:"";top:50%;right:var(--ran-input-status-icon-right,var(--ran-space-3,12px));width:var(--ran-input-status-icon-width,var(--ran-size-1,16px));height:var(--ran-input-status-icon-height,var(--ran-size-1,16px));pointer-events:none;position:absolute;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ran-input[status=error]{border-color:var(--ran-input-error-border-color,var(--ran-color-danger,#ff4d4f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#ff4d4f);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a7 7 0 100 14A7 7 0 008 1zm-.75 3.5h1.5v5h-1.5v-5zM8 11a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[status=warning]{border-color:var(--ran-input-warning-border-color,var(--ran-color-warning,#faad14))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#faad14);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5l6.85 11.86a.5.5 0 01-.43.75H1.58a.5.5 0 01-.43-.75L8 1.5zm-.75 4.25v3.5h1.5v-3.5h-1.5zM8 10.75a1 1 0 110 2 1 1 0 010-2z'/%3E%3C/svg%3E")}.ran-input[disabled]{color:var(--ran-input-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-disabled-box-shadow,none);cursor:var(--ran-input-disabled-cursor,not-allowed);opacity:var(--ran-input-disabled-opacity,1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color,var(--ran-color-text-disabled,#00000040));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-muted,#f5f5f5));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#eaeaea));box-shadow:var(--ran-input-content-disabled-box-shadow,none);cursor:var(--ran-input-content-disabled-cursor,not-allowed);opacity:var(--ran-input-content-disabled-opacity,1)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode,horizontal-tb);text-rendering:var(--ran-input-content-text-rendering,auto);letter-spacing:var(--ran-input-content-letter-spacing,normal);word-spacing:var(--ran-input-content-word-spacing,normal);text-transform:var(--ran-input-content-text-transform,none);text-indent:var(--ran-input-content-text-indent,0px);text-shadow:var(--ran-input-content-text-shadow,none);text-align:var(--ran-input-content-text-align,start);cursor:var(--ran-input-content-cursor,text);touch-action:var(--ran-input-content-touch-action,manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance,none);text-overflow:var(--ran-input-content-text-overflow,ellipsis);box-sizing:var(--ran-input-content-box-sizing,border-box);margin:var(--ran-input-content-margin,0);font-variant:var(--ran-input-content-font-variant,tabular-nums);list-style:var(--ran-input-content-list-style,none);font-feature-settings:var(--ran-input-content-font-feature-settings,"tnum");position:var(--ran-input-content-position,relative);border:var(--ran-input-content-border,none);width:var(--ran-input-content-width,100%);height:var(--ran-input-content-height,100%);min-height:var(--ran-input-content-min-height,var(--ran-size-6,30px));min-width:var(--ran-input-content-min-width,0);color:var(--ran-input-content-color,var(--ran-color-text,#000000d9));font-size:var(--ran-input-content-font-size,var(--ran-text-copy-2,14px));line-height:var(--ran-input-content-line-height,1.48);background-color:var(--ran-input-content-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-input-content-background-image,none);transition:var(--ran-input-content-transition,none);outline:var(--ran-input-content-outline,none);border-radius:var(--ran-input-content-border-radius,var(--ran-radius-sm,6px));padding:var(--ran-input-content-padding,0 0 0 var(--ran-space-1,4px));font-weight:var(--ran-input-content-font-weight,var(--ran-text-copy-weight,400));-webkit-tap-highlight-color:transparent}.ran-input-content:focus,.ran-input-content:focus-visible,.ran-input-content:hover{border:var(--ran-input-content-hover-border,none);outline:var(--ran-input-content-hover-outline,none);box-shadow:var(--ran-input-content-hover-box-shadow,none)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color,var(--ran-color-text-disabled,#999))}.ran-input-content::-webkit-search-cancel-button{-webkit-appearance:none;display:none}.ran-input-message{margin-top:var(--ran-input-message-margin-top,4px);font-size:var(--ran-input-message-font-size,var(--ran-text-label-3,12px));font-weight:var(--ran-input-message-font-weight,var(--ran-text-label-weight,500));line-height:var(--ran-input-message-line-height,1.5);color:var(--ran-input-message-color,var(--ran-color-text-secondary,#8c8c8c))}.ran-input-message:empty{display:none}:host([status=error]) .ran-input-message{color:var(--ran-input-message-error-color,var(--ran-color-danger-foreground,#d8001b))}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning-foreground,#aa4d00))}`,ui=0,$=class extends U{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`]}_events=new s;_shadowDom;_input;_label;_inputContent;_icon;_message;_defaultValue=``;_defaultValueCaptured=!1;constructor(){super();try{this._internals=this.attachInternals()}catch{this._internals=void 0}this._shadowDom=q(this,li);let e=xe(),t=z().class(`ran-input`).part(`input`).children(ze().class(`ran-input-content`).ref(e).part(`content`)).build();this._shadowDom.appendChild(t),this._input=t,this._inputContent=rt(e,`content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++ui}`)}focus(e){this._inputContent?.focus(e)}blur(){this._inputContent?.blur()}select(){this._inputContent?.select?.()}get value(){return this.getAttribute(`value`)||``}set value(e){this._inputContent.value=e,Y(this,`value`,e,{removeEmpty:!0}),this._syncValue()}get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`)}get required(){return this.hasAttribute(`required`)}set required(e){it(this,`required`,!(!e||e===`false`))}get disabled(){return V(this)}set disabled(e){B.includes(e)?(this.removeAttribute(`disabled`),this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this.setAttribute(`disabled`,``),this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}get status(){return this.getAttribute(`status`)||``}set status(e){e?(this.setAttribute(`status`,e),this._input.setAttribute(`status`,e)):(this.removeAttribute(`status`),this._input.removeAttribute(`status`))}get message(){return this.getAttribute(`message`)||``}set message(e){e?this.setAttribute(`message`,e):this.removeAttribute(`message`)}get name(){return this.getAttribute(`name`)||``}set name(e){this.setAttribute(`name`,e)}get min(){return this.getAttribute(`min`)||``}set min(e){this.type===`number`&&this.setAttribute(`min`,e)}get max(){return this.getAttribute(`max`)||``}set max(e){this.type===`number`&&this.setAttribute(`max`,e)}get step(){return this.getAttribute(`step`)||``}set step(e){this.type===`number`&&this.setAttribute(`step`,e)}get icon(){return this.getAttribute(`icon`)||``}set icon(e){e?this.setAttribute(`icon`,e):this.removeAttribute(`icon`)}get type(){return this.getAttribute(`type`)||``}set type(e){e?this.setAttribute(`type`,e):this.removeAttribute(`type`)}get sheet(){return J(this,`sheet`)}set sheet(e){Y(this,`sheet`,e)}handlerExternalCss=()=>{X(this,this._shadowDom,`sheet`,null,this.sheet)};_updateValidity=()=>{let e=this._inputContent;this.required?e.setAttribute(`aria-required`,`true`):e.removeAttribute(`aria-required`);let t=e.validity;if(!this.disabled&&(t?!t.valid:this.required&&!this.value)){e.setAttribute(`aria-invalid`,`true`);let n={};for(let e of[`badInput`,`customError`,`patternMismatch`,`rangeOverflow`,`rangeUnderflow`,`stepMismatch`,`tooLong`,`tooShort`,`typeMismatch`,`valueMissing`])t?.[e]&&(n[e]=!0);t||(n.valueMissing=!0),this._internals?.setValidity?.(n,e.validationMessage||`Please fill out this field.`,e)}else e.removeAttribute(`aria-invalid`),this._internals?.setValidity?.({})};_syncValue=()=>{let e=this.value;this._inputContent.value!==e&&(this._inputContent.value=e),e?this._input.setAttribute(`value`,e):this._input.removeAttribute(`value`),this._internals?.setFormValue?.(this._inputContent.value),this._updateValidity()};checkValidity(){return at(this._internals)}reportValidity(){return ot(this._internals)}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??``}formResetCallback(){this.value=this._defaultValue}customInput=e=>{e.stopPropagation(),e.preventDefault();let{target:t,data:n=``}=e;Y(this,`value`,t?.value??n??``,{removeEmpty:!0}),this._syncValue(),this.dispatchEvent(new CustomEvent(`input`,{detail:{value:this.value}}))};customKeydown=e=>{e.key!==`Enter`||e.isComposing||this._internals?.form?.requestSubmit()};customChange=()=>{Y(this,`value`,this._inputContent?.value??this.value,{removeEmpty:!0}),this._syncValue(),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value}}))};listenPlaceholder=(e,t)=>{e===`placeholder`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`placeholder`):this._inputContent.setAttribute(`placeholder`,t))};listenLabel=(e,t)=>{e===`label`&&this._inputContent&&(t==null?(this._input.removeAttribute(`label`),this._label&&=(this._label.remove(),void 0)):this._label?this._label.textContent=t:(this._label=Ve().class(`ran-input-label`).part(`label`).text(t).build(),this._label.htmlFor=this._inputContent.id,this._shadowDom.insertBefore(this._label,this._input)))};listenType=(e,t)=>{if(e===`type`&&this._inputContent){t?this._inputContent.setAttribute(`type`,t):this._inputContent.removeAttribute(`type`);for(let e of[`min`,`max`,`step`])this.listenNumericConstraint(e,this.getAttribute(e));this._syncValue()}};listenStatus=(e,t)=>{e===`status`&&this._input&&(t?this._input.setAttribute(`status`,t):this._input.removeAttribute(`status`))};listenMessage=(e,t)=>{e===`message`&&(t?(this._message||(this._message=z().class(`ran-input-message`).part(`message`).build(),this._message.id=`${this._inputContent.id}-message`,this._shadowDom.appendChild(this._message),this._inputContent.setAttribute(`aria-describedby`,this._message.id)),this._message.textContent=t):this._message&&=(this._inputContent.removeAttribute(`aria-describedby`),this._message.remove(),void 0))};listenNumericConstraint=(e,t)=>{(e===`min`||e===`max`||e===`step`)&&this._inputContent&&(this.type===`number`&&t!=null?this._inputContent.setAttribute(e,t):this._inputContent.removeAttribute(e),this._updateValidity())};listenRequired=(e,t)=>{e===`required`&&this._inputContent&&(t==null?this._inputContent.removeAttribute(`required`):this._inputContent.setAttribute(`required`,``),this._updateValidity())};listenDisabled=(e,t)=>{e===`disabled`&&this._input&&(B.includes(t)?(this._input.removeAttribute(`disabled`),this._inputContent.removeAttribute(`disabled`)):(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this._updateValidity())};listenIcon=(e,t,n)=>{e===`icon`&&t&&t!==n&&(this.removeAttribute(`label`),this.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=R(`r-icon`).class(`ran-icon`).build(),this._inputContent.insertAdjacentElement(`beforebegin`,this._icon)),this.icon&&this._icon.setAttribute(`name`,this.icon)};listenEvent=(e,t,n)=>{this.listenType(e,n),this.listenPlaceholder(e,n),this.listenLabel(e,n),this.listenStatus(e,n),this.listenMessage(e,n),this.listenNumericConstraint(e,n),this.listenRequired(e,n),this.listenDisabled(e,n),this.listenIcon(e,n,t),e===`value`&&t!==n&&this._syncValue()};connectedCallback(){this.handlerExternalCss(),this._defaultValueCaptured||=(this._defaultValue=this.value,!0),this.value&&(this._inputContent.value=this.value,this._input.setAttribute(`value`,this.value)),this._internals?.setFormValue?.(this.value),this.status&&this._input.setAttribute(`status`,this.status),this.message&&this.listenMessage(`message`,this.message),V(this)&&(this._input.setAttribute(`disabled`,``),this._inputContent.setAttribute(`disabled`,``)),this.type&&this._inputContent.setAttribute(`type`,this.type),this.type===`number`&&(this.min&&this._inputContent.setAttribute(`min`,this.min),this.max&&this._inputContent.setAttribute(`max`,this.max),this.step&&this._inputContent.setAttribute(`step`,this.step)),this.required&&this._inputContent.setAttribute(`required`,``),this._syncValue(),this._events.on(this._inputContent,`input`,this.customInput),this._events.on(this._inputContent,`change`,this.customChange),this._events.on(this._inputContent,`keydown`,this.customKeydown),document.readyState===`complete`&&this.dealIcon()}disconnectedCallback(){this._events.abort()}attributeChangedCallback(e,t,n){t!==n&&(this.listenEvent(e,t,n),e===`sheet`&&this.handlerExternalCss())}};return H(`r-input`,$),e.Input=$,e.default=$,e})({}); \ No newline at end of file diff --git a/public/ranui-iife/popover.iife.js b/public/ranui-iife/popover.iife.js index 7bc1d6f63..929c9dab2 100644 --- a/public/ranui-iife/popover.iife.js +++ b/public/ranui-iife/popover.iife.js @@ -1 +1 @@ -var ranui_popover=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}};Math.PI/180,180/Math.PI,2*Math.PI;var n=(e=8)=>Math.random().toString(36).substring(2,e+2);Object.freeze({});var r=e=>typeof e==`function`,i=12e4,a=`__ranuts_bridge__`,o=`default`,s=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},c=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,r=o){this.targetOrigin=t,this.channel=r,this.senderId=n(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,s.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:a,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:i,id:a,isResponse:o,isError:s,senderId:c}=t;if(o&&a){let e=this.pendingRequests.get(a);e&&(s?e.reject(Error(typeof i==`string`?i:`Bridge request failed`)):e.resolve(i),this.pendingRequests.delete(a));return}if(c&&c===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let l=this.messageHandlers.get(n);if(r(l)){let t=e.source??this.targetWindow;Promise.resolve(l(i)).then(e=>{a&&this.post(t,{type:n,payload:e,id:a,isResponse:!0})}).catch(e=>{a&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:a,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let r=n(10);return new Promise((n,a)=>{let o=setTimeout(()=>{this.pendingRequests.has(r)&&(this.pendingRequests.delete(r),a(Error(`Request timeout`)))},i),s=e=>{clearTimeout(o),a(e)};this.pendingRequests.set(r,{resolve:e=>{clearTimeout(o),n(e)},reject:s});try{this.post(this.targetWindow,{type:e,payload:t,id:r})}catch(e){this.pendingRequests.delete(r),s(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{s.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:r,channel:i})=>{let a=new c(r,t,i);if(e||=n(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,a),{bridge:a,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new t;var l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new u(l[0],3609767458),new u(l[1],602891725),new u(l[2],3964484399),new u(l[3],2173295548),new u(l[4],4081628472),new u(l[5],3053834265),new u(l[6],2937671579),new u(l[7],3664609560),new u(l[8],2734883394),new u(l[9],1164996542),new u(l[10],1323610764),new u(l[11],3590304994),new u(l[12],4068182383),new u(l[13],991336113),new u(l[14],633803317),new u(l[15],3479774868),new u(l[16],2666613458),new u(l[17],944711139),new u(l[18],2341262773),new u(l[19],2007800933),new u(l[20],1495990901),new u(l[21],1856431235),new u(l[22],3175218132),new u(l[23],2198950837),new u(l[24],3999719339),new u(l[25],766784016),new u(l[26],2566594879),new u(l[27],3203337956),new u(l[28],1034457026),new u(l[29],2466948901),new u(l[30],3758326383),new u(l[31],168717936),new u(l[32],1188179964),new u(l[33],1546045734),new u(l[34],1522805485),new u(l[35],2643833823),new u(l[36],2343527390),new u(l[37],1014477480),new u(l[38],1206759142),new u(l[39],344077627),new u(l[40],1290863460),new u(l[41],3158454273),new u(l[42],3505952657),new u(l[43],106217008),new u(l[44],3606008344),new u(l[45],1432725776),new u(l[46],1467031594),new u(l[47],851169720),new u(l[48],3100823752),new u(l[49],1363258195),new u(l[50],3750685593),new u(l[51],3785050280),new u(l[52],3318307427),new u(l[53],3812723403),new u(l[54],2003034995),new u(l[55],3602036899),new u(l[56],1575990012),new u(l[57],1125592928),new u(l[58],2716904306),new u(l[59],442776044),new u(l[60],593698344),new u(l[61],3733110249),new u(l[62],2999351573),new u(l[63],3815920427),new u(3391569614,3928383900),new u(3515267271,566280711),new u(3940187606,3454069534),new u(4118630271,4000239992),new u(116418474,1914138554),new u(174292421,2731055270),new u(289380356,3203993006),new u(460393269,320620315),new u(685471733,587496836),new u(852142971,1086792851),new u(1017036298,365543100),new u(1126000580,2618297676),new u(1288033470,3409855158),new u(1501505948,4234509866),new u(1607167915,987167468),new u(1816402316,1246189591),new u(0,1),new u(0,32898),new u(2147483648,32906),new u(2147483648,2147516416),new u(0,32907),new u(0,2147483649),new u(2147483648,2147516545),new u(2147483648,32777),new u(0,138),new u(0,136),new u(0,2147516425),new u(0,2147483658),new u(0,2147516555),new u(2147483648,139),new u(2147483648,32905),new u(2147483648,32771),new u(2147483648,32770),new u(2147483648,128),new u(0,32778),new u(2147483648,2147483658),new u(2147483648,2147516545),new u(2147483648,32896),new u(0,2147483649),new u(2147483648,2147516424);var d=(e,t=500)=>{let n,r=null,i=null,a=()=>{if(r=null,!i)return;let t=i,a=n;i=null,n=void 0,e.apply(a,t)},o=function(...e){n=this,i=e,r!==null&&clearTimeout(r),r=setTimeout(a,t)};return o.cancel=()=>{r!==null&&clearTimeout(r),r=null,i=null,n=void 0},o.flush=()=>{r!==null&&(clearTimeout(r),a())},o.pending=()=>r!==null,o},f=()=>typeof window<`u`,p=()=>{if(!f())return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},m=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},h=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},g=/["'&<>]/;function _(e){let t=``+e,n=g.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},x=(e,t,n=v)=>{if(typeof document<`u`&&t&&!b(e,t,ee)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},S=(e,t,n=y)=>{if(typeof document<`u`&&t&&!b(e,t,te)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var C=(e,t,n,r)=>e===`end`?t+n-r:e===`center`?t+(n-r)/2:t,ne=e=>{let{anchor:t,floating:n,offset:r=0,padding:i=8}=e,a=e.boundary??{top:0,left:0,width:typeof window<`u`?window.innerWidth:1/0,height:typeof window<`u`?window.innerHeight:1/0},[o,s]=e.placement.split(`-`),c=s??`start`,l=o,u=l===`top`||l===`bottom`,d=t.width>0&&t.height>0&&n.width>0&&n.height>0;if(d&&u){let e=a.top+a.height-(t.top+t.height),i=t.top-a.top;l===`bottom`&&ee?l=`top`:l===`top`&&ii&&(l=`bottom`)}else if(d){let e=a.left+a.width-(t.left+t.width),i=t.left-a.left;l===`right`&&ee?l=`left`:l===`left`&&ii&&(l=`right`)}let f=(e,t,n)=>C(c,e,t,n),p,m;if(l===`bottom`?(p=t.top+t.height+r,m=f(t.left,t.width,n.width)):l===`top`?(p=t.top-n.height-r,m=f(t.left,t.width,n.width)):l===`right`?(p=f(t.top,t.height,n.height),m=t.left+t.width+r):(p=f(t.top,t.height,n.height),m=t.left-n.width-r),d&&u){let e=a.left+i,t=a.left+a.width-n.width-i;t>=e&&(m=Math.min(Math.max(m,e),t))}else if(d){let e=a.top+i,t=a.top+a.height-n.height-i;t>=e&&(p=Math.min(Math.max(p,e),t))}return{top:p,left:m,placement:s?`${l}-${c}`:l,side:l,align:c}},w=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(w),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(w);var T=typeof document>`u`,re=class{ac=null;get signal(){return this.ac??=new AbortController,this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},E=0,ie=1,D=2,O=null,k=null,ae=0,A=new Set,j=!1;function oe(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(le(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)F(e,D);ae===0&&ue()}}]}function M(e){let t=se(e,!0);return ce(t),fe(t),()=>I(t)}function N(e){let t={owned:[],cleanups:[],owner:k},n=k,r=O;k=t,O=null;try{return e(()=>me(t))}finally{k=n,O=r}}function P(e){k&&k.cleanups.push(e)}function se(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:D,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:k}}function ce(e){k&&k.owned.push(e)}function le(e){O&&(O.sources.add(e),e.observers.add(O))}function F(e,t){if(e.disposed||e.state>=t)return;let n=e.state===E;if(e.state=t,e.isEffect)A.add(e);else if(n)for(let t of e.observers)F(t,ie)}function ue(){if(!(ae>0||j)){j=!0;try{for(;A.size>0;){let e=[...A];A.clear();for(let t of e)t.disposed||de(t)}}finally{j=!1}}}function de(e){if(!(e.disposed||e.state===E)){if(e.state===ie)for(let t of e.sources)`fn`in t&&de(t);e.state===D&&fe(e),e.state=E}}function fe(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);pe(e);let t=O,n=k;O=e,k=e,e.running=!0,e.state=E;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)F(t,D)}}finally{e.running=!1,O=t,k=n}}function pe(e){for(let t of e.owned)I(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function I(e){e.disposed||(e.disposed=!0,pe(e),e.observers.clear())}function me(e){for(let t of e.owned)I(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function he(e){return _(e)}var ge=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,_e=`.#[`;function ve(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var ye=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},be=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ve(n);return r!==null&&r.every(t=>ye(e,t))},L=(e,t,n)=>{for(let r of e)ge(r)&&(be(r,t)&&n.push(r),L(r.childrenList,t,n))},R=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?_(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return L(this.childrenList,e,t),t}},z=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new R)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new xe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return L(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${he(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${he(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?_(e):(e instanceof R,e.serialize())).join(``):a+=_(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},xe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return L(this.childrenList,e,t),t}serialize(){return``}},B=()=>({current:null}),Se=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(Se(t)):e.concat(t),[]),V=e=>e==null?null:e instanceof Pe?e.build():typeof e==`string`?T?e:document.createTextNode(e):e,Ce=(e,t)=>{if(T){H(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};M(()=>{let e=t();a();let n=document.createDocumentFragment();i=N(t=>(H(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),P(()=>i?.())},we=`__ranFor`,Te=e=>typeof e==`object`&&!!e&&e[we]===!0,Ee=(e,t,n)=>{let[r,i]=oe(t),a=null,o=N(t=>{let i=V(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},De=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Oe=(e,t)=>{if(T){(t.each()??[]).forEach((n,r)=>{let i=V(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;P(()=>{for(let e of r.values())e.dispose();r.clear()}),M(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o))return;let s=r.get(o);s?(r.delete(o),s.index(n)):s=Ee(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();De(n,a),r=i})},ke=`__ranIndex`,Ae=e=>typeof e==`object`&&!!e&&e[ke]===!0,je=(e,t,n)=>{let[r,i]=oe(e),a=null,o=N(e=>{let i=V(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Me=(e,t)=>{if(T){(t.each()??[]).forEach((n,r)=>{let i=V(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];P(()=>{for(let e of r)e.dispose();r=[]}),M(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}De(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{Se(t).forEach(t=>{if(Te(t)){Oe(e,t);return}if(Ae(t)){Me(e,t);return}if(typeof t==`function`){Ce(e,t);return}let n=V(t);n!=null&&e.appendChild(n)})},Ne=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),Pe=class{el;constructor(e,t){let n=t??(Ne.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=T?new z(e):n?document.createElementNS(n,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?M(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{T?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return H(this.el,e),this}replaceChildren(...e){if(T){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new Fe(this.el,t,e)}build(){return this.el}serialize(){if(T)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Fe=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return H(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(T)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return T?this.root.serialize():this.root.innerHTML}},U=e=>new Pe(e),W=()=>U(`div`),G=()=>U(`slot`),Ie=new Map;function K(e,t){T?(Ie.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var q=typeof document<`u`?HTMLElement:z,Le=`data-ranui`,Re=`data-ranui-sheet`,ze=(e,t)=>x(e,t,Le),Be=(e,t)=>S(e,t,Re),Ve=new WeakMap,He=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Ue=new Map,We=e=>{let t=Ue.get(e);if(t!==void 0)return t;let n=e?`${e}\n${He}`:He;return Ue.set(e,n),n},J=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Ve.get(e)||e.attachShadow(n);return Ve.set(e,r),ze(r,We(t)),r},Y=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},X=(e,t,n=``)=>e.getAttribute(t)??n,Z=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Ge=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Be(t,a)},Ke=`:host{visibility:hidden;position:absolute}`;K(`r-content`,class extends q{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=J(this,Ke);let e=G().class(`slot`).build();this._shadowDom.appendChild(e),this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var qe=`@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:ranui-dropdown-down-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-down-out{animation:ranui-dropdown-down-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-up-in{animation:ranui-dropdown-up-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-up-out{animation:ranui-dropdown-up-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-left-in{animation:ranui-dropdown-left-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-left-out{animation:ranui-dropdown-left-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-right-in{animation:ranui-dropdown-right-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-right-out{animation:ranui-dropdown-right-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}:host([hidden]){display:none}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-dropdown-font-weight,var(--ran-text-label-weight,500));list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border:var(--ran-dropdown-border,1px solid var(--ran-color-border,#eaeaea));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-anchor-offset,0px))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0;left:50%}.ranui-dropdown-container .bottom{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-anchor-offset,0px))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);left:50%;top:max(0px, calc(100% - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px) + var(--ran-dropdown-arrow-overlap,2px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-shape-offset,calc(var(--ran-dropdown-arrow-width,16px) * -.301126)) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(calc(0px - var(--ran-dropdown-arrow-overlap,2px))) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-shape-offset,calc(var(--ran-dropdown-arrow-width,16px) * -.301126)) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow svg{width:100%;height:100%;display:block;overflow:visible}.ranui-dropdown-arrow path{fill:var(--ran-dropdown-arrow-fill-background,var(--ran-dropdown-arrow-tip-background,var(--ran-color-bg-elevated,#fff)));filter:var(--ran-dropdown-arrow-shadow,drop-shadow(2px 2px 3px #0000000d))}@media (prefers-reduced-motion:reduce){.ran-dropdown-down-in,.ran-dropdown-down-out,.ran-dropdown-up-in,.ran-dropdown-up-out,.ran-dropdown-left-in,.ran-dropdown-left-out,.ran-dropdown-right-in,.ran-dropdown-right-out{animation:none}}`;K(`r-dropdown`,class extends q{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=J(this,qe);let e=B(),t=B(),n=W().class(`ranui-dropdown-container`).children(W().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).ref(e).part(`dropdown`).children(G().class(`slot`).ref(t))).build();this._shadowDom.appendChild(n),this.container=n,this.dropdown=Y(e,`ranui dropdown`),this._slot=Y(t,`slot`)}get transit(){return X(this,`transit`)}set transit(e){Z(this,`transit`,e,{removeEmpty:!0})}get arrow(){return X(this,`arrow`)}set arrow(e){Z(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return X(this,`sheet`)}set sheet(e){Z(this,`sheet`,e)}handlerExternalCss=()=>{Ge(this,this._shadowDom,`sheet`,null,this.sheet)};appliedTransit=``;handlerTransit=()=>{this.dropdown&&(this.appliedTransit&&h(this.dropdown,this.appliedTransit),this.appliedTransit=this.transit,this.appliedTransit&&m(this.dropdown,this.appliedTransit))};getAnimationTarget=()=>this.dropdown;handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=W().class(`ranui-dropdown-arrow`).build(),this.arrowIcon.innerHTML=``,this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&this.handlerTransit(),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}});var Je=`:host{display:var(--ran-popover-host-display,block)}.ran-popover{box-sizing:var(--ran-popover-box-sizing,border-box);position:var(--ran-popover-position,relative);display:var(--ran-popover-display,block);margin:var(--ran-popover-margin,0);padding:var(--ran-popover-padding,0)}.ran-popover-block{display:var(--ran-popover-block-display,block)}`,Ye={bottom:{enter:`ran-dropdown-down-in`,exit:`ran-dropdown-down-out`},top:{enter:`ran-dropdown-up-in`,exit:`ran-dropdown-up-out`},left:{enter:`ran-dropdown-left-in`,exit:`ran-dropdown-left-out`},right:{enter:`ran-dropdown-right-in`,exit:`ran-dropdown-right-out`}},Xe=e=>e.getAnimationTarget?.()??e,Ze=(e,t)=>{let n=Xe(e);if(typeof n.getAnimations!=`function`||typeof requestAnimationFrame!=`function`){t();return}requestAnimationFrame(()=>{let e=n.getAnimations();if(!e.length){t();return}(async()=>{await Promise.allSettled(e.map(e=>e.finished)),t()})()})},Qe=class{options;repositionBound=!1;opened=!1;repositionFrame=0;generation=0;constructor(e){this.options=e}get anchor(){return this.options.anchor?.()??this.options.host}apply=e=>{let{host:t}=this.options;t.setAttribute(`aria-expanded`,e?`true`:`false`);let n=this.options.panel();if(!n||e===this.opened)return;this.opened=e;let r=++this.generation;if(e){t.dispatchEvent(new CustomEvent(`show`)),n.style.setProperty(`display`,`block`),this.attachReposition(),this.position(!0),Ze(n,()=>{r===this.generation&&(n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-show`)))});return}this.detachReposition(),t.dispatchEvent(new CustomEvent(`hide`)),n.setAttribute(`transit`,Ye[this.side()].exit),Ze(n,()=>{r===this.generation&&(n.style.setProperty(`display`,`none`),n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-hide`)))})};side=()=>this.options.placement().split(`-`)[0];position=(e=!1)=>{if(!this.options.panel())return;let t=()=>{let t=this.options.panel();t&&this.write(t,e)};e&&typeof requestAnimationFrame==`function`?requestAnimationFrame(t):t()};write(e,t){let{offset:n=0,containerId:r,beforeMeasure:i,measurePanel:a,adjust:o,afterPosition:s}=this.options,c=this.anchor.getBoundingClientRect();i?.(c,e);let l=this.options.host.getRootNode(),u=r?.()??``,d=u?l.getElementById?.(u)??document.getElementById(u):null,f=e.getBoundingClientRect(),p=a?.(e),m=f,h=p?.width??f.width,g=p?.height??f.height,_=this.options.placement(),[ee,te]=_.split(`-`),v=te??`start`,y,b,x=ee;if(d){let e=d.getBoundingClientRect();x===`top`||x===`bottom`?(y=x===`bottom`?c.bottom-e.top+n:c.top-e.top-g-n,b=C(v,c.left,c.width,h)-e.left):(y=C(v,c.top,c.height,g)-e.top,b=x===`right`?c.right-e.left+n:c.left-e.left-h-n)}else{let e=ne({anchor:{top:c.top,left:c.left,width:c.width,height:c.height},floating:{width:h,height:g},placement:_,offset:n});x=e.side,y=e.top+window.scrollY,b=e.left+window.scrollX}let S={top:y,left:b,side:x,align:v,anchorRect:c,panelRect:m,container:d},w=o?.(S,e);w&&(S.top=w.top,S.left=w.left),e.style.setProperty(`position`,`absolute`),e.style.setProperty(`inset`,`${S.top}px auto auto ${S.left}px`),e.style.setProperty(`--ran-x`,`${S.left}px`),e.style.setProperty(`--ran-y`,`${S.top}px`),t&&e.setAttribute(`transit`,Ye[S.side].enter),s?.(S,e)}reposition=()=>{if(!(!this.opened||this.repositionFrame)){if(typeof requestAnimationFrame!=`function`){this.position();return}this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=0,this.opened&&this.position()})}};attachReposition(){this.repositionBound||typeof window>`u`||(window.addEventListener(`scroll`,this.reposition,!0),window.addEventListener(`resize`,this.reposition),this.repositionBound=!0)}detachReposition(){!this.repositionBound||typeof window>`u`||(window.removeEventListener(`scroll`,this.reposition,!0),window.removeEventListener(`resize`,this.reposition),this.repositionBound=!1)}destroy=()=>{this.generation++,this.opened=!1,this.repositionFrame&&typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=0),this.detachReposition()}};function $e(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var et=8,tt=300,Q=16,nt=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),rt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},$=class extends q{_events=new re;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;removeTimeId;_repositionBound=!1;_floating=new Qe({host:this,panel:()=>this.popoverContent,anchor:()=>Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this,placement:()=>this.placement,offset:et,containerId:()=>this.getPopupContainerId,afterPosition:(e,t)=>{let{anchorRect:n,panelRect:r,side:i}=e,a=rt[i];a&&t.setAttribute(`arrow`,a),t.style.setProperty(`--ran-dropdown-arrow-anchor-width`,`${n.width}px`),t.style.setProperty(`--ran-dropdown-arrow-anchor-height`,`${n.height}px`),t.style.setProperty(`--ran-dropdown-min-width`,`${r.width}px`),t.style.setProperty(`--ran-dropdown-min-height`,`${r.height}px`);let o=t.getBoundingClientRect(),s=n.left+n.width/2,c=o.left+o.width/2;t.style.setProperty(`--ran-dropdown-arrow-anchor-offset`,`${s-c}px`),t.style.setProperty(`--ran-dropdown-arrow-anchor-offset-y`,`${n.top-o.top}px`)}});static get observedAttributes(){return[`open`,`placement`,`trigger`,`sheet`]}closePopover=()=>{this.setDropdownDisplayNone()};constructor(){super(),this._shadowDom=J(this,Je);let e=B(),t=W().class(`ran-popover-block`).role(`tooltip`).children(G().class(`slot`).ref(e)).build();this._shadowDom.appendChild(t),this.popoverBlock=t,this._slot=Y(e,`slot`)}get placement(){return X(this,`placement`,`top`)}set placement(e){Z(this,`placement`,e)}get placementSide(){return this.placement.split(`-`)[0]}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}_applyOpen=()=>{this._floating.apply(this.open)};show=()=>{this.open=!0};hide=()=>{this.open=!1};toggle=()=>{this.open=!this.open};get trigger(){return X(this,`trigger`,`hover`)}set trigger(e){Z(this,`trigger`,e)}get getPopupContainerId(){return X(this,`getPopupContainerId`)}set getPopupContainerId(e){Z(this,`getPopupContainerId`,e)}get sheet(){return X(this,`sheet`)}set sheet(e){Z(this,`sheet`,e)}handlerExternalCss=()=>{Ge(this,this._shadowDom,`sheet`,null,this.sheet)};initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`aria-haspopup`,`dialog`),this.setAttribute(`aria-expanded`,`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};stopPropagation=e=>{e.stopPropagation()};createContent=e=>{if(e){if(!this.popoverContent){let e=getComputedStyle(this).getPropertyValue(`--ran-popover-content-padding`).trim()||`12px`;this.popoverContent=U(`r-dropdown`).class(`ran-popover-dropdown`).style(`display`,`none`).style(`position`,`absolute`).cssVar(`ran-dropdown-padding`,e).build(),this.popoverContent?.addEventListener(`click`,this.stopPropagation);let t=W().children(this.popoverContent).build();this.popoverInner=t,this.trigger.includes(`hover`)&&!p()&&(this.popoverContent?.addEventListener(`mouseleave`,this.blur),this.popoverContent?.addEventListener(`mouseenter`,this.removeDropDownTimeId));let n=this.getRootNode();((n.getElementById?n.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body).appendChild(t)}if(this.popoverContent&&e.length>0){this.popoverContent.innerHTML=``;let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);this.popoverContent.appendChild(t)}}};watchContent=e=>{let{value:t}=e.detail;this.createContent(t.content)};blur=d(()=>{this.removeTimeId&&this.removeDropDownTimeId(),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(),this.setDropdownDisplayNone()},tt)},Q);removeDropDownTimeId=d(()=>{this.trigger.includes(`hover`)&&!p()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)},Q);setDropdownDisplayBlock=d(()=>{this.open=!0},Q);setDropdownDisplayNone=d(()=>{this.open=!1},Q);placementPosition=()=>{this._floating.position()};hoverPopover=e=>{e.stopPropagation(),e.preventDefault(),this.setDropdownDisplayBlock()};clickContent=e=>{e.stopPropagation()};clickPopover=e=>{e.stopPropagation(),e.preventDefault(),this.toggle()};keydownPopover=e=>{$e(e)&&(e.preventDefault(),this.setDropdownDisplayBlock()),e.key===`Escape`&&(e.preventDefault(),this.setDropdownDisplayNone())};clickRemovePopover=e=>{this.hoverRemovePopover(e)};popoverTrigger=()=>{this._events.abort();for(let e of this.children)e.tagName===`R-CONTENT`&&this._events.on(e,`change`,this.watchContent);this.trigger.includes(`hover`)&&(this._events.on(this,`mouseenter`,this.hoverPopover),this._events.on(this,`mouseleave`,this.blur)),this._events.on(this,`click`,this.clickPopover).on(this,`keydown`,this.keydownPopover).on(document,`click`,this.clickRemovePopover)};hoverRemovePopover=e=>{e.stopPropagation(),this.setDropdownDisplayNone()};changePlacement=d(()=>{if(!this.getPopupContainerId&&this.open)return;let e=rt[this.placementSide];e&&this.popoverContent?.setAttribute(`arrow`,e)},Q);connectedCallback(){this.initAria(),this.handlerExternalCss();for(let e of this.children)e.tagName===`R-CONTENT`&&this.createContent(e.children);this.popoverTrigger(),this.changePlacement()}disconnectedCallback(){this._events.abort(),this.setDropdownDisplayBlock.cancel(),this.setDropdownDisplayNone.cancel(),this.blur.cancel(),this.removeDropDownTimeId.cancel(),this._floating.destroy(),clearTimeout(this.removeTimeId),this.removeTimeId=void 0,this.popoverInner?.remove(),this.popoverInner=void 0,this.popoverContent=void 0}attributeChangedCallback(e,t,n){t!==n&&(e===`trigger`&&this.popoverTrigger(),e===`placement`&&this.changePlacement(),e===`sheet`&&this.handlerExternalCss(),e===`open`&&this._applyOpen())}};return K(`r-popover`,$),e.PLACEMENT_TYPE=nt,e.Popover=$,e.default=$,e})({}); \ No newline at end of file +var ranui_popover=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=(e,t=500)=>{let n=null,r,i=null,a=()=>{if(n=null,!i)return;let t=i,a=r;i=null,r=void 0,e.apply(a,t)},o=function(...e){r=this,i=e,n!==null&&clearTimeout(n),n=setTimeout(a,t)};return o.cancel=()=>{n!==null&&clearTimeout(n),n=null,i=null,r=void 0},o.flush=()=>{n!==null&&(clearTimeout(n),a())},o.pending=()=>n!==null,o},n=()=>typeof window<`u`,r=()=>{if(!n())return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},i=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},a=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},o=/["'&<>]/;function s(e){let t=``+e,n=o.exec(t);if(!n)return t;let r,i=``,a=0,s=0;for(a=n.index;a{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},l=new Map,u=new Map,d=`data-adopted-style`,f=`data-adopted-sheet`,p=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},m=(e,t,n=d)=>{if(!(typeof document>`u`)&&t&&!p(e,t,l)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},h=(e,t,n=f)=>{if(!(typeof document>`u`)&&t&&!p(e,t,u)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},g=(e,t,n,r)=>e===`end`?t+n-r:e===`center`?t+(n-r)/2:t,_=()=>({top:0,left:0,width:typeof window<`u`?window.innerWidth:1/0,height:typeof window<`u`?window.innerHeight:1/0}),ee=e=>{let{anchor:t,floating:n,offset:r=0,padding:i=8}=e,a=e.boundary??_(),[o,s]=e.placement.split(`-`),c=s??`start`,l=o,u=l===`top`||l===`bottom`,d=t.width>0&&t.height>0&&n.width>0&&n.height>0;if(d&&u){let e=a.top+a.height-(t.top+t.height),i=t.top-a.top;l===`bottom`&&ee?l=`top`:l===`top`&&ii&&(l=`bottom`)}else if(d){let e=a.left+a.width-(t.left+t.width),i=t.left-a.left;l===`right`&&ee?l=`left`:l===`left`&&ii&&(l=`right`)}let f=(e,t,n)=>g(c,e,t,n),p,m;if(l===`bottom`?(p=t.top+t.height+r,m=f(t.left,t.width,n.width)):l===`top`?(p=t.top-n.height-r,m=f(t.left,t.width,n.width)):l===`right`?(p=f(t.top,t.height,n.height),m=t.left+t.width+r):(p=f(t.top,t.height,n.height),m=t.left-n.width-r),d&&u){let e=a.left+i,t=a.left+a.width-n.width-i;t>=e&&(m=Math.min(Math.max(m,e),t))}else if(d){let e=a.top+i,t=a.top+a.height-n.height-i;t>=e&&(p=Math.min(Math.max(p,e),t))}return{top:p,left:m,placement:s?`${l}-${c}`:l,side:l,align:c}},v=typeof document>`u`,y=0,b=1,x=2,S=null,C=null,w=0,T=new Set,E=!1;function te(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ie(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)j(e,x);w===0&&ae()}}]}function D(e){let t=ne(e,!0);return re(t),se(t),()=>M(t)}function O(e){let t=S;S=null;try{return e()}finally{S=t}}function k(e){let t={owned:[],cleanups:[],owner:C},n=C,r=S;C=t,S=null;try{return e(()=>le(t))}finally{C=n,S=r}}function A(e){C&&C.cleanups.push(e)}function ne(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:x,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:C}}function re(e){C&&C.owned.push(e)}function ie(e){S&&(S.sources.add(e),e.observers.add(S))}function j(e,t){if(e.disposed||e.state>=t)return;let n=e.state===y;if(e.state=t,e.isEffect)T.add(e);else if(n)for(let t of e.observers)j(t,b)}function ae(){if(!(w>0||E)){E=!0;try{for(;T.size>0;){let e=[...T];T.clear();for(let t of e)t.disposed||oe(t)}}finally{E=!1}}}function oe(e){if(!(e.disposed||e.state===y)){if(e.state===b)for(let t of e.sources)`fn`in t&&oe(t);e.state===x&&se(e),e.state=y}}function se(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);ce(e);let t=S,n=C;S=e,C=e,e.running=!0,e.state=y;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)j(t,x)}}finally{e.running=!1,S=t,C=n}}function ce(e){for(let t of e.owned)M(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function M(e){e.disposed||(e.disposed=!0,ce(e),e.observers.clear())}function le(e){for(let t of e.owned)M(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function ue(e){return s(e)}var de=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,fe=`.#[`;function pe(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var me=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},he=(e,t)=>{let n=t.trim();if(!n)return!1;let r=pe(n);return r!==null&&r.every(t=>me(e,t))},N=(e,t,n)=>{for(let r of e)de(r)&&(he(r,t)&&n.push(r),N(r.childrenList,t,n))},P=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?s(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}},ge=new Map,F=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??ge}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:s(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new P)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new _e(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${ue(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${ue(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?s(e):(e instanceof P,e.serialize())).join(``):a+=s(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},_e=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}serialize(){return``}},I={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let n of t){if(n==null)continue;if(Array.isArray(n)){I.append(e,n);continue}if(typeof n==`function`){I.append(e,[n()]);continue}if(typeof n==`object`&&(`__ranFor`in n||`__ranIndex`in n))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=n instanceof L?n.build():typeof n==`string`&&!v?document.createTextNode(n):n;e.appendChild(t)}}},ve=`http://www.w3.org/2000/svg`,ye=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),L=class{runtime;el;constructor(e,t,n=I){this.runtime=n;let r=t??(ye.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=v?new F(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{v?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(v){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new be(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(v)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},be=class{runtime;root;hostEl;constructor(e,t,n,r=I){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(v)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return v?this.root.serialize():this.root.innerHTML}},R=()=>({current:null}),z=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(z(t)):e.concat(t),[]),B=e=>e==null?null:e instanceof L?e.build():typeof e==`string`?v?e:document.createTextNode(e):e,xe=(e,t)=>{if(v){V(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};D(()=>{let e=t();a();let n=document.createDocumentFragment();i=k(t=>(V(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),A(()=>i?.())},Se=`__ranFor`,Ce=e=>typeof e==`object`&&!!e&&e[Se]===!0,we=(e,t,n)=>{let[r,i]=te(t),a=null,o=k(t=>{let i=B(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},Te=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Ee=(e,t)=>{if(v){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;A(()=>{for(let e of r.values())e.dispose();r.clear()}),D(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Me()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=r.get(o);s?(r.delete(o),s.index(n)):s=we(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();Te(n,a),r=i})},De=`__ranIndex`,Oe=e=>typeof e==`object`&&!!e&&e[De]===!0,ke=(e,t,n)=>{let[r,i]=te(e),a=null,o=k(e=>{let i=B(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ae=(e,t)=>{if(v){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];A(()=>{for(let e of r)e.dispose();r=[]}),D(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}Te(n,r.map(e=>e.node).filter(e=>e!=null))})},V=(e,t)=>{v?O(()=>je(e,t)):je(e,t)},je=(e,t)=>{z(t).forEach(t=>{if(Ce(t)){Ee(e,t);return}if(Oe(t)){Ae(e,t);return}if(typeof t==`function`){xe(e,t);return}let n=B(t);n!=null&&e.appendChild(n)})},Me=()=>!1,Ne={bind(e,t){if(typeof e!=`function`){t(e);return}v?O(()=>t(e())):D(()=>t(e()))},append:V},Pe=class extends L{constructor(e,t){super(e,t,Ne)}};function Fe(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,ve),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:Ie,Div:H,Svg:Le,Span:Re,Slot:U,ButtonBuilder:ze,InputBuilder:Be,Style:Ve,Label:He,Ul:Ue,Li:We,Section:Ge,Article:Ke,Nav:qe,Header:Je,Footer:Ye,Main:Xe,DeclarativeShadow:Ze}=Fe(Pe),Qe=new Map;function W(e,t){v?(Qe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var G=typeof document<`u`?HTMLElement:F,$e=`data-ranui`,et=`data-ranui-sheet`,tt=(e,t)=>m(e,t,$e),nt=(e,t)=>h(e,t,et),rt=new WeakMap,it=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,K=new Map,at=e=>{let t=K.get(e);if(t!==void 0)return t;let n=e?`${e}\n${it}`:it;return K.set(e,n),n},q=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||rt.get(e)||e.attachShadow(n);return rt.set(e,r),tt(r,at(t)),r},J=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},Y=(e,t,n=``)=>e.getAttribute(t)??n,X=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},ot=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&nt(t,a)},st=`:host{visibility:hidden;position:absolute}`;W(`r-content`,class extends G{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=q(this,st);let e=U().class(`slot`).build();this._shadowDom.appendChild(e),this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{for(let t of e)(t.type===`childList`||t.type===`attributes`)&&this.onChange(t)};onChange=e=>{this.dispatchEvent(new CustomEvent(`change`,{detail:{type:e.type,value:{content:this.children,mutation:e}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var ct=`@keyframes ranui-dropdown-up-in{0%{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}to{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-up-out{0%{transform-origin:100% 100%;opacity:1;transform:scaleY(1)}to{transform-origin:100% 100%;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-down-in{0%{transform-origin:0 0;opacity:0;transform:scaleY(.8)}to{transform-origin:0 0;opacity:1;transform:scaleY(1)}}@keyframes ranui-dropdown-down-out{0%{transform-origin:0 0;opacity:1;transform:scaleY(1)}to{transform-origin:0 0;opacity:0;transform:scaleY(.8)}}@keyframes ranui-dropdown-left-in{0%{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}to{transform-origin:100% 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-left-out{0%{transform-origin:100% 0;opacity:1;transform:scaleX(1)}to{transform-origin:100% 0;opacity:0;transform:scaleX(.8)}}@keyframes ranui-dropdown-right-in{0%{transform-origin:0 0;opacity:0;transform:scaleX(.8)}to{transform-origin:0 0;opacity:1;transform:scaleX(1)}}@keyframes ranui-dropdown-right-out{0%{transform-origin:0 0;opacity:1;transform:scaleX(1)}to{transform-origin:0 0;opacity:0;transform:scaleX(.8)}}.ran-dropdown-down-in{animation:ranui-dropdown-down-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-down-out{animation:ranui-dropdown-down-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-up-in{animation:ranui-dropdown-up-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-up-out{animation:ranui-dropdown-up-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-left-in{animation:ranui-dropdown-left-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-left-out{animation:ranui-dropdown-left-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-right-in{animation:ranui-dropdown-right-in var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}.ran-dropdown-right-out{animation:ranui-dropdown-right-out var(--ran-dropdown-animation-duration,.3s);animation-fill-mode:forwards}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,var(--ran-z-dropdown,1100))}:host([hidden]){display:none}.ranui-dropdown{transform-origin:var(--ran-x,50%) var(--ran-y,50%);box-sizing:var(--ran-dropdown-box-sizing,border-box);margin:var(--ran-dropdown-margin,0);padding:var(--ran-dropdown-padding,0);color:var(--ran-dropdown-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-dropdown-font-weight,var(--ran-text-label-weight,500));list-style:var(--ran-dropdown-list-style,none);font-family:var(--ran-dropdown-font-family,var(--ran-skin-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index,1050);overflow:var(--ran-dropdown-overflow,hidden);font-variant:var(--ran-dropdown-font-variant,initial);background:var(--ran-dropdown-background,var(--ran-color-bg-elevated,#fff));border:var(--ran-dropdown-border,1px solid var(--ran-color-border,#eaeaea));border-radius:var(--ran-dropdown-border-radius,var(--ran-radius-md,12px));outline:var(--ran-dropdown-outline,none);box-shadow:var(--ran-dropdown-box-shadow,var(--ran-shadow-menu,var(--ran-shadow-elevated,0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d)));cursor:var(--ran-dropdown-cursor,auto);width:var(--ran-dropdown-width,100%);height:var(--ran-dropdown-height,100%);min-height:var(--ran-dropdown-min-height,100%);min-width:var(--ran-dropdown-min-width,100%)}.ranui-dropdown-container{position:var(--ran-dropdown-container-position,relative);display:var(--ran-dropdown-container-display,block);width:var(--ran-dropdown-container-width,100%);height:var(--ran-dropdown-container-height,100%);box-sizing:var(--ran-dropdown-container-box-sizing,border-box)}.ranui-dropdown-container .top{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-anchor-offset,0px))) translateY(calc(-1 * var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px)) + var(--ran-dropdown-arrow-overlap,2px))) rotate(0deg);top:0;left:50%}.ranui-dropdown-container .bottom{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-anchor-offset,0px))) translateY(var(--ran-dropdown-arrow-overlap,2px)) rotate(180deg);left:50%;top:max(0px, calc(100% - calc(var(--ran-dropdown-arrow-width,16px) / 4)))}.ranui-dropdown-container .left{transform:translateX(calc(0px - var(--ran-dropdown-arrow-width,16px) + var(--ran-dropdown-arrow-overlap,2px))) translateY(calc(var(--ran-dropdown-arrow-width,16px) / 2 + var(--ran-dropdown-arrow-shape-offset,calc(var(--ran-dropdown-arrow-width,16px) * -.301126)) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(270deg);top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px)))}.ranui-dropdown-container .right{transform:translateX(calc(0px - var(--ran-dropdown-arrow-overlap,2px))) translateY(calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - calc(var(--ran-dropdown-arrow-width,16px) / 2) + var(--ran-dropdown-arrow-shape-offset,calc(var(--ran-dropdown-arrow-width,16px) * -.301126)) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(90deg);top:0;left:100%}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position,absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing,border-box);z-index:var(--ran-dropdown-arrow-z-index,1);display:var(--ran-dropdown-arrow-display,block);pointer-events:var(--ran-dropdown-arrow-pointer-events,none);width:var(--ran-dropdown-arrow-width,var(--ran-dropdown-arrow-width,16px));height:var(--ran-dropdown-arrow-height,var(--ran-dropdown-arrow-width,16px));overflow:var(--ran-dropdown-arrow-overflow,hidden)}.ranui-dropdown-arrow svg{width:100%;height:100%;display:block;overflow:visible}.ranui-dropdown-arrow path{fill:var(--ran-dropdown-arrow-fill-background,var(--ran-dropdown-arrow-tip-background,var(--ran-color-bg-elevated,#fff)));filter:var(--ran-dropdown-arrow-shadow,drop-shadow(2px 2px 3px #0000000d))}@media (prefers-reduced-motion:reduce){.ran-dropdown-down-in,.ran-dropdown-down-out,.ran-dropdown-up-in,.ran-dropdown-up-out,.ran-dropdown-left-in,.ran-dropdown-left-out,.ran-dropdown-right-in,.ran-dropdown-right-out{animation:none}}`;W(`r-dropdown`,class extends G{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=q(this,ct);let e=R(),t=R(),n=H().class(`ranui-dropdown-container`).children(H().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).ref(e).part(`dropdown`).children(U().class(`slot`).ref(t))).build();this._shadowDom.appendChild(n),this.container=n,this.dropdown=J(e,`ranui dropdown`),this._slot=J(t,`slot`)}get transit(){return Y(this,`transit`)}set transit(e){X(this,`transit`,e,{removeEmpty:!0})}get arrow(){return Y(this,`arrow`)}set arrow(e){X(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}handlerExternalCss=()=>{ot(this,this._shadowDom,`sheet`,null,this.sheet)};appliedTransit=``;handlerTransit=()=>{this.dropdown&&(this.appliedTransit&&a(this.dropdown,this.appliedTransit),this.appliedTransit=this.transit,this.appliedTransit&&i(this.dropdown,this.appliedTransit))};getAnimationTarget=()=>this.dropdown;handlerArrow=()=>{let e=(this.arrow||``).trim();if(!e){this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0;return}!this.arrowIcon&&this.container&&(this.arrowIcon=H().class(`ranui-dropdown-arrow`).build(),this.arrowIcon.innerHTML=``,this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&this.handlerTransit(),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}});var lt=`:host{display:var(--ran-popover-host-display,block)}.ran-popover{box-sizing:var(--ran-popover-box-sizing,border-box);position:var(--ran-popover-position,relative);display:var(--ran-popover-display,block);margin:var(--ran-popover-margin,0);padding:var(--ran-popover-padding,0)}.ran-popover-block{display:var(--ran-popover-block-display,block)}`,ut={bottom:{enter:`ran-dropdown-down-in`,exit:`ran-dropdown-down-out`},top:{enter:`ran-dropdown-up-in`,exit:`ran-dropdown-up-out`},left:{enter:`ran-dropdown-left-in`,exit:`ran-dropdown-left-out`},right:{enter:`ran-dropdown-right-in`,exit:`ran-dropdown-right-out`}},Z=Symbol.for(`ranui.floating.panel-owner`),dt=e=>e.getAnimationTarget?.()??e,ft=(e,t)=>{let n=dt(e);if(typeof n.getAnimations!=`function`||typeof requestAnimationFrame!=`function`){t();return}requestAnimationFrame(()=>{let e=n.getAnimations();if(!e.length){t();return}(async()=>{await Promise.allSettled(e.map(e=>e.finished)),t()})()})},pt=class{options;repositionBound=!1;outsideBinding=0;opened=!1;repositionFrame=0;generation=0;resolvedSide;constructor(e){this.options=e}get anchor(){return this.options.anchor?.()??this.options.host}containsEvent(e){let t=this.options.panel();return e.composedPath().some(e=>{let n=e instanceof Node?e:null,r=new Set;for(;n&&!r.has(n);){if(n===this.options.host||n===t)return!0;r.add(n),n=n[Z]??n.parentNode??(n instanceof ShadowRoot?n.host:null)}return!1})}bindOutside(e,t){let{host:n}=this.options,r=n.getRootNode(),i=n.ownerDocument,a=++this.outsideBinding,o=new WeakSet;r!==i&&e.on(r,`click`,e=>{o.add(e),this.opened&&!this.containsEvent(e)&&t(e)},{capture:!0}),e.on(i,`click`,e=>{if(!this.opened)return;let s=this.containsEvent(e),c=this.generation;if(r===i){s||t(e);return}setTimeout(()=>{a===this.outsideBinding&&c===this.generation&&n.isConnected&&this.opened&&!o.has(e)&&!s&&t(e)},0)},{capture:!0})}apply=e=>{let{host:t}=this.options;t.setAttribute(`aria-expanded`,e?`true`:`false`);let n=this.options.panel();if(!n||e===this.opened)return;this.opened=e;let r=++this.generation;if(e){n[Z]=t,this.resolvedSide=void 0,t.dispatchEvent(new CustomEvent(`show`)),n.style.setProperty(`display`,`block`),this.attachReposition(),this.position(!0),ft(n,()=>{r===this.generation&&(n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-show`)))});return}delete n[Z],this.detachReposition(),t.dispatchEvent(new CustomEvent(`hide`)),n.setAttribute(`transit`,ut[this.resolvedSide??this.side()].exit),ft(n,()=>{r===this.generation&&(n.style.setProperty(`display`,`none`),n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-hide`)))})};side=()=>this.options.placement().split(`-`)[0];position=(e=!1)=>{if(!this.options.panel())return;let t=()=>{let t=this.options.panel();t&&this.write(t,e)};e&&typeof requestAnimationFrame==`function`?requestAnimationFrame(t):t()};write(e,t){let{offset:n=0,containerId:r,beforeMeasure:i,measurePanel:a,adjust:o,afterPosition:s}=this.options,c=this.anchor.getBoundingClientRect();i?.(c,e);let l=this.options.host.getRootNode(),u=r?.()??``,d=u?l.getElementById?.(u)??document.getElementById(u):null,f=e.getBoundingClientRect(),p=a?.(e),m=f,h=p?.width??f.width,_=p?.height??f.height,v=this.options.placement(),[y,b]=v.split(`-`),x=b??`start`,S,C,w=y;if(d){let e=d.getBoundingClientRect();w===`top`||w===`bottom`?(S=w===`bottom`?c.bottom-e.top+n:c.top-e.top-_-n,C=g(x,c.left,c.width,h)-e.left):(S=g(x,c.top,c.height,_)-e.top,C=w===`right`?c.right-e.left+n:c.left-e.left-h-n)}else{let e=ee({anchor:{top:c.top,left:c.left,width:c.width,height:c.height},floating:{width:h,height:_},placement:v,offset:n});w=e.side,S=e.top+window.scrollY,C=e.left+window.scrollX}let T={top:S,left:C,side:w,align:x,anchorRect:c,panelRect:m,container:d},E=o?.(T,e);E&&(T.top=E.top,T.left=E.left),this.resolvedSide=T.side,e.style.setProperty(`position`,`absolute`),e.style.setProperty(`inset`,`${T.top}px auto auto ${T.left}px`),e.style.setProperty(`--ran-x`,`${T.left}px`),e.style.setProperty(`--ran-y`,`${T.top}px`),t&&e.setAttribute(`transit`,ut[T.side].enter),s?.(T,e)}reposition=()=>{if(!(!this.opened||this.repositionFrame)){if(typeof requestAnimationFrame!=`function`){this.position();return}this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=0,this.opened&&this.position()})}};attachReposition(){this.repositionBound||typeof window>`u`||(window.addEventListener(`scroll`,this.reposition,!0),window.addEventListener(`resize`,this.reposition),this.repositionBound=!0)}detachReposition(){!this.repositionBound||typeof window>`u`||(window.removeEventListener(`scroll`,this.reposition,!0),window.removeEventListener(`resize`,this.reposition),this.repositionBound=!1)}destroy=()=>{this.generation++,this.outsideBinding++,this.opened=!1;let e=this.options.panel();e&&delete e[Z],this.repositionFrame&&typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=0),this.detachReposition()}};function mt(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var ht=8,gt=300,Q=16,_t=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),vt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},$=class extends G{_events=new c;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;removeTimeId;_repositionBound=!1;_floating=new pt({host:this,panel:()=>this.popoverContent,anchor:()=>Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this,placement:()=>this.placement,offset:ht,containerId:()=>this.getPopupContainerId,afterPosition:(e,t)=>{let{anchorRect:n,panelRect:r,side:i}=e,a=vt[i];a&&t.setAttribute(`arrow`,a),t.style.setProperty(`--ran-dropdown-arrow-anchor-width`,`${n.width}px`),t.style.setProperty(`--ran-dropdown-arrow-anchor-height`,`${n.height}px`),t.style.setProperty(`--ran-dropdown-min-width`,`${r.width}px`),t.style.setProperty(`--ran-dropdown-min-height`,`${r.height}px`);let o=t.getBoundingClientRect(),s=n.left+n.width/2,c=o.left+o.width/2;t.style.setProperty(`--ran-dropdown-arrow-anchor-offset`,`${s-c}px`),t.style.setProperty(`--ran-dropdown-arrow-anchor-offset-y`,`${n.top-o.top}px`)}});static get observedAttributes(){return[`open`,`placement`,`trigger`,`sheet`]}closePopover=()=>{this.setDropdownDisplayNone()};constructor(){super(),this._shadowDom=q(this,lt);let e=R(),t=H().class(`ran-popover-block`).role(`tooltip`).children(U().class(`slot`).ref(e)).build();this._shadowDom.appendChild(t),this.popoverBlock=t,this._slot=J(e,`slot`)}get placement(){return Y(this,`placement`,`top`)}set placement(e){X(this,`placement`,e)}get placementSide(){return this.placement.split(`-`)[0]}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}_applyOpen=()=>{this._floating.apply(this.open)};show=()=>{this.open=!0};hide=()=>{this.open=!1};toggle=()=>{this.open=!this.open};get trigger(){return Y(this,`trigger`,`hover`)}set trigger(e){X(this,`trigger`,e)}get getPopupContainerId(){return Y(this,`getPopupContainerId`)}set getPopupContainerId(e){X(this,`getPopupContainerId`,e)}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}handlerExternalCss=()=>{ot(this,this._shadowDom,`sheet`,null,this.sheet)};initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`aria-haspopup`,`dialog`),this.setAttribute(`aria-expanded`,`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};stopPropagation=e=>{e.stopPropagation()};createContent=e=>{if(e){if(!this.popoverContent){let e=getComputedStyle(this).getPropertyValue(`--ran-popover-content-padding`).trim()||`12px`;this.popoverContent=Ie(`r-dropdown`).class(`ran-popover-dropdown`).style(`display`,`none`).style(`position`,`absolute`).cssVar(`ran-dropdown-padding`,e).build(),this.popoverContent?.addEventListener(`click`,this.stopPropagation);let t=H().children(this.popoverContent).build();this.popoverInner=t,this.trigger.includes(`hover`)&&!r()&&(this.popoverContent?.addEventListener(`mouseleave`,this.blur),this.popoverContent?.addEventListener(`mouseenter`,this.removeDropDownTimeId));let n=this.getRootNode();((n.getElementById?n.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body).appendChild(t)}if(this.popoverContent&&e.length>0){this.popoverContent.innerHTML=``;let t=document.createDocumentFragment();for(let n of e)t.appendChild(n);this.popoverContent.appendChild(t)}}};watchContent=e=>{let{value:t}=e.detail;this.createContent(t.content)};blur=t(()=>{this.removeTimeId&&this.removeDropDownTimeId(),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(),this.setDropdownDisplayNone()},gt)},Q);removeDropDownTimeId=t(()=>{this.trigger.includes(`hover`)&&!r()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)},Q);setDropdownDisplayBlock=t(()=>{this.open=!0},Q);setDropdownDisplayNone=t(()=>{this.open=!1},Q);placementPosition=()=>{this._floating.position()};hoverPopover=e=>{e.stopPropagation(),e.preventDefault(),this.setDropdownDisplayBlock()};clickContent=e=>{e.stopPropagation()};clickPopover=e=>{e.stopPropagation(),e.preventDefault(),this.setDropdownDisplayBlock.cancel(),this.setDropdownDisplayNone.cancel(),this.blur.cancel(),clearTimeout(this.removeTimeId),this.removeTimeId=void 0,this.toggle()};keydownPopover=e=>{mt(e)&&(e.preventDefault(),this.setDropdownDisplayBlock()),e.key===`Escape`&&(e.preventDefault(),this.setDropdownDisplayNone())};clickRemovePopover=e=>{this.hoverRemovePopover(e)};popoverTrigger=()=>{this._events.abort();for(let e of this.children)e.tagName===`R-CONTENT`&&this._events.on(e,`change`,this.watchContent);this.trigger.includes(`hover`)&&!r()&&(this._events.on(this,`mouseenter`,this.hoverPopover),this._events.on(this,`mouseleave`,this.blur)),this._events.on(this,`click`,this.clickPopover).on(this,`keydown`,this.keydownPopover),this._floating.bindOutside(this._events,this.clickRemovePopover)};hoverRemovePopover=e=>{this._floating.containsEvent(e)||this.setDropdownDisplayNone()};changePlacement=t(()=>{if(!this.getPopupContainerId&&this.open)return;let e=vt[this.placementSide];e&&this.popoverContent?.setAttribute(`arrow`,e)},Q);connectedCallback(){this.initAria(),this.handlerExternalCss();for(let e of this.children)e.tagName===`R-CONTENT`&&this.createContent(e.children);this.popoverTrigger(),this.changePlacement()}disconnectedCallback(){this._events.abort(),this.setDropdownDisplayBlock.cancel(),this.setDropdownDisplayNone.cancel(),this.blur.cancel(),this.removeDropDownTimeId.cancel(),this._floating.destroy(),clearTimeout(this.removeTimeId),this.removeTimeId=void 0,this.popoverInner?.remove(),this.popoverInner=void 0,this.popoverContent=void 0}attributeChangedCallback(e,t,n){t!==n&&(e===`trigger`&&this.popoverTrigger(),e===`placement`&&this.changePlacement(),e===`sheet`&&this.handlerExternalCss(),e===`open`&&this._applyOpen())}};return W(`r-popover`,$),e.PLACEMENT_TYPE=_t,e.Popover=$,e.default=$,e})({}); \ No newline at end of file diff --git a/public/ranui-iife/theme-switch.iife.js b/public/ranui-iife/theme-switch.iife.js index 37112b4a0..2d42ec81c 100644 --- a/public/ranui-iife/theme-switch.iife.js +++ b/public/ranui-iife/theme-switch.iife.js @@ -1 +1 @@ -var ranui_theme_switch=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{display:var(--ran-theme-switch-display,inline-flex);box-sizing:border-box}:host([hidden]){display:none}.ran-theme-switch{align-items:center;gap:var(--ran-theme-switch-gap,var(--ran-space-1,4px));padding:var(--ran-theme-switch-padding,var(--ran-space-1,4px));border-width:var(--ran-skin-border-width,1px);border-style:var(--ran-skin-border-style,solid);border-color:var(--ran-theme-switch-border-color,var(--ran-color-border,#eaeaea));border-radius:var(--ran-theme-switch-radius,var(--ran-radius-full,9999px));background:var(--ran-theme-switch-background,transparent);box-sizing:border-box;display:inline-flex}.ran-theme-switch button{width:var(--ran-theme-switch-button-size,var(--ran-size-5,28px));height:var(--ran-theme-switch-button-size,var(--ran-size-5,28px));border-radius:var(--ran-theme-switch-radius,var(--ran-radius-full,9999px));color:var(--ran-theme-switch-button-color,var(--ran-color-text-secondary,#4d4d4d));cursor:pointer;background:0 0;border:none;place-items:center;padding:0;display:grid}.ran-theme-switch button:hover{color:var(--ran-theme-switch-button-hover-color,var(--ran-color-text,#171717))}.ran-theme-switch button[aria-pressed=true]{background:var(--ran-theme-switch-button-active-background,var(--ran-color-bg-hover,#ebebeb));color:var(--ran-theme-switch-button-active-color,var(--ran-color-text,#171717))}.ran-theme-switch button:focus-visible{outline:var(--ran-theme-switch-button-focus-outline,2px solid var(--ran-color-primary,#006bff));outline-offset:var(--ran-theme-switch-button-focus-outline-offset,2px)}.ran-theme-switch svg{width:var(--ran-theme-switch-icon-size,var(--ran-size-1,16px));height:var(--ran-theme-switch-icon-size,var(--ran-size-1,16px))}`,n=typeof document>`u`,r=class{ac=null;get signal(){return this.ac??=new AbortController,this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},i=0,a=1,o=2,s=null,c=null,l=0,u=new Set,d=!1;function f(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)g(e,o);l===0&&re()}}]}function p(e){let t=ee(e,!0);return te(t),v(t),()=>b(t)}function m(e){let t={owned:[],cleanups:[],owner:c},n=c,r=s;c=t,s=null;try{return e(()=>ie(t))}finally{c=n,s=r}}function h(e){c&&c.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:o,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:c}}function te(e){c&&c.owned.push(e)}function ne(e){s&&(s.sources.add(e),e.observers.add(s))}function g(e,t){if(e.disposed||e.state>=t)return;let n=e.state===i;if(e.state=t,e.isEffect)u.add(e);else if(n)for(let t of e.observers)g(t,a)}function re(){if(!(l>0||d)){d=!0;try{for(;u.size>0;){let e=[...u];u.clear();for(let t of e)t.disposed||_(t)}}finally{d=!1}}}function _(e){if(!(e.disposed||e.state===i)){if(e.state===a)for(let t of e.sources)`fn`in t&&_(t);e.state===o&&v(e),e.state=i}}function v(e){if(e.running)throw Error(`ranui reactivity: cyclic dependency detected (a computation triggered itself).`);y(e);let t=s,n=c;s=e,c=e,e.running=!0,e.state=i;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)g(t,o)}}finally{e.running=!1,s=t,c=n}}function y(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function b(e){e.disposed||(e.disposed=!0,y(e),e.observers.clear())}function ie(e){for(let t of e.owned)b(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var ae=class{_events=new Map;tap=(e,t)=>{this._events.get(e)&&e!==Symbol.for(`NEW_LISTENER`)&&this.call(Symbol.for(`NEW_LISTENER`),e);let n=this._events.get(e)||new Set;return typeof t==`function`?n.add({name:e,callback:t}):n.add(t),this._events.set(e,n),this};call=(e,...t)=>((this._events.get(e)||new Set).forEach(e=>{let{callback:n}=e;n(...t)}),this);callSync=async(e,...t)=>{let n=this._events.get(e)||new Set;for(let e of n){let{callback:n}=e;await n(...t)}return this};once=(e,t)=>{let n;if(typeof t==`function`)n={name:e,callback:(...r)=>{t(...r),this.off(e,n)},initialCallback:t};else{let{callback:r}=t;n={name:e,callback:(...t)=>{r(...t),this.off(e,n)},initialCallback:r}}return this.tap(e,n),this};off=(e,t)=>{let n=[...this._events.get(e)||new Set].filter(e=>{if(typeof t==`function`)return e.callback!==t&&e.initialCallback!==t;{let{callback:n}=t;return e.callback!==n&&e.initialCallback!==n}});return this._events.set(e,new Set(n)),this}};Math.PI/180,180/Math.PI,2*Math.PI;var x=(e=8)=>Math.random().toString(36).substring(2,e+2),S=()=>{try{return typeof localStorage>`u`?null:localStorage}catch{return null}},C=(e,t)=>{try{S()?.setItem(e,t)}catch{}},oe=e=>{try{return S()?.getItem(e)??``}catch{return``}};Object.freeze({});var se=e=>typeof e==`function`,ce=12e4,le=`__ranuts_bridge__`,ue=`default`,w=new class{bridges=new Set;attachedWindow=null;handleMessage=e=>{for(let t of Array.from(this.bridges))t.receive(e)};add(e){this.bridges.add(e),typeof window<`u`&&this.attachedWindow!==window&&(window.addEventListener(`message`,this.handleMessage),this.attachedWindow=window)}remove(e){this.bridges.delete(e),this.bridges.size===0&&this.attachedWindow&&(this.attachedWindow.removeEventListener(`message`,this.handleMessage),this.attachedWindow=null)}},de=class{targetWindow;targetOrigin;messageHandlers;pendingRequests;channel;senderId;available;constructor(e,t=`*`,n=ue){this.targetOrigin=t,this.channel=n,this.senderId=x(12),this.messageHandlers=new Map,this.pendingRequests=new Map,this.available=typeof window<`u`,this.available?(this.targetWindow=e??window,w.add(this)):this.targetWindow=void 0}post(e,t){let n={...t,__bridge:le,channel:this.channel,senderId:this.senderId};e.postMessage(n,this.targetOrigin)}receive=e=>{if(!this.available||this.targetOrigin!==`*`&&e.origin!==this.targetOrigin||e.source&&e.source!==this.targetWindow)return;let t=e.data;if(!t||typeof t!=`object`||t.__bridge!==`__ranuts_bridge__`||(t.channel??`default`)!==this.channel)return;let{type:n,payload:r,id:i,isResponse:a,isError:o,senderId:s}=t;if(a&&i){let e=this.pendingRequests.get(i);e&&(o?e.reject(Error(typeof r==`string`?r:`Bridge request failed`)):e.resolve(r),this.pendingRequests.delete(i));return}if(s&&s===this.senderId||typeof n!=`string`||!this.messageHandlers.has(n))return;let c=this.messageHandlers.get(n);if(se(c)){let t=e.source??this.targetWindow;Promise.resolve(c(r)).then(e=>{i&&this.post(t,{type:n,payload:e,id:i,isResponse:!0})}).catch(e=>{i&&this.post(t,{type:n,payload:e instanceof Error?e.message:String(e),id:i,isResponse:!0,isError:!0})})}};on=(e,t)=>{this.messageHandlers.set(e,t)};off=e=>{this.messageHandlers.delete(e)};send=async(e,t)=>{if(!this.available)return Promise.reject(Error(`PostMessageBridge is unavailable outside a browser environment`));let n=x(10);return new Promise((r,i)=>{let a=setTimeout(()=>{this.pendingRequests.has(n)&&(this.pendingRequests.delete(n),i(Error(`Request timeout`)))},ce),o=e=>{clearTimeout(a),i(e)};this.pendingRequests.set(n,{resolve:e=>{clearTimeout(a),r(e)},reject:o});try{this.post(this.targetWindow,{type:e,payload:t,id:n})}catch(e){this.pendingRequests.delete(n),o(e instanceof Error?e:Error(`Failed to post message`))}})};broadcast=e=>{if(this.available)try{this.post(this.targetWindow,{type:e.type,payload:e.payload})}catch{}};destroy=()=>{w.remove(this),this.messageHandlers.clear(),this.pendingRequests.forEach(e=>{e.reject(Error(`Bridge destroyed`))}),this.pendingRequests.clear()}};(class e{static instance;bridges=new Map;constructor(){}static getInstance(){return e.instance||=new e,e.instance}connectClient=({id:e,targetOrigin:t,targetWindow:n,channel:r})=>{let i=new de(n,t,r);if(e||=x(10),this.bridges.has(e))throw Error(`Bridge ${e} already exists`);return this.bridges.set(e,i),{bridge:i,id:e}};getClient=e=>this.bridges.get(e);removeClient=e=>{let t=this.bridges.get(e);t&&(t.destroy(),this.bridges.delete(e))};removeAllClient=()=>{this.bridges.forEach(e=>{e.destroy()}),this.bridges.clear()};broadcast=e=>{this.bridges.forEach(t=>{t.broadcast(e)})};sendTo=(e,t,n)=>{let r=this.getClient(e);return r?r.send(t,n):Promise.reject(Error(`Bridge ${e} not found`))}}).getInstance(),new ae;var T=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],E=class{highOrder;lowOrder;constructor(e,t){this.highOrder=e,this.lowOrder=t}};new E(T[0],3609767458),new E(T[1],602891725),new E(T[2],3964484399),new E(T[3],2173295548),new E(T[4],4081628472),new E(T[5],3053834265),new E(T[6],2937671579),new E(T[7],3664609560),new E(T[8],2734883394),new E(T[9],1164996542),new E(T[10],1323610764),new E(T[11],3590304994),new E(T[12],4068182383),new E(T[13],991336113),new E(T[14],633803317),new E(T[15],3479774868),new E(T[16],2666613458),new E(T[17],944711139),new E(T[18],2341262773),new E(T[19],2007800933),new E(T[20],1495990901),new E(T[21],1856431235),new E(T[22],3175218132),new E(T[23],2198950837),new E(T[24],3999719339),new E(T[25],766784016),new E(T[26],2566594879),new E(T[27],3203337956),new E(T[28],1034457026),new E(T[29],2466948901),new E(T[30],3758326383),new E(T[31],168717936),new E(T[32],1188179964),new E(T[33],1546045734),new E(T[34],1522805485),new E(T[35],2643833823),new E(T[36],2343527390),new E(T[37],1014477480),new E(T[38],1206759142),new E(T[39],344077627),new E(T[40],1290863460),new E(T[41],3158454273),new E(T[42],3505952657),new E(T[43],106217008),new E(T[44],3606008344),new E(T[45],1432725776),new E(T[46],1467031594),new E(T[47],851169720),new E(T[48],3100823752),new E(T[49],1363258195),new E(T[50],3750685593),new E(T[51],3785050280),new E(T[52],3318307427),new E(T[53],3812723403),new E(T[54],2003034995),new E(T[55],3602036899),new E(T[56],1575990012),new E(T[57],1125592928),new E(T[58],2716904306),new E(T[59],442776044),new E(T[60],593698344),new E(T[61],3733110249),new E(T[62],2999351573),new E(T[63],3815920427),new E(3391569614,3928383900),new E(3515267271,566280711),new E(3940187606,3454069534),new E(4118630271,4000239992),new E(116418474,1914138554),new E(174292421,2731055270),new E(289380356,3203993006),new E(460393269,320620315),new E(685471733,587496836),new E(852142971,1086792851),new E(1017036298,365543100),new E(1126000580,2618297676),new E(1288033470,3409855158),new E(1501505948,4234509866),new E(1607167915,987167468),new E(1816402316,1246189591),new E(0,1),new E(0,32898),new E(2147483648,32906),new E(2147483648,2147516416),new E(0,32907),new E(0,2147483649),new E(2147483648,2147516545),new E(2147483648,32777),new E(0,138),new E(0,136),new E(0,2147516425),new E(0,2147483658),new E(0,2147516555),new E(2147483648,139),new E(2147483648,32905),new E(2147483648,32771),new E(2147483648,32770),new E(2147483648,128),new E(0,32778),new E(2147483648,2147483658),new E(2147483648,2147516545),new E(2147483648,32896),new E(0,2147483649),new E(2147483648,2147516424);var fe=(e,t)=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return t(!1),()=>{};let n=window.matchMedia(e),r=()=>t(n.matches);if(r(),typeof n.addEventListener==`function`)return n.addEventListener(`change`,r),()=>n.removeEventListener(`change`,r);let i=n;return i.addListener(r),()=>i.removeListener(r)},pe=/["'&<>]/;function D(e){let t=``+e,n=pe.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ve=(e,t,n=ge)=>{if(typeof document<`u`&&t&&!O(e,t,me)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},ye=(e,t,n=_e)=>{if(typeof document<`u`&&t&&!O(e,t,he)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}};(()=>{let e=new Uint8Array(128);for(let t=0;t<78;t++)e[`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.,!?;:'"()[]{}`.charCodeAt(t)]=1;return e})();var k=new Map([[100,`Continue`],[101,`Switching Protocols`],[102,`Processing`],[103,`Early Hints`],[200,`OK`],[201,`Created`],[202,`Accepted`],[203,`Non-Authoritative Information`],[204,`No Content`],[205,`Reset Content`],[206,`Partial Content`],[207,`Multi-Status`],[208,`Already Reported`],[226,`IM Used`],[300,`Multiple Choices`],[301,`Moved Permanently`],[302,`Found`],[303,`See Other`],[304,`Not Modified`],[305,`Use Proxy`],[307,`Temporary Redirect`],[308,`Permanent Redirect`],[400,`Bad Request`],[401,`Unauthorized`],[402,`Payment Required`],[403,`Forbidden`],[404,`Not Found`],[405,`Method Not Allowed`],[406,`Not Acceptable`],[407,`Proxy Authentication Required`],[408,`Request Timeout`],[409,`Conflict`],[410,`Gone`],[411,`Length Required`],[412,`Precondition Failed`],[413,`Payload Too Large`],[414,`URI Too Long`],[415,`Unsupported Media Type`],[416,`Range Not Satisfiable`],[417,`Expectation Failed`],[418,`I'm a Teapot`],[421,`Misdirected Request`],[422,`Unprocessable Entity`],[423,`Locked`],[424,`Failed Dependency`],[425,`Too Early`],[426,`Upgrade Required`],[428,`Precondition Required`],[429,`Too Many Requests`],[431,`Request Header Fields Too Large`],[451,`Unavailable For Legal Reasons`],[500,`Internal Server Error`],[501,`Not Implemented`],[502,`Bad Gateway`],[503,`Service Unavailable`],[504,`Gateway Timeout`],[505,`HTTP Version Not Supported`],[506,`Variant Also Negotiates`],[507,`Insufficient Storage`],[508,`Loop Detected`],[509,`Bandwidth Limit Exceeded`],[510,`Not Extended`],[511,`Network Authentication Required`]]);(function(e){let t=new Map;for(let[n,r]of e)t.set(r.toLowerCase(),n);return t})(k),function(e){let t=[];for(let[n,r]of e)t.push(n);return t}(k);function A(e){return D(e)}var j=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,M=`.#[`;function N(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var P=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},be=(e,t)=>{let n=t.trim();if(!n)return!1;let r=N(n);return r!==null&&r.every(t=>P(e,t))},F=(e,t,n)=>{for(let r of e)j(r)&&(be(r,t)&&n.push(r),F(r.childrenList,t,n))},I=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?D(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}},L=class{tagName;attributes=new Map;inlineStyles=new Map;childrenList=[];shadowRoot=null;textContent=null;content;eventListeners=new Map;style={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();this.inlineStyles.set(n,t)},removeProperty:e=>this.inlineStyles.delete(e)};classList={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)};_innerHTML=``;get innerHTML(){return this._innerHTML}set innerHTML(e){this._innerHTML=e,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new I)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new xe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners.get(e)||new Set;n.add(t),this.eventListeners.set(e,n)}removeEventListener(e,t){let n=this.eventListeners.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners.delete(e))}dispatchEvent(e){let t=this.eventListeners.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${A(t)}"`).join(``),r=Array.from(this.inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`),i=r?` style="${A(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?D(e):(e instanceof I,e.serialize())).join(``):a+=D(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},xe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return F(this.childrenList,e,t),t}serialize(){return``}},R=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(R(t)):e.concat(t),[]),z=e=>e==null?null:e instanceof H?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,Se=(e,t)=>{if(n){V(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};p(()=>{let e=t();o();let n=document.createDocumentFragment();a=m(t=>(V(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),h(()=>a?.())},Ce=`__ranFor`,we=e=>typeof e==`object`&&!!e&&e[Ce]===!0,Te=(e,t,n)=>{let[r,i]=f(t),a=null,o=m(t=>{let i=z(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},B=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},Ee=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=z(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;h(()=>{for(let e of i.values())e.dispose();i.clear()}),p(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o))return;let s=i.get(o);s?(i.delete(o),s.index(r)):s=Te(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();B(r,a),i=n})},De=`__ranIndex`,Oe=e=>typeof e==`object`&&!!e&&e[De]===!0,ke=(e,t,n)=>{let[r,i]=f(e),a=null,o=m(e=>{let i=z(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ae=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=z(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];h(()=>{for(let e of i)e.dispose();i=[]}),p(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}B(r,i.map(e=>e.node).filter(e=>e!=null))})},V=(e,t)=>{R(t).forEach(t=>{if(we(t)){Ee(e,t);return}if(Oe(t)){Ae(e,t);return}if(typeof t==`function`){Se(e,t);return}let n=z(t);n!=null&&e.appendChild(n)})},je=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),H=class{el;constructor(e,t){let r=t??(je.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new L(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){typeof e==`function`?p(()=>t(e())):t(e)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.className=e}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return V(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new Me(this.el,t,e)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Me=class{root;hostEl;options;constructor(e,t,n){this.hostEl=e,this.root=t,this.options=n}children(...e){return V(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},U=e=>new H(e),Ne=()=>U(`div`),Pe=()=>U(`button`),Fe=new Map;function Ie(e,t){n?(Fe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Le=typeof document<`u`?HTMLElement:L,Re=`data-ranui`,ze=`data-ranui-sheet`,Be=(e,t)=>ve(e,t,Re),Ve=(e,t)=>ye(e,t,ze),W=new WeakMap,G=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,K=new Map,He=e=>{let t=K.get(e);if(t!==void 0)return t;let n=e?`${e}\n${G}`:G;return K.set(e,n),n},Ue=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||W.get(e)||e.attachShadow(n);return W.set(e,r),Be(r,He(t)),r},We=(e,t,n=``)=>e.getAttribute(t)??n,Ge=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},Ke=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&Ve(t,a)},q=`ran-theme`,J=`(prefers-color-scheme: dark)`,Y=null,X=e=>{if(e&&`style`in e)return e;if(e&&`documentElement`in e)return e.documentElement;if(!(typeof document>`u`))return document.documentElement},qe=(e,t)=>{e.setAttribute(`data-ran-theme`,t?`dark`:`light`),e.setAttribute(`theme`,t?`dark`:`light`)},Je=()=>{Y?.(),Y=null},Ye=(e,t)=>{let n=X(t);if(n){if(Je(),e===`system`){if(typeof window>`u`)return;Y=fe(J,e=>qe(n,e)),C(q,`system`);return}n.setAttribute(`data-ran-theme`,e),n.setAttribute(`theme`,e),C(q,e)}},Xe=e=>{let t=X(e);if(!t)return``;let n=t.getAttribute(`data-ran-theme`)||t.getAttribute(`theme`)||``;return n===`light`||n===`dark`?oe(q)===`system`?`system`:n:``},Z=[`system`,`light`,`dark`],Ze={system:``,light:``,dark:``},Q=`ran-theme-switch-sync`,$=class extends Le{static get observedAttributes(){return[`label-system`,`label-light`,`label-dark`,`sheet`]}_events=new r;_shadowDom;_group;_buttons;constructor(){super(),this._shadowDom=Ue(this,t),this._buttons=Z.map(e=>{let t=Pe().attr(`type`,`button`).data(`choice`,e).attr(`part`,`button ${e}`).aria(`pressed`,`false`).build();return n||(t.innerHTML=Ze[e]),t}),this._group=Ne().class(`ran-theme-switch`).attr(`part`,`switch`).role(`group`).children(this._buttons).build(),this._shadowDom.appendChild(this._group)}get sheet(){return We(this,`sheet`)}set sheet(e){Ge(this,`sheet`,e)}get value(){return Xe()||`system`}set value(e){Z.includes(e)&&this._select(e)}_label(e){let t={system:`System theme`,light:`Light theme`,dark:`Dark theme`}[e];return this.getAttribute(`label-${e}`)||t}_syncLabels(){this._group.setAttribute(`aria-label`,this.getAttribute(`label`)||`Theme`);for(let e of this._buttons)e.setAttribute(`aria-label`,this._label(e.dataset.choice))}_reflect(){let e=this.value;for(let t of this._buttons)t.setAttribute(`aria-pressed`,t.dataset.choice===e?`true`:`false`)}_select(e){Ye(e),this._reflect(),this._syncMeta(e),document.dispatchEvent(new CustomEvent(Q)),this.dispatchEvent(new CustomEvent(`change`,{detail:{theme:e},bubbles:!0,composed:!0}))}_syncMeta(e){if(typeof requestAnimationFrame>`u`)return;let t=document.querySelectorAll(`meta[name="theme-color"]`);t.length&&requestAnimationFrame(()=>{for(let n of t)if(n.dataset.ranOriginalContent===void 0&&(n.dataset.ranOriginalContent=n.getAttribute(`content`)||``),e===`system`)n.setAttribute(`content`,n.dataset.ranOriginalContent);else{let e=getComputedStyle(document.documentElement).getPropertyValue(`--ran-color-bg`).trim()||getComputedStyle(document.body).backgroundColor;n.setAttribute(`content`,e)}})}_handleClick=e=>{let t=(e.target.closest?.(`button`))?.dataset.choice;t&&Z.includes(t)&&this._select(t)};_handleSync=()=>this._reflect();handlerExternalCss=()=>{Ke(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this._syncLabels(),this._reflect(),this._events.on(this._group,`click`,this._handleClick),document.addEventListener(Q,this._handleSync),typeof window<`u`&&window.addEventListener(`storage`,this._handleSync)}disconnectedCallback(){this._events.abort(),document.removeEventListener(Q,this._handleSync),typeof window<`u`&&window.removeEventListener(`storage`,this._handleSync)}attributeChangedCallback(e,t,n){t!==n&&(e===`sheet`&&this.handlerExternalCss(),e.startsWith(`label`)&&this._syncLabels())}};return Ie(`r-theme-switch`,$),e.ThemeSwitch=$,e.default=$,e})({}); \ No newline at end of file +var ranui_theme_switch=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{display:var(--ran-theme-switch-display,inline-flex);box-sizing:border-box}:host([hidden]){display:none}.ran-theme-switch{align-items:center;gap:var(--ran-theme-switch-gap,var(--ran-space-1,4px));padding:var(--ran-theme-switch-padding,var(--ran-space-1,4px));border-width:var(--ran-skin-border-width,1px);border-style:var(--ran-skin-border-style,solid);border-color:var(--ran-theme-switch-border-color,var(--ran-color-border,#eaeaea));border-radius:var(--ran-theme-switch-radius,var(--ran-radius-full,9999px));background:var(--ran-theme-switch-background,transparent);box-sizing:border-box;display:inline-flex}.ran-theme-switch button{width:var(--ran-theme-switch-button-size,var(--ran-size-5,28px));height:var(--ran-theme-switch-button-size,var(--ran-size-5,28px));border-radius:var(--ran-theme-switch-radius,var(--ran-radius-full,9999px));color:var(--ran-theme-switch-button-color,var(--ran-color-text-secondary,#4d4d4d));cursor:pointer;background:0 0;border:none;place-items:center;padding:0;display:grid}.ran-theme-switch button:hover{color:var(--ran-theme-switch-button-hover-color,var(--ran-color-text,#171717))}.ran-theme-switch button[aria-pressed=true]{background:var(--ran-theme-switch-button-active-background,var(--ran-color-bg-hover,#ebebeb));color:var(--ran-theme-switch-button-active-color,var(--ran-color-text,#171717))}.ran-theme-switch button:focus-visible{outline:var(--ran-theme-switch-button-focus-outline,2px solid var(--ran-color-primary,#006bff));outline-offset:var(--ran-theme-switch-button-focus-outline-offset,2px)}.ran-theme-switch svg{width:var(--ran-theme-switch-icon-size,var(--ran-size-1,16px));height:var(--ran-theme-switch-icon-size,var(--ran-size-1,16px))}`,n=typeof document>`u`,r=()=>{try{return typeof localStorage>`u`?null:localStorage}catch{return null}},i=(e,t)=>{try{r()?.setItem(e,t)}catch{}},a=e=>{try{return r()?.getItem(e)??``}catch{return``}},o=(e,t)=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return t(!1),()=>{};let n=window.matchMedia(e),r=()=>t(n.matches);if(r(),typeof n.addEventListener==`function`)return n.addEventListener(`change`,r),()=>n.removeEventListener(`change`,r);let i=n;return i.addListener(r),()=>i.removeListener(r)},s=/["'&<>]/;function c(e){let t=``+e,n=s.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},te=new Map,ne=new Map,re=`data-adopted-style`,ie=`data-adopted-sheet`,l=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ae=(e,t,n=re)=>{if(!(typeof document>`u`)&&t&&!l(e,t,te)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},u=(e,t,n=ie)=>{if(!(typeof document>`u`)&&t&&!l(e,t,ne)&&!Array.from(e.querySelectorAll(`style[${n}]`)).some(e=>e.textContent===t)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},d=0,f=1,p=2,m=null,h=null,g=0,_=new Set,v=!1;function y(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(T(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)E(e,p);g===0&&se()}}]}function b(e){let t=oe(e,!0);return w(t),O(t),()=>A(t)}function x(e){let t=m;m=null;try{return e()}finally{m=t}}function S(e){let t={owned:[],cleanups:[],owner:h},n=h,r=m;h=t,m=null;try{return e(()=>ce(t))}finally{h=n,m=r}}function C(e){h&&h.cleanups.push(e)}function oe(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:p,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:h}}function w(e){h&&h.owned.push(e)}function T(e){m&&(m.sources.add(e),e.observers.add(m))}function E(e,t){if(e.disposed||e.state>=t)return;let n=e.state===d;if(e.state=t,e.isEffect)_.add(e);else if(n)for(let t of e.observers)E(t,f)}function se(){if(!(g>0||v)){v=!0;try{for(;_.size>0;){let e=[..._];_.clear();for(let t of e)t.disposed||D(t)}}finally{v=!1}}}function D(e){if(!(e.disposed||e.state===d)){if(e.state===f)for(let t of e.sources)`fn`in t&&D(t);e.state===p&&O(e),e.state=d}}function O(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);k(e);let t=m,n=h;m=e,h=e,e.running=!0,e.state=d;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)E(t,p)}}finally{e.running=!1,m=t,h=n}}function k(e){for(let t of e.owned)A(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function A(e){e.disposed||(e.disposed=!0,k(e),e.observers.clear())}function ce(e){for(let t of e.owned)A(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function j(e){return c(e)}var le=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ue=`.#[`;function de(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n0?t:null}var fe=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},pe=(e,t)=>{let n=t.trim();if(!n)return!1;let r=de(n);return r!==null&&r.every(t=>fe(e,t))},M=(e,t,n)=>{for(let r of e)le(r)&&(pe(r,t)&&n.push(r),M(r.childrenList,t,n))},N=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}serialize(){return this.childrenList.map(e=>typeof e==`string`?c(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}},me=new Map,P=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??me}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:c(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new N)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}attachShadow(e){return this.shadowRoot=new F(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName,n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${j(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${j(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?c(e):(e instanceof N,e.serialize())).join(``):a+=c(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}`}},F=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}appendChild(e){return this.childrenList.push(e),e}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}serialize(){return``}},I={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let r of t){if(r==null)continue;if(Array.isArray(r)){I.append(e,r);continue}if(typeof r==`function`){I.append(e,[r()]);continue}if(typeof r==`object`&&(`__ranFor`in r||`__ranIndex`in r))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=r instanceof R?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},L=`http://www.w3.org/2000/svg`,he=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),R=class{runtime;el;constructor(e,t,r=I){this.runtime=r;let i=t??(he.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new P(e):i?document.createElementNS(i,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{runtime;root;hostEl;constructor(e,t,n,r=I){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},z=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(z(t)):e.concat(t),[]),B=e=>e==null?null:e instanceof R?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,_e=(e,t)=>{if(n){H(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};b(()=>{let e=t();o();let n=document.createDocumentFragment();a=S(t=>(H(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),C(()=>a?.())},ve=`__ranFor`,ye=e=>typeof e==`object`&&!!e&&e[ve]===!0,be=(e,t,n)=>{let[r,i]=y(t),a=null,o=S(t=>{let i=B(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},V=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},xe=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;C(()=>{for(let e of i.values())e.dispose();i.clear()}),b(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o)){Ee()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=i.get(o);s?(i.delete(o),s.index(r)):s=be(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();V(r,a),i=n})},Se=`__ranIndex`,Ce=e=>typeof e==`object`&&!!e&&e[Se]===!0,we=(e,t,n)=>{let[r,i]=y(e),a=null,o=S(e=>{let i=B(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Te=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];C(()=>{for(let e of i)e.dispose();i=[]}),b(()=>{let e=t.each()??[];for(let n=0;n=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}V(r,i.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{n?x(()=>U(e,t)):U(e,t)},U=(e,t)=>{z(t).forEach(t=>{if(ye(t)){xe(e,t);return}if(Ce(t)){Te(e,t);return}if(typeof t==`function`){_e(e,t);return}let n=B(t);n!=null&&e.appendChild(n)})},Ee=()=>!1,De={bind(e,t){if(typeof e!=`function`){t(e);return}n?x(()=>t(e())):b(()=>t(e()))},append:H},Oe=class extends R{constructor(e,t){super(e,t,De)}};function ke(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,L),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:Ae,Div:je,Svg:Me,Span:Ne,Slot:Pe,ButtonBuilder:Fe,InputBuilder:Ie,Style:Le,Label:Re,Ul:ze,Li:Be,Section:Ve,Article:He,Nav:Ue,Header:We,Footer:Ge,Main:Ke,DeclarativeShadow:qe}=ke(Oe),Je=new Map;function Ye(e,t){n?(Je.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Xe=typeof document<`u`?HTMLElement:P,Ze=`data-ranui`,Qe=`data-ranui-sheet`,$e=(e,t)=>ae(e,t,Ze),et=(e,t)=>u(e,t,Qe),W=new WeakMap,G=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,K=new Map,q=e=>{let t=K.get(e);if(t!==void 0)return t;let n=e?`${e}\n${G}`:G;return K.set(e,n),n},tt=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||W.get(e)||e.attachShadow(n);return W.set(e,r),$e(r,q(t)),r},nt=(e,t,n=``)=>e.getAttribute(t)??n,rt=(e,t,n,r={})=>{if(r.removeEmpty&&!n){e.removeAttribute(t);return}e.setAttribute(t,n??``)},it=(e,t,n,r,i)=>{if(n!==`sheet`||r===i)return;let a=e.getAttribute(`sheet`)||``;a&&et(t,a)},J=`ran-theme`,at=`(prefers-color-scheme: dark)`,Y=null,X=e=>{if(e&&`style`in e)return e;if(e&&`documentElement`in e)return e.documentElement;if(!(typeof document>`u`))return document.documentElement},ot=(e,t)=>{e.setAttribute(`data-ran-theme`,t?`dark`:`light`),e.setAttribute(`theme`,t?`dark`:`light`)},st=()=>{Y?.(),Y=null},ct=(e,t)=>{let n=X(t);if(n){if(st(),e===`system`){if(typeof window>`u`)return;Y=o(at,e=>ot(n,e)),i(J,`system`);return}n.setAttribute(`data-ran-theme`,e),n.setAttribute(`theme`,e),i(J,e)}},lt=e=>{let t=X(e);if(!t)return``;let n=t.getAttribute(`data-ran-theme`)||t.getAttribute(`theme`)||``;return n===`light`||n===`dark`?a(J)===`system`?`system`:n:``},Z=[`system`,`light`,`dark`],ut={system:``,light:``,dark:``},Q=`ran-theme-switch-sync`,$=class extends Xe{static get observedAttributes(){return[`label-system`,`label-light`,`label-dark`,`sheet`]}_events=new ee;_shadowDom;_group;_buttons;constructor(){super(),this._shadowDom=tt(this,t),this._buttons=Z.map(e=>{let t=Fe().attr(`type`,`button`).data(`choice`,e).attr(`part`,`button ${e}`).aria(`pressed`,`false`).build();return n||(t.innerHTML=ut[e]),t}),this._group=je().class(`ran-theme-switch`).attr(`part`,`switch`).role(`group`).children(this._buttons).build(),this._shadowDom.appendChild(this._group)}get sheet(){return nt(this,`sheet`)}set sheet(e){rt(this,`sheet`,e)}get value(){return lt()||`system`}set value(e){Z.includes(e)&&this._select(e)}_label(e){let t={system:`System theme`,light:`Light theme`,dark:`Dark theme`}[e];return this.getAttribute(`label-${e}`)||t}_syncLabels(){this._group.setAttribute(`aria-label`,this.getAttribute(`label`)||`Theme`);for(let e of this._buttons)e.setAttribute(`aria-label`,this._label(e.dataset.choice))}_reflect(){let e=this.value;for(let t of this._buttons)t.setAttribute(`aria-pressed`,t.dataset.choice===e?`true`:`false`)}_select(e){ct(e),this._reflect(),this._syncMeta(e),document.dispatchEvent(new CustomEvent(Q)),this.dispatchEvent(new CustomEvent(`change`,{detail:{theme:e},bubbles:!0,composed:!0}))}_syncMeta(e){if(typeof requestAnimationFrame>`u`)return;let t=document.querySelectorAll(`meta[name="theme-color"]`);t.length&&requestAnimationFrame(()=>{for(let n of t)if(n.dataset.ranOriginalContent===void 0&&(n.dataset.ranOriginalContent=n.getAttribute(`content`)||``),e===`system`)n.setAttribute(`content`,n.dataset.ranOriginalContent);else{let e=getComputedStyle(document.documentElement).getPropertyValue(`--ran-color-bg`).trim()||getComputedStyle(document.body).backgroundColor;n.setAttribute(`content`,e)}})}_handleClick=e=>{let t=(e.target.closest?.(`button`))?.dataset.choice;t&&Z.includes(t)&&this._select(t)};_handleSync=()=>this._reflect();handlerExternalCss=()=>{it(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this._syncLabels(),this._reflect(),this._events.on(this._group,`click`,this._handleClick),document.addEventListener(Q,this._handleSync),typeof window<`u`&&window.addEventListener(`storage`,this._handleSync)}disconnectedCallback(){this._events.abort(),document.removeEventListener(Q,this._handleSync),typeof window<`u`&&window.removeEventListener(`storage`,this._handleSync)}attributeChangedCallback(e,t,n){t!==n&&(e===`sheet`&&this.handlerExternalCss(),e.startsWith(`label`)&&this._syncLabels())}};return Ye(`r-theme-switch`,$),e.ThemeSwitch=$,e.default=$,e})({}); \ No newline at end of file