use-abcd 1.6.4 → 1.6.6

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useMemo as le, useSyncExternalStore as v, useCallback as g } from "react";
2
- import { b as oe, c as G, d as mt, e as fe, f as Je, h as he, j as Ye, S as ze, i as W, k as Ge, l as St, n as Xe, o as gt, p as V, q as wt, r as vt, s as Ct, t as Mt, u as xt, v as Ze, w as Ot, x as ke, y as Pt, z as Rt, A as Et, B as de, C as It, D as Nt, E as zt, F as At, a as z, m as K, g as be } from "./chunks/utils-C2wXstxP.js";
2
+ import { b as oe, c as G, d as mt, e as fe, f as Je, h as he, j as Ye, S as Ne, i as W, k as Ge, l as St, n as Xe, o as gt, p as V, q as wt, r as vt, s as Ct, t as Mt, u as xt, v as Ze, w as Ot, x as ke, y as Pt, z as Rt, A as Et, B as de, C as It, D as Nt, E as zt, F as At, a as z, m as K, g as ze } from "./chunks/utils-C2wXstxP.js";
3
3
  import { H as Ts, G as qs } from "./chunks/utils-C2wXstxP.js";
4
4
  import { c as $s } from "./chunks/client-lHRDCo64.js";
5
5
  const b = {
@@ -9,7 +9,7 @@ const b = {
9
9
  }, et = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), Ft = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), ee = Symbol.iterator, O = {
10
10
  mutable: "mutable",
11
11
  immutable: "immutable"
12
- }, xe = {};
12
+ }, Me = {};
13
13
  function Y(e, t) {
14
14
  return e instanceof Map ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
15
15
  }
@@ -24,10 +24,10 @@ function Ae(e, t) {
24
24
  }
25
25
  }
26
26
  }
