@eox/feedback 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,17 +5,17 @@ function We(v2) {
5
5
  var Ue = { exports: {} };
6
6
  (function(v2) {
7
7
  (function(s, p) {
8
- v2.exports = s.document ? p(s, !0) : function(v) {
9
- if (!v.document)
8
+ v2.exports = s.document ? p(s, !0) : function(f) {
9
+ if (!f.document)
10
10
  throw new Error("jQuery requires a window with a document");
11
- return p(v);
11
+ return p(f);
12
12
  };
13
13
  })(typeof window < "u" ? window : Zt, function(s, p) {
14
- var v = [], z = Object.getPrototypeOf, g = v.slice, T = v.flat ? function(e) {
15
- return v.flat.call(e);
14
+ var f = [], z = Object.getPrototypeOf, g = f.slice, T = f.flat ? function(e) {
15
+ return f.flat.call(e);
16
16
  } : function(e) {
17
- return v.concat.apply([], e);
18
- }, _ = v.push, f = v.indexOf, x = {}, L = x.toString, R = x.hasOwnProperty, X = R.toString, I = X.call(Object), D = {}, B = function(e) {
17
+ return f.concat.apply([], e);
18
+ }, _ = f.push, b = f.indexOf, x = {}, L = x.toString, R = x.hasOwnProperty, X = R.toString, I = X.call(Object), D = {}, B = function(e) {
19
19
  return typeof e == "function" && typeof e.nodeType != "number" && typeof e.item != "function";
20
20
  }, q = function(e) {
21
21
  return e != null && e === e.window;
@@ -97,8 +97,8 @@ var Ue = { exports: {} };
97
97
  // For internal use only.
98
98
  // Behaves like an Array's method, not like a jQuery method.
99
99
  push: _,
100
- sort: v.sort,
101
- splice: v.splice
100
+ sort: f.sort,
101
+ splice: f.splice
102
102
  }, i.extend = i.fn.extend = function() {
103
103
  var e, t, r, n, o, a, l = arguments[0] || {}, u = 1, d = arguments.length, h = !1;
104
104
  for (typeof l == "boolean" && (h = l, l = arguments[u] || {}, u++), typeof l != "object" && !B(l) && (l = {}), u === d && (l = this, u--); u < d; u++)
@@ -159,7 +159,7 @@ var Ue = { exports: {} };
159
159
  ) : _.call(r, e)), r;
160
160
  },
161
161
  inArray: function(e, t, r) {
162
- return t == null ? -1 : f.call(t, e, r);
162
+ return t == null ? -1 : b.call(t, e, r);
163
163
  },
164
164
  isXMLDoc: function(e) {
165
165
  var t = e && e.namespaceURI, r = e && (e.ownerDocument || e).documentElement;
@@ -193,7 +193,7 @@ var Ue = { exports: {} };
193
193
  // jQuery.support is not used in Core but other projects attach their
194
194
  // properties to it so it needs to exist.
195
195
  support: D
196
- }), typeof Symbol == "function" && (i.fn[Symbol.iterator] = v[Symbol.iterator]), i.each(
196
+ }), typeof Symbol == "function" && (i.fn[Symbol.iterator] = f[Symbol.iterator]), i.each(
197
197
  "Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
198
198
  function(e, t) {
199
199
  x["[object " + t + "]"] = t.toLowerCase();
@@ -206,7 +206,7 @@ var Ue = { exports: {} };
206
206
  function j(e, t) {
207
207
  return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase();
208
208
  }
209
- var J = v.pop, l2 = v.sort, i2 = v.splice, N = "[\\x20\\t\\r\\n\\f]", $ = new RegExp(
209
+ var J = f.pop, l2 = f.sort, i2 = f.splice, N = "[\\x20\\t\\r\\n\\f]", $ = new RegExp(
210
210
  "^" + N + "+|((?:^|[^\\\\])(?:\\\\.)*)" + N + "+$",
211
211
  "g"
212
212
  );
@@ -244,8 +244,8 @@ var Ue = { exports: {} };
244
244
  // We use this for POS matching in `select`
245
245
  needsContext: new RegExp("^" + N + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + N + "*((?:-\\d)?\\d*)" + N + "*\\)|)(?=[^-]|$)", "i")
246
246
  }, i0 = /^(?:input|select|textarea|button)$/i, n0 = /^h\d$/i, I2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ne = /[+~]/, t0 = new RegExp("\\\\[\\da-fA-F]{1,6}" + N + "?|\\\\([^\\r\\n\\f])", "g"), r0 = function(c, m) {
247
- var b = "0x" + c.slice(1) - 65536;
248
- return m || (b < 0 ? String.fromCharCode(b + 65536) : String.fromCharCode(b >> 10 | 55296, b & 1023 | 56320));
247
+ var v = "0x" + c.slice(1) - 65536;
248
+ return m || (v < 0 ? String.fromCharCode(v + 65536) : String.fromCharCode(v >> 10 | 55296, v & 1023 | 56320));
249
249
  }, It = function() {
250
250
  o0();
251
251
  }, Pt = I0(
@@ -262,9 +262,9 @@ var Ue = { exports: {} };
262
262
  }
263
263
  try {
264
264
  a.apply(
265
- v = g.call(p2.childNodes),
265
+ f = g.call(p2.childNodes),
266
266
  p2.childNodes
267
- ), v[p2.childNodes.length].nodeType;
267
+ ), f[p2.childNodes.length].nodeType;
268
268
  } catch {
269
269
  a = {
270
270
  apply: function(c, m) {
@@ -275,26 +275,26 @@ var Ue = { exports: {} };
275
275
  }
276
276
  };
277
277
  }
278
- function u2(c, m, b, y) {
278
+ function u2(c, m, v, y) {
279
279
  var k, M, H, P, F, t2, Z, G = m && m.ownerDocument, r2 = m ? m.nodeType : 9;
280
- if (b = b || [], typeof c != "string" || !c || r2 !== 1 && r2 !== 9 && r2 !== 11)
281
- return b;
280
+ if (v = v || [], typeof c != "string" || !c || r2 !== 1 && r2 !== 9 && r2 !== 11)
281
+ return v;
282
282
  if (!y && (o0(m), m = m || l, d)) {
283
283
  if (r2 !== 11 && (F = I2.exec(c)))
284
284
  if (k = F[1]) {
285
285
  if (r2 === 9)
286
286
  if (H = m.getElementById(k)) {
287
287
  if (H.id === k)
288
- return a.call(b, H), b;
288
+ return a.call(v, H), v;
289
289
  } else
290
- return b;
290
+ return v;
291
291
  else if (G && (H = G.getElementById(k)) && u2.contains(m, H) && H.id === k)
292
- return a.call(b, H), b;
292
+ return a.call(v, H), v;
293
293
  } else {
294
294
  if (F[2])
295
- return a.apply(b, m.getElementsByTagName(c)), b;
295
+ return a.apply(v, m.getElementsByTagName(c)), v;
296
296
  if ((k = F[3]) && m.getElementsByClassName)
297
- return a.apply(b, m.getElementsByClassName(k)), b;
297
+ return a.apply(v, m.getElementsByClassName(k)), v;
298
298
  }
299
299
  if (!A2[c + " "] && (!h || !h.test(c))) {
300
300
  if (Z = c, G = m, r2 === 1 && (ie.test(c) || S0.test(c))) {
@@ -304,9 +304,9 @@ var Ue = { exports: {} };
304
304
  }
305
305
  try {
306
306
  return a.apply(
307
- b,
307
+ v,
308
308
  G.querySelectorAll(Z)
309
- ), b;
309
+ ), v;
310
310
  } catch {
311
311
  A2(c, !0);
312
312
  } finally {
@@ -314,12 +314,12 @@ var Ue = { exports: {} };
314
314
  }
315
315
  }
316
316
  }
317
- return Ve(c.replace($, "$1"), m, b, y);
317
+ return Ve(c.replace($, "$1"), m, v, y);
318
318
  }
319
319
  function j0() {
320
320
  var c = [];
321
- function m(b, y) {
322
- return c.push(b + " ") > t.cacheLength && delete m[c.shift()], m[b + " "] = y;
321
+ function m(v, y) {
322
+ return c.push(v + " ") > t.cacheLength && delete m[c.shift()], m[v + " "] = y;
323
323
  }
324
324
  return m;
325
325
  }
@@ -354,9 +354,9 @@ var Ue = { exports: {} };
354
354
  }
355
355
  function u0(c) {
356
356
  return W2(function(m) {
357
- return m = +m, W2(function(b, y) {
358
- for (var k, M = c([], b.length, m), H = M.length; H--; )
359
- b[k = M[H]] && (b[k] = !(y[k] = b[k]));
357
+ return m = +m, W2(function(v, y) {
358
+ for (var k, M = c([], v.length, m), H = M.length; H--; )
359
+ v[k = M[H]] && (v[k] = !(y[k] = v[k]));
360
360
  });
361
361
  });
362
362
  }
@@ -364,8 +364,8 @@ var Ue = { exports: {} };
364
364
  return c && typeof c.getElementsByTagName < "u" && c;
365
365
  }
366
366
  function o0(c) {
367
- var m, b = c ? c.ownerDocument || c : p2;
368
- return b == l || b.nodeType !== 9 || !b.documentElement || (l = b, u = l.documentElement, d = !i.isXMLDoc(l), w = u.matches || u.webkitMatchesSelector || u.msMatchesSelector, u.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
367
+ var m, v = c ? c.ownerDocument || c : p2;
368
+ return v == l || v.nodeType !== 9 || !v.documentElement || (l = v, u = l.documentElement, d = !i.isXMLDoc(l), w = u.matches || u.webkitMatchesSelector || u.msMatchesSelector, u.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
369
369
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
370
370
  // two documents; shallow comparisons work.
371
371
  // eslint-disable-next-line eqeqeq
@@ -424,7 +424,7 @@ var Ue = { exports: {} };
424
424
  return M || (M = (y.ownerDocument || y) == (k.ownerDocument || k) ? y.compareDocumentPosition(k) : (
425
425
  // Otherwise we know they are disconnected
426
426
  1
427
- ), M & 1 || !D.sortDetached && k.compareDocumentPosition(y) === M ? y === l || y.ownerDocument == p2 && u2.contains(p2, y) ? -1 : k === l || k.ownerDocument == p2 && u2.contains(p2, k) ? 1 : n ? f.call(n, y) - f.call(n, k) : 0 : M & 4 ? -1 : 1);
427
+ ), M & 1 || !D.sortDetached && k.compareDocumentPosition(y) === M ? y === l || y.ownerDocument == p2 && u2.contains(p2, y) ? -1 : k === l || k.ownerDocument == p2 && u2.contains(p2, k) ? 1 : n ? b.call(n, y) - b.call(n, k) : 0 : M & 4 ? -1 : 1);
428
428
  }), l;
429
429
  }
430
430
  u2.matches = function(c, m) {
@@ -432,11 +432,11 @@ var Ue = { exports: {} };
432
432
  }, u2.matchesSelector = function(c, m) {
433
433
  if (o0(c), d && !A2[m + " "] && (!h || !h.test(m)))
434
434
  try {
435
- var b = w.call(c, m);
436
- if (b || D.disconnectedMatch || // As well, disconnected nodes are said to be in a document
435
+ var v = w.call(c, m);
436
+ if (v || D.disconnectedMatch || // As well, disconnected nodes are said to be in a document
437
437
  // fragment in IE 9
438
438
  c.document && c.document.nodeType !== 11)
439
- return b;
439
+ return v;
440
440
  } catch {
441
441
  A2(m, !0);
442
442
  }
@@ -445,17 +445,17 @@ var Ue = { exports: {} };
445
445
  return (c.ownerDocument || c) != l && o0(c), i.contains(c, m);
446
446
  }, u2.attr = function(c, m) {
447
447
  (c.ownerDocument || c) != l && o0(c);
448
- var b = t.attrHandle[m.toLowerCase()], y = b && R.call(t.attrHandle, m.toLowerCase()) ? b(c, m, !d) : void 0;
448
+ var v = t.attrHandle[m.toLowerCase()], y = v && R.call(t.attrHandle, m.toLowerCase()) ? v(c, m, !d) : void 0;
449
449
  return y !== void 0 ? y : c.getAttribute(m);
450
450
  }, u2.error = function(c) {
451
451
  throw new Error("Syntax error, unrecognized expression: " + c);
452
452
  }, i.uniqueSort = function(c) {
453
- var m, b = [], y = 0, k = 0;
453
+ var m, v = [], y = 0, k = 0;
454
454
  if (o = !D.sortStable, n = !D.sortStable && g.call(c, 0), l2.call(c, y2), o) {
455
455
  for (; m = c[k++]; )
456
- m === c[k] && (y = b.push(k));
456
+ m === c[k] && (y = v.push(k));
457
457
  for (; y--; )
458
- i2.call(c, b[y], 1);
458
+ i2.call(c, v[y], 1);
459
459
  }
460
460
  return n = null, c;
461
461
  }, i.fn.uniqueSort = function() {
@@ -481,10 +481,10 @@ var Ue = { exports: {} };
481
481
  return c[1] = c[1].toLowerCase(), c[1].slice(0, 3) === "nth" ? (c[3] || u2.error(c[0]), c[4] = +(c[4] ? c[5] + (c[6] || 1) : 2 * (c[3] === "even" || c[3] === "odd")), c[5] = +(c[7] + c[8] || c[3] === "odd")) : c[3] && u2.error(c[0]), c;
482
482
  },
483
483
  PSEUDO: function(c) {
484
- var m, b = !c[6] && c[2];
485
- return J2.CHILD.test(c[0]) ? null : (c[3] ? c[2] = c[4] || c[5] || "" : b && Q2.test(b) && // Get excess from tokenize (recursively)
486
- (m = D0(b, !0)) && // advance to the next closing parenthesis
487
- (m = b.indexOf(")", b.length - m) - b.length) && (c[0] = c[0].slice(0, m), c[2] = b.slice(0, m)), c.slice(0, 3));
484
+ var m, v = !c[6] && c[2];
485
+ return J2.CHILD.test(c[0]) ? null : (c[3] ? c[2] = c[4] || c[5] || "" : v && Q2.test(v) && // Get excess from tokenize (recursively)
486
+ (m = D0(v, !0)) && // advance to the next closing parenthesis
487
+ (m = v.indexOf(")", v.length - m) - v.length) && (c[0] = c[0].slice(0, m), c[2] = v.slice(0, m)), c.slice(0, 3));
488
488
  }
489
489
  },
490
490
  filter: {
@@ -492,25 +492,25 @@ var Ue = { exports: {} };
492
492
  var m = c.replace(t0, r0).toLowerCase();
493
493
  return c === "*" ? function() {
494
494
  return !0;
495
- } : function(b) {
496
- return j(b, m);
495
+ } : function(v) {
496
+ return j(v, m);
497
497
  };
498
498
  },
499
499
  CLASS: function(c) {
500
500
  var m = Y[c + " "];
501
- return m || (m = new RegExp("(^|" + N + ")" + c + "(" + N + "|$)")) && Y(c, function(b) {
501
+ return m || (m = new RegExp("(^|" + N + ")" + c + "(" + N + "|$)")) && Y(c, function(v) {
502
502
  return m.test(
503
- typeof b.className == "string" && b.className || typeof b.getAttribute < "u" && b.getAttribute("class") || ""
503
+ typeof v.className == "string" && v.className || typeof v.getAttribute < "u" && v.getAttribute("class") || ""
504
504
  );
505
505
  });
506
506
  },
507
- ATTR: function(c, m, b) {
507
+ ATTR: function(c, m, v) {
508
508
  return function(y) {
509
509
  var k = u2.attr(y, c);
510
- return k == null ? m === "!=" : m ? (k += "", m === "=" ? k === b : m === "!=" ? k !== b : m === "^=" ? b && k.indexOf(b) === 0 : m === "*=" ? b && k.indexOf(b) > -1 : m === "$=" ? b && k.slice(-b.length) === b : m === "~=" ? (" " + k.replace(c2, " ") + " ").indexOf(b) > -1 : m === "|=" ? k === b || k.slice(0, b.length + 1) === b + "-" : !1) : !0;
510
+ return k == null ? m === "!=" : m ? (k += "", m === "=" ? k === v : m === "!=" ? k !== v : m === "^=" ? v && k.indexOf(v) === 0 : m === "*=" ? v && k.indexOf(v) > -1 : m === "$=" ? v && k.slice(-v.length) === v : m === "~=" ? (" " + k.replace(c2, " ") + " ").indexOf(v) > -1 : m === "|=" ? k === v || k.slice(0, v.length + 1) === v + "-" : !1) : !0;
511
511
  };
512
512
  },
513
- CHILD: function(c, m, b, y, k) {
513
+ CHILD: function(c, m, v, y, k) {
514
514
  var M = c.slice(0, 3) !== "nth", H = c.slice(-4) !== "last", P = m === "of-type";
515
515
  return y === 1 && k === 0 ? (
516
516
  // Shortcut for :nth-*(n)
@@ -544,24 +544,24 @@ var Ue = { exports: {} };
544
544
  };
545
545
  },
546
546
  PSEUDO: function(c, m) {
547
- var b, y = t.pseudos[c] || t.setFilters[c.toLowerCase()] || u2.error("unsupported pseudo: " + c);
548
- return y[A] ? y(m) : y.length > 1 ? (b = [c, c, "", m], t.setFilters.hasOwnProperty(c.toLowerCase()) ? W2(function(k, M) {
547
+ var v, y = t.pseudos[c] || t.setFilters[c.toLowerCase()] || u2.error("unsupported pseudo: " + c);
548
+ return y[A] ? y(m) : y.length > 1 ? (v = [c, c, "", m], t.setFilters.hasOwnProperty(c.toLowerCase()) ? W2(function(k, M) {
549
549
  for (var H, P = y(k, m), F = P.length; F--; )
550
- H = f.call(k, P[F]), k[H] = !(M[H] = P[F]);
550
+ H = b.call(k, P[F]), k[H] = !(M[H] = P[F]);
551
551
  }) : function(k) {
552
- return y(k, 0, b);
552
+ return y(k, 0, v);
553
553
  }) : y;
554
554
  }
555
555
  },
556
556
  pseudos: {
557
557
  // Potentially complex pseudos
558
558
  not: W2(function(c) {
559
- var m = [], b = [], y = ce(c.replace($, "$1"));
559
+ var m = [], v = [], y = ce(c.replace($, "$1"));
560
560
  return y[A] ? W2(function(k, M, H, P) {
561
561
  for (var F, t2 = y(k, null, P, []), Z = k.length; Z--; )
562
562
  (F = t2[Z]) && (k[Z] = !(M[Z] = F));
563
563
  }) : function(k, M, H) {
564
- return m[0] = k, y(m, null, H, b), m[0] = null, !b.pop();
564
+ return m[0] = k, y(m, null, H, v), m[0] = null, !v.pop();
565
565
  };
566
566
  }),
567
567
  has: W2(function(c) {
@@ -583,10 +583,10 @@ var Ue = { exports: {} };
583
583
  // https://www.w3.org/TR/selectors/#lang-pseudo
584
584
  lang: W2(function(c) {
585
585
  return T0.test(c || "") || u2.error("unsupported lang: " + c), c = c.replace(t0, r0).toLowerCase(), function(m) {
586
- var b;
586
+ var v;
587
587
  do
588
- if (b = d ? m.lang : m.getAttribute("xml:lang") || m.getAttribute("lang"))
589
- return b = b.toLowerCase(), b === c || b.indexOf(c + "-") === 0;
588
+ if (v = d ? m.lang : m.getAttribute("xml:lang") || m.getAttribute("lang"))
589
+ return v = v.toLowerCase(), v === c || v.indexOf(c + "-") === 0;
590
590
  while ((m = m.parentNode) && m.nodeType === 1);
591
591
  return !1;
592
592
  };
@@ -645,27 +645,27 @@ var Ue = { exports: {} };
645
645
  last: u0(function(c, m) {
646
646
  return [m - 1];
647
647
  }),
648
- eq: u0(function(c, m, b) {
649
- return [b < 0 ? b + m : b];
648
+ eq: u0(function(c, m, v) {
649
+ return [v < 0 ? v + m : v];
650
650
  }),
651
651
  even: u0(function(c, m) {
652
- for (var b = 0; b < m; b += 2)
653
- c.push(b);
652
+ for (var v = 0; v < m; v += 2)
653
+ c.push(v);
654
654
  return c;
655
655
  }),
656
656
  odd: u0(function(c, m) {
657
- for (var b = 1; b < m; b += 2)
658
- c.push(b);
657
+ for (var v = 1; v < m; v += 2)
658
+ c.push(v);
659
659
  return c;
660
660
  }),
661
- lt: u0(function(c, m, b) {
661
+ lt: u0(function(c, m, v) {
662
662
  var y;
663
- for (b < 0 ? y = b + m : b > m ? y = m : y = b; --y >= 0; )
663
+ for (v < 0 ? y = v + m : v > m ? y = m : y = v; --y >= 0; )
664
664
  c.push(y);
665
665
  return c;
666
666
  }),
667
- gt: u0(function(c, m, b) {
668
- for (var y = b < 0 ? b + m : b; ++y < m; )
667
+ gt: u0(function(c, m, v) {
668
+ for (var y = v < 0 ? v + m : v; ++y < m; )
669
669
  c.push(y);
670
670
  return c;
671
671
  })
@@ -679,22 +679,22 @@ var Ue = { exports: {} };
679
679
  }
680
680
  Oe.prototype = t.filters = t.pseudos, t.setFilters = new Oe();
681
681
  function D0(c, m) {
682
- var b, y, k, M, H, P, F, t2 = a2[c + " "];
682
+ var v, y, k, M, H, P, F, t2 = a2[c + " "];
683
683
  if (t2)
684
684
  return m ? 0 : t2.slice(0);
685
685
  for (H = c, P = [], F = t.preFilter; H; ) {
686
- (!b || (y = b2.exec(H))) && (y && (H = H.slice(y[0].length) || H), P.push(k = [])), b = !1, (y = S0.exec(H)) && (b = y.shift(), k.push({
687
- value: b,
686
+ (!v || (y = b2.exec(H))) && (y && (H = H.slice(y[0].length) || H), P.push(k = [])), v = !1, (y = S0.exec(H)) && (v = y.shift(), k.push({
687
+ value: v,
688
688
  // Cast descendant combinators to space
689
689
  type: y[0].replace($, " ")
690
- }), H = H.slice(b.length));
690
+ }), H = H.slice(v.length));
691
691
  for (M in t.filter)
692
- (y = J2[M].exec(H)) && (!F[M] || (y = F[M](y))) && (b = y.shift(), k.push({
693
- value: b,
692
+ (y = J2[M].exec(H)) && (!F[M] || (y = F[M](y))) && (v = y.shift(), k.push({
693
+ value: v,
694
694
  type: M,
695
695
  matches: y
696
- }), H = H.slice(b.length));
697
- if (!b)
696
+ }), H = H.slice(v.length));
697
+ if (!v)
698
698
  break;
699
699
  }
700
700
  return m ? H.length : H ? u2.error(c) : (
@@ -703,12 +703,12 @@ var Ue = { exports: {} };
703
703
  );
704
704
  }
705
705
  function X0(c) {
706
- for (var m = 0, b = c.length, y = ""; m < b; m++)
706
+ for (var m = 0, v = c.length, y = ""; m < v; m++)
707
707
  y += c[m].value;
708
708
  return y;
709
709
  }
710
- function I0(c, m, b) {
711
- var y = m.dir, k = m.next, M = k || y, H = b && M === "parentNode", P = E++;
710
+ function I0(c, m, v) {
711
+ var y = m.dir, k = m.next, M = k || y, H = v && M === "parentNode", P = E++;
712
712
  return m.first ? (
713
713
  // Check against closest ancestor/preceding element
714
714
  (function(F, t2, Z) {
@@ -741,37 +741,37 @@ var Ue = { exports: {} };
741
741
  );
742
742
  }
743
743
  function ae(c) {
744
- return c.length > 1 ? function(m, b, y) {
744
+ return c.length > 1 ? function(m, v, y) {
745
745
  for (var k = c.length; k--; )
746
- if (!c[k](m, b, y))
746
+ if (!c[k](m, v, y))
747
747
  return !1;
748
748
  return !0;
749
749
  } : c[0];
750
750
  }
751
- function Wt(c, m, b) {
751
+ function Wt(c, m, v) {
752
752
  for (var y = 0, k = m.length; y < k; y++)
753
- u2(c, m[y], b);
754
- return b;
753
+ u2(c, m[y], v);
754
+ return v;
755
755
  }
756
- function P0(c, m, b, y, k) {
756
+ function P0(c, m, v, y, k) {
757
757
  for (var M, H = [], P = 0, F = c.length, t2 = m != null; P < F; P++)
758
- (M = c[P]) && (!b || b(M, y, k)) && (H.push(M), t2 && m.push(P));
758
+ (M = c[P]) && (!v || v(M, y, k)) && (H.push(M), t2 && m.push(P));
759
759
  return H;
760
760
  }
761
- function se(c, m, b, y, k, M) {
761
+ function se(c, m, v, y, k, M) {
762
762
  return y && !y[A] && (y = se(y)), k && !k[A] && (k = se(k, M)), W2(function(H, P, F, t2) {
763
763
  var Z, G, r2, U, h2 = [], H2 = [], z2 = P.length, P2 = H || Wt(
764
764
  m || "*",
765
765
  F.nodeType ? [F] : F,
766
766
  []
767
767
  ), K2 = c && (H || !m) ? P0(P2, h2, c, F, t2) : P2;
768
- if (b ? (U = k || (H ? c : z2 || y) ? (
768
+ if (v ? (U = k || (H ? c : z2 || y) ? (
769
769
  // ...intermediate processing is necessary
770
770
  []
771
771
  ) : (
772
772
  // ...otherwise use results directly
773
773
  P
774
- ), b(K2, U, F, t2)) : U = K2, y)
774
+ ), v(K2, U, F, t2)) : U = K2, y)
775
775
  for (Z = P0(U, H2), y(Z, [], F, t2), G = Z.length; G--; )
776
776
  (r2 = Z[G]) && (U[H2[G]] = !(K2[H2[G]] = r2));
777
777
  if (H) {
@@ -782,7 +782,7 @@ var Ue = { exports: {} };
782
782
  k(null, U = [], Z, t2);
783
783
  }
784
784
  for (G = U.length; G--; )
785
- (r2 = U[G]) && (Z = k ? f.call(H, r2) : h2[G]) > -1 && (H[Z] = !(P[Z] = r2));
785
+ (r2 = U[G]) && (Z = k ? b.call(H, r2) : h2[G]) > -1 && (H[Z] = !(P[Z] = r2));
786
786
  }
787
787
  } else
788
788
  U = P0(
@@ -791,18 +791,18 @@ var Ue = { exports: {} };
791
791
  });
792
792
  }
793
793
  function le(c) {
794
- for (var m, b, y, k = c.length, M = t.relative[c[0].type], H = M || t.relative[" "], P = M ? 1 : 0, F = I0(function(G) {
794
+ for (var m, v, y, k = c.length, M = t.relative[c[0].type], H = M || t.relative[" "], P = M ? 1 : 0, F = I0(function(G) {
795
795
  return G === m;
796
796
  }, H, !0), t2 = I0(function(G) {
797
- return f.call(m, G) > -1;
797
+ return b.call(m, G) > -1;
798
798
  }, H, !0), Z = [function(G, r2, U) {
799
799
  var h2 = !M && (U || r2 != r) || ((m = r2).nodeType ? F(G, r2, U) : t2(G, r2, U));
800
800
  return m = null, h2;
801
801
  }]; P < k; P++)
802
- if (b = t.relative[c[P].type])
803
- Z = [I0(ae(Z), b)];
802
+ if (v = t.relative[c[P].type])
803
+ Z = [I0(ae(Z), v)];
804
804
  else {
805
- if (b = t.filter[c[P].type].apply(null, c[P].matches), b[A]) {
805
+ if (v = t.filter[c[P].type].apply(null, c[P].matches), v[A]) {
806
806
  for (y = ++P; y < k && !t.relative[c[y].type]; y++)
807
807
  ;
808
808
  return se(
@@ -811,18 +811,18 @@ var Ue = { exports: {} };
811
811
  // If the preceding token was a descendant combinator, insert an implicit any-element `*`
812
812
  c.slice(0, P - 1).concat({ value: c[P - 2].type === " " ? "*" : "" })
813
813
  ).replace($, "$1"),
814
- b,
814
+ v,
815
815
  P < y && le(c.slice(P, y)),
816
816
  y < k && le(c = c.slice(y)),
817
817
  y < k && X0(c)
818
818
  );
819
819
  }
820
- Z.push(b);
820
+ Z.push(v);
821
821
  }
822
822
  return ae(Z);
823
823
  }
824
824
  function Ut(c, m) {
825
- var b = m.length > 0, y = c.length > 0, k = function(M, H, P, F, t2) {
825
+ var v = m.length > 0, y = c.length > 0, k = function(M, H, P, F, t2) {
826
826
  var Z, G, r2, U = 0, h2 = "0", H2 = M && [], z2 = [], P2 = r, K2 = M || y && t.find.TAG("*", t2), C0 = C += P2 == null ? 1 : Math.random() || 0.1, S2 = K2.length;
827
827
  for (t2 && (r = H == l || H || t2); h2 !== S2 && (Z = K2[h2]) != null; h2++) {
828
828
  if (y && Z) {
@@ -833,9 +833,9 @@ var Ue = { exports: {} };
833
833
  }
834
834
  t2 && (C = C0);
835
835
  }
836
- b && ((Z = !r2 && Z) && U--, M && H2.push(Z));
836
+ v && ((Z = !r2 && Z) && U--, M && H2.push(Z));
837
837
  }
838
- if (U += h2, b && h2 !== U) {
838
+ if (U += h2, v && h2 !== U) {
839
839
  for (G = 0; r2 = m[G++]; )
840
840
  r2(H2, z2, H, P);
841
841
  if (M) {
@@ -848,13 +848,13 @@ var Ue = { exports: {} };
848
848
  }
849
849
  return t2 && (C = C0, r = P2), H2;
850
850
  };
851
- return b ? W2(k) : k;
851
+ return v ? W2(k) : k;
852
852
  }
853
853
  function ce(c, m) {
854
- var b, y = [], k = [], M = K[c + " "];
854
+ var v, y = [], k = [], M = K[c + " "];
855
855
  if (!M) {
856
- for (m || (m = D0(c)), b = m.length; b--; )
857
- M = le(m[b]), M[A] ? y.push(M) : k.push(M);
856
+ for (m || (m = D0(c)), v = m.length; v--; )
857
+ M = le(m[v]), M[A] ? y.push(M) : k.push(M);
858
858
  M = K(
859
859
  c,
860
860
  Ut(k, y)
@@ -862,9 +862,9 @@ var Ue = { exports: {} };
862
862
  }
863
863
  return M;
864
864
  }
865
- function Ve(c, m, b, y) {
865
+ function Ve(c, m, v, y) {
866
866
  var k, M, H, P, F, t2 = typeof c == "function" && c, Z = !y && D0(c = t2.selector || c);
867
- if (b = b || [], Z.length === 1) {
867
+ if (v = v || [], Z.length === 1) {
868
868
  if (M = Z[0] = Z[0].slice(0), M.length > 2 && (H = M[0]).type === "ID" && m.nodeType === 9 && d && t.relative[M[1].type]) {
869
869
  if (m = (t.find.ID(
870
870
  H.matches[0].replace(t0, r0),
@@ -872,7 +872,7 @@ var Ue = { exports: {} };
872
872
  ) || [])[0], m)
873
873
  t2 && (m = m.parentNode);
874
874
  else
875
- return b;
875
+ return v;
876
876
  c = c.slice(M.shift().value.length);
877
877
  }
878
878
  for (k = J2.needsContext.test(c) ? 0 : M.length; k-- && (H = M[k], !t.relative[P = H.type]); )
@@ -881,7 +881,7 @@ var Ue = { exports: {} };
881
881
  ne.test(M[0].type) && oe(m.parentNode) || m
882
882
  ))) {
883
883
  if (M.splice(k, 1), c = y.length && X0(M), !c)
884
- return a.apply(b, y), b;
884
+ return a.apply(v, y), v;
885
885
  break;
886
886
  }
887
887
  }
@@ -889,9 +889,9 @@ var Ue = { exports: {} };
889
889
  y,
890
890
  m,
891
891
  !d,
892
- b,
892
+ v,
893
893
  !m || ne.test(c) && oe(m.parentNode) || m
894
- ), b;
894
+ ), v;
895
895
  }
896
896
  D.sortStable = A.split("").sort(y2).join("") === A, o0(), D.sortDetached = v0(function(c) {
897
897
  return c.compareDocumentPosition(l.createElement("fieldset")) & 1;
@@ -916,7 +916,7 @@ var Ue = { exports: {} };
916
916
  }) : t.nodeType ? i.grep(e, function(n) {
917
917
  return n === t !== r;
918
918
  }) : typeof t != "string" ? i.grep(e, function(n) {
919
- return f.call(t, n) > -1 !== r;
919
+ return b.call(t, n) > -1 !== r;
920
920
  }) : i.filter(t, e, r);
921
921
  }
922
922
  i.filter = function(e, t, r) {
@@ -1016,7 +1016,7 @@ var Ue = { exports: {} };
1016
1016
  },
1017
1017
  // Determine the position of an element within the set
1018
1018
  index: function(e) {
1019
- return e ? typeof e == "string" ? f.call(i(e), this[0]) : f.call(
1019
+ return e ? typeof e == "string" ? b.call(i(e), this[0]) : b.call(
1020
1020
  this,
1021
1021
  // If it receives a jQuery object, the first element is used
1022
1022
  e.jquery ? e[0] : e
@@ -3616,13 +3616,13 @@ const s2 = /* @__PURE__ */ We(Yt);
3616
3616
  var Ze = { exports: {} };
3617
3617
  (function(v2) {
3618
3618
  (function(s) {
3619
- var p = o2(), v = f2(), z = g2(), g = _2(), T = {
3619
+ var p = o2(), f = f2(), z = g2(), g = _2(), T = {
3620
3620
  // Default is to fail on error, no placeholder
3621
3621
  imagePlaceholder: void 0,
3622
3622
  // Default cache bust is false, it will use the cache
3623
3623
  cacheBust: !1
3624
3624
  }, _ = {
3625
- toSvg: f,
3625
+ toSvg: b,
3626
3626
  toPng: L,
3627
3627
  toJpeg: R,
3628
3628
  toBlob: X,
@@ -3631,12 +3631,12 @@ var Ze = { exports: {} };
3631
3631
  fontFaces: z,
3632
3632
  images: g,
3633
3633
  util: p,
3634
- inliner: v,
3634
+ inliner: f,
3635
3635
  options: {}
3636
3636
  }
3637
3637
  };
3638
3638
  v2.exports = _;
3639
- function f(i, V) {
3639
+ function b(i, V) {
3640
3640
  return V = V || {}, I(V), Promise.resolve(i).then(function(J) {
3641
3641
  return B(J, V.filter, !0);
3642
3642
  }).then(q).then(S).then(j).then(function(J) {
@@ -3679,7 +3679,7 @@ var Ze = { exports: {} };
3679
3679
  typeof i.imagePlaceholder > "u" ? _.impl.options.imagePlaceholder = T.imagePlaceholder : _.impl.options.imagePlaceholder = i.imagePlaceholder, typeof i.cacheBust > "u" ? _.impl.options.cacheBust = T.cacheBust : _.impl.options.cacheBust = i.cacheBust;
3680
3680
  }
3681
3681
  function D(i, V) {
3682
- return f(i, V).then(p.makeImage).then(p.delay(100)).then(function(J) {
3682
+ return b(i, V).then(p.makeImage).then(p.delay(100)).then(function(J) {
3683
3683
  var l2 = j(i);
3684
3684
  return l2.getContext("2d").drawImage(J, 0, 0), l2;
3685
3685
  });
@@ -4026,7 +4026,7 @@ var Ze = { exports: {} };
4026
4026
  return i2.filter(function(N) {
4027
4027
  return N.type === CSSRule.FONT_FACE_RULE;
4028
4028
  }).filter(function(N) {
4029
- return v.shouldProcess(N.style.getPropertyValue("src"));
4029
+ return f.shouldProcess(N.style.getPropertyValue("src"));
4030
4030
  });
4031
4031
  }
4032
4032
  function J(i2) {
@@ -4043,7 +4043,7 @@ var Ze = { exports: {} };
4043
4043
  return {
4044
4044
  resolve: function() {
4045
4045
  var N = (i2.parentStyleSheet || {}).href;
4046
- return v.inlineAll(i2.cssText, N);
4046
+ return f.inlineAll(i2.cssText, N);
4047
4047
  },
4048
4048
  src: function() {
4049
4049
  return i2.style.getPropertyValue("src");
@@ -4085,7 +4085,7 @@ var Ze = { exports: {} };
4085
4085
  });
4086
4086
  function J(l2) {
4087
4087
  var i2 = l2.style.getPropertyValue("background");
4088
- return i2 ? v.inlineAll(i2).then(function(N) {
4088
+ return i2 ? f.inlineAll(i2).then(function(N) {
4089
4089
  l2.style.setProperty(
4090
4090
  "background",
4091
4091
  N,
@@ -4106,15 +4106,15 @@ class de {
4106
4106
  this.regionDraggingCallback = [], this.regionDragStartCallback = [], this.regionDragEndCallback = [], this.screenshotGeneratedCallback = [], this.toolsCanvasCreatedCallback = [], this.closedCallback = [], this.successCreatedCallback = [], this.errorCreatedCallback = [], this.screenshotDownloadCallback = [];
4107
4107
  }
4108
4108
  getMouseRelativeXy({ clientX: s, clientY: p }) {
4109
- let { left: v, top: z } = this.canvas.getBoundingClientRect(), g = s - v, T = p - z;
4109
+ let { left: f, top: z } = this.canvas.getBoundingClientRect(), g = s - f, T = p - z;
4110
4110
  return {
4111
4111
  x: g,
4112
4112
  y: T
4113
4113
  };
4114
4114
  }
4115
4115
  triggerEvent(s, p) {
4116
- s.forEach((v) => {
4117
- v(p);
4116
+ s.forEach((f) => {
4117
+ f(p);
4118
4118
  });
4119
4119
  }
4120
4120
  on(s, p) {
@@ -4152,56 +4152,56 @@ class de {
4152
4152
  switch (s) {
4153
4153
  case "regionDragging":
4154
4154
  this.regionDraggingCallback = this.regionDraggingCallback.filter(
4155
- (v) => v !== p
4155
+ (f) => f !== p
4156
4156
  );
4157
4157
  break;
4158
4158
  case "regionDragStart":
4159
4159
  this.regionDragStartCallback = this.regionDragStartCallback.filter(
4160
- (v) => v !== p
4160
+ (f) => f !== p
4161
4161
  );
4162
4162
  break;
4163
4163
  case "regionDragEnd":
4164
4164
  this.regionDragEndCallback = this.regionDragEndCallback.filter(
4165
- (v) => v !== p
4165
+ (f) => f !== p
4166
4166
  );
4167
4167
  break;
4168
4168
  case "screenshotGenerated":
4169
- this.screenshotGeneratedCallback = this.screenshotGeneratedCallback.filter((v) => v !== p);
4169
+ this.screenshotGeneratedCallback = this.screenshotGeneratedCallback.filter((f) => f !== p);
4170
4170
  break;
4171
4171
  case "toolsCanvasCreated":
4172
- this.toolsCanvasCreatedCallback = this.toolsCanvasCreatedCallback.filter((v) => v !== p);
4172
+ this.toolsCanvasCreatedCallback = this.toolsCanvasCreatedCallback.filter((f) => f !== p);
4173
4173
  break;
4174
4174
  case "closed":
4175
4175
  this.closedCallback = this.closedCallback.filter(
4176
- (v) => v !== p
4176
+ (f) => f !== p
4177
4177
  );
4178
4178
  break;
4179
4179
  case "successCreated":
4180
4180
  this.successCreatedCallback = this.successCreatedCallback.filter(
4181
- (v) => v !== p
4181
+ (f) => f !== p
4182
4182
  );
4183
4183
  break;
4184
4184
  case "errorCreated":
4185
4185
  this.errorCreatedCallback = this.errorCreatedCallback.filter(
4186
- (v) => v !== p
4186
+ (f) => f !== p
4187
4187
  );
4188
4188
  break;
4189
4189
  case "screenshotDownload":
4190
- this.screenshotDownloadCallback = this.screenshotDownloadCallback.filter((v) => v !== p);
4190
+ this.screenshotDownloadCallback = this.screenshotDownloadCallback.filter((f) => f !== p);
4191
4191
  break;
4192
4192
  }
4193
4193
  }
4194
4194
  }
4195
4195
  class Jt extends de {
4196
4196
  constructor(s = {}) {
4197
- var p, v, z;
4197
+ var p, f, z;
4198
4198
  super(s), this.canvas = null, this.ctx = null, this.startX = 0, this.startY = 0, this.endX = 0, this.endY = 0, this.regionColor = s.regionColor, this.screenshot = s.screenshot, this.initialRegion = s.initialRegion;
4199
4199
  let g = {
4200
4200
  show: !0,
4201
4201
  color: "#ffffff",
4202
4202
  fontSize: 14
4203
4203
  };
4204
- this.regionSizeIndicator = s.regionSizeIndicator ?? g, (p = this.regionSizeIndicator).show ?? (p.show = g.show), (v = this.regionSizeIndicator).color ?? (v.color = g.color), (z = this.regionSizeIndicator).fontSize ?? (z.fontSize = g.fontSize), this.maskColor = s.maskColor ?? "rgba(0, 0, 0, 0.5)";
4204
+ this.regionSizeIndicator = s.regionSizeIndicator ?? g, (p = this.regionSizeIndicator).show ?? (p.show = g.show), (f = this.regionSizeIndicator).color ?? (f.color = g.color), (z = this.regionSizeIndicator).fontSize ?? (z.fontSize = g.fontSize), this.maskColor = s.maskColor ?? "rgba(0, 0, 0, 0.5)";
4205
4205
  }
4206
4206
  init() {
4207
4207
  this.canvas = document.createElement("canvas"), this.canvas.width = innerWidth, this.canvas.height = innerHeight, this.canvas.style.cssText = "cursor:crosshair;position:fixed;top:0;left:0;z-index:9999", document.body.appendChild(this.canvas), this.ctx = this.canvas.getContext("2d"), this.ctx.drawImage(
@@ -4213,58 +4213,58 @@ class Jt extends de {
4213
4213
  ), this.ctx.fillStyle = this.maskColor, this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height), this.triggerEvent(this.successCreatedCallback);
4214
4214
  let s = this;
4215
4215
  if (this.initialRegion) {
4216
- let { left: p, top: v, width: z, height: g } = this.initialRegion, T = Math.max(p, 0), _ = Math.max(v, 0), f = Math.min(z + p, innerWidth), x = Math.min(g + v, innerHeight), L = {
4216
+ let { left: p, top: f, width: z, height: g } = this.initialRegion, T = Math.max(p, 0), _ = Math.max(f, 0), b = Math.min(z + p, innerWidth), x = Math.min(g + f, innerHeight), L = {
4217
4217
  startX: T,
4218
4218
  startY: _,
4219
- endX: f,
4219
+ endX: b,
4220
4220
  endY: x
4221
4221
  };
4222
- s.triggerEvent(s.regionDragStartCallback, L), s.setRegionSize(T, _, f, x), s.triggerEvent(s.regionDragEndCallback, L), this.allowDragRegion();
4222
+ s.triggerEvent(s.regionDragStartCallback, L), s.setRegionSize(T, _, b, x), s.triggerEvent(s.regionDragEndCallback, L), this.allowDragRegion();
4223
4223
  } else {
4224
4224
  let p = function(R) {
4225
4225
  g = !0;
4226
4226
  let { x: X, y: I } = s.getMouseRelativeXy(R);
4227
- _ === void 0 && f === void 0 ? (_ = X, f = I, x = X, L = I) : (x = X, L = I), x = Math.min(x, s.canvas.width), L = Math.min(L, s.canvas.height), x = Math.max(x, 0), L = Math.max(L, 0), T && s.triggerEvent(s.regionDragStartCallback, {
4227
+ _ === void 0 && b === void 0 ? (_ = X, b = I, x = X, L = I) : (x = X, L = I), x = Math.min(x, s.canvas.width), L = Math.min(L, s.canvas.height), x = Math.max(x, 0), L = Math.max(L, 0), T && s.triggerEvent(s.regionDragStartCallback, {
4228
4228
  startX: _,
4229
- startY: f,
4229
+ startY: b,
4230
4230
  endX: x,
4231
4231
  endY: L
4232
- }), T = !1, s.setRegionSize(_, f, x, L);
4233
- }, v = function() {
4232
+ }), T = !1, s.setRegionSize(_, b, x, L);
4233
+ }, f = function() {
4234
4234
  if (z) {
4235
4235
  if (document.removeEventListener("mousemove", p), !g)
4236
4236
  return;
4237
- document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", v), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", s.allowDragRegion(), s.triggerEvent(s.regionDragEndCallback, {
4237
+ document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", f), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", s.allowDragRegion(), s.triggerEvent(s.regionDragEndCallback, {
4238
4238
  startX: s.startX,
4239
4239
  startY: s.startY,
4240
4240
  endX: s.endX,
4241
4241
  endY: s.endY
4242
4242
  });
4243
4243
  }
4244
- }, z = !1, g = !1, T = !0, _, f, x, L;
4244
+ }, z = !1, g = !1, T = !0, _, b, x, L;
4245
4245
  s.canvas.onmousedown = function() {
4246
4246
  z = !0, document.addEventListener("mousemove", p);
4247
- }, document.addEventListener("mouseup", v);
4247
+ }, document.addEventListener("mouseup", f);
4248
4248
  }
4249
4249
  }
4250
4250
  allowDragRegion() {
4251
4251
  let s = this;
4252
4252
  const p = 2;
4253
- let v = null, z = !0, g = () => {
4254
- let f = {
4253
+ let f = null, z = !0, g = () => {
4254
+ let b = {
4255
4255
  startX: s.startX,
4256
4256
  startY: s.startY,
4257
4257
  endX: s.endX,
4258
4258
  endY: s.endY
4259
4259
  };
4260
- z && s.triggerEvent(s.regionDragStartCallback, f), s.triggerEvent(s.regionDraggingCallback, f), z = !1;
4260
+ z && s.triggerEvent(s.regionDragStartCallback, b), s.triggerEvent(s.regionDraggingCallback, b), z = !1;
4261
4261
  };
4262
- this.allowDragRegionMousemove = function(f) {
4263
- let { x, y: L } = s.getMouseRelativeXy(f), R = Math.min(s.startX, s.endX), X = Math.max(s.startX, s.endX), I = Math.min(s.startY, s.endY), D = Math.max(s.startY, s.endY);
4262
+ this.allowDragRegionMousemove = function(b) {
4263
+ let { x, y: L } = s.getMouseRelativeXy(b), R = Math.min(s.startX, s.endX), X = Math.max(s.startX, s.endX), I = Math.min(s.startY, s.endY), D = Math.max(s.startY, s.endY);
4264
4264
  if (x >= R + p && x <= X - p && L >= I + p && L <= D - p) {
4265
4265
  s.canvas.style.cursor = "move";
4266
4266
  let B = X - R, q = D - I, S, Q;
4267
- v = function(o2) {
4267
+ f = function(o2) {
4268
4268
  g(), s.canvas.style.cursor = "move";
4269
4269
  let { x: f2, y: g2 } = s.getMouseRelativeXy(o2);
4270
4270
  S ?? (S = f2 - R), Q ?? (Q = g2 - I), f2 = Math.min(f2, innerWidth - B + S), f2 = Math.max(f2, S), g2 = Math.min(g2, innerHeight - q + Q), g2 = Math.max(g2, Q), s.setRegionSize(
@@ -4279,44 +4279,44 @@ class Jt extends de {
4279
4279
  let Q = innerWidth, o2 = innerHeight;
4280
4280
  return q = Math.max(q, 0), q = Math.min(q, Q), S = Math.max(S, 0), S = Math.min(S, o2), { x: q, y: S };
4281
4281
  };
4282
- x >= R - p && x <= R + p && L >= I - p && L <= I + p ? (s.canvas.style.cursor = "nw-resize", v = function(q) {
4282
+ x >= R - p && x <= R + p && L >= I - p && L <= I + p ? (s.canvas.style.cursor = "nw-resize", f = function(q) {
4283
4283
  g(), s.canvas.style.cursor = "nw-resize";
4284
4284
  let S = s.getMouseRelativeXy(q), { x: Q, y: o2 } = B(S);
4285
4285
  s.setRegionSize(Q, o2, X, D);
4286
- }) : x >= X - p && x <= X + p && L >= I - p && L <= I + p ? (s.canvas.style.cursor = "ne-resize", v = function(q) {
4286
+ }) : x >= X - p && x <= X + p && L >= I - p && L <= I + p ? (s.canvas.style.cursor = "ne-resize", f = function(q) {
4287
4287
  g(), s.canvas.style.cursor = "ne-resize";
4288
4288
  let S = s.getMouseRelativeXy(q), { x: Q, y: o2 } = B(S);
4289
4289
  s.setRegionSize(R, o2, Q, D);
4290
- }) : x >= R - p && x <= R + p && L >= D - p && L <= D + p ? (s.canvas.style.cursor = "ne-resize", v = function(q) {
4290
+ }) : x >= R - p && x <= R + p && L >= D - p && L <= D + p ? (s.canvas.style.cursor = "ne-resize", f = function(q) {
4291
4291
  g(), s.canvas.style.cursor = "ne-resize";
4292
4292
  let S = s.getMouseRelativeXy(q), { x: Q, y: o2 } = B(S);
4293
4293
  s.setRegionSize(Q, I, X, o2);
4294
- }) : x >= X - p && x <= X + p && L >= D - p && L <= D + p ? (s.canvas.style.cursor = "nw-resize", v = function(q) {
4294
+ }) : x >= X - p && x <= X + p && L >= D - p && L <= D + p ? (s.canvas.style.cursor = "nw-resize", f = function(q) {
4295
4295
  g(), s.canvas.style.cursor = "nw-resize";
4296
4296
  let S = s.getMouseRelativeXy(q), { x: Q, y: o2 } = B(S);
4297
4297
  s.setRegionSize(R, I, Q, o2);
4298
- }) : x >= R - p && x <= R + p ? (s.canvas.style.cursor = "w-resize", v = function(q) {
4298
+ }) : x >= R - p && x <= R + p ? (s.canvas.style.cursor = "w-resize", f = function(q) {
4299
4299
  g(), s.canvas.style.cursor = "w-resize";
4300
4300
  let S = s.getMouseRelativeXy(q), { x: Q } = B(S);
4301
4301
  s.setRegionSize(Q, I, X, D);
4302
- }) : x >= X - p && x <= X + p ? (s.canvas.style.cursor = "w-resize", v = function(q) {
4302
+ }) : x >= X - p && x <= X + p ? (s.canvas.style.cursor = "w-resize", f = function(q) {
4303
4303
  g(), s.canvas.style.cursor = "w-resize";
4304
4304
  let S = s.getMouseRelativeXy(q), { x: Q } = B(S);
4305
4305
  s.setRegionSize(R, I, Q, D);
4306
- }) : L >= I - p && L <= I + p ? (s.canvas.style.cursor = "n-resize", v = function(q) {
4306
+ }) : L >= I - p && L <= I + p ? (s.canvas.style.cursor = "n-resize", f = function(q) {
4307
4307
  g(), s.canvas.style.cursor = "n-resize";
4308
4308
  let S = s.getMouseRelativeXy(q), { y: Q } = B(S);
4309
4309
  s.setRegionSize(R, Q, X, D);
4310
- }) : L >= D - p && L <= D + p ? (s.canvas.style.cursor = "n-resize", v = function(q) {
4310
+ }) : L >= D - p && L <= D + p ? (s.canvas.style.cursor = "n-resize", f = function(q) {
4311
4311
  g(), s.canvas.style.cursor = "n-resize";
4312
4312
  let S = s.getMouseRelativeXy(q), { y: Q } = B(S);
4313
4313
  s.setRegionSize(R, I, X, Q);
4314
- }) : (s.canvas.onmousedown = null, v = null, s.canvas.style.cursor = "default");
4314
+ }) : (s.canvas.onmousedown = null, f = null, s.canvas.style.cursor = "default");
4315
4315
  }
4316
4316
  };
4317
4317
  let T = null;
4318
4318
  this.dragRegionMousedown = function() {
4319
- T = v, T && document.addEventListener("mousemove", v);
4319
+ T = f, T && document.addEventListener("mousemove", f);
4320
4320
  }, this.canvas.addEventListener("mousedown", this.dragRegionMousedown);
4321
4321
  function _() {
4322
4322
  T && (z = !0, s.triggerEvent(s.regionDragEndCallback, {
@@ -4331,7 +4331,7 @@ class Jt extends de {
4331
4331
  notAllowDragRegion() {
4332
4332
  this.canvas.removeEventListener("mousemove", this.allowDragRegionMousemove), this.canvas.removeEventListener("mousedown", this.dragRegionMousedown);
4333
4333
  }
4334
- setRegionSize(s, p, v, z) {
4334
+ setRegionSize(s, p, f, z) {
4335
4335
  const g = this.regionSizeIndicator.fontSize;
4336
4336
  this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), this.ctx.drawImage(
4337
4337
  this.screenshot,
@@ -4339,16 +4339,16 @@ class Jt extends de {
4339
4339
  0,
4340
4340
  this.canvas.width,
4341
4341
  this.canvas.height
4342
- ), this.startX = Math.min(s, v), this.endX = Math.max(s, v), this.startY = Math.min(p, z), this.endY = Math.max(p, z), this.ctx.beginPath(), this.ctx.moveTo(0, 0), this.ctx.lineTo(this.canvas.width, 0), this.ctx.lineTo(this.canvas.width, this.canvas.height), this.ctx.lineTo(0, this.canvas.height), this.ctx.moveTo(this.startX, this.startY), this.ctx.lineTo(this.startX, this.endY), this.ctx.lineTo(this.endX, this.endY), this.ctx.lineTo(this.endX, this.startY), this.ctx.closePath(), this.ctx.fillStyle = this.maskColor, this.ctx.fill(), this.ctx.strokeStyle = "#0000", this.ctx.stroke(), this.ctx.lineWidth = 2, this.ctx.beginPath(), this.ctx.moveTo(this.startX, this.startY), this.ctx.lineTo(this.startX, this.endY), this.ctx.lineTo(this.endX, this.endY), this.ctx.lineTo(this.endX, this.startY), this.ctx.closePath(), this.ctx.strokeStyle = this.regionColor, this.ctx.stroke(), this.ctx.font = g + "px Arial", this.ctx.textBaseline = "bottom", this.ctx.textAlign = "left";
4342
+ ), this.startX = Math.min(s, f), this.endX = Math.max(s, f), this.startY = Math.min(p, z), this.endY = Math.max(p, z), this.ctx.beginPath(), this.ctx.moveTo(0, 0), this.ctx.lineTo(this.canvas.width, 0), this.ctx.lineTo(this.canvas.width, this.canvas.height), this.ctx.lineTo(0, this.canvas.height), this.ctx.moveTo(this.startX, this.startY), this.ctx.lineTo(this.startX, this.endY), this.ctx.lineTo(this.endX, this.endY), this.ctx.lineTo(this.endX, this.startY), this.ctx.closePath(), this.ctx.fillStyle = this.maskColor, this.ctx.fill(), this.ctx.strokeStyle = "#0000", this.ctx.stroke(), this.ctx.lineWidth = 2, this.ctx.beginPath(), this.ctx.moveTo(this.startX, this.startY), this.ctx.lineTo(this.startX, this.endY), this.ctx.lineTo(this.endX, this.endY), this.ctx.lineTo(this.endX, this.startY), this.ctx.closePath(), this.ctx.strokeStyle = this.regionColor, this.ctx.stroke(), this.ctx.font = g + "px Arial", this.ctx.textBaseline = "bottom", this.ctx.textAlign = "left";
4343
4343
  let T = `${Math.max(
4344
4344
  1,
4345
4345
  Math.round(this.endX - this.startX)
4346
- )} x ${Math.max(1, Math.round(this.endY - this.startY))}`, _ = this.ctx.measureText(T).fontBoundingBoxAscent, f = this.startY - 2 - 5 - _;
4347
- this.ctx.fillStyle = this.regionSizeIndicator.color, f >= 0 && this.regionSizeIndicator.show && this.ctx.fillText(
4346
+ )} x ${Math.max(1, Math.round(this.endY - this.startY))}`, _ = this.ctx.measureText(T).fontBoundingBoxAscent, b = this.startY - 2 - 5 - _;
4347
+ this.ctx.fillStyle = this.regionSizeIndicator.color, b >= 0 && this.regionSizeIndicator.show && this.ctx.fillText(
4348
4348
  T,
4349
4349
  this.startX + 2,
4350
4350
  this.startY - 2 - 5
4351
- ), f < 0 && this.regionSizeIndicator.show && this.ctx.fillText(
4351
+ ), b < 0 && this.regionSizeIndicator.show && this.ctx.fillText(
4352
4352
  T,
4353
4353
  this.startX + 5,
4354
4354
  this.startY + 2 + g + 5
@@ -4418,7 +4418,7 @@ class Jt extends de {
4418
4418
  }
4419
4419
  class Kt extends de {
4420
4420
  constructor(s) {
4421
- var p, v, z, g, T, _, f, x, L, R, X;
4421
+ var p, f, z, g, T, _, b, x, L, R, X;
4422
4422
  super(s), this.region = s.region, this.screenshot = s.screenshot, this.customDrawing = s.customDrawing ?? [], this.downloadName = s.downloadName ?? "screenshot", this.globalColorOptions = s.globalColorOptions ?? [
4423
4423
  "#ff3a3a",
4424
4424
  "#f8b60f",
@@ -4428,7 +4428,7 @@ class Kt extends de {
4428
4428
  "#e9e9e9"
4429
4429
  ], this.rectangleOptions = {
4430
4430
  lineWidth: ((p = s.rectangleOptions) == null ? void 0 : p.size) ?? [4, 6, 8],
4431
- lineColor: ((v = s.rectangleOptions) == null ? void 0 : v.color) ?? this.globalColorOptions
4431
+ lineColor: ((f = s.rectangleOptions) == null ? void 0 : f.color) ?? this.globalColorOptions
4432
4432
  }, this.circleOptions = {
4433
4433
  lineWidth: ((z = s.circleOptions) == null ? void 0 : z.size) ?? [4, 6, 8],
4434
4434
  lineColor: ((g = s.circleOptions) == null ? void 0 : g.color) ?? this.globalColorOptions
@@ -4436,7 +4436,7 @@ class Kt extends de {
4436
4436
  lineWidth: ((T = s.paintOptions) == null ? void 0 : T.size) ?? [4, 6, 8],
4437
4437
  lineColor: ((_ = s.paintOptions) == null ? void 0 : _.color) ?? this.globalColorOptions
4438
4438
  }, this.mosaicOptions = {
4439
- lineWidth: ((f = s.mosaicOptions) == null ? void 0 : f.size) ?? [6, 8, 10]
4439
+ lineWidth: ((b = s.mosaicOptions) == null ? void 0 : b.size) ?? [6, 8, 10]
4440
4440
  }, this.textOptions = {
4441
4441
  textSize: ((x = s.textOptions) == null ? void 0 : x.size) ?? [16, 18, 20],
4442
4442
  textColor: ((L = s.textOptions) == null ? void 0 : L.color) ?? this.globalColorOptions
@@ -4456,33 +4456,33 @@ class Kt extends de {
4456
4456
  createCanvas() {
4457
4457
  if (this.canvas)
4458
4458
  return;
4459
- let { startX: s, startY: p, endX: v, endY: z } = this.region;
4459
+ let { startX: s, startY: p, endX: f, endY: z } = this.region;
4460
4460
  this.canvas = document.createElement("canvas"), this.ctx = this.canvas.getContext("2d"), document.body.appendChild(this.canvas);
4461
- let g = v - s, T = z - p;
4461
+ let g = f - s, T = z - p;
4462
4462
  this.canvas.width = g, this.canvas.height = T, this.canvas.style.cssText = `position:fixed;top:${p}px;left:${s}px;z-index:9999`, this.triggerEvent(this.toolsCanvasCreatedCallback);
4463
4463
  }
4464
4464
  getOriginImg() {
4465
- let { startX: s, startY: p, endX: v, endY: z } = this.region, g = document.createElement("canvas");
4466
- return g.width = Math.max(v - s, 1), g.height = Math.max(z - p, 1), g.getContext("2d").drawImage(this.screenshot, -s, -p, innerWidth, innerHeight), g;
4465
+ let { startX: s, startY: p, endX: f, endY: z } = this.region, g = document.createElement("canvas");
4466
+ return g.width = Math.max(f - s, 1), g.height = Math.max(z - p, 1), g.getContext("2d").drawImage(this.screenshot, -s, -p, innerWidth, innerHeight), g;
4467
4467
  }
4468
4468
  getMosaicImg() {
4469
- let { startX: s, startY: p, endX: v, endY: z } = this.region, g = document.createElement("canvas");
4470
- g.width = v - s, g.height = z - p;
4469
+ let { startX: s, startY: p, endX: f, endY: z } = this.region, g = document.createElement("canvas");
4470
+ g.width = f - s, g.height = z - p;
4471
4471
  let T = g.getContext("2d");
4472
4472
  T.drawImage(this.screenshot, -s, -p, innerWidth, innerHeight);
4473
4473
  let _ = T.getImageData(0, 0, g.width, g.height);
4474
- const f = 10, x = _.data;
4475
- for (let L = 0; L < g.height; L += f)
4476
- for (let R = 0; R < g.width; R += f) {
4474
+ const b = 10, x = _.data;
4475
+ for (let L = 0; L < g.height; L += b)
4476
+ for (let R = 0; R < g.width; R += b) {
4477
4477
  let X = 0, I = 0, D = 0, B = 0, q = 0;
4478
- for (let g2 = L; g2 < L + f && g2 < g.height; g2++)
4479
- for (let _2 = R; _2 < R + f && _2 < g.width; _2++) {
4478
+ for (let g2 = L; g2 < L + b && g2 < g.height; g2++)
4479
+ for (let _2 = R; _2 < R + b && _2 < g.width; _2++) {
4480
4480
  let i = (g2 * g.width + _2) * 4;
4481
4481
  X += x[i], I += x[i + 1], D += x[i + 2], B += x[i + 3], q++;
4482
4482
  }
4483
4483
  let S = X / q, Q = I / q, o2 = D / q, f2 = B / q;
4484
- for (let g2 = L; g2 < L + f && g2 < g.height; g2++)
4485
- for (let _2 = R; _2 < R + f && _2 < g.width; _2++) {
4484
+ for (let g2 = L; g2 < L + b && g2 < g.height; g2++)
4485
+ for (let _2 = R; _2 < R + b && _2 < g.width; _2++) {
4486
4486
  let i = (g2 * g.width + _2) * 4;
4487
4487
  x[i] = S, x[i + 1] = Q, x[i + 2] = o2, x[i + 3] = f2;
4488
4488
  }
@@ -4491,7 +4491,7 @@ class Kt extends de {
4491
4491
  }
4492
4492
  createHandle() {
4493
4493
  this.handle = document.createElement("div"), this.handle.style.setProperty("--active-color", "#409eff");
4494
- let s = this.rectangleOptions, p = this.circleOptions, v = this.paintOptions, z = this.mosaicOptions, g = this.textOptions, T = this.arrowOptions;
4494
+ let s = this.rectangleOptions, p = this.circleOptions, f = this.paintOptions, z = this.mosaicOptions, g = this.textOptions, T = this.arrowOptions;
4495
4495
  this.handle.innerHTML = `
4496
4496
  <ul class="region-screenshot_tools_drawing">
4497
4497
  <li class="region-screenshot_draw_item region-screenshot_tools_item region-screenshot_rectangle">
@@ -4574,114 +4574,114 @@ class Kt extends de {
4574
4574
  <div class="region-screenshot_tools_btn"></div>
4575
4575
  </li>
4576
4576
  </ul>
4577
- `, this.handle.className = "region-screenshot_tools", document.body.appendChild(this.handle), this.customDrawing.forEach((f) => {
4577
+ `, this.handle.className = "region-screenshot_tools", document.body.appendChild(this.handle), this.customDrawing.forEach((b) => {
4578
4578
  let x = s2(".region-screenshot_tools_drawing"), L = document.createElement("li");
4579
- L.classList.add("region-screenshot_draw_item"), L.classList.add("region-screenshot_tools_item"), L.classList.add("region-screenshot_custom_tools"), L.classList.add(f.className), L.innerHTML = `
4579
+ L.classList.add("region-screenshot_draw_item"), L.classList.add("region-screenshot_tools_item"), L.classList.add("region-screenshot_custom_tools"), L.classList.add(b.className), L.innerHTML = `
4580
4580
  <div class="region-screenshot_tools_btn"></div>
4581
- `, f.optionsHtml && (L.innerHTML += ` <div class="region-screenshot_tools_options">
4582
- ${f.optionsHtml}
4583
- </div>`), x[0].appendChild(L), L.onDrawingClose = f.onDrawingClose, L.onDrawingOpen = f.onDrawingOpen, typeof f.onOptionsCreated == "function" && f.onOptionsCreated(
4581
+ `, b.optionsHtml && (L.innerHTML += ` <div class="region-screenshot_tools_options">
4582
+ ${b.optionsHtml}
4583
+ </div>`), x[0].appendChild(L), L.onDrawingClose = b.onDrawingClose, L.onDrawingOpen = b.onDrawingOpen, typeof b.onOptionsCreated == "function" && b.onOptionsCreated(
4584
4584
  s2(L).find(".region-screenshot_tools_options")[0]
4585
4585
  );
4586
- }), s.lineWidth.forEach((f) => {
4586
+ }), s.lineWidth.forEach((b) => {
4587
4587
  let x = s2(
4588
4588
  ".region-screenshot_rectangle .region-screenshot_tools_size_instruction_list"
4589
4589
  );
4590
4590
  x.html(
4591
- x.html() + `<div line-width="${f}" class="region-screenshot_tools_size">
4592
- <div style="width:${f}px;height:${f}px;"></div>
4591
+ x.html() + `<div line-width="${b}" class="region-screenshot_tools_size">
4592
+ <div style="width:${b}px;height:${b}px;"></div>
4593
4593
  </div>`
4594
4594
  );
4595
- }), s.lineColor.forEach((f) => {
4595
+ }), s.lineColor.forEach((b) => {
4596
4596
  let x = s2(
4597
4597
  ".region-screenshot_rectangle .region-screenshot_tools_color_instruction_list"
4598
4598
  );
4599
4599
  x.html(
4600
- x.html() + `<div line-color="${f}" style="background-color:${f};" class="region-screenshot_tools_color"></div>`
4600
+ x.html() + `<div line-color="${b}" style="background-color:${b};" class="region-screenshot_tools_color"></div>`
4601
4601
  );
4602
- }), p.lineWidth.forEach((f) => {
4602
+ }), p.lineWidth.forEach((b) => {
4603
4603
  let x = s2(
4604
4604
  ".region-screenshot_circle .region-screenshot_tools_size_instruction_list"
4605
4605
  );
4606
4606
  x.html(
4607
- x.html() + `<div line-width="${f}" class="region-screenshot_tools_size">
4608
- <div style="width:${f}px;height:${f}px;"></div>
4607
+ x.html() + `<div line-width="${b}" class="region-screenshot_tools_size">
4608
+ <div style="width:${b}px;height:${b}px;"></div>
4609
4609
  </div>`
4610
4610
  );
4611
- }), p.lineColor.forEach((f) => {
4611
+ }), p.lineColor.forEach((b) => {
4612
4612
  let x = s2(
4613
4613
  ".region-screenshot_circle .region-screenshot_tools_color_instruction_list"
4614
4614
  );
4615
4615
  x.html(
4616
- x.html() + `<div line-color="${f}" style="background-color:${f};" class="region-screenshot_tools_color"></div>`
4616
+ x.html() + `<div line-color="${b}" style="background-color:${b};" class="region-screenshot_tools_color"></div>`
4617
4617
  );
4618
- }), v.lineWidth.forEach((f) => {
4618
+ }), f.lineWidth.forEach((b) => {
4619
4619
  let x = s2(
4620
4620
  ".region-screenshot_paint .region-screenshot_tools_size_instruction_list"
4621
4621
  );
4622
4622
  x.html(
4623
- x.html() + `<div line-width="${f}" class="region-screenshot_tools_size">
4624
- <div style="width:${f}px;height:${f}px;"></div>
4623
+ x.html() + `<div line-width="${b}" class="region-screenshot_tools_size">
4624
+ <div style="width:${b}px;height:${b}px;"></div>
4625
4625
  </div>`
4626
4626
  );
4627
- }), v.lineColor.forEach((f) => {
4627
+ }), f.lineColor.forEach((b) => {
4628
4628
  let x = s2(
4629
4629
  ".region-screenshot_paint .region-screenshot_tools_color_instruction_list"
4630
4630
  );
4631
4631
  x.html(
4632
- x.html() + `<div line-color="${f}" style="background-color:${f};" class="region-screenshot_tools_color"></div>`
4632
+ x.html() + `<div line-color="${b}" style="background-color:${b};" class="region-screenshot_tools_color"></div>`
4633
4633
  );
4634
- }), T.lineWidth.forEach((f) => {
4634
+ }), T.lineWidth.forEach((b) => {
4635
4635
  let x = s2(
4636
4636
  ".region-screenshot_arrow .region-screenshot_tools_size_instruction_list"
4637
4637
  );
4638
4638
  x.html(
4639
- x.html() + `<div line-width="${f}" class="region-screenshot_tools_size">
4640
- <div style="width:${f}px;height:${f}px;"></div>
4639
+ x.html() + `<div line-width="${b}" class="region-screenshot_tools_size">
4640
+ <div style="width:${b}px;height:${b}px;"></div>
4641
4641
  </div>`
4642
4642
  );
4643
- }), T.lineColor.forEach((f) => {
4643
+ }), T.lineColor.forEach((b) => {
4644
4644
  let x = s2(
4645
4645
  ".region-screenshot_arrow .region-screenshot_tools_color_instruction_list"
4646
4646
  );
4647
4647
  x.html(
4648
- x.html() + `<div line-color="${f}" style="background-color:${f};" class="region-screenshot_tools_color"></div>`
4648
+ x.html() + `<div line-color="${b}" style="background-color:${b};" class="region-screenshot_tools_color"></div>`
4649
4649
  );
4650
- }), z.lineWidth.forEach((f) => {
4650
+ }), z.lineWidth.forEach((b) => {
4651
4651
  let x = s2(
4652
4652
  ".region-screenshot_mosaic .region-screenshot_tools_size_instruction_list"
4653
4653
  );
4654
4654
  x.html(
4655
- x.html() + `<div line-width="${f}" class="region-screenshot_tools_size">
4656
- <div style="width:${f}px;height:${f}px;"></div>
4655
+ x.html() + `<div line-width="${b}" class="region-screenshot_tools_size">
4656
+ <div style="width:${b}px;height:${b}px;"></div>
4657
4657
  </div>`
4658
4658
  );
4659
- }), g.textSize.forEach((f) => {
4659
+ }), g.textSize.forEach((b) => {
4660
4660
  let x = s2(
4661
4661
  ".region-screenshot_text .region-screenshot_tools_size_instruction_list"
4662
4662
  );
4663
4663
  x.html(
4664
- x.html() + `<div text-size="${f}" style="font-size:${f}px" class="region-screenshot_tools_size">
4664
+ x.html() + `<div text-size="${b}" style="font-size:${b}px" class="region-screenshot_tools_size">
4665
4665
  T
4666
4666
  </div>`
4667
4667
  );
4668
- }), g.textColor.forEach((f) => {
4668
+ }), g.textColor.forEach((b) => {
4669
4669
  let x = s2(
4670
4670
  ".region-screenshot_text .region-screenshot_tools_color_instruction_list"
4671
4671
  );
4672
4672
  x.html(
4673
- x.html() + `<div text-color="${f}" style="background-color:${f};" class="region-screenshot_tools_color"></div>`
4673
+ x.html() + `<div text-color="${b}" style="background-color:${b};" class="region-screenshot_tools_color"></div>`
4674
4674
  );
4675
4675
  });
4676
4676
  let _ = this;
4677
4677
  s2(".region-screenshot_draw_item .region-screenshot_tools_btn").click(
4678
4678
  function() {
4679
- let f = s2(this).parent(), x = s2(this).next();
4680
- if (f.hasClass("region-screenshot_active"))
4681
- f.removeClass("region-screenshot_active");
4682
- else if (f.attr("is-init") === void 0) {
4683
- f.addClass("region-screenshot_active");
4684
- let L = f.find(".region-screenshot_tools_options")[0];
4679
+ let b = s2(this).parent(), x = s2(this).next();
4680
+ if (b.hasClass("region-screenshot_active"))
4681
+ b.removeClass("region-screenshot_active");
4682
+ else if (b.attr("is-init") === void 0) {
4683
+ b.addClass("region-screenshot_active");
4684
+ let L = b.find(".region-screenshot_tools_options")[0];
4685
4685
  if (L) {
4686
4686
  let I = L.getBoundingClientRect().left, D = L.getBoundingClientRect().top, B = I + L.offsetWidth, q = D + L.offsetHeight;
4687
4687
  if (B > innerWidth) {
@@ -4691,10 +4691,10 @@ class Kt extends de {
4691
4691
  `${Q * -1}px`
4692
4692
  );
4693
4693
  }
4694
- let S = f[0].getBoundingClientRect().top;
4694
+ let S = b[0].getBoundingClientRect().top;
4695
4695
  (q > innerHeight || S < _.region.canvas.offsetTop + _.region.startY) && s2(L).addClass("region-screenshot_top"), L.getBoundingClientRect().top < 0 && s2(L).removeClass("region-screenshot_top");
4696
4696
  }
4697
- f.attr("is-init", ""), f.siblings().removeClass("region-screenshot_active");
4697
+ b.attr("is-init", ""), b.siblings().removeClass("region-screenshot_active");
4698
4698
  let R = x.find(
4699
4699
  ".region-screenshot_tools_size_instruction_list > div"
4700
4700
  );
@@ -4706,8 +4706,8 @@ class Kt extends de {
4706
4706
  ".region-screenshot_tools_size_instruction_list > div.region-screenshot_active"
4707
4707
  ).click(), x.find(
4708
4708
  ".region-screenshot_tools_color.region-screenshot_active"
4709
- ).click(), f.addClass("region-screenshot_active");
4710
- f.siblings().removeClass("region-screenshot_active"), _.closeCurrentDraw && _.closeCurrentDraw(!0), f.hasClass("region-screenshot_active") && (f.hasClass("region-screenshot_rectangle") ? _.closeCurrentDraw = _.drawRectangle() : f.hasClass("region-screenshot_circle") ? _.closeCurrentDraw = _.drawCircle() : f.hasClass("region-screenshot_paint") ? _.closeCurrentDraw = _.drawPaint() : f.hasClass("region-screenshot_mosaic") ? _.closeCurrentDraw = _.drawMosaic() : f.hasClass("region-screenshot_text") ? _.closeCurrentDraw = _.drawText() : f.hasClass("region-screenshot_arrow") ? _.closeCurrentDraw = _.drawArrow() : f.hasClass("region-screenshot_custom_tools") && (_.closeCurrentDraw = _.drawCustom(this)));
4709
+ ).click(), b.addClass("region-screenshot_active");
4710
+ b.siblings().removeClass("region-screenshot_active"), _.closeCurrentDraw && _.closeCurrentDraw(!0), b.hasClass("region-screenshot_active") && (b.hasClass("region-screenshot_rectangle") ? _.closeCurrentDraw = _.drawRectangle() : b.hasClass("region-screenshot_circle") ? _.closeCurrentDraw = _.drawCircle() : b.hasClass("region-screenshot_paint") ? _.closeCurrentDraw = _.drawPaint() : b.hasClass("region-screenshot_mosaic") ? _.closeCurrentDraw = _.drawMosaic() : b.hasClass("region-screenshot_text") ? _.closeCurrentDraw = _.drawText() : b.hasClass("region-screenshot_arrow") ? _.closeCurrentDraw = _.drawArrow() : b.hasClass("region-screenshot_custom_tools") && (_.closeCurrentDraw = _.drawCustom(this)));
4711
4711
  }
4712
4712
  ), s2(".region-screenshot_tools_size").click(function() {
4713
4713
  s2(this).addClass("region-screenshot_active"), s2(this).siblings().removeClass("region-screenshot_active"), _.checkedLineWidth = Number(s2(this).attr("line-width")), _.checkedTextSize = Number(s2(this).attr("text-size"));
@@ -4715,20 +4715,20 @@ class Kt extends de {
4715
4715
  s2(this).addClass("region-screenshot_active"), s2(this).siblings().removeClass("region-screenshot_active"), _.checkedLineColor = s2(this).attr("line-color"), _.checkedTextColor = s2(this).attr("text-color");
4716
4716
  }), s2(".region-screenshot_other_item .region-screenshot_tools_btn").click(
4717
4717
  function() {
4718
- let f = s2(this).parent();
4719
- f.hasClass("region-screenshot_revocation") ? _.revocation() : f.hasClass("region-screenshot_close") ? _.triggerEvent(_.closedCallback) : f.hasClass("region-screenshot_finish") ? _.screenshotGenerate().then((x) => {
4718
+ let b = s2(this).parent();
4719
+ b.hasClass("region-screenshot_revocation") ? _.revocation() : b.hasClass("region-screenshot_close") ? _.triggerEvent(_.closedCallback) : b.hasClass("region-screenshot_finish") ? _.screenshotGenerate().then((x) => {
4720
4720
  _.triggerEvent(_.screenshotGeneratedCallback, x);
4721
- }) : f.hasClass("region-screenshot_download") && _.screenshotDownload().then((x) => {
4721
+ }) : b.hasClass("region-screenshot_download") && _.screenshotDownload().then((x) => {
4722
4722
  _.close(), _.triggerEvent(_.screenshotDownloadCallback, x);
4723
4723
  });
4724
4724
  }
4725
4725
  ), this.handle.style.display = "none";
4726
4726
  }
4727
4727
  updateHandlePosition() {
4728
- let { startX: s, startY: p, endX: v, endY: z } = this.region;
4728
+ let { startX: s, startY: p, endX: f, endY: z } = this.region;
4729
4729
  const g = 10;
4730
- let T = this.handle.style, _ = this.handle.offsetWidth, f = this.handle.offsetHeight, x = 0;
4731
- v > _ ? x = v - _ : x = s, T.left = x + "px", p - g - f < 0 && z + g + f > window.innerHeight ? (T.top = z - g - f + "px", T.left = x - g + "px") : z + g + f > window.innerHeight ? T.top = p - g - f + "px" : T.top = z + g + "px";
4730
+ let T = this.handle.style, _ = this.handle.offsetWidth, b = this.handle.offsetHeight, x = 0;
4731
+ f > _ ? x = f - _ : x = s, T.left = x + "px", p - g - b < 0 && z + g + b > window.innerHeight ? (T.top = z - g - b + "px", T.left = x - g + "px") : z + g + b > window.innerHeight ? T.top = p - g - b + "px" : T.top = z + g + "px";
4732
4732
  }
4733
4733
  updateHandleDisplay(s) {
4734
4734
  this.handle.style.display = s;
@@ -4747,23 +4747,23 @@ class Kt extends de {
4747
4747
  }
4748
4748
  drawRectangle() {
4749
4749
  this.createCanvas();
4750
- let s = this, p, v, z, g, T = !1, _ = !1;
4750
+ let s = this, p, f, z, g, T = !1, _ = !1;
4751
4751
  this.canvas.style.cursor = "crosshair";
4752
- let f = null;
4752
+ let b = null;
4753
4753
  function x(R) {
4754
4754
  T = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0);
4755
4755
  let { x: X, y: I } = s.getMouseRelativeXy(R);
4756
- p === void 0 && v === void 0 ? (p = X, v = I, z = X, g = I) : (z = X, g = I), z = Math.min(z, s.canvas.width), g = Math.min(g, s.canvas.height), z = Math.max(z, 0), g = Math.max(g, 0);
4756
+ p === void 0 && f === void 0 ? (p = X, f = I, z = X, g = I) : (z = X, g = I), z = Math.min(z, s.canvas.width), g = Math.min(g, s.canvas.height), z = Math.max(z, 0), g = Math.max(g, 0);
4757
4757
  let D = s.checkedLineWidth, B = s.checkedLineColor;
4758
- f = () => {
4759
- s.ctx.beginPath(), s.ctx.rect(p, v, z - p, g - v), s.ctx.strokeStyle = B, s.ctx.lineWidth = D, s.ctx.stroke(), s.ctx.closePath();
4760
- }, f();
4758
+ b = () => {
4759
+ s.ctx.beginPath(), s.ctx.rect(p, f, z - p, g - f), s.ctx.strokeStyle = B, s.ctx.lineWidth = D, s.ctx.stroke(), s.ctx.closePath();
4760
+ }, b();
4761
4761
  }
4762
4762
  function L(R) {
4763
4763
  if (_ || R === !0) {
4764
4764
  if (document.removeEventListener("mousemove", x), !T && R !== !0)
4765
4765
  return;
4766
- f && R !== !0 && s.saveHistory(), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", L), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", R !== !0 && s.drawRectangle();
4766
+ b && R !== !0 && s.saveHistory(), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", L), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", R !== !0 && s.drawRectangle();
4767
4767
  }
4768
4768
  }
4769
4769
  return this.canvas.onmousedown = function() {
@@ -4772,17 +4772,17 @@ class Kt extends de {
4772
4772
  }
4773
4773
  drawCircle() {
4774
4774
  this.createCanvas();
4775
- let s = this, p, v, z, g, T = !1, _ = !1;
4775
+ let s = this, p, f, z, g, T = !1, _ = !1;
4776
4776
  this.canvas.style.cursor = "crosshair";
4777
- let f = null;
4777
+ let b = null;
4778
4778
  function x(R) {
4779
4779
  T = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0);
4780
4780
  let { x: X, y: I } = s.getMouseRelativeXy(R);
4781
- p === void 0 && v === void 0 ? (p = X, v = I, z = X, g = I) : (z = X, g = I), z = Math.min(z, s.canvas.width), g = Math.min(g, s.canvas.height), z = Math.max(z, 0), g = Math.max(g, 0);
4781
+ p === void 0 && f === void 0 ? (p = X, f = I, z = X, g = I) : (z = X, g = I), z = Math.min(z, s.canvas.width), g = Math.min(g, s.canvas.height), z = Math.max(z, 0), g = Math.max(g, 0);
4782
4782
  let D = s.checkedLineWidth, B = s.checkedLineColor;
4783
- f = () => {
4783
+ b = () => {
4784
4784
  s.ctx.beginPath();
4785
- let q = z - p, S = g - v, Q = p + q / 2, o2 = v + S / 2;
4785
+ let q = z - p, S = g - f, Q = p + q / 2, o2 = f + S / 2;
4786
4786
  s.ctx.ellipse(
4787
4787
  Q,
4788
4788
  o2,
@@ -4792,13 +4792,13 @@ class Kt extends de {
4792
4792
  0,
4793
4793
  Math.PI * 2
4794
4794
  ), s.ctx.strokeStyle = B, s.ctx.lineWidth = D, s.ctx.stroke(), s.ctx.closePath();
4795
- }, f();
4795
+ }, b();
4796
4796
  }
4797
4797
  function L(R) {
4798
4798
  if (_ || R === !0) {
4799
4799
  if (document.removeEventListener("mousemove", x), !T && R !== !0)
4800
4800
  return;
4801
- f && R !== !0 && s.saveHistory(), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", L), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", R !== !0 && s.drawCircle();
4801
+ b && R !== !0 && s.saveHistory(), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", L), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", R !== !0 && s.drawCircle();
4802
4802
  }
4803
4803
  }
4804
4804
  return this.canvas.onmousedown = function() {
@@ -4807,12 +4807,12 @@ class Kt extends de {
4807
4807
  }
4808
4808
  drawPaint() {
4809
4809
  this.createCanvas();
4810
- let s = this, p = !1, v = !1;
4810
+ let s = this, p = !1, f = !1;
4811
4811
  this.canvas.style.cursor = "crosshair";
4812
4812
  let z = null, g = [];
4813
- function T(f) {
4813
+ function T(b) {
4814
4814
  p = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0);
4815
- let { x, y: L } = s.getMouseRelativeXy(f);
4815
+ let { x, y: L } = s.getMouseRelativeXy(b);
4816
4816
  x = Math.min(x, s.canvas.width), L = Math.min(L, s.canvas.height), x = Math.max(x, 0), L = Math.max(L, 0);
4817
4817
  let R = s.checkedLineWidth, X = s.checkedLineColor;
4818
4818
  z = () => {
@@ -4822,26 +4822,26 @@ class Kt extends de {
4822
4822
  s.ctx.strokeStyle = X, s.ctx.lineWidth = R, s.ctx.stroke(), s.ctx.closePath();
4823
4823
  }, z();
4824
4824
  }
4825
- function _(f) {
4826
- if (v || f === !0) {
4827
- if (document.removeEventListener("mousemove", T), !p && f !== !0)
4825
+ function _(b) {
4826
+ if (f || b === !0) {
4827
+ if (document.removeEventListener("mousemove", T), !p && b !== !0)
4828
4828
  return;
4829
- z && f !== !0 && s.saveHistory(), document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", _), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", f !== !0 && s.drawPaint();
4829
+ z && b !== !0 && s.saveHistory(), document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", _), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", b !== !0 && s.drawPaint();
4830
4830
  }
4831
4831
  }
4832
4832
  return this.canvas.onmousedown = function() {
4833
- v = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0), document.addEventListener("mousemove", T);
4833
+ f = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0), document.addEventListener("mousemove", T);
4834
4834
  }, document.addEventListener("mouseup", _), _;
4835
4835
  }
4836
4836
  drawMosaic() {
4837
4837
  this.createCanvas();
4838
- let s = this, p = !1, v = !1;
4838
+ let s = this, p = !1, f = !1;
4839
4839
  this.canvas.style.cursor = "crosshair";
4840
4840
  let z = null, g = [], T = document.createElement("canvas");
4841
4841
  T.width = s.canvas.width, T.height = s.canvas.height;
4842
- let _ = T.getContext("2d"), f = document.createElement("canvas");
4843
- f.width = s.canvas.width, f.height = s.canvas.height;
4844
- let x = f.getContext("2d"), L = this.getOriginImg(), R = this.getMosaicImg();
4842
+ let _ = T.getContext("2d"), b = document.createElement("canvas");
4843
+ b.width = s.canvas.width, b.height = s.canvas.height;
4844
+ let x = b.getContext("2d"), L = this.getOriginImg(), R = this.getMosaicImg();
4845
4845
  function X(D) {
4846
4846
  p = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), _.clearRect(0, 0, s.canvas.width, s.canvas.height), x.clearRect(0, 0, s.canvas.width, s.canvas.height), x.drawImage(R, 0, 0), _.drawImage(L, 0, 0);
4847
4847
  let { x: B, y: q } = s.getMouseRelativeXy(D);
@@ -4854,25 +4854,25 @@ class Kt extends de {
4854
4854
  for (let o2 = 1; o2 < g.length; o2++)
4855
4855
  x.lineTo(...g[o2]);
4856
4856
  x.strokeStyle = Q, x.lineWidth = S, x.save(), x.globalCompositeOperation = "destination-in", x.stroke(), x.closePath(), x.restore(), z = () => {
4857
- s.ctx.drawImage(f, 0, 0);
4857
+ s.ctx.drawImage(b, 0, 0);
4858
4858
  }, z(), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0);
4859
4859
  }
4860
4860
  function I(D) {
4861
- if (v || D === !0) {
4861
+ if (f || D === !0) {
4862
4862
  if (document.removeEventListener("mousemove", X), !p && D !== !0)
4863
4863
  return;
4864
4864
  z && D !== !0 && s.saveHistory(), document.removeEventListener("mousemove", X), document.removeEventListener("mouseup", I), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", D !== !0 && s.drawMosaic();
4865
4865
  }
4866
4866
  }
4867
4867
  return this.canvas.onmousedown = function() {
4868
- v = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0), document.addEventListener("mousemove", X);
4868
+ f = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0), document.addEventListener("mousemove", X);
4869
4869
  }, document.addEventListener("mouseup", I), I;
4870
4870
  }
4871
4871
  drawText() {
4872
4872
  this.createCanvas();
4873
4873
  let s = this;
4874
4874
  this.canvas.style.cursor = "text";
4875
- let p = null, v = 0, z = 0;
4875
+ let p = null, f = 0, z = 0;
4876
4876
  const g = [3, 3], T = 1;
4877
4877
  let _ = !1;
4878
4878
  this.drawTextActivity = () => new Promise((L) => {
@@ -4883,7 +4883,7 @@ class Kt extends de {
4883
4883
  Qt.toPng(p.children[0], { quality: 1 }).then((R) => {
4884
4884
  let X = new Image();
4885
4885
  X.src = R, X.onload = () => {
4886
- let I = v, D = z, B = p.scrollLeft - T, q = p.scrollTop - T, S = p.offsetWidth, Q = p.offsetHeight;
4886
+ let I = f, D = z, B = p.scrollLeft - T, q = p.scrollTop - T, S = p.offsetWidth, Q = p.offsetHeight;
4887
4887
  s.ctx.drawImage(
4888
4888
  X,
4889
4889
  //图片
@@ -4907,7 +4907,7 @@ class Kt extends de {
4907
4907
  };
4908
4908
  });
4909
4909
  });
4910
- function f(L) {
4910
+ function b(L) {
4911
4911
  if (p) {
4912
4912
  if (_)
4913
4913
  return;
@@ -4918,15 +4918,15 @@ class Kt extends de {
4918
4918
  let { x: R, y: X } = s.getMouseRelativeXy(L);
4919
4919
  p = document.createElement("div");
4920
4920
  let I = 30;
4921
- v = Math.min(
4921
+ f = Math.min(
4922
4922
  R - g[1],
4923
4923
  s.canvas.offsetWidth - (I + g[1] * 2 + T * 2)
4924
- ), v = Math.max(T, v), z = Math.min(
4924
+ ), f = Math.max(T, f), z = Math.min(
4925
4925
  X - (g[0] * 2 + s.checkedTextSize) / 2,
4926
4926
  s.canvas.offsetHeight - (s.checkedTextSize + g[0] * 2 + T * 2)
4927
4927
  ), z = Math.max(T, z), p.style.cssText = `
4928
4928
  position:fixed;
4929
- left:${v + s.canvas.offsetLeft}px;
4929
+ left:${f + s.canvas.offsetLeft}px;
4930
4930
  top:${z + s.canvas.offsetTop}px;
4931
4931
  z-index:10000;
4932
4932
  overflow:hidden;
@@ -4936,7 +4936,7 @@ class Kt extends de {
4936
4936
  <div
4937
4937
  style="
4938
4938
  min-width:${I}px;
4939
- max-width:${s.canvas.offsetWidth - v - g[1] * 2 - T * 2}px;
4939
+ max-width:${s.canvas.offsetWidth - f - g[1] * 2 - T * 2}px;
4940
4940
  max-height:${s.canvas.offsetHeight - z - g[0] * 2 - T * 2}px;
4941
4941
  min-height: ${s.checkedTextSize}px;
4942
4942
  background: #0000;
@@ -4952,27 +4952,27 @@ class Kt extends de {
4952
4952
  }
4953
4953
  }
4954
4954
  function x(L) {
4955
- L.target !== s.canvas && p && L.target !== p.children[0] && !s2(L.target).parent().hasClass("region-screenshot_finish") && f();
4955
+ L.target !== s.canvas && p && L.target !== p.children[0] && !s2(L.target).parent().hasClass("region-screenshot_finish") && b();
4956
4956
  }
4957
- return this.canvas.addEventListener("click", f), document.addEventListener("click", x), () => {
4958
- this.canvas.removeEventListener("click", f), document.removeEventListener("click", x), this.canvas.style.cursor = "default";
4957
+ return this.canvas.addEventListener("click", b), document.addEventListener("click", x), () => {
4958
+ this.canvas.removeEventListener("click", b), document.removeEventListener("click", x), this.canvas.style.cursor = "default";
4959
4959
  };
4960
4960
  }
4961
4961
  drawArrow() {
4962
4962
  this.createCanvas();
4963
- let s = this, p, v, z, g, T = !1, _ = !1;
4963
+ let s = this, p, f, z, g, T = !1, _ = !1;
4964
4964
  this.canvas.style.cursor = "crosshair";
4965
- let f = null;
4965
+ let b = null;
4966
4966
  function x(R) {
4967
4967
  T = !0, s.ctx.clearRect(0, 0, s.canvas.width, s.canvas.height), s.drawHistory.length && s.ctx.drawImage(s.drawHistory.at(-1), 0, 0);
4968
4968
  let { x: X, y: I } = s.getMouseRelativeXy(R);
4969
- p === void 0 && v === void 0 ? (p = X, v = I, z = X, g = I) : (z = X, g = I), z = Math.min(z, s.canvas.width), g = Math.min(g, s.canvas.height), z = Math.max(z, 0), g = Math.max(g, 0);
4969
+ p === void 0 && f === void 0 ? (p = X, f = I, z = X, g = I) : (z = X, g = I), z = Math.min(z, s.canvas.width), g = Math.min(g, s.canvas.height), z = Math.max(z, 0), g = Math.max(g, 0);
4970
4970
  let D = s.checkedLineWidth, B = s.checkedLineColor, q = 10 * Math.PI / 180, S = 20 * Math.PI / 180, Q = Math.sqrt(
4971
- Math.pow(z - p, 2) + Math.pow(g - v, 2),
4971
+ Math.pow(z - p, 2) + Math.pow(g - f, 2),
4972
4972
  2
4973
- ), o2 = Math.min(D, Q / 3) / 2 / Math.sin(q), f2 = o2 * 1.2, g2 = z - p, _2 = g - v, i = Math.atan2(_2, g2);
4974
- f = () => {
4975
- s.ctx.beginPath(), s.ctx.beginPath(), s.ctx.moveTo(p, v), s.ctx.lineTo(
4973
+ ), o2 = Math.min(D, Q / 3) / 2 / Math.sin(q), f2 = o2 * 1.2, g2 = z - p, _2 = g - f, i = Math.atan2(_2, g2);
4974
+ b = () => {
4975
+ s.ctx.beginPath(), s.ctx.beginPath(), s.ctx.moveTo(p, f), s.ctx.lineTo(
4976
4976
  z - o2 * Math.cos(i - q),
4977
4977
  g - o2 * Math.sin(i - q)
4978
4978
  ), s.ctx.lineTo(
@@ -4984,14 +4984,14 @@ class Kt extends de {
4984
4984
  ), s.ctx.lineTo(
4985
4985
  z - o2 * Math.cos(i + q),
4986
4986
  g - o2 * Math.sin(i + q)
4987
- ), s.ctx.lineTo(p, v), s.ctx.closePath(), s.ctx.fillStyle = B, s.ctx.fill();
4988
- }, f();
4987
+ ), s.ctx.lineTo(p, f), s.ctx.closePath(), s.ctx.fillStyle = B, s.ctx.fill();
4988
+ }, b();
4989
4989
  }
4990
4990
  function L(R) {
4991
4991
  if (_ || R === !0) {
4992
4992
  if (document.removeEventListener("mousemove", x), !T && R !== !0)
4993
4993
  return;
4994
- f && R !== !0 && s.saveHistory(), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", L), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", R !== !0 && s.drawArrow();
4994
+ b && R !== !0 && s.saveHistory(), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", L), s.canvas.onmousedown = null, s.canvas.style.cursor = "default", R !== !0 && s.drawArrow();
4995
4995
  }
4996
4996
  }
4997
4997
  return this.canvas.onmousedown = function() {
@@ -5028,8 +5028,8 @@ class $t extends de {
5028
5028
  this.bodyOriginStyle = {
5029
5029
  overflow: p.overflow,
5030
5030
  userSelect: p.userSelect
5031
- }, this.initializeFinished = !1, document.body.style.userSelect = "none", document.body.style.overflow = "hidden", this.screenshot().then((v) => {
5032
- let z = v.toDataURL("image/png"), g = new Image();
5031
+ }, this.initializeFinished = !1, document.body.style.userSelect = "none", document.body.style.overflow = "hidden", this.screenshot().then((f) => {
5032
+ let z = f.toDataURL("image/png"), g = new Image();
5033
5033
  g.src = z, g.onload = () => {
5034
5034
  this.webRTCStream && (this.region.screenshot = g, this.region.on("regionDragStart", (T) => {
5035
5035
  this.tools.updateHandleDisplay("none");
@@ -5047,34 +5047,34 @@ class $t extends de {
5047
5047
  }, g.onerror = (T) => {
5048
5048
  this.triggerEvent(this.errorCreatedCallback, T);
5049
5049
  };
5050
- }).catch((v) => {
5051
- this.triggerEvent(this.errorCreatedCallback, v);
5050
+ }).catch((f) => {
5051
+ this.triggerEvent(this.errorCreatedCallback, f);
5052
5052
  });
5053
5053
  }
5054
5054
  screenshot() {
5055
5055
  return new Promise((s, p) => {
5056
- let v = document.createElement("div");
5057
- v.style.cssText = `position: fixed;top: 0;left: 0;width: ${innerWidth}px;height: ${innerHeight}px;z-index: 9999;cursor: none;`, navigator.mediaDevices.getDisplayMedia({
5056
+ let f = document.createElement("div");
5057
+ f.style.cssText = `position: fixed;top: 0;left: 0;width: ${innerWidth}px;height: ${innerHeight}px;z-index: 9999;cursor: none;`, navigator.mediaDevices.getDisplayMedia({
5058
5058
  video: {
5059
5059
  // frameRate: 1,
5060
5060
  },
5061
5061
  preferCurrentTab: 1,
5062
5062
  audio: !1
5063
5063
  }).then((z) => {
5064
- document.body.appendChild(v);
5064
+ document.body.appendChild(f);
5065
5065
  let g = document.createElement("video");
5066
5066
  g.setAttribute("autoplay", "autoplay"), g.srcObject = z, this.webRTCStream = z;
5067
5067
  let T = null;
5068
5068
  g.onplay = function() {
5069
5069
  T = setTimeout(function() {
5070
- v.remove();
5071
- let f = document.createElement("canvas");
5072
- f.width = innerWidth, f.height = innerHeight, f.getContext("2d").drawImage(g, 0, 0, innerWidth, innerHeight), s(f);
5070
+ f.remove();
5071
+ let b = document.createElement("canvas");
5072
+ b.width = innerWidth, b.height = innerHeight, b.getContext("2d").drawImage(g, 0, 0, innerWidth, innerHeight), s(b);
5073
5073
  }, 500);
5074
5074
  };
5075
5075
  let _ = this;
5076
5076
  z.getTracks()[0].onended = function() {
5077
- v.remove(), _.initializeFinished ? _.triggerEvent(_.closedCallback) : (clearTimeout(T), _.triggerEvent(_.errorCreatedCallback)), _.close();
5077
+ f.remove(), _.initializeFinished ? _.triggerEvent(_.closedCallback) : (clearTimeout(T), _.triggerEvent(_.errorCreatedCallback)), _.close();
5078
5078
  };
5079
5079
  }).catch((z) => {
5080
5080
  this.close(), p(z);
@@ -5104,8 +5104,8 @@ const Ye = `
5104
5104
  if (!document.head.querySelector(`style#${v2}`)) {
5105
5105
  const s = new CSSStyleSheet();
5106
5106
  s.replaceSync(Ge);
5107
- const p = Array.from(s.cssRules).filter((z) => z.cssText.includes(":root")).map((z) => z.cssText).join(" "), v = document.createElement("style");
5108
- v.setAttribute("id", v2), v.innerHTML = `
5107
+ const p = Array.from(s.cssRules).filter((z) => z.cssText.includes(":root")).map((z) => z.cssText).join(" "), f = document.createElement("style");
5108
+ f.setAttribute("id", v2), f.innerHTML = `
5109
5109
  @import url("https://eox.at/fonts/inter/inter.css");
5110
5110
 
5111
5111
  @font-face {
@@ -5133,7 +5133,7 @@ const Ye = `
5133
5133
  letter-spacing: .0313rem;
5134
5134
  }
5135
5135
  ${p}
5136
- `, document.head.appendChild(v);
5136
+ `, document.head.appendChild(f);
5137
5137
  }
5138
5138
  };
5139
5139
  Qe();
@@ -5146,14 +5146,20 @@ class er extends HTMLElement {
5146
5146
  constructor() {
5147
5147
  super(), this.attachShadow({ mode: "open" }), this.modal = null, this.position = "top-right", this._schema = null;
5148
5148
  }
5149
+ /**
5150
+ * @returns {import("@eox/jsonform").JsonSchema|null}
5151
+ */
5149
5152
  get schema() {
5150
5153
  return this._schema;
5151
5154
  }
5155
+ /**
5156
+ * @param {import("@eox/jsonform").JsonSchema|null} newSchema
5157
+ */
5152
5158
  set schema(s) {
5153
5159
  this._schema = s, this.modal && (this.modal.schema = this._schema);
5154
5160
  }
5155
- attributeChangedCallback(s, p, v) {
5156
- v !== p && s === "position" && v !== this.position && (this.position = v, this.render());
5161
+ attributeChangedCallback(s, p, f) {
5162
+ f !== p && s === "position" && f !== this.position && (this.position = f, this.render());
5157
5163
  }
5158
5164
  connectedCallback() {
5159
5165
  this.render(), this.shadowRoot.querySelector("button").addEventListener("click", () => this.onButtonClick());
@@ -5194,49 +5200,65 @@ customElements.define("eox-feedback-button", er);
5194
5200
  class tr extends HTMLElement {
5195
5201
  static observedAttributes = ["endpoint", "unstyled"];
5196
5202
  constructor() {
5197
- super(), this.attachShadow({ mode: "open" }), this.includeScreenshot = null, this.areaSelection = null, this.regionScreenshot = null, this.screenShotFile = null, this.endpoint = null, this._schema = null, this._submitted = !1;
5203
+ super(), this.attachShadow({ mode: "open" }), this.includeScreenshot = null, this.areaSelection = null, this.regionScreenshot = null, this.screenShotFile = null, this._endpoint = null, this._schema = null, this._submitted = !1;
5198
5204
  }
5205
+ /**
5206
+ * @returns {string}
5207
+ */
5208
+ get endpoint() {
5209
+ return this._endpoint;
5210
+ }
5211
+ /**
5212
+ * @param {string} val
5213
+ */
5214
+ set endpoint(s) {
5215
+ this._endpoint = s, s && this.getAttribute("endpoint") !== s && this.setAttribute("endpoint", s), this.render();
5216
+ }
5217
+ /**
5218
+ * @returns {import("@eox/jsonform").JsonSchema|null}
5219
+ */
5199
5220
  get schema() {
5200
5221
  return this._schema;
5201
5222
  }
5223
+ /**
5224
+ * @param {import("@eox/jsonform").JsonSchema|null} newSchema
5225
+ */
5202
5226
  set schema(s) {
5203
5227
  this._schema = s, this.render();
5204
5228
  }
5205
- /**
5206
- * @returns {import("@eox/jsonform").EOxJSONForm}
5207
- */
5208
- get jsonForm() {
5209
- return this.shadowRoot.querySelector("eox-jsonform");
5229
+ attributeChangedCallback(s, p, f) {
5230
+ p !== f && (s === "endpoint" && this.endpoint !== f ? this.endpoint = f : s === "unstyled" && this.render());
5210
5231
  }
5211
5232
  connectedCallback() {
5212
- this.endpoint = this.getAttribute("endpoint") || document.querySelector("eox-feedback-button")?.getAttribute("endpoint"), this.render(), this.shadowRoot.querySelector("input[type=checkbox]").addEventListener("click", (v) => this.onToggleScreenshot(v)), this.shadowRoot.querySelector("button#submit").addEventListener("click", () => this.onSubmit()), this.shadowRoot.querySelector("button#cancel").addEventListener("click", () => this.onCancel());
5233
+ this.endpoint = this.endpoint || this.getAttribute("endpoint") || document.querySelector("eox-feedback-button")?.getAttribute("endpoint"), this.render(), this.shadowRoot.querySelector("input[type=checkbox]").addEventListener("click", (f) => this.onToggleScreenshot(f)), this.shadowRoot.querySelector("button#submit").addEventListener("click", () => this.onSubmit()), this.shadowRoot.querySelector("button#cancel").addEventListener("click", () => this.onCancel());
5213
5234
  const s = this.shadowRoot.querySelector("eox-jsonform");
5214
5235
  s && s.addEventListener("change", () => this.onJsonFormChange());
5215
5236
  const p = this.shadowRoot.querySelector("textarea#message");
5216
- p && p.addEventListener("input", () => this.onTextareaInput()), document.addEventListener("keyup", (v) => this.onKeyboardInput(v));
5237
+ p && p.addEventListener("input", () => this.onTextareaInput()), document.addEventListener("keyup", (f) => this.onKeyboardInput(f));
5217
5238
  }
5218
5239
  disconnectedCallback() {
5219
- this.shadowRoot.querySelector("input[type=checkbox]").removeEventListener("click", (v) => this.onToggleScreenshot(v)), this.shadowRoot.querySelector("button#submit").removeEventListener("click", () => this.onSubmit()), this.shadowRoot.querySelector("button#cancel").removeEventListener("click", () => this.onCancel());
5240
+ this.shadowRoot.querySelector("input[type=checkbox]").removeEventListener("click", (f) => this.onToggleScreenshot(f)), this.shadowRoot.querySelector("button#submit").removeEventListener("click", () => this.onSubmit()), this.shadowRoot.querySelector("button#cancel").removeEventListener("click", () => this.onCancel());
5220
5241
  const s = this.shadowRoot.querySelector("eox-jsonform");
5221
5242
  s && s.removeEventListener("change", () => this.onJsonFormChange());
5222
5243
  const p = this.shadowRoot.querySelector("textarea#message");
5223
- p && p.removeEventListener("input", () => this.onTextareaInput()), document.removeEventListener("keyup", (v) => this.onKeyboardInput(v));
5244
+ p && p.removeEventListener("input", () => this.onTextareaInput()), document.removeEventListener("keyup", (f) => this.onKeyboardInput(f));
5224
5245
  }
5246
+ /** @private */
5225
5247
  onKeyboardInput(s) {
5226
5248
  s.keyCode === 27 && this.onCancel(), s.key === "Enter" && (s.metaKey || s.ctrlKey) && (this.shadowRoot.querySelector("button#submit").classList.contains("disabled") || this.onSubmit());
5227
5249
  }
5250
+ /** @private */
5228
5251
  onTextareaInput() {
5229
5252
  const s = this.shadowRoot.querySelector("button#submit");
5230
5253
  /** @type {HTMLTextAreaElement} */
5231
5254
  this.shadowRoot.querySelector("textarea#message").value.length >= 10 ? s.classList.remove("disabled") : s.classList.add("disabled");
5232
5255
  }
5233
- onOverlayDraw(s) {
5234
- this.areaSelection = s.detail;
5235
- }
5256
+ /** @private */
5236
5257
  onJsonFormChange() {
5237
5258
  const s = this.shadowRoot.querySelector("eox-jsonform"), p = this.shadowRoot.querySelector("button#submit");
5238
5259
  s.editor && (s.editor.validate().length === 0 ? p.classList.remove("disabled") : p.classList.add("disabled"));
5239
5260
  }
5261
+ /** @private */
5240
5262
  async onToggleScreenshot(s) {
5241
5263
  this.includeScreenshot = s.target.checked, this.shadowRoot.querySelector("#screenshot-info").classList.toggle("hidden");
5242
5264
  const p = this.shadowRoot.querySelector("#screenshot > img");
@@ -5244,30 +5266,31 @@ class tr extends HTMLElement {
5244
5266
  this.regionScreenshot.close(), p && p.remove();
5245
5267
  return;
5246
5268
  }
5247
- const v = this.shadowRoot.querySelector("button#submit");
5248
- v.classList.add("disabled"), this.regionScreenshot = new $t(), ["closed", "errorCreated", "screenshotDownload"].forEach((z) => {
5269
+ const f = this.shadowRoot.querySelector("button#submit");
5270
+ f.classList.add("disabled"), this.regionScreenshot = new $t(), ["closed", "errorCreated", "screenshotDownload"].forEach((z) => {
5249
5271
  this.regionScreenshot.on(z, () => {
5250
5272
  const g = this.shadowRoot.querySelector("input[type=checkbox]");
5251
5273
  if (!(g instanceof HTMLInputElement)) return;
5252
5274
  g.checked = !1, this.includeScreenshot = !1;
5253
5275
  const T = this.shadowRoot.querySelector("eox-jsonform"), _ = this.shadowRoot.querySelector("textarea#message");
5254
5276
  (T || _ && /** @type {HTMLTextAreaElement} */
5255
- _.value.length >= 10) && v.classList.remove("disabled");
5277
+ _.value.length >= 10) && f.classList.remove("disabled");
5256
5278
  });
5257
5279
  }), this.regionScreenshot.on("screenshotGenerated", (z) => {
5258
5280
  const g = document.createElement("img");
5259
5281
  g.src = z, g.classList.add("border"), this.shadowRoot.querySelector("#screenshot").appendChild(g);
5260
- function T(_, f) {
5282
+ function T(_, b) {
5261
5283
  for (var x = _.split(","), L = x[0].match(/:(.*?);/)[1], R = atob(x[x.length - 1]), X = R.length, I = new Uint8Array(X); X--; )
5262
5284
  I[X] = R.charCodeAt(X);
5263
- return new File([I], f, { type: L });
5285
+ return new File([I], b, { type: L });
5264
5286
  }
5265
- this.screenShotFile = T(z, "screenshot.png"), v.classList.remove("disabled");
5287
+ this.screenShotFile = T(z, "screenshot.png"), f.classList.remove("disabled");
5266
5288
  });
5267
5289
  }
5290
+ /** @private */
5268
5291
  async onSubmit() {
5269
- const s = this.shadowRoot.querySelector("article > div"), p = this.shadowRoot.querySelector("#form"), v = this.shadowRoot.querySelector("progress");
5270
- s.classList.add("disabled"), v.classList.remove("hidden");
5292
+ const s = this.shadowRoot.querySelector("article > div"), p = this.shadowRoot.querySelector("#form"), f = this.shadowRoot.querySelector("progress");
5293
+ s.classList.add("disabled"), f.classList.remove("hidden");
5271
5294
  const z = new FormData();
5272
5295
  this.includeScreenshot && z.append("file", this.screenShotFile);
5273
5296
  const g = this.shadowRoot.querySelector("eox-jsonform"), T = this.shadowRoot.querySelector("textarea#message");
@@ -5283,9 +5306,9 @@ class tr extends HTMLElement {
5283
5306
  return;
5284
5307
  }
5285
5308
  }
5286
- const f = g.value;
5287
- Object.keys(f).forEach((x) => {
5288
- z.append(x, f[x]);
5309
+ const b = g.value;
5310
+ Object.keys(b).forEach((x) => {
5311
+ z.append(x, b[x]);
5289
5312
  });
5290
5313
  } else T && z.append(
5291
5314
  "message",
@@ -5307,17 +5330,19 @@ class tr extends HTMLElement {
5307
5330
  <p class="red-text middle-align center-align">Oh no - something went wrong! Apologies, we'll try to find out what happened.</p>
5308
5331
  `;
5309
5332
  }
5310
- this.dispatchEvent(new CustomEvent("submit", { detail: z })), p.classList.add("hidden"), s.appendChild(_), s.classList.remove("disabled"), v.classList.add("hidden"), setTimeout(() => {
5333
+ this.dispatchEvent(new CustomEvent("submit", { detail: z })), p.classList.add("hidden"), s.appendChild(_), s.classList.remove("disabled"), f.classList.add("hidden"), setTimeout(() => {
5311
5334
  this.onCancel();
5312
5335
  }, 4e3);
5313
5336
  }
5337
+ /** @private */
5314
5338
  onCancel() {
5315
5339
  this.regionScreenshot && this.regionScreenshot.close(), this.remove(), this.dispatchEvent(new Event("close"));
5316
5340
  }
5341
+ /** @private */
5317
5342
  render() {
5318
- const s = document.querySelector("eox-feedback-button"), p = !!this.schema, v = !!customElements.get("eox-jsonform");
5343
+ const s = document.querySelector("eox-feedback-button"), p = !!this.schema, f = !!customElements.get("eox-jsonform");
5319
5344
  let z = "";
5320
- if (p ? v ? z = "<eox-jsonform></eox-jsonform>" : (console.error(
5345
+ if (p ? f ? z = "<eox-jsonform></eox-jsonform>" : (console.error(
5321
5346
  "eox-feedback: Schema provided but eox-jsonform not registered. Please import @eox/jsonform."
5322
5347
  ), z = '<p style="color: red; padding: 1rem;">Error: Schema provided but eox-jsonform not available.</p>') : z = `
5323
5348
  <div class="field textarea border">
@@ -5377,12 +5402,12 @@ class tr extends HTMLElement {
5377
5402
  <progress class="circle small hidden"></progress>
5378
5403
  <div class="max"></div>
5379
5404
  <button id="cancel" class="border">Cancel</button>
5380
- <button id="submit" class="${p && v ? "" : "disabled"}">Submit</button>
5405
+ <button id="submit" class="${p && f ? "" : "disabled"}">Submit</button>
5381
5406
  </nav>
5382
5407
  </div>
5383
5408
  </div>
5384
5409
  </article>
5385
- `, p && v) {
5410
+ `, p && f) {
5386
5411
  const g = this.shadowRoot.querySelector("eox-jsonform");
5387
5412
  g.schema = this.schema;
5388
5413
  }