spell-ui 0.8.15 → 0.8.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/README-components.md +4 -2
  2. package/README-runtime.md +26 -1
  3. package/README.md +2 -1
  4. package/dist/SliderScale-DunjyaDW.js +67 -0
  5. package/dist/SliderScale-DunjyaDW.js.map +1 -0
  6. package/dist/{ThemeDraft-CyX3YA_L.js → ThemeDraft-spaNC2dD.js} +2 -2
  7. package/dist/{ThemeDraft-CyX3YA_L.js.map → ThemeDraft-spaNC2dD.js.map} +1 -1
  8. package/dist/{UIInput-B3K0w4ow.js → UIInput-8s1aiaw1.js} +2 -2
  9. package/dist/UIInput-8s1aiaw1.js.map +1 -0
  10. package/dist/{UIRuntime-DCv4sy30.js → UIRuntime-BaokNnwk.js} +900 -158
  11. package/dist/UIRuntime-BaokNnwk.js.map +1 -0
  12. package/dist/_spell-element/UIComponent.d.ts +7 -0
  13. package/dist/_spell-element/elements.types.d.ts +6 -0
  14. package/dist/_spell-element/vocabulary.types.d.ts +27 -0
  15. package/dist/_util/dom.d.ts +7 -0
  16. package/dist/components/components.es.d.ts +1 -0
  17. package/dist/components/ui-dial/DialArc.d.ts +43 -0
  18. package/dist/components/ui-dial/UIDial.d.ts +263 -0
  19. package/dist/components/ui-dial/UIDial.en.d.ts +149 -0
  20. package/dist/components/ui-dial/UIDial.es.d.ts +25 -0
  21. package/dist/components/ui-dial/UIDial.fallback.d.ts +167 -0
  22. package/dist/components/ui-dial/UIDial.types.d.ts +11 -0
  23. package/dist/components/ui-dial/index.d.ts +3 -0
  24. package/dist/components/ui-graph/UIGraph.d.ts +17 -0
  25. package/dist/components/ui-graph/UIGraph.en.d.ts +17 -0
  26. package/dist/components/ui-graph/UIGraph.es.d.ts +6 -0
  27. package/dist/components/ui-input/UIInput.d.ts +46 -3
  28. package/dist/components/ui-input/UIInput.en.d.ts +6 -1
  29. package/dist/components/ui-input/UIInput.es.d.ts +1 -0
  30. package/dist/components/ui-input/UIInput.fallback.d.ts +6 -1
  31. package/dist/components/ui-json/UIJson.d.ts +5 -4
  32. package/dist/components/ui-modal/ChoiceRows.d.ts +61 -0
  33. package/dist/components/ui-modal/ModalDialogs.d.ts +15 -1
  34. package/dist/components/ui-modal/UIModal.d.ts +6 -2
  35. package/dist/components/ui-modal/UIModal.en.d.ts +6 -2
  36. package/dist/components/ui-modal/UIModal.es.d.ts +1 -0
  37. package/dist/components/ui-page-layout/UIPageLayout.d.ts +141 -8
  38. package/dist/components/ui-page-layout/UIPageLayout.en.d.ts +51 -2
  39. package/dist/components/ui-page-layout/UIPageLayout.es.d.ts +3 -0
  40. package/dist/components/ui-property-editor/UIProperty.d.ts +2 -2
  41. package/dist/components/ui-site-links/UISiteLinks.d.ts +124 -0
  42. package/dist/components/ui-site-links/UISiteLinks.en.d.ts +60 -0
  43. package/dist/components/ui-site-links/UISiteLinks.es.d.ts +26 -0
  44. package/dist/components/ui-site-links/index.d.ts +1 -0
  45. package/dist/components/ui-site-nav-button/UISiteNavButton.d.ts +12 -5
  46. package/dist/components/ui-site-nav-button/UISiteNavButton.en.d.ts +32 -12
  47. package/dist/components/ui-site-nav-button/UISiteNavButton.es.d.ts +3 -0
  48. package/dist/components/ui-site-tabs/UISiteTabs.d.ts +13 -0
  49. package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +9 -0
  50. package/dist/components/ui-slider/SliderScale.d.ts +26 -2
  51. package/dist/components/ui-slider/UISlider.d.ts +0 -2
  52. package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
  53. package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
  54. package/dist/components/ui-toc/TocIndex.d.ts +16 -1
  55. package/dist/components/ui-toc/UIToc.d.ts +27 -3
  56. package/dist/components/ui-toc/UIToc.en.d.ts +1 -1
  57. package/dist/components/ui-toc/UIToc.types.d.ts +5 -0
  58. package/dist/components/ui-tree/UITree.d.ts +38 -2
  59. package/dist/components/ui-tree/UITree.en.d.ts +9 -0
  60. package/dist/components/ui-tree/UITree.es.d.ts +4 -0
  61. package/dist/components/ui-uploader/UIUploader.d.ts +721 -0
  62. package/dist/components/ui-uploader/UIUploader.en.d.ts +394 -0
  63. package/dist/components/ui-uploader/UIUploader.es.d.ts +112 -0
  64. package/dist/components/ui-uploader/index.d.ts +1 -0
  65. package/dist/{components.es-DilRG1VO.js → components.es-jY2nBwuP.js} +249 -65
  66. package/dist/components.es-jY2nBwuP.js.map +1 -0
  67. package/dist/core.js +605 -571
  68. package/dist/core.js.map +1 -1
  69. package/dist/docs-components/docs-components.types.d.ts +2 -0
  70. package/dist/index.d.ts +3 -0
  71. package/dist/index.js +101 -97
  72. package/dist/jsx.d.ts +1138 -21
  73. package/dist/runtime/DataTooltips.d.ts +10 -0
  74. package/dist/runtime/Modals.d.ts +7 -2
  75. package/dist/runtime/Styles.d.ts +7 -1
  76. package/dist/runtime/UIRuntime.d.ts +6 -0
  77. package/dist/runtime/runtime.types.d.ts +26 -1
  78. package/dist/sound-library/back.ogg +0 -0
  79. package/dist/sound-library/beep.ogg +0 -0
  80. package/dist/sound-library/bell.ogg +0 -0
  81. package/dist/sound-library/big-punch.ogg +0 -0
  82. package/dist/sound-library/bong.ogg +0 -0
  83. package/dist/sound-library/book-close.ogg +0 -0
  84. package/dist/sound-library/book-down.ogg +0 -0
  85. package/dist/sound-library/book-open.ogg +0 -0
  86. package/dist/sound-library/card-fan-2.ogg +0 -0
  87. package/dist/sound-library/card-fan.ogg +0 -0
  88. package/dist/sound-library/card-place-2.ogg +0 -0
  89. package/dist/sound-library/card-place-3.ogg +0 -0
  90. package/dist/sound-library/card-place.ogg +0 -0
  91. package/dist/sound-library/card-shove-2.ogg +0 -0
  92. package/dist/sound-library/card-shove.ogg +0 -0
  93. package/dist/sound-library/card-slide-2.ogg +0 -0
  94. package/dist/sound-library/card-slide-3.ogg +0 -0
  95. package/dist/sound-library/card-slide-4.ogg +0 -0
  96. package/dist/sound-library/card-slide.ogg +0 -0
  97. package/dist/sound-library/chip-down-2.ogg +0 -0
  98. package/dist/sound-library/chip-down.ogg +0 -0
  99. package/dist/sound-library/chips-collide.ogg +0 -0
  100. package/dist/sound-library/chips-handle.ogg +0 -0
  101. package/dist/sound-library/chips-stack-2.ogg +0 -0
  102. package/dist/sound-library/chips-stack.ogg +0 -0
  103. package/dist/sound-library/chop.ogg +0 -0
  104. package/dist/sound-library/click-2.ogg +0 -0
  105. package/dist/sound-library/click-3.ogg +0 -0
  106. package/dist/sound-library/click.ogg +0 -0
  107. package/dist/sound-library/close.ogg +0 -0
  108. package/dist/sound-library/cloth.ogg +0 -0
  109. package/dist/sound-library/coins-2.ogg +0 -0
  110. package/dist/sound-library/coins.ogg +0 -0
  111. package/dist/sound-library/confirm-2.ogg +0 -0
  112. package/dist/sound-library/confirm.ogg +0 -0
  113. package/dist/sound-library/creak.ogg +0 -0
  114. package/dist/sound-library/deck-open.ogg +0 -0
  115. package/dist/sound-library/deck-take-out.ogg +0 -0
  116. package/dist/sound-library/dice-grab.ogg +0 -0
  117. package/dist/sound-library/dice-shake-2.ogg +0 -0
  118. package/dist/sound-library/dice-shake.ogg +0 -0
  119. package/dist/sound-library/dice-throw-2.ogg +0 -0
  120. package/dist/sound-library/dice-throw.ogg +0 -0
  121. package/dist/sound-library/die-throw-2.ogg +0 -0
  122. package/dist/sound-library/die-throw.ogg +0 -0
  123. package/dist/sound-library/door-close.ogg +0 -0
  124. package/dist/sound-library/door-open.ogg +0 -0
  125. package/dist/sound-library/drop.ogg +0 -0
  126. package/dist/sound-library/error-2.ogg +0 -0
  127. package/dist/sound-library/error.ogg +0 -0
  128. package/dist/sound-library/fail.ogg +0 -0
  129. package/dist/sound-library/fall.ogg +0 -0
  130. package/dist/sound-library/glass-break.ogg +0 -0
  131. package/dist/sound-library/glass-clink.ogg +0 -0
  132. package/dist/sound-library/glass-tap.ogg +0 -0
  133. package/dist/sound-library/glass.ogg +0 -0
  134. package/dist/sound-library/glitch.ogg +0 -0
  135. package/dist/sound-library/grow.ogg +0 -0
  136. package/dist/sound-library/high-up.ogg +0 -0
  137. package/dist/sound-library/hover-2.ogg +0 -0
  138. package/dist/sound-library/hover.ogg +0 -0
  139. package/dist/sound-library/jingle-2.ogg +0 -0
  140. package/dist/sound-library/jingle-3.ogg +0 -0
  141. package/dist/sound-library/jingle-4.ogg +0 -0
  142. package/dist/sound-library/jingle.ogg +0 -0
  143. package/dist/sound-library/jump.ogg +0 -0
  144. package/dist/sound-library/knife-draw.ogg +0 -0
  145. package/dist/sound-library/knife-slice.ogg +0 -0
  146. package/dist/sound-library/laser-2.ogg +0 -0
  147. package/dist/sound-library/laser.ogg +0 -0
  148. package/dist/sound-library/latch.ogg +0 -0
  149. package/dist/sound-library/level-up.ogg +0 -0
  150. package/dist/sound-library/lose-2.ogg +0 -0
  151. package/dist/sound-library/lose-3.ogg +0 -0
  152. package/dist/sound-library/lose-4.ogg +0 -0
  153. package/dist/sound-library/lose.ogg +0 -0
  154. package/dist/sound-library/low-down.ogg +0 -0
  155. package/dist/sound-library/metal-clang.ogg +0 -0
  156. package/dist/sound-library/metal-click.ogg +0 -0
  157. package/dist/sound-library/metal-crash.ogg +0 -0
  158. package/dist/sound-library/metal-tap.ogg +0 -0
  159. package/dist/sound-library/mouse-click.ogg +0 -0
  160. package/dist/sound-library/mouse-release.ogg +0 -0
  161. package/dist/sound-library/open.ogg +0 -0
  162. package/dist/sound-library/orchestra-hit-2.ogg +0 -0
  163. package/dist/sound-library/orchestra-hit.ogg +0 -0
  164. package/dist/sound-library/page-turn-2.ogg +0 -0
  165. package/dist/sound-library/page-turn.ogg +0 -0
  166. package/dist/sound-library/pickaxe.ogg +0 -0
  167. package/dist/sound-library/piece-down-2.ogg +0 -0
  168. package/dist/sound-library/piece-down-3.ogg +0 -0
  169. package/dist/sound-library/piece-down.ogg +0 -0
  170. package/dist/sound-library/piece-take-2.ogg +0 -0
  171. package/dist/sound-library/piece-take.ogg +0 -0
  172. package/dist/sound-library/piece-tap-2.ogg +0 -0
  173. package/dist/sound-library/piece-tap.ogg +0 -0
  174. package/dist/sound-library/plank.ogg +0 -0
  175. package/dist/sound-library/plate.ogg +0 -0
  176. package/dist/sound-library/pluck.ogg +0 -0
  177. package/dist/sound-library/pot.ogg +0 -0
  178. package/dist/sound-library/power-up-2.ogg +0 -0
  179. package/dist/sound-library/power-up-3.ogg +0 -0
  180. package/dist/sound-library/power-up.ogg +0 -0
  181. package/dist/sound-library/punch.ogg +0 -0
  182. package/dist/sound-library/question.ogg +0 -0
  183. package/dist/sound-library/rise.ogg +0 -0
  184. package/dist/sound-library/scratch.ogg +0 -0
  185. package/dist/sound-library/scroll.ogg +0 -0
  186. package/dist/sound-library/select-2.ogg +0 -0
  187. package/dist/sound-library/select.ogg +0 -0
  188. package/dist/sound-library/shrink.ogg +0 -0
  189. package/dist/sound-library/shuffle.ogg +0 -0
  190. package/dist/sound-library/soft-thud-2.ogg +0 -0
  191. package/dist/sound-library/soft-thud.ogg +0 -0
  192. package/dist/sound-library/space-junk.ogg +0 -0
  193. package/dist/sound-library/step-2.ogg +0 -0
  194. package/dist/sound-library/step-on-carpet.ogg +0 -0
  195. package/dist/sound-library/step-on-grass.ogg +0 -0
  196. package/dist/sound-library/step-on-snow.ogg +0 -0
  197. package/dist/sound-library/step-on-stone.ogg +0 -0
  198. package/dist/sound-library/step-on-wood.ogg +0 -0
  199. package/dist/sound-library/step.ogg +0 -0
  200. package/dist/sound-library/switch-2.ogg +0 -0
  201. package/dist/sound-library/switch.ogg +0 -0
  202. package/dist/sound-library/tap-2.ogg +0 -0
  203. package/dist/sound-library/tap.ogg +0 -0
  204. package/dist/sound-library/three-tones.ogg +0 -0
  205. package/dist/sound-library/tick-2.ogg +0 -0
  206. package/dist/sound-library/tick.ogg +0 -0
  207. package/dist/sound-library/tin.ogg +0 -0
  208. package/dist/sound-library/toggle-2.ogg +0 -0
  209. package/dist/sound-library/toggle.ogg +0 -0
  210. package/dist/sound-library/two-tones.ogg +0 -0
  211. package/dist/sound-library/win-2.ogg +0 -0
  212. package/dist/sound-library/win-3.ogg +0 -0
  213. package/dist/sound-library/win-4.ogg +0 -0
  214. package/dist/sound-library/win.ogg +0 -0
  215. package/dist/sound-library/wood-thud.ogg +0 -0
  216. package/dist/sound-library/zap.ogg +0 -0
  217. package/dist/sounds/BuiltInSounds.d.ts +41 -0
  218. package/dist/sounds/index.d.ts +9 -0
  219. package/dist/sounds/sounds.types.d.ts +22 -0
  220. package/dist/ui-calendar.js +1 -1
  221. package/dist/ui-dial.editor-CjjdKi5L.js +5 -0
  222. package/dist/ui-dial.editor-CjjdKi5L.js.map +1 -0
  223. package/dist/ui-dial.js +467 -0
  224. package/dist/ui-dial.js.map +1 -0
  225. package/dist/ui-graph.js +22 -0
  226. package/dist/ui-graph.js.map +1 -1
  227. package/dist/{ui-input.editor-budoNoB0.js → ui-input.editor-D11iRgXR.js} +2 -2
  228. package/dist/ui-input.editor-D11iRgXR.js.map +1 -0
  229. package/dist/ui-input.js +84 -54
  230. package/dist/ui-input.js.map +1 -1
  231. package/dist/ui-json.js +8 -8
  232. package/dist/ui-json.js.map +1 -1
  233. package/dist/ui-modal.js +183 -97
  234. package/dist/ui-modal.js.map +1 -1
  235. package/dist/ui-page-layout.editor-IgDEveUY.js +5 -0
  236. package/dist/ui-page-layout.editor-IgDEveUY.js.map +1 -0
  237. package/dist/ui-page-layout.js +217 -72
  238. package/dist/ui-page-layout.js.map +1 -1
  239. package/dist/ui-popup.js +34 -34
  240. package/dist/ui-popup.js.map +1 -1
  241. package/dist/ui-property-editor.js +7 -4
  242. package/dist/ui-property-editor.js.map +1 -1
  243. package/dist/ui-root.js +71 -5
  244. package/dist/ui-root.js.map +1 -1
  245. package/dist/ui-search.js +1 -1
  246. package/dist/ui-section.js +97 -96
  247. package/dist/ui-section.js.map +1 -1
  248. package/dist/ui-site-links.editor-BME3sw5H.js +5 -0
  249. package/dist/ui-site-links.editor-BME3sw5H.js.map +1 -0
  250. package/dist/ui-site-links.js +150 -0
  251. package/dist/ui-site-links.js.map +1 -0
  252. package/dist/ui-site-nav-button.editor-ChY4xe1U.js +5 -0
  253. package/dist/ui-site-nav-button.editor-ChY4xe1U.js.map +1 -0
  254. package/dist/ui-site-nav-button.js +57 -18
  255. package/dist/ui-site-nav-button.js.map +1 -1
  256. package/dist/{ui-site-tabs.editor-DDvQfH6S.js → ui-site-tabs.editor-CdMIw4jw.js} +2 -2
  257. package/dist/ui-site-tabs.editor-CdMIw4jw.js.map +1 -0
  258. package/dist/ui-site-tabs.js +30 -14
  259. package/dist/ui-site-tabs.js.map +1 -1
  260. package/dist/ui-slider.js +75 -124
  261. package/dist/ui-slider.js.map +1 -1
  262. package/dist/ui-statistic.js +1 -0
  263. package/dist/ui-statistic.js.map +1 -1
  264. package/dist/ui-theme-editor.js +2 -2
  265. package/dist/{ui-theme-menu-BZYUMrHe.js → ui-theme-menu-BEBu6dyq.js} +3 -3
  266. package/dist/{ui-theme-menu-BZYUMrHe.js.map → ui-theme-menu-BEBu6dyq.js.map} +1 -1
  267. package/dist/ui-toc.js +159 -122
  268. package/dist/ui-toc.js.map +1 -1
  269. package/dist/ui-tree.js +142 -87
  270. package/dist/ui-tree.js.map +1 -1
  271. package/dist/ui-uploader.editor-DrE80KjL.js +5 -0
  272. package/dist/ui-uploader.editor-DrE80KjL.js.map +1 -0
  273. package/dist/ui-uploader.js +1442 -0
  274. package/dist/ui-uploader.js.map +1 -0
  275. package/dist/vocabulary/hooks.generated.d.ts +7 -0
  276. package/package.json +1 -1
  277. package/dist/UIInput-B3K0w4ow.js.map +0 -1
  278. package/dist/UIRuntime-DCv4sy30.js.map +0 -1
  279. package/dist/components.es-DilRG1VO.js.map +0 -1
  280. package/dist/ui-input.editor-budoNoB0.js.map +0 -1
  281. package/dist/ui-page-layout.editor-xtQW0FZk.js +0 -5
  282. package/dist/ui-page-layout.editor-xtQW0FZk.js.map +0 -1
  283. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js +0 -5
  284. package/dist/ui-site-nav-button.editor-6J-zJLtZ.js.map +0 -1
  285. package/dist/ui-site-tabs.editor-DDvQfH6S.js.map +0 -1
