@caspeco/casper-ui-library 9.0.2 → 9.2.0

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 (105) hide show
  1. package/README.md +10 -4
  2. package/dist/components/combobox/combobox.d.ts.map +1 -1
  3. package/dist/components/icon/icons/calendar-icon.d.ts +2 -0
  4. package/dist/components/icon/icons/calendar-icon.d.ts.map +1 -0
  5. package/dist/components/icon/icons/calendar-icon.js +8 -0
  6. package/dist/components/icon/icons/cart-icon.js +1 -1
  7. package/dist/components/icon/icons/closed-icon.d.ts +2 -0
  8. package/dist/components/icon/icons/closed-icon.d.ts.map +1 -0
  9. package/dist/components/icon/icons/closed-icon.js +8 -0
  10. package/dist/components/icon/icons/comment-add-icon.d.ts +2 -0
  11. package/dist/components/icon/icons/comment-add-icon.d.ts.map +1 -0
  12. package/dist/components/icon/icons/comment-add-icon.js +8 -0
  13. package/dist/components/icon/icons/comment-icon.js +1 -1
  14. package/dist/components/icon/icons/deliverect-icon.d.ts +2 -0
  15. package/dist/components/icon/icons/deliverect-icon.d.ts.map +1 -0
  16. package/dist/components/icon/icons/deliverect-icon.js +8 -0
  17. package/dist/components/icon/icons/door-closed-icon.d.ts +2 -0
  18. package/dist/components/icon/icons/door-closed-icon.d.ts.map +1 -0
  19. package/dist/components/icon/icons/door-closed-icon.js +8 -0
  20. package/dist/components/icon/icons/door-open-icon.d.ts +2 -0
  21. package/dist/components/icon/icons/door-open-icon.d.ts.map +1 -0
  22. package/dist/components/icon/icons/door-open-icon.js +8 -0
  23. package/dist/components/icon/icons/failed-print-icon.d.ts +2 -0
  24. package/dist/components/icon/icons/failed-print-icon.d.ts.map +1 -0
  25. package/dist/components/icon/icons/failed-print-icon.js +8 -0
  26. package/dist/components/icon/icons/index.d.ts +27 -4
  27. package/dist/components/icon/icons/index.d.ts.map +1 -1
  28. package/dist/components/icon/icons/key-command-icon.d.ts +2 -0
  29. package/dist/components/icon/icons/key-command-icon.d.ts.map +1 -0
  30. package/dist/components/icon/icons/key-command-icon.js +8 -0
  31. package/dist/components/icon/icons/key-enter-icon.d.ts +2 -0
  32. package/dist/components/icon/icons/key-enter-icon.d.ts.map +1 -0
  33. package/dist/components/icon/icons/key-enter-icon.js +8 -0
  34. package/dist/components/icon/icons/key-option-icon.d.ts +2 -0
  35. package/dist/components/icon/icons/key-option-icon.d.ts.map +1 -0
  36. package/dist/components/icon/icons/key-option-icon.js +8 -0
  37. package/dist/components/icon/icons/message-add-icon.d.ts +2 -0
  38. package/dist/components/icon/icons/message-add-icon.d.ts.map +1 -0
  39. package/dist/components/icon/icons/message-add-icon.js +8 -0
  40. package/dist/components/icon/icons/message-icon.js +1 -1
  41. package/dist/components/icon/icons/message-lines-icon.d.ts +2 -0
  42. package/dist/components/icon/icons/message-lines-icon.d.ts.map +1 -0
  43. package/dist/components/icon/icons/message-lines-icon.js +8 -0
  44. package/dist/components/icon/icons/module-home-icon.js +1 -1
  45. package/dist/components/icon/icons/no-cart-icon.d.ts +2 -0
  46. package/dist/components/icon/icons/no-cart-icon.d.ts.map +1 -0
  47. package/dist/components/icon/icons/no-cart-icon.js +8 -0
  48. package/dist/components/icon/icons/note-icon.d.ts +2 -0
  49. package/dist/components/icon/icons/note-icon.d.ts.map +1 -0
  50. package/dist/components/icon/icons/note-icon.js +8 -0
  51. package/dist/components/icon/icons/product-my-pages-icon.d.ts +2 -0
  52. package/dist/components/icon/icons/product-my-pages-icon.d.ts.map +1 -0
  53. package/dist/components/icon/icons/product-my-pages-icon.js +8 -0
  54. package/dist/components/icon/icons/puck-icon.d.ts +2 -0
  55. package/dist/components/icon/icons/puck-icon.d.ts.map +1 -0
  56. package/dist/components/icon/icons/puck-icon.js +8 -0
  57. package/dist/components/icon/icons/redo-icon.d.ts +2 -0
  58. package/dist/components/icon/icons/redo-icon.d.ts.map +1 -0
  59. package/dist/components/icon/icons/redo-icon.js +8 -0
  60. package/dist/components/icon/icons/sidebar-hide-icon.d.ts +2 -0
  61. package/dist/components/icon/icons/sidebar-hide-icon.d.ts.map +1 -0
  62. package/dist/components/icon/icons/sidebar-hide-icon.js +8 -0
  63. package/dist/components/icon/icons/sidebar-left-icon.d.ts +2 -0
  64. package/dist/components/icon/icons/sidebar-left-icon.d.ts.map +1 -0
  65. package/dist/components/icon/icons/sidebar-left-icon.js +8 -0
  66. package/dist/components/icon/icons/sidebar-right-icon.d.ts +2 -0
  67. package/dist/components/icon/icons/sidebar-right-icon.d.ts.map +1 -0
  68. package/dist/components/icon/icons/sidebar-right-icon.js +8 -0
  69. package/dist/components/icon/icons/sidebar-show-icon.d.ts +2 -0
  70. package/dist/components/icon/icons/sidebar-show-icon.d.ts.map +1 -0
  71. package/dist/components/icon/icons/sidebar-show-icon.js +8 -0
  72. package/dist/components/icon/icons/swatch-icon.d.ts +2 -0
  73. package/dist/components/icon/icons/swatch-icon.d.ts.map +1 -0
  74. package/dist/components/icon/icons/swatch-icon.js +8 -0
  75. package/dist/components/icon/icons/trivec-icon.d.ts +2 -0
  76. package/dist/components/icon/icons/trivec-icon.d.ts.map +1 -0
  77. package/dist/components/icon/icons/trivec-icon.js +9 -0
  78. package/dist/components/icon/icons/waste-icon.d.ts +2 -0
  79. package/dist/components/icon/icons/waste-icon.d.ts.map +1 -0
  80. package/dist/components/icon/icons/waste-icon.js +8 -0
  81. package/dist/components/table/table-toolbar-settings.d.ts +15 -1
  82. package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
  83. package/dist/components/table/table-toolbar-settings.js +71 -44
  84. package/dist/components/table/table-toolbar-settings.spec.d.ts +2 -0
  85. package/dist/components/table/table-toolbar-settings.spec.d.ts.map +1 -0
  86. package/dist/components/table/table.constants.d.ts +2 -0
  87. package/dist/components/table/table.constants.d.ts.map +1 -0
  88. package/dist/components/table/table.constants.js +4 -0
  89. package/dist/components/table/translations.d.ts +14 -0
  90. package/dist/components/table/translations.d.ts.map +1 -1
  91. package/dist/components/table/translations.js +12 -0
  92. package/dist/index.js +727 -681
  93. package/dist/node_modules/@dnd-kit/abstract/index.js +502 -442
  94. package/dist/node_modules/@dnd-kit/dom/index.js +817 -779
  95. package/dist/node_modules/@dnd-kit/dom/sortable.js +260 -262
  96. package/dist/node_modules/@dnd-kit/dom/utilities.js +470 -463
  97. package/dist/node_modules/@dnd-kit/react/hooks.js +26 -26
  98. package/dist/node_modules/@dnd-kit/react/index.js +8 -1
  99. package/dist/node_modules/@dnd-kit/react/sortable.js +45 -46
  100. package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +11 -11
  101. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +85 -73
  102. package/package.json +20 -18
  103. package/dist/components/icon/icons/tablet-icon.d.ts +0 -2
  104. package/dist/components/icon/icons/tablet-icon.d.ts.map +0 -1
  105. package/dist/components/icon/icons/tablet-icon.js +0 -8
