@hiai-gg/docsmint 0.3.6 → 0.3.7

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 (141) hide show
  1. package/dist/backend/index.js +1 -1
  2. package/dist/frontend/CategoryDialog--rIE7FrH.js +580 -0
  3. package/dist/frontend/ConfirmDialog-Cpzyb55f.js +212 -0
  4. package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +216 -0
  5. package/dist/frontend/DatePicker-Byynca7V.js +257 -0
  6. package/dist/frontend/DeleteDialog-ap6nOywZ.js +174 -0
  7. package/dist/frontend/FolderDialog-DmN_trV0.js +247 -0
  8. package/dist/frontend/FolderNode-C4B8a2fd.js +317 -0
  9. package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +100 -0
  10. package/dist/frontend/Icon-DtNo0N1U.js +64 -0
  11. package/dist/frontend/SettingsDialog-2kTaTXAs.js +992 -0
  12. package/dist/frontend/ShareDialog-BBDGNF5n.js +165 -0
  13. package/dist/frontend/TagCreateDialog-DiLZnJo4.js +258 -0
  14. package/dist/frontend/api/attachments.d.ts +6 -0
  15. package/dist/frontend/api/attachments.js +2 -0
  16. package/dist/frontend/api/categories.js +1 -1
  17. package/dist/frontend/api/documents.js +1 -1
  18. package/dist/frontend/api/folders.js +1 -1
  19. package/dist/frontend/api/settings.js +1 -1
  20. package/dist/frontend/api/share.d.ts +5 -0
  21. package/dist/frontend/api/share.js +2 -0
  22. package/dist/frontend/api/tags.js +1 -1
  23. package/dist/frontend/api-keys-CpkrA8rD.js +35 -0
  24. package/dist/frontend/attachments-BuILSs56.js +50 -0
  25. package/dist/frontend/{settings-PCrOtied.js → auth-client-Cygmp1I2.js} +205 -265
  26. package/dist/frontend/awareness-snQ3RD9f.js +3714 -0
  27. package/dist/frontend/bundle-mjs-CP6Owz-8.js +1723 -0
  28. package/dist/frontend/camera-B7dAOd4s.js +28 -0
  29. package/dist/frontend/{categories-BE6ZpZl8.js → categories-izQovv2w.js} +1 -1
  30. package/dist/frontend/check-CDwRlG9T.js +24 -0
  31. package/dist/frontend/chevron-down-B7ZrjUmT.js +24 -0
  32. package/dist/frontend/circle-check-CDqeMB2d.js +28 -0
  33. package/dist/frontend/{client-C6QQGb0e.js → client-Bc5Fzx40.js} +833 -814
  34. package/dist/frontend/{client-B9hzI0W8.js → client-GbtOH90i.js} +1 -1
  35. package/dist/frontend/clipboard-Cgzxc0_R.js +16 -0
  36. package/dist/frontend/clock-Ck5Sn-Zl.js +28 -0
  37. package/dist/frontend/clsx-nmtDPO_P.js +16 -0
  38. package/dist/frontend/collaboration.d.ts +6 -0
  39. package/dist/frontend/collaboration.js +182 -0
  40. package/dist/frontend/components/category-dialog.d.ts +2 -0
  41. package/dist/frontend/components/category-dialog.js +2 -0
  42. package/dist/frontend/components/create-snapshot-dialog.d.ts +2 -0
  43. package/dist/frontend/components/create-snapshot-dialog.js +2 -0
  44. package/dist/frontend/components/delete-dialog.d.ts +2 -0
  45. package/dist/frontend/components/delete-dialog.js +2 -0
  46. package/dist/frontend/components/editor/document-editor.d.ts +3 -0
  47. package/dist/frontend/components/editor/document-editor.js +3021 -0
  48. package/dist/frontend/components/editor/document-title.d.ts +2 -0
  49. package/dist/frontend/components/editor/document-title.js +31 -0
  50. package/dist/frontend/components/editor/docx-serializer.d.ts +2 -0
  51. package/dist/frontend/components/editor/docx-serializer.js +14600 -0
  52. package/dist/frontend/components/editor/extensions.d.ts +2 -0
  53. package/dist/frontend/components/editor/extensions.js +2 -0
  54. package/dist/frontend/components/editor/markdown-toggle.d.ts +2 -0
  55. package/dist/frontend/components/editor/markdown-toggle.js +72 -0
  56. package/dist/frontend/components/editor/markdown.d.ts +1 -0
  57. package/dist/frontend/components/editor/markdown.js +2 -0
  58. package/dist/frontend/components/folder-node.d.ts +3 -0
  59. package/dist/frontend/components/folder-node.js +2 -0
  60. package/dist/frontend/components/folder-tree-selector.d.ts +2 -0
  61. package/dist/frontend/components/folder-tree-selector.js +2 -0
  62. package/dist/frontend/components/save-as-dialog.d.ts +2 -0
  63. package/dist/frontend/components/save-as-dialog.js +254 -0
  64. package/dist/frontend/components/settings.js +1 -1
  65. package/dist/frontend/components/share-dialog.d.ts +2 -0
  66. package/dist/frontend/components/share-dialog.js +2 -0
  67. package/dist/frontend/components/sidebar.js +1206 -3762
  68. package/dist/frontend/components/tag-create-dialog.d.ts +2 -0
  69. package/dist/frontend/components/tag-create-dialog.js +2 -0
  70. package/dist/frontend/components/version-history.d.ts +2 -0
  71. package/dist/frontend/components/version-history.js +293 -0
  72. package/dist/frontend/{context-DbnW5yib.js → context-BMD6XTPe.js} +0 -3
  73. package/dist/frontend/copy-CMAA6GP0.js +31 -0
  74. package/dist/frontend/dashboard.js +1148 -1224
  75. package/dist/frontend/{SettingsDialog-D4pgFD0D.js → db-ByrlYfaI.js} +923 -2002
  76. package/dist/frontend/dialog-BDkiG42a.js +213 -0
  77. package/dist/frontend/disclose-version-5I57E3LD.js +3 -0
  78. package/dist/frontend/dndzone-BzsOINtP.js +1199 -0
  79. package/dist/frontend/doc-tabs.d.ts +7 -0
  80. package/dist/frontend/doc-tabs.js +14 -0
  81. package/dist/frontend/document-drop-coordinator-C4xHMjwC.js +68 -0
  82. package/dist/frontend/document-drop-coordinator.d.ts +2 -0
  83. package/dist/frontend/document-drop-coordinator.js +2 -0
  84. package/dist/frontend/{documents-DFVS9SsL.js → documents-BsDkvzCm.js} +1 -1
  85. package/dist/frontend/editorExtensions-BMHvUbdk.js +27021 -0
  86. package/dist/frontend/ellipsis-vertical-BBuPldbW.js +519 -0
  87. package/dist/frontend/extension.js +6 -5
  88. package/dist/frontend/floating-layer-anchor-C51M4l6v.js +4513 -0
  89. package/dist/frontend/folder-TQjKY4yn.js +44 -0
  90. package/dist/frontend/folder-refresh.d.ts +8 -0
  91. package/dist/frontend/folder-refresh.js +2 -0
  92. package/dist/frontend/{folders-CGe9diAG.js → folders-CTuV_JtU.js} +1 -1
  93. package/dist/frontend/frontend.css +1 -1
  94. package/dist/frontend/i18n.js +1 -1
  95. package/dist/frontend/identity-DyWeNzu_.js +69 -0
  96. package/dist/frontend/index-client-jobkrWVL.js +86 -0
  97. package/dist/frontend/input-CBI6p4Xl.js +23 -0
  98. package/dist/frontend/keyboard.d.ts +14 -0
  99. package/dist/frontend/keyboard.js +2 -0
  100. package/dist/frontend/keyboard.svelte-D7H8DihC.js +133 -0
  101. package/dist/frontend/label-C-GkhEp4.js +30 -0
  102. package/dist/frontend/loader-circle-Bk-WFz9g.js +267 -0
  103. package/dist/frontend/markdown-BwnyjITU.js +11 -0
  104. package/dist/frontend/messages-BpYaLbzE.js +1091 -0
  105. package/dist/frontend/offline/identity.d.ts +6 -0
  106. package/dist/frontend/offline/identity.js +2 -0
  107. package/dist/frontend/resolve-BG4HgzpN.js +19 -0
  108. package/dist/frontend/rolldown-runtime-CWhphoD1.js +23 -0
  109. package/dist/frontend/rotate-ccw-CleZtJ5D.js +24 -0
  110. package/dist/frontend/search.js +637 -628
  111. package/dist/frontend/select-value-CvrWRkXW.js +1436 -0
  112. package/dist/frontend/settings-blyobazp.js +62 -0
  113. package/dist/frontend/share-Cu7SSJuJ.js +28 -0
  114. package/dist/frontend/shared-document.js +41 -40
  115. package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +65 -0
  116. package/dist/frontend/{tag-C5xrg-bb.js → tag-Dx3SmucJ.js} +7 -7
  117. package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +29 -0
  118. package/dist/frontend/{tags-DVXTut0p.js → tags-CtCV0Djo.js} +1 -1
  119. package/dist/frontend/textarea-Dfp78XlL.js +23 -0
  120. package/dist/frontend/theme.js +1 -1
  121. package/dist/frontend/{theme.svelte-ei0QxXa8.js → theme.svelte-CROg1Hi5.js} +7 -7
  122. package/dist/frontend/types.d.ts +6 -0
  123. package/dist/frontend/types.js +0 -0
  124. package/dist/frontend/utils/clipboard.d.ts +1 -0
  125. package/dist/frontend/utils/clipboard.js +2 -0
  126. package/dist/frontend/utils/dndzone.d.ts +4 -0
  127. package/dist/frontend/utils/dndzone.js +2 -0
  128. package/dist/frontend/utils-C0OW2678.js +20 -0
  129. package/dist/frontend/utils-D8kmM3ub.js +8 -0
  130. package/dist/frontend/utils.d.ts +4 -0
  131. package/dist/frontend/utils.js +2 -0
  132. package/dist/frontend/x-DaTdeDXv.js +24 -0
  133. package/package.json +109 -1
  134. package/packages/cli/src/index.ts +1 -1
  135. package/packages/mcp-server/src/index.ts +1 -1
  136. package/dist/frontend/DatePicker-BcMD49PV.js +0 -275
  137. package/dist/frontend/ShareDialog-Dzh7rV7J.js +0 -1317
  138. package/dist/frontend/input-ieWIt8I7.js +0 -257
  139. package/dist/frontend/messages-CTGAsqFu.js +0 -1106
  140. package/dist/frontend/resolve-Bl6xmJl_.js +0 -2068
  141. package/dist/frontend/tag-store.svelte-B3839FYq.js +0 -6152