@@ -1,16 +1,16 @@
1
1
  import "./rolldown-runtime-c6e9CmGy.js";
2
- import { APP_STYLESHEET_ID as e, ApiError as t, Bt as n, BuiltInPacks as r, CODE_LANGUAGES_EVENT as i, CssDisplay as a, Ct as o, DEFAULT_ICON_PACK as s, EN_STRINGS as c, F as l, Gt as u, IconName as d, Jt as f, Kt as p, LAYER_ORDER as m, LoadOnce as h, PAGE_SCOPE as g, Queued as ee, RUNTIME_KEY as _, RUNTIME_VERSION as te, SCROLL_LOCK_CLASS as v, SourceError as y, TopLayerTip as b, UTILITIES_SHEET as ne, Ut as x, VisibilityDirection as S, Vocabulary as re, Warnings as C, Wt as w, Yt as T, after as E, answerOf as D, fetchOk as ie, fetchText as O, isBrowser as ae, lazy as oe, loadUI as se, once as ce, proto as k, soon as le, zt as ue } from "./core.js";
3
- import { animationsCSS as de, colorsCSS as fe, layersCSS as pe, nativeCSS as me, resetCSS as he, sizesCSS as ge, tokensCSS as _e, typographyCSS as ve, utilitiesCSS as ye } from "./styles.js";
4
- import { i as be } from "./persist.types-D7N7GewC.js";
2
+ import { APP_STYLESHEET_ID as e, ApiError as t, Bt as n, BuiltInPacks as r, CODE_LANGUAGES_EVENT as i, CssDisplay as a, Ct as o, DEFAULT_ICON_PACK as s, EN_STRINGS as c, F as l, Gt as u, IconName as d, Jt as f, Kt as p, LAYER_ORDER as m, LoadOnce as h, PAGE_SCOPE as g, Queued as ee, RUNTIME_KEY as te, RUNTIME_VERSION as ne, SCROLL_LOCK_CLASS as _, SourceError as v, TopLayerTip as y, UTILITIES_SHEET as re, Ut as b, VisibilityDirection as x, Vocabulary as ie, Warnings as S, Wt as C, Yt as w, after as T, answerOf as E, cssSecondsFor as ae, fetchOk as oe, fetchText as D, flatParentFor as se, isBrowser as ce, lazy as le, loadUI as ue, once as de, proto as O, soon as fe, zt as pe } from "./core.js";
3
+ import { animationsCSS as me, colorsCSS as he, layersCSS as ge, nativeCSS as _e, resetCSS as ve, sizesCSS as ye, tokensCSS as be, typographyCSS as xe, utilitiesCSS as Se } from "./styles.js";
4
+ import { i as Ce } from "./persist.types-D7N7GewC.js";
5
5
  // ../src/util/Api.ts
