react-sync-board 1.2.6 → 1.2.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.
@@ -5,7 +5,7 @@ import g, { useContext as _e, useDebugValue as Yr, useRef as Re, useMemo as lt,
5
5
  function Br(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
- var Ie = {}, Nr = {
8
+ var Ie = {}, Xr = {
9
9
  get exports() {
10
10
  return Ie;
11
11
  },
@@ -23,20 +23,20 @@ var Ie = {}, Nr = {
23
23
  * LICENSE file in the root directory of this source tree.
24
24
  */
25
25
  var Pt;
26
- function Xr() {
26
+ function Nr() {
27
27
  if (Pt)
28
28
  return Ee;
29
29
  Pt = 1;
30
30
  var e = g, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
31
31
  function a(u, l, d) {
32
- var f, c = {}, h = null, _ = null;
33
- d !== void 0 && (h = "" + d), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (_ = l.ref);
32
+ var f, c = {}, h = null, S = null;
33
+ d !== void 0 && (h = "" + d), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (S = l.ref);
34
34
  for (f in l)
35
35
  n.call(l, f) && !s.hasOwnProperty(f) && (c[f] = l[f]);
36
36
  if (u && u.defaultProps)
37
37
  for (f in l = u.defaultProps, l)
38
38
  c[f] === void 0 && (c[f] = l[f]);
39
- return { $$typeof: t, type: u, key: h, ref: _, props: c, _owner: o.current };
39
+ return { $$typeof: t, type: u, key: h, ref: S, props: c, _owner: o.current };
40
40
  }
41
41
  return Ee.Fragment = r, Ee.jsx = a, Ee.jsxs = a, Ee;
42
42
  }
@@ -53,8 +53,8 @@ var we = {};
53
53
  var Mt;
54
54
  function Ur() {
55
55
  return Mt || (Mt = 1, process.env.NODE_ENV !== "production" && function() {
56
- var e = g, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), u = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), v = Symbol.iterator, E = "@@iterator";
57
- function I(i) {
56
+ var e = g, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), u = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), v = Symbol.iterator, E = "@@iterator";
57
+ function O(i) {
58
58
  if (i === null || typeof i != "object")
59
59
  return null;
60
60
  var b = v && i[v] || i[E];
@@ -63,41 +63,41 @@ function Ur() {
63
63
  var y = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
64
64
  function C(i) {
65
65
  {
66
- for (var b = arguments.length, R = new Array(b > 1 ? b - 1 : 0), D = 1; D < b; D++)
67
- R[D - 1] = arguments[D];
68
- x("error", i, R);
66
+ for (var b = arguments.length, I = new Array(b > 1 ? b - 1 : 0), D = 1; D < b; D++)
67
+ I[D - 1] = arguments[D];
68
+ x("error", i, I);
69
69
  }
70
70
  }
71
- function x(i, b, R) {
71
+ function x(i, b, I) {
72
72
  {
73
- var D = y.ReactDebugCurrentFrame, X = D.getStackAddendum();
74
- X !== "" && (b += "%s", R = R.concat([X]));
75
- var W = R.map(function(B) {
76
- return String(B);
73
+ var D = y.ReactDebugCurrentFrame, N = D.getStackAddendum();
74
+ N !== "" && (b += "%s", I = I.concat([N]));
75
+ var W = I.map(function(X) {
76
+ return String(X);
77
77
  });
78
78
  W.unshift("Warning: " + b), Function.prototype.apply.call(console[i], console, W);
79
79
  }
80
80
  }
81
- var p = !1, w = !1, m = !1, S = !1, O = !1, k;
82
- k = Symbol.for("react.module.reference");
81
+ var p = !1, _ = !1, m = !1, w = !1, R = !1, T;
82
+ T = Symbol.for("react.module.reference");
83
83
  function j(i) {
84
- return !!(typeof i == "string" || typeof i == "function" || i === n || i === s || O || i === o || i === d || i === f || S || i === _ || p || w || m || typeof i == "object" && i !== null && (i.$$typeof === h || i.$$typeof === c || i.$$typeof === a || i.$$typeof === u || i.$$typeof === l || // This needs to include all possible module reference object
84
+ return !!(typeof i == "string" || typeof i == "function" || i === n || i === s || R || i === o || i === d || i === f || w || i === S || p || _ || m || typeof i == "object" && i !== null && (i.$$typeof === h || i.$$typeof === c || i.$$typeof === a || i.$$typeof === u || i.$$typeof === l || // This needs to include all possible module reference object
85
85
  // types supported by any Flight configuration anywhere since
86
86
  // we don't know which Flight build this will end up being used
87
87
  // with.
88
- i.$$typeof === k || i.getModuleId !== void 0));
88
+ i.$$typeof === T || i.getModuleId !== void 0));
89
89
  }
90
- function M(i, b, R) {
90
+ function M(i, b, I) {
91
91
  var D = i.displayName;
92
92
  if (D)
93
93
  return D;
94
- var X = b.displayName || b.name || "";
95
- return X !== "" ? R + "(" + X + ")" : R;
94
+ var N = b.displayName || b.name || "";
95
+ return N !== "" ? I + "(" + N + ")" : I;
96
96
  }
97
97
  function A(i) {
98
98
  return i.displayName || "Context";
99
99
  }
100
- function N(i) {
100
+ function B(i) {
101
101
  if (i == null)
102
102
  return null;
103
103
  if (typeof i.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
@@ -124,17 +124,17 @@ function Ur() {
124
124
  var b = i;
125
125
  return A(b) + ".Consumer";
126
126
  case a:
127
- var R = i;
128
- return A(R._context) + ".Provider";
127
+ var I = i;
128
+ return A(I._context) + ".Provider";
129
129
  case l:
130
130
  return M(i, i.render, "ForwardRef");
131
131
  case c:
132
132
  var D = i.displayName || null;
133
- return D !== null ? D : N(i.type) || "Memo";
133
+ return D !== null ? D : B(i.type) || "Memo";
134
134
  case h: {
135
- var X = i, W = X._payload, B = X._init;
135
+ var N = i, W = N._payload, X = N._init;
136
136
  try {
137
- return N(B(W));
137
+ return B(X(W));
138
138
  } catch {
139
139
  return null;
140
140
  }
@@ -142,14 +142,14 @@ function Ur() {
142
142
  }
143
143
  return null;
144
144
  }
145
- var U = Object.assign, J = 0, P, $, z, V, Y, F, H;
145
+ var U = Object.assign, J = 0, P, $, Y, V, L, F, H;
146
146
  function te() {
147
147
  }
148
148
  te.__reactDisabledLog = !0;
149
- function Z() {
149
+ function Q() {
150
150
  {
151
151
  if (J === 0) {
152
- P = console.log, $ = console.info, z = console.warn, V = console.error, Y = console.group, F = console.groupCollapsed, H = console.groupEnd;
152
+ P = console.log, $ = console.info, Y = console.warn, V = console.error, L = console.group, F = console.groupCollapsed, H = console.groupEnd;
153
153
  var i = {
154
154
  configurable: !0,
155
155
  enumerable: !0,
@@ -185,13 +185,13 @@ function Ur() {
185
185
  value: $
186
186
  }),
187
187
  warn: U({}, i, {
188
- value: z
188
+ value: Y
189
189
  }),
190
190
  error: U({}, i, {
191
191
  value: V
192
192
  }),
193
193
  group: U({}, i, {
194
- value: Y
194
+ value: L
195
195
  }),
196
196
  groupCollapsed: U({}, i, {
197
197
  value: F
@@ -205,13 +205,13 @@ function Ur() {
205
205
  }
206
206
  }
207
207
  var ie = y.ReactCurrentDispatcher, me;
208
- function ge(i, b, R) {
208
+ function ge(i, b, I) {
209
209
  {
210
210
  if (me === void 0)
211
211
  try {
212
212
  throw Error();
213
- } catch (X) {
214
- var D = X.stack.trim().match(/\n( *(at )?)/);
213
+ } catch (N) {
214
+ var D = N.stack.trim().match(/\n( *(at )?)/);
215
215
  me = D && D[1] || "";
216
216
  }
217
217
  return `
@@ -227,39 +227,39 @@ function Ur() {
227
227
  if (!i || Ke)
228
228
  return "";
229
229
  {
230
- var R = je.get(i);
231
- if (R !== void 0)
232
- return R;
230
+ var I = je.get(i);
231
+ if (I !== void 0)
232
+ return I;
233
233
  }
234
234
  var D;
235
235
  Ke = !0;
236
- var X = Error.prepareStackTrace;
236
+ var N = Error.prepareStackTrace;
237
237
  Error.prepareStackTrace = void 0;
238
238
  var W;
239
- W = ie.current, ie.current = null, Z();
239
+ W = ie.current, ie.current = null, Q();
240
240
  try {
241
241
  if (b) {
242
- var B = function() {
242
+ var X = function() {
243
243
  throw Error();
244
244
  };
245
- if (Object.defineProperty(B.prototype, "props", {
245
+ if (Object.defineProperty(X.prototype, "props", {
246
246
  set: function() {
247
247
  throw Error();
248
248
  }
249
249
  }), typeof Reflect == "object" && Reflect.construct) {
250
250
  try {
251
- Reflect.construct(B, []);
251
+ Reflect.construct(X, []);
252
252
  } catch (ae) {
253
253
  D = ae;
254
254
  }
255
- Reflect.construct(i, [], B);
255
+ Reflect.construct(i, [], X);
256
256
  } else {
257
257
  try {
258
- B.call();
258
+ X.call();
259
259
  } catch (ae) {
260
260
  D = ae;
261
261
  }
262
- i.call(B.prototype);
262
+ i.call(X.prototype);
263
263
  }
264
264
  } else {
265
265
  try {
@@ -271,17 +271,17 @@ function Ur() {
271
271
  }
272
272
  } catch (ae) {
273
273
  if (ae && D && typeof ae.stack == "string") {
274
- for (var L = ae.stack.split(`
274
+ for (var z = ae.stack.split(`
275
275
  `), ee = D.stack.split(`
276
- `), q = L.length - 1, G = ee.length - 1; q >= 1 && G >= 0 && L[q] !== ee[G]; )
276
+ `), q = z.length - 1, G = ee.length - 1; q >= 1 && G >= 0 && z[q] !== ee[G]; )
277
277
  G--;
278
278
  for (; q >= 1 && G >= 0; q--, G--)
279
- if (L[q] !== ee[G]) {
279
+ if (z[q] !== ee[G]) {
280
280
  if (q !== 1 || G !== 1)
281
281
  do
282
- if (q--, G--, G < 0 || L[q] !== ee[G]) {
282
+ if (q--, G--, G < 0 || z[q] !== ee[G]) {
283
283
  var re = `
284
- ` + L[q].replace(" at new ", " at ");
284
+ ` + z[q].replace(" at new ", " at ");
285
285
  return i.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", i.displayName)), typeof i == "function" && je.set(i, re), re;
286
286
  }
287
287
  while (q >= 1 && G >= 0);
@@ -289,19 +289,19 @@ function Ur() {
289
289
  }
290
290
  }
291
291
  } finally {
292
- Ke = !1, ie.current = W, ne(), Error.prepareStackTrace = X;
292
+ Ke = !1, ie.current = W, ne(), Error.prepareStackTrace = N;
293
293
  }
294
294
  var ve = i ? i.displayName || i.name : "", Tt = ve ? ge(ve) : "";
295
295
  return typeof i == "function" && je.set(i, Tt), Tt;
296
296
  }
297
- function gr(i, b, R) {
297
+ function gr(i, b, I) {
298
298
  return ht(i, !1);
299
299
  }
300
300
  function hr(i) {
301
301
  var b = i.prototype;
302
302
  return !!(b && b.isReactComponent);
303
303
  }
304
- function De(i, b, R) {
304
+ function De(i, b, I) {
305
305
  if (i == null)
306
306
  return "";
307
307
  if (typeof i == "function")
@@ -319,11 +319,11 @@ function Ur() {
319
319
  case l:
320
320
  return gr(i.render);
321
321
  case c:
322
- return De(i.type, b, R);
322
+ return De(i.type, b, I);
323
323
  case h: {
324
- var D = i, X = D._payload, W = D._init;
324
+ var D = i, N = D._payload, W = D._init;
325
325
  try {
326
- return De(W(X), b, R);
326
+ return De(W(N), b, I);
327
327
  } catch {
328
328
  }
329
329
  }
@@ -333,27 +333,27 @@ function Ur() {
333
333
  var $e = Object.prototype.hasOwnProperty, vt = {}, yt = y.ReactDebugCurrentFrame;
334
334
  function Ae(i) {
335
335
  if (i) {
336
- var b = i._owner, R = De(i.type, i._source, b ? b.type : null);
337
- yt.setExtraStackFrame(R);
336
+ var b = i._owner, I = De(i.type, i._source, b ? b.type : null);
337
+ yt.setExtraStackFrame(I);
338
338
  } else
339
339
  yt.setExtraStackFrame(null);
340
340
  }
341
- function vr(i, b, R, D, X) {
341
+ function vr(i, b, I, D, N) {
342
342
  {
343
343
  var W = Function.call.bind($e);
344
- for (var B in i)
345
- if (W(i, B)) {
346
- var L = void 0;
344
+ for (var X in i)
345
+ if (W(i, X)) {
346
+ var z = void 0;
347
347
  try {
348
- if (typeof i[B] != "function") {
349
- var ee = Error((D || "React class") + ": " + R + " type `" + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[B] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
348
+ if (typeof i[X] != "function") {
349
+ var ee = Error((D || "React class") + ": " + I + " type `" + X + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[X] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
350
350
  throw ee.name = "Invariant Violation", ee;
351
351
  }
352
- L = i[B](b, B, D, R, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
352
+ z = i[X](b, X, D, I, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
353
353
  } catch (q) {
354
- L = q;
354
+ z = q;
355
355
  }
356
- L && !(L instanceof Error) && (Ae(X), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", D || "React class", R, B, typeof L), Ae(null)), L instanceof Error && !(L.message in vt) && (vt[L.message] = !0, Ae(X), C("Failed %s type: %s", R, L.message), Ae(null));
356
+ z && !(z instanceof Error) && (Ae(N), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", D || "React class", I, X, typeof z), Ae(null)), z instanceof Error && !(z.message in vt) && (vt[z.message] = !0, Ae(N), C("Failed %s type: %s", I, z.message), Ae(null));
357
357
  }
358
358
  }
359
359
  }
@@ -363,8 +363,8 @@ function Ur() {
363
363
  }
364
364
  function Sr(i) {
365
365
  {
366
- var b = typeof Symbol == "function" && Symbol.toStringTag, R = b && i[Symbol.toStringTag] || i.constructor.name || "Object";
367
- return R;
366
+ var b = typeof Symbol == "function" && Symbol.toStringTag, I = b && i[Symbol.toStringTag] || i.constructor.name || "Object";
367
+ return I;
368
368
  }
369
369
  }
370
370
  function _r(i) {
@@ -406,84 +406,84 @@ function Ur() {
406
406
  }
407
407
  function Cr(i, b) {
408
408
  if (typeof i.ref == "string" && be.current && b && be.current.stateNode !== b) {
409
- var R = N(be.current.type);
410
- qe[R] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', N(be.current.type), i.ref), qe[R] = !0);
409
+ var I = B(be.current.type);
410
+ qe[I] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', B(be.current.type), i.ref), qe[I] = !0);
411
411
  }
412
412
  }
413
413
  function xr(i, b) {
414
414
  {
415
- var R = function() {
415
+ var I = function() {
416
416
  bt || (bt = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
417
417
  };
418
- R.isReactWarning = !0, Object.defineProperty(i, "key", {
419
- get: R,
418
+ I.isReactWarning = !0, Object.defineProperty(i, "key", {
419
+ get: I,
420
420
  configurable: !0
421
421
  });
422
422
  }
423
423
  }
424
424
  function Rr(i, b) {
425
425
  {
426
- var R = function() {
426
+ var I = function() {
427
427
  Et || (Et = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
428
428
  };
429
- R.isReactWarning = !0, Object.defineProperty(i, "ref", {
430
- get: R,
429
+ I.isReactWarning = !0, Object.defineProperty(i, "ref", {
430
+ get: I,
431
431
  configurable: !0
432
432
  });
433
433
  }
434
434
  }
435
- var Ir = function(i, b, R, D, X, W, B) {
436
- var L = {
435
+ var Ir = function(i, b, I, D, N, W, X) {
436
+ var z = {
437
437
  // This tag allows us to uniquely identify this as a React Element
438
438
  $$typeof: t,
439
439
  // Built-in properties that belong on the element
440
440
  type: i,
441
441
  key: b,
442
- ref: R,
443
- props: B,
442
+ ref: I,
443
+ props: X,
444
444
  // Record the component responsible for creating this element.
445
445
  _owner: W
446
446
  };
447
- return L._store = {}, Object.defineProperty(L._store, "validated", {
447
+ return z._store = {}, Object.defineProperty(z._store, "validated", {
448
448
  configurable: !1,
449
449
  enumerable: !1,
450
450
  writable: !0,
451
451
  value: !1
452
- }), Object.defineProperty(L, "_self", {
452
+ }), Object.defineProperty(z, "_self", {
453
453
  configurable: !1,
454
454
  enumerable: !1,
455
455
  writable: !1,
456
456
  value: D
457
- }), Object.defineProperty(L, "_source", {
457
+ }), Object.defineProperty(z, "_source", {
458
458
  configurable: !1,
459
459
  enumerable: !1,
460
460
  writable: !1,
461
- value: X
462
- }), Object.freeze && (Object.freeze(L.props), Object.freeze(L)), L;
461
+ value: N
462
+ }), Object.freeze && (Object.freeze(z.props), Object.freeze(z)), z;
463
463
  };
464
- function Or(i, b, R, D, X) {
464
+ function Or(i, b, I, D, N) {
465
465
  {
466
- var W, B = {}, L = null, ee = null;
467
- R !== void 0 && (_t(R), L = "" + R), wr(b) && (_t(b.key), L = "" + b.key), Er(b) && (ee = b.ref, Cr(b, X));
466
+ var W, X = {}, z = null, ee = null;
467
+ I !== void 0 && (_t(I), z = "" + I), wr(b) && (_t(b.key), z = "" + b.key), Er(b) && (ee = b.ref, Cr(b, N));
468
468
  for (W in b)
469
- $e.call(b, W) && !br.hasOwnProperty(W) && (B[W] = b[W]);
469
+ $e.call(b, W) && !br.hasOwnProperty(W) && (X[W] = b[W]);
470
470
  if (i && i.defaultProps) {
471
471
  var q = i.defaultProps;
472
472
  for (W in q)
473
- B[W] === void 0 && (B[W] = q[W]);
473
+ X[W] === void 0 && (X[W] = q[W]);
474
474
  }
475
- if (L || ee) {
475
+ if (z || ee) {
476
476
  var G = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
477
- L && xr(B, G), ee && Rr(B, G);
477
+ z && xr(X, G), ee && Rr(X, G);
478
478
  }
479
- return Ir(i, L, ee, X, D, be.current, B);
479
+ return Ir(i, z, ee, N, D, be.current, X);
480
480
  }
481
481
  }
482
482
  var Ge = y.ReactCurrentOwner, wt = y.ReactDebugCurrentFrame;
483
483
  function he(i) {
484
484
  if (i) {
485
- var b = i._owner, R = De(i.type, i._source, b ? b.type : null);
486
- wt.setExtraStackFrame(R);
485
+ var b = i._owner, I = De(i.type, i._source, b ? b.type : null);
486
+ wt.setExtraStackFrame(I);
487
487
  } else
488
488
  wt.setExtraStackFrame(null);
489
489
  }
@@ -495,7 +495,7 @@ function Ur() {
495
495
  function Ct() {
496
496
  {
497
497
  if (Ge.current) {
498
- var i = N(Ge.current.type);
498
+ var i = B(Ge.current.type);
499
499
  if (i)
500
500
  return `
501
501
 
@@ -507,10 +507,10 @@ Check the render method of \`` + i + "`.";
507
507
  function Tr(i) {
508
508
  {
509
509
  if (i !== void 0) {
510
- var b = i.fileName.replace(/^.*[\\\/]/, ""), R = i.lineNumber;
510
+ var b = i.fileName.replace(/^.*[\\\/]/, ""), I = i.lineNumber;
511
511
  return `
512
512
 
513
- Check your code at ` + b + ":" + R + ".";
513
+ Check your code at ` + b + ":" + I + ".";
514
514
  }
515
515
  return "";
516
516
  }
@@ -520,10 +520,10 @@ Check your code at ` + b + ":" + R + ".";
520
520
  {
521
521
  var b = Ct();
522
522
  if (!b) {
523
- var R = typeof i == "string" ? i : i.displayName || i.name;
524
- R && (b = `
523
+ var I = typeof i == "string" ? i : i.displayName || i.name;
524
+ I && (b = `
525
525
 
526
- Check the top-level render call using <` + R + ">.");
526
+ Check the top-level render call using <` + I + ">.");
527
527
  }
528
528
  return b;
529
529
  }
@@ -533,12 +533,12 @@ Check the top-level render call using <` + R + ">.");
533
533
  if (!i._store || i._store.validated || i.key != null)
534
534
  return;
535
535
  i._store.validated = !0;
536
- var R = kr(b);
537
- if (xt[R])
536
+ var I = kr(b);
537
+ if (xt[I])
538
538
  return;
539
- xt[R] = !0;
539
+ xt[I] = !0;
540
540
  var D = "";
541
- i && i._owner && i._owner !== Ge.current && (D = " It was passed a child from " + N(i._owner.type) + "."), he(i), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', R, D), he(null);
541
+ i && i._owner && i._owner !== Ge.current && (D = " It was passed a child from " + B(i._owner.type) + "."), he(i), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', I, D), he(null);
542
542
  }
543
543
  }
544
544
  function It(i, b) {
@@ -546,17 +546,17 @@ Check the top-level render call using <` + R + ">.");
546
546
  if (typeof i != "object")
547
547
  return;
548
548
  if (He(i))
549
- for (var R = 0; R < i.length; R++) {
550
- var D = i[R];
549
+ for (var I = 0; I < i.length; I++) {
550
+ var D = i[I];
551
551
  Ze(D) && Rt(D, b);
552
552
  }
553
553
  else if (Ze(i))
554
554
  i._store && (i._store.validated = !0);
555
555
  else if (i) {
556
- var X = I(i);
557
- if (typeof X == "function" && X !== i.entries)
558
- for (var W = X.call(i), B; !(B = W.next()).done; )
559
- Ze(B.value) && Rt(B.value, b);
556
+ var N = O(i);
557
+ if (typeof N == "function" && N !== i.entries)
558
+ for (var W = N.call(i), X; !(X = W.next()).done; )
559
+ Ze(X.value) && Rt(X.value, b);
560
560
  }
561
561
  }
562
562
  }
@@ -565,30 +565,30 @@ Check the top-level render call using <` + R + ">.");
565
565
  var b = i.type;
566
566
  if (b == null || typeof b == "string")
567
567
  return;
568
- var R;
568
+ var I;
569
569
  if (typeof b == "function")
570
- R = b.propTypes;
570
+ I = b.propTypes;
571
571
  else if (typeof b == "object" && (b.$$typeof === l || // Note: Memo only checks outer props here.
572
572
  // Inner props are checked in the reconciler.
573
573
  b.$$typeof === c))
574
- R = b.propTypes;
574
+ I = b.propTypes;
575
575
  else
576
576
  return;
577
- if (R) {
578
- var D = N(b);
579
- vr(R, i.props, "prop", D, i);
577
+ if (I) {
578
+ var D = B(b);
579
+ vr(I, i.props, "prop", D, i);
580
580
  } else if (b.PropTypes !== void 0 && !Je) {
581
581
  Je = !0;
582
- var X = N(b);
583
- C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", X || "Unknown");
582
+ var N = B(b);
583
+ C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
584
584
  }
585
585
  typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
586
586
  }
587
587
  }
588
588
  function Mr(i) {
589
589
  {
590
- for (var b = Object.keys(i.props), R = 0; R < b.length; R++) {
591
- var D = b[R];
590
+ for (var b = Object.keys(i.props), I = 0; I < b.length; I++) {
591
+ var D = b[I];
592
592
  if (D !== "children" && D !== "key") {
593
593
  he(i), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", D), he(null);
594
594
  break;
@@ -597,21 +597,21 @@ Check the top-level render call using <` + R + ">.");
597
597
  i.ref !== null && (he(i), C("Invalid attribute `ref` supplied to `React.Fragment`."), he(null));
598
598
  }
599
599
  }
600
- function Ot(i, b, R, D, X, W) {
600
+ function Ot(i, b, I, D, N, W) {
601
601
  {
602
- var B = j(i);
603
- if (!B) {
604
- var L = "";
605
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (L += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
606
- var ee = Tr(X);
607
- ee ? L += ee : L += Ct();
602
+ var X = j(i);
603
+ if (!X) {
604
+ var z = "";
605
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (z += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
606
+ var ee = Tr(N);
607
+ ee ? z += ee : z += Ct();
608
608
  var q;
609
- i === null ? q = "null" : He(i) ? q = "array" : i !== void 0 && i.$$typeof === t ? (q = "<" + (N(i.type) || "Unknown") + " />", L = " Did you accidentally export a JSX literal instead of a component?") : q = typeof i, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, L);
609
+ i === null ? q = "null" : He(i) ? q = "array" : i !== void 0 && i.$$typeof === t ? (q = "<" + (B(i.type) || "Unknown") + " />", z = " Did you accidentally export a JSX literal instead of a component?") : q = typeof i, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, z);
610
610
  }
611
- var G = Or(i, b, R, X, W);
611
+ var G = Or(i, b, I, N, W);
612
612
  if (G == null)
613
613
  return G;
614
- if (B) {
614
+ if (X) {
615
615
  var re = b.children;
616
616
  if (re !== void 0)
617
617
  if (D)
@@ -627,20 +627,20 @@ Check the top-level render call using <` + R + ">.");
627
627
  return i === n ? Mr(G) : Pr(G), G;
628
628
  }
629
629
  }
630
- function jr(i, b, R) {
631
- return Ot(i, b, R, !0);
630
+ function jr(i, b, I) {
631
+ return Ot(i, b, I, !0);
632
632
  }
633
- function Dr(i, b, R) {
634
- return Ot(i, b, R, !1);
633
+ function Dr(i, b, I) {
634
+ return Ot(i, b, I, !1);
635
635
  }
636
636
  var $r = Dr, Ar = jr;
637
637
  we.Fragment = n, we.jsx = $r, we.jsxs = Ar;
638
638
  }()), we;
639
639
  }
640
640
  (function(e) {
641
- process.env.NODE_ENV === "production" ? e.exports = Xr() : e.exports = Ur();
642
- })(Nr);
643
- const Wr = Ie.Fragment, T = Ie.jsx, le = Ie.jsxs;
641
+ process.env.NODE_ENV === "production" ? e.exports = Nr() : e.exports = Ur();
642
+ })(Xr);
643
+ const Wr = Ie.Fragment, k = Ie.jsx, le = Ie.jsxs;
644
644
  let Vr = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, r) => (r &= 63, r < 36 ? t += r.toString(36) : r < 62 ? t += (r - 26).toString(36).toUpperCase() : r > 62 ? t += "-" : t += "_", t), "");
645
645
  class Fr {
646
646
  constructor(t, r, n = null) {
@@ -761,7 +761,7 @@ const Kr = ({
761
761
  });
762
762
  }), e.emit("joinSuperSocket", { room: t, userId: o });
763
763
  });
764
- }, it = g.createContext(), Hr = () => /* @__PURE__ */ T(
764
+ }, it = g.createContext(), Hr = () => /* @__PURE__ */ k(
765
765
  "div",
766
766
  {
767
767
  style: {
@@ -773,7 +773,7 @@ const Kr = ({
773
773
  justifyContent: "center",
774
774
  alignItems: "center"
775
775
  },
776
- children: /* @__PURE__ */ T("h2", { children: "🌀 Loading..." })
776
+ children: /* @__PURE__ */ k("h2", { children: "🌀 Loading..." })
777
777
  }
778
778
  ), nr = ({
779
779
  socket: e,
@@ -782,7 +782,7 @@ const Kr = ({
782
782
  LoadingComponent: n = Hr,
783
783
  children: o
784
784
  }) => {
785
- const [s, a] = g.useState(!1), [u, l] = g.useState(!1), [d, f] = g.useState(null), c = g.useRef(null), h = g.useRef(!1), _ = _e(it), v = g.useRef(!1);
785
+ const [s, a] = g.useState(!1), [u, l] = g.useState(!1), [d, f] = g.useState(null), c = g.useRef(null), h = g.useRef(!1), S = _e(it), v = g.useRef(!1);
786
786
  return g.useEffect(() => (h.current = !0, () => {
787
787
  h.current = !1;
788
788
  }), []), g.useEffect(() => {
@@ -806,14 +806,14 @@ const Kr = ({
806
806
  })), () => {
807
807
  var E;
808
808
  (E = c.current) == null || E.leave();
809
- }) : null, [r, t, e]), !s || !d ? /* @__PURE__ */ T(n, {}) : /* @__PURE__ */ T(
809
+ }) : null, [r, t, e]), !s || !d ? /* @__PURE__ */ k(n, {}) : /* @__PURE__ */ k(
810
810
  it.Provider,
811
811
  {
812
- value: { ..._, [r]: { wire: d, joined: s, isMaster: u, room: t } },
812
+ value: { ...S, [r]: { wire: d, joined: s, isMaster: u, room: t } },
813
813
  children: o
814
814
  }
815
815
  );
816
- }, Xe = (e = "default") => (_e(it) || {})[e], jt = (e) => {
816
+ }, Ne = (e = "default") => (_e(it) || {})[e], jt = (e) => {
817
817
  let t;
818
818
  const r = /* @__PURE__ */ new Set(), n = (l, d) => {
819
819
  const f = typeof l == "function" ? l(t) : l;
@@ -863,21 +863,21 @@ function Jr() {
863
863
  }
864
864
  var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, o = e.useEffect, s = e.useLayoutEffect, a = e.useDebugValue;
865
865
  function u(c, h) {
866
- var _ = h(), v = n({ inst: { value: _, getSnapshot: h } }), E = v[0].inst, I = v[1];
866
+ var S = h(), v = n({ inst: { value: S, getSnapshot: h } }), E = v[0].inst, O = v[1];
867
867
  return s(function() {
868
- E.value = _, E.getSnapshot = h, l(E) && I({ inst: E });
869
- }, [c, _, h]), o(function() {
870
- return l(E) && I({ inst: E }), c(function() {
871
- l(E) && I({ inst: E });
868
+ E.value = S, E.getSnapshot = h, l(E) && O({ inst: E });
869
+ }, [c, S, h]), o(function() {
870
+ return l(E) && O({ inst: E }), c(function() {
871
+ l(E) && O({ inst: E });
872
872
  });
873
- }, [c]), a(_), _;
873
+ }, [c]), a(S), S;
874
874
  }
875
875
  function l(c) {
876
876
  var h = c.getSnapshot;
877
877
  c = c.value;
878
878
  try {
879
- var _ = h();
880
- return !r(c, _);
879
+ var S = h();
880
+ return !r(c, S);
881
881
  } catch {
882
882
  return !0;
883
883
  }
@@ -905,67 +905,67 @@ function Zr() {
905
905
  var e = g, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
906
906
  function r(x) {
907
907
  {
908
- for (var p = arguments.length, w = new Array(p > 1 ? p - 1 : 0), m = 1; m < p; m++)
909
- w[m - 1] = arguments[m];
910
- n("error", x, w);
908
+ for (var p = arguments.length, _ = new Array(p > 1 ? p - 1 : 0), m = 1; m < p; m++)
909
+ _[m - 1] = arguments[m];
910
+ n("error", x, _);
911
911
  }
912
912
  }
913
- function n(x, p, w) {
913
+ function n(x, p, _) {
914
914
  {
915
- var m = t.ReactDebugCurrentFrame, S = m.getStackAddendum();
916
- S !== "" && (p += "%s", w = w.concat([S]));
917
- var O = w.map(function(k) {
918
- return String(k);
915
+ var m = t.ReactDebugCurrentFrame, w = m.getStackAddendum();
916
+ w !== "" && (p += "%s", _ = _.concat([w]));
917
+ var R = _.map(function(T) {
918
+ return String(T);
919
919
  });
920
- O.unshift("Warning: " + p), Function.prototype.apply.call(console[x], console, O);
920
+ R.unshift("Warning: " + p), Function.prototype.apply.call(console[x], console, R);
921
921
  }
922
922
  }
923
923
  function o(x, p) {
924
924
  return x === p && (x !== 0 || 1 / x === 1 / p) || x !== x && p !== p;
925
925
  }
926
926
  var s = typeof Object.is == "function" ? Object.is : o, a = e.useState, u = e.useEffect, l = e.useLayoutEffect, d = e.useDebugValue, f = !1, c = !1;
927
- function h(x, p, w) {
927
+ function h(x, p, _) {
928
928
  f || e.startTransition !== void 0 && (f = !0, r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
929
929
  var m = p();
930
930
  if (!c) {
931
- var S = p();
932
- s(m, S) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), c = !0);
931
+ var w = p();
932
+ s(m, w) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), c = !0);
933
933
  }
934
- var O = a({
934
+ var R = a({
935
935
  inst: {
936
936
  value: m,
937
937
  getSnapshot: p
938
938
  }
939
- }), k = O[0].inst, j = O[1];
939
+ }), T = R[0].inst, j = R[1];
940
940
  return l(function() {
941
- k.value = m, k.getSnapshot = p, _(k) && j({
942
- inst: k
941
+ T.value = m, T.getSnapshot = p, S(T) && j({
942
+ inst: T
943
943
  });
944
944
  }, [x, m, p]), u(function() {
945
- _(k) && j({
946
- inst: k
945
+ S(T) && j({
946
+ inst: T
947
947
  });
948
948
  var M = function() {
949
- _(k) && j({
950
- inst: k
949
+ S(T) && j({
950
+ inst: T
951
951
  });
952
952
  };
953
953
  return x(M);
954
954
  }, [x]), d(m), m;
955
955
  }
956
- function _(x) {
957
- var p = x.getSnapshot, w = x.value;
956
+ function S(x) {
957
+ var p = x.getSnapshot, _ = x.value;
958
958
  try {
959
959
  var m = p();
960
- return !s(w, m);
960
+ return !s(_, m);
961
961
  } catch {
962
962
  return !0;
963
963
  }
964
964
  }
965
- function v(x, p, w) {
965
+ function v(x, p, _) {
966
966
  return p();
967
967
  }
968
- var E = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", I = !E, y = I ? v : h, C = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : y;
968
+ var E = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", O = !E, y = O ? v : h, C = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : y;
969
969
  tt.useSyncExternalStore = C, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
970
970
  }()), tt;
971
971
  }
@@ -994,7 +994,7 @@ function Qr() {
994
994
  return d === f && (d !== 0 || 1 / d === 1 / f) || d !== d && f !== f;
995
995
  }
996
996
  var n = typeof Object.is == "function" ? Object.is : r, o = t.useSyncExternalStore, s = e.useRef, a = e.useEffect, u = e.useMemo, l = e.useDebugValue;
997
- return Qe.useSyncExternalStoreWithSelector = function(d, f, c, h, _) {
997
+ return Qe.useSyncExternalStoreWithSelector = function(d, f, c, h, S) {
998
998
  var v = s(null);
999
999
  if (v.current === null) {
1000
1000
  var E = { hasValue: !1, value: null };
@@ -1004,29 +1004,29 @@ function Qr() {
1004
1004
  v = u(function() {
1005
1005
  function y(m) {
1006
1006
  if (!C) {
1007
- if (C = !0, x = m, m = h(m), _ !== void 0 && E.hasValue) {
1008
- var S = E.value;
1009
- if (_(S, m))
1010
- return p = S;
1007
+ if (C = !0, x = m, m = h(m), S !== void 0 && E.hasValue) {
1008
+ var w = E.value;
1009
+ if (S(w, m))
1010
+ return p = w;
1011
1011
  }
1012
1012
  return p = m;
1013
1013
  }
1014
- if (S = p, n(x, m))
1015
- return S;
1016
- var O = h(m);
1017
- return _ !== void 0 && _(S, O) ? S : (x = m, p = O);
1014
+ if (w = p, n(x, m))
1015
+ return w;
1016
+ var R = h(m);
1017
+ return S !== void 0 && S(w, R) ? w : (x = m, p = R);
1018
1018
  }
1019
- var C = !1, x, p, w = c === void 0 ? null : c;
1019
+ var C = !1, x, p, _ = c === void 0 ? null : c;
1020
1020
  return [function() {
1021
1021
  return y(f());
1022
- }, w === null ? void 0 : function() {
1023
- return y(w());
1022
+ }, _ === null ? void 0 : function() {
1023
+ return y(_());
1024
1024
  }];
1025
- }, [f, c, h, _]);
1026
- var I = o(d, v[0], v[1]);
1025
+ }, [f, c, h, S]);
1026
+ var O = o(d, v[0], v[1]);
1027
1027
  return a(function() {
1028
- E.hasValue = !0, E.value = I;
1029
- }, [I]), l(I), I;
1028
+ E.hasValue = !0, E.value = O;
1029
+ }, [O]), l(O), O;
1030
1030
  }, Qe;
1031
1031
  }
1032
1032
  var rt = {};
@@ -1048,38 +1048,38 @@ function en() {
1048
1048
  return f === c && (f !== 0 || 1 / f === 1 / c) || f !== f && c !== c;
1049
1049
  }
1050
1050
  var n = typeof Object.is == "function" ? Object.is : r, o = t.useSyncExternalStore, s = e.useRef, a = e.useEffect, u = e.useMemo, l = e.useDebugValue;
1051
- function d(f, c, h, _, v) {
1052
- var E = s(null), I;
1053
- E.current === null ? (I = {
1051
+ function d(f, c, h, S, v) {
1052
+ var E = s(null), O;
1053
+ E.current === null ? (O = {
1054
1054
  hasValue: !1,
1055
1055
  value: null
1056
- }, E.current = I) : I = E.current;
1056
+ }, E.current = O) : O = E.current;
1057
1057
  var y = u(function() {
1058
- var w = !1, m, S, O = function(A) {
1059
- if (!w) {
1060
- w = !0, m = A;
1061
- var N = _(A);
1062
- if (v !== void 0 && I.hasValue) {
1063
- var U = I.value;
1064
- if (v(U, N))
1065
- return S = U, U;
1058
+ var _ = !1, m, w, R = function(A) {
1059
+ if (!_) {
1060
+ _ = !0, m = A;
1061
+ var B = S(A);
1062
+ if (v !== void 0 && O.hasValue) {
1063
+ var U = O.value;
1064
+ if (v(U, B))
1065
+ return w = U, U;
1066
1066
  }
1067
- return S = N, N;
1067
+ return w = B, B;
1068
1068
  }
1069
- var J = m, P = S;
1069
+ var J = m, P = w;
1070
1070
  if (n(J, A))
1071
1071
  return P;
1072
- var $ = _(A);
1073
- return v !== void 0 && v(P, $) ? P : (m = A, S = $, $);
1074
- }, k = h === void 0 ? null : h, j = function() {
1075
- return O(c());
1076
- }, M = k === null ? void 0 : function() {
1077
- return O(k());
1072
+ var $ = S(A);
1073
+ return v !== void 0 && v(P, $) ? P : (m = A, w = $, $);
1074
+ }, T = h === void 0 ? null : h, j = function() {
1075
+ return R(c());
1076
+ }, M = T === null ? void 0 : function() {
1077
+ return R(T());
1078
1078
  };
1079
1079
  return [j, M];
1080
- }, [c, h, _, v]), C = y[0], x = y[1], p = o(f, C, x);
1080
+ }, [c, h, S, v]), C = y[0], x = y[1], p = o(f, C, x);
1081
1081
  return a(function() {
1082
- I.hasValue = !0, I.value = p;
1082
+ O.hasValue = !0, O.value = p;
1083
1083
  }, [p]), l(p), p;
1084
1084
  }
1085
1085
  rt.useSyncExternalStoreWithSelector = d, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
@@ -1112,7 +1112,7 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1112
1112
  const [a, u] = sr(e, t, n);
1113
1113
  return [a * r + o, u * r + s];
1114
1114
  }, Yt = (e, t, r, n) => {
1115
- const o = e.x, s = e.y, a = t.x, u = t.y, l = r.x, d = r.y, f = a - o, c = u - s, h = o - l, _ = s - d, v = f * f + c * c, E = 2 * (h * f + _ * c), I = h * h + _ * _ - n * n, y = E * E - 4 * v * I;
1115
+ const o = e.x, s = e.y, a = t.x, u = t.y, l = r.x, d = r.y, f = a - o, c = u - s, h = o - l, S = s - d, v = f * f + c * c, E = 2 * (h * f + S * c), O = h * h + S * S - n * n, y = E * E - 4 * v * O;
1116
1116
  if (y < 0)
1117
1117
  return [];
1118
1118
  const C = (-E + Math.sqrt(y)) / (2 * v), x = (-E - Math.sqrt(y)) / (2 * v), p = [];
@@ -1123,13 +1123,13 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1123
1123
  }), on = (e, t) => {
1124
1124
  const r = t.getBoundingClientRect();
1125
1125
  return nn(e, r);
1126
- }, Ne = (e, t) => {
1126
+ }, Xe = (e, t) => {
1127
1127
  try {
1128
- const n = e.getElementsByClassName(`item ${t}`)[0];
1129
- return n || console.error(`Missing item ${t}`), n;
1128
+ const r = document.getElementById(`${e}__${t}`);
1129
+ return r || console.error(`Missing item ${t}`), r;
1130
1130
  } catch {
1131
1131
  console.error(
1132
- `Error while getting item with id ${t} with wrapper`,
1132
+ `Error while getting item with id ${t} inside wrapper`,
1133
1133
  e
1134
1134
  );
1135
1135
  return;
@@ -1143,9 +1143,9 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1143
1143
  JSON.stringify(e == null ? void 0 : e.dataset),
1144
1144
  (n = e == null ? void 0 : e.dataset) == null ? void 0 : n.id
1145
1145
  ), t;
1146
- }, sn = (e, t = document) => {
1146
+ }, sn = (e, t) => {
1147
1147
  const r = e.reduce((n, o) => {
1148
- const s = Ne(t, o);
1148
+ const s = Xe(t, o);
1149
1149
  if (!s)
1150
1150
  return n || null;
1151
1151
  const { left: a, right: u, top: l, bottom: d } = s.getBoundingClientRect();
@@ -1158,14 +1158,14 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1158
1158
  }, f.left = Math.min(a, f.left), f.top = Math.min(l, f.top), f.right = Math.max(u, f.right), f.bottom = Math.max(d, f.bottom), f;
1159
1159
  }, null);
1160
1160
  return r && (r.width = r.right - r.left, r.height = r.bottom - r.top, r);
1161
- }, ir = (e, t, r = null) => (r === null && (r = /* @__PURE__ */ new Set()), !Array.isArray(t) || t.length === 0 ? [] : t.map((n) => r.has(n) ? [] : (r.add(n), [
1161
+ }, ir = (e, t, r = null) => (r === null && (r = /* @__PURE__ */ new Set()), !Array.isArray(t) || t.length === 0 ? [] : t.map((n) => r.has(n) ? [] : (r.add(n), e[n] ? [
1162
1162
  n,
1163
1163
  ...ir(
1164
1164
  e,
1165
1165
  e[n].linkedItems,
1166
1166
  r
1167
1167
  )
1168
- ])).flat()), Bt = (e, t, r) => {
1168
+ ] : [])).flat()), Bt = (e, t, r) => {
1169
1169
  const n = new Set(ir(e, r));
1170
1170
  return t.filter((o) => n.has(o));
1171
1171
  }, an = ({ x: e, y: t, width: r, height: n }, { type: o = "grid", size: s = 1, offset: a = { x: 0, y: 0 } }) => {
@@ -1173,17 +1173,17 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1173
1173
  e + r / 2 - a.x,
1174
1174
  t + n / 2 - a.y
1175
1175
  ];
1176
- let d, f, c, h, _, v, E, I, y, C;
1176
+ let d, f, c, h, S, v, E, O, y, C;
1177
1177
  const x = s / 1.1547;
1178
1178
  switch (o) {
1179
1179
  case "grid":
1180
1180
  d = Math.round(u / s) * s, f = Math.round(l / s) * s;
1181
1181
  break;
1182
1182
  case "hexH":
1183
- c = 2 * x, h = 3 * s, _ = Math.round(u / c) * c, E = Math.round(l / h) * h, v = _ > u ? _ - x : _ + x, I = E > l ? E - 1.5 * s : E + 1.5 * s, y = Math.hypot(_ - u, E - l), C = Math.hypot(v - u, I - l), y < C ? (d = _, f = E) : (d = v, f = I);
1183
+ c = 2 * x, h = 3 * s, S = Math.round(u / c) * c, E = Math.round(l / h) * h, v = S > u ? S - x : S + x, O = E > l ? E - 1.5 * s : E + 1.5 * s, y = Math.hypot(S - u, E - l), C = Math.hypot(v - u, O - l), y < C ? (d = S, f = E) : (d = v, f = O);
1184
1184
  break;
1185
1185
  case "hexV":
1186
- c = 3 * s, h = 2 * x, _ = Math.round(u / c) * c, E = Math.round(l / h) * h, v = _ > u ? _ - 1.5 * s : _ + 1.5 * s, I = E > l ? E - x : E + x, y = Math.hypot(_ - u, E - l), C = Math.hypot(v - u, I - l), y < C ? (d = _, f = E) : (d = v, f = I);
1186
+ c = 3 * s, h = 2 * x, S = Math.round(u / c) * c, E = Math.round(l / h) * h, v = S > u ? S - 1.5 * s : S + 1.5 * s, O = E > l ? E - x : E + x, y = Math.hypot(S - u, E - l), C = Math.hypot(v - u, O - l), y < C ? (d = S, f = E) : (d = v, f = O);
1187
1187
  break;
1188
1188
  default:
1189
1189
  d = e + r / 2, f = t + n / 2;
@@ -1192,7 +1192,7 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1192
1192
  x: d + a.x - r / 2,
1193
1193
  y: f + a.y - n / 2
1194
1194
  };
1195
- }, Nt = [
1195
+ }, Xt = [
1196
1196
  "#037758",
1197
1197
  "#99092a",
1198
1198
  "#067070",
@@ -1223,13 +1223,13 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1223
1223
  "#007a4b",
1224
1224
  "#bf0daa",
1225
1225
  "#af0ad8"
1226
- ], Xt = () => Nt[Math.floor(Math.random() * Nt.length)], cn = !1, dt = ({ wire: e, storeName: t, noSync: r = [], defaultValue: n }, o) => (s, a, u) => {
1226
+ ], Nt = () => Xt[Math.floor(Math.random() * Xt.length)], cn = !1, dt = ({ wire: e, storeName: t, noSync: r = [], defaultValue: n }, o) => (s, a, u) => {
1227
1227
  s({ ready: !1 });
1228
1228
  const l = [];
1229
1229
  (async () => {
1230
1230
  try {
1231
- const _ = await e.call(`${t}_getValue`);
1232
- cn && console.log("init from peer with value", _), s((v) => ({ ...v, ..._ }));
1231
+ const S = await e.call(`${t}_getValue`);
1232
+ cn && console.log("init from peer with value", S), s((v) => ({ ...v, ...S }));
1233
1233
  } catch {
1234
1234
  n !== void 0 && s(n);
1235
1235
  }
@@ -1238,26 +1238,26 @@ const ye = (e, t) => e.classList && e.classList.contains(t), Oe = (e, t) => ye(e
1238
1238
  `${t}_getValue`,
1239
1239
  () => Object.fromEntries(
1240
1240
  Object.entries(a()).filter(
1241
- ([_, v]) => typeof v != "function" && !r.includes(_)
1241
+ ([S, v]) => typeof v != "function" && !r.includes(S)
1242
1242
  )
1243
1243
  ),
1244
1244
  { invoke: "first" }
1245
1245
  )
1246
1246
  ), l.push(
1247
- e.subscribe(`${t}_call`, ([_, v]) => {
1248
- c[_](...v);
1247
+ e.subscribe(`${t}_call`, ([S, v]) => {
1248
+ c[S](...v);
1249
1249
  })
1250
1250
  ), s({ ready: !0 });
1251
1251
  })();
1252
1252
  const f = o(s, a, u), c = { ...f }, h = Object.fromEntries(
1253
1253
  // Send the update message on all method calls
1254
- Object.entries(f).map(([_, v]) => typeof v == "function" && !_.startsWith("get") && !r.includes(_) ? [_, (...I) => {
1255
- const y = v(...I);
1256
- return e.publish(`${t}_call`, [_, I]), y;
1257
- }] : [_, v])
1254
+ Object.entries(f).map(([S, v]) => typeof v == "function" && !S.startsWith("get") && !r.includes(S) ? [S, (...O) => {
1255
+ const y = v(...O);
1256
+ return e.publish(`${t}_call`, [S, O]), y;
1257
+ }] : [S, v])
1258
1258
  );
1259
1259
  return h.unsub = () => {
1260
- l.forEach((_) => _());
1260
+ l.forEach((S) => S());
1261
1261
  }, h;
1262
1262
  };
1263
1263
  function Ve(e, t) {
@@ -1371,7 +1371,7 @@ const ar = g.createContext(), un = (e, t) => ({
1371
1371
  setSessionInfo: (r) => e({ session: r }),
1372
1372
  updateSessionInfo: (r) => e((n) => ({ session: { ...n.session, ...r } }))
1373
1373
  }), Ut = ({ storeName: e, children: t, defaultValue: r }) => {
1374
- const { wire: n } = Xe("room"), [o, s] = g.useState(!1), [a] = g.useState(
1374
+ const { wire: n } = Ne("room"), [o, s] = g.useState(!1), [a] = g.useState(
1375
1375
  () => Ue(
1376
1376
  dt({ wire: n, storeName: e, defaultValue: r }, (...u) => ({
1377
1377
  ...un(...u),
@@ -1386,7 +1386,7 @@ const ar = g.createContext(), un = (e, t) => ({
1386
1386
  const u = a.subscribe((l) => {
1387
1387
  l.ready && (u(), s(!0));
1388
1388
  });
1389
- }, [a]), o ? /* @__PURE__ */ T(ar.Provider, { value: a, children: t }) : null;
1389
+ }, [a]), o ? /* @__PURE__ */ k(ar.Provider, { value: a, children: t }) : null;
1390
1390
  }, oe = (e, t) => {
1391
1391
  const r = _e(ar);
1392
1392
  return We(r, e, t || Ve);
@@ -1488,12 +1488,15 @@ const ar = g.createContext(), un = (e, t) => ({
1488
1488
  ...vn(...r)
1489
1489
  }))
1490
1490
  );
1491
- return /* @__PURE__ */ T(ur.Provider, { value: t, children: e });
1492
- }, Q = (e, t) => {
1491
+ return /* @__PURE__ */ k(ur.Provider, { value: t, children: e });
1492
+ }, Z = (e, t) => {
1493
1493
  const r = _e(ur);
1494
1494
  return We(r, e, t || Ve);
1495
1495
  }, ss = () => {
1496
- const [e] = Q((t) => [t.selection]);
1496
+ const [e] = Z((t) => [t.selection]);
1497
+ return e;
1498
+ }, is = () => {
1499
+ const [e] = Z((t) => [t.getSelection]);
1497
1500
  return e;
1498
1501
  };
1499
1502
  function pt(e) {
@@ -1556,7 +1559,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1556
1559
  }, c = {
1557
1560
  x: a / 2,
1558
1561
  y: a / 2
1559
- }, h = ze(d, [f.x, f.y]), _ = Math.min(s.width, s.height), v = o.radius + _ / 2 / r - Sn / r;
1562
+ }, h = ze(d, [f.x, f.y]), S = Math.min(s.width, s.height), v = o.radius + S / 2 / r - Sn / r;
1560
1563
  if (h > v) {
1561
1564
  const y = Yt(
1562
1565
  { x: d[0], y: d[1] },
@@ -1571,13 +1574,13 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1571
1574
  });
1572
1575
  u = C, l = x;
1573
1576
  }
1574
- const E = ze(d, [c.x, c.y]), I = a / 2 - ze([0, 0], [s.width, s.height]) / r;
1575
- if (E > I) {
1577
+ const E = ze(d, [c.x, c.y]), O = a / 2 - ze([0, 0], [s.width, s.height]) / r;
1578
+ if (E > O) {
1576
1579
  const y = Yt(
1577
1580
  { x: d[0], y: d[1] },
1578
1581
  c,
1579
1582
  c,
1580
- I - 1 / r
1583
+ O - 1 / r
1581
1584
  )[0];
1582
1585
  if (y) {
1583
1586
  const [C, x] = Be([-y.x, -y.y], {
@@ -1597,66 +1600,66 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1597
1600
  r,
1598
1601
  n,
1599
1602
  o
1600
- ] = Q((p) => [
1603
+ ] = Z((p) => [
1601
1604
  p.getBoardState,
1602
1605
  p.updateBoardState,
1603
1606
  p.config.itemExtent,
1604
1607
  p.getConfiguration,
1605
1608
  p.updateConfiguration
1606
1609
  ]), s = g.useRef([0.15, 5]), [a] = oe((p) => [p.getItemList]), u = g.useCallback(() => {
1607
- const { translateX: p, translateY: w, scale: m, rotate: S } = e();
1608
- return { translateX: p, translateY: w, scale: m, rotate: S };
1610
+ const { translateX: p, translateY: _, scale: m, rotate: w } = e();
1611
+ return { translateX: p, translateY: _, scale: m, rotate: w };
1609
1612
  }, [e]), l = g.useCallback(
1610
- (p, w) => ct([p, w], e()),
1613
+ (p, _) => ct([p, _], e()),
1611
1614
  [e]
1612
1615
  ), d = g.useCallback(
1613
- (p, w) => Be([p, w], e()),
1616
+ (p, _) => Be([p, _], e()),
1614
1617
  [e]
1615
1618
  ), f = g.useCallback(
1616
- (p, w) => {
1617
- const { scale: m, rotate: S } = e();
1618
- return ct([p, w], {
1619
+ (p, _) => {
1620
+ const { scale: m, rotate: w } = e();
1621
+ return ct([p, _], {
1619
1622
  translateX: 0,
1620
1623
  translateY: 0,
1621
- rotate: S,
1624
+ rotate: w,
1622
1625
  scale: m
1623
1626
  });
1624
1627
  },
1625
1628
  [e]
1626
1629
  ), c = g.useCallback((p) => p > s.current[1] ? s.current[1] : p < s.current[0] ? s.current[0] : p, []), h = g.useCallback(
1627
1630
  (p) => {
1628
- const { itemExtent: w, boardWrapperRect: m, boardSize: S } = n(), O = e(), {
1629
- translateX: k,
1631
+ const { itemExtent: _, boardWrapperRect: m, boardSize: w } = n(), R = e(), {
1632
+ translateX: T,
1630
1633
  translateY: j,
1631
1634
  scale: M,
1632
1635
  rotate: A
1633
1636
  } = {
1634
- ...O,
1635
- ...p(O)
1636
- }, N = c(M);
1637
- let [U, J] = [k, j];
1638
- (k !== O.translateX || j !== O.translateY) && ([U, J] = En({
1639
- x: k,
1637
+ ...R,
1638
+ ...p(R)
1639
+ }, B = c(M);
1640
+ let [U, J] = [T, j];
1641
+ (T !== R.translateX || j !== R.translateY) && ([U, J] = En({
1642
+ x: T,
1640
1643
  y: j,
1641
- scale: N,
1644
+ scale: B,
1642
1645
  rotate: A,
1643
- itemExtent: w,
1646
+ itemExtent: _,
1644
1647
  boardWrapperRect: m,
1645
- boardSize: S
1648
+ boardSize: w
1646
1649
  })), t({
1647
1650
  translateX: U,
1648
1651
  translateY: J,
1649
- scale: N,
1652
+ scale: B,
1650
1653
  rotate: A
1651
1654
  });
1652
1655
  },
1653
1656
  [c, e, n, t]
1654
- ), _ = g.useCallback(
1657
+ ), S = g.useCallback(
1655
1658
  (p) => {
1656
- let w = (m) => ({ ...m, ...p });
1657
- typeof p == "function" && (w = p), h((m) => ({
1659
+ let _ = (m) => ({ ...m, ...p });
1660
+ typeof p == "function" && (_ = p), h((m) => ({
1658
1661
  ...m,
1659
- ...w({
1662
+ ..._({
1660
1663
  translateX: m.translateX,
1661
1664
  translateY: m.translateY
1662
1665
  })
@@ -1664,75 +1667,75 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1664
1667
  },
1665
1668
  [h]
1666
1669
  ), v = g.useCallback(
1667
- ({ to: p, factor: w }) => {
1670
+ ({ to: p, factor: _ }) => {
1668
1671
  const { boardWrapperRect: m } = n();
1669
- let S = p;
1670
- S || (S = {
1672
+ let w = p;
1673
+ w || (w = {
1671
1674
  x: m.left + m.width / 2,
1672
1675
  y: m.top + m.height / 2
1673
1676
  });
1674
- const O = e(), k = c(O.scale * w), j = S.x - m.left, M = S.y - m.top, A = j - (j - O.translateX) * k / O.scale, N = M - (M - O.translateY) * k / O.scale;
1677
+ const R = e(), T = c(R.scale * _), j = w.x - m.left, M = w.y - m.top, A = j - (j - R.translateX) * T / R.scale, B = M - (M - R.translateY) * T / R.scale;
1675
1678
  h((U) => ({
1676
1679
  ...U,
1677
1680
  translateX: A,
1678
- translateY: N,
1679
- scale: k
1681
+ translateY: B,
1682
+ scale: T
1680
1683
  }));
1681
1684
  },
1682
1685
  [c, e, n, h]
1683
1686
  ), E = g.useCallback(
1684
- ({ x: p, y: w, radius: m }) => {
1685
- const { rotate: S } = e(), { boardWrapperRect: O, boardSize: k } = n(), j = O.width / (m * 2), M = O.height / (m * 2), A = c(Math.min(j, M) * bn), [N, U] = Be(
1686
- [-k / 2 - p, -k / 2 - w],
1687
+ ({ x: p, y: _, radius: m }) => {
1688
+ const { rotate: w } = e(), { boardWrapperRect: R, boardSize: T } = n(), j = R.width / (m * 2), M = R.height / (m * 2), A = c(Math.min(j, M) * bn), [B, U] = Be(
1689
+ [-T / 2 - p, -T / 2 - _],
1687
1690
  {
1688
- translateX: O.width / 2,
1689
- translateY: O.height / 2,
1691
+ translateX: R.width / 2,
1692
+ translateY: R.height / 2,
1690
1693
  scale: A,
1691
- rotate: S
1694
+ rotate: w
1692
1695
  }
1693
1696
  );
1694
- h((J) => ({ ...J, translateX: N, translateY: U, scale: A }));
1697
+ h((J) => ({ ...J, translateX: B, translateY: U, scale: A }));
1695
1698
  },
1696
1699
  [c, e, n, h]
1697
- ), I = g.useCallback(() => {
1698
- const { boardWrapperRect: p, boardSize: w } = n(), [m, S] = l(
1700
+ ), O = g.useCallback(() => {
1701
+ const { boardWrapperRect: p, boardSize: _ } = n(), [m, w] = l(
1699
1702
  p.width / 2,
1700
1703
  p.height / 2
1701
1704
  );
1702
1705
  return {
1703
- x: m - w / 2,
1704
- y: S - w / 2
1706
+ x: m - _ / 2,
1707
+ y: w - _ / 2
1705
1708
  };
1706
1709
  }, [l, n]), y = g.useCallback(() => {
1707
- const p = a(), { boardWrapper: w, boardSize: m } = n(), S = p.reduce(
1708
- (k, j) => {
1709
- const M = Ne(w, j.id);
1710
- return M && (k.left = Math.min(j.x, k.left), k.top = Math.min(j.y, k.top), k.right = Math.max(
1710
+ const p = a(), { boardSize: _, uid: m } = n(), w = p.reduce(
1711
+ (T, j) => {
1712
+ const M = Xe(m, j.id);
1713
+ return M && (T.left = Math.min(j.x, T.left), T.top = Math.min(j.y, T.top), T.right = Math.max(
1711
1714
  j.x + M.offsetWidth,
1712
- k.right
1713
- ), k.bottom = Math.max(
1715
+ T.right
1716
+ ), T.bottom = Math.max(
1714
1717
  j.y + M.offsetHeight,
1715
- k.bottom
1716
- )), k;
1718
+ T.bottom
1719
+ )), T;
1717
1720
  },
1718
1721
  {
1719
- left: m / 2,
1720
- top: m / 2,
1721
- right: -m / 2,
1722
- bottom: -m / 2
1722
+ left: _ / 2,
1723
+ top: _ / 2,
1724
+ right: -_ / 2,
1725
+ bottom: -_ / 2
1723
1726
  }
1724
- ), O = {
1725
- x: (S.right + S.left) / 2,
1726
- y: (S.bottom + S.top) / 2
1727
+ ), R = {
1728
+ x: (w.right + w.left) / 2,
1729
+ y: (w.bottom + w.top) / 2
1727
1730
  };
1728
- O.radius = Math.max(
1729
- ze([O.x, O.y], [S.left, S.top]),
1731
+ R.radius = Math.max(
1732
+ ze([R.x, R.y], [w.left, w.top]),
1730
1733
  _n
1731
- ), o({ itemExtent: O });
1734
+ ), o({ itemExtent: R });
1732
1735
  }, [n, a, o]), C = g.useCallback(
1733
1736
  (p) => {
1734
- let w = () => p;
1735
- typeof p == "function" && (w = p), h((m) => ({ ...m, rotate: w(m.rotate) })), y(), E(r);
1737
+ let _ = () => p;
1738
+ typeof p == "function" && (_ = p), h((m) => ({ ...m, rotate: _(m.rotate) })), y(), E(r);
1736
1739
  },
1737
1740
  [r, h, y, E]
1738
1741
  ), x = mt(
@@ -1740,22 +1743,24 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1740
1743
  [y],
1741
1744
  200
1742
1745
  );
1743
- return {
1746
+ return g.useEffect(() => {
1747
+ window.debugUpdateExtent = () => y(), window.debugDisplayExtent = () => console.log(n().itemExtent);
1748
+ }, [n, y]), {
1744
1749
  setDim: h,
1745
1750
  rotateBoard: C,
1746
- moveBoard: _,
1751
+ moveBoard: S,
1747
1752
  getDim: u,
1748
1753
  zoomTo: v,
1749
1754
  zoomToCenter: v,
1750
1755
  zoomToExtent: E,
1751
- getCenter: I,
1756
+ getCenter: O,
1752
1757
  updateItemExtent: x,
1753
1758
  vectorFromWrapperToBoard: f,
1754
1759
  fromWrapperToBoard: l,
1755
1760
  fromBoardToWrapper: d
1756
1761
  };
1757
1762
  }, Vt = (e) => {
1758
- const [t, r, n] = Q(
1763
+ const [t, r, n] = Z(
1759
1764
  ({ register: a, unregister: u, callInteractions: l }) => [
1760
1765
  a,
1761
1766
  u,
@@ -1774,7 +1779,7 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1774
1779
  );
1775
1780
  return { register: o, call: s };
1776
1781
  }, gt = () => {
1777
- const { call: e } = Vt("place"), { call: t } = Vt("delete"), { getCenter: r, updateItemExtent: n } = Me(), [o, s, a, u] = Q((P) => [
1782
+ const { call: e } = Vt("place"), { call: t } = Vt("delete"), { getCenter: r, updateItemExtent: n } = Me(), [o, s, a, u] = Z((P) => [
1778
1783
  P.clear,
1779
1784
  P.reverse,
1780
1785
  P.unselect,
@@ -1785,54 +1790,54 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1785
1790
  setItemIds: f,
1786
1791
  updateItems: c,
1787
1792
  moveItems: h,
1788
- removeItemsById: _,
1793
+ removeItemsById: S,
1789
1794
  getItemList: v,
1790
1795
  insertItems: E,
1791
- setItemList: I
1796
+ setItemList: O
1792
1797
  } = oe(
1793
1798
  ({
1794
1799
  getItems: P,
1795
1800
  getItemIds: $,
1796
- setItemIds: z,
1801
+ setItemIds: Y,
1797
1802
  updateItems: V,
1798
- moveItems: Y,
1803
+ moveItems: L,
1799
1804
  removeItemsById: F,
1800
1805
  getItemList: H,
1801
1806
  insertItems: te,
1802
- setItemList: Z
1807
+ setItemList: Q
1803
1808
  }) => ({
1804
1809
  getItems: P,
1805
1810
  getItemIds: $,
1806
- setItemIds: z,
1811
+ setItemIds: Y,
1807
1812
  updateItems: V,
1808
- moveItems: Y,
1813
+ moveItems: L,
1809
1814
  removeItemsById: F,
1810
1815
  getItemList: H,
1811
1816
  insertItems: te,
1812
- setItemList: Z
1817
+ setItemList: Q
1813
1818
  })
1814
1819
  ), y = g.useCallback(
1815
- (P, $, z = !1) => {
1820
+ (P, $, Y = !1) => {
1816
1821
  let V = $;
1817
1822
  typeof $ == "object" && (V = () => $);
1818
- const Y = d().filter((Z) => P.includes(Z)), F = l(), H = Y.map((Z) => {
1819
- const ne = F[Z];
1820
- return z ? [Z, V(ne)] : [Z, V({ ...ne })];
1821
- }).filter(([, Z]) => Z);
1823
+ const L = d().filter((Q) => P.includes(Q)), F = l(), H = L.map((Q) => {
1824
+ const ne = F[Q];
1825
+ return Y ? [Q, V(ne)] : [Q, V({ ...ne })];
1826
+ }).filter(([, Q]) => Q);
1822
1827
  if (H.length === 0)
1823
1828
  return;
1824
1829
  const te = Object.fromEntries(H);
1825
- c(te, z), n();
1830
+ c(te, Y), n();
1826
1831
  },
1827
1832
  [d, l, n, c]
1828
1833
  ), C = g.useCallback(
1829
1834
  (P) => {
1830
- I(P), o(), n();
1835
+ O(P), o(), n();
1831
1836
  },
1832
- [o, I, n]
1837
+ [o, O, n]
1833
1838
  ), x = g.useCallback(
1834
- (P, $, z = !1) => {
1835
- y([P], $, z);
1839
+ (P, $, Y = !1) => {
1840
+ y([P], $, Y);
1836
1841
  },
1837
1842
  [y]
1838
1843
  ), p = g.useCallback(
@@ -1840,36 +1845,36 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1840
1845
  h(
1841
1846
  Bt(l(), d(), P),
1842
1847
  $
1843
- ), n();
1848
+ );
1844
1849
  },
1845
- [d, l, h, n]
1846
- ), w = g.useCallback(
1850
+ [d, l, h]
1851
+ ), _ = g.useCallback(
1847
1852
  (P) => {
1848
- const $ = d(), z = $.filter((Y) => !P.includes(Y)), V = $.filter(
1849
- (Y) => P.includes(Y)
1853
+ const $ = d(), Y = $.filter((L) => !P.includes(L)), V = $.filter(
1854
+ (L) => P.includes(L)
1850
1855
  );
1851
- f([...z, ...V]);
1856
+ f([...Y, ...V]);
1852
1857
  },
1853
1858
  [d, f]
1854
1859
  ), m = g.useCallback(
1855
- (P, { type: $, size: z } = {}) => {
1856
- const { boardWrapper: V } = u();
1860
+ (P, { type: $, size: Y } = {}) => {
1861
+ const { uid: V } = u();
1857
1862
  y(
1858
1863
  P,
1859
- (Y) => {
1860
- const F = Ne(V, Y.id);
1864
+ (L) => {
1865
+ const F = Xe(V, L.id);
1861
1866
  if (!F)
1862
1867
  return;
1863
1868
  const H = {
1864
1869
  type: $ || "grid",
1865
- size: z || 1,
1870
+ size: Y || 1,
1866
1871
  offset: { x: 0, y: 0 },
1867
- ...Y.grid
1872
+ ...L.grid
1868
1873
  };
1869
1874
  return an(
1870
1875
  {
1871
- x: Y.x,
1872
- y: Y.y,
1876
+ x: L.x,
1877
+ y: L.y,
1873
1878
  width: F.clientWidth,
1874
1879
  height: F.clientHeight
1875
1880
  },
@@ -1880,47 +1885,47 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1880
1885
  );
1881
1886
  },
1882
1887
  [u, y]
1883
- ), S = g.useCallback(
1888
+ ), w = g.useCallback(
1884
1889
  (P, $) => {
1885
- const z = Bt(
1890
+ const Y = Bt(
1886
1891
  l(),
1887
1892
  d(),
1888
1893
  P
1889
1894
  );
1890
- w(z), y(z, { moving: !1 }, !0), m(z, $), e(P), n();
1895
+ _(Y), y(Y, { moving: !1 }, !0), m(Y, $), e(P), n();
1891
1896
  },
1892
1897
  [
1893
1898
  y,
1894
1899
  e,
1895
1900
  d,
1896
1901
  l,
1897
- w,
1902
+ _,
1898
1903
  m,
1899
1904
  n
1900
1905
  ]
1901
- ), O = g.useCallback(
1906
+ ), R = g.useCallback(
1902
1907
  (P) => {
1903
1908
  f(P);
1904
1909
  },
1905
1910
  [f]
1906
- ), k = g.useCallback(
1911
+ ), T = g.useCallback(
1907
1912
  (P) => {
1908
- const $ = d(), z = $.filter(
1909
- (Y) => P.includes(Y)
1910
- ), V = $.map((Y) => P.includes(Y) ? z.pop() : Y);
1913
+ const $ = d(), Y = $.filter(
1914
+ (L) => P.includes(L)
1915
+ ), V = $.map((L) => P.includes(L) ? Y.pop() : L);
1911
1916
  f(V), s();
1912
1917
  },
1913
1918
  [d, s, f]
1914
1919
  ), j = g.useCallback(
1915
1920
  (P, $) => {
1916
- const z = l(), V = Object.fromEntries(
1921
+ const Y = l(), V = Object.fromEntries(
1917
1922
  $.map((H, te) => {
1918
- const Z = z[P[te]];
1923
+ const Q = Y[P[te]];
1919
1924
  return [
1920
1925
  H,
1921
1926
  {
1922
- x: Z.x,
1923
- y: Z.y
1927
+ x: Q.x,
1928
+ y: Q.y
1924
1929
  }
1925
1930
  ];
1926
1931
  })
@@ -1930,52 +1935,52 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1930
1935
  (H) => V[H.id],
1931
1936
  !0
1932
1937
  );
1933
- const Y = Object.fromEntries(
1938
+ const L = Object.fromEntries(
1934
1939
  P.map((H, te) => [H, $[te]])
1935
- ), F = d().map((H) => P.includes(H) ? Y[H] : H);
1940
+ ), F = d().map((H) => P.includes(H) ? L[H] : H);
1936
1941
  f(F);
1937
1942
  },
1938
1943
  [l, y, d, f]
1939
1944
  ), M = g.useCallback(
1940
1945
  (P, $) => {
1941
- const z = r(), V = P.map((Y, F) => !Y.x || !Y.y ? { ...Y, x: z.x + 2 * F, y: z.y + 2 * F } : Y);
1942
- E(V, $), n();
1946
+ const Y = r(), V = P.map((L, F) => !L.x || !L.y ? { ...L, x: Y.x + 2 * F, y: Y.y + 2 * F } : L);
1947
+ E(V, $), w(P.map(({ id: L }) => L));
1943
1948
  },
1944
- [r, E, n]
1949
+ [r, E, w]
1945
1950
  ), A = g.useCallback(
1946
1951
  (P, $) => {
1947
1952
  M([P], $);
1948
1953
  },
1949
1954
  [M]
1950
- ), N = g.useCallback(
1955
+ ), B = g.useCallback(
1951
1956
  (P) => {
1952
- a(P), _(P), t(P);
1957
+ a(P), S(P), t(P);
1953
1958
  },
1954
- [a, _, t]
1959
+ [a, S, t]
1955
1960
  ), U = g.useCallback(
1956
1961
  (P) => {
1957
1962
  const $ = l();
1958
- return P.map((z) => $[z]);
1963
+ return P.map((Y) => $[Y]);
1959
1964
  },
1960
1965
  [l]
1961
1966
  ), J = g.useCallback(
1962
- ({ target: P, clientX: $, clientY: z }, { returnLocked: V = !1, passLocked: Y = !1 } = {}) => {
1967
+ ({ target: P, clientX: $, clientY: Y }, { returnLocked: V = !1, passLocked: L = !1 } = {}) => {
1963
1968
  if (["INPUT", "TEXTAREA"].includes(P.tagName))
1964
1969
  return null;
1965
1970
  const F = Oe(P, "item");
1966
1971
  if (F) {
1967
1972
  if (ye(F, "selected"))
1968
1973
  return F;
1969
- if (!Y && ye(F, "locked") && !ye(P, "passthrough"))
1974
+ if (!L && ye(F, "locked") && !ye(P, "passthrough"))
1970
1975
  return V ? F : null;
1971
1976
  if (ye(P, "passthrough")) {
1972
- const H = d(), { boardWrapper: te } = u(), Z = H.reduce((ne, ie) => {
1973
- const me = Ne(te, ie), ge = me.getBoundingClientRect();
1974
- return ft({ x: $, y: z }, ge) && ne.unshift(me), ne;
1977
+ const H = d(), { uid: te } = u(), Q = H.reduce((ne, ie) => {
1978
+ const me = Xe(te, ie), ge = me.getBoundingClientRect();
1979
+ return ft({ x: $, y: Y }, ge) && ne.unshift(me), ne;
1975
1980
  }, []);
1976
- for (let ne = 0; ne < Z.length; ne += 1) {
1977
- const ie = Z[ne];
1978
- if (ie !== F && (Y || !ye(ie, "locked")))
1981
+ for (let ne = 0; ne < Q.length; ne += 1) {
1982
+ const ie = Q[ne];
1983
+ if (ie !== F && (L || !ye(ie, "locked")))
1979
1984
  return ie;
1980
1985
  }
1981
1986
  return null;
@@ -1986,18 +1991,18 @@ const Sn = 100, _n = 1e3, bn = 0.8, En = ({
1986
1991
  [u, d]
1987
1992
  );
1988
1993
  return {
1989
- putItemsOnTop: w,
1994
+ putItemsOnTop: _,
1990
1995
  batchUpdateItems: y,
1991
- updateItemOrder: O,
1996
+ updateItemOrder: R,
1992
1997
  moveItems: p,
1993
- placeItems: S,
1998
+ placeItems: w,
1994
1999
  updateItem: x,
1995
2000
  swapItems: j,
1996
- reverseItemsOrder: k,
2001
+ reverseItemsOrder: T,
1997
2002
  setItemList: C,
1998
2003
  pushItem: A,
1999
2004
  pushItems: M,
2000
- removeItems: N,
2005
+ removeItems: B,
2001
2006
  getItemList: v,
2002
2007
  findElementUnderPointer: J,
2003
2008
  getItems: U
@@ -2077,11 +2082,11 @@ const xn = (e, t) => {
2077
2082
  }, Ft = (e, t) => {
2078
2083
  const { actions: r = xn(e, t) } = e;
2079
2084
  return r.map((n) => typeof n == "string" ? { name: n } : n);
2080
- }, is = () => {
2085
+ }, as = () => {
2081
2086
  const [e, t] = oe((c) => [
2082
2087
  c.items,
2083
2088
  c.getItems
2084
- ]), [r, n, o] = Q((c) => [
2089
+ ]), [r, n, o] = Z((c) => [
2085
2090
  c.config.itemTemplates,
2086
2091
  c.selection,
2087
2092
  c.getSelection
@@ -2094,8 +2099,8 @@ const xn = (e, t) => {
2094
2099
  const h = t();
2095
2100
  if (c)
2096
2101
  return [c, c.map((v) => h[v])];
2097
- const _ = o();
2098
- return [_, _.map((v) => h[v])];
2102
+ const S = o();
2103
+ return [S, S.map((v) => h[v])];
2099
2104
  },
2100
2105
  [t, o]
2101
2106
  ), f = tr(() => {
@@ -2103,14 +2108,14 @@ const xn = (e, t) => {
2103
2108
  if (c.length > 0) {
2104
2109
  if (!u.current)
2105
2110
  return;
2106
- const _ = h.reduce((v, E) => {
2107
- const I = Ft(E, r);
2111
+ const S = h.reduce((v, E) => {
2112
+ const O = Ft(E, r);
2108
2113
  return v.filter(
2109
- (y) => I.some((C) => wn(y, C))
2114
+ (y) => O.some((C) => wn(y, C))
2110
2115
  );
2111
2116
  }, Ft(h[0], r));
2112
2117
  l(() => {
2113
- a(_);
2118
+ a(S);
2114
2119
  });
2115
2120
  } else
2116
2121
  l(() => {
@@ -2124,8 +2129,8 @@ const xn = (e, t) => {
2124
2129
  ), {
2125
2130
  availableActions: s
2126
2131
  };
2127
- }, as = () => {
2128
- const [e] = Q((t) => [t.selectionBox]);
2132
+ }, cs = () => {
2133
+ const [e] = Z((t) => [t.selectionBox]);
2129
2134
  return e;
2130
2135
  };
2131
2136
  let pe = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, r) => (r &= 63, r < 36 ? t += r.toString(36) : r < 62 ? t += (r - 26).toString(36).toUpperCase() : r > 62 ? t += "-" : t += "_", t), "");
@@ -2135,7 +2140,7 @@ const lr = g.createContext(), ut = (e) => {
2135
2140
  if (localStorage.user) {
2136
2141
  const t = {
2137
2142
  name: "Player",
2138
- color: Xt(),
2143
+ color: Nt(),
2139
2144
  uid: pe(),
2140
2145
  ...JSON.parse(localStorage.user)
2141
2146
  };
@@ -2143,7 +2148,7 @@ const lr = g.createContext(), ut = (e) => {
2143
2148
  }
2144
2149
  const e = {
2145
2150
  name: "Player",
2146
- color: Xt(),
2151
+ color: Nt(),
2147
2152
  uid: pe()
2148
2153
  };
2149
2154
  return ut(e), e;
@@ -2200,7 +2205,7 @@ const lr = g.createContext(), ut = (e) => {
2200
2205
  return delete n[t], { cursors: n };
2201
2206
  })
2202
2207
  }), fr = ({ storeName: e, children: t }) => {
2203
- const { wire: r, isMaster: n } = Xe("room"), [o, s] = g.useState(null), [a, u] = g.useState(!1), l = g.useRef(!1);
2208
+ const { wire: r, isMaster: n } = Ne("room"), [o, s] = g.useState(null), [a, u] = g.useState(!1), l = g.useRef(!1);
2204
2209
  return g.useEffect(() => {
2205
2210
  let d = !0;
2206
2211
  const f = [];
@@ -2223,8 +2228,8 @@ const lr = g.createContext(), ut = (e) => {
2223
2228
  ...On(...v)
2224
2229
  })
2225
2230
  )
2226
- ), _ = h.subscribe((v) => {
2227
- v.ready && (_(), d && s(h));
2231
+ ), S = h.subscribe((v) => {
2232
+ v.ready && (S(), d && s(h));
2228
2233
  });
2229
2234
  })(), () => {
2230
2235
  d = !1, l.current = !1, f.forEach((h) => h());
@@ -2248,11 +2253,11 @@ const lr = g.createContext(), ut = (e) => {
2248
2253
  }
2249
2254
  }, [n, o, r]), g.useEffect(() => {
2250
2255
  n && o && o.getState().updateCurrentUser({ isMaster: n });
2251
- }, [n, o, r]), a ? /* @__PURE__ */ T(lr.Provider, { value: o, children: t }) : null;
2256
+ }, [n, o, r]), a ? /* @__PURE__ */ k(lr.Provider, { value: o, children: t }) : null;
2252
2257
  }, Se = (e, t) => {
2253
2258
  const r = _e(lr);
2254
2259
  return We(r, e, t || Ve);
2255
- }, cs = () => {
2260
+ }, us = () => {
2256
2261
  const [e, t, r, n, o] = Se((u) => [
2257
2262
  u.isSpaceMaster,
2258
2263
  u.getUser(),
@@ -2271,7 +2276,7 @@ const lr = g.createContext(), ut = (e) => {
2271
2276
  localUsers: a,
2272
2277
  joinSpace: o
2273
2278
  };
2274
- }, us = () => {
2279
+ }, ls = () => {
2275
2280
  const [e, t, r] = oe(
2276
2281
  (o) => [o.boardConfig, o.getBoardConfig, o.setBoardConfig]
2277
2282
  ), n = g.useCallback(
@@ -2284,10 +2289,10 @@ const lr = g.createContext(), ut = (e) => {
2284
2289
  [t, r]
2285
2290
  );
2286
2291
  return [e, n];
2287
- }, ls = () => {
2288
- const [e] = Q((t) => [t.boardState]);
2289
- return e;
2290
2292
  }, fs = () => {
2293
+ const [e] = Z((t) => [t.boardState]);
2294
+ return e;
2295
+ }, ds = () => {
2291
2296
  const [e, t, r, n] = oe((o) => [
2292
2297
  o.getSessionInfo,
2293
2298
  o.setSessionInfo,
@@ -2327,7 +2332,7 @@ const lr = g.createContext(), ut = (e) => {
2327
2332
  children: t,
2328
2333
  defaultValue: r = []
2329
2334
  }) => {
2330
- const { wire: n } = Xe("room"), [o] = g.useState(
2335
+ const { wire: n } = Ne("room"), [o] = g.useState(
2331
2336
  () => Ue(
2332
2337
  dt(
2333
2338
  { wire: n, storeName: e, defaultValue: r, noSync: ["sendMessage"] },
@@ -2337,12 +2342,12 @@ const lr = g.createContext(), ut = (e) => {
2337
2342
  )
2338
2343
  )
2339
2344
  );
2340
- return /* @__PURE__ */ T(dr.Provider, { value: o, children: t });
2345
+ return /* @__PURE__ */ k(dr.Provider, { value: o, children: t });
2341
2346
  }, Pn = (e, t) => {
2342
2347
  const r = _e(dr);
2343
2348
  return We(r, e, t || Ve);
2344
2349
  }, Mn = () => {
2345
- }, ds = (e = Mn) => {
2350
+ }, ps = (e = Mn) => {
2346
2351
  const t = Se((a) => a.getUser()), [r, n, o] = Pn((a) => [
2347
2352
  a.messages,
2348
2353
  a.setMessages,
@@ -2363,7 +2368,7 @@ const lr = g.createContext(), ut = (e) => {
2363
2368
  return g.useEffect(() => (r(t), () => {
2364
2369
  r(null);
2365
2370
  }), [r, t]), e;
2366
- }, ps = ({
2371
+ }, ms = ({
2367
2372
  socket: e,
2368
2373
  room: t,
2369
2374
  session: r,
@@ -2376,60 +2381,148 @@ const lr = g.createContext(), ut = (e) => {
2376
2381
  itemIds: n.map(({ id: c }) => c),
2377
2382
  items: Object.fromEntries(n.map((c) => [c.id, c]))
2378
2383
  }));
2379
- return Xe("room") ? /* @__PURE__ */ T(
2384
+ return Ne("room") ? /* @__PURE__ */ k(
2380
2385
  Kt,
2381
2386
  {
2382
2387
  storeName: `${l}_messages`,
2383
2388
  defaultValue: o,
2384
- children: /* @__PURE__ */ T(Wt, { children: /* @__PURE__ */ T(
2389
+ children: /* @__PURE__ */ k(Wt, { children: /* @__PURE__ */ k(
2385
2390
  Ut,
2386
2391
  {
2387
2392
  storeName: `${l}_item`,
2388
2393
  defaultValue: d,
2389
- children: /* @__PURE__ */ T(Ht, { ...a, session: l })
2394
+ children: /* @__PURE__ */ k(Ht, { ...a, session: l })
2390
2395
  }
2391
2396
  ) })
2392
2397
  }
2393
- ) : /* @__PURE__ */ T(
2398
+ ) : /* @__PURE__ */ k(
2394
2399
  nr,
2395
2400
  {
2396
2401
  room: u,
2397
2402
  channel: "room",
2398
2403
  socket: e,
2399
2404
  LoadingComponent: s,
2400
- children: /* @__PURE__ */ T(fr, { storeName: `${u}_users`, children: /* @__PURE__ */ T(
2405
+ children: /* @__PURE__ */ k(fr, { storeName: `${u}_users`, children: /* @__PURE__ */ k(
2401
2406
  Kt,
2402
2407
  {
2403
2408
  storeName: `${l}_messages`,
2404
2409
  defaultValue: o,
2405
- children: /* @__PURE__ */ T(Wt, { children: /* @__PURE__ */ T(
2410
+ children: /* @__PURE__ */ k(Wt, { children: /* @__PURE__ */ k(
2406
2411
  Ut,
2407
2412
  {
2408
2413
  storeName: `${l}_item`,
2409
2414
  defaultValue: d,
2410
- children: /* @__PURE__ */ T(Ht, { ...a, session: l })
2415
+ children: /* @__PURE__ */ k(Ht, { ...a, session: l })
2411
2416
  }
2412
2417
  ) })
2413
2418
  }
2414
2419
  ) })
2415
2420
  }
2416
2421
  );
2417
- }, ms = ({ socket: e, room: t, children: r, LoadingComponent: n }) => {
2422
+ }, gs = ({ socket: e, room: t, children: r, LoadingComponent: n }) => {
2418
2423
  const [o] = g.useState(t || pe());
2419
- return /* @__PURE__ */ T(
2424
+ return /* @__PURE__ */ k(
2420
2425
  nr,
2421
2426
  {
2422
2427
  room: o,
2423
2428
  channel: "room",
2424
2429
  socket: e,
2425
2430
  LoadingComponent: n,
2426
- children: /* @__PURE__ */ T(fr, { storeName: `${o}_users`, children: r })
2431
+ children: /* @__PURE__ */ k(fr, { storeName: `${o}_users`, children: r })
2427
2432
  }
2428
2433
  );
2429
- }, nt = () => {
2434
+ };
2435
+ let jn = { data: "" }, Dn = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || jn, $n = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, An = /\/\*[^]*?\*\/| +/g, qt = /\n+/g, fe = (e, t) => {
2436
+ let r = "", n = "", o = "";
2437
+ for (let s in e) {
2438
+ let a = e[s];
2439
+ s[0] == "@" ? s[1] == "i" ? r = s + " " + a + ";" : n += s[1] == "f" ? fe(a, s) : s + "{" + fe(a, s[1] == "k" ? "" : t) + "}" : typeof a == "object" ? n += fe(a, t ? t.replace(/([^,])+/g, (u) => s.replace(/(^:.*)|([^,])+/g, (l) => /&/.test(l) ? l.replace(/&/g, u) : u ? u + " " + l : l)) : s) : a != null && (s = /^--/.test(s) ? s : s.replace(/[A-Z]/g, "-$&").toLowerCase(), o += fe.p ? fe.p(s, a) : s + ":" + a + ";");
2440
+ }
2441
+ return r + (t && o ? t + "{" + o + "}" : o) + n;
2442
+ }, ce = {}, pr = (e) => {
2443
+ if (typeof e == "object") {
2444
+ let t = "";
2445
+ for (let r in e)
2446
+ t += r + pr(e[r]);
2447
+ return t;
2448
+ }
2449
+ return e;
2450
+ }, Ln = (e, t, r, n, o) => {
2451
+ let s = pr(e), a = ce[s] || (ce[s] = ((l) => {
2452
+ let d = 0, f = 11;
2453
+ for (; d < l.length; )
2454
+ f = 101 * f + l.charCodeAt(d++) >>> 0;
2455
+ return "go" + f;
2456
+ })(s));
2457
+ if (!ce[a]) {
2458
+ let l = s !== e ? e : ((d) => {
2459
+ let f, c, h = [{}];
2460
+ for (; f = $n.exec(d.replace(An, "")); )
2461
+ f[4] ? h.shift() : f[3] ? (c = f[3].replace(qt, " ").trim(), h.unshift(h[0][c] = h[0][c] || {})) : h[0][f[1]] = f[2].replace(qt, " ").trim();
2462
+ return h[0];
2463
+ })(e);
2464
+ ce[a] = fe(o ? { ["@keyframes " + a]: l } : l, r ? "" : "." + a);
2465
+ }
2466
+ let u = r && ce.g ? ce.g : null;
2467
+ return r && (ce.g = ce[a]), ((l, d, f, c) => {
2468
+ c ? d.data = d.data.replace(c, l) : d.data.indexOf(l) === -1 && (d.data = f ? l + d.data : d.data + l);
2469
+ })(ce[a], t, n, u), a;
2470
+ }, zn = (e, t, r) => e.reduce((n, o, s) => {
2471
+ let a = t[s];
2472
+ if (a && a.call) {
2473
+ let u = a(r), l = u && u.props && u.props.className || /^go/.test(u) && u;
2474
+ a = l ? "." + l : u && typeof u == "object" ? u.props ? "" : fe(u, "") : u === !1 ? "" : u;
2475
+ }
2476
+ return n + o + (a ?? "");
2477
+ }, "");
2478
+ function K(e) {
2479
+ let t = this || {}, r = e.call ? e(t.p) : e;
2480
+ return Ln(r.unshift ? r.raw ? zn(r, [].slice.call(arguments, 1), t.p) : r.reduce((n, o) => Object.assign(n, o && o.call ? o(t.p) : o), {}) : r, Dn(t.target), t.g, t.o, t.k);
2481
+ }
2482
+ K.bind({ g: 1 });
2483
+ K.bind({ k: 1 });
2484
+ function Yn(e, t, r, n) {
2485
+ fe.p = t;
2486
+ }
2487
+ var Bn = function e(t, r) {
2488
+ if (t === r)
2489
+ return !0;
2490
+ if (t && r && typeof t == "object" && typeof r == "object") {
2491
+ if (t.constructor !== r.constructor)
2492
+ return !1;
2493
+ var n, o, s;
2494
+ if (Array.isArray(t)) {
2495
+ if (n = t.length, n != r.length)
2496
+ return !1;
2497
+ for (o = n; o-- !== 0; )
2498
+ if (!e(t[o], r[o]))
2499
+ return !1;
2500
+ return !0;
2501
+ }
2502
+ if (t.constructor === RegExp)
2503
+ return t.source === r.source && t.flags === r.flags;
2504
+ if (t.valueOf !== Object.prototype.valueOf)
2505
+ return t.valueOf() === r.valueOf();
2506
+ if (t.toString !== Object.prototype.toString)
2507
+ return t.toString() === r.toString();
2508
+ if (s = Object.keys(t), n = s.length, n !== Object.keys(r).length)
2509
+ return !1;
2510
+ for (o = n; o-- !== 0; )
2511
+ if (!Object.prototype.hasOwnProperty.call(r, s[o]))
2512
+ return !1;
2513
+ for (o = n; o-- !== 0; ) {
2514
+ var a = s[o];
2515
+ if (!e(t[a], r[a]))
2516
+ return !1;
2517
+ }
2518
+ return !0;
2519
+ }
2520
+ return t !== t && r !== r;
2521
+ };
2522
+ const nt = () => {
2430
2523
  const e = navigator.userAgent.toLowerCase();
2431
2524
  return /mac os ?x 10/.test(e);
2432
- }, jn = () => {
2525
+ }, Xn = () => {
2433
2526
  const e = document.createElement("iframe");
2434
2527
  e.src = "#", document.body.appendChild(e);
2435
2528
  const t = e.contentWindow.document;
@@ -2438,34 +2531,34 @@ const lr = g.createContext(), ut = (e) => {
2438
2531
  ), t.close();
2439
2532
  const r = t.body.firstElementChild.offsetHeight;
2440
2533
  return document.body.removeChild(e), r;
2441
- }, Dn = jn(), $n = 800, qt = (e, t) => {
2534
+ }, Nn = Xn(), Un = 800, Gt = (e, t) => {
2442
2535
  const r = Object.keys(e).map((n) => Number(n)).find((n) => n !== t);
2443
2536
  return e[r];
2444
- }, Gt = ([e, t], [r, n]) => {
2537
+ }, Jt = ([e, t], [r, n]) => {
2445
2538
  const o = Math.abs(e - r), s = Math.abs(t - n);
2446
2539
  return Math.hypot(o, s);
2447
2540
  }, de = () => {
2448
- }, An = (e) => (t) => {
2541
+ }, Wn = (e) => (t) => {
2449
2542
  const { event: r } = t;
2450
2543
  return r.isPropagationStopped() ? null : e(t);
2451
- }, Ln = (e) => async (...t) => {
2544
+ }, Vn = (e) => async (...t) => {
2452
2545
  try {
2453
2546
  await e(...t);
2454
2547
  } catch (r) {
2455
2548
  console.error(r);
2456
2549
  }
2457
2550
  };
2458
- class zn {
2551
+ class Fn {
2459
2552
  constructor() {
2460
2553
  kt(this, "lastPromise", Promise.resolve(!0));
2461
2554
  }
2462
2555
  add(t, ...r) {
2463
2556
  return new Promise((n, o) => {
2464
- this.lastPromise = this.lastPromise.then(() => An(Ln(t))(...r)).then(n).catch(o);
2557
+ this.lastPromise = this.lastPromise.then(() => Wn(Vn(t))(...r)).then(n).catch(o);
2465
2558
  });
2466
2559
  }
2467
2560
  }
2468
- const se = new zn(), Fe = ({
2561
+ const se = new Fn(), Fe = ({
2469
2562
  children: e,
2470
2563
  onDrag: t = de,
2471
2564
  onDragStart: r = de,
@@ -2486,21 +2579,21 @@ const se = new zn(), Fe = ({
2486
2579
  deltaX: C,
2487
2580
  deltaY: x,
2488
2581
  clientX: p,
2489
- clientY: w,
2582
+ clientY: _,
2490
2583
  deltaMode: m,
2491
- ctrlKey: S,
2492
- altKey: O,
2493
- metaKey: k,
2584
+ ctrlKey: w,
2585
+ altKey: R,
2586
+ metaKey: T,
2494
2587
  target: j
2495
2588
  } = y;
2496
- if (!(O || S && !nt()))
2497
- if (nt() && !S)
2589
+ if (!(R || w && !nt()))
2590
+ if (nt() && !w)
2498
2591
  se.add(o, {
2499
2592
  deltaX: -2 * C,
2500
2593
  deltaY: -2 * x,
2501
2594
  button: 1,
2502
- ctrlKey: S,
2503
- metaKey: k,
2595
+ ctrlKey: w,
2596
+ metaKey: T,
2504
2597
  target: j,
2505
2598
  event: y
2506
2599
  });
@@ -2510,43 +2603,43 @@ const se = new zn(), Fe = ({
2510
2603
  let M = x;
2511
2604
  switch (m) {
2512
2605
  case 1:
2513
- M *= Dn;
2606
+ M *= Nn;
2514
2607
  break;
2515
2608
  case 2:
2516
- M *= $n;
2609
+ M *= Un;
2517
2610
  break;
2518
2611
  }
2519
- nt() && (M *= 2), se.add(l, { scale: M, clientX: p, clientY: w, event: y });
2612
+ nt() && (M *= 2), se.add(l, { scale: M, clientX: p, clientY: _, event: y });
2520
2613
  }
2521
- }, _ = (y) => {
2614
+ }, S = (y) => {
2522
2615
  const {
2523
2616
  target: C,
2524
2617
  button: x,
2525
2618
  clientX: p,
2526
- clientY: w,
2619
+ clientY: _,
2527
2620
  pointerId: m,
2528
- altKey: S,
2529
- ctrlKey: O,
2530
- metaKey: k,
2621
+ altKey: w,
2622
+ ctrlKey: R,
2623
+ metaKey: T,
2531
2624
  isPrimary: j
2532
2625
  } = y;
2533
- if (c.current.pointers[m] = { clientX: p, clientY: w }, j && (c.current.mainPointer = void 0), c.current.mainPointer !== void 0) {
2626
+ if (c.current.pointers[m] = { clientX: p, clientY: _ }, j && (c.current.mainPointer = void 0), c.current.mainPointer !== void 0) {
2534
2627
  if (c.current.mainPointer !== m)
2535
2628
  try {
2536
- const { clientX: M, clientY: A } = qt(
2629
+ const { clientX: M, clientY: A } = Gt(
2537
2630
  c.current.pointers,
2538
2631
  m
2539
- ), N = (M + p) / 2, U = (A + w) / 2, J = Gt(
2632
+ ), B = (M + p) / 2, U = (A + _) / 2, J = Jt(
2540
2633
  [M, A],
2541
- [p, w]
2634
+ [p, _]
2542
2635
  );
2543
2636
  Object.assign(c.current, {
2544
2637
  pressed: !0,
2545
2638
  moving: !1,
2546
2639
  gestureStart: !1,
2547
2640
  startX: p,
2548
- startY: w,
2549
- prevX: N,
2641
+ startY: _,
2642
+ prevX: B,
2550
2643
  prevY: U,
2551
2644
  startDistance: J,
2552
2645
  prevDistance: J
@@ -2561,9 +2654,9 @@ const se = new zn(), Fe = ({
2561
2654
  moving: !1,
2562
2655
  gestureStart: !1,
2563
2656
  startX: p,
2564
- startY: w,
2657
+ startY: _,
2565
2658
  prevX: p,
2566
- prevY: w,
2659
+ prevY: _,
2567
2660
  currentButton: x,
2568
2661
  pointerDownEvent: y,
2569
2662
  startDistance: 0,
@@ -2573,10 +2666,10 @@ const se = new zn(), Fe = ({
2573
2666
  longTapTimeout: setTimeout(async () => {
2574
2667
  c.current.noTap = !0, se.add(a, {
2575
2668
  clientX: p,
2576
- clientY: w,
2577
- altKey: S,
2578
- ctrlKey: O,
2579
- metaKey: k,
2669
+ clientY: _,
2670
+ altKey: w,
2671
+ ctrlKey: R,
2672
+ metaKey: T,
2580
2673
  target: C,
2581
2674
  event: y
2582
2675
  });
@@ -2593,30 +2686,30 @@ const se = new zn(), Fe = ({
2593
2686
  pointerId: C,
2594
2687
  clientX: x,
2595
2688
  clientY: p,
2596
- altKey: w,
2689
+ altKey: _,
2597
2690
  shiftKey: m,
2598
- ctrlKey: S,
2599
- metaKey: O,
2600
- buttons: k
2691
+ ctrlKey: w,
2692
+ metaKey: R,
2693
+ buttons: T
2601
2694
  } = y;
2602
2695
  c.current.pointers[C] = {
2603
2696
  clientX: x,
2604
2697
  clientY: p
2605
2698
  }, c.current.moving = !0;
2606
2699
  const j = Object.keys(c.current.pointers).length === 2;
2607
- let M, A, N = 0;
2700
+ let M, A, B = 0;
2608
2701
  if (j) {
2609
- const { clientX: $, clientY: z } = qt(
2702
+ const { clientX: $, clientY: Y } = Gt(
2610
2703
  c.current.pointers,
2611
2704
  C
2612
2705
  );
2613
- M = ($ + x) / 2, A = (z + p) / 2, N = Gt(
2614
- [$, z],
2706
+ M = ($ + x) / 2, A = (Y + p) / 2, B = Jt(
2707
+ [$, Y],
2615
2708
  [x, p]
2616
2709
  );
2617
2710
  } else
2618
2711
  M = x, A = p;
2619
- let U = m || w || S || O || k !== 1;
2712
+ let U = m || _ || w || R || T !== 1;
2620
2713
  d !== "drag" && (U = !U);
2621
2714
  const J = !U, P = U;
2622
2715
  if (J) {
@@ -2630,53 +2723,53 @@ const se = new zn(), Fe = ({
2630
2723
  distanceX: 0,
2631
2724
  distanceY: 0,
2632
2725
  button: c.current.currentButton,
2633
- altKey: w,
2726
+ altKey: _,
2634
2727
  shiftKey: m,
2635
- ctrlKey: S,
2636
- metaKey: O,
2728
+ ctrlKey: w,
2729
+ metaKey: R,
2637
2730
  target: c.current.target,
2638
2731
  event: c.current.pointerDownEvent
2639
2732
  }));
2640
- const $ = M - c.current.prevX, z = A - c.current.prevY, V = M - c.current.startX, Y = A - c.current.startY;
2733
+ const $ = M - c.current.prevX, Y = A - c.current.prevY, V = M - c.current.startX, L = A - c.current.startY;
2641
2734
  se.add(t, {
2642
2735
  deltaX: $,
2643
- deltaY: z,
2736
+ deltaY: Y,
2644
2737
  startX: c.current.startX,
2645
2738
  startY: c.current.startY,
2646
2739
  clientX: M,
2647
2740
  clientY: A,
2648
2741
  distanceX: V,
2649
- distanceY: Y,
2742
+ distanceY: L,
2650
2743
  button: c.current.currentButton,
2651
- altKey: w,
2744
+ altKey: _,
2652
2745
  shiftKey: m,
2653
- ctrlKey: S,
2654
- metaKey: O,
2746
+ ctrlKey: w,
2747
+ metaKey: R,
2655
2748
  target: c.current.target,
2656
2749
  event: y
2657
2750
  });
2658
2751
  }
2659
2752
  if (P) {
2660
2753
  c.current.gestureStart || (f.current.style.cursor = "move", c.current.gestureStart = !0, clearTimeout(c.current.longTapTimeout));
2661
- const $ = M - c.current.prevX, z = A - c.current.prevY, { target: V } = c.current;
2754
+ const $ = M - c.current.prevX, Y = A - c.current.prevY, { target: V } = c.current;
2662
2755
  if (se.add(o, {
2663
2756
  deltaX: $,
2664
- deltaY: z,
2757
+ deltaY: Y,
2665
2758
  button: c.current.currentButton,
2666
- altKey: w,
2759
+ altKey: _,
2667
2760
  shiftKey: m,
2668
- ctrlKey: S,
2669
- metaKey: O,
2761
+ ctrlKey: w,
2762
+ metaKey: R,
2670
2763
  target: V,
2671
2764
  event: y
2672
- }), N !== c.current.prevDistance && l) {
2673
- const Y = c.current.prevDistance - N;
2674
- Math.abs(Y) > 0 && (se.add(l, {
2675
- scale: Y * 3,
2765
+ }), B !== c.current.prevDistance && l) {
2766
+ const L = c.current.prevDistance - B;
2767
+ Math.abs(L) > 0 && (se.add(l, {
2768
+ scale: L * 3,
2676
2769
  clientX: M,
2677
2770
  clientY: A,
2678
2771
  event: y
2679
- }), c.current.prevDistance = N);
2772
+ }), c.current.prevDistance = B);
2680
2773
  }
2681
2774
  }
2682
2775
  c.current.prevX = M, c.current.prevY = A;
@@ -2686,14 +2779,14 @@ const se = new zn(), Fe = ({
2686
2779
  clientX: C,
2687
2780
  clientY: x,
2688
2781
  altKey: p,
2689
- shiftKey: w,
2782
+ shiftKey: _,
2690
2783
  ctrlKey: m,
2691
- metaKey: S,
2692
- target: O,
2693
- pointerId: k
2784
+ metaKey: w,
2785
+ target: R,
2786
+ pointerId: T
2694
2787
  } = y;
2695
- if (c.current.pointers[k]) {
2696
- if (delete c.current.pointers[k], c.current.mainPointer !== k) {
2788
+ if (c.current.pointers[T]) {
2789
+ if (delete c.current.pointers[T], c.current.mainPointer !== T) {
2697
2790
  const { clientX: j, clientY: M } = c.current.pointers[c.current.mainPointer];
2698
2791
  Object.assign(c.current, {
2699
2792
  prevX: j,
@@ -2733,9 +2826,9 @@ const se = new zn(), Fe = ({
2733
2826
  distanceY: x - c.current.startY,
2734
2827
  button: c.current.currentButton,
2735
2828
  altKey: p,
2736
- shiftKey: w,
2829
+ shiftKey: _,
2737
2830
  ctrlKey: m,
2738
- metaKey: S,
2831
+ metaKey: w,
2739
2832
  event: y
2740
2833
  }), f.current.style.cursor = "auto";
2741
2834
  else {
@@ -2744,35 +2837,35 @@ const se = new zn(), Fe = ({
2744
2837
  clientX: C,
2745
2838
  clientY: x,
2746
2839
  altKey: p,
2747
- shiftKey: w,
2840
+ shiftKey: _,
2748
2841
  ctrlKey: m,
2749
- metaKey: S,
2750
- target: O,
2842
+ metaKey: w,
2843
+ target: R,
2751
2844
  event: y
2752
2845
  });
2753
2846
  }
2754
2847
  }
2755
2848
  };
2756
- return /* @__PURE__ */ T(
2849
+ return /* @__PURE__ */ k(
2757
2850
  "div",
2758
2851
  {
2759
2852
  onWheel: h,
2760
- onPointerDown: _,
2853
+ onPointerDown: S,
2761
2854
  onPointerMove: v,
2762
2855
  onPointerUp: E,
2763
2856
  onPointerOut: E,
2764
2857
  onPointerLeave: E,
2765
2858
  onPointerCancel: E,
2766
2859
  onDoubleClick: (y) => {
2767
- const { clientX: C, clientY: x, altKey: p, shiftKey: w, ctrlKey: m, metaKey: S, target: O } = y;
2860
+ const { clientX: C, clientY: x, altKey: p, shiftKey: _, ctrlKey: m, metaKey: w, target: R } = y;
2768
2861
  se.add(u, {
2769
2862
  clientX: C,
2770
2863
  clientY: x,
2771
2864
  altKey: p,
2772
- shiftKey: w,
2865
+ shiftKey: _,
2773
2866
  ctrlKey: m,
2774
- metaKey: S,
2775
- target: O,
2867
+ metaKey: w,
2868
+ target: R,
2776
2869
  event: y
2777
2870
  });
2778
2871
  },
@@ -2782,104 +2875,16 @@ const se = new zn(), Fe = ({
2782
2875
  }
2783
2876
  );
2784
2877
  }, ot = ({ onResize: e, ...t }) => {
2785
- const [r] = Q((o) => [o.getBoardState]);
2786
- return /* @__PURE__ */ T(Fe, { onDrag: ({ deltaX: o, deltaY: s, event: a }) => {
2878
+ const [r] = Z((o) => [o.getBoardState]);
2879
+ return /* @__PURE__ */ k(Fe, { onDrag: ({ deltaX: o, deltaY: s, event: a }) => {
2787
2880
  a.stopPropagation();
2788
2881
  const { scale: u } = r();
2789
2882
  e({
2790
2883
  width: o / u,
2791
2884
  height: s / u
2792
2885
  });
2793
- }, children: /* @__PURE__ */ T("div", { ...t }) });
2794
- };
2795
- let Yn = { data: "" }, Bn = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || Yn, Nn = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, Xn = /\/\*[^]*?\*\/| +/g, Jt = /\n+/g, fe = (e, t) => {
2796
- let r = "", n = "", o = "";
2797
- for (let s in e) {
2798
- let a = e[s];
2799
- s[0] == "@" ? s[1] == "i" ? r = s + " " + a + ";" : n += s[1] == "f" ? fe(a, s) : s + "{" + fe(a, s[1] == "k" ? "" : t) + "}" : typeof a == "object" ? n += fe(a, t ? t.replace(/([^,])+/g, (u) => s.replace(/(^:.*)|([^,])+/g, (l) => /&/.test(l) ? l.replace(/&/g, u) : u ? u + " " + l : l)) : s) : a != null && (s = /^--/.test(s) ? s : s.replace(/[A-Z]/g, "-$&").toLowerCase(), o += fe.p ? fe.p(s, a) : s + ":" + a + ";");
2800
- }
2801
- return r + (t && o ? t + "{" + o + "}" : o) + n;
2802
- }, ce = {}, pr = (e) => {
2803
- if (typeof e == "object") {
2804
- let t = "";
2805
- for (let r in e)
2806
- t += r + pr(e[r]);
2807
- return t;
2808
- }
2809
- return e;
2810
- }, Un = (e, t, r, n, o) => {
2811
- let s = pr(e), a = ce[s] || (ce[s] = ((l) => {
2812
- let d = 0, f = 11;
2813
- for (; d < l.length; )
2814
- f = 101 * f + l.charCodeAt(d++) >>> 0;
2815
- return "go" + f;
2816
- })(s));
2817
- if (!ce[a]) {
2818
- let l = s !== e ? e : ((d) => {
2819
- let f, c, h = [{}];
2820
- for (; f = Nn.exec(d.replace(Xn, "")); )
2821
- f[4] ? h.shift() : f[3] ? (c = f[3].replace(Jt, " ").trim(), h.unshift(h[0][c] = h[0][c] || {})) : h[0][f[1]] = f[2].replace(Jt, " ").trim();
2822
- return h[0];
2823
- })(e);
2824
- ce[a] = fe(o ? { ["@keyframes " + a]: l } : l, r ? "" : "." + a);
2825
- }
2826
- let u = r && ce.g ? ce.g : null;
2827
- return r && (ce.g = ce[a]), ((l, d, f, c) => {
2828
- c ? d.data = d.data.replace(c, l) : d.data.indexOf(l) === -1 && (d.data = f ? l + d.data : d.data + l);
2829
- })(ce[a], t, n, u), a;
2830
- }, Wn = (e, t, r) => e.reduce((n, o, s) => {
2831
- let a = t[s];
2832
- if (a && a.call) {
2833
- let u = a(r), l = u && u.props && u.props.className || /^go/.test(u) && u;
2834
- a = l ? "." + l : u && typeof u == "object" ? u.props ? "" : fe(u, "") : u === !1 ? "" : u;
2835
- }
2836
- return n + o + (a ?? "");
2837
- }, "");
2838
- function K(e) {
2839
- let t = this || {}, r = e.call ? e(t.p) : e;
2840
- return Un(r.unshift ? r.raw ? Wn(r, [].slice.call(arguments, 1), t.p) : r.reduce((n, o) => Object.assign(n, o && o.call ? o(t.p) : o), {}) : r, Bn(t.target), t.g, t.o, t.k);
2841
- }
2842
- K.bind({ g: 1 });
2843
- K.bind({ k: 1 });
2844
- function Vn(e, t, r, n) {
2845
- fe.p = t;
2846
- }
2847
- var Fn = function e(t, r) {
2848
- if (t === r)
2849
- return !0;
2850
- if (t && r && typeof t == "object" && typeof r == "object") {
2851
- if (t.constructor !== r.constructor)
2852
- return !1;
2853
- var n, o, s;
2854
- if (Array.isArray(t)) {
2855
- if (n = t.length, n != r.length)
2856
- return !1;
2857
- for (o = n; o-- !== 0; )
2858
- if (!e(t[o], r[o]))
2859
- return !1;
2860
- return !0;
2861
- }
2862
- if (t.constructor === RegExp)
2863
- return t.source === r.source && t.flags === r.flags;
2864
- if (t.valueOf !== Object.prototype.valueOf)
2865
- return t.valueOf() === r.valueOf();
2866
- if (t.toString !== Object.prototype.toString)
2867
- return t.toString() === r.toString();
2868
- if (s = Object.keys(t), n = s.length, n !== Object.keys(r).length)
2869
- return !1;
2870
- for (o = n; o-- !== 0; )
2871
- if (!Object.prototype.hasOwnProperty.call(r, s[o]))
2872
- return !1;
2873
- for (o = n; o-- !== 0; ) {
2874
- var a = s[o];
2875
- if (!e(t[a], r[a]))
2876
- return !1;
2877
- }
2878
- return !0;
2879
- }
2880
- return t !== t && r !== r;
2881
- };
2882
- const Kn = K`
2886
+ }, children: /* @__PURE__ */ k("div", { ...t }) });
2887
+ }, Kn = K`
2883
2888
  display: inline-block;
2884
2889
  transition: transform 150ms;
2885
2890
  user-select: none;
@@ -2941,7 +2946,7 @@ const Kn = K`
2941
2946
  })}`,
2942
2947
  children: [
2943
2948
  "Sorry, this item seems broken.",
2944
- /* @__PURE__ */ T("button", { onClick: e, children: "Reload it" })
2949
+ /* @__PURE__ */ k("button", { onClick: e, children: "Reload it" })
2945
2950
  ]
2946
2951
  }
2947
2952
  );
@@ -2964,7 +2969,7 @@ class oo extends g.Component {
2964
2969
  }
2965
2970
  render() {
2966
2971
  const { ErrorComponent: t } = this.props;
2967
- return this.state.hasError ? /* @__PURE__ */ T(t, { onReload: this.onReload }) : this.props.children;
2972
+ return this.state.hasError ? /* @__PURE__ */ k(t, { onReload: this.onReload }) : this.props.children;
2968
2973
  }
2969
2974
  }
2970
2975
  const so = (e) => {
@@ -3006,88 +3011,89 @@ const so = (e) => {
3006
3011
  itemMap: d,
3007
3012
  showResizeHandle: f = !0
3008
3013
  }) => {
3009
- var m;
3010
- const c = g.useRef(null), {
3011
- component: h = () => null,
3012
- resizeDirections: _ = ao,
3013
- resize: v = io
3014
- } = d[t], E = g.useCallback(
3015
- (S, O = !1) => e(n, S, O),
3014
+ var w;
3015
+ const c = g.useRef(null), [h] = Z((R) => [R.config.uid]), {
3016
+ component: S = () => null,
3017
+ resizeDirections: v = ao,
3018
+ resize: E = io
3019
+ } = d[t], O = g.useCallback(
3020
+ (R, T = !1) => e(n, R, T),
3016
3021
  [e, n]
3017
3022
  );
3018
3023
  g.useEffect(() => {
3019
3024
  c.current.className = u;
3020
3025
  }, [u]);
3021
- const I = ["item", n, Kn];
3022
- o && I.push("locked"), l && (I.push("selected"), I.push(Hn));
3023
- const y = I.join(" "), C = ({ width: S = 0, height: O = 0, keepRatio: k }) => {
3024
- E((j) => {
3025
- const { offsetWidth: M, offsetHeight: A } = c.current;
3026
- return v({
3027
- prevState: j,
3028
- width: S,
3029
- height: O,
3030
- actualHeight: A,
3031
- actualWidth: M,
3032
- keepRatio: k
3026
+ const y = ["item", n, Kn];
3027
+ o && y.push("locked"), l && (y.push("selected"), y.push(Hn));
3028
+ const C = y.join(" "), x = ({ width: R = 0, height: T = 0, keepRatio: j }) => {
3029
+ O((M) => {
3030
+ const { offsetWidth: A, offsetHeight: B } = c.current;
3031
+ return E({
3032
+ prevState: M,
3033
+ width: R,
3034
+ height: T,
3035
+ actualHeight: B,
3036
+ actualWidth: A,
3037
+ keepRatio: j
3033
3038
  });
3034
3039
  });
3035
- }, x = ({ width: S }) => {
3036
- C({ width: S });
3037
- }, p = ({ height: S }) => {
3038
- C({ height: S });
3039
- }, w = ({ width: S }) => {
3040
- C({ height: S, width: S, keepRatio: !0 });
3040
+ }, p = ({ width: R }) => {
3041
+ x({ width: R });
3042
+ }, _ = ({ height: R }) => {
3043
+ x({ height: R });
3044
+ }, m = ({ width: R }) => {
3045
+ x({ height: R, width: R, keepRatio: !0 });
3041
3046
  };
3042
- return /* @__PURE__ */ T(
3047
+ return /* @__PURE__ */ k(
3043
3048
  "div",
3044
3049
  {
3045
3050
  style: { transform: `rotate(${r}deg` },
3046
3051
  "data-id": n,
3047
- className: y,
3052
+ id: `${h}__${n}`,
3053
+ className: C,
3048
3054
  children: /* @__PURE__ */ le(
3049
3055
  "div",
3050
3056
  {
3051
3057
  style: { display: "flex" },
3052
3058
  ref: c,
3053
3059
  onAnimationEnd: so,
3054
- onKeyDown: (S) => S.stopPropagation(),
3055
- onKeyUp: (S) => S.stopPropagation(),
3060
+ onKeyDown: (R) => R.stopPropagation(),
3061
+ onKeyUp: (R) => R.stopPropagation(),
3056
3062
  children: [
3057
- /* @__PURE__ */ T(
3063
+ /* @__PURE__ */ k(
3058
3064
  oo,
3059
3065
  {
3060
3066
  itemId: n,
3061
3067
  state: a,
3062
- ErrorComponent: ((m = d == null ? void 0 : d.error) == null ? void 0 : m.component) || no,
3063
- children: /* @__PURE__ */ T(h, { ...a, id: n, setState: E })
3068
+ ErrorComponent: ((w = d == null ? void 0 : d.error) == null ? void 0 : w.component) || no,
3069
+ children: /* @__PURE__ */ k(S, { ...a, id: n, setState: O })
3064
3070
  }
3065
3071
  ),
3066
- /* @__PURE__ */ T("div", { className: `corner ${Ce} ${qn}` }),
3067
- /* @__PURE__ */ T("div", { className: `corner ${Ce} ${Gn}` }),
3068
- /* @__PURE__ */ T("div", { className: `corner ${Ce} ${Zn}` }),
3069
- /* @__PURE__ */ T("div", { className: `corner ${Ce} ${Jn}` }),
3070
- /* @__PURE__ */ T("div", { className: `center ${Ce} ${Qn}` }),
3072
+ /* @__PURE__ */ k("div", { className: `corner ${Ce} ${qn}` }),
3073
+ /* @__PURE__ */ k("div", { className: `corner ${Ce} ${Gn}` }),
3074
+ /* @__PURE__ */ k("div", { className: `corner ${Ce} ${Zn}` }),
3075
+ /* @__PURE__ */ k("div", { className: `corner ${Ce} ${Jn}` }),
3076
+ /* @__PURE__ */ k("div", { className: `center ${Ce} ${Qn}` }),
3071
3077
  f && /* @__PURE__ */ le(Wr, { children: [
3072
- _.b && /* @__PURE__ */ T(
3078
+ v.b && /* @__PURE__ */ k(
3073
3079
  ot,
3074
3080
  {
3075
3081
  className: `${st} ${ro}`,
3076
- onResize: w
3082
+ onResize: m
3077
3083
  }
3078
3084
  ),
3079
- _.h && /* @__PURE__ */ T(
3085
+ v.h && /* @__PURE__ */ k(
3080
3086
  ot,
3081
3087
  {
3082
3088
  className: `${st} ${to}`,
3083
- onResize: p
3089
+ onResize: _
3084
3090
  }
3085
3091
  ),
3086
- _.w && /* @__PURE__ */ T(
3092
+ v.w && /* @__PURE__ */ k(
3087
3093
  ot,
3088
3094
  {
3089
3095
  className: `${st} ${eo}`,
3090
- onResize: x
3096
+ onResize: p
3091
3097
  }
3092
3098
  )
3093
3099
  ] })
@@ -3108,7 +3114,7 @@ const so = (e) => {
3108
3114
  setState: s,
3109
3115
  isSelected: a,
3110
3116
  showResizeHandle: u
3111
- }) => r === a && n === u && t === s && Fn(e, o)
3117
+ }) => r === a && n === u && t === s && Bn(e, o)
3112
3118
  ), lo = (e) => e, fo = ({ state: e = {}, getCurrentUser: t, className: r, ...n }) => {
3113
3119
  if (!n.itemMap[e.type])
3114
3120
  return null;
@@ -3119,7 +3125,7 @@ const so = (e) => {
3119
3125
  moving: l,
3120
3126
  ...d
3121
3127
  } = o(e, { getCurrentUser: t }), f = (u + 4) * 10 + 100 + (l ? 5 : 0);
3122
- return /* @__PURE__ */ T(
3128
+ return /* @__PURE__ */ k(
3123
3129
  "div",
3124
3130
  {
3125
3131
  className: r,
@@ -3127,7 +3133,7 @@ const so = (e) => {
3127
3133
  transform: `translate(${s}px, ${a}px)`,
3128
3134
  zIndex: f
3129
3135
  },
3130
- children: /* @__PURE__ */ T(
3136
+ children: /* @__PURE__ */ k(
3131
3137
  uo,
3132
3138
  {
3133
3139
  ...n,
@@ -3141,7 +3147,7 @@ const so = (e) => {
3141
3147
  const { updateItem: e } = gt(), [t, r] = oe((d) => [
3142
3148
  d.itemIds,
3143
3149
  d.items
3144
- ]), [n, o, s, a] = Q(
3150
+ ]), [n, o, s, a] = Z(
3145
3151
  (d) => [
3146
3152
  d.config.boardSize,
3147
3153
  d.config.showResizeHandle,
@@ -3155,7 +3161,7 @@ const so = (e) => {
3155
3161
  display: "inline-block",
3156
3162
  lineHeight: 0
3157
3163
  });
3158
- return t.map((d) => /* @__PURE__ */ T(
3164
+ return t.map((d) => /* @__PURE__ */ k(
3159
3165
  po,
3160
3166
  {
3161
3167
  state: r[d],
@@ -3227,7 +3233,7 @@ const So = K({
3227
3233
  s,
3228
3234
  a,
3229
3235
  u
3230
- ] = Q((m) => [
3236
+ ] = Z((m) => [
3231
3237
  m.getSelection,
3232
3238
  m.clear,
3233
3239
  m.setSelection,
@@ -3235,7 +3241,7 @@ const So = K({
3235
3241
  m.getConfiguration,
3236
3242
  m.getBoardState,
3237
3243
  m.updateBoardState
3238
- ]), { findElementUnderPointer: l } = gt(), [d] = oe((m) => [m.getItems]), [f, c] = g.useState({}), [, h] = g.useTransition(), [_, v] = g.useState(!1), E = g.useRef(null), I = g.useRef({
3244
+ ]), { findElementUnderPointer: l } = gt(), [d] = oe((m) => [m.getItems]), [f, c] = g.useState({}), [, h] = g.useTransition(), [S, v] = g.useState(!1), E = g.useRef(null), O = g.useRef({
3239
3245
  moving: !1
3240
3246
  });
3241
3247
  return ue(document, "keydown", (m) => {
@@ -3245,34 +3251,34 @@ const So = K({
3245
3251
  }), g.useEffect(() => (n(), () => {
3246
3252
  n();
3247
3253
  }), [n]), g.useEffect(() => {
3248
- if (I.current.moving) {
3249
- const m = d(), { boardWrapper: S } = a(), O = _o(m, S, _);
3254
+ if (O.current.moving) {
3255
+ const m = d(), { boardWrapper: w } = a(), R = _o(m, w, S);
3250
3256
  h(() => {
3251
- o(O);
3257
+ o(R);
3252
3258
  });
3253
3259
  }
3254
- }, [a, d, f, o, _]), /* @__PURE__ */ T(
3260
+ }, [a, d, f, o, S]), /* @__PURE__ */ k(
3255
3261
  Fe,
3256
3262
  {
3257
3263
  onDragStart: async (m) => {
3258
- await l(m) || (I.current.moving = !0, h(() => {
3264
+ await l(m) || (O.current.moving = !0, h(() => {
3259
3265
  u({ selecting: !0 });
3260
3266
  }), E.current.style.cursor = "crosshair");
3261
3267
  },
3262
- onDrag: ({ distanceY: m, distanceX: S, startX: O, startY: k }) => {
3263
- if (I.current.moving) {
3264
- const { top: j, left: M } = E.current.getBoundingClientRect(), A = O - M, N = k - j;
3265
- S > 0 ? (I.current.left = A, I.current.width = S) : (I.current.left = A + S, I.current.width = -S), m > 0 ? (I.current.top = N, I.current.height = m) : (I.current.top = N + m, I.current.height = -m), c({ ...I.current, moving: !0 });
3268
+ onDrag: ({ distanceY: m, distanceX: w, startX: R, startY: T }) => {
3269
+ if (O.current.moving) {
3270
+ const { top: j, left: M } = E.current.getBoundingClientRect(), A = R - M, B = T - j;
3271
+ w > 0 ? (O.current.left = A, O.current.width = w) : (O.current.left = A + w, O.current.width = -w), m > 0 ? (O.current.top = B, O.current.height = m) : (O.current.top = B + m, O.current.height = -m), c({ ...O.current, moving: !0 });
3266
3272
  }
3267
3273
  },
3268
3274
  onDragEnd: () => {
3269
- I.current.moving && (h(() => {
3275
+ O.current.moving && (h(() => {
3270
3276
  u({ selecting: !1 });
3271
- }), I.current.moving = !1, c({ moving: !1 }), E.current.style.cursor = "auto");
3277
+ }), O.current.moving = !1, c({ moving: !1 }), E.current.style.cursor = "auto");
3272
3278
  },
3273
3279
  onTap: (m) => {
3274
- const { target: S, ctrlKey: O, metaKey: k } = m, j = l(m);
3275
- if (!j && Oe(S, "board"))
3280
+ const { target: w, ctrlKey: R, metaKey: T } = m, j = l(m);
3281
+ if (!j && Oe(w, "board"))
3276
3282
  n();
3277
3283
  else {
3278
3284
  const M = Te(j);
@@ -3281,19 +3287,19 @@ const So = K({
3281
3287
  return;
3282
3288
  }
3283
3289
  const A = r();
3284
- j && !A.includes(M) && (O || k ? s([M]) : o([M]));
3290
+ j && !A.includes(M) && (R || T ? s([M]) : o([M]));
3285
3291
  }
3286
3292
  },
3287
3293
  onLongTap: ({ target: m }) => {
3288
- const S = Oe(m, "item");
3289
- if (S) {
3290
- const O = Te(S);
3291
- o([O]);
3294
+ const w = Oe(m, "item");
3295
+ if (w) {
3296
+ const R = Te(w);
3297
+ o([R]);
3292
3298
  }
3293
3299
  },
3294
3300
  mainAction: t ? "pan" : "drag",
3295
3301
  children: /* @__PURE__ */ le("div", { ref: E, children: [
3296
- f.moving && /* @__PURE__ */ T(
3302
+ f.moving && /* @__PURE__ */ k(
3297
3303
  "div",
3298
3304
  {
3299
3305
  style: {
@@ -3309,7 +3315,7 @@ const So = K({
3309
3315
  }
3310
3316
  );
3311
3317
  }, Eo = ({ children: e }) => {
3312
- const { moveItems: t, placeItems: r, findElementUnderPointer: n } = gt(), { vectorFromWrapperToBoard: o } = Me(), [s, a, u, l, d] = Q((y) => [
3318
+ const { moveItems: t, placeItems: r, findElementUnderPointer: n } = gt(), { vectorFromWrapperToBoard: o } = Me(), [s, a, u, l, d] = Z((y) => [
3313
3319
  y.select,
3314
3320
  y.setSelection,
3315
3321
  y.getSelection,
@@ -3317,25 +3323,25 @@ const So = K({
3317
3323
  y.updateBoardState
3318
3324
  ]), [f] = oe((y) => [y.getBoardConfig]), c = g.useRef({}), h = g.useRef({
3319
3325
  items: []
3320
- }), _ = (y) => {
3321
- const { ctrlKey: C, metaKey: x, event: p } = y, w = n(y);
3322
- if (w) {
3326
+ }), S = (y) => {
3327
+ const { ctrlKey: C, metaKey: x, event: p } = y, _ = n(y);
3328
+ if (_) {
3323
3329
  p.stopPropagation();
3324
3330
  const m = u();
3325
3331
  h.current.items = m;
3326
- const S = Te(w);
3327
- m.includes(S) || (C || x ? (h.current.items = [...m, S], s([S])) : (h.current.items = [S], a([S]))), Object.assign(c.current, {
3332
+ const w = Te(_);
3333
+ m.includes(w) || (C || x ? (h.current.items = [...m, w], s([w])) : (h.current.items = [w], a([w]))), Object.assign(c.current, {
3328
3334
  moving: !0
3329
3335
  });
3330
3336
  }
3331
3337
  }, v = ({ deltaX: y, deltaY: C, event: x }) => {
3332
3338
  if (c.current.moving) {
3333
3339
  x.stopPropagation();
3334
- const { movingItems: p } = l(), [w, m] = o(y, C);
3340
+ const { movingItems: p } = l(), [_, m] = o(y, C);
3335
3341
  t(
3336
3342
  h.current.items,
3337
3343
  {
3338
- x: w,
3344
+ x: _,
3339
3345
  y: m
3340
3346
  },
3341
3347
  !0
@@ -3356,7 +3362,7 @@ const So = K({
3356
3362
  const C = u();
3357
3363
  if (C.length) {
3358
3364
  const { gridSize: x = 1 } = f();
3359
- let p = 0, w = 0;
3365
+ let p = 0, _ = 0;
3360
3366
  switch (y.key) {
3361
3367
  case "ArrowLeft":
3362
3368
  p = -10;
@@ -3365,20 +3371,20 @@ const So = K({
3365
3371
  p = 10;
3366
3372
  break;
3367
3373
  case "ArrowUp":
3368
- w = -10;
3374
+ _ = -10;
3369
3375
  break;
3370
3376
  case "ArrowDown":
3371
- w = 10;
3377
+ _ = 10;
3372
3378
  break;
3373
3379
  }
3374
- if (p || w) {
3375
- y.shiftKey && (p *= 5, w *= 5), (y.ctrlKey || y.altKey || y.metaKey) && (p /= 10, w /= 10);
3376
- const [m, S] = o(p, w);
3380
+ if (p || _) {
3381
+ y.shiftKey && (p *= 5, _ *= 5), (y.ctrlKey || y.altKey || y.metaKey) && (p /= 10, _ /= 10);
3382
+ const [m, w] = o(p, _);
3377
3383
  t(
3378
3384
  C,
3379
3385
  {
3380
3386
  x: m,
3381
- y: S
3387
+ y: w
3382
3388
  },
3383
3389
  !0
3384
3390
  ), r(C, {
@@ -3387,7 +3393,7 @@ const So = K({
3387
3393
  }), y.preventDefault();
3388
3394
  }
3389
3395
  }
3390
- }), /* @__PURE__ */ T(Fe, { onDragStart: _, onDrag: v, onDragEnd: E, children: e });
3396
+ }), /* @__PURE__ */ k(Fe, { onDragStart: S, onDrag: v, onDragEnd: E, children: e });
3391
3397
  }, wo = (e) => {
3392
3398
  const t = g.useRef({ hover: !1, x: 0, y: 0 });
3393
3399
  return ue(e.current, "mousemove", (n) => {
@@ -3399,7 +3405,7 @@ const So = K({
3399
3405
  t.current.hover = !1;
3400
3406
  }), g.useCallback(() => t.current, []);
3401
3407
  }, Co = [...Array(5).keys()].map((e) => `Digit${e + 1}`), xo = () => {
3402
- const [e, t] = g.useState({}), [r, n] = Q((o) => [
3408
+ const [e, t] = g.useState({}), [r, n] = Z((o) => [
3403
3409
  o.getBoardState,
3404
3410
  o.updateBoardState
3405
3411
  ]);
@@ -3419,7 +3425,7 @@ const So = K({
3419
3425
  s,
3420
3426
  a,
3421
3427
  u
3422
- ] = Q((p) => [
3428
+ ] = Z((p) => [
3423
3429
  {
3424
3430
  translateX: p.boardState.translateX,
3425
3431
  translateY: p.boardState.translateY,
@@ -3430,7 +3436,7 @@ const So = K({
3430
3436
  p.getConfiguration,
3431
3437
  p.updateBoardState,
3432
3438
  p.getSelection
3433
- ]), { zoomToCenter: l, zoomToExtent: d, moveBoard: f } = Me(), [c, h] = g.useState(!1), _ = g.useRef({}), v = wo(r);
3439
+ ]), { zoomToCenter: l, zoomToExtent: d, moveBoard: f } = Me(), [c, h] = g.useState(!1), S = g.useRef({}), v = wo(r);
3434
3440
  xo();
3435
3441
  const E = g.useCallback(() => {
3436
3442
  const { itemExtent: p } = s();
@@ -3439,27 +3445,27 @@ const So = K({
3439
3445
  g.useEffect(() => {
3440
3446
  !c && o.radius && (E(), h(!0));
3441
3447
  }, [E, c, o]);
3442
- const I = ({ clientX: p, clientY: w, scale: m }) => {
3443
- l({ to: { x: p, y: w }, factor: 1 - m / 500 }), clearTimeout(_.current.zoom), _.current.zoom = setTimeout(() => {
3448
+ const O = ({ clientX: p, clientY: _, scale: m }) => {
3449
+ l({ to: { x: p, y: _ }, factor: 1 - m / 500 }), clearTimeout(S.current.zoom), S.current.zoom = setTimeout(() => {
3444
3450
  a({ zooming: !1 });
3445
3451
  }, 200), a({ zooming: !0 });
3446
- }, y = ({ deltaX: p, deltaY: w }) => {
3447
- f(({ translateX: m, translateY: S }) => ({
3452
+ }, y = ({ deltaX: p, deltaY: _ }) => {
3453
+ f(({ translateX: m, translateY: w }) => ({
3448
3454
  translateX: m + p,
3449
- translateY: S + w
3450
- })), clearTimeout(_.current.pan), _.current.pan = setTimeout(() => {
3455
+ translateY: w + _
3456
+ })), clearTimeout(S.current.pan), S.current.pan = setTimeout(() => {
3451
3457
  a({ panning: !1 });
3452
3458
  }, 200), a({ panning: !0 });
3453
3459
  }, C = (p) => {
3454
3460
  if (["INPUT", "TEXTAREA"].includes(p.target.tagName))
3455
3461
  return;
3456
- let w = 0, m = 0, S = 1;
3462
+ let _ = 0, m = 0, w = 1;
3457
3463
  switch (p.key) {
3458
3464
  case "ArrowLeft":
3459
- w = -10;
3465
+ _ = -10;
3460
3466
  break;
3461
3467
  case "ArrowRight":
3462
- w = 10;
3468
+ _ = 10;
3463
3469
  break;
3464
3470
  case "ArrowUp":
3465
3471
  m = -10;
@@ -3468,32 +3474,32 @@ const So = K({
3468
3474
  m = 10;
3469
3475
  break;
3470
3476
  case "PageUp":
3471
- S = 1.2;
3477
+ w = 1.2;
3472
3478
  break;
3473
3479
  case "PageDown":
3474
- S = 0.8;
3480
+ w = 0.8;
3475
3481
  break;
3476
3482
  }
3477
- if (w || m || S !== 1) {
3478
- const O = u();
3479
- if (S === 1 && O.length)
3483
+ if (_ || m || w !== 1) {
3484
+ const R = u();
3485
+ if (w === 1 && R.length)
3480
3486
  return;
3481
- p.shiftKey && (w *= 5, m *= 5), (p.ctrlKey || p.altKey || p.metaKey) && (w /= 5, m /= 5), f(({ translateX: k, translateY: j }) => ({
3482
- translateX: k + w,
3487
+ p.shiftKey && (_ *= 5, m *= 5), (p.ctrlKey || p.altKey || p.metaKey) && (_ /= 5, m /= 5), f(({ translateX: T, translateY: j }) => ({
3488
+ translateX: T + _,
3483
3489
  translateY: j + m
3484
- })), l({ factor: S }), p.preventDefault();
3490
+ })), l({ factor: w }), p.preventDefault();
3485
3491
  }
3486
3492
  p.key === " " && !p.repeat && v().hover && l({ factor: 3, to: v() });
3487
3493
  }, x = (p) => {
3488
3494
  ["INPUT", "TEXTAREA"].includes(p.target.tagName) || p.key === " " && v().hover && l({ factor: 1 / 3, to: v() });
3489
3495
  };
3490
- return ue(document, "keydown", C), ue(document, "keyup", x), /* @__PURE__ */ T(
3496
+ return ue(document, "keydown", C), ue(document, "keyup", x), /* @__PURE__ */ k(
3491
3497
  Fe,
3492
3498
  {
3493
3499
  onPan: y,
3494
- onZoom: I,
3500
+ onZoom: O,
3495
3501
  mainAction: t ? "pan" : "drag",
3496
- children: /* @__PURE__ */ T(
3502
+ children: /* @__PURE__ */ k(
3497
3503
  "div",
3498
3504
  {
3499
3505
  style: {
@@ -3524,7 +3530,7 @@ const So = K({
3524
3530
  n,
3525
3531
  o,
3526
3532
  { translateX: s, translateY: a, scale: u }
3527
- ] = Q((c) => [
3533
+ ] = Z((c) => [
3528
3534
  c.selection,
3529
3535
  c.getSelection,
3530
3536
  c.selectionBox,
@@ -3536,19 +3542,19 @@ const So = K({
3536
3542
  scale: c.boardState.scale
3537
3543
  }
3538
3544
  ]), [l] = oe((c) => [c.items]), d = g.useCallback(() => {
3539
- const c = t(), { boardWrapperRect: h, boardWrapper: _ } = o();
3545
+ const c = t(), { boardWrapperRect: h, uid: S } = o();
3540
3546
  if (c.length === 0) {
3541
3547
  n(null);
3542
3548
  return;
3543
3549
  }
3544
- const v = sn(c, _);
3550
+ const v = sn(c, S);
3545
3551
  if (!v) {
3546
3552
  n(null);
3547
3553
  return;
3548
3554
  }
3549
- const { left: E, top: I, width: y, height: C } = v, x = {
3555
+ const { left: E, top: O, width: y, height: C } = v, x = {
3550
3556
  left: E - h.left,
3551
- top: I - h.top,
3557
+ top: O - h.top,
3552
3558
  height: C,
3553
3559
  width: y
3554
3560
  };
@@ -3564,7 +3570,7 @@ const So = K({
3564
3570
  u,
3565
3571
  d,
3566
3572
  f
3567
- ]), !r || e.length < 2 ? null : /* @__PURE__ */ T(
3573
+ ]), !r || e.length < 2 ? null : /* @__PURE__ */ k(
3568
3574
  "div",
3569
3575
  {
3570
3576
  style: {
@@ -3576,8 +3582,8 @@ const So = K({
3576
3582
  }
3577
3583
  );
3578
3584
  }, To = () => {
3579
- const [e] = Q((t) => [t.boardState.movingItems]);
3580
- return e ? null : /* @__PURE__ */ T(Oo, {});
3585
+ const [e] = Z((t) => [t.boardState.movingItems]);
3586
+ return e ? null : /* @__PURE__ */ k(Oo, {});
3581
3587
  }, ko = typeof window < "u" && typeof navigator < "u" && typeof document < "u";
3582
3588
  let Le;
3583
3589
  function Po() {
@@ -3633,7 +3639,7 @@ function Do(e) {
3633
3639
  if (e.trim().toLowerCase() === "transparent")
3634
3640
  return [0, 0, 0, 0];
3635
3641
  let t = e.trim();
3636
- t = Xo.test(e) ? Lo(e) : e;
3642
+ t = No.test(e) ? Lo(e) : e;
3637
3643
  const r = zo.exec(t);
3638
3644
  if (r) {
3639
3645
  const a = Array.from(r).slice(1);
@@ -3649,7 +3655,7 @@ function Do(e) {
3649
3655
  const a = Array.from(o).slice(1);
3650
3656
  return [...a.slice(0, 3).map((u) => parseInt(u, 10)), parseFloat(a[3] || "1")];
3651
3657
  }
3652
- const s = No.exec(t);
3658
+ const s = Xo.exec(t);
3653
3659
  if (s) {
3654
3660
  const [a, u, l, d] = Array.from(s).slice(1).map(parseFloat);
3655
3661
  if (Zt(0, 100, u) !== u)
@@ -3679,15 +3685,15 @@ function Lo(e) {
3679
3685
  throw new xe(e);
3680
3686
  return `#${r}`;
3681
3687
  }
3682
- const ke = (e, t) => Array.from(Array(t)).map(() => e).join(""), zo = new RegExp(`^#${ke("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), Yo = new RegExp(`^#${ke("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), Bo = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${ke(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), No = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, Xo = /^[a-z]+$/i, er = (e) => Math.round(e * 255), Uo = (e, t, r) => {
3688
+ const ke = (e, t) => Array.from(Array(t)).map(() => e).join(""), zo = new RegExp(`^#${ke("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), Yo = new RegExp(`^#${ke("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), Bo = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${ke(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), Xo = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, No = /^[a-z]+$/i, er = (e) => Math.round(e * 255), Uo = (e, t, r) => {
3683
3689
  let n = r / 100;
3684
3690
  if (t === 0)
3685
3691
  return [n, n, n].map(er);
3686
3692
  const o = (e % 360 + 360) % 360 / 60, s = (1 - Math.abs(2 * n - 1)) * (t / 100), a = s * (1 - Math.abs(o % 2 - 1));
3687
3693
  let u = 0, l = 0, d = 0;
3688
3694
  o >= 0 && o < 1 ? (u = s, l = a) : o >= 1 && o < 2 ? (u = a, l = s) : o >= 2 && o < 3 ? (l = s, d = a) : o >= 3 && o < 4 ? (l = a, d = s) : o >= 4 && o < 5 ? (u = a, d = s) : o >= 5 && o < 6 && (u = s, d = a);
3689
- const f = n - s / 2, c = u + f, h = l + f, _ = d + f;
3690
- return [c, h, _].map(er);
3695
+ const f = n - s / 2, c = u + f, h = l + f, S = d + f;
3696
+ return [c, h, S].map(er);
3691
3697
  };
3692
3698
  function Wo(e) {
3693
3699
  if (e === "transparent")
@@ -3731,7 +3737,7 @@ const Fo = K({
3731
3737
  width: t,
3732
3738
  height: t,
3733
3739
  children: [
3734
- /* @__PURE__ */ T(
3740
+ /* @__PURE__ */ k(
3735
3741
  "path",
3736
3742
  {
3737
3743
  d: "m 1197.1015,869.718 -62.2719,-154.49286 133.3276,-9.05842 -257.6915,-253.12748 1.2392,356.98609 88.2465,-79.47087 61.702,152.78366 z",
@@ -3740,7 +3746,7 @@ const Fo = K({
3740
3746
  }
3741
3747
  }
3742
3748
  ),
3743
- /* @__PURE__ */ T(
3749
+ /* @__PURE__ */ k(
3744
3750
  "path",
3745
3751
  {
3746
3752
  d: "m 1193.0939,861.12419 -62.2719,-154.49286 133.3276,-9.05842 -257.6915,-253.12748 1.2392,356.98609 88.2465,-79.47087 61.702,152.78366 z",
@@ -3754,7 +3760,7 @@ const Fo = K({
3754
3760
  ]
3755
3761
  }
3756
3762
  ),
3757
- /* @__PURE__ */ T(
3763
+ /* @__PURE__ */ k(
3758
3764
  "div",
3759
3765
  {
3760
3766
  style: {
@@ -3772,17 +3778,17 @@ const Fo = K({
3772
3778
  zIndex: 210,
3773
3779
  position: "fixed",
3774
3780
  pointerEvents: "none"
3775
- }), Jo = ({ pos: e, ...t }) => /* @__PURE__ */ T(
3781
+ }), Jo = ({ pos: e, ...t }) => /* @__PURE__ */ k(
3776
3782
  "div",
3777
3783
  {
3778
3784
  className: Go,
3779
3785
  style: {
3780
3786
  transform: `translate(${e.x - 6}px, ${e.y - 15}px)`
3781
3787
  },
3782
- children: /* @__PURE__ */ T(qo, { ...t })
3788
+ children: /* @__PURE__ */ k(qo, { ...t })
3783
3789
  }
3784
3790
  ), Zo = ({ children: e }) => {
3785
- const [t] = Q((v) => [
3791
+ const [t] = Z((v) => [
3786
3792
  v.getConfiguration,
3787
3793
  v.boardState.scale
3788
3794
  // We want to update this component when the scale changes
@@ -3797,22 +3803,22 @@ const Fo = K({
3797
3803
  v.moveCursor,
3798
3804
  v.removeCursor
3799
3805
  ]), { boardWrapperRect: f } = t(), c = ({ clientX: v, clientY: E }) => {
3800
- const [I, y] = r(
3806
+ const [O, y] = r(
3801
3807
  v - f.left,
3802
3808
  E - f.top
3803
3809
  );
3804
- l(o.id, { x: I, y });
3810
+ l(o.id, { x: O, y });
3805
3811
  }, h = () => {
3806
3812
  d(o.id);
3807
- }, _ = s.reduce((v, E) => (E.id !== o.id && a[E.id] && (v[E.id] = a[E.id]), v), {});
3813
+ }, S = s.reduce((v, E) => (E.id !== o.id && a[E.id] && (v[E.id] = a[E.id]), v), {});
3808
3814
  return /* @__PURE__ */ le("div", { onPointerMove: c, onPointerLeave: h, children: [
3809
3815
  e,
3810
- Object.entries(_).map(([v, E]) => {
3811
- const [I, y] = n(E.x, E.y), C = {
3812
- x: I + f.left,
3816
+ Object.entries(S).map(([v, E]) => {
3817
+ const [O, y] = n(E.x, E.y), C = {
3818
+ x: O + f.left,
3813
3819
  y: y + f.top
3814
3820
  };
3815
- return ft(C, f) ? /* @__PURE__ */ T(
3821
+ return ft(C, f) ? /* @__PURE__ */ k(
3816
3822
  Jo,
3817
3823
  {
3818
3824
  pos: C,
@@ -3827,7 +3833,7 @@ const Fo = K({
3827
3833
  overflow: "hidden",
3828
3834
  position: "absolute",
3829
3835
  inset: 0
3830
- }, gs = ({
3836
+ }, hs = ({
3831
3837
  moveFirst: e = !0,
3832
3838
  style: t,
3833
3839
  wrapperStyle: r,
@@ -3837,7 +3843,7 @@ const Fo = K({
3837
3843
  showResizeHandle: a = !1,
3838
3844
  Wrapper: u = Qo
3839
3845
  }) => {
3840
- const l = g.useRef(null), [d, f] = Q((v) => [
3846
+ const l = g.useRef(null), [d, f] = Z((v) => [
3841
3847
  v.config.uid,
3842
3848
  v.updateConfiguration
3843
3849
  ]), { updateItemExtent: c } = Me(), h = {
@@ -3877,15 +3883,15 @@ const Fo = K({
3877
3883
  boardWrapperRect: l.current.getBoundingClientRect()
3878
3884
  });
3879
3885
  });
3880
- const _ = K({ ...es, ...r });
3886
+ const S = K({ ...es, ...r });
3881
3887
  return /* @__PURE__ */ le(
3882
3888
  "div",
3883
3889
  {
3884
3890
  ref: l,
3885
3891
  id: d,
3886
- className: `sync-board ${_}`,
3892
+ className: `sync-board ${S}`,
3887
3893
  children: [
3888
- /* @__PURE__ */ T(Zo, { children: /* @__PURE__ */ T(bo, { moveFirst: e, children: /* @__PURE__ */ T(Ro, { moveFirst: e, children: /* @__PURE__ */ T(Eo, { moveFirst: e, children: /* @__PURE__ */ T(u, { children: /* @__PURE__ */ le(
3894
+ /* @__PURE__ */ k(Zo, { children: /* @__PURE__ */ k(bo, { moveFirst: e, children: /* @__PURE__ */ k(Ro, { moveFirst: e, children: /* @__PURE__ */ k(Eo, { moveFirst: e, children: /* @__PURE__ */ k(u, { children: /* @__PURE__ */ le(
3889
3895
  "div",
3890
3896
  {
3891
3897
  onContextMenu: (v) => {
@@ -3894,34 +3900,35 @@ const Fo = K({
3894
3900
  style: h,
3895
3901
  className: "board",
3896
3902
  children: [
3897
- /* @__PURE__ */ T(mo, {}),
3903
+ /* @__PURE__ */ k(mo, {}),
3898
3904
  s
3899
3905
  ]
3900
3906
  }
3901
3907
  ) }) }) }) }) }),
3902
- /* @__PURE__ */ T(To, {})
3908
+ /* @__PURE__ */ k(To, {})
3903
3909
  ]
3904
3910
  }
3905
3911
  );
3906
3912
  };
3907
- Vn(g.createElement);
3913
+ Yn(g.createElement);
3908
3914
  export {
3909
- gs as Board,
3910
- ps as BoardWrapper,
3911
- ms as RoomWrapper,
3912
- is as useAvailableActions,
3913
- us as useBoardConfig,
3915
+ hs as Board,
3916
+ ms as BoardWrapper,
3917
+ gs as RoomWrapper,
3918
+ as as useAvailableActions,
3919
+ ls as useBoardConfig,
3914
3920
  Me as useBoardPosition,
3915
- ls as useBoardState,
3921
+ fs as useBoardState,
3916
3922
  os as useDebouncedItems,
3923
+ is as useGetSelectedItems,
3917
3924
  gt as useItemActions,
3918
3925
  Vt as useItemInteraction,
3919
3926
  ns as useItems,
3920
- ds as useMessage,
3927
+ ps as useMessage,
3921
3928
  ss as useSelectedItems,
3922
- as as useSelectionBox,
3923
- fs as useSessionInfo,
3924
- cs as useUsers,
3925
- Xe as useWire
3929
+ cs as useSelectionBox,
3930
+ ds as useSessionInfo,
3931
+ us as useUsers,
3932
+ Ne as useWire
3926
3933
  };
3927
3934
  //# sourceMappingURL=react-sync-board.js.map