@linkurious/ogma-annotations-react 1.1.23 → 1.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import Ir, { createContext as jr, useContext as Kr, useReducer as Zr, useState as Nt, useEffect as rr } from "react";
1
+ import $r, { createContext as jr, useContext as Kr, useReducer as Zr, useState as Nt, useEffect as nr } from "react";
2
2
  import { useOgma as Qr } from "@linkurious/ogma-react";
3
3
  var Pe = { exports: {} }, he = {};
4
4
  /**
@@ -14,15 +14,15 @@ var fr;
14
14
  function tn() {
15
15
  if (fr) return he;
16
16
  fr = 1;
17
- var u = Ir, e = Symbol.for("react.element"), o = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function f(g, d, v) {
19
- var y, A = {}, _ = null, S = null;
20
- v !== void 0 && (_ = "" + v), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (S = d.ref);
21
- for (y in d) n.call(d, y) && !h.hasOwnProperty(y) && (A[y] = d[y]);
22
- if (g && g.defaultProps) for (y in d = g.defaultProps, d) A[y] === void 0 && (A[y] = d[y]);
23
- return { $$typeof: e, type: g, key: _, ref: S, props: A, _owner: l.current };
24
- }
25
- return he.Fragment = o, he.jsx = f, he.jsxs = f, he;
17
+ var u = $r, e = Symbol.for("react.element"), o = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function d(g, f, v) {
19
+ var y, A = {}, k = null, S = null;
20
+ v !== void 0 && (k = "" + v), f.key !== void 0 && (k = "" + f.key), f.ref !== void 0 && (S = f.ref);
21
+ for (y in f) n.call(f, y) && !h.hasOwnProperty(y) && (A[y] = f[y]);
22
+ if (g && g.defaultProps) for (y in f = g.defaultProps, f) A[y] === void 0 && (A[y] = f[y]);
23
+ return { $$typeof: e, type: g, key: k, ref: S, props: A, _owner: l.current };
24
+ }
25
+ return he.Fragment = o, he.jsx = d, he.jsxs = d, he;
26
26
  }
27
27
  var ce = {};
28
28
  /**
@@ -37,15 +37,15 @@ var ce = {};
37
37
  var gr;
38
38
  function en() {
39
39
  return gr || (gr = 1, process.env.NODE_ENV !== "production" && function() {
40
- var u = Ir, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), g = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), R = Symbol.iterator, C = "@@iterator";
40
+ var u = $r, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), g = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), R = Symbol.iterator, C = "@@iterator";
41
41
  function L(t) {
42
42
  if (t === null || typeof t != "object")
43
43
  return null;
44
44
  var s = R && t[R] || t[C];
45
45
  return typeof s == "function" ? s : null;
46
46
  }
47
- var I = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function k(t) {
47
+ var $ = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
+ function _(t) {
49
49
  {
50
50
  for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), p = 1; p < s; p++)
51
51
  c[p - 1] = arguments[p];
@@ -54,7 +54,7 @@ function en() {
54
54
  }
55
55
  function z(t, s, c) {
56
56
  {
57
- var p = I.ReactDebugCurrentFrame, m = p.getStackAddendum();
57
+ var p = $.ReactDebugCurrentFrame, m = p.getStackAddendum();
58
58
  m !== "" && (s += "%s", c = c.concat([m]));
59
59
  var w = c.map(function(b) {
60
60
  return String(b);
@@ -65,7 +65,7 @@ function en() {
65
65
  var B = !1, tt = !1, rt = !1, Yt = !1, Vt = !1, ge;
66
66
  ge = Symbol.for("react.module.reference");
67
67
  function Dt(t) {
68
- return !!(typeof t == "string" || typeof t == "function" || t === n || t === h || Vt || t === l || t === v || t === y || Yt || t === S || B || tt || rt || typeof t == "object" && t !== null && (t.$$typeof === _ || t.$$typeof === A || t.$$typeof === f || t.$$typeof === g || t.$$typeof === d || // This needs to include all possible module reference object
68
+ return !!(typeof t == "string" || typeof t == "function" || t === n || t === h || Vt || t === l || t === v || t === y || Yt || t === S || B || tt || rt || typeof t == "object" && t !== null && (t.$$typeof === k || t.$$typeof === A || t.$$typeof === d || t.$$typeof === g || t.$$typeof === f || // This needs to include all possible module reference object
69
69
  // types supported by any Flight configuration anywhere since
70
70
  // we don't know which Flight build this will end up being used
71
71
  // with.
@@ -84,7 +84,7 @@ function en() {
84
84
  function it(t) {
85
85
  if (t == null)
86
86
  return null;
87
- if (typeof t.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
87
+ if (typeof t.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
88
88
  return t.displayName || t.name || null;
89
89
  if (typeof t == "string")
90
90
  return t;
@@ -107,15 +107,15 @@ function en() {
107
107
  case g:
108
108
  var s = t;
109
109
  return pe(s) + ".Consumer";
110
- case f:
110
+ case d:
111
111
  var c = t;
112
112
  return pe(c._context) + ".Provider";
113
- case d:
113
+ case f:
114
114
  return Pt(t, t.render, "ForwardRef");
115
115
  case A:
116
116
  var p = t.displayName || null;
117
117
  return p !== null ? p : it(t.type) || "Memo";
118
- case _: {
118
+ case k: {
119
119
  var m = t, w = m._payload, b = m._init;
120
120
  try {
121
121
  return it(b(w));
@@ -153,7 +153,7 @@ function en() {
153
153
  lt++;
154
154
  }
155
155
  }
156
- function He() {
156
+ function Be() {
157
157
  {
158
158
  if (lt--, lt === 0) {
159
159
  var t = {
@@ -185,11 +185,11 @@ function en() {
185
185
  })
186
186
  });
187
187
  }
188
- lt < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ lt < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
189
  }
190
190
  }
191
- var Gt = I.ReactCurrentDispatcher, Jt;
192
- function $t(t, s, c) {
191
+ var Gt = $.ReactCurrentDispatcher, Jt;
192
+ function It(t, s, c) {
193
193
  {
194
194
  if (Jt === void 0)
195
195
  try {
@@ -204,8 +204,8 @@ function en() {
204
204
  }
205
205
  var Kt = !1, _t;
206
206
  {
207
- var Be = typeof WeakMap == "function" ? WeakMap : Map;
208
- _t = new Be();
207
+ var qe = typeof WeakMap == "function" ? WeakMap : Map;
208
+ _t = new qe();
209
209
  }
210
210
  function Zt(t, s) {
211
211
  if (!t || Kt)
@@ -273,56 +273,56 @@ function en() {
273
273
  }
274
274
  }
275
275
  } finally {
276
- Kt = !1, Gt.current = w, He(), Error.prepareStackTrace = m;
276
+ Kt = !1, Gt.current = w, Be(), Error.prepareStackTrace = m;
277
277
  }
278
- var W = t ? t.displayName || t.name : "", F = W ? $t(W) : "";
278
+ var W = t ? t.displayName || t.name : "", F = W ? It(W) : "";
279
279
  return typeof t == "function" && _t.set(t, F), F;
280
280
  }
281
- function qe(t, s, c) {
281
+ function We(t, s, c) {
282
282
  return Zt(t, !1);
283
283
  }
284
- function We(t) {
284
+ function Ue(t) {
285
285
  var s = t.prototype;
286
286
  return !!(s && s.isReactComponent);
287
287
  }
288
- function It(t, s, c) {
288
+ function $t(t, s, c) {
289
289
  if (t == null)
290
290
  return "";
291
291
  if (typeof t == "function")
292
- return Zt(t, We(t));
292
+ return Zt(t, Ue(t));
293
293
  if (typeof t == "string")
294
- return $t(t);
294
+ return It(t);
295
295
  switch (t) {
296
296
  case v:
297
- return $t("Suspense");
297
+ return It("Suspense");
298
298
  case y:
299
- return $t("SuspenseList");
299
+ return It("SuspenseList");
300
300
  }
301
301
  if (typeof t == "object")
302
302
  switch (t.$$typeof) {
303
- case d:
304
- return qe(t.render);
303
+ case f:
304
+ return We(t.render);
305
305
  case A:
306
- return It(t.type, s, c);
307
- case _: {
306
+ return $t(t.type, s, c);
307
+ case k: {
308
308
  var p = t, m = p._payload, w = p._init;
309
309
  try {
310
- return It(w(m), s, c);
310
+ return $t(w(m), s, c);
311
311
  } catch {
312
312
  }
313
313
  }
314
314
  }
315
315
  return "";
316
316
  }
317
- var bt = Object.prototype.hasOwnProperty, we = {}, xe = I.ReactDebugCurrentFrame;
317
+ var bt = Object.prototype.hasOwnProperty, we = {}, xe = $.ReactDebugCurrentFrame;
318
318
  function jt(t) {
319
319
  if (t) {
320
- var s = t._owner, c = It(t.type, t._source, s ? s.type : null);
320
+ var s = t._owner, c = $t(t.type, t._source, s ? s.type : null);
321
321
  xe.setExtraStackFrame(c);
322
322
  } else
323
323
  xe.setExtraStackFrame(null);
324
324
  }
325
- function Ue(t, s, c, p, m) {
325
+ function Ye(t, s, c, p, m) {
326
326
  {
327
327
  var w = Function.call.bind(bt);
328
328
  for (var b in t)
@@ -337,13 +337,13 @@ function en() {
337
337
  } catch (T) {
338
338
  E = T;
339
339
  }
340
- E && !(E instanceof Error) && (jt(m), k("%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).", p || "React class", c, b, typeof E), jt(null)), E instanceof Error && !(E.message in we) && (we[E.message] = !0, jt(m), k("Failed %s type: %s", c, E.message), jt(null));
340
+ E && !(E instanceof Error) && (jt(m), _("%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).", p || "React class", c, b, typeof E), jt(null)), E instanceof Error && !(E.message in we) && (we[E.message] = !0, jt(m), _("Failed %s type: %s", c, E.message), jt(null));
341
341
  }
342
342
  }
343
343
  }
344
- var Ye = Array.isArray;
344
+ var Ve = Array.isArray;
345
345
  function Qt(t) {
346
- return Ye(t);
346
+ return Ve(t);
347
347
  }
348
348
  function q(t) {
349
349
  {
@@ -351,7 +351,7 @@ function en() {
351
351
  return c;
352
352
  }
353
353
  }
354
- function Ve(t) {
354
+ function Xe(t) {
355
355
  try {
356
356
  return Ee(t), !1;
357
357
  } catch {
@@ -362,16 +362,16 @@ function en() {
362
362
  return "" + t;
363
363
  }
364
364
  function te(t) {
365
- if (Ve(t))
366
- return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", q(t)), Ee(t);
365
+ if (Xe(t))
366
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", q(t)), Ee(t);
367
367
  }
368
- var ct = I.ReactCurrentOwner, Ae = {
368
+ var ct = $.ReactCurrentOwner, Ae = {
369
369
  key: !0,
370
370
  ref: !0,
371
371
  __self: !0,
372
372
  __source: !0
373
373
  }, Ft, ke;
374
- function Xe(t) {
374
+ function Ge(t) {
375
375
  if (bt.call(t, "ref")) {
376
376
  var s = Object.getOwnPropertyDescriptor(t, "ref").get;
377
377
  if (s && s.isReactWarning)
@@ -387,13 +387,13 @@ function en() {
387
387
  }
388
388
  return t.key !== void 0;
389
389
  }
390
- function Ge(t, s) {
390
+ function Je(t, s) {
391
391
  typeof t.ref == "string" && ct.current;
392
392
  }
393
- function Je(t, s) {
393
+ function Ke(t, s) {
394
394
  {
395
395
  var c = function() {
396
- Ft || (Ft = !0, k("%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)", s));
396
+ Ft || (Ft = !0, _("%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)", s));
397
397
  };
398
398
  c.isReactWarning = !0, Object.defineProperty(t, "key", {
399
399
  get: c,
@@ -401,10 +401,10 @@ function en() {
401
401
  });
402
402
  }
403
403
  }
404
- function Ke(t, s) {
404
+ function Ze(t, s) {
405
405
  {
406
406
  var c = function() {
407
- ke || (ke = !0, k("%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)", s));
407
+ ke || (ke = !0, _("%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)", s));
408
408
  };
409
409
  c.isReactWarning = !0, Object.defineProperty(t, "ref", {
410
410
  get: c,
@@ -444,7 +444,7 @@ function en() {
444
444
  function _e(t, s, c, p, m) {
445
445
  {
446
446
  var w, b = {}, E = null, D = null;
447
- c !== void 0 && (te(c), E = "" + c), ee(s) && (te(s.key), E = "" + s.key), Xe(s) && (D = s.ref, Ge(s, m));
447
+ c !== void 0 && (te(c), E = "" + c), ee(s) && (te(s.key), E = "" + s.key), Ge(s) && (D = s.ref, Je(s, m));
448
448
  for (w in s)
449
449
  bt.call(s, w) && !Ae.hasOwnProperty(w) && (b[w] = s[w]);
450
450
  if (t && t.defaultProps) {
@@ -454,15 +454,15 @@ function en() {
454
454
  }
455
455
  if (E || D) {
456
456
  var O = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
457
- E && Je(b, O), D && Ke(b, O);
457
+ E && Ke(b, O), D && Ze(b, O);
458
458
  }
459
459
  return re(t, E, D, m, p, ct.current, b);
460
460
  }
461
461
  }
462
- var dt = I.ReactCurrentOwner, Se = I.ReactDebugCurrentFrame;
462
+ var dt = $.ReactCurrentOwner, Se = $.ReactDebugCurrentFrame;
463
463
  function wt(t) {
464
464
  if (t) {
465
- var s = t._owner, c = It(t.type, t._source, s ? s.type : null);
465
+ var s = t._owner, c = $t(t.type, t._source, s ? s.type : null);
466
466
  Se.setExtraStackFrame(c);
467
467
  } else
468
468
  Se.setExtraStackFrame(null);
@@ -510,7 +510,7 @@ Check the top-level render call using <` + c + ">.");
510
510
  return;
511
511
  Ce[c] = !0;
512
512
  var p = "";
513
- t && t._owner && t._owner !== dt.current && (p = " It was passed a child from " + it(t._owner.type) + "."), wt(t), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), wt(null);
513
+ t && t._owner && t._owner !== dt.current && (p = " It was passed a child from " + it(t._owner.type) + "."), wt(t), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), wt(null);
514
514
  }
515
515
  }
516
516
  function Re(t, s) {
@@ -540,7 +540,7 @@ Check the top-level render call using <` + c + ">.");
540
540
  var c;
541
541
  if (typeof s == "function")
542
542
  c = s.propTypes;
543
- else if (typeof s == "object" && (s.$$typeof === d || // Note: Memo only checks outer props here.
543
+ else if (typeof s == "object" && (s.$$typeof === f || // Note: Memo only checks outer props here.
544
544
  // Inner props are checked in the reconciler.
545
545
  s.$$typeof === A))
546
546
  c = s.propTypes;
@@ -548,25 +548,25 @@ Check the top-level render call using <` + c + ">.");
548
548
  return;
549
549
  if (c) {
550
550
  var p = it(s);
551
- Ue(c, t.props, "prop", p, t);
551
+ Ye(c, t.props, "prop", p, t);
552
552
  } else if (s.PropTypes !== void 0 && !St) {
553
553
  St = !0;
554
554
  var m = it(s);
555
- k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
555
+ _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
556
556
  }
557
- typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
+ typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
558
558
  }
559
559
  }
560
- function Ze(t) {
560
+ function Qe(t) {
561
561
  {
562
562
  for (var s = Object.keys(t.props), c = 0; c < s.length; c++) {
563
563
  var p = s[c];
564
564
  if (p !== "children" && p !== "key") {
565
- wt(t), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), wt(null);
565
+ wt(t), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), wt(null);
566
566
  break;
567
567
  }
568
568
  }
569
- t.ref !== null && (wt(t), k("Invalid attribute `ref` supplied to `React.Fragment`."), wt(null));
569
+ t.ref !== null && (wt(t), _("Invalid attribute `ref` supplied to `React.Fragment`."), wt(null));
570
570
  }
571
571
  }
572
572
  var se = {};
@@ -579,7 +579,7 @@ Check the top-level render call using <` + c + ">.");
579
579
  var D = ne();
580
580
  D ? E += D : E += xt();
581
581
  var T;
582
- t === null ? T = "null" : Qt(t) ? T = "array" : t !== void 0 && t.$$typeof === e ? (T = "<" + (it(t.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : T = typeof t, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, E);
582
+ t === null ? T = "null" : Qt(t) ? T = "array" : t !== void 0 && t.$$typeof === e ? (T = "<" + (it(t.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : T = typeof t, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, E);
583
583
  }
584
584
  var O = _e(t, s, c, m, w);
585
585
  if (O == null)
@@ -593,7 +593,7 @@ Check the top-level render call using <` + c + ">.");
593
593
  Re(j[W], t);
594
594
  Object.freeze && Object.freeze(j);
595
595
  } else
596
- k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
+ _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
597
597
  else
598
598
  Re(j, t);
599
599
  }
@@ -603,7 +603,7 @@ Check the top-level render call using <` + c + ">.");
603
603
  }), H = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
604
604
  if (!se[F + H]) {
605
605
  var N = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
606
- k(`A props object containing a "key" prop is being spread into JSX:
606
+ _(`A props object containing a "key" prop is being spread into JSX:
607
607
  let props = %s;
608
608
  <%s {...props} />
609
609
  React keys must be passed directly to JSX without using spread:
@@ -611,16 +611,16 @@ React keys must be passed directly to JSX without using spread:
611
611
  <%s key={someKey} {...props} />`, H, F, N, F), se[F + H] = !0;
612
612
  }
613
613
  }
614
- return t === n ? Ze(O) : oe(O), O;
614
+ return t === n ? Qe(O) : oe(O), O;
615
615
  }
616
616
  }
617
- function Qe(t, s, c) {
617
+ function tr(t, s, c) {
618
618
  return ae(t, s, c, !0);
619
619
  }
620
620
  function r(t, s, c) {
621
621
  return ae(t, s, c, !1);
622
622
  }
623
- var i = r, a = Qe;
623
+ var i = r, a = tr;
624
624
  ce.Fragment = n, ce.jsx = i, ce.jsxs = a;
625
625
  }()), ce;
626
626
  }
@@ -629,7 +629,7 @@ function rn() {
629
629
  return pr || (pr = 1, process.env.NODE_ENV === "production" ? Pe.exports = tn() : Pe.exports = en()), Pe.exports;
630
630
  }
631
631
  var nn = rn(), on = Object.defineProperty, sn = (u, e, o) => e in u ? on(u, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : u[e] = o, x = (u, e, o) => sn(u, typeof e != "symbol" ? e + "" : e, o);
632
- let Ne = (u = 21) => crypto.getRandomValues(new Uint8Array(u)).reduce((e, o) => (o &= 63, o < 36 ? e += o.toString(36) : o < 62 ? e += (o - 26).toString(36).toUpperCase() : o > 62 ? e += "-" : e += "_", e), "");
632
+ let He = (u = 21) => crypto.getRandomValues(new Uint8Array(u)).reduce((e, o) => (o &= 63, o < 36 ? e += o.toString(36) : o < 62 ? e += (o - 26).toString(36).toUpperCase() : o > 62 ? e += "-" : e += "_", e), "");
633
633
  const fe = {
634
634
  strokeType: "plain",
635
635
  strokeColor: "#202020",
@@ -663,7 +663,7 @@ const fe = {
663
663
  // start: { x: 0, y: 0 },
664
664
  // end: { x: 100, y: 100 }
665
665
  }, an = (u = 0, e = 0, o = 0, n = 0, l = { ...fe }) => ({
666
- id: Ne(),
666
+ id: He(),
667
667
  type: "Feature",
668
668
  properties: {
669
669
  type: "arrow",
@@ -746,21 +746,21 @@ function dn(u, e, o, n) {
746
746
  if (cn(h))
747
747
  h[0] = o + (h[0] - o) * e, h[1] = n + (h[1] - n) * e;
748
748
  else
749
- for (let f = 0; f < h.length; f++) {
750
- const g = h[f];
749
+ for (let d = 0; d < h.length; d++) {
750
+ const g = h[d];
751
751
  g[0] = o + (g[0] - o) * e, g[1] = n + (g[1] - n) * e;
752
752
  }
753
753
  }
754
754
  return u;
755
755
  }
756
- function $e(u, e, o) {
756
+ function Ie(u, e, o) {
757
757
  const n = Math.atan2(u.y - e.y, u.x - e.x);
758
758
  return {
759
759
  x: e.x + o * Math.cos(n),
760
760
  y: e.y + o * Math.sin(n)
761
761
  };
762
762
  }
763
- function sr(u, e) {
763
+ function Me(u, e) {
764
764
  if (!e) return { x: u.clientX, y: u.clientY };
765
765
  const o = e.getBoundingClientRect();
766
766
  return {
@@ -786,7 +786,7 @@ const Ot = (u, e) => ({
786
786
  }), qr = (u, e) => ({
787
787
  x: u.x * e,
788
788
  y: u.y * e
789
- }), Ie = (u, e) => ({
789
+ }), $e = (u, e) => ({
790
790
  x: u.x * e.x,
791
791
  y: u.y * e.y
792
792
  }), st = (u, e) => {
@@ -801,27 +801,27 @@ const Ot = (u, e) => ({
801
801
  }), vr = (u, e) => u.x * e.x + u.y * e.y, gn = 0.5;
802
802
  function Wr(u, e = 5, o = 30) {
803
803
  var n;
804
- const { start: l, end: h } = Fe(u), f = Ot(h, l), g = u.properties.style && u.properties.style.strokeWidth ? (n = u.properties.style) == null ? void 0 : n.strokeWidth : 0;
805
- return Math.min(o, Math.max(3 * g, qt(f) * 0.01, e));
804
+ const { start: l, end: h } = Fe(u), d = Ot(h, l), g = u.properties.style && u.properties.style.strokeWidth ? (n = u.properties.style) == null ? void 0 : n.strokeWidth : 0;
805
+ return Math.min(o, Math.max(3 * g, qt(d) * 0.01, e));
806
806
  }
807
807
  function mr(u, e, o, n) {
808
808
  const l = qr(Hr(Br(e)), n);
809
809
  if (!o || o !== "arrow" && o !== "arrow-plain") return "";
810
- const h = Bt(u, st(l, Math.PI / 10)), f = Bt(u, st(l, -Math.PI / 10)), g = `${u.x} ${u.y}`;
811
- return `M ${h.x} ${h.y} L ${g} ${f.x} ${f.y} ${o === "arrow" ? "" : `${h.x} ${h.y}`}`;
810
+ const h = Bt(u, st(l, Math.PI / 10)), d = Bt(u, st(l, -Math.PI / 10)), g = `${u.x} ${u.y}`;
811
+ return `M ${h.x} ${h.y} L ${g} ${d.x} ${d.y} ${o === "arrow" ? "" : `${h.x} ${h.y}`}`;
812
812
  }
813
813
  function pn(u, e, o, n, l) {
814
- const { start: h, end: f } = Fe(u), {
814
+ const { start: h, end: d } = Fe(u), {
815
815
  tail: g,
816
- head: d,
816
+ head: f,
817
817
  strokeColor: v,
818
818
  strokeWidth: y = 0
819
- } = u.properties.style || o, A = Ot(f, h), _ = Wr(u, n, l), S = Rt("g"), R = Rt("path");
819
+ } = u.properties.style || o, A = Ot(d, h), k = Wr(u, n, l), S = Rt("g"), R = Rt("path");
820
820
  S.setAttribute("data-annotation", `${u.id}`), S.setAttribute("data-annotation-type", "arrow");
821
- const C = d === "arrow-plain" || g === "arrow", L = v || "none";
821
+ const C = f === "arrow-plain" || g === "arrow", L = v || "none";
822
822
  R.setAttribute("stroke", L), R.setAttribute("stroke-width", `${y}`), R.setAttribute("fill", C ? v || "" : "none"), R.setAttribute("stroke-linecap", "round"), R.setAttribute("stroke-linejoin", "round");
823
- const I = mr(h, Hr(A), g, _), k = mr(f, A, d, _), z = I + `M ${h.x} ${h.y} ${f.x} ${f.y}` + k;
824
- R.setAttribute("d", z), S.appendChild(R), br(S, h, L, g, y), br(S, f, L, d, y), e.appendChild(S);
823
+ const $ = mr(h, Hr(A), g, k), _ = mr(d, A, f, k), z = $ + `M ${h.x} ${h.y} ${d.x} ${d.y}` + _;
824
+ R.setAttribute("d", z), S.appendChild(R), br(S, h, L, g, y), br(S, d, L, f, y), e.appendChild(S);
825
825
  }
826
826
  function br(u, e, o, n, l) {
827
827
  n === "halo-dot" && wr(
@@ -839,7 +839,7 @@ function wr(u, e, o, n, l) {
839
839
  const h = Rt("circle");
840
840
  h.setAttribute("cx", `${e.x}`), h.setAttribute("cy", `${e.y}`), h.setAttribute("r", `${l}`), h.setAttribute("fill-opacity", `${n}`), h.setAttribute("fill", o), u.appendChild(h);
841
841
  }
842
- const V = -1, Me = "dragging", ze = "dragstart", Ut = "dragend", ar = "select", lr = "unselect", vn = "hover", mn = "unhover", ur = "remove", hr = "add", bn = "cancelDrawing", cr = "update", wn = "link";
842
+ const V = -1, ze = "dragging", Ne = "dragstart", Ut = "dragend", ar = "select", lr = "unselect", vn = "hover", mn = "unhover", ur = "remove", hr = "add", bn = "cancelDrawing", cr = "update", wn = "link";
843
843
  function Ur(u) {
844
844
  return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
845
845
  }
@@ -850,43 +850,43 @@ function xn() {
850
850
  function n() {
851
851
  }
852
852
  Object.create && (n.prototype = /* @__PURE__ */ Object.create(null), new n().__proto__ || (o = !1));
