From d31cae93e47c4d8f3d09fec88b2b0598f9a90de1 Mon Sep 17 00:00:00 2001 From: chaxus Date: Fri, 4 Dec 2026 14:45:02 +0800 Subject: [PATCH] chore(deps): upgrade ranui to 0.5.7, sync assets/tokens, align top-bar theme-switch, and drop dompurify override --- package.json | 2 +- packages/chat-ui/package.json | 2 +- packages/converter/package.json | 2 +- pnpm-lock.yaml | 172 ++++++++++++------------- pnpm-workspace.yaml | 1 - public/landing.css | 7 + public/ran-tokens.css | 2 +- public/ranui-iife/button.iife.js | 112 +++++++++++++++- 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 | 56 ++++---- public/ranui-iife/popover.iife.js | 2 +- public/ranui-iife/theme-switch.iife.js | 112 +++++++++++++++- 14 files changed, 351 insertions(+), 125 deletions(-) diff --git a/package.json b/package.json index b665f3377..5cbe14073 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@ranuts/converter": "workspace:*", "@ranuts/shared": "workspace:*", "pdfjs-dist": "5.4.624", - "ranui": "0.5.2", + "ranui": "0.5.7", "ranuts": "0.5.7" } } diff --git a/packages/chat-ui/package.json b/packages/chat-ui/package.json index 436fc55d7..01ebcad58 100644 --- a/packages/chat-ui/package.json +++ b/packages/chat-ui/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "marked": "16.4.2", - "ranui": "0.5.2", + "ranui": "0.5.7", "ranuts": "0.5.7" }, "devDependencies": { diff --git a/packages/converter/package.json b/packages/converter/package.json index 8f9632bdf..d5ebfb2fe 100644 --- a/packages/converter/package.json +++ b/packages/converter/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@ranuts/shared": "workspace:*", - "ranui": "0.5.2", + "ranui": "0.5.7", "ranuts": "0.5.7" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 96a8f9172..aef699889 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,6 @@ settings: excludeLinksFromLockfile: false overrides: - dompurify: 3.4.17 katex: 0.18.2 source-map-js: 1.2.2 undici: 8.12.3 @@ -37,8 +36,8 @@ importers: specifier: 5.4.624 version: 5.4.624 ranui: - specifier: 0.5.2 - version: 0.5.2 + specifier: 0.5.7 + version: 0.5.7 ranuts: specifier: 0.5.7 version: 0.5.7 @@ -108,8 +107,8 @@ importers: specifier: 16.4.2 version: 16.4.2 ranui: - specifier: 0.5.2 - version: 0.5.2 + specifier: 0.5.7 + version: 0.5.7 ranuts: specifier: 0.5.7 version: 0.5.7 @@ -124,8 +123,8 @@ importers: specifier: workspace:* version: link:../shared ranui: - specifier: 0.5.2 - version: 0.5.2 + specifier: 0.5.7 + version: 0.5.7 ranuts: specifier: 0.5.7 version: 0.5.7 @@ -146,8 +145,8 @@ importers: packages: - '@alixex/ranview@0.2.2': - resolution: {integrity: sha512-PNzlwvi44s2mN7fbUd4BaVxt4X3SGHRkHn6+90XtM0VywBQyd51xWhWurzDPodiXgDWC6xsyc8BQJRUupsi04Q==} + '@alixex/ranview@0.2.5': + resolution: {integrity: sha512-xVg3hKNxxUdQiCYVehqBFsGjz4c9F7LQJfz+EGCgN6pFwSXzOgpf8Y8Wc/phJT5kM2XrxeqVoRhAfE69cZFHAg==} engines: {node: '>=24.0.0'} '@anthropic-ai/sdk@0.106.0': @@ -580,36 +579,36 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@shikijs/core@4.4.3': - resolution: {integrity: sha512-QCR4q2ZO/ILJEuwiBMel4wdcTDb1JGwfjKTxPDF6x8ixOaluPrVqIn06C99AcRPhmYlBR56d/Fb+GN58GzExpg==} + '@shikijs/core@4.6.0': + resolution: {integrity: sha512-bfd4OKgvoyXYiYmMRuleA656P4V7M/Du9lcTl38Ngm6KszMj7bq4J1IGZwSYR4c95Tv5UQALtYNWUwaI9UT3xw==} engines: {node: '>=20'} - '@shikijs/engine-javascript@4.4.3': - resolution: {integrity: sha512-FbOjFJp9VLdo1Wevs10BBtVxiTWwNLqZh5Gkhjgda/ioL15YOgeSl9n+6XMa3qRlPQzfhFNe641SrynFHYG0nQ==} + '@shikijs/engine-javascript@4.6.0': + resolution: {integrity: sha512-K0oqxFoL+kEMdz89mHLFO15Tsbv3kFZ6WR1cXZKMvLSc+oqaM00A6pyga1qSeXB22dP0tTiSApRcGBaKWsEccg==} engines: {node: '>=20'} - '@shikijs/engine-oniguruma@4.4.3': - resolution: {integrity: sha512-EcOQkxdxGQrc1Row/cC2c96/v1dbZqGnEVu1qTuT/MJmp6+cXCvQussowVmCv5Tqr3KuY3c7IbM6HTW3LJ1k9w==} + '@shikijs/engine-oniguruma@4.6.0': + resolution: {integrity: sha512-aggd6Q7SuJOXNnsUbfG2XesxBJKBMAw/PDTUo9PyRjMaaJJ2dNrI+q0C+25ARXAK9yLHAlwxc9oRT2u68YKZ7w==} engines: {node: '>=20'} - '@shikijs/langs@4.4.3': - resolution: {integrity: sha512-ePic0yfAJGOF83D5wBHK/00EjK65oahBYxFk5epgq33WRv7X9UuxLEV8PtR0szC0z8dl7INIpIodB99JRFlR+A==} + '@shikijs/langs@4.6.0': + resolution: {integrity: sha512-1yMEX3oCVV54LUq/ovfpRkDQoYDkcvjSWFFa/YLUDMiSoRzMi2uxLJYbv41ahT8Lu9lFMaa7hecd3Q39trqUyg==} engines: {node: '>=20'} - '@shikijs/primitive@4.4.3': - resolution: {integrity: sha512-m0wBeLDQDeIxRdUmrCPdQqfuUamDwRL5isCfYbguKD6NiaKpVbsv+3J81DyIKgNW5h4WAIIr8T4EkgQrBBxvaQ==} + '@shikijs/primitive@4.6.0': + resolution: {integrity: sha512-c54+TQEo9ToqgfL/AU8FpjnV09+GA9Oa7M5ROkkXteZfp5XzpAJGXjjvZQFQioJOwm/w/6Z3lIzQstAkl8coag==} engines: {node: '>=20'} - '@shikijs/themes@4.4.3': - resolution: {integrity: sha512-w8UHjeUnIR965KMWJHUPXOc2mNJUnK3vpVLYLvw5IYU2mnTTJ89E24OrJDBNiJDQ0qzb0tc4l7mrIXx5cFeIyw==} + '@shikijs/themes@4.6.0': + resolution: {integrity: sha512-qHAVAs80RiGD+IRuH9G+JPDOEc9A/kHsng4EzCUCwB9bLzW6Z0y9WETh2YyCcADJBmfrIaJ1Jp7KBNP6FHkgtQ==} engines: {node: '>=20'} - '@shikijs/types@4.4.3': - resolution: {integrity: sha512-UEJxmRR++MAGR6hugn0vgVS2W/6lWAts84FFSrnlH9sP0LNol7E5+NQ792pH8liWUhyMyjhTgSUH3k7iD7tc5g==} + '@shikijs/types@4.6.0': + resolution: {integrity: sha512-+ENG1adsKt/X7cRYw1Nl7BEpBmPOjmQ7bR/eGmHuMlT8gtOFf3KEi5l31DJYyAWhW6Y6bjP1plU7FmaxWGENFw==} engines: {node: '>=20'} - '@shikijs/vscode-textmate@10.0.2': - resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + '@shikijs/vscode-textmate@10.1.0': + resolution: {integrity: sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ==} '@stablelib/base64@1.0.1': resolution: {integrity: sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==} @@ -861,8 +860,8 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dompurify@3.4.17: - resolution: {integrity: sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w==} + dompurify@3.5.1: + resolution: {integrity: sha512-9fRTM0QJhaSDzR2y4Ym59AW3J3wvNIsQrFQmDilCsExEA/Daks2t5UXh75tE38PB7v8S2/3+JP1UT89Zo9YvEg==} entities@8.1.0: resolution: {integrity: sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==} @@ -899,8 +898,8 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - hast-util-to-html@9.0.5: - resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} + hast-util-to-html@9.0.7: + resolution: {integrity: sha512-HYNDA3qdnzUPitY/LcQm1nWs8z0cWFNH1Nz09jdI/tXifAqF7h3+jrLl4S/b9Mi4VSjn0Dsn54ctuTV6zhBthA==} hast-util-whitespace@3.0.0: resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} @@ -1037,8 +1036,8 @@ packages: engines: {node: '>= 20'} hasBin: true - marked@18.0.9: - resolution: {integrity: sha512-/Sa4qiiHZxf0/FQdBBowr9q4r10krCwMvpK48FUBdXdUXScDxiQGR9zCPrFgRVR5LU3iySOiIjy09ZQvADir1w==} + marked@18.2.0: + resolution: {integrity: sha512-KaeL+tAbtvI930q7HE2PN5lYXYdT8EiSmxHlN6F3rsfb57wd5mp5W5TLazpdj4inTQBJdgjYwbs40W/0VUGU+Q==} engines: {node: '>= 20'} hasBin: true @@ -1134,12 +1133,12 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - ranui@0.5.2: - resolution: {integrity: sha512-NMmDNiggT5In+u+syj27mnsPeG7cN+nUrNo47mHbggxBdV6eDI1YNQLjV5D/ZrK8wHPL8I1jQq5EfXzk+d6JeA==} + ranui@0.5.7: + resolution: {integrity: sha512-Sb699RlRup3XtQYtaQMnIP/zNFI/2BgYCuupuvdwM+apsHcnFSHiaOK6Pe1zxnu+FpEiD+SeUtYGm8TDdaF8Bw==} engines: {node: '>=24.0.0'} - ranuts@0.5.2: - resolution: {integrity: sha512-Ab95R9EzviMP5MdhpkxDpOCRptA8MmKMhAJ6BqOhiqTCqE+YaDmqapDQ5POOOlIEsygJgij/UulMdC4ub4fqpw==} + ranuts@0.5.6: + resolution: {integrity: sha512-0xVnwofyeCqMhdHmFMUP1yiscJZQ9ijmaKLS0lpYXWhMCIAIgRZ6QNnn2L8iWqNjMF6NqTYfwiPX/1CcnqzyTQ==} engines: {node: '>=24.0.0'} ranuts@0.5.7: @@ -1155,8 +1154,8 @@ packages: regex@6.1.0: resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} - remend@1.3.0: - resolution: {integrity: sha512-iIhggPkhW3hFImKtB10w0dz4EZbs28mV/dmbcYVonWEJ6UGHHpP+bFZnTh6GNWJONg5m+U56JrL+8IxZRdgWjw==} + remend@1.4.0: + resolution: {integrity: sha512-mHiYhhwphs1IgIZmkToKLwJn0U99IjPXuutkA2acrNcG0vlEq2G4TGnd2eT0saIHwh2KjaCpvleHcsd5SAz96A==} require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} @@ -1171,8 +1170,8 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - shiki@4.4.3: - resolution: {integrity: sha512-Mb/GvXPHBAXdgGIcnfU5L3ldpn1XcxrGkPHwqgRx17/I2XRfqlFKk2vGkHWINn1kdXvzJZeuO3is6I9KLPFm0g==} + shiki@4.6.0: + resolution: {integrity: sha512-imjLsVHgPuWhvpU3P+zOekvMYqnel7QmKsFC4Sn0fCuAvaaalBsxwKEsrU8Ko5BdFnZA6Go/8a0RzahS634UgA==} engines: {node: '>=20'} source-map-js@1.2.2: @@ -1191,8 +1190,8 @@ packages: stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - temml@0.13.4: - resolution: {integrity: sha512-k1yolMBswx34Jw9hZn5Xh2/GBlwqlW+wiN7QaUYUMhSa1ypfti6rlCfSmCxWyooxH1G32C/Z+qVvgAsBOELZBQ==} + temml@0.14.0: + resolution: {integrity: sha512-tz1LW/5IZpThK8c7ZpdTSH/n56eAj+ThirLieErtKxYC3EKCIiB4sKdRUehAgH+fQmvIKqMfP3gqTLBdLpy9zw==} engines: {node: '>=18.13.0'} tinybench@6.2.2: @@ -1387,9 +1386,9 @@ packages: snapshots: - '@alixex/ranview@0.2.2': + '@alixex/ranview@0.2.5': dependencies: - ranuts: 0.5.2 + ranuts: 0.5.6 '@anthropic-ai/sdk@0.106.0': dependencies: @@ -1648,45 +1647,45 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@shikijs/core@4.4.3': + '@shikijs/core@4.6.0': dependencies: - '@shikijs/primitive': 4.4.3 - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/primitive': 4.6.0 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 - hast-util-to-html: 9.0.5 + hast-util-to-html: 9.0.7 - '@shikijs/engine-javascript@4.4.3': + '@shikijs/engine-javascript@4.6.0': dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 oniguruma-to-es: 4.3.6 - '@shikijs/engine-oniguruma@4.4.3': + '@shikijs/engine-oniguruma@4.6.0': dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 - '@shikijs/langs@4.4.3': + '@shikijs/langs@4.6.0': dependencies: - '@shikijs/types': 4.4.3 + '@shikijs/types': 4.6.0 - '@shikijs/primitive@4.4.3': + '@shikijs/primitive@4.6.0': dependencies: - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 - '@shikijs/themes@4.4.3': + '@shikijs/themes@4.6.0': dependencies: - '@shikijs/types': 4.4.3 + '@shikijs/types': 4.6.0 - '@shikijs/types@4.4.3': + '@shikijs/types@4.6.0': dependencies: - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 - '@shikijs/vscode-textmate@10.0.2': {} + '@shikijs/vscode-textmate@10.1.0': {} '@stablelib/base64@1.0.1': {} @@ -1866,7 +1865,7 @@ snapshots: dependencies: dequal: 2.0.3 - dompurify@3.4.17: + dompurify@3.5.1: optionalDependencies: '@types/trusted-types': 2.0.7 @@ -1891,7 +1890,7 @@ snapshots: fsevents@2.3.3: optional: true - hast-util-to-html@9.0.5: + hast-util-to-html@9.0.7: dependencies: '@types/hast': 3.0.5 '@types/unist': 3.0.3 @@ -2034,7 +2033,7 @@ snapshots: marked@16.4.2: {} - marked@18.0.9: {} + marked@18.2.0: {} mdast-util-to-hast@13.2.1: dependencies: @@ -2135,17 +2134,18 @@ snapshots: punycode@2.3.1: {} - ranui@0.5.2: + ranui@0.5.7: dependencies: - '@alixex/ranview': 0.2.2 - dompurify: 3.4.17 - marked: 18.0.9 - ranuts: 0.5.2 - remend: 1.3.0 - shiki: 4.4.3 - temml: 0.13.4 + '@alixex/ranview': 0.2.5 + '@shikijs/langs': 4.6.0 + dompurify: 3.5.1 + marked: 18.2.0 + ranuts: 0.5.7 + remend: 1.4.0 + shiki: 4.6.0 + temml: 0.14.0 - ranuts@0.5.2: + ranuts@0.5.6: dependencies: jschardet: 3.1.4 @@ -2163,7 +2163,7 @@ snapshots: dependencies: regex-utilities: 2.3.0 - remend@1.3.0: {} + remend@1.4.0: {} require-from-string@2.0.2: {} @@ -2192,15 +2192,15 @@ snapshots: dependencies: xmlchars: 2.2.0 - shiki@4.4.3: + shiki@4.6.0: dependencies: - '@shikijs/core': 4.4.3 - '@shikijs/engine-javascript': 4.4.3 - '@shikijs/engine-oniguruma': 4.4.3 - '@shikijs/langs': 4.4.3 - '@shikijs/themes': 4.4.3 - '@shikijs/types': 4.4.3 - '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/core': 4.6.0 + '@shikijs/engine-javascript': 4.6.0 + '@shikijs/engine-oniguruma': 4.6.0 + '@shikijs/langs': 4.6.0 + '@shikijs/themes': 4.6.0 + '@shikijs/types': 4.6.0 + '@shikijs/vscode-textmate': 10.1.0 '@types/hast': 3.0.5 source-map-js@1.2.2: {} @@ -2219,7 +2219,7 @@ snapshots: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 - temml@0.13.4: {} + temml@0.14.0: {} tinybench@6.2.2: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 39b60be3b..925a840cd 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -10,7 +10,6 @@ patchedDependencies: # Security fixes for transitive dependencies; remove when upstream ranges # select patched releases (KaTeX currently remains on Mermaid's 0.16 range). overrides: - dompurify: 3.4.17 katex: 0.18.2 source-map-js: 1.2.2 undici: 8.12.3 diff --git a/public/landing.css b/public/landing.css index 09bbf9db1..04ed25aa6 100644 --- a/public/landing.css +++ b/public/landing.css @@ -240,6 +240,10 @@ header.bar nav a:hover { header.bar nav a { padding-inline: var(--ran-space-2); } + header.bar r-theme-switch.theme-switch { + --ran-theme-switch-width: 6rem; + --ran-theme-switch-min-width: 5.5rem; + } } /* ---------- article column ---------- */ @@ -527,6 +531,9 @@ footer a:hover { r-theme-switch.theme-switch { vertical-align: middle; } +header.bar r-theme-switch.theme-switch { + --ran-theme-switch-trigger-min-height: 38px; +} r-theme-switch.theme-switch:not(:defined) { display: inline-block; width: 94px; diff --git a/public/ran-tokens.css b/public/ran-tokens.css index 79ca5adcf..ded69eb87 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-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-media-background: #000;--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)}r-content:not(:defined),r-popover:not(:defined)>r-content,r-select:not(:defined)>r-option,r-modal:not(:defined),r-route:not(:defined),r-reasoning:not(:defined),r-markdown:not(:defined),r-math:not(:defined),r-mermaid:not(:defined){display:none}r-tabs:not(:defined)>r-tab:not(:first-of-type){display:none}r-scratch:not(:defined){visibility:hidden} +:root{--ran-background-100: #ffffff;--ran-background-200: #f7f7f8;--ran-gray-100: #f0f0f2;--ran-gray-200: #ebebee;--ran-gray-300: #e2e2e6;--ran-gray-400: #e4e4e8;--ran-gray-500: #b8b8c0;--ran-gray-600: #9d9da6;--ran-gray-700: #8a8a94;--ran-gray-800: #6e6e78;--ran-gray-900: #55555e;--ran-gray-1000: #111113;--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: #0a6cff;--ran-blue-800: #0a5bd8;--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: #d70f2f;--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: #2a2a2e;--ran-color-primary-active: #3f3f46;--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-border-control: var(--ran-gray-700);--ran-color-border-control-hover: var(--ran-gray-900);--ran-color-text-placeholder: var(--ran-gray-800);--ran-color-focus: var(--ran-blue-700);--ran-color-link: var(--ran-blue-800);--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-xs: 4px;--ran-radius-sm: 8px;--ran-radius-md: 12px;--ran-radius-lg: 16px;--ran-radius-xl: 24px;--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);--ran-shadow-menu: 0 1px 2px rgba(0, 0, 0, .06), 0 12px 32px -8px rgba(0, 0, 0, .16);--ran-shadow-modal: 0 2px 4px rgba(0, 0, 0, .06), 0 24px 64px -12px rgba(0, 0, 0, .24);--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-color-focus);--ran-focus-ring-inverse-color: #fff;--ran-media-background: #000;--ran-backdrop-ink-dark: #fff;--ran-backdrop-ink-light: #18181b;--ran-backdrop-highlight: rgba(255, 255, 255, .6);--ran-backdrop-edge-light: rgba(15, 23, 42, .14);--ran-backdrop-shadow-light: rgba(15, 23, 42, .28);--ran-motion-duration-fast: .14s;--ran-motion-duration-base: .2s;--ran-motion-duration-slow: .28s;--ran-motion-ease-standard: cubic-bezier(.2, 0, 0, 1);--ran-motion-ease-snappy: cubic-bezier(.33, 0, .15, 1);--ran-motion-ease-spring: cubic-bezier(.3, 1.1, .4, 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;--ran-surface-glass-blur: 12px;--ran-surface-glass-saturate: 180%;--ran-surface-glass-brightness: 1.08;--ran-surface-glass-fill: rgba(255, 255, 255, .55);--ran-surface-glass-specular: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .14) 24%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .28) 0%, transparent 30%);--ran-surface-glass-border: rgba(255, 255, 255, .72);--ran-surface-glass-shadow: 0 8px 24px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(255, 255, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .4), inset 0 0 0 .5px rgba(255, 255, 255, .5);--ran-surface-glass-overlay-blur: 18px;--ran-surface-glass-overlay-fill: rgba(255, 255, 255, .48);--ran-surface-glass-overlay-specular: linear-gradient(180deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .12) 24%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .22) 0%, transparent 30%), radial-gradient(120% 55% at 50% -8%, rgba(255, 255, 255, .28), transparent 58%);--ran-surface-glass-overlay-border: rgba(255, 255, 255, .72);--ran-surface-glass-overlay-shadow: 0 18px 48px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(255, 255, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .4), inset 0 0 0 .5px rgba(255, 255, 255, .5), inset 0 -24px 48px rgba(255, 255, 255, .1);--ran-surface-glass-solid-fallback: var(--ran-color-bg-elevated);--ran-surface-glass-solid-shadow: var(--ran-shadow-elevated);--ran-surface-glass-overlay-solid-fallback: var(--ran-color-bg-elevated);--ran-surface-glass-overlay-solid-shadow: var(--ran-shadow-modal);--ran-surface-glass-hover: color-mix(in srgb, var(--ran-gray-1000) 8%, transparent);--ran-surface-glass-selected: color-mix(in srgb, var(--ran-gray-100) 58%, transparent)}@media(prefers-color-scheme:dark){:root:not([data-ran-theme=light]):not([theme=light]):not(.light){--ran-background-100: #0a0a0b;--ran-background-200: #111113;--ran-gray-100: #1c1c20;--ran-gray-200: #232328;--ran-gray-300: #2c2c32;--ran-gray-400: #26262b;--ran-gray-500: #3f3f46;--ran-gray-600: #52525b;--ran-gray-700: #71717a;--ran-gray-800: #8b8b94;--ran-gray-900: #a1a1aa;--ran-gray-1000: #ededef;--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: #3b82f6;--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: #d70f2f;--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: #18181b;--ran-color-link: #5b9dff;--ran-color-primary-hover: #d4d4d8;--ran-color-primary-active: #b4b4bb;--ran-shadow-elevated: inset 0 1px 0 rgba(255, 255, 255, .06), 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);--ran-surface-glass-fill: rgba(26, 26, 26, .55);--ran-surface-glass-specular: linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .08) 22%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .16) 0%, transparent 28%);--ran-surface-glass-border: rgba(166, 166, 166, .55);--ran-surface-glass-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 .5px rgba(166, 166, 166, .55), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .18), inset 0 0 0 .5px rgba(255, 255, 255, .22);--ran-surface-glass-overlay-fill: rgba(26, 26, 26, .62);--ran-surface-glass-overlay-specular: linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .08) 22%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .18) 0%, transparent 28%), radial-gradient(120% 55% at 50% -8%, rgba(255, 255, 255, .2), transparent 58%);--ran-surface-glass-overlay-border: rgba(166, 166, 166, .55);--ran-surface-glass-overlay-shadow: 0 18px 48px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(166, 166, 166, .55), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(255, 255, 255, .2), inset 0 0 0 .5px rgba(255, 255, 255, .25), inset 0 -24px 48px rgba(255, 255, 255, .04);--ran-surface-glass-hover: color-mix(in srgb, var(--ran-gray-1000) 18%, transparent);--ran-surface-glass-selected: color-mix(in srgb, var(--ran-gray-1000) 28%, transparent)}}:root[data-ran-theme=dark],:root[theme=dark],:root.dark{--ran-background-100: #0a0a0b;--ran-background-200: #111113;--ran-gray-100: #1c1c20;--ran-gray-200: #232328;--ran-gray-300: #2c2c32;--ran-gray-400: #26262b;--ran-gray-500: #3f3f46;--ran-gray-600: #52525b;--ran-gray-700: #71717a;--ran-gray-800: #8b8b94;--ran-gray-900: #a1a1aa;--ran-gray-1000: #ededef;--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: #3b82f6;--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: #d70f2f;--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: #18181b;--ran-color-link: #5b9dff;--ran-color-primary-hover: #d4d4d8;--ran-color-primary-active: #b4b4bb;--ran-shadow-elevated: inset 0 1px 0 rgba(255, 255, 255, .06), 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);--ran-surface-glass-fill: rgba(26, 26, 26, .55);--ran-surface-glass-specular: linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .08) 22%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .16) 0%, transparent 28%);--ran-surface-glass-border: rgba(166, 166, 166, .55);--ran-surface-glass-shadow: 0 8px 24px rgba(0, 0, 0, .4), 0 0 0 .5px rgba(166, 166, 166, .55), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .18), inset 0 0 0 .5px rgba(255, 255, 255, .22);--ran-surface-glass-overlay-fill: rgba(26, 26, 26, .62);--ran-surface-glass-overlay-specular: linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .08) 22%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .18) 0%, transparent 28%), radial-gradient(120% 55% at 50% -8%, rgba(255, 255, 255, .2), transparent 58%);--ran-surface-glass-overlay-border: rgba(166, 166, 166, .55);--ran-surface-glass-overlay-shadow: 0 18px 48px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(166, 166, 166, .55), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(255, 255, 255, .2), inset 0 0 0 .5px rgba(255, 255, 255, .25), inset 0 -24px 48px rgba(255, 255, 255, .04);--ran-surface-glass-hover: color-mix(in srgb, var(--ran-gray-1000) 18%, transparent);--ran-surface-glass-selected: color-mix(in srgb, var(--ran-gray-1000) 28%, transparent)}r-content:not(:defined),r-popover:not(:defined)>r-content,r-select:not(:defined)>r-option,r-modal:not(:defined),r-route:not(:defined),r-reasoning:not(:defined),r-markdown:not(:defined),r-math:not(:defined),r-mermaid:not(:defined){display:none}r-tabs:not(:defined)>r-tab:not(:first-of-type){display:none}r-scratch:not(:defined){visibility:hidden}:where(r-button:not(:defined):not([data-ran-dsd])){display:inline-flex;align-items:center;box-sizing:border-box;min-height:var(--ran-btn-height, var(--ran-size-7, 32px));padding:var(--ran-btn-padding, var(--ran-space-2, 8px) var(--ran-space-4, 16px));border:1px solid transparent;font-size:var(--ran-btn-font-size, var(--ran-text-button-size, 14px));font-family:var(--ran-btn-font-family, var(--ran-skin-font-family, inherit));font-weight:var(--ran-btn-font-weight, var(--ran-text-button-weight, 500));line-height:1;white-space:nowrap}:where(r-input:not(:defined):not([data-ran-dsd])){display:block;min-height:var(--ran-input-min-height, var(--ran-size-7, 32px))}:where(r-input[label]:not(:defined):not([data-ran-dsd])){font-size:var(--ran-text-label-1, 14px);min-height:calc(1lh + var(--ran-space-1, 4px) + var(--ran-input-min-height, var(--ran-size-7, 32px)))}:where(r-select:not(:defined):not([data-ran-dsd])){display:inline-block;min-height:var(--ran-select-min-height, var(--ran-size-7, 32px))}:where(r-select[label]:not(:defined):not([data-ran-dsd])){font-size:var(--ran-text-label-1, 14px);min-height:calc(1lh + var(--ran-space-1, 4px) + var(--ran-select-min-height, var(--ran-size-7, 32px)))}:where(r-checkbox:not(:defined):not([data-ran-dsd])){display:inline-block;padding-inline-start:calc(var(--ran-checkbox-width, var(--ran-size-1, 16px)) + var(--ran-checkbox-label-gap, 8px));font-size:var(--ran-checkbox-label-font-size, var(--ran-text-label-1, 14px));font-family:var(--ran-checkbox-label-font-family, var(--ran-skin-font-family, inherit));font-weight:var(--ran-checkbox-label-font-weight, var(--ran-text-label-weight, 500));line-height:var(--ran-checkbox-label-line-height, 1.5)}:where(r-theme-switch:not(:defined):not([data-ran-dsd])){display:inline-flex;box-sizing:border-box;width:var(--ran-theme-switch-width, 8.75rem);min-width:var(--ran-theme-switch-min-width, 7.5rem);max-width:var(--ran-theme-switch-max-width, 11rem);min-height:var(--ran-theme-switch-trigger-min-height, 32px)}:where(r-surface-switch:not(:defined):not([data-ran-dsd])){display:inline-flex;box-sizing:border-box;width:var(--ran-surface-switch-width, 10.5rem);min-width:var(--ran-surface-switch-min-width, 9rem);max-width:var(--ran-surface-switch-max-width, 13rem);min-height:var(--ran-surface-switch-trigger-min-height, 32px)}:where(r-progress:not(:defined):not([data-ran-dsd])){display:block;box-sizing:border-box;width:var(--ran-progress-width, 100%);min-height:var(--ran-progress-height, var(--ran-size-3, 20px))}:where(r-loading:not(:defined):not([data-ran-dsd])){display:inline-block;box-sizing:border-box;min-inline-size:var(--ran-loading-size, var(--ran-space-10, 40px));min-block-size:var(--ran-loading-size, var(--ran-space-10, 40px))}:where(r-skeleton:not(:defined):not([data-ran-dsd])){display:block;box-sizing:border-box;width:var(--ran-skeleton-width, 100%);min-height:var(--ran-skeleton-height, var(--ran-size-1, 16px))}:where(r-state-dot:not(:defined):not([data-ran-dsd])){display:inline-block;box-sizing:border-box;width:var(--ran-state-dot-size, 8px);height:var(--ran-state-dot-size, 8px);vertical-align:middle}:where(r-token-meter:not(:defined):not([data-ran-dsd])){display:inline-flex;align-items:center;box-sizing:border-box;gap:var(--ran-token-meter-gap, var(--ran-space-2));min-height:calc(1lh + var(--ran-token-meter-track-height, .375rem));font-size:var(--ran-token-meter-font-size, var(--ran-text-label-3));color:var(--ran-token-meter-color, var(--ran-color-text-secondary))} diff --git a/public/ranui-iife/button.iife.js b/public/ranui-iife/button.iife.js index 3f0a2b582..f23e38914 100644 --- a/public/ranui-iife/button.iife.js +++ b/public/ranui-iife/button.iife.js @@ -1 +1,111 @@ -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=`data-adopted-style`,s=(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}},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)}},ee=`: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 .ran-btn:focus-visible{outline:var(--ran-btn-focus-outline,2px solid var(--ran-color-link));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}}`,l=typeof document>`u`,u=0,d=1,f=2,p=null,m=null,h=0,g=new Set,_=!1;function v(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)C(e,f);h===0&&ie()}}]}function y(e){let t=te(e,!0);return ne(t),T(t),()=>D(t)}function b(e){let t=p;p=null;try{return e()}finally{p=t}}function x(e){let t={owned:[],cleanups:[],owner:m},n=m,r=p;m=t,p=null;try{return e(()=>ae(t))}finally{m=n,p=r}}function S(e){m&&m.cleanups.push(e)}function te(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:f,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:m}}function ne(e){m&&m.owned.push(e)}function re(e){p&&(p.sources.add(e),e.observers.add(p))}function C(e,t){if(e.disposed||e.state>=t)return;let n=e.state===u;if(e.state=t,e.isEffect)g.add(e);else if(n)for(let t of e.observers)C(t,d)}function ie(){if(!(h>0||_)){_=!0;try{for(;g.size>0;){let e=[...g];g.clear();for(let t of e)t.disposed||w(t)}}finally{_=!1}}}function w(e){if(!(e.disposed||e.state===u)){if(e.state===d)for(let t of e.sources)`fn`in t&&w(t);e.state===f&&T(e),e.state=u}}function T(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);E(e);let t=p,n=m;p=e,m=e,e.running=!0,e.state=u;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)C(t,f)}}finally{e.running=!1,p=t,m=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 ae(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 O(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))},k=(e,t,n)=>{for(let r of e)oe(r)&&(ue(r,t)&&n.push(r),k(r.childrenList,t,n))},A=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 k(this.childrenList,e,t),t}},de=new Map,j=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 A)}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 k(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}="${O(t)}"`).join(``),i=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=i?` style="${O(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 A,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 k(this.childrenList,e,t),t}serialize(){return``}},M={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)){M.append(e,n);continue}if(typeof n==`function`){M.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 N?n.build():typeof n==`string`&&!l?document.createTextNode(n):n;e.appendChild(t)}}},pe=`http://www.w3.org/2000/svg`,me=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{runtime;el;constructor(e,t,n=M){this.runtime=n;let r=t??(me.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=l?new j(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=>{l?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(l){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 he(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(l)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},he=class{runtime;root;hostEl;constructor(e,t,n,r=M){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(l)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 l?this.root.serialize():this.root.innerHTML}},P=()=>({current:null}),F=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(F(t)):e.concat(t),[]),I=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?l?e:document.createTextNode(e):e,L=(e,t)=>{if(l){B(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}};y(()=>{let e=t();a();let n=document.createDocumentFragment();i=x(t=>(B(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),S(()=>i?.())},R=`__ranFor`,ge=e=>typeof e==`object`&&!!e&&e[R]===!0,_e=(e,t,n)=>{let[r,i]=v(t),a=null,o=x(t=>{let i=I(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},z=(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(l){(t.each()??[]).forEach((n,r)=>{let i=I(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;S(()=>{for(let e of r.values())e.dispose();r.clear()}),y(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){H()&&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();z(n,a),r=i})},ye=`__ranIndex`,be=e=>typeof e==`object`&&!!e&&e[ye]===!0,xe=(e,t,n)=>{let[r,i]=v(e),a=null,o=x(e=>{let i=I(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Se=(e,t)=>{if(l){(t.each()??[]).forEach((n,r)=>{let i=I(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];S(()=>{for(let e of r)e.dispose();r=[]}),y(()=>{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()}z(n,r.map(e=>e.node).filter(e=>e!=null))})},B=(e,t)=>{l?b(()=>V(e,t)):V(e,t)},V=(e,t)=>{F(t).forEach(t=>{if(ge(t)){ve(e,t);return}if(be(t)){Se(e,t);return}if(typeof t==`function`){L(e,t);return}let n=I(t);n!=null&&e.appendChild(n)})},H=()=>!1,Ce={bind(e,t){typeof e==`function`?l?b(()=>t(e())):y(()=>t(e())):t(e)},append:B},we=class extends N{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,pe),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:U,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){l?(Ue.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ge=typeof document<`u`?HTMLElement:j,Ke=[!1,`false`,null,void 0],W=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!(!t||Ke.includes(n))},qe=`data-ranui`,G=`data-ranui-sheet`,Je=(e,t)=>c(e,t,qe),K=new WeakMap,q=new Map,Ye=e=>{if(typeof CSSStyleSheet>`u`)return;let t=q.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},q.set(e,t)}catch{return}return t.users++,t.sheet},J=e=>{let t=q.get(e);t&&--t.users===0&&q.delete(e)},Xe=(e,t)=>{if(typeof document>`u`)return;let n=K.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),J(n.text)):n&&e.querySelector(`style[${G}]`)?.remove(),K.delete(e),!t))return;let r=Ye(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{J(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(G,``),n.textContent=t,e.appendChild(n)}K.set(e,{text:t,sheet:r})},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,Ze=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},Qe=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),Je(r,Ze(t)),r},Q=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},$e=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Xe(t,e.getAttribute(`sheet`)||``)};function et(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=Qe(this,ee);let e=P(),t=P(),n=U().class(`ran-btn`).attr(`part`,`button`).role(`button`).tabIndex(0).children(U().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 W(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`)}focus(e){W(this)||this._btn.focus(e)}click(){W(this)||super.click()}_guardDisabledClick=e=>{W(this)&&(e.preventDefault(),e.stopImmediatePropagation())};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=>{W(this)||et(e)&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&=(clearTimeout(this.debounceTimeId),void 0)};handlerExternalCss=()=>{$e(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11yState=()=>{let e=W(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,`click`,this._guardDisabledClick,{capture:!0}).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 +var ranui_button=(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,a=n((()=>{i=()=>{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`}}));function o(e){let t=``+e,n=s.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{s=/["'&<>]/})),te,ne=n((()=>{te=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}}})),re,ie,ae,oe,se=n((()=>{re=new Map,ie=`data-adopted-style`,ae=(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}},oe=(e,t,n=ie)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!ae(e,t,re)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}}})),c=n((()=>{ee(),ne(),se(),a()}));c();var ce=`: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,8px));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,8px));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 .ran-btn:focus-visible{outline:var(--ran-btn-focus-outline,2px solid var(--ran-color-focus,#0a6cff));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,#111113));background-image:var(--ran-btn-content-background-image,none);border-color:var(--ran-btn-border-color,var(--ran-color-primary,#111113));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,#3f3f46));border-color:var(--ran-btn-active-border-color,var(--ran-color-primary-active,#3f3f46))}@media (hover:hover){:host(:not([disabled],[type=text]):hover) .ran-btn-content{border-color:var(--ran-btn-hover-border-color,var(--ran-color-border-hover,#b8b8c0));color:var(--ran-btn-hover-color,var(--ran-color-text,#111113))}:host([type=text]:not([disabled]):hover) .ran-btn-content{color:var(--ran-btn-hover-color,var(--ran-color-text,#111113))}:host([type=primary]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-hover-background,var(--ran-color-primary-hover,#2a2a2e));border-color:var(--ran-btn-hover-border-color,var(--ran-color-primary-hover,#2a2a2e));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,#d70f2f));background-color:var(--ran-btn-warning-background,var(--ran-color-danger,#d70f2f));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,#d70f2f));background-color:var(--ran-btn-warning-background,var(--ran-color-danger,#d70f2f));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, var(--ran-btn-warning-color,#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,1px solid transparent)}: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,1);box-shadow:var(--ran-btn-disabled-box-shadow,none)}: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,1)}:host([disabled]) .ran-btn-content{background-color:var(--ran-btn-disabled-background,var(--ran-color-bg-subtle,#f7f7f8));border-color:var(--ran-btn-disabled-border-color,var(--ran-color-border,#e4e4e8));color:var(--ran-btn-disabled-color,var(--ran-color-text-disabled,#8a8a94))}:host([type=text][disabled]) .ran-btn-content{background-color:var(--ran-btn-text-disabled-background,transparent);border-color:#0000}: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{scale:var(--ran-btn-active-scale,.96)}@media (hover:hover){: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)}}@media (prefers-reduced-motion:reduce){:host .ran-btn:after{display:none}}:host .slot{display:var(--ran-btn-slot-display,block)}.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);min-height:var(--ran-btn-height,var(--ran-size-7,32px));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,8px));border-color:var(--ran-btn-border-color,var(--ran-color-border,#e4e4e8));color:var(--ran-btn-color,var(--ran-color-text,#111113));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,scale .1s var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 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}}:host([surface=glass]:not([type=primary],[type=warning],[type=text],[disabled])){box-shadow:none}:host([surface=glass]:not([type=primary],[type=warning],[type=text],[disabled])) .ran-btn{background:var(--ran-surface-glass-specular,linear-gradient(180deg, #ffffff8c 0%, #ffffff24 24%, transparent 48%), linear-gradient(0deg, #ffffff47 0%, transparent 30%)), var(--ran-surface-glass-fill,#ffffff8c);-webkit-backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-border,#ffffffb8);box-shadow:var(--ran-surface-glass-shadow,0 8px 24px #00000024, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80)}@media (prefers-reduced-transparency:reduce){:host([surface=glass]:not([type=primary],[type=warning],[type=text],[disabled])) .ran-btn{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-solid-shadow,var(--ran-shadow-elevated))}}:host([surface=glass]:not([type=primary],[type=warning],[type=text],[disabled])) .ran-btn-content{border-color:var(--ran-btn-glass-border-color,var(--ran-surface-glass-border));background-color:#0000}:host-context([data-ran-surface="glass"]):host(:not([surface=solid]):not([type=primary]):not([type=warning]):not([type=text]):not([disabled])){box-shadow:none}:host-context([data-ran-surface="glass"]):host(:not([surface=solid]):not([type=primary]):not([type=warning]):not([type=text]):not([disabled])) .ran-btn{background:var(--ran-surface-glass-specular,linear-gradient(180deg, #ffffff8c 0%, #ffffff24 24%, transparent 48%), linear-gradient(0deg, #ffffff47 0%, transparent 30%)), var(--ran-surface-glass-fill,#ffffff8c);-webkit-backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-border,#ffffffb8);box-shadow:var(--ran-surface-glass-shadow,0 8px 24px #00000024, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80)}@media (prefers-reduced-transparency:reduce){:host-context([data-ran-surface="glass"]):host(:not([surface=solid]):not([type=primary]):not([type=warning]):not([type=text]):not([disabled])) .ran-btn{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-solid-shadow,var(--ran-shadow-elevated))}}:host-context([data-ran-surface="glass"]):host(:not([surface=solid]):not([type=primary]):not([type=warning]):not([type=text]):not([disabled])) .ran-btn-content{border-color:var(--ran-btn-glass-border-color,var(--ran-surface-glass-border));background-color:#0000}`,l,u=n((()=>{l=typeof document>`u`})),le=n((()=>{}));function ue(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(he(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)p(e,_);b===0&&ge()}}]}function d(e){let t=pe(e,!0);return me(t),ve(t),()=>m(t)}function de(e){let t=v;v=null;try{return e()}finally{v=t}}function fe(e){let t={owned:[],cleanups:[],owner:y},n=y,r=v;y=t,v=null;try{return e(()=>be(t))}finally{y=n,v=r}}function f(e){y&&y.cleanups.push(e)}function pe(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:_,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:y}}function me(e){y&&y.owned.push(e)}function he(e){v&&(v.sources.add(e),e.observers.add(v))}function p(e,t){if(e.disposed||e.state>=t)return;let n=e.state===h;if(e.state=t,e.isEffect)x.add(e);else if(n)for(let t of e.observers)p(t,g)}function ge(){if(!(b>0||S)){S=!0;try{for(;x.size>0;){let e=[...x];x.clear();for(let t of e)t.disposed||_e(t)}}finally{S=!1}}}function _e(e){if(!(e.disposed||e.state===h)){if(e.state===g)for(let t of e.sources)`fn`in t&&_e(t);e.state===_&&ve(e),e.state=h}}function ve(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);ye(e);let t=v,n=y;v=e,y=e,e.running=!0,e.state=h;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)p(t,_)}}finally{e.running=!1,v=t,y=n}}function ye(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,ye(e),e.observers.clear())}function be(e){for(let t of e.owned)m(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var h,g,_,v,y,b,x,S,xe=n((()=>{h=0,g=1,_=2,v=null,y=null,b=0,x=new Set,S=!1}));function Se(e){return o(e)}var Ce=n((()=>{c()}));function we(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 Te,Ee,De,Oe,C,ke=n((()=>{Te=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,Ee=`.#[`,De=(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()},Oe=(e,t)=>{let n=t.trim();if(!n)return!1;let r=we(n);return r!==null&&r.every(t=>De(e,t))},C=(e,t,n)=>{for(let r of e)Te(r)&&(Oe(r,t)&&n.push(r),C(r.childrenList,t,n))}}));function w(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var T,Ae,je,Me,Ne=n((()=>{Ce(),ke(),T=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return w(this.childrenList,e,t)}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 C(this.childrenList,e,t),t}},Ae=new Map,je=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: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 T)}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}insertBefore(e,t){return w(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new Me(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(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;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${Se(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${Se(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 T,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}`}},Me=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof T))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return w(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return C(this.childrenList,e,t),t}serialize(){return``}}})),E,Pe,Fe,D,Ie,Le=n((()=>{u(),Ne(),E={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)){E.append(e,n);continue}if(typeof n==`function`){E.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 D?n.build():typeof n==`string`&&!l?document.createTextNode(n):n;e.appendChild(t)}}},Pe=`http://www.w3.org/2000/svg`,Fe=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(`.`)),D=class{runtime;el;constructor(e,t,n=E){this.runtime=n;let r=t??(Fe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=l?new je(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=>{l?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(l){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 Ie(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(l)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Ie=class{runtime;root;hostEl;constructor(e,t,n,r=E){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(l)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 l?this.root.serialize():this.root.innerHTML}}})),Re,ze,O,Be,Ve,He,Ue,k,We,Ge,Ke,qe,Je,A,j,Ye,Xe,Ze,Qe=n((()=>{u(),Le(),xe(),Re=()=>({current:null}),ze=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(ze(t)):e.concat(t),[]),O=e=>e==null?null:e instanceof D?e.build():typeof e==`string`?l?e:document.createTextNode(e):e,Be=(e,t)=>{if(l){A(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=fe(t=>(A(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),f(()=>i?.())},Ve=`__ranFor`,He=e=>typeof e==`object`&&!!e&&e[Ve]===!0,Ue=(e,t,n)=>{let[r,i]=ue(t),a=null,o=fe(t=>{let i=O(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},We=(e,t)=>{if(l){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;f(()=>{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)){Ye()&&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=Ue(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();k(n,a),r=i})},Ge=`__ranIndex`,Ke=e=>typeof e==`object`&&!!e&&e[Ge]===!0,qe=(e,t,n)=>{let[r,i]=ue(e),a=null,o=fe(e=>{let i=O(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Je=(e,t)=>{if(l){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];f(()=>{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()}k(n,r.map(e=>e.node).filter(e=>e!=null))})},A=(e,t)=>{l?de(()=>j(e,t)):j(e,t)},j=(e,t)=>{ze(t).forEach(t=>{if(He(t)){We(e,t);return}if(Ke(t)){Je(e,t);return}if(typeof t==`function`){Be(e,t);return}let n=O(t);n!=null&&e.appendChild(n)})},Ye=()=>!1,Xe={bind(e,t){typeof e==`function`?l?de(()=>t(e())):d(()=>t(e())):t(e)},append:A},Ze=class extends D{constructor(e,t){super(e,t,Xe)}}}));function $e(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,Pe),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 et=n((()=>{Le()})),M,N,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t=n((()=>{Qe(),et(),{View:M,Div:N,Svg:tt,Span:nt,Slot:rt,ButtonBuilder:it,InputBuilder:at,Style:ot,Label:st,Ul:ct,Li:lt,Section:ut,Article:dt,Nav:ft,Header:pt,Footer:mt,Main:ht,DeclarativeShadow:gt}=$e(Ze)})),vt=n((()=>{u(),le(),xe(),Ce(),ke(),Ne(),Qe(),_t()})),yt=n((()=>{vt()}));function bt(e,t){l?(P.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}function xt(e){return P.get(e)}var P,St=n((()=>{vt(),P=new Map})),Ct,F,wt=n((()=>{Ne(),Ct=()=>typeof document<`u`?HTMLElement:je,F=Ct()}));yt(),wt();var Tt=[!1,`false`,null,void 0],I=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!(!t||Tt.includes(n))},Et,L,R,z,B,Dt,V,Ot,kt=n((()=>{c(),Et=`data-ranui`,L=`data-ranui-sheet`,R=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}oe(e,t,Et)},z=new WeakMap,B=new Map,Dt=e=>{if(typeof CSSStyleSheet>`u`)return;let t=B.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},B.set(e,t)}catch{return}return t.users++,t.sheet},V=e=>{let t=B.get(e);t&&--t.users===0&&B.delete(e)},Ot=(e,t)=>{if(typeof document>`u`)return;let n=z.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),V(n.text)):n&&e.querySelector(`style[${L}]`)?.remove(),z.delete(e),!t))return;let r=Dt(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{V(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(L,``),n.textContent=t,e.appendChild(n)}z.set(e,{text:t,sheet:r})}})),H,U,At,jt,Mt,W,Nt,G,Pt,Ft,K,q,J,Y,It,Lt=n((()=>{kt(),H=new WeakMap,U=new WeakMap,At=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,jt=`:host([hidden]){display:none}`,Mt=new Map,W=e=>{let t=Mt.get(e);if(t!==void 0)return t;let n=`${jt}\n${At}`,r=e?`${e}\n${n}`:n;return Mt.set(e,r),r},Nt=e=>{let t=U.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return U.set(e,n),n}catch{return}},G=(e,t=``,n={mode:`closed`},r)=>{let i=r??Nt(e),a=e.shadowRoot||H.get(e)||i?.shadowRoot||e.attachShadow(n);return H.set(e,a),R(a,W(t)),a},Pt=e=>{for(let t of e.children)if(t.tagName!==`STYLE`)return t;return null},Ft=(e,t,...n)=>{e.replaceChildren(...n),R(e,W(t))},K=(e,t,n)=>{let r=Pt(e);if(r&&n.bind(r))return;let i=n.build();Ft(e,t,...Array.isArray(i)?i:[i])},q=(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={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},It=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Ot(t,e.getAttribute(`sheet`)||``)}}));Lt();function Rt(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var zt,Bt=n((()=>{zt=`:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-name,var(--ran-icon-host-spin-animation,rotate));animation-duration:var(--ran-icon-host-spin-duration,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-iteration-count,infinite)}@media (prefers-reduced-motion:reduce){:host([spin]){animation:none}}.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))}}`})),Vt=r({default:()=>Ht}),Ht,Ut=n((()=>{Ht=` + +`})),Wt=r({default:()=>Gt}),Gt,Kt=n((()=>{Gt=` + +`})),qt=r({default:()=>Jt}),Jt,Yt=n((()=>{Jt=``})),Xt=r({default:()=>Zt}),Zt,Qt=n((()=>{Zt=` +`})),$t=r({default:()=>en}),en,tn=n((()=>{en=``})),nn=r({default:()=>rn}),rn,an=n((()=>{rn=``})),on=r({default:()=>sn}),sn,cn=n((()=>{sn=``})),ln=r({default:()=>un}),un,dn=n((()=>{un=` +`})),fn=r({default:()=>pn}),pn,mn=n((()=>{pn=``})),hn=r({default:()=>gn}),gn,_n=n((()=>{gn=``})),vn=r({default:()=>yn}),yn,bn=n((()=>{yn=``})),xn=r({default:()=>Sn}),Sn,Cn=n((()=>{Sn=``})),wn=r({default:()=>Tn}),Tn,En=n((()=>{Tn=``})),Dn=r({default:()=>On}),On,kn=n((()=>{On=` + + + + + +`})),An=r({default:()=>jn}),jn,Mn=n((()=>{jn=` + + +`})),Nn=r({default:()=>Pn}),Pn,Fn=n((()=>{Pn=` + + +`})),In=r({default:()=>Ln}),Ln,Rn=n((()=>{Ln=``})),zn=r({default:()=>Bn}),Bn,Vn=n((()=>{Bn=` +`})),Hn=r({default:()=>Un}),Un,Wn=n((()=>{Un=` + + + + +`})),Gn=r({default:()=>Kn}),Kn,qn=n((()=>{Kn=``})),Jn=r({default:()=>Yn}),Yn,Xn=n((()=>{Yn=``})),Zn=r({default:()=>Qn}),Qn,$n=n((()=>{Qn=` + + + +`})),er=r({default:()=>tr}),tr,nr=n((()=>{tr=` +`})),rr=r({default:()=>ir}),ir,ar=n((()=>{ir=` + LOADING + + + + + + + + + + + + + + + + +`})),or=r({default:()=>sr}),sr,cr=n((()=>{sr=``})),lr=r({default:()=>ur}),ur,dr=n((()=>{ur=` + + +`})),fr=r({default:()=>pr}),pr,mr=n((()=>{pr=` +`})),hr=r({default:()=>gr}),gr,_r=n((()=>{gr=``})),vr=r({default:()=>yr}),yr,br=n((()=>{yr=` +`})),xr=r({default:()=>Sr}),Sr,Cr=n((()=>{Sr=` +`})),wr=r({default:()=>Tr}),Tr,Er=n((()=>{Tr=` +`})),Dr=r({default:()=>Or}),Or,kr=n((()=>{Or=` +`})),Ar=r({default:()=>jr}),jr,Mr=n((()=>{jr=` +`})),Nr=r({default:()=>Pr}),Pr,Fr=n((()=>{Pr=` +`})),Ir=r({default:()=>Lr}),Lr,Rr=n((()=>{Lr=` +`})),zr=r({default:()=>Br}),Br,Vr=n((()=>{Br=` +`})),Hr=r({default:()=>Ur}),Ur,Wr=n((()=>{Ur=``})),Gr=r({default:()=>Kr}),Kr,qr=n((()=>{Kr=``})),Jr=r({default:()=>Yr}),Yr,Xr=n((()=>{Yr=``})),Zr=r({default:()=>Qr}),Qr,$r=n((()=>{Qr=` +`})),ei=r({default:()=>ti}),ti,ni=n((()=>{ti=``})),ri=r({default:()=>ii}),ii,ai=n((()=>{ii=` + + +`})),oi=r({default:()=>si}),si,ci=n((()=>{si=``})),li=r({default:()=>ui}),ui,di=n((()=>{ui=` + + +`})),fi=r({default:()=>pi}),pi,mi=n((()=>{pi=``})),hi=r({default:()=>gi}),gi,_i=n((()=>{gi=` +`})),vi=r({default:()=>yi}),yi,bi=n((()=>{yi=` +`})),xi=r({default:()=>Si}),Si,Ci=n((()=>{Si=``})),wi=r({default:()=>Ti}),Ti,Ei=n((()=>{Ti=``})),Di=r({default:()=>Oi}),Oi,ki=n((()=>{Oi=``})),Ai=r({default:()=>ji}),ji,Mi=n((()=>{ji=``})),Ni=r({default:()=>Pi}),Pi,Fi=n((()=>{Pi=``})),Ii=r({Icon:()=>Ui,RAN_ICON_NAMES:()=>Hi,registerIcon:()=>Q,registerIcons:()=>Bi}),Li,Ri,X,Z,zi,Q,Bi,Vi,$,Hi,Ui,Wi=n((()=>{Bt(),St(),Li=!1,Ri=new Map,X=!1,Z=e=>/]/i.test(e),zi=e=>{if(typeof e==`string`)return Z(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Z(n))return n;let r=t.default;if(typeof r==`string`&&Z(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Z(e.data))return e.data}},Q=(e,t)=>{X=!0;let n=zi(t);n&&(Ri.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},Bi=e=>{X=!0,Object.entries(e).forEach(([e,t])=>{Q(e,t)})},Vi=Object.assign({"../../assets/icons/add-user.svg":()=>Promise.resolve().then(()=>(Ut(),Vt)).then(e=>e.default),"../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>(Kt(),Wt)).then(e=>e.default),"../../assets/icons/book.svg":()=>Promise.resolve().then(()=>(Yt(),qt)).then(e=>e.default),"../../assets/icons/cast.svg":()=>Promise.resolve().then(()=>(Qt(),Xt)).then(e=>e.default),"../../assets/icons/check-circle-fill.svg":()=>Promise.resolve().then(()=>(tn(),$t)).then(e=>e.default),"../../assets/icons/check-circle.svg":()=>Promise.resolve().then(()=>(an(),nn)).then(e=>e.default),"../../assets/icons/check.svg":()=>Promise.resolve().then(()=>(cn(),on)).then(e=>e.default),"../../assets/icons/chevron-down.svg":()=>Promise.resolve().then(()=>(dn(),ln)).then(e=>e.default),"../../assets/icons/close-circle-fill.svg":()=>Promise.resolve().then(()=>(mn(),fn)).then(e=>e.default),"../../assets/icons/close-circle.svg":()=>Promise.resolve().then(()=>(_n(),hn)).then(e=>e.default),"../../assets/icons/close.svg":()=>Promise.resolve().then(()=>(bn(),vn)).then(e=>e.default),"../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>(Cn(),xn)).then(e=>e.default),"../../assets/icons/download.svg":()=>Promise.resolve().then(()=>(En(),wn)).then(e=>e.default),"../../assets/icons/drop.svg":()=>Promise.resolve().then(()=>(kn(),Dn)).then(e=>e.default),"../../assets/icons/eye-close.svg":()=>Promise.resolve().then(()=>(Mn(),An)).then(e=>e.default),"../../assets/icons/eye.svg":()=>Promise.resolve().then(()=>(Fn(),Nn)).then(e=>e.default),"../../assets/icons/fullscreen.svg":()=>Promise.resolve().then(()=>(Rn(),In)).then(e=>e.default),"../../assets/icons/github.svg":()=>Promise.resolve().then(()=>(Vn(),zn)).then(e=>e.default),"../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>(Wn(),Hn)).then(e=>e.default),"../../assets/icons/home.svg":()=>Promise.resolve().then(()=>(qn(),Gn)).then(e=>e.default),"../../assets/icons/info-circle-fill.svg":()=>Promise.resolve().then(()=>(Xn(),Jn)).then(e=>e.default),"../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>($n(),Zn)).then(e=>e.default),"../../assets/icons/issue.svg":()=>Promise.resolve().then(()=>(nr(),er)).then(e=>e.default),"../../assets/icons/loading-scene.svg":()=>Promise.resolve().then(()=>(ar(),rr)).then(e=>e.default),"../../assets/icons/loading.svg":()=>Promise.resolve().then(()=>(cr(),or)).then(e=>e.default),"../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>(dr(),lr)).then(e=>e.default),"../../assets/icons/menu.svg":()=>Promise.resolve().then(()=>(mr(),fr)).then(e=>e.default),"../../assets/icons/message.svg":()=>Promise.resolve().then(()=>(_r(),hr)).then(e=>e.default),"../../assets/icons/mic-off.svg":()=>Promise.resolve().then(()=>(br(),vr)).then(e=>e.default),"../../assets/icons/mic.svg":()=>Promise.resolve().then(()=>(Cr(),xr)).then(e=>e.default),"../../assets/icons/more.svg":()=>Promise.resolve().then(()=>(Er(),wr)).then(e=>e.default),"../../assets/icons/pause.svg":()=>Promise.resolve().then(()=>(kr(),Dr)).then(e=>e.default),"../../assets/icons/pencil.svg":()=>Promise.resolve().then(()=>(Mr(),Ar)).then(e=>e.default),"../../assets/icons/pip.svg":()=>Promise.resolve().then(()=>(Fr(),Nr)).then(e=>e.default),"../../assets/icons/play.svg":()=>Promise.resolve().then(()=>(Rr(),Ir)).then(e=>e.default),"../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>(Vr(),zr)).then(e=>e.default),"../../assets/icons/power-off.svg":()=>Promise.resolve().then(()=>(Wr(),Hr)).then(e=>e.default),"../../assets/icons/preview.svg":()=>Promise.resolve().then(()=>(qr(),Gr)).then(e=>e.default),"../../assets/icons/refresh.svg":()=>Promise.resolve().then(()=>(Xr(),Jr)).then(e=>e.default),"../../assets/icons/search.svg":()=>Promise.resolve().then(()=>($r(),Zr)).then(e=>e.default),"../../assets/icons/setting.svg":()=>Promise.resolve().then(()=>(ni(),ei)).then(e=>e.default),"../../assets/icons/sort.svg":()=>Promise.resolve().then(()=>(ai(),ri)).then(e=>e.default),"../../assets/icons/team.svg":()=>Promise.resolve().then(()=>(ci(),oi)).then(e=>e.default),"../../assets/icons/unlock.svg":()=>Promise.resolve().then(()=>(di(),li)).then(e=>e.default),"../../assets/icons/user.svg":()=>Promise.resolve().then(()=>(mi(),fi)).then(e=>e.default),"../../assets/icons/volume-mute.svg":()=>Promise.resolve().then(()=>(_i(),hi)).then(e=>e.default),"../../assets/icons/volume.svg":()=>Promise.resolve().then(()=>(bi(),vi)).then(e=>e.default),"../../assets/icons/warning-circle-fill.svg":()=>Promise.resolve().then(()=>(Ci(),xi)).then(e=>e.default),"../../assets/icons/warning-circle.svg":()=>Promise.resolve().then(()=>(Ei(),wi)).then(e=>e.default),"../../assets/icons/without-content.svg":()=>Promise.resolve().then(()=>(ki(),Di)).then(e=>e.default),"../../assets/icons/zoom-in.svg":()=>Promise.resolve().then(()=>(Mi(),Ai)).then(e=>e.default),"../../assets/icons/zoom-out.svg":()=>Promise.resolve().then(()=>(Fi(),Ni)).then(e=>e.default)}),$={};for(let[e,t]of Object.entries(Vi)){let n=e.split(`/`).pop()?.replace(/\.svg$/,``);n&&($[n]=t)}Hi=`add-user.arrow-down.book.cast.check.check-circle.check-circle-fill.chevron-down.close.close-circle.close-circle-fill.copy.download.drop.eye.eye-close.fullscreen.github.globe.home.info-circle.info-circle-fill.issue.loading.loading-scene.lock.menu.message.mic.mic-off.more.pause.pencil.pip.play.plus.power-off.preview.refresh.search.setting.sort.team.unlock.user.volume.volume-mute.warning-circle.warning-circle-fill.without-content.zoom-in.zoom-out`.split(`.`),Ui=class extends F{isDev=Li;_events=new te;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=G(this,zt),K(this._shadowDom,zt,{bind:e=>this._bindPaintedTree(e),build:()=>{let e=N().class(`ran-icon`).part(`ran-icon`).build();return this._div=e,e}})}_bindPaintedTree(e){if(!(typeof e.className==`string`?e.className:``).includes(`ran-icon`)&&e.getAttribute(`part`)!==`ran-icon`)return!1;this._div=e;let t=e.querySelector?.(`svg`);return t&&(this._icon=t),!0}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=()=>{It(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{this._icon&&(this.decorative?(this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`)):(this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)))};setIcon=()=>{let e=this.name;if(e&&this._icon?.getAttribute(`data-name`)===e)this.setSize(),this.setColor(),this.setSpin(),this.syncA11y();else if(this._icon&&=(this._icon.remove(),void 0),typeof document>`u`&&this._div&&(this._div.innerHTML=``),e){if(e.startsWith(`{t().then(t=>{Q(e,t)}).catch(t=>{this.isDev&&console.warn(`[ranui-icon] lazy load builtin failed: ${e}`,t)})};isSvgText=e=>Z(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=M(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(i&&i.tagName.toLowerCase()===`svg`)return i};renderSvg=(e,t)=>{if(typeof document>`u`){let n=this.size||`1em`,r=/^\d+(\.\d+)?$/.test(n)?`${n}px`:n,i=this.color||`currentColor`,a=e.replace(/]*)>/i,``);this._div.innerHTML=a,this.syncA11y();return}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())}},bt(`r-icon`,Ui)}));c(),yt(),wt(),St(),Lt();var Gi=()=>{typeof document<`u`&&(typeof customElements<`u`&&customElements.get(`r-icon`)||Promise.resolve().then(()=>(Wi(),Ii)))},Ki=class extends F{_btn;_btnContent;_iconElement;_slot;_shadowDom;_events=new te;debounceTimeId;static get observedAttributes(){return[`disabled`,`icon`,`effect`,`iconSize`,`type`,`aria-label`,`sheet`,`surface`]}constructor(){super(),this._shadowDom=G(this,ce),K(this._shadowDom,ce,{bind:e=>this._bindPaintedTree(e),build:()=>{let e=Re(),t=Re(),n=N().class(`ran-btn`).attr(`part`,`button`).role(`button`).tabIndex(0).children(N().class(`ran-btn-content`).ref(e).attr(`part`,`content`).children(rt().ref(t).class(`slot`))).build();return this._btn=n,this._btnContent=q(e,`content`),this._slot=q(t,`slot`),n}})}_bindPaintedTree(e){let t=e.getAttribute(`part`)||``,n=typeof e.className==`string`?e.className:``;if(!t.includes(`button`)&&!n.includes(`ran-btn`))return!1;let r=e.children.item(0);if(!r)return!1;let i=null,a;for(let e of Array.from(r.children)){let t=e.tagName.toLowerCase();t===`slot`?i=e:t===`r-icon`&&(a=e)}return i?(this._btn=e,this._btnContent=r,this._slot=i,this._iconElement=a,!0):!1}get sheet(){return this.getAttribute(`sheet`)||``}set sheet(e){this.setAttribute(`sheet`,e||``),this.handlerExternalCss()}get surface(){return this.getAttribute(`surface`)||``}set surface(e){e?this.setAttribute(`surface`,e):this.removeAttribute(`surface`)}get disabled(){return I(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`)}focus(e){I(this)||this._btn.focus(e)}click(){I(this)||super.click()}_guardDisabledClick=e=>{I(this)&&(e.preventDefault(),e.stopImmediatePropagation())};setIcon=()=>{if(!this._slot||!this._btnContent)return;let e=this.icon;if(!e){this._iconElement&&=(this._iconElement.remove(),void 0);return}if(Gi(),this._iconElement)this._iconElement.setAttribute(`name`,e);else{let t=this._shadowDom.querySelector?.(`r-icon`)??void 0;if(!t){let e=xt(`r-icon`);typeof document>`u`&&e?(t=new e,t.setAttribute(`color`,`currentColor`),t.setAttribute(`class`,`icon`)):t=M(`r-icon`).attr(`color`,`currentColor`).class(`icon`).build(),typeof this._slot.insertAdjacentElement==`function`?this._slot.insertAdjacentElement(`beforebegin`,t):this._btnContent.insertBefore(t,this._slot)}this._iconElement=t,this._iconElement.setAttribute(`name`,e)}let t=typeof getComputedStyle==`function`&&this._btnContent&&Number.parseFloat(getComputedStyle(this._btnContent).fontSize)||14,n=this.iconSize||`${Math.round(t*1.15)}`;this._iconElement.setAttribute(`size`,String(n));let r=this._iconElement;typeof document>`u`&&(typeof r._preSerialize==`function`?r._preSerialize():r.setIcon?.())};_preSerialize(){this.setIcon(),this.syncA11yState(),this.syncAriaLabel()}mousedown=e=>{if(i()===`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=()=>{i()===`pc`&&(this.debounceTimeId||=setTimeout(()=>{this._btn.style.removeProperty(`--ran-x`),this._btn.style.removeProperty(`--ran-y`),this.debounceMouseEvent()},600))};keydown=e=>{I(this)||Rt(e)&&(e.preventDefault(),this.click())};debounceMouseEvent=()=>{this.debounceTimeId&&=(clearTimeout(this.debounceTimeId),void 0)};handlerExternalCss=()=>{It(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11yState=()=>{let e=I(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,`click`,this._guardDisabledClick,{capture:!0}).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 bt(`r-button`,Ki),e.Button=Ki,e.default=Ki,e})({}); \ No newline at end of file diff --git a/public/ranui-iife/card.iife.js b/public/ranui-iife/card.iife.js index 9ccbdce1d..9812f1358 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));flex-wrap:wrap;min-width:0;display:flex}.ran-card-title-area{overflow-wrap:anywhere;flex:auto;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}`,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&&re()}}]}function v(e){let t=ee(e,!0);return te(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(()=>ie(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 re(){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 ie(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 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))},O=(e,t,n)=>{for(let r of e)ae(r)&&(le(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`?i(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}},A=new Map,j=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??A}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 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 ue(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(`;`):``,a=r?` style="${D(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 k,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}`}},ue=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``}},M={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)){M.append(e,r);continue}if(typeof r==`function`){M.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 N?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},de=`http://www.w3.org/2000/svg`,fe=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{runtime;el;constructor(e,t,r=M){this.runtime=r;let i=t??(fe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new j(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 pe(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}},pe=class{runtime;root;hostEl;constructor(e,t,n,r=M){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}},P=()=>({current:null}),F=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(F(t)):e.concat(t),[]),I=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,me=(e,t)=>{if(n){R(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=>(R(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=I(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},L=(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=I(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();L(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=I(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=I(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()}L(r,i.map(e=>e.node).filter(e=>e!=null))})},R=(e,t)=>{n?y(()=>z(e,t)):z(e,t)},z=(e,t)=>{F(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=I(t);n!=null&&e.appendChild(n)})},Ce=()=>!1,we={bind(e,t){typeof e==`function`?n?y(()=>t(e())):v(()=>t(e())):t(e)},append:R},Te=class extends N{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,de),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:B,Svg:Oe,Span:ke,Slot:V,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:j,Ke=`data-ranui`,H=`data-ranui-sheet`,qe=(e,t)=>c(e,t,Ke),U=new WeakMap,W=new Map,Je=e=>{if(typeof CSSStyleSheet>`u`)return;let t=W.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},W.set(e,t)}catch{return}return t.users++,t.sheet},G=e=>{let t=W.get(e);t&&--t.users===0&&W.delete(e)},Ye=(e,t)=>{if(typeof document>`u`)return;let n=U.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),G(n.text)):n&&e.querySelector(`style[${H}]`)?.remove(),U.delete(e),!t))return;let r=Je(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{G(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(H,``),n.textContent=t,e.appendChild(n)}U.set(e,{text:t,sheet:r})},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,Xe=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},Ze=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||K.get(e)||e.attachShadow(n);return K.set(e,r),qe(r,Xe(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={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},Q=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Ye(t,e.getAttribute(`sheet`)||``)},$=class extends Ge{_shadowDom;_titleEl;_descriptionEl;_headerEl;_footerEl;_extraSlot;static get observedAttributes(){return[`heading`,`description`,`sheet`,`hoverable`]}constructor(){super(),this._shadowDom=Ze(this,t);let e=P(),n=P(),r=P(),i=P(),a=P(),o=P(),s=B().class(`ran-card`).attr(`part`,`card`).children(B().class(`ran-card-header`).ref(e).attr(`part`,`header`).children(B().class(`ran-card-title-area`).children(B().class(`ran-card-title`).ref(n).attr(`part`,`title`),B().class(`ran-card-description`).ref(r).attr(`part`,`description`)),V().attr(`name`,`extra`).attr(`part`,`extra`).ref(o)),B().class(`ran-card-body`).attr(`part`,`body`).children(V()),B().class(`ran-card-footer`).ref(i).attr(`part`,`footer`).children(V().attr(`name`,`footer`).ref(a))).build();this._shadowDom.appendChild(s),this._headerEl=Y(e,`header`),this._titleEl=Y(n,`title`),this._descriptionEl=Y(r,`description`),this._footerEl=Y(i,`footer`),this._extraSlot=Y(o,`slot[name="extra"]`),this._extraSlot.addEventListener(`slotchange`,()=>this._syncHeader()),this._footerEl.style.display=`none`;let c=Y(a,`slot[name="footer"]`);c.addEventListener(`slotchange`,()=>{this._footerEl.style.display=c.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`)??``,this._syncHeader()}_syncDescription(){this._descriptionEl.textContent=this.getAttribute(`description`)??``,this._syncHeader()}_syncHeader(){let e=this._titleEl.textContent?.trim()||this._descriptionEl.textContent?.trim()||this._extraSlot.assignedElements().length>0;this._headerEl.style.display=e?``:`none`}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 +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([surface=glass]) .ran-card{background:var(--ran-surface-glass-specular,linear-gradient(180deg, #ffffff8c 0%, #ffffff24 24%, transparent 48%), linear-gradient(0deg, #ffffff47 0%, transparent 30%)), var(--ran-surface-glass-fill,#ffffff8c);-webkit-backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-border,#ffffffb8);box-shadow:var(--ran-surface-glass-shadow,0 8px 24px #00000024, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80)}@media (prefers-reduced-transparency:reduce){:host([surface=glass]) .ran-card{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-solid-shadow,var(--ran-shadow-elevated))}}:host([hoverable]:hover) .ran-card{border-color:var(--ran-card-hover-border-color,var(--ran-color-border-hover,#b8b8c0));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,#e4e4e8));border-radius:var(--ran-card-radius,var(--ran-radius-md));background:var(--ran-card-background,var(--ran-color-bg-elevated));box-shadow:var(--ran-card-shadow,var(--ran-shadow-elevated));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));flex-wrap:wrap;min-width:0;display:flex}.ran-card-title-area{overflow-wrap:anywhere;flex:auto;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}`,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(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!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,ee=0,m=new Set,h=!1;function g(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)x(e,d);ee===0&&ie()}}]}function _(e){let t=te(e,!0);return ne(t),C(t),()=>T(t)}function v(e){let t=f;f=null;try{return e()}finally{f=t}}function y(e){let t={owned:[],cleanups:[],owner:p},n=p,r=f;p=t,f=null;try{return e(()=>ae(t))}finally{p=n,f=r}}function b(e){p&&p.cleanups.push(e)}function te(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 ne(e){p&&p.owned.push(e)}function re(e){f&&(f.sources.add(e),e.observers.add(f))}function x(e,t){if(e.disposed||e.state>=t)return;let n=e.state===l;if(e.state=t,e.isEffect)m.add(e);else if(n)for(let t of e.observers)x(t,u)}function ie(){if(!(ee>0||h)){h=!0;try{for(;m.size>0;){let e=[...m];m.clear();for(let t of e)t.disposed||S(t)}}finally{h=!1}}}function S(e){if(!(e.disposed||e.state===l)){if(e.state===u)for(let t of e.sources)`fn`in t&&S(t);e.state===d&&C(e),e.state=l}}function C(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);w(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)x(t,d)}}finally{e.running=!1,f=t,p=n}}function w(e){for(let t of e.owned)T(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 T(e){e.disposed||(e.disposed=!0,w(e),e.observers.clear())}function ae(e){for(let t of e.owned)T(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function E(e){return i(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))},D=(e,t,n)=>{for(let r of e)oe(r)&&(ue(r,t)&&n.push(r),D(r.childrenList,t,n))};function O(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var k=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return O(this.childrenList,e,t)}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 D(this.childrenList,e,t),t}},de=new Map,A=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: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 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}insertBefore(e,t){return O(this.childrenList,e,t)}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 D(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;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${E(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=r?` style="${E(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 k,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}`}},fe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof k))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return O(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}serialize(){return``}},j={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)){j.append(e,r);continue}if(typeof r==`function`){j.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 M?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},pe=`http://www.w3.org/2000/svg`,me=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,r=j){this.runtime=r;let i=t??(me.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new A(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 he(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}},he=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(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}},N=()=>({current:null}),P=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(P(t)):e.concat(t),[]),F=e=>e==null?null:e instanceof M?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ge=(e,t)=>{if(n){L(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}};_(()=>{let e=t();o();let n=document.createDocumentFragment();a=y(t=>(L(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),b(()=>a?.())},_e=`__ranFor`,ve=e=>typeof e==`object`&&!!e&&e[_e]===!0,ye=(e,t,n)=>{let[r,i]=g(t),a=null,o=y(t=>{let i=F(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},I=(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},be=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=F(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;b(()=>{for(let e of i.values())e.dispose();i.clear()}),_(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o)){Te()&&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=ye(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();I(r,a),i=n})},xe=`__ranIndex`,Se=e=>typeof e==`object`&&!!e&&e[xe]===!0,Ce=(e,t,n)=>{let[r,i]=g(e),a=null,o=y(e=>{let i=F(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},we=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=F(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];b(()=>{for(let e of i)e.dispose();i=[]}),_(()=>{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()}I(r,i.map(e=>e.node).filter(e=>e!=null))})},L=(e,t)=>{n?v(()=>R(e,t)):R(e,t)},R=(e,t)=>{P(t).forEach(t=>{if(ve(t)){be(e,t);return}if(Se(t)){we(e,t);return}if(typeof t==`function`){ge(e,t);return}let n=F(t);n!=null&&e.appendChild(n)})},Te=()=>!1,Ee={bind(e,t){typeof e==`function`?n?v(()=>t(e())):_(()=>t(e())):t(e)},append:L},De=class extends M{constructor(e,t){super(e,t,Ee)}};function Oe(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,pe),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:ke,Div:z,Svg:Ae,Span:je,Slot:B,ButtonBuilder:Me,InputBuilder:Ne,Style:Pe,Label:Fe,Ul:Ie,Li:Le,Section:Re,Article:ze,Nav:Be,Header:Ve,Footer:He,Main:Ue,DeclarativeShadow:We}=Oe(De),Ge=new Map;function Ke(e,t){n?(Ge.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var qe=typeof document<`u`?HTMLElement:A,Je=`data-ranui`,V=`data-ranui-sheet`,H=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}c(e,t,Je)},U=new WeakMap,W=new Map,Ye=e=>{if(typeof CSSStyleSheet>`u`)return;let t=W.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},W.set(e,t)}catch{return}return t.users++,t.sheet},G=e=>{let t=W.get(e);t&&--t.users===0&&W.delete(e)},Xe=(e,t)=>{if(typeof document>`u`)return;let n=U.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),G(n.text)):n&&e.querySelector(`style[${V}]`)?.remove(),U.delete(e),!t))return;let r=Ye(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{G(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(V,``),n.textContent=t,e.appendChild(n)}U.set(e,{text:t,sheet:r})},K=new WeakMap,q=new WeakMap,Ze=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Qe=`:host([hidden]){display:none}`,J=new Map,$e=e=>{let t=J.get(e);if(t!==void 0)return t;let n=`${Qe}\n${Ze}`,r=e?`${e}\n${n}`:n;return J.set(e,r),r},et=e=>{let t=q.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return q.set(e,n),n}catch{return}},tt=(e,t=``,n={mode:`closed`},r)=>{let i=r??et(e),a=e.shadowRoot||K.get(e)||i?.shadowRoot||e.attachShadow(n);return K.set(e,a),H(a,$e(t)),a},nt=(e,t,...n)=>{e.replaceChildren(...n),H(e,$e(t))},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={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},Q=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Xe(t,e.getAttribute(`sheet`)||``)},$=class extends qe{_shadowDom;_titleEl;_descriptionEl;_headerEl;_footerEl;_bodyEl;_bodySlot;_bodyTextObserver;_extraSlot;static get observedAttributes(){return[`heading`,`description`,`sheet`,`hoverable`,`surface`]}constructor(){super(),this._shadowDom=tt(this,t);let e=N(),n=N(),r=N(),i=N(),a=N(),o=N(),s=N(),c=N(),l=z().class(`ran-card`).attr(`part`,`card`).children(z().class(`ran-card-header`).ref(e).attr(`part`,`header`).children(z().class(`ran-card-title-area`).children(z().class(`ran-card-title`).ref(n).attr(`part`,`title`),z().class(`ran-card-description`).ref(r).attr(`part`,`description`)),B().attr(`name`,`extra`).attr(`part`,`extra`).ref(c)),z().class(`ran-card-body`).ref(i).attr(`part`,`body`).children(B().ref(a)),z().class(`ran-card-footer`).ref(o).attr(`part`,`footer`).children(B().attr(`name`,`footer`).ref(s))).build();nt(this._shadowDom,t,l),this._headerEl=Y(e,`header`),this._titleEl=Y(n,`title`),this._descriptionEl=Y(r,`description`),this._footerEl=Y(o,`footer`),this._extraSlot=Y(c,`slot[name="extra"]`),this._extraSlot.addEventListener(`slotchange`,()=>this._syncHeader()),this._bodyEl=Y(i,`body`),this._bodyEl.style.display=`none`,this._bodySlot=Y(a,`slot:not([name])`),this._bodySlot.addEventListener(`slotchange`,()=>this._syncBody()),this._footerEl.style.display=`none`;let u=Y(s,`slot[name="footer"]`);u.addEventListener(`slotchange`,()=>{this._footerEl.style.display=u.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 surface(){return X(this,`surface`)}set surface(e){Z(this,`surface`,e,{removeEmpty:!0})}get hoverable(){return this.hasAttribute(`hoverable`)}set hoverable(e){e?this.setAttribute(`hoverable`,``):this.removeAttribute(`hoverable`)}_syncTitle(){this._titleEl.textContent=this.getAttribute(`heading`)??``,this._syncHeader()}_syncDescription(){this._descriptionEl.textContent=this.getAttribute(`description`)??``,this._syncHeader()}_syncHeader(){let e=this._titleEl.textContent?.trim()||this._descriptionEl.textContent?.trim()||this._extraSlot.assignedElements().length>0;this._headerEl.style.display=e?``:`none`}_syncBody(){let e=this._bodySlot.assignedNodes({flatten:!0}).some(e=>e.nodeType===Node.ELEMENT_NODE||e.textContent?.trim());this._bodyEl.style.display=e?``:`none`}connectedCallback(){typeof MutationObserver<`u`&&(this._bodyTextObserver??=new MutationObserver(()=>this._syncBody()),this._bodyTextObserver.observe(this,{characterData:!0,subtree:!0})),this._syncTitle(),this._syncDescription(),Q(this,this._shadowDom,`sheet`,null,this.sheet)}disconnectedCallback(){this._bodyTextObserver?.disconnect()}attributeChangedCallback(e,t,n){t!==n&&(e===`heading`&&this._syncTitle(),e===`description`&&this._syncDescription(),e===`sheet`&&Q(this,this._shadowDom,e,t,n))}};return Ke(`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 6e859b48e..2933b9e71 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=(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=`data-adopted-style`,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}},l=(e,t,n=s)=>{if(typeof document<`u`&&t&&!c(e,t,o)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},u=typeof document>`u`,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[()=>(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)w(e,p);g===0&&re()}}]}function b(e){let t=ee(e,!0);return te(t),E(t),()=>O(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(()=>ie(t))}finally{h=n,m=r}}function C(e){h&&h.cleanups.push(e)}function ee(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 te(e){h&&h.owned.push(e)}function ne(e){m&&(m.sources.add(e),e.observers.add(m))}function w(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)w(t,f)}function re(){if(!(g>0||v)){v=!0;try{for(;_.size>0;){let e=[..._];_.clear();for(let t of e)t.disposed||T(t)}}finally{v=!1}}}function T(e){if(!(e.disposed||e.state===d)){if(e.state===f)for(let t of e.sources)`fn`in t&&T(t);e.state===p&&E(e),e.state=d}}function E(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);D(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)w(t,p)}}finally{e.running=!1,m=t,h=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 ie(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 k(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()},A=(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)&&(A(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}},le=new Map,N=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??le}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 ue(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}="${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 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}`}},ue=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 n of t){if(n==null)continue;if(Array.isArray(n)){P.append(e,n);continue}if(typeof n==`function`){P.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 F?n.build():typeof n==`string`&&!u?document.createTextNode(n):n;e.appendChild(t)}}},de=`http://www.w3.org/2000/svg`,fe=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,n=P){this.runtime=n;let r=t??(fe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=u?new N(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=>{u?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(u){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 pe(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(u)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},pe=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(u)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 u?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`?u?e:document.createTextNode(e):e,me=(e,t)=>{if(u){B(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}};b(()=>{let e=t();a();let n=document.createDocumentFragment();i=S(t=>(B(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),C(()=>i?.())},he=`__ranFor`,ge=e=>typeof e==`object`&&!!e&&e[he]===!0,_e=(e,t,n)=>{let[r,i]=y(t),a=null,o=S(t=>{let i=R(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},z=(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(u){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;C(()=>{for(let e of r.values())e.dispose();r.clear()}),b(()=>{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();z(n,a),r=i})},ye=`__ranIndex`,be=e=>typeof e==`object`&&!!e&&e[ye]===!0,xe=(e,t,n)=>{let[r,i]=y(e),a=null,o=S(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(u){(t.each()??[]).forEach((n,r)=>{let i=R(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];C(()=>{for(let e of r)e.dispose();r=[]}),b(()=>{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()}z(n,r.map(e=>e.node).filter(e=>e!=null))})},B=(e,t)=>{u?x(()=>V(e,t)):V(e,t)},V=(e,t)=>{L(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=R(t);n!=null&&e.appendChild(n)})},Ce=()=>!1,we={bind(e,t){typeof e==`function`?u?x(()=>t(e())):b(()=>t(e())):t(e)},append:B},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,de),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:H,Svg:Oe,Span:U,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),W=[!1,`false`,null,void 0],Ue=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!(!t||W.includes(n))},We=new Map;function Ge(e,t){u?(We.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ke=typeof document<`u`?HTMLElement:N,qe=`data-ranui`,G=`data-ranui-sheet`,Je=(e,t)=>l(e,t,qe),K=new WeakMap,q=new Map,Ye=e=>{if(typeof CSSStyleSheet>`u`)return;let t=q.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},q.set(e,t)}catch{return}return t.users++,t.sheet},J=e=>{let t=q.get(e);t&&--t.users===0&&q.delete(e)},Xe=(e,t)=>{if(typeof document>`u`)return;let n=K.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),J(n.text)):n&&e.querySelector(`style[${G}]`)?.remove(),K.delete(e),!t))return;let r=Ye(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{J(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(G,``),n.textContent=t,e.appendChild(n)}K.set(e,{text:t,sheet:r})},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,Ze=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},Qe=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||Y.get(e)||e.attachShadow(n);return Y.set(e,r),Je(r,Ze(t)),r},Q=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},$e=(e,t,n=``)=>e.getAttribute(t)??n,et=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},tt=(e,t,n,r={})=>{n?(e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`)):(e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`))},nt=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Xe(t,e.getAttribute(`sheet`)||``)};function rt(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function it(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 at(e){return e?.checkValidity?.()??!0}function ot(e){return e?.reportValidity?.()??!0}var st=`: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]:not([disabled=false])){opacity:var(--ran-checkbox-disabled-opacity,.6)}:host([disabled]:not([disabled=false])) .ran-checkbox-input{cursor:var(--ran-checkbox-disabled-cursor,not-allowed);pointer-events:var(--ran-checkbox-disabled-pointer-events,all)}:host([disabled]:not([disabled=false])) .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]:not([disabled=false])) .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]:not([disabled=false])) .ran-checkbox-checked .ran-checkbox-inner{background-color:var(--ran-checkbox-checked-background-color,var(--ran-color-bg-muted,#f2f2f2))}:host([disabled]:not([disabled=false])) .ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-tick-checked-opacity,1)}:host([hidden]){display:none}.ran-checkbox-wrapper{column-gap:var(--ran-checkbox-label-gap,8px);cursor:pointer;max-width:100%;font-size:var(--ran-checkbox-label-font-size,var(--ran-text-label-1,14px));line-height:var(--ran-checkbox-label-line-height,1.5);grid-template-rows:1lh auto;grid-template-columns:auto minmax(0,1fr);display:inline-grid}.ran-checkbox-wrapper>.ran-checkbox{grid-area:1/1;align-self:center}.ran-checkbox-wrapper>.ran-checkbox-label{grid-area:1/2/span 2}.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 var(--ran-color-primary-text,#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=Qe(this,st);let e=I(),t=I(),n=I(),r=H().class(`ran-checkbox-wrapper`).part(`wrapper`).children(H().class(`ran-checkbox`).ref(e).part(`checkbox`).children(je().class(`ran-checkbox-input`).ref(t).part(`input`).attr(`type`,`checkbox`),U().class(`ran-checkbox-inner`).ref(n).part(`inner`)),U().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){W.includes(e)?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}get required(){return this.hasAttribute(`required`)}set required(e){tt(this,`required`,!(!e||e===`false`))}get value(){let e=this.getAttribute(`value`);return W.includes(e)&&(this.context.checked=!1),`${this.context.checked}`}set value(e){W.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 W.includes(e)&&(this.context.checked=!1),this.context.checked}set checked(e){W.includes(e)?(this.setAttribute(`checked`,`false`),this.context.checked=!1):(this.setAttribute(`checked`,`true`),this.context.checked=!0),this.updateChecked()}get sheet(){return $e(this,`sheet`)}set sheet(e){et(this,`sheet`,e)}handlerExternalCss=()=>{nt(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=()=>{it(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 at(this._internals)}reportValidity(){return ot(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=>{rt(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===`disabled`&&n===`false`?this.removeAttribute(`disabled`):(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 +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=`data-adopted-style`,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}},l=(e,t,n=s)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!c(e,t,o)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}};Object.freeze({});var ee=null;function u(){return ee}var d=typeof document>`u`,f=0,te=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[()=>(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)w(e,p);g===0&&ae()}}]}function b(e){let t=ne(e,!0);return re(t),E(t),()=>D(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(()=>se(t))}finally{h=n,m=r}}function C(e){h&&h.cleanups.push(e)}function ne(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 re(e){h&&h.owned.push(e)}function ie(e){m&&(m.sources.add(e),e.observers.add(m))}function w(e,t){if(e.disposed||e.state>=t)return;let n=e.state===f;if(e.state=t,e.isEffect)_.add(e);else if(n)for(let t of e.observers)w(t,te)}function ae(){if(!(g>0||v)){v=!0;try{for(;_.size>0;){let e=[..._];_.clear();for(let t of e)t.disposed||T(t)}}finally{v=!1}}}function T(e){if(!(e.disposed||e.state===f)){if(e.state===te)for(let t of e.sources)`fn`in t&&T(t);e.state===p&&E(e),e.state=f}}function E(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);oe(e);let t=m,n=h;m=e,h=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)w(t,p)}}finally{e.running=!1,m=t,h=n}}function oe(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,oe(e),e.observers.clear())}function se(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 O(e){return i(e)}var ce=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,le=`.#[`;function ue(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 de=(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()},fe=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ue(n);return r!==null&&r.every(t=>de(e,t))},k=(e,t,n)=>{for(let r of e)ce(r)&&(fe(r,t)&&n.push(r),k(r.childrenList,t,n))};function A(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var j=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return A(this.childrenList,e,t)}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 k(this.childrenList,e,t),t}},pe=new Map,me=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??pe}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 j)}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}insertBefore(e,t){return A(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new he(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return k(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;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${O(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=r?` style="${O(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 j,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}`}},he=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof j))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return A(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return k(this.childrenList,e,t),t}serialize(){return``}},M={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)){M.append(e,n);continue}if(typeof n==`function`){M.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 N?n.build():typeof n==`string`&&!d?document.createTextNode(n):n;e.appendChild(t)}}},ge=`http://www.w3.org/2000/svg`,_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(`.`)),N=class{runtime;el;constructor(e,t,n=M){this.runtime=n;let r=t??(_e.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=d?new me(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 ve(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}},ve=class{runtime;root;hostEl;constructor(e,t,n,r=M){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}},P=()=>({current:null}),F=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(F(t)):e.concat(t),[]),I=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?d?e:document.createTextNode(e):e,ye=(e,t)=>{if(d){R(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}};b(()=>{let e=t();a();let n=document.createDocumentFragment();i=S(t=>(R(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),C(()=>i?.())},be=`__ranFor`,xe=e=>typeof e==`object`&&!!e&&e[be]===!0,Se=(e,t,n)=>{let[r,i]=y(t),a=null,o=S(t=>{let i=I(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},L=(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(d){(t.each()??[]).forEach((n,r)=>{let i=I(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;C(()=>{for(let e of r.values())e.dispose();r.clear()}),b(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Oe()&&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=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();L(n,a),r=i})},we=`__ranIndex`,Te=e=>typeof e==`object`&&!!e&&e[we]===!0,Ee=(e,t,n)=>{let[r,i]=y(e),a=null,o=S(e=>{let i=I(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},De=(e,t)=>{if(d){(t.each()??[]).forEach((n,r)=>{let i=I(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];C(()=>{for(let e of r)e.dispose();r=[]}),b(()=>{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()}L(n,r.map(e=>e.node).filter(e=>e!=null))})},R=(e,t)=>{d?x(()=>z(e,t)):z(e,t)},z=(e,t)=>{F(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=I(t);n!=null&&e.appendChild(n)})},Oe=()=>!1,ke={bind(e,t){typeof e==`function`?d?x(()=>t(e())):b(()=>t(e())):t(e)},append:R},Ae=class extends N{constructor(e,t){super(e,t,ke)}};function je(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,ge),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:Me,Div:B,Svg:Ne,Span:V,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}=je(Ae),H=[!1,`false`,null,void 0],Je=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!(!t||H.includes(n))},Ye=new Map;function Xe(e,t){d?(Ye.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ze=typeof document<`u`?HTMLElement:me,Qe=`data-ranui`,U=`data-ranui-sheet`,W=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}l(e,t,Qe)},G=new WeakMap,K=new Map,$e=e=>{if(typeof CSSStyleSheet>`u`)return;let t=K.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},K.set(e,t)}catch{return}return t.users++,t.sheet},q=e=>{let t=K.get(e);t&&--t.users===0&&K.delete(e)},et=(e,t)=>{if(typeof document>`u`)return;let n=G.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),q(n.text)):n&&e.querySelector(`style[${U}]`)?.remove(),G.delete(e),!t))return;let r=$e(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{q(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(U,``),n.textContent=t,e.appendChild(n)}G.set(e,{text:t,sheet:r})},J=new WeakMap,Y=new WeakMap,tt=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,nt=`:host([hidden]){display:none}`,X=new Map,Z=e=>{let t=X.get(e);if(t!==void 0)return t;let n=`${nt}\n${tt}`,r=e?`${e}\n${n}`:n;return X.set(e,r),r},rt=e=>{let t=Y.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return Y.set(e,n),n}catch{return}},it=(e,t=``,n={mode:`closed`},r)=>{let i=r??rt(e),a=e.shadowRoot||J.get(e)||i?.shadowRoot||e.attachShadow(n);return J.set(e,a),W(a,Z(t)),a},at=e=>{for(let t of e.children)if(t.tagName!==`STYLE`)return t;return null},ot=(e,t,...n)=>{e.replaceChildren(...n),W(e,Z(t))},st=(e,t,n)=>{let r=at(e);if(r&&n.bind(r))return;let i=n.build();ot(e,t,...Array.isArray(i)?i:[i])},Q=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},ct=(e,t,n=``)=>e.getAttribute(t)??n,lt=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},ut=(e,t,n,r={})=>{n?(e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`)):(e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`))},dt=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&et(t,e.getAttribute(`sheet`)||``)};function ft(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function pt(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 mt(e){return e?.checkValidity?.()??!0}function ht(e){return e?.reportValidity?.()??!0}var gt=`: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);outline:none}:host([disabled]:not([disabled=false])){opacity:var(--ran-checkbox-disabled-opacity,1)}:host([disabled]:not([disabled=false])) .ran-checkbox-input{cursor:var(--ran-checkbox-disabled-cursor,not-allowed);pointer-events:var(--ran-checkbox-disabled-pointer-events,all)}:host([disabled]:not([disabled=false])) .ran-checkbox-wrapper{cursor:var(--ran-checkbox-disabled-cursor,not-allowed)}:host([disabled]:not([disabled=false])) .ran-checkbox-label{color:var(--ran-checkbox-disabled-label-color,var(--ran-color-text-disabled,#8a8a94))}:host([disabled]:not([disabled=false])) .ran-checkbox-inner{background-color:var(--ran-checkbox-disabled-background-color,var(--ran-color-bg-subtle,#f7f7f8));border:var(--ran-checkbox-disabled-border,1px solid var(--ran-color-border-hover,#b8b8c0))}:host([disabled]:not([disabled=false])) .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-700)))}:host([disabled]:not([disabled=false])) .ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-tick-checked-opacity,1)}:host(:focus-visible) .ran-checkbox-inner{box-shadow:var(--ran-checkbox-focus-box-shadow,var(--ran-focus-ring))}@media (hover:hover){:host(:not([disabled]:not([disabled=false]))) .ran-checkbox-wrapper:hover .ran-checkbox:not(.ran-checkbox-checked) .ran-checkbox-inner{border-color:var(--ran-checkbox-hover-border-color,var(--ran-color-border-control-hover,#55555e))}}.ran-checkbox-wrapper{column-gap:var(--ran-checkbox-label-gap,8px);cursor:pointer;max-width:100%;font-size:var(--ran-checkbox-label-font-size,var(--ran-text-label-1,14px));line-height:var(--ran-checkbox-label-line-height,1.5);grid-template-rows:1lh auto;grid-template-columns:auto minmax(0,1fr);display:inline-grid}.ran-checkbox-wrapper>.ran-checkbox{grid-area:1/1;align-self:center}.ran-checkbox-wrapper>.ran-checkbox-label{grid-area:1/2/span 2}.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,"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"));white-space:var(--ran-checkbox-white-space,nowrap);cursor:var(--ran-checkbox-cursor,pointer);border-radius:var(--ran-checkbox-border-radius,var(--ran-radius-xs,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-control,#8a8a94));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,var(--ran-radius-xs,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 var(--ran-color-primary-text,#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 var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)), 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,#111113));background-image:var(--ran-checkbox-checked-background-image,none);border:var(--ran-checkbox-checked-border,1px solid var(--ran-color-primary,#111113));animation:var(--ran-checkbox-pop-animation,ran-checkbox-pop var(--ran-motion-duration-base,.2s) var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)))}.ran-checkbox-checked .ran-checkbox-inner:after{opacity:var(--ran-checkbox-tick-checked-opacity,1)}@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}}`,_t=e=>e,vt=e=>{let t=e;for(;t;){let e=t.closest?.(`[lang]`)?.getAttribute(`lang`);if(e)return e;t=t.getRootNode?.()?.host}return``},yt=e=>{let t=(u()?.getLocale()||vt(e)||(typeof document<`u`?document.documentElement.lang:``)||`en`).toLowerCase();return/^zh[-_](hant|tw|hk|mo)\b/.test(t)?`en`:t.split(/[-_]/)[0]},bt=(e,t)=>t?e.replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??e)):e,xt=(e,t,n,r)=>{let i=u(),a=`ranui.${t}`;if(i){let e=i.getMessages(i.getLocale())[a];if(e!==void 0)return bt(e,r)}return bt(e[yt(n)]?.[t]??e.en[t],r)},St=_t({en:{"checkbox.required":`Please check this box if you want to proceed.`},zh:{"checkbox.required":`如果要继续,请勾选此复选框。`},ja:{"checkbox.required":`続行するには、このボックスをオンにしてください。`},ko:{"checkbox.required":`계속하려면 이 확인란을 선택하세요.`},es:{"checkbox.required":`Marca esta casilla si quieres continuar.`},pt:{"checkbox.required":`Marque esta caixa se deseja continuar.`},de:{"checkbox.required":`Klicken Sie dieses Kästchen an, wenn Sie fortfahren wollen.`},fa:{"checkbox.required":`اگر می‌خواهید ادامه دهید، این کادر را علامت بزنید.`}}),$=class extends Ze{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(),this._internals=rt(this),this._shadowDom=it(this,gt,{mode:`closed`},this._internals),st(this._shadowDom,gt,{bind:e=>this._bindPaintedTree(e),build:()=>{let e=P(),t=P(),n=P(),r=B().class(`ran-checkbox-wrapper`).part(`wrapper`).children(B().class(`ran-checkbox`).ref(e).part(`checkbox`).children(Ie().class(`ran-checkbox-input`).ref(t).part(`input`).attr(`type`,`checkbox`),V().class(`ran-checkbox-inner`).ref(n).part(`inner`)),V().class(`ran-checkbox-label`).part(`label`).children(Pe())).build();return 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,r}}),this.context={checked:!1}}_bindPaintedTree(e){let t=e.children.item(0),n=t?.children.item(0),r=t?.children.item(1);return!t||!n||!r||n.tagName.toLowerCase()!==`input`?!1:(this.container=t,this.checkInput=n,this.checkInner=r,this.checkInput.setAttribute(`aria-hidden`,`true`),this.checkInput.tabIndex=-1,!0)}get disabled(){return Je(this)}set disabled(e){H.includes(e)?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}get required(){return this.hasAttribute(`required`)}set required(e){ut(this,`required`,!(!e||e===`false`))}get value(){let e=this.getAttribute(`value`);return H.includes(e)&&(this.context.checked=!1),`${this.context.checked}`}set value(e){H.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 H.includes(e)&&(this.context.checked=!1),this.context.checked}set checked(e){H.includes(e)?(this.setAttribute(`checked`,`false`),this.context.checked=!1):(this.setAttribute(`checked`,`true`),this.context.checked=!0),this.updateChecked()}get sheet(){return ct(this,`sheet`)}set sheet(e){lt(this,`sheet`,e)}handlerExternalCss=()=>{dt(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=()=>{pt(this,this._internals,{disabled:this.disabled,required:this.required,isEmpty:!this.context.checked,message:xt(St,`checkbox.required`,this),anchor:this})};checkValidity(){return mt(this._internals)}reportValidity(){return ht(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=>{ft(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===`disabled`&&n===`false`?this.removeAttribute(`disabled`):(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 Xe(`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 351a54f0c..71160b408 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=/["'&<>]/;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){typeof e==`function`?n?y(()=>t(e())):v(()=>t(e())):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=>{let t=e.filter(e=>e.type===`childList`||e.type===`attributes`);if(!t.length)return;let n=t[t.length-1];this.dispatchEvent(new CustomEvent(`change`,{detail:{type:t.some(e=>e.type===`childList`)?`childList`:`attributes`,value:{content:this.children,mutation:n,mutations:t}}}))};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 +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}},ee=(e,t,n=o)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!s(e,t,a)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}},c=0,l=1,u=2,d=null,f=null,p=0,m=new Set,h=!1;function g(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)x(e,u);p===0&&S()}}]}function _(e){let t=te(e,!0);return ne(t),w(t),()=>E(t)}function v(e){let t=d;d=null;try{return e()}finally{d=t}}function y(e){let t={owned:[],cleanups:[],owner:f},n=f,r=d;f=t,d=null;try{return e(()=>ie(t))}finally{f=n,d=r}}function b(e){f&&f.cleanups.push(e)}function te(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:u,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:f}}function ne(e){f&&f.owned.push(e)}function re(e){d&&(d.sources.add(e),e.observers.add(d))}function x(e,t){if(e.disposed||e.state>=t)return;let n=e.state===c;if(e.state=t,e.isEffect)m.add(e);else if(n)for(let t of e.observers)x(t,l)}function S(){if(!(p>0||h)){h=!0;try{for(;m.size>0;){let e=[...m];m.clear();for(let t of e)t.disposed||C(t)}}finally{h=!1}}}function C(e){if(!(e.disposed||e.state===c)){if(e.state===l)for(let t of e.sources)`fn`in t&&C(t);e.state===u&&w(e),e.state=c}}function w(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);T(e);let t=d,n=f;d=e,f=e,e.running=!0,e.state=c;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)x(t,u)}}finally{e.running=!1,d=t,f=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 ie(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 i(e)}var O=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,k=`.#[`;function ae(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 oe=(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()},se=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ae(n);return r!==null&&r.every(t=>oe(e,t))},A=(e,t,n)=>{for(let r of e)O(r)&&(se(r,t)&&n.push(r),A(r.childrenList,t,n))};function j(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var M=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return j(this.childrenList,e,t)}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 A(this.childrenList,e,t),t}},ce=new Map,N=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??ce}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}insertBefore(e,t){return j(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new le(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return A(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;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let 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(`;`):``,a=r?` style="${D(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}`}},le=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof M))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return j(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return A(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 I?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},ue=`http://www.w3.org/2000/svg`,F=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(`.`)),I=class{runtime;el;constructor(e,t,r=P){this.runtime=r;let i=t??(F.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 L(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}},L=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}},R=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(R(t)):e.concat(t),[]),z=e=>e==null?null:e instanceof I?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,B=(e,t)=>{if(n){G(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}};_(()=>{let e=t();o();let n=document.createDocumentFragment();a=y(t=>(G(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),b(()=>a?.())},V=`__ranFor`,H=e=>typeof e==`object`&&!!e&&e[V]===!0,U=(e,t,n)=>{let[r,i]=g(t),a=null,o=y(t=>{let i=z(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},W=(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},de=(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;b(()=>{for(let e of i.values())e.dispose();i.clear()}),_(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o)){ge()&&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=U(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();W(r,a),i=n})},fe=`__ranIndex`,pe=e=>typeof e==`object`&&!!e&&e[fe]===!0,me=(e,t,n)=>{let[r,i]=g(e),a=null,o=y(e=>{let i=z(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},he=(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=[];b(()=>{for(let e of i)e.dispose();i=[]}),_(()=>{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()}W(r,i.map(e=>e.node).filter(e=>e!=null))})},G=(e,t)=>{n?v(()=>K(e,t)):K(e,t)},K=(e,t)=>{R(t).forEach(t=>{if(H(t)){de(e,t);return}if(pe(t)){he(e,t);return}if(typeof t==`function`){B(e,t);return}let n=z(t);n!=null&&e.appendChild(n)})},ge=()=>!1,_e={bind(e,t){typeof e==`function`?n?v(()=>t(e())):_(()=>t(e())):t(e)},append:G},ve=class extends I{constructor(e,t){super(e,t,_e)}};function ye(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,ue),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:be,Div:xe,Svg:Se,Span:Ce,Slot:we,ButtonBuilder:Te,InputBuilder:Ee,Style:De,Label:Oe,Ul:ke,Li:Ae,Section:je,Article:Me,Nav:Ne,Header:Pe,Footer:Fe,Main:Ie,DeclarativeShadow:Le}=ye(ve),Re=new Map;function ze(e,t){n?(Re.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Be=typeof document<`u`?HTMLElement:N,q=`data-ranui`,J=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}ee(e,t,q)},Y=new WeakMap,X=new WeakMap,Ve=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,He=`:host([hidden]){display:none}`,Z=new Map,Q=e=>{let t=Z.get(e);if(t!==void 0)return t;let n=`${He}\n${Ve}`,r=e?`${e}\n${n}`:n;return Z.set(e,r),r},Ue=e=>{let t=X.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return X.set(e,n),n}catch{return}},We=(e,t=``,n={mode:`closed`},r)=>{let i=r??Ue(e),a=e.shadowRoot||Y.get(e)||i?.shadowRoot||e.attachShadow(n);return Y.set(e,a),J(a,Q(t)),a},Ge=(e,t,...n)=>{e.replaceChildren(...n),J(e,Q(t))},$=class extends Be{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=We(this,t);let e=we().class(`slot`).build();Ge(this._shadowDom,t,e),this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{let t=e.filter(e=>e.type===`childList`||e.type===`attributes`);if(!t.length)return;let n=t[t.length-1];this.dispatchEvent(new CustomEvent(`change`,{detail:{type:t.some(e=>e.type===`childList`)?`childList`:`attributes`,value:{content:this.children,mutation:n,mutations:t}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}};return ze(`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 ba73a23d3..4dacdb8fa 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=/["'&<>]/;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=`data-adopted-style`,ne=(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}},re=(e,t,n=te)=>{if(typeof document<`u`&&t&&!ne(e,t,ee)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},c=0,l=1,u=2,d=null,f=null,p=0,m=new Set,h=!1;function g(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(oe(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)x(e,u);p===0&&se()}}]}function _(e){let t=ie(e,!0);return ae(t),le(t),()=>S(t)}function v(e){let t=d;d=null;try{return e()}finally{d=t}}function y(e){let t={owned:[],cleanups:[],owner:f},n=f,r=d;f=t,d=null;try{return e(()=>de(t))}finally{f=n,d=r}}function b(e){f&&f.cleanups.push(e)}function ie(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:u,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:f}}function ae(e){f&&f.owned.push(e)}function oe(e){d&&(d.sources.add(e),e.observers.add(d))}function x(e,t){if(e.disposed||e.state>=t)return;let n=e.state===c;if(e.state=t,e.isEffect)m.add(e);else if(n)for(let t of e.observers)x(t,l)}function se(){if(!(p>0||h)){h=!0;try{for(;m.size>0;){let e=[...m];m.clear();for(let t of e)t.disposed||ce(t)}}finally{h=!1}}}function ce(e){if(!(e.disposed||e.state===c)){if(e.state===l)for(let t of e.sources)`fn`in t&&ce(t);e.state===u&&le(e),e.state=c}}function le(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);ue(e);let t=d,n=f;d=e,f=e,e.running=!0,e.state=c;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)x(t,u)}}finally{e.running=!1,d=t,f=n}}function ue(e){for(let t of e.owned)S(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 S(e){e.disposed||(e.disposed=!0,ue(e),e.observers.clear())}function de(e){for(let t of e.owned)S(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function C(e){return o(e)}var fe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,pe=`.#[`;function me(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 he=(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()},ge=(e,t)=>{let n=t.trim();if(!n)return!1;let r=me(n);return r!==null&&r.every(t=>he(e,t))},w=(e,t,n)=>{for(let r of e)fe(r)&&(ge(r,t)&&n.push(r),w(r.childrenList,t,n))},T=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 w(this.childrenList,e,t),t}},_e=new Map,E=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??_e}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 T)}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 w(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}="${C(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${C(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 T,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}`}},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 w(this.childrenList,e,t),t}serialize(){return``}},D={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)){D.append(e,n);continue}if(typeof n==`function`){D.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 O?n.build():typeof n==`string`&&!i?document.createTextNode(n):n;e.appendChild(t)}}},ye=`http://www.w3.org/2000/svg`,be=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(`.`)),O=class{runtime;el;constructor(e,t,n=D){this.runtime=n;let r=t??(be.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=i?new E(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 xe(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}},xe=class{runtime;root;hostEl;constructor(e,t,n,r=D){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}},Se=()=>({current:null}),Ce=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(Ce(t)):e.concat(t),[]),k=e=>e==null?null:e instanceof O?e.build():typeof e==`string`?i?e:document.createTextNode(e):e,we=(e,t)=>{if(i){A(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}};_(()=>{let e=t();o();let n=document.createDocumentFragment();a=y(t=>(A(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),b(()=>a?.())},Te=`__ranFor`,Ee=e=>typeof e==`object`&&!!e&&e[Te]===!0,De=(e,t,n)=>{let[r,i]=g(t),a=null,o=y(t=>{let i=k(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},Oe=(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},ke=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=k(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;b(()=>{for(let e of r.values())e.dispose();r.clear()}),_(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Pe()&&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=De(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();Oe(n,a),r=i})},Ae=`__ranIndex`,je=e=>typeof e==`object`&&!!e&&e[Ae]===!0,Me=(e,t,n)=>{let[r,i]=g(e),a=null,o=y(e=>{let i=k(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ne=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=k(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];b(()=>{for(let e of r)e.dispose();r=[]}),_(()=>{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()}Oe(n,r.map(e=>e.node).filter(e=>e!=null))})},A=(e,t)=>{i?v(()=>j(e,t)):j(e,t)},j=(e,t)=>{Ce(t).forEach(t=>{if(Ee(t)){ke(e,t);return}if(je(t)){Ne(e,t);return}if(typeof t==`function`){we(e,t);return}let n=k(t);n!=null&&e.appendChild(n)})},Pe=()=>!1,Fe={bind(e,t){typeof e==`function`?i?v(()=>t(e())):_(()=>t(e())):t(e)},append:A},Ie=class extends O{constructor(e,t){super(e,t,Fe)}};function Le(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,ye),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:M,Div:N,Svg:Re,Span:ze,Slot:Be,ButtonBuilder:Ve,InputBuilder:He,Style:Ue,Label:We,Ul:Ge,Li:Ke,Section:qe,Article:Je,Nav:Ye,Header:Xe,Footer:Ze,Main:Qe,DeclarativeShadow:$e}=Le(Ie),P=[!1,`false`,null,void 0],F=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!(!t||P.includes(n))},et=new Map;function I(e,t){i?(et.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var L=typeof document<`u`?HTMLElement:E,tt=`data-ranui`,R=`data-ranui-sheet`,nt=(e,t)=>re(e,t,tt),z=new WeakMap,B=new Map,rt=e=>{if(typeof CSSStyleSheet>`u`)return;let t=B.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},B.set(e,t)}catch{return}return t.users++,t.sheet},V=e=>{let t=B.get(e);t&&--t.users===0&&B.delete(e)},it=(e,t)=>{if(typeof document>`u`)return;let n=z.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),V(n.text)):n&&e.querySelector(`style[${R}]`)?.remove(),z.delete(e),!t))return;let r=rt(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{V(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(R,``),n.textContent=t,e.appendChild(n)}z.set(e,{text:t,sheet:r})},H=new WeakMap,U=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,W=new Map,at=e=>{let t=W.get(e);if(t!==void 0)return t;let n=e?`${e}\n${U}`:U;return W.set(e,n),n},G=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||H.get(e)||e.attachShadow(n);return H.set(e,r),nt(r,at(t)),r},ot=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},K=(e,t,n=``)=>e.getAttribute(t)??n,q=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},st=(e,t,n,r={})=>{n?(e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`)):(e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`))},J=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&it(t,e.getAttribute(`sheet`)||``)};function ct(e){return e?.checkValidity?.()??!0}function lt(e){return e?.reportValidity?.()??!0}var ut=`: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))}}`,dt=r({default:()=>Y}),Y,ft=n((()=>{Y=`()=>{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,a=n((()=>{i=typeof document>`u`}));function o(e){let t=``+e,n=s.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a{s=/["'&<>]/})),c,te=n((()=>{c=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}}})),ne,re,ie,ae,oe=n((()=>{ne=new Map,re=`data-adopted-style`,ie=(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(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!ie(e,t,ne)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}}}));function se(){return ce}var ce,le=n((()=>{Object.freeze({}),ce=null})),l=n((()=>{ee(),te(),oe()})),ue=n((()=>{l()}));function de(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(he(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)p(e,h);Ce===0&&ge()}}]}function u(e){let t=pe(e,!0);return me(t),ve(t),()=>be(t)}function fe(e){let t=g;g=null;try{return e()}finally{g=t}}function d(e){let t={owned:[],cleanups:[],owner:_},n=_,r=g;_=t,g=null;try{return e(()=>xe(t))}finally{_=n,g=r}}function f(e){_&&_.cleanups.push(e)}function pe(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 me(e){_&&_.owned.push(e)}function he(e){g&&(g.sources.add(e),e.observers.add(g))}function p(e,t){if(e.disposed||e.state>=t)return;let n=e.state===m;if(e.state=t,e.isEffect)v.add(e);else if(n)for(let t of e.observers)p(t,Se)}function ge(){if(!(Ce>0||y)){y=!0;try{for(;v.size>0;){let e=[...v];v.clear();for(let t of e)t.disposed||_e(t)}}finally{y=!1}}}function _e(e){if(!(e.disposed||e.state===m)){if(e.state===Se)for(let t of e.sources)`fn`in t&&_e(t);e.state===h&&ve(e),e.state=m}}function ve(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);ye(e);let t=g,n=_;g=e,_=e,e.running=!0,e.state=m;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)p(t,h)}}finally{e.running=!1,g=t,_=n}}function ye(e){for(let t of e.owned)be(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 be(e){e.disposed||(e.disposed=!0,ye(e),e.observers.clear())}function xe(e){for(let t of e.owned)be(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}var m,Se,h,g,_,Ce,v,y,we=n((()=>{m=0,Se=1,h=2,g=null,_=null,Ce=0,v=new Set,y=!1}));function Te(e){return o(e)}var Ee=n((()=>{l()}));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 Oe,ke,Ae,je,b,Me=n((()=>{Oe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ke=`.#[`,Ae=(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()},je=(e,t)=>{let n=t.trim();if(!n)return!1;let r=De(n);return r!==null&&r.every(t=>Ae(e,t))},b=(e,t,n)=>{for(let r of e)Oe(r)&&(je(r,t)&&n.push(r),b(r.childrenList,t,n))}}));function x(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var S,Ne,C,Pe,w=n((()=>{Ee(),Me(),S=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return x(this.childrenList,e,t)}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 b(this.childrenList,e,t),t}},Ne=new Map,C=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??Ne}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 S)}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}insertBefore(e,t){return x(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new Pe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return b(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;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${Te(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${Te(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 S,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}`}},Pe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof S))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return x(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return b(this.childrenList,e,t),t}serialize(){return``}}})),T,Fe,Ie,E,Le,Re=n((()=>{a(),w(),T={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)){T.append(e,n);continue}if(typeof n==`function`){T.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 E?n.build():typeof n==`string`&&!i?document.createTextNode(n):n;e.appendChild(t)}}},Fe=`http://www.w3.org/2000/svg`,Ie=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(`.`)),E=class{runtime;el;constructor(e,t,n=T){this.runtime=n;let r=t??(Ie.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=i?new C(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 Le(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}},Le=class{runtime;root;hostEl;constructor(e,t,n,r=T){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}}})),ze,D,O,Be,Ve,He,Ue,k,We,Ge,Ke,qe,Je,A,j,Ye,Xe,Ze,Qe=n((()=>{a(),Re(),we(),ze=()=>({current:null}),D=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(D(t)):e.concat(t),[]),O=e=>e==null?null:e instanceof E?e.build():typeof e==`string`?i?e:document.createTextNode(e):e,Be=(e,t)=>{if(i){A(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}};u(()=>{let e=t();o();let n=document.createDocumentFragment();a=d(t=>(A(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),f(()=>a?.())},Ve=`__ranFor`,He=e=>typeof e==`object`&&!!e&&e[Ve]===!0,Ue=(e,t,n)=>{let[r,i]=de(t),a=null,o=d(t=>{let i=O(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},We=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;f(()=>{for(let e of r.values())e.dispose();r.clear()}),u(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Ye()&&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=Ue(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();k(n,a),r=i})},Ge=`__ranIndex`,Ke=e=>typeof e==`object`&&!!e&&e[Ge]===!0,qe=(e,t,n)=>{let[r,i]=de(e),a=null,o=d(e=>{let i=O(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Je=(e,t)=>{if(i){(t.each()??[]).forEach((n,r)=>{let i=O(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];f(()=>{for(let e of r)e.dispose();r=[]}),u(()=>{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()}k(n,r.map(e=>e.node).filter(e=>e!=null))})},A=(e,t)=>{i?fe(()=>j(e,t)):j(e,t)},j=(e,t)=>{D(t).forEach(t=>{if(He(t)){We(e,t);return}if(Ke(t)){Je(e,t);return}if(typeof t==`function`){Be(e,t);return}let n=O(t);n!=null&&e.appendChild(n)})},Ye=()=>!1,Xe={bind(e,t){typeof e==`function`?i?fe(()=>t(e())):u(()=>t(e())):t(e)},append:A},Ze=class extends E{constructor(e,t){super(e,t,Xe)}}}));function $e(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 et=n((()=>{Re()})),M,N,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t=n((()=>{Qe(),et(),{View:M,Div:N,Svg:tt,Span:nt,Slot:rt,ButtonBuilder:it,InputBuilder:at,Style:ot,Label:st,Ul:ct,Li:lt,Section:ut,Article:dt,Nav:ft,Header:pt,Footer:mt,Main:ht,DeclarativeShadow:gt}=$e(Ze)})),vt=n((()=>{a(),ue(),we(),Ee(),Me(),w(),Qe(),_t()})),yt=n((()=>{vt()})),P=[!1,`false`,null,void 0],bt=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!(!t||P.includes(n))};function xt(e,t){i?(F.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}function St(e){return F.get(e)}var F,Ct=n((()=>{vt(),F=new Map})),wt,I,Tt=n((()=>{w(),wt=()=>typeof document<`u`?HTMLElement:C,I=wt()})),Et,L,Dt,R,z,Ot,B,kt,At=n((()=>{l(),Et=`data-ranui`,L=`data-ranui-sheet`,Dt=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}ae(e,t,Et)},R=new WeakMap,z=new Map,Ot=e=>{if(typeof CSSStyleSheet>`u`)return;let t=z.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},z.set(e,t)}catch{return}return t.users++,t.sheet},B=e=>{let t=z.get(e);t&&--t.users===0&&z.delete(e)},kt=(e,t)=>{if(typeof document>`u`)return;let n=R.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),B(n.text)):n&&e.querySelector(`style[${L}]`)?.remove(),R.delete(e),!t))return;let r=Ot(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{B(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(L,``),n.textContent=t,e.appendChild(n)}R.set(e,{text:t,sheet:r})}})),V,H,jt,Mt,U,W,G,K,Nt,Pt,q,Ft,J,Y,It,Lt,Rt=n((()=>{At(),V=new WeakMap,H=new WeakMap,jt=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,Mt=`:host([hidden]){display:none}`,U=new Map,W=e=>{let t=U.get(e);if(t!==void 0)return t;let n=`${Mt}\n${jt}`,r=e?`${e}\n${n}`:n;return U.set(e,r),r},G=e=>{let t=H.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return H.set(e,n),n}catch{return}},K=(e,t=``,n={mode:`closed`},r)=>{let i=r??G(e),a=e.shadowRoot||V.get(e)||i?.shadowRoot||e.attachShadow(n);return V.set(e,a),Dt(a,W(t)),a},Nt=e=>{for(let t of e.children)if(t.tagName!==`STYLE`)return t;return null},Pt=(e,t,...n)=>{e.replaceChildren(...n),Dt(e,W(t))},q=(e,t,n)=>{let r=Nt(e);if(r&&n.bind(r))return;let i=n.build();Pt(e,t,...Array.isArray(i)?i:[i])},Ft=(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={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},It=(e,t,n,r={})=>{n?(e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`)):(e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`))},Lt=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&kt(t,e.getAttribute(`sheet`)||``)}}));yt();function zt(e){return e?.checkValidity?.()??!0}function Bt(e){return e?.reportValidity?.()??!0}Rt();var Vt=`:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,flex);box-sizing:var(--ran-input-host-box-sizing,border-box);flex-direction:column}:host([surface=glass]:not([disabled])) .ran-input{background:var(--ran-surface-glass-specular,linear-gradient(180deg, #ffffff8c 0%, #ffffff24 24%, transparent 48%), linear-gradient(0deg, #ffffff47 0%, transparent 30%)), var(--ran-surface-glass-fill,#ffffff8c);-webkit-backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-blur,12px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-border,#ffffffb8);box-shadow:var(--ran-surface-glass-shadow,0 8px 24px #00000024, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80);border-color:var(--ran-input-glass-border-color,var(--ran-color-border-control,#8a8a94))}@media (prefers-reduced-transparency:reduce){:host([surface=glass]:not([disabled])) .ran-input{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-solid-shadow,var(--ran-shadow-elevated))}}.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,#111113));flex:none}: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,#8a8a94));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,auto);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,#111113));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-control,#8a8a94));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;flex:auto}.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:not([status]):has(.ran-input-content:focus-visible){border-color:var(--ran-input-active-border-color,var(--ran-color-border-control,#8a8a94))}.ran-input:has(.ran-input-content:focus-visible){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)}@media (hover:hover){.ran-input:hover:not([disabled]){border-color:var(--ran-input-hover-border-color,var(--ran-color-border-control-hover,#55555e));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,#d70f2f))}.ran-input[status=error]:after{background-color:var(--ran-color-danger,#d70f2f);-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,#ffae00))}.ran-input[status=warning]:after{background-color:var(--ran-color-warning,#ffae00);-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,#8a8a94));background-color:var(--ran-input-disabled-background-color,var(--ran-color-bg-subtle,#f7f7f8));border-color:var(--ran-input-disabled-border-color,var(--ran-color-border,#e4e4e8));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,#8a8a94));background-color:var(--ran-input-content-disabled-background-color,var(--ran-color-bg-subtle,#f7f7f8));border-color:var(--ran-input-content-disabled-border-color,var(--ran-color-border,#e4e4e8));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,#111113));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-placeholder,#6e6e78))}.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,#55555e));flex:none}.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));flex:none}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning-foreground,#aa4d00));flex:none}`;le();var Ht=e=>e,Ut=e=>{let t=e;for(;t;){let e=t.closest?.(`[lang]`)?.getAttribute(`lang`);if(e)return e;t=t.getRootNode?.()?.host}return``},Wt=e=>{let t=(se()?.getLocale()||Ut(e)||(typeof document<`u`?document.documentElement.lang:``)||`en`).toLowerCase();return/^zh[-_](hant|tw|hk|mo)\b/.test(t)?`en`:t.split(/[-_]/)[0]},Gt=(e,t)=>t?e.replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??e)):e,Kt=(e,t,n,r)=>{let i=se(),a=`ranui.${t}`;if(i){let e=i.getMessages(i.getLocale())[a];if(e!==void 0)return Gt(e,r)}return Gt(e[Wt(n)]?.[t]??e.en[t],r)},qt=Ht({en:{"input.required":`Please fill out this field.`},zh:{"input.required":`请填写此字段。`},ja:{"input.required":`このフィールドを入力してください。`},ko:{"input.required":`이 입력란을 작성하세요.`},es:{"input.required":`Completa este campo.`},pt:{"input.required":`Preencha este campo.`},de:{"input.required":`Füllen Sie dieses Feld aus.`},fa:{"input.required":`لطفاً این قسمت را پر کنید.`}}),Jt,Yt=n((()=>{Jt=`:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-name,var(--ran-icon-host-spin-animation,rotate));animation-duration:var(--ran-icon-host-spin-duration,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-iteration-count,infinite)}@media (prefers-reduced-motion:reduce){:host([spin]){animation:none}}.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))}}`})),Xt=r({default:()=>Zt}),Zt,Qt=n((()=>{Zt=` -`})),pt=r({default:()=>X}),X,mt=n((()=>{X=``})),$t=r({default:()=>en}),en,tn=n((()=>{en=` -`})),ht=r({default:()=>gt}),gt,_t=n((()=>{gt=``})),vt=r({default:()=>yt}),yt,bt=n((()=>{yt=` -`})),xt=r({default:()=>St}),St,Ct=n((()=>{St=``})),wt=r({default:()=>Tt}),Tt,Et=n((()=>{Tt=``})),Dt=r({default:()=>Ot}),Ot,kt=n((()=>{Ot=``})),At=r({default:()=>jt}),jt,Mt=n((()=>{jt=` -`})),Nt=r({default:()=>Pt}),Pt,Ft=n((()=>{Pt=``})),It=r({default:()=>Lt}),Lt,Rt=n((()=>{Lt=``})),zt=r({default:()=>Bt}),Bt,Vt=n((()=>{Bt=``})),Ht=r({default:()=>Ut}),Ut,Wt=n((()=>{Ut=``})),Gt=r({default:()=>Kt}),Kt,qt=n((()=>{Kt=``})),Jt=r({default:()=>Yt}),Yt,Xt=n((()=>{Yt=` +`})),nn=r({default:()=>rn}),rn,an=n((()=>{rn=``})),on=r({default:()=>sn}),sn,cn=n((()=>{sn=` +`})),ln=r({default:()=>un}),un,dn=n((()=>{un=``})),fn=r({default:()=>pn}),pn,mn=n((()=>{pn=``})),hn=r({default:()=>gn}),gn,_n=n((()=>{gn=``})),vn=r({default:()=>yn}),yn,bn=n((()=>{yn=` +`})),xn=r({default:()=>Sn}),Sn,Cn=n((()=>{Sn=``})),wn=r({default:()=>Tn}),Tn,En=n((()=>{Tn=``})),Dn=r({default:()=>On}),On,kn=n((()=>{On=``})),An=r({default:()=>jn}),jn,Mn=n((()=>{jn=``})),Nn=r({default:()=>Pn}),Pn,Fn=n((()=>{Pn=``})),In=r({default:()=>Ln}),Ln,Rn=n((()=>{Ln=` -`})),Zt=r({default:()=>Qt}),Qt,$t=n((()=>{Qt=` +`})),zn=r({default:()=>Bn}),Bn,Vn=n((()=>{Bn=` -`})),en=r({default:()=>tn}),tn,nn=n((()=>{tn=` +`})),Hn=r({default:()=>Un}),Un,Wn=n((()=>{Un=` -`})),rn=r({default:()=>an}),an,on=n((()=>{an=``})),sn=r({default:()=>cn}),cn,ln=n((()=>{cn=` -`})),un=r({default:()=>dn}),dn,fn=n((()=>{dn=` +`})),Gn=r({default:()=>Kn}),Kn,qn=n((()=>{Kn=``})),Jn=r({default:()=>Yn}),Yn,Xn=n((()=>{Yn=` +`})),Zn=r({default:()=>Qn}),Qn,$n=n((()=>{Qn=` -`})),pn=r({default:()=>mn}),mn,hn=n((()=>{mn=``})),gn=r({default:()=>_n}),_n,vn=n((()=>{_n=``})),yn=r({default:()=>bn}),bn,xn=n((()=>{bn=` +`})),er=r({default:()=>tr}),tr,nr=n((()=>{tr=``})),rr=r({default:()=>ir}),ir,ar=n((()=>{ir=``})),or=r({default:()=>sr}),sr,cr=n((()=>{sr=` -`})),Sn=r({default:()=>Cn}),Cn,wn=n((()=>{Cn=` -`})),Tn=r({default:()=>En}),En,Dn=n((()=>{En=` `})),lr=r({default:()=>ur}),ur,dr=n((()=>{ur=` +`})),fr=r({default:()=>pr}),pr,mr=n((()=>{pr=` -`})),On=r({default:()=>kn}),kn,An=n((()=>{kn=``})),jn=r({default:()=>Mn}),Mn,Nn=n((()=>{Mn=` +`})),hr=r({default:()=>gr}),gr,_r=n((()=>{gr=``})),vr=r({default:()=>yr}),yr,br=n((()=>{yr=` -`})),Pn=r({default:()=>Fn}),Fn,In=n((()=>{Fn=` -`})),Ln=r({default:()=>Rn}),Rn,zn=n((()=>{Rn=``})),Bn=r({default:()=>Vn}),Vn,Hn=n((()=>{Vn=` -`})),Un=r({default:()=>Wn}),Wn,Gn=n((()=>{Wn=` -`})),Kn=r({default:()=>qn}),qn,Jn=n((()=>{qn=` -`})),Yn=r({default:()=>Xn}),Xn,Zn=n((()=>{Xn=` -`})),Qn=r({default:()=>$n}),$n,er=n((()=>{$n=` -`})),tr=r({default:()=>nr}),nr,rr=n((()=>{nr=` -`})),ir=r({default:()=>ar}),ar,or=n((()=>{ar=` -`})),sr=r({default:()=>cr}),cr,lr=n((()=>{cr=` -`})),ur=r({default:()=>dr}),dr,fr=n((()=>{dr=``})),pr=r({default:()=>mr}),mr,hr=n((()=>{mr=``})),gr=r({default:()=>_r}),_r,vr=n((()=>{_r=``})),yr=r({default:()=>br}),br,xr=n((()=>{br=` -`})),Sr=r({default:()=>Cr}),Cr,wr=n((()=>{Cr=``})),Tr=r({default:()=>Er}),Er,Dr=n((()=>{Er=``})),xr=r({default:()=>Sr}),Sr,Cr=n((()=>{Sr=` +`})),wr=r({default:()=>Tr}),Tr,Er=n((()=>{Tr=``})),Dr=r({default:()=>Or}),Or,kr=n((()=>{Or=` +`})),Ar=r({default:()=>jr}),jr,Mr=n((()=>{jr=` +`})),Nr=r({default:()=>Pr}),Pr,Fr=n((()=>{Pr=` +`})),Ir=r({default:()=>Lr}),Lr,Rr=n((()=>{Lr=` +`})),zr=r({default:()=>Br}),Br,Vr=n((()=>{Br=` +`})),Hr=r({default:()=>Ur}),Ur,Wr=n((()=>{Ur=` +`})),Gr=r({default:()=>Kr}),Kr,qr=n((()=>{Kr=` +`})),Jr=r({default:()=>Yr}),Yr,Xr=n((()=>{Yr=` +`})),Zr=r({default:()=>Qr}),Qr,$r=n((()=>{Qr=``})),ei=r({default:()=>ti}),ti,ni=n((()=>{ti=``})),ri=r({default:()=>ii}),ii,ai=n((()=>{ii=``})),oi=r({default:()=>si}),si,ci=n((()=>{si=` +`})),li=r({default:()=>ui}),ui,di=n((()=>{ui=``})),fi=r({default:()=>pi}),pi,mi=n((()=>{pi=` -`})),Or=r({default:()=>Z}),Z,kr=n((()=>{Z=``})),Ar=r({default:()=>jr}),jr,Mr=n((()=>{jr=` +`})),hi=r({default:()=>gi}),gi,_i=n((()=>{gi=``})),vi=r({default:()=>yi}),yi,bi=n((()=>{yi=` -`})),Nr=r({default:()=>Pr}),Pr,Fr=n((()=>{Pr=``})),Ir=r({default:()=>Lr}),Lr,Rr=n((()=>{Lr=` -`})),zr=r({default:()=>Br}),Br,Vr=n((()=>{Br=` -`})),Hr=r({default:()=>Ur}),Ur,Wr=n((()=>{Ur=``})),Gr=r({default:()=>Kr}),Kr,qr=n((()=>{Kr=``})),Jr=r({default:()=>Yr}),Yr,Xr=n((()=>{Yr=``})),Zr=r({default:()=>Qr}),Qr,$r=n((()=>{Qr=``})),ei=r({default:()=>ti}),ti,ni=n((()=>{ti=``})),ri=!1,ii=new Map,ai=!1,Q=e=>/]/i.test(e),oi=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}},si=(e,t)=>{ai=!0;let n=oi(t);n&&(ii.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},ci=Object.assign({"../../assets/icons/add-user.svg":()=>Promise.resolve().then(()=>(ft(),dt)).then(e=>e.default),"../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>(mt(),pt)).then(e=>e.default),"../../assets/icons/book.svg":()=>Promise.resolve().then(()=>(_t(),ht)).then(e=>e.default),"../../assets/icons/cast.svg":()=>Promise.resolve().then(()=>(bt(),vt)).then(e=>e.default),"../../assets/icons/check-circle-fill.svg":()=>Promise.resolve().then(()=>(Ct(),xt)).then(e=>e.default),"../../assets/icons/check-circle.svg":()=>Promise.resolve().then(()=>(Et(),wt)).then(e=>e.default),"../../assets/icons/check.svg":()=>Promise.resolve().then(()=>(kt(),Dt)).then(e=>e.default),"../../assets/icons/chevron-down.svg":()=>Promise.resolve().then(()=>(Mt(),At)).then(e=>e.default),"../../assets/icons/close-circle-fill.svg":()=>Promise.resolve().then(()=>(Ft(),Nt)).then(e=>e.default),"../../assets/icons/close-circle.svg":()=>Promise.resolve().then(()=>(Rt(),It)).then(e=>e.default),"../../assets/icons/close.svg":()=>Promise.resolve().then(()=>(Vt(),zt)).then(e=>e.default),"../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>(Wt(),Ht)).then(e=>e.default),"../../assets/icons/download.svg":()=>Promise.resolve().then(()=>(qt(),Gt)).then(e=>e.default),"../../assets/icons/drop.svg":()=>Promise.resolve().then(()=>(Xt(),Jt)).then(e=>e.default),"../../assets/icons/eye-close.svg":()=>Promise.resolve().then(()=>($t(),Zt)).then(e=>e.default),"../../assets/icons/eye.svg":()=>Promise.resolve().then(()=>(nn(),en)).then(e=>e.default),"../../assets/icons/fullscreen.svg":()=>Promise.resolve().then(()=>(on(),rn)).then(e=>e.default),"../../assets/icons/github.svg":()=>Promise.resolve().then(()=>(ln(),sn)).then(e=>e.default),"../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>(fn(),un)).then(e=>e.default),"../../assets/icons/home.svg":()=>Promise.resolve().then(()=>(hn(),pn)).then(e=>e.default),"../../assets/icons/info-circle-fill.svg":()=>Promise.resolve().then(()=>(vn(),gn)).then(e=>e.default),"../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>(xn(),yn)).then(e=>e.default),"../../assets/icons/issue.svg":()=>Promise.resolve().then(()=>(wn(),Sn)).then(e=>e.default),"../../assets/icons/loading-scene.svg":()=>Promise.resolve().then(()=>(Dn(),Tn)).then(e=>e.default),"../../assets/icons/loading.svg":()=>Promise.resolve().then(()=>(An(),On)).then(e=>e.default),"../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>(Nn(),jn)).then(e=>e.default),"../../assets/icons/menu.svg":()=>Promise.resolve().then(()=>(In(),Pn)).then(e=>e.default),"../../assets/icons/message.svg":()=>Promise.resolve().then(()=>(zn(),Ln)).then(e=>e.default),"../../assets/icons/mic-off.svg":()=>Promise.resolve().then(()=>(Hn(),Bn)).then(e=>e.default),"../../assets/icons/mic.svg":()=>Promise.resolve().then(()=>(Gn(),Un)).then(e=>e.default),"../../assets/icons/more.svg":()=>Promise.resolve().then(()=>(Jn(),Kn)).then(e=>e.default),"../../assets/icons/pause.svg":()=>Promise.resolve().then(()=>(Zn(),Yn)).then(e=>e.default),"../../assets/icons/pencil.svg":()=>Promise.resolve().then(()=>(er(),Qn)).then(e=>e.default),"../../assets/icons/pip.svg":()=>Promise.resolve().then(()=>(rr(),tr)).then(e=>e.default),"../../assets/icons/play.svg":()=>Promise.resolve().then(()=>(or(),ir)).then(e=>e.default),"../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>(lr(),sr)).then(e=>e.default),"../../assets/icons/power-off.svg":()=>Promise.resolve().then(()=>(fr(),ur)).then(e=>e.default),"../../assets/icons/preview.svg":()=>Promise.resolve().then(()=>(hr(),pr)).then(e=>e.default),"../../assets/icons/refresh.svg":()=>Promise.resolve().then(()=>(vr(),gr)).then(e=>e.default),"../../assets/icons/search.svg":()=>Promise.resolve().then(()=>(xr(),yr)).then(e=>e.default),"../../assets/icons/setting.svg":()=>Promise.resolve().then(()=>(wr(),Sr)).then(e=>e.default),"../../assets/icons/sort.svg":()=>Promise.resolve().then(()=>(Dr(),Tr)).then(e=>e.default),"../../assets/icons/team.svg":()=>Promise.resolve().then(()=>(kr(),Or)).then(e=>e.default),"../../assets/icons/unlock.svg":()=>Promise.resolve().then(()=>(Mr(),Ar)).then(e=>e.default),"../../assets/icons/user.svg":()=>Promise.resolve().then(()=>(Fr(),Nr)).then(e=>e.default),"../../assets/icons/volume-mute.svg":()=>Promise.resolve().then(()=>(Rr(),Ir)).then(e=>e.default),"../../assets/icons/volume.svg":()=>Promise.resolve().then(()=>(Vr(),zr)).then(e=>e.default),"../../assets/icons/warning-circle-fill.svg":()=>Promise.resolve().then(()=>(Wr(),Hr)).then(e=>e.default),"../../assets/icons/warning-circle.svg":()=>Promise.resolve().then(()=>(qr(),Gr)).then(e=>e.default),"../../assets/icons/without-content.svg":()=>Promise.resolve().then(()=>(Xr(),Jr)).then(e=>e.default),"../../assets/icons/zoom-in.svg":()=>Promise.resolve().then(()=>($r(),Zr)).then(e=>e.default),"../../assets/icons/zoom-out.svg":()=>Promise.resolve().then(()=>(ni(),ei)).then(e=>e.default)}),li={};for(let[e,t]of Object.entries(ci)){let n=e.split(`/`).pop()?.replace(/\.svg$/,``);n&&(li[n]=t)}I(`r-icon`,class extends L{isDev=ri;_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=G(this,ut);let e=N().class(`ran-icon`).part(`ran-icon`).build();this._shadowDom.appendChild(e),this._div=e}get name(){return K(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return K(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return K(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 K(this,`aria-label`)}set ariaLabel(e){q(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return K(this,`sheet`)}set sheet(e){q(this,`sheet`,e)}handlerExternalCss=()=>{J(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{this._icon&&(this.decorative?(this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`)):(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=>{si(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=M(`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 ui=`:host{position:var(--ran-input-host-position,relative);display:var(--ran-input-host-display,flex);box-sizing:var(--ran-input-host-box-sizing,border-box);flex-direction:column}.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));flex:none}: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,auto);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;flex:auto}.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));flex:none}.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));flex:none}:host([status=warning]) .ran-input-message{color:var(--ran-input-message-warning-color,var(--ran-color-warning-foreground,#aa4d00));flex:none}`,di=0,$=class extends L{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=G(this,ui);let e=Se(),t=N().class(`ran-input`).part(`input`).children(He().class(`ran-input-content`).ref(e).part(`content`)).build();this._shadowDom.appendChild(t),this._input=t,this._inputContent=ot(e,`content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++di}`)}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,q(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){st(this,`required`,!(!e||e===`false`))}get disabled(){return F(this)}set disabled(e){P.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 K(this,`sheet`)}set sheet(e){q(this,`sheet`,e)}handlerExternalCss=()=>{J(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 ct(this._internals)}reportValidity(){return lt(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;q(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=()=>{q(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=We().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=N().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&&(P.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.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{this._icon||(this._icon=M(`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),F(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 I(`r-input`,$),e.Input=$,e.default=$,e})({}); \ No newline at end of file +`})),xi=r({default:()=>Si}),Si,Ci=n((()=>{Si=``})),wi=r({default:()=>Ti}),Ti,Ei=n((()=>{Ti=` +`})),Di=r({default:()=>Oi}),Oi,ki=n((()=>{Oi=` +`})),Ai=r({default:()=>ji}),ji,Mi=n((()=>{ji=``})),Ni=r({default:()=>Pi}),Pi,Fi=n((()=>{Pi=``})),Ii=r({default:()=>Li}),Li,Ri=n((()=>{Li=``})),zi=r({default:()=>Bi}),Bi,Vi=n((()=>{Bi=``})),Hi=r({default:()=>Ui}),Ui,Wi=n((()=>{Ui=``})),Gi=r({Icon:()=>$i,RAN_ICON_NAMES:()=>Qi,registerIcon:()=>Q,registerIcons:()=>Yi}),Ki,qi,X,Z,Ji,Q,Yi,Xi,Zi,Qi,$i,ea=n((()=>{Yt(),Tt(),Ct(),Ki=!1,qi=new Map,X=!1,Z=e=>/]/i.test(e),Ji=e=>{if(typeof e==`string`)return Z(e)?e:void 0;if(!e||typeof e!=`object`)return;let t=e,n=t.data;if(typeof n==`string`&&Z(n))return n;let r=t.default;if(typeof r==`string`&&Z(r))return r;if(r&&typeof r==`object`){let e=r;if(typeof e.data==`string`&&Z(e.data))return e.data}},Q=(e,t)=>{X=!0;let n=Ji(t);n&&(qi.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},Yi=e=>{X=!0,Object.entries(e).forEach(([e,t])=>{Q(e,t)})},Xi=Object.assign({"../../assets/icons/add-user.svg":()=>Promise.resolve().then(()=>(Qt(),Xt)).then(e=>e.default),"../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>(tn(),$t)).then(e=>e.default),"../../assets/icons/book.svg":()=>Promise.resolve().then(()=>(an(),nn)).then(e=>e.default),"../../assets/icons/cast.svg":()=>Promise.resolve().then(()=>(cn(),on)).then(e=>e.default),"../../assets/icons/check-circle-fill.svg":()=>Promise.resolve().then(()=>(dn(),ln)).then(e=>e.default),"../../assets/icons/check-circle.svg":()=>Promise.resolve().then(()=>(mn(),fn)).then(e=>e.default),"../../assets/icons/check.svg":()=>Promise.resolve().then(()=>(_n(),hn)).then(e=>e.default),"../../assets/icons/chevron-down.svg":()=>Promise.resolve().then(()=>(bn(),vn)).then(e=>e.default),"../../assets/icons/close-circle-fill.svg":()=>Promise.resolve().then(()=>(Cn(),xn)).then(e=>e.default),"../../assets/icons/close-circle.svg":()=>Promise.resolve().then(()=>(En(),wn)).then(e=>e.default),"../../assets/icons/close.svg":()=>Promise.resolve().then(()=>(kn(),Dn)).then(e=>e.default),"../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>(Mn(),An)).then(e=>e.default),"../../assets/icons/download.svg":()=>Promise.resolve().then(()=>(Fn(),Nn)).then(e=>e.default),"../../assets/icons/drop.svg":()=>Promise.resolve().then(()=>(Rn(),In)).then(e=>e.default),"../../assets/icons/eye-close.svg":()=>Promise.resolve().then(()=>(Vn(),zn)).then(e=>e.default),"../../assets/icons/eye.svg":()=>Promise.resolve().then(()=>(Wn(),Hn)).then(e=>e.default),"../../assets/icons/fullscreen.svg":()=>Promise.resolve().then(()=>(qn(),Gn)).then(e=>e.default),"../../assets/icons/github.svg":()=>Promise.resolve().then(()=>(Xn(),Jn)).then(e=>e.default),"../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>($n(),Zn)).then(e=>e.default),"../../assets/icons/home.svg":()=>Promise.resolve().then(()=>(nr(),er)).then(e=>e.default),"../../assets/icons/info-circle-fill.svg":()=>Promise.resolve().then(()=>(ar(),rr)).then(e=>e.default),"../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>(cr(),or)).then(e=>e.default),"../../assets/icons/issue.svg":()=>Promise.resolve().then(()=>(dr(),lr)).then(e=>e.default),"../../assets/icons/loading-scene.svg":()=>Promise.resolve().then(()=>(mr(),fr)).then(e=>e.default),"../../assets/icons/loading.svg":()=>Promise.resolve().then(()=>(_r(),hr)).then(e=>e.default),"../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>(br(),vr)).then(e=>e.default),"../../assets/icons/menu.svg":()=>Promise.resolve().then(()=>(Cr(),xr)).then(e=>e.default),"../../assets/icons/message.svg":()=>Promise.resolve().then(()=>(Er(),wr)).then(e=>e.default),"../../assets/icons/mic-off.svg":()=>Promise.resolve().then(()=>(kr(),Dr)).then(e=>e.default),"../../assets/icons/mic.svg":()=>Promise.resolve().then(()=>(Mr(),Ar)).then(e=>e.default),"../../assets/icons/more.svg":()=>Promise.resolve().then(()=>(Fr(),Nr)).then(e=>e.default),"../../assets/icons/pause.svg":()=>Promise.resolve().then(()=>(Rr(),Ir)).then(e=>e.default),"../../assets/icons/pencil.svg":()=>Promise.resolve().then(()=>(Vr(),zr)).then(e=>e.default),"../../assets/icons/pip.svg":()=>Promise.resolve().then(()=>(Wr(),Hr)).then(e=>e.default),"../../assets/icons/play.svg":()=>Promise.resolve().then(()=>(qr(),Gr)).then(e=>e.default),"../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>(Xr(),Jr)).then(e=>e.default),"../../assets/icons/power-off.svg":()=>Promise.resolve().then(()=>($r(),Zr)).then(e=>e.default),"../../assets/icons/preview.svg":()=>Promise.resolve().then(()=>(ni(),ei)).then(e=>e.default),"../../assets/icons/refresh.svg":()=>Promise.resolve().then(()=>(ai(),ri)).then(e=>e.default),"../../assets/icons/search.svg":()=>Promise.resolve().then(()=>(ci(),oi)).then(e=>e.default),"../../assets/icons/setting.svg":()=>Promise.resolve().then(()=>(di(),li)).then(e=>e.default),"../../assets/icons/sort.svg":()=>Promise.resolve().then(()=>(mi(),fi)).then(e=>e.default),"../../assets/icons/team.svg":()=>Promise.resolve().then(()=>(_i(),hi)).then(e=>e.default),"../../assets/icons/unlock.svg":()=>Promise.resolve().then(()=>(bi(),vi)).then(e=>e.default),"../../assets/icons/user.svg":()=>Promise.resolve().then(()=>(Ci(),xi)).then(e=>e.default),"../../assets/icons/volume-mute.svg":()=>Promise.resolve().then(()=>(Ei(),wi)).then(e=>e.default),"../../assets/icons/volume.svg":()=>Promise.resolve().then(()=>(ki(),Di)).then(e=>e.default),"../../assets/icons/warning-circle-fill.svg":()=>Promise.resolve().then(()=>(Mi(),Ai)).then(e=>e.default),"../../assets/icons/warning-circle.svg":()=>Promise.resolve().then(()=>(Fi(),Ni)).then(e=>e.default),"../../assets/icons/without-content.svg":()=>Promise.resolve().then(()=>(Ri(),Ii)).then(e=>e.default),"../../assets/icons/zoom-in.svg":()=>Promise.resolve().then(()=>(Vi(),zi)).then(e=>e.default),"../../assets/icons/zoom-out.svg":()=>Promise.resolve().then(()=>(Wi(),Hi)).then(e=>e.default)}),Zi={};for(let[e,t]of Object.entries(Xi)){let n=e.split(`/`).pop()?.replace(/\.svg$/,``);n&&(Zi[n]=t)}Qi=`add-user.arrow-down.book.cast.check.check-circle.check-circle-fill.chevron-down.close.close-circle.close-circle-fill.copy.download.drop.eye.eye-close.fullscreen.github.globe.home.info-circle.info-circle-fill.issue.loading.loading-scene.lock.menu.message.mic.mic-off.more.pause.pencil.pip.play.plus.power-off.preview.refresh.search.setting.sort.team.unlock.user.volume.volume-mute.warning-circle.warning-circle-fill.without-content.zoom-in.zoom-out`.split(`.`),$i=class extends I{isDev=Ki;_events=new c;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=K(this,Jt),q(this._shadowDom,Jt,{bind:e=>this._bindPaintedTree(e),build:()=>{let e=N().class(`ran-icon`).part(`ran-icon`).build();return this._div=e,e}})}_bindPaintedTree(e){if(!(typeof e.className==`string`?e.className:``).includes(`ran-icon`)&&e.getAttribute(`part`)!==`ran-icon`)return!1;this._div=e;let t=e.querySelector?.(`svg`);return t&&(this._icon=t),!0}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=()=>{Lt(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{this._icon&&(this.decorative?(this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`)):(this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)))};setIcon=()=>{let e=this.name;if(e&&this._icon?.getAttribute(`data-name`)===e)this.setSize(),this.setColor(),this.setSpin(),this.syncA11y();else if(this._icon&&=(this._icon.remove(),void 0),typeof document>`u`&&this._div&&(this._div.innerHTML=``),e){if(e.startsWith(`{t().then(t=>{Q(e,t)}).catch(t=>{this.isDev&&console.warn(`[ranui-icon] lazy load builtin failed: ${e}`,t)})};isSvgText=e=>Z(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=M(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(i&&i.tagName.toLowerCase()===`svg`)return i};renderSvg=(e,t)=>{if(typeof document>`u`){let n=this.size||`1em`,r=/^\d+(\.\d+)?$/.test(n)?`${n}px`:n,i=this.color||`currentColor`,a=e.replace(/]*)>/i,``);this._div.innerHTML=a,this.syncA11y();return}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())}},xt(`r-icon`,$i)}));Tt(),yt(),Rt(),Ct();var ta=()=>{typeof document<`u`&&(typeof customElements<`u`&&customElements.get(`r-icon`)||Promise.resolve().then(()=>(ea(),Gi)))},na=0,$=class extends I{static formAssociated=!0;_internals;static get observedAttributes(){return[`label`,`disabled`,`name`,`placeholder`,`type`,`icon`,`value`,`status`,`message`,`min`,`max`,`step`,`required`,`sheet`,`surface`]}_events=new c;_shadowDom;_input;_label;_inputContent;_icon;_message;_defaultValue=``;_defaultValueCaptured=!1;constructor(){super(),this._internals=G(this),this._shadowDom=K(this,Vt,{mode:`closed`},this._internals),q(this._shadowDom,Vt,{bind:e=>this._bindPaintedTree(e),build:()=>{let e=ze(),t=N().class(`ran-input`).part(`input`).children(at().class(`ran-input-content`).ref(e).part(`content`)).build();return this._input=t,this._inputContent=Ft(e,`content`),this._inputContent.id||(this._inputContent.id=`ran-input-${++na}`),t}})}_bindPaintedTree(e){let t=e.getAttribute(`part`)||``,n=typeof e.className==`string`?e.className:``;if(!t.includes(`input`)&&!n.includes(`ran-input`))return!1;let r=null,i;for(let t of Array.from(e.children)){let e=t.tagName.toLowerCase();e===`input`?r=t:e===`r-icon`&&(i=t)}if(!r)return!1;this._input=e,this._inputContent=r,this._icon=i,this._inputContent.id||(this._inputContent.id=`ran-input-${++na}`);for(let t of this._shadowDom.children){if(t===e)break;t.tagName.toLowerCase()===`label`&&(this._label=t)}for(let t of this._shadowDom.children){if(t===e||t===this._label)continue;let n=t.getAttribute?.(`part`)||``;t.tagName.toLowerCase()===`div`&&n.includes(`message`)&&(this._message=t)}return!0}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 bt(this)}set disabled(e){P.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)}get surface(){return J(this,`surface`)}set surface(e){Y(this,`surface`,e,{removeEmpty:!0})}handlerExternalCss=()=>{Lt(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||Kt(qt,`input.required`,this),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 zt(this._internals)}reportValidity(){return Bt(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=st().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=N().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&&(P.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.setAttribute(`icon`,t),this.dealIcon())};dealIcon=()=>{if(ta(),!this._icon){let e=St(`r-icon`);typeof document>`u`&&e?(this._icon=new e,this._icon.setAttribute(`class`,`ran-icon`)):this._icon=M(`r-icon`).class(`ran-icon`).build(),typeof this._inputContent.insertAdjacentElement==`function`?this._inputContent.insertAdjacentElement(`beforebegin`,this._icon):this._inputContent.parentNode?.insertBefore(this._icon,this._inputContent)}if(this.icon){this._icon.setAttribute(`name`,this.icon);let e=this._icon;typeof document>`u`&&e._preSerialize?.()}};_preSerialize(){let e=this.getAttribute(`label`);e!=null&&this.listenLabel(`label`,e);let t=this.getAttribute(`placeholder`);t!=null&&this.listenPlaceholder(`placeholder`,t);let n=this.getAttribute(`type`);n!=null&&this.listenType(`type`,n),this.getAttribute(`icon`)&&this.dealIcon()}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),bt(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 xt(`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 7a7d751b8..ab618a031 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=(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=`data-adopted-style`,d=(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}},f=(e,t,n=u)=>{if(typeof document<`u`&&t&&!d(e,t,l)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}},p=(e,t,n,r)=>e===`end`?t+n-r:e===`center`?t+(n-r)/2:t,m=()=>({top:0,left:0,width:typeof window<`u`?window.innerWidth:1/0,height:typeof window<`u`?window.innerHeight:1/0}),h=e=>{let{anchor:t,floating:n,offset:r=0,padding:i=8}=e,a=e.boundary??m(),[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)=>p(c,e,t,n),h,g;if(l===`bottom`?(h=t.top+t.height+r,g=f(t.left,t.width,n.width)):l===`top`?(h=t.top-n.height-r,g=f(t.left,t.width,n.width)):l===`right`?(h=f(t.top,t.height,n.height),g=t.left+t.width+r):(h=f(t.top,t.height,n.height),g=t.left-n.width-r),d&&u){let e=a.left+i,t=a.left+a.width-n.width-i;t>=e&&(g=Math.min(Math.max(g,e),t))}else if(d){let e=a.top+i,t=a.top+a.height-n.height-i;t>=e&&(h=Math.min(Math.max(h,e),t))}return{top:h,left:g,placement:s?`${l}-${c}`:l,side:l,align:c}},g=typeof document>`u`,_=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[()=>(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)A(e,y);S===0&&re()}}]}function E(e){let t=ee(e,!0);return te(t),ae(t),()=>j(t)}function D(e){let t=b;b=null;try{return e()}finally{b=t}}function O(e){let t={owned:[],cleanups:[],owner:x},n=x,r=b;x=t,b=null;try{return e(()=>se(t))}finally{x=n,b=r}}function k(e){x&&x.cleanups.push(e)}function ee(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 te(e){x&&x.owned.push(e)}function ne(e){b&&(b.sources.add(e),e.observers.add(b))}function A(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)A(t,v)}function re(){if(!(S>0||w)){w=!0;try{for(;C.size>0;){let e=[...C];C.clear();for(let t of e)t.disposed||ie(t)}}finally{w=!1}}}function ie(e){if(!(e.disposed||e.state===_)){if(e.state===v)for(let t of e.sources)`fn`in t&&ie(t);e.state===y&&ae(e),e.state=_}}function ae(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);oe(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)A(t,y)}}finally{e.running=!1,b=t,x=n}}function oe(e){for(let t of e.owned)j(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 j(e){e.disposed||(e.disposed=!0,oe(e),e.observers.clear())}function se(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function ce(e){return s(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`?s(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,he=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: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 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 ge(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}="${ce(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${ce(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 N,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}`}},ge=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``}},P={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)){P.append(e,n);continue}if(typeof n==`function`){P.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 F?n.build():typeof n==`string`&&!g?document.createTextNode(n):n;e.appendChild(t)}}},_e=`http://www.w3.org/2000/svg`,ve=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,n=P){this.runtime=n;let r=t??(ve.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=g?new he(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=>{g?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(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}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 ye(this.el,t,e,this.runtime)}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}},ye=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(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}},I=()=>({current:null}),be=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(be(t)):e.concat(t),[]),L=e=>e==null?null:e instanceof F?e.build():typeof e==`string`?g?e:document.createTextNode(e):e,xe=(e,t)=>{if(g){R(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=O(t=>(R(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),k(()=>i?.())},Se=`__ranFor`,Ce=e=>typeof e==`object`&&!!e&&e[Se]===!0,we=(e,t,n)=>{let[r,i]=T(t),a=null,o=O(t=>{let i=L(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(g){(t.each()??[]).forEach((n,r)=>{let i=L(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;k(()=>{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)){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]=T(e),a=null,o=O(e=>{let i=L(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ae=(e,t)=>{if(g){(t.each()??[]).forEach((n,r)=>{let i=L(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];k(()=>{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()}Te(n,r.map(e=>e.node).filter(e=>e!=null))})},R=(e,t)=>{g?D(()=>je(e,t)):je(e,t)},je=(e,t)=>{be(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=L(t);n!=null&&e.appendChild(n)})},Me=()=>!1,Ne={bind(e,t){typeof e==`function`?g?D(()=>t(e())):E(()=>t(e())):t(e)},append:R},Pe=class extends F{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,_e),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:z,Svg:Le,Span:Re,Slot:B,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 V(e,t){g?(Qe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var H=typeof document<`u`?HTMLElement:he,$e=`data-ranui`,et=`data-ranui-sheet`,tt=(e,t)=>f(e,t,$e),U=new WeakMap,W=new Map,nt=e=>{if(typeof CSSStyleSheet>`u`)return;let t=W.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},W.set(e,t)}catch{return}return t.users++,t.sheet},rt=e=>{let t=W.get(e);t&&--t.users===0&&W.delete(e)},it=(e,t)=>{if(typeof document>`u`)return;let n=U.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),rt(n.text)):n&&e.querySelector(`style[${et}]`)?.remove(),U.delete(e),!t))return;let r=nt(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{rt(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(et,``),n.textContent=t,e.appendChild(n)}U.set(e,{text:t,sheet:r})},at=new WeakMap,ot=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,st=new Map,ct=e=>{let t=st.get(e);if(t!==void 0)return t;let n=e?`${e}\n${ot}`:ot;return st.set(e,n),n},G=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||at.get(e)||e.attachShadow(n);return at.set(e,r),tt(r,ct(t)),r},K=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},q=(e,t,n=``)=>e.getAttribute(t)??n,J=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},lt=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&it(t,e.getAttribute(`sheet`)||``)},ut=`:host{visibility:hidden;position:absolute}`;V(`r-content`,class extends H{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=G(this,ut);let e=B().class(`slot`).build();this._shadowDom.appendChild(e),this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{let t=e.filter(e=>e.type===`childList`||e.type===`attributes`);if(!t.length)return;let n=t[t.length-1];this.dispatchEvent(new CustomEvent(`change`,{detail:{type:t.some(e=>e.type===`childList`)?`childList`:`attributes`,value:{content:this.children,mutation:n,mutations:t}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var dt=`@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,auto)}: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}}`;V(`r-dropdown`,class extends H{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`]}constructor(){super(),this._shadowDom=G(this,dt);let e=I(),t=I(),n=z().class(`ranui-dropdown-container`).children(z().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).ref(e).part(`dropdown`).children(B().class(`slot`).ref(t))).build();this._shadowDom.appendChild(n),this.container=n,this.dropdown=K(e,`ranui dropdown`),this._slot=K(t,`slot`)}get transit(){return q(this,`transit`)}set transit(e){J(this,`transit`,e,{removeEmpty:!0})}get arrow(){return q(this,`arrow`)}set arrow(e){J(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{lt(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();e?(!this.arrowIcon&&this.container&&(this.arrowIcon=z().class(`ranui-dropdown-arrow`).build(),this.arrowIcon.innerHTML=``,this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)):(this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0)};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 ft=`: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)}`,pt={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`}},Y=Symbol.for(`ranui.floating.panel-owner`),X=Symbol.for(`ranui.floating.panel-escape`),Z=Symbol.for(`ranui.floating.active-panels`),mt=`ranui-floating-change`,ht=(e,t)=>{let n=new Set,r=e;for(;r&&!n.has(r);){if(r===t)return!0;n.add(r),r=r[Y]??r.parentNode??(r instanceof ShadowRoot?r.host:null)}return!1},gt=e=>[...e.ownerDocument[Z]??[]].filter(t=>t.isConnected&&ht(t,e)),_t=(e,t)=>{gt(e).at(-1)?.[X]?.(t)},Q=(e,t,n)=>{let r=e.ownerDocument;t?(e[Y]=t,e[X]=n,(r[Z]??=new Set).add(e)):(delete e[Y],delete e[X],r[Z]?.delete(e)),r.dispatchEvent(new Event(mt))},vt=e=>e.getAnimationTarget?.()??e,yt=(e,t)=>{let n=vt(e);typeof n.getAnimations!=`function`||typeof requestAnimationFrame!=`function`?t():requestAnimationFrame(()=>{let e=n.getAnimations();e.length?(async()=>{await Promise.allSettled(e.map(e=>e.finished)),t()})():t()})},bt=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[Y]??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;r===i?s||t(e):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;e?(n.style.setProperty(`z-index`,`var(--ran-dropdown-host-z-index, var(--ran-z-dropdown, 1100))`),Q(n,t,this.options.onEscape),this.resolvedSide=void 0,t.dispatchEvent(new CustomEvent(`show`)),n.style.setProperty(`display`,`block`),this.attachReposition(),this.position(!0),yt(n,()=>{r===this.generation&&(n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-show`)))})):(Q(n),this.detachReposition(),t.dispatchEvent(new CustomEvent(`hide`)),n.setAttribute(`transit`,pt[this.resolvedSide??this.side()].exit),yt(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)=>{let t=this.options.panel();if(!t)return;let n=this.generation,r=()=>{let r=this.options.panel();r===t&&(!e||this.opened&&n===this.generation)&&this.write(r,e)};e&&typeof requestAnimationFrame==`function`?requestAnimationFrame(r):r()};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(),m=a?.(e),g=f,_=m?.width??f.width,v=m?.height??f.height,y=this.options.placement(),[b,x]=y.split(`-`),S=x??`start`,C,w,T=b;if(d){let e=d.getBoundingClientRect();T===`top`||T===`bottom`?(C=T===`bottom`?c.bottom-e.top+n:c.top-e.top-v-n,w=p(S,c.left,c.width,_)-e.left):(C=p(S,c.top,c.height,v)-e.top,w=T===`right`?c.right-e.left+n:c.left-e.left-_-n)}else{let e=h({anchor:{top:c.top,left:c.left,width:c.width,height:c.height},floating:{width:_,height:v},placement:y,offset:n});T=e.side,C=e.top+window.scrollY,w=e.left+window.scrollX}let E={top:C,left:w,side:T,align:S,anchorRect:c,panelRect:g,container:d},D=o?.(E,e);D&&(E.top=D.top,E.left=D.left),this.resolvedSide=E.side,e.style.setProperty(`position`,`absolute`),e.style.setProperty(`inset`,`${E.top}px auto auto ${E.left}px`),e.style.setProperty(`--ran-x`,`${E.left}px`),e.style.setProperty(`--ran-y`,`${E.top}px`),t&&e.setAttribute(`transit`,pt[E.side].enter),s?.(E,e)}reposition=()=>{this.opened&&!this.repositionFrame&&(typeof requestAnimationFrame==`function`?this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=0,this.opened&&this.position()}):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&&Q(e),this.repositionFrame&&typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=0),this.detachReposition()}};function xt(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var St=8,Ct=300,$=16,wt=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),Tt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Et=class extends H{_events=new c;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;removeTimeId;_repositionBound=!1;_returnFocus;_floating=new bt({onEscape:e=>this._dismissFromKeyboard(e),host:this,panel:()=>this.popoverContent,anchor:()=>Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this,placement:()=>this.placement,offset:St,containerId:()=>this.getPopupContainerId,afterPosition:(e,t)=>{let{anchorRect:n,panelRect:r,side:i}=e,a=Tt[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=G(this,ft);let e=I(),t=z().class(`ran-popover-block`).role(`tooltip`).children(B().class(`slot`).ref(e)).build();this._shadowDom.appendChild(t),this.popoverBlock=t,this._slot=K(e,`slot`)}get placement(){return q(this,`placement`,`top`)}set placement(e){J(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 q(this,`trigger`,`hover`)}set trigger(e){J(this,`trigger`,e)}get getPopupContainerId(){return q(this,`getPopupContainerId`)}set getPopupContainerId(e){J(this,`getPopupContainerId`,e)}get sheet(){return q(this,`sheet`)}set sheet(e){J(this,`sheet`,e)}handlerExternalCss=()=>{lt(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),this._events.on(this.popoverContent,`keydown`,this._dismissFromKeyboard);let t=z().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 Array.from(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()},Ct)},$);removeDropDownTimeId=t(()=>{this.trigger.includes(`hover`)&&!r()&&(clearTimeout(this.removeTimeId),this.removeTimeId=void 0)},$);setDropdownDisplayBlock=t(()=>{this.open=!0},$);setDropdownDisplayNone=t(()=>{this.open=!1},$);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;let t=!this.open;this.toggle(),t&&(this._returnFocus=e.composedPath().find(e=>e instanceof HTMLElement&&e!==this&&this.contains(e)&&e.tabIndex>=0)??Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this)};keydownPopover=e=>{e.defaultPrevented||e.isComposing||e.keyCode===229||(e.key===`Escape`?(this.setDropdownDisplayBlock.cancel(),this._dismissFromKeyboard(e)):xt(e)&&(e.preventDefault(),this.setDropdownDisplayBlock()))};_dismissFromKeyboard=e=>{e.key!==`Escape`||e.defaultPrevented||e.isComposing||e.keyCode===229||!this.open||(gt(this).some(e=>e!==this.popoverContent)?_t(this,e):(e.preventDefault(),e.stopPropagation(),this.setDropdownDisplayBlock.cancel(),this.setDropdownDisplayNone.cancel(),this.blur.cancel(),clearTimeout(this.removeTimeId),this.removeTimeId=void 0,this.hide(),this._returnFocus?.isConnected&&this._returnFocus.focus({preventScroll:!0,focusVisible:!0})))};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._events.on(this,`show`,()=>{let e=this.getRootNode().activeElement;this._returnFocus=e instanceof HTMLElement&&(e===this||this.contains(e))?e:Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this}),this.popoverContent&&this._events.on(this.popoverContent,`keydown`,this._dismissFromKeyboard),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=Tt[this.placementSide];e&&this.popoverContent?.setAttribute(`arrow`,e)},$);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;let e=Array.from(this.children).find(e=>e.tagName===`R-CONTENT`);e&&this.popoverContent&&e.append(...Array.from(this.popoverContent.childNodes)),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 V(`r-popover`,Et),e.PLACEMENT_TYPE=wt,e.Popover=Et,e.default=Et,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=`data-adopted-style`,d=(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}},f=(e,t,n=u)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!d(e,t,l)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}},ee=(e,t,n,r)=>e===`end`?t+n-r:e===`center`?t+(n-r)/2:t,te=()=>({top:0,left:0,width:typeof window<`u`?window.innerWidth:1/0,height:typeof window<`u`?window.innerHeight:1/0}),p=e=>{let{anchor:t,floating:n,offset:r=0,padding:i=8}=e,a=e.boundary??te(),[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)=>ee(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}},m=typeof document>`u`,h=0,g=1,_=2,v=null,y=null,b=0,x=new Set,S=!1;function C(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)O(e,_);b===0&&ae()}}]}function w(e){let t=ne(e,!0);return re(t),se(t),()=>k(t)}function T(e){let t=v;v=null;try{return e()}finally{v=t}}function E(e){let t={owned:[],cleanups:[],owner:y},n=y,r=v;y=t,v=null;try{return e(()=>le(t))}finally{y=n,v=r}}function D(e){y&&y.cleanups.push(e)}function ne(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:_,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:y}}function re(e){y&&y.owned.push(e)}function ie(e){v&&(v.sources.add(e),e.observers.add(v))}function O(e,t){if(e.disposed||e.state>=t)return;let n=e.state===h;if(e.state=t,e.isEffect)x.add(e);else if(n)for(let t of e.observers)O(t,g)}function ae(){if(!(b>0||S)){S=!0;try{for(;x.size>0;){let e=[...x];x.clear();for(let t of e)t.disposed||oe(t)}}finally{S=!1}}}function oe(e){if(!(e.disposed||e.state===h)){if(e.state===g)for(let t of e.sources)`fn`in t&&oe(t);e.state===_&&se(e),e.state=h}}function se(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);ce(e);let t=v,n=y;v=e,y=e,e.running=!0,e.state=h;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)O(t,_)}}finally{e.running=!1,v=t,y=n}}function ce(e){for(let t of e.owned)k(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 k(e){e.disposed||(e.disposed=!0,ce(e),e.observers.clear())}function le(e){for(let t of e.owned)k(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))},A=(e,t,n)=>{for(let r of e)de(r)&&(he(r,t)&&n.push(r),A(r.childrenList,t,n))};function ge(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var j=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return ge(this.childrenList,e,t)}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 A(this.childrenList,e,t),t}},_e=new Map,ve=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??_e}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 j)}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}insertBefore(e,t){return ge(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new ye(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return A(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;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let 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 j,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}`}},ye=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof j))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return ge(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return A(this.childrenList,e,t),t}serialize(){return``}},M={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)){M.append(e,n);continue}if(typeof n==`function`){M.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 N?n.build():typeof n==`string`&&!m?document.createTextNode(n):n;e.appendChild(t)}}},be=`http://www.w3.org/2000/svg`,xe=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{runtime;el;constructor(e,t,n=M){this.runtime=n;let r=t??(xe.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=m?new ve(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=>{m?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(m){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 Se(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(m)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Se=class{runtime;root;hostEl;constructor(e,t,n,r=M){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(m)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 m?this.root.serialize():this.root.innerHTML}},P=()=>({current:null}),Ce=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(Ce(t)):e.concat(t),[]),F=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?m?e:document.createTextNode(e):e,we=(e,t)=>{if(m){I(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}};w(()=>{let e=t();a();let n=document.createDocumentFragment();i=E(t=>(I(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),D(()=>i?.())},Te=`__ranFor`,Ee=e=>typeof e==`object`&&!!e&&e[Te]===!0,De=(e,t,n)=>{let[r,i]=C(t),a=null,o=E(t=>{let i=F(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},Oe=(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},ke=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=F(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;D(()=>{for(let e of r.values())e.dispose();r.clear()}),w(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Fe()&&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=De(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();Oe(n,a),r=i})},Ae=`__ranIndex`,je=e=>typeof e==`object`&&!!e&&e[Ae]===!0,Me=(e,t,n)=>{let[r,i]=C(e),a=null,o=E(e=>{let i=F(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ne=(e,t)=>{if(m){(t.each()??[]).forEach((n,r)=>{let i=F(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];D(()=>{for(let e of r)e.dispose();r=[]}),w(()=>{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()}Oe(n,r.map(e=>e.node).filter(e=>e!=null))})},I=(e,t)=>{m?T(()=>Pe(e,t)):Pe(e,t)},Pe=(e,t)=>{Ce(t).forEach(t=>{if(Ee(t)){ke(e,t);return}if(je(t)){Ne(e,t);return}if(typeof t==`function`){we(e,t);return}let n=F(t);n!=null&&e.appendChild(n)})},Fe=()=>!1,Ie={bind(e,t){typeof e==`function`?m?T(()=>t(e())):w(()=>t(e())):t(e)},append:I},Le=class extends N{constructor(e,t){super(e,t,Ie)}};function Re(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,be),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:ze,Div:L,Svg:Be,Span:Ve,Slot:R,ButtonBuilder:He,InputBuilder:Ue,Style:We,Label:Ge,Ul:Ke,Li:qe,Section:Je,Article:Ye,Nav:Xe,Header:Ze,Footer:Qe,Main:$e,DeclarativeShadow:et}=Re(Le),tt=new Map;function z(e,t){m?(tt.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var B=typeof document<`u`?HTMLElement:ve,nt=`data-ranui`,rt=`data-ranui-sheet`,it=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}f(e,t,nt)},V=new WeakMap,H=new Map,at=e=>{if(typeof CSSStyleSheet>`u`)return;let t=H.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},H.set(e,t)}catch{return}return t.users++,t.sheet},ot=e=>{let t=H.get(e);t&&--t.users===0&&H.delete(e)},st=(e,t)=>{if(typeof document>`u`)return;let n=V.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),ot(n.text)):n&&e.querySelector(`style[${rt}]`)?.remove(),V.delete(e),!t))return;let r=at(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{ot(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(rt,``),n.textContent=t,e.appendChild(n)}V.set(e,{text:t,sheet:r})},ct=new WeakMap,lt=new WeakMap,ut=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,dt=`:host([hidden]){display:none}`,ft=new Map,pt=e=>{let t=ft.get(e);if(t!==void 0)return t;let n=`${dt}\n${ut}`,r=e?`${e}\n${n}`:n;return ft.set(e,r),r},mt=e=>{let t=lt.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return lt.set(e,n),n}catch{return}},U=(e,t=``,n={mode:`closed`},r)=>{let i=r??mt(e),a=e.shadowRoot||ct.get(e)||i?.shadowRoot||e.attachShadow(n);return ct.set(e,a),it(a,pt(t)),a},W=(e,t,...n)=>{e.replaceChildren(...n),it(e,pt(t))},G=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},K=(e,t,n=``)=>e.getAttribute(t)??n,q=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},ht=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&st(t,e.getAttribute(`sheet`)||``)},gt=`:host{visibility:hidden;position:absolute}`;z(`r-content`,class extends B{observer;_shadowDom;_slot;constructor(){super(),this._shadowDom=U(this,gt);let e=R().class(`slot`).build();W(this._shadowDom,gt,e),this._slot=e,this.observer=new MutationObserver(this.callback)}callback=e=>{let t=e.filter(e=>e.type===`childList`||e.type===`attributes`);if(!t.length)return;let n=t[t.length-1];this.dispatchEvent(new CustomEvent(`change`,{detail:{type:t.some(e=>e.type===`childList`)?`childList`:`attributes`,value:{content:this.children,mutation:n,mutations:t}}}))};connectedCallback(){this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}});var _t=`@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,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-down-out{animation:ranui-dropdown-down-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-up-in{animation:ranui-dropdown-up-in var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-up-out{animation:ranui-dropdown-up-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-left-in{animation:ranui-dropdown-left-in var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-left-out{animation:ranui-dropdown-left-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-right-in{animation:ranui-dropdown-right-in var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-right-out{animation:ranui-dropdown-right-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,auto)}:host([data-ran-floating]),:host([data-ran-floating]) .ranui-dropdown-container,:host([data-ran-floating]) ::slotted(*){transition-delay:0s;transition-property:none!important}:host([data-ran-floating=placing]){opacity:0;pointer-events:none}.ranui-dropdown{position:var(--ran-dropdown-position,relative);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,var(--ran-z-dropdown,1100));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,#e4e4e8));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%)}:host([role=listbox]) .ranui-dropdown,:host([role=menu]) .ranui-dropdown{padding:var(--ran-dropdown-padding,var(--ran-space-1,4px))}.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,.ranui-dropdown-container .right{top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px) / 2))}.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-shape-offset,0px) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(270deg)}.ranui-dropdown-container .right{transform:translateX(calc(0px - var(--ran-dropdown-arrow-overlap,2px))) translateY(calc(var(--ran-dropdown-arrow-shape-offset,0px) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(90deg);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(0 -1px 0 var(--ran-color-border)))}::slotted(.ran-select-option-hover){z-index:0;border-radius:var(--ran-dropdown-option-item-border-radius,var(--ran-radius-sm,8px));background:var(--ran-select-option-hover-background,var(--ran-surface-glass-hover));opacity:0;pointer-events:none;width:0;height:0;transition:var(--ran-select-option-hover-transition,transform var(--ran-motion-duration-slow,.28s) var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)), width var(--ran-motion-duration-slow,.28s) var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)), height var(--ran-motion-duration-slow,.28s) var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)));position:absolute;top:0;left:0}::slotted(.ran-select-option-hover[data-instant]){transition:none}@media (prefers-reduced-motion:reduce){::slotted(.ran-select-option-hover){transition:none}}:host([surface=glass]) .ranui-dropdown{background:var(--ran-surface-glass-overlay-specular,linear-gradient(180deg, #ffffff6b 0%, #ffffff1f 24%, transparent 48%), linear-gradient(0deg, #ffffff38 0%, transparent 30%), radial-gradient(120% 55% at 50% -8%, #ffffff47, transparent 58%)), var(--ran-surface-glass-overlay-fill,#ffffff7a);-webkit-backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-overlay-border,#ffffffb8);box-shadow:var(--ran-surface-glass-overlay-shadow,0 18px 48px #00000040, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80, inset 0 -24px 48px #ffffff1a)}@media (prefers-reduced-transparency:reduce){:host([surface=glass]) .ranui-dropdown{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-overlay-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-overlay-solid-shadow,var(--ran-shadow-modal))}}:host-context([data-ran-surface="glass"]):host(:not([surface=solid])) .ranui-dropdown{background:var(--ran-surface-glass-overlay-specular,linear-gradient(180deg, #ffffff6b 0%, #ffffff1f 24%, transparent 48%), linear-gradient(0deg, #ffffff38 0%, transparent 30%), radial-gradient(120% 55% at 50% -8%, #ffffff47, transparent 58%)), var(--ran-surface-glass-overlay-fill,#ffffff7a);-webkit-backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-overlay-border,#ffffffb8);box-shadow:var(--ran-surface-glass-overlay-shadow,0 18px 48px #00000040, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80, inset 0 -24px 48px #ffffff1a)}@media (prefers-reduced-transparency:reduce){:host-context([data-ran-surface="glass"]):host(:not([surface=solid])) .ranui-dropdown{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-overlay-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-overlay-solid-shadow,var(--ran-shadow-modal))}}@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}}`;z(`r-dropdown`,class extends B{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`,`surface`]}constructor(){super(),this._shadowDom=U(this,_t);let e=P(),t=P(),n=L().class(`ranui-dropdown-container`).children(L().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).ref(e).part(`dropdown`).children(R().class(`slot`).ref(t))).build();W(this._shadowDom,_t,n),this.container=n,this.dropdown=G(e,`ranui dropdown`),this._slot=G(t,`slot`)}get transit(){return K(this,`transit`)}set transit(e){q(this,`transit`,e,{removeEmpty:!0})}get arrow(){return K(this,`arrow`)}set arrow(e){q(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return K(this,`sheet`)}set sheet(e){q(this,`sheet`,e)}get surface(){return K(this,`surface`)}set surface(e){q(this,`surface`,e,{removeEmpty:!0})}handlerExternalCss=()=>{ht(this,this._shadowDom,`sheet`,null,this.sheet)};appliedTransit=``;handlerTransit=()=>{this.container&&(this.appliedTransit&&a(this.container,this.appliedTransit),this.appliedTransit=this.transit,this.appliedTransit&&i(this.container,this.appliedTransit))};getAnimationTarget=()=>this.container;handlerArrow=()=>{let e=(this.arrow||``).trim();e?(!this.arrowIcon&&this.container&&(this.arrowIcon=L().class(`ranui-dropdown-arrow`).build(),this.arrowIcon.innerHTML=``,this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)):(this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0)};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 vt=`:host{display:var(--ran-popover-host-display,block)}:host(:focus-visible){border-radius:var(--ran-radius-sm,8px);box-shadow:var(--ran-focus-ring);outline:none}.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)}`,yt=e=>e.getAnimationTarget?.()??e,bt=(e,t)=>{let n=yt(e);typeof n.getAnimations!=`function`||typeof requestAnimationFrame!=`function`?t():requestAnimationFrame(()=>{let e=n.getAnimations();e.length?(async()=>{await Promise.allSettled(e.map(e=>e.finished)),t()})():t()})},xt={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`}},J=Symbol.for(`ranui.floating.panel-owner`),Y=Symbol.for(`ranui.floating.panel-escape`),X=Symbol.for(`ranui.floating.active-panels`),St=`ranui-floating-change`,Ct=`data-ran-floating`,wt=(e,t)=>{let n=new Set,r=e;for(;r&&!n.has(r);){if(r===t)return!0;n.add(r),r=r[J]??r.parentNode??(r instanceof ShadowRoot?r.host:null)}return!1},Tt=e=>[...e.ownerDocument[X]??[]].filter(t=>t.isConnected&&wt(t,e)),Et=(e,t)=>{Tt(e).at(-1)?.[Y]?.(t)},Z=(e,t,n)=>{let r=e.ownerDocument;t?(e[J]=t,e[Y]=n,(r[X]??=new Set).add(e)):(delete e[J],delete e[Y],r[X]?.delete(e)),r.dispatchEvent(new Event(St))},Dt=class{options;repositionBound=!1;outsideBinding=0;opened=!1;presence=null;repositionFrame=0;generation=0;resolvedSide;constructor(e){this.options=e}get isPositioned(){return this.presence===`open`}get floatingPresence(){return this.presence}get anchor(){return this.options.anchor?.()??this.options.host}setPresence(e,t){this.presence=t,t?e.setAttribute(Ct,t):e.removeAttribute(Ct),t===`placing`?(e.style.setProperty(`opacity`,`0`),e.style.setProperty(`pointer-events`,`none`)):(t===`open`||t===null)&&(e.style.removeProperty(`opacity`),e.style.removeProperty(`pointer-events`))}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[J]??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;r===i?s||t(e):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;e?(n.style.setProperty(`z-index`,`var(--ran-dropdown-host-z-index, var(--ran-z-dropdown, 1100))`),Z(n,t,this.options.onEscape),this.resolvedSide=void 0,t.dispatchEvent(new CustomEvent(`show`)),this.setPresence(n,`placing`),n.style.setProperty(`display`,`block`),this.attachReposition(),this.position(!0),bt(n,()=>{r===this.generation&&(n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-show`)))})):(Z(n),this.detachReposition(),t.dispatchEvent(new CustomEvent(`hide`)),this.setPresence(n,`closing`),n.setAttribute(`transit`,xt[this.resolvedSide??this.side()].exit),bt(n,()=>{r===this.generation&&(n.style.setProperty(`display`,`none`),this.setPresence(n,null),n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-hide`)))}))};side=()=>this.options.placement().split(`-`)[0];position=(e=!1)=>{let t=this.options.panel();if(!t)return;let n=this.generation;e&&t.offsetWidth;let r=this.options.panel();r===t&&(!e||this.opened&&n===this.generation)&&this.write(r,e)};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(),te=a?.(e),m=f,h=te?.width??f.width,g=te?.height??f.height,_=this.options.placement(),[v,y]=_.split(`-`),b=y??`start`,x,S,C=v;if(d){let e=d.getBoundingClientRect();C===`top`||C===`bottom`?(x=C===`bottom`?c.bottom-e.top+n:c.top-e.top-g-n,S=ee(b,c.left,c.width,h)-e.left):(x=ee(b,c.top,c.height,g)-e.top,S=C===`right`?c.right-e.left+n:c.left-e.left-h-n)}else{let e=p({anchor:{top:c.top,left:c.left,width:c.width,height:c.height},floating:{width:h,height:g},placement:_,offset:n});C=e.side,x=e.top+window.scrollY,S=e.left+window.scrollX}let w={top:x,left:S,side:C,align:b,anchorRect:c,panelRect:m,container:d},T=o?.(w,e);T&&(w.top=T.top,w.left=T.left),this.resolvedSide=w.side,e.style.setProperty(`position`,`absolute`),e.style.setProperty(`inset`,`${w.top}px auto auto ${w.left}px`),e.style.setProperty(`--ran-x`,`${w.left}px`),e.style.setProperty(`--ran-y`,`${w.top}px`),s?.(w,e),t&&e.setAttribute(`transit`,xt[w.side].enter),(t||this.presence===`placing`)&&this.setPresence(e,`open`)}scrollIsInsidePanel=e=>{let t=this.options.panel();if(!t)return!1;if(typeof e.composedPath==`function`&&e.composedPath().includes(t))return!0;let n=e.target;return n instanceof Node&&(n===t||t.contains(n))};reposition=e=>{this.opened&&!this.repositionFrame&&(e?.type===`scroll`&&this.scrollIsInsidePanel(e)||(typeof requestAnimationFrame==`function`?this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=0,this.opened&&this.position()}):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?(Z(e),this.setPresence(e,null)):this.presence=null,this.repositionFrame&&typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=0),this.detachReposition()}};function Ot(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var kt=8,At=300,Q=16,jt=`a[href], button, input:not([type="hidden"]), select, textarea, summary, [contenteditable]:not([contenteditable="false"]), [tabindex]`,Mt=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),Nt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},$=class extends B{_events=new c;_slot;popoverBlock;popoverContent;popoverInner;popoverInnerBlock;_shadowDom;removeTimeId;_repositionBound=!1;_returnFocus;_floating=new Dt({onEscape:e=>this._dismissFromKeyboard(e),host:this,panel:()=>this.popoverContent,anchor:()=>Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this,placement:()=>this.placement,offset:kt,containerId:()=>this.getPopupContainerId,afterPosition:(e,t)=>{let{anchorRect:n,panelRect:r,side:i}=e,a=Nt[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=U(this,vt);let e=P(),t=L().class(`ran-popover-block`).role(`tooltip`).children(R().class(`slot`).ref(e)).build();W(this._shadowDom,vt,t),this.popoverBlock=t,this._slot=G(e,`slot`)}get placement(){return K(this,`placement`,`top`)}set placement(e){q(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 K(this,`trigger`,`hover`)}set trigger(e){q(this,`trigger`,e)}get getPopupContainerId(){return K(this,`getPopupContainerId`)}set getPopupContainerId(e){q(this,`getPopupContainerId`,e)}get sheet(){return K(this,`sheet`)}set sheet(e){q(this,`sheet`,e)}handlerExternalCss=()=>{ht(this,this._shadowDom,`sheet`,null,this.sheet)};_ownsTabStop=!1;_hasFocusableTrigger=()=>Array.from(this.children).some(e=>e.tagName!==`R-CONTENT`&&[e,...Array.from(e.querySelectorAll(`*`))].some(e=>e instanceof HTMLElement&&(e.matches(jt)||e.localName.includes(`-`)&&e.focus!==HTMLElement.prototype.focus)));syncTabStop=()=>{if(this._ownsTabStop&&this.getAttribute(`tabindex`)!==`0`&&(this._ownsTabStop=!1),!this.hasAttribute(`tabindex`)||this._ownsTabStop){if(this._hasFocusableTrigger())this._ownsTabStop&&this.removeAttribute(`tabindex`),this._ownsTabStop=!1;else{this.tabIndex=0,this._ownsTabStop=!0;for(let e of Array.from(this.querySelectorAll(`:not(:defined)`)))customElements.whenDefined(e.localName).then(this.syncTabStop,()=>void 0)}}};initAria=()=>{this.syncTabStop(),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=ze(`r-dropdown`).class(`ran-popover-dropdown`).style(`display`,`none`).style(`position`,`absolute`).cssVar(`ran-dropdown-padding`,e).build(),this.popoverContent?.addEventListener(`click`,this.stopPropagation),this._events.on(this.popoverContent,`keydown`,this._dismissFromKeyboard);let t=L().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 Array.from(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()},At)},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;let t=!this.open;this.toggle(),t&&(this._returnFocus=e.composedPath().find(e=>e instanceof HTMLElement&&e!==this&&this.contains(e)&&e.tabIndex>=0)??Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this)};keydownPopover=e=>{e.defaultPrevented||e.isComposing||e.keyCode===229||(e.key===`Escape`?(this.setDropdownDisplayBlock.cancel(),this._dismissFromKeyboard(e)):Ot(e)&&(e.preventDefault(),this.setDropdownDisplayBlock()))};_dismissFromKeyboard=e=>{e.key!==`Escape`||e.defaultPrevented||e.isComposing||e.keyCode===229||!this.open||(Tt(this).some(e=>e!==this.popoverContent)?Et(this,e):(e.preventDefault(),e.stopPropagation(),this.setDropdownDisplayBlock.cancel(),this.setDropdownDisplayNone.cancel(),this.blur.cancel(),clearTimeout(this.removeTimeId),this.removeTimeId=void 0,this.hide(),this._returnFocus?.isConnected&&this._returnFocus.focus({preventScroll:!0,focusVisible:!0})))};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._events.on(this._slot,`slotchange`,this.syncTabStop),this._events.on(this,`show`,()=>{let e=this.getRootNode().activeElement;this._returnFocus=e instanceof HTMLElement&&(e===this||this.contains(e))?e:Array.from(this.children).find(e=>e.tagName!==`R-CONTENT`)??this}),this.popoverContent&&this._events.on(this.popoverContent,`keydown`,this._dismissFromKeyboard),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=Nt[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;let e=Array.from(this.children).find(e=>e.tagName===`R-CONTENT`);e&&this.popoverContent&&e.append(...Array.from(this.popoverContent.childNodes)),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 z(`r-popover`,$),e.PLACEMENT_TYPE=Mt,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 22a4115c5..ad45fcba8 100644 --- a/public/ranui-iife/theme-switch.iife.js +++ b/public/ranui-iife/theme-switch.iife.js @@ -1 +1,111 @@ -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))}@media (pointer:coarse){.ran-theme-switch button{min-width:var(--ran-theme-switch-touch-size,44px);min-height:var(--ran-theme-switch-touch-size,44px)}}`,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}},u=new Map,ee=`data-adopted-style`,te=(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}},ne=(e,t,n=ee)=>{if(typeof document<`u`&&t&&!te(e,t,u)&&!e.querySelector(`style[${n}]`)){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[()=>(ae(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,p);g===0&&oe()}}]}function b(e){let t=re(e,!0);return ie(t),E(t),()=>O(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(()=>se(t))}finally{h=n,m=r}}function C(e){h&&h.cleanups.push(e)}function re(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 ie(e){h&&h.owned.push(e)}function ae(e){m&&(m.sources.add(e),e.observers.add(m))}function w(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)w(t,f)}function oe(){if(!(g>0||v)){v=!0;try{for(;_.size>0;){let e=[..._];_.clear();for(let t of e)t.disposed||T(t)}}finally{v=!1}}}function T(e){if(!(e.disposed||e.state===d)){if(e.state===f)for(let t of e.sources)`fn`in t&&T(t);e.state===p&&E(e),e.state=d}}function E(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);D(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)w(t,p)}}finally{e.running=!1,m=t,h=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 se(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 k(e){return c(e)}var ce=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,le=`.#[`;function ue(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 de=(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()},fe=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ue(n);return r!==null&&r.every(t=>de(e,t))},A=(e,t,n)=>{for(let r of e)ce(r)&&(fe(r,t)&&n.push(r),A(r.childrenList,t,n))},j=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 A(this.childrenList,e,t),t}},pe=new Map,M=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??pe}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 j)}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 me(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return A(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(`;`):``,i=r?` style="${k(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 j,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}`}},me=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 A(this.childrenList,e,t),t}serialize(){return``}},N={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)){N.append(e,r);continue}if(typeof r==`function`){N.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 P?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},he=`http://www.w3.org/2000/svg`,ge=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(`.`)),P=class{runtime;el;constructor(e,t,r=N){this.runtime=r;let i=t??(ge.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new M(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 _e(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}},_e=class{runtime;root;hostEl;constructor(e,t,n,r=N){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}},F=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(F(t)):e.concat(t),[]),I=e=>e==null?null:e instanceof P?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ve=(e,t)=>{if(n){R(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=>(R(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),C(()=>a?.())},ye=`__ranFor`,be=e=>typeof e==`object`&&!!e&&e[ye]===!0,xe=(e,t,n)=>{let[r,i]=y(t),a=null,o=S(t=>{let i=I(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},L=(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=I(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)){De()&&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=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();L(r,a),i=n})},Ce=`__ranIndex`,we=e=>typeof e==`object`&&!!e&&e[Ce]===!0,Te=(e,t,n)=>{let[r,i]=y(e),a=null,o=S(e=>{let i=I(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=I(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()}L(r,i.map(e=>e.node).filter(e=>e!=null))})},R=(e,t)=>{n?x(()=>z(e,t)):z(e,t)},z=(e,t)=>{F(t).forEach(t=>{if(be(t)){Se(e,t);return}if(we(t)){Ee(e,t);return}if(typeof t==`function`){ve(e,t);return}let n=I(t);n!=null&&e.appendChild(n)})},De=()=>!1,Oe={bind(e,t){typeof e==`function`?n?x(()=>t(e())):b(()=>t(e())):t(e)},append:R},ke=class extends P{constructor(e,t){super(e,t,Oe)}};function Ae(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,he),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:je,Div:Me,Svg:Ne,Span:Pe,Slot:Fe,ButtonBuilder:Ie,InputBuilder:Le,Style:Re,Label:ze,Ul:Be,Li:Ve,Section:He,Article:Ue,Nav:We,Header:Ge,Footer:Ke,Main:qe,DeclarativeShadow:Je}=Ae(ke),Ye=new Map;function Xe(e,t){n?(Ye.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ze=typeof document<`u`?HTMLElement:M,Qe=`data-ranui`,B=`data-ranui-sheet`,$e=(e,t)=>ne(e,t,Qe),V=new WeakMap,H=new Map,et=e=>{if(typeof CSSStyleSheet>`u`)return;let t=H.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},H.set(e,t)}catch{return}return t.users++,t.sheet},U=e=>{let t=H.get(e);t&&--t.users===0&&H.delete(e)},tt=(e,t)=>{if(typeof document>`u`)return;let n=V.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),U(n.text)):n&&e.querySelector(`style[${B}]`)?.remove(),V.delete(e),!t))return;let r=et(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{U(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(B,``),n.textContent=t,e.appendChild(n)}V.set(e,{text:t,sheet:r})},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},rt=(e,t=``,n={mode:`closed`})=>{let r=e.shadowRoot||W.get(e)||e.attachShadow(n);return W.set(e,r),$e(r,nt(t)),r},it=(e,t,n=``)=>e.getAttribute(t)??n,at=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},ot=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&tt(t,e.getAttribute(`sheet`)||``)},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},st=(e,t)=>{e.setAttribute(`data-ran-theme`,t?`dark`:`light`),e.setAttribute(`theme`,t?`dark`:`light`)},ct=()=>{Y?.(),Y=null},lt=(e,t)=>{let n=X(t);if(n){if(ct(),e===`system`){if(typeof window>`u`)return;Y=o(J,e=>st(n,e)),i(q,`system`)}else n.setAttribute(`data-ran-theme`,e),n.setAttribute(`theme`,e),i(q,e)}},ut=e=>{let t=X(e);if(!t)return``;let n=t.getAttribute(`data-ran-theme`)||t.getAttribute(`theme`)||``;return n===`light`||n===`dark`?a(q)===`system`?`system`:n:``},Z=[`system`,`light`,`dark`],dt={system:``,light:``,dark:``},Q=`ran-theme-switch-sync`,$=class extends Ze{static get observedAttributes(){return[`label`,`label-system`,`label-light`,`label-dark`,`sheet`]}_events=new l;_shadowDom;_group;_buttons;constructor(){super(),this._shadowDom=rt(this,t),this._buttons=Z.map(e=>{let t=Ie().attr(`type`,`button`).data(`choice`,e).attr(`part`,`button ${e}`).aria(`pressed`,`false`).build();return n||(t.innerHTML=dt[e]),t}),this._group=Me().class(`ran-theme-switch`).attr(`part`,`switch`).role(`group`).children(this._buttons).build(),this._shadowDom.appendChild(this._group)}get sheet(){return it(this,`sheet`)}set sheet(e){at(this,`sheet`,e)}get value(){return ut()||`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){lt(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=()=>{ot(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 Xe(`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=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=`:host{display:var(--ran-theme-switch-display,inline-flex);box-sizing:border-box;width:var(--ran-theme-switch-width,8.75rem);min-width:var(--ran-theme-switch-min-width,7.5rem);max-width:var(--ran-theme-switch-max-width,11rem);vertical-align:middle;flex:none}.ran-theme-switch{--ran-select-min-height:var(--ran-theme-switch-trigger-min-height,32px);--ran-select-font-size:var(--ran-theme-switch-font-size,var(--ran-text-label-1,13px));--ran-select-border-radius:var(--ran-theme-switch-radius,var(--ran-radius-md,8px));--ran-select-background-color:var(--ran-theme-switch-background,color-mix(in srgb, var(--ran-color-bg-elevated,var(--ran-background-100)) 92%, transparent));--ran-select-border:1px solid var(--ran-theme-switch-border-color,var(--ran-color-border-secondary,var(--ran-gray-200)));--ran-select-background-image:none;width:100%}`,a=typeof document>`u`,o=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),s=()=>{try{return typeof localStorage>`u`?null:localStorage}catch{return null}},c=(e,t)=>{try{s()?.setItem(e,t)}catch{}},l=e=>{try{return s()?.getItem(e)??``}catch{return``}},u=()=>typeof window<`u`,d=(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)},f=()=>{if(!u())return!1;let e=window.navigator.userAgent;return!!/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(e)},p=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},m=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},h=/["'&<>]/;function g(e){let t=``+e,n=h.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}},ee=new Map,te=`data-adopted-style`,v=(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}},y=(e,t,n=te)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!v(e,t,ee)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}};Object.freeze({});var b=null;function x(){return b}var S=(e,t,n,r)=>e===`end`?t+n-r:e===`center`?t+(n-r)/2:t,C=()=>({top:0,left:0,width:typeof window<`u`?window.innerWidth:1/0,height:typeof window<`u`?window.innerHeight:1/0}),ne=e=>{let{anchor:t,floating:n,offset:r=0,padding:i=8}=e,a=e.boundary??C(),[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)=>S(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=0,re=1,T=2,E=null,D=null,ie=0,O=new Set,k=!1;function ae(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)de(e,T);ie===0&&fe()}}]}function A(e){let t=ce(e,!0);return le(t),me(t),()=>ge(t)}function oe(e){let t=E;E=null;try{return e()}finally{E=t}}function j(e){let t={owned:[],cleanups:[],owner:D},n=D,r=E;D=t,E=null;try{return e(()=>_e(t))}finally{D=n,E=r}}function se(e){D&&D.cleanups.push(e)}function ce(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:T,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:D}}function le(e){D&&D.owned.push(e)}function ue(e){E&&(E.sources.add(e),e.observers.add(E))}function de(e,t){if(e.disposed||e.state>=t)return;let n=e.state===w;if(e.state=t,e.isEffect)O.add(e);else if(n)for(let t of e.observers)de(t,re)}function fe(){if(!(ie>0||k)){k=!0;try{for(;O.size>0;){let e=[...O];O.clear();for(let t of e)t.disposed||pe(t)}}finally{k=!1}}}function pe(e){if(!(e.disposed||e.state===w)){if(e.state===re)for(let t of e.sources)`fn`in t&&pe(t);e.state===T&&me(e),e.state=w}}function me(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);he(e);let t=E,n=D;E=e,D=e,e.running=!0,e.state=w;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)de(t,T)}}finally{e.running=!1,E=t,D=n}}function he(e){for(let t of e.owned)ge(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 ge(e){e.disposed||(e.disposed=!0,he(e),e.observers.clear())}function _e(e){for(let t of e.owned)ge(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function ve(e){return g(e)}var ye=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,be=`.#[`;function xe(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 Se=(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()},Ce=(e,t)=>{let n=t.trim();if(!n)return!1;let r=xe(n);return r!==null&&r.every(t=>Se(e,t))},M=(e,t,n)=>{for(let r of e)ye(r)&&(Ce(r,t)&&n.push(r),M(r.childrenList,t,n))};function we(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var N=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return we(this.childrenList,e,t)}serialize(){return this.childrenList.map(e=>typeof e==`string`?g(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}},Te=new Map,Ee=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??Te}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:g(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}insertBefore(e,t){return we(this.childrenList,e,t)}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 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;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${ve(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${ve(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`?g(e):(e instanceof N,e.serialize())).join(``):a+=g(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}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof N))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return we(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}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``}},P={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)){P.append(e,n);continue}if(typeof n==`function`){P.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 F?n.build():typeof n==`string`&&!a?document.createTextNode(n):n;e.appendChild(t)}}},Oe=`http://www.w3.org/2000/svg`,ke=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,n=P){this.runtime=n;let r=t??(ke.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=a?new Ee(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=>{a?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(a){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 Ae(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(a)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},Ae=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(a)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 a?this.root.serialize():this.root.innerHTML}},I=()=>({current:null}),je=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(je(t)):e.concat(t),[]),L=e=>e==null?null:e instanceof F?e.build():typeof e==`string`?a?e:document.createTextNode(e):e,Me=(e,t)=>{if(a){R(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,o=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};A(()=>{let e=t();o();let n=document.createDocumentFragment();i=j(t=>(R(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),se(()=>i?.())},Ne=`__ranFor`,Pe=e=>typeof e==`object`&&!!e&&e[Ne]===!0,Fe=(e,t,n)=>{let[r,i]=ae(t),a=null,o=j(t=>{let i=L(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},Ie=(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},Le=(e,t)=>{if(a){(t.each()??[]).forEach((n,r)=>{let i=L(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;se(()=>{for(let e of r.values())e.dispose();r.clear()}),A(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Ue()&&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=Fe(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();Ie(n,a),r=i})},Re=`__ranIndex`,ze=e=>typeof e==`object`&&!!e&&e[Re]===!0,Be=(e,t,n)=>{let[r,i]=ae(e),a=null,o=j(e=>{let i=L(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Ve=(e,t)=>{if(a){(t.each()??[]).forEach((n,r)=>{let i=L(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];se(()=>{for(let e of r)e.dispose();r=[]}),A(()=>{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()}Ie(n,r.map(e=>e.node).filter(e=>e!=null))})},R=(e,t)=>{a?oe(()=>He(e,t)):He(e,t)},He=(e,t)=>{je(t).forEach(t=>{if(Pe(t)){Le(e,t);return}if(ze(t)){Ve(e,t);return}if(typeof t==`function`){Me(e,t);return}let n=L(t);n!=null&&e.appendChild(n)})},Ue=()=>!1,We={bind(e,t){typeof e==`function`?a?oe(()=>t(e())):A(()=>t(e())):t(e)},append:R},Ge=class extends F{constructor(e,t){super(e,t,We)}};function Ke(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,Oe),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:z,Div:B,Svg:qe,Span:Je,Slot:V,ButtonBuilder:Ye,InputBuilder:Xe,Style:Ze,Label:Qe,Ul:$e,Li:et,Section:tt,Article:nt,Nav:rt,Header:it,Footer:at,Main:ot,DeclarativeShadow:st}=Ke(Ge),ct=[!1,`false`,null,void 0],H=e=>{let t=e.hasAttribute(`disabled`),n=e.getAttribute(`disabled`);return!(!t||ct.includes(n))},lt=new Map;function U(e,t){a?(lt.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var W=typeof document<`u`?HTMLElement:Ee,ut=`data-ranui`,dt=`data-ranui-sheet`,ft=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}y(e,t,ut)},pt=new WeakMap,G=new Map,mt=e=>{if(typeof CSSStyleSheet>`u`)return;let t=G.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},G.set(e,t)}catch{return}return t.users++,t.sheet},ht=e=>{let t=G.get(e);t&&--t.users===0&&G.delete(e)},gt=(e,t)=>{if(typeof document>`u`)return;let n=pt.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),ht(n.text)):n&&e.querySelector(`style[${dt}]`)?.remove(),pt.delete(e),!t))return;let r=mt(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{ht(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(dt,``),n.textContent=t,e.appendChild(n)}pt.set(e,{text:t,sheet:r})},_t=new WeakMap,vt=new WeakMap,yt=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,bt=`:host([hidden]){display:none}`,xt=new Map,St=e=>{let t=xt.get(e);if(t!==void 0)return t;let n=`${bt}\n${yt}`,r=e?`${e}\n${n}`:n;return xt.set(e,r),r},Ct=e=>{let t=vt.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return vt.set(e,n),n}catch{return}},K=(e,t=``,n={mode:`closed`},r)=>{let i=r??Ct(e),a=e.shadowRoot||_t.get(e)||i?.shadowRoot||e.attachShadow(n);return _t.set(e,a),ft(a,St(t)),a},wt=e=>{for(let t of e.children)if(t.tagName!==`STYLE`)return t;return null},q=(e,t,...n)=>{e.replaceChildren(...n),ft(e,St(t))},Tt=(e,t,n)=>{let r=wt(e);if(r&&n.bind(r))return;let i=n.build();q(e,t,...Array.isArray(i)?i:[i])},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={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},Et=(e,t,n,r={})=>{n?(e.setAttribute(t,``),r.aria&&e.setAttribute(`aria-${r.aria}`,`true`)):(e.removeAttribute(t),r.aria&&e.removeAttribute(`aria-${r.aria}`))},Z=(e,t,n,r,i)=>{n===`sheet`&&r!==i&>(t,e.getAttribute(`sheet`)||``)},Dt=`ran-theme`,Ot=`(prefers-color-scheme: dark)`,kt=null,At=e=>{if(e&&`style`in e)return e;if(e&&`documentElement`in e)return e.documentElement;if(typeof document<`u`)return document.documentElement},jt=(e,t)=>{e.setAttribute(`data-ran-theme`,t?`dark`:`light`),e.setAttribute(`theme`,t?`dark`:`light`)},Mt=()=>{kt?.(),kt=null},Nt=(e,t)=>{let n=At(t);if(n){if(Mt(),e===`system`){if(typeof window>`u`)return;kt=d(Ot,e=>jt(n,e)),c(Dt,`system`)}else n.setAttribute(`data-ran-theme`,e),n.setAttribute(`theme`,e),c(Dt,e)}},Pt=e=>{let t=At(e);if(!t)return``;let n=t.getAttribute(`data-ran-theme`)||t.getAttribute(`theme`)||``;return n===`light`||n===`dark`?l(Dt)===`system`?`system`:n:``},Ft=e=>e,It=e=>{let t=e;for(;t;){let e=t.closest?.(`[lang]`)?.getAttribute(`lang`);if(e)return e;t=t.getRootNode?.()?.host}return``},Lt=e=>{let t=(x()?.getLocale()||It(e)||(typeof document<`u`?document.documentElement.lang:``)||`en`).toLowerCase();return/^zh[-_](hant|tw|hk|mo)\b/.test(t)?`en`:t.split(/[-_]/)[0]},Rt=(e,t)=>t?e.replace(/\{(\w+)\}/g,(e,n)=>String(t[n]??e)):e,zt=(e,t,n,r)=>{let i=x(),a=`ranui.${t}`;if(i){let e=i.getMessages(i.getLocale())[a];if(e!==void 0)return Rt(e,r)}return Rt(e[Lt(n)]?.[t]??e.en[t],r)},Bt=Ft({en:{"themeSwitch.dark":`Dark`,"themeSwitch.label":`Theme`,"themeSwitch.light":`Light`,"themeSwitch.system":`System`},zh:{"themeSwitch.dark":`深色`,"themeSwitch.label":`主题`,"themeSwitch.light":`浅色`,"themeSwitch.system":`跟随系统`},ja:{"themeSwitch.dark":`ダーク`,"themeSwitch.label":`テーマ`,"themeSwitch.light":`ライト`,"themeSwitch.system":`システム`},ko:{"themeSwitch.dark":`다크`,"themeSwitch.label":`테마`,"themeSwitch.light":`라이트`,"themeSwitch.system":`시스템`},es:{"themeSwitch.dark":`Oscuro`,"themeSwitch.label":`Tema`,"themeSwitch.light":`Claro`,"themeSwitch.system":`Sistema`},pt:{"themeSwitch.dark":`Escuro`,"themeSwitch.label":`Tema`,"themeSwitch.light":`Claro`,"themeSwitch.system":`Sistema`},de:{"themeSwitch.dark":`Dunkel`,"themeSwitch.label":`Design`,"themeSwitch.light":`Hell`,"themeSwitch.system":`System`},fa:{"themeSwitch.dark":`تیره`,"themeSwitch.label":`پوسته`,"themeSwitch.light":`روشن`,"themeSwitch.system":`سیستم`}}),Vt=`:host{position:var(--ran-select-host-position,relative);display:var(--ran-select-host-display,inline-block);cursor:var(--ran-select-host-cursor,pointer);min-width:var(--ran-select-min-width,80px);outline:var(--ran-select-host-outline,0);-webkit-tap-highlight-color:var(--ran-select-host-tap-highlight-color,transparent);max-width:100%}:host,:host(:focus),:host(:active){outline:var(--ran-select-host-focus-outline,0);-webkit-tap-highlight-color:transparent}:host ::slotted(r-option){display:var(--ran-select-option-display,none)}:host([disabled]){cursor:var(--ran-select-host-disabled-cursor,not-allowed);pointer-events:var(--ran-select-host-disabled-pointer-events,all);opacity:var(--ran-select-host-disabled-opacity,1)}:host(:not([disabled]):hover) .ran-select{cursor:var(--ran-select-host-hover-cursor,pointer)}:host(:not([disabled],[type=text]):focus-visible) .selection{border:var(--ran-select-focus-border,1px solid var(--ran-color-border-control,var(--ran-gray-700)))}:host(:not([disabled]):hover) .selection-search{cursor:var(--ran-select-search-hover-cursor,pointer)}:host(:not([disabled]):hover) .selection-item{cursor:var(--ran-select-item-hover-cursor,pointer)}@media (hover:hover){:host(:not([disabled],[type=text]):hover) .selection{border:var(--ran-select-hover-border,1px solid var(--ran-color-border-control-hover,var(--ran-gray-900)));background-color:var(--ran-select-hover-background-color,var(--ran-select-background-color,var(--ran-color-bg-elevated,#fff)))}:host(:not([disabled]):hover) .selection-item{color:var(--ran-select-item-hover-color,var(--ran-color-text,#111113))}}:host([type=text]) .selection{border:var(--ran-select-text-border,none);background:var(--ran-select-text-background,transparent)}:host([type=text]) .icon{display:var(--ran-select-icon-text-display,none)}:host(:not([disabled]):focus-visible) .selection{box-shadow:var(--ran-select-focus-box-shadow,var(--ran-focus-ring))}:host(:not([disabled]):focus-visible) .selection-search{cursor:var(--ran-select-search-focus-cursor,pointer)}:host(:not([disabled]):focus-visible) .selection-item{cursor:var(--ran-select-item-focus-cursor,pointer);color:var(--ran-select-item-focus-color,var(--ran-color-text,#111113))}:host .selection-search{display:var(--ran-select-search-display,none)}:host([showSearch]:not([disabled])) .selection-search{cursor:var(--ran-select-search-visible-cursor,text);display:var(--ran-select-search-visible-display,block)}:host([showSearch]:not([disabled])) .selection-item{cursor:var(--ran-select-item-search-cursor,pointer)}:host([showSearch]:not([disabled]):focus) .selection-search{display:var(--ran-select-search-visible-display,block);cursor:var(--ran-select-search-visible-cursor,text);opacity:var(--ran-select-search-visible-opacity,1)}.ran-select-label{display:var(--ran-select-label-display,block);margin-bottom:var(--ran-select-label-margin-bottom,var(--ran-space-1,4px));font-size:var(--ran-select-label-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-select-label-font-weight,var(--ran-text-label-weight,500));color:var(--ran-select-label-color,var(--ran-color-text,#111113));cursor:var(--ran-select-label-cursor,pointer)}:host([label]){display:var(--ran-select-host-display,inline-flex);flex-direction:column}:host([label]) .ran-select-label{flex:none}:host([label]) .ran-select{height:var(--ran-select-root-height,auto);flex:auto}:host([disabled]) .ran-select-label{color:var(--ran-select-label-disabled-color,var(--ran-color-text-disabled,#8a8a94));cursor:var(--ran-select-label-disabled-cursor,not-allowed)}.ran-select{width:var(--ran-select-root-width,100%);height:var(--ran-select-root-height,100%);font-size:var(--ran-select-root-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-select-root-font-weight,var(--ran-text-label-weight,500));box-sizing:var(--ran-select-root-box-sizing,border-box);margin:var(--ran-select-root-margin,0);padding:var(--ran-select-root-padding,0);color:var(--ran-select-root-color,var(--ran-color-text,#000000e0));line-height:var(--ran-select-root-line-height,1.57143);list-style:var(--ran-select-root-list-style,none);font-family:var(--ran-select-root-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"));position:var(--ran-select-root-position,relative);display:var(--ran-select-root-display,block)}.ran-select .selection{position:var(--ran-select-position,relative);background-color:var(--ran-select-background-color,var(--ran-color-bg-elevated,#fff));background-image:var(--ran-select-background-image,none);border:var(--ran-select-border,1px solid var(--ran-color-border-control,var(--ran-gray-700)));transition:var(--ran-select-transition,none);width:var(--ran-select-width,100%);height:var(--ran-select-height,100%);min-height:var(--ran-select-min-height,var(--ran-size-7,32px));padding:var(--ran-select-padding,0);box-sizing:var(--ran-select-box-sizing,border-box);margin:var(--ran-select-margin,0);color:var(--ran-select-color,var(--ran-color-text,#000000e0));font-size:var(--ran-select-font-size,var(--ran-text-label-1,14px));font-weight:var(--ran-select-font-weight,var(--ran-text-label-weight,500));line-height:var(--ran-select-line-height,1.57143);list-style:var(--ran-select-list-style,none);font-family:var(--ran-select-font-family,inherit);display:var(--ran-select-display,flex);border-radius:var(--ran-select-border-radius,var(--ran-radius-sm,6px))}.ran-select .selection-search{position:var(--ran-select-search-position,absolute);opacity:var(--ran-select-search-opacity,0);top:var(--ran-select-search-top,0);left:var(--ran-select-search-left,0);height:var(--ran-select-search-height,100%);margin:var(--ran-select-search-margin,0);padding:var(--ran-select-search-padding,0);background:var(--ran-select-search-background,transparent);border:var(--ran-select-search-border,none);outline:var(--ran-select-search-outline,none);appearance:var(--ran-select-search-appearance,none);font-family:var(--ran-select-search-font-family,inherit);cursor:var(--ran-select-search-cursor,not-allowed);inset-inline-start:var(--ran-select-search-inset-inline-start,11px);inset-inline-end:var(--ran-select-search-inset-inline-end,11px)}.ran-select .selection-search::-webkit-search-cancel-button{display:var(--ran-select-search-cancel-display,none);-webkit-appearance:var(--ran-select-search-cancel-appearance,none)}.ran-select .selection-search::part(input){border:var(--ran-select-search-input-border,none);padding:var(--ran-select-search-input-padding,0);box-sizing:border-box;outline:var(--ran-select-search-input-outline,none);height:100%;min-height:100%}.ran-select .selection-search::part(input):active{border:var(--ran-select-search-active-border,none);padding:var(--ran-select-search-active-padding,0);height:var(--ran-select-search-active-height,100%);outline:var(--ran-select-search-active-outline,none);border-color:var(--ran-select-search-active-border-color,transparent);box-shadow:var(--ran-select-search-active-box-shadow,none);border-right-width:var(--ran-select-search-active-border-width,0px)}.ran-select .selection-search::part(content){min-height:var(--ran-select-search-content-min-height,0)}.ran-select .selection-value{flex:auto;align-items:center;min-width:0;display:flex}.ran-select .selection-item{position:var(--ran-select-item-position,static);top:var(--ran-select-item-top,auto);min-width:0;margin:var(--ran-select-item-margin,0);padding:var(--ran-select-item-padding,0 var(--ran-select-item-right,28px) 0 var(--ran-select-item-left,12px));background:var(--ran-select-item-background,transparent);border:var(--ran-select-item-border,none);outline:var(--ran-select-item-outline,none);appearance:var(--ran-select-item-appearance,none);font-family:var(--ran-select-item-font-family,inherit);height:var(--ran-select-item-height,auto);display:var(--ran-select-item-display,block);align-items:var(--ran-select-item-align-items,center);user-select:var(--ran-select-item-user-select,none);overflow:var(--ran-select-item-overflow,hidden);white-space:var(--ran-select-item-white-space,nowrap);text-overflow:var(--ran-select-item-text-overflow,ellipsis);cursor:var(--ran-select-item-cursor,pointer);flex:auto}.ran-select .selection-select{color:var(--ran-select-select-color,var(--ran-color-text-disabled,#00000040))}.ran-select .selection .icon{display:var(--ran-select-icon-display,flex);align-items:var(--ran-select-icon-align-items,center);color:var(--ran-select-icon-color,var(--ran-color-text-disabled,#00000040));font-style:var(--ran-select-icon-font-style,normal);text-align:var(--ran-select-icon-text-align,center);text-transform:var(--ran-select-icon-text-transform,none);text-rendering:var(--ran-select-icon-text-rendering,optimizeLegibility);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:var(--ran-select-icon-position,absolute);top:var(--ran-select-icon-top,50%);height:var(--ran-select-icon-height,var(--ran-size-1,16px));transform:var(--ran-select-icon-transform,translateY(-50%));margin-top:var(--ran-select-icon-margin-top,0);font-size:var(--ran-select-icon-font-size,var(--ran-text-label-3,12px));pointer-events:var(--ran-select-icon-pointer-events,none);inset-inline-start:var(--ran-select-icon-inset-inline-start,auto);inset-inline-end:var(--ran-select-icon-inset-inline-end,8px)}:host(:not([value])) .ran-select .selection .selection-item,:host([value=""]) .ran-select .selection .selection-item{color:var(--ran-color-text-placeholder,var(--ran-gray-800))}:host([disabled]) .ran-select .selection{background-color:var(--ran-color-bg-subtle,var(--ran-background-200));border-color:var(--ran-color-border,var(--ran-gray-400))}:host([disabled]) .ran-select .selection .selection-item{color:var(--ran-color-text-disabled,var(--ran-gray-700))}:host-context([data-ran-surface="glass"]) .ran-select .selection{transition:var(--ran-select-transition,background-color var(--ran-motion-duration-fast,.14s) var(--ran-motion-ease-standard,ease), border-color var(--ran-motion-duration-fast,.14s) var(--ran-motion-ease-standard,ease), box-shadow var(--ran-motion-duration-fast,.14s) var(--ran-motion-ease-standard,ease))}@media (hover:hover){:host-context([data-ran-surface="glass"]):host(:not([disabled],[type=text]):hover) .ran-select .selection{border:var(--ran-select-hover-border,1px solid transparent);background-color:var(--ran-select-hover-background-color,var(--ran-surface-glass-hover))}}@media (prefers-reduced-motion:reduce){:host-context([data-ran-surface="glass"]) .ran-select .selection{transition:none}}:host-context([data-ran-surface="glass"]):host(:not([disabled]):focus-visible) .ran-select .selection{border:var(--ran-select-focus-border,1px solid color-mix(in srgb, var(--ran-color-focus,var(--ran-blue-700)) 55%, transparent));box-shadow:var(--ran-select-focus-box-shadow,0 0 0 3px color-mix(in srgb, var(--ran-color-focus,var(--ran-blue-700)) 22%, transparent))}`,Ht=r({default:()=>Ut}),Ut,Wt=n((()=>{Ut=` +`}));Wt(),U(`r-option`,class extends W{_option;_optionContent;_shadowDom;_slot;static get observedAttributes(){return[`disabled`,`sheet`,`value`]}constructor(){super(),this._shadowDom=K(this);let e=V().build(),t=B().class(`ran-select-dropdown-option-content`).children(e).build(),n=B().class(`ran-select-dropdown-option`).children(t).build();q(this._shadowDom,``,n),this._slot=e,this._optionContent=t,this._option=n}get value(){return this.getAttribute(`value`)}set value(e){X(this,`value`,e)}get sheet(){return this.getAttribute(`sheet`)}set sheet(e){X(this,`sheet`,e)}get disabled(){return H(this)}set disabled(e){!e||e===`false`?this.removeAttribute(`disabled`):this.setAttribute(`disabled`,``)}handlerExternalCss(){Z(this,this._shadowDom,`sheet`,null,this.sheet)}connectedCallback(){this.classList.contains(`ran-option`)||this.classList.add(`ran-option`)}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._option&&(!n||n===`false`?this._option.setAttribute(`disabled`,``):this._option.removeAttribute(`disabled`)),e===`sheet`&&this._shadowDom&&this.handlerExternalCss())}});var Gt=`@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,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-down-out{animation:ranui-dropdown-down-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-up-in{animation:ranui-dropdown-up-in var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-up-out{animation:ranui-dropdown-up-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-left-in{animation:ranui-dropdown-left-in var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-left-out{animation:ranui-dropdown-left-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-right-in{animation:ranui-dropdown-right-in var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}.ran-dropdown-right-out{animation:ranui-dropdown-right-out var(--ran-dropdown-animation-duration,var(--ran-motion-duration-base,.2s)) var(--ran-dropdown-animation-timing-function,var(--ran-motion-ease-standard,ease));animation-fill-mode:forwards}:host{text-align:var(--ran-dropdown-host-text-align,left);z-index:var(--ran-dropdown-host-z-index,auto)}:host([data-ran-floating]),:host([data-ran-floating]) .ranui-dropdown-container,:host([data-ran-floating]) ::slotted(*){transition-delay:0s;transition-property:none!important}:host([data-ran-floating=placing]){opacity:0;pointer-events:none}.ranui-dropdown{position:var(--ran-dropdown-position,relative);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,var(--ran-z-dropdown,1100));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,#e4e4e8));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%)}:host([role=listbox]) .ranui-dropdown,:host([role=menu]) .ranui-dropdown{padding:var(--ran-dropdown-padding,var(--ran-space-1,4px))}.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,.ranui-dropdown-container .right{top:max(0px, calc(var(--ran-dropdown-arrow-anchor-height,var(--ran-dropdown-min-height,100%)) / 2 - var(--ran-dropdown-arrow-width,16px) / 2))}.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-shape-offset,0px) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(270deg)}.ranui-dropdown-container .right{transform:translateX(calc(0px - var(--ran-dropdown-arrow-overlap,2px))) translateY(calc(var(--ran-dropdown-arrow-shape-offset,0px) + var(--ran-dropdown-arrow-anchor-offset-y,0px))) rotate(90deg);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(0 -1px 0 var(--ran-color-border)))}::slotted(.ran-select-option-hover){z-index:0;border-radius:var(--ran-dropdown-option-item-border-radius,var(--ran-radius-sm,8px));background:var(--ran-select-option-hover-background,var(--ran-surface-glass-hover));opacity:0;pointer-events:none;width:0;height:0;transition:var(--ran-select-option-hover-transition,transform var(--ran-motion-duration-slow,.28s) var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)), width var(--ran-motion-duration-slow,.28s) var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)), height var(--ran-motion-duration-slow,.28s) var(--ran-motion-ease-standard,cubic-bezier(.2, 0, 0, 1)));position:absolute;top:0;left:0}::slotted(.ran-select-option-hover[data-instant]){transition:none}@media (prefers-reduced-motion:reduce){::slotted(.ran-select-option-hover){transition:none}}:host([surface=glass]) .ranui-dropdown{background:var(--ran-surface-glass-overlay-specular,linear-gradient(180deg, #ffffff6b 0%, #ffffff1f 24%, transparent 48%), linear-gradient(0deg, #ffffff38 0%, transparent 30%), radial-gradient(120% 55% at 50% -8%, #ffffff47, transparent 58%)), var(--ran-surface-glass-overlay-fill,#ffffff7a);-webkit-backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-overlay-border,#ffffffb8);box-shadow:var(--ran-surface-glass-overlay-shadow,0 18px 48px #00000040, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80, inset 0 -24px 48px #ffffff1a)}@media (prefers-reduced-transparency:reduce){:host([surface=glass]) .ranui-dropdown{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-overlay-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-overlay-solid-shadow,var(--ran-shadow-modal))}}:host-context([data-ran-surface="glass"]):host(:not([surface=solid])) .ranui-dropdown{background:var(--ran-surface-glass-overlay-specular,linear-gradient(180deg, #ffffff6b 0%, #ffffff1f 24%, transparent 48%), linear-gradient(0deg, #ffffff38 0%, transparent 30%), radial-gradient(120% 55% at 50% -8%, #ffffff47, transparent 58%)), var(--ran-surface-glass-overlay-fill,#ffffff7a);-webkit-backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));backdrop-filter:blur(var(--ran-surface-glass-overlay-blur,18px)) saturate(var(--ran-surface-glass-saturate,180%)) brightness(var(--ran-surface-glass-brightness,1.08));border-color:var(--ran-surface-glass-overlay-border,#ffffffb8);box-shadow:var(--ran-surface-glass-overlay-shadow,0 18px 48px #00000040, 0 0 0 .5px #ffffffd9, inset 0 1px 0 #fffffff2, inset 0 -1px 0 #fff6, inset 0 0 0 .5px #ffffff80, inset 0 -24px 48px #ffffff1a)}@media (prefers-reduced-transparency:reduce){:host-context([data-ran-surface="glass"]):host(:not([surface=solid])) .ranui-dropdown{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-overlay-solid-fallback,var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-overlay-solid-shadow,var(--ran-shadow-modal))}}@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}}`;U(`r-dropdown`,class extends W{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`,`surface`]}constructor(){super(),this._shadowDom=K(this,Gt);let e=I(),t=I(),n=B().class(`ranui-dropdown-container`).children(B().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).ref(e).part(`dropdown`).children(V().class(`slot`).ref(t))).build();q(this._shadowDom,Gt,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)}get surface(){return Y(this,`surface`)}set surface(e){X(this,`surface`,e,{removeEmpty:!0})}handlerExternalCss=()=>{Z(this,this._shadowDom,`sheet`,null,this.sheet)};appliedTransit=``;handlerTransit=()=>{this.container&&(this.appliedTransit&&m(this.container,this.appliedTransit),this.appliedTransit=this.transit,this.appliedTransit&&p(this.container,this.appliedTransit))};getAnimationTarget=()=>this.container;handlerArrow=()=>{let e=(this.arrow||``).trim();e?(!this.arrowIcon&&this.container&&(this.arrowIcon=B().class(`ranui-dropdown-arrow`).build(),this.arrowIcon.innerHTML=``,this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)):(this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0)};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 Kt=`.ranui-dropdown-option-item{position:var(--ran-dropdown-option-item-position,relative);display:var(--ran-dropdown-option-item-display,block);padding:var(--ran-dropdown-option-item-padding,var(--ran-space-2,8px) var(--ran-space-3,12px));color:var(--ran-dropdown-option-item-color,var(--ran-color-text,#000000e0));font-weight:var(--ran-dropdown-option-item-font-weight,400);font-size:var(--ran-dropdown-option-item-font-size,var(--ran-text-label-1,14px));transition:var(--ran-dropdown-option-item-transition,none);border-radius:var(--ran-dropdown-option-item-border-radius,var(--ran-radius-sm,8px));cursor:var(--ran-dropdown-option-item-cursor,pointer)}:host(:not([disabled]):not([role=option])) .ranui-dropdown-option-item:hover{background-color:var(--ran-dropdown-option-item-hover-background-color,var(--ran-color-bg-hover))}.ranui-dropdown-option-item-content{text-align:var(--ran-dropdown-option-item-content-text-align,left);overflow:var(--ran-dropdown-option-item-content-overflow,hidden);white-space:var(--ran-dropdown-option-item-content-white-space,nowrap);text-overflow:var(--ran-dropdown-option-item-content-text-overflow,ellipsis);color:var(--ran-dropdown-option-item-content-color,var(--ran-color-text,#000000e0));font-size:var(--ran-dropdown-option-item-content-font-size,var(--ran-text-label-1,14px));line-height:var(--ran-dropdown-option-item-content-line-height,20px);box-sizing:var(--ran-dropdown-option-item-content-box-sizing,border-box);list-style:var(--ran-dropdown-option-item-content-list-style,none);font-family:var(--ran-dropdown-option-item-content-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");font-variant:var(--ran-dropdown-option-item-content-font-variant,initial)}.ranui-dropdown-option-active{background-color:var(--ran-dropdown-option-active-background-color,var(--ran-dropdown-option-item-hover-background-color,var(--ran-color-bg-hover)))}.ranui-dropdown-option-selected{font-weight:var(--ran-dropdown-option-selected-font-weight,500);padding-inline-end:var(--ran-dropdown-option-selected-padding-inline-end,calc(var(--ran-space-3,12px) + 1em + var(--ran-space-2,8px)))}.ranui-dropdown-option-selected:after{content:"";display:var(--ran-dropdown-option-selected-check-display,block);inset-inline-end:var(--ran-space-3,12px);background-color:var(--ran-dropdown-option-selected-check-color,currentColor);width:1em;height:1em;position:absolute;top:50%;transform:translateY(-50%);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") 50%/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") 50%/contain no-repeat}.ranui-dropdown-option-selected:not(.ranui-dropdown-option-active){background-color:var(--ran-dropdown-option-selected-background-color,transparent)}:is(:host-context([data-ran-surface="glass"]) .ranui-dropdown-option-item,:host-context([surface="glass"]) .ranui-dropdown-option-item){transition:var(--ran-dropdown-option-item-transition,background-color var(--ran-motion-duration-fast,.14s) var(--ran-motion-ease-standard,ease), color var(--ran-motion-duration-fast,.14s) var(--ran-motion-ease-standard,ease))}:is(:host-context([data-ran-surface="glass"]):host(:not([disabled]):not([role=option])) .ranui-dropdown-option-item:hover,:host-context([surface="glass"]):host(:not([disabled]):not([role=option])) .ranui-dropdown-option-item:hover){background-color:var(--ran-dropdown-option-item-hover-background-color,var(--ran-surface-glass-hover))}:is(:host-context([data-ran-surface="glass"]) .ranui-dropdown-option-active,:host-context([surface="glass"]) .ranui-dropdown-option-active){background-color:var(--ran-dropdown-option-active-background-color,var(--ran-dropdown-option-item-hover-background-color,var(--ran-surface-glass-hover)))}:host-context([data-hover-fill]) .ranui-dropdown-option-item{z-index:1}:host-context([data-hover-fill]) .ranui-dropdown-option-active{background-color:#0000}:host-context([data-hover-fill]):host(:not([disabled]):not([role=option])) .ranui-dropdown-option-item:hover{background-color:#0000}@media (prefers-reduced-motion:reduce){:is(:host-context([data-ran-surface="glass"]) .ranui-dropdown-option-item,:host-context([surface="glass"]) .ranui-dropdown-option-item){transition:none}}:host([disabled]) .ranui-dropdown-option-item{cursor:not-allowed;color:var(--ran-color-text-disabled)}:host([disabled]) .ranui-dropdown-option-item-content{color:var(--ran-color-text-disabled)}@media (forced-colors:active){.ranui-dropdown-option-active{outline-offset:-1px;outline:1px solid highlight}.ranui-dropdown-option-selected:after{forced-color-adjust:none;background-color:canvastext}}`;U(`r-dropdown-item`,class extends W{ionDropdownItem;_slot;_shadowDom;ionDropdownItemContent;static get observedAttributes(){return[`active`,`selected`,`value`,`title`,`sheet`]}constructor(){super(),this._shadowDom=K(this,Kt);let e=I(),t=I(),n=V().class(`slot`).ref(e).build(),r=B().class(`ranui-dropdown-option-item-content`).part(`content`).ref(t).children(n).build(),i=B().class(`ranui-dropdown-option-item`).part(`item`).children(r).build();q(this._shadowDom,Kt,i),this._slot=J(e,`slot`),this.ionDropdownItemContent=J(t,`content`),this.ionDropdownItem=i}get value(){return Y(this,`value`)}set value(e){!H(this)&&e?this.setAttribute(`value`,e):this.removeAttribute(`value`)}get active(){return Y(this,`active`)}set active(e){e?this.setAttribute(`active`,e):this.removeAttribute(`active`)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get title(){return Y(this,`title`)}set title(e){e?this.setAttribute(`title`,e):this.removeAttribute(`title`)}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}handlerExternalCss=()=>{Z(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this.ionDropdownItem.classList.toggle(`ranui-dropdown-option-active`,!!this.active),this.ionDropdownItem.classList.toggle(`ranui-dropdown-option-selected`,this.selected)}attributeChangedCallback(e,t,n){e===`sheet`?this.handlerExternalCss():(e===`active`&&this.ionDropdownItem.classList.toggle(`ranui-dropdown-option-active`,!!n),e===`selected`&&this.ionDropdownItem.classList.toggle(`ranui-dropdown-option-selected`,n!==null))}});var qt=`:host{display:var(--ran-icon-host-display,inline-flex)}:host([spin]){animation-name:var(--ran-icon-host-spin-name,var(--ran-icon-host-spin-animation,rotate));animation-duration:var(--ran-icon-host-spin-duration,1.4s);animation-timing-function:linear;animation-iteration-count:var(--ran-icon-host-spin-iteration-count,infinite)}@media (prefers-reduced-motion:reduce){:host([spin]){animation:none}}.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))}}`,Jt=r({default:()=>Yt}),Yt,Xt=n((()=>{Yt=` + +`})),Zt=r({default:()=>Qt}),Qt,$t=n((()=>{Qt=` + +`})),en=r({default:()=>tn}),tn,nn=n((()=>{tn=``})),rn=r({default:()=>an}),an,on=n((()=>{an=` +`})),sn=r({default:()=>cn}),cn,ln=n((()=>{cn=``})),un=r({default:()=>dn}),dn,fn=n((()=>{dn=``})),pn=r({default:()=>mn}),mn,hn=n((()=>{mn=``})),gn=r({default:()=>_n}),_n,vn=n((()=>{_n=``})),yn=r({default:()=>bn}),bn,xn=n((()=>{bn=``})),Sn=r({default:()=>Cn}),Cn,wn=n((()=>{Cn=``})),Tn=r({default:()=>En}),En,Dn=n((()=>{En=``})),On=r({default:()=>kn}),kn,An=n((()=>{kn=``})),jn=r({default:()=>Mn}),Mn,Nn=n((()=>{Mn=` + + + + + +`})),Pn=r({default:()=>Fn}),Fn,In=n((()=>{Fn=` + + +`})),Ln=r({default:()=>Rn}),Rn,zn=n((()=>{Rn=` + + +`})),Bn=r({default:()=>Vn}),Vn,Hn=n((()=>{Vn=``})),Un=r({default:()=>Wn}),Wn,Gn=n((()=>{Wn=` +`})),Kn=r({default:()=>qn}),qn,Jn=n((()=>{qn=` + + + + +`})),Yn=r({default:()=>Xn}),Xn,Zn=n((()=>{Xn=``})),Qn=r({default:()=>$n}),$n,er=n((()=>{$n=``})),tr=r({default:()=>nr}),nr,rr=n((()=>{nr=` + + + +`})),ir=r({default:()=>ar}),ar,or=n((()=>{ar=` +`})),sr=r({default:()=>cr}),cr,lr=n((()=>{cr=` + LOADING + + + + + + + + + + + + + + + + +`})),ur=r({default:()=>dr}),dr,fr=n((()=>{dr=``})),pr=r({default:()=>mr}),mr,hr=n((()=>{mr=` + + +`})),gr=r({default:()=>_r}),_r,vr=n((()=>{_r=` +`})),yr=r({default:()=>br}),br,xr=n((()=>{br=``})),Sr=r({default:()=>Cr}),Cr,wr=n((()=>{Cr=` +`})),Tr=r({default:()=>Er}),Er,Dr=n((()=>{Er=` +`})),Or=r({default:()=>kr}),kr,Ar=n((()=>{kr=` +`})),jr=r({default:()=>Mr}),Mr,Nr=n((()=>{Mr=` +`})),Pr=r({default:()=>Fr}),Fr,Ir=n((()=>{Fr=` +`})),Lr=r({default:()=>Rr}),Rr,zr=n((()=>{Rr=` +`})),Br=r({default:()=>Vr}),Vr,Hr=n((()=>{Vr=` +`})),Ur=r({default:()=>Wr}),Wr,Gr=n((()=>{Wr=` +`})),Kr=r({default:()=>qr}),qr,Jr=n((()=>{qr=``})),Yr=r({default:()=>Xr}),Xr,Zr=n((()=>{Xr=``})),Qr=r({default:()=>$r}),$r,ei=n((()=>{$r=``})),ti=r({default:()=>ni}),ni,ri=n((()=>{ni=` +`})),ii=r({default:()=>ai}),ai,oi=n((()=>{ai=``})),si=r({default:()=>ci}),ci,li=n((()=>{ci=` + + +`})),ui=r({default:()=>di}),di,fi=n((()=>{di=``})),pi=r({default:()=>mi}),mi,hi=n((()=>{mi=` + + +`})),gi=r({default:()=>_i}),_i,vi=n((()=>{_i=``})),yi=r({default:()=>bi}),bi,xi=n((()=>{bi=` +`})),Si=r({default:()=>Ci}),Ci,wi=n((()=>{Ci=` +`})),Ti=r({default:()=>Ei}),Ei,Di=n((()=>{Ei=``})),Oi=r({default:()=>ki}),ki,Ai=n((()=>{ki=``})),ji=r({default:()=>Mi}),Mi,Ni=n((()=>{Mi=``})),Pi=r({default:()=>Fi}),Fi,Ii=n((()=>{Fi=``})),Li=r({default:()=>Ri}),Ri,zi=n((()=>{Ri=``})),Bi=!1,Vi=new Map,Hi=!1,Q=e=>/]/i.test(e),Ui=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}},Wi=(e,t)=>{Hi=!0;let n=Ui(t);n&&(Vi.set(`inline:${e}`,n),typeof window<`u`&&window.dispatchEvent(new CustomEvent(`ranui-icon-registered`,{detail:{name:e}})))},Gi=Object.assign({"../../assets/icons/add-user.svg":()=>Promise.resolve().then(()=>(Xt(),Jt)).then(e=>e.default),"../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>($t(),Zt)).then(e=>e.default),"../../assets/icons/book.svg":()=>Promise.resolve().then(()=>(nn(),en)).then(e=>e.default),"../../assets/icons/cast.svg":()=>Promise.resolve().then(()=>(on(),rn)).then(e=>e.default),"../../assets/icons/check-circle-fill.svg":()=>Promise.resolve().then(()=>(ln(),sn)).then(e=>e.default),"../../assets/icons/check-circle.svg":()=>Promise.resolve().then(()=>(fn(),un)).then(e=>e.default),"../../assets/icons/check.svg":()=>Promise.resolve().then(()=>(hn(),pn)).then(e=>e.default),"../../assets/icons/chevron-down.svg":()=>Promise.resolve().then(()=>(Wt(),Ht)).then(e=>e.default),"../../assets/icons/close-circle-fill.svg":()=>Promise.resolve().then(()=>(vn(),gn)).then(e=>e.default),"../../assets/icons/close-circle.svg":()=>Promise.resolve().then(()=>(xn(),yn)).then(e=>e.default),"../../assets/icons/close.svg":()=>Promise.resolve().then(()=>(wn(),Sn)).then(e=>e.default),"../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>(Dn(),Tn)).then(e=>e.default),"../../assets/icons/download.svg":()=>Promise.resolve().then(()=>(An(),On)).then(e=>e.default),"../../assets/icons/drop.svg":()=>Promise.resolve().then(()=>(Nn(),jn)).then(e=>e.default),"../../assets/icons/eye-close.svg":()=>Promise.resolve().then(()=>(In(),Pn)).then(e=>e.default),"../../assets/icons/eye.svg":()=>Promise.resolve().then(()=>(zn(),Ln)).then(e=>e.default),"../../assets/icons/fullscreen.svg":()=>Promise.resolve().then(()=>(Hn(),Bn)).then(e=>e.default),"../../assets/icons/github.svg":()=>Promise.resolve().then(()=>(Gn(),Un)).then(e=>e.default),"../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>(Jn(),Kn)).then(e=>e.default),"../../assets/icons/home.svg":()=>Promise.resolve().then(()=>(Zn(),Yn)).then(e=>e.default),"../../assets/icons/info-circle-fill.svg":()=>Promise.resolve().then(()=>(er(),Qn)).then(e=>e.default),"../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>(rr(),tr)).then(e=>e.default),"../../assets/icons/issue.svg":()=>Promise.resolve().then(()=>(or(),ir)).then(e=>e.default),"../../assets/icons/loading-scene.svg":()=>Promise.resolve().then(()=>(lr(),sr)).then(e=>e.default),"../../assets/icons/loading.svg":()=>Promise.resolve().then(()=>(fr(),ur)).then(e=>e.default),"../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>(hr(),pr)).then(e=>e.default),"../../assets/icons/menu.svg":()=>Promise.resolve().then(()=>(vr(),gr)).then(e=>e.default),"../../assets/icons/message.svg":()=>Promise.resolve().then(()=>(xr(),yr)).then(e=>e.default),"../../assets/icons/mic-off.svg":()=>Promise.resolve().then(()=>(wr(),Sr)).then(e=>e.default),"../../assets/icons/mic.svg":()=>Promise.resolve().then(()=>(Dr(),Tr)).then(e=>e.default),"../../assets/icons/more.svg":()=>Promise.resolve().then(()=>(Ar(),Or)).then(e=>e.default),"../../assets/icons/pause.svg":()=>Promise.resolve().then(()=>(Nr(),jr)).then(e=>e.default),"../../assets/icons/pencil.svg":()=>Promise.resolve().then(()=>(Ir(),Pr)).then(e=>e.default),"../../assets/icons/pip.svg":()=>Promise.resolve().then(()=>(zr(),Lr)).then(e=>e.default),"../../assets/icons/play.svg":()=>Promise.resolve().then(()=>(Hr(),Br)).then(e=>e.default),"../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>(Gr(),Ur)).then(e=>e.default),"../../assets/icons/power-off.svg":()=>Promise.resolve().then(()=>(Jr(),Kr)).then(e=>e.default),"../../assets/icons/preview.svg":()=>Promise.resolve().then(()=>(Zr(),Yr)).then(e=>e.default),"../../assets/icons/refresh.svg":()=>Promise.resolve().then(()=>(ei(),Qr)).then(e=>e.default),"../../assets/icons/search.svg":()=>Promise.resolve().then(()=>(ri(),ti)).then(e=>e.default),"../../assets/icons/setting.svg":()=>Promise.resolve().then(()=>(oi(),ii)).then(e=>e.default),"../../assets/icons/sort.svg":()=>Promise.resolve().then(()=>(li(),si)).then(e=>e.default),"../../assets/icons/team.svg":()=>Promise.resolve().then(()=>(fi(),ui)).then(e=>e.default),"../../assets/icons/unlock.svg":()=>Promise.resolve().then(()=>(hi(),pi)).then(e=>e.default),"../../assets/icons/user.svg":()=>Promise.resolve().then(()=>(vi(),gi)).then(e=>e.default),"../../assets/icons/volume-mute.svg":()=>Promise.resolve().then(()=>(xi(),yi)).then(e=>e.default),"../../assets/icons/volume.svg":()=>Promise.resolve().then(()=>(wi(),Si)).then(e=>e.default),"../../assets/icons/warning-circle-fill.svg":()=>Promise.resolve().then(()=>(Di(),Ti)).then(e=>e.default),"../../assets/icons/warning-circle.svg":()=>Promise.resolve().then(()=>(Ai(),Oi)).then(e=>e.default),"../../assets/icons/without-content.svg":()=>Promise.resolve().then(()=>(Ni(),ji)).then(e=>e.default),"../../assets/icons/zoom-in.svg":()=>Promise.resolve().then(()=>(Ii(),Pi)).then(e=>e.default),"../../assets/icons/zoom-out.svg":()=>Promise.resolve().then(()=>(zi(),Li)).then(e=>e.default)}),Ki={};for(let[e,t]of Object.entries(Gi)){let n=e.split(`/`).pop()?.replace(/\.svg$/,``);n&&(Ki[n]=t)}U(`r-icon`,class extends W{isDev=Bi;_events=new _;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=K(this,qt),Tt(this._shadowDom,qt,{bind:e=>this._bindPaintedTree(e),build:()=>{let e=B().class(`ran-icon`).part(`ran-icon`).build();return this._div=e,e}})}_bindPaintedTree(e){if(!(typeof e.className==`string`?e.className:``).includes(`ran-icon`)&&e.getAttribute(`part`)!==`ran-icon`)return!1;this._div=e;let t=e.querySelector?.(`svg`);return t&&(this._icon=t),!0}get name(){return Y(this,`name`)}set name(e){e&&this.setAttribute(`name`,e)}get size(){return Y(this,`size`)}set size(e){e&&this.setAttribute(`size`,e)}get color(){return Y(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 Y(this,`aria-label`)}set ariaLabel(e){X(this,`aria-label`,e,{removeEmpty:!0})}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}handlerExternalCss=()=>{Z(this,this._shadowDom,`sheet`,null,this.sheet)};syncA11y=()=>{this._icon&&(this.decorative?(this.setAttribute(`aria-hidden`,`true`),this.removeAttribute(`role`),this._icon.setAttribute(`aria-hidden`,`true`),this._icon.setAttribute(`focusable`,`false`)):(this.removeAttribute(`aria-hidden`),this.setAttribute(`role`,`img`),this._icon.removeAttribute(`aria-hidden`),this._icon.setAttribute(`focusable`,`false`)))};setIcon=()=>{let e=this.name;if(e&&this._icon?.getAttribute(`data-name`)===e)this.setSize(),this.setColor(),this.setSpin(),this.syncA11y();else if(this._icon&&=(this._icon.remove(),void 0),typeof document>`u`&&this._div&&(this._div.innerHTML=``),e){if(e.startsWith(`{t().then(t=>{Wi(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=z(`template`).build();r.innerHTML=n.trim();let i=r.content.firstElementChild;if(i&&i.tagName.toLowerCase()===`svg`)return i};renderSvg=(e,t)=>{if(typeof document>`u`){let n=this.size||`1em`,r=/^\d+(\.\d+)?$/.test(n)?`${n}px`:n,i=this.color||`currentColor`,a=e.replace(/]*)>/i,``);this._div.innerHTML=a,this.syncA11y();return}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 qi=e=>e.getAnimationTarget?.()??e,Ji=(e,t)=>{let n=qi(e);typeof n.getAnimations!=`function`||typeof requestAnimationFrame!=`function`?t():requestAnimationFrame(()=>{let e=n.getAnimations();e.length?(async()=>{await Promise.allSettled(e.map(e=>e.finished)),t()})():t()})},Yi={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`}},Xi=Symbol.for(`ranui.floating.panel-owner`),Zi=Symbol.for(`ranui.floating.panel-escape`),Qi=Symbol.for(`ranui.floating.active-panels`),$i=`ranui-floating-change`,ea=`data-ran-floating`,ta=(e,t,n)=>{let r=e.ownerDocument;t?(e[Xi]=t,e[Zi]=n,(r[Qi]??=new Set).add(e)):(delete e[Xi],delete e[Zi],r[Qi]?.delete(e)),r.dispatchEvent(new Event($i))},na=class{options;repositionBound=!1;outsideBinding=0;opened=!1;presence=null;repositionFrame=0;generation=0;resolvedSide;constructor(e){this.options=e}get isPositioned(){return this.presence===`open`}get floatingPresence(){return this.presence}get anchor(){return this.options.anchor?.()??this.options.host}setPresence(e,t){this.presence=t,t?e.setAttribute(ea,t):e.removeAttribute(ea),t===`placing`?(e.style.setProperty(`opacity`,`0`),e.style.setProperty(`pointer-events`,`none`)):(t===`open`||t===null)&&(e.style.removeProperty(`opacity`),e.style.removeProperty(`pointer-events`))}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[Xi]??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;r===i?s||t(e):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;e?(n.style.setProperty(`z-index`,`var(--ran-dropdown-host-z-index, var(--ran-z-dropdown, 1100))`),ta(n,t,this.options.onEscape),this.resolvedSide=void 0,t.dispatchEvent(new CustomEvent(`show`)),this.setPresence(n,`placing`),n.style.setProperty(`display`,`block`),this.attachReposition(),this.position(!0),Ji(n,()=>{r===this.generation&&(n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-show`)))})):(ta(n),this.detachReposition(),t.dispatchEvent(new CustomEvent(`hide`)),this.setPresence(n,`closing`),n.setAttribute(`transit`,Yi[this.resolvedSide??this.side()].exit),Ji(n,()=>{r===this.generation&&(n.style.setProperty(`display`,`none`),this.setPresence(n,null),n.removeAttribute(`transit`),t.dispatchEvent(new CustomEvent(`after-hide`)))}))};side=()=>this.options.placement().split(`-`)[0];position=(e=!1)=>{let t=this.options.panel();if(!t)return;let n=this.generation;e&&t.offsetWidth;let r=this.options.panel();r===t&&(!e||this.opened&&n===this.generation)&&this.write(r,e)};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=S(v,c.left,c.width,h)-e.left):(y=S(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 C={top:y,left:b,side:x,align:v,anchorRect:c,panelRect:m,container:d},w=o?.(C,e);w&&(C.top=w.top,C.left=w.left),this.resolvedSide=C.side,e.style.setProperty(`position`,`absolute`),e.style.setProperty(`inset`,`${C.top}px auto auto ${C.left}px`),e.style.setProperty(`--ran-x`,`${C.left}px`),e.style.setProperty(`--ran-y`,`${C.top}px`),s?.(C,e),t&&e.setAttribute(`transit`,Yi[C.side].enter),(t||this.presence===`placing`)&&this.setPresence(e,`open`)}scrollIsInsidePanel=e=>{let t=this.options.panel();if(!t)return!1;if(typeof e.composedPath==`function`&&e.composedPath().includes(t))return!0;let n=e.target;return n instanceof Node&&(n===t||t.contains(n))};reposition=e=>{this.opened&&!this.repositionFrame&&(e?.type===`scroll`&&this.scrollIsInsidePanel(e)||(typeof requestAnimationFrame==`function`?this.repositionFrame=requestAnimationFrame(()=>{this.repositionFrame=0,this.opened&&this.position()}):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?(ta(e),this.setPresence(e,null)):this.presence=null,this.repositionFrame&&typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(this.repositionFrame),this.repositionFrame=0),this.detachReposition()}};function ra(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function ia(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 aa(e){return e?.checkValidity?.()??!0}function oa(e){return e?.reportValidity?.()??!0}var sa=Ft({en:{"select.required":`Please select an item in the list.`},zh:{"select.required":`请从列表中选择一项。`},ja:{"select.required":`リスト内の項目を選択してください。`},ko:{"select.required":`목록에서 항목을 선택하세요.`},es:{"select.required":`Selecciona un elemento de la lista.`},pt:{"select.required":`Selecione um item da lista.`},de:{"select.required":`Wählen Sie ein Element in der Liste aus.`},fa:{"select.required":`لطفاً یک مورد از فهرست انتخاب کنید.`}});Wi(`chevron-down`,Ut);var ca=0,la=class extends W{static formAssociated=!0;_internals;_events=new _;_searchEvents=new _;removeTimeId;_listboxId;_activeIndex;_slot;_shadowDom;_select;_selection;_search;_icon;_selectDropdown;_selectionDropdown;_floating=new na({onEscape:e=>{this.keydownSelect(e),e.defaultPrevented&&this.focus({preventScroll:!0})},host:this,panel:()=>this._selectionDropdown,placement:()=>this.placement,offset:4,containerId:()=>this.getPopupContainerId,beforeMeasure:(e,t)=>{let n=`${e.width}px`;t.style.setProperty(`--ran-select-trigger-width`,n),t.style.setProperty(`min-width`,n),t.style.setProperty(`width`,`max-content`),t.style.setProperty(`--ran-dropdown-width`,`max-content`),t.style.setProperty(`--ran-dropdown-min-width`,n)},measurePanel:e=>{let t=e._shadowDom?.querySelector(`.ranui-dropdown`),n=parseFloat(e.style.minWidth)||0,r=t?Math.max(t.scrollWidth,t.getBoundingClientRect().width):0,i=Math.max(n,r,e.scrollWidth,e.getBoundingClientRect().width),a=`${Math.ceil(i)}px`;e.style.setProperty(`width`,a),e.style.setProperty(`min-width`,a),e.style.setProperty(`--ran-dropdown-width`,`100%`),e.style.setProperty(`--ran-dropdown-min-width`,`100%`);let o=t?.getBoundingClientRect(),s=e.getBoundingClientRect();return{width:Math.max(o?.width??0,s.width,i),height:o?.height??s.height}},afterPosition:()=>{this._glassMenuLaidOut=!0,this._optionHoverTarget=null,this._syncGlassMenuChrome()}});_optionList;_optionItems=new WeakMap;_optionSeq=0;_optionLabelMapValue;_optionValueMapLabel;_activeOption;_optionHover;_optionHoverTarget=null;_glassMenuLaidOut=!1;_lastPointerAt=``;_text;_selector;_label;onSearch;_composing=!1;_lastSearchValue;_pendingDefaultValue=!0;_typeaheadBuffer=``;_typeaheadTimeId;static get observedAttributes(){return[`disabled`,`required`,`sheet`,`type`,`value`,`label`,`placeholder`,`defaultvalue`,`showsearch`,`open`,`placement`,`getpopupcontainerid`,`dropdownclass`,`dropdownsurface`,`trigger`]}constructor(){super(),this._internals=Ct(this),this._listboxId=`ran-select-listbox-${Math.random().toString(36).slice(2,9)}`,this._activeIndex=-1,this._optionList=[],this._optionLabelMapValue=new Map,this._optionValueMapLabel=new Map,this._shadowDom=K(this,Vt,{mode:`closed`},this._internals),Tt(this._shadowDom,Vt,{bind:e=>this._bindPaintedTree(e),build:()=>{let e=I(),t=I(),n=I(),r=I(),i=I(),a=I(),o=B().class(`ran-select`).part(`select`).children(B().class(`selection`).ref(e).part(`selection`).children(z(`r-icon`).class(`icon`).ref(n).part(`icon`).attr(`name`,`chevron-down`).attr(`color`,`var(--ran-color-text-secondary)`).attr(`size`,`16`),B().class(`selection-value`).ref(t).children(Je().class(`selection-item`).ref(r).part(`selection-item`),Xe().class(`selection-search`).ref(i).part(`search`).attr(`type`,`search`).attr(`autocomplete`,`off`))),V().ref(a).class(`slot`)).build();return this._select=o,this._selection=J(e,`selection`),this._selector=J(t,`selector`),this._icon=J(n,`icon`),this._text=J(r,`selection item`),this._search=J(i,`selection search`),this._slot=J(a,`slot`),o}})}_bindPaintedTree(e){let t=e.children.item(0),n=t?.children.item(0),r=t?.children.item(1),i=r?.children.item(0),a=r?.children.item(1),o=e.children.item(1);if(!t||!n||!r||!i||!a||!o||o.tagName.toLowerCase()!==`slot`)return!1;this._select=e,this._selection=t,this._selector=r,this._icon=n,this._text=i,this._search=a,this._slot=o;for(let t of this._shadowDom.children){if(t===e)break;t.tagName.toLowerCase()===`label`&&(this._label=t)}return!0}get value(){return this.getAttribute(`value`)||``}set value(e){this._pendingDefaultValue=!1,e?this.setAttribute(`value`,e):this.removeAttribute(`value`),e?this.syncFormValue():this._clearSelection()}syncFormValue=()=>{this._internals?.setFormValue?.(this.value),this._updateValidity()};get required(){return this.hasAttribute(`required`)}set required(e){Et(this,`required`,!(!e||e===`false`))}get label(){return this.getAttribute(`label`)||``}set label(e){this.setAttribute(`label`,e)}_syncLabel=e=>{e==null?this._label&&(this._label.remove(),this._label=void 0,this.removeAttribute(`aria-label`)):(this._label?this._label.textContent=e:(this.id||=`ran-select-${++ca}`,this._label=Qe().class(`ran-select-label`).part(`label`).text(e).build(),this._label.id=`${this.id}-label`,this._label.addEventListener(`click`,()=>this.focus()),this._shadowDom.insertBefore(this._label,this._select)),this.setAttribute(`aria-label`,e))};_updateValidity=()=>{ia(this,this._internals,{disabled:this.disabled,required:this.required,isEmpty:!this.value,message:zt(sa,`select.required`,this),anchor:this})};checkValidity(){return aa(this._internals)}reportValidity(){return oa(this._internals)}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??``}formResetCallback(){let e=this.defaultValue;e?this.value=e:(this.removeAttribute(`value`),this._clearSelection())}_clearSelection=()=>{this._pendingDefaultValue=!1,this._syncPlaceholder(),this._text.removeAttribute(`title`),this._activeOption&&=(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`),void 0),this._activeIndex=-1,this.getDropdownOptions().forEach(e=>e.removeAttribute(`active`)),this.syncActiveState(),this.syncFormValue()};get placeholder(){return this.getAttribute(`placeholder`)||``}set placeholder(e){X(this,`placeholder`,e)}_syncPlaceholder=()=>{!this.value&&this._text&&(this._text.textContent=this.placeholder,this.placeholder?this._search.placeholder=this.placeholder:this._search.removeAttribute(`placeholder`))};get defaultValue(){return this.getAttribute(`defaultValue`)||``}set defaultValue(e){this.setAttribute(`defaultValue`,e||``)}get showSearch(){return this.getAttribute(`showSearch`)||``}set showSearch(e){this.setAttribute(`showSearch`,e||``)}get type(){return this.getAttribute(`type`)||``}set type(e){this.setAttribute(`type`,e||``)}get placement(){return this.getAttribute(`placement`)||`bottom`}set placement(e){this.setAttribute(`placement`,e||``)}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}get getPopupContainerId(){return this.getAttribute(`getPopupContainerId`)||``}set getPopupContainerId(e){this.setAttribute(`getPopupContainerId`,e||``)}get dropdownclass(){return this.getAttribute(`dropdownclass`)||``}set dropdownclass(e){this.setAttribute(`dropdownclass`,e||``)}get dropdownsurface(){return this.getAttribute(`dropdownsurface`)||``}set dropdownsurface(e){this.setAttribute(`dropdownsurface`,e||``)}get trigger(){return this.getAttribute(`trigger`)||`click`}set trigger(e){this.setAttribute(`trigger`,e||``)}get disabled(){return H(this)}set disabled(e){!e||e===`false`?(this.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),(this.tabIndex<0||!this.hasAttribute(`tabindex`))&&(this.tabIndex=0)):(this.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1)}initAria=()=>{this.hasAttribute(`tabindex`)||(this.tabIndex=0),this.setAttribute(`role`,`combobox`),this.setAttribute(`aria-haspopup`,`listbox`),this.setAttribute(`aria-controls`,this._listboxId),this.setAttribute(`aria-expanded`,`false`),this.setAttribute(`aria-disabled`,this.disabled?`true`:`false`)};updateAriaExpanded=e=>{this.setAttribute(`aria-expanded`,e?`true`:`false`)};get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}_applyOpen=()=>{if(this.open&&this.disabled)this.open=!1;else{if(this.open){let e=this.getAttribute(`value`),t=this.getDropdownOptions().findIndex(t=>!!e&&t.getAttribute(`value`)===e);t>=0&&this.setActiveOptionByIndex(t,!1)}else this._glassMenuLaidOut=!1;this._floating.apply(this.open),this.open||this._syncGlassMenuChrome()}};show=()=>{this.open=!0};hide=()=>{this.open=!1};toggle=()=>{this.open=!this.open};getDropdownOptions=()=>this._selectionDropdown?Array.from(this._selectionDropdown.querySelectorAll(`r-dropdown-item`)):[];syncActiveState=()=>{let e=this.getDropdownOptions(),t=this.getAttribute(`value`)||``;e.forEach((e,n)=>{e.setAttribute(`role`,`option`),e.toggleAttribute(`selected`,!!t&&e.getAttribute(`value`)===t),e.setAttribute(`aria-selected`,e===this._activeOption?`true`:`false`),e.id||=`${this._listboxId}-option-${n}`}),this._activeOption?.id?this.setAttribute(`aria-activedescendant`,this._activeOption.id):this.removeAttribute(`aria-activedescendant`)};_cursorFromPointer=e=>{let t=`${e.clientX},${e.clientY}`;if(t===this._lastPointerAt)return;this._lastPointerAt=t;let n=e.target.closest?.(`r-dropdown-item`);if(!n||n===this._activeOption||H(n))return;let r=this.getDropdownOptions().indexOf(n);r>=0&&this.setActiveOptionByIndex(r,!1)};setActiveOptionByIndex=(e,t=!0)=>{let n=this.getDropdownOptions();if(n.length===0)return;let r=o(e,0,n.length-1),i=n[r];if(!i)return;this._activeOption&&this._activeOption!==i&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeIndex=r,this._activeOption=i;let a=i.getAttribute(`value`)||``;i.setAttribute(`active`,a),i.setAttribute(`aria-selected`,`true`);let s=this._selectionDropdown?.dropdown;if(t&&s&&s.clientHeight>0&&s.scrollHeight>s.clientHeight){let e=i.getBoundingClientRect(),t=s.getBoundingClientRect(),n=t.height/s.offsetHeight||1;e.topt.bottom&&(s.scrollTop+=(e.bottom-t.bottom)/n)}this.syncActiveState(),this._syncGlassMenuChrome()};_usesGlassMenuChrome=()=>{let e=this.dropdownsurface||this._selectionDropdown?.getAttribute(`surface`)||``;return e===`solid`?!1:e===`glass`||typeof document<`u`&&document.documentElement.getAttribute(`data-ran-surface`)===`glass`};_ensureOptionHover=()=>(this._optionHover||(this._optionHover=document.createElement(`span`),this._optionHover.className=`ran-select-option-hover`,this._optionHover.setAttribute(`aria-hidden`,`true`)),this._optionHover);_placeOptionHover=e=>{let t=this._optionHover;if(!t||!this._usesGlassMenuChrome())return;let n=e.getBoundingClientRect(),r=typeof DOMMatrixReadOnly<`u`?DOMMatrixReadOnly:void 0,i=r?new r(getComputedStyle(t).transform):{e:0,f:0},a=t.getBoundingClientRect();t.toggleAttribute(`data-instant`,this._optionHoverTarget===null),t.style.setProperty(`transform`,`translate(${n.left-(a.left-i.e)}px, ${n.top-(a.top-i.f)}px)`),t.style.setProperty(`width`,`${n.width}px`),t.style.setProperty(`height`,`${n.height}px`),t.style.setProperty(`opacity`,`1`),this._optionHoverTarget=e};_hideOptionHover=()=>{this._optionHover&&(this._optionHover.style.setProperty(`opacity`,`0`),this._optionHoverTarget=null)};_syncGlassMenuChrome=()=>{let e=this._selectionDropdown;if(!e)return;let t=this.open&&this._usesGlassMenuChrome();if(e.toggleAttribute(`data-hover-fill`,t),!t){this._hideOptionHover();return}let n=this._ensureOptionHover();n.parentNode!==e&&e.prepend(n),this._glassMenuLaidOut&&(this._activeOption?.isConnected?this._placeOptionHover(this._activeOption):this._hideOptionHover())};selectOptionElement=(e,t=!0)=>{if(!e)return;let n=e.getAttribute(`title`)||e.textContent?.trim()||``,r=e.getAttribute(`value`)||this._optionLabelMapValue.get(n)||``;r&&(this.setAttribute(`value`,r),this.syncFormValue(),this._text.textContent=n,this._text.setAttribute(`title`,n),this._search.setAttribute(`placeholder`,n),this._activeOption&&this._activeOption!==e&&(this._activeOption.removeAttribute(`active`),this._activeOption.setAttribute(`aria-selected`,`false`)),this._activeOption=e,this._activeIndex=this.getDropdownOptions().findIndex(t=>t===e),e.setAttribute(`active`,r),e.setAttribute(`aria-selected`,`true`),this.syncActiveState(),t&&(this.setSelectDropdownDisplayNone(),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r,label:n}}))))};isDropdownOpen=()=>this.open;_nextEnabledIndex=(e,t)=>{let n=this.getDropdownOptions(),r=n.length;if(r===0)return-1;let i=o(e,0,r-1);for(let e=0;er-1)return-1;i=e}return-1};keydownSelect=e=>{if(!(this.disabled||e.isComposing||this._composing)&&(!e.composedPath().includes(this._search)||[`ArrowDown`,`ArrowUp`,`Enter`,`Escape`].includes(e.key))){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),this.isDropdownOpen()||this.selectMouseDown(e);let t=this.getDropdownOptions();if(t.length===0)return;let n=e.key===`ArrowDown`?1:-1,r=this._activeIndex>=0?this._nextEnabledIndex(this._activeIndex+n,n):this._nextEnabledIndex(n>0?0:t.length-1,n);r>=0&&this.setActiveOptionByIndex(r)}else if(e.key===`Home`||e.key===`End`){e.preventDefault(),this.isDropdownOpen()||this.selectMouseDown(e);let t=this.getDropdownOptions();if(t.length===0)return;let n=e.key===`Home`?1:-1,r=this._nextEnabledIndex(e.key===`Home`?0:t.length-1,n);r>=0&&this.setActiveOptionByIndex(r)}else if(ra(e)){if(e.preventDefault(),!this.isDropdownOpen()){this.selectMouseDown(e);return}this._activeOption&&this.selectOptionElement(this._activeOption)}else if(e.key===`Escape`){if(!this.isDropdownOpen())return;e.preventDefault(),this.setSelectDropdownDisplayNone()}else this._handleTypeahead(e)}};_handleTypeahead=e=>{if(e.key.length!==1||e.ctrlKey||e.altKey||e.metaKey)return;e.preventDefault(),this.isDropdownOpen()||this.selectMouseDown(e);let t=this.getDropdownOptions(),n=t.length;if(n===0)return;clearTimeout(this._typeaheadTimeId),this._typeaheadBuffer+=e.key.toLowerCase(),this._typeaheadTimeId=setTimeout(()=>{this._typeaheadBuffer=``},500);let r=this._activeIndex>=0?this._activeIndex+1:0;for(let e=0;e{this.open=!1};setSelectDropdownDisplayBlock=()=>{this.open=!0};placementPosition=(e=!1)=>{this._floating.position(e)};selectMouseDown=e=>{e.stopPropagation(),H(this)||(this.removeDropDownTimeId(e),this.open=!this.open)};_cancelDropdownClose=()=>{clearTimeout(this.removeTimeId),this.removeTimeId=void 0};removeDropDownTimeId=e=>{e.stopPropagation(),this._search.value&&(this._search.value=``,this.hasAttribute(`showsearch`)&&this.changeSearch(e)),this.trigger.includes(`hover`)&&!f()&&this._cancelDropdownClose()};selectBlur=e=>{e.stopPropagation(),this.disabled||(this.removeTimeId&&this.removeDropDownTimeId(e),this.removeTimeId=setTimeout(()=>{this.removeDropDownTimeId(e),this.setSelectDropdownDisplayNone()},300))};clickOption=e=>{if(e.stopPropagation(),this.disabled){e.preventDefault();return}let t=e.target.closest(`r-dropdown-item`);t&&H(t)?this.removeDropDownTimeId(e):(this.selectOptionElement(t),this.removeDropDownTimeId(e),this.focus())};createOption=()=>{let e=this.getRootNode(),t=(e.getElementById?e.getElementById(this.getPopupContainerId):null)||document.getElementById(this.getPopupContainerId)||document.body;this._selectDropdown||(this._selectDropdown=B().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).on(`click`,this.clickOption).on(`pointermove`,this._cursorFromPointer).build(),this._selectionDropdown=z(`r-dropdown`).id(this._listboxId).attr(`role`,`listbox`).style(`position`,`absolute`).style(`display`,`none`).build(),this.dropdownclass&&this._selectionDropdown.setAttribute(`class`,this.dropdownclass),this.dropdownsurface?this._selectionDropdown.setAttribute(`surface`,this.dropdownsurface):this._selectionDropdown.removeAttribute(`surface`),this.trigger.includes(`hover`)&&!f()&&(this._selectDropdown.addEventListener(`mouseleave`,this.selectBlur),this._selectDropdown.addEventListener(`mouseenter`,this._cancelDropdownClose)),this._selectDropdown.appendChild(this._selectionDropdown)),this._selectDropdown.parentNode!==t&&t.appendChild(this._selectDropdown)};removeSelectDropdown=()=>{this._selectDropdown?.remove()};addOptionToSlot=()=>{this._optionList=[],this._optionLabelMapValue.clear(),this._optionValueMapLabel.clear(),this._slot.assignedElements().forEach(e=>{if(e.tagName!==`R-OPTION`)return;let t=e.innerHTML,n=e.getAttribute(`value`)||``,r=H(e);this._optionList?.push({label:t,value:n,disabled:r}),this._optionLabelMapValue.get(t)&&console.warn(`${t} is repeat option`),this._optionValueMapLabel.get(n)&&console.warn(`${n} is repeat option`),this._optionLabelMapValue.set(t,n),this._optionValueMapLabel.set(n,t)});let e=this.hasAttribute(`showsearch`)?this._composing?this._lastSearchValue??``:this._search.value:``;this._renderOptionsForSearch(e),this._selectionDropdown?.style.display===`block`&&this.placementPosition()};createSelectDropdownContent=(e=[])=>{e.length===0?this._selectDropdown?.style.setProperty(`display`,`none`):this._selectDropdown?.style.setProperty(`display`,`block`),this._activeOption=void 0,this._activeIndex=-1;let t=this.value||(this._pendingDefaultValue?this.defaultValue:``),n=(this._selectionDropdown?e:[]).map(e=>{let{label:n,value:r,disabled:i}=e,a=this._optionItems.get(e);return a||(a=z(`r-dropdown-item`).attr(`role`,`option`).attr(`value`,`${r}`).attr(`title`,`${n}`).attr(`id`,`${this._listboxId}-option-${this._optionSeq++}`).text(`${n}`).build(),i&&(a.setAttribute(`disabled`,``),a.setAttribute(`aria-disabled`,`true`)),this._optionItems.set(e,a)),t===r?(a.setAttribute(`active`,r),this._activeOption=a):a.removeAttribute(`active`),a});this._optionHover&&this._usesGlassMenuChrome()?this._selectionDropdown?.replaceChildren(this._optionHover,...n):this._selectionDropdown?.replaceChildren(...n),this._activeIndex=this.getDropdownOptions().findIndex(e=>e===this._activeOption),this._activeOption?this.selectOptionElement(this._activeOption,!1):this.syncActiveState(),this._syncGlassMenuChrome()};setDefaultValue=()=>{let e=this.getAttribute(`defaultValue`)||this.getAttribute(`value`);if(!e)return;let t=this._optionValueMapLabel.get(e);if(!t)return;this.setAttribute(`value`,e),this._text.textContent=t,this._text.setAttribute(`title`,t);let n=this.getDropdownOptions().find(t=>t.getAttribute(`value`)===e)||null;n&&this.selectOptionElement(n,!1)};changeSearch=e=>{if(this.disabled||this._composing||e.isComposing)return;let t=e.detail?.value??this._search.value;(e.type!==`change`||t!==this._lastSearchValue)&&(this.dispatchEvent(new CustomEvent(`search`,{detail:{value:t}})),this._renderOptionsForSearch(t))};_renderOptionsForSearch=e=>{this._lastSearchValue=e;let t=e.toLowerCase(),n=e?this._optionList.filter(e=>`${e.label}`.toLowerCase().includes(t)):this._optionList;this.createSelectDropdownContent(n)};clickRemoveSelect=e=>{this._floating.containsEvent(e)||this.setSelectDropdownDisplayNone()};connectedCallback(){this.handlerExternalCss(),this.createOption(),this._applyShowSearch(),this.addOptionToSlot(),this.initAria(),this.syncFormValue(),this._events.on(this._slot,`slotchange`,this.addOptionToSlot).on(this,`keydown`,this.keydownSelect).on(this,`focusin`,()=>{clearTimeout(this.removeTimeId),this.removeTimeId=void 0}),this._floating.bindOutside(this._events,this.clickRemoveSelect),this.trigger.includes(`hover`)&&!f()&&this._events.on(this,`mouseenter`,this.selectMouseDown).on(this,`mouseleave`,this.selectBlur),this.trigger.includes(`click`)&&this._events.on(this,`click`,this.selectMouseDown).on(this,`blur`,this.selectBlur),this.reapplyValueAfterConnect(),this._syncPlaceholder(),this.open&&this._applyOpen()}reapplyValueAfterConnect=()=>{let e=this.getAttribute(`value`);e&&(this._activeOption=void 0,this.syncSelectedFromValue(e))};_applyShowSearch=()=>{this._searchEvents.abort(),this._composing=!1,this._lastSearchValue=void 0,this.hasAttribute(`showsearch`)&&(this.onSearch=this.changeSearch,this._searchEvents.on(this._search,`keydown`,e=>{e.stopPropagation(),this.keydownSelect(e)}).on(this._search,`input`,this.onSearch).on(this._search,`change`,this.onSearch).on(this._search,`compositionstart`,()=>{this._composing=!0}).on(this._search,`compositionend`,e=>{this._composing=!1,this.changeSearch(e)}).on(this._search,`click`,e=>{e.stopPropagation(),this.open||this.selectMouseDown(e)}))};disconnectedCallback(){this._events.abort(),this._searchEvents.abort(),this._composing=!1,clearTimeout(this.removeTimeId),this.removeTimeId=void 0,this._floating.destroy(),this._selectionDropdown?.style.setProperty(`display`,`none`),this._selectionDropdown?.removeAttribute(`transit`),this._typeaheadBuffer=``,this.removeSelectDropdown(),clearTimeout(this._typeaheadTimeId)}attributeChangedCallback(e,t,n){t!==n&&(e===`disabled`&&this._select&&(this.disabled?(this._select.setAttribute(`disabled`,``),this._selection.setAttribute(`disabled`,``),this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1,this._search.disabled=!0,this.hide(),this._cancelDropdownClose(),clearTimeout(this._typeaheadTimeId),this._typeaheadBuffer=``,typeof document<`u`&&document.activeElement===this&&this.blur()):(this._select.removeAttribute(`disabled`),this._selection.removeAttribute(`disabled`),this.removeAttribute(`aria-disabled`),this._search.disabled=!1,(this.tabIndex<0||!this.hasAttribute(`tabindex`))&&(this.tabIndex=0))),e===`value`&&this.syncSelectedFromValue(n),e===`placeholder`&&this._syncPlaceholder(),(e===`required`||e===`disabled`)&&this._updateValidity(),e===`sheet`&&this._shadowDom&&this.handlerExternalCss(),e===`label`&&this._shadowDom&&this._syncLabel(n),e===`defaultvalue`&&(this._pendingDefaultValue=!0,this.setDefaultValue()),e===`showsearch`&&this._search&&this._applyShowSearch(),e===`open`&&this._applyOpen(),e===`dropdownsurface`&&this._selectionDropdown&&(n?this._selectionDropdown.setAttribute(`surface`,n):this._selectionDropdown.removeAttribute(`surface`),this._syncGlassMenuChrome()),e===`dropdownclass`&&this._selectionDropdown&&this._selectionDropdown.setAttribute(`class`,n||``))}syncSelectedFromValue=e=>{if(this._pendingDefaultValue=!1,!e){this._clearSelection();return}let t=Array.from(this.querySelectorAll(`r-option`)).find(t=>t.getAttribute(`value`)===e);if(!t)return;let n=t.getAttribute(`title`)||t.textContent?.trim()||``;this._text.textContent!==n&&this.selectOptionElement(t,!1)};_preSerialize(){let e=this.getAttribute(`label`);e!=null&&this._syncLabel(e);let t=this.getAttribute(`value`);if(!t||!this._text)return;let n=Array.from(this.querySelectorAll(`r-option`)).find(e=>e.getAttribute(`value`)===t),r=n&&(n.getAttribute(`title`)||n.textContent?.trim())||``;r||=this._labelFromSerializedOptions(t),r&&(this._text.textContent=r)}_labelFromSerializedOptions(e){try{for(let t of Array.from(this.querySelectorAll(`r-option`)))if(t.getAttribute(`value`)===e)return(t.textContent||``).replace(/\s+/g,` `).trim()}catch{}let t=this.innerHTML||``;if(!t.includes(`r-option`))return``;if(typeof DOMParser<`u`)try{let n=new DOMParser().parseFromString(`
${t}
`,`text/html`);return Array.from(n.querySelectorAll(`r-option`)).find(t=>t.getAttribute(`value`)===e)?.textContent?.replace(/\s+/g,` `).trim()||``}catch{}let n=0;for(;n`,r);if(i===-1)break;let a=t.indexOf(``,i+1);if(a===-1)break;let o=t.slice(r+9,i);if(o.includes(`value="${e}"`)||o.includes(`value='${e}'`)){let e=t.slice(i+1,a),n=0;for(;n`,t);if(r===-1)break;e=e.slice(0,t)+e.slice(r+11),n=t}if(!e.includes(`<`))return e.replace(/\s+/g,` `).trim()}n=a+11}return``}};U(`r-select`,la);var $=[`system`,`light`,`dark`],ua=`ran-theme-switch-sync`,da={system:`themeSwitch.system`,light:`themeSwitch.light`,dark:`themeSwitch.dark`},fa=class extends W{static get observedAttributes(){return[`label`,`label-system`,`label-light`,`label-dark`,`sheet`]}_events=new _;_shadowDom;_select;_options=new Map;constructor(){super(),this._shadowDom=K(this,i),Tt(this._shadowDom,i,{bind:e=>{if(e.tagName?.toLowerCase()!==`r-select`)return!1;this._select=e;for(let t of $){let n=null;for(let r of e.children)if(r.tagName.toLowerCase()===`r-option`&&r.getAttribute(`value`)===t){n=r;break}n||(n=z(`r-option`).attr(`value`,t).attr(`part`,`option ${t}`).build(),e.appendChild(n)),this._options.set(t,n)}return!0},build:()=>{let e=$.map(e=>{let t=z(`r-option`).attr(`value`,e).attr(`part`,`option ${e}`).build();return this._options.set(e,t),t}),t=new la;t.classList.add(`ran-theme-switch`),t.setAttribute(`part`,`select`),t.setAttribute(`trigger`,this.getAttribute(`trigger`)||`click`),t.setAttribute(`dropdownclass`,`ran-chrome-menu`),t.setAttribute(`value`,`system`);for(let n of e)t.appendChild(n);return this._select=t,this._select}})}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}get value(){return Pt()||`system`}set value(e){$.includes(e)&&this._selectChoice(e)}get open(){return!!this._select.open}set open(e){this._select.open=!!e}_label(e){return this.getAttribute(`label-${e}`)||zt(Bt,da[e],this)}_groupLabel(){return this.getAttribute(`label`)||zt(Bt,`themeSwitch.label`,this)}_syncLabels(){this._select.setAttribute(`aria-label`,this._groupLabel());for(let[e,t]of this._options)t.textContent=this._label(e)}_reflect(){let e=this.value;this._select.value!==e&&(this._select.value=e)}_selectChoice(e){Nt(e),this._reflect(),this._syncMeta(e),document.dispatchEvent(new CustomEvent(ua)),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)}})}_handleSelectChange=e=>{let t=e.detail?.value||this._select.value;$.includes(t)&&t!==this.value&&this._selectChoice(t)};_handleSync=()=>this._reflect();handlerExternalCss=()=>{Z(this,this._shadowDom,`sheet`,null,this.sheet)};connectedCallback(){this.handlerExternalCss(),this._syncLabels(),this._reflect(),this._events.on(this._select,`change`,this._handleSelectChange),document.addEventListener(ua,this._handleSync),typeof window<`u`&&window.addEventListener(`storage`,this._handleSync)}disconnectedCallback(){this._events.abort(),document.removeEventListener(ua,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())}_preSerialize(){this._syncLabels();let e=this.value;this._select.setAttribute(`value`,e),this._select._preSerialize?.()}};return U(`r-theme-switch`,fa),e.ThemeSwitch=fa,e.default=fa,e})({}); \ No newline at end of file