@@ -1,58 +1,58 @@
1
- import { effects as rt, ValueHistory as Ie, snapshot as nt, reactive as _, derived as b } from "../state/dist/index.js";
2
- import { Position as Pe } from "../geometry/dist/index.js";
3
- import { untracked as k, effect as Lt, batch as Rt, signal as jt } from "../../@preact/signals-core/dist/signals-core.module.js";
4
- var Se = Object.create, dt = Object.defineProperty, xe = Object.defineProperties, ze = Object.getOwnPropertyDescriptor, Ce = Object.getOwnPropertyDescriptors, st = Object.getOwnPropertySymbols, Ht = Object.prototype.hasOwnProperty, Vt = Object.prototype.propertyIsEnumerable, qt = (t, e) => (e = Symbol[t]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + t), q = (t) => {
1
+ import { effects as ot, ValueHistory as xe, snapshot as ut, reactive as y, derived as b } from "../state/dist/index.js";
2
+ import { Position as ze } from "../geometry/dist/index.js";
3
+ import { untracked as k, effect as Tt, batch as rt, signal as vt } from "../../@preact/signals-core/dist/signals-core.module.js";
4
+ var Ae = Object.create, _t = Object.defineProperty, Fe = Object.defineProperties, Le = Object.getOwnPropertyDescriptor, Ve = Object.getOwnPropertyDescriptors, nt = Object.getOwnPropertySymbols, $t = Object.prototype.hasOwnProperty, Gt = Object.prototype.propertyIsEnumerable, Kt = (t, e) => (e = Symbol[t]) ? e : /* @__PURE__ */ Symbol.for("Symbol." + t), U = (t) => {
5
5
  throw TypeError(t);
6
- }, ct = (t, e, s) => e in t ? dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, Nt = (t, e) => {
6
+ }, pt = (t, e, s) => e in t ? _t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, yt = (t, e) => {
7
7
  for (var s in e || (e = {}))
8
- Ht.call(e, s) && ct(t, s, e[s]);
9
- if (st)
10
- for (var s of st(e))
11
- Vt.call(e, s) && ct(t, s, e[s]);
8
+ $t.call(e, s) && pt(t, s, e[s]);
9
+ if (nt)
10
+ for (var s of nt(e))
11
+ Gt.call(e, s) && pt(t, s, e[s]);
12
12
  return t;
13
- }, Ut = (t, e) => xe(t, Ce(e)), zt = (t, e) => dt(t, "name", { value: e, configurable: !0 }), Tt = (t, e) => {
13
+ }, mt = (t, e) => Fe(t, Ve(e)), Ht = (t, e) => _t(t, "name", { value: e, configurable: !0 }), Bt = (t, e) => {
14
14
  var s = {};
15
- for (var r in t)
16
- Ht.call(t, r) && e.indexOf(r) < 0 && (s[r] = t[r]);
17
- if (t != null && st)
18
- for (var r of st(t))
19
- e.indexOf(r) < 0 && Vt.call(t, r) && (s[r] = t[r]);
15
+ for (var i in t)
16
+ $t.call(t, i) && e.indexOf(i) < 0 && (s[i] = t[i]);
17
+ if (t != null && nt)
18
+ for (var i of nt(t))
19
+ e.indexOf(i) < 0 && Gt.call(t, i) && (s[i] = t[i]);
20
20
  return s;
21
- }, N = (t) => {
21
+ }, T = (t) => {
22
22
  var e;
23
- return [, , , Se((e = t?.[qt("metadata")]) != null ? e : null)];
24
- }, $t = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], $ = (t) => t !== void 0 && typeof t != "function" ? q("Function expected") : t, Ae = (t, e, s, r, i) => ({ kind: $t[t], name: e, metadata: r, addInitializer: (n) => s._ ? q("Already initialized") : i.push($(n || null)) }), F = (t, e) => ct(e, qt("metadata"), t[3]), a = (t, e, s, r) => {
25
- for (var i = 0, n = t[e >> 1], u = n && n.length; i < u; i++) e & 1 ? n[i].call(s) : r = n[i].call(s, r);
26
- return r;
27
- }, l = (t, e, s, r, i, n) => {
28
- var u, o, p, h, g, c = e & 7, P = !!(e & 8), D = !!(e & 16), L = c > 3 ? t.length + 1 : c ? P ? 1 : 2 : 0, K = $t[c + 5], U = c > 3 && (t[L - 1] = []), R = t[L] || (t[L] = []), M = c && (!D && !P && (i = i.prototype), c < 5 && (c > 3 || !D) && ze(c < 4 ? i : { get [s]() {
29
- return m(this, n);
23
+ return [, , , Ae((e = t?.[Kt("metadata")]) != null ? e : null)];
24
+ }, Jt = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], K = (t) => t !== void 0 && typeof t != "function" ? U("Function expected") : t, je = (t, e, s, i, r) => ({ kind: Jt[t], name: e, metadata: i, addInitializer: (n) => s._ ? U("Already initialized") : r.push(K(n || null)) }), V = (t, e) => pt(e, Kt("metadata"), t[3]), c = (t, e, s, i) => {
25
+ for (var r = 0, n = t[e >> 1], l = n && n.length; r < l; r++) e & 1 ? n[r].call(s) : i = n[r].call(s, i);
26
+ return i;
27
+ }, u = (t, e, s, i, r, n) => {
28
+ var l, o, h, d, g, a = e & 7, D = !!(e & 8), m = !!(e & 16), A = a > 3 ? t.length + 1 : a ? D ? 1 : 2 : 0, X = Jt[a + 5], $ = a > 3 && (t[A - 1] = []), j = t[A] || (t[A] = []), M = a && (!m && !D && (r = r.prototype), a < 5 && (a > 3 || !m) && Le(a < 4 ? r : { get [s]() {
29
+ return v(this, n);
30
30
  }, set [s](O) {
31
- return E(this, n, O);
31
+ return I(this, n, O);
32
32
  } }, s));
33
- c ? D && c < 4 && zt(n, (c > 2 ? "set " : c > 1 ? "get " : "") + s) : zt(i, s);
34
- for (var T = r.length - 1; T >= 0; T--)
35
- h = Ae(c, s, p = {}, t[3], R), c && (h.static = P, h.private = D, g = h.access = { has: D ? (O) => Fe(i, O) : (O) => s in O }, c ^ 3 && (g.get = D ? (O) => (c ^ 1 ? m : Le)(O, i, c ^ 4 ? n : M.get) : (O) => O[s]), c > 2 && (g.set = D ? (O, it) => E(O, i, it, c ^ 4 ? n : M.set) : (O, it) => O[s] = it)), o = (0, r[T])(c ? c < 4 ? D ? n : M[K] : c > 4 ? void 0 : { get: M.get, set: M.set } : i, h), p._ = 1, c ^ 4 || o === void 0 ? $(o) && (c > 4 ? U.unshift(o) : c ? D ? n = o : M[K] = o : i = o) : typeof o != "object" || o === null ? q("Object expected") : ($(u = o.get) && (M.get = u), $(u = o.set) && (M.set = u), $(u = o.init) && U.unshift(u));
36
- return c || F(t, i), M && dt(i, s, M), D ? c ^ 4 ? n : M : i;
37
- }, ht = (t, e, s) => e.has(t) || q("Cannot " + s), Fe = (t, e) => Object(e) !== e ? q('Cannot use the "in" operator on this value') : t.has(e), m = (t, e, s) => (ht(t, e, "read from private field"), s ? s.call(t) : e.get(t)), d = (t, e, s) => e.has(t) ? q("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), E = (t, e, s, r) => (ht(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), Le = (t, e, s) => (ht(t, e, "access private method"), s);
38
- function Gt(t, e) {
33
+ a ? m && a < 4 && Ht(n, (a > 2 ? "set " : a > 1 ? "get " : "") + s) : Ht(r, s);
34
+ for (var G = i.length - 1; G >= 0; G--)
35
+ d = je(a, s, h = {}, t[3], j), a && (d.static = D, d.private = m, g = d.access = { has: m ? (O) => qe(r, O) : (O) => s in O }, a ^ 3 && (g.get = m ? (O) => (a ^ 1 ? v : Qt)(O, r, a ^ 4 ? n : M.get) : (O) => O[s]), a > 2 && (g.set = m ? (O, lt) => I(O, r, lt, a ^ 4 ? n : M.set) : (O, lt) => O[s] = lt)), o = (0, i[G])(a ? a < 4 ? m ? n : M[X] : a > 4 ? void 0 : { get: M.get, set: M.set } : r, d), h._ = 1, a ^ 4 || o === void 0 ? K(o) && (a > 4 ? $.unshift(o) : a ? m ? n = o : M[X] = o : r = o) : typeof o != "object" || o === null ? U("Object expected") : (K(l = o.get) && (M.get = l), K(l = o.set) && (M.set = l), K(l = o.init) && $.unshift(l));
36
+ return a || V(t, r), M && _t(r, s, M), m ? a ^ 4 ? n : M : r;
37
+ }, wt = (t, e, s) => e.has(t) || U("Cannot " + s), qe = (t, e) => Object(e) !== e ? U('Cannot use the "in" operator on this value') : t.has(e), v = (t, e, s) => (wt(t, e, "read from private field"), s ? s.call(t) : e.get(t)), p = (t, e, s) => e.has(t) ? U("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), I = (t, e, s, i) => (wt(t, e, "write to private field"), i ? i.call(t, s) : e.set(t, s), s), Qt = (t, e, s) => (wt(t, e, "access private method"), s);
38
+ function Xt(t, e) {
39
39
  return {
40
40
  plugin: t,
41
41
  options: e
42
42
  };
43
43
  }
44
- function Qe(t) {
45
- return (e) => Gt(t, e);
44
+ function Ze(t) {
45
+ return (e) => Xt(t, e);
46
46
  }
47
- function Bt(t) {
47
+ function at(t) {
48
48
  return typeof t == "function" ? {
49
49
  plugin: t,
50
50
  options: void 0
51
51
  } : t;
52
52
  }
53
- var Jt, J, pt, X;
54
- Jt = [_];
55
- var C = class {
53
+ var Yt, Q, bt, Z;
54
+ Yt = [y];
55
+ var F = class {
56
56
  /**
57
57
  * Creates a new plugin instance.
58
58
  *
@@ -60,7 +60,7 @@ var C = class {
60
60
  * @param options - Optional configuration for the plugin
61
61
  */
62
62
  constructor(t, e) {
63
- this.manager = t, this.options = e, d(this, pt, a(J, 8, this, !1)), a(J, 11, this), d(this, X, /* @__PURE__ */ new Set());
63
+ this.manager = t, this.options = e, p(this, bt, c(Q, 8, this, !1)), c(Q, 11, this), p(this, Z, /* @__PURE__ */ new Set());
64
64
  }
65
65
  /**
66
66
  * Enables a disabled plugin instance.
@@ -105,8 +105,8 @@ var C = class {
105
105
  * @returns A function to dispose of the effect
106
106
  */
107
107
  registerEffect(t) {
108
- const e = Lt(t.bind(this));
109
- return m(this, X).add(e), e;
108
+ const e = Tt(t.bind(this));
109
+ return v(this, Z).add(e), e;
110
110
  }
111
111
  /**
112
112
  * Destroys a plugin instance and cleans up its resources.
@@ -117,7 +117,7 @@ var C = class {
117
117
  * - Should be overridden by subclasses to clean up additional resources
118
118
  */
119
119
  destroy() {
120
- m(this, X).forEach((t) => t());
120
+ v(this, Z).forEach((t) => t());
121
121
  }
122
122
  /**
123
123
  * Configures a plugin constructor with options.
@@ -130,23 +130,23 @@ var C = class {
130
130
  * plugin constructor will use to create plugin instances.
131
131
  */
132
132
  static configure(t) {
133
- return Gt(this, t);
133
+ return Xt(this, t);
134
134
  }
135
135
  };
136
- J = N(null);
137
- pt = /* @__PURE__ */ new WeakMap();
138
- X = /* @__PURE__ */ new WeakMap();
139
- l(J, 4, "disabled", Jt, C, pt);
140
- F(J, C);
141
- var Kt = class extends C {
142
- }, Y, at = class {
136
+ Q = T(null);
137
+ bt = /* @__PURE__ */ new WeakMap();
138
+ Z = /* @__PURE__ */ new WeakMap();
139
+ u(Q, 4, "disabled", Yt, F, bt);
140
+ V(Q, F);
141
+ var Zt = class extends F {
142
+ }, tt, dt = class {
143
143
  /**
144
144
  * Creates a new plugin registry.
145
145
  *
146
146
  * @param manager - The drag and drop manager that owns this registry
147
147
  */
148
148
  constructor(t) {
149
- this.manager = t, this.instances = /* @__PURE__ */ new Map(), d(this, Y, []);
149
+ this.manager = t, this.instances = /* @__PURE__ */ new Map(), p(this, tt, []);
150
150
  }
151
151
  /**
152
152
  * Gets all registered plugin instances.
@@ -167,16 +167,19 @@ var Kt = class extends C {
167
167
  * - Registers new plugins with their options
168
168
  */
169
169
  set values(t) {
170
- const e = t.map(Bt).reduceRight((r, i) => r.some(({ plugin: n }) => n === i.plugin) ? r : [i, ...r], []), s = e.map(({ plugin: r }) => r);
171
- for (const r of m(this, Y))
172
- if (!s.includes(r)) {
173
- if (r.prototype instanceof Kt)
170
+ const e = t.map(at).reduce((i, r) => {
171
+ const n = i.find(({ plugin: l }) => l === r.plugin);
172
+ return n ? (n.options = r.options, i) : [...i, r];
173
+ }, []), s = e.map(({ plugin: i }) => i);
174
+ for (const i of v(this, tt))
175
+ if (!s.includes(i)) {
176
+ if (i.prototype instanceof Zt)
174
177
  continue;
175
- this.unregister(r);
178
+ this.unregister(i);
176
179
  }
177
- for (const { plugin: r, options: i } of e)
178
- this.register(r, i);
179
- E(this, Y, s);
180
+ for (const { plugin: i, options: r } of e)
181
+ this.register(i, r);
182
+ I(this, tt, s);
180
183
  }
181
184
  /**
182
185
  * Gets a plugin instance by its constructor.
@@ -201,8 +204,8 @@ var Kt = class extends C {
201
204
  const s = this.instances.get(t);
202
205
  if (s)
203
206
  return s.options !== e && (s.options = e), s;
204
- const r = new t(this.manager, e);
205
- return this.instances.set(t, r), r;
207
+ const i = new t(this.manager, e);
208
+ return this.instances.set(t, i), i;
206
209
  }
207
210
  /**
208
211
  * Unregisters a plugin instance.
@@ -231,29 +234,29 @@ var Kt = class extends C {
231
234
  this.instances.clear();
232
235
  }
233
236
  };
234
- Y = /* @__PURE__ */ new WeakMap();
235
- function Re(t, e) {
237
+ tt = /* @__PURE__ */ new WeakMap();
238
+ function He(t, e) {
236
239
  return t.priority === e.priority ? t.type === e.type ? e.value - t.value : e.type - t.type : e.priority - t.priority;
237
240
  }
238
- var Q = [], j, H, je = class extends C {
241
+ var Y = [], q, H, Re = class extends F {
239
242
  /**
240
243
  * Creates a new CollisionObserver instance.
241
244
  *
242
245
  * @param manager - The drag drop manager instance
243
246
  */
244
247
  constructor(t) {
245
- super(t), d(this, j), d(this, H), this.computeCollisions = this.computeCollisions.bind(this), E(this, H, jt(Q)), this.destroy = rt(
248
+ super(t), p(this, q), p(this, H), this.computeCollisions = this.computeCollisions.bind(this), I(this, H, vt(Y)), this.destroy = ot(
246
249
  () => {
247
250
  const e = this.computeCollisions(), s = k(
248
251
  () => this.manager.dragOperation.position.current
249
252
  );
250
- if (e !== Q) {
251
- const r = m(this, j);
252
- if (E(this, j, s), r && s.x == r.x && s.y == r.y)
253
+ if (e !== Y) {
254
+ const i = v(this, q);
255
+ if (I(this, q, s), i && s.x == i.x && s.y == i.y)
253
256
  return;
254
257
  } else
255
- E(this, j, void 0);
256
- m(this, H).value = e;
258
+ I(this, q, void 0);
259
+ v(this, H).value = e;
257
260
  },
258
261
  () => {
259
262
  const { dragOperation: e } = this.manager;
@@ -268,7 +271,7 @@ var Q = [], j, H, je = class extends C {
268
271
  */
269
272
  forceUpdate(t = !0) {
270
273
  k(() => {
271
- t ? m(this, H).value = this.computeCollisions() : E(this, j, void 0);
274
+ t ? v(this, H).value = this.computeCollisions() : I(this, q, void 0);
272
275
  });
273
276
  }
274
277
  /**
@@ -279,37 +282,271 @@ var Q = [], j, H, je = class extends C {
279
282
  * @returns Array of detected collisions, sorted by priority
280
283
  */
281
284
  computeCollisions(t, e) {
282
- const { registry: s, dragOperation: r } = this.manager, { source: i, shape: n, status: u } = r;
283
- if (!u.initialized || !n)
284
- return Q;
285
- const o = [], p = [];
286
- for (const h of t ?? s.droppables) {
287
- if (h.disabled || i && !h.accepts(i))
285
+ const { registry: s, dragOperation: i } = this.manager, { source: r, shape: n, status: l } = i;
286
+ if (!l.initialized || !n)
287
+ return Y;
288
+ const o = [], h = [];
289
+ for (const d of t ?? s.droppables) {
290
+ if (d.disabled || r && !d.accepts(r))
288
291
  continue;
289
- const g = e ?? h.collisionDetector;
292
+ const g = e ?? d.collisionDetector;
290
293
  if (!g)
291
294
  continue;
292
- p.push(h), h.shape;
293
- const c = k(
295
+ h.push(d), d.shape;
296
+ const a = k(
294
297
  () => g({
295
- droppable: h,
296
- dragOperation: r
298
+ droppable: d,
299
+ dragOperation: i
297
300
  })
298
301
  );
299
- c && (h.collisionPriority != null && (c.priority = h.collisionPriority), o.push(c));
302
+ a && (d.collisionPriority != null && (a.priority = d.collisionPriority), o.push(a));
300
303
  }
301
- return p.length === 0 ? Q : (o.sort(Re), o);
304
+ return h.length === 0 ? Y : (o.sort(He), o);
302
305
  }
303
306
  /**
304
307
  * Gets the current collisions signal value.
305
308
  */
306
309
  get collisions() {
307
- return m(this, H).value;
310
+ return v(this, H).value;
308
311
  }
309
312
  };
310
- j = /* @__PURE__ */ new WeakMap();
313
+ q = /* @__PURE__ */ new WeakMap();
311
314
  H = /* @__PURE__ */ new WeakMap();
312
- var He = class {
315
+ var te, ee, se, Dt, ie, S, Mt, N, Ot, It;
316
+ se = [y], ee = [y], te = [y];
317
+ var P = class L {
318
+ /**
319
+ * Creates a new instance of the `Entity` class.
320
+ *
321
+ * @param input - An object containing the initial properties of the entity.
322
+ * @param manager - The manager that controls the drag and drop operations.
323
+ */
324
+ constructor(e, s) {
325
+ p(this, Mt, c(S, 8, this)), c(S, 11, this), p(this, N), p(this, Ot, c(S, 12, this)), c(S, 15, this), p(this, It, c(S, 16, this)), c(S, 19, this);
326
+ const { effects: i, id: r, data: n = {}, disabled: l = !1, register: o = !0 } = e;
327
+ let h = r;
328
+ I(this, N, vt(r)), this.manager = s, this.data = n, this.disabled = l, this.effects = () => {
329
+ var d;
330
+ return [
331
+ () => {
332
+ const { id: g, manager: a } = this;
333
+ if (g !== h)
334
+ return h = g, a?.registry.register(this), () => a?.registry.unregister(this);
335
+ },
336
+ ...(d = i?.()) != null ? d : []
337
+ ];
338
+ }, this.register = this.register.bind(this), this.unregister = this.unregister.bind(this), this.destroy = this.destroy.bind(this), s && o && queueMicrotask(this.register);
339
+ }
340
+ get id() {
341
+ var e, s;
342
+ const i = v(this, N).value;
343
+ return (s = (e = L.pendingIdChanges) == null ? void 0 : e.get(this)) != null ? s : i;
344
+ }
345
+ set id(e) {
346
+ var s, i;
347
+ const r = (i = (s = L.pendingIdChanges) == null ? void 0 : s.get(this)) != null ? i : v(this, N).peek();
348
+ e !== r && (L.pendingIdChanges || (L.pendingIdChanges = /* @__PURE__ */ new Map(), queueMicrotask(() => {
349
+ var n;
350
+ return Qt(n = L, Dt, ie).call(n);
351
+ })), L.pendingIdChanges.set(this, e));
352
+ }
353
+ /**
354
+ * A method that registers the entity with the manager.
355
+ * @returns CleanupFunction | void
356
+ */
357
+ register() {
358
+ var e;
359
+ return (e = this.manager) == null ? void 0 : e.registry.register(this);
360
+ }
361
+ /**
362
+ * A method that unregisters the entity from the manager.
363
+ * @returns void
364
+ */
365
+ unregister() {
366
+ var e;
367
+ (e = this.manager) == null || e.registry.unregister(this);
368
+ }
369
+ /**
370
+ * A method that cleans up the entity when it is no longer needed.
371
+ * @returns void
372
+ */
373
+ destroy() {
374
+ var e;
375
+ (e = this.manager) == null || e.registry.unregister(this);
376
+ }
377
+ };
378
+ S = T(null);
379
+ Dt = /* @__PURE__ */ new WeakSet();
380
+ ie = function() {
381
+ const t = P.pendingIdChanges;
382
+ P.pendingIdChanges = null, t && rt(() => {
383
+ for (const [e, s] of t)
384
+ v(e, N).value = s;
385
+ });
386
+ };
387
+ Mt = /* @__PURE__ */ new WeakMap();
388
+ N = /* @__PURE__ */ new WeakMap();
389
+ Ot = /* @__PURE__ */ new WeakMap();
390
+ It = /* @__PURE__ */ new WeakMap();
391
+ u(S, 4, "manager", se, P, Mt);
392
+ u(S, 4, "data", ee, P, Ot);
393
+ u(S, 4, "disabled", te, P, It);
394
+ p(P, Dt);
395
+ V(S, P);
396
+ P.pendingIdChanges = null;
397
+ var ct = P, Rt = class {
398
+ constructor() {
399
+ this.map = vt(/* @__PURE__ */ new Map()), this.cleanupFunctions = /* @__PURE__ */ new WeakMap(), this.register = (t, e) => {
400
+ const s = this.map.peek(), i = s.get(t), r = () => this.unregister(t, e);
401
+ if (i === e) return r;
402
+ if (i && i.id === t) {
403
+ const o = this.cleanupFunctions.get(i);
404
+ o?.(), this.cleanupFunctions.delete(i);
405
+ }
406
+ const n = new Map(s);
407
+ for (const [o, h] of s)
408
+ if (h === e && o !== t) {
409
+ n.delete(o);
410
+ break;
411
+ }
412
+ n.set(t, e), this.map.value = n;
413
+ const l = ot(...e.effects());
414
+ return this.cleanupFunctions.set(e, l), r;
415
+ }, this.unregister = (t, e) => {
416
+ const s = this.map.peek();
417
+ if (s.get(t) !== e)
418
+ return;
419
+ const i = this.cleanupFunctions.get(e);
420
+ i?.(), this.cleanupFunctions.delete(e);
421
+ const r = new Map(s);
422
+ r.delete(t), this.map.value = r;
423
+ };
424
+ }
425
+ /**
426
+ * Iterator for the EntityRegistry class.
427
+ * @returns An iterator for the values in the map.
428
+ */
429
+ [Symbol.iterator]() {
430
+ return this.map.peek().values();
431
+ }
432
+ get value() {
433
+ return this.map.value.values();
434
+ }
435
+ /**
436
+ * Checks if a entity with the given identifier exists in the registry.
437
+ * @param identifier - The unique identifier of the entity.
438
+ * @returns True if the entity exists, false otherwise.
439
+ */
440
+ has(t) {
441
+ return this.map.value.has(t);
442
+ }
443
+ /**
444
+ * Retrieves a entity from the registry using its identifier.
445
+ * @param identifier - The unique identifier of the entity.
446
+ * @returns The entity if it exists, undefined otherwise.
447
+ */
448
+ get(t) {
449
+ return this.map.value.get(t);
450
+ }
451
+ /**
452
+ * Destroys all entries in the registry and clears the registry.
453
+ */
454
+ destroy() {
455
+ for (const t of this) {
456
+ const e = this.cleanupFunctions.get(t);
457
+ e?.(), t.destroy();
458
+ }
459
+ this.map.value = /* @__PURE__ */ new Map();
460
+ }
461
+ }, re, ne, ae, oe, ce, le, gt, w, kt, Et, St, C = class extends (gt = ct, le = [y], ce = [y], oe = [y], ae = [b], ne = [b], re = [b], gt) {
462
+ constructor(e, s) {
463
+ var i = e, { modifiers: r, type: n, sensors: l, plugins: o, effects: h } = i, d = Bt(i, ["modifiers", "type", "sensors", "plugins", "effects"]);
464
+ super(
465
+ mt(yt({}, d), {
466
+ effects: () => {
467
+ var g;
468
+ return [
469
+ ...(g = h?.()) != null ? g : [],
470
+ () => {
471
+ const { manager: a, plugins: D } = this;
472
+ if (!(!a || !D))
473
+ for (const m of D) {
474
+ const { plugin: A } = at(m);
475
+ a.registry.plugins.register(A);
476
+ }
477
+ }
478
+ ];
479
+ }
480
+ }),
481
+ s
482
+ ), c(w, 5, this), p(this, kt, c(w, 8, this)), c(w, 11, this), p(this, Et, c(w, 12, this)), c(w, 15, this), p(this, St, c(w, 16, this, this.isDragSource ? "dragging" : "idle")), c(w, 19, this), this.type = n, this.sensors = l, this.modifiers = r, this.alignment = d.alignment, this.plugins = o;
483
+ }
484
+ /**
485
+ * Look up per-entity options for a given plugin constructor.
486
+ */
487
+ pluginConfig(e) {
488
+ if (this.plugins)
489
+ for (const s of this.plugins) {
490
+ const i = at(s);
491
+ if (i.plugin === e) return i.options;
492
+ }
493
+ }
494
+ get isDropping() {
495
+ return this.status === "dropping" && this.isDragSource;
496
+ }
497
+ get isDragging() {
498
+ return this.status === "dragging" && this.isDragSource;
499
+ }
500
+ get isDragSource() {
501
+ var e, s;
502
+ return ((s = (e = this.manager) == null ? void 0 : e.dragOperation.source) == null ? void 0 : s.id) === this.id;
503
+ }
504
+ };
505
+ w = T(gt);
506
+ kt = /* @__PURE__ */ new WeakMap();
507
+ Et = /* @__PURE__ */ new WeakMap();
508
+ St = /* @__PURE__ */ new WeakMap();
509
+ u(w, 4, "type", le, C, kt);
510
+ u(w, 4, "modifiers", ce, C, Et);
511
+ u(w, 4, "status", oe, C, St);
512
+ u(w, 2, "isDropping", ae, C);
513
+ u(w, 2, "isDragging", ne, C);
514
+ u(w, 2, "isDragSource", re, C);
515
+ V(w, C);
516
+ var ue, de, he, pe, ge, fe, ft, _, Wt, Pt, Ct, xt, zt, x = class extends (ft = ct, fe = [y], ge = [y], pe = [y], he = [y], de = [y], ue = [b], ft) {
517
+ constructor(e, s) {
518
+ var i = e, { accept: r, collisionDetector: n, collisionPriority: l, type: o } = i, h = Bt(i, ["accept", "collisionDetector", "collisionPriority", "type"]);
519
+ super(h, s), c(_, 5, this), p(this, Wt, c(_, 8, this)), c(_, 11, this), p(this, Pt, c(_, 12, this)), c(_, 15, this), p(this, Ct, c(_, 16, this)), c(_, 19, this), p(this, xt, c(_, 20, this)), c(_, 23, this), p(this, zt, c(_, 24, this)), c(_, 27, this), this.accept = r, this.collisionDetector = n, this.collisionPriority = l, this.type = o;
520
+ }
521
+ /**
522
+ * Checks whether or not the droppable accepts a given draggable.
523
+ *
524
+ * @param draggable - The draggable to check
525
+ * @returns true if the draggable can be dropped here
526
+ */
527
+ accepts(e) {
528
+ const { accept: s } = this;
529
+ return s ? typeof s == "function" ? s(e) : e.type ? Array.isArray(s) ? s.includes(e.type) : e.type === s : !1 : !0;
530
+ }
531
+ get isDropTarget() {
532
+ var e, s;
533
+ return ((s = (e = this.manager) == null ? void 0 : e.dragOperation.target) == null ? void 0 : s.id) === this.id;
534
+ }
535
+ };
536
+ _ = T(ft);
537
+ Wt = /* @__PURE__ */ new WeakMap();
538
+ Pt = /* @__PURE__ */ new WeakMap();
539
+ Ct = /* @__PURE__ */ new WeakMap();
540
+ xt = /* @__PURE__ */ new WeakMap();
541
+ zt = /* @__PURE__ */ new WeakMap();
542
+ u(_, 4, "accept", fe, x, Wt);
543
+ u(_, 4, "type", ge, x, Pt);
544
+ u(_, 4, "collisionDetector", pe, x, Ct);
545
+ u(_, 4, "collisionPriority", he, x, xt);
546
+ u(_, 4, "shape", de, x, zt);
547
+ u(_, 2, "isDropTarget", ue, x);
548
+ V(_, x);
549
+ var Ne = class {
313
550
  constructor() {
314
551
  this.registry = /* @__PURE__ */ new Map();
315
552
  }
@@ -321,8 +558,8 @@ var He = class {
321
558
  * @returns A function to remove the event listener
322
559
  */
323
560
  addEventListener(t, e) {
324
- const { registry: s } = this, r = new Set(s.get(t));
325
- return r.add(e), s.set(t, r), () => this.removeEventListener(t, e);
561
+ const { registry: s } = this, i = new Set(s.get(t));
562
+ return i.add(e), s.set(t, i), () => this.removeEventListener(t, e);
326
563
  }
327
564
  /**
328
565
  * Removes an event listener for the specified event type.
@@ -331,8 +568,8 @@ var He = class {
331
568
  * @param handler - The function to remove
332
569
  */
333
570
  removeEventListener(t, e) {
334
- const { registry: s } = this, r = new Set(s.get(t));
335
- r.delete(e), s.set(t, r);
571
+ const { registry: s } = this, i = new Set(s.get(t));
572
+ i.delete(e), s.set(t, i);
336
573
  }
337
574
  /**
338
575
  * Dispatches an event to all registered listeners.
@@ -341,12 +578,12 @@ var He = class {
341
578
  * @param args - Arguments to pass to the event handlers
342
579
  */
343
580
  dispatch(t, ...e) {
344
- const { registry: s } = this, r = s.get(t);
345
- if (r)
346
- for (const i of r)
347
- i(...e);
581
+ const { registry: s } = this, i = s.get(t);
582
+ if (i)
583
+ for (const r of i)
584
+ r(...e);
348
585
  }
349
- }, Ve = class extends He {
586
+ }, Ue = class extends Ne {
350
587
  /**
351
588
  * Creates a new drag and drop monitor.
352
589
  *
@@ -366,9 +603,9 @@ var He = class {
366
603
  super.dispatch(t, ...s);
367
604
  }
368
605
  };
369
- function Z(t, e = !0) {
606
+ function et(t, e = !0) {
370
607
  let s = !1;
371
- return Ut(Nt({}, t), {
608
+ return mt(yt({}, t), {
372
609
  cancelable: e,
373
610
  get defaultPrevented() {
374
611
  return s;
@@ -378,47 +615,47 @@ function Z(t, e = !0) {
378
615
  }
379
616
  });
380
617
  }
381
- var qe = class extends Kt {
618
+ var Te = class extends Zt {
382
619
  constructor(t) {
383
620
  super(t);
384
- const e = (r, i) => r.map(({ id: n }) => n).join("") === i.map(({ id: n }) => n).join("");
621
+ const e = (i, r) => i.map(({ id: n }) => n).join("") === r.map(({ id: n }) => n).join("");
385
622
  let s = [];
386
- this.destroy = rt(
623
+ this.destroy = ot(
387
624
  () => {
388
- const { dragOperation: r, collisionObserver: i } = t;
389
- r.status.initializing && (s = [], i.enable());
625
+ const { dragOperation: i, collisionObserver: r } = t;
626
+ i.status.initializing && (s = [], r.enable());
390
627
  },
391
628
  () => {
392
- const { collisionObserver: r, monitor: i } = t, { collisions: n } = r;
393
- if (r.isDisabled())
629
+ const { collisionObserver: i, monitor: r } = t, { collisions: n } = i;
630
+ if (i.isDisabled() || ct.pendingIdChanges)
394
631
  return;
395
- const u = Z({
632
+ const l = et({
396
633
  collisions: n
397
634
  });
398
- if (i.dispatch("collision", u), u.defaultPrevented || e(n, s))
635
+ if (r.dispatch("collision", l), l.defaultPrevented || e(n, s))
399
636
  return;
400
637
  s = n;
401
638
  const [o] = n;
402
639
  k(() => {
403
- var p;
404
- o?.id !== ((p = t.dragOperation.target) == null ? void 0 : p.id) && (r.disable(), t.actions.setDropTarget(o?.id).then(() => {
405
- r.enable();
640
+ var h;
641
+ o?.id !== ((h = t.dragOperation.target) == null ? void 0 : h.id) && (i.disable(), t.actions.setDropTarget(o?.id).then(() => {
642
+ i.enable();
406
643
  }));
407
644
  });
408
645
  }
409
646
  );
410
647
  }
411
- }, Ne = /* @__PURE__ */ ((t) => (t[t.Lowest = 0] = "Lowest", t[t.Low = 1] = "Low", t[t.Normal = 2] = "Normal", t[t.High = 3] = "High", t[t.Highest = 4] = "Highest", t))(Ne || {}), Ue = /* @__PURE__ */ ((t) => (t[t.Collision = 0] = "Collision", t[t.ShapeIntersection = 1] = "ShapeIntersection", t[t.PointerIntersection = 2] = "PointerIntersection", t))(Ue || {}), Qt, Xt, Yt, Zt, te, ee, se, W, gt;
412
- se = [_], ee = [b], te = [b], Zt = [b], Yt = [b], Xt = [b], Qt = [b];
648
+ }, $e = /* @__PURE__ */ ((t) => (t[t.Lowest = 0] = "Lowest", t[t.Low = 1] = "Low", t[t.Normal = 2] = "Normal", t[t.High = 3] = "High", t[t.Highest = 4] = "Highest", t))($e || {}), Ge = /* @__PURE__ */ ((t) => (t[t.Collision = 0] = "Collision", t[t.ShapeIntersection = 1] = "ShapeIntersection", t[t.PointerIntersection = 2] = "PointerIntersection", t))(Ge || {}), ve, _e, ye, me, we, be, De, E, At;
649
+ De = [y], be = [b], we = [b], me = [b], ye = [b], _e = [b], ve = [b];
413
650
  var z = class {
414
651
  constructor() {
415
- a(W, 5, this), d(this, gt, a(
416
- W,
652
+ c(E, 5, this), p(this, At, c(
653
+ E,
417
654
  8,
418
655
  this,
419
656
  "idle"
420
657
  /* Idle */
421
- )), a(W, 11, this);
658
+ )), c(E, 11, this);
422
659
  }
423
660
  get current() {
424
661
  return this.value;
@@ -448,17 +685,17 @@ var z = class {
448
685
  this.value = t;
449
686
  }
450
687
  };
451
- W = N(null);
452
- gt = /* @__PURE__ */ new WeakMap();
453
- l(W, 4, "value", se, z, gt);
454
- l(W, 2, "current", ee, z);
455
- l(W, 2, "idle", te, z);
456
- l(W, 2, "initializing", Zt, z);
457
- l(W, 2, "initialized", Yt, z);
458
- l(W, 2, "dragging", Xt, z);
459
- l(W, 2, "dropped", Qt, z);
460
- F(W, z);
461
- var Te = class {
688
+ E = T(null);
689
+ At = /* @__PURE__ */ new WeakMap();
690
+ u(E, 4, "value", De, z, At);
691
+ u(E, 2, "current", be, z);
692
+ u(E, 2, "idle", we, z);
693
+ u(E, 2, "initializing", me, z);
694
+ u(E, 2, "initialized", ye, z);
695
+ u(E, 2, "dragging", _e, z);
696
+ u(E, 2, "dropped", ve, z);
697
+ V(E, z);
698
+ var Ke = class {
462
699
  /**
463
700
  * Creates a new instance of drag actions.
464
701
  *
@@ -488,10 +725,10 @@ var Te = class {
488
725
  if (e.targetIdentifier === s)
489
726
  return Promise.resolve(!1);
490
727
  e.targetIdentifier = s;
491
- const r = Z({
728
+ const i = et({
492
729
  operation: e.snapshot()
493
730
  });
494
- return e.status.dragging && this.manager.monitor.dispatch("dragover", r), this.manager.renderer.rendering.then(() => r.defaultPrevented);
731
+ return e.status.dragging && this.manager.monitor.dispatch("dragover", i), this.manager.renderer.rendering.then(() => i.defaultPrevented);
495
732
  });
496
733
  }
497
734
  /**
@@ -513,31 +750,33 @@ var Te = class {
513
750
  throw new Error(
514
751
  "Cannot start a drag operation while another is active"
515
752
  );
516
- const r = new AbortController(), { event: i, coordinates: n } = t;
517
- Rt(() => {
753
+ const i = new AbortController(), { event: r, coordinates: n } = t;
754
+ rt(() => {
518
755
  e.status.set(
519
756
  "initialization-pending"
520
757
  /* InitializationPending */
521
- ), e.shape = null, e.canceled = !1, e.activatorEvent = i ?? null, e.position.reset(n);
758
+ ), e.shape = null, e.canceled = !1, e.activatorEvent = r ?? null, e.position.reset(n);
522
759
  });
523
- const u = Z({
760
+ const l = et({
524
761
  operation: e.snapshot()
525
762
  });
526
- return this.manager.monitor.dispatch("beforedragstart", u), u.defaultPrevented ? (e.reset(), r.abort(), r) : (e.status.set(
763
+ return this.manager.monitor.dispatch("beforedragstart", l), l.defaultPrevented ? (e.reset(), i.abort(), i) : (e.status.set(
527
764
  "initializing"
528
765
  /* Initializing */
529
- ), e.controller = r, this.manager.renderer.rendering.then(() => {
530
- if (r.signal.aborted) return;
766
+ ), e.controller = i, this.manager.renderer.rendering.then(() => {
767
+ if (i.signal.aborted) return;
531
768
  const { status: o } = e;
532
- o.current === "initializing" && (e.status.set(
533
- "dragging"
534
- /* Dragging */
535
- ), this.manager.monitor.dispatch("dragstart", {
536
- nativeEvent: i,
537
- operation: e.snapshot(),
538
- cancelable: !1
539
- }));
540
- }), r);
769
+ o.current === "initializing" && rt(() => {
770
+ e.status.set(
771
+ "dragging"
772
+ /* Dragging */
773
+ ), this.manager.monitor.dispatch("dragstart", {
774
+ nativeEvent: r,
775
+ operation: e.snapshot(),
776
+ cancelable: !1
777
+ });
778
+ });
779
+ }), i);
541
780
  });
542
781
  }
543
782
  /**
@@ -553,27 +792,27 @@ var Te = class {
553
792
  move(t) {
554
793
  return k(() => {
555
794
  var e, s;
556
- const { dragOperation: r } = this.manager, { status: i, controller: n } = r;
557
- if (!i.dragging || !n || n.signal.aborted)
795
+ const { dragOperation: i } = this.manager, { status: r, controller: n } = i;
796
+ if (!r.dragging || !n || n.signal.aborted)
558
797
  return;
559
- const u = Z(
798
+ const l = et(
560
799
  {
561
800
  nativeEvent: t.event,
562
- operation: r.snapshot(),
801
+ operation: i.snapshot(),
563
802
  by: t.by,
564
803
  to: t.to
565
804
  },
566
805
  (e = t.cancelable) != null ? e : !0
567
806
  );
568
- ((s = t.propagate) == null || s) && this.manager.monitor.dispatch("dragmove", u), queueMicrotask(() => {
569
- var o, p, h, g, c;
570
- if (u.defaultPrevented)
807
+ ((s = t.propagate) == null || s) && this.manager.monitor.dispatch("dragmove", l), queueMicrotask(() => {
808
+ var o, h, d, g, a;
809
+ if (l.defaultPrevented)
571
810
  return;
572
- const P = (c = t.to) != null ? c : {
573
- x: r.position.current.x + ((p = (o = t.by) == null ? void 0 : o.x) != null ? p : 0),
574
- y: r.position.current.y + ((g = (h = t.by) == null ? void 0 : h.y) != null ? g : 0)
811
+ const D = (a = t.to) != null ? a : {
812
+ x: i.position.current.x + ((h = (o = t.by) == null ? void 0 : o.x) != null ? h : 0),
813
+ y: i.position.current.y + ((g = (d = t.by) == null ? void 0 : d.y) != null ? g : 0)
575
814
  };
576
- r.position.current = P;
815
+ i.position.current = D;
577
816
  });
578
817
  });
579
818
  }
@@ -592,231 +831,52 @@ var Te = class {
592
831
  stop(t = {}) {
593
832
  return k(() => {
594
833
  var e, s;
595
- const { dragOperation: r } = this.manager, { controller: i } = r;
596
- if (!i || i.signal.aborted) return;
834
+ const { dragOperation: i } = this.manager, { controller: r } = i;
835
+ if (!r || r.signal.aborted) return;
597
836
  let n;
598
- const u = () => {
599
- const p = {
837
+ const l = () => {
838
+ const h = {
600
839
  resume: () => {
601
840
  },
602
841
  abort: () => {
603
842
  }
604
843
  };
605
- return n = new Promise((h, g) => {
606
- p.resume = h, p.abort = g;
607
- }), p;
844
+ return n = new Promise((d, g) => {
845
+ h.resume = d, h.abort = g;
846
+ }), h;
608
847
  };
609
- i.abort();
848
+ r.abort();
610
849
  const o = () => {
611
850
  this.manager.renderer.rendering.then(() => {
612
- r.status.set(
851
+ i.status.set(
613
852
  "dropped"
614
853
  /* Dropped */
615
854
  );
616
- const p = k(
855
+ const h = k(
617
856
  () => {
618
857
  var g;
619
- return ((g = r.source) == null ? void 0 : g.status) === "dropping";
858
+ return ((g = i.source) == null ? void 0 : g.status) === "dropping";
620
859
  }
621
- ), h = () => {
622
- r.controller === i && (r.controller = void 0), r.reset();
860
+ ), d = () => {
861
+ i.controller === r && (i.controller = void 0), i.reset();
623
862
  };
624
- if (p) {
625
- const { source: g } = r, c = Lt(() => {
626
- g?.status === "idle" && (c(), h());
863
+ if (h) {
864
+ const { source: g } = i, a = Tt(() => {
865
+ g?.status === "idle" && (a(), d());
627
866
  });
628
867
  } else
629
- this.manager.renderer.rendering.then(h);
868
+ this.manager.renderer.rendering.then(d);
630
869
  });
631
870
  };
632
- r.canceled = (e = t.canceled) != null ? e : !1, this.manager.monitor.dispatch("dragend", {
871
+ i.canceled = (e = t.canceled) != null ? e : !1, this.manager.monitor.dispatch("dragend", {
633
872
  nativeEvent: t.event,
634
- operation: r.snapshot(),
873
+ operation: i.snapshot(),
635
874
  canceled: (s = t.canceled) != null ? s : !1,
636
- suspend: u
637
- }), n ? n.then(o).catch(() => r.reset()) : o();
875
+ suspend: l
876
+ }), n ? n.then(o).catch(() => i.reset()) : o();
638
877
  });
639
878
  }
640
- }, re, ie, ne, ae, w, ft, vt, _t, mt;
641
- ae = [_], ne = [_], ie = [_], re = [_];
642
- var A = class {
643
- /**
644
- * Creates a new instance of the `Entity` class.
645
- *
646
- * @param input - An object containing the initial properties of the entity.
647
- * @param manager - The manager that controls the drag and drop operations.
648
- */
649
- constructor(t, e) {
650
- d(this, ft, a(w, 8, this)), a(w, 11, this), d(this, vt, a(w, 12, this)), a(w, 15, this), d(this, _t, a(w, 16, this)), a(w, 19, this), d(this, mt, a(w, 20, this)), a(w, 23, this);
651
- const { effects: s, id: r, data: i = {}, disabled: n = !1, register: u = !0 } = t;
652
- let o = r;
653
- this.manager = e, this.id = r, this.data = i, this.disabled = n, this.effects = () => {
654
- var p;
655
- return [
656
- () => {
657
- const { id: h, manager: g } = this;
658
- if (h !== o)
659
- return g?.registry.register(this), () => g?.registry.unregister(this);
660
- },
661
- ...(p = s?.()) != null ? p : []
662
- ];
663
- }, this.register = this.register.bind(this), this.unregister = this.unregister.bind(this), this.destroy = this.destroy.bind(this), e && u && queueMicrotask(this.register);
664
- }
665
- /**
666
- * A method that registers the entity with the manager.
667
- * @returns CleanupFunction | void
668
- */
669
- register() {
670
- var t;
671
- return (t = this.manager) == null ? void 0 : t.registry.register(this);
672
- }
673
- /**
674
- * A method that unregisters the entity from the manager.
675
- * @returns void
676
- */
677
- unregister() {
678
- var t;
679
- (t = this.manager) == null || t.registry.unregister(this);
680
- }
681
- /**
682
- * A method that cleans up the entity when it is no longer needed.
683
- * @returns void
684
- */
685
- destroy() {
686
- var t;
687
- (t = this.manager) == null || t.registry.unregister(this);
688
- }
689
- };
690
- w = N(null);
691
- ft = /* @__PURE__ */ new WeakMap();
692
- vt = /* @__PURE__ */ new WeakMap();
693
- _t = /* @__PURE__ */ new WeakMap();
694
- mt = /* @__PURE__ */ new WeakMap();
695
- l(w, 4, "manager", ae, A, ft);
696
- l(w, 4, "id", ne, A, vt);
697
- l(w, 4, "data", ie, A, _t);
698
- l(w, 4, "disabled", re, A, mt);
699
- F(w, A);
700
- var Ct = class {
701
- constructor() {
702
- this.map = jt(/* @__PURE__ */ new Map()), this.cleanupFunctions = /* @__PURE__ */ new WeakMap(), this.register = (t, e) => {
703
- const s = this.map.peek(), r = s.get(t), i = () => this.unregister(t, e);
704
- if (r === e) return i;
705
- if (r) {
706
- const o = this.cleanupFunctions.get(r);
707
- o?.(), this.cleanupFunctions.delete(r);
708
- }
709
- const n = new Map(s);
710
- n.set(t, e), this.map.value = n;
711
- const u = rt(...e.effects());
712
- return this.cleanupFunctions.set(e, u), i;
713
- }, this.unregister = (t, e) => {
714
- const s = this.map.peek();
715
- if (s.get(t) !== e)
716
- return;
717
- const r = this.cleanupFunctions.get(e);
718
- r?.(), this.cleanupFunctions.delete(e);
719
- const i = new Map(s);
720
- i.delete(t), this.map.value = i;
721
- };
722
- }
723
- /**
724
- * Iterator for the EntityRegistry class.
725
- * @returns An iterator for the values in the map.
726
- */
727
- [Symbol.iterator]() {
728
- return this.map.peek().values();
729
- }
730
- get value() {
731
- return this.map.value.values();
732
- }
733
- /**
734
- * Checks if a entity with the given identifier exists in the registry.
735
- * @param identifier - The unique identifier of the entity.
736
- * @returns True if the entity exists, false otherwise.
737
- */
738
- has(t) {
739
- return this.map.value.has(t);
740
- }
741
- /**
742
- * Retrieves a entity from the registry using its identifier.
743
- * @param identifier - The unique identifier of the entity.
744
- * @returns The entity if it exists, undefined otherwise.
745
- */
746
- get(t) {
747
- return this.map.value.get(t);
748
- }
749
- /**
750
- * Destroys all entries in the registry and clears the registry.
751
- */
752
- destroy() {
753
- for (const t of this) {
754
- const e = this.cleanupFunctions.get(t);
755
- e?.(), t.destroy();
756
- }
757
- this.map.value = /* @__PURE__ */ new Map();
758
- }
759
- }, oe, ce, le, ue, de, he, lt, y, yt, wt, bt, S = class extends (lt = A, he = [_], de = [_], ue = [_], le = [b], ce = [b], oe = [b], lt) {
760
- constructor(e, s) {
761
- var r = e, { modifiers: i, type: n, sensors: u } = r, o = Tt(r, ["modifiers", "type", "sensors"]);
762
- super(o, s), a(y, 5, this), d(this, yt, a(y, 8, this)), a(y, 11, this), d(this, wt, a(y, 12, this)), a(y, 15, this), d(this, bt, a(y, 16, this, this.isDragSource ? "dragging" : "idle")), a(y, 19, this), this.type = n, this.sensors = u, this.modifiers = i, this.alignment = o.alignment;
763
- }
764
- get isDropping() {
765
- return this.status === "dropping" && this.isDragSource;
766
- }
767
- get isDragging() {
768
- return this.status === "dragging" && this.isDragSource;
769
- }
770
- get isDragSource() {
771
- var e, s;
772
- return ((s = (e = this.manager) == null ? void 0 : e.dragOperation.source) == null ? void 0 : s.id) === this.id;
773
- }
774
- };
775
- y = N(lt);
776
- yt = /* @__PURE__ */ new WeakMap();
777
- wt = /* @__PURE__ */ new WeakMap();
778
- bt = /* @__PURE__ */ new WeakMap();
779
- l(y, 4, "type", he, S, yt);
780
- l(y, 4, "modifiers", de, S, wt);
781
- l(y, 4, "status", ue, S, bt);
782
- l(y, 2, "isDropping", le, S);
783
- l(y, 2, "isDragging", ce, S);
784
- l(y, 2, "isDragSource", oe, S);
785
- F(y, S);
786
- var pe, ge, fe, ve, _e, me, ut, v, Dt, Mt, Ot, kt, Et, x = class extends (ut = A, me = [_], _e = [_], ve = [_], fe = [_], ge = [_], pe = [b], ut) {
787
- constructor(e, s) {
788
- var r = e, { accept: i, collisionDetector: n, collisionPriority: u, type: o } = r, p = Tt(r, ["accept", "collisionDetector", "collisionPriority", "type"]);
789
- super(p, s), a(v, 5, this), d(this, Dt, a(v, 8, this)), a(v, 11, this), d(this, Mt, a(v, 12, this)), a(v, 15, this), d(this, Ot, a(v, 16, this)), a(v, 19, this), d(this, kt, a(v, 20, this)), a(v, 23, this), d(this, Et, a(v, 24, this)), a(v, 27, this), this.accept = i, this.collisionDetector = n, this.collisionPriority = u, this.type = o;
790
- }
791
- /**
792
- * Checks whether or not the droppable accepts a given draggable.
793
- *
794
- * @param draggable - The draggable to check
795
- * @returns true if the draggable can be dropped here
796
- */
797
- accepts(e) {
798
- const { accept: s } = this;
799
- return s ? typeof s == "function" ? s(e) : e.type ? Array.isArray(s) ? s.includes(e.type) : e.type === s : !1 : !0;
800
- }
801
- get isDropTarget() {
802
- var e, s;
803
- return ((s = (e = this.manager) == null ? void 0 : e.dragOperation.target) == null ? void 0 : s.id) === this.id;
804
- }
805
- };
806
- v = N(ut);
807
- Dt = /* @__PURE__ */ new WeakMap();
808
- Mt = /* @__PURE__ */ new WeakMap();
809
- Ot = /* @__PURE__ */ new WeakMap();
810
- kt = /* @__PURE__ */ new WeakMap();
811
- Et = /* @__PURE__ */ new WeakMap();
812
- l(v, 4, "accept", me, x, Dt);
813
- l(v, 4, "type", _e, x, Mt);
814
- l(v, 4, "collisionDetector", ve, x, Ot);
815
- l(v, 4, "collisionPriority", fe, x, kt);
816
- l(v, 4, "shape", ge, x, Et);
817
- l(v, 2, "isDropTarget", pe, x);
818
- F(v, x);
819
- var At = class extends C {
879
+ }, Nt = class extends F {
820
880
  /**
821
881
  * Creates a new sensor instance.
822
882
  *
@@ -826,7 +886,7 @@ var At = class extends C {
826
886
  constructor(t, e) {
827
887
  super(t, e), this.manager = t, this.options = e;
828
888
  }
829
- }, Ze = class extends AbortController {
889
+ }, ss = class extends AbortController {
830
890
  constructor(t, e) {
831
891
  super(), this.constraints = t, this.onActivate = e, this.activated = !1;
832
892
  for (const s of t ?? [])
@@ -847,23 +907,23 @@ var At = class extends C {
847
907
  abort(t) {
848
908
  this.activated = !1, super.abort(t);
849
909
  }
850
- }, tt, ts = class {
910
+ }, st, is = class {
851
911
  constructor(t) {
852
- this.options = t, d(this, tt);
912
+ this.options = t, p(this, st);
853
913
  }
854
914
  set controller(t) {
855
- E(this, tt, t), t.signal.addEventListener("abort", () => this.abort());
915
+ I(this, st, t), t.signal.addEventListener("abort", () => this.abort());
856
916
  }
857
917
  /**
858
918
  * Called when the activation is triggered.
859
919
  */
860
920
  activate(t) {
861
921
  var e;
862
- (e = m(this, tt)) == null || e.activate(t);
922
+ (e = v(this, st)) == null || e.activate(t);
863
923
  }
864
924
  };
865
- tt = /* @__PURE__ */ new WeakMap();
866
- var Ft = class extends C {
925
+ st = /* @__PURE__ */ new WeakMap();
926
+ var Ut = class extends F {
867
927
  /**
868
928
  * Creates a new modifier instance.
869
929
  *
@@ -886,37 +946,37 @@ var Ft = class extends C {
886
946
  apply(t) {
887
947
  return t.transform;
888
948
  }
889
- }, $e = class {
949
+ }, Be = class {
890
950
  /**
891
951
  * Creates a new registry instance.
892
952
  *
893
953
  * @param manager - The drag and drop manager that owns this registry
894
954
  */
895
955
  constructor(t) {
896
- this.draggables = new Ct(), this.droppables = new Ct(), this.plugins = new at(t), this.sensors = new at(t), this.modifiers = new at(t);
956
+ this.draggables = new Rt(), this.droppables = new Rt(), this.plugins = new dt(t), this.sensors = new dt(t), this.modifiers = new dt(t);
897
957
  }
898
958
  register(t, e) {
899
- if (t instanceof S)
959
+ if (t instanceof C)
900
960
  return this.draggables.register(t.id, t);
901
961
  if (t instanceof x)
902
962
  return this.droppables.register(t.id, t);
903
- if (t.prototype instanceof Ft)
963
+ if (t.prototype instanceof Ut)
904
964
  return this.modifiers.register(t, e);
905
- if (t.prototype instanceof At)
965
+ if (t.prototype instanceof Nt)
906
966
  return this.sensors.register(t, e);
907
- if (t.prototype instanceof C)
967
+ if (t.prototype instanceof F)
908
968
  return this.plugins.register(t, e);
909
969
  throw new Error("Invalid instance type");
910
970
  }
911
971
  unregister(t) {
912
- if (t instanceof A)
913
- return t instanceof S ? this.draggables.unregister(t.id, t) : t instanceof x ? this.droppables.unregister(t.id, t) : () => {
972
+ if (t instanceof ct)
973
+ return t instanceof C ? this.draggables.unregister(t.id, t) : t instanceof x ? this.droppables.unregister(t.id, t) : () => {
914
974
  };
915
- if (t.prototype instanceof Ft)
975
+ if (t.prototype instanceof Ut)
916
976
  return this.modifiers.unregister(t);
917
- if (t.prototype instanceof At)
977
+ if (t.prototype instanceof Nt)
918
978
  return this.sensors.unregister(t);
919
- if (t.prototype instanceof C)
979
+ if (t.prototype instanceof F)
920
980
  return this.plugins.unregister(t);
921
981
  throw new Error("Invalid instance type");
922
982
  }
@@ -932,22 +992,22 @@ var Ft = class extends C {
932
992
  destroy() {
933
993
  this.draggables.destroy(), this.droppables.destroy(), this.plugins.destroy(), this.sensors.destroy(), this.modifiers.destroy();
934
994
  }
935
- }, ye, we, be, De, Me, Oe, ke, Ee, We, G, et, V, f, Wt, It, Pt, St, xt, B;
936
- We = [b], Ee = [_], ke = [_], Oe = [_], Me = [_], De = [_], be = [b], we = [b], ye = [b];
937
- var I = class {
995
+ }, Me, Oe, Ie, ke, Ee, Se, We, Pe, Ce, B, it, R, f, Ft, Lt, Vt, jt, qt, J;
996
+ Ce = [b], Pe = [y], We = [y], Se = [y], Ee = [y], ke = [y], Ie = [b], Oe = [b], Me = [b];
997
+ var W = class {
938
998
  /**
939
999
  * Creates a new drag operation instance.
940
1000
  *
941
1001
  * @param manager - The drag and drop manager that owns this operation
942
1002
  */
943
1003
  constructor(t) {
944
- a(f, 5, this), d(this, G), d(this, et), d(this, V, new Ie(
1004
+ c(f, 5, this), p(this, B), p(this, it), p(this, R, new xe(
945
1005
  void 0,
946
1006
  (e, s) => e && s ? e.equals(s) : e === s
947
- )), this.status = new z(), d(this, Wt, a(f, 8, this, !1)), a(f, 11, this), d(this, It, a(f, 12, this, null)), a(f, 15, this), d(this, Pt, a(f, 16, this, null)), a(f, 19, this), d(this, St, a(f, 20, this, null)), a(f, 23, this), d(this, xt, a(f, 24, this, [])), a(f, 27, this), this.position = new Pe({ x: 0, y: 0 }), d(this, B, { x: 0, y: 0 }), E(this, G, t);
1007
+ )), this.status = new z(), p(this, Ft, c(f, 8, this, !1)), c(f, 11, this), p(this, Lt, c(f, 12, this, null)), c(f, 15, this), p(this, Vt, c(f, 16, this, null)), c(f, 19, this), p(this, jt, c(f, 20, this, null)), c(f, 23, this), p(this, qt, c(f, 24, this, [])), c(f, 27, this), this.position = new ze({ x: 0, y: 0 }), p(this, J, { x: 0, y: 0 }), I(this, B, t);
948
1008
  }
949
1009
  get shape() {
950
- const { current: t, initial: e, previous: s } = m(this, V);
1010
+ const { current: t, initial: e, previous: s } = v(this, R);
951
1011
  return !t || !e ? null : { current: t, initial: e, previous: s };
952
1012
  }
953
1013
  /**
@@ -956,28 +1016,28 @@ var I = class {
956
1016
  * @param value - The new shape or null to reset
957
1017
  */
958
1018
  set shape(t) {
959
- t ? m(this, V).current = t : m(this, V).reset();
1019
+ t ? v(this, R).current = t : v(this, R).reset();
960
1020
  }
961
1021
  get source() {
962
1022
  var t;
963
1023
  const e = this.sourceIdentifier;
964
1024
  if (e == null) return null;
965
- const s = m(this, G).registry.draggables.get(e);
966
- return s && E(this, et, s), (t = s ?? m(this, et)) != null ? t : null;
1025
+ const s = v(this, B).registry.draggables.get(e);
1026
+ return s && I(this, it, s), (t = s ?? v(this, it)) != null ? t : null;
967
1027
  }
968
1028
  get target() {
969
1029
  var t;
970
1030
  const e = this.targetIdentifier;
971
- return e != null && (t = m(this, G).registry.droppables.get(e)) != null ? t : null;
1031
+ return e != null && (t = v(this, B).registry.droppables.get(e)) != null ? t : null;
972
1032
  }
973
1033
  get transform() {
974
1034
  const { x: t, y: e } = this.position.delta;
975
1035
  let s = { x: t, y: e };
976
- for (const r of this.modifiers)
977
- s = r.apply(Ut(Nt({}, this.snapshot()), {
1036
+ for (const i of this.modifiers)
1037
+ s = i.apply(mt(yt({}, this.snapshot()), {
978
1038
  transform: s
979
1039
  }));
980
- return E(this, B, s), s;
1040
+ return I(this, J, s), s;
981
1041
  }
982
1042
  /**
983
1043
  * Creates a snapshot of the current drag operation state.
@@ -989,10 +1049,10 @@ var I = class {
989
1049
  source: this.source,
990
1050
  target: this.target,
991
1051
  activatorEvent: this.activatorEvent,
992
- transform: m(this, B),
993
- shape: this.shape ? nt(this.shape) : null,
994
- position: nt(this.position),
995
- status: nt(this.status),
1052
+ transform: v(this, J),
1053
+ shape: this.shape ? ut(this.shape) : null,
1054
+ position: ut(this.position),
1055
+ status: ut(this.status),
996
1056
  canceled: this.canceled
997
1057
  }));
998
1058
  }
@@ -1008,43 +1068,43 @@ var I = class {
1008
1068
  * - Clears modifiers
1009
1069
  */
1010
1070
  reset() {
1011
- Rt(() => {
1071
+ rt(() => {
1012
1072
  this.status.set(
1013
1073
  "idle"
1014
1074
  /* Idle */
1015
- ), this.sourceIdentifier = null, this.targetIdentifier = null, m(this, V).reset(), this.position.reset({ x: 0, y: 0 }), E(this, B, { x: 0, y: 0 }), this.modifiers = [];
1075
+ ), this.sourceIdentifier = null, this.targetIdentifier = null, v(this, R).reset(), this.position.reset({ x: 0, y: 0 }), I(this, J, { x: 0, y: 0 }), this.modifiers = [];
1016
1076
  });
1017
1077
  }
1018
1078
  };
1019
- f = N(null);
1020
- G = /* @__PURE__ */ new WeakMap();
1021
- et = /* @__PURE__ */ new WeakMap();
1022
- V = /* @__PURE__ */ new WeakMap();
1023
- Wt = /* @__PURE__ */ new WeakMap();
1024
- It = /* @__PURE__ */ new WeakMap();
1025
- Pt = /* @__PURE__ */ new WeakMap();
1026
- St = /* @__PURE__ */ new WeakMap();
1027
- xt = /* @__PURE__ */ new WeakMap();
1079
+ f = T(null);
1028
1080
  B = /* @__PURE__ */ new WeakMap();
1029
- l(f, 2, "shape", We, I);
1030
- l(f, 4, "canceled", Ee, I, Wt);
1031
- l(f, 4, "activatorEvent", ke, I, It);
1032
- l(f, 4, "sourceIdentifier", Oe, I, Pt);
1033
- l(f, 4, "targetIdentifier", Me, I, St);
1034
- l(f, 4, "modifiers", De, I, xt);
1035
- l(f, 2, "source", be, I);
1036
- l(f, 2, "target", we, I);
1037
- l(f, 2, "transform", ye, I);
1038
- F(f, I);
1039
- var Ge = {
1081
+ it = /* @__PURE__ */ new WeakMap();
1082
+ R = /* @__PURE__ */ new WeakMap();
1083
+ Ft = /* @__PURE__ */ new WeakMap();
1084
+ Lt = /* @__PURE__ */ new WeakMap();
1085
+ Vt = /* @__PURE__ */ new WeakMap();
1086
+ jt = /* @__PURE__ */ new WeakMap();
1087
+ qt = /* @__PURE__ */ new WeakMap();
1088
+ J = /* @__PURE__ */ new WeakMap();
1089
+ u(f, 2, "shape", Ce, W);
1090
+ u(f, 4, "canceled", Pe, W, Ft);
1091
+ u(f, 4, "activatorEvent", We, W, Lt);
1092
+ u(f, 4, "sourceIdentifier", Se, W, Vt);
1093
+ u(f, 4, "targetIdentifier", Ee, W, jt);
1094
+ u(f, 4, "modifiers", ke, W, qt);
1095
+ u(f, 2, "source", Ie, W);
1096
+ u(f, 2, "target", Oe, W);
1097
+ u(f, 2, "transform", Me, W);
1098
+ V(f, W);
1099
+ var Je = {
1040
1100
  get rendering() {
1041
1101
  return Promise.resolve();
1042
1102
  }
1043
1103
  };
1044
- function ot(t, e) {
1104
+ function ht(t, e) {
1045
1105
  return typeof t == "function" ? t(e) : t ?? e;
1046
1106
  }
1047
- var es = class {
1107
+ var rs = class {
1048
1108
  /**
1049
1109
  * Creates a new drag and drop manager instance.
1050
1110
  *
@@ -1052,23 +1112,23 @@ var es = class {
1052
1112
  */
1053
1113
  constructor(e) {
1054
1114
  this.destroy = () => {
1055
- this.dragOperation.status.idle || this.actions.stop({ canceled: !0 }), this.dragOperation.modifiers.forEach((P) => P.destroy()), this.registry.destroy(), this.collisionObserver.destroy();
1115
+ this.dragOperation.status.idle || this.actions.stop({ canceled: !0 }), this.dragOperation.modifiers.forEach((D) => D.destroy()), this.registry.destroy(), this.collisionObserver.destroy();
1056
1116
  };
1057
1117
  var s;
1058
- const r = e ?? {}, i = ot(r.plugins, []), n = ot(r.sensors, []), u = ot(r.modifiers, []), o = (s = r.renderer) != null ? s : Ge, p = new Ve(this), h = new $e(this);
1059
- this.registry = h, this.monitor = p, this.renderer = o, this.actions = new Te(this), this.dragOperation = new I(this), this.collisionObserver = new je(this), this.plugins = [qe, ...i], this.modifiers = u, this.sensors = n;
1060
- const { destroy: g } = this, c = rt(() => {
1061
- var P, D, L;
1062
- const K = k(() => this.dragOperation.modifiers), U = this.modifiers;
1063
- for (const R of K)
1064
- U.includes(R) || R.destroy();
1065
- this.dragOperation.modifiers = (L = (D = (P = this.dragOperation.source) == null ? void 0 : P.modifiers) == null ? void 0 : D.map((R) => {
1066
- const { plugin: M, options: T } = Bt(R);
1067
- return new M(this, T);
1068
- })) != null ? L : U;
1118
+ const i = e ?? {}, r = ht(i.plugins, []), n = ht(i.sensors, []), l = ht(i.modifiers, []), o = (s = i.renderer) != null ? s : Je, h = new Ue(this), d = new Be(this);
1119
+ this.registry = d, this.monitor = h, this.renderer = o, this.actions = new Ke(this), this.dragOperation = new W(this), this.collisionObserver = new Re(this), this.plugins = [Te, ...r], this.modifiers = l, this.sensors = n;
1120
+ const { destroy: g } = this, a = ot(() => {
1121
+ var D, m, A;
1122
+ const X = k(() => this.dragOperation.modifiers), $ = this.modifiers;
1123
+ for (const j of X)
1124
+ $.includes(j) || j.destroy();
1125
+ this.dragOperation.modifiers = (A = (m = (D = this.dragOperation.source) == null ? void 0 : D.modifiers) == null ? void 0 : m.map((j) => {
1126
+ const { plugin: M, options: G } = at(j);
1127
+ return new M(this, G);
1128
+ })) != null ? A : $;
1069
1129
  });
1070
1130
  this.destroy = () => {
1071
- c(), g();
1131
+ a(), g();
1072
1132
  };
1073
1133
  }
1074
1134
  /**
@@ -1121,22 +1181,22 @@ var es = class {
1121
1181
  }
1122
1182
  };
1123
1183
  export {
1124
- ts as ActivationConstraint,
1125
- Ze as ActivationController,
1126
- Ne as CollisionPriority,
1127
- Ue as CollisionType,
1128
- Kt as CorePlugin,
1129
- es as DragDropManager,
1184
+ is as ActivationConstraint,
1185
+ ss as ActivationController,
1186
+ $e as CollisionPriority,
1187
+ Ge as CollisionType,
1188
+ Zt as CorePlugin,
1189
+ rs as DragDropManager,
1130
1190
  z as DragOperationStatus,
1131
- S as Draggable,
1191
+ C as Draggable,
1132
1192
  x as Droppable,
1133
- Ft as Modifier,
1134
- C as Plugin,
1135
- at as PluginRegistry,
1136
- At as Sensor,
1137
- Qe as configurator,
1138
- Gt as configure,
1139
- Bt as descriptor,
1140
- ot as resolveCustomizable,
1141
- Re as sortCollisions
1193
+ Ut as Modifier,
1194
+ F as Plugin,
1195
+ dt as PluginRegistry,
1196
+ Nt as Sensor,
1197
+ Ze as configurator,
1198
+ Xt as configure,
1199
+ at as descriptor,
1200
+ ht as resolveCustomizable,
1201
+ He as sortCollisions
1142
1202
  };