27
- function Oe(e) {
27
+ function xe(e) {
28
28
  return Object.getPrototypeOf(e) === Set.prototype;
29
29
  }
30
- function Pe(e) {
30
+ function Oe(e) {
31
31
  return Object.getPrototypeOf(e) === Map.prototype;
32
32
  }
33
33
  function x(e) {
@@ -40,7 +40,7 @@ function T(e) {
40
40
  function h(e) {
41
41
  return typeof e != "object" ? null : e?.[et];
42
42
  }
43
- function Re(e) {
43
+ function Pe(e) {
44
44
  var t;
45
45
  const n = h(e);
46
46
  return n ? (t = n.copy) !== null && t !== void 0 ? t : n.original : e;
@@ -87,7 +87,7 @@ function pe(e, t) {
87
87
  function A(e, t) {
88
88
  return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
89
89
  }
90
- function me(e) {
90
+ function be(e) {
91
91
  if (e)
92
92
  for (; e.finalities.revoke.length > 0; )
93
93
  e.finalities.revoke.pop()();
@@ -128,13 +128,13 @@ function nt(e, t) {
128
128
  if (Array.isArray(e))
129
129
  return Array.prototype.concat.call(e);
130
130
  if (e instanceof Set) {
131
- if (!Oe(e)) {
131
+ if (!xe(e)) {
132
132
  const s = Object.getPrototypeOf(e).constructor;
133
133
  return new s(e.values());
134
134
  }
135
135
  return Set.prototype.difference ? Set.prototype.difference.call(e, /* @__PURE__ */ new Set()) : new Set(e.values());
136
136
  } else if (e instanceof Map) {
137
- if (!Pe(e)) {
137
+ if (!Oe(e)) {
138
138
  const s = Object.getPrototypeOf(e).constructor;
139
139
  return new s(e);
140
140
  }
@@ -163,7 +163,7 @@ function w(e) {
163
163
  }
164
164
  function J(e) {
165
165
  if (!R(e))
166
- return Re(e);
166
+ return Pe(e);
167
167
  if (Array.isArray(e))
168
168
  return e.map(J);
169
169
  if (e instanceof Map) {
@@ -171,7 +171,7 @@ function J(e) {
171
171
  s,
172
172
  J(i)
173
173
  ]);
174
- if (!Pe(e)) {
174
+ if (!Oe(e)) {
175
175
  const s = Object.getPrototypeOf(e).constructor;
176
176
  return new s(n);
177
177
  }
@@ -179,7 +179,7 @@ function J(e) {
179
179
  }
180
180
  if (e instanceof Set) {
181
181
  const n = Array.from(e).map(J);
182
- if (!Oe(e)) {
182
+ if (!xe(e)) {
183
183
  const s = Object.getPrototypeOf(e).constructor;
184
184
  return new s(n);
185
185
  }
@@ -246,7 +246,7 @@ function U(e, t, n, s, i) {
246
246
  }
247
247
  s.pop(), i.pop();
248
248
  }
249
- function Ee(e, t) {
249
+ function Re(e, t) {
250
250
  const n = $(e);
251
251
  if (n === 0)
252
252
  Reflect.ownKeys(e).forEach((s) => {
@@ -263,7 +263,7 @@ function st(e, t, n) {
263
263
  if (T(e) || !R(e, n) || t.has(e) || Object.isFrozen(e))
264
264
  return;
265
265
  const s = e instanceof Set, i = s ? /* @__PURE__ */ new Map() : void 0;
266
- if (t.add(e), Ee(e, (r, o) => {
266
+ if (t.add(e), Re(e, (r, o) => {
267
267
  var c;
268
268
  if (T(o)) {
269
269
  const a = h(o);
@@ -283,12 +283,12 @@ function qt(e, t) {
283
283
  const n = e.type === 3 ? e.setMap : e.copy;
284
284
  e.finalities.revoke.length > 1 && e.assignedMap.get(t) && n && st(F(n, t), e.finalities.handledSet, e.options);
285
285
  }
286
- function Se(e) {
286
+ function me(e) {
287
287
  e.type === 3 && e.copy && (e.copy.clear(), e.setMap.forEach((t) => {
288
- e.copy.add(Re(t));
288
+ e.copy.add(Pe(t));
289
289
  }));
290
290
  }
291
- function ge(e, t, n, s) {
291
+ function Se(e, t, n, s) {
292
292
  if (e.operated && e.assignedMap && e.assignedMap.size > 0 && !e.finalized) {
293
293
  if (n && s) {
294
294
  const r = tt(e);
@@ -297,14 +297,14 @@ function ge(e, t, n, s) {
297
297
  e.finalized = !0;
298
298
  }
299
299
  }
300
- function Ie(e, t, n, s) {
300
+ function Ee(e, t, n, s) {
301
301
  const i = h(n);
302
302
  i && (i.callbacks || (i.callbacks = []), i.callbacks.push((r, o) => {
303
303
  var c;
304
304
  const a = e.type === 3 ? e.setMap : e.copy;
305
305
  if (A(F(a, t), n)) {
306
306
  let u = i.original;
307
- i.copy && (u = i.copy), Se(e), ge(e, s, r, o), e.options.enableAutoFreeze && (e.options.updatedValues = (c = e.options.updatedValues) !== null && c !== void 0 ? c : /* @__PURE__ */ new WeakMap(), e.options.updatedValues.set(u, i.original)), Z(a, t, u);
307
+ i.copy && (u = i.copy), me(e), Se(e, s, r, o), e.options.enableAutoFreeze && (e.options.updatedValues = (c = e.options.updatedValues) !== null && c !== void 0 ? c : /* @__PURE__ */ new WeakMap(), e.options.updatedValues.set(u, i.original)), Z(a, t, u);
308
308
  }
309
309
  }), e.options.enableAutoFreeze && i.finalities !== e.finalities && (e.options.enableAutoFreeze = !1)), R(n, e.options) && e.finalities.draft.push(() => {
310
310
  const r = e.type === 3 ? e.setMap : e.copy;
@@ -413,7 +413,7 @@ function X(e, t, n, s) {
413
413
  const ce = (e, t, n = !1) => {
414
414
  if (typeof e == "object" && e !== null && (!R(e, t) || n))
415
415
  throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.");
416
- }, we = {
416
+ }, ge = {
417
417
  get size() {
418
418
  return x(h(this)).size;
419
419
  },
@@ -422,7 +422,7 @@ const ce = (e, t, n = !1) => {
422
422
  },
423
423
  set(e, t) {
424
424
  const n = h(this), s = x(n);
425
- return (!s.has(e) || !A(s.get(e), t)) && (w(n), E(n), n.assignedMap.set(e, !0), n.copy.set(e, t), Ie(n, e, t, X)), this;
425
+ return (!s.has(e) || !A(s.get(e), t)) && (w(n), E(n), n.assignedMap.set(e, !0), n.copy.set(e, t), Ee(n, e, t, X)), this;
426
426
  },
427
427
  delete(e) {
428
428
  if (!this.has(e))
@@ -450,7 +450,7 @@ const ce = (e, t, n = !1) => {
450
450
  const s = h(this), i = x(s).get(e), r = ((n = (t = s.options).mark) === null || n === void 0 ? void 0 : n.call(t, i, O)) === O.mutable;
451
451
  if (s.options.strict && ce(i, s.options, r), r || s.finalized || !R(i, s.options) || i !== s.original.get(e))
452
452
  return i;
453
- const o = xe.createDraft({
453
+ const o = Me.createDraft({
454
454
  original: i,
455
455
  parentDraft: s,
456
456
  key: e,
@@ -494,7 +494,7 @@ const ce = (e, t, n = !1) => {
494
494
  [ee]() {
495
495
  return this.entries();
496
496
  }
497
- }, Bt = Reflect.ownKeys(we), je = (e, t, { isValuesIterator: n }) => () => {
497
+ }, Bt = Reflect.ownKeys(ge), je = (e, t, { isValuesIterator: n }) => () => {
498
498
  var s, i;
499
499
  const r = t.next();
500
500
  if (r.done)
@@ -503,7 +503,7 @@ const ce = (e, t, n = !1) => {
503
503
  let c = e.setMap.get(o);
504
504
  const a = h(c), u = ((i = (s = e.options).mark) === null || i === void 0 ? void 0 : i.call(s, c, O)) === O.mutable;
505
505
  if (e.options.strict && ce(o, e.options, u), !u && !a && R(o, e.options) && !e.finalized && e.original.has(o)) {
506
- const l = xe.createDraft({
506
+ const l = Me.createDraft({
507
507
  original: o,
508
508
  parentDraft: e,
509
509
  key: o,
@@ -530,7 +530,7 @@ const ce = (e, t, n = !1) => {
530
530
  },
531
531
  add(e) {
532
532
  const t = h(this);
533
- return this.has(e) || (w(t), E(t), t.assignedMap.set(e, !0), t.setMap.set(e, e), Ie(t, e, e, X)), this;
533
+ return this.has(e) || (w(t), E(t), t.assignedMap.set(e, !0), t.setMap.set(e, e), Ee(t, e, e, X)), this;
534
534
  },
535
535
  delete(e) {
536
536
  if (!this.has(e))
@@ -621,7 +621,7 @@ const Ut = Reflect.ownKeys(ae), it = {
621
621
  }
622
622
  const c = x(e);
623
623
  if (c instanceof Map && Bt.includes(t))
624
- return t === "size" ? Object.getOwnPropertyDescriptor(we, "size").get.call(e.proxy) : we[t].bind(e.proxy);
624
+ return t === "size" ? Object.getOwnPropertyDescriptor(ge, "size").get.call(e.proxy) : ge[t].bind(e.proxy);
625
625
  if (c instanceof Set && Ut.includes(t))
626
626
  return t === "size" ? Object.getOwnPropertyDescriptor(ae, "size").get.call(e.proxy) : ae[t].bind(e.proxy);
627
627
  if (!Y(c, t)) {
@@ -635,7 +635,7 @@ const Ut = Reflect.ownKeys(ae), it = {
635
635
  if (e.options.strict && ce(a, e.options), e.finalized || !R(a, e.options))
636
636
  return a;
637
637
  if (a === pe(e.original, t)) {
638
- if (w(e), e.copy[t] = Ne({
638
+ if (w(e), e.copy[t] = Ie({
639
639
  original: e.original[t],
640
640
  parentDraft: e,
641
641
  key: e.type === 1 ? Number(t) : t,
@@ -660,7 +660,7 @@ const Ut = Reflect.ownKeys(ae), it = {
660
660
  if (r?.set)
661
661
  return r.set.call(e.proxy, n), !0;
662
662
  const o = pe(x(e), t), c = h(o);
663
- return c && A(c.original, n) ? (e.copy[t] = n, e.assignedMap = (s = e.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), e.assignedMap.set(t, !1), !0) : (A(n, o) && (n !== void 0 || Y(e.original, t)) || (w(e), E(e), Y(e.original, t) && A(n, e.original[t]) ? e.assignedMap.delete(t) : e.assignedMap.set(t, !0), e.copy[t] = n, Ie(e, t, n, X)), !0);
663
+ return c && A(c.original, n) ? (e.copy[t] = n, e.assignedMap = (s = e.assignedMap) !== null && s !== void 0 ? s : /* @__PURE__ */ new Map(), e.assignedMap.set(t, !1), !0) : (A(n, o) && (n !== void 0 || Y(e.original, t)) || (w(e), E(e), Y(e.original, t) && A(n, e.original[t]) ? e.assignedMap.delete(t) : e.assignedMap.set(t, !0), e.copy[t] = n, Ee(e, t, n, X)), !0);
664
664
  },
665
665
  has(e, t) {
666
666
  return t in x(e);
@@ -691,7 +691,7 @@ const Ut = Reflect.ownKeys(ae), it = {
691
691
  return e.type === 1 ? it.set.call(this, e, t, void 0, e.proxy) : (pe(e.original, t) !== void 0 || t in e.original ? (w(e), E(e), e.assignedMap.set(t, !1)) : (e.assignedMap = (n = e.assignedMap) !== null && n !== void 0 ? n : /* @__PURE__ */ new Map(), e.assignedMap.delete(t)), e.copy && delete e.copy[t], !0);
692
692
  }
693
693
  };
694
- function Ne(e) {
694
+ function Ie(e) {
695
695
  const { original: t, parentDraft: n, key: s, finalities: i, options: r } = e, o = $(t), c = {
696
696
  type: o,
697
697
  finalized: !1,
@@ -715,7 +715,7 @@ function Ne(e) {
715
715
  const m = F(C, s), S = h(m);
716
716
  if (S) {
717
717
  let _ = S.original;
718
- S.operated && (_ = Re(m)), Se(S), ge(S, X, f, y), l.options.enableAutoFreeze && (l.options.updatedValues = (p = l.options.updatedValues) !== null && p !== void 0 ? p : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(_, S.original)), Z(C, s, _);
718
+ S.operated && (_ = Pe(m)), me(S), Se(S, X, f, y), l.options.enableAutoFreeze && (l.options.updatedValues = (p = l.options.updatedValues) !== null && p !== void 0 ? p : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(_, S.original)), Z(C, s, _);
719
719
  }
720
720
  (I = H.callbacks) === null || I === void 0 || I.forEach((_) => {
721
721
  _(f, y);
@@ -724,12 +724,12 @@ function Ne(e) {
724
724
  } else {
725
725
  const l = h(a);
726
726
  l.finalities.draft.push((f, y) => {
727
- Se(l), ge(l, X, f, y);
727
+ me(l), Se(l, X, f, y);
728
728
  });
729
729
  }
730
730
  return a;
731
731
  }
732
- xe.createDraft = Ne;
732
+ Me.createDraft = Ie;
733
733
  function Kt(e, t, n, s, i) {
734
734
  var r;
735
735
  const o = h(e), c = (r = o?.original) !== null && r !== void 0 ? r : e, a = !!t.length;
@@ -737,7 +737,7 @@ function Kt(e, t, n, s, i) {
737
737
  for (; o.finalities.draft.length > 0; )
738
738
  o.finalities.draft.pop()(n, s);
739
739
  const u = a ? t[0] : o ? o.operated ? o.copy : o.original : e;
740
- return o && me(o), i && U(u, u, o?.options.updatedValues), [
740
+ return o && be(o), i && U(u, u, o?.options.updatedValues), [
741
741
  u,
742
742
  n && a ? [{ op: b.Replace, path: [], value: t[0] }] : n,
743
743
  s && a ? [{ op: b.Replace, path: [], value: c }] : s
@@ -753,7 +753,7 @@ function Wt(e, t) {
753
753
  };
754
754
  let i, r;
755
755
  t.enablePatches && (i = [], r = []);
756
- const c = ((n = t.mark) === null || n === void 0 ? void 0 : n.call(t, e, O)) === O.mutable || !R(e, t) ? e : Ne({
756
+ const c = ((n = t.mark) === null || n === void 0 ? void 0 : n.call(t, e, O)) === O.mutable || !R(e, t) ? e : Ie({
757
757
  original: e,
758
758
  parentDraft: null,
759
759
  finalities: s,
@@ -767,9 +767,9 @@ function Wt(e, t) {
767
767
  }
768
768
  ];
769
769
  }
770
- function ve(e) {
770
+ function we(e) {
771
771
  const { rootDraft: t, value: n, useRawReturn: s = !1, isRoot: i = !0 } = e;
772
- Ee(n, (r, o, c) => {
772
+ Re(n, (r, o, c) => {
773
773
  const a = h(o);
774
774
  if (a && t && a.finalities === t.finalities) {
775
775
  e.isContainDraft = !0;
@@ -779,7 +779,7 @@ function ve(e) {
779
779
  c.clear(), l.forEach((f) => c.add(r === f ? u : f));
780
780
  } else
781
781
  Z(c, r, u);
782
- } else typeof o == "object" && o !== null && (e.value = o, e.isRoot = !1, ve(e));
782
+ } else typeof o == "object" && o !== null && (e.value = o, e.isRoot = !1, we(e));
783
783
  }), i && (e.isContainDraft || console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."), s && console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."));
784
784
  }
785
785
  function rt(e) {
@@ -792,7 +792,7 @@ function rt(e) {
792
792
  return n.original;
793
793
  let i;
794
794
  function r() {
795
- i = s === 2 ? Pe(e) ? new Map(e) : new (Object.getPrototypeOf(e)).constructor(e) : s === 3 ? Array.from(n.setMap.values()) : nt(e, n?.options);
795
+ i = s === 2 ? Oe(e) ? new Map(e) : new (Object.getPrototypeOf(e)).constructor(e) : s === 3 ? Array.from(n.setMap.values()) : nt(e, n?.options);
796
796
  }
797
797
  if (n) {
798
798
  n.finalized = !0;
@@ -803,14 +803,14 @@ function rt(e) {
803
803
  }
804
804
  } else
805
805
  i = e;
806
- if (Ee(i, (o, c) => {
806
+ if (Re(i, (o, c) => {
807
807
  if (n && A(F(n.original, o), c))
808
808
  return;
809
809
  const a = rt(c);
810
810
  a !== c && (i === e && r(), Z(i, o, a));
811
811
  }), s === 3) {
812
812
  const o = (t = n?.original) !== null && t !== void 0 ? t : i;
813
- return Oe(o) ? new Set(i) : new (Object.getPrototypeOf(o)).constructor(i);
813
+ return xe(o) ? new Set(i) : new (Object.getPrototypeOf(o)).constructor(i);
814
814
  }
815
815
  return i;
816
816
  }
@@ -856,7 +856,7 @@ const Vt = (e) => function t(n, s, i) {
856
856
  try {
857
857
  _ = u(m);
858
858
  } catch (d) {
859
- throw me(h(m)), d;
859
+ throw be(h(m)), d;
860
860
  }
861
861
  const j = (d) => {
862
862
  const N = h(m);
@@ -866,14 +866,14 @@ const Vt = (e) => function t(n, s, i) {
866
866
  const L = d?.[Ft];
867
867
  if (L) {
868
868
  const bt = L[0];
869
- return C.strict && typeof d == "object" && d !== null && ve({
869
+ return C.strict && typeof d == "object" && d !== null && we({
870
870
  rootDraft: N,
871
871
  value: d,
872
872
  useRawReturn: !0
873
873
  }), S([bt]);
874
874
  }
875
875
  if (d !== void 0)
876
- return typeof d == "object" && d !== null && ve({ rootDraft: N, value: d }), S([d]);
876
+ return typeof d == "object" && d !== null && we({ rootDraft: N, value: d }), S([d]);
877
877
  }
878
878
  if (d === m || d === void 0)
879
879
  return S([]);
@@ -886,7 +886,7 @@ const Vt = (e) => function t(n, s, i) {
886
886
  return S([d]);
887
887
  };
888
888
  return _ instanceof Promise ? _.then(j, (d) => {
889
- throw me(h(m)), d;
889
+ throw be(h(m)), d;
890
890
  }) : j(_);
891
891
  }, P = Vt();
892
892
  Object.prototype.constructor.toString();
@@ -1019,7 +1019,7 @@ function $e(e, t, n) {
1019
1019
  var s = typeof t;
1020
1020
  return (s == "number" ? he(n) && Ye(t, n.length) : s == "string" && t in n) ? Je(n[t], e) : !1;
1021
1021
  }
1022
- var He = ze ? ze.isConcatSpreadable : void 0;
1022
+ var He = Ne ? Ne.isConcatSpreadable : void 0;
1023
1023
  function gn(e) {
1024
1024
  return W(e) || Ge(e) || !!(He && e && e[He]);
1025
1025
  }
@@ -1199,7 +1199,7 @@ function es(e, t, n) {
1199
1199
  return kn(r, o, n);
1200
1200
  });
1201
1201
  }
1202
- var ts = At("length"), lt = "\\ud800-\\udfff", ns = "\\u0300-\\u036f", ss = "\\ufe20-\\ufe2f", is = "\\u20d0-\\u20ff", rs = ns + ss + is, os = "\\ufe0e\\ufe0f", cs = "[" + lt + "]", Ce = "[" + rs + "]", Me = "\\ud83c[\\udffb-\\udfff]", as = "(?:" + Ce + "|" + Me + ")", ft = "[^" + lt + "]", ht = "(?:\\ud83c[\\udde6-\\uddff]){2}", dt = "[\\ud800-\\udbff][\\udc00-\\udfff]", us = "\\u200d", pt = as + "?", _t = "[" + os + "]?", ls = "(?:" + us + "(?:" + [ft, ht, dt].join("|") + ")" + _t + pt + ")*", fs = _t + pt + ls, hs = "(?:" + [ft + Ce + "?", Ce, ht, dt, cs].join("|") + ")", Ke = RegExp(Me + "(?=" + Me + ")|" + hs + fs, "g");
1202
+ var ts = At("length"), lt = "\\ud800-\\udfff", ns = "\\u0300-\\u036f", ss = "\\ufe20-\\ufe2f", is = "\\u20d0-\\u20ff", rs = ns + ss + is, os = "\\ufe0e\\ufe0f", cs = "[" + lt + "]", ve = "[" + rs + "]", Ce = "\\ud83c[\\udffb-\\udfff]", as = "(?:" + ve + "|" + Ce + ")", ft = "[^" + lt + "]", ht = "(?:\\ud83c[\\udde6-\\uddff]){2}", dt = "[\\ud800-\\udbff][\\udc00-\\udfff]", us = "\\u200d", pt = as + "?", _t = "[" + os + "]?", ls = "(?:" + us + "(?:" + [ft, ht, dt].join("|") + ")" + _t + pt + ")*", fs = _t + pt + ls, hs = "(?:" + [ft + ve + "?", ve, ht, dt, cs].join("|") + ")", Ke = RegExp(Ce + "(?=" + Ce + ")|" + hs + fs, "g");
1203
1203
  function ds(e) {
1204
1204
  for (var t = Ke.lastIndex = 0; Ke.test(e); )
1205
1205
  ++t;
@@ -1570,7 +1570,7 @@ class Le {
1570
1570
  return K(s, (i) => this._collection.getNode(i.id));
1571
1571
  }
1572
1572
  _generateChildId() {
1573
- const { getNodeId: t } = this._collection.config, n = t ? t() : be();
1573
+ const { getNodeId: t } = this._collection.config, n = t ? t() : ze();
1574
1574
  return _e([this._id, n], this._separator);
1575
1575
  }
1576
1576
  moveUp() {
@@ -1683,7 +1683,7 @@ class Le {
1683
1683
  clone() {
1684
1684
  const t = this.data;
1685
1685
  if (!t) return /* @__PURE__ */ new Map();
1686
- const { getNodeId: n } = this._collection.config, s = n ? n() : be(), i = /* @__PURE__ */ new Map();
1686
+ const { getNodeId: n } = this._collection.config, s = n ? n() : ze(), i = /* @__PURE__ */ new Map();
1687
1687
  i.set(s, {
1688
1688
  id: s,
1689
1689
  position: t.position,
@@ -2031,7 +2031,7 @@ function Es(e) {
2031
2031
  fetchError: s.fetchError,
2032
2032
  serverState: s.serverState,
2033
2033
  // Item operations
2034
- create: (i) => t.create({ ...i, id: be() }),
2034
+ create: (i) => t.create(i),
2035
2035
  update: (i, r) => t.update(i, r),
2036
2036
  remove: (i) => t.remove(i),
2037
2037
  getItem: (i) => t.getItem(i),
@@ -2258,7 +2258,7 @@ export {
2258
2258
  yt as buildServerSnapshot,
2259
2259
  Ts as compareTimeIds,
2260
2260
  $s as createSyncClient,
2261
- be as getIdFromTime,
2261
+ ze as getIdFromTime,
2262
2262
  qs as getTimeFromId,
2263
2263
  Es as useCrud,
2264
2264
  Is as useCrudTree,