@hiai-gg/docsmint 0.3.6 → 0.3.8

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 (237) hide show
  1. package/backend/src/lib/logger.ts +45 -15
  2. package/dist/backend/index.js +238 -150
  3. package/dist/frontend/CategoryDialog-DphkZqIB.js +611 -0
  4. package/dist/frontend/ConfirmDialog-BLF3x_hr.js +214 -0
  5. package/dist/frontend/CreateSnapshotDialog-D5vPvFTL.js +216 -0
  6. package/dist/frontend/DatePicker-CLNTdvTk.js +259 -0
  7. package/dist/frontend/DeleteDialog-DxYFJivN.js +174 -0
  8. package/dist/frontend/FolderDialog-CRVZM2Oi.js +250 -0
  9. package/dist/frontend/FolderNode-C2zG7uii.js +298 -0
  10. package/dist/frontend/FolderTreeSelector-CyB8y2Sm.js +103 -0
  11. package/dist/frontend/Icon-CooFj4Ee.js +64 -0
  12. package/dist/frontend/SettingsDialog-DCM4-N6_.js +1016 -0
  13. package/dist/frontend/ShareDialog-DYu3RKQu.js +165 -0
  14. package/dist/frontend/TagCreateDialog-DXQs2bL9.js +260 -0
  15. package/dist/frontend/api/attachments.d.ts +6 -0
  16. package/dist/frontend/api/attachments.js +2 -0
  17. package/dist/frontend/api/categories.js +1 -1
  18. package/dist/frontend/api/documents.js +1 -1
  19. package/dist/frontend/api/folders.js +1 -1
  20. package/dist/frontend/api/settings.js +1 -1
  21. package/dist/frontend/api/share.d.ts +5 -0
  22. package/dist/frontend/api/share.js +2 -0
  23. package/dist/frontend/api/tags.js +1 -1
  24. package/dist/frontend/api-keys-CpkrA8rD.js +35 -0
  25. package/dist/frontend/attachments-BuILSs56.js +50 -0
  26. package/dist/frontend/{settings-PCrOtied.js → auth-client-Cygmp1I2.js} +205 -265
  27. package/dist/frontend/awareness-snQ3RD9f.js +3714 -0
  28. package/dist/frontend/camera-iKXDOOWT.js +29 -0
  29. package/dist/frontend/{categories-BE6ZpZl8.js → categories-izQovv2w.js} +1 -1
  30. package/dist/frontend/check-D-UuvBuh.js +25 -0
  31. package/dist/frontend/chevron-down-CiPtYyFh.js +25 -0
  32. package/dist/frontend/circle-check-tSPE1V6t.js +29 -0
  33. package/dist/frontend/{client-B9hzI0W8.js → client-GbtOH90i.js} +1 -1
  34. package/dist/frontend/clipboard-Cgzxc0_R.js +16 -0
  35. package/dist/frontend/clock-DJHbHZb8.js +29 -0
  36. package/dist/frontend/clsx-C7bIvsDS.js +1738 -0
  37. package/dist/frontend/collaboration.d.ts +6 -0
  38. package/dist/frontend/collaboration.js +182 -0
  39. package/dist/frontend/components/category-dialog.d.ts +2 -0
  40. package/dist/frontend/components/category-dialog.js +2 -0
  41. package/dist/frontend/components/create-snapshot-dialog.d.ts +2 -0
  42. package/dist/frontend/components/create-snapshot-dialog.js +2 -0
  43. package/dist/frontend/components/delete-dialog.d.ts +2 -0
  44. package/dist/frontend/components/delete-dialog.js +2 -0
  45. package/dist/frontend/components/editor/document-editor.d.ts +3 -0
  46. package/dist/frontend/components/editor/document-editor.js +3032 -0
  47. package/dist/frontend/components/editor/document-title.d.ts +2 -0
  48. package/dist/frontend/components/editor/document-title.js +31 -0
  49. package/dist/frontend/components/editor/docx-serializer.d.ts +2 -0
  50. package/dist/frontend/components/editor/docx-serializer.js +14600 -0
  51. package/dist/frontend/components/editor/extensions.d.ts +2 -0
  52. package/dist/frontend/components/editor/extensions.js +2 -0
  53. package/dist/frontend/components/editor/markdown-toggle.d.ts +2 -0
  54. package/dist/frontend/components/editor/markdown-toggle.js +72 -0
  55. package/dist/frontend/components/editor/markdown.d.ts +1 -0
  56. package/dist/frontend/components/editor/markdown.js +2 -0
  57. package/dist/frontend/components/folder-node.d.ts +3 -0
  58. package/dist/frontend/components/folder-node.js +2 -0
  59. package/dist/frontend/components/folder-tree-selector.d.ts +2 -0
  60. package/dist/frontend/components/folder-tree-selector.js +2 -0
  61. package/dist/frontend/components/save-as-dialog.d.ts +2 -0
  62. package/dist/frontend/components/save-as-dialog.js +272 -0
  63. package/dist/frontend/components/settings.js +1 -1
  64. package/dist/frontend/components/share-dialog.d.ts +2 -0
  65. package/dist/frontend/components/share-dialog.js +2 -0
  66. package/dist/frontend/components/sidebar.js +1145 -3693
  67. package/dist/frontend/components/tag-create-dialog.d.ts +2 -0
  68. package/dist/frontend/components/tag-create-dialog.js +2 -0
  69. package/dist/frontend/components/version-history.d.ts +2 -0
  70. package/dist/frontend/components/version-history.js +294 -0
  71. package/dist/frontend/{context-DbnW5yib.js → context-BMD6XTPe.js} +0 -3
  72. package/dist/frontend/copy-GppwRMjX.js +32 -0
  73. package/dist/frontend/dashboard.js +1113 -1157
  74. package/dist/frontend/{SettingsDialog-D4pgFD0D.js → db-ByrlYfaI.js} +923 -2002
  75. package/dist/frontend/dialog-D6NxYVmy.js +213 -0
  76. package/dist/frontend/dndzone-BzsOINtP.js +1199 -0
  77. package/dist/frontend/doc-tabs.d.ts +7 -0
  78. package/dist/frontend/doc-tabs.js +14 -0
  79. package/dist/frontend/document-drop-coordinator-C4xHMjwC.js +68 -0
  80. package/dist/frontend/document-drop-coordinator.d.ts +2 -0
  81. package/dist/frontend/document-drop-coordinator.js +2 -0
  82. package/dist/frontend/{documents-DFVS9SsL.js → documents-BsDkvzCm.js} +1 -1
  83. package/dist/frontend/editorExtensions-BMHvUbdk.js +27021 -0
  84. package/dist/frontend/ellipsis-vertical-P9MHvCps.js +530 -0
  85. package/dist/frontend/extension.js +8 -7
  86. package/dist/frontend/floating-layer-anchor-CPwucTfd.js +4515 -0
  87. package/dist/frontend/folder-DeWhnD7O.js +45 -0
  88. package/dist/frontend/folder-refresh.d.ts +8 -0
  89. package/dist/frontend/folder-refresh.js +2 -0
  90. package/dist/frontend/{folders-CGe9diAG.js → folders-CTuV_JtU.js} +1 -1
  91. package/dist/frontend/frontend.css +1 -1
  92. package/dist/frontend/i18n.js +1 -1
  93. package/dist/frontend/identity-DyWeNzu_.js +69 -0
  94. package/dist/frontend/input-B5Rak-5G.js +23 -0
  95. package/dist/frontend/keyboard.d.ts +14 -0
  96. package/dist/frontend/keyboard.js +2 -0
  97. package/dist/frontend/keyboard.svelte-CApmX0vl.js +133 -0
  98. package/dist/frontend/label-CW9rxoAb.js +30 -0
  99. package/dist/frontend/loader-circle-BA6aLO71.js +268 -0
  100. package/dist/frontend/markdown-BwnyjITU.js +11 -0
  101. package/dist/frontend/messages-BpYaLbzE.js +1091 -0
  102. package/dist/frontend/offline/identity.d.ts +6 -0
  103. package/dist/frontend/offline/identity.js +2 -0
  104. package/dist/frontend/resolve-BG4HgzpN.js +19 -0
  105. package/dist/frontend/rolldown-runtime-CWhphoD1.js +23 -0
  106. package/dist/frontend/rotate-ccw-B4Q7brmV.js +25 -0
  107. package/dist/frontend/search.js +637 -602
  108. package/dist/frontend/select-value-sF86Geyh.js +1446 -0
  109. package/dist/frontend/settings-blyobazp.js +62 -0
  110. package/dist/frontend/share-Cu7SSJuJ.js +28 -0
  111. package/dist/frontend/shared-document.js +94 -93
  112. package/dist/frontend/subfolders-refresh-store.svelte-B2dKVmgz.js +65 -0
  113. package/dist/frontend/tag-HxRazVN_.js +54 -0
  114. package/dist/frontend/tag-store.svelte-CqrUXo0o.js +29 -0
  115. package/dist/frontend/{tags-DVXTut0p.js → tags-CtCV0Djo.js} +1 -1
  116. package/dist/frontend/textarea-i1720bE7.js +23 -0
  117. package/dist/frontend/theme.js +1 -1
  118. package/dist/frontend/theme.svelte-DKfCy12k.js +49 -0
  119. package/dist/frontend/types.d.ts +6 -0
  120. package/dist/frontend/types.js +0 -0
  121. package/dist/frontend/utils/clipboard.d.ts +1 -0
  122. package/dist/frontend/utils/clipboard.js +2 -0
  123. package/dist/frontend/utils/dndzone.d.ts +4 -0
  124. package/dist/frontend/utils/dndzone.js +2 -0
  125. package/dist/frontend/utils-CffiyuTo.js +19 -0
  126. package/dist/frontend/utils-hzdMVeCv.js +7 -0
  127. package/dist/frontend/utils.d.ts +4 -0
  128. package/dist/frontend/utils.js +2 -0
  129. package/dist/frontend/x-CzBsnJ2x.js +25 -0
  130. package/dist/frontend-ssr/api/attachments.js +2 -0
  131. package/dist/frontend-ssr/api/categories.js +2 -0
  132. package/dist/frontend-ssr/api/documents.js +2 -0
  133. package/dist/frontend-ssr/api/folders.js +2 -0
  134. package/dist/frontend-ssr/api/settings.js +2 -0
  135. package/dist/frontend-ssr/api/share.js +2 -0
  136. package/dist/frontend-ssr/api/tags.js +2 -0
  137. package/dist/frontend-ssr/assets/CategoryDialog-C2xaZKHq.js +584 -0
  138. package/dist/frontend-ssr/assets/ConfirmDialog-DjMFKc0V.js +420 -0
  139. package/dist/frontend-ssr/assets/CreateSnapshotDialog-BRw1xJW1.js +214 -0
  140. package/dist/frontend-ssr/assets/DatePicker-DnXniwlZ.js +312 -0
  141. package/dist/frontend-ssr/assets/DeleteDialog-BCfZy3Zn.js +154 -0
  142. package/dist/frontend-ssr/assets/FolderDialog-Dq7I2cKZ.js +429 -0
  143. package/dist/frontend-ssr/assets/FolderNode-DRfBfpft.js +171 -0
  144. package/dist/frontend-ssr/assets/FolderTreeSelector-DZNZ2oI6.js +147 -0
  145. package/dist/frontend-ssr/assets/Icon-B0Zqppjo.js +231 -0
  146. package/dist/frontend-ssr/assets/SettingsDialog-CX8Noa8A.js +1107 -0
  147. package/dist/frontend-ssr/assets/ShareDialog-Cge49ZdJ.js +54 -0
  148. package/dist/frontend-ssr/assets/TagCreateDialog-EAChgBF-.js +264 -0
  149. package/dist/frontend-ssr/assets/api-keys-DFqX39MT.js +35 -0
  150. package/dist/frontend-ssr/assets/attachments-CWBxE3Vz.js +85 -0
  151. package/dist/frontend-ssr/assets/auth-client-x26kqY8Z.js +1286 -0
  152. package/dist/frontend-ssr/assets/camera-CdxscTw-.js +84 -0
  153. package/dist/frontend-ssr/assets/categories-AOqgcsn4.js +75 -0
  154. package/dist/frontend-ssr/assets/chevron-down-CSSNGNh_.js +80 -0
  155. package/dist/frontend-ssr/assets/chevron-right-B4p7Sk6X.js +80 -0
  156. package/dist/frontend-ssr/assets/circle-check-CI1v4vYh.js +84 -0
  157. package/dist/frontend-ssr/assets/client-DZMkDkDn.js +129 -0
  158. package/dist/frontend-ssr/assets/clipboard-CXOaoz2W.js +30 -0
  159. package/dist/frontend-ssr/assets/clock-IL-eX2di.js +84 -0
  160. package/dist/frontend-ssr/assets/context-jz1GGEUi.js +45 -0
  161. package/dist/frontend-ssr/assets/copy-CjV57nGQ.js +87 -0
  162. package/dist/frontend-ssr/assets/db-CnxeO66n.js +65 -0
  163. package/dist/frontend-ssr/assets/dialog-BOV1u6zP.js +157 -0
  164. package/dist/frontend-ssr/assets/dndzone-DMvTO_Jz.js +2114 -0
  165. package/dist/frontend-ssr/assets/document-drop-coordinator-CEaYACsC.js +109 -0
  166. package/dist/frontend-ssr/assets/documents-BnOTRdTY.js +108 -0
  167. package/dist/frontend-ssr/assets/editorExtensions-DUzwndMy.js +186 -0
  168. package/dist/frontend-ssr/assets/ellipsis-vertical-C-0hgkZn.js +555 -0
  169. package/dist/frontend-ssr/assets/floating-layer-anchor-uzw9K8qN.js +6114 -0
  170. package/dist/frontend-ssr/assets/folder-DChhG7qN.js +80 -0
  171. package/dist/frontend-ssr/assets/folders-CTfbS24J.js +127 -0
  172. package/dist/frontend-ssr/assets/identity-B3uHoDtf.js +99 -0
  173. package/dist/frontend-ssr/assets/input-DezGsU3y.js +19 -0
  174. package/dist/frontend-ssr/assets/keyboard.svelte-BgF47N3L.js +174 -0
  175. package/dist/frontend-ssr/assets/label-Bj8-TfFN.js +21 -0
  176. package/dist/frontend-ssr/assets/loader-circle-DZsrZ-er.js +80 -0
  177. package/dist/frontend-ssr/assets/markdown-CjqvGi5W.js +20 -0
  178. package/dist/frontend-ssr/assets/messages-DhXqlcJI.js +11125 -0
  179. package/dist/frontend-ssr/assets/resolve-BqHozBXl.js +32 -0
  180. package/dist/frontend-ssr/assets/rotate-ccw-BlgWwaiq.js +80 -0
  181. package/dist/frontend-ssr/assets/select-value-DngdSmLI.js +1526 -0
  182. package/dist/frontend-ssr/assets/settings-E6qSAWM2.js +64 -0
  183. package/dist/frontend-ssr/assets/share-BTBJelxA.js +30 -0
  184. package/dist/frontend-ssr/assets/subfolders-refresh-store.svelte-DAh4gT16.js +77 -0
  185. package/dist/frontend-ssr/assets/tag-GZEuGWk1.js +166 -0
  186. package/dist/frontend-ssr/assets/tag-store.svelte-DPodKj6Z.js +21 -0
  187. package/dist/frontend-ssr/assets/tags-BId2wdYd.js +49 -0
  188. package/dist/frontend-ssr/assets/textarea-Dev-qSEc.js +21 -0
  189. package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +67 -0
  190. package/dist/frontend-ssr/assets/utils-DtlPPXpJ.js +9 -0
  191. package/dist/frontend-ssr/assets/utils-DvZnctjz.js +23 -0
  192. package/dist/frontend-ssr/collaboration.js +39 -0
  193. package/dist/frontend-ssr/components/category-dialog.js +2 -0
  194. package/dist/frontend-ssr/components/create-snapshot-dialog.js +2 -0
  195. package/dist/frontend-ssr/components/delete-dialog.js +2 -0
  196. package/dist/frontend-ssr/components/editor/document-editor.js +2499 -0
  197. package/dist/frontend-ssr/components/editor/document-title.js +11 -0
  198. package/dist/frontend-ssr/components/editor/docx-serializer.js +186 -0
  199. package/dist/frontend-ssr/components/editor/extensions.js +2 -0
  200. package/dist/frontend-ssr/components/editor/markdown-toggle.js +20 -0
  201. package/dist/frontend-ssr/components/editor/markdown.js +2 -0
  202. package/dist/frontend-ssr/components/folder-node.js +2 -0
  203. package/dist/frontend-ssr/components/folder-tree-selector.js +2 -0
  204. package/dist/frontend-ssr/components/save-as-dialog.js +280 -0
  205. package/dist/frontend-ssr/components/settings.js +2 -0
  206. package/dist/frontend-ssr/components/share-dialog.js +2 -0
  207. package/dist/frontend-ssr/components/sidebar.js +2033 -0
  208. package/dist/frontend-ssr/components/tag-create-dialog.js +2 -0
  209. package/dist/frontend-ssr/components/version-history.js +370 -0
  210. package/dist/frontend-ssr/dashboard.js +2542 -0
  211. package/dist/frontend-ssr/doc-tabs.js +23 -0
  212. package/dist/frontend-ssr/document-drop-coordinator.js +2 -0
  213. package/dist/frontend-ssr/extension.js +13 -0
  214. package/dist/frontend-ssr/folder-refresh.js +2 -0
  215. package/dist/frontend-ssr/i18n.js +10 -0
  216. package/dist/frontend-ssr/keyboard.js +2 -0
  217. package/dist/frontend-ssr/offline/identity.js +2 -0
  218. package/dist/frontend-ssr/search.js +332 -0
  219. package/dist/frontend-ssr/shared-document.js +273 -0
  220. package/dist/frontend-ssr/theme.js +9 -0
  221. package/dist/frontend-ssr/types.js +1 -0
  222. package/dist/frontend-ssr/utils/clipboard.js +2 -0
  223. package/dist/frontend-ssr/utils/dndzone.js +2 -0
  224. package/dist/frontend-ssr/utils.js +2 -0
  225. package/package.json +130 -1
  226. package/packages/cli/src/index.ts +1 -1
  227. package/packages/db/src/schema.ts +3 -0
  228. package/packages/mcp-server/src/index.ts +1 -1
  229. package/dist/frontend/DatePicker-BcMD49PV.js +0 -275
  230. package/dist/frontend/ShareDialog-Dzh7rV7J.js +0 -1317
  231. package/dist/frontend/client-C6QQGb0e.js +0 -2766
  232. package/dist/frontend/input-ieWIt8I7.js +0 -257
  233. package/dist/frontend/messages-CTGAsqFu.js +0 -1106
  234. package/dist/frontend/resolve-Bl6xmJl_.js +0 -2068
  235. package/dist/frontend/tag-C5xrg-bb.js +0 -53
  236. package/dist/frontend/tag-store.svelte-B3839FYq.js +0 -6152
  237. package/dist/frontend/theme.svelte-ei0QxXa8.js +0 -49