@@ -0,0 +1,1199 @@
1
+ //#region ../node_modules/.bun/svelte-dnd-action@0.9.70+ff5f301bb2db9a0d/node_modules/svelte-dnd-action/dist/index.mjs
2
+ function e(e, t) {
3
+ var n = Object.keys(e);
4
+ if (Object.getOwnPropertySymbols) {
5
+ var r = Object.getOwnPropertySymbols(e);
6
+ t && (r = r.filter(function(t) {
7
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
8
+ })), n.push.apply(n, r);
9
+ }
10
+ return n;
11
+ }
12
+ function t(t) {
13
+ for (var n = 1; n < arguments.length; n++) {
14
+ var i = arguments[n] == null ? {} : arguments[n];
15
+ n % 2 ? e(Object(i), !0).forEach(function(e) {
16
+ r(t, e, i[e]);
17
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : e(Object(i)).forEach(function(e) {
18
+ Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(i, e));
19
+ });
20
+ }
21
+ return t;
22
+ }
23
+ function n(e) {
24
+ "@babel/helpers - typeof";
25
+ return n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
26
+ return typeof e;
27
+ } : function(e) {
28
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
29
+ }, n(e);
30
+ }
31
+ function r(e, t, n) {
32
+ return t in e ? Object.defineProperty(e, t, {
33
+ value: n,
34
+ enumerable: !0,
35
+ configurable: !0,
36
+ writable: !0
37
+ }) : e[t] = n, e;
38
+ }
39
+ function i(e, t) {
40
+ if (e == null) return {};
41
+ var n = {}, r = Object.keys(e), i, a;
42
+ for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
43
+ return n;
44
+ }
45
+ function a(e, t) {
46
+ if (e == null) return {};
47
+ var n = i(e, t), r, a;
48
+ if (Object.getOwnPropertySymbols) {
49
+ var o = Object.getOwnPropertySymbols(e);
50
+ for (a = 0; a < o.length; a++) r = o[a], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
51
+ }
52
+ return n;
53
+ }
54
+ function o(e, t) {
55
+ return l(e) || d(e, t) || f(e, t) || h();
56
+ }
57
+ function s(e) {
58
+ return c(e) || u(e) || f(e) || m();
59
+ }
60
+ function c(e) {
61
+ if (Array.isArray(e)) return p(e);
62
+ }
63
+ function l(e) {
64
+ if (Array.isArray(e)) return e;
65
+ }
66
+ function u(e) {
67
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
68
+ }
69
+ function d(e, t) {
70
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
71
+ if (n != null) {
72
+ var r = [], i = !0, a = !1, o, s;
73
+ try {
74
+ for (n = n.call(e); !(i = (o = n.next()).done) && (r.push(o.value), !(t && r.length === t)); i = !0);
75
+ } catch (e) {
76
+ a = !0, s = e;
77
+ } finally {
78
+ try {
79
+ !i && n.return != null && n.return();
80
+ } finally {
81
+ if (a) throw s;
82
+ }
83
+ }
84
+ return r;
85
+ }
86
+ }
87
+ function f(e, t) {
88
+ if (e) {
89
+ if (typeof e == "string") return p(e, t);
90
+ var n = Object.prototype.toString.call(e).slice(8, -1);
91
+ if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
92
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return p(e, t);
93
+ }
94
+ }
95
+ function p(e, t) {
96
+ (t == null || t > e.length) && (t = e.length);
97
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
98
+ return r;
99
+ }
100
+ function m() {
101
+ throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
102
+ }
103
+ function h() {
104
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
105
+ }
106
+ function g(e, t) {
107
+ var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
108
+ if (!n) {
109
+ if (Array.isArray(e) || (n = f(e)) || t && e && typeof e.length == "number") {
110
+ n && (e = n);
111
+ var r = 0, i = function() {};
112
+ return {
113
+ s: i,
114
+ n: function() {
115
+ return r >= e.length ? { done: !0 } : {
116
+ done: !1,
117
+ value: e[r++]
118
+ };
119
+ },
120
+ e: function(e) {
121
+ throw e;
122
+ },
123
+ f: i
124
+ };
125
+ }
126
+ throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
127
+ }
128
+ var a = !0, o = !1, s;
129
+ return {
130
+ s: function() {
131
+ n = n.call(e);
132
+ },
133
+ n: function() {
134
+ var e = n.next();
135
+ return a = e.done, e;
136
+ },
137
+ e: function(e) {
138
+ o = !0, s = e;
139
+ },
140
+ f: function() {
141
+ try {
142
+ !a && n.return != null && n.return();
143
+ } finally {
144
+ if (o) throw s;
145
+ }
146
+ }
147
+ };
148
+ }
149
+ function _(e, t, n) {
150
+ e.dispatchEvent(new CustomEvent("finalize", { detail: {
151
+ items: t,
152
+ info: n
153
+ } }));
154
+ }
155
+ function v(e, t, n) {
156
+ e.dispatchEvent(new CustomEvent("consider", { detail: {
157
+ items: t,
158
+ info: n
159
+ } }));
160
+ }
161
+ var y = "draggedEntered", b = "draggedLeft", x = "draggedOverIndex", S = "draggedLeftDocument", C = {
162
+ LEFT_FOR_ANOTHER: "leftForAnother",
163
+ OUTSIDE_OF_ANY: "outsideOfAny"
164
+ };
165
+ function ee(e, t, n) {
166
+ e.dispatchEvent(new CustomEvent(y, { detail: {
167
+ indexObj: t,
168
+ draggedEl: n
169
+ } }));
170
+ }
171
+ function w(e, t, n) {
172
+ e.dispatchEvent(new CustomEvent(b, { detail: {
173
+ draggedEl: t,
174
+ type: C.LEFT_FOR_ANOTHER,
175
+ theOtherDz: n
176
+ } }));
177
+ }
178
+ function te(e, t) {
179
+ e.dispatchEvent(new CustomEvent(b, { detail: {
180
+ draggedEl: t,
181
+ type: C.OUTSIDE_OF_ANY
182
+ } }));
183
+ }
184
+ function ne(e, t, n) {
185
+ e.dispatchEvent(new CustomEvent(x, { detail: {
186
+ indexObj: t,
187
+ draggedEl: n
188
+ } }));
189
+ }
190
+ function re(e) {
191
+ window.dispatchEvent(new CustomEvent(S, { detail: { draggedEl: e } }));
192
+ }
193
+ var T = {
194
+ DRAG_STARTED: "dragStarted",
195
+ DRAGGED_ENTERED: y,
196
+ DRAGGED_ENTERED_ANOTHER: "dragEnteredAnother",
197
+ DRAGGED_OVER_INDEX: x,
198
+ DRAGGED_LEFT: b,
199
+ DRAGGED_LEFT_ALL: "draggedLeftAll",
200
+ DROPPED_INTO_ZONE: "droppedIntoZone",
201
+ DROPPED_INTO_ANOTHER: "droppedIntoAnother",
202
+ DROPPED_OUTSIDE_OF_ANY: "droppedOutsideOfAny",
203
+ DRAG_STOPPED: "dragStopped"
204
+ }, E = {
205
+ POINTER: "pointer",
206
+ KEYBOARD: "keyboard"
207
+ }, D = "isDndShadowItem", O = "data-is-dnd-shadow-item-internal", ie = "data-is-dnd-shadow-item-hint", ae = "id:dnd-shadow-placeholder-0000", oe = "dnd-action-dragged-el", k = "id", A = 0;
208
+ function se() {
209
+ A++;
210
+ }
211
+ function ce() {
212
+ if (A === 0) throw Error("Bug! trying to decrement when there are no dropzones");
213
+ A--;
214
+ }
215
+ var le = typeof window > "u";
216
+ function ue(e) {
217
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n, r = t ? ye(e) : e.getBoundingClientRect(), i = getComputedStyle(e), a = i.transform;
218
+ if (a) {
219
+ var o, s, c, l;
220
+ if (a.startsWith("matrix3d(")) n = a.slice(9, -1).split(/, /), o = +n[0], s = +n[5], c = +n[12], l = +n[13];
221
+ else if (a.startsWith("matrix(")) n = a.slice(7, -1).split(/, /), o = +n[0], s = +n[3], c = +n[4], l = +n[5];
222
+ else return r;
223
+ var u = i.transformOrigin, d = r.x - c - (1 - o) * parseFloat(u), f = r.y - l - (1 - s) * parseFloat(u.slice(u.indexOf(" ") + 1)), p = o ? r.width / o : e.offsetWidth, m = s ? r.height / s : e.offsetHeight;
224
+ return {
225
+ x: d,
226
+ y: f,
227
+ width: p,
228
+ height: m,
229
+ top: f,
230
+ right: d + p,
231
+ bottom: f + m,
232
+ left: d
233
+ };
234
+ } else return r;
235
+ }
236
+ function de(e) {
237
+ var t = ue(e);
238
+ return {
239
+ top: t.top + window.scrollY,
240
+ bottom: t.bottom + window.scrollY,
241
+ left: t.left + window.scrollX,
242
+ right: t.right + window.scrollX
243
+ };
244
+ }
245
+ function fe(e) {
246
+ var t = e.getBoundingClientRect();
247
+ return {
248
+ top: t.top + window.scrollY,
249
+ bottom: t.bottom + window.scrollY,
250
+ left: t.left + window.scrollX,
251
+ right: t.right + window.scrollX
252
+ };
253
+ }
254
+ function pe(e) {
255
+ return {
256
+ x: (e.left + e.right) / 2,
257
+ y: (e.top + e.bottom) / 2
258
+ };
259
+ }
260
+ function me(e, t) {
261
+ return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
262
+ }
263
+ function he(e, t) {
264
+ return e.y <= t.bottom && e.y >= t.top && e.x >= t.left && e.x <= t.right;
265
+ }
266
+ function ge(e) {
267
+ return pe(fe(e));
268
+ }
269
+ function _e(e, t) {
270
+ return me(e, ge(t));
271
+ }
272
+ function ve(e) {
273
+ var t = fe(e);
274
+ return t.right < 0 || t.left > document.documentElement.scrollWidth || t.bottom < 0 || t.top > document.documentElement.scrollHeight;
275
+ }
276
+ function ye(e) {
277
+ for (var t = e.getBoundingClientRect(), n = {
278
+ top: t.top,
279
+ bottom: t.bottom,
280
+ left: t.left,
281
+ right: t.right
282
+ }, r = !1, i = !1, a = e.parentElement; a && a !== document.body;) {
283
+ var o = window.getComputedStyle(a), s = o.overflowY, c = o.overflowX, l = s === "scroll" || s === "auto", u = c === "scroll" || c === "auto";
284
+ if (l || u) {
285
+ var d = a.getBoundingClientRect();
286
+ if (l) {
287
+ var f = Math.max(n.top, d.top), p = Math.min(n.bottom, d.bottom);
288
+ (f !== n.top || p !== n.bottom) && (r = !0), n.top = f, n.bottom = p;
289
+ }
290
+ if (u) {
291
+ var m = Math.max(n.left, d.left), h = Math.min(n.right, d.right);
292
+ (m !== n.left || h !== n.right) && (i = !0), n.left = m, n.right = h;
293
+ }
294
+ }
295
+ a = a.parentElement;
296
+ }
297
+ return r || i ? {
298
+ top: n.top,
299
+ bottom: n.bottom,
300
+ left: n.left,
301
+ right: n.right,
302
+ width: Math.max(0, n.right - n.left),
303
+ height: Math.max(0, n.bottom - n.top)
304
+ } : {
305
+ top: t.top,
306
+ bottom: t.bottom,
307
+ left: t.left,
308
+ right: t.right,
309
+ width: Math.max(0, t.right - t.left),
310
+ height: Math.max(0, t.bottom - t.top)
311
+ };
312
+ }
313
+ var j;
314
+ function be() {
315
+ j = /* @__PURE__ */ new Map();
316
+ }
317
+ be();
318
+ function xe(e) {
319
+ var t = Array.from(e.children).findIndex(function(e) {
320
+ return e.getAttribute(O);
321
+ });
322
+ if (t >= 0) return j.has(e) || j.set(e, /* @__PURE__ */ new Map()), j.get(e).set(t, de(e.children[t])), t;
323
+ }
324
+ function Se(e, t) {
325
+ if (!he(e, de(t))) return null;
326
+ var n = t.children;
327
+ if (n.length === 0) return {
328
+ index: 0,
329
+ isProximityBased: !0
330
+ };
331
+ for (var r = xe(t), i = 0; i < n.length; i++) if (he(e, de(n[i]))) {
332
+ var a = j.has(t) && j.get(t).get(i);
333
+ return a && !he(e, a) ? {
334
+ index: r,
335
+ isProximityBased: !1
336
+ } : {
337
+ index: i,
338
+ isProximityBased: !1
339
+ };
340
+ }
341
+ for (var o = Number.MAX_VALUE, s = void 0, c = 0; c < n.length; c++) {
342
+ var l = _e(e, n[c]);
343
+ l < o && (o = l, s = c);
344
+ }
345
+ if (n.length > 0) {
346
+ var u = n.length, d = n[u - 1].cloneNode(!1);
347
+ d.style.visibility = "hidden", d.style.pointerEvents = "none", t.appendChild(d), _e(e, d) < o && (s = u), t.removeChild(d);
348
+ }
349
+ return {
350
+ index: s,
351
+ isProximityBased: !0
352
+ };
353
+ }
354
+ function Ce(e) {
355
+ return JSON.stringify(e, null, 2);
356
+ }
357
+ function we(e) {
358
+ if (!e) throw Error("cannot get depth of a falsy node");
359
+ return Te(e, 0);
360
+ }
361
+ function Te(e) {
362
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
363
+ return e.parentElement ? Te(e.parentElement, t + 1) : t - 1;
364
+ }
365
+ function Ee(e, t) {
366
+ if (Object.keys(e).length !== Object.keys(t).length) return !1;
367
+ for (var n in e) if (!{}.hasOwnProperty.call(t, n) || t[n] !== e[n]) return !1;
368
+ return !0;
369
+ }
370
+ function De(e, t) {
371
+ if (e.length !== t.length) return !1;
372
+ for (var n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
373
+ return !0;
374
+ }
375
+ var Oe = 200, ke = 10, Ae;
376
+ function je(e, t) {
377
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Oe, r = arguments.length > 3 ? arguments[3] : void 0, i = arguments.length > 4 ? arguments[4] : void 0, a, o, s = !1, c, l = Array.from(t).sort(function(e, t) {
378
+ return we(t) - we(e);
379
+ });
380
+ function u() {
381
+ var t = i(), d = r.multiScrollIfNeeded();
382
+ if (!d && c && Math.abs(c.x - t.x) < ke && Math.abs(c.y - t.y) < ke) {
383
+ Ae = window.setTimeout(u, n);
384
+ return;
385
+ }
386
+ if (ve(e)) {
387
+ re(e);
388
+ return;
389
+ }
390
+ c = t;
391
+ var f = !1, p = g(l), m;
392
+ try {
393
+ for (p.s(); !(m = p.n()).done;) {
394
+ var h = m.value;
395
+ d && be();
396
+ var _ = Se(t, h);
397
+ if (_ !== null) {
398
+ var v = _.index;
399
+ f = !0, h === a ? v !== o && (ne(h, _, e), o = v) : (a && w(a, e, h), ee(h, _, e), a = h);
400
+ break;
401
+ }
402
+ }
403
+ } catch (e) {
404
+ p.e(e);
405
+ } finally {
406
+ p.f();
407
+ }
408
+ !f && s && a ? (te(a, e), a = void 0, o = void 0, s = !1) : s = !0, Ae = window.setTimeout(u, n);
409
+ }
410
+ u();
411
+ }
412
+ function Me() {
413
+ clearTimeout(Ae), be();
414
+ }
415
+ var Ne = 30;
416
+ function Pe() {
417
+ var e;
418
+ function t() {
419
+ e = {
420
+ directionObj: void 0,
421
+ stepPx: 0
422
+ };
423
+ }
424
+ t();
425
+ function n(t) {
426
+ var r = e, i = r.directionObj, a = r.stepPx;
427
+ i && (t.scrollBy(i.x * a, i.y * a), window.requestAnimationFrame(function() {
428
+ return n(t);
429
+ }));
430
+ }
431
+ function r(e) {
432
+ return Ne - e;
433
+ }
434
+ function i(i, a) {
435
+ if (!a) return !1;
436
+ var o = Fe(i, a), s = !!e.directionObj;
437
+ if (o === null) return s && t(), !1;
438
+ var c = !1, l = !1;
439
+ return a.scrollHeight > a.clientHeight && (o.bottom < Ne ? (c = !0, e.directionObj = {
440
+ x: 0,
441
+ y: 1
442
+ }, e.stepPx = r(o.bottom)) : o.top < Ne && (c = !0, e.directionObj = {
443
+ x: 0,
444
+ y: -1
445
+ }, e.stepPx = r(o.top)), !s && c) || a.scrollWidth > a.clientWidth && (o.right < Ne ? (l = !0, e.directionObj = {
446
+ x: 1,
447
+ y: 0
448
+ }, e.stepPx = r(o.right)) : o.left < Ne && (l = !0, e.directionObj = {
449
+ x: -1,
450
+ y: 0
451
+ }, e.stepPx = r(o.left)), !s && l) ? (n(a), !0) : (t(), !1);
452
+ }
453
+ return {
454
+ scrollIfNeeded: i,
455
+ resetScrolling: t
456
+ };
457
+ }
458
+ function Fe(e, t) {
459
+ var n = t === document.scrollingElement ? {
460
+ top: 0,
461
+ bottom: window.innerHeight,
462
+ left: 0,
463
+ right: window.innerWidth
464
+ } : t.getBoundingClientRect();
465
+ return he(e, n) ? {
466
+ top: e.y - n.top,
467
+ bottom: n.bottom - e.y,
468
+ left: e.x - n.left,
469
+ right: n.right - e.x
470
+ } : null;
471
+ }
472
+ function Ie() {
473
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 ? arguments[1] : void 0, n = Re(e), r = Array.from(n).sort(function(e, t) {
474
+ return we(t) - we(e);
475
+ }), i = Pe(), a = i.scrollIfNeeded, o = i.resetScrolling;
476
+ function s() {
477
+ var e = t();
478
+ if (!e || !r) return !1;
479
+ for (var n = r.filter(function(t) {
480
+ return he(e, t.getBoundingClientRect()) || t === document.scrollingElement;
481
+ }), i = 0; i < n.length; i++) if (a(e, n[i])) return !0;
482
+ return !1;
483
+ }
484
+ return {
485
+ multiScrollIfNeeded: n.size > 0 ? s : function() {
486
+ return !1;
487
+ },
488
+ destroy: function() {
489
+ return o();
490
+ }
491
+ };
492
+ }
493
+ function Le(e) {
494
+ if (!e) return [];
495
+ for (var t = [], n = e; n;) window.getComputedStyle(n).overflow.split(" ").some(function(e) {
496
+ return e.includes("auto") || e.includes("scroll");
497
+ }) && t.push(n), n = n.parentElement;
498
+ return t;
499
+ }
500
+ function Re(e) {
501
+ var t = /* @__PURE__ */ new Set(), n = g(e), r;
502
+ try {
503
+ for (n.s(); !(r = n.n()).done;) {
504
+ var i = r.value;
505
+ Le(i).forEach(function(e) {
506
+ return t.add(e);
507
+ });
508
+ }
509
+ } catch (e) {
510
+ n.e(e);
511
+ } finally {
512
+ n.f();
513
+ }
514
+ return (document.scrollingElement.scrollHeight > document.scrollingElement.clientHeight || document.scrollingElement.scrollWidth > document.scrollingElement.clientHeight) && t.add(document.scrollingElement), t;
515
+ }
516
+ function ze(e) {
517
+ var t = e.cloneNode(!0), n = [], r = e.tagName === "SELECT", i = r ? [e] : s(e.querySelectorAll("select")), a = g(i), o;
518
+ try {
519
+ for (a.s(); !(o = a.n()).done;) {
520
+ var c = o.value;
521
+ n.push(c.value);
522
+ }
523
+ } catch (e) {
524
+ a.e(e);
525
+ } finally {
526
+ a.f();
527
+ }
528
+ if (i.length > 0) for (var l = r ? [t] : s(t.querySelectorAll("select")), u = 0; u < l.length; u++) {
529
+ var d = l[u], f = n[u], p = d.querySelector(`option[value="${f}"`);
530
+ p && p.setAttribute("selected", !0);
531
+ }
532
+ var m = e.tagName === "CANVAS", h = m ? [e] : s(e.querySelectorAll("canvas"));
533
+ if (h.length > 0) for (var _ = m ? [t] : s(t.querySelectorAll("canvas")), v = 0; v < _.length; v++) {
534
+ var y = h[v], b = _[v];
535
+ b.width = y.width, b.height = y.height, y.width > 0 && y.height > 0 && b.getContext("2d").drawImage(y, 0, 0);
536
+ }
537
+ return t;
538
+ }
539
+ var Be = Object.freeze({ USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT: "USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT" }), Ve = r({}, Be.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT, !1);
540
+ function He(e) {
541
+ if (!Be[e]) throw Error(`Can't get non existing feature flag ${e}! Supported flags: ${Object.keys(Be)}`);
542
+ return Ve[e];
543
+ }
544
+ var Ue = .2;
545
+ function M(e) {
546
+ return `${e} ${Ue}s ease`;
547
+ }
548
+ function We(e, t) {
549
+ var n = e.getBoundingClientRect(), r = ze(e);
550
+ qe(e, r), r.id = oe, r.style.position = "fixed";
551
+ var i = n.top, a = n.left;
552
+ if (r.style.top = `${i}px`, r.style.left = `${a}px`, t) {
553
+ var o = pe(n);
554
+ i -= o.y - t.y, a -= o.x - t.x, window.setTimeout(function() {
555
+ r.style.top = `${i}px`, r.style.left = `${a}px`;
556
+ }, 0);
557
+ }
558
+ return r.style.margin = "0", r.style.boxSizing = "border-box", r.style.height = `${n.height}px`, r.style.width = `${n.width}px`, r.style.transition = `${M("top")}, ${M("left")}, ${M("background-color")}, ${M("opacity")}, ${M("color")} `, window.setTimeout(function() {
559
+ return r.style.transition += `, ${M("width")}, ${M("height")}`;
560
+ }, 0), r.style.zIndex = "9999", r.style.cursor = "grabbing", r;
561
+ }
562
+ function Ge(e) {
563
+ e.style.cursor = "grab";
564
+ }
565
+ function Ke(e, t, n, r) {
566
+ qe(t, e);
567
+ var i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = i.width - a.width, s = i.height - a.height;
568
+ if (o || s) {
569
+ var c = {
570
+ left: (n - a.left) / a.width,
571
+ top: (r - a.top) / a.height
572
+ };
573
+ He(Be.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT) || (e.style.height = `${i.height}px`, e.style.width = `${i.width}px`), e.style.left = `${parseFloat(e.style.left) - c.left * o}px`, e.style.top = `${parseFloat(e.style.top) - c.top * s}px`;
574
+ }
575
+ }
576
+ function qe(e, t) {
577
+ var n = window.getComputedStyle(e);
578
+ Array.from(n).filter(function(e) {
579
+ return e.startsWith("background") || e.startsWith("padding") || e.startsWith("font") || e.startsWith("text") || e.startsWith("align") || e.startsWith("justify") || e.startsWith("display") || e.startsWith("flex") || e.startsWith("border") || e === "opacity" || e === "color" || e === "list-style-type" || He(Be.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT) && (e === "width" || e === "height");
580
+ }).forEach(function(e) {
581
+ return t.style.setProperty(e, n.getPropertyValue(e), n.getPropertyPriority(e));
582
+ });
583
+ }
584
+ function Je(e, t) {
585
+ e.draggable = !1, e.ondragstart = function() {
586
+ return !1;
587
+ }, t ? (e.style.userSelect = "", e.style.WebkitUserSelect = "", e.style.cursor = "") : (e.style.userSelect = "none", e.style.WebkitUserSelect = "none", e.style.cursor = "grab");
588
+ }
589
+ function Ye(e) {
590
+ e.style.display = "none", e.style.position = "fixed", e.style.zIndex = "-5";
591
+ }
592
+ function Xe(e) {
593
+ e.style.visibility = "hidden", e.setAttribute(O, "true");
594
+ }
595
+ function Ze(e) {
596
+ e.style.visibility = "", e.removeAttribute(O);
597
+ }
598
+ function Qe(e) {
599
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
600
+ return [];
601
+ };
602
+ e.forEach(function(e) {
603
+ var r = t(e);
604
+ Object.keys(r).forEach(function(t) {
605
+ e.style[t] = r[t];
606
+ }), n(e).forEach(function(t) {
607
+ return e.classList.add(t);
608
+ });
609
+ });
610
+ }
611
+ function $e(e) {
612
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
613
+ return [];
614
+ };
615
+ e.forEach(function(e) {
616
+ var r = t(e);
617
+ Object.keys(r).forEach(function(t) {
618
+ e.style[t] = "";
619
+ }), n(e).forEach(function(t) {
620
+ return e.classList.contains(t) && e.classList.remove(t);
621
+ });
622
+ });
623
+ }
624
+ function et(e) {
625
+ var t = e.style.minHeight;
626
+ e.style.minHeight = window.getComputedStyle(e).getPropertyValue("height");
627
+ var n = e.style.minWidth;
628
+ return e.style.minWidth = window.getComputedStyle(e).getPropertyValue("width"), function() {
629
+ e.style.minHeight = t, e.style.minWidth = n;
630
+ };
631
+ }
632
+ var tt = "--any--", nt = 100, rt = 20, it = 3, at = 80, ot = { outline: "rgba(255, 255, 102, 0.7) solid 2px" }, st = "data-is-dnd-original-dragged-item", N, P, F, ct, I, lt, L, R, z, B, V = !1, ut = !1, dt, ft = !1, pt = [], mt, H, ht = !1, gt = !1, U = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map(), _t = /* @__PURE__ */ new WeakMap();
633
+ function vt(e, t) {
634
+ U.has(t) || U.set(t, /* @__PURE__ */ new Set()), U.get(t).has(e) || (U.get(t).add(e), se());
635
+ }
636
+ function yt(e, t) {
637
+ U.get(t).delete(e), ce(), U.get(t).size === 0 && U.delete(t);
638
+ }
639
+ function bt() {
640
+ var e = U.get(ct), t = g(e), n;
641
+ try {
642
+ for (t.s(); !(n = t.n()).done;) {
643
+ var r = n.value;
644
+ r.addEventListener(y, wt), r.addEventListener(b, Tt), r.addEventListener(x, Et);
645
+ }
646
+ } catch (e) {
647
+ t.e(e);
648
+ } finally {
649
+ t.f();
650
+ }
651
+ window.addEventListener(S, Ot);
652
+ var i = Math.max.apply(Math, s(Array.from(e.keys()).map(function(e) {
653
+ return W.get(e).dropAnimationDurationMs;
654
+ }))), a = i === 0 ? rt : Math.max(i, nt);
655
+ mt = Ie(e, function() {
656
+ return B;
657
+ });
658
+ var o = gt ? function() {
659
+ return {
660
+ x: B.x + window.scrollX,
661
+ y: B.y + window.scrollY
662
+ };
663
+ } : function() {
664
+ return ge(P);
665
+ };
666
+ je(P, e, a * 1.07, mt, o);
667
+ }
668
+ function xt() {
669
+ var e = g(U.get(ct)), t;
670
+ try {
671
+ for (e.s(); !(t = e.n()).done;) {
672
+ var n = t.value;
673
+ n.removeEventListener(y, wt), n.removeEventListener(b, Tt), n.removeEventListener(x, Et);
674
+ }
675
+ } catch (t) {
676
+ e.e(t);
677
+ } finally {
678
+ e.f();
679
+ }
680
+ window.removeEventListener(S, Ot), mt &&= (mt.destroy(), void 0), Me();
681
+ }
682
+ function St(e) {
683
+ return e.findIndex(function(e) {
684
+ return !!e[D];
685
+ });
686
+ }
687
+ function Ct(e) {
688
+ var n;
689
+ return t(t({}, e), {}, (n = {}, r(n, D, !0), r(n, k, ae), n));
690
+ }
691
+ function wt(e) {
692
+ var t = W.get(e.currentTarget), n = t.items;
693
+ if (!(t.dropFromOthersDisabled && e.currentTarget !== I)) {
694
+ if (ft = !1, n = n.filter(function(e) {
695
+ return e[k] !== L[k] && e[k] !== "id:dnd-shadow-placeholder-0000";
696
+ }), I !== e.currentTarget) {
697
+ var r = W.get(I).items.filter(function(e) {
698
+ return !e[D];
699
+ });
700
+ v(I, r, {
701
+ trigger: T.DRAGGED_ENTERED_ANOTHER,
702
+ id: F[k],
703
+ source: E.POINTER
704
+ });
705
+ }
706
+ var i = e.detail.indexObj.index;
707
+ R = e.currentTarget, n.splice(i, 0, L), v(e.currentTarget, n, {
708
+ trigger: T.DRAGGED_ENTERED,
709
+ id: F[k],
710
+ source: E.POINTER
711
+ });
712
+ }
713
+ }
714
+ function Tt(e) {
715
+ if (V) {
716
+ var t = W.get(e.currentTarget), n = t.items;
717
+ if (!(t.dropFromOthersDisabled && e.currentTarget !== I && e.currentTarget !== R)) {
718
+ var r = s(n), i = St(r);
719
+ i !== -1 && r.splice(i, 1);
720
+ var a = R;
721
+ R = void 0;
722
+ var o = e.detail, c = o.type, l = o.theOtherDz;
723
+ if (c === C.OUTSIDE_OF_ANY || c === C.LEFT_FOR_ANOTHER && l !== I && W.get(l).dropFromOthersDisabled) {
724
+ ft = !0, R = I;
725
+ var u = a === I ? r : s(W.get(I).items);
726
+ u.splice(lt, 0, L), v(I, u, {
727
+ trigger: T.DRAGGED_LEFT_ALL,
728
+ id: F[k],
729
+ source: E.POINTER
730
+ });
731
+ }
732
+ v(e.currentTarget, r, {
733
+ trigger: T.DRAGGED_LEFT,
734
+ id: F[k],
735
+ source: E.POINTER
736
+ });
737
+ }
738
+ }
739
+ }
740
+ function Et(e) {
741
+ var t = W.get(e.currentTarget), n = t.items;
742
+ if (!(t.dropFromOthersDisabled && e.currentTarget !== I)) {
743
+ var r = s(n);
744
+ ft = !1;
745
+ var i = e.detail.indexObj.index, a = St(r);
746
+ a !== -1 && r.splice(a, 1), r.splice(i, 0, L), v(e.currentTarget, r, {
747
+ trigger: T.DRAGGED_OVER_INDEX,
748
+ id: F[k],
749
+ source: E.POINTER
750
+ });
751
+ }
752
+ }
753
+ function Dt(e) {
754
+ e.preventDefault();
755
+ var t = e.touches ? e.touches[0] : e;
756
+ B = {
757
+ x: t.clientX,
758
+ y: t.clientY
759
+ }, P.style.transform = `translate3d(${B.x - z.x}px, ${B.y - z.y}px, 0)`;
760
+ }
761
+ function Ot() {
762
+ ut = !0, window.removeEventListener("mousemove", Dt), window.removeEventListener("touchmove", Dt), window.removeEventListener("mouseup", Ot), window.removeEventListener("touchend", Ot), xt(), Ge(P), R ||= I;
763
+ var e = W.get(R), t = e.items, n = e.type;
764
+ $e(U.get(n), function(e) {
765
+ return W.get(e).dropTargetStyle;
766
+ }, function(e) {
767
+ return W.get(e).dropTargetClasses;
768
+ });
769
+ var r = St(t);
770
+ r === -1 && R === I && (r = lt), t = t.map(function(e) {
771
+ return e.isDndShadowItem ? F : e;
772
+ });
773
+ function i() {
774
+ dt(), _(R, t, {
775
+ trigger: ft ? T.DROPPED_OUTSIDE_OF_ANY : T.DROPPED_INTO_ZONE,
776
+ id: F[k],
777
+ source: E.POINTER
778
+ }), R !== I && _(I, W.get(I).items, {
779
+ trigger: T.DROPPED_INTO_ANOTHER,
780
+ id: F[k],
781
+ source: E.POINTER
782
+ });
783
+ var e = Array.from(R.children).find(function(e) {
784
+ return e.getAttribute(O);
785
+ });
786
+ e && Ze(e), jt();
787
+ }
788
+ W.get(R).dropAnimationDisabled ? i() : kt(r, i);
789
+ }
790
+ function kt(e, t) {
791
+ var n = ue(e > -1 ? R.children[e] : R, !1), r = {
792
+ x: n.left - parseFloat(P.style.left),
793
+ y: n.top - parseFloat(P.style.top)
794
+ }, i = W.get(R).dropAnimationDurationMs, a = `transform ${i}ms ease`;
795
+ P.style.transition = P.style.transition ? P.style.transition + "," + a : a, P.style.transform = `translate3d(${r.x}px, ${r.y}px, 0)`, window.setTimeout(t, i);
796
+ }
797
+ function At(e, t) {
798
+ pt.push({
799
+ dz: e,
800
+ destroy: t
801
+ }), window.requestAnimationFrame(function() {
802
+ Ye(e), document.body.appendChild(e);
803
+ });
804
+ }
805
+ function jt() {
806
+ P && P.remove && P.remove(), N && N.remove && N.remove(), P = void 0, N = void 0, F = void 0, ct = void 0, I = void 0, lt = void 0, L = void 0, R = void 0, z = void 0, B = void 0, V = !1, ut = !1, dt = void 0, ft = !1, H && clearTimeout(H), H = void 0, ht = !1, gt = !1, pt.length && (pt.forEach(function(e) {
807
+ var t = e.dz, n = e.destroy;
808
+ n(), t.remove();
809
+ }), pt = []);
810
+ }
811
+ function Mt(e, n) {
812
+ var r = !1, i = {
813
+ items: void 0,
814
+ type: void 0,
815
+ flipDurationMs: 0,
816
+ dragDisabled: !1,
817
+ morphDisabled: !1,
818
+ dropFromOthersDisabled: !1,
819
+ dropTargetStyle: ot,
820
+ dropTargetClasses: [],
821
+ transformDraggedElement: function() {},
822
+ centreDraggedOnCursor: !1,
823
+ useCursorForDetection: !1,
824
+ dropAnimationDisabled: !1,
825
+ delayTouchStartMs: 0
826
+ }, a = /* @__PURE__ */ new Map();
827
+ function o() {
828
+ window.addEventListener("mousemove", u, { passive: !1 }), window.addEventListener("touchmove", u, {
829
+ passive: !1,
830
+ capture: !1
831
+ }), window.addEventListener("mouseup", l, { passive: !1 }), window.addEventListener("touchend", l, { passive: !1 });
832
+ }
833
+ function c() {
834
+ window.removeEventListener("mousemove", u), window.removeEventListener("touchmove", u), window.removeEventListener("mouseup", l), window.removeEventListener("touchend", l), H && (clearTimeout(H), H = void 0, ht = !1);
835
+ }
836
+ function l(e) {
837
+ if (c(), N = void 0, z = void 0, B = void 0, e.type === "touchend") {
838
+ var t = new Event("click", {
839
+ bubbles: !0,
840
+ cancelable: !0
841
+ });
842
+ e.target.dispatchEvent(t);
843
+ }
844
+ }
845
+ function u(e) {
846
+ var t = !!e.touches, n = t ? e.touches[0] : e;
847
+ if (t && i.delayTouchStartMs > 0 && !ht) {
848
+ B = {
849
+ x: n.clientX,
850
+ y: n.clientY
851
+ }, (Math.abs(B.x - z.x) >= it || Math.abs(B.y - z.y) >= it) && (H &&= (clearTimeout(H), void 0), l(e));
852
+ return;
853
+ }
854
+ e.preventDefault(), B = {
855
+ x: n.clientX,
856
+ y: n.clientY
857
+ }, (Math.abs(B.x - z.x) >= it || Math.abs(B.y - z.y) >= it) && (c(), f());
858
+ }
859
+ function d(e) {
860
+ if (!(e.target !== e.currentTarget && (e.target.value !== void 0 || e.target.isContentEditable)) && !e.button && !V) {
861
+ var n = !!e.touches, r = n && i.delayTouchStartMs > 0;
862
+ r || e.preventDefault(), e.stopPropagation();
863
+ var a = n ? e.touches[0] : e;
864
+ z = {
865
+ x: a.clientX,
866
+ y: a.clientY
867
+ }, B = t({}, z), N = e.currentTarget, r && (ht = !1, H = window.setTimeout(function() {
868
+ N && (ht = !0, c(), f());
869
+ }, i.delayTouchStartMs)), o();
870
+ }
871
+ }
872
+ function f() {
873
+ V = !0;
874
+ var e = a.get(N);
875
+ lt = e, I = N.parentElement;
876
+ var t = I.closest("dialog") || I.closest("[popover]") || I.getRootNode(), n = t.body || t, r = i.items, o = i.type, c = i.centreDraggedOnCursor, l = i.useCursorForDetection, u = s(r);
877
+ F = u[e], ct = o, L = Ct(F), gt = l, P = We(N, c && B), n.appendChild(P);
878
+ function d() {
879
+ P && (N.parentElement ? window.requestAnimationFrame(d) : (N.setAttribute(st, !0), n.appendChild(N), bt(), Ye(N), L[k] = F[k], P.focus()));
880
+ }
881
+ window.requestAnimationFrame(d), Qe(Array.from(U.get(i.type)).filter(function(e) {
882
+ return e === I || !W.get(e).dropFromOthersDisabled;
883
+ }), function(e) {
884
+ return W.get(e).dropTargetStyle;
885
+ }, function(e) {
886
+ return W.get(e).dropTargetClasses;
887
+ }), u.splice(e, 1, L), dt = et(I), v(I, u, {
888
+ trigger: T.DRAG_STARTED,
889
+ id: F[k],
890
+ source: E.POINTER
891
+ }), window.addEventListener("mousemove", Dt, { passive: !1 }), window.addEventListener("touchmove", Dt, {
892
+ passive: !1,
893
+ capture: !1
894
+ }), window.addEventListener("mouseup", Ot, { passive: !1 }), window.addEventListener("touchend", Ot, { passive: !1 });
895
+ }
896
+ function p(t) {
897
+ var n = t.items, o = n === void 0 ? void 0 : n, c = t.flipDurationMs, l = c === void 0 ? 0 : c, u = t.type, f = u === void 0 ? tt : u, p = t.dragDisabled, m = p === void 0 ? !1 : p, h = t.morphDisabled, g = h === void 0 ? !1 : h, _ = t.dropFromOthersDisabled, v = _ === void 0 ? !1 : _, y = t.dropTargetStyle, b = y === void 0 ? ot : y, x = t.dropTargetClasses, S = x === void 0 ? [] : x, C = t.transformDraggedElement, ee = C === void 0 ? function() {} : C, w = t.centreDraggedOnCursor, te = w === void 0 ? !1 : w, ne = t.useCursorForDetection, re = ne === void 0 ? !1 : ne, T = t.dropAnimationDisabled, E = T === void 0 ? !1 : T, D = t.delayTouchStart, O = D === void 0 ? !1 : D;
898
+ i.dropAnimationDurationMs = l;
899
+ var ie = 0;
900
+ O === !0 ? ie = at : typeof O == "number" && isFinite(O) && O >= 0 && (ie = O), i.delayTouchStartMs = ie, i.type && f !== i.type && yt(e, i.type), i.type = f, i.items = s(o), i.dragDisabled = m, i.morphDisabled = g, i.transformDraggedElement = ee, i.centreDraggedOnCursor = te, i.useCursorForDetection = re, i.dropAnimationDisabled = E, r && V && !ut && (!Ee(b, i.dropTargetStyle) || !De(S, i.dropTargetClasses)) && ($e([e], function() {
901
+ return i.dropTargetStyle;
902
+ }, function() {
903
+ return S;
904
+ }), Qe([e], function() {
905
+ return b;
906
+ }, function() {
907
+ return S;
908
+ })), i.dropTargetStyle = b, i.dropTargetClasses = s(S);
909
+ function ae(e, t) {
910
+ return W.get(e) ? W.get(e)[t] : i[t];
911
+ }
912
+ r && V && i.dropFromOthersDisabled !== v && (v ? $e([e], function(e) {
913
+ return ae(e, "dropTargetStyle");
914
+ }, function(e) {
915
+ return ae(e, "dropTargetClasses");
916
+ }) : Qe([e], function(e) {
917
+ return ae(e, "dropTargetStyle");
918
+ }, function(e) {
919
+ return ae(e, "dropTargetClasses");
920
+ })), i.dropFromOthersDisabled = v, W.set(e, i), vt(e, f);
921
+ for (var oe = V ? St(i.items) : -1, k = 0; k < e.children.length; k++) {
922
+ var A = e.children[k];
923
+ if (Je(A, m), k === oe) {
924
+ g || Ke(P, A, B.x, B.y), i.transformDraggedElement(P, F, k), Xe(A);
925
+ continue;
926
+ }
927
+ A.removeEventListener("mousedown", _t.get(A)), A.removeEventListener("touchstart", _t.get(A)), m || (A.addEventListener("mousedown", d), A.addEventListener("touchstart", d), _t.set(A, d)), a.set(A, k), r ||= !0;
928
+ }
929
+ }
930
+ return p(n), {
931
+ update: function(e) {
932
+ p(e);
933
+ },
934
+ destroy: function() {
935
+ function t() {
936
+ yt(e, W.get(e).type), W.delete(e);
937
+ }
938
+ V && !e.closest(`[${st}]`) ? At(e, t) : t();
939
+ }
940
+ };
941
+ }
942
+ var Nt, Pt = {
943
+ DND_ZONE_ACTIVE: "dnd-zone-active",
944
+ DND_ZONE_DRAG_DISABLED: "dnd-zone-drag-disabled"
945
+ }, Ft = (Nt = {}, r(Nt, Pt.DND_ZONE_ACTIVE, "Tab to one the items and press space-bar or enter to start dragging it"), r(Nt, Pt.DND_ZONE_DRAG_DISABLED, "This is a disabled drag and drop list"), Nt), It = "dnd-action-aria-alert", G;
946
+ function Lt() {
947
+ G || (G = document.createElement("div"), (function() {
948
+ G.id = It, G.style.position = "fixed", G.style.bottom = "0", G.style.left = "0", G.style.zIndex = "-5", G.style.opacity = "0", G.style.height = "0", G.style.width = "0", G.setAttribute("role", "alert");
949
+ })(), document.body.prepend(G), Object.entries(Ft).forEach(function(e) {
950
+ var t = o(e, 2), n = t[0], r = t[1];
951
+ return document.body.prepend(Bt(n, r));
952
+ }));
953
+ }
954
+ function Rt() {
955
+ return le ? null : (document.readyState === "complete" ? Lt() : window.addEventListener("DOMContentLoaded", Lt), t({}, Pt));
956
+ }
957
+ function zt() {
958
+ le || !G || (Object.keys(Ft).forEach(function(e) {
959
+ return document.getElementById(e)?.remove();
960
+ }), G.remove(), G = void 0);
961
+ }
962
+ function Bt(e, t) {
963
+ var n = document.createElement("div");
964
+ return n.id = e, n.innerHTML = `<p>${t}</p>`, n.style.display = "none", n.style.position = "fixed", n.style.zIndex = "-5", n;
965
+ }
966
+ function Vt(e) {
967
+ if (!le) {
968
+ G || Lt(), G.innerHTML = "";
969
+ var t = document.createTextNode(e);
970
+ G.appendChild(t), G.style.display = "none", G.style.display = "inline";
971
+ }
972
+ }
973
+ var Ht = "--any--", Ut = { outline: "rgba(255, 255, 102, 0.7) solid 2px" }, K = !1, Wt, q, J = "", Y, X, Z = "", Gt = /* @__PURE__ */ new WeakSet(), Kt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), Yt;
974
+ function Xt(e, t) {
975
+ $.size === 0 && (Yt = Rt(), window.addEventListener("keydown", Qt), window.addEventListener("click", $t)), $.has(t) || $.set(t, /* @__PURE__ */ new Set()), $.get(t).has(e) || ($.get(t).add(e), se());
976
+ }
977
+ function Zt(e, t) {
978
+ q === e && nn(), $.get(t).delete(e), ce(), $.get(t).size === 0 && $.delete(t), $.size === 0 && (window.removeEventListener("keydown", Qt), window.removeEventListener("click", $t), Yt = void 0, zt());
979
+ }
980
+ function Qt(e) {
981
+ if (K) switch (e.key) {
982
+ case "Escape":
983
+ nn();
984
+ break;
985
+ }
986
+ }
987
+ function $t() {
988
+ K && (Gt.has(document.activeElement) || nn());
989
+ }
990
+ function en(e) {
991
+ if (K) {
992
+ var t = e.currentTarget;
993
+ if (t !== q) {
994
+ J = t.getAttribute("aria-label") || "";
995
+ var n = Q.get(q).items, r = n.find(function(e) {
996
+ return e[k] === X;
997
+ }), i = n.indexOf(r), a = n.splice(i, 1)[0], o = Q.get(t), s = o.items, c = o.autoAriaDisabled;
998
+ t.getBoundingClientRect().top < q.getBoundingClientRect().top || t.getBoundingClientRect().left < q.getBoundingClientRect().left ? (s.push(a), c || Vt(`Moved item ${Z} to the end of the list ${J}`)) : (s.unshift(a), c || Vt(`Moved item ${Z} to the beginning of the list ${J}`)), _(q, n, {
999
+ trigger: T.DROPPED_INTO_ANOTHER,
1000
+ id: X,
1001
+ source: E.KEYBOARD
1002
+ }), _(t, s, {
1003
+ trigger: T.DROPPED_INTO_ZONE,
1004
+ id: X,
1005
+ source: E.KEYBOARD
1006
+ }), q = t;
1007
+ }
1008
+ }
1009
+ }
1010
+ function tn() {
1011
+ Jt.forEach(function(e, t) {
1012
+ var n = e.update;
1013
+ return n(Q.get(t));
1014
+ });
1015
+ }
1016
+ function nn() {
1017
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
1018
+ Q.get(q).autoAriaDisabled || Vt(`Stopped dragging item ${Z}`), Gt.has(document.activeElement) && document.activeElement.blur(), e && v(q, Q.get(q).items, {
1019
+ trigger: T.DRAG_STOPPED,
1020
+ id: X,
1021
+ source: E.KEYBOARD
1022
+ }), $e($.get(Wt), function(e) {
1023
+ return Q.get(e).dropTargetStyle;
1024
+ }, function(e) {
1025
+ return Q.get(e).dropTargetClasses;
1026
+ }), Y = null, X = null, Z = "", Wt = null, q = null, J = "", K = !1, tn();
1027
+ }
1028
+ function rn(e, t) {
1029
+ var n = {
1030
+ items: void 0,
1031
+ type: void 0,
1032
+ dragDisabled: !1,
1033
+ zoneTabIndex: 0,
1034
+ zoneItemTabIndex: 0,
1035
+ dropFromOthersDisabled: !1,
1036
+ dropTargetStyle: Ut,
1037
+ dropTargetClasses: [],
1038
+ autoAriaDisabled: !1
1039
+ };
1040
+ function r(e, t, n) {
1041
+ e.length <= 1 || e.splice(n, 1, e.splice(t, 1, e[n])[0]);
1042
+ }
1043
+ function i(t) {
1044
+ switch (t.key) {
1045
+ case "Enter":
1046
+ case " ":
1047
+ if ((t.target.disabled !== void 0 || t.target.href || t.target.isContentEditable) && !Gt.has(t.target)) return;
1048
+ t.preventDefault(), t.stopPropagation(), K ? nn() : a(t);
1049
+ break;
1050
+ case "ArrowDown":
1051
+ case "ArrowRight":
1052
+ if (!K) return;
1053
+ t.preventDefault(), t.stopPropagation();
1054
+ var i = Q.get(e).items, o = Array.from(e.children), s = o.indexOf(t.currentTarget);
1055
+ s < o.length - 1 && (n.autoAriaDisabled || Vt(`Moved item ${Z} to position ${s + 2} in the list ${J}`), r(i, s, s + 1), _(e, i, {
1056
+ trigger: T.DROPPED_INTO_ZONE,
1057
+ id: X,
1058
+ source: E.KEYBOARD
1059
+ }));
1060
+ break;
1061
+ case "ArrowUp":
1062
+ case "ArrowLeft":
1063
+ if (!K) return;
1064
+ t.preventDefault(), t.stopPropagation();
1065
+ var c = Q.get(e).items, l = Array.from(e.children).indexOf(t.currentTarget);
1066
+ l > 0 && (n.autoAriaDisabled || Vt(`Moved item ${Z} to position ${l} in the list ${J}`), r(c, l, l - 1), _(e, c, {
1067
+ trigger: T.DROPPED_INTO_ZONE,
1068
+ id: X,
1069
+ source: E.KEYBOARD
1070
+ }));
1071
+ break;
1072
+ }
1073
+ }
1074
+ function a(t) {
1075
+ c(t.currentTarget), q = e, Wt = n.type, K = !0;
1076
+ var r = Array.from($.get(n.type)).filter(function(e) {
1077
+ return e === q || !Q.get(e).dropFromOthersDisabled;
1078
+ });
1079
+ if (Qe(r, function(e) {
1080
+ return Q.get(e).dropTargetStyle;
1081
+ }, function(e) {
1082
+ return Q.get(e).dropTargetClasses;
1083
+ }), !n.autoAriaDisabled) {
1084
+ var i = `Started dragging item ${Z}. Use the arrow keys to move it within its list ${J}`;
1085
+ r.length > 1 && (i += ", or tab to another list in order to move the item into it"), Vt(i);
1086
+ }
1087
+ v(e, Q.get(e).items, {
1088
+ trigger: T.DRAG_STARTED,
1089
+ id: X,
1090
+ source: E.KEYBOARD
1091
+ }), tn();
1092
+ }
1093
+ function o(e) {
1094
+ K && e.currentTarget !== Y && (e.stopPropagation(), nn(!1), a(e));
1095
+ }
1096
+ function c(t) {
1097
+ var r = Q.get(e).items, i = Array.from(e.children), a = i.indexOf(t);
1098
+ Y = t, Y.tabIndex = n.zoneItemTabIndex, X = r[a][k], Z = i[a].getAttribute("aria-label") || "";
1099
+ }
1100
+ function l(t) {
1101
+ var r = t.items, a = r === void 0 ? [] : r, c = t.type, l = c === void 0 ? Ht : c, u = t.dragDisabled, d = u === void 0 ? !1 : u, f = t.zoneTabIndex, p = f === void 0 ? 0 : f, m = t.zoneItemTabIndex, h = m === void 0 ? 0 : m, g = t.dropFromOthersDisabled, _ = g === void 0 ? !1 : g, v = t.dropTargetStyle, y = v === void 0 ? Ut : v, b = t.dropTargetClasses, x = b === void 0 ? [] : b, S = t.autoAriaDisabled, C = S === void 0 ? !1 : S;
1102
+ n.items = s(a), n.dragDisabled = d, n.dropFromOthersDisabled = _, n.zoneTabIndex = p, n.zoneItemTabIndex = h, n.dropTargetStyle = y, n.dropTargetClasses = x, n.autoAriaDisabled = C, n.type && l !== n.type && Zt(e, n.type), n.type = l, Xt(e, l), C || (e.setAttribute("role", "list"), e.setAttribute("aria-describedby", d ? Yt.DND_ZONE_DRAG_DISABLED : Yt.DND_ZONE_ACTIVE)), Q.set(e, n), K ? e.tabIndex = e === q || Y.contains(e) || n.dropFromOthersDisabled || q && n.type !== Q.get(q).type ? -1 : 0 : e.tabIndex = n.zoneTabIndex, e.addEventListener("focus", en);
1103
+ for (var ee = function(t) {
1104
+ var r = e.children[t];
1105
+ Gt.add(r), r.tabIndex = K ? -1 : n.zoneItemTabIndex, C || r.setAttribute("role", "listitem"), r.removeEventListener("keydown", Kt.get(r)), r.removeEventListener("click", qt.get(r)), d || (r.addEventListener("keydown", i), Kt.set(r, i), r.addEventListener("click", o), qt.set(r, o)), K && n.items[t][k] === X && (Y = r, Y.tabIndex = n.zoneItemTabIndex, r.focus());
1106
+ }, w = 0; w < e.children.length; w++) ee(w);
1107
+ }
1108
+ l(t);
1109
+ var u = {
1110
+ update: function(e) {
1111
+ l(e);
1112
+ },
1113
+ destroy: function() {
1114
+ Zt(e, n.type), Q.delete(e), Jt.delete(e);
1115
+ }
1116
+ };
1117
+ return Jt.set(e, u), u;
1118
+ }
1119
+ var an = [
1120
+ "items",
1121
+ "flipDurationMs",
1122
+ "type",
1123
+ "dragDisabled",
1124
+ "morphDisabled",
1125
+ "dropFromOthersDisabled",
1126
+ "zoneTabIndex",
1127
+ "zoneItemTabIndex",
1128
+ "dropTargetStyle",
1129
+ "dropTargetClasses",
1130
+ "transformDraggedElement",
1131
+ "autoAriaDisabled",
1132
+ "centreDraggedOnCursor",
1133
+ "useCursorForDetection",
1134
+ "delayTouchStart",
1135
+ "dropAnimationDisabled"
1136
+ ];
1137
+ function on(e, t) {
1138
+ if (sn(e)) return {
1139
+ update: function() {},
1140
+ destroy: function() {}
1141
+ };
1142
+ cn(t);
1143
+ var n = Mt(e, t), r = rn(e, t);
1144
+ return {
1145
+ update: function(e) {
1146
+ cn(e), n.update(e), r.update(e);
1147
+ },
1148
+ destroy: function() {
1149
+ n.destroy(), r.destroy();
1150
+ }
1151
+ };
1152
+ }
1153
+ function sn(e) {
1154
+ return !!e.closest(`[${ie}="true"]`);
1155
+ }
1156
+ function cn(e) {
1157
+ var t = e.items;
1158
+ e.flipDurationMs, e.type, e.dragDisabled, e.morphDisabled, e.dropFromOthersDisabled;
1159
+ var r = e.zoneTabIndex, i = e.zoneItemTabIndex;
1160
+ e.dropTargetStyle;
1161
+ var o = e.dropTargetClasses;
1162
+ e.transformDraggedElement, e.autoAriaDisabled, e.centreDraggedOnCursor, e.useCursorForDetection;
1163
+ var s = e.delayTouchStart;
1164
+ e.dropAnimationDisabled;
1165
+ var c = a(e, an);
1166
+ if (Object.keys(c).length > 0 && console.warn("dndzone will ignore unknown options", c), !t) throw Error("no 'items' key provided to dndzone");
1167
+ var l = t.find(function(e) {
1168
+ return !{}.hasOwnProperty.call(e, k);
1169
+ });
1170
+ if (l) throw Error(`missing '${k}' property for item ${Ce(l)}`);
1171
+ if (o && !Array.isArray(o)) throw Error(`dropTargetClasses should be an array but instead it is a ${n(o)}, ${Ce(o)}`);
1172
+ if (r && !ln(r)) throw Error(`zoneTabIndex should be a number but instead it is a ${n(r)}, ${Ce(r)}`);
1173
+ if (i && !ln(i)) throw Error(`zoneItemTabIndex should be a number but instead it is a ${n(i)}, ${Ce(i)}`);
1174
+ if (s !== void 0 && s !== !1 && s !== !0 && !(typeof s == "number" && isFinite(s) && s >= 0)) throw Error(`delayTouchStart should be a boolean (true/false) or a non-negative number but instead it is a ${n(s)}, ${Ce(s)}`);
1175
+ }
1176
+ function ln(e) {
1177
+ return !isNaN(e) && function(e) {
1178
+ return (e | 0) === e;
1179
+ }(parseFloat(e));
1180
+ }
1181
+ //#endregion
1182
+ //#region src/lib/utils/dndzone.ts
1183
+ function un(e, t) {
1184
+ let n = t, r = null, i = null, a = !1, o = !1, s = () => {
1185
+ o || (o = !0, (typeof queueMicrotask == "function" ? queueMicrotask : (e) => Promise.resolve().then(e))(c));
1186
+ }, c = () => {
1187
+ a || (r = on(e, n), i &&= (r.update(i), null));
1188
+ };
1189
+ return s(), {
1190
+ update(e) {
1191
+ r ? r.update(e) : (i = e, s());
1192
+ },
1193
+ destroy() {
1194
+ r ? (r.destroy(), r = null) : a = !0;
1195
+ }
1196
+ };
1197
+ }
1198
+ //#endregion
1199
+ export { D as n, un as t };