853
- function l(d, v, y) {
854
- this.fn = d, this.context = v, this.once = y || !1;
853
+ function l(f, v, y) {
854
+ this.fn = f, this.context = v, this.once = y || !1;
855
855
  }
856
- function h(d, v, y, A, _) {
856
+ function h(f, v, y, A, k) {
857
857
  if (typeof y != "function")
858
858
  throw new TypeError("The listener must be a function");
859
- var S = new l(y, A || d, _), R = o ? o + v : v;
860
- return d._events[R] ? d._events[R].fn ? d._events[R] = [d._events[R], S] : d._events[R].push(S) : (d._events[R] = S, d._eventsCount++), d;
859
+ var S = new l(y, A || f, k), R = o ? o + v : v;
860
+ return f._events[R] ? f._events[R].fn ? f._events[R] = [f._events[R], S] : f._events[R].push(S) : (f._events[R] = S, f._eventsCount++), f;
861
861
  }
862
- function f(d, v) {
863
- --d._eventsCount === 0 ? d._events = new n() : delete d._events[v];
862
+ function d(f, v) {
863
+ --f._eventsCount === 0 ? f._events = new n() : delete f._events[v];
864
864
  }
865
865
  function g() {
866
866
  this._events = new n(), this._eventsCount = 0;
867
867
  }
868
868
  g.prototype.eventNames = function() {
869
- var d = [], v, y;
870
- if (this._eventsCount === 0) return d;
869
+ var f = [], v, y;
870
+ if (this._eventsCount === 0) return f;
871
871
  for (y in v = this._events)
872
- e.call(v, y) && d.push(o ? y.slice(1) : y);
873
- return Object.getOwnPropertySymbols ? d.concat(Object.getOwnPropertySymbols(v)) : d;
874
- }, g.prototype.listeners = function(d) {
875
- var v = o ? o + d : d, y = this._events[v];
872
+ e.call(v, y) && f.push(o ? y.slice(1) : y);
873
+ return Object.getOwnPropertySymbols ? f.concat(Object.getOwnPropertySymbols(v)) : f;
874
+ }, g.prototype.listeners = function(f) {
875
+ var v = o ? o + f : f, y = this._events[v];
876
876
  if (!y) return [];
877
877
  if (y.fn) return [y.fn];
878
- for (var A = 0, _ = y.length, S = new Array(_); A < _; A++)
878
+ for (var A = 0, k = y.length, S = new Array(k); A < k; A++)
879
879
  S[A] = y[A].fn;
880
880
  return S;
881
- }, g.prototype.listenerCount = function(d) {
882
- var v = o ? o + d : d, y = this._events[v];
881
+ }, g.prototype.listenerCount = function(f) {
882
+ var v = o ? o + f : f, y = this._events[v];
883
883
  return y ? y.fn ? 1 : y.length : 0;
884
- }, g.prototype.emit = function(d, v, y, A, _, S) {
885
- var R = o ? o + d : d;
884
+ }, g.prototype.emit = function(f, v, y, A, k, S) {
885
+ var R = o ? o + f : f;
886
886
  if (!this._events[R]) return !1;
887
- var C = this._events[R], L = arguments.length, I, k;
887
+ var C = this._events[R], L = arguments.length, $, _;
888
888
  if (C.fn) {
889
- switch (C.once && this.removeListener(d, C.fn, void 0, !0), L) {
889
+ switch (C.once && this.removeListener(f, C.fn, void 0, !0), L) {
890
890
  case 1:
891
891
  return C.fn.call(C.context), !0;
892
892
  case 2:
@@ -896,57 +896,57 @@ function xn() {
896
896
  case 4:
897
897
  return C.fn.call(C.context, v, y, A), !0;
898
898
  case 5:
899
- return C.fn.call(C.context, v, y, A, _), !0;
899
+ return C.fn.call(C.context, v, y, A, k), !0;
900
900
  case 6:
901
- return C.fn.call(C.context, v, y, A, _, S), !0;
901
+ return C.fn.call(C.context, v, y, A, k, S), !0;
902
902
  }
903
- for (k = 1, I = new Array(L - 1); k < L; k++)
904
- I[k - 1] = arguments[k];
905
- C.fn.apply(C.context, I);
903
+ for (_ = 1, $ = new Array(L - 1); _ < L; _++)
904
+ $[_ - 1] = arguments[_];
905
+ C.fn.apply(C.context, $);
906
906
  } else {
907
907
  var z = C.length, B;
908
- for (k = 0; k < z; k++)
909
- switch (C[k].once && this.removeListener(d, C[k].fn, void 0, !0), L) {
908
+ for (_ = 0; _ < z; _++)
909
+ switch (C[_].once && this.removeListener(f, C[_].fn, void 0, !0), L) {
910
910
  case 1:
911
- C[k].fn.call(C[k].context);
911
+ C[_].fn.call(C[_].context);
912
912
  break;
913
913
  case 2:
914
- C[k].fn.call(C[k].context, v);
914
+ C[_].fn.call(C[_].context, v);
915
915
  break;
916
916
  case 3:
917
- C[k].fn.call(C[k].context, v, y);
917
+ C[_].fn.call(C[_].context, v, y);
918
918
  break;
919
919
  case 4:
920
- C[k].fn.call(C[k].context, v, y, A);
920
+ C[_].fn.call(C[_].context, v, y, A);
921
921
  break;
922
922
  default:
923
- if (!I) for (B = 1, I = new Array(L - 1); B < L; B++)
924
- I[B - 1] = arguments[B];
925
- C[k].fn.apply(C[k].context, I);
923
+ if (!$) for (B = 1, $ = new Array(L - 1); B < L; B++)
924
+ $[B - 1] = arguments[B];
925
+ C[_].fn.apply(C[_].context, $);
926
926
  }
927
927
  }
928
928
  return !0;
929
- }, g.prototype.on = function(d, v, y) {
930
- return h(this, d, v, y, !1);
931
- }, g.prototype.once = function(d, v, y) {
932
- return h(this, d, v, y, !0);
933
- }, g.prototype.removeListener = function(d, v, y, A) {
934
- var _ = o ? o + d : d;
935
- if (!this._events[_]) return this;
929
+ }, g.prototype.on = function(f, v, y) {
930
+ return h(this, f, v, y, !1);
931
+ }, g.prototype.once = function(f, v, y) {
932
+ return h(this, f, v, y, !0);
933
+ }, g.prototype.removeListener = function(f, v, y, A) {
934
+ var k = o ? o + f : f;
935
+ if (!this._events[k]) return this;
936
936
  if (!v)
937
- return f(this, _), this;
938
- var S = this._events[_];
937
+ return d(this, k), this;
938
+ var S = this._events[k];
939
939
  if (S.fn)
940
- S.fn === v && (!A || S.once) && (!y || S.context === y) && f(this, _);
940
+ S.fn === v && (!A || S.once) && (!y || S.context === y) && d(this, k);
941
941
  else {
942
942
  for (var R = 0, C = [], L = S.length; R < L; R++)
943
943
  (S[R].fn !== v || A && !S[R].once || y && S[R].context !== y) && C.push(S[R]);
944
- C.length ? this._events[_] = C.length === 1 ? C[0] : C : f(this, _);
944
+ C.length ? this._events[k] = C.length === 1 ? C[0] : C : d(this, k);
945
945
  }
946
946
  return this;
947
- }, g.prototype.removeAllListeners = function(d) {
947
+ }, g.prototype.removeAllListeners = function(f) {
948
948
  var v;
949
- return d ? (v = o ? o + d : d, this._events[v] && f(this, v)) : (this._events = new n(), this._eventsCount = 0), this;
949
+ return f ? (v = o ? o + f : f, this._events[v] && d(this, v)) : (this._events = new n(), this._eventsCount = 0), this;
950
950
  }, g.prototype.off = g.prototype.removeListener, g.prototype.addListener = g.prototype.on, g.prefixed = o, g.EventEmitter = g, u.exports = g;
951
951
  }(xr)), xr.exports;
952
952
  }
@@ -977,7 +977,7 @@ class Vr extends Yr {
977
977
  */
978
978
  add(e) {
979
979
  const o = this.getDefaultOptions(), n = Object.assign(e, {
980
- id: e.id === void 0 ? Ne() : e.id,
980
+ id: e.id === void 0 ? He() : e.id,
981
981
  type: e.type,
982
982
  properties: {
983
983
  ...o.properties,
@@ -1145,23 +1145,23 @@ class An extends Vr {
1145
1145
  ), x(this, "draggedHandle", V), x(this, "start", { x: 0, y: 0 }), x(this, "end", { x: 0, y: 0 }), x(this, "arrow", { ...yr }), x(this, "startX", 0), x(this, "startY", 0), x(this, "minArrowHeight", 0), x(this, "maxArrowHeight", 0), x(this, "handles", []), x(this, "onHandleMouseDown", (n) => {
1146
1146
  const l = this.getById(this.selectedId) || this.getById(this.hoveredId);
1147
1147
  if (!l) return;
1148
- const { x: h, y: f } = sr(n, this.ogma.getContainer());
1149
- this.startDragging(l, h, f), this.draggedHandle = Nr(n.target);
1148
+ const { x: h, y: d } = Me(n, this.ogma.getContainer());
1149
+ this.startDragging(l, h, d), this.draggedHandle = Nr(n.target);
1150
1150
  }), x(this, "onMouseUp", () => {
1151
1151
  this.draggedHandle !== -1 && (this.restoreDragging(), this.isDragging = !1, this.draggedHandle = V, this.emit(Ut, this.arrow));
1152
1152
  }), x(this, "onMouseMove", (n) => {
1153
1153
  if (!this.isDragging || this.draggedHandle === V) return;
1154
- const l = this.handles[this.draggedHandle], h = this.ogma.view.getAngle(), { x: f, y: g } = st(
1154
+ const { x: l, y: h } = Me(n, this.ogma.getContainer()), d = this.handles[this.draggedHandle], g = this.ogma.view.getAngle(), { x: f, y: v } = st(
1155
1155
  fn(
1156
- { x: n.x - this.startX, y: n.y - this.startY },
1156
+ { x: l - this.startX, y: h - this.startY },
1157
1157
  this.ogma.view.getZoom()
1158
1158
  ),
1159
- h
1160
- ), d = l.id === Ar, v = l.id === kr, y = l.id === _r;
1161
- (d || v) && Mr(this.arrow, this.start.x + f, this.start.y + g), (d || y) && zr(this.arrow, this.end.x + f, this.end.y + g), this.emit(
1162
- Me,
1159
+ g
1160
+ ), y = d.id === Ar, A = d.id === kr, k = d.id === _r;
1161
+ (y || A) && Mr(this.arrow, this.start.x + f, this.start.y + v), (y || k) && zr(this.arrow, this.end.x + f, this.end.y + v), this.emit(
1162
+ ze,
1163
1163
  this.arrow,
1164
- d ? "line" : v ? "start" : "end"
1164
+ y ? "line" : A ? "start" : "end"
1165
1165
  ), this.refreshEditor(), this.layer.refresh();
1166
1166
  }), this.minArrowHeight = o.minArrowHeight || 0, this.maxArrowHeight = o.maxArrowHeight || 1e6, this.handles = Array.prototype.slice.call(
1167
1167
  this.editor.element.querySelectorAll(".arrow-handle>.handle")
@@ -1178,42 +1178,42 @@ class An extends Vr {
1178
1178
  startDrawing(e, o, n = an(e, o, e, o, fe)) {
1179
1179
  var l;
1180
1180
  this.disableDragging(), this.add(n), this.hoveredId = n.id;
1181
- const h = this.ogma.view.graphToScreenCoordinates({ x: e, y: o }), f = ((l = this.ogma.getContainer()) == null ? void 0 : l.getBoundingClientRect()) || {
1181
+ const h = this.ogma.view.graphToScreenCoordinates({ x: e, y: o }), d = ((l = this.ogma.getContainer()) == null ? void 0 : l.getBoundingClientRect()) || {
1182
1182
  left: 0,
1183
1183
  top: 0
1184
1184
  };
1185
1185
  this.startDragging(
1186
1186
  this.getById(n.id),
1187
- h.x + (f == null ? void 0 : f.left),
1188
- h.y + f.top
1187
+ h.x + (d == null ? void 0 : d.left),
1188
+ h.y + d.top
1189
1189
  ), this.draggedHandle = 2;
1190
1190
  }
1191
1191
  cancelDrawing() {
1192
1192
  this.isDragging && (this.remove(this.arrow.id), this.emit(Ut, this.arrow), this.restoreDragging(), this.isDragging = !1, this.draggedHandle = V);
1193
1193
  }
1194
1194
  startDragging(e, o, n) {
1195
- this.selectedId !== e.id && this.select(this.hoveredId), this.arrow = e, this.startX = o, this.startY = n, this.start = de(this.arrow), this.end = je(this.arrow), this.disableDragging(), this.emit(ze, this.arrow), this.isDragging = !0;
1195
+ this.selectedId !== e.id && this.select(this.hoveredId), this.arrow = e, this.startX = o, this.startY = n, this.start = de(this.arrow), this.end = je(this.arrow), this.disableDragging(), this.emit(Ne, this.arrow), this.isDragging = !0;
1196
1196
  }
1197
1197
  detect(e, o = 0) {
1198
1198
  return this.elements.find((n) => {
1199
- const { start: l, end: h } = Fe(n), f = Ot(e, {
1199
+ const { start: l, end: h } = Fe(n), d = Ot(e, {
1200
1200
  x: (l.x + h.x) / 2,
1201
1201
  y: (l.y + h.y) / 2
1202
- }), g = Ot(h, l), d = qt(g), v = Br(g), y = Wr(n);
1203
- return Math.abs(vr(v, f)) < d / 2 + o && Math.abs(vr(st(v, Math.PI / 2), f)) < y / 2 + o;
1202
+ }), g = Ot(h, l), f = qt(g), v = Br(g), y = Wr(n);
1203
+ return Math.abs(vr(v, d)) < f / 2 + o && Math.abs(vr(st(v, Math.PI / 2), d)) < y / 2 + o;
1204
1204
  });
1205
1205
  }
1206
1206
  refreshEditor() {
1207
1207
  if (+this.selectedId < 0 && +this.hoveredId < 0) return;
1208
- const e = this.selectedId !== V ? this.getById(this.selectedId) : this.getById(this.hoveredId), o = Fe(e), n = this.ogma.view.graphToScreenCoordinates(o.start), l = this.ogma.view.graphToScreenCoordinates(o.end), [h, f, g] = Array.prototype.slice.call(
1208
+ const e = this.selectedId !== V ? this.getById(this.selectedId) : this.getById(this.hoveredId), o = Fe(e), n = this.ogma.view.graphToScreenCoordinates(o.start), l = this.ogma.view.graphToScreenCoordinates(o.end), [h, d, g] = Array.prototype.slice.call(
1209
1209
  this.editor.element.querySelectorAll(".handle")
1210
1210
  );
1211
- f.style.transform = `translate(${n.x}px, ${n.y}px) translate(-50%, -50%)`, g.style.transform = `translate(${l.x}px, ${l.y}px) translate(-50%, -50%)`;
1212
- const d = {
1211
+ d.style.transform = `translate(${n.x}px, ${n.y}px) translate(-50%, -50%)`, g.style.transform = `translate(${l.x}px, ${l.y}px) translate(-50%, -50%)`;
1212
+ const f = {
1213
1213
  x: (l.x + n.x) / 2,
1214
1214
  y: (l.y + n.y) / 2
1215
1215
  }, v = Ot(l, n), y = qr(v, 1 / qt(v)), A = Math.atan2(y.y, y.x);
1216
- h.style.width = `${qt(v)}px`, h.style.left = `${d.x}px`, h.style.top = `${d.y}px`, h.style.transform = `translate(-50%, -50%) rotate(${A}rad)`;
1216
+ h.style.width = `${qt(v)}px`, h.style.left = `${f.x}px`, h.style.top = `${f.y}px`, h.style.transform = `translate(-50%, -50%) rotate(${A}rad)`;
1217
1217
  }
1218
1218
  getDefaultOptions() {
1219
1219
  return yr;
@@ -1245,7 +1245,7 @@ const Wt = {
1245
1245
  borderRadius: 8,
1246
1246
  padding: 16,
1247
1247
  strokeType: "plain"
1248
- }, nr = {
1248
+ }, ir = {
1249
1249
  id: 0,
1250
1250
  type: "Feature",
1251
1251
  properties: {
@@ -1271,7 +1271,7 @@ const Wt = {
1271
1271
  handleSize: 3.5,
1272
1272
  placeholder: "Your text..."
1273
1273
  }, kn = (u = 0, e = 0, o = 100, n = 50, l = "", h = { ...Wt }) => ({
1274
- id: Ne(),
1274
+ id: He(),
1275
1275
  type: "Feature",
1276
1276
  properties: {
1277
1277
  type: "text",
@@ -1307,20 +1307,20 @@ function Sn() {
1307
1307
  return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i;
1308
1308
  }, l(r);
1309
1309
  }
1310
- o.d(n, { default: () => Qe });
1311
- var h = /^((?:[a-z\d-]+\s+)*)([\d.]+(%|em|px)|(?:x+-)?large|(?:x+-)?small|medium)(?:\s*\/\s*(normal|[\d.]+(%|px|em)?))?(\s.+)?$/, f = /\bsmall-caps\b/, g = /\b(?:italic|oblique)\b/, d = /\bbold(?:er)?\b/, v = 13.3333333, y = { "xx-small": 9, "x-small": 10, smaller: 13.3333, small: 13, medium: 16, large: 18, larger: 19.2, "x-large": 24, "xx-large": 32 };
1310
+ o.d(n, { default: () => tr });
1311
+ var h = /^((?:[a-z\d-]+\s+)*)([\d.]+(%|em|px)|(?:x+-)?large|(?:x+-)?small|medium)(?:\s*\/\s*(normal|[\d.]+(%|px|em)?))?(\s.+)?$/, d = /\bsmall-caps\b/, g = /\b(?:italic|oblique)\b/, f = /\bbold(?:er)?\b/, v = 13.3333333, y = { "xx-small": 9, "x-small": 10, smaller: 13.3333, small: 13, medium: 16, large: 18, larger: 19.2, "x-large": 24, "xx-large": 32 };
1312
1312
  function A(r) {
1313
1313
  var i = "", a = this;
1314
1314
  return a.style && a.style !== "normal" && (i += a.style), a.variant && a.variant !== "normal" && (i += (i ? " " : "") + a.variant), a.weight && a.weight !== "normal" && (i += (i ? " " : "") + a.weight), a.size && (i += (i ? " " : "") + a.size + "px", a.height !== a.size && (i += "/" + a.height + "px")), a.family && (i += (i ? " " : "") + a.family), r && (i += "::" + a.baseline), r && (i += "::" + a.color), i;
1315
1315
  }
1316
- var _ = { id: "", family: "sans-serif", height: 14, size: 12, variant: "", style: "", weight: "", baseline: "", color: null, toString: A, valueOf: A };
1316
+ var k = { id: "", family: "sans-serif", height: 14, size: 12, variant: "", style: "", weight: "", baseline: "", color: null, toString: A, valueOf: A };
1317
1317
  function S(r) {
1318
1318
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = h.exec(r);
1319
1319
  i.family = (a[6] || "").trim();
1320
1320
  var t = y[a[2]] || parseFloat(a[2]);
1321
1321
  a[3] === "%" ? t *= 0.16 : a[3] === "em" ? t *= 16 : a[3] === "pt" && (t *= v), i.size = t;
1322
1322
  var s = parseFloat(a[4]);
1323
- if (s !== "normal" && s !== "inherit" && s ? a[5] && a[5] !== "em" ? a[5] === "pt" ? i.height = s * v : a[5] === "%" ? i.height = 0.01 * t : i.height = s : i.height = s * t : i.height = Math.round(t * (7 / 6)), f.test(a[1]) && (i.variant = "small-caps"), g.test(a[1]) && (i.style = "italic"), d.test(a[1])) i.weight = "bold";
1323
+ if (s !== "normal" && s !== "inherit" && s ? a[5] && a[5] !== "em" ? a[5] === "pt" ? i.height = s * v : a[5] === "%" ? i.height = 0.01 * t : i.height = s : i.height = s * t : i.height = Math.round(t * (7 / 6)), d.test(a[1]) && (i.variant = "small-caps"), g.test(a[1]) && (i.style = "italic"), f.test(a[1])) i.weight = "bold";
1324
1324
  else {
1325
1325
  var c = parseInt(/\b(\d+)\b/.exec(a[1]), 10);
1326
1326
  c >= 100 && c !== 400 && (i.weight = c);
@@ -1337,11 +1337,11 @@ function Sn() {
1337
1337
  r = T.family, p = T.size, c = T.height, b = T.variant, w = T.style, m = T.weight;
1338
1338
  } else l(t) === "object" && (r = t.family, p = t.size, c = t.height, b = t.variant, m = t.weight, w = t.style, i = t.baseline, a = t.color);
1339
1339
  s.size && s.size < 3 && (p *= s.size), c = c !== "normal" && c ? parseFloat(c) : p * (7 / 6), s.height && s.height < 3 && (c *= s.height);
1340
- var O = Object.create(_);
1340
+ var O = Object.create(k);
1341
1341
  return O.family = s.family || r || "sans-serif", O.height = c ?? 14, O.size = p ?? 12, O.variant = s.variant || b || "", O.style = s.style || w || "", O.weight = s.weight || m || "", O.baseline = i || 0, s.baseline != null && (O.baseline = s.baseline), O.color = s.color || a || "", O.id = A.call(O, !0), O;
1342
1342
  }
1343
1343
  const C = { "\n": 0.28, "\r": 0.28, " ": 0.28, " ": 0.28, " ": 0.28, "᠎": 0, " ": 0.5, " ": 1, " ": 0.5, " ": 1, " ": 0.33, " ": 0.25, " ": 0.16, " ": 0.56, " ": 0.28, " ": 0.2, " ": 0.15, "​": 0, " ": 0.16, " ": 0.22, " ": 1, "\uFEFF": 0 };
1344
- var L, I = function(r) {
1344
+ var L, $ = function(r) {
1345
1345
  var i = typeof OffscreenCanvas < "u" && new OffscreenCanvas(100, 100) || r && r.createElement("canvas");
1346
1346
  if (i && i.getContext) {
1347
1347
  var a = i.getContext("2d");
@@ -1355,15 +1355,15 @@ function Sn() {
1355
1355
  L[i] = a, /\bmonospace\b/.test(a.family) ? a.size *= 0.6 : (a.size *= 0.45, a.weight && (a.size *= 1.18));
1356
1356
  }
1357
1357
  return r.length * L[i].size;
1358
- }), k = {}, z = { trim: !0, collapse: !0 };
1358
+ }), _ = {}, z = { trim: !0, collapse: !0 };
1359
1359
  function B(r, i, a) {
1360
1360
  var t = Object.assign({}, z, a), s = String(r);
1361
1361
  if (!s) return 0;
1362
1362
  if (s in C) {
1363
1363
  var c = i.id + "/" + s;
1364
- return c in k || (k[c] = I("_".concat(s, "_"), i) - I("__", i)), k[c];
1364
+ return c in _ || (_[c] = $("_".concat(s, "_"), i) - $("__", i)), _[c];
1365
1365
  }
1366
- return t.trim && t.collapse ? t.trim ? s = s.trim() : t.collapse && (s = s.replace(/\s+/g, " ")) : s = s.replace(/\n/g, " "), I(s, i) + i.size * (r.tracking || 0);
1366
+ return t.trim && t.collapse ? t.trim ? s = s.trim() : t.collapse && (s = s.replace(/\s+/g, " ")) : s = s.replace(/\n/g, " "), $(s, i) + i.size * (r.tracking || 0);
1367
1367
  }
1368
1368
  function tt(r) {
1369
1369
  return tt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) {
@@ -1485,7 +1485,7 @@ function Sn() {
1485
1485
  return s.push(new M(r.slice(p))), s;
1486
1486
  }
1487
1487
  const be = { nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "­", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", fnof: "ƒ", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", bull: "•", hellip: "…", prime: "′", Prime: "″", oline: "‾", frasl: "⁄", weierp: "℘", image: "ℑ", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "⊥", or: "⊦", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦", quot: '"', amp: "&", lt: "<", gt: ">", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", circ: "ˆ", tilde: "˜", ensp: " ", emsp: " ", thinsp: " ", zwnj: "‌", zwj: "‍", lrm: "‎", rlm: "‏", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", permil: "‰", lsaquo: "‹", rsaquo: "›" };
1488
- var He = /^[\n\r\x20\u2000-\u200B\u205F\u3000]/, Gt = /^<\/([a-zA-Z0-9]+)([^>]*)>/, Jt = /^<([a-zA-Z0-9]+)((?:\s[^=\s/]+(?:\s*=\s*(?:"[^"]+"|'[^']+'|[^>\\s]+))?)+)?\s*(\/?)>(\n*)/, $t = /^<!--(.+?)-->/, Kt = /&(?:#(\d\d{2,})|#x([\da-fA-F]{2,})|([a-zA-Z][a-zA-Z1-4]{1,8}));/g, _t = { b: function(r) {
1488
+ var Be = /^[\n\r\x20\u2000-\u200B\u205F\u3000]/, Gt = /^<\/([a-zA-Z0-9]+)([^>]*)>/, Jt = /^<([a-zA-Z0-9]+)((?:\s[^=\s/]+(?:\s*=\s*(?:"[^"]+"|'[^']+'|[^>\\s]+))?)+)?\s*(\/?)>(\n*)/, It = /^<!--(.+?)-->/, Kt = /&(?:#(\d\d{2,})|#x([\da-fA-F]{2,})|([a-zA-Z][a-zA-Z1-4]{1,8}));/g, _t = { b: function(r) {
1489
1489
  r.weight = "bold";
1490
1490
  }, strong: function(r) {
1491
1491
  r.weight = "bold";
@@ -1511,7 +1511,7 @@ function Sn() {
1511
1511
  r.sub = !0;
1512
1512
  }, sup: function(r) {
1513
1513
  r.sup = !0;
1514
- } }, Be = { div: 1, li: 1, blockquote: 2, h1: 2, h2: 2, h3: 2, h4: 2, h5: 2, h6: 2, ul: 2, ol: 2, hr: 2, p: 2 };
1514
+ } }, qe = { div: 1, li: 1, blockquote: 2, h1: 2, h2: 2, h3: 2, h4: 2, h5: 2, h6: 2, ul: 2, ol: 2, hr: 2, p: 2 };
1515
1515
  function Zt(r) {
1516
1516
  return r.replace(Kt, function(i, a, t, s) {
1517
1517
  if (a || t) {
@@ -1521,16 +1521,16 @@ function Sn() {
1521
1521
  return s in be ? be[s] : i;
1522
1522
  });
1523
1523
  }
1524
- function qe(r) {
1524
+ function We(r) {
1525
1525
  return r && r.length > 1 && (r[0] === '"' && r[r.length - 1] === '"' || r[0] === "'" && r[r.length - 1] === "'") ? r.slice(1, -1) : r;
1526
1526
  }
1527
- var We = /^\s*([^=\s&]+)(?:\s*=\s*("[^"]+"|'[^']+'|[^>\s]+))?/;
1528
- function It(r) {
1527
+ var Ue = /^\s*([^=\s&]+)(?:\s*=\s*("[^"]+"|'[^']+'|[^>\s]+))?/;
1528
+ function $t(r) {
1529
1529
  var i, a = {};
1530
1530
  if (r) {
1531
1531
  do
1532
- if (i = We.exec(r)) {
1533
- var t = Zt(qe(i[2] || "")).replace(/[ \r\n\t]+/g, " ").trim();
1532
+ if (i = Ue.exec(r)) {
1533
+ var t = Zt(We(i[2] || "")).replace(/[ \r\n\t]+/g, " ").trim();
1534
1534
  if (a[i[1]] = t, (r = r.slice(i[0].length)).length && /^\S/.test(r[0])) throw new Error("Attribute error");
1535
1535
  }
1536
1536
  while (i && r.length);
@@ -1539,7 +1539,7 @@ function Sn() {
1539
1539
  return a;
1540
1540
  }
1541
1541
  const bt = { copyright: "©", textcopyright: "©", dag: "†", textdagger: "†", ddag: "‡", textdaggerdbl: "‡", guillemotleft: "«", guillemotright: "»", guilsinglleft: "‹", guilsinglright: "›", ldots: "…", dots: "…", textellipsis: "…", lq: "‘", P: "¶", textparagraph: "¶", pounds: "£", textsterling: "£", quotedblbase: "„", quotesinglbase: "‚", rq: "’", S: "§", sim: "~", textasciicircum: "^", textasciitilde: "˜", texttildelow: "~", textasteriskcentered: "*", textbackslash: "'", textbar: "|", textbardbl: "╎", textbigcircle: "◯", textbraceleft: "{", textbraceright: "}", textbullet: "•", textdollar: "$", textemdash: "—", textendash: "—", texteuro: "€", eurosym: "€", euro: "€", textexclamdown: "¡", textgreater: ">", textless: "<", textordfeminine: "ª", textordmasculine: "º", textperiodcentered: "·", cdot: "·", textquestiondown: "¿", textquotedblleft: "“", textquotedblright: "”", textquoteleft: "‘", textquoteright: "’", textquotestraightbase: "‚", textquotestraightdblbase: "„", textregistered: "®", textthreequartersemdash: "-", texttrademark: "™", texttwelveudash: "-", textunderscore: "_", textvisiblespace: "␣", gets: "←", textleftarrow: "←", to: "→", textrightarrow: "→", textdegree: "°", infty: "∞", triangle: "△", triangledown: "▽", blacktriangle: "▲", blacktriangledown: "▼", angle: "∠", sphericalangle: "∢", aleph: "ℵ", hbar: "ħ", imath: "𝚤", jmath: "𝚥", ell: "ℓ", wp: "℘", Re: "ℜ", Im: "ℑ", mho: "℧", prime: "′", emptyset: "∅", nabla: "∇", surd: "√", partial: "∂", top: "⟙", bot: "⟂", vdash: "⟝", dashv: "⟞", forall: "∀", exists: "∃", nexists: "∄", neg: "¬", lnot: "¬", flat: "♭", natural: "♮", sharp: "♯", backslash: "\\", Box: "□", Diamond: "♢", clubsuit: "♣", diamondsuit: "♦", heartsuit: "♥", spadesuit: "♠", Join: "⨝", blacksquare: "■", bigstar: "★", diagdown: "╲", diagup: "╱", blacklozenge: "⧫", rfloor: "⌋", lfloor: "⌊", rceil: "⌉", lceil: "⌈", rangle: "⟩", langle: "⟨", sum: "∑", int: "∫", oint: "∮", prod: "∏", coprod: "∏", bigcap: "∩", bigcup: "∪", bigsqcup: "⊔", bigvee: "∨", bigwedge: "∧", bigodot: "⊙", bigotimes: "⊗", bigoplus: "⊕", biguplus: "⊎", alpha: "α", beta: "β", chi: "χ", delta: "δ", epsilon: "ε", eta: "η", gamma: "γ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", omega: "ω", phi: "φ", pi: "π", psi: "ψ", rho: "ρ", sigma: "σ", tau: "τ", theta: "θ", upsilon: "υ", xi: "ξ", zeta: "ζ", Alpha: "Α", Beta: "Β", Chi: "Χ", Delta: "Δ", Epsilon: "Ε", Eta: "Η", Gamma: "Γ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Omega: "Ω", Phi: "Φ", Pi: "Π", Psi: "Ψ", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Theta: "Θ", Upsilon: "Υ", Xi: "Ξ", Zeta: "Ζ", aa: "å", AA: "Å", ae: "æ", AE: "Æ", dh: "ð", DH: "Ð", dj: "đ", DJ: "Đ", ij: "ij", IJ: "IJ", l: "ł", L: "Ł", ng: "ŋ", NG: "Ŋ", o: "ø", O: "Ø", oe: "œ", OE: "Œ", ss: "ß", SS: "SS", th: "þ", TH: "Þ" };
1542
- var we = /^(\^|_|\\[^#$%&~_^\\{}()\s]+)(\{)?/, xe = /^%[^\n]+(?:\n|$)/, jt = /^[^#$%&~_^\\{}]+/, Ue = /^\\([&{}$%#_])/, Ye = /(?:\\[\\@,!:;-]|-{2,3}|[!?]`|``?|,,|''?|~|<<|>>)/g, Qt = { "---": "—", "--": "–", "!`": "¡", "?`": "¿", "``": "“", ",,": "„", "''": "”", "`": "‘", "'": "’", "<<": "«", ">>": "»", "~": " ", "\\-": "­", "\\,": " ", "\\;": " ", "\\:": " ", "\\!": " ", "\\@": "\uFEFF", "\\\\": "\\newline{}" }, q = { bf: function(r) {
1542
+ var we = /^(\^|_|\\[^#$%&~_^\\{}()\s]+)(\{)?/, xe = /^%[^\n]+(?:\n|$)/, jt = /^[^#$%&~_^\\{}]+/, Ye = /^\\([&{}$%#_])/, Ve = /(?:\\[\\@,!:;-]|-{2,3}|[!?]`|``?|,,|''?|~|<<|>>)/g, Qt = { "---": "—", "--": "–", "!`": "¡", "?`": "¿", "``": "“", ",,": "„", "''": "”", "`": "‘", "'": "’", "<<": "«", ">>": "»", "~": " ", "\\-": "­", "\\,": " ", "\\;": " ", "\\:": " ", "\\!": " ", "\\@": "\uFEFF", "\\\\": "\\newline{}" }, q = { bf: function(r) {
1543
1543
  r.weight = "bold";
1544
1544
  }, it: function(r) {
1545
1545
  r.style = "italic";
@@ -1561,7 +1561,7 @@ function Sn() {
1561
1561
  this.open_context().href = i, this.add_token(new M(i)), this.close_context();
1562
1562
  } };
1563
1563
  q.textsuperscript = q["^"], q.textsubscript = q._, q.textsl = q.sl, q.mathbf = q.bf, q.mathit = q.it, q.textbf = q.bf, q.textit = q.it, q.textcolor = q.color;
1564
- var Ve = /[\r\n\xA0]+/g;
1564
+ var Xe = /[\r\n\xA0]+/g;
1565
1565
  function Ee(r, i) {
1566
1566
  r.sup && (r.baseline = 0.45, r.size = 0.7), r.sub && (r.baseline = -0.3, r.size = 0.7);
1567
1567
  var a = i;
@@ -1595,20 +1595,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1595
1595
  for (var a = 0, t = new Array(i); a < i; a++) t[a] = r[a];
1596
1596
  return t;
1597
1597
  }
1598
- var ke = { center: "middle", right: "end" }, Xe = { middle: 0.5, center: 0.5, bottom: 1, end: 1 }, ee = function(r, i) {
1598
+ var ke = { center: "middle", right: "end" }, Ge = { middle: 0.5, center: 0.5, bottom: 1, end: 1 }, ee = function(r, i) {
1599
1599
  return !r && !i || r === i;
1600
1600
  };
1601
- function Ge(r, i) {
1601
+ function Je(r, i) {
1602
1602
  var a = [], t = i.font(), s = t.size, c = t.family, p = i.align(), m = i.createElement();
1603
1603
  if (r.length) {
1604
1604
  var w = t.height, b = i.valign(), E = i.height()(), D = i.width()(0), T = !isFinite(D) && r.length === 1, O = T ? null : i.x(), j = ct(w / s), W = T ? null : ct(w / (1.15 * s + (w - s) / 2));
1605
- if (Xe[b] && isFinite(E)) {
1605
+ if (Ge[b] && isFinite(E)) {
1606
1606
  var F = b === "bottom" ? 1 : 0.5;
1607
1607
  W += (E * F - w * r.length * F) / s;
1608
1608
  }
1609
1609
  var P = p === "justify", H = 0;
1610
1610
  p === "right" ? H = D : p === "center" && (H = D / 2);
1611
- for (var N = [], J = "tspan", K = null, U = "", $ = function() {
1611
+ for (var N = [], J = "tspan", K = null, U = "", I = function() {
1612
1612
  if (U) {
1613
1613
  var Ct = m(J, K, U);
1614
1614
  N.push(Ct);
@@ -1620,9 +1620,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1620
1620
  N = [];
1621
1621
  for (var Mt = 0, le = 0, pt = void 0, Z = 0, Oe = gt.length; Z < Oe; Z++) {
1622
1622
  var Y = gt[Z], Q = Y.font;
1623
- Y.whitespace && Mt++, le += Y.width, Z && !Y.tracking && !ht && ee(Q.id, ft) && ee(Y.class, Et) && ee(pt, Y.href) ? U += Y.value : ($(), U = Y.value, K = { fontFamily: Q.family !== c ? Q.family : null, fontSize: Q.size !== s ? Q.size : null, fontWeight: Q.weight || null, fontStyle: Q.style || null, fontVariant: Q.variant !== "normal" && Q.variant || null, fill: Q.color || null, baselineShift: Q.baseline ? 100 * Q.baseline + "%" : null, className: Y.class || null }, ht && (K.dx = ct(ht), ht = 0), Y.tracking && (ht = Q.size * Y.tracking), Y.href && !pt ? (pt = Y.href, J = "a", K.href = pt, K.rel = Y.rel, K.target = Y.target) : pt = null, ft = Q.id, Et = Y.class);
1623
+ Y.whitespace && Mt++, le += Y.width, Z && !Y.tracking && !ht && ee(Q.id, ft) && ee(Y.class, Et) && ee(pt, Y.href) ? U += Y.value : (I(), U = Y.value, K = { fontFamily: Q.family !== c ? Q.family : null, fontSize: Q.size !== s ? Q.size : null, fontWeight: Q.weight || null, fontStyle: Q.style || null, fontVariant: Q.variant !== "normal" && Q.variant || null, fill: Q.color || null, baselineShift: Q.baseline ? 100 * Q.baseline + "%" : null, className: Y.class || null }, ht && (K.dx = ct(ht), ht = 0), Y.tracking && (ht = Q.size * Y.tracking), Y.href && !pt ? (pt = Y.href, J = "a", K.href = pt, K.rel = Y.rel, K.target = Y.target) : pt = null, ft = Q.id, Et = Y.class);
1624
1624
  }
1625
- if ($(), T) a.push.apply(a, Ae(N));
1625
+ if (I(), T) a.push.apply(a, Ae(N));
1626
1626
  else {
1627
1627
  var De = null, ue = ot === nt - 1 || gt[gt.length - 1] instanceof X;
1628
1628
  P && gt.length > 1 && !ue && (De = ct((D - le) / Mt)), a.push(m.apply(void 0, ["tspan", { wordSpacing: De, x: O(ot) + H, dy: ct(ot ? j : W) + "em" }].concat(Ae(N))));
@@ -1632,11 +1632,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1632
1632
  }
1633
1633
  return m.apply(void 0, ["text", { fontFamily: c, fontSize: s, textAnchor: ke[p] || "start" }].concat(a));
1634
1634
  }
1635
- var Je = { middle: 0.5, center: 0.5, bottom: 1, end: 1 };
1636
- function Ke(r, i, a) {
1635
+ var Ke = { middle: 0.5, center: 0.5, bottom: 1, end: 1 };
1636
+ function Ze(r, i, a) {
1637
1637
  if (r.length) {
1638
1638
  a.textBaseline = "middle";
1639
- var t = i.font(), s = t.height, c = t.size, p = i.valign(), m = i.height()(), w = i.width()(0), b = i.align(), E = b === "justify", D = 0.5 * s, T = Je[p];
1639
+ var t = i.font(), s = t.height, c = t.size, p = i.valign(), m = i.height()(), w = i.width()(0), b = i.align(), E = b === "justify", D = 0.5 * s, T = Ke[p];
1640
1640
  if (T && isFinite(m)) {
1641
1641
  var O = r.length * s;
1642
1642
  D += m * T - O * T;
@@ -1649,10 +1649,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1649
1649
  var J = 0, K = W === r.length - 1 || j[j.length - 1] instanceof X;
1650
1650
  E && j.length > 1 && !K && (J = (w - N) / H), j.forEach(function(U) {
1651
1651
  a.font = U.font;
1652
- var $ = U.font, ot = $.baseline ? c * -$.baseline + 0.15 * c : 0;
1652
+ var I = U.font, ot = I.baseline ? c * -I.baseline + 0.15 * c : 0;
1653
1653
  a.fillStyle = function(Et, ht) {
1654
1654
  return Et.color ? Et.color : ht.href ? "#00C" : "#000";
1655
- }($, U);
1655
+ }(I, U);
1656
1656
  var nt = 0;
1657
1657
  if (b === "right" ? nt += w - N : b === "center" ? nt += w / 2 - N / 2 : b === "justify" && (U.whitespace || U instanceof X) && (F += J), a.fillText(U.value, F + nt, P + ot), U.href) {
1658
1658
  a.beginPath(), a.strokeStyle = a.fillStyle;
@@ -1724,10 +1724,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1724
1724
  var D = b.height(), T = b.width(), O = b.overflowLine(), j = b.overflowWrap(), W = R(E, !0, !1), F = isFinite(D()) ? Math.floor(D() / E.height) : 1 / 0;
1725
1725
  if (!D() && !T(0) || !F) return [];
1726
1726
  for (var P = 0, H = 0, N = 0, J = [], K = [], U = !1; P < w.length && H < F; ) {
1727
- var $ = w[P], ot = Ee($, E);
1728
- if ($.width = B($, ot), $.font = ot, $.line = H, $.whitespace = $.value in C, $.value && ($.value = $.value.replace(Ve, " ")), !(!N && $.whitespace || U && $.whitespace)) if ($ instanceof X) N = 0, K = [], J.push(P + 1), H++;
1729
- else if ($ instanceof lt || $ instanceof ut) K.push({ index: P, width: N });
1730
- else if ($.whitespace || N + $.width < T(H)) N += $.width;
1727
+ var I = w[P], ot = Ee(I, E);
1728
+ if (I.width = B(I, ot), I.font = ot, I.line = H, I.whitespace = I.value in C, I.value && (I.value = I.value.replace(Xe, " ")), !(!N && I.whitespace || U && I.whitespace)) if (I instanceof X) N = 0, K = [], J.push(P + 1), H++;
1729
+ else if (I instanceof lt || I instanceof ut) K.push({ index: P, width: N });
1730
+ else if (I.whitespace || N + I.width < T(H)) N += I.width;
1731
1731
  else if (K.length) {
1732
1732
  var nt = void 0, ft = void 0;
1733
1733
  do {
@@ -1738,27 +1738,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1738
1738
  J.push(nt.index + 1), N = 0, H++, P = nt.index, K = [];
1739
1739
  } else if (j === "break-word") {
1740
1740
  var gt = T(H);
1741
- if (N + $.width > gt) {
1742
- var Mt = $.clone();
1741
+ if (N + I.width > gt) {
1742
+ var Mt = I.clone();
1743
1743
  do
1744
- $.value = $.value.slice(0, -1), $.width = B($, $.font), N += $.width;
1745
- while ($.value && $.width > gt);
1746
- Mt.value = Mt.value.slice($.value.length), w.splice(P + 1, 0, new lt(), Mt);
1744
+ I.value = I.value.slice(0, -1), I.width = B(I, I.font), N += I.width;
1745
+ while (I.value && I.width > gt);
1746
+ Mt.value = Mt.value.slice(I.value.length), w.splice(P + 1, 0, new lt(), Mt);
1747
1747
  }
1748
1748
  J.push(P + 1), N = 0, H++;
1749
- } else N += $.width;
1750
- P++, U = $.whitespace;
1749
+ } else N += I.width;
1750
+ P++, U = I.whitespace;
1751
1751
  }
1752
1752
  P !== J[J.length - 1] && J.push(P);
1753
1753
  var le = 0, pt = 0, Z = J.map(function(Ct) {
1754
1754
  for (var et, Tt = le; (et = w[Tt]) && (et.whitespace || !et.value); ) Tt++;
1755
- for (var At = Ct, tr = null; At > Tt && (et = w[At - 1]) && (et.whitespace || !(et.value || et instanceof ut)); ) et instanceof X && (tr = et), At--;
1755
+ for (var At = Ct, er = null; At > Tt && (et = w[At - 1]) && (et.whitespace || !(et.value || et instanceof ut)); ) et instanceof X && (er = et), At--;
1756
1756
  et instanceof ut && (et.value = "-", et.width = B("-", et.font)), le = Ct;
1757
- var zt = w.slice(Tt, At).filter(function(er) {
1758
- return er.value;
1757
+ var zt = w.slice(Tt, At).filter(function(rr) {
1758
+ return rr.value;
1759
1759
  });
1760
- return tr && zt.push(tr), zt.width = zt.reduce(function(er, Jr) {
1761
- return er + Jr.width;
1760
+ return er && zt.push(er), zt.width = zt.reduce(function(rr, Jr) {
1761
+ return rr + Jr.width;
1762
1762
  }, 0), zt.width > pt && (pt = zt.width), zt;
1763
1763
  });
1764
1764
  if (Z.hasLineOverflow = !1, O) {
@@ -1815,7 +1815,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1815
1815
  return arguments.length ? (this.props.createElement = t, this) : this.props.createElement || r.createElement;
1816
1816
  } }, { key: "render", value: function() {
1817
1817
  var t = _e(arguments);
1818
- return typeof t.text == "string" && (t.text = this.linebreak(t.text)), t.ctx ? Ke(t.text, this, t.ctx) : Ge(t.text, this);
1818
+ return typeof t.text == "string" && (t.text = this.linebreak(t.text)), t.ctx ? Ze(t.text, this, t.ctx) : Je(t.text, this);
1819
1819
  } }], a && Se(i.prototype, a), Object.defineProperty(i, "prototype", { writable: !1 }), r;
1820
1820
  }();
1821
1821
  function xt(r) {
@@ -1906,7 +1906,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1906
1906
  }
1907
1907
  } }], a && Ce(i.prototype, a), Object.defineProperty(i, "prototype", { writable: !1 }), r;
1908
1908
  }(), Re = Object.prototype.hasOwnProperty, oe = {};
1909
- function Ze(r) {
1909
+ function Qe(r) {
1910
1910
  return oe[r] || (oe[r] = r.replace(/([a-z])([A-Z])/g, function(i, a, t) {
1911
1911
  return a + "-" + t.toLowerCase();
1912
1912
  })), oe[r];
@@ -1920,7 +1920,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1920
1920
  function ae(r, i) {
1921
1921
  if (typeof document < "u") {
1922
1922
  var a = typeof r == "string" ? document.createElementNS("http://www.w3.org/2000/svg", r) : r;
1923
- if (i && a.setAttribute) for (var t in i) Re.call(i, t) && i[t] != null && a.setAttribute(t === "className" ? "class" : Ze(t), i[t]);
1923
+ if (i && a.setAttribute) for (var t in i) Re.call(i, t) && i[t] != null && a.setAttribute(t === "className" ? "class" : Qe(t), i[t]);
1924
1924
  for (var s = arguments.length, c = new Array(s > 2 ? s - 2 : 0), p = 2; p < s; p++) c[p - 2] = arguments[p];
1925
1925
  return c != null && c.length && c.forEach(function(m) {
1926
1926
  se(a, m);
@@ -1933,19 +1933,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1933
1933
  for (var T in t) t[T] && (D[T] = t[T]);
1934
1934
  s.push(D);
1935
1935
  }, m = function(D) {
1936
- var T = s.length, O = Be[D];
1936
+ var T = s.length, O = qe[D];
1937
1937
  if (T && O) {
1938
- for (var j = T - 1; s[j] && (s[j] instanceof lt || He.test(s[j].value)); ) j--;
1938
+ for (var j = T - 1; s[j] && (s[j] instanceof lt || Be.test(s[j].value)); ) j--;
1939
1939
  for (; O && s[j] && s[j] instanceof X; ) j--, O--;
1940
1940
  for (; O-- > 0; ) s.push(new X());
1941
1941
  }
1942
1942
  }; r.length; ) {
1943
1943
  if (i = /^[^<]+/.exec(r)) kt(Zt(i[0]), !1).forEach(p);
1944
- else if (!(i = $t.exec(r))) if (i = Gt.exec(r)) c.length && (t = c.pop()), m(i[1]);
1944
+ else if (!(i = It.exec(r))) if (i = Gt.exec(r)) c.length && (t = c.pop()), m(i[1]);
1945
1945
  else if (i = Jt.exec(r)) {
1946
1946
  var w = i[1];
1947
1947
  m(w), c.push(t), t = Object.create(t), _t[w] && _t[w](t, "");
1948
- var b = It(i[2]);
1948
+ var b = $t(i[2]);
1949
1949
  w === "a" && (b.href && (t.href = b.href), b.rel && (t.rel = b.rel), b.target && (t.target = b.target)), b.class && (t.class = t.class ? t.class + " " + b.class : b.class), b.style && (a = /(?:^|\s|;)color\s*:\s*([^;\s"']+)/.exec(b.style)) && a[1] && (t.color = a[1]), w === "br" && s.push(new X());
1950
1950
  } else i = [r.slice(0, 1)], p(new M(i[0]));
1951
1951
  r = r.slice(i[0].length);
@@ -1959,7 +1959,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1959
1959
  return i.push(P), "\\verb," + (i.length - 1) + ",";
1960
1960
  }).replace(/\\\\\n/g, function() {
1961
1961
  return "\\\\";
1962
- }).replace(Ye, function(F, P, H) {
1962
+ }).replace(Ve, function(F, P, H) {
1963
1963
  return H.charAt(P - 1) === "\\" ? F : Qt[F];
1964
1964
  }).replace(/\n\s+/g, function(F) {
1965
1965
  return /\n/.test(F.slice(1)) ? "\\par " : F;
@@ -1980,7 +1980,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1980
1980
  t = c.pop();
1981
1981
  }, b = { tokens: s, open_context: m, close_context: w, add_token: p }; r.length; ) {
1982
1982
  if (a = jt.exec(r)) kt(a[0], !1).forEach(p);
1983
- else if (a = Ue.exec(r)) p(new M(a[1]));
1983
+ else if (a = Ye.exec(r)) p(new M(a[1]));
1984
1984
  else if (!(a = xe.exec(r))) {
1985
1985
  if (a = /^\{/.exec(r)) m();
1986
1986
  else if (a = /^\}/.exec(r)) w();
@@ -2011,23 +2011,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2011
2011
  }, G.measureText = function(r, i, a) {
2012
2012
  return B(r, R(i), a);
2013
2013
  }, G.Token = M, G.Break = lt, G.LineBreak = X, G.SoftHyphen = ut, G.Rotator = ie, ie.createElement = ae;
2014
- const Qe = G;
2014
+ const tr = G;
2015
2015
  return n.default;
2016
2016
  })());
2017
2017
  }(dr)), dr.exports;
2018
2018
  }
2019
2019
  var Cn = Sn();
2020
2020
  const Tr = /* @__PURE__ */ Ur(Cn);
2021
- function ir(u) {
2021
+ function or(u) {
2022
2022
  return u.replace(/…$/, "");
2023
2023
  }
2024
- function or(u) {
2024
+ function sr(u) {
2025
2025
  return u.children[0].innerHTML;
2026
2026
  }
2027
2027
  function Tn(u, e) {
2028
2028
  const o = mt(u), { fontSize: n, font: l, padding: h = 0 } = u.properties.style || {};
2029
2029
  if (o.width === o.height && o.width === 0) return;
2030
- const f = new Tr({
2030
+ const d = new Tr({
2031
2031
  font: `${n}px/${n}px ${l}`.replace(/(px)+/g, "px"),
2032
2032
  width: o.width - h * 2,
2033
2033
  height: o.height - h * 2,
@@ -2038,43 +2038,43 @@ function Tn(u, e) {
2038
2038
  parser: "html",
2039
2039
  createElement: Tr.createElement
2040
2040
  });
2041
- f.overflowWrap("break-word");
2042
- const g = f.linebreak(
2041
+ d.overflowWrap("break-word");
2042
+ const g = d.linebreak(
2043
2043
  u.properties.content.replaceAll(`
2044
2044
  `, "<br>")
2045
- ).render(), d = [...g.children];
2045
+ ).render(), f = [...g.children];
2046
2046
  let v = 0;
2047
2047
  const y = [];
2048
2048
  u.properties.content.split(`
2049
2049
  `).forEach((S) => {
2050
2050
  let R = S;
2051
- for (; R.length && v < d.length; ) {
2052
- if (d[v].innerHTML === "&nbsp;") {
2051
+ for (; R.length && v < f.length; ) {
2052
+ if (f[v].innerHTML === "&nbsp;") {
2053
2053
  R.startsWith(`
2054
2054
  `) || y.push(v), v++;
2055
2055
  break;
2056
2056
  }
2057
- const C = ir(or(d[v]));
2057
+ const C = or(sr(f[v]));
2058
2058
  R.startsWith(C) && (R = R.slice(C.length).trim()), v++;
2059
2059
  }
2060
- }), y.forEach((S) => g.removeChild(d[S]));
2061
- const A = u.properties.content.match(/(https?:\/\/.*)/gm), _ = A ? A.map((S) => S.split(" ")[0]) : [];
2062
- g.setAttribute("transform", `translate(${h}, ${h})`), _.forEach((S) => {
2060
+ }), y.forEach((S) => g.removeChild(f[S]));
2061
+ const A = u.properties.content.match(/(https?:\/\/.*)/gm), k = A ? A.map((S) => S.split(" ")[0]) : [];
2062
+ g.setAttribute("transform", `translate(${h}, ${h})`), k.forEach((S) => {
2063
2063
  let R = S;
2064
2064
  const C = [];
2065
2065
  for (; R.length > 0; ) {
2066
- const L = d.find(
2067
- (k) => !!k.children[0] && k.children[0].tagName === "tspan" && R.startsWith(ir(or(k)))
2066
+ const L = f.find(
2067
+ (_) => !!_.children[0] && _.children[0].tagName === "tspan" && R.startsWith(or(sr(_)))
2068
2068
  );
2069
2069
  if (!L) break;
2070
2070
  C.push(L);
2071
- const I = ir(L.children[0].innerHTML).length;
2072
- if (!I) break;
2073
- R = R.slice(I);
2071
+ const $ = or(L.children[0].innerHTML).length;
2072
+ if (!$) break;
2073
+ R = R.slice($);
2074
2074
  }
2075
2075
  C.forEach((L) => {
2076
- const I = document.createElementNS("http://www.w3.org/2000/svg", "a");
2077
- I.setAttribute("href", S), I.setAttribute("target", "_blank"), I.innerHTML = or(L), L.children[0].innerHTML = "", L.children[0].appendChild(I);
2076
+ const $ = document.createElementNS("http://www.w3.org/2000/svg", "a");
2077
+ $.setAttribute("href", S), $.setAttribute("target", "_blank"), $.innerHTML = sr(L), L.children[0].innerHTML = "", L.children[0].appendChild($);
2078
2078
  });
2079
2079
  }), e.appendChild(g);
2080
2080
  }
@@ -2096,43 +2096,43 @@ class Rn extends Vr {
2096
2096
  <textarea wrap="on"></textarea>
2097
2097
  </div>
2098
2098
  `
2099
- ), x(this, "textArea"), x(this, "handleSize"), x(this, "rect", { x: 0, y: 0, width: 0, height: 0 }), x(this, "annotation", { ...nr }), x(this, "startX", 0), x(this, "startY", 0), x(this, "handles", []), x(this, "draggedHandle", V), x(this, "isFocused", !1), x(this, "placeholder", "Type your text here..."), x(this, "_onFocus", () => {
2099
+ ), x(this, "textArea"), x(this, "handleSize"), x(this, "rect", { x: 0, y: 0, width: 0, height: 0 }), x(this, "annotation", { ...ir }), x(this, "startX", 0), x(this, "startY", 0), x(this, "handles", []), x(this, "draggedHandle", V), x(this, "isFocused", !1), x(this, "placeholder", "Type your text here..."), x(this, "_onFocus", () => {
2100
2100
  this.textArea.value === this.placeholder && (this.textArea.value = ""), this.isFocused = !0;
2101
2101
  }), x(this, "_onBlur", () => {
2102
2102
  this.isFocused = !1;
2103
- }), x(this, "startDrawing", (l, h, f = kn(l, h, 0, 0, "", Wt)) => {
2104
- this.add(f);
2103
+ }), x(this, "startDrawing", (l, h, d = kn(l, h, 0, 0, "", Wt)) => {
2104
+ this.add(d);
2105
2105
  const g = this.ogma.view.graphToScreenCoordinates({ x: l, y: h });
2106
- this.select(f.id), this.startDragging(this.getById(f.id), g.x, g.y), this.draggedHandle = 6;
2106
+ this.select(d.id), this.startDragging(this.getById(d.id), g.x, g.y), this.draggedHandle = 6;
2107
2107
  }), x(this, "cancelDrawing", () => {
2108
- this.isDragging && (this.remove(this.annotation.id), this.annotation = { ...nr }, this.draggedHandle = V, this.isDragging = !1, this.emit(Ut, this.annotation));
2109
- }), x(this, "startDragging", (l, h, f) => {
2108
+ this.isDragging && (this.remove(this.annotation.id), this.annotation = { ...ir }, this.draggedHandle = V, this.isDragging = !1, this.emit(Ut, this.annotation));
2109
+ }), x(this, "startDragging", (l, h, d) => {
2110
2110
  this.annotation = l;
2111
- const g = vt(this.annotation), d = mt(this.annotation);
2112
- this.rect.x = g.x, this.rect.y = g.y, this.rect.width = d.width, this.rect.height = d.height, this.startX = h, this.startY = f, this.disableDragging(), this.textArea.classList.add("noevents"), this.textArea.setAttribute("disabled", "disabled"), this.emit(ze, this.annotation), this.isDragging = !0;
2111
+ const g = vt(this.annotation), f = mt(this.annotation);
2112
+ this.rect.x = g.x, this.rect.y = g.y, this.rect.width = f.width, this.rect.height = f.height, this.startX = h, this.startY = d, this.disableDragging(), this.textArea.classList.add("noevents"), this.textArea.setAttribute("disabled", "disabled"), this.emit(Ne, this.annotation), this.isDragging = !0;
2113
2113
  }), x(this, "onHandleMouseDown", (l) => {
2114
2114
  const h = this.getById(this.selectedId) || this.getById(this.hoveredId);
2115
2115
  if (!h) return;
2116
2116
  this.selectedId !== h.id && this.select(this.hoveredId);
2117
- const { x: f, y: g } = sr(l, this.ogma.getContainer());
2118
- this.startDragging(h, f, g), this.draggedHandle = Nr(l.target);
2117
+ const { x: d, y: g } = Me(l, this.ogma.getContainer());
2118
+ this.startDragging(h, d, g), this.draggedHandle = Nr(l.target);
2119
2119
  }), x(this, "onMouseMove", (l) => {
2120
2120
  requestAnimationFrame(() => this._onMouseMove(l));
2121
2121
  }), x(this, "_onMouseMove", (l) => {
2122
2122
  if (!this.isDragging) return;
2123
2123
  l.stopPropagation(), l.preventDefault();
2124
2124
  const h = this.handles[this.draggedHandle];
2125
- let f = h.classList.contains("top");
2126
- const g = h.classList.contains("left"), d = h.classList.contains("right"), v = h.classList.contains("bottom");
2125
+ let d = h.classList.contains("top");
2126
+ const g = h.classList.contains("left"), f = h.classList.contains("right"), v = h.classList.contains("bottom");
2127
2127
  let y = h.classList.contains("line-handle");
2128
- !y && !f && !v && !g && !d && (f = !0, y = !0);
2129
- const { x: A, y: _ } = sr(
2128
+ !y && !d && !v && !g && !f && (d = !0, y = !0);
2129
+ const { x: A, y: k } = Me(
2130
2130
  l,
2131
2131
  this.ogma.getContainer()
2132
2132
  );
2133
2133
  let S = this.rect.x, R = this.rect.y, C = Math.max(this.rect.width, Rr), L = Math.max(this.rect.height, Rr);
2134
- const I = this.ogma.view.getZoom(), k = (A - this.startX) / I, z = (_ - this.startY) / I, B = this.ogma.view.getAngle(), tt = st({ x: k, y: z }, B), rt = st({ x: k, y: z }, -B);
2135
- y ? (S = this.rect.x + tt.x, R = this.rect.y + tt.y) : g && f ? (S += tt.x, R += tt.y, C -= k, L -= z) : d && v ? (C += k, L += z) : g && v ? (S += rt.x, C -= rt.x, L += rt.y) : d && f && (R += rt.y, C += rt.x, L -= rt.y), hn(this.annotation, S, R, C, L), this.emit(Me, this.annotation, "text"), this.refreshEditor(), this.layer.refresh();
2134
+ const $ = this.ogma.view.getZoom(), _ = (A - this.startX) / $, z = (k - this.startY) / $, B = this.ogma.view.getAngle(), tt = st({ x: _, y: z }, B), rt = st({ x: _, y: z }, -B);
2135
+ y ? (S = this.rect.x + tt.x, R = this.rect.y + tt.y) : g && d ? (S += tt.x, R += tt.y, C -= _, L -= z) : f && v ? (C += _, L += z) : g && v ? (S += rt.x, C -= rt.x, L += rt.y) : f && d && (R += rt.y, C += rt.x, L -= rt.y), hn(this.annotation, S, R, C, L), this.emit(ze, this.annotation, "text"), this.refreshEditor(), this.layer.refresh();
2136
2136
  }), x(this, "onMouseUp", () => {
2137
2137
  !this.isDragging || this.draggedHandle === V || (this.restoreDragging(), this.textArea.classList.remove("noevents"), this.textArea.removeAttribute("disabled"), this.emit(Ut, this.annotation), this.isDragging = !1, this.draggedHandle = V);
2138
2138
  }), x(this, "_onMousedown", (l) => {
@@ -2156,34 +2156,34 @@ class Rn extends Vr {
2156
2156
  }
2157
2157
  detect({ x: e, y: o }, n = 0) {
2158
2158
  const l = { x: e, y: o }, h = this.ogma.view.getAngle();
2159
- return this.elements.find((f) => {
2160
- const { x: g, y: d } = vt(f), { width: v, height: y } = mt(f), A = { x: g, y: d }, { x: _, y: S } = st(Ot(l, A), -h);
2161
- return _ > -n && _ < v + n && S > -n && S < y + n;
2159
+ return this.elements.find((d) => {
2160
+ const { x: g, y: f } = vt(d), { width: v, height: y } = mt(d), A = { x: g, y: f }, { x: k, y: S } = st(Ot(l, A), -h);
2161
+ return k > -n && k < v + n && S > -n && S < y + n;
2162
2162
  });
2163
2163
  }
2164
2164
  draw(e) {
2165
2165
  e.innerHTML = "";
2166
2166
  const o = "", n = this.ogma.view.getAngle();
2167
2167
  for (let h = 0; h < this.elements.length; h++) {
2168
- const f = this.elements[h], g = `class${h}`, d = mt(f), v = vt(f);
2169
- if (f.id === this.selectedId) continue;
2168
+ const d = this.elements[h], g = `class${h}`, f = mt(d), v = vt(d);
2169
+ if (d.id === this.selectedId) continue;
2170
2170
  const {
2171
2171
  color: y,
2172
2172
  fontSize: A,
2173
- font: _,
2173
+ font: k,
2174
2174
  strokeColor: S,
2175
2175
  strokeWidth: R,
2176
2176
  strokeType: C,
2177
2177
  background: L,
2178
- borderRadius: I
2179
- } = f.properties.style || Wt, k = Rt("g");
2180
- k.classList.add("annotation-text"), k.setAttribute("fill", `${y}`), k.setAttribute("font-size", `${A}px`), k.setAttribute("font-family", `${_}`);
2178
+ borderRadius: $
2179
+ } = d.properties.style || Wt, _ = Rt("g");
2180
+ _.classList.add("annotation-text"), _.setAttribute("fill", `${y}`), _.setAttribute("font-size", `${A}px`), _.setAttribute("font-family", `${k}`);
2181
2181
  const z = Rt("rect");
2182
- I && (z.setAttribute("rx", `${I}`), z.setAttribute("ry", `${I}`));
2182
+ $ && (z.setAttribute("rx", `${$}`), z.setAttribute("ry", `${$}`));
2183
2183
  let B = !1;
2184
- C && C !== "none" && (B = !0, z.setAttribute("stroke", S || "black"), z.setAttribute("stroke-width", `${R}`), C === "dashed" && z.setAttribute("stroke-dasharray", "5,5")), (L && L.length || B) && (B = !0, z.setAttribute("fill", L || "transparent")), B && (z.setAttribute("width", `${d.width}`), z.setAttribute("height", `${d.height}`)), k.appendChild(z), Tn(f, k);
2184
+ C && C !== "none" && (B = !0, z.setAttribute("stroke", S || "black"), z.setAttribute("stroke-width", `${R}`), C === "dashed" && z.setAttribute("stroke-dasharray", "5,5")), (L && L.length || B) && (B = !0, z.setAttribute("fill", L || "transparent")), B && (z.setAttribute("width", `${f.width}`), z.setAttribute("height", `${f.height}`)), _.appendChild(z), Tn(d, _);
2185
2185
  const { x: tt, y: rt } = st(v, -n);
2186
- k.setAttribute("transform", `translate(${tt},${rt})`), k.classList.add(g), k.setAttribute("data-annotation", `${f.id}`), k.setAttribute("data-annotation-type", "text"), e.appendChild(k);
2186
+ _.setAttribute("transform", `translate(${tt},${rt})`), _.classList.add(g), _.setAttribute("data-annotation", `${d.id}`), _.setAttribute("data-annotation-type", "text"), e.appendChild(_);
2187
2187
  }
2188
2188
  const l = Rt("style");
2189
2189
  l.innerHTML = o, e.firstChild && e.insertBefore(l, e.firstChild);
@@ -2193,12 +2193,12 @@ class Rn extends Vr {
2193
2193
  for (let n = 0; n < o.length; n++) {
2194
2194
  const l = o[n];
2195
2195
  if (!l.hasAttribute("data-annotation")) continue;
2196
- const h = l.getAttribute("data-annotation"), f = vt(this.getById(h)), { x: g, y: d } = st(f, -e);
2197
- l.setAttribute("transform", `translate(${g},${d})`);
2196
+ const h = l.getAttribute("data-annotation"), d = vt(this.getById(h)), { x: g, y: f } = st(d, -e);
2197
+ l.setAttribute("transform", `translate(${g},${f})`);
2198
2198
  }
2199
2199
  }
2200
2200
  getDefaultOptions() {
2201
- return nr;
2201
+ return ir;
2202
2202
  }
2203
2203
  refreshEditor() {
2204
2204
  if (+this.selectedId < 0 && +this.hoveredId < 0) return;
@@ -2206,16 +2206,16 @@ class Rn extends Vr {
2206
2206
  vt(e)
2207
2207
  ), l = this.ogma.view.getZoom(), {
2208
2208
  font: h,
2209
- fontSize: f,
2209
+ fontSize: d,
2210
2210
  color: g,
2211
- background: d,
2211
+ background: f,
2212
2212
  padding: v = 0
2213
- } = e.properties.style || Wt, y = (f || 1) * l;
2213
+ } = e.properties.style || Wt, y = (d || 1) * l;
2214
2214
  this.textArea.value = e.properties.content;
2215
2215
  const A = this.editor.element.style;
2216
2216
  A.transform = `translate(${n.x}px, ${n.y}px)translate(-50%, -50%)translate(${o.width / 2 * l}px, ${o.height / 2 * l}px)`, A.width = `${o.width * l}px`, A.height = `${o.height * l}px`;
2217
- const _ = this.textArea.style;
2218
- _.font = `${y} ${h}`, _.fontFamily = h || "sans-serif", _.fontSize = `${y}px`, _.padding = `${l * v}px`, _.lineHeight = `${y}px`, _.boxSizing = "border-box", _.color = g || "black", _.background = d || "transparent", this.textArea.placeholder = this.placeholder, this.layer.refresh();
2217
+ const k = this.textArea.style;
2218
+ k.font = `${y} ${h}`, k.fontFamily = h || "sans-serif", k.fontSize = `${y}px`, k.padding = `${l * v}px`, k.lineHeight = `${y}px`, k.boxSizing = "border-box", k.color = g || "black", k.background = f || "transparent", this.textArea.placeholder = this.placeholder, this.layer.refresh();
2219
2219
  }
2220
2220
  select(e) {
2221
2221
  super.select(e), this.textArea.classList.add("noevents");
@@ -2229,15 +2229,15 @@ class On {
2229
2229
  x(this, "links", {}), x(this, "linksByTargetId", {}), x(this, "linksByArrowId", {});
2230
2230
  }
2231
2231
  add(e, o, n, l, h) {
2232
- const f = Ne(), g = e.id, d = {
2233
- id: f,
2232
+ const d = He(), g = e.id, f = {
2233
+ id: d,
2234
2234
  arrow: g,
2235
2235
  target: n,
2236
2236
  targetType: l,
2237
2237
  connectionPoint: h,
2238
2238
  side: o
2239
2239
  };
2240
- return this.links[f] = d, this.linksByTargetId[n] || (this.linksByTargetId[n] = []), this.linksByTargetId[n].push(f), this.linksByArrowId[g] || (this.linksByArrowId[g] = {}), this.linksByArrowId[g][o] = f, e.properties.link = e.properties.link || {}, e.properties.link[o] = {
2240
+ return this.links[d] = f, this.linksByTargetId[n] || (this.linksByTargetId[n] = []), this.linksByTargetId[n].push(d), this.linksByArrowId[g] || (this.linksByArrowId[g] = {}), this.linksByArrowId[g][o] = d, e.properties.link = e.properties.link || {}, e.properties.link[o] = {
2241
2241
  id: n,
2242
2242
  side: o,
2243
2243
  type: l,
@@ -2251,14 +2251,14 @@ class On {
2251
2251
  // remove the link between the arrow and the target by arrow id and side
2252
2252
  remove(e, o) {
2253
2253
  var n, l;
2254
- const h = e.id, f = (n = this.linksByArrowId[h]) == null ? void 0 : n[o];
2255
- if ((l = e.properties.link) == null || delete l[o], !f) return this;
2256
- const g = this.links[f];
2257
- delete this.links[f];
2258
- const d = this.linksByTargetId[g.target];
2259
- for (let v = 0; v < d.length; v++)
2260
- if (d[v] === f) {
2261
- d.splice(v, 1);
2254
+ const h = e.id, d = (n = this.linksByArrowId[h]) == null ? void 0 : n[o];
2255
+ if ((l = e.properties.link) == null || delete l[o], !d) return this;
2256
+ const g = this.links[d];
2257
+ delete this.links[d];
2258
+ const f = this.linksByTargetId[g.target];
2259
+ for (let v = 0; v < f.length; v++)
2260
+ if (f[v] === d) {
2261
+ f.splice(v, 1);
2262
2262
  break;
2263
2263
  }
2264
2264
  return delete this.linksByArrowId[h][o], this;
@@ -2304,24 +2304,24 @@ class Pn extends Yr {
2304
2304
  const l = this.ogma.view.getZoom();
2305
2305
  Pr.forEach((h) => {
2306
2306
  if (!this.textToMagnet) return;
2307
- const f = mt(this.textToMagnet), g = vt(this.textToMagnet), d = Ie(h, { x: f.width, y: f.height }), v = st(d, this.ogma.view.getAngle()), { x: y, y: A } = Bt(v, g);
2307
+ const d = mt(this.textToMagnet), g = vt(this.textToMagnet), f = $e(h, { x: d.width, y: d.height }), v = st(f, this.ogma.view.getAngle()), { x: y, y: A } = Bt(v, g);
2308
2308
  n.moveTo(y, A), n.arc(y, A, this.options.magnetHandleRadius / l, 0, Math.PI * 2);
2309
2309
  }), n.fill(), n.closePath();
2310
2310
  }), x(this, "_onFeatureDrag", (n, l) => {
2311
2311
  const h = l;
2312
2312
  if (at(n) && h === "line")
2313
- ["start", "end"].find((f) => {
2314
- const g = f === "start" ? de(n) : je(n);
2315
- return this._snapToText(n, h, g) || this._findAndSnapToNode(n, f, g);
2313
+ ["start", "end"].find((d) => {
2314
+ const g = d === "start" ? de(n) : je(n);
2315
+ return this._snapToText(n, h, g) || this._findAndSnapToNode(n, d, g);
2316
2316
  });
2317
2317
  else if (at(n) && h !== "line") {
2318
- const f = h === "start" ? de(n) : je(n);
2319
- this._snapToText(n, h, f) || this._findAndSnapToNode(n, h, f);
2320
- } else yt(n) && (this.activeLinks.forEach(({ arrow: f, side: g, connectionPoint: d }) => {
2321
- const v = this.getAnnotation(f), y = mt(n), A = vt(n), _ = Ie(d, { x: y.width, y: y.height }), S = st(_, this.ogma.view.getAngle()), R = Bt(S, A);
2318
+ const d = h === "start" ? de(n) : je(n);
2319
+ this._snapToText(n, h, d) || this._findAndSnapToNode(n, h, d);
2320
+ } else yt(n) && (this.activeLinks.forEach(({ arrow: d, side: g, connectionPoint: f }) => {
2321
+ const v = this.getAnnotation(d), y = mt(n), A = vt(n), k = $e(f, { x: y.width, y: y.height }), S = st(k, this.ogma.view.getAngle()), R = Bt(S, A);
2322
2322
  v.geometry.coordinates[g === "start" ? 0 : 1] = [R.x, R.y];
2323
2323
  }), this.activeLinks.length && this.arrows.refreshLayer());
2324
- this.layer.refresh(), this.emit(Me, n, l);
2324
+ this.layer.refresh(), this.emit(ze, n, l);
2325
2325
  }), x(this, "_onFeatureDragEnd", (n) => {
2326
2326
  this.dragged !== null && at(n) && de(this.dragged) && Dr.forEach((l) => {
2327
2327
  this.links.getArrowLink(n.id, l) && this.emit(wn, {
@@ -2333,7 +2333,7 @@ class Pn extends Yr {
2333
2333
  this.textToMagnet = void 0, at(n) ? this.dragged = n : yt(n) && this.activeLinks.push(...this.links.getTargetLinks(n.id, "text")), this.annotations.forEach((l) => {
2334
2334
  const h = l.getSelectedFeature();
2335
2335
  h && h !== n && l.unhover().unselect(), l.disableDetection();
2336
- }), this.emit(ze, n);
2336
+ }), this.emit(Ne, n);
2337
2337
  }), x(this, "_onNodesDragStart", () => {
2338
2338
  this.arrows.unhover().unselect(), this.texts.unhover().unselect();
2339
2339
  }), x(this, "_onNodesDrag", (n) => {
@@ -2341,12 +2341,12 @@ class Pn extends Yr {
2341
2341
  this._moveNodes(n.nodes, l, h);
2342
2342
  }), x(this, "_onLayoutEnd", (n) => {
2343
2343
  n.ids.forEach((l, h) => {
2344
- this.links.getTargetLinks(l, "node").forEach((f) => {
2345
- const g = this.getAnnotation(f.arrow), d = f.side, v = Le(
2344
+ this.links.getTargetLinks(l, "node").forEach((d) => {
2345
+ const g = this.getAnnotation(d.arrow), f = d.side, v = Le(
2346
2346
  g,
2347
- d === "start" ? "end" : "start"
2348
- ), y = n.positions.current[h], A = this.ogma.getNode(l).getAttribute("radius"), _ = $e(v, y, +A);
2349
- Ht(g, d, _.x, _.y);
2347
+ f === "start" ? "end" : "start"
2348
+ ), y = n.positions.current[h], A = this.ogma.getNode(l).getAttribute("radius"), k = Ie(v, y, +A);
2349
+ Ht(g, f, k.x, k.y);
2350
2350
  });
2351
2351
  }), this.arrows.refreshLayer(), this.texts.refreshLayer();
2352
2352
  }), x(this, "_onAdded", (n) => {
@@ -2364,22 +2364,22 @@ class Pn extends Yr {
2364
2364
  }), x(this, "_onUpdate", (n) => {
2365
2365
  this.emit(cr, n);
2366
2366
  }), this.options = this.setOptions({ ...Dn, ...o }), this.ogma = e, this.arrows = new An(e, this.options), this.texts = new Rn(e, this.options), this.annotations = [this.arrows, this.texts], this.annotations.forEach((n) => {
2367
- n.on(ze, this._onFeatureDragStart).on(Me, this._onFeatureDrag).on(Ut, this._onFeatureDragEnd).on(cr, this.onUpdate).on(lr, this._onUnselect).on(ar, this._onSelect).on(hr, this._onAdded).on(ur, this._onRemoved);
2367
+ n.on(Ne, this._onFeatureDragStart).on(ze, this._onFeatureDrag).on(Ut, this._onFeatureDragEnd).on(cr, this.onUpdate).on(lr, this._onUnselect).on(ar, this._onSelect).on(hr, this._onAdded).on(ur, this._onRemoved);
2368
2368
  }), this.ogma.events.on("nodesDragStart", this._onNodesDragStart).on("nodesDragProgress", this._onNodesDrag).on("layoutEnd", this._onLayoutEnd).on(["viewChanged", "rotate"], () => {
2369
2369
  this.refreshTextLinks();
2370
2370
  }), this.layer = e.layers.addCanvasLayer(this._render), this.layer.moveToBottom();
2371
2371
  }
2372
2372
  _moveNodes(e, o, n) {
2373
2373
  e.forEach((l) => {
2374
- const h = this.links.getTargetLinks(l.getId(), "node"), f = l.getPosition();
2374
+ const h = this.links.getTargetLinks(l.getId(), "node"), d = l.getPosition();
2375
2375
  h.forEach((g) => {
2376
- const d = this.getAnnotation(g.arrow), v = g.side, y = Le(
2377
- d,
2376
+ const f = this.getAnnotation(g.arrow), v = g.side, y = Le(
2377
+ f,
2378
2378
  v === "start" ? "end" : "start"
2379
2379
  );
2380
- let A = f;
2381
- const _ = +l.getAttribute("radius"), S = 1e-6;
2382
- (g.connectionPoint.x - (f.x - o) > S || g.connectionPoint.y - (f.y - n) > S) && (A = $e(y, f, _)), Ht(d, v, A.x, A.y);
2380
+ let A = d;
2381
+ const k = +l.getAttribute("radius"), S = 1e-6;
2382
+ (g.connectionPoint.x - (d.x - o) > S || g.connectionPoint.y - (d.y - n) > S) && (A = Ie(y, d, k)), Ht(f, v, A.x, A.y);
2383
2383
  });
2384
2384
  }), this.arrows.refreshLayer();
2385
2385
  }
@@ -2392,28 +2392,28 @@ class Pn extends Yr {
2392
2392
  }
2393
2393
  _findAndSnapToNode(e, o, n) {
2394
2394
  var l, h;
2395
- const f = this.ogma.view.graphToScreenCoordinates(n), g = this.ogma.view.getElementAt(f);
2396
- this.links.remove(e, o), g && g.isNode ? ((l = this.hoveredNode) == null || l.setSelected(!1), this.hoveredNode = g, g.setSelected(!0), this._snapToNode(e, o, g, f)) : ((h = this.hoveredNode) == null || h.setSelected(!1), this.hoveredNode = null);
2395
+ const d = this.ogma.view.graphToScreenCoordinates(n), g = this.ogma.view.getElementAt(d);
2396
+ this.links.remove(e, o), g && g.isNode ? ((l = this.hoveredNode) == null || l.setSelected(!1), this.hoveredNode = g, g.setSelected(!0), this._snapToNode(e, o, g, d)) : ((h = this.hoveredNode) == null || h.setSelected(!1), this.hoveredNode = null);
2397
2397
  }
2398
2398
  _snapToNode(e, o, n, l) {
2399
- const h = n.getPositionOnScreen(), f = +n.getAttribute("radius"), g = f * this.ogma.view.getZoom(), d = l.x - h.x, v = l.y - h.y, y = Math.sqrt(d * d + v * v), A = n.getPosition();
2399
+ const h = n.getPositionOnScreen(), d = +n.getAttribute("radius"), g = d * this.ogma.view.getZoom(), f = l.x - h.x, v = l.y - h.y, y = Math.sqrt(f * f + v * v), A = n.getPosition();
2400
2400
  if (y < g + this.options.detectMargin) {
2401
- let _ = A;
2401
+ let k = A;
2402
2402
  if (y > g / 2) {
2403
2403
  const S = Le(e, o === "end" ? "start" : "end");
2404
- _ = $e(S, _, f);
2404
+ k = Ie(S, k, d);
2405
2405
  }
2406
- Ht(e, o, _.x, _.y), this.links.add(e, o, n.getId(), "node", _);
2406
+ Ht(e, o, k.x, k.y), this.links.add(e, o, n.getId(), "node", k);
2407
2407
  }
2408
2408
  }
2409
2409
  refreshTextLinks() {
2410
2410
  let e = !1;
2411
2411
  this.links.forEach(
2412
- ({ connectionPoint: o, targetType: n, target: l, arrow: h, side: f }) => {
2412
+ ({ connectionPoint: o, targetType: n, target: l, arrow: h, side: d }) => {
2413
2413
  if (n !== "text") return;
2414
2414
  e = !0;
2415
- const g = this.getAnnotation(l), d = this.getAnnotation(h), v = mt(g), y = vt(g), A = Ie(o, { x: v.width, y: v.height }), _ = st(A, this.ogma.view.getAngle()), S = Bt(_, y);
2416
- Ht(d, f, S.x, S.y);
2415
+ const g = this.getAnnotation(l), f = this.getAnnotation(h), v = mt(g), y = vt(g), A = $e(o, { x: v.width, y: v.height }), k = st(A, this.ogma.view.getAngle()), S = Bt(k, y);
2416
+ Ht(f, d, S.x, S.y);
2417
2417
  }
2418
2418
  ), e && this.arrows.refreshLayer();
2419
2419
  }
@@ -2426,13 +2426,13 @@ class Pn extends Yr {
2426
2426
  findMagnetPoint(e, o, n) {
2427
2427
  let l;
2428
2428
  for (const h of e) {
2429
- const f = mt(o), g = vt(o), d = Ie(h, { x: f.width, y: f.height }), v = st(d, this.ogma.view.getAngle()), y = Bt(v, g), A = qt(Ot(y, n)), _ = Math.min(
2429
+ const d = mt(o), g = vt(o), f = $e(h, { x: d.width, y: d.height }), v = st(f, this.ogma.view.getAngle()), y = Bt(v, g), A = qt(Ot(y, n)), k = Math.min(
2430
2430
  this.options.magnetRadius * this.ogma.view.getZoom(),
2431
2431
  // when really zoomed in: avoid to snap on too far away magnets
2432
- f.width / 2,
2433
- f.height / 2
2432
+ d.width / 2,
2433
+ d.height / 2
2434
2434
  );
2435
- if (A < Math.max(_, this.options.magnetHandleRadius)) {
2435
+ if (A < Math.max(k, this.options.magnetHandleRadius)) {
2436
2436
  l = {
2437
2437
  point: y,
2438
2438
  magnet: h
@@ -2511,10 +2511,10 @@ class Pn extends Yr {
2511
2511
  const h = this.ogma.getNode(n.id);
2512
2512
  if (!h) continue;
2513
2513
  this.links.add(e, o, n.id, n.type, n.magnet);
2514
- const f = h.getPosition(), g = h.getAttribute("radius") || 0, d = Le(
2514
+ const d = h.getPosition(), g = h.getAttribute("radius") || 0, f = Le(
2515
2515
  e,
2516
2516
  o === "start" ? "end" : "start"
2517
- ), v = $e(d, f, +g);
2517
+ ), v = Ie(f, d, +g);
2518
2518
  Ht(e, o, v.x, v.y);
2519
2519
  }
2520
2520
  }
@@ -2553,7 +2553,7 @@ class Pn extends Yr {
2553
2553
  return n ? (at(n) ? this.arrows.updateStyle(n, o) : yt(n) && this.texts.updateStyle(n, o), this.onUpdate(n), this) : this;
2554
2554
  }
2555
2555
  setScale(e, o, n, l) {
2556
- const h = this.getAnnotations().features.find((f) => f.id === e);
2556
+ const h = this.getAnnotations().features.find((d) => d.id === e);
2557
2557
  return h ? (at(h) ? this.arrows.scale(h, o, n, l) : yt(h) && this.texts.scale(h, o, n, l), this.onUpdate(h), this) : this;
2558
2558
  }
2559
2559
  /**
@@ -2583,7 +2583,7 @@ class Pn extends Yr {
2583
2583
  this.annotations.forEach((e) => e.destroy()), this.layer.destroy();
2584
2584
  }
2585
2585
  }
2586
- const Lr = [8, 10, 12, 14, 16, 24, 32, 48, 64, 72], $r = "none", Xr = "#333333", Nn = [
2586
+ const Lr = [8, 10, 12, 14, 16, 24, 32, 48, 64, 72], Ir = "none", Xr = "#333333", Nn = [
2587
2587
  "#FFFFFF",
2588
2588
  "#F44E3B",
2589
2589
  "#FE9200",
@@ -2612,13 +2612,13 @@ const Lr = [8, 10, 12, 14, 16, 24, 32, 48, 64, 72], $r = "none", Xr = "#333333",
2612
2612
  head: "arrow",
2613
2613
  strokeColor: Xr,
2614
2614
  strokeWidth: 5
2615
- }, $n = 0.25, In = {
2615
+ }, In = 0.25, $n = {
2616
2616
  font: "Roboto",
2617
2617
  fontSize: Lr[2],
2618
- padding: Lr[2] * $n,
2618
+ padding: Lr[2] * In,
2619
2619
  color: Xr,
2620
- strokeType: $r,
2621
- background: $r
2620
+ strokeType: Ir,
2621
+ background: Ir
2622
2622
  };
2623
2623
  function jn(u) {
2624
2624
  return u.reduce((e, o) => e + o, 0) / u.length;
@@ -2660,16 +2660,16 @@ const Gr = jr(
2660
2660
  const e = Qr(), [o, n] = Zr(Fn, {
2661
2661
  type: "FeatureCollection",
2662
2662
  features: []
2663
- }), [l, h] = Nt(null), [f, g] = Nt(Ln), [d, v] = Nt(In), [y, A] = Nt(), [_, S] = Nt(1), [R, C] = Nt(1);
2664
- return rr(() => {
2663
+ }), [l, h] = Nt(null), [d, g] = Nt(Ln), [f, v] = Nt($n), [y, A] = Nt(), [k, S] = Nt(1), [R, C] = Nt(1);
2664
+ return nr(() => {
2665
2665
  if (!e) return;
2666
2666
  const L = new Pn(e, {
2667
2667
  minArrowHeight: 1
2668
- }), I = jn(e.getNodes().getAttribute("radius")) / 5, k = _;
2668
+ }), $ = jn(e.getNodes().getAttribute("radius")) / 5, _ = k;
2669
2669
  return g({
2670
- ...f,
2671
- strokeWidth: (f.strokeWidth || 1) * k
2672
- }), S(k), C(I), L.on("select", (z) => {
2670
+ ...d,
2671
+ strokeWidth: (d.strokeWidth || 1) * _
2672
+ }), S(_), C($), L.on("select", (z) => {
2673
2673
  at(z) ? g({
2674
2674
  ...z.properties.style || {}
2675
2675
  }) : yt(z) && v({
@@ -2678,13 +2678,13 @@ const Gr = jr(
2678
2678
  }).on("unselect", () => {
2679
2679
  h(null);
2680
2680
  }), A(L), () => {
2681
- y == null || y.destroy();
2681
+ L.destroy();
2682
2682
  };
2683
- }, [e]), rr(() => {
2684
- y && l && (l == null ? void 0 : l.properties.type) === "arrow" && y.updateStyle(l.id, f);
2685
- }, [y, f, l]), rr(() => {
2686
- y && l && (l == null ? void 0 : l.properties.type) === "text" && y.updateStyle(l.id, d);
2687
- }, [y, d, l]), /* @__PURE__ */ nn.jsx(
2683
+ }, [e]), nr(() => {
2684
+ y && l && (l == null ? void 0 : l.properties.type) === "arrow" && y.updateStyle(l.id, d);
2685
+ }, [y, d, l]), nr(() => {
2686
+ y && l && (l == null ? void 0 : l.properties.type) === "text" && y.updateStyle(l.id, f);
2687
+ }, [y, f, l]), /* @__PURE__ */ nn.jsx(
2688
2688
  Gr.Provider,
2689
2689
  {
2690
2690
  value: {
@@ -2692,11 +2692,11 @@ const Gr = jr(
2692
2692
  updateAnnotations: n,
2693
2693
  currentAnnotation: l,
2694
2694
  setCurrentAnnotation: h,
2695
- textStyle: d,
2695
+ textStyle: f,
2696
2696
  setTextStyle: v,
2697
- arrowStyle: f,
2697
+ arrowStyle: d,
2698
2698
  setArrowStyle: g,
2699
- arrowWidthFactor: _,
2699
+ arrowWidthFactor: k,
2700
2700
  setArrowWidthFactor: S,
2701
2701
  textSizeFactor: R,
2702
2702
  setTextSizeFactor: C,
@@ -2711,12 +2711,12 @@ export {
2711
2711
  Gr as AnnotationsContext,
2712
2712
  Yn as AnnotationsContextProvider,
2713
2713
  Xr as BLACK,
2714
- $n as RELATIVE_PADDING,
2715
- $r as TRANSPARENT,
2714
+ In as RELATIVE_PADDING,
2715
+ Ir as TRANSPARENT,
2716
2716
  Wn as createAnnotationsContext,
2717
2717
  Ln as defaultArrowStyle,
2718
2718
  Nn as defaultColors,
2719
- In as defaultTextStyle,
2719
+ $n as defaultTextStyle,
2720
2720
  Lr as fontSizes,
2721
2721
  Hn as fonts,
2722
2722
  Bn as interpolate,