6
- var xe = class Api {
6
+ var we = class Api {
7
7
  latest = /* @__PURE__ */ new Map();
8
8
  url(e, t = {}) {
9
- return e.replace(Se, (n, r) => {
9
+ return e.replace(Te, (n, r) => {
10
10
  let i = t[r];
11
11
  if (i == null) throw TypeError(`Api.url(): no value for {${r}} in ${e}; pass it in the URL data`);
12
12
  return encodeURIComponent(String(i));
13
- }).replace(Ce, (e, n) => {
13
+ }).replace(Ee, (e, n) => {
14
14
  let r = t[n];
15
15
  return r == null ? "" : `/${encodeURIComponent(String(r))}`;
16
16
  });
@@ -37,7 +37,7 @@ var xe = class Api {
37
37
  ...d && { cache: d }
38
38
  };
39
39
  n === "GET" || n === "HEAD" ? f = this.withQuery(f, r) : this.setBody(e, r);
40
- let t = await ie(f, (e) => Api.failed(n, e), e);
40
+ let t = await oe(f, (e) => Api.failed(n, e), e);
41
41
  return await this.read(t, n, l);
42
42
  } finally {
43
43
  this.latest.get(a) === p && this.latest.delete(a);
@@ -46,7 +46,7 @@ var xe = class Api {
46
46
  delay(e, t) {
47
47
  return new Promise((n, r) => {
48
48
  if (t.aborted) return r(t.reason);
49
- let i = E(e / 1e3, () => n());
49
+ let i = T(e / 1e3, () => n());
50
50
  t.addEventListener("abort", () => {
51
51
  i.cancel(), r(t.reason);
52
52
  }, { once: !0 });
@@ -82,11 +82,733 @@ var xe = class Api {
82
82
  return t === Object.prototype || t === null;
83
83
  }
84
84
  static failed(e, { url: n, response: r, error: i }) {
85
- return r ? new t(`Api.request(): ${e} ${n} answered ${D(r)}`, { cause: { response: r } }) : i instanceof Error ? i : Error(String(i));
85
+ return r ? new t(`Api.request(): ${e} ${n} answered ${E(r)}`, { cause: { response: r } }) : i instanceof Error ? i : Error(String(i));
86
86
  }
87
- }, Se = /\{([\w-]+)\}/g, Ce = /\/?\{\/([\w-]+)\}/g, we = [oe], A, j = class _Browser {
87
+ }, Te = /\{([\w-]+)\}/g, Ee = /\/?\{\/([\w-]+)\}/g, De = "sound-library", Oe = class BuiltInSounds {
88
+ static base = import.meta.url;
89
+ static get all() {
90
+ return k;
91
+ }
92
+ static ofKind(e) {
93
+ return k.filter((t) => t.kind === e);
94
+ }
95
+ static find(e) {
96
+ return je.get(nameKey(e));
97
+ }
98
+ static url(e, t = BuiltInSounds.base) {
99
+ let n = BuiltInSounds.find(e);
100
+ if (n && t) return new URL(`${De}/${BuiltInSounds.fileOf(n)}`, t).href;
101
+ }
102
+ static fileOf(e) {
103
+ return `${e.name.replaceAll(" ", "-")}.ogg`;
104
+ }
105
+ };
106
+ function nameKey(e) {
107
+ return e.normalize("NFD").replace(ke, "").toLowerCase().replace(Ae, " ").trim();
108
+ }
109
+ var ke = /[̀-ͯ]/g, Ae = /[\s_-]+/g, k = [
110
+ [
111
+ "click",
112
+ "clic",
113
+ "interface"
114
+ ],
115
+ [
116
+ "click 2",
117
+ "clic 2",
118
+ "interface"
119
+ ],
120
+ [
121
+ "click 3",
122
+ "clic 3",
123
+ "interface"
124
+ ],
125
+ [
126
+ "tap",
127
+ "toque",
128
+ "interface"
129
+ ],
130
+ [
131
+ "tap 2",
132
+ "toque 2",
133
+ "interface"
134
+ ],
135
+ [
136
+ "mouse click",
137
+ "clic de ratón",
138
+ "interface"
139
+ ],
140
+ [
141
+ "mouse release",
142
+ "soltar ratón",
143
+ "interface"
144
+ ],
145
+ [
146
+ "toggle",
147
+ "alternar",
148
+ "interface"
149
+ ],
150
+ [
151
+ "toggle 2",
152
+ "alternar 2",
153
+ "interface"
154
+ ],
155
+ [
156
+ "switch",
157
+ "interruptor",
158
+ "interface"
159
+ ],
160
+ [
161
+ "switch 2",
162
+ "interruptor 2",
163
+ "interface"
164
+ ],
165
+ [
166
+ "select",
167
+ "elegir",
168
+ "interface"
169
+ ],
170
+ [
171
+ "select 2",
172
+ "elegir 2",
173
+ "interface"
174
+ ],
175
+ [
176
+ "tick",
177
+ "tic",
178
+ "interface"
179
+ ],
180
+ [
181
+ "tick 2",
182
+ "tic 2",
183
+ "interface"
184
+ ],
185
+ [
186
+ "scroll",
187
+ "desplazar",
188
+ "interface"
189
+ ],
190
+ [
191
+ "open",
192
+ "abrir",
193
+ "interface"
194
+ ],
195
+ [
196
+ "close",
197
+ "cerrar",
198
+ "interface"
199
+ ],
200
+ [
201
+ "back",
202
+ "atrás",
203
+ "interface"
204
+ ],
205
+ [
206
+ "grow",
207
+ "agrandar",
208
+ "interface"
209
+ ],
210
+ [
211
+ "shrink",
212
+ "achicar",
213
+ "interface"
214
+ ],
215
+ [
216
+ "drop",
217
+ "soltar",
218
+ "interface"
219
+ ],
220
+ [
221
+ "confirm",
222
+ "confirmar",
223
+ "interface"
224
+ ],
225
+ [
226
+ "confirm 2",
227
+ "confirmar 2",
228
+ "interface"
229
+ ],
230
+ [
231
+ "error",
232
+ "error",
233
+ "interface"
234
+ ],
235
+ [
236
+ "error 2",
237
+ "error 2",
238
+ "interface"
239
+ ],
240
+ [
241
+ "question",
242
+ "pregunta",
243
+ "interface"
244
+ ],
245
+ [
246
+ "bong",
247
+ "bong",
248
+ "interface"
249
+ ],
250
+ [
251
+ "glass",
252
+ "cristal",
253
+ "interface"
254
+ ],
255
+ [
256
+ "pluck",
257
+ "punteo",
258
+ "interface"
259
+ ],
260
+ [
261
+ "glitch",
262
+ "interferencia",
263
+ "interface"
264
+ ],
265
+ [
266
+ "scratch",
267
+ "rasguño",
268
+ "interface"
269
+ ],
270
+ [
271
+ "hover",
272
+ "pasar por encima",
273
+ "interface"
274
+ ],
275
+ [
276
+ "hover 2",
277
+ "pasar por encima 2",
278
+ "interface"
279
+ ],
280
+ [
281
+ "card slide",
282
+ "deslizar carta",
283
+ "cards"
284
+ ],
285
+ [
286
+ "card slide 2",
287
+ "deslizar carta 2",
288
+ "cards"
289
+ ],
290
+ [
291
+ "card slide 3",
292
+ "deslizar carta 3",
293
+ "cards"
294
+ ],
295
+ [
296
+ "card slide 4",
297
+ "deslizar carta 4",
298
+ "cards"
299
+ ],
300
+ [
301
+ "card place",
302
+ "poner carta",
303
+ "cards"
304
+ ],
305
+ [
306
+ "card place 2",
307
+ "poner carta 2",
308
+ "cards"
309
+ ],
310
+ [
311
+ "card place 3",
312
+ "poner carta 3",
313
+ "cards"
314
+ ],
315
+ [
316
+ "card shove",
317
+ "empujar carta",
318
+ "cards"
319
+ ],
320
+ [
321
+ "card shove 2",
322
+ "empujar carta 2",
323
+ "cards"
324
+ ],
325
+ [
326
+ "card fan",
327
+ "abanico de cartas",
328
+ "cards"
329
+ ],
330
+ [
331
+ "card fan 2",
332
+ "abanico de cartas 2",
333
+ "cards"
334
+ ],
335
+ [
336
+ "shuffle",
337
+ "barajar",
338
+ "cards"
339
+ ],
340
+ [
341
+ "deck open",
342
+ "abrir baraja",
343
+ "cards"
344
+ ],
345
+ [
346
+ "deck take out",
347
+ "sacar baraja",
348
+ "cards"
349
+ ],
350
+ [
351
+ "dice shake",
352
+ "agitar dados",
353
+ "casino"
354
+ ],
355
+ [
356
+ "dice shake 2",
357
+ "agitar dados 2",
358
+ "casino"
359
+ ],
360
+ [
361
+ "dice throw",
362
+ "tirar dados",
363
+ "casino"
364
+ ],
365
+ [
366
+ "dice throw 2",
367
+ "tirar dados 2",
368
+ "casino"
369
+ ],
370
+ [
371
+ "die throw",
372
+ "tirar dado",
373
+ "casino"
374
+ ],
375
+ [
376
+ "die throw 2",
377
+ "tirar dado 2",
378
+ "casino"
379
+ ],
380
+ [
381
+ "dice grab",
382
+ "coger dados",
383
+ "casino"
384
+ ],
385
+ [
386
+ "chip down",
387
+ "poner ficha",
388
+ "casino"
389
+ ],
390
+ [
391
+ "chip down 2",
392
+ "poner ficha 2",
393
+ "casino"
394
+ ],
395
+ [
396
+ "chips stack",
397
+ "apilar fichas",
398
+ "casino"
399
+ ],
400
+ [
401
+ "chips stack 2",
402
+ "apilar fichas 2",
403
+ "casino"
404
+ ],
405
+ [
406
+ "chips handle",
407
+ "mover fichas",
408
+ "casino"
409
+ ],
410
+ [
411
+ "chips collide",
412
+ "chocar fichas",
413
+ "casino"
414
+ ],
415
+ [
416
+ "coins",
417
+ "monedas",
418
+ "casino"
419
+ ],
420
+ [
421
+ "coins 2",
422
+ "monedas 2",
423
+ "casino"
424
+ ],
425
+ [
426
+ "piece down",
427
+ "poner pieza",
428
+ "pieces"
429
+ ],
430
+ [
431
+ "piece down 2",
432
+ "poner pieza 2",
433
+ "pieces"
434
+ ],
435
+ [
436
+ "piece down 3",
437
+ "poner pieza 3",
438
+ "pieces"
439
+ ],
440
+ [
441
+ "piece take",
442
+ "comer pieza",
443
+ "pieces"
444
+ ],
445
+ [
446
+ "piece take 2",
447
+ "comer pieza 2",
448
+ "pieces"
449
+ ],
450
+ [
451
+ "piece tap",
452
+ "tocar pieza",
453
+ "pieces"
454
+ ],
455
+ [
456
+ "piece tap 2",
457
+ "tocar pieza 2",
458
+ "pieces"
459
+ ],
460
+ [
461
+ "wood thud",
462
+ "golpe de madera",
463
+ "impacts"
464
+ ],
465
+ [
466
+ "plank",
467
+ "tablón",
468
+ "impacts"
469
+ ],
470
+ [
471
+ "soft thud",
472
+ "golpe suave",
473
+ "impacts"
474
+ ],
475
+ [
476
+ "soft thud 2",
477
+ "golpe suave 2",
478
+ "impacts"
479
+ ],
480
+ [
481
+ "metal tap",
482
+ "toque de metal",
483
+ "impacts"
484
+ ],
485
+ [
486
+ "metal clang",
487
+ "golpe de metal",
488
+ "impacts"
489
+ ],
490
+ [
491
+ "metal crash",
492
+ "estruendo de metal",
493
+ "impacts"
494
+ ],
495
+ [
496
+ "glass tap",
497
+ "toque de cristal",
498
+ "impacts"
499
+ ],
500
+ [
501
+ "glass clink",
502
+ "tintineo de cristal",
503
+ "impacts"
504
+ ],
505
+ [
506
+ "glass break",
507
+ "cristal roto",
508
+ "impacts"
509
+ ],
510
+ [
511
+ "bell",
512
+ "campana",
513
+ "impacts"
514
+ ],
515
+ [
516
+ "plate",
517
+ "plato",
518
+ "impacts"
519
+ ],
520
+ [
521
+ "tin",
522
+ "lata",
523
+ "impacts"
524
+ ],
525
+ [
526
+ "punch",
527
+ "puñetazo",
528
+ "impacts"
529
+ ],
530
+ [
531
+ "big punch",
532
+ "puñetazo fuerte",
533
+ "impacts"
534
+ ],
535
+ [
536
+ "pickaxe",
537
+ "pico",
538
+ "impacts"
539
+ ],
540
+ [
541
+ "step",
542
+ "paso",
543
+ "footsteps"
544
+ ],
545
+ [
546
+ "step 2",
547
+ "paso 2",
548
+ "footsteps"
549
+ ],
550
+ [
551
+ "step on wood",
552
+ "paso en madera",
553
+ "footsteps"
554
+ ],
555
+ [
556
+ "step on grass",
557
+ "paso en hierba",
558
+ "footsteps"
559
+ ],
560
+ [
561
+ "step on snow",
562
+ "paso en nieve",
563
+ "footsteps"
564
+ ],
565
+ [
566
+ "step on stone",
567
+ "paso en piedra",
568
+ "footsteps"
569
+ ],
570
+ [
571
+ "step on carpet",
572
+ "paso en alfombra",
573
+ "footsteps"
574
+ ],
575
+ [
576
+ "door open",
577
+ "abrir puerta",
578
+ "things"
579
+ ],
580
+ [
581
+ "door close",
582
+ "cerrar puerta",
583
+ "things"
584
+ ],
585
+ [
586
+ "creak",
587
+ "crujido",
588
+ "things"
589
+ ],
590
+ [
591
+ "book open",
592
+ "abrir libro",
593
+ "things"
594
+ ],
595
+ [
596
+ "book close",
597
+ "cerrar libro",
598
+ "things"
599
+ ],
600
+ [
601
+ "page turn",
602
+ "pasar página",
603
+ "things"
604
+ ],
605
+ [
606
+ "page turn 2",
607
+ "pasar página 2",
608
+ "things"
609
+ ],
610
+ [
611
+ "book down",
612
+ "dejar libro",
613
+ "things"
614
+ ],
615
+ [
616
+ "cloth",
617
+ "tela",
618
+ "things"
619
+ ],
620
+ [
621
+ "latch",
622
+ "pestillo",
623
+ "things"
624
+ ],
625
+ [
626
+ "metal click",
627
+ "clic de metal",
628
+ "things"
629
+ ],
630
+ [
631
+ "knife draw",
632
+ "sacar cuchillo",
633
+ "things"
634
+ ],
635
+ [
636
+ "knife slice",
637
+ "cortar",
638
+ "things"
639
+ ],
640
+ [
641
+ "chop",
642
+ "hachazo",
643
+ "things"
644
+ ],
645
+ [
646
+ "pot",
647
+ "olla",
648
+ "things"
649
+ ],
650
+ [
651
+ "laser",
652
+ "láser",
653
+ "digital"
654
+ ],
655
+ [
656
+ "laser 2",
657
+ "láser 2",
658
+ "digital"
659
+ ],
660
+ [
661
+ "zap",
662
+ "chispazo",
663
+ "digital"
664
+ ],
665
+ [
666
+ "power up",
667
+ "subir poder",
668
+ "digital"
669
+ ],
670
+ [
671
+ "power up 2",
672
+ "subir poder 2",
673
+ "digital"
674
+ ],
675
+ [
676
+ "power up 3",
677
+ "subir poder 3",
678
+ "digital"
679
+ ],
680
+ [
681
+ "rise",
682
+ "subida",
683
+ "digital"
684
+ ],
685
+ [
686
+ "fall",
687
+ "bajada",
688
+ "digital"
689
+ ],
690
+ [
691
+ "jump",
692
+ "salto",
693
+ "digital"
694
+ ],
695
+ [
696
+ "beep",
697
+ "pitido",
698
+ "digital"
699
+ ],
700
+ [
701
+ "two tones",
702
+ "dos tonos",
703
+ "digital"
704
+ ],
705
+ [
706
+ "three tones",
707
+ "tres tonos",
708
+ "digital"
709
+ ],
710
+ [
711
+ "high up",
712
+ "agudo arriba",
713
+ "digital"
714
+ ],
715
+ [
716
+ "low down",
717
+ "grave abajo",
718
+ "digital"
719
+ ],
720
+ [
721
+ "space junk",
722
+ "chatarra espacial",
723
+ "digital"
724
+ ],
725
+ [
726
+ "win",
727
+ "ganar",
728
+ "jingles"
729
+ ],
730
+ [
731
+ "lose",
732
+ "perder",
733
+ "jingles"
734
+ ],
735
+ [
736
+ "win 2",
737
+ "ganar 2",
738
+ "jingles"
739
+ ],
740
+ [
741
+ "lose 2",
742
+ "perder 2",
743
+ "jingles"
744
+ ],
745
+ [
746
+ "win 3",
747
+ "ganar 3",
748
+ "jingles"
749
+ ],
750
+ [
751
+ "lose 3",
752
+ "perder 3",
753
+ "jingles"
754
+ ],
755
+ [
756
+ "win 4",
757
+ "ganar 4",
758
+ "jingles"
759
+ ],
760
+ [
761
+ "lose 4",
762
+ "perder 4",
763
+ "jingles"
764
+ ],
765
+ [
766
+ "level up",
767
+ "subir de nivel",
768
+ "jingles"
769
+ ],
770
+ [
771
+ "fail",
772
+ "fallo",
773
+ "jingles"
774
+ ],
775
+ [
776
+ "jingle",
777
+ "sintonía",
778
+ "jingles"
779
+ ],
780
+ [
781
+ "jingle 2",
782
+ "sintonía 2",
783
+ "jingles"
784
+ ],
785
+ [
786
+ "jingle 3",
787
+ "sintonía 3",
788
+ "jingles"
789
+ ],
790
+ [
791
+ "jingle 4",
792
+ "sintonía 4",
793
+ "jingles"
794
+ ],
795
+ [
796
+ "orchestra hit",
797
+ "golpe de orquesta",
798
+ "jingles"
799
+ ],
800
+ [
801
+ "orchestra hit 2",
802
+ "golpe de orquesta 2",
803
+ "jingles"
804
+ ]
805
+ ].map(([e, t, n]) => ({
806
+ name: e,
807
+ es: t,
808
+ kind: n
809
+ })), je = new Map(k.flatMap((e) => [[nameKey(e.name), e], [nameKey(e.es), e]])), Me = [le], A, j = class _Browser {
88
810
  constructor() {
89
- T(A, 5, this);
811
+ w(A, 5, this);
90
812
  }
91
813
  get supports() {
92
814
  return this.detect();
@@ -121,7 +843,7 @@ var xe = class Api {
121
843
  return this.matches("(prefers-reduced-motion: reduce)");
122
844
  }
123
845
  get isDark() {
124
- return this.matches(be);
846
+ return this.matches(Ce);
125
847
  }
126
848
  get navigator() {
127
849
  return globalThis.navigator;
@@ -133,7 +855,7 @@ var xe = class Api {
133
855
  return typeof matchMedia == "function" && matchMedia(e).matches;
134
856
  }
135
857
  detect() {
136
- let e = ae(), t = typeof CSS < "u" && typeof CSS.supports == "function";
858
+ let e = ce(), t = typeof CSS < "u" && typeof CSS.supports == "function";
137
859
  return {
138
860
  anchorPositioning: t && probe(() => CSS.supports("anchor-name: --x")),
139
861
  popover: e && probe(() => Object.hasOwn(HTMLElement.prototype, "popover")),
@@ -150,7 +872,7 @@ var xe = class Api {
150
872
  interpolateSize: t && probe(() => CSS.supports("interpolate-size: allow-keywords")),
151
873
  anchoredQueries: t && probe(() => CSS.supports("container-type: anchored")),
152
874
  fieldSizing: t && probe(() => CSS.supports("field-sizing: content")),
153
- screenCapture: ue()
875
+ screenCapture: pe()
154
876
  };
155
877
  function probe(e) {
156
878
  try {
@@ -171,11 +893,11 @@ var xe = class Api {
171
893
  return typeof CSSContainerRule < "u" && t instanceof CSSContainerRule && /style\(/.test(t.conditionText);
172
894
  }
173
895
  static isApplePlatform(e = globalThis.navigator) {
174
- return !!e && Ee.test(e.platform || e.userAgent);
896
+ return !!e && Pe.test(e.platform || e.userAgent);
175
897
  }
176
898
  };
177
- A = u(null), x(A, 2, "supports", we, j), w(A, j), p(j, "Browser");
178
- var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
899
+ A = u(null), b(A, 2, "supports", Me, j), C(A, j), p(j, "Browser");
900
+ var Ne = j, Pe = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
179
901
  version = 0;
180
902
  languages = /* @__PURE__ */ new Map();
181
903
  register(e, t) {
@@ -205,6 +927,7 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
205
927
  bubble;
206
928
  box;
207
929
  shown;
930
+ pointedAt;
208
931
  hovered;
209
932
  focused;
210
933
  pending;
@@ -214,16 +937,22 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
214
937
  }
215
938
  start() {
216
939
  let { popover: e, anchorPositioning: t } = this.browser.supports;
217
- e && t && (document.documentElement.setAttribute(De, ""), document.addEventListener("pointerover", this.onPointerOver, !0), document.addEventListener("pointerout", this.onPointerOut, !0), document.addEventListener("focusin", this.onFocusIn, !0), document.addEventListener("focusout", this.onFocusOut, !0), document.addEventListener("keydown", this.onKeyDown, !0), window.addEventListener("scroll", this.follow, {
940
+ e && t && (document.documentElement.setAttribute(Fe, ""), document.addEventListener("pointerover", this.onPointerOver, !0), document.addEventListener("pointermove", this.onPointerMove, {
941
+ capture: !0,
942
+ passive: !0
943
+ }), document.addEventListener("pointerout", this.onPointerOut, !0), document.addEventListener("focusin", this.onFocusIn, !0), document.addEventListener("focusout", this.onFocusOut, !0), document.addEventListener("keydown", this.onKeyDown, !0), window.addEventListener("scroll", this.follow, {
218
944
  capture: !0,
219
945
  passive: !0
220
946
  }), window.addEventListener("resize", this.follow, { passive: !0 }));
221
947
  }
222
948
  onPointerOver = (e) => {
223
- this.hovered = tooltipTargetIn(e), this.update();
949
+ this.pointedAt = e.composedPath()[0], this.hovered = tooltipTargetIn(e), this.update();
950
+ };
951
+ onPointerMove = (e) => {
952
+ e.composedPath()[0] !== this.pointedAt && this.onPointerOver(e);
224
953
  };
225
954
  onPointerOut = (e) => {
226
- e.relatedTarget || (this.hovered = void 0, this.update());
955
+ e.relatedTarget || (this.pointedAt = void 0, this.hovered = void 0, this.update());
227
956
  };
228
957
  onFocusIn = (e) => {
229
958
  let t = e.composedPath()[0]?.matches?.(":focus-visible");
@@ -241,7 +970,7 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
241
970
  else {
242
971
  if (this.cancelPending(), !e) return this.hide();
243
972
  if (this.focused || this.shown) return this.show(e);
244
- this.pending = E(delayOf(e), () => {
973
+ this.pending = T(delayOf(e), () => {
245
974
  this.pending = void 0, this.show(e);
246
975
  });
247
976
  }
@@ -252,28 +981,28 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
252
981
  show(e) {
253
982
  this.shown = e;
254
983
  let t = this.ensureBubble();
255
- this.fill(e, t), this.shown && (this.place(e), b.setShown(t, !0), this.pointArrow(e, t), this.observer ??= new MutationObserver(() => this.onTargetChanged()), this.observer.disconnect(), this.observer.observe(e, {
984
+ this.fill(e, t), this.shown && (this.place(e), y.setShown(t, !0), this.pointArrow(e, t), this.observer ??= new MutationObserver(() => this.onTargetChanged()), this.observer.disconnect(), this.observer.observe(e, {
256
985
  attributes: !0,
257
- attributeFilter: [...Oe, M]
986
+ attributeFilter: [...Ie, M]
258
987
  }));
259
988
  }
260
989
  hide() {
261
- this.shown = void 0, this.observer?.disconnect(), this.bubble && b.setShown(this.bubble, !1);
990
+ this.shown = void 0, this.observer?.disconnect(), this.bubble && y.setShown(this.bubble, !1);
262
991
  }
263
992
  ensureBubble() {
264
- let e = this.bubble ??= makeElement(Ae), t = this.box ??= makeElement(je);
993
+ let e = this.bubble ??= makeElement(Re), t = this.box ??= makeElement(ze);
265
994
  return e.setAttribute("role", "tooltip"), t.setAttribute("aria-hidden", "true"), t.isConnected || document.body.append(t), e.isConnected || document.body.append(e), e;
266
995
  }
267
996
  fill(e, t) {
268
997
  let n = e.getAttribute(M);
269
998
  if (!n) return this.hide();
270
999
  t.textContent = n;
271
- for (let n of Oe) {
1000
+ for (let n of Ie) {
272
1001
  let r = e.getAttribute(n);
273
1002
  r === null ? t.removeAttribute(n) : t.setAttribute(n, r);
274
1003
  }
275
1004
  let r = getComputedStyle(e);
276
- for (let e of ke) {
1005
+ for (let e of Le) {
277
1006
  let n = r.getPropertyValue(e);
278
1007
  n ? t.style.setProperty(e, n) : t.style.removeProperty(e);
279
1008
  }
@@ -293,8 +1022,8 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
293
1022
  Math.min(n.bottom, r.bottom),
294
1023
  n.top,
295
1024
  n.height
296
- ], l = Math.min(Math.max((a + o) / 2 - s, Pe), c - Pe);
297
- t.setAttribute(Me, i), t.style.setProperty(Ne, `${l}px`);
1025
+ ], l = Math.min(Math.max((a + o) / 2 - s, He), c - He);
1026
+ t.setAttribute(Be, i), t.style.setProperty(Ve, `${l}px`);
298
1027
  }
299
1028
  follow = () => {
300
1029
  let { shown: e, bubble: t } = this;
@@ -307,26 +1036,36 @@ var Te = j, Ee = /Mac|iPhone|iPad|iPod/i, CodeLanguages = class {
307
1036
  let { shown: e, bubble: t } = this;
308
1037
  e && t && (this.fill(e, t), this.shown && this.pointArrow(e, t));
309
1038
  }
310
- }, De = "data-ui-top-layer-tooltips", M = "data-tooltip", Oe = [
1039
+ }, Fe = "data-ui-top-layer-tooltips", M = "data-tooltip", Ie = [
311
1040
  "data-position",
312
1041
  "data-inverted",
313
1042
  "data-variation"
314
- ], ke = [
1043
+ ], Le = [
315
1044
  "--ui-tooltip-background",
316
1045
  "--ui-tooltip-color",
317
1046
  "--ui-tooltip-edge",
318
1047
  "--ui-font-size",
319
1048
  "--ui-font-family"
320
- ], Ae = "ui-tooltip-bubble", je = "ui-tooltip-target", Me = "data-side", Ne = "--ui-tooltip-arrow-at", Pe = 12;
1049
+ ], Re = "ui-tooltip-bubble", ze = "ui-tooltip-target", Be = "data-side", Ve = "--ui-tooltip-arrow-at", He = 12;
321
1050
  function boxOf(e) {
322
1051
  let t = e.getBoundingClientRect();
323
- if (t.width || t.height || getComputedStyle(e).display !== Fe) return t;
1052
+ if (t.width || t.height || getComputedStyle(e).display !== Ue) return visiblePartOf(e, t);
324
1053
  let n = [...e.shadowRoot?.children ?? [], ...e.children].map((e) => e.getBoundingClientRect()).filter((e) => e.width || e.height);
325
1054
  if (!n.length) return t;
326
1055
  let r = Math.min(...n.map((e) => e.left)), i = Math.min(...n.map((e) => e.top)), a = Math.max(...n.map((e) => e.right)), o = Math.max(...n.map((e) => e.bottom));
327
1056
  return new DOMRect(r, i, a - r, o - i);
328
1057
  }
329
- var Fe = "contents";
1058
+ function visiblePartOf(e, t) {
1059
+ let { left: n, top: r, right: i, bottom: a } = t;
1060
+ for (let t = se(e); t; t = se(t)) {
1061
+ let { overflowX: e, overflowY: o } = getComputedStyle(t);
1062
+ if (e === N && o === N) continue;
1063
+ let s = t.getBoundingClientRect();
1064
+ e !== N && (n = Math.max(n, s.left), i = Math.min(i, s.right)), o !== N && (r = Math.max(r, s.top), a = Math.min(a, s.bottom));
1065
+ }
1066
+ return i <= n || a <= r ? t : new DOMRect(n, r, i - n, a - r);
1067
+ }
1068
+ var N = "visible", Ue = "contents";
330
1069
  function makeElement(e) {
331
1070
  let t = document.createElement("div");
332
1071
  return t.className = e, t;
@@ -339,11 +1078,10 @@ function tooltipTargetIn(e) {
339
1078
  }
340
1079
  }
341
1080
  function delayOf(e) {
342
- let t = getComputedStyle(e), n = (t.getPropertyValue("--ui-tooltip-delay") || t.getPropertyValue("--ui-hover-delay")).trim(), r = parseFloat(n);
343
- return Number.isNaN(r) ? 0 : n.endsWith("ms") ? r / 1e3 : r;
1081
+ return ae(e, "--ui-tooltip-delay", "--ui-hover-delay") ?? 0;
344
1082
  }
345
1083
  // src/runtime/RovingTabindex.ts
346
- var N = class RovingTabindex {
1084
+ var We = class RovingTabindex {
347
1085
  container;
348
1086
  source;
349
1087
  orientation;
@@ -478,10 +1216,10 @@ var N = class RovingTabindex {
478
1216
  return t.addEventListener("keydown", (t) => this.trapTab(e, t), r), t.addEventListener("focusin", () => this.pullFocusInto(e), r), () => n.abort();
479
1217
  }
480
1218
  roving(e) {
481
- return N.attach(e);
1219
+ return We.attach(e);
482
1220
  }
483
1221
  arrowKey(e, t) {
484
- return N.arrowKey(e, t);
1222
+ return We.arrowKey(e, t);
485
1223
  }
486
1224
  trapTab(e, t) {
487
1225
  if (t.key !== l.tab || t.ctrlKey || t.metaKey) return;
@@ -513,9 +1251,9 @@ var N = class RovingTabindex {
513
1251
  isTabbable(e) {
514
1252
  return e.tabIndex < 0 || e instanceof HTMLDialogElement && !e.hasAttribute("tabindex") || e.matches(":disabled") || e.shadowRoot?.delegatesFocus || e instanceof HTMLInputElement && e.type === "hidden" ? !1 : (e instanceof HTMLAnchorElement || e instanceof HTMLAreaElement) && !e.href ? e.hasAttribute("tabindex") : !0;
515
1253
  }
516
- }, Ie = [ce], P, F = class _I18n {
1254
+ }, Ge = [de], P, F = class _I18n {
517
1255
  constructor({ locale: e, browser: t } = {}) {
518
- T(P, 5, this), f(this, "locale"), f(this, "packs", /* @__PURE__ */ new Map()), f(this, "scoped", /* @__PURE__ */ new Map()), f(this, "defaults", { ...c }), f(this, "scopedDefaults", /* @__PURE__ */ new Map()), f(this, "browser"), f(this, "polyfill"), f(this, "formatters", /* @__PURE__ */ new Map()), this.locale = e ?? globalThis.navigator?.language ?? I, this.browser = t;
1256
+ w(P, 5, this), f(this, "locale"), f(this, "packs", /* @__PURE__ */ new Map()), f(this, "scoped", /* @__PURE__ */ new Map()), f(this, "defaults", { ...c }), f(this, "scopedDefaults", /* @__PURE__ */ new Map()), f(this, "browser"), f(this, "polyfill"), f(this, "formatters", /* @__PURE__ */ new Map()), this.locale = e ?? globalThis.navigator?.language ?? I, this.browser = t;
519
1257
  }
520
1258
  register(e, t, n) {
521
1259
  if (n === void 0) return void this.packs.set(e, {
@@ -559,14 +1297,14 @@ var N = class RovingTabindex {
559
1297
  weekday: e,
560
1298
  timeZone: "UTC"
561
1299
  }, t);
562
- return Array.from({ length: 7 }, (e, t) => n.format(Date.UTC(Re, 0, 1 + t)));
1300
+ return Array.from({ length: 7 }, (e, t) => n.format(Date.UTC(qe, 0, 1 + t)));
563
1301
  }
564
1302
  months(e = "long", t = this.locale) {
565
1303
  let n = this.dateFormat({
566
1304
  month: e,
567
1305
  timeZone: "UTC"
568
1306
  }, t);
569
- return Array.from({ length: 12 }, (e, t) => n.format(Date.UTC(Re, t, 1)));
1307
+ return Array.from({ length: 12 }, (e, t) => n.format(Date.UTC(qe, t, 1)));
570
1308
  }
571
1309
  firstDayOfWeek(e = this.locale) {
572
1310
  try {
@@ -616,8 +1354,8 @@ var N = class RovingTabindex {
616
1354
  return i || this.formatters.set(r, i = new e(t, n)), i;
617
1355
  }
618
1356
  };
619
- P = u(null), x(P, 1, "loadTemporal", Ie, F), w(P, F), p(F, "I18n");
620
- var Le = F, I = "en", Re = 2023, ze = class IconPack {
1357
+ P = u(null), b(P, 1, "loadTemporal", Ge, F), C(P, F), p(F, "I18n");
1358
+ var Ke = F, I = "en", qe = 2023, Je = class IconPack {
621
1359
  index;
622
1360
  url;
623
1361
  base;
@@ -655,8 +1393,8 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
655
1393
  pack: this.id,
656
1394
  key: e,
657
1395
  url: new URL(`${e}.svg`, this.base).href,
658
- width: t.width ?? n.width ?? Be,
659
- height: t.height ?? n.height ?? Be
1396
+ width: t.width ?? n.width ?? L,
1397
+ height: t.height ?? n.height ?? L
660
1398
  };
661
1399
  }
662
1400
  static async load(e, t) {
@@ -674,7 +1412,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
674
1412
  static pageUrl() {
675
1413
  return globalThis.document?.baseURI;
676
1414
  }
677
- }, Be = 512, Ve = class IconPacks {
1415
+ }, L = 512, Ye = class IconPacks {
678
1416
  sources = [];
679
1417
  started = !1;
680
1418
  templates;
@@ -752,16 +1490,16 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
752
1490
  }
753
1491
  add(e, t) {
754
1492
  let n = e, r = IconPacks.urlFor(n.source, t);
755
- return n.promise = r === void 0 ? Promise.resolve(void 0) : ze.load(r, n.options).then((e) => n.pack = e, (e) => {
756
- C.warn(He, `icon pack ${r} didn't load:`, e);
1493
+ return n.promise = r === void 0 ? Promise.resolve(void 0) : Je.load(r, n.options).then((e) => n.pack = e, (e) => {
1494
+ S.warn(Xe, `icon pack ${r} didn't load:`, e);
757
1495
  }), n.options.only && (this.sources = []), this.sources.push(n), n;
758
1496
  }
759
1497
  static urlFor(e, t) {
760
1498
  try {
761
- let n = ze.pageUrl();
1499
+ let n = Je.pageUrl();
762
1500
  return r.has(e) ? r.url(e, t === void 0 ? void 0 : new URL(t, n).href) : new URL(e, n).href;
763
1501
  } catch (t) {
764
- C.warn(He, `icon pack ${e} has no usable URL:`, t);
1502
+ S.warn(Xe, `icon pack ${e} has no usable URL:`, t);
765
1503
  return;
766
1504
  }
767
1505
  }
@@ -769,7 +1507,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
769
1507
  return this.templateLoads.get(e, () => this.fetchTemplate(e)).catch(() => void 0);
770
1508
  }
771
1509
  async fetchTemplate(e) {
772
- let { text: t } = await O(e, ({ response: t, error: n }) => t ? /* @__PURE__ */ Error(`UI.icons: ${e} answered ${D(t)}`) : n instanceof Error ? n : Error(String(n))), n = IconPacks.parse(t);
1510
+ let { text: t } = await D(e, ({ response: t, error: n }) => t ? /* @__PURE__ */ Error(`UI.icons: ${e} answered ${E(t)}`) : n instanceof Error ? n : Error(String(n))), n = IconPacks.parse(t);
773
1511
  return n && this.templates.set(e, n), n;
774
1512
  }
775
1513
  static parse(e) {
@@ -780,19 +1518,19 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
780
1518
  let t = document.importNode(e, !0), n = t.getAttribute("fill");
781
1519
  return n === null ? t.setAttribute("fill", "currentColor") : t.style.setProperty("fill", n), t;
782
1520
  }
783
- }, He = "UI.icons", Ids = class {
1521
+ }, Xe = "UI.icons", Ids = class {
784
1522
  counter = 0;
785
- next(e = Ue, t = globalThis.document) {
1523
+ next(e = Ze, t = globalThis.document) {
786
1524
  let n;
787
1525
  do
788
1526
  n = `${e}-${++this.counter}`;
789
1527
  while (t?.getElementById(n));
790
1528
  return n;
791
1529
  }
792
- ensure(e, t = Ue) {
1530
+ ensure(e, t = Ze) {
793
1531
  return e.id ||= this.next(t), e.id;
794
1532
  }
795
- }, Ue = "ui", We = class Chord {
1533
+ }, Ze = "ui", Qe = class Chord {
796
1534
  key;
797
1535
  keyText;
798
1536
  modifiers;
@@ -824,12 +1562,12 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
824
1562
  if (/^[a-z]$/.test(this.key)) return `Key${this.key.toUpperCase()}`;
825
1563
  if (/^[0-9]$/.test(this.key)) return `Digit${this.key}`;
826
1564
  }
827
- static parse(e, { isApple: t = Te.isApplePlatform() } = {}) {
1565
+ static parse(e, { isApple: t = Ne.isApplePlatform() } = {}) {
828
1566
  let n = Chord.partsOf(e.trim()), r = n.pop()?.trim();
829
1567
  if (!r) throw SyntaxError(`Chord.parse(): no key in ${JSON.stringify(e)}; end it with one, e.g. "Mod+K"`);
830
1568
  let i = [];
831
1569
  for (let r of n) {
832
- let n = Ge[r.trim().toLowerCase()];
1570
+ let n = $e[r.trim().toLowerCase()];
833
1571
  if (!n) throw SyntaxError(`Chord.parse(): unknown modifier ${JSON.stringify(r)} in ${JSON.stringify(e)}; use Mod, Ctrl, Meta, Alt or Shift`);
834
1572
  let a = n === "mod" ? t ? "meta" : "ctrl" : n;
835
1573
  i.includes(a) || i.push(a);
@@ -845,9 +1583,9 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
845
1583
  static normalizeKey(e) {
846
1584
  if (e === " ") return e;
847
1585
  let t = e.toLowerCase();
848
- return Ke[t] ?? t;
1586
+ return et[t] ?? t;
849
1587
  }
850
- }, Ge = {
1588
+ }, $e = {
851
1589
  mod: "mod",
852
1590
  modifier: "mod",
853
1591
  ctrl: "ctrl",
@@ -858,7 +1596,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
858
1596
  alt: "alt",
859
1597
  option: "alt",
860
1598
  shift: "shift"
861
- }, Ke = {
1599
+ }, et = {
862
1600
  esc: "escape",
863
1601
  space: " ",
864
1602
  spacebar: " ",
@@ -869,7 +1607,7 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
869
1607
  del: "delete",
870
1608
  return: "enter",
871
1609
  plus: "+"
872
- }, qe = [k], L, R = class _Keyboard {
1610
+ }, tt = [O], R, z = class _Keyboard {
873
1611
  constructor({ isApple: e = !1 } = {}) {
874
1612
  f(this, "isApple"), f(this, "registrations", []), f(this, "scopes", [g]), f(this, "listener"), f(this, "onKeyDown", /* @__PURE__ */ p((e) => {
875
1613
  if (e.defaultPrevented || e.isComposing) return;
@@ -882,13 +1620,13 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
882
1620
  }
883
1621
  }
884
1622
  function isEditable(e) {
885
- return e instanceof HTMLElement ? e.isContentEditable || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e instanceof HTMLInputElement && !Ye.has(e.type) : !1;
1623
+ return e instanceof HTMLElement ? e.isContentEditable || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e instanceof HTMLInputElement && !rt.has(e.type) : !1;
886
1624
  }
887
1625
  p(isEditable, "isEditable");
888
1626
  }, "onKeyDown")), this.isApple = e;
889
1627
  }
890
1628
  chord(e, { isApple: t = this.isApple } = {}) {
891
- return We.parse(e, { isApple: t });
1629
+ return Qe.parse(e, { isApple: t });
892
1630
  }
893
1631
  register({ scope: e = g, chord: t, handler: n, ...r }) {
894
1632
  let i = {
@@ -925,14 +1663,14 @@ var Le = F, I = "en", Re = 2023, ze = class IconPack {
925
1663
  checkConflict(e) {
926
1664
  if (e.options.layered) return;
927
1665
  let t = e.chord.toString(), n = this.registrations.find((n) => n.scope === e.scope && n.chord.toString() === t && n.options.target === e.options.target);
928
- n && C.warn("UI.keyboard", `"${t}" registered twice in scope "${e.scope}"; the newer handler wins:`, {
1666
+ n && S.warn("UI.keyboard", `"${t}" registered twice in scope "${e.scope}"; the newer handler wins:`, {
929
1667
  existing: n.handler,
930
1668
  added: e.handler
931
1669
  });
932
1670
  }
933
1671
  };
934
- L = u(null), x(L, 13, "warnConflicts", qe, R), w(L, R), p(R, "Keyboard"), f(R, "warnConflicts", T(L, 8, R, !1)), T(L, 11, R);
935
- var Je = R, Ye = /* @__PURE__ */ new Set([
1672
+ R = u(null), b(R, 13, "warnConflicts", tt, z), C(R, z), p(z, "Keyboard"), f(z, "warnConflicts", w(R, 8, z, !1)), w(R, 11, z);
1673
+ var nt = z, rt = /* @__PURE__ */ new Set([
936
1674
  "button",
937
1675
  "checkbox",
938
1676
  "radio",
@@ -942,7 +1680,7 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
942
1680
  "color",
943
1681
  "file",
944
1682
  "image"
945
- ]), Xe = class Modals {
1683
+ ]), it = class Modals {
946
1684
  static provider;
947
1685
  register(e) {
948
1686
  let t = Modals.provider;
@@ -966,6 +1704,9 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
966
1704
  prompt(e) {
967
1705
  return this.registeredProvider.prompt(this.optionsFor(e));
968
1706
  }
1707
+ choose(e) {
1708
+ return this.registeredProvider.choose(e);
1709
+ }
969
1710
  get registeredProvider() {
970
1711
  if (!Modals.provider) throw Error("UI.modals: ui-modal not registered; import its family (`spell/ui/ui-modal`) first");
971
1712
  return Modals.provider;
@@ -973,7 +1714,7 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
973
1714
  optionsFor(e) {
974
1715
  return typeof e == "string" ? { message: e } : e;
975
1716
  }
976
- }, Ze = [k], z, B = class _Overlays {
1717
+ }, at = [O], B, V = class _Overlays {
977
1718
  constructor({ keyboard: e, focus: t, browser: n, styles: r }) {
978
1719
  f(this, "keyboard"), f(this, "focus"), f(this, "browser"), f(this, "styles"), f(this, "stack", []), f(this, "scrollLocks", 0), f(this, "press"), f(this, "listeners"), f(this, "counter", 0), f(this, "onPointerDown", /* @__PURE__ */ p((e) => {
979
1720
  this.press = {
@@ -995,12 +1736,12 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
995
1736
  }
996
1737
  open(e) {
997
1738
  if (this.recordOf(e)) return;
998
- let t = e.kind === V, n = {
1739
+ let t = e.kind === st, n = {
999
1740
  entry: e,
1000
- pool: e.pool ?? (t ? V : $e),
1741
+ pool: e.pool ?? (t ? st : ct),
1001
1742
  closeOnEscape: e.closeOnEscape ?? !t,
1002
1743
  closeOnOutsideClick: e.closeOnOutsideClick ?? !t,
1003
- modal: e.modal ?? et.has(e.kind),
1744
+ modal: e.modal ?? lt.has(e.kind),
1004
1745
  scope: `overlay-${++this.counter}`,
1005
1746
  restoreTo: e.restoreFocus === !1 ? void 0 : this.focus.activeElementDeep()
1006
1747
  };
@@ -1082,12 +1823,12 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
1082
1823
  lockScroll() {
1083
1824
  if (this.scrollLocks++ > 0) return;
1084
1825
  let e = document.documentElement;
1085
- this.styles?.register("scroll-lock", tt, { page: !0 }), e.style.setProperty(H, `${Math.max(0, window.innerWidth - e.clientWidth)}px`), e.classList.add(v);
1826
+ this.styles?.register("scroll-lock", ut, { page: !0 }), e.style.setProperty(H, `${Math.max(0, window.innerWidth - e.clientWidth)}px`), e.classList.add(_);
1086
1827
  }
1087
1828
  unlockScroll() {
1088
1829
  if (this.scrollLocks === 0 || --this.scrollLocks > 0) return;
1089
1830
  let e = document.documentElement;
1090
- e.classList.remove(v), e.style.removeProperty(H);
1831
+ e.classList.remove(_), e.style.removeProperty(H);
1091
1832
  }
1092
1833
  restoreFocus(e) {
1093
1834
  let t = e.restoreTo;
@@ -1102,19 +1843,19 @@ var Je = R, Ye = /* @__PURE__ */ new Set([
1102
1843
  return !!t.id && e.some((e) => e.getAttribute?.("commandfor") === t.id);
1103
1844
  }
1104
1845
  };
1105
- z = u(null), x(z, 13, "useCloseWatcher", Ze, B), w(z, B), p(B, "Overlays"), f(B, "useCloseWatcher", T(z, 8, B, !0)), T(z, 11, B);
1106
- var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1846
+ B = u(null), b(B, 13, "useCloseWatcher", at, V), C(B, V), p(V, "Overlays"), f(V, "useCloseWatcher", w(B, 8, V, !0)), w(B, 11, V);
1847
+ var ot = V, st = "toast", ct = "default", lt = /* @__PURE__ */ new Set([
1107
1848
  "modal",
1108
1849
  "flyout",
1109
1850
  "dimmer"
1110
- ]), H = "--ui-scrollbar-width", tt = `${m}
1851
+ ]), H = "--ui-scrollbar-width", ut = `${m}
1111
1852
  @layer ui.base {
1112
- html.${v} {
1853
+ html.${_} {
1113
1854
  overflow: hidden;
1114
1855
  padding-inline-end: var(${H}, 0px);
1115
1856
  }
1116
1857
  }`, PropertyControls = class {
1117
- kinds = new Map(Object.entries(rt));
1858
+ kinds = new Map(Object.entries(ft));
1118
1859
  choiceSources = /* @__PURE__ */ new Map();
1119
1860
  rules = /* @__PURE__ */ new Map();
1120
1861
  schemas = /* @__PURE__ */ new Map();
@@ -1127,7 +1868,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1127
1868
  kindFor(e) {
1128
1869
  let t;
1129
1870
  for (let [n, r] of this.kinds) r.types?.includes(e) && (t = n);
1130
- return t ?? nt;
1871
+ return t ?? dt;
1131
1872
  }
1132
1873
  addChoices(e, t) {
1133
1874
  this.choiceSources.set(e, t);
@@ -1152,7 +1893,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1152
1893
  schema(e) {
1153
1894
  return this.schemas.get(e);
1154
1895
  }
1155
- }, nt = "input", U = { fluid: "" }, rt = {
1896
+ }, dt = "input", U = { fluid: "" }, ft = {
1156
1897
  input: {
1157
1898
  tag: "ui-input",
1158
1899
  attributes: U,
@@ -1237,14 +1978,14 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1237
1978
  tag: "ui-property-editor",
1238
1979
  types: ["thing"]
1239
1980
  }
1240
- }, it = class Sources {
1981
+ }, pt = class Sources {
1241
1982
  saver;
1242
1983
  inlineSaver;
1243
1984
  cache = new h({ failures: "forgotten" });
1244
1985
  resolve(e, t = document.baseURI) {
1245
- if (location.protocol === "file:") throw new y(`Sources.resolve(): can't reach ${e} from a page opened from disk; serve the page`, { cause: { kind: "file-protocol" } });
1986
+ if (location.protocol === "file:") throw new v(`Sources.resolve(): can't reach ${e} from a page opened from disk; serve the page`, { cause: { kind: "file-protocol" } });
1246
1987
  let n = new URL(e, t);
1247
- if (n.origin !== location.origin) throw new y(`Sources.resolve(): ${n.href} is on another origin; serve it from ${location.origin}`, { cause: { kind: "cross-origin" } });
1988
+ if (n.origin !== location.origin) throw new v(`Sources.resolve(): ${n.href} is on another origin; serve it from ${location.origin}`, { cause: { kind: "cross-origin" } });
1248
1989
  return n;
1249
1990
  }
1250
1991
  load(e, { fresh: t, signal: n } = {}) {
@@ -1261,7 +2002,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1261
2002
  this.cache.forget(e === void 0 ? void 0 : new URL(e, document.baseURI).href);
1262
2003
  }
1263
2004
  async fetch(e) {
1264
- let { text: t, response: n } = await O(e, Sources.failed, { cache: "no-cache" });
2005
+ let { text: t, response: n } = await D(e, Sources.failed, { cache: "no-cache" });
1265
2006
  return {
1266
2007
  url: e,
1267
2008
  text: t,
@@ -1271,7 +2012,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1271
2012
  }
1272
2013
  async save(e) {
1273
2014
  let t = this.resolve(e.url).href;
1274
- if (!this.saver) throw new y(`Sources.save(): this page has no saver for ${t}; set \`UI.sources.saver\``, { cause: { kind: "no-saver" } });
2015
+ if (!this.saver) throw new v(`Sources.save(): this page has no saver for ${t}; set \`UI.sources.saver\``, { cause: { kind: "no-saver" } });
1275
2016
  let n;
1276
2017
  try {
1277
2018
  n = await this.saver({
@@ -1288,7 +2029,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1288
2029
  }), n;
1289
2030
  }
1290
2031
  async saveInline(e) {
1291
- if (!this.inlineSaver) throw new y("Sources.saveInline(): this page has no inline saver; set `UI.sources.inlineSaver`", { cause: { kind: "no-saver" } });
2032
+ if (!this.inlineSaver) throw new v("Sources.saveInline(): this page has no inline saver; set `UI.sources.inlineSaver`", { cause: { kind: "no-saver" } });
1292
2033
  try {
1293
2034
  return await this.inlineSaver(e);
1294
2035
  } catch (t) {
@@ -1296,26 +2037,26 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1296
2037
  }
1297
2038
  }
1298
2039
  static saverFailed(e, t) {
1299
- if (e instanceof y) return e;
2040
+ if (e instanceof v) return e;
1300
2041
  let { kind: n, message: r, status: i } = e ?? {};
1301
- return new y(`${t}: ${typeof r == "string" ? r : String(e)}`, { cause: {
1302
- kind: y.isKind(n) ? n : "save",
2042
+ return new v(`${t}: ${typeof r == "string" ? r : String(e)}`, { cause: {
2043
+ kind: v.isKind(n) ? n : "save",
1303
2044
  status: typeof i == "number" ? i : void 0,
1304
2045
  error: e
1305
2046
  } });
1306
2047
  }
1307
2048
  static failed({ url: e, response: t, error: n }) {
1308
- if (t) return new y(`Sources.load(): ${e} answered ${D(t)}; check the path`, { cause: {
2049
+ if (t) return new v(`Sources.load(): ${e} answered ${E(t)}; check the path`, { cause: {
1309
2050
  kind: "load",
1310
2051
  status: t.status
1311
2052
  } });
1312
2053
  let r = n instanceof Error ? n.message : String(n);
1313
- return new y(`Sources.load(): ${e} didn't answer (${r}); is its server up?`, { cause: {
2054
+ return new v(`Sources.load(): ${e} didn't answer (${r}); is its server up?`, { cause: {
1314
2055
  kind: "load",
1315
2056
  error: n
1316
2057
  } });
1317
2058
  }
1318
- }, at = class AppStylesheet {
2059
+ }, mt = class AppStylesheet {
1319
2060
  sheet;
1320
2061
  onSheetChange;
1321
2062
  syncDelay;
@@ -1354,7 +2095,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1354
2095
  }
1355
2096
  syncSoon() {
1356
2097
  this.timer?.cancel(), this.latest = new Promise((e) => {
1357
- this.timer = E(this.syncDelay / 1e3, () => e(this.sync()));
2098
+ this.timer = T(this.syncDelay / 1e3, () => e(this.sync()));
1358
2099
  });
1359
2100
  }
1360
2101
  watch(e) {
@@ -1373,12 +2114,12 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1373
2114
  }
1374
2115
  async sync() {
1375
2116
  let t = ++this.generation, n = document.getElementById(e), r = n instanceof HTMLLinkElement || n instanceof HTMLStyleElement ? n : void 0;
1376
- n && !r && C.warn(W, "must be a <link rel=\"stylesheet\"> or <style>:", n), this.watch(r);
2117
+ n && !r && S.warn(W, "must be a <link rel=\"stylesheet\"> or <style>:", n), this.watch(r);
1377
2118
  let i = "", a = document.baseURI;
1378
2119
  try {
1379
2120
  r instanceof HTMLLinkElement ? r.href && (a = r.href, i = await this.readLink(r)) : r && (i = await this.inlineImports(r.textContent ?? "", a));
1380
2121
  } catch (e) {
1381
- C.warn(W, "couldn't read the stylesheet:", e);
2122
+ S.warn(W, "couldn't read the stylesheet:", e);
1382
2123
  return;
1383
2124
  }
1384
2125
  t === this.generation && this.apply(i, a);
@@ -1421,7 +2162,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1421
2162
  try {
1422
2163
  r = this.absolutizeUrls(this.serialize(e.cssRules), e.href ?? document.baseURI);
1423
2164
  } catch {
1424
- C.warn(W, `can't read cross-origin @import ${n.href}; use a <style> instead`);
2165
+ S.warn(W, `can't read cross-origin @import ${n.href}; use a <style> instead`);
1425
2166
  continue;
1426
2167
  }
1427
2168
  let i = {
@@ -1443,8 +2184,8 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1443
2184
  return e.replace(G, () => r[i++] ?? "");
1444
2185
  }
1445
2186
  async fetchSheetText(e, t) {
1446
- let { text: n } = await O(e, AppStylesheet.failed), r = this.absolutizeUrls(n, t);
1447
- return G.test(r) && C.warn(W, `nested @import in ${e} is ignored (only one level is inlined)`), G.lastIndex = 0, r;
2187
+ let { text: n } = await D(e, AppStylesheet.failed), r = this.absolutizeUrls(n, t);
2188
+ return G.test(r) && S.warn(W, `nested @import in ${e} is ignored (only one level is inlined)`), G.lastIndex = 0, r;
1448
2189
  }
1449
2190
  importConditionsFor(e) {
1450
2191
  let t = e.trim(), n, r, i = /^layer(?:\(\s*([^)]*?)\s*\))?/.exec(t);
@@ -1461,7 +2202,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1461
2202
  return t !== void 0 && (i = `@layer ${t} {\n${i}\n}`), n && (i = `@supports (${n.replace(/^\((.*)\)$/, "$1")}) {\n${i}\n}`), r && r !== "all" && (i = `@media ${r} {\n${i}\n}`), t === void 0 ? i : `${m}\n${i}`;
1462
2203
  }
1463
2204
  absolutizeUrls(e, t) {
1464
- return e.replace(ot, (e, n, r) => {
2205
+ return e.replace(ht, (e, n, r) => {
1465
2206
  try {
1466
2207
  return `url(${n}${new URL(r, t).href}${n})`;
1467
2208
  } catch {
@@ -1470,9 +2211,9 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1470
2211
  });
1471
2212
  }
1472
2213
  static failed({ url: e, response: t, error: n }) {
1473
- return t ? /* @__PURE__ */ Error(`AppStylesheet.fetchSheetText(): ${e} answered ${D(t)}; check the stylesheet's URL`) : n instanceof Error ? n : Error(String(n));
2214
+ return t ? /* @__PURE__ */ Error(`AppStylesheet.fetchSheetText(): ${e} answered ${E(t)}; check the stylesheet's URL`) : n instanceof Error ? n : Error(String(n));
1474
2215
  }
1475
- }, W = `#${e}`, G = /@import\s+(?:url\(\s*(['"]?)([^'")]+)\1\s*\)|(['"])([^'"]+)\3)\s*([^;]*);/g, ot = /url\(\s*(['"]?)(?![a-z][\w+.-]*:|#)([^'")]+)\1\s*\)/gi, Styles = class {
2216
+ }, W = `#${e}`, G = /@import\s+(?:url\(\s*(['"]?)([^'")]+)\1\s*\)|(['"])([^'"]+)\3)\s*([^;]*);/g, ht = /url\(\s*(['"]?)(?![a-z][\w+.-]*:|#)([^'")]+)\1\s*\)/gi, Styles = class {
1476
2217
  sheets = /* @__PURE__ */ new Map();
1477
2218
  texts = /* @__PURE__ */ new Map();
1478
2219
  owned = /* @__PURE__ */ new WeakSet();
@@ -1480,7 +2221,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1480
2221
  shadowNames = /* @__PURE__ */ new Set();
1481
2222
  linkedNames = /* @__PURE__ */ new Set();
1482
2223
  foundation = [];
1483
- utilities = [ne];
2224
+ utilities = [re];
1484
2225
  roots = /* @__PURE__ */ new Set();
1485
2226
  rootNames = /* @__PURE__ */ new WeakMap();
1486
2227
  pageSheetRoots = /* @__PURE__ */ new WeakSet();
@@ -1533,7 +2274,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1533
2274
  this.app?.stop(), this.app = void 0, this.roots.clear();
1534
2275
  }
1535
2276
  startApp() {
1536
- if (typeof document < "u") return this.app || (this.app = new at({ onSheetChange: (e) => {
2277
+ if (typeof document < "u") return this.app || (this.app = new mt({ onSheetChange: (e) => {
1537
2278
  this.owned.add(e), this.refreshRoots();
1538
2279
  } }), this.owned.add(this.app.sheet)), this.app.start(), this.app.ready;
1539
2280
  }
@@ -1550,9 +2291,10 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1550
2291
  e.adoptedStyleSheets = [...new Set(r)];
1551
2292
  }
1552
2293
  refreshRoots() {
1553
- for (let e of this.roots) {
1554
- let t = e.deref();
1555
- t ? this.push(t) : this.roots.delete(e);
2294
+ let e = typeof document > "u" ? void 0 : document;
2295
+ for (let t of this.roots) {
2296
+ let n = t.deref();
2297
+ n ? e && n.ownerDocument !== e || this.push(n) : this.roots.delete(t);
1556
2298
  }
1557
2299
  }
1558
2300
  refreshPage() {
@@ -1561,7 +2303,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1561
2303
  document.adoptedStyleSheets = [...e, ...n], !t && !this.isWatchingLoad && document.readyState !== "complete" && (this.isWatchingLoad = !0, window.addEventListener("load", () => this.refreshPage(), { once: !0 }));
1562
2304
  }
1563
2305
  get isPageLinked() {
1564
- return getComputedStyle(document.documentElement).getPropertyValue(st).trim() === ct;
2306
+ return getComputedStyle(document.documentElement).getPropertyValue(gt).trim() === _t;
1565
2307
  }
1566
2308
  lookup(e) {
1567
2309
  let t = [];
@@ -1571,7 +2313,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1571
2313
  }
1572
2314
  return t;
1573
2315
  }
1574
- }, st = "--ui-page-sheet", ct = "linked", Themes = class {
2316
+ }, gt = "--ui-page-sheet", _t = "linked", Themes = class {
1575
2317
  static RENAMED = {
1576
2318
  studio: "merlot",
1577
2319
  "spell-brand": "spell"
@@ -1610,7 +2352,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1610
2352
  return t();
1611
2353
  }
1612
2354
  async apply(e, { tint: t = "" } = {}) {
1613
- if (e === "" && (e = void 0), e !== void 0 && (!this.has(e) || e === dt)) throw TypeError(`Themes.apply(): \`${e}\` isn't a theme; pick \`${K}\` or one of: ${this.own.join(", ")}`);
2355
+ if (e === "" && (e = void 0), e !== void 0 && (!this.has(e) || e === bt)) throw TypeError(`Themes.apply(): \`${e}\` isn't a theme; pick \`${K}\` or one of: ${this.own.join(", ")}`);
1614
2356
  let n = ++this.calls;
1615
2357
  this.current = e;
1616
2358
  let r = e === void 0 ? "" : await this.load(K), i = e === void 0 || e === K ? "" : await this.load(e);
@@ -1632,7 +2374,7 @@ var Qe = B, V = "toast", $e = "default", et = /* @__PURE__ */ new Set([
1632
2374
  function rootRulesOn(e, t) {
1633
2375
  let n = [];
1634
2376
  for (let r of e) if (r instanceof CSSStyleRule) {
1635
- let e = r.selectorText.split(",").map((e) => e.trim()).filter((e) => ut.test(e)), i = r.style.cssText.replace(lt, "");
2377
+ let e = r.selectorText.split(",").map((e) => e.trim()).filter((e) => yt.test(e)), i = r.style.cssText.replace(vt, "");
1636
2378
  e.length && i.trim() && n.push(`${e.map((e) => `${e} ${t}`).join(", ")} { ${i} }`);
1637
2379
  } else if (r instanceof CSSMediaRule || r instanceof CSSSupportsRule) {
1638
2380
  let e = rootRulesOn(r.cssRules, t);
@@ -1640,7 +2382,7 @@ function rootRulesOn(e, t) {
1640
2382
  } else r instanceof CSSLayerBlockRule && n.push(rootRulesOn(r.cssRules, t));
1641
2383
  return n.filter(Boolean).join("\n");
1642
2384
  }
1643
- var lt = /* @__PURE__ */ RegExp("(?<=^|;\\s*)(?:color-scheme|--ui-scheme|--ui-control-cursor)\\s*:[^;]*;\\s*", "g"), ut = /^:root(?:[.:[][^\s>+~]*)?$/, K = "classic", dt = "dark", q = Object.fromEntries(Object.entries(/* #__PURE__ */ Object.assign({
2385
+ var vt = /* @__PURE__ */ RegExp("(?<=^|;\\s*)(?:color-scheme|--ui-scheme|--ui-control-cursor)\\s*:[^;]*;\\s*", "g"), yt = /^:root(?:[.:[][^\s>+~]*)?$/, K = "classic", bt = "dark", q = Object.fromEntries(Object.entries(/* #__PURE__ */ Object.assign({
1644
2386
  "../styles/themes/classic.css": () => import("./classic-BHyJFvQa.js").then((e) => e.default),
1645
2387
  "../styles/themes/crisp.css": () => import("./crisp-DIpY320U.js").then((e) => e.default),
1646
2388
  "../styles/themes/dark.css": () => import("./dark-B5s4QbmU.js").then((e) => e.default),
@@ -1653,7 +2395,7 @@ var lt = /* @__PURE__ */ RegExp("(?<=^|;\\s*)(?:color-scheme|--ui-scheme|--ui-co
1653
2395
  "../styles/themes/paper.css": () => import("./paper-DPxolmdy.js").then((e) => e.default),
1654
2396
  "../styles/themes/pop.css": () => import("./pop-Dw_6k177.js").then((e) => e.default),
1655
2397
  "../styles/themes/spell.css": () => import("./spell-CB-MivSX.js").then((e) => e.default)
1656
- })).map(([e, t]) => [e.replace(/^.*\//, "").replace(/\.css$/, ""), t])), ft = class Toasts {
2398
+ })).map(([e, t]) => [e.replace(/^.*\//, "").replace(/\.css$/, ""), t])), xt = class Toasts {
1657
2399
  static provider;
1658
2400
  register(e) {
1659
2401
  let t = Toasts.provider;
@@ -1678,8 +2420,8 @@ var lt = /* @__PURE__ */ RegExp("(?<=^|;\\s*)(?:color-scheme|--ui-scheme|--ui-co
1678
2420
  if (!Toasts.provider) throw Error("UI.toasts: ui-toast not registered; import its family (`spell/ui/ui-toast`) first");
1679
2421
  return Toasts.provider;
1680
2422
  }
1681
- }, pt, mt = [k], J;
1682
- pt = [k];
2423
+ }, St, Ct = [O], J;
2424
+ St = [O];
1683
2425
  var Y = class _Transitions {
1684
2426
  constructor({ browser: e }) {
1685
2427
  f(this, "browser"), f(this, "running", /* @__PURE__ */ new WeakMap()), this.browser = e;
@@ -1693,14 +2435,14 @@ var Y = class _Transitions {
1693
2435
  return a === 0 ? (this.cleanup(e, n, r), Promise.resolve(!0)) : new Promise((t) => {
1694
2436
  let i = new AbortController(), o = /* @__PURE__ */ p((t) => {
1695
2437
  t.target === e && c(!0);
1696
- }, "onEnd"), s = E((a + this.failSafeDelay) / 1e3, () => c(!0)), c = /* @__PURE__ */ p((a) => {
2438
+ }, "onEnd"), s = T((a + this.failSafeDelay) / 1e3, () => c(!0)), c = /* @__PURE__ */ p((a) => {
1697
2439
  this.running.get(e) === l && (this.running.delete(e), s.cancel(), i.abort(), a && this.cleanup(e, n, r), t(a));
1698
2440
  }, "finish"), l = {
1699
2441
  direction: n,
1700
2442
  finish: c
1701
2443
  };
1702
2444
  this.running.set(e, l);
1703
- for (let t of _t) e.addEventListener(t, o, { signal: i.signal });
2445
+ for (let t of Dt) e.addEventListener(t, o, { signal: i.signal });
1704
2446
  });
1705
2447
  }
1706
2448
  isAnimating(e, t) {
@@ -1717,10 +2459,10 @@ var Y = class _Transitions {
1717
2459
  e.hidden = !0, e.isConnected && getComputedStyle(e).display !== a.none && (e.style.setProperty("display", a.none), e.setAttribute(this.forcedDisplayAttribute, ""));
1718
2460
  }
1719
2461
  setOptions(e, { duration: t, easing: n }) {
1720
- t !== void 0 && e.style.setProperty(Z, typeof t == "number" ? `${t}ms` : t), n !== void 0 && e.style.setProperty(gt, n);
2462
+ t !== void 0 && e.style.setProperty(Tt, typeof t == "number" ? `${t}ms` : t), n !== void 0 && e.style.setProperty(Et, n);
1721
2463
  }
1722
2464
  cleanup(e, t, n) {
1723
- t === "out" && this.hide(e), e.removeAttribute(X), n.duration !== void 0 && e.style.removeProperty(Z), n.easing !== void 0 && e.style.removeProperty(gt);
2465
+ t === "out" && this.hide(e), e.removeAttribute(X), n.duration !== void 0 && e.style.removeProperty(Tt), n.easing !== void 0 && e.style.removeProperty(Et);
1724
2466
  }
1725
2467
  expectedDuration(e) {
1726
2468
  if (!e.isConnected) return 0;
@@ -1736,21 +2478,21 @@ var Y = class _Transitions {
1736
2478
  }
1737
2479
  }
1738
2480
  };
1739
- J = u(null), x(J, 13, "failSafeDelay", mt, Y), x(J, 13, "forcedDisplayAttribute", pt, Y), w(J, Y), p(Y, "Transitions"), f(Y, "failSafeDelay", T(J, 8, Y, 100)), T(J, 11, Y), f(Y, "forcedDisplayAttribute", T(J, 12, Y, "data-ui-hidden-by-animation")), T(J, 15, Y);
1740
- var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-animation-easing", _t = ["animationend", "animationcancel"], Visibility = class {
2481
+ J = u(null), b(J, 13, "failSafeDelay", Ct, Y), b(J, 13, "forcedDisplayAttribute", St, Y), C(J, Y), p(Y, "Transitions"), f(Y, "failSafeDelay", w(J, 8, Y, 100)), w(J, 11, Y), f(Y, "forcedDisplayAttribute", w(J, 12, Y, "data-ui-hidden-by-animation")), w(J, 15, Y);
2482
+ var wt = Y, X = "data-ui-animation", Tt = "--ui-animation-duration", Et = "--ui-animation-easing", Dt = ["animationend", "animationcancel"], Visibility = class {
1741
2483
  transitions;
1742
2484
  constructor({ transitions: e }) {
1743
2485
  this.transitions = e;
1744
2486
  }
1745
2487
  observe(e, t = {}) {
1746
- let n = new vt({
2488
+ let n = new Ot({
1747
2489
  element: e,
1748
2490
  options: t
1749
2491
  });
1750
2492
  return () => n.dispose();
1751
2493
  }
1752
2494
  lazyImage(e, t = {}) {
1753
- let n = e.getAttribute(Ct.src);
2495
+ let n = e.getAttribute(Nt.src);
1754
2496
  if (!n) return () => void 0;
1755
2497
  let r = this.observe(e, {
1756
2498
  once: !0,
@@ -1763,7 +2505,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1763
2505
  return r;
1764
2506
  }
1765
2507
  async load(e, t, n) {
1766
- let { transition: r = wt.transition, duration: i = wt.duration } = n, a = e.getAttribute(Ct.srcset), o = new Image();
2508
+ let { transition: r = Pt.transition, duration: i = Pt.duration } = n, a = e.getAttribute(Nt.srcset), o = new Image();
1767
2509
  a && (o.srcset = a), o.src = t;
1768
2510
  try {
1769
2511
  await o.decode();
@@ -1775,7 +2517,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1775
2517
  duration: i
1776
2518
  }), n.onLoad?.(e);
1777
2519
  }
1778
- }, vt = class VisibilityWatch {
2520
+ }, Ot = class VisibilityWatch {
1779
2521
  element;
1780
2522
  target;
1781
2523
  hasWaited = !1;
@@ -1786,7 +2528,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1786
2528
  previous;
1787
2529
  lastTop;
1788
2530
  checks = new ee({
1789
- when: le,
2531
+ when: fe,
1790
2532
  run: () => {
1791
2533
  this.observers.length && this.check();
1792
2534
  }
@@ -1832,8 +2574,8 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1832
2574
  if (!e.width && !e.height) return;
1833
2575
  let t = this.calculate(e), n = this.previous;
1834
2576
  this.previous = t;
1835
- for (let e of bt) n?.[e] && !t[e] && this.reverse(St[e], t);
1836
- for (let e of yt) this.forward(xt[e], t[e], t);
2577
+ for (let e of At) n?.[e] && !t[e] && this.reverse(Mt[e], t);
2578
+ for (let e of kt) this.forward(jt[e], t[e], t);
1837
2579
  this.options.onUpdate?.(t);
1838
2580
  }
1839
2581
  retarget() {
@@ -1848,7 +2590,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1848
2590
  calculate(e) {
1849
2591
  let t = this.options.context, n = (t ? t.getBoundingClientRect().top + t.clientTop : 0) + (this.options.offset ?? 0), r = t ? t.getBoundingClientRect().top + t.clientTop + t.clientHeight : this.element.ownerDocument.documentElement.clientHeight, i = n >= e.top, a = n >= e.bottom, o = r >= e.top && !i, s = r >= e.bottom && !a, c = i && !a, l = (o || c) && !a, u = this.lastTop;
1850
2592
  this.lastTop = e.top;
1851
- let d = u === void 0 || u === e.top ? S.static : e.top < u ? S.down : S.up;
2593
+ let d = u === void 0 || u === e.top ? x.static : e.top < u ? x.down : x.up;
1852
2594
  return {
1853
2595
  topPassed: i,
1854
2596
  bottomPassed: a,
@@ -1879,7 +2621,7 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1879
2621
  if (t) return t;
1880
2622
  }
1881
2623
  }
1882
- }, yt = [
2624
+ }, kt = [
1883
2625
  "onScreen",
1884
2626
  "offScreen",
1885
2627
  "passing",
@@ -1887,13 +2629,13 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1887
2629
  "bottomVisible",
1888
2630
  "topPassed",
1889
2631
  "bottomPassed"
1890
- ], bt = [
2632
+ ], At = [
1891
2633
  "passing",
1892
2634
  "topVisible",
1893
2635
  "bottomVisible",
1894
2636
  "topPassed",
1895
2637
  "bottomPassed"
1896
- ], xt = {
2638
+ ], jt = {
1897
2639
  onScreen: "onOnScreen",
1898
2640
  offScreen: "onOffScreen",
1899
2641
  passing: "onPassing",
@@ -1901,26 +2643,26 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1901
2643
  bottomVisible: "onBottomVisible",
1902
2644
  topPassed: "onTopPassed",
1903
2645
  bottomPassed: "onBottomPassed"
1904
- }, St = {
2646
+ }, Mt = {
1905
2647
  passing: "onPassingReverse",
1906
2648
  topVisible: "onTopVisibleReverse",
1907
2649
  bottomVisible: "onBottomVisibleReverse",
1908
2650
  topPassed: "onTopPassedReverse",
1909
2651
  bottomPassed: "onBottomPassedReverse"
1910
- }, Ct = {
2652
+ }, Nt = {
1911
2653
  src: "data-src",
1912
2654
  srcset: "data-srcset"
1913
- }, wt = {
2655
+ }, Pt = {
1914
2656
  transition: "fade",
1915
2657
  duration: 1e3
1916
- }, Tt = [k], Q, $ = class _UIRuntime {
2658
+ }, Ft = [O], Z, Q = class _UIRuntime {
1917
2659
  constructor() {
1918
- f(this, "browser", new Te()), f(this, "ids", new Ids()), f(this, "keyboard", new Je({ isApple: this.browser.isApple })), f(this, "focus", new Focus()), f(this, "styles", new Styles()), f(this, "themes", new Themes({ styles: this.styles })), f(this, "overlays", new Qe({
2660
+ f(this, "browser", new Ne()), f(this, "ids", new Ids()), f(this, "keyboard", new nt({ isApple: this.browser.isApple })), f(this, "focus", new Focus()), f(this, "styles", new Styles()), f(this, "themes", new Themes({ styles: this.styles })), f(this, "overlays", new ot({
1919
2661
  keyboard: this.keyboard,
1920
2662
  focus: this.focus,
1921
2663
  browser: this.browser,
1922
2664
  styles: this.styles
1923
- })), f(this, "transitions", new ht({ browser: this.browser })), f(this, "visibility", new Visibility({ transitions: this.transitions })), f(this, "i18n", new Le({ browser: this.browser })), f(this, "toasts", new ft()), f(this, "modals", new Xe()), f(this, "api", new xe()), f(this, "icons", new Ve()), f(this, "sources", new it()), f(this, "code", new CodeLanguages()), f(this, "vocabulary", new re()), f(this, "propertyControls", new PropertyControls()), f(this, "dataTooltips", new DataTooltips({ browser: this.browser })), f(this, "ready"), this.registerFoundation(), this.dataTooltips.start(), this.ready = Promise.resolve();
2665
+ })), f(this, "transitions", new wt({ browser: this.browser })), f(this, "visibility", new Visibility({ transitions: this.transitions })), f(this, "i18n", new Ke({ browser: this.browser })), f(this, "toasts", new xt()), f(this, "modals", new it()), f(this, "api", new we()), f(this, "icons", new Ye()), f(this, "sounds", Oe), f(this, "sources", new pt()), f(this, "code", new CodeLanguages()), f(this, "vocabulary", new ie()), f(this, "propertyControls", new PropertyControls()), f(this, "dataTooltips", new DataTooltips({ browser: this.browser })), f(this, "ready"), this.registerFoundation(), this.dataTooltips.start(), this.ready = Promise.resolve();
1924
2666
  }
1925
2667
  async load() {
1926
2668
  return await this.ready, this;
@@ -1932,34 +2674,34 @@ var ht = Y, X = "data-ui-animation", Z = "--ui-animation-duration", gt = "--ui-a
1932
2674
  return this.visibility.observe(e, t);
1933
2675
  }
1934
2676
  registerFoundation() {
1935
- for (let [e, t] of Object.entries(Ot)) this.styles.register(e, t, {
2677
+ for (let [e, t] of Object.entries(Lt)) this.styles.register(e, t, {
1936
2678
  page: !0,
1937
2679
  linked: !0
1938
2680
  });
1939
- this.styles.setFoundation(Object.keys(Dt));
2681
+ this.styles.setFoundation(Object.keys($));
1940
2682
  }
1941
2683
  static get instance() {
1942
2684
  let e = globalThis;
1943
- return e[_] || (e[_] = new _UIRuntime());
2685
+ return e[te] || (e[te] = new _UIRuntime());
1944
2686
  }
1945
2687
  static load() {
1946
- return se();
2688
+ return ue();
1947
2689
  }
1948
2690
  };
1949
- Q = u(null), x(Q, 13, "version", Tt, $), w(Q, $), p($, "UIRuntime"), f($, "version", T(Q, 8, $, te)), T(Q, 11, $);
1950
- var Et = $, Dt = {
1951
- layers: pe,
1952
- reset: he,
1953
- tokens: _e,
1954
- colors: fe,
1955
- sizes: ge,
1956
- animations: de
1957
- }, Ot = {
1958
- ...Dt,
1959
- [ne]: ye,
1960
- typography: ve,
1961
- native: me
2691
+ Z = u(null), b(Z, 13, "version", Ft, Q), C(Z, Q), p(Q, "UIRuntime"), f(Q, "version", w(Z, 8, Q, ne)), w(Z, 11, Q);
2692
+ var It = Q, $ = {
2693
+ layers: ge,
2694
+ reset: ve,
2695
+ tokens: be,
2696
+ colors: he,
2697
+ sizes: ye,
2698
+ animations: me
2699
+ }, Lt = {
2700
+ ...$,
2701
+ [re]: Se,
2702
+ typography: xe,
2703
+ native: _e
1962
2704
  };
1963
- export { Et as UIRuntime };
2705
+ export { It as UIRuntime };
1964
2706
 
1965
- //# sourceMappingURL=UIRuntime-DCv4sy30.js.map
2707
+ //# sourceMappingURL=UIRuntime-BaokNnwk.js.map