@@ -0,0 +1,4515 @@
1
+ import { t as e } from "./clsx-C7bIvsDS.js";
2
+ import "svelte/internal/disclose-version";
3
+ import * as t from "svelte/internal/client";
4
+ import { getContext as n, hasContext as r, onMount as i, setContext as a, tick as o, untrack as s } from "svelte";
5
+ import { createAttachmentKey as c } from "svelte/attachments";
6
+ import { on as l } from "svelte/events";
7
+ import { SvelteMap as u, createSubscriber as d } from "svelte/reactivity";
8
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/is.js
9
+ function f(e) {
10
+ return typeof e == "function";
11
+ }
12
+ function p(e) {
13
+ return typeof e == "object" && !!e;
14
+ }
15
+ var m = [
16
+ "string",
17
+ "number",
18
+ "bigint",
19
+ "boolean"
20
+ ];
21
+ function h(e) {
22
+ return e == null || m.includes(typeof e) ? !0 : Array.isArray(e) ? e.every((e) => h(e)) : typeof e == "object" ? Object.getPrototypeOf(e) === Object.prototype : !1;
23
+ }
24
+ //#endregion
25
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/box/box-extras.svelte.js
26
+ var g = Symbol("box"), _ = Symbol("is-writable");
27
+ function v(e, n) {
28
+ let r = t.derived(e);
29
+ return n ? {
30
+ [g]: !0,
31
+ [_]: !0,
32
+ get current() {
33
+ return t.get(r);
34
+ },
35
+ set current(e) {
36
+ n(e);
37
+ }
38
+ } : {
39
+ [g]: !0,
40
+ get current() {
41
+ return e();
42
+ }
43
+ };
44
+ }
45
+ function y(e) {
46
+ return p(e) && g in e;
47
+ }
48
+ function b(e) {
49
+ return y(e) && _ in e;
50
+ }
51
+ function x(e) {
52
+ return y(e) ? e : f(e) ? v(e) : w(e);
53
+ }
54
+ function S(e) {
55
+ return Object.entries(e).reduce((e, [t, n]) => y(n) ? (b(n) ? Object.defineProperty(e, t, {
56
+ get() {
57
+ return n.current;
58
+ },
59
+ set(e) {
60
+ n.current = e;
61
+ }
62
+ }) : Object.defineProperty(e, t, { get() {
63
+ return n.current;
64
+ } }), e) : Object.assign(e, { [t]: n }), {});
65
+ }
66
+ function C(e) {
67
+ return b(e) ? {
68
+ [g]: !0,
69
+ get current() {
70
+ return e.current;
71
+ }
72
+ } : e;
73
+ }
74
+ function w(e) {
75
+ let n = t.state(t.proxy(e));
76
+ return {
77
+ [g]: !0,
78
+ [_]: !0,
79
+ get current() {
80
+ return t.get(n);
81
+ },
82
+ set current(e) {
83
+ t.set(n, e, !0);
84
+ }
85
+ };
86
+ }
87
+ //#endregion
88
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/box/box.svelte.js
89
+ function T(e) {
90
+ let n = t.state(t.proxy(e));
91
+ return {
92
+ [g]: !0,
93
+ [_]: !0,
94
+ get current() {
95
+ return t.get(n);
96
+ },
97
+ set current(e) {
98
+ t.set(n, e, !0);
99
+ }
100
+ };
101
+ }
102
+ T.from = x, T.with = v, T.flatten = S, T.readonly = C, T.isBox = y, T.isWritableBox = b;
103
+ //#endregion
104
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/compose-handlers.js
105
+ function ee(...e) {
106
+ return function(t) {
107
+ for (let n of e) if (n) {
108
+ if (t.defaultPrevented) return;
109
+ typeof n == "function" ? n.call(this, t) : n.current?.call(this, t);
110
+ }
111
+ };
112
+ }
113
+ //#endregion
114
+ //#region ../node_modules/.bun/inline-style-parser@0.2.7/node_modules/inline-style-parser/esm/index.mjs
115
+ var te = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, ne = /\n/g, re = /^\s*/, E = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, ie = /^:\s*/, ae = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, oe = /^[;\s]*/, se = /^\s+|\s+$/g, ce = "\n", le = "/", ue = "*", D = "", de = "comment", fe = "declaration";
116
+ function pe(e, t) {
117
+ if (typeof e != "string") throw TypeError("First argument must be a string");
118
+ if (!e) return [];
119
+ t ||= {};
120
+ var n = 1, r = 1;
121
+ function i(e) {
122
+ var t = e.match(ne);
123
+ t && (n += t.length);
124
+ var i = e.lastIndexOf(ce);
125
+ r = ~i ? e.length - i : r + e.length;
126
+ }
127
+ function a() {
128
+ var e = {
129
+ line: n,
130
+ column: r
131
+ };
132
+ return function(t) {
133
+ return t.position = new o(e), l(), t;
134
+ };
135
+ }
136
+ function o(e) {
137
+ this.start = e, this.end = {
138
+ line: n,
139
+ column: r
140
+ }, this.source = t.source;
141
+ }
142
+ o.prototype.content = e;
143
+ function s(i) {
144
+ var a = /* @__PURE__ */ Error(t.source + ":" + n + ":" + r + ": " + i);
145
+ if (a.reason = i, a.filename = t.source, a.line = n, a.column = r, a.source = e, !t.silent) throw a;
146
+ }
147
+ function c(t) {
148
+ var n = t.exec(e);
149
+ if (n) {
150
+ var r = n[0];
151
+ return i(r), e = e.slice(r.length), n;
152
+ }
153
+ }
154
+ function l() {
155
+ c(re);
156
+ }
157
+ function u(e) {
158
+ var t;
159
+ for (e ||= []; t = d();) t !== !1 && e.push(t);
160
+ return e;
161
+ }
162
+ function d() {
163
+ var t = a();
164
+ if (!(le != e.charAt(0) || ue != e.charAt(1))) {
165
+ for (var n = 2; D != e.charAt(n) && (ue != e.charAt(n) || le != e.charAt(n + 1));) ++n;
166
+ if (n += 2, D === e.charAt(n - 1)) return s("End of comment missing");
167
+ var o = e.slice(2, n - 2);
168
+ return r += 2, i(o), e = e.slice(n), r += 2, t({
169
+ type: de,
170
+ comment: o
171
+ });
172
+ }
173
+ }
174
+ function f() {
175
+ var e = a(), t = c(E);
176
+ if (t) {
177
+ if (d(), !c(ie)) return s("property missing ':'");
178
+ var n = c(ae), r = e({
179
+ type: fe,
180
+ property: me(t[0].replace(te, D)),
181
+ value: n ? me(n[0].replace(te, D)) : D
182
+ });
183
+ return c(oe), r;
184
+ }
185
+ }
186
+ function p() {
187
+ var e = [];
188
+ u(e);
189
+ for (var t; t = f();) t !== !1 && (e.push(t), u(e));
190
+ return e;
191
+ }
192
+ return l(), p();
193
+ }
194
+ function me(e) {
195
+ return e ? e.replace(se, D) : D;
196
+ }
197
+ //#endregion
198
+ //#region ../node_modules/.bun/style-to-object@1.0.14/node_modules/style-to-object/esm/index.mjs
199
+ function he(e, t) {
200
+ let n = null;
201
+ if (!e || typeof e != "string") return n;
202
+ let r = pe(e), i = typeof t == "function";
203
+ return r.forEach((e) => {
204
+ if (e.type !== "declaration") return;
205
+ let { property: r, value: a } = e;
206
+ i ? t(r, a, e) : a && (n ||= {}, n[r] = a);
207
+ }), n;
208
+ }
209
+ //#endregion
210
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/strings.js
211
+ var ge = /\d/, _e = [
212
+ "-",
213
+ "_",
214
+ "/",
215
+ "."
216
+ ];
217
+ function ve(e = "") {
218
+ if (!ge.test(e)) return e !== e.toLowerCase();
219
+ }
220
+ function ye(e) {
221
+ let t = [], n = "", r, i;
222
+ for (let a of e) {
223
+ let e = _e.includes(a);
224
+ if (e === !0) {
225
+ t.push(n), n = "", r = void 0;
226
+ continue;
227
+ }
228
+ let o = ve(a);
229
+ if (i === !1) {
230
+ if (r === !1 && o === !0) {
231
+ t.push(n), n = a, r = o;
232
+ continue;
233
+ }
234
+ if (r === !0 && o === !1 && n.length > 1) {
235
+ let e = n.at(-1);
236
+ t.push(n.slice(0, Math.max(0, n.length - 1))), n = e + a, r = o;
237
+ continue;
238
+ }
239
+ }
240
+ n += a, r = o, i = e;
241
+ }
242
+ return t.push(n), t;
243
+ }
244
+ function be(e) {
245
+ return e ? ye(e).map((e) => Se(e)).join("") : "";
246
+ }
247
+ function xe(e) {
248
+ return Ce(be(e || ""));
249
+ }
250
+ function Se(e) {
251
+ return e ? e[0].toUpperCase() + e.slice(1) : "";
252
+ }
253
+ function Ce(e) {
254
+ return e ? e[0].toLowerCase() + e.slice(1) : "";
255
+ }
256
+ //#endregion
257
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/css-to-style-obj.js
258
+ function we(e) {
259
+ if (!e) return {};
260
+ let t = {};
261
+ function n(e, n) {
262
+ if (e.startsWith("-moz-") || e.startsWith("-webkit-") || e.startsWith("-ms-") || e.startsWith("-o-")) {
263
+ t[be(e)] = n;
264
+ return;
265
+ }
266
+ if (e.startsWith("--")) {
267
+ t[e] = n;
268
+ return;
269
+ }
270
+ t[xe(e)] = n;
271
+ }
272
+ return he(e, n), t;
273
+ }
274
+ //#endregion
275
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/execute-callbacks.js
276
+ function O(...e) {
277
+ return (...t) => {
278
+ for (let n of e) typeof n == "function" && n(...t);
279
+ };
280
+ }
281
+ //#endregion
282
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/style-to-css.js
283
+ function Te(e, t) {
284
+ let n = RegExp(e, "g");
285
+ return (e) => {
286
+ if (typeof e != "string") throw TypeError(`expected an argument of type string, but got ${typeof e}`);
287
+ return e.match(n) ? e.replace(n, t) : e;
288
+ };
289
+ }
290
+ var Ee = Te(/[A-Z]/, (e) => `-${e.toLowerCase()}`);
291
+ function De(e) {
292
+ if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError(`expected an argument of type object, but got ${typeof e}`);
293
+ return Object.keys(e).map((t) => `${Ee(t)}: ${e[t]};`).join("\n");
294
+ }
295
+ //#endregion
296
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/style.js
297
+ function Oe(e = {}) {
298
+ return De(e).replace("\n", " ");
299
+ }
300
+ var ke = new Set(/* @__PURE__ */ "onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel".split("."));
301
+ //#endregion
302
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/merge-props.js
303
+ function Ae(e) {
304
+ return ke.has(e);
305
+ }
306
+ function je(...t) {
307
+ let n = { ...t[0] };
308
+ for (let r = 1; r < t.length; r++) {
309
+ let i = t[r];
310
+ if (i) {
311
+ for (let t of Object.keys(i)) {
312
+ let r = n[t], a = i[t], o = typeof r == "function", s = typeof a == "function";
313
+ if (o && typeof s && Ae(t)) n[t] = ee(r, a);
314
+ else if (o && s) n[t] = O(r, a);
315
+ else if (t === "class") {
316
+ let i = h(r), o = h(a);
317
+ i && o ? n[t] = e(r, a) : i ? n[t] = e(r) : o && (n[t] = e(a));
318
+ } else if (t === "style") {
319
+ let e = typeof r == "object", i = typeof a == "object", o = typeof r == "string", s = typeof a == "string";
320
+ if (e && i) n[t] = {
321
+ ...r,
322
+ ...a
323
+ };
324
+ else if (e && s) {
325
+ let e = we(a);
326
+ n[t] = {
327
+ ...r,
328
+ ...e
329
+ };
330
+ } else if (o && i) n[t] = {
331
+ ...we(r),
332
+ ...a
333
+ };
334
+ else if (o && s) {
335
+ let e = we(r), i = we(a);
336
+ n[t] = {
337
+ ...e,
338
+ ...i
339
+ };
340
+ } else e ? n[t] = r : i ? n[t] = a : o ? n[t] = r : s && (n[t] = a);
341
+ } else n[t] = a === void 0 ? r : a;
342
+ }
343
+ for (let e of Object.getOwnPropertySymbols(i)) {
344
+ let t = n[e], r = i[e];
345
+ n[e] = r === void 0 ? t : r;
346
+ }
347
+ }
348
+ }
349
+ return typeof n.style == "object" && (n.style = Oe(n.style).replaceAll("\n", " ")), n.hidden === !1 && (n.hidden = void 0, delete n.hidden), n.disabled === !1 && (n.disabled = void 0, delete n.disabled), n;
350
+ }
351
+ //#endregion
352
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/on-destroy-effect.svelte.js
353
+ function k(e) {
354
+ t.user_effect(() => () => {
355
+ e();
356
+ });
357
+ }
358
+ //#endregion
359
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/after-sleep.js
360
+ function Me(e, t) {
361
+ return setTimeout(t, e);
362
+ }
363
+ //#endregion
364
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/after-tick.js
365
+ function A(e) {
366
+ o().then(e);
367
+ }
368
+ //#endregion
369
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/dom.js
370
+ var Ne = 1, Pe = 9, Fe = 11;
371
+ function Ie(e) {
372
+ return p(e) && e.nodeType === Ne && typeof e.nodeName == "string";
373
+ }
374
+ function Le(e) {
375
+ return p(e) && e.nodeType === Pe;
376
+ }
377
+ function Re(e) {
378
+ return p(e) && e.constructor?.name === "VisualViewport";
379
+ }
380
+ function ze(e) {
381
+ return p(e) && e.nodeType !== void 0;
382
+ }
383
+ function Be(e) {
384
+ return ze(e) && e.nodeType === Fe && "host" in e;
385
+ }
386
+ function Ve(e, t) {
387
+ if (!e || !t || !Ie(e) || !Ie(t)) return !1;
388
+ let n = t.getRootNode?.();
389
+ if (e === t || e.contains(t)) return !0;
390
+ if (n && Be(n)) {
391
+ let n = t;
392
+ for (; n;) {
393
+ if (e === n) return !0;
394
+ n = n.parentNode || n.host;
395
+ }
396
+ }
397
+ return !1;
398
+ }
399
+ function He(e) {
400
+ return Le(e) ? e : Re(e) ? e.document : e?.ownerDocument ?? document;
401
+ }
402
+ function Ue(e) {
403
+ return Be(e) ? Ue(e.host) : Le(e) ? e.defaultView ?? window : Ie(e) ? e.ownerDocument?.defaultView ?? window : window;
404
+ }
405
+ function We(e) {
406
+ let t = e.activeElement;
407
+ for (; t?.shadowRoot;) {
408
+ let e = t.shadowRoot.activeElement;
409
+ if (e === t) break;
410
+ t = e;
411
+ }
412
+ return t;
413
+ }
414
+ //#endregion
415
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/dom-context.svelte.js
416
+ var Ge = class {
417
+ element;
418
+ #e = t.derived(() => this.element.current ? this.element.current.getRootNode() ?? document : document);
419
+ get root() {
420
+ return t.get(this.#e);
421
+ }
422
+ set root(e) {
423
+ t.set(this.#e, e);
424
+ }
425
+ constructor(e) {
426
+ typeof e == "function" ? this.element = v(e) : this.element = e;
427
+ }
428
+ getDocument = () => He(this.root);
429
+ getWindow = () => this.getDocument().defaultView ?? window;
430
+ getActiveElement = () => We(this.root);
431
+ isActiveElement = (e) => e === this.getActiveElement();
432
+ getElementById(e) {
433
+ return this.root.getElementById(e);
434
+ }
435
+ querySelector = (e) => this.root ? this.root.querySelector(e) : null;
436
+ querySelectorAll = (e) => this.root ? this.root.querySelectorAll(e) : [];
437
+ setTimeout = (e, t) => this.getWindow().setTimeout(e, t);
438
+ clearTimeout = (e) => this.getWindow().clearTimeout(e);
439
+ };
440
+ //#endregion
441
+ //#region ../node_modules/.bun/svelte-toolbelt@0.10.6+68f06e2e1fdd21f8/node_modules/svelte-toolbelt/dist/utils/attach-ref.js
442
+ function j(e, t) {
443
+ return { [c()]: (n) => y(e) ? (e.current = n, s(() => t?.(n)), () => {
444
+ "isConnected" in n && n.isConnected || (e.current = null, t?.(null));
445
+ }) : (e(n), s(() => t?.(n)), () => {
446
+ "isConnected" in n && n.isConnected || (e(null), t?.(null));
447
+ }) };
448
+ }
449
+ //#endregion
450
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/internal/configurable-globals.js
451
+ var Ke = typeof window < "u" ? window : void 0;
452
+ typeof window < "u" && window.document, typeof window < "u" && window.navigator, typeof window < "u" && window.location;
453
+ //#endregion
454
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/internal/utils/dom.js
455
+ function qe(e) {
456
+ let t = e.activeElement;
457
+ for (; t?.shadowRoot;) {
458
+ let e = t.shadowRoot.activeElement;
459
+ if (e === t) break;
460
+ t = e;
461
+ }
462
+ return t;
463
+ }
464
+ new class {
465
+ #e;
466
+ #t;
467
+ constructor(e = {}) {
468
+ let { window: t = Ke, document: n = t?.document } = e;
469
+ t !== void 0 && (this.#e = n, this.#t = d((e) => {
470
+ let n = l(t, "focusin", e), r = l(t, "focusout", e);
471
+ return () => {
472
+ n(), r();
473
+ };
474
+ }));
475
+ }
476
+ get current() {
477
+ return this.#t?.(), this.#e ? qe(this.#e) : null;
478
+ }
479
+ }();
480
+ //#endregion
481
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/internal/utils/is.js
482
+ function Je(e) {
483
+ return typeof e == "function";
484
+ }
485
+ //#endregion
486
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/utilities/context/context.js
487
+ var M = class {
488
+ #e;
489
+ #t;
490
+ constructor(e) {
491
+ this.#e = e, this.#t = Symbol(e);
492
+ }
493
+ get key() {
494
+ return this.#t;
495
+ }
496
+ exists() {
497
+ return r(this.#t);
498
+ }
499
+ get() {
500
+ let e = n(this.#t);
501
+ if (e === void 0) throw Error(`Context "${this.#e}" not found`);
502
+ return e;
503
+ }
504
+ getOr(e) {
505
+ let t = n(this.#t);
506
+ return t === void 0 ? e : t;
507
+ }
508
+ set(e) {
509
+ return a(this.#t, e);
510
+ }
511
+ };
512
+ //#endregion
513
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/utilities/watch/watch.svelte.js
514
+ function Ye(e, n) {
515
+ switch (e) {
516
+ case "post":
517
+ t.user_effect(n);
518
+ break;
519
+ case "pre":
520
+ t.user_pre_effect(n);
521
+ break;
522
+ }
523
+ }
524
+ function Xe(e, t, n, r = {}) {
525
+ let { lazy: i = !1 } = r, a = !i, o = Array.isArray(e) ? [] : void 0;
526
+ Ye(t, () => {
527
+ let t = Array.isArray(e) ? e.map((e) => e()) : e();
528
+ if (!a) {
529
+ a = !0, o = t;
530
+ return;
531
+ }
532
+ let r = s(() => n(t, o));
533
+ return o = t, r;
534
+ });
535
+ }
536
+ function Ze(e, n, r) {
537
+ let i = t.effect_root(() => {
538
+ let t = !1;
539
+ Xe(e, n, (e, n) => {
540
+ if (t) {
541
+ i();
542
+ return;
543
+ }
544
+ let a = r(e, n);
545
+ return t = !0, a;
546
+ }, { lazy: !0 });
547
+ });
548
+ t.user_effect(() => i);
549
+ }
550
+ function N(e, t, n) {
551
+ Xe(e, "post", t, n);
552
+ }
553
+ function Qe(e, t, n) {
554
+ Xe(e, "pre", t, n);
555
+ }
556
+ N.pre = Qe;
557
+ function $e(e, t) {
558
+ Ze(e, "post", t);
559
+ }
560
+ function et(e, t) {
561
+ Ze(e, "pre", t);
562
+ }
563
+ $e.pre = et;
564
+ //#endregion
565
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/internal/utils/get.js
566
+ function tt(e) {
567
+ return Je(e) ? e() : e;
568
+ }
569
+ //#endregion
570
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/utilities/element-size/element-size.svelte.js
571
+ var nt = class {
572
+ #e = {
573
+ width: 0,
574
+ height: 0
575
+ };
576
+ #t = !1;
577
+ #n;
578
+ #r;
579
+ #i;
580
+ #a = t.derived(() => (t.get(this.#s)?.(), this.getSize().width));
581
+ #o = t.derived(() => (t.get(this.#s)?.(), this.getSize().height));
582
+ #s = t.derived(() => {
583
+ let e = tt(this.#r);
584
+ if (e) return d((t) => {
585
+ if (!this.#i) return;
586
+ let n = new this.#i.ResizeObserver((e) => {
587
+ this.#t = !0;
588
+ for (let t of e) {
589
+ let e = this.#n.box === "content-box" ? t.contentBoxSize : t.borderBoxSize, n = Array.isArray(e) ? e : [e];
590
+ this.#e.width = n.reduce((e, t) => Math.max(e, t.inlineSize), 0), this.#e.height = n.reduce((e, t) => Math.max(e, t.blockSize), 0);
591
+ }
592
+ t();
593
+ });
594
+ return n.observe(e), () => {
595
+ this.#t = !1, n.disconnect();
596
+ };
597
+ });
598
+ });
599
+ constructor(e, t = { box: "border-box" }) {
600
+ this.#i = t.window ?? Ke, this.#n = t, this.#r = e, this.#e = {
601
+ width: 0,
602
+ height: 0
603
+ };
604
+ }
605
+ calculateSize() {
606
+ let e = tt(this.#r);
607
+ if (!e || !this.#i) return;
608
+ let t = e.offsetWidth, n = e.offsetHeight;
609
+ if (this.#n.box === "border-box") return {
610
+ width: t,
611
+ height: n
612
+ };
613
+ let r = this.#i.getComputedStyle(e), i = parseFloat(r.paddingLeft) + parseFloat(r.paddingRight), a = parseFloat(r.paddingTop) + parseFloat(r.paddingBottom), o = parseFloat(r.borderLeftWidth) + parseFloat(r.borderRightWidth), s = parseFloat(r.borderTopWidth) + parseFloat(r.borderBottomWidth);
614
+ return {
615
+ width: t - i - o,
616
+ height: n - a - s
617
+ };
618
+ }
619
+ getSize() {
620
+ return this.#t ? this.#e : this.calculateSize() ?? this.#e;
621
+ }
622
+ get current() {
623
+ return t.get(this.#s)?.(), this.getSize();
624
+ }
625
+ get width() {
626
+ return t.get(this.#a);
627
+ }
628
+ get height() {
629
+ return t.get(this.#o);
630
+ }
631
+ }, rt = class {
632
+ #e = () => void 0;
633
+ #t = t.derived(() => this.#e());
634
+ constructor(e, t) {
635
+ let n;
636
+ t !== void 0 && (n = t), this.#e = () => {
637
+ try {
638
+ return n;
639
+ } finally {
640
+ n = e();
641
+ }
642
+ };
643
+ }
644
+ get current() {
645
+ return t.get(this.#t);
646
+ }
647
+ };
648
+ //#endregion
649
+ //#region ../node_modules/.bun/runed@0.35.1+68f06e2e1fdd21f8/node_modules/runed/dist/utilities/resource/resource.svelte.js
650
+ function it(e, t) {
651
+ let n, r = null;
652
+ return (...i) => new Promise((a) => {
653
+ r && r(void 0), r = a, clearTimeout(n), n = setTimeout(async () => {
654
+ let t = await e(...i);
655
+ r &&= (r(t), null);
656
+ }, t);
657
+ });
658
+ }
659
+ function at(e, t) {
660
+ let n = 0, r = null;
661
+ return (...i) => {
662
+ let a = Date.now();
663
+ return n && a - n < t ? r ?? Promise.resolve(void 0) : (n = a, r = e(...i), r);
664
+ };
665
+ }
666
+ function ot(e, n, r = {}, i) {
667
+ let { lazy: a = !1, once: o = !1, initialValue: s, debounce: c, throttle: l } = r, u = t.state(t.proxy(s)), d = t.state(!1), f = t.state(void 0), p = t.state(t.proxy([])), m = () => {
668
+ t.get(p).forEach((e) => e()), t.set(p, [], !0);
669
+ }, h = (e) => {
670
+ t.set(p, [...t.get(p), e], !0);
671
+ }, g = async (e, r, i = !1) => {
672
+ try {
673
+ t.set(d, !0), t.set(f, void 0), m();
674
+ let a = new AbortController();
675
+ h(() => a.abort());
676
+ let o = await n(e, r, {
677
+ data: t.get(u),
678
+ refetching: i,
679
+ onCleanup: h,
680
+ signal: a.signal
681
+ });
682
+ return t.set(u, o, !0), o;
683
+ } catch (e) {
684
+ e instanceof DOMException && e.name === "AbortError" || t.set(f, e, !0);
685
+ return;
686
+ } finally {
687
+ t.set(d, !1);
688
+ }
689
+ }, _ = c ? it(g, c) : l ? at(g, l) : g, v = Array.isArray(e) ? e : [e], y;
690
+ return i((t, n) => {
691
+ o && y || (y = t, _(Array.isArray(e) ? t : t[0], Array.isArray(e) ? n : n?.[0]));
692
+ }, { lazy: a }), {
693
+ get current() {
694
+ return t.get(u);
695
+ },
696
+ get loading() {
697
+ return t.get(d);
698
+ },
699
+ get error() {
700
+ return t.get(f);
701
+ },
702
+ mutate: (e) => {
703
+ t.set(u, e, !0);
704
+ },
705
+ refetch: (t) => {
706
+ let n = v.map((e) => e());
707
+ return _(Array.isArray(e) ? n : n[0], Array.isArray(e) ? n : n[0], t ?? !0);
708
+ }
709
+ };
710
+ }
711
+ function st(e, t, n) {
712
+ return ot(e, t, n, (t, n) => {
713
+ let r = Array.isArray(e) ? e : [e];
714
+ N(() => r.map((e) => e()), (e, n) => {
715
+ t(e, n ?? []);
716
+ }, n);
717
+ });
718
+ }
719
+ function ct(e, t, n) {
720
+ return ot(e, t, n, (t, n) => {
721
+ let r = Array.isArray(e) ? e : [e];
722
+ N.pre(() => r.map((e) => e()), (e, n) => {
723
+ t(e, n ?? []);
724
+ }, n);
725
+ });
726
+ }
727
+ st.pre = ct;
728
+ var lt = "ArrowDown", ut = "ArrowLeft", dt = "ArrowRight", ft = "ArrowUp", pt = "CapsLock", mt = "Control", ht = "Enter", gt = "Escape", _t = "Home", vt = "Meta", yt = "PageDown", bt = "PageUp", xt = "Shift", St = [ht, " "], Ct = [
729
+ lt,
730
+ bt,
731
+ _t
732
+ ], wt = [
733
+ ft,
734
+ yt,
735
+ "End"
736
+ ], Tt = [...Ct, ...wt];
737
+ [...St], [...St];
738
+ function P(e) {
739
+ return e.pointerType === "mouse";
740
+ }
741
+ //#endregion
742
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/is.js
743
+ var Et = typeof document < "u", Dt = Ot();
744
+ function Ot() {
745
+ return Et && window?.navigator?.userAgent && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || window?.navigator?.maxTouchPoints > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
746
+ }
747
+ function F(e) {
748
+ return e instanceof HTMLElement;
749
+ }
750
+ function kt(e) {
751
+ return e instanceof Element;
752
+ }
753
+ function At(e) {
754
+ return e instanceof Element || e instanceof SVGElement;
755
+ }
756
+ function jt(e) {
757
+ return e !== null;
758
+ }
759
+ function Mt(e) {
760
+ return e instanceof HTMLInputElement && "select" in e;
761
+ }
762
+ //#endregion
763
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/focus.js
764
+ function Nt(e, { select: t = !1 } = {}) {
765
+ if (!e || !e.focus) return;
766
+ let n = He(e);
767
+ if (n.activeElement === e) return;
768
+ let r = n.activeElement;
769
+ e.focus({ preventScroll: !0 }), e !== r && Mt(e) && t && e.select();
770
+ }
771
+ function Pt(e, { select: t = !1 } = {}, n) {
772
+ let r = n();
773
+ for (let i of e) if (Nt(i, { select: t }), n() !== r) return !0;
774
+ }
775
+ //#endregion
776
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/events.js
777
+ var Ft = class {
778
+ eventName;
779
+ options;
780
+ constructor(e, t = {
781
+ bubbles: !0,
782
+ cancelable: !0
783
+ }) {
784
+ this.eventName = e, this.options = t;
785
+ }
786
+ createEvent(e) {
787
+ return new CustomEvent(this.eventName, {
788
+ ...this.options,
789
+ detail: e
790
+ });
791
+ }
792
+ dispatch(e, t) {
793
+ let n = this.createEvent(t);
794
+ return e.dispatchEvent(n), n;
795
+ }
796
+ listen(e, t, n) {
797
+ return l(e, this.eventName, (e) => {
798
+ t(e);
799
+ }, n);
800
+ }
801
+ };
802
+ //#endregion
803
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/attrs.js
804
+ function It(e) {
805
+ return e ? "true" : "false";
806
+ }
807
+ function Lt(e) {
808
+ return e ? "" : void 0;
809
+ }
810
+ function Rt(e) {
811
+ return e ? !0 : void 0;
812
+ }
813
+ function zt(e) {
814
+ return e ? "open" : "closed";
815
+ }
816
+ function Bt(e) {
817
+ return e === "starting" ? { "data-starting-style": "" } : e === "ending" ? { "data-ending-style": "" } : {};
818
+ }
819
+ var Vt = class {
820
+ #e;
821
+ #t;
822
+ attrs;
823
+ constructor(e) {
824
+ this.#e = e.getVariant ? e.getVariant() : null, this.#t = this.#e ? `data-${this.#e}-` : `data-${e.component}-`, this.getAttr = this.getAttr.bind(this), this.selector = this.selector.bind(this), this.attrs = Object.fromEntries(e.parts.map((e) => [e, this.getAttr(e)]));
825
+ }
826
+ getAttr(e, t) {
827
+ return t ? `data-${t}-${e}` : `${this.#t}${e}`;
828
+ }
829
+ selector(e, t) {
830
+ return `[${this.getAttr(e, t)}]`;
831
+ }
832
+ };
833
+ function Ht(e) {
834
+ let t = new Vt(e);
835
+ return {
836
+ ...t.attrs,
837
+ selector: t.selector,
838
+ getAttr: t.getAttr
839
+ };
840
+ }
841
+ //#endregion
842
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/is-using-keyboard/is-using-keyboard.svelte.js
843
+ var Ut = t.state(!1), Wt = class e {
844
+ static _refs = 0;
845
+ static _cleanup;
846
+ constructor() {
847
+ t.user_effect(() => (e._refs === 0 && (e._cleanup = t.effect_root(() => {
848
+ let e = [], n = (e) => {
849
+ t.set(Ut, !1);
850
+ };
851
+ return e.push(l(document, "pointerdown", n, { capture: !0 }), l(document, "pointermove", n, { capture: !0 }), l(document, "keydown", (e) => {
852
+ t.set(Ut, !0);
853
+ }, { capture: !0 })), O(...e);
854
+ })), e._refs++, () => {
855
+ e._refs--, e._refs === 0 && (t.set(Ut, !1), e._cleanup?.());
856
+ }));
857
+ }
858
+ get current() {
859
+ return t.get(Ut);
860
+ }
861
+ set current(e) {
862
+ t.set(Ut, e, !0);
863
+ }
864
+ }, Gt = [
865
+ "input:not([inert]):not([inert] *)",
866
+ "select:not([inert]):not([inert] *)",
867
+ "textarea:not([inert]):not([inert] *)",
868
+ "a[href]:not([inert]):not([inert] *)",
869
+ "button:not([inert]):not([inert] *)",
870
+ "[tabindex]:not(slot):not([inert]):not([inert] *)",
871
+ "audio[controls]:not([inert]):not([inert] *)",
872
+ "video[controls]:not([inert]):not([inert] *)",
873
+ "[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)",
874
+ "details>summary:first-of-type:not([inert]):not([inert] *)",
875
+ "details:not([inert]):not([inert] *)"
876
+ ], Kt = /* #__PURE__ */ Gt.join(","), qt = typeof Element > "u", I = qt ? function() {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Jt = !qt && Element.prototype.getRootNode ? function(e) {
877
+ return e?.getRootNode?.call(e);
878
+ } : function(e) {
879
+ return e?.ownerDocument;
880
+ }, Yt = function(e, t) {
881
+ t === void 0 && (t = !0);
882
+ var n = e?.getAttribute?.call(e, "inert");
883
+ return n === "" || n === "true" || t && e && (typeof e.closest == "function" ? e.closest("[inert]") : Yt(e.parentNode));
884
+ }, Xt = function(e) {
885
+ var t = e?.getAttribute?.call(e, "contenteditable");
886
+ return t === "" || t === "true";
887
+ }, Zt = function(e, t, n) {
888
+ if (Yt(e)) return [];
889
+ var r = Array.prototype.slice.apply(e.querySelectorAll(Kt));
890
+ return t && I.call(e, Kt) && r.unshift(e), r = r.filter(n), r;
891
+ }, Qt = function(e, t, n) {
892
+ for (var r = [], i = Array.from(e); i.length;) {
893
+ var a = i.shift();
894
+ if (!Yt(a, !1)) if (a.tagName === "SLOT") {
895
+ var o = a.assignedElements(), s = Qt(o.length ? o : a.children, !0, n);
896
+ n.flatten ? r.push.apply(r, s) : r.push({
897
+ scopeParent: a,
898
+ candidates: s
899
+ });
900
+ } else {
901
+ I.call(a, Kt) && n.filter(a) && (t || !e.includes(a)) && r.push(a);
902
+ var c = a.shadowRoot || typeof n.getShadowRoot == "function" && n.getShadowRoot(a), l = !Yt(c, !1) && (!n.shadowRootFilter || n.shadowRootFilter(a));
903
+ if (c && l) {
904
+ var u = Qt(c === !0 ? a.children : c.children, !0, n);
905
+ n.flatten ? r.push.apply(r, u) : r.push({
906
+ scopeParent: a,
907
+ candidates: u
908
+ });
909
+ } else i.unshift.apply(i, a.children);
910
+ }
911
+ }
912
+ return r;
913
+ }, $t = function(e) {
914
+ return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
915
+ }, en = function(e) {
916
+ if (!e) throw Error("No node provided");
917
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Xt(e)) && !$t(e) ? 0 : e.tabIndex;
918
+ }, tn = function(e, t) {
919
+ var n = en(e);
920
+ return n < 0 && t && !$t(e) ? 0 : n;
921
+ }, nn = function(e, t) {
922
+ return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
923
+ }, rn = function(e) {
924
+ return e.tagName === "INPUT";
925
+ }, an = function(e) {
926
+ return rn(e) && e.type === "hidden";
927
+ }, on = function(e) {
928
+ return e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(e) {
929
+ return e.tagName === "SUMMARY";
930
+ });
931
+ }, sn = function(e, t) {
932
+ for (var n = 0; n < e.length; n++) if (e[n].checked && e[n].form === t) return e[n];
933
+ }, cn = function(e) {
934
+ if (!e.name) return !0;
935
+ var t = e.form || Jt(e), n = function(e) {
936
+ return t.querySelectorAll("input[type=\"radio\"][name=\"" + e + "\"]");
937
+ }, r;
938
+ if (typeof window < "u" && window.CSS !== void 0 && typeof window.CSS.escape == "function") r = n(window.CSS.escape(e.name));
939
+ else try {
940
+ r = n(e.name);
941
+ } catch (e) {
942
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", e.message), !1;
943
+ }
944
+ var i = sn(r, e.form);
945
+ return !i || i === e;
946
+ }, ln = function(e) {
947
+ return rn(e) && e.type === "radio";
948
+ }, un = function(e) {
949
+ return ln(e) && !cn(e);
950
+ }, dn = function(e) {
951
+ var t = e && Jt(e), n = t?.host, r = !1;
952
+ if (t && t !== e) {
953
+ var i, a, o;
954
+ for (r = !!((i = n) != null && (a = i.ownerDocument) != null && a.contains(n) || e != null && (o = e.ownerDocument) != null && o.contains(e)); !r && n;) {
955
+ var s, c;
956
+ t = Jt(n), n = t?.host, r = !!((s = n) != null && (c = s.ownerDocument) != null && c.contains(n));
957
+ }
958
+ }
959
+ return r;
960
+ }, fn = function(e) {
961
+ var t = e.getBoundingClientRect(), n = t.width, r = t.height;
962
+ return n === 0 && r === 0;
963
+ }, pn = function(e, t) {
964
+ var n = t.displayCheck, r = t.getShadowRoot;
965
+ if (n === "full-native" && "checkVisibility" in e) return !e.checkVisibility({
966
+ checkOpacity: !1,
967
+ opacityProperty: !1,
968
+ contentVisibilityAuto: !0,
969
+ visibilityProperty: !0,
970
+ checkVisibilityCSS: !0
971
+ });
972
+ if (getComputedStyle(e).visibility === "hidden") return !0;
973
+ var i = I.call(e, "details>summary:first-of-type") ? e.parentElement : e;
974
+ if (I.call(i, "details:not([open]) *")) return !0;
975
+ if (!n || n === "full" || n === "full-native" || n === "legacy-full") {
976
+ if (typeof r == "function") {
977
+ for (var a = e; e;) {
978
+ var o = e.parentElement, s = Jt(e);
979
+ if (o && !o.shadowRoot && r(o) === !0) return fn(e);
980
+ e = e.assignedSlot ? e.assignedSlot : !o && s !== e.ownerDocument ? s.host : o;
981
+ }
982
+ e = a;
983
+ }
984
+ if (dn(e)) return !e.getClientRects().length;
985
+ if (n !== "legacy-full") return !0;
986
+ } else if (n === "non-zero-area") return fn(e);
987
+ return !1;
988
+ }, mn = function(e) {
989
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)) for (var t = e.parentElement; t;) {
990
+ if (t.tagName === "FIELDSET" && t.disabled) {
991
+ for (var n = 0; n < t.children.length; n++) {
992
+ var r = t.children.item(n);
993
+ if (r.tagName === "LEGEND") return I.call(t, "fieldset[disabled] *") ? !0 : !r.contains(e);
994
+ }
995
+ return !0;
996
+ }
997
+ t = t.parentElement;
998
+ }
999
+ return !1;
1000
+ }, hn = function(e, t) {
1001
+ return !(t.disabled || an(t) || pn(t, e) || on(t) || mn(t));
1002
+ }, gn = function(e, t) {
1003
+ return !(un(t) || en(t) < 0 || !hn(e, t));
1004
+ }, _n = function(e) {
1005
+ var t = parseInt(e.getAttribute("tabindex"), 10);
1006
+ return !!(isNaN(t) || t >= 0);
1007
+ }, vn = function(e) {
1008
+ var t = [], n = [];
1009
+ return e.forEach(function(e, r) {
1010
+ var i = !!e.scopeParent, a = i ? e.scopeParent : e, o = tn(a, i), s = i ? vn(e.candidates) : a;
1011
+ o === 0 ? i ? t.push.apply(t, s) : t.push(a) : n.push({
1012
+ documentOrder: r,
1013
+ tabIndex: o,
1014
+ item: e,
1015
+ isScope: i,
1016
+ content: s
1017
+ });
1018
+ }), n.sort(nn).reduce(function(e, t) {
1019
+ return t.isScope ? e.push.apply(e, t.content) : e.push(t.content), e;
1020
+ }, []).concat(t);
1021
+ }, yn = function(e, t) {
1022
+ return t ||= {}, vn(t.getShadowRoot ? Qt([e], t.includeContainer, {
1023
+ filter: gn.bind(null, t),
1024
+ flatten: !1,
1025
+ getShadowRoot: t.getShadowRoot,
1026
+ shadowRootFilter: _n
1027
+ }) : Zt(e, t.includeContainer, gn.bind(null, t)));
1028
+ }, bn = function(e, t) {
1029
+ return t ||= {}, t.getShadowRoot ? Qt([e], t.includeContainer, {
1030
+ filter: hn.bind(null, t),
1031
+ flatten: !0,
1032
+ getShadowRoot: t.getShadowRoot
1033
+ }) : Zt(e, t.includeContainer, hn.bind(null, t));
1034
+ }, xn = function(e, t) {
1035
+ if (t ||= {}, !e) throw Error("No node provided");
1036
+ return I.call(e, Kt) === !1 ? !1 : gn(t, e);
1037
+ }, Sn = /* #__PURE__ */ Gt.concat("iframe:not([inert]):not([inert] *)").join(","), Cn = function(e, t) {
1038
+ if (t ||= {}, !e) throw Error("No node provided");
1039
+ return I.call(e, Sn) === !1 ? !1 : hn(t, e);
1040
+ };
1041
+ //#endregion
1042
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/tabbable.js
1043
+ function wn() {
1044
+ return {
1045
+ getShadowRoot: !0,
1046
+ displayCheck: typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
1047
+ };
1048
+ }
1049
+ function Tn(e, t) {
1050
+ if (!xn(e, wn())) return En(e, t);
1051
+ let n = He(e), r = yn(n.body, wn());
1052
+ t === "prev" && r.reverse();
1053
+ let i = r.indexOf(e);
1054
+ return i === -1 ? n.body : r.slice(i + 1)[0];
1055
+ }
1056
+ function En(e, t) {
1057
+ let n = He(e);
1058
+ if (!Cn(e, wn())) return n.body;
1059
+ let r = bn(n.body, wn());
1060
+ t === "prev" && r.reverse();
1061
+ let i = r.indexOf(e);
1062
+ return i === -1 ? n.body : r.slice(i + 1).find((e) => xn(e, wn())) ?? n.body;
1063
+ }
1064
+ //#endregion
1065
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/arrays.js
1066
+ function Dn(e, t, n = !0) {
1067
+ if (!(e.length === 0 || t < 0 || t >= e.length)) return e.length === 1 && t === 0 ? e[0] : t === e.length - 1 ? n ? e[0] : void 0 : e[t + 1];
1068
+ }
1069
+ function On(e, t, n = !0) {
1070
+ if (!(e.length === 0 || t < 0 || t >= e.length)) return e.length === 1 && t === 0 ? e[0] : t === 0 ? n ? e[e.length - 1] : void 0 : e[t - 1];
1071
+ }
1072
+ function kn(e, t, n, r = !0) {
1073
+ if (e.length === 0 || t < 0 || t >= e.length) return;
1074
+ let i = t + n;
1075
+ return i = r ? (i % e.length + e.length) % e.length : Math.max(0, Math.min(i, e.length - 1)), e[i];
1076
+ }
1077
+ function An(e, t, n, r = !0) {
1078
+ if (e.length === 0 || t < 0 || t >= e.length) return;
1079
+ let i = t - n;
1080
+ return i = r ? (i % e.length + e.length) % e.length : Math.max(0, Math.min(i, e.length - 1)), e[i];
1081
+ }
1082
+ function jn(e, t, n) {
1083
+ let r = t.toLowerCase();
1084
+ if (r.endsWith(" ")) {
1085
+ let i = r.slice(0, -1);
1086
+ if (e.filter((e) => e.toLowerCase().startsWith(i)).length <= 1) return jn(e, i, n);
1087
+ let a = n?.toLowerCase();
1088
+ if (a && a.startsWith(i) && a.charAt(i.length) === " " && t.trim() === i) return n;
1089
+ let o = e.filter((e) => e.toLowerCase().startsWith(r));
1090
+ if (o.length > 0) {
1091
+ let t = n ? e.indexOf(n) : -1;
1092
+ return Mn(o, Math.max(t, 0)).find((e) => e !== n) || n;
1093
+ }
1094
+ }
1095
+ let i = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, a = i.toLowerCase(), o = n ? e.indexOf(n) : -1, s = Mn(e, Math.max(o, 0));
1096
+ i.length === 1 && (s = s.filter((e) => e !== n));
1097
+ let c = s.find((e) => e?.toLowerCase().startsWith(a));
1098
+ return c === n ? void 0 : c;
1099
+ }
1100
+ function Mn(e, t) {
1101
+ return e.map((n, r) => e[(t + r) % e.length]);
1102
+ }
1103
+ //#endregion
1104
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/noop.js
1105
+ function L() {}
1106
+ //#endregion
1107
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/box-auto-reset.svelte.js
1108
+ var Nn = {
1109
+ afterMs: 1e4,
1110
+ onChange: L
1111
+ };
1112
+ function Pn(e, n) {
1113
+ let { afterMs: r, onChange: i, getWindow: a } = {
1114
+ ...Nn,
1115
+ ...n
1116
+ }, o = null, s = t.state(t.proxy(e));
1117
+ function c() {
1118
+ return a().setTimeout(() => {
1119
+ t.set(s, e, !0), i?.(e);
1120
+ }, r);
1121
+ }
1122
+ return t.user_effect(() => () => {
1123
+ o && a().clearTimeout(o);
1124
+ }), v(() => t.get(s), (e) => {
1125
+ t.set(s, e, !0), i?.(e), o && a().clearTimeout(o), o = c();
1126
+ });
1127
+ }
1128
+ //#endregion
1129
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/dom-typeahead.svelte.js
1130
+ var Fn = class {
1131
+ #e;
1132
+ #t;
1133
+ #n = t.derived(() => this.#e.onMatch ? this.#e.onMatch : (e) => e.focus());
1134
+ #r = t.derived(() => this.#e.getCurrentItem ? this.#e.getCurrentItem : this.#e.getActiveElement);
1135
+ constructor(e) {
1136
+ this.#e = e, this.#t = Pn("", {
1137
+ afterMs: 1e3,
1138
+ getWindow: e.getWindow
1139
+ }), this.handleTypeaheadSearch = this.handleTypeaheadSearch.bind(this), this.resetTypeahead = this.resetTypeahead.bind(this);
1140
+ }
1141
+ handleTypeaheadSearch(e, n) {
1142
+ if (!n.length) return;
1143
+ this.#t.current = this.#t.current + e;
1144
+ let r = t.get(this.#r)(), i = n.find((e) => e === r)?.textContent?.trim() ?? "", a = jn(n.map((e) => e.textContent?.trim() ?? ""), this.#t.current, i), o = n.find((e) => e.textContent?.trim() === a);
1145
+ return o && t.get(this.#n)(o), o;
1146
+ }
1147
+ resetTypeahead() {
1148
+ this.#t.current = "";
1149
+ }
1150
+ get search() {
1151
+ return this.#t.current;
1152
+ }
1153
+ };
1154
+ //#endregion
1155
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/locale.js
1156
+ function In(e) {
1157
+ return window.getComputedStyle(e).getPropertyValue("direction");
1158
+ }
1159
+ //#endregion
1160
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/get-directional-keys.js
1161
+ var Ln = [
1162
+ lt,
1163
+ bt,
1164
+ _t
1165
+ ], Rn = [
1166
+ ft,
1167
+ yt,
1168
+ "End"
1169
+ ];
1170
+ [...Ln, ...Rn];
1171
+ function zn(e = "ltr", t = "horizontal") {
1172
+ return {
1173
+ horizontal: e === "rtl" ? ut : dt,
1174
+ vertical: lt
1175
+ }[t];
1176
+ }
1177
+ function Bn(e = "ltr", t = "horizontal") {
1178
+ return {
1179
+ horizontal: e === "rtl" ? dt : ut,
1180
+ vertical: ft
1181
+ }[t];
1182
+ }
1183
+ function Vn(e = "ltr", t = "horizontal") {
1184
+ return ["ltr", "rtl"].includes(e) || (e = "ltr"), ["horizontal", "vertical"].includes(t) || (t = "horizontal"), {
1185
+ nextKey: zn(e, t),
1186
+ prevKey: Bn(e, t)
1187
+ };
1188
+ }
1189
+ //#endregion
1190
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/roving-focus-group.js
1191
+ var Hn = class {
1192
+ #e;
1193
+ #t = T(null);
1194
+ constructor(e) {
1195
+ this.#e = e;
1196
+ }
1197
+ getCandidateNodes() {
1198
+ return this.#e.rootNode.current ? this.#e.candidateSelector ? Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)) : this.#e.candidateAttr ? Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)) : [] : [];
1199
+ }
1200
+ focusFirstCandidate() {
1201
+ let e = this.getCandidateNodes();
1202
+ e.length && e[0]?.focus();
1203
+ }
1204
+ handleKeydown(e, t, n = !1) {
1205
+ let r = this.#e.rootNode.current;
1206
+ if (!r || !e) return;
1207
+ let i = this.getCandidateNodes();
1208
+ if (!i.length) return;
1209
+ let a = i.indexOf(e), { nextKey: o, prevKey: s } = Vn(In(r), this.#e.orientation.current), c = this.#e.loop.current, l = {
1210
+ [o]: a + 1,
1211
+ [s]: a - 1,
1212
+ [_t]: 0,
1213
+ End: i.length - 1
1214
+ };
1215
+ if (n) {
1216
+ let e = o === "ArrowDown" ? dt : lt, t = s === "ArrowUp" ? ut : ft;
1217
+ l[e] = a + 1, l[t] = a - 1;
1218
+ }
1219
+ let u = l[t.key];
1220
+ if (u === void 0) return;
1221
+ t.preventDefault(), u < 0 && c ? u = i.length - 1 : u === i.length && c && (u = 0);
1222
+ let d = i[u];
1223
+ if (d) return d.focus(), this.#t.current = d.id, this.#e.onCandidateFocus?.(d), d;
1224
+ }
1225
+ getTabIndex(e) {
1226
+ let t = this.getCandidateNodes(), n = this.#t.current !== null;
1227
+ return e && !n && t[0] === e ? (this.#t.current = e.id, 0) : e?.id === this.#t.current ? 0 : -1;
1228
+ }
1229
+ setCurrentTabStopId(e) {
1230
+ this.#t.current = e;
1231
+ }
1232
+ focusCurrentTabStop() {
1233
+ let e = this.#t.current;
1234
+ if (!e) return;
1235
+ let t = this.#e.rootNode.current?.querySelector(`#${e}`);
1236
+ !t || !F(t) || t.focus();
1237
+ }
1238
+ }, Un = class {
1239
+ #e;
1240
+ #t = null;
1241
+ #n = null;
1242
+ #r = 0;
1243
+ constructor(e) {
1244
+ this.#e = e, k(() => this.#i());
1245
+ }
1246
+ #i() {
1247
+ this.#t !== null && (window.cancelAnimationFrame(this.#t), this.#t = null), this.#n?.disconnect(), this.#n = null, this.#r++;
1248
+ }
1249
+ run(e) {
1250
+ this.#i();
1251
+ let t = this.#e.ref.current;
1252
+ if (!t) return;
1253
+ if (typeof t.getAnimations != "function") {
1254
+ this.#a(e);
1255
+ return;
1256
+ }
1257
+ let n = this.#r, r = () => {
1258
+ n === this.#r && this.#a(e);
1259
+ }, i = () => {
1260
+ if (n !== this.#r) return;
1261
+ let e = t.getAnimations();
1262
+ if (e.length === 0) {
1263
+ r();
1264
+ return;
1265
+ }
1266
+ Promise.all(e.map((e) => e.finished)).then(() => {
1267
+ r();
1268
+ }).catch(() => {
1269
+ if (n === this.#r) {
1270
+ if (t.getAnimations().some((e) => e.pending || e.playState !== "finished")) {
1271
+ i();
1272
+ return;
1273
+ }
1274
+ r();
1275
+ }
1276
+ });
1277
+ }, a = () => {
1278
+ this.#t = window.requestAnimationFrame(() => {
1279
+ this.#t = null, i();
1280
+ });
1281
+ };
1282
+ if (!this.#e.afterTick.current) {
1283
+ a();
1284
+ return;
1285
+ }
1286
+ this.#t = window.requestAnimationFrame(() => {
1287
+ this.#t = null;
1288
+ let e = "data-starting-style";
1289
+ if (!t.hasAttribute(e)) {
1290
+ a();
1291
+ return;
1292
+ }
1293
+ this.#n = new MutationObserver(() => {
1294
+ n === this.#r && (t.hasAttribute(e) || (this.#n?.disconnect(), this.#n = null, a()));
1295
+ }), this.#n.observe(t, {
1296
+ attributes: !0,
1297
+ attributeFilter: [e]
1298
+ });
1299
+ });
1300
+ }
1301
+ #a(e) {
1302
+ let t = () => {
1303
+ e();
1304
+ };
1305
+ this.#e.afterTick ? A(t) : t();
1306
+ }
1307
+ }, Wn = class {
1308
+ #e;
1309
+ #t;
1310
+ #n;
1311
+ #r = t.state(!1);
1312
+ #i = t.state(void 0);
1313
+ #a = !1;
1314
+ #o = null;
1315
+ constructor(e) {
1316
+ this.#e = e, t.set(this.#r, e.open.current, !0), this.#t = e.enabled ?? !0, this.#n = new Un({
1317
+ ref: this.#e.ref,
1318
+ afterTick: this.#e.open
1319
+ }), k(() => this.#s()), N(() => this.#e.open.current, (e) => {
1320
+ if (!this.#a) {
1321
+ this.#a = !0;
1322
+ return;
1323
+ }
1324
+ if (this.#s(), !e && this.#e.shouldSkipExitAnimation?.()) {
1325
+ t.set(this.#r, !1), t.set(this.#i, void 0), this.#e.onComplete?.();
1326
+ return;
1327
+ }
1328
+ if (e && t.set(this.#r, !0), t.set(this.#i, e ? "starting" : "ending", !0), e && (this.#o = window.requestAnimationFrame(() => {
1329
+ this.#o = null, this.#e.open.current && t.set(this.#i, void 0);
1330
+ })), !this.#t) {
1331
+ e || t.set(this.#r, !1), t.set(this.#i, void 0), this.#e.onComplete?.();
1332
+ return;
1333
+ }
1334
+ this.#n.run(() => {
1335
+ e === this.#e.open.current && (this.#e.open.current || t.set(this.#r, !1), t.set(this.#i, void 0), this.#e.onComplete?.());
1336
+ });
1337
+ });
1338
+ }
1339
+ get shouldRender() {
1340
+ return t.get(this.#r);
1341
+ }
1342
+ get transitionStatus() {
1343
+ return t.get(this.#i);
1344
+ }
1345
+ #s() {
1346
+ this.#o !== null && (window.cancelAnimationFrame(this.#o), this.#o = null);
1347
+ }
1348
+ }, Gn = "data-context-menu-trigger", Kn = "data-context-menu-content", qn = new M("Menu.Root"), Jn = new M("Menu.Root | Menu.Sub"), Yn = new M("Menu.Content"), Xn = new M("Menu.Group | Menu.RadioGroup");
1349
+ new M("Menu.RadioGroup"), new M("Menu.CheckboxGroup");
1350
+ var Zn = new Ft("bitsmenuopen", {
1351
+ bubbles: !1,
1352
+ cancelable: !0
1353
+ }), Qn = Ht({
1354
+ component: "menu",
1355
+ parts: [
1356
+ "trigger",
1357
+ "content",
1358
+ "sub-trigger",
1359
+ "item",
1360
+ "group",
1361
+ "group-heading",
1362
+ "checkbox-group",
1363
+ "checkbox-item",
1364
+ "radio-group",
1365
+ "radio-item",
1366
+ "separator",
1367
+ "sub-content",
1368
+ "arrow"
1369
+ ]
1370
+ }), $n = class {
1371
+ #e;
1372
+ #t = null;
1373
+ #n = null;
1374
+ #r = !1;
1375
+ #i = null;
1376
+ #a = null;
1377
+ #o = null;
1378
+ #s = null;
1379
+ constructor(e) {
1380
+ this.#e = e, N([
1381
+ e.triggerNode,
1382
+ e.contentNode,
1383
+ e.enabled
1384
+ ], ([e, t, n]) => {
1385
+ if (this.#_(), !e || !t || !n) return;
1386
+ let r = (e) => {
1387
+ P(e) && (this.#s = {
1388
+ x: e.clientX,
1389
+ y: e.clientY
1390
+ }, this.#r || this.#d(e, "content"));
1391
+ }, i = (e) => {
1392
+ P(e) && this.#f(e, "content");
1393
+ }, a = (e) => {
1394
+ P(e) && (this.#r || this.#d(e, "trigger"));
1395
+ }, o = (e) => {
1396
+ if (P(e)) {
1397
+ if (kt(e.relatedTarget)) {
1398
+ let n = this.#e.subContentSelector(), r = e.relatedTarget.closest(n);
1399
+ if (r && r !== t && r.id && t.querySelector(`[aria-controls="${r.id}"]`)) return;
1400
+ }
1401
+ this.#f(e, "trigger");
1402
+ }
1403
+ }, s = (e) => {
1404
+ P(e) && this.#m();
1405
+ }, c = (e) => {
1406
+ P(e) && this.#m();
1407
+ };
1408
+ return e.addEventListener("pointermove", r), e.addEventListener("pointerleave", i), e.addEventListener("pointerenter", s), t.addEventListener("pointermove", a), t.addEventListener("pointerleave", o), t.addEventListener("pointerenter", c), () => {
1409
+ e.removeEventListener("pointermove", r), e.removeEventListener("pointerleave", i), e.removeEventListener("pointerenter", s), t.removeEventListener("pointermove", a), t.removeEventListener("pointerleave", o), t.removeEventListener("pointerenter", c), this.#_();
1410
+ };
1411
+ }), k(() => {
1412
+ this.#_();
1413
+ });
1414
+ }
1415
+ #c() {
1416
+ let e = this.#e.parentContentNode();
1417
+ return e ? e.getBoundingClientRect() : this.#e.triggerNode()?.getBoundingClientRect() ?? null;
1418
+ }
1419
+ #l(e, t) {
1420
+ let n = this.#e.triggerNode(), r = this.#e.contentNode();
1421
+ if (!n || !r) return null;
1422
+ let i = n.getBoundingClientRect(), a = r.getBoundingClientRect(), o = rr(i, a), s, c, l;
1423
+ return t === "content" ? (s = this.#r ? this.#a ?? e : e, c = a) : (s = this.#s ?? e, c = this.#c() ?? i, l = a), this.#a = s, {
1424
+ corridor: ir(i, a, o),
1425
+ intent: ar(s, c, o, t, l),
1426
+ targetRect: c,
1427
+ side: o
1428
+ };
1429
+ }
1430
+ #u(e, t, n) {
1431
+ return er(e, t) || er(e, n);
1432
+ }
1433
+ #d(e, t) {
1434
+ let n = {
1435
+ x: e.clientX,
1436
+ y: e.clientY
1437
+ };
1438
+ this.#l(n, t) && (this.#i = t, this.#o = n);
1439
+ }
1440
+ #f(e, t) {
1441
+ if (!this.#e.enabled()) return;
1442
+ let n = this.#e.triggerNode(), r = this.#e.contentNode();
1443
+ if (!n || !r) return;
1444
+ let i = e.relatedTarget;
1445
+ if (kt(i) && (t === "content" && r.contains(i) || t === "trigger" && n.contains(i))) return;
1446
+ let a = {
1447
+ x: e.clientX,
1448
+ y: e.clientY
1449
+ }, o = this.#l(a, t);
1450
+ if (o) {
1451
+ if (!tr(a, o.targetRect) && !this.#u(a, o.corridor, o.intent)) {
1452
+ this.#w();
1453
+ return;
1454
+ }
1455
+ this.#r = !0, this.#i = t, this.#o = a, this.#e.setIsPointerInTransit(!0), this.#b(), this.#S();
1456
+ }
1457
+ }
1458
+ #p = null;
1459
+ #m() {
1460
+ if (!this.#r) return;
1461
+ let e = this.#i === "trigger";
1462
+ this.#x(), this.#C(), this.#r = !1, this.#w(), e ? (this.#h(), this.#p = setTimeout(() => {
1463
+ this.#p = null, this.#e.setIsPointerInTransit(!1);
1464
+ }, 100)) : this.#e.setIsPointerInTransit(!1);
1465
+ }
1466
+ #h() {
1467
+ this.#p !== null && (clearTimeout(this.#p), this.#p = null);
1468
+ }
1469
+ #g() {
1470
+ let e = this.#o;
1471
+ this.#x(), this.#C(), this.#h(), this.#r = !1, this.#e.setIsPointerInTransit(!1), this.#w(), this.#e.onIntentExit(e);
1472
+ }
1473
+ #_() {
1474
+ this.#x(), this.#C(), this.#h(), this.#r && this.#e.setIsPointerInTransit(!1), this.#r = !1, this.#i = null, this.#a = null, this.#o = null, this.#s = null;
1475
+ }
1476
+ #v(e) {
1477
+ let t = this.#e.contentNode();
1478
+ if (!t) return !1;
1479
+ let n = t.ownerDocument.elementFromPoint(e.x, e.y);
1480
+ if (!n) return !1;
1481
+ let r = this.#e.subContentSelector(), i = n.closest(r);
1482
+ return !i || i === t ? !1 : i.id ? !!t.querySelector(`[aria-controls="${i.id}"]`) : !1;
1483
+ }
1484
+ #y = (e) => {
1485
+ if (!this.#r || !this.#i || !P(e)) return;
1486
+ let t = this.#e.triggerNode(), n = this.#e.contentNode();
1487
+ if (!t || !n) {
1488
+ this.#g();
1489
+ return;
1490
+ }
1491
+ this.#C();
1492
+ let r = {
1493
+ x: e.clientX,
1494
+ y: e.clientY
1495
+ };
1496
+ this.#o = r;
1497
+ let i = t.getBoundingClientRect(), a = n.getBoundingClientRect();
1498
+ if (this.#i === "content" && tr(r, a)) {
1499
+ this.#m();
1500
+ return;
1501
+ }
1502
+ if (this.#i === "trigger" && nr(r, i, 4)) {
1503
+ this.#m();
1504
+ return;
1505
+ }
1506
+ if (this.#v(r)) {
1507
+ this.#S();
1508
+ return;
1509
+ }
1510
+ let o = this.#l(r, this.#i);
1511
+ if (!o) {
1512
+ this.#g();
1513
+ return;
1514
+ }
1515
+ if (this.#u(r, o.corridor, o.intent)) {
1516
+ this.#S();
1517
+ return;
1518
+ }
1519
+ this.#g();
1520
+ };
1521
+ #b() {
1522
+ if (this.#t) return;
1523
+ let e = He(this.#e.triggerNode() ?? this.#e.contentNode());
1524
+ e && (e.addEventListener("pointermove", this.#y, !0), this.#t = () => {
1525
+ e.removeEventListener("pointermove", this.#y, !0), this.#t = null;
1526
+ });
1527
+ }
1528
+ #x() {
1529
+ this.#t?.();
1530
+ }
1531
+ #S() {
1532
+ this.#C(), this.#n = setTimeout(() => {
1533
+ this.#n = null, this.#r && this.#g();
1534
+ }, 500);
1535
+ }
1536
+ #C() {
1537
+ this.#n !== null && (clearTimeout(this.#n), this.#n = null);
1538
+ }
1539
+ #w() {
1540
+ this.#i = null, this.#a = null, this.#o = null;
1541
+ }
1542
+ };
1543
+ function er(e, t) {
1544
+ let { x: n, y: r } = e, i = !1;
1545
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
1546
+ let o = t[e].x, s = t[e].y, c = t[a].x, l = t[a].y;
1547
+ s > r != l > r && n < (c - o) * (r - s) / (l - s) + o && (i = !i);
1548
+ }
1549
+ return i;
1550
+ }
1551
+ function tr(e, t) {
1552
+ return e.x >= t.left && e.x <= t.right && e.y >= t.top && e.y <= t.bottom;
1553
+ }
1554
+ function nr(e, t, n) {
1555
+ return e.x >= t.left + n && e.x <= t.right - n && e.y >= t.top + n && e.y <= t.bottom - n;
1556
+ }
1557
+ function rr(e, t) {
1558
+ let n = e.left + e.width / 2, r = e.top + e.height / 2, i = t.left + t.width / 2, a = t.top + t.height / 2, o = i - n, s = a - r;
1559
+ return Math.abs(o) > Math.abs(s) ? o > 0 ? "right" : "left" : s > 0 ? "bottom" : "top";
1560
+ }
1561
+ function ir(e, t, n) {
1562
+ switch (n) {
1563
+ case "top": return [
1564
+ {
1565
+ x: Math.min(e.left, t.left) - 2,
1566
+ y: e.top
1567
+ },
1568
+ {
1569
+ x: Math.min(e.left, t.left) - 2,
1570
+ y: t.bottom
1571
+ },
1572
+ {
1573
+ x: Math.max(e.right, t.right) + 2,
1574
+ y: t.bottom
1575
+ },
1576
+ {
1577
+ x: Math.max(e.right, t.right) + 2,
1578
+ y: e.top
1579
+ }
1580
+ ];
1581
+ case "bottom": return [
1582
+ {
1583
+ x: Math.min(e.left, t.left) - 2,
1584
+ y: e.bottom
1585
+ },
1586
+ {
1587
+ x: Math.min(e.left, t.left) - 2,
1588
+ y: t.top
1589
+ },
1590
+ {
1591
+ x: Math.max(e.right, t.right) + 2,
1592
+ y: t.top
1593
+ },
1594
+ {
1595
+ x: Math.max(e.right, t.right) + 2,
1596
+ y: e.bottom
1597
+ }
1598
+ ];
1599
+ case "left": return [
1600
+ {
1601
+ x: e.left,
1602
+ y: Math.min(e.top, t.top) - 2
1603
+ },
1604
+ {
1605
+ x: t.right,
1606
+ y: Math.min(e.top, t.top) - 2
1607
+ },
1608
+ {
1609
+ x: t.right,
1610
+ y: Math.max(e.bottom, t.bottom) + 2
1611
+ },
1612
+ {
1613
+ x: e.left,
1614
+ y: Math.max(e.bottom, t.bottom) + 2
1615
+ }
1616
+ ];
1617
+ case "right": return [
1618
+ {
1619
+ x: e.right,
1620
+ y: Math.min(e.top, t.top) - 2
1621
+ },
1622
+ {
1623
+ x: t.left,
1624
+ y: Math.min(e.top, t.top) - 2
1625
+ },
1626
+ {
1627
+ x: t.left,
1628
+ y: Math.max(e.bottom, t.bottom) + 2
1629
+ },
1630
+ {
1631
+ x: e.right,
1632
+ y: Math.max(e.bottom, t.bottom) + 2
1633
+ }
1634
+ ];
1635
+ }
1636
+ }
1637
+ function ar(e, t, n, r, i) {
1638
+ let a = r === "trigger" ? or(n) : n, o = i ? Math.min(t.top, i.top) - 8 : t.top - 8, s = i ? Math.max(t.bottom, i.bottom) + 8 : t.bottom + 8, c = i ? Math.min(t.left, i.left) - 8 : t.left - 8, l = i ? Math.max(t.right, i.right) + 8 : t.right + 8;
1639
+ switch (a) {
1640
+ case "right": return [
1641
+ e,
1642
+ {
1643
+ x: t.left,
1644
+ y: o
1645
+ },
1646
+ {
1647
+ x: t.left,
1648
+ y: s
1649
+ }
1650
+ ];
1651
+ case "left": return [
1652
+ e,
1653
+ {
1654
+ x: t.right,
1655
+ y: o
1656
+ },
1657
+ {
1658
+ x: t.right,
1659
+ y: s
1660
+ }
1661
+ ];
1662
+ case "bottom": return [
1663
+ e,
1664
+ {
1665
+ x: c,
1666
+ y: t.top
1667
+ },
1668
+ {
1669
+ x: l,
1670
+ y: t.top
1671
+ }
1672
+ ];
1673
+ case "top": return [
1674
+ e,
1675
+ {
1676
+ x: c,
1677
+ y: t.bottom
1678
+ },
1679
+ {
1680
+ x: l,
1681
+ y: t.bottom
1682
+ }
1683
+ ];
1684
+ }
1685
+ }
1686
+ function or(e) {
1687
+ switch (e) {
1688
+ case "top": return "bottom";
1689
+ case "bottom": return "top";
1690
+ case "left": return "right";
1691
+ case "right": return "left";
1692
+ }
1693
+ }
1694
+ var sr = class e {
1695
+ static create(t) {
1696
+ let n = new e(t);
1697
+ return qn.set(n);
1698
+ }
1699
+ opts;
1700
+ isUsingKeyboard = new Wt();
1701
+ #e = t.state(!1);
1702
+ get ignoreCloseAutoFocus() {
1703
+ return t.get(this.#e);
1704
+ }
1705
+ set ignoreCloseAutoFocus(e) {
1706
+ t.set(this.#e, e, !0);
1707
+ }
1708
+ #t = t.state(!1);
1709
+ get isPointerInTransit() {
1710
+ return t.get(this.#t);
1711
+ }
1712
+ set isPointerInTransit(e) {
1713
+ t.set(this.#t, e, !0);
1714
+ }
1715
+ constructor(e) {
1716
+ this.opts = e;
1717
+ }
1718
+ getBitsAttr = (e) => Qn.getAttr(e, this.opts.variant.current);
1719
+ }, cr = class e {
1720
+ static create(t, n) {
1721
+ return Jn.set(new e(t, n, null));
1722
+ }
1723
+ opts;
1724
+ root;
1725
+ parentMenu;
1726
+ contentId = v(() => "");
1727
+ #e = t.state(null);
1728
+ get contentNode() {
1729
+ return t.get(this.#e);
1730
+ }
1731
+ set contentNode(e) {
1732
+ t.set(this.#e, e, !0);
1733
+ }
1734
+ contentPresence;
1735
+ #t = t.state(null);
1736
+ get triggerNode() {
1737
+ return t.get(this.#t);
1738
+ }
1739
+ set triggerNode(e) {
1740
+ t.set(this.#t, e, !0);
1741
+ }
1742
+ constructor(e, t, n) {
1743
+ this.opts = e, this.root = t, this.parentMenu = n, this.contentPresence = new Wn({
1744
+ ref: v(() => this.contentNode),
1745
+ open: this.opts.open,
1746
+ onComplete: () => {
1747
+ this.opts.onOpenChangeComplete.current(this.opts.open.current);
1748
+ },
1749
+ shouldSkipExitAnimation: () => this.root.opts.variant.current !== "menubar" || this.parentMenu !== null ? !1 : this.root.opts.shouldSkipExitAnimation?.() ?? !1
1750
+ }), n && N(() => n.opts.open.current, () => {
1751
+ n.opts.open.current || (this.opts.open.current = !1);
1752
+ });
1753
+ }
1754
+ toggleOpen() {
1755
+ this.opts.open.current = !this.opts.open.current;
1756
+ }
1757
+ onOpen() {
1758
+ this.opts.open.current = !0;
1759
+ }
1760
+ onClose() {
1761
+ this.opts.open.current = !1;
1762
+ }
1763
+ }, lr = class e {
1764
+ static create(t) {
1765
+ return Yn.set(new e(t, Jn.get()));
1766
+ }
1767
+ opts;
1768
+ parentMenu;
1769
+ rovingFocusGroup;
1770
+ domContext;
1771
+ attachment;
1772
+ #e = t.state("");
1773
+ get search() {
1774
+ return t.get(this.#e);
1775
+ }
1776
+ set search(e) {
1777
+ t.set(this.#e, e, !0);
1778
+ }
1779
+ #t = 0;
1780
+ #n;
1781
+ #r = t.state(!1);
1782
+ get mounted() {
1783
+ return t.get(this.#r);
1784
+ }
1785
+ set mounted(e) {
1786
+ t.set(this.#r, e, !0);
1787
+ }
1788
+ #i;
1789
+ constructor(e, n) {
1790
+ this.opts = e, this.parentMenu = n, this.domContext = new Ge(e.ref), this.attachment = j(this.opts.ref, (e) => {
1791
+ this.parentMenu.contentNode !== e && (this.parentMenu.contentNode = e);
1792
+ }), n.contentId = e.id, this.#i = e.isSub ?? !1, this.onkeydown = this.onkeydown.bind(this), this.onblur = this.onblur.bind(this), this.onfocus = this.onfocus.bind(this), this.handleInteractOutside = this.handleInteractOutside.bind(this), new $n({
1793
+ contentNode: () => this.parentMenu.contentNode,
1794
+ triggerNode: () => this.parentMenu.triggerNode,
1795
+ parentContentNode: () => this.parentMenu.parentMenu?.contentNode ?? null,
1796
+ subContentSelector: () => `[${this.parentMenu.root.getBitsAttr("sub-content")}]`,
1797
+ enabled: () => this.parentMenu.opts.open.current && !!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),
1798
+ onIntentExit: (e) => {
1799
+ this.parentMenu.opts.open.current = !1, this.#s(e);
1800
+ },
1801
+ setIsPointerInTransit: (e) => {
1802
+ this.parentMenu.root.isPointerInTransit = e;
1803
+ }
1804
+ }), this.#n = new Fn({
1805
+ getActiveElement: () => this.domContext.getActiveElement(),
1806
+ getWindow: () => this.domContext.getWindow()
1807
+ }).handleTypeaheadSearch, this.rovingFocusGroup = new Hn({
1808
+ rootNode: v(() => this.parentMenu.contentNode),
1809
+ candidateAttr: this.parentMenu.root.getBitsAttr("item"),
1810
+ loop: this.opts.loop,
1811
+ orientation: v(() => "vertical")
1812
+ }), N(() => this.parentMenu.contentNode, (e) => e ? Zn.listen(e, () => {
1813
+ A(() => {
1814
+ this.parentMenu.root.isUsingKeyboard.current && this.rovingFocusGroup.focusFirstCandidate();
1815
+ });
1816
+ }) : void 0), t.user_effect(() => {
1817
+ this.parentMenu.opts.open.current || this.domContext.getWindow().clearTimeout(this.#t);
1818
+ });
1819
+ }
1820
+ #a() {
1821
+ let e = this.parentMenu.contentNode;
1822
+ return e ? Array.from(e.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)) : [];
1823
+ }
1824
+ #o() {
1825
+ return this.parentMenu.root.isPointerInTransit;
1826
+ }
1827
+ #s(e) {
1828
+ if (!e) return;
1829
+ let t = this.parentMenu.parentMenu?.contentNode;
1830
+ if (!t) return;
1831
+ let n = this.domContext.getDocument().elementFromPoint(e.x, e.y);
1832
+ if (!kt(n)) return;
1833
+ let r = n.closest(`[${this.parentMenu.root.getBitsAttr("sub-trigger")}]`);
1834
+ !r || !t.contains(r) || r !== this.parentMenu.triggerNode && r.dispatchEvent(new PointerEvent("pointermove", {
1835
+ bubbles: !0,
1836
+ cancelable: !0,
1837
+ pointerType: "mouse",
1838
+ clientX: e.x,
1839
+ clientY: e.y
1840
+ }));
1841
+ }
1842
+ onCloseAutoFocus = (e) => {
1843
+ if (this.opts.onCloseAutoFocus.current?.(e), !(e.defaultPrevented || this.#i)) {
1844
+ if (this.parentMenu.root.ignoreCloseAutoFocus) {
1845
+ e.preventDefault();
1846
+ return;
1847
+ }
1848
+ this.parentMenu.triggerNode && xn(this.parentMenu.triggerNode) && (e.preventDefault(), this.parentMenu.triggerNode.focus());
1849
+ }
1850
+ };
1851
+ handleTabKeyDown(e) {
1852
+ let t = this.parentMenu;
1853
+ for (; t.parentMenu !== null;) t = t.parentMenu;
1854
+ if (!t.triggerNode) return;
1855
+ e.preventDefault();
1856
+ let n = Tn(t.triggerNode, e.shiftKey ? "prev" : "next");
1857
+ n ? (this.parentMenu.root.ignoreCloseAutoFocus = !0, t.onClose(), A(() => {
1858
+ n.focus(), A(() => {
1859
+ this.parentMenu.root.ignoreCloseAutoFocus = !1;
1860
+ });
1861
+ })) : this.domContext.getDocument().body.focus();
1862
+ }
1863
+ onkeydown(e) {
1864
+ if (e.defaultPrevented) return;
1865
+ if (e.key === "Tab") {
1866
+ this.handleTabKeyDown(e);
1867
+ return;
1868
+ }
1869
+ let t = e.target, n = e.currentTarget;
1870
+ if (!F(t) || !F(n)) return;
1871
+ let r = t.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id === this.parentMenu.contentId.current, i = e.ctrlKey || e.altKey || e.metaKey, a = e.key.length === 1;
1872
+ if (this.rovingFocusGroup.handleKeydown(t, e) || e.code === "Space") return;
1873
+ let o = this.#a();
1874
+ r && !i && a && this.#n(e.key, o), e.target?.id === this.parentMenu.contentId.current && Tt.includes(e.key) && (e.preventDefault(), wt.includes(e.key) && o.reverse(), Pt(o, { select: !1 }, () => this.domContext.getActiveElement()));
1875
+ }
1876
+ onblur(e) {
1877
+ kt(e.currentTarget) && kt(e.target) && (e.currentTarget.contains?.(e.target) || (this.domContext.getWindow().clearTimeout(this.#t), this.search = ""));
1878
+ }
1879
+ onfocus(e) {
1880
+ this.parentMenu.root.isUsingKeyboard.current && A(() => this.rovingFocusGroup.focusFirstCandidate());
1881
+ }
1882
+ onItemEnter() {
1883
+ return this.#o();
1884
+ }
1885
+ onItemLeave(e) {
1886
+ e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")) || this.#o() || this.parentMenu.root.isUsingKeyboard.current || (this.parentMenu.contentNode?.focus({ preventScroll: !0 }), this.rovingFocusGroup.setCurrentTabStopId(""));
1887
+ }
1888
+ onTriggerLeave() {
1889
+ return !!this.#o();
1890
+ }
1891
+ handleInteractOutside(e) {
1892
+ if (!At(e.target)) return;
1893
+ let t = this.parentMenu.triggerNode?.id;
1894
+ if (e.target.id === t) {
1895
+ e.preventDefault();
1896
+ return;
1897
+ }
1898
+ if (e.target.closest(`#${t}`)) {
1899
+ e.preventDefault();
1900
+ return;
1901
+ }
1902
+ this.parentMenu.root.ignoreCloseAutoFocus = !0, A(() => {
1903
+ this.parentMenu.root.ignoreCloseAutoFocus = !1;
1904
+ });
1905
+ }
1906
+ get shouldRender() {
1907
+ return this.parentMenu.contentPresence.shouldRender;
1908
+ }
1909
+ #c = t.derived(() => ({ open: this.parentMenu.opts.open.current }));
1910
+ get snippetProps() {
1911
+ return t.get(this.#c);
1912
+ }
1913
+ set snippetProps(e) {
1914
+ t.set(this.#c, e);
1915
+ }
1916
+ #l = t.derived(() => ({
1917
+ id: this.opts.id.current,
1918
+ role: "menu",
1919
+ "aria-orientation": "vertical",
1920
+ [this.parentMenu.root.getBitsAttr("content")]: "",
1921
+ "data-state": zt(this.parentMenu.opts.open.current),
1922
+ ...Bt(this.parentMenu.contentPresence.transitionStatus),
1923
+ onkeydown: this.onkeydown,
1924
+ onblur: this.onblur,
1925
+ onfocus: this.onfocus,
1926
+ dir: this.parentMenu.root.opts.dir.current,
1927
+ style: {
1928
+ pointerEvents: "auto",
1929
+ contain: "layout style"
1930
+ },
1931
+ ...this.attachment
1932
+ }));
1933
+ get props() {
1934
+ return t.get(this.#l);
1935
+ }
1936
+ set props(e) {
1937
+ t.set(this.#l, e);
1938
+ }
1939
+ popperProps = { onCloseAutoFocus: (e) => this.onCloseAutoFocus(e) };
1940
+ }, ur = class {
1941
+ opts;
1942
+ content;
1943
+ attachment;
1944
+ #e = t.state(!1);
1945
+ constructor(e, t) {
1946
+ this.opts = e, this.content = t, this.attachment = j(this.opts.ref), this.onpointermove = this.onpointermove.bind(this), this.onpointerleave = this.onpointerleave.bind(this), this.onfocus = this.onfocus.bind(this), this.onblur = this.onblur.bind(this);
1947
+ }
1948
+ onpointermove(e) {
1949
+ if (!e.defaultPrevented && P(e)) if (this.opts.disabled.current) this.content.onItemLeave(e);
1950
+ else {
1951
+ if (this.content.onItemEnter()) return;
1952
+ let t = e.currentTarget;
1953
+ if (!F(t)) return;
1954
+ t.focus({ preventScroll: !0 });
1955
+ }
1956
+ }
1957
+ onpointerleave(e) {
1958
+ e.defaultPrevented || P(e) && this.content.onItemLeave(e);
1959
+ }
1960
+ onfocus(e) {
1961
+ A(() => {
1962
+ e.defaultPrevented || this.opts.disabled.current || t.set(this.#e, !0);
1963
+ });
1964
+ }
1965
+ onblur(e) {
1966
+ A(() => {
1967
+ e.defaultPrevented || t.set(this.#e, !1);
1968
+ });
1969
+ }
1970
+ #t = t.derived(() => ({
1971
+ id: this.opts.id.current,
1972
+ tabindex: -1,
1973
+ role: "menuitem",
1974
+ "aria-disabled": It(this.opts.disabled.current),
1975
+ "data-disabled": Lt(this.opts.disabled.current),
1976
+ "data-highlighted": t.get(this.#e) ? "" : void 0,
1977
+ [this.content.parentMenu.root.getBitsAttr("item")]: "",
1978
+ onpointermove: this.onpointermove,
1979
+ onpointerleave: this.onpointerleave,
1980
+ onfocus: this.onfocus,
1981
+ onblur: this.onblur,
1982
+ ...this.attachment
1983
+ }));
1984
+ get props() {
1985
+ return t.get(this.#t);
1986
+ }
1987
+ set props(e) {
1988
+ t.set(this.#t, e);
1989
+ }
1990
+ }, dr = class e {
1991
+ static create(t) {
1992
+ return new e(t, new ur(t, Yn.get()));
1993
+ }
1994
+ opts;
1995
+ item;
1996
+ root;
1997
+ #e = !1;
1998
+ constructor(e, t) {
1999
+ this.opts = e, this.item = t, this.root = t.content.parentMenu.root, this.onkeydown = this.onkeydown.bind(this), this.onclick = this.onclick.bind(this), this.onpointerdown = this.onpointerdown.bind(this), this.onpointerup = this.onpointerup.bind(this);
2000
+ }
2001
+ #t() {
2002
+ if (this.item.opts.disabled.current) return;
2003
+ let e = new CustomEvent("menuitemselect", {
2004
+ bubbles: !0,
2005
+ cancelable: !0
2006
+ });
2007
+ if (this.opts.onSelect.current(e), e.defaultPrevented) {
2008
+ this.item.content.parentMenu.root.isUsingKeyboard.current = !1;
2009
+ return;
2010
+ }
2011
+ this.opts.closeOnSelect.current && this.item.content.parentMenu.root.opts.onClose();
2012
+ }
2013
+ onkeydown(e) {
2014
+ let t = this.item.content.search !== "";
2015
+ if (!(this.item.opts.disabled.current || t && e.key === " ") && St.includes(e.key)) {
2016
+ if (!F(e.currentTarget)) return;
2017
+ e.currentTarget.click(), e.preventDefault();
2018
+ }
2019
+ }
2020
+ onclick(e) {
2021
+ this.item.opts.disabled.current || this.#t();
2022
+ }
2023
+ onpointerup(e) {
2024
+ if (!e.defaultPrevented && !this.#e) {
2025
+ if (!F(e.currentTarget)) return;
2026
+ e.currentTarget?.click();
2027
+ }
2028
+ }
2029
+ onpointerdown(e) {
2030
+ this.#e = !0;
2031
+ }
2032
+ #n = t.derived(() => je(this.item.props, {
2033
+ onclick: this.onclick,
2034
+ onpointerdown: this.onpointerdown,
2035
+ onpointerup: this.onpointerup,
2036
+ onkeydown: this.onkeydown
2037
+ }));
2038
+ get props() {
2039
+ return t.get(this.#n);
2040
+ }
2041
+ set props(e) {
2042
+ t.set(this.#n, e);
2043
+ }
2044
+ }, fr = class e {
2045
+ static create(t) {
2046
+ return Xn.set(new e(t, qn.get()));
2047
+ }
2048
+ opts;
2049
+ root;
2050
+ attachment;
2051
+ #e = t.state(void 0);
2052
+ get groupHeadingId() {
2053
+ return t.get(this.#e);
2054
+ }
2055
+ set groupHeadingId(e) {
2056
+ t.set(this.#e, e, !0);
2057
+ }
2058
+ constructor(e, t) {
2059
+ this.opts = e, this.root = t, this.attachment = j(this.opts.ref);
2060
+ }
2061
+ #t = t.derived(() => ({
2062
+ id: this.opts.id.current,
2063
+ role: "group",
2064
+ "aria-labelledby": this.groupHeadingId,
2065
+ [this.root.getBitsAttr("group")]: "",
2066
+ ...this.attachment
2067
+ }));
2068
+ get props() {
2069
+ return t.get(this.#t);
2070
+ }
2071
+ set props(e) {
2072
+ t.set(this.#t, e);
2073
+ }
2074
+ }, pr = class e {
2075
+ static create(t) {
2076
+ return new e(t, qn.get());
2077
+ }
2078
+ opts;
2079
+ root;
2080
+ attachment;
2081
+ constructor(e, t) {
2082
+ this.opts = e, this.root = t, this.attachment = j(this.opts.ref);
2083
+ }
2084
+ #e = t.derived(() => ({
2085
+ id: this.opts.id.current,
2086
+ role: "group",
2087
+ [this.root.getBitsAttr("separator")]: "",
2088
+ ...this.attachment
2089
+ }));
2090
+ get props() {
2091
+ return t.get(this.#e);
2092
+ }
2093
+ set props(e) {
2094
+ t.set(this.#e, e);
2095
+ }
2096
+ }, mr = class e {
2097
+ static create(t) {
2098
+ return new e(t, Jn.get());
2099
+ }
2100
+ opts;
2101
+ parentMenu;
2102
+ attachment;
2103
+ constructor(e, t) {
2104
+ this.opts = e, this.parentMenu = t, this.attachment = j(this.opts.ref, (e) => this.parentMenu.triggerNode = e);
2105
+ }
2106
+ onclick = (e) => {
2107
+ this.opts.disabled.current || e.detail !== 0 || (this.parentMenu.toggleOpen(), e.preventDefault());
2108
+ };
2109
+ onpointerdown = (e) => {
2110
+ if (!this.opts.disabled.current) {
2111
+ if (e.pointerType === "touch") return e.preventDefault();
2112
+ e.button === 0 && e.ctrlKey === !1 && (this.parentMenu.toggleOpen(), this.parentMenu.opts.open.current || e.preventDefault());
2113
+ }
2114
+ };
2115
+ onpointerup = (e) => {
2116
+ this.opts.disabled.current || e.pointerType === "touch" && (e.preventDefault(), this.parentMenu.toggleOpen());
2117
+ };
2118
+ onkeydown = (e) => {
2119
+ if (!this.opts.disabled.current) {
2120
+ if (e.key === " " || e.key === "Enter") {
2121
+ this.parentMenu.toggleOpen(), e.preventDefault();
2122
+ return;
2123
+ }
2124
+ e.key === "ArrowDown" && (this.parentMenu.onOpen(), e.preventDefault());
2125
+ }
2126
+ };
2127
+ #e = t.derived(() => {
2128
+ if (this.parentMenu.opts.open.current && this.parentMenu.contentId.current) return this.parentMenu.contentId.current;
2129
+ });
2130
+ #t = t.derived(() => ({
2131
+ id: this.opts.id.current,
2132
+ disabled: this.opts.disabled.current,
2133
+ "aria-haspopup": "menu",
2134
+ "aria-expanded": It(this.parentMenu.opts.open.current),
2135
+ "aria-controls": t.get(this.#e),
2136
+ "data-disabled": Lt(this.opts.disabled.current),
2137
+ "data-state": zt(this.parentMenu.opts.open.current),
2138
+ [this.parentMenu.root.getBitsAttr("trigger")]: "",
2139
+ onclick: this.onclick,
2140
+ onpointerdown: this.onpointerdown,
2141
+ onpointerup: this.onpointerup,
2142
+ onkeydown: this.onkeydown,
2143
+ ...this.attachment
2144
+ }));
2145
+ get props() {
2146
+ return t.get(this.#t);
2147
+ }
2148
+ set props(e) {
2149
+ t.set(this.#t, e);
2150
+ }
2151
+ }, hr = class {
2152
+ static create(e) {
2153
+ let t = Jn.get();
2154
+ return Jn.set(new cr(e, t.root, t));
2155
+ }
2156
+ }, gr = [
2157
+ "top",
2158
+ "right",
2159
+ "bottom",
2160
+ "left"
2161
+ ], R = Math.min, z = Math.max, _r = Math.round, vr = Math.floor, B = (e) => ({
2162
+ x: e,
2163
+ y: e
2164
+ }), yr = {
2165
+ left: "right",
2166
+ right: "left",
2167
+ bottom: "top",
2168
+ top: "bottom"
2169
+ };
2170
+ function br(e, t, n) {
2171
+ return z(e, R(t, n));
2172
+ }
2173
+ function V(e, t) {
2174
+ return typeof e == "function" ? e(t) : e;
2175
+ }
2176
+ function H(e) {
2177
+ return e.split("-")[0];
2178
+ }
2179
+ function U(e) {
2180
+ return e.split("-")[1];
2181
+ }
2182
+ function xr(e) {
2183
+ return e === "x" ? "y" : "x";
2184
+ }
2185
+ function Sr(e) {
2186
+ return e === "y" ? "height" : "width";
2187
+ }
2188
+ function W(e) {
2189
+ let t = e[0];
2190
+ return t === "t" || t === "b" ? "y" : "x";
2191
+ }
2192
+ function Cr(e) {
2193
+ return xr(W(e));
2194
+ }
2195
+ function wr(e, t, n) {
2196
+ n === void 0 && (n = !1);
2197
+ let r = U(e), i = Cr(e), a = Sr(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
2198
+ return t.reference[a] > t.floating[a] && (o = Nr(o)), [o, Nr(o)];
2199
+ }
2200
+ function Tr(e) {
2201
+ let t = Nr(e);
2202
+ return [
2203
+ Er(e),
2204
+ t,
2205
+ Er(t)
2206
+ ];
2207
+ }
2208
+ function Er(e) {
2209
+ return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
2210
+ }
2211
+ var Dr = ["left", "right"], Or = ["right", "left"], kr = ["top", "bottom"], Ar = ["bottom", "top"];
2212
+ function jr(e, t, n) {
2213
+ switch (e) {
2214
+ case "top":
2215
+ case "bottom": return n ? t ? Or : Dr : t ? Dr : Or;
2216
+ case "left":
2217
+ case "right": return t ? kr : Ar;
2218
+ default: return [];
2219
+ }
2220
+ }
2221
+ function Mr(e, t, n, r) {
2222
+ let i = U(e), a = jr(H(e), n === "start", r);
2223
+ return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Er)))), a;
2224
+ }
2225
+ function Nr(e) {
2226
+ let t = H(e);
2227
+ return yr[t] + e.slice(t.length);
2228
+ }
2229
+ function Pr(e) {
2230
+ return {
2231
+ top: 0,
2232
+ right: 0,
2233
+ bottom: 0,
2234
+ left: 0,
2235
+ ...e
2236
+ };
2237
+ }
2238
+ function Fr(e) {
2239
+ return typeof e == "number" ? {
2240
+ top: e,
2241
+ right: e,
2242
+ bottom: e,
2243
+ left: e
2244
+ } : Pr(e);
2245
+ }
2246
+ function Ir(e) {
2247
+ let { x: t, y: n, width: r, height: i } = e;
2248
+ return {
2249
+ width: r,
2250
+ height: i,
2251
+ top: n,
2252
+ left: t,
2253
+ right: t + r,
2254
+ bottom: n + i,
2255
+ x: t,
2256
+ y: n
2257
+ };
2258
+ }
2259
+ //#endregion
2260
+ //#region ../node_modules/.bun/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
2261
+ function Lr(e, t, n) {
2262
+ let { reference: r, floating: i } = e, a = W(t), o = Cr(t), s = Sr(o), c = H(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
2263
+ switch (c) {
2264
+ case "top":
2265
+ p = {
2266
+ x: u,
2267
+ y: r.y - i.height
2268
+ };
2269
+ break;
2270
+ case "bottom":
2271
+ p = {
2272
+ x: u,
2273
+ y: r.y + r.height
2274
+ };
2275
+ break;
2276
+ case "right":
2277
+ p = {
2278
+ x: r.x + r.width,
2279
+ y: d
2280
+ };
2281
+ break;
2282
+ case "left":
2283
+ p = {
2284
+ x: r.x - i.width,
2285
+ y: d
2286
+ };
2287
+ break;
2288
+ default: p = {
2289
+ x: r.x,
2290
+ y: r.y
2291
+ };
2292
+ }
2293
+ switch (U(t)) {
2294
+ case "start":
2295
+ p[o] -= f * (n && l ? -1 : 1);
2296
+ break;
2297
+ case "end":
2298
+ p[o] += f * (n && l ? -1 : 1);
2299
+ break;
2300
+ }
2301
+ return p;
2302
+ }
2303
+ async function Rr(e, t) {
2304
+ t === void 0 && (t = {});
2305
+ let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = V(t, e), p = Fr(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Ir(await i.getClippingRect({
2306
+ element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
2307
+ boundary: c,
2308
+ rootBoundary: l,
2309
+ strategy: s
2310
+ })), g = u === "floating" ? {
2311
+ x: n,
2312
+ y: r,
2313
+ width: a.floating.width,
2314
+ height: a.floating.height
2315
+ } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
2316
+ x: 1,
2317
+ y: 1
2318
+ }, y = Ir(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
2319
+ elements: o,
2320
+ rect: g,
2321
+ offsetParent: _,
2322
+ strategy: s
2323
+ }) : g);
2324
+ return {
2325
+ top: (h.top - y.top + p.top) / v.y,
2326
+ bottom: (y.bottom - h.bottom + p.bottom) / v.y,
2327
+ left: (h.left - y.left + p.left) / v.x,
2328
+ right: (y.right - h.right + p.right) / v.x
2329
+ };
2330
+ }
2331
+ var zr = 50, Br = async (e, t, n) => {
2332
+ let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
2333
+ ...o,
2334
+ detectOverflow: Rr
2335
+ }, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
2336
+ reference: e,
2337
+ floating: t,
2338
+ strategy: i
2339
+ }), { x: u, y: d } = Lr(l, r, c), f = r, p = 0, m = {};
2340
+ for (let n = 0; n < a.length; n++) {
2341
+ let h = a[n];
2342
+ if (!h) continue;
2343
+ let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
2344
+ x: u,
2345
+ y: d,
2346
+ initialPlacement: r,
2347
+ placement: f,
2348
+ strategy: i,
2349
+ middlewareData: m,
2350
+ rects: l,
2351
+ platform: s,
2352
+ elements: {
2353
+ reference: e,
2354
+ floating: t
2355
+ }
2356
+ });
2357
+ u = v ?? u, d = y ?? d, m[g] = {
2358
+ ...m[g],
2359
+ ...b
2360
+ }, x && p < zr && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
2361
+ reference: e,
2362
+ floating: t,
2363
+ strategy: i
2364
+ }) : x.rects), {x: u, y: d} = Lr(l, f, c)), n = -1);
2365
+ }
2366
+ return {
2367
+ x: u,
2368
+ y: d,
2369
+ placement: f,
2370
+ strategy: i,
2371
+ middlewareData: m
2372
+ };
2373
+ }, Vr = (e) => ({
2374
+ name: "arrow",
2375
+ options: e,
2376
+ async fn(t) {
2377
+ let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = V(e, t) || {};
2378
+ if (l == null) return {};
2379
+ let d = Fr(u), f = {
2380
+ x: n,
2381
+ y: r
2382
+ }, p = Cr(i), m = Sr(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
2383
+ (!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
2384
+ let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, ee = R(d[_], T), te = R(d[v], T), ne = ee, re = C - h[m] - te, E = C / 2 - h[m] / 2 + w, ie = br(ne, E, re), ae = !c.arrow && U(i) != null && E !== ie && a.reference[m] / 2 - (E < ne ? ee : te) - h[m] / 2 < 0, oe = ae ? E < ne ? E - ne : E - re : 0;
2385
+ return {
2386
+ [p]: f[p] + oe,
2387
+ data: {
2388
+ [p]: ie,
2389
+ centerOffset: E - ie - oe,
2390
+ ...ae && { alignmentOffset: oe }
2391
+ },
2392
+ reset: ae
2393
+ };
2394
+ }
2395
+ }), Hr = function(e) {
2396
+ return e === void 0 && (e = {}), {
2397
+ name: "flip",
2398
+ options: e,
2399
+ async fn(t) {
2400
+ var n;
2401
+ let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = V(e, t);
2402
+ if ((n = i.arrow) != null && n.alignmentOffset) return {};
2403
+ let g = H(r), _ = W(o), v = H(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Nr(o)] : Tr(o)), x = p !== "none";
2404
+ !d && x && b.push(...Mr(o, m, p, y));
2405
+ let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
2406
+ if (l && w.push(C[g]), u) {
2407
+ let e = wr(r, a, y);
2408
+ w.push(C[e[0]], C[e[1]]);
2409
+ }
2410
+ if (T = [...T, {
2411
+ placement: r,
2412
+ overflows: w
2413
+ }], !w.every((e) => e <= 0)) {
2414
+ let e = (i.flip?.index || 0) + 1, t = S[e];
2415
+ if (t && (!(u === "alignment" && _ !== W(t)) || T.every((e) => W(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
2416
+ data: {
2417
+ index: e,
2418
+ overflows: T
2419
+ },
2420
+ reset: { placement: t }
2421
+ };
2422
+ let n = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
2423
+ if (!n) switch (f) {
2424
+ case "bestFit": {
2425
+ let e = T.filter((e) => {
2426
+ if (x) {
2427
+ let t = W(e.placement);
2428
+ return t === _ || t === "y";
2429
+ }
2430
+ return !0;
2431
+ }).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
2432
+ e && (n = e);
2433
+ break;
2434
+ }
2435
+ case "initialPlacement":
2436
+ n = o;
2437
+ break;
2438
+ }
2439
+ if (r !== n) return { reset: { placement: n } };
2440
+ }
2441
+ return {};
2442
+ }
2443
+ };
2444
+ };
2445
+ function Ur(e, t) {
2446
+ return {
2447
+ top: e.top - t.height,
2448
+ right: e.right - t.width,
2449
+ bottom: e.bottom - t.height,
2450
+ left: e.left - t.width
2451
+ };
2452
+ }
2453
+ function Wr(e) {
2454
+ return gr.some((t) => e[t] >= 0);
2455
+ }
2456
+ var Gr = function(e) {
2457
+ return e === void 0 && (e = {}), {
2458
+ name: "hide",
2459
+ options: e,
2460
+ async fn(t) {
2461
+ let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = V(e, t);
2462
+ switch (i) {
2463
+ case "referenceHidden": {
2464
+ let e = Ur(await r.detectOverflow(t, {
2465
+ ...a,
2466
+ elementContext: "reference"
2467
+ }), n.reference);
2468
+ return { data: {
2469
+ referenceHiddenOffsets: e,
2470
+ referenceHidden: Wr(e)
2471
+ } };
2472
+ }
2473
+ case "escaped": {
2474
+ let e = Ur(await r.detectOverflow(t, {
2475
+ ...a,
2476
+ altBoundary: !0
2477
+ }), n.floating);
2478
+ return { data: {
2479
+ escapedOffsets: e,
2480
+ escaped: Wr(e)
2481
+ } };
2482
+ }
2483
+ default: return {};
2484
+ }
2485
+ }
2486
+ };
2487
+ }, Kr = /*#__PURE__*/ new Set(["left", "top"]);
2488
+ async function qr(e, t) {
2489
+ let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = H(n), s = U(n), c = W(n) === "y", l = Kr.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = V(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
2490
+ mainAxis: d,
2491
+ crossAxis: 0,
2492
+ alignmentAxis: null
2493
+ } : {
2494
+ mainAxis: d.mainAxis || 0,
2495
+ crossAxis: d.crossAxis || 0,
2496
+ alignmentAxis: d.alignmentAxis
2497
+ };
2498
+ return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
2499
+ x: p * u,
2500
+ y: f * l
2501
+ } : {
2502
+ x: f * l,
2503
+ y: p * u
2504
+ };
2505
+ }
2506
+ var Jr = function(e) {
2507
+ return e === void 0 && (e = 0), {
2508
+ name: "offset",
2509
+ options: e,
2510
+ async fn(t) {
2511
+ var n;
2512
+ let { x: r, y: i, placement: a, middlewareData: o } = t, s = await qr(t, e);
2513
+ return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
2514
+ x: r + s.x,
2515
+ y: i + s.y,
2516
+ data: {
2517
+ ...s,
2518
+ placement: a
2519
+ }
2520
+ };
2521
+ }
2522
+ };
2523
+ }, Yr = function(e) {
2524
+ return e === void 0 && (e = {}), {
2525
+ name: "shift",
2526
+ options: e,
2527
+ async fn(t) {
2528
+ let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
2529
+ let { x: t, y: n } = e;
2530
+ return {
2531
+ x: t,
2532
+ y: n
2533
+ };
2534
+ } }, ...l } = V(e, t), u = {
2535
+ x: n,
2536
+ y: r
2537
+ }, d = await a.detectOverflow(t, l), f = W(H(i)), p = xr(f), m = u[p], h = u[f];
2538
+ if (o) {
2539
+ let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
2540
+ m = br(n, m, r);
2541
+ }
2542
+ if (s) {
2543
+ let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
2544
+ h = br(n, h, r);
2545
+ }
2546
+ let g = c.fn({
2547
+ ...t,
2548
+ [p]: m,
2549
+ [f]: h
2550
+ });
2551
+ return {
2552
+ ...g,
2553
+ data: {
2554
+ x: g.x - n,
2555
+ y: g.y - r,
2556
+ enabled: {
2557
+ [p]: o,
2558
+ [f]: s
2559
+ }
2560
+ }
2561
+ };
2562
+ }
2563
+ };
2564
+ }, Xr = function(e) {
2565
+ return e === void 0 && (e = {}), {
2566
+ options: e,
2567
+ fn(t) {
2568
+ let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = V(e, t), u = {
2569
+ x: n,
2570
+ y: r
2571
+ }, d = W(i), f = xr(d), p = u[f], m = u[d], h = V(s, t), g = typeof h == "number" ? {
2572
+ mainAxis: h,
2573
+ crossAxis: 0
2574
+ } : {
2575
+ mainAxis: 0,
2576
+ crossAxis: 0,
2577
+ ...h
2578
+ };
2579
+ if (c) {
2580
+ let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
2581
+ p < t ? p = t : p > n && (p = n);
2582
+ }
2583
+ if (l) {
2584
+ let e = f === "y" ? "width" : "height", t = Kr.has(H(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
2585
+ m < n ? m = n : m > r && (m = r);
2586
+ }
2587
+ return {
2588
+ [f]: p,
2589
+ [d]: m
2590
+ };
2591
+ }
2592
+ };
2593
+ }, Zr = function(e) {
2594
+ return e === void 0 && (e = {}), {
2595
+ name: "size",
2596
+ options: e,
2597
+ async fn(t) {
2598
+ var n, r;
2599
+ let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = V(e, t), u = await o.detectOverflow(t, l), d = H(i), f = U(i), p = W(i) === "y", { width: m, height: h } = a.floating, g, _;
2600
+ d === "top" || d === "bottom" ? (g = d, _ = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (_ = d, g = f === "end" ? "top" : "bottom");
2601
+ let v = h - u.top - u.bottom, y = m - u.left - u.right, b = R(h - u[g], v), x = R(m - u[_], y), S = !t.middlewareData.shift, C = b, w = x;
2602
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (w = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = v), S && !f) {
2603
+ let e = z(u.left, 0), t = z(u.right, 0), n = z(u.top, 0), r = z(u.bottom, 0);
2604
+ p ? w = m - 2 * (e !== 0 || t !== 0 ? e + t : z(u.left, u.right)) : C = h - 2 * (n !== 0 || r !== 0 ? n + r : z(u.top, u.bottom));
2605
+ }
2606
+ await c({
2607
+ ...t,
2608
+ availableWidth: w,
2609
+ availableHeight: C
2610
+ });
2611
+ let T = await o.getDimensions(s.floating);
2612
+ return m !== T.width || h !== T.height ? { reset: { rects: !0 } } : {};
2613
+ }
2614
+ };
2615
+ };
2616
+ //#endregion
2617
+ //#region ../node_modules/.bun/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
2618
+ function Qr() {
2619
+ return typeof window < "u";
2620
+ }
2621
+ function $r(e) {
2622
+ return ei(e) ? (e.nodeName || "").toLowerCase() : "#document";
2623
+ }
2624
+ function G(e) {
2625
+ var t;
2626
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
2627
+ }
2628
+ function K(e) {
2629
+ return ((ei(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
2630
+ }
2631
+ function ei(e) {
2632
+ return Qr() ? e instanceof Node || e instanceof G(e).Node : !1;
2633
+ }
2634
+ function q(e) {
2635
+ return Qr() ? e instanceof Element || e instanceof G(e).Element : !1;
2636
+ }
2637
+ function J(e) {
2638
+ return Qr() ? e instanceof HTMLElement || e instanceof G(e).HTMLElement : !1;
2639
+ }
2640
+ function ti(e) {
2641
+ return !Qr() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof G(e).ShadowRoot;
2642
+ }
2643
+ function ni(e) {
2644
+ let { overflow: t, overflowX: n, overflowY: r, display: i } = X(e);
2645
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
2646
+ }
2647
+ function ri(e) {
2648
+ return /^(table|td|th)$/.test($r(e));
2649
+ }
2650
+ function ii(e) {
2651
+ try {
2652
+ if (e.matches(":popover-open")) return !0;
2653
+ } catch {}
2654
+ try {
2655
+ return e.matches(":modal");
2656
+ } catch {
2657
+ return !1;
2658
+ }
2659
+ }
2660
+ var ai = /transform|translate|scale|rotate|perspective|filter/, oi = /paint|layout|strict|content/, Y = (e) => !!e && e !== "none", si;
2661
+ function ci(e) {
2662
+ let t = q(e) ? X(e) : e;
2663
+ return Y(t.transform) || Y(t.translate) || Y(t.scale) || Y(t.rotate) || Y(t.perspective) || !ui() && (Y(t.backdropFilter) || Y(t.filter)) || ai.test(t.willChange || "") || oi.test(t.contain || "");
2664
+ }
2665
+ function li(e) {
2666
+ let t = Z(e);
2667
+ for (; J(t) && !di(t);) {
2668
+ if (ci(t)) return t;
2669
+ if (ii(t)) return null;
2670
+ t = Z(t);
2671
+ }
2672
+ return null;
2673
+ }
2674
+ function ui() {
2675
+ return si ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), si;
2676
+ }
2677
+ function di(e) {
2678
+ return /^(html|body|#document)$/.test($r(e));
2679
+ }
2680
+ function X(e) {
2681
+ return G(e).getComputedStyle(e);
2682
+ }
2683
+ function fi(e) {
2684
+ return q(e) ? {
2685
+ scrollLeft: e.scrollLeft,
2686
+ scrollTop: e.scrollTop
2687
+ } : {
2688
+ scrollLeft: e.scrollX,
2689
+ scrollTop: e.scrollY
2690
+ };
2691
+ }
2692
+ function Z(e) {
2693
+ if ($r(e) === "html") return e;
2694
+ let t = e.assignedSlot || e.parentNode || ti(e) && e.host || K(e);
2695
+ return ti(t) ? t.host : t;
2696
+ }
2697
+ function pi(e) {
2698
+ let t = Z(e);
2699
+ return di(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : J(t) && ni(t) ? t : pi(t);
2700
+ }
2701
+ function mi(e, t, n) {
2702
+ t === void 0 && (t = []), n === void 0 && (n = !0);
2703
+ let r = pi(e), i = r === e.ownerDocument?.body, a = G(r);
2704
+ if (i) {
2705
+ let e = hi(a);
2706
+ return t.concat(a, a.visualViewport || [], ni(r) ? r : [], e && n ? mi(e) : []);
2707
+ } else return t.concat(r, mi(r, [], n));
2708
+ }
2709
+ function hi(e) {
2710
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
2711
+ }
2712
+ //#endregion
2713
+ //#region ../node_modules/.bun/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
2714
+ function gi(e) {
2715
+ let t = X(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = J(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = _r(n) !== a || _r(r) !== o;
2716
+ return s && (n = a, r = o), {
2717
+ width: n,
2718
+ height: r,
2719
+ $: s
2720
+ };
2721
+ }
2722
+ function _i(e) {
2723
+ return q(e) ? e : e.contextElement;
2724
+ }
2725
+ function vi(e) {
2726
+ let t = _i(e);
2727
+ if (!J(t)) return B(1);
2728
+ let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = gi(t), o = (a ? _r(n.width) : n.width) / r, s = (a ? _r(n.height) : n.height) / i;
2729
+ return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
2730
+ x: o,
2731
+ y: s
2732
+ };
2733
+ }
2734
+ var yi = /*#__PURE__*/ B(0);
2735
+ function bi(e) {
2736
+ let t = G(e);
2737
+ return !ui() || !t.visualViewport ? yi : {
2738
+ x: t.visualViewport.offsetLeft,
2739
+ y: t.visualViewport.offsetTop
2740
+ };
2741
+ }
2742
+ function xi(e, t, n) {
2743
+ return t === void 0 && (t = !1), !n || t && n !== G(e) ? !1 : t;
2744
+ }
2745
+ function Q(e, t, n, r) {
2746
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
2747
+ let i = e.getBoundingClientRect(), a = _i(e), o = B(1);
2748
+ t && (r ? q(r) && (o = vi(r)) : o = vi(e));
2749
+ let s = xi(a, n, r) ? bi(a) : B(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
2750
+ if (a) {
2751
+ let e = G(a), t = r && q(r) ? G(r) : r, n = e, i = hi(n);
2752
+ for (; i && r && t !== n;) {
2753
+ let e = vi(i), t = i.getBoundingClientRect(), r = X(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
2754
+ c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = G(i), i = hi(n);
2755
+ }
2756
+ }
2757
+ return Ir({
2758
+ width: u,
2759
+ height: d,
2760
+ x: c,
2761
+ y: l
2762
+ });
2763
+ }
2764
+ function Si(e, t) {
2765
+ let n = fi(e).scrollLeft;
2766
+ return t ? t.left + n : Q(K(e)).left + n;
2767
+ }
2768
+ function Ci(e, t) {
2769
+ let n = e.getBoundingClientRect();
2770
+ return {
2771
+ x: n.left + t.scrollLeft - Si(e, n),
2772
+ y: n.top + t.scrollTop
2773
+ };
2774
+ }
2775
+ function wi(e) {
2776
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = K(r), s = t ? ii(t.floating) : !1;
2777
+ if (r === o || s && a) return n;
2778
+ let c = {
2779
+ scrollLeft: 0,
2780
+ scrollTop: 0
2781
+ }, l = B(1), u = B(0), d = J(r);
2782
+ if ((d || !d && !a) && (($r(r) !== "body" || ni(o)) && (c = fi(r)), d)) {
2783
+ let e = Q(r);
2784
+ l = vi(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
2785
+ }
2786
+ let f = o && !d && !a ? Ci(o, c) : B(0);
2787
+ return {
2788
+ width: n.width * l.x,
2789
+ height: n.height * l.y,
2790
+ x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
2791
+ y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
2792
+ };
2793
+ }
2794
+ function Ti(e) {
2795
+ return Array.from(e.getClientRects());
2796
+ }
2797
+ function Ei(e) {
2798
+ let t = K(e), n = fi(e), r = e.ownerDocument.body, i = z(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = z(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Si(e), s = -n.scrollTop;
2799
+ return X(r).direction === "rtl" && (o += z(t.clientWidth, r.clientWidth) - i), {
2800
+ width: i,
2801
+ height: a,
2802
+ x: o,
2803
+ y: s
2804
+ };
2805
+ }
2806
+ var Di = 25;
2807
+ function Oi(e, t) {
2808
+ let n = G(e), r = K(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
2809
+ if (i) {
2810
+ a = i.width, o = i.height;
2811
+ let e = ui();
2812
+ (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
2813
+ }
2814
+ let l = Si(r);
2815
+ if (l <= 0) {
2816
+ let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
2817
+ o <= Di && (a -= o);
2818
+ } else l <= Di && (a += l);
2819
+ return {
2820
+ width: a,
2821
+ height: o,
2822
+ x: s,
2823
+ y: c
2824
+ };
2825
+ }
2826
+ function ki(e, t) {
2827
+ let n = Q(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = J(e) ? vi(e) : B(1);
2828
+ return {
2829
+ width: e.clientWidth * a.x,
2830
+ height: e.clientHeight * a.y,
2831
+ x: i * a.x,
2832
+ y: r * a.y
2833
+ };
2834
+ }
2835
+ function Ai(e, t, n) {
2836
+ let r;
2837
+ if (t === "viewport") r = Oi(e, n);
2838
+ else if (t === "document") r = Ei(K(e));
2839
+ else if (q(t)) r = ki(t, n);
2840
+ else {
2841
+ let n = bi(e);
2842
+ r = {
2843
+ x: t.x - n.x,
2844
+ y: t.y - n.y,
2845
+ width: t.width,
2846
+ height: t.height
2847
+ };
2848
+ }
2849
+ return Ir(r);
2850
+ }
2851
+ function ji(e, t) {
2852
+ let n = Z(e);
2853
+ return n === t || !q(n) || di(n) ? !1 : X(n).position === "fixed" || ji(n, t);
2854
+ }
2855
+ function Mi(e, t) {
2856
+ let n = t.get(e);
2857
+ if (n) return n;
2858
+ let r = mi(e, [], !1).filter((e) => q(e) && $r(e) !== "body"), i = null, a = X(e).position === "fixed", o = a ? Z(e) : e;
2859
+ for (; q(o) && !di(o);) {
2860
+ let t = X(o), n = ci(o);
2861
+ !n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || ni(o) && !n && ji(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Z(o);
2862
+ }
2863
+ return t.set(e, r), r;
2864
+ }
2865
+ function Ni(e) {
2866
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? ii(t) ? [] : Mi(t, this._c) : [].concat(n), r], o = Ai(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
2867
+ for (let e = 1; e < a.length; e++) {
2868
+ let n = Ai(t, a[e], i);
2869
+ s = z(n.top, s), c = R(n.right, c), l = R(n.bottom, l), u = z(n.left, u);
2870
+ }
2871
+ return {
2872
+ width: c - u,
2873
+ height: l - s,
2874
+ x: u,
2875
+ y: s
2876
+ };
2877
+ }
2878
+ function Pi(e) {
2879
+ let { width: t, height: n } = gi(e);
2880
+ return {
2881
+ width: t,
2882
+ height: n
2883
+ };
2884
+ }
2885
+ function Fi(e, t, n) {
2886
+ let r = J(t), i = K(t), a = n === "fixed", o = Q(e, !0, a, t), s = {
2887
+ scrollLeft: 0,
2888
+ scrollTop: 0
2889
+ }, c = B(0);
2890
+ function l() {
2891
+ c.x = Si(i);
2892
+ }
2893
+ if (r || !r && !a) if (($r(t) !== "body" || ni(i)) && (s = fi(t)), r) {
2894
+ let e = Q(t, !0, a, t);
2895
+ c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
2896
+ } else i && l();
2897
+ a && !r && i && l();
2898
+ let u = i && !r && !a ? Ci(i, s) : B(0);
2899
+ return {
2900
+ x: o.left + s.scrollLeft - c.x - u.x,
2901
+ y: o.top + s.scrollTop - c.y - u.y,
2902
+ width: o.width,
2903
+ height: o.height
2904
+ };
2905
+ }
2906
+ function Ii(e) {
2907
+ return X(e).position === "static";
2908
+ }
2909
+ function Li(e, t) {
2910
+ if (!J(e) || X(e).position === "fixed") return null;
2911
+ if (t) return t(e);
2912
+ let n = e.offsetParent;
2913
+ return K(e) === n && (n = n.ownerDocument.body), n;
2914
+ }
2915
+ function Ri(e, t) {
2916
+ let n = G(e);
2917
+ if (ii(e)) return n;
2918
+ if (!J(e)) {
2919
+ let t = Z(e);
2920
+ for (; t && !di(t);) {
2921
+ if (q(t) && !Ii(t)) return t;
2922
+ t = Z(t);
2923
+ }
2924
+ return n;
2925
+ }
2926
+ let r = Li(e, t);
2927
+ for (; r && ri(r) && Ii(r);) r = Li(r, t);
2928
+ return r && di(r) && Ii(r) && !ci(r) ? n : r || li(e) || n;
2929
+ }
2930
+ var zi = async function(e) {
2931
+ let t = this.getOffsetParent || Ri, n = this.getDimensions, r = await n(e.floating);
2932
+ return {
2933
+ reference: Fi(e.reference, await t(e.floating), e.strategy),
2934
+ floating: {
2935
+ x: 0,
2936
+ y: 0,
2937
+ width: r.width,
2938
+ height: r.height
2939
+ }
2940
+ };
2941
+ };
2942
+ function Bi(e) {
2943
+ return X(e).direction === "rtl";
2944
+ }
2945
+ var Vi = {
2946
+ convertOffsetParentRelativeRectToViewportRelativeRect: wi,
2947
+ getDocumentElement: K,
2948
+ getClippingRect: Ni,
2949
+ getOffsetParent: Ri,
2950
+ getElementRects: zi,
2951
+ getClientRects: Ti,
2952
+ getDimensions: Pi,
2953
+ getScale: vi,
2954
+ isElement: q,
2955
+ isRTL: Bi
2956
+ };
2957
+ function Hi(e, t) {
2958
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
2959
+ }
2960
+ function Ui(e, t) {
2961
+ let n = null, r, i = K(e);
2962
+ function a() {
2963
+ var e;
2964
+ clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
2965
+ }
2966
+ function o(s, c) {
2967
+ s === void 0 && (s = !1), c === void 0 && (c = 1), a();
2968
+ let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
2969
+ if (s || t(), !f || !p) return;
2970
+ let m = vr(d), h = vr(i.clientWidth - (u + f)), g = vr(i.clientHeight - (d + p)), _ = vr(u), v = {
2971
+ rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
2972
+ threshold: z(0, R(1, c)) || 1
2973
+ }, y = !0;
2974
+ function b(t) {
2975
+ let n = t[0].intersectionRatio;
2976
+ if (n !== c) {
2977
+ if (!y) return o();
2978
+ n ? o(!1, n) : r = setTimeout(() => {
2979
+ o(!1, 1e-7);
2980
+ }, 1e3);
2981
+ }
2982
+ n === 1 && !Hi(l, e.getBoundingClientRect()) && o(), y = !1;
2983
+ }
2984
+ try {
2985
+ n = new IntersectionObserver(b, {
2986
+ ...v,
2987
+ root: i.ownerDocument
2988
+ });
2989
+ } catch {
2990
+ n = new IntersectionObserver(b, v);
2991
+ }
2992
+ n.observe(e);
2993
+ }
2994
+ return o(!0), a;
2995
+ }
2996
+ function Wi(e, t, n, r) {
2997
+ r === void 0 && (r = {});
2998
+ let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = _i(e), u = i || a ? [...l ? mi(l) : [], ...t ? mi(t) : []] : [];
2999
+ u.forEach((e) => {
3000
+ i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
3001
+ });
3002
+ let d = l && s ? Ui(l, n) : null, f = -1, p = null;
3003
+ o && (p = new ResizeObserver((e) => {
3004
+ let [r] = e;
3005
+ r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
3006
+ var e;
3007
+ (e = p) == null || e.observe(t);
3008
+ })), n();
3009
+ }), l && !c && p.observe(l), t && p.observe(t));
3010
+ let m, h = c ? Q(e) : null;
3011
+ c && g();
3012
+ function g() {
3013
+ let t = Q(e);
3014
+ h && !Hi(h, t) && n(), h = t, m = requestAnimationFrame(g);
3015
+ }
3016
+ return n(), () => {
3017
+ var e;
3018
+ u.forEach((e) => {
3019
+ i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
3020
+ }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
3021
+ };
3022
+ }
3023
+ var Gi = Jr, Ki = Yr, qi = Hr, Ji = Zr, Yi = Gr, Xi = Vr, Zi = Xr, Qi = (e, t, n) => {
3024
+ let r = /* @__PURE__ */ new Map(), i = {
3025
+ platform: Vi,
3026
+ ...n
3027
+ }, a = {
3028
+ ...i.platform,
3029
+ _c: r
3030
+ };
3031
+ return Br(e, t, {
3032
+ ...i,
3033
+ platform: a
3034
+ });
3035
+ };
3036
+ //#endregion
3037
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/use-id.js
3038
+ globalThis.bitsIdCounter ??= { current: 0 };
3039
+ function $i(e = "bits") {
3040
+ return globalThis.bitsIdCounter.current++, `${e}-${globalThis.bitsIdCounter.current}`;
3041
+ }
3042
+ //#endregion
3043
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/floating-svelte/floating-utils.svelte.js
3044
+ function $(e) {
3045
+ return typeof e == "function" ? e() : e;
3046
+ }
3047
+ function ea(e) {
3048
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
3049
+ }
3050
+ function ta(e, t) {
3051
+ let n = ea(e);
3052
+ return Math.round(t * n) / n;
3053
+ }
3054
+ function na(e) {
3055
+ return {
3056
+ [`--bits-${e}-content-transform-origin`]: "var(--bits-floating-transform-origin)",
3057
+ [`--bits-${e}-content-available-width`]: "var(--bits-floating-available-width)",
3058
+ [`--bits-${e}-content-available-height`]: "var(--bits-floating-available-height)",
3059
+ [`--bits-${e}-anchor-width`]: "var(--bits-floating-anchor-width)",
3060
+ [`--bits-${e}-anchor-height`]: "var(--bits-floating-anchor-height)"
3061
+ };
3062
+ }
3063
+ //#endregion
3064
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/floating-svelte/use-floating.svelte.js
3065
+ function ra(e) {
3066
+ let n = e.whileElementsMounted, r = t.derived(() => $(e.open) ?? !0), i = t.derived(() => $(e.middleware)), a = t.derived(() => $(e.transform) ?? !0), o = t.derived(() => $(e.placement) ?? "bottom"), s = t.derived(() => $(e.strategy) ?? "absolute"), c = t.derived(() => $(e.sideOffset) ?? 0), l = t.derived(() => $(e.alignOffset) ?? 0), u = e.reference, d = t.state(0), f = t.state(0), p = w(null), m = t.state(t.proxy(t.get(s))), h = t.state(t.proxy(t.get(o))), g = t.state(t.proxy({})), _ = t.state(!1), v = !1, y = 0, b = t.derived(() => {
3067
+ let e = p.current ? ta(p.current, t.get(d)) : t.get(d), n = p.current ? ta(p.current, t.get(f)) : t.get(f);
3068
+ return t.get(a) ? {
3069
+ position: t.get(m),
3070
+ left: "0",
3071
+ top: "0",
3072
+ transform: `translate(${e}px, ${n}px)`,
3073
+ ...p.current && ea(p.current) >= 1.5 && { willChange: "transform" }
3074
+ } : {
3075
+ position: t.get(m),
3076
+ left: `${e}px`,
3077
+ top: `${n}px`
3078
+ };
3079
+ }), x;
3080
+ function S() {
3081
+ if (u.current === null || p.current === null) return;
3082
+ let e = u.current, n = p.current, a = ++y;
3083
+ Qi(e, n, {
3084
+ middleware: t.get(i),
3085
+ placement: t.get(o),
3086
+ strategy: t.get(s)
3087
+ }).then((i) => {
3088
+ if (a === y && !(u.current !== e || p.current !== n)) {
3089
+ if (ia(e)) {
3090
+ t.set(g, {
3091
+ ...t.get(g),
3092
+ hide: {
3093
+ ...t.get(g).hide,
3094
+ referenceHidden: !0
3095
+ }
3096
+ }, !0);
3097
+ return;
3098
+ }
3099
+ if (!t.get(r) && t.get(d) !== 0 && t.get(f) !== 0) {
3100
+ let e = Math.max(Math.abs(t.get(c)), Math.abs(t.get(l)), 15);
3101
+ if (i.x <= e && i.y <= e) return;
3102
+ }
3103
+ t.set(d, i.x, !0), t.set(f, i.y, !0), t.set(m, i.strategy, !0), t.set(h, i.placement, !0), t.set(g, i.middlewareData, !0), t.set(_, !0);
3104
+ }
3105
+ });
3106
+ }
3107
+ function C() {
3108
+ typeof x == "function" && (x(), x = void 0), y++;
3109
+ }
3110
+ function T() {
3111
+ if (C(), n === void 0) {
3112
+ S();
3113
+ return;
3114
+ }
3115
+ t.get(r) && (u.current === null || p.current === null || (x = n(u.current, p.current, S)));
3116
+ }
3117
+ function ee() {
3118
+ !t.get(r) && p.current === null && t.set(_, !1);
3119
+ }
3120
+ function te() {
3121
+ return [
3122
+ t.get(i),
3123
+ t.get(o),
3124
+ t.get(s),
3125
+ t.get(c),
3126
+ t.get(l),
3127
+ t.get(r)
3128
+ ];
3129
+ }
3130
+ return t.user_effect(() => {
3131
+ n === void 0 && t.get(r) && S();
3132
+ }), t.user_effect(T), t.user_effect(() => {
3133
+ if (n !== void 0) {
3134
+ if (te(), !t.get(r)) {
3135
+ v = !1;
3136
+ return;
3137
+ }
3138
+ if (!t.get(_)) {
3139
+ v = !1;
3140
+ return;
3141
+ }
3142
+ if (!v) {
3143
+ v = !0;
3144
+ return;
3145
+ }
3146
+ S();
3147
+ }
3148
+ }), t.user_effect(ee), t.user_effect(() => C), {
3149
+ floating: p,
3150
+ reference: u,
3151
+ get strategy() {
3152
+ return t.get(m);
3153
+ },
3154
+ get placement() {
3155
+ return t.get(h);
3156
+ },
3157
+ get middlewareData() {
3158
+ return t.get(g);
3159
+ },
3160
+ get isPositioned() {
3161
+ return t.get(_);
3162
+ },
3163
+ get floatingStyles() {
3164
+ return t.get(b);
3165
+ },
3166
+ get update() {
3167
+ return S;
3168
+ }
3169
+ };
3170
+ }
3171
+ function ia(e) {
3172
+ return e instanceof Element ? !e.isConnected || e instanceof HTMLElement && e.hidden ? !0 : e.getClientRects().length === 0 : !1;
3173
+ }
3174
+ //#endregion
3175
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/floating-layer/use-floating-layer.svelte.js
3176
+ var aa = {
3177
+ top: "bottom",
3178
+ right: "left",
3179
+ bottom: "top",
3180
+ left: "right"
3181
+ }, oa = new M("Floating.Root"), sa = new M("Floating.Content"), ca = new M("Floating.Root"), la = class e {
3182
+ static create(t = !1) {
3183
+ return t ? ca.set(new e()) : oa.set(new e());
3184
+ }
3185
+ anchorNode = w(null);
3186
+ customAnchorNode = w(null);
3187
+ triggerNode = w(null);
3188
+ constructor() {
3189
+ t.user_effect(() => {
3190
+ this.customAnchorNode.current ? typeof this.customAnchorNode.current == "string" ? this.anchorNode.current = document.querySelector(this.customAnchorNode.current) : this.anchorNode.current = this.customAnchorNode.current : this.anchorNode.current = this.triggerNode.current;
3191
+ });
3192
+ }
3193
+ }, ua = class e {
3194
+ static create(t, n = !1) {
3195
+ return n ? sa.set(new e(t, ca.get())) : sa.set(new e(t, oa.get()));
3196
+ }
3197
+ opts;
3198
+ root;
3199
+ contentRef = w(null);
3200
+ wrapperRef = w(null);
3201
+ arrowRef = w(null);
3202
+ contentAttachment = j(this.contentRef);
3203
+ wrapperAttachment = j(this.wrapperRef);
3204
+ arrowAttachment = j(this.arrowRef);
3205
+ arrowId = w($i());
3206
+ #e = t.derived(() => {
3207
+ if (typeof this.opts.style == "string") return we(this.opts.style);
3208
+ if (!this.opts.style) return {};
3209
+ });
3210
+ #t = void 0;
3211
+ #n = new nt(() => this.arrowRef.current ?? void 0);
3212
+ #r = t.derived(() => this.#n?.width ?? 0);
3213
+ #i = t.derived(() => this.#n?.height ?? 0);
3214
+ #a = t.derived(() => this.opts.side?.current + (this.opts.align.current === "center" ? "" : `-${this.opts.align.current}`));
3215
+ #o = t.derived(() => Array.isArray(this.opts.collisionBoundary.current) ? this.opts.collisionBoundary.current : [this.opts.collisionBoundary.current]);
3216
+ #s = t.derived(() => t.get(this.#o).length > 0);
3217
+ get hasExplicitBoundaries() {
3218
+ return t.get(this.#s);
3219
+ }
3220
+ set hasExplicitBoundaries(e) {
3221
+ t.set(this.#s, e);
3222
+ }
3223
+ #c = t.derived(() => ({
3224
+ padding: this.opts.collisionPadding.current,
3225
+ boundary: t.get(this.#o).filter(jt),
3226
+ altBoundary: this.hasExplicitBoundaries
3227
+ }));
3228
+ get detectOverflowOptions() {
3229
+ return t.get(this.#c);
3230
+ }
3231
+ set detectOverflowOptions(e) {
3232
+ t.set(this.#c, e);
3233
+ }
3234
+ #l = t.state(void 0);
3235
+ #u = t.state(void 0);
3236
+ #d = t.state(void 0);
3237
+ #f = t.state(void 0);
3238
+ #p = t.derived(() => [
3239
+ Gi({
3240
+ mainAxis: this.opts.sideOffset.current + t.get(this.#i),
3241
+ alignmentAxis: this.opts.alignOffset.current
3242
+ }),
3243
+ this.opts.avoidCollisions.current && Ki({
3244
+ mainAxis: !0,
3245
+ crossAxis: !1,
3246
+ limiter: this.opts.sticky.current === "partial" ? Zi() : void 0,
3247
+ ...this.detectOverflowOptions
3248
+ }),
3249
+ this.opts.avoidCollisions.current && qi({ ...this.detectOverflowOptions }),
3250
+ Ji({
3251
+ ...this.detectOverflowOptions,
3252
+ apply: ({ rects: e, availableWidth: n, availableHeight: r }) => {
3253
+ let { width: i, height: a } = e.reference;
3254
+ t.set(this.#l, n, !0), t.set(this.#u, r, !0), t.set(this.#d, i, !0), t.set(this.#f, a, !0);
3255
+ }
3256
+ }),
3257
+ this.arrowRef.current && Xi({
3258
+ element: this.arrowRef.current,
3259
+ padding: this.opts.arrowPadding.current
3260
+ }),
3261
+ fa({
3262
+ arrowWidth: t.get(this.#r),
3263
+ arrowHeight: t.get(this.#i)
3264
+ }),
3265
+ this.opts.hideWhenDetached.current && Yi({
3266
+ strategy: "referenceHidden",
3267
+ ...this.detectOverflowOptions
3268
+ })
3269
+ ].filter(Boolean));
3270
+ get middleware() {
3271
+ return t.get(this.#p);
3272
+ }
3273
+ set middleware(e) {
3274
+ t.set(this.#p, e);
3275
+ }
3276
+ floating;
3277
+ #m = t.derived(() => ma(this.floating.placement));
3278
+ get placedSide() {
3279
+ return t.get(this.#m);
3280
+ }
3281
+ set placedSide(e) {
3282
+ t.set(this.#m, e);
3283
+ }
3284
+ #h = t.derived(() => ha(this.floating.placement));
3285
+ get placedAlign() {
3286
+ return t.get(this.#h);
3287
+ }
3288
+ set placedAlign(e) {
3289
+ t.set(this.#h, e);
3290
+ }
3291
+ #g = t.derived(() => this.floating.middlewareData.arrow?.x ?? 0);
3292
+ get arrowX() {
3293
+ return t.get(this.#g);
3294
+ }
3295
+ set arrowX(e) {
3296
+ t.set(this.#g, e);
3297
+ }
3298
+ #_ = t.derived(() => this.floating.middlewareData.arrow?.y ?? 0);
3299
+ get arrowY() {
3300
+ return t.get(this.#_);
3301
+ }
3302
+ set arrowY(e) {
3303
+ t.set(this.#_, e);
3304
+ }
3305
+ #v = t.derived(() => this.floating.middlewareData.arrow?.centerOffset !== 0);
3306
+ get cannotCenterArrow() {
3307
+ return t.get(this.#v);
3308
+ }
3309
+ set cannotCenterArrow(e) {
3310
+ t.set(this.#v, e);
3311
+ }
3312
+ #y = t.state();
3313
+ get contentZIndex() {
3314
+ return t.get(this.#y);
3315
+ }
3316
+ set contentZIndex(e) {
3317
+ t.set(this.#y, e, !0);
3318
+ }
3319
+ #b = t.derived(() => aa[this.placedSide]);
3320
+ get arrowBaseSide() {
3321
+ return t.get(this.#b);
3322
+ }
3323
+ set arrowBaseSide(e) {
3324
+ t.set(this.#b, e);
3325
+ }
3326
+ #x = t.derived(() => ({
3327
+ id: this.opts.wrapperId.current,
3328
+ "data-bits-floating-content-wrapper": "",
3329
+ style: {
3330
+ ...this.floating.floatingStyles,
3331
+ transform: this.floating.isPositioned ? this.floating.floatingStyles.transform : "translate(0, -200%)",
3332
+ minWidth: "max-content",
3333
+ zIndex: this.contentZIndex,
3334
+ "--bits-floating-transform-origin": `${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,
3335
+ "--bits-floating-available-width": `${t.get(this.#l)}px`,
3336
+ "--bits-floating-available-height": `${t.get(this.#u)}px`,
3337
+ "--bits-floating-anchor-width": `${t.get(this.#d)}px`,
3338
+ "--bits-floating-anchor-height": `${t.get(this.#f)}px`,
3339
+ ...this.floating.middlewareData.hide?.referenceHidden && {
3340
+ visibility: "hidden",
3341
+ "pointer-events": "none"
3342
+ },
3343
+ ...t.get(this.#e)
3344
+ },
3345
+ dir: this.opts.dir.current,
3346
+ ...this.wrapperAttachment
3347
+ }));
3348
+ get wrapperProps() {
3349
+ return t.get(this.#x);
3350
+ }
3351
+ set wrapperProps(e) {
3352
+ t.set(this.#x, e);
3353
+ }
3354
+ #S = t.derived(() => ({
3355
+ "data-side": this.placedSide,
3356
+ "data-align": this.placedAlign,
3357
+ style: Oe({ ...t.get(this.#e) }),
3358
+ ...this.contentAttachment
3359
+ }));
3360
+ get props() {
3361
+ return t.get(this.#S);
3362
+ }
3363
+ set props(e) {
3364
+ t.set(this.#S, e);
3365
+ }
3366
+ #C = t.derived(() => ({
3367
+ position: "absolute",
3368
+ left: this.arrowX ? `${this.arrowX}px` : void 0,
3369
+ top: this.arrowY ? `${this.arrowY}px` : void 0,
3370
+ [this.arrowBaseSide]: 0,
3371
+ "transform-origin": {
3372
+ top: "",
3373
+ right: "0 0",
3374
+ bottom: "center 0",
3375
+ left: "100% 0"
3376
+ }[this.placedSide],
3377
+ transform: {
3378
+ top: "translateY(100%)",
3379
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
3380
+ bottom: "rotate(180deg)",
3381
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
3382
+ }[this.placedSide],
3383
+ visibility: this.cannotCenterArrow ? "hidden" : void 0
3384
+ }));
3385
+ get arrowStyle() {
3386
+ return t.get(this.#C);
3387
+ }
3388
+ set arrowStyle(e) {
3389
+ t.set(this.#C, e);
3390
+ }
3391
+ constructor(e, n) {
3392
+ this.opts = e, this.root = n, this.#t = e.updatePositionStrategy, e.customAnchor && (this.root.customAnchorNode.current = e.customAnchor.current), N(() => e.customAnchor.current, (e) => {
3393
+ this.root.customAnchorNode.current = e;
3394
+ }), this.floating = ra({
3395
+ strategy: () => this.opts.strategy.current,
3396
+ placement: () => t.get(this.#a),
3397
+ middleware: () => this.middleware,
3398
+ reference: this.root.anchorNode,
3399
+ whileElementsMounted: (...e) => Wi(...e, { animationFrame: this.#t?.current === "always" }),
3400
+ open: () => this.opts.enabled.current,
3401
+ sideOffset: () => this.opts.sideOffset.current,
3402
+ alignOffset: () => this.opts.alignOffset.current
3403
+ }), t.user_effect(() => {
3404
+ this.floating.isPositioned && this.opts.onPlaced?.current();
3405
+ }), N(() => this.contentRef.current, (e) => {
3406
+ if (!e || !this.opts.enabled.current) return;
3407
+ let t = Ue(e), n = t.requestAnimationFrame(() => {
3408
+ if (this.contentRef.current !== e || !this.opts.enabled.current) return;
3409
+ let n = t.getComputedStyle(e).zIndex;
3410
+ n !== this.contentZIndex && (this.contentZIndex = n);
3411
+ });
3412
+ return () => {
3413
+ t.cancelAnimationFrame(n);
3414
+ };
3415
+ }), t.user_effect(() => {
3416
+ this.floating.floating.current = this.wrapperRef.current;
3417
+ });
3418
+ }
3419
+ }, da = class e {
3420
+ static create(t, n = !1) {
3421
+ return n ? new e(t, ca.get()) : new e(t, oa.get());
3422
+ }
3423
+ opts;
3424
+ root;
3425
+ constructor(e, t) {
3426
+ this.opts = e, this.root = t, e.virtualEl && e.virtualEl.current ? t.triggerNode = x(e.virtualEl.current) : t.triggerNode = e.ref;
3427
+ }
3428
+ };
3429
+ function fa(e) {
3430
+ return {
3431
+ name: "transformOrigin",
3432
+ options: e,
3433
+ fn(t) {
3434
+ let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = pa(n), u = {
3435
+ start: "0%",
3436
+ center: "50%",
3437
+ end: "100%"
3438
+ }[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
3439
+ return c === "bottom" ? (p = a ? u : `${d}px`, m = `${-s}px`) : c === "top" ? (p = a ? u : `${d}px`, m = `${r.floating.height + s}px`) : c === "right" ? (p = `${-s}px`, m = a ? u : `${f}px`) : c === "left" && (p = `${r.floating.width + s}px`, m = a ? u : `${f}px`), { data: {
3440
+ x: p,
3441
+ y: m
3442
+ } };
3443
+ }
3444
+ };
3445
+ }
3446
+ function pa(e) {
3447
+ let [t, n = "center"] = e.split("-");
3448
+ return [t, n];
3449
+ }
3450
+ function ma(e) {
3451
+ return pa(e)[0];
3452
+ }
3453
+ function ha(e) {
3454
+ return pa(e)[1];
3455
+ }
3456
+ //#endregion
3457
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer.svelte
3458
+ function ga(e, n) {
3459
+ t.push(n, !0);
3460
+ let r = t.prop(n, "tooltip", 3, !1);
3461
+ la.create(r());
3462
+ var i = t.comment(), a = t.first_child(i);
3463
+ t.snippet(a, () => n.children ?? t.noop), t.append(e, i), t.pop();
3464
+ }
3465
+ //#endregion
3466
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/create-id.js
3467
+ function _a(e, t) {
3468
+ return t === void 0 ? `bits-${e}` : `bits-${e}-${t}`;
3469
+ }
3470
+ //#endregion
3471
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/shared-state.svelte.js
3472
+ var va = class {
3473
+ #e;
3474
+ #t = 0;
3475
+ #n = t.state();
3476
+ #r;
3477
+ constructor(e) {
3478
+ this.#e = e;
3479
+ }
3480
+ #i() {
3481
+ --this.#t, this.#r && this.#t <= 0 && (this.#r(), t.set(this.#n, void 0), this.#r = void 0);
3482
+ }
3483
+ get(...e) {
3484
+ return this.#t += 1, t.get(this.#n) === void 0 && (this.#r = t.effect_root(() => {
3485
+ t.set(this.#n, this.#e(...e), !0);
3486
+ })), t.user_effect(() => () => {
3487
+ this.#i();
3488
+ }), t.get(this.#n);
3489
+ }
3490
+ }, ya = new u(), ba = t.state(null), xa = null, Sa = null, Ca = !1, wa = v(() => {
3491
+ for (let e of ya.values()) if (e) return !0;
3492
+ return !1;
3493
+ }), Ta = null, Ea = new va(() => {
3494
+ function e() {
3495
+ document.body.setAttribute("style", t.get(ba) ?? ""), document.body.style.removeProperty("--scrollbar-width"), Dt && xa?.(), t.set(ba, null);
3496
+ }
3497
+ function n() {
3498
+ Sa !== null && (window.clearTimeout(Sa), Sa = null);
3499
+ }
3500
+ function r(e, t) {
3501
+ n(), Ca = !0, Ta = Date.now();
3502
+ let r = Ta, i = () => {
3503
+ Sa = null, Ta === r && (Oa(ya) ? Ca = !1 : (Ca = !1, t()));
3504
+ }, a = e === null ? 24 : e;
3505
+ Sa = window.setTimeout(i, a);
3506
+ }
3507
+ function i() {
3508
+ t.get(ba) === null && ya.size === 0 && !Ca && t.set(ba, document.body.getAttribute("style"), !0);
3509
+ }
3510
+ return N(() => wa.current, () => {
3511
+ if (!wa.current) return;
3512
+ i(), Ca = !1;
3513
+ let e = getComputedStyle(document.documentElement), t = getComputedStyle(document.body), n = e.scrollbarGutter?.includes("stable") || t.scrollbarGutter?.includes("stable"), r = window.innerWidth - document.documentElement.clientWidth, a = {
3514
+ padding: Number.parseInt(t.paddingRight ?? "0", 10) + r,
3515
+ margin: Number.parseInt(t.marginRight ?? "0", 10)
3516
+ };
3517
+ r > 0 && !n && (document.body.style.paddingRight = `${a.padding}px`, document.body.style.marginRight = `${a.margin}px`, document.body.style.setProperty("--scrollbar-width", `${r}px`)), document.body.style.overflow = "hidden", Dt && (xa = l(document, "touchmove", (e) => {
3518
+ e.target === document.documentElement && (e.touches.length > 1 || e.preventDefault());
3519
+ }, { passive: !1 })), A(() => {
3520
+ document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden";
3521
+ });
3522
+ }), k(() => () => {
3523
+ xa?.();
3524
+ }), {
3525
+ get lockMap() {
3526
+ return ya;
3527
+ },
3528
+ resetBodyStyle: e,
3529
+ scheduleCleanupIfNoNewLocks: r,
3530
+ cancelPendingCleanup: n,
3531
+ ensureInitialStyleCaptured: i
3532
+ };
3533
+ }), Da = class {
3534
+ #e = $i();
3535
+ #t;
3536
+ #n = () => null;
3537
+ #r;
3538
+ locked;
3539
+ constructor(e, t = () => null) {
3540
+ this.#t = e, this.#n = t, this.#r = Ea.get(), this.#r && (this.#r.cancelPendingCleanup(), this.#r.ensureInitialStyleCaptured(), this.#r.lockMap.set(this.#e, this.#t ?? !1), this.locked = v(() => this.#r.lockMap.get(this.#e) ?? !1, (e) => this.#r.lockMap.set(this.#e, e)), k(() => {
3541
+ if (this.#r.lockMap.delete(this.#e), Oa(this.#r.lockMap)) return;
3542
+ let e = this.#n();
3543
+ this.#r.scheduleCleanupIfNoNewLocks(e, () => {
3544
+ this.#r.resetBodyStyle();
3545
+ });
3546
+ }));
3547
+ }
3548
+ };
3549
+ function Oa(e) {
3550
+ for (let [t, n] of e) if (n) return !0;
3551
+ return !1;
3552
+ }
3553
+ //#endregion
3554
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/scroll-lock/scroll-lock.svelte
3555
+ function ka(e, n) {
3556
+ t.push(n, !0);
3557
+ let r = t.prop(n, "preventScroll", 3, !0), i = t.prop(n, "restoreScrollDelay", 3, null);
3558
+ r() && new Da(r(), () => i()), t.pop();
3559
+ }
3560
+ //#endregion
3561
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content-static.svelte
3562
+ function Aa(e, n) {
3563
+ t.push(n, !0), i(() => {
3564
+ n.onPlaced?.();
3565
+ });
3566
+ var r = t.comment(), a = t.first_child(r);
3567
+ t.snippet(a, () => n.content ?? t.noop, () => ({
3568
+ props: {},
3569
+ wrapperProps: {}
3570
+ })), t.append(e, r), t.pop();
3571
+ }
3572
+ //#endregion
3573
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content.svelte
3574
+ function ja(e, n) {
3575
+ t.push(n, !0);
3576
+ let r = t.prop(n, "side", 3, "bottom"), i = t.prop(n, "sideOffset", 3, 0), a = t.prop(n, "align", 3, "center"), o = t.prop(n, "alignOffset", 3, 0), s = t.prop(n, "arrowPadding", 3, 0), c = t.prop(n, "avoidCollisions", 3, !0), l = t.prop(n, "collisionBoundary", 19, () => []), u = t.prop(n, "collisionPadding", 3, 0), d = t.prop(n, "hideWhenDetached", 3, !1), f = t.prop(n, "onPlaced", 3, () => {}), p = t.prop(n, "sticky", 3, "partial"), m = t.prop(n, "updatePositionStrategy", 3, "optimized"), h = t.prop(n, "strategy", 3, "fixed"), g = t.prop(n, "dir", 3, "ltr"), _ = t.prop(n, "style", 19, () => ({})), y = t.prop(n, "wrapperId", 19, $i), b = t.prop(n, "customAnchor", 3, null), x = t.prop(n, "tooltip", 3, !1), S = ua.create({
3577
+ side: v(() => r()),
3578
+ sideOffset: v(() => i()),
3579
+ align: v(() => a()),
3580
+ alignOffset: v(() => o()),
3581
+ id: v(() => n.id),
3582
+ arrowPadding: v(() => s()),
3583
+ avoidCollisions: v(() => c()),
3584
+ collisionBoundary: v(() => l()),
3585
+ collisionPadding: v(() => u()),
3586
+ hideWhenDetached: v(() => d()),
3587
+ onPlaced: v(() => f()),
3588
+ sticky: v(() => p()),
3589
+ updatePositionStrategy: v(() => m()),
3590
+ strategy: v(() => h()),
3591
+ dir: v(() => g()),
3592
+ style: v(() => _()),
3593
+ enabled: v(() => n.enabled),
3594
+ wrapperId: v(() => y()),
3595
+ customAnchor: v(() => b())
3596
+ }, x()), C = t.derived(() => je(S.wrapperProps, { style: { pointerEvents: "auto" } }));
3597
+ var w = t.comment(), T = t.first_child(w);
3598
+ t.snippet(T, () => n.content ?? t.noop, () => ({
3599
+ props: S.props,
3600
+ wrapperProps: t.get(C)
3601
+ })), t.append(e, w), t.pop();
3602
+ }
3603
+ //#endregion
3604
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-content.svelte
3605
+ var Ma = /* @__PURE__ */ new Set([
3606
+ "$$slots",
3607
+ "$$events",
3608
+ "$$legacy",
3609
+ "content",
3610
+ "isStatic",
3611
+ "onPlaced"
3612
+ ]);
3613
+ function Na(e, n) {
3614
+ let r = t.prop(n, "isStatic", 3, !1), i = t.rest_props(n, Ma);
3615
+ var a = t.comment(), o = t.first_child(a), s = (e) => {
3616
+ Aa(e, {
3617
+ get content() {
3618
+ return n.content;
3619
+ },
3620
+ get onPlaced() {
3621
+ return n.onPlaced;
3622
+ }
3623
+ });
3624
+ }, c = (e) => {
3625
+ ja(e, t.spread_props({
3626
+ get content() {
3627
+ return n.content;
3628
+ },
3629
+ get onPlaced() {
3630
+ return n.onPlaced;
3631
+ }
3632
+ }, () => i));
3633
+ };
3634
+ t.if(o, (e) => {
3635
+ r() ? e(s) : e(c, -1);
3636
+ }), t.append(e, a);
3637
+ }
3638
+ //#endregion
3639
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/escape-layer/use-escape-layer.svelte.js
3640
+ globalThis.bitsEscapeLayers ??= /* @__PURE__ */ new Map();
3641
+ var Pa = class e {
3642
+ static create(t) {
3643
+ return new e(t);
3644
+ }
3645
+ opts;
3646
+ domContext;
3647
+ constructor(e) {
3648
+ this.opts = e, this.domContext = new Ge(this.opts.ref);
3649
+ let t = L;
3650
+ N(() => e.enabled.current, (n) => (n && (globalThis.bitsEscapeLayers.set(this, e.escapeKeydownBehavior), t = this.#e()), () => {
3651
+ t(), globalThis.bitsEscapeLayers.delete(this);
3652
+ }));
3653
+ }
3654
+ #e = () => l(this.domContext.getDocument(), "keydown", this.#t, { passive: !1 });
3655
+ #t = (e) => {
3656
+ if (e.key !== "Escape" || !Fa(this)) return;
3657
+ let t = new KeyboardEvent(e.type, e);
3658
+ e.preventDefault();
3659
+ let n = this.opts.escapeKeydownBehavior.current;
3660
+ n !== "close" && n !== "defer-otherwise-close" || this.opts.onEscapeKeydown.current(t);
3661
+ };
3662
+ };
3663
+ function Fa(e) {
3664
+ let t = [...globalThis.bitsEscapeLayers], n = t.findLast(([e, { current: t }]) => t === "close" || t === "ignore");
3665
+ if (n) return n[0] === e;
3666
+ let [r] = t[0];
3667
+ return r === e;
3668
+ }
3669
+ //#endregion
3670
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/escape-layer/escape-layer.svelte
3671
+ function Ia(e, n) {
3672
+ t.push(n, !0);
3673
+ let r = t.prop(n, "escapeKeydownBehavior", 3, "close"), i = t.prop(n, "onEscapeKeydown", 3, L);
3674
+ Pa.create({
3675
+ escapeKeydownBehavior: v(() => r()),
3676
+ onEscapeKeydown: v(() => i()),
3677
+ enabled: v(() => n.enabled),
3678
+ ref: n.ref
3679
+ });
3680
+ var a = t.comment(), o = t.first_child(a);
3681
+ t.snippet(o, () => n.children ?? t.noop), t.append(e, a), t.pop();
3682
+ }
3683
+ //#endregion
3684
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/debounce.js
3685
+ function La(e, t = 500) {
3686
+ let n = null, r = (...r) => {
3687
+ n !== null && clearTimeout(n), n = setTimeout(() => {
3688
+ e(...r);
3689
+ }, t);
3690
+ };
3691
+ return r.destroy = () => {
3692
+ n !== null && (clearTimeout(n), n = null);
3693
+ }, r;
3694
+ }
3695
+ //#endregion
3696
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/elements.js
3697
+ function Ra(e, t) {
3698
+ return e === t || e.contains(t);
3699
+ }
3700
+ function za(e) {
3701
+ return e?.ownerDocument ?? document;
3702
+ }
3703
+ //#endregion
3704
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/internal/dom.js
3705
+ function Ba(e, t) {
3706
+ let { clientX: n, clientY: r } = e, i = t.getBoundingClientRect();
3707
+ return n < i.left || n > i.right || r < i.top || r > i.bottom;
3708
+ }
3709
+ //#endregion
3710
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/dismissible-layer/use-dismissable-layer.svelte.js
3711
+ globalThis.bitsDismissableLayers ??= /* @__PURE__ */ new Map();
3712
+ var Va = class e {
3713
+ static create(t) {
3714
+ return new e(t);
3715
+ }
3716
+ opts;
3717
+ #e;
3718
+ #t;
3719
+ #n = { pointerdown: !1 };
3720
+ #r = !1;
3721
+ #i = !1;
3722
+ #a = void 0;
3723
+ #o;
3724
+ #s = L;
3725
+ constructor(e) {
3726
+ this.opts = e, this.#t = e.interactOutsideBehavior, this.#e = e.onInteractOutside, this.#o = e.onFocusOutside, t.user_effect(() => {
3727
+ this.#a = za(this.opts.ref.current);
3728
+ });
3729
+ let n = L, r = () => {
3730
+ this.#g(), globalThis.bitsDismissableLayers.delete(this), this.#d.destroy(), n();
3731
+ };
3732
+ N([() => this.opts.enabled.current, () => this.opts.ref.current], () => {
3733
+ if (!(!this.opts.enabled.current || !this.opts.ref.current)) return Me(1, () => {
3734
+ this.opts.ref.current && (globalThis.bitsDismissableLayers.set(this, this.#t), n(), n = this.#l());
3735
+ }), r;
3736
+ }), k(() => {
3737
+ this.#g.destroy(), globalThis.bitsDismissableLayers.delete(this), this.#d.destroy(), this.#s(), n();
3738
+ });
3739
+ }
3740
+ #c = (e) => {
3741
+ e.defaultPrevented || this.opts.ref.current && A(() => {
3742
+ !this.opts.ref.current || this.#h(e.target) || e.target && !this.#i && this.#o.current?.(e);
3743
+ });
3744
+ };
3745
+ #l() {
3746
+ return O(l(this.#a, "pointerdown", O(this.#f, this.#m), { capture: !0 }), l(this.#a, "pointerdown", O(this.#p, this.#d)), l(this.#a, "focusin", this.#c));
3747
+ }
3748
+ #u = (e) => {
3749
+ let t = e;
3750
+ t.defaultPrevented && (t = Ga(e)), this.#e.current(e);
3751
+ };
3752
+ #d = La((e) => {
3753
+ if (!this.opts.ref.current) {
3754
+ this.#s();
3755
+ return;
3756
+ }
3757
+ let t = this.opts.isValidEvent.current(e, this.opts.ref.current) || Wa(e, this.opts.ref.current);
3758
+ if (!this.#r || this.#_() || !t) {
3759
+ this.#s();
3760
+ return;
3761
+ }
3762
+ let n = e;
3763
+ if (n.defaultPrevented && (n = Ga(n)), this.#t.current !== "close" && this.#t.current !== "defer-otherwise-close") {
3764
+ this.#s();
3765
+ return;
3766
+ }
3767
+ e.pointerType === "touch" ? (this.#s(), this.#s = l(this.#a, "click", this.#u, { once: !0 })) : this.#e.current(n);
3768
+ }, 10);
3769
+ #f = (e) => {
3770
+ this.#n[e.type] = !0;
3771
+ };
3772
+ #p = (e) => {
3773
+ this.#n[e.type] = !1;
3774
+ };
3775
+ #m = () => {
3776
+ this.opts.ref.current && (this.#r = Ua(this.opts.ref.current));
3777
+ };
3778
+ #h = (e) => this.opts.ref.current ? Ra(this.opts.ref.current, e) : !1;
3779
+ #g = La(() => {
3780
+ for (let e in this.#n) this.#n[e] = !1;
3781
+ this.#r = !1;
3782
+ }, 20);
3783
+ #_() {
3784
+ return Object.values(this.#n).some(Boolean);
3785
+ }
3786
+ #v = () => {
3787
+ this.#i = !0;
3788
+ };
3789
+ #y = () => {
3790
+ this.#i = !1;
3791
+ };
3792
+ props = {
3793
+ onfocuscapture: this.#v,
3794
+ onblurcapture: this.#y
3795
+ };
3796
+ };
3797
+ function Ha(e = [...globalThis.bitsDismissableLayers]) {
3798
+ return e.findLast(([e, { current: t }]) => t === "close" || t === "ignore");
3799
+ }
3800
+ function Ua(e) {
3801
+ let t = [...globalThis.bitsDismissableLayers], n = Ha(t);
3802
+ if (n) return n[0].opts.ref.current === e;
3803
+ let [r] = t[0];
3804
+ return r.opts.ref.current === e;
3805
+ }
3806
+ function Wa(e, t) {
3807
+ let n = e.target;
3808
+ if (!At(n)) return !1;
3809
+ let r = !!n.closest(`[${Gn}]`), i = !!t.closest(`[${Kn}]`);
3810
+ return "button" in e && e.button > 0 && !r ? !1 : "button" in e && e.button === 0 && r && i ? !0 : r && i ? !1 : za(n).documentElement.contains(n) && !Ra(t, n) && Ba(e, t);
3811
+ }
3812
+ function Ga(e) {
3813
+ let t = e.currentTarget, n = e.target, r;
3814
+ r = e instanceof PointerEvent ? new PointerEvent(e.type, e) : new PointerEvent("pointerdown", e);
3815
+ let i = !1;
3816
+ return new Proxy(r, { get: (r, a) => a === "currentTarget" ? t : a === "target" ? n : a === "preventDefault" ? () => {
3817
+ i = !0, typeof r.preventDefault == "function" && r.preventDefault();
3818
+ } : a === "defaultPrevented" ? i : a in r ? r[a] : e[a] });
3819
+ }
3820
+ //#endregion
3821
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/dismissible-layer/dismissible-layer.svelte
3822
+ function Ka(e, n) {
3823
+ t.push(n, !0);
3824
+ let r = t.prop(n, "interactOutsideBehavior", 3, "close"), i = t.prop(n, "onInteractOutside", 3, L), a = t.prop(n, "onFocusOutside", 3, L), o = t.prop(n, "isValidEvent", 3, () => !1), s = Va.create({
3825
+ id: v(() => n.id),
3826
+ interactOutsideBehavior: v(() => r()),
3827
+ onInteractOutside: v(() => i()),
3828
+ enabled: v(() => n.enabled),
3829
+ onFocusOutside: v(() => a()),
3830
+ isValidEvent: v(() => o()),
3831
+ ref: n.ref
3832
+ });
3833
+ var c = t.comment(), l = t.first_child(c);
3834
+ t.snippet(l, () => n.children ?? t.noop, () => ({ props: s.props })), t.append(e, c), t.pop();
3835
+ }
3836
+ //#endregion
3837
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/text-selection-layer/use-text-selection-layer.svelte.js
3838
+ var qa = () => {};
3839
+ globalThis.bitsTextSelectionLayers ??= /* @__PURE__ */ new Map();
3840
+ var Ja = class e {
3841
+ static create(t) {
3842
+ return new e(t);
3843
+ }
3844
+ opts;
3845
+ domContext;
3846
+ #e = L;
3847
+ #t = !1;
3848
+ #n = qa;
3849
+ #r = qa;
3850
+ constructor(e) {
3851
+ this.opts = e, this.domContext = new Ge(e.ref);
3852
+ let t = L;
3853
+ N(() => [
3854
+ this.opts.enabled.current,
3855
+ this.opts.onPointerDown.current,
3856
+ this.opts.onPointerUp.current
3857
+ ], ([e, n, r]) => (this.#t = e, this.#n = n, this.#r = r, e && (globalThis.bitsTextSelectionLayers.set(this, this.opts.enabled), t(), t = this.#i()), () => {
3858
+ this.#t = !1, t(), this.#s(), globalThis.bitsTextSelectionLayers.delete(this);
3859
+ }));
3860
+ }
3861
+ #i() {
3862
+ return O(l(this.domContext.getDocument(), "pointerdown", this.#o), l(this.domContext.getDocument(), "pointerup", ee(this.#s, this.#a)));
3863
+ }
3864
+ #a = (e) => {
3865
+ this.#r(e);
3866
+ };
3867
+ #o = (e) => {
3868
+ let t = this.opts.ref.current, n = e.target;
3869
+ !F(t) || !F(n) || !this.#t || !Qa(this) || !Ve(t, n) || (this.#n(e), !e.defaultPrevented && (this.#e = Xa(t, this.domContext.getDocument().body)));
3870
+ };
3871
+ #s = () => {
3872
+ this.#e(), this.#e = L;
3873
+ };
3874
+ }, Ya = (e) => e.style.userSelect || e.style.webkitUserSelect;
3875
+ function Xa(e, t) {
3876
+ let n = Ya(t), r = Ya(e);
3877
+ return Za(t, "none"), Za(e, "text"), () => {
3878
+ Za(t, n), Za(e, r);
3879
+ };
3880
+ }
3881
+ function Za(e, t) {
3882
+ e.style.userSelect = t, e.style.webkitUserSelect = t;
3883
+ }
3884
+ function Qa(e) {
3885
+ let t = [...globalThis.bitsTextSelectionLayers];
3886
+ if (!t.length) return !1;
3887
+ let n = t.at(-1);
3888
+ return n ? n[0] === e : !1;
3889
+ }
3890
+ //#endregion
3891
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/text-selection-layer/text-selection-layer.svelte
3892
+ function $a(e, n) {
3893
+ t.push(n, !0);
3894
+ let r = t.prop(n, "preventOverflowTextSelection", 3, !0), i = t.prop(n, "onPointerDown", 3, L), a = t.prop(n, "onPointerUp", 3, L);
3895
+ Ja.create({
3896
+ id: v(() => n.id),
3897
+ onPointerDown: v(() => i()),
3898
+ onPointerUp: v(() => a()),
3899
+ enabled: v(() => n.enabled && r()),
3900
+ ref: n.ref
3901
+ });
3902
+ var o = t.comment(), s = t.first_child(o);
3903
+ t.snippet(s, () => n.children ?? t.noop), t.append(e, o), t.pop();
3904
+ }
3905
+ //#endregion
3906
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope-manager.js
3907
+ var eo = class e {
3908
+ static instance;
3909
+ #e = w([]);
3910
+ #t = /* @__PURE__ */ new WeakMap();
3911
+ #n = /* @__PURE__ */ new WeakMap();
3912
+ static getInstance() {
3913
+ return this.instance ||= new e(), this.instance;
3914
+ }
3915
+ register(e) {
3916
+ let t = this.getActive();
3917
+ t && t !== e && t.pause();
3918
+ let n = document.activeElement;
3919
+ n && n !== document.body && this.#n.set(e, n), this.#e.current = this.#e.current.filter((t) => t !== e), this.#e.current.unshift(e);
3920
+ }
3921
+ unregister(e) {
3922
+ this.#e.current = this.#e.current.filter((t) => t !== e);
3923
+ let t = this.getActive();
3924
+ t && t.resume();
3925
+ }
3926
+ getActive() {
3927
+ return this.#e.current[0];
3928
+ }
3929
+ setFocusMemory(e, t) {
3930
+ this.#t.set(e, t);
3931
+ }
3932
+ getFocusMemory(e) {
3933
+ return this.#t.get(e);
3934
+ }
3935
+ isActiveScope(e) {
3936
+ return this.getActive() === e;
3937
+ }
3938
+ setPreFocusMemory(e, t) {
3939
+ this.#n.set(e, t);
3940
+ }
3941
+ getPreFocusMemory(e) {
3942
+ return this.#n.get(e);
3943
+ }
3944
+ clearPreFocusMemory(e) {
3945
+ this.#n.delete(e);
3946
+ }
3947
+ }, to = class e {
3948
+ #e = !1;
3949
+ #t = null;
3950
+ #n = eo.getInstance();
3951
+ #r = [];
3952
+ #i;
3953
+ constructor(e) {
3954
+ this.#i = e;
3955
+ }
3956
+ get paused() {
3957
+ return this.#e;
3958
+ }
3959
+ pause() {
3960
+ this.#e = !0;
3961
+ }
3962
+ resume() {
3963
+ this.#e = !1;
3964
+ }
3965
+ #a() {
3966
+ for (let e of this.#r) e();
3967
+ this.#r = [];
3968
+ }
3969
+ mount(e) {
3970
+ this.#t && this.unmount(), this.#t = e, this.#n.register(this), this.#c(), this.#o();
3971
+ }
3972
+ unmount() {
3973
+ this.#t &&= (this.#a(), this.#s(), this.#n.unregister(this), this.#n.clearPreFocusMemory(this), null);
3974
+ }
3975
+ #o() {
3976
+ if (!this.#t) return;
3977
+ let e = new CustomEvent("focusScope.onOpenAutoFocus", {
3978
+ bubbles: !1,
3979
+ cancelable: !0
3980
+ });
3981
+ this.#i.onOpenAutoFocus.current(e), e.defaultPrevented || requestAnimationFrame(() => {
3982
+ if (!this.#t) return;
3983
+ let e = this.#u();
3984
+ e ? (e.focus(), this.#n.setFocusMemory(this, e)) : this.#t.focus();
3985
+ });
3986
+ }
3987
+ #s() {
3988
+ let e = new CustomEvent("focusScope.onCloseAutoFocus", {
3989
+ bubbles: !1,
3990
+ cancelable: !0
3991
+ });
3992
+ if (this.#i.onCloseAutoFocus.current?.(e), !e.defaultPrevented) {
3993
+ let e = this.#n.getPreFocusMemory(this);
3994
+ if (e && document.contains(e)) try {
3995
+ e.focus();
3996
+ } catch {
3997
+ document.body.focus();
3998
+ }
3999
+ }
4000
+ }
4001
+ #c() {
4002
+ if (!this.#t || !this.#i.trap.current) return;
4003
+ let e = this.#t, t = e.ownerDocument;
4004
+ this.#r.push(l(t, "focusin", (t) => {
4005
+ if (this.#e || !this.#n.isActiveScope(this)) return;
4006
+ let n = t.target;
4007
+ if (n) if (e.contains(n)) this.#n.setFocusMemory(this, n);
4008
+ else {
4009
+ let n = this.#n.getFocusMemory(this);
4010
+ if (n && e.contains(n) && Cn(n)) t.preventDefault(), n.focus();
4011
+ else {
4012
+ let t = this.#u(), n = this.#d()[0];
4013
+ (t || n || e).focus();
4014
+ }
4015
+ }
4016
+ }, { capture: !0 }), l(e, "keydown", (e) => {
4017
+ if (!this.#i.loop || this.#e || e.key !== "Tab" || !this.#n.isActiveScope(this)) return;
4018
+ let n = this.#l();
4019
+ if (n.length === 0) return;
4020
+ let r = n[0], i = n[n.length - 1];
4021
+ !e.shiftKey && t.activeElement === i ? (e.preventDefault(), r.focus()) : e.shiftKey && t.activeElement === r && (e.preventDefault(), i.focus());
4022
+ }));
4023
+ let n = new MutationObserver(() => {
4024
+ let t = this.#n.getFocusMemory(this);
4025
+ if (t && !e.contains(t)) {
4026
+ let t = this.#u(), n = this.#d()[0], r = t || n;
4027
+ r ? (r.focus(), this.#n.setFocusMemory(this, r)) : e.focus();
4028
+ }
4029
+ });
4030
+ n.observe(e, {
4031
+ childList: !0,
4032
+ subtree: !0
4033
+ }), this.#r.push(() => n.disconnect());
4034
+ }
4035
+ #l() {
4036
+ return this.#t ? yn(this.#t, {
4037
+ includeContainer: !1,
4038
+ getShadowRoot: !0
4039
+ }) : [];
4040
+ }
4041
+ #u() {
4042
+ return this.#l()[0] || null;
4043
+ }
4044
+ #d() {
4045
+ return this.#t ? bn(this.#t, {
4046
+ includeContainer: !1,
4047
+ getShadowRoot: !0
4048
+ }) : [];
4049
+ }
4050
+ static use(t) {
4051
+ let n = null;
4052
+ return N([() => t.ref.current, () => t.enabled.current], ([r, i]) => {
4053
+ r && i ? (n ||= new e(t), n.mount(r)) : n &&= (n.unmount(), null);
4054
+ }), k(() => {
4055
+ n?.unmount();
4056
+ }), { get props() {
4057
+ return { tabindex: -1 };
4058
+ } };
4059
+ }
4060
+ };
4061
+ //#endregion
4062
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope.svelte
4063
+ function no(e, n) {
4064
+ t.push(n, !0);
4065
+ let r = t.prop(n, "enabled", 3, !1), i = t.prop(n, "trapFocus", 3, !1), a = t.prop(n, "loop", 3, !1), o = t.prop(n, "onCloseAutoFocus", 3, L), s = t.prop(n, "onOpenAutoFocus", 3, L), c = to.use({
4066
+ enabled: v(() => r()),
4067
+ trap: v(() => i()),
4068
+ loop: a(),
4069
+ onCloseAutoFocus: v(() => o()),
4070
+ onOpenAutoFocus: v(() => s()),
4071
+ ref: n.ref
4072
+ });
4073
+ var l = t.comment(), u = t.first_child(l);
4074
+ t.snippet(u, () => n.focusScope ?? t.noop, () => ({ props: c.props })), t.append(e, l), t.pop();
4075
+ }
4076
+ //#endregion
4077
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-inner.svelte
4078
+ var ro = /* @__PURE__ */ new Set(/* @__PURE__ */ "$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents".split(".")), io = t.from_html("<!> <!>", 1);
4079
+ function ao(e, n) {
4080
+ t.push(n, !0);
4081
+ let r = t.prop(n, "interactOutsideBehavior", 3, "close"), i = t.prop(n, "trapFocus", 3, !0), a = t.prop(n, "isValidEvent", 3, () => !1), o = t.prop(n, "customAnchor", 3, null), s = t.prop(n, "isStatic", 3, !1), c = t.prop(n, "tooltip", 3, !1), l = t.prop(n, "contentPointerEvents", 3, "auto"), u = t.rest_props(n, ro), d = t.derived(() => n.preventScroll ?? !0), f = t.derived(() => n.strategy ?? (t.get(d) ? "fixed" : "absolute"));
4082
+ Na(e, {
4083
+ get isStatic() {
4084
+ return s();
4085
+ },
4086
+ get id() {
4087
+ return n.id;
4088
+ },
4089
+ get side() {
4090
+ return n.side;
4091
+ },
4092
+ get sideOffset() {
4093
+ return n.sideOffset;
4094
+ },
4095
+ get align() {
4096
+ return n.align;
4097
+ },
4098
+ get alignOffset() {
4099
+ return n.alignOffset;
4100
+ },
4101
+ get arrowPadding() {
4102
+ return n.arrowPadding;
4103
+ },
4104
+ get avoidCollisions() {
4105
+ return n.avoidCollisions;
4106
+ },
4107
+ get collisionBoundary() {
4108
+ return n.collisionBoundary;
4109
+ },
4110
+ get collisionPadding() {
4111
+ return n.collisionPadding;
4112
+ },
4113
+ get sticky() {
4114
+ return n.sticky;
4115
+ },
4116
+ get hideWhenDetached() {
4117
+ return n.hideWhenDetached;
4118
+ },
4119
+ get updatePositionStrategy() {
4120
+ return n.updatePositionStrategy;
4121
+ },
4122
+ get strategy() {
4123
+ return t.get(f);
4124
+ },
4125
+ get dir() {
4126
+ return n.dir;
4127
+ },
4128
+ get wrapperId() {
4129
+ return n.wrapperId;
4130
+ },
4131
+ get style() {
4132
+ return n.style;
4133
+ },
4134
+ get onPlaced() {
4135
+ return n.onPlaced;
4136
+ },
4137
+ get customAnchor() {
4138
+ return o();
4139
+ },
4140
+ get enabled() {
4141
+ return n.enabled;
4142
+ },
4143
+ get tooltip() {
4144
+ return c();
4145
+ },
4146
+ content: (e, o) => {
4147
+ let s = () => (o?.()).props, c = () => (o?.()).wrapperProps;
4148
+ var f = io(), p = t.first_child(f), m = (e) => {
4149
+ ka(e, { get preventScroll() {
4150
+ return t.get(d);
4151
+ } });
4152
+ }, h = (e) => {
4153
+ ka(e, { get preventScroll() {
4154
+ return t.get(d);
4155
+ } });
4156
+ };
4157
+ t.if(p, (e) => {
4158
+ n.forceMount && n.enabled ? e(m) : n.forceMount || e(h, 1);
4159
+ }), no(t.sibling(p, 2), {
4160
+ get onOpenAutoFocus() {
4161
+ return n.onOpenAutoFocus;
4162
+ },
4163
+ get onCloseAutoFocus() {
4164
+ return n.onCloseAutoFocus;
4165
+ },
4166
+ get loop() {
4167
+ return n.loop;
4168
+ },
4169
+ get enabled() {
4170
+ return n.enabled;
4171
+ },
4172
+ get trapFocus() {
4173
+ return i();
4174
+ },
4175
+ get forceMount() {
4176
+ return n.forceMount;
4177
+ },
4178
+ get ref() {
4179
+ return n.ref;
4180
+ },
4181
+ focusScope: (e, i) => {
4182
+ let o = () => (i?.()).props;
4183
+ Ia(e, {
4184
+ get onEscapeKeydown() {
4185
+ return n.onEscapeKeydown;
4186
+ },
4187
+ get escapeKeydownBehavior() {
4188
+ return n.escapeKeydownBehavior;
4189
+ },
4190
+ get enabled() {
4191
+ return n.enabled;
4192
+ },
4193
+ get ref() {
4194
+ return n.ref;
4195
+ },
4196
+ children: (e, i) => {
4197
+ Ka(e, {
4198
+ get id() {
4199
+ return n.id;
4200
+ },
4201
+ get onInteractOutside() {
4202
+ return n.onInteractOutside;
4203
+ },
4204
+ get onFocusOutside() {
4205
+ return n.onFocusOutside;
4206
+ },
4207
+ get interactOutsideBehavior() {
4208
+ return r();
4209
+ },
4210
+ get isValidEvent() {
4211
+ return a();
4212
+ },
4213
+ get enabled() {
4214
+ return n.enabled;
4215
+ },
4216
+ get ref() {
4217
+ return n.ref;
4218
+ },
4219
+ children: (e, r) => {
4220
+ let i = () => (r?.()).props;
4221
+ $a(e, {
4222
+ get id() {
4223
+ return n.id;
4224
+ },
4225
+ get preventOverflowTextSelection() {
4226
+ return n.preventOverflowTextSelection;
4227
+ },
4228
+ get onPointerDown() {
4229
+ return n.onPointerDown;
4230
+ },
4231
+ get onPointerUp() {
4232
+ return n.onPointerUp;
4233
+ },
4234
+ get enabled() {
4235
+ return n.enabled;
4236
+ },
4237
+ get ref() {
4238
+ return n.ref;
4239
+ },
4240
+ children: (e, r) => {
4241
+ var a = t.comment(), d = t.first_child(a);
4242
+ {
4243
+ let e = t.derived(() => ({
4244
+ props: je(u, s(), i(), o(), { style: { pointerEvents: l() } }),
4245
+ wrapperProps: c()
4246
+ }));
4247
+ t.snippet(d, () => n.popper ?? t.noop, () => t.get(e));
4248
+ }
4249
+ t.append(e, a);
4250
+ },
4251
+ $$slots: { default: !0 }
4252
+ });
4253
+ },
4254
+ $$slots: { default: !0 }
4255
+ });
4256
+ },
4257
+ $$slots: { default: !0 }
4258
+ });
4259
+ },
4260
+ $$slots: { focusScope: !0 }
4261
+ }), t.append(e, f);
4262
+ },
4263
+ $$slots: { content: !0 }
4264
+ }), t.pop();
4265
+ }
4266
+ //#endregion
4267
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer.svelte
4268
+ var oo = /* @__PURE__ */ new Set(/* @__PURE__ */ "$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender".split("."));
4269
+ function so(e, n) {
4270
+ let r = t.prop(n, "interactOutsideBehavior", 3, "close"), i = t.prop(n, "trapFocus", 3, !0), a = t.prop(n, "isValidEvent", 3, () => !1), o = t.prop(n, "customAnchor", 3, null), s = t.prop(n, "isStatic", 3, !1), c = t.rest_props(n, oo);
4271
+ var l = t.comment(), u = t.first_child(l), d = (e) => {
4272
+ ao(e, t.spread_props({
4273
+ get popper() {
4274
+ return n.popper;
4275
+ },
4276
+ get onEscapeKeydown() {
4277
+ return n.onEscapeKeydown;
4278
+ },
4279
+ get escapeKeydownBehavior() {
4280
+ return n.escapeKeydownBehavior;
4281
+ },
4282
+ get preventOverflowTextSelection() {
4283
+ return n.preventOverflowTextSelection;
4284
+ },
4285
+ get id() {
4286
+ return n.id;
4287
+ },
4288
+ get onPointerDown() {
4289
+ return n.onPointerDown;
4290
+ },
4291
+ get onPointerUp() {
4292
+ return n.onPointerUp;
4293
+ },
4294
+ get side() {
4295
+ return n.side;
4296
+ },
4297
+ get sideOffset() {
4298
+ return n.sideOffset;
4299
+ },
4300
+ get align() {
4301
+ return n.align;
4302
+ },
4303
+ get alignOffset() {
4304
+ return n.alignOffset;
4305
+ },
4306
+ get arrowPadding() {
4307
+ return n.arrowPadding;
4308
+ },
4309
+ get avoidCollisions() {
4310
+ return n.avoidCollisions;
4311
+ },
4312
+ get collisionBoundary() {
4313
+ return n.collisionBoundary;
4314
+ },
4315
+ get collisionPadding() {
4316
+ return n.collisionPadding;
4317
+ },
4318
+ get sticky() {
4319
+ return n.sticky;
4320
+ },
4321
+ get hideWhenDetached() {
4322
+ return n.hideWhenDetached;
4323
+ },
4324
+ get updatePositionStrategy() {
4325
+ return n.updatePositionStrategy;
4326
+ },
4327
+ get strategy() {
4328
+ return n.strategy;
4329
+ },
4330
+ get dir() {
4331
+ return n.dir;
4332
+ },
4333
+ get preventScroll() {
4334
+ return n.preventScroll;
4335
+ },
4336
+ get wrapperId() {
4337
+ return n.wrapperId;
4338
+ },
4339
+ get style() {
4340
+ return n.style;
4341
+ },
4342
+ get onPlaced() {
4343
+ return n.onPlaced;
4344
+ },
4345
+ get customAnchor() {
4346
+ return o();
4347
+ },
4348
+ get isStatic() {
4349
+ return s();
4350
+ },
4351
+ get enabled() {
4352
+ return n.open;
4353
+ },
4354
+ get onInteractOutside() {
4355
+ return n.onInteractOutside;
4356
+ },
4357
+ get onCloseAutoFocus() {
4358
+ return n.onCloseAutoFocus;
4359
+ },
4360
+ get onOpenAutoFocus() {
4361
+ return n.onOpenAutoFocus;
4362
+ },
4363
+ get interactOutsideBehavior() {
4364
+ return r();
4365
+ },
4366
+ get loop() {
4367
+ return n.loop;
4368
+ },
4369
+ get trapFocus() {
4370
+ return i();
4371
+ },
4372
+ get isValidEvent() {
4373
+ return a();
4374
+ },
4375
+ get onFocusOutside() {
4376
+ return n.onFocusOutside;
4377
+ },
4378
+ forceMount: !1,
4379
+ get ref() {
4380
+ return n.ref;
4381
+ }
4382
+ }, () => c));
4383
+ };
4384
+ t.if(u, (e) => {
4385
+ n.shouldRender && e(d);
4386
+ }), t.append(e, l);
4387
+ }
4388
+ //#endregion
4389
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-force-mount.svelte
4390
+ var co = /* @__PURE__ */ new Set(/* @__PURE__ */ "$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled".split("."));
4391
+ function lo(e, n) {
4392
+ let r = t.prop(n, "interactOutsideBehavior", 3, "close"), i = t.prop(n, "trapFocus", 3, !0), a = t.prop(n, "isValidEvent", 3, () => !1), o = t.prop(n, "customAnchor", 3, null), s = t.prop(n, "isStatic", 3, !1), c = t.rest_props(n, co);
4393
+ ao(e, t.spread_props({
4394
+ get popper() {
4395
+ return n.popper;
4396
+ },
4397
+ get onEscapeKeydown() {
4398
+ return n.onEscapeKeydown;
4399
+ },
4400
+ get escapeKeydownBehavior() {
4401
+ return n.escapeKeydownBehavior;
4402
+ },
4403
+ get preventOverflowTextSelection() {
4404
+ return n.preventOverflowTextSelection;
4405
+ },
4406
+ get id() {
4407
+ return n.id;
4408
+ },
4409
+ get onPointerDown() {
4410
+ return n.onPointerDown;
4411
+ },
4412
+ get onPointerUp() {
4413
+ return n.onPointerUp;
4414
+ },
4415
+ get side() {
4416
+ return n.side;
4417
+ },
4418
+ get sideOffset() {
4419
+ return n.sideOffset;
4420
+ },
4421
+ get align() {
4422
+ return n.align;
4423
+ },
4424
+ get alignOffset() {
4425
+ return n.alignOffset;
4426
+ },
4427
+ get arrowPadding() {
4428
+ return n.arrowPadding;
4429
+ },
4430
+ get avoidCollisions() {
4431
+ return n.avoidCollisions;
4432
+ },
4433
+ get collisionBoundary() {
4434
+ return n.collisionBoundary;
4435
+ },
4436
+ get collisionPadding() {
4437
+ return n.collisionPadding;
4438
+ },
4439
+ get sticky() {
4440
+ return n.sticky;
4441
+ },
4442
+ get hideWhenDetached() {
4443
+ return n.hideWhenDetached;
4444
+ },
4445
+ get updatePositionStrategy() {
4446
+ return n.updatePositionStrategy;
4447
+ },
4448
+ get strategy() {
4449
+ return n.strategy;
4450
+ },
4451
+ get dir() {
4452
+ return n.dir;
4453
+ },
4454
+ get preventScroll() {
4455
+ return n.preventScroll;
4456
+ },
4457
+ get wrapperId() {
4458
+ return n.wrapperId;
4459
+ },
4460
+ get style() {
4461
+ return n.style;
4462
+ },
4463
+ get onPlaced() {
4464
+ return n.onPlaced;
4465
+ },
4466
+ get customAnchor() {
4467
+ return o();
4468
+ },
4469
+ get isStatic() {
4470
+ return s();
4471
+ },
4472
+ get enabled() {
4473
+ return n.enabled;
4474
+ },
4475
+ get onInteractOutside() {
4476
+ return n.onInteractOutside;
4477
+ },
4478
+ get onCloseAutoFocus() {
4479
+ return n.onCloseAutoFocus;
4480
+ },
4481
+ get onOpenAutoFocus() {
4482
+ return n.onOpenAutoFocus;
4483
+ },
4484
+ get interactOutsideBehavior() {
4485
+ return r();
4486
+ },
4487
+ get loop() {
4488
+ return n.loop;
4489
+ },
4490
+ get trapFocus() {
4491
+ return i();
4492
+ },
4493
+ get isValidEvent() {
4494
+ return a();
4495
+ },
4496
+ get onFocusOutside() {
4497
+ return n.onFocusOutside;
4498
+ }
4499
+ }, () => c, { forceMount: !0 }));
4500
+ }
4501
+ //#endregion
4502
+ //#region ../node_modules/.bun/bits-ui@2.18.1+203cd734255b50e4/node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-anchor.svelte
4503
+ function uo(e, n) {
4504
+ t.push(n, !0);
4505
+ let r = t.prop(n, "tooltip", 3, !1);
4506
+ da.create({
4507
+ id: v(() => n.id),
4508
+ virtualEl: v(() => n.virtualEl),
4509
+ ref: n.ref
4510
+ }, r());
4511
+ var i = t.comment(), a = t.first_child(i);
4512
+ t.snippet(a, () => n.children ?? t.noop), t.append(e, i), t.pop();
4513
+ }
4514
+ //#endregion
4515
+ export { v as $, Dt as A, vt as B, On as C, Ht as D, Rt as E, pt as F, N as G, bt as H, mt as I, Ge as J, M as K, ht as L, ut as M, dt as N, zt as O, ft as P, Oe as Q, gt as R, Dn as S, It as T, xt as U, yt as V, rt as W, k as X, A as Y, je as Z, Pn as _, ga as a, kn as b, lr as c, cr as d, sr as f, Fn as g, Wn as h, _a as i, lt as j, Bt as k, fr as l, hr as m, lo as n, na as o, pr as p, j as q, so as r, mr as s, uo as t, dr as u, L as v, Lt as w, jn as x, An as y, _t as z };