viewgate-wrapper 1.10.13 → 1.10.14

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.
@@ -1,50 +1,50 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled,.vg-button-ghost:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(.4);transform:none!important;box-shadow:none!important;pointer-events:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:12px 16px;border-radius:12px;background:#fff;color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .2s ease;border:1px solid #e2e8f0}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-animate-spin{animation:vg-spin .8s linear infinite}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import Tt, { useRef as ge, useState as j, useEffect as Z, forwardRef as mt, createElement as Ie, createContext as Vt, useContext as Pt, useCallback as Ee } from "react";
3
- import { createPortal as At } from "react-dom";
4
- var Se = { exports: {} }, fe = {};
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled,.vg-button-ghost:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(.4);transform:none!important;box-shadow:none!important;pointer-events:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:16px;border-radius:16px;background:#ffffffe6;backdrop-filter:blur(12px) saturate(160%);-webkit-backdrop-filter:blur(12px) saturate(160%);color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .3s cubic-bezier(.19,1,.22,1);border:1px solid rgba(255,255,255,.5);z-index:1000}.vg-tooltip-scroll{scrollbar-width:thin;scrollbar-color:rgba(99,102,241,.2) transparent}.vg-tooltip-scroll::-webkit-scrollbar{width:4px}.vg-tooltip-scroll::-webkit-scrollbar-track{background:transparent}.vg-tooltip-scroll::-webkit-scrollbar-thumb{background:#6366f14d;border-radius:10px}.vg-pin-badge{position:absolute;top:-8px;right:-8px;background:#f43f5e;color:#fff;font-size:10px;font-weight:800;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:2px solid white;box-shadow:0 4px 12px #f43f5e66;z-index:2}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-animate-spin{animation:vg-spin .8s linear infinite}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import Vt, { useRef as xe, useState as k, useEffect as Z, forwardRef as mt, createElement as Ie, createContext as _t, useContext as At, useCallback as Se } from "react";
3
+ import { createPortal as Pt } from "react-dom";
4
+ var Ee = { exports: {} }, he = {};
5
5
  var Xe;
6
- function $t() {
7
- if (Xe) return fe;
6
+ function Gt() {
7
+ if (Xe) return he;
8
8
  Xe = 1;
9
9
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
10
- function r(n, a, s) {
10
+ function r(n, s, a) {
11
11
  var i = null;
12
- if (s !== void 0 && (i = "" + s), a.key !== void 0 && (i = "" + a.key), "key" in a) {
13
- s = {};
14
- for (var c in a)
15
- c !== "key" && (s[c] = a[c]);
16
- } else s = a;
17
- return a = s.ref, {
12
+ if (a !== void 0 && (i = "" + a), s.key !== void 0 && (i = "" + s.key), "key" in s) {
13
+ a = {};
14
+ for (var c in s)
15
+ c !== "key" && (a[c] = s[c]);
16
+ } else a = s;
17
+ return s = a.ref, {
18
18
  $$typeof: e,
19
19
  type: n,
20
20
  key: i,
21
- ref: a !== void 0 ? a : null,
22
- props: s
21
+ ref: s !== void 0 ? s : null,
22
+ props: a
23
23
  };
24
24
  }
25
- return fe.Fragment = t, fe.jsx = r, fe.jsxs = r, fe;
25
+ return he.Fragment = t, he.jsx = r, he.jsxs = r, he;
26
26
  }
27
- var he = {};
27
+ var ge = {};
28
28
  var Je;
29
- function Gt() {
29
+ function $t() {
30
30
  return Je || (Je = 1, process.env.NODE_ENV !== "production" && (function() {
31
31
  function e(l) {
32
32
  if (l == null) return null;
33
33
  if (typeof l == "function")
34
- return l.$$typeof === ce ? null : l.displayName || l.name || null;
34
+ return l.$$typeof === de ? null : l.displayName || l.name || null;
35
35
  if (typeof l == "string") return l;
36
36
  switch (l) {
37
- case P:
37
+ case A:
38
38
  return "Fragment";
39
- case D:
39
+ case H:
40
40
  return "Profiler";
41
- case z:
41
+ case F:
42
42
  return "StrictMode";
43
- case W:
43
+ case X:
44
44
  return "Suspense";
45
- case $:
45
+ case G:
46
46
  return "SuspenseList";
47
- case Be:
47
+ case Ue:
48
48
  return "Activity";
49
49
  }
50
50
  if (typeof l == "object")
@@ -53,19 +53,19 @@ function Gt() {
53
53
  ), l.$$typeof) {
54
54
  case T:
55
55
  return "Portal";
56
- case F:
56
+ case W:
57
57
  return l.displayName || "Context";
58
- case A:
58
+ case P:
59
59
  return (l._context.displayName || "Context") + ".Consumer";
60
- case _:
61
- var y = l.render;
62
- return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
63
- case H:
64
- return y = l.displayName || null, y !== null ? y : e(l.type) || "Memo";
65
- case we:
66
- y = l._payload, l = l._init;
60
+ case V:
61
+ var x = l.render;
62
+ return l = l.displayName, l || (l = x.displayName || x.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
63
+ case B:
64
+ return x = l.displayName || null, x !== null ? x : e(l.type) || "Memo";
65
+ case ye:
66
+ x = l._payload, l = l._init;
67
67
  try {
68
- return e(l(y));
68
+ return e(l(x));
69
69
  } catch {
70
70
  }
71
71
  }
@@ -77,54 +77,54 @@ function Gt() {
77
77
  function r(l) {
78
78
  try {
79
79
  t(l);
80
- var y = !1;
80
+ var x = !1;
81
81
  } catch {
82
- y = !0;
82
+ x = !0;
83
83
  }
84
- if (y) {
85
- y = console;
86
- var b = y.error, k = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
87
- return b.call(
88
- y,
84
+ if (x) {
85
+ x = console;
86
+ var E = x.error, R = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
87
+ return E.call(
88
+ x,
89
89
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
- k
90
+ R
91
91
  ), t(l);
92
92
  }
93
93
  }
94
94
  function n(l) {
95
- if (l === P) return "<>";
96
- if (typeof l == "object" && l !== null && l.$$typeof === we)
95
+ if (l === A) return "<>";
96
+ if (typeof l == "object" && l !== null && l.$$typeof === ye)
97
97
  return "<...>";
98
98
  try {
99
- var y = e(l);
100
- return y ? "<" + y + ">" : "<...>";
99
+ var x = e(l);
100
+ return x ? "<" + x + ">" : "<...>";
101
101
  } catch {
102
102
  return "<...>";
103
103
  }
104
104
  }
105
- function a() {
106
- var l = te.A;
105
+ function s() {
106
+ var l = re.A;
107
107
  return l === null ? null : l.getOwner();
108
108
  }
109
- function s() {
109
+ function a() {
110
110
  return Error("react-stack-top-frame");
111
111
  }
112
112
  function i(l) {
113
- if (ve.call(l, "key")) {
114
- var y = Object.getOwnPropertyDescriptor(l, "key").get;
115
- if (y && y.isReactWarning) return !1;
113
+ if (we.call(l, "key")) {
114
+ var x = Object.getOwnPropertyDescriptor(l, "key").get;
115
+ if (x && x.isReactWarning) return !1;
116
116
  }
117
117
  return l.key !== void 0;
118
118
  }
119
- function c(l, y) {
120
- function b() {
121
- re || (re = !0, console.error(
119
+ function c(l, x) {
120
+ function E() {
121
+ ne || (ne = !0, console.error(
122
122
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
123
- y
123
+ x
124
124
  ));
125
125
  }
126
- b.isReactWarning = !0, Object.defineProperty(l, "key", {
127
- get: b,
126
+ E.isReactWarning = !0, Object.defineProperty(l, "key", {
127
+ get: E,
128
128
  configurable: !0
129
129
  });
130
130
  }
@@ -134,15 +134,15 @@ function Gt() {
134
134
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
135
135
  )), l = this.props.ref, l !== void 0 ? l : null;
136
136
  }
137
- function u(l, y, b, k, ne, q) {
138
- var O = b.ref;
137
+ function u(l, x, E, R, $, Y) {
138
+ var j = E.ref;
139
139
  return l = {
140
- $$typeof: w,
140
+ $$typeof: b,
141
141
  type: l,
142
- key: y,
143
- props: b,
144
- _owner: k
145
- }, (O !== void 0 ? O : null) !== null ? Object.defineProperty(l, "ref", {
142
+ key: x,
143
+ props: E,
144
+ _owner: R
145
+ }, (j !== void 0 ? j : null) !== null ? Object.defineProperty(l, "ref", {
146
146
  enumerable: !1,
147
147
  get: p
148
148
  }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
@@ -159,69 +159,69 @@ function Gt() {
159
159
  configurable: !1,
160
160
  enumerable: !1,
161
161
  writable: !0,
162
- value: ne
162
+ value: $
163
163
  }), Object.defineProperty(l, "_debugTask", {
164
164
  configurable: !1,
165
165
  enumerable: !1,
166
166
  writable: !0,
167
- value: q
167
+ value: Y
168
168
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
169
169
  }
170
- function v(l, y, b, k, ne, q) {
171
- var O = y.children;
172
- if (O !== void 0)
173
- if (k)
174
- if (be(O)) {
175
- for (k = 0; k < O.length; k++)
176
- m(O[k]);
177
- Object.freeze && Object.freeze(O);
170
+ function S(l, x, E, R, $, Y) {
171
+ var j = x.children;
172
+ if (j !== void 0)
173
+ if (R)
174
+ if (ve(j)) {
175
+ for (R = 0; R < j.length; R++)
176
+ m(j[R]);
177
+ Object.freeze && Object.freeze(j);
178
178
  } else
179
179
  console.error(
180
180
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
181
181
  );
182
- else m(O);
183
- if (ve.call(y, "key")) {
184
- O = e(l);
185
- var V = Object.keys(y).filter(function(_e) {
186
- return _e !== "key";
182
+ else m(j);
183
+ if (we.call(x, "key")) {
184
+ j = e(l);
185
+ var z = Object.keys(x).filter(function(U) {
186
+ return U !== "key";
187
187
  });
188
- k = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Ce[O + k] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ R = 0 < z.length ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}", be[j + R] || (z = 0 < z.length ? "{" + z.join(": ..., ") + ": ...}" : "{}", console.error(
189
189
  `A props object containing a "key" prop is being spread into JSX:
190
190
  let props = %s;
191
191
  <%s {...props} />
192
192
  React keys must be passed directly to JSX without using spread:
193
193
  let props = %s;
194
194
  <%s key={someKey} {...props} />`,
195
- k,
196
- O,
197
- V,
198
- O
199
- ), Ce[O + k] = !0);
195
+ R,
196
+ j,
197
+ z,
198
+ j
199
+ ), be[j + R] = !0);
200
200
  }
201
- if (O = null, b !== void 0 && (r(b), O = "" + b), i(y) && (r(y.key), O = "" + y.key), "key" in y) {
202
- b = {};
203
- for (var de in y)
204
- de !== "key" && (b[de] = y[de]);
205
- } else b = y;
206
- return O && c(
207
- b,
201
+ if (j = null, E !== void 0 && (r(E), j = "" + E), i(x) && (r(x.key), j = "" + x.key), "key" in x) {
202
+ E = {};
203
+ for (var ae in x)
204
+ ae !== "key" && (E[ae] = x[ae]);
205
+ } else E = x;
206
+ return j && c(
207
+ E,
208
208
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
209
209
  ), u(
210
210
  l,
211
- O,
212
- b,
213
- a(),
214
- ne,
215
- q
211
+ j,
212
+ E,
213
+ s(),
214
+ $,
215
+ Y
216
216
  );
217
217
  }
218
218
  function m(l) {
219
- x(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === we && (l._payload.status === "fulfilled" ? x(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
219
+ w(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === ye && (l._payload.status === "fulfilled" ? w(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
220
220
  }
221
- function x(l) {
222
- return typeof l == "object" && l !== null && l.$$typeof === w;
221
+ function w(l) {
222
+ return typeof l == "object" && l !== null && l.$$typeof === b;
223
223
  }
224
- var f = Tt, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), P = /* @__PURE__ */ Symbol.for("react.fragment"), z = /* @__PURE__ */ Symbol.for("react.strict_mode"), D = /* @__PURE__ */ Symbol.for("react.profiler"), A = /* @__PURE__ */ Symbol.for("react.consumer"), F = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), W = /* @__PURE__ */ Symbol.for("react.suspense"), $ = /* @__PURE__ */ Symbol.for("react.suspense_list"), H = /* @__PURE__ */ Symbol.for("react.memo"), we = /* @__PURE__ */ Symbol.for("react.lazy"), Be = /* @__PURE__ */ Symbol.for("react.activity"), ce = /* @__PURE__ */ Symbol.for("react.client.reference"), te = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ve = Object.prototype.hasOwnProperty, be = Array.isArray, B = console.createTask ? console.createTask : function() {
224
+ var f = Vt, b = /* @__PURE__ */ Symbol.for("react.transitional.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), A = /* @__PURE__ */ Symbol.for("react.fragment"), F = /* @__PURE__ */ Symbol.for("react.strict_mode"), H = /* @__PURE__ */ Symbol.for("react.profiler"), P = /* @__PURE__ */ Symbol.for("react.consumer"), W = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__PURE__ */ Symbol.for("react.forward_ref"), X = /* @__PURE__ */ Symbol.for("react.suspense"), G = /* @__PURE__ */ Symbol.for("react.suspense_list"), B = /* @__PURE__ */ Symbol.for("react.memo"), ye = /* @__PURE__ */ Symbol.for("react.lazy"), Ue = /* @__PURE__ */ Symbol.for("react.activity"), de = /* @__PURE__ */ Symbol.for("react.client.reference"), re = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, we = Object.prototype.hasOwnProperty, ve = Array.isArray, q = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
227
  f = {
@@ -229,50 +229,50 @@ React keys must be passed directly to JSX without using spread:
229
229
  return l();
230
230
  }
231
231
  };
232
- var re, Q = {}, le = f.react_stack_bottom_frame.bind(
232
+ var ne, Q = {}, ue = f.react_stack_bottom_frame.bind(
233
233
  f,
234
- s
235
- )(), U = B(n(s)), Ce = {};
236
- he.Fragment = P, he.jsx = function(l, y, b) {
237
- var k = 1e4 > te.recentlyCreatedOwnerStacks++;
238
- return v(
234
+ a
235
+ )(), pe = q(n(a)), be = {};
236
+ ge.Fragment = A, ge.jsx = function(l, x, E) {
237
+ var R = 1e4 > re.recentlyCreatedOwnerStacks++;
238
+ return S(
239
239
  l,
240
- y,
241
- b,
240
+ x,
241
+ E,
242
242
  !1,
243
- k ? Error("react-stack-top-frame") : le,
244
- k ? B(n(l)) : U
243
+ R ? Error("react-stack-top-frame") : ue,
244
+ R ? q(n(l)) : pe
245
245
  );
246
- }, he.jsxs = function(l, y, b) {
247
- var k = 1e4 > te.recentlyCreatedOwnerStacks++;
248
- return v(
246
+ }, ge.jsxs = function(l, x, E) {
247
+ var R = 1e4 > re.recentlyCreatedOwnerStacks++;
248
+ return S(
249
249
  l,
250
- y,
251
- b,
250
+ x,
251
+ E,
252
252
  !0,
253
- k ? Error("react-stack-top-frame") : le,
254
- k ? B(n(l)) : U
253
+ R ? Error("react-stack-top-frame") : ue,
254
+ R ? q(n(l)) : pe
255
255
  );
256
256
  };
257
- })()), he;
257
+ })()), ge;
258
258
  }
259
259
  var Ze;
260
- function Lt() {
261
- return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? Se.exports = $t() : Se.exports = Gt()), Se.exports;
260
+ function Nt() {
261
+ return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? Ee.exports = Gt() : Ee.exports = $t()), Ee.exports;
262
262
  }
263
- var o = Lt();
264
- const Nt = ({ children: e }) => {
265
- const t = ge(null), [r, n] = j(null);
263
+ var o = Nt();
264
+ const Lt = ({ children: e }) => {
265
+ const t = xe(null), [r, n] = k(null);
266
266
  return Z(() => {
267
267
  if (t.current && !t.current.shadowRoot) {
268
- const a = t.current.attachShadow({ mode: "open" });
268
+ const s = t.current.attachShadow({ mode: "open" });
269
269
  document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((c) => {
270
- (c.textContent?.includes(".vg-") || c.textContent?.includes("--vg-")) && a.appendChild(c.cloneNode(!0));
270
+ (c.textContent?.includes(".vg-") || c.textContent?.includes("--vg-")) && s.appendChild(c.cloneNode(!0));
271
271
  });
272
272
  const i = document.createElement("link");
273
- i.rel = "stylesheet", i.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap", a.appendChild(i), n(a);
273
+ i.rel = "stylesheet", i.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap", s.appendChild(i), n(s);
274
274
  }
275
- }, []), /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && At(e, r) });
275
+ }, []), /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && Pt(e, r) });
276
276
  };
277
277
  const ft = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
278
278
  const Mt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
@@ -307,8 +307,8 @@ const Ft = mt(
307
307
  size: t = 24,
308
308
  strokeWidth: r = 2,
309
309
  absoluteStrokeWidth: n,
310
- className: a = "",
311
- children: s,
310
+ className: s = "",
311
+ children: a,
312
312
  iconNode: i,
313
313
  ...c
314
314
  }, p) => Ie(
@@ -320,27 +320,27 @@ const Ft = mt(
320
320
  height: t,
321
321
  stroke: e,
322
322
  strokeWidth: n ? Number(r) * 24 / Number(t) : r,
323
- className: ft("lucide", a),
324
- ...!s && !Dt(c) && { "aria-hidden": "true" },
323
+ className: ft("lucide", s),
324
+ ...!a && !Dt(c) && { "aria-hidden": "true" },
325
325
  ...c
326
326
  },
327
327
  [
328
- ...i.map(([u, v]) => Ie(u, v)),
329
- ...Array.isArray(s) ? s : [s]
328
+ ...i.map(([u, S]) => Ie(u, S)),
329
+ ...Array.isArray(a) ? a : [a]
330
330
  ]
331
331
  )
332
332
  );
333
- const N = (e, t) => {
333
+ const M = (e, t) => {
334
334
  const r = mt(
335
- ({ className: n, ...a }, s) => Ie(Ft, {
336
- ref: s,
335
+ ({ className: n, ...s }, a) => Ie(Ft, {
336
+ ref: a,
337
337
  iconNode: t,
338
338
  className: ft(
339
339
  `lucide-${Mt(Ke(e))}`,
340
340
  `lucide-${e}`,
341
341
  n
342
342
  ),
343
- ...a
343
+ ...s
344
344
  })
345
345
  );
346
346
  return r.displayName = Ke(e), r;
@@ -349,21 +349,21 @@ const Ht = [
349
349
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
350
350
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
351
351
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
352
- ], Wt = N("circle-alert", Ht);
353
- const Bt = [
352
+ ], Wt = M("circle-alert", Ht);
353
+ const Ut = [
354
354
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
355
355
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
356
- ], ie = N("circle-check", Bt);
357
- const Ut = [
356
+ ], ce = M("circle-check", Ut);
357
+ const Bt = [
358
358
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
359
359
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
360
- ], Qe = N("clock", Ut);
361
- const qt = [
360
+ ], qt = M("clock", Bt);
361
+ const Yt = [
362
362
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
363
363
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
364
364
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
365
- ], et = N("external-link", qt);
366
- const Yt = [
365
+ ], Qe = M("external-link", Yt);
366
+ const Xt = [
367
367
  [
368
368
  "path",
369
369
  {
@@ -372,17 +372,17 @@ const Yt = [
372
372
  }
373
373
  ],
374
374
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
375
- ], Xt = N("eye", Yt);
376
- const Jt = [
375
+ ], Jt = M("eye", Xt);
376
+ const Zt = [
377
377
  ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
378
378
  ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
379
379
  ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
380
380
  ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
381
381
  ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
382
382
  ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
383
- ], tt = N("grip-vertical", Jt);
384
- const Zt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Kt = N("loader-circle", Zt);
385
- const Qt = [
383
+ ], et = M("grip-vertical", Zt);
384
+ const Kt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Qt = M("loader-circle", Kt);
385
+ const er = [
386
386
  [
387
387
  "path",
388
388
  {
@@ -390,8 +390,8 @@ const Qt = [
390
390
  key: "18887p"
391
391
  }
392
392
  ]
393
- ], Ae = N("message-square", Qt);
394
- const er = [
393
+ ], ke = M("message-square", er);
394
+ const tr = [
395
395
  [
396
396
  "path",
397
397
  {
@@ -399,8 +399,8 @@ const er = [
399
399
  key: "edeuup"
400
400
  }
401
401
  ]
402
- ], tr = N("mouse-pointer-2", er);
403
- const rr = [
402
+ ], rr = M("mouse-pointer-2", tr);
403
+ const nr = [
404
404
  [
405
405
  "path",
406
406
  {
@@ -409,12 +409,12 @@ const rr = [
409
409
  }
410
410
  ],
411
411
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
412
- ], nr = N("pencil", rr);
412
+ ], ar = M("pencil", nr);
413
413
  const sr = [
414
414
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
415
415
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
416
- ], ar = N("rotate-ccw", sr);
417
- const or = [
416
+ ], or = M("rotate-ccw", sr);
417
+ const ir = [
418
418
  [
419
419
  "path",
420
420
  {
@@ -423,18 +423,18 @@ const or = [
423
423
  }
424
424
  ],
425
425
  ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
426
- ], ir = N("send", or);
427
- const cr = [
426
+ ], cr = M("send", ir);
427
+ const lr = [
428
428
  ["path", { d: "M10 11v6", key: "nco0om" }],
429
429
  ["path", { d: "M14 11v6", key: "outv1u" }],
430
430
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
431
431
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
432
432
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
433
- ], rt = N("trash-2", cr);
434
- const lr = [
433
+ ], tt = M("trash-2", lr);
434
+ const dr = [
435
435
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
436
436
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
437
- ], $e = N("x", lr), dr = {
437
+ ], Ge = M("x", dr), ur = {
438
438
  en: {
439
439
  enterMode: "Enter Feedback Mode",
440
440
  exitMode: "Exit Mode",
@@ -527,64 +527,64 @@ const lr = [
527
527
  exitConfirmTitle: "¿Cerrar ViewGate?",
528
528
  exitConfirmMessage: "¿Estás seguro de que deseas cerrar ViewGate? Puedes volver a activarlo en cualquier momento agregando ?viewgate=true a la URL."
529
529
  }
530
- }, ht = Vt(void 0), ur = () => {
531
- const e = Pt(ht);
530
+ }, ht = _t(void 0), pr = () => {
531
+ const e = At(ht);
532
532
  if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
533
533
  return e;
534
- }, ze = "viewgate_enabled", pr = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(ze, "true"), !0) : sessionStorage.getItem(ze) === "true", En = ({
534
+ }, ze = "viewgate_enabled", mr = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(ze, "true"), !0) : sessionStorage.getItem(ze) === "true", kn = ({
535
535
  children: e,
536
536
  language: t = "es",
537
537
  apiKey: r,
538
538
  baseUrl: n = "https://view-gate.vercel.app"
539
539
  }) => {
540
- const [a, s] = j(!1), [i, c] = j([]);
540
+ const [s, a] = k(!1), [i, c] = k([]);
541
541
  Z(() => {
542
- s(pr());
542
+ a(mr());
543
543
  }, []);
544
544
  const p = () => {
545
- if (sessionStorage.removeItem(ze), s(!1), typeof window < "u") {
545
+ if (sessionStorage.removeItem(ze), a(!1), typeof window < "u") {
546
546
  const m = new URL(window.location.href);
547
547
  m.searchParams.delete("viewgate"), window.history.replaceState({}, "", m.toString());
548
548
  }
549
- }, u = (m, x) => {
549
+ }, u = (m, w) => {
550
550
  const f = Date.now();
551
- c((w) => [...w, { id: f, message: m, type: x }]), setTimeout(() => {
552
- c((w) => w.filter((T) => T.id !== f));
551
+ c((b) => [...b, { id: f, message: m, type: w }]), setTimeout(() => {
552
+ c((b) => b.filter((T) => T.id !== f));
553
553
  }, 4e3);
554
- }, v = dr[t];
554
+ }, S = ur[t];
555
555
  return /* @__PURE__ */ o.jsxs(ht.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:248", value: {
556
556
  addToast: u,
557
557
  language: t,
558
- t: v,
558
+ t: S,
559
559
  apiKey: r,
560
560
  baseUrl: n,
561
561
  disableViewGate: p,
562
562
  hasActiveToasts: i.length > 0
563
563
  }, children: [
564
564
  e,
565
- a && /* @__PURE__ */ o.jsx(Nt, { "data-source-path": "/src/components/ViewGateProvider.tsx:259", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:260", className: "vg-container", children: [
565
+ s && /* @__PURE__ */ o.jsx(Lt, { "data-source-path": "/src/components/ViewGateProvider.tsx:259", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:260", className: "vg-container", children: [
566
566
  /* @__PURE__ */ o.jsx(vn, { "data-source-path": "/src/components/ViewGateProvider.tsx:261" }),
567
567
  /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:262", className: "vg-toasts", style: { zIndex: 2147483646 }, children: i.map((m) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:264", className: `vg-toast vg-animate-slide ${m.type}`, children: [
568
- m.type === "success" ? /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateProvider.tsx:266", size: 24, color: "#22c55e" }) : /* @__PURE__ */ o.jsx(Wt, { "data-source-path": "/src/components/ViewGateProvider.tsx:268", size: 24, color: "#ef4444" }),
568
+ m.type === "success" ? /* @__PURE__ */ o.jsx(ce, { "data-source-path": "/src/components/ViewGateProvider.tsx:266", size: 24, color: "#22c55e" }) : /* @__PURE__ */ o.jsx(Wt, { "data-source-path": "/src/components/ViewGateProvider.tsx:268", size: 24, color: "#ef4444" }),
569
569
  /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:270", children: [
570
- /* @__PURE__ */ o.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:271", style: { display: "block", fontSize: "13px", color: "#0f172a", textTransform: "uppercase", marginBottom: "2px" }, children: m.type === "success" ? v.successHeader : v.errorHeader }),
570
+ /* @__PURE__ */ o.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:271", style: { display: "block", fontSize: "13px", color: "#0f172a", textTransform: "uppercase", marginBottom: "2px" }, children: m.type === "success" ? S.successHeader : S.errorHeader }),
571
571
  /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:274", style: { fontSize: "14px", color: "#000000" }, children: m.message })
572
572
  ] })
573
573
  ] }, m.id)) })
574
574
  ] }) })
575
575
  ] });
576
576
  };
577
- function mr(e, t) {
577
+ function fr(e, t) {
578
578
  if (e.match(/^[a-z]+:\/\//i))
579
579
  return e;
580
580
  if (e.match(/^\/\//))
581
581
  return window.location.protocol + e;
582
582
  if (e.match(/^[a-z]+:/i))
583
583
  return e;
584
- const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), a = r.createElement("a");
585
- return r.head.appendChild(n), r.body.appendChild(a), t && (n.href = t), a.href = e, a.href;
584
+ const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), s = r.createElement("a");
585
+ return r.head.appendChild(n), r.body.appendChild(s), t && (n.href = t), s.href = e, s.href;
586
586
  }
587
- const fr = /* @__PURE__ */ (() => {
587
+ const hr = /* @__PURE__ */ (() => {
588
588
  let e = 0;
589
589
  const t = () => (
590
590
  // eslint-disable-next-line no-bitwise
@@ -598,24 +598,24 @@ function K(e) {
598
598
  t.push(e[r]);
599
599
  return t;
600
600
  }
601
- let ae = null;
601
+ let oe = null;
602
602
  function gt(e = {}) {
603
- return ae || (e.includeStyleProperties ? (ae = e.includeStyleProperties, ae) : (ae = K(window.getComputedStyle(document.documentElement)), ae));
603
+ return oe || (e.includeStyleProperties ? (oe = e.includeStyleProperties, oe) : (oe = K(window.getComputedStyle(document.documentElement)), oe));
604
604
  }
605
- function ke(e, t) {
605
+ function Re(e, t) {
606
606
  const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
607
607
  return n ? parseFloat(n.replace("px", "")) : 0;
608
608
  }
609
- function hr(e) {
610
- const t = ke(e, "border-left-width"), r = ke(e, "border-right-width");
609
+ function gr(e) {
610
+ const t = Re(e, "border-left-width"), r = Re(e, "border-right-width");
611
611
  return e.clientWidth + t + r;
612
612
  }
613
- function gr(e) {
614
- const t = ke(e, "border-top-width"), r = ke(e, "border-bottom-width");
613
+ function xr(e) {
614
+ const t = Re(e, "border-top-width"), r = Re(e, "border-bottom-width");
615
615
  return e.clientHeight + t + r;
616
616
  }
617
- function yt(e, t = {}) {
618
- const r = t.width || hr(e), n = t.height || gr(e);
617
+ function xt(e, t = {}) {
618
+ const r = t.width || gr(e), n = t.height || xr(e);
619
619
  return { width: r, height: n };
620
620
  }
621
621
  function yr() {
@@ -628,10 +628,10 @@ function yr() {
628
628
  return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
629
629
  }
630
630
  const I = 16384;
631
- function xr(e) {
631
+ function wr(e) {
632
632
  (e.width > I || e.height > I) && (e.width > I && e.height > I ? e.width > e.height ? (e.height *= I / e.width, e.width = I) : (e.width *= I / e.height, e.height = I) : e.width > I ? (e.height *= I / e.width, e.width = I) : (e.width *= I / e.height, e.height = I));
633
633
  }
634
- function Re(e) {
634
+ function je(e) {
635
635
  return new Promise((t, r) => {
636
636
  const n = new Image();
637
637
  n.onload = () => {
@@ -641,12 +641,12 @@ function Re(e) {
641
641
  }, n.onerror = r, n.crossOrigin = "anonymous", n.decoding = "async", n.src = e;
642
642
  });
643
643
  }
644
- async function wr(e) {
644
+ async function vr(e) {
645
645
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
646
646
  }
647
- async function vr(e, t, r) {
648
- const n = "http://www.w3.org/2000/svg", a = document.createElementNS(n, "svg"), s = document.createElementNS(n, "foreignObject");
649
- return a.setAttribute("width", `${t}`), a.setAttribute("height", `${r}`), a.setAttribute("viewBox", `0 0 ${t} ${r}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), a.appendChild(s), s.appendChild(e), wr(a);
647
+ async function br(e, t, r) {
648
+ const n = "http://www.w3.org/2000/svg", s = document.createElementNS(n, "svg"), a = document.createElementNS(n, "foreignObject");
649
+ return s.setAttribute("width", `${t}`), s.setAttribute("height", `${r}`), s.setAttribute("viewBox", `0 0 ${t} ${r}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), s.appendChild(a), a.appendChild(e), vr(s);
650
650
  }
651
651
  const L = (e, t) => {
652
652
  if (e instanceof t)
@@ -654,39 +654,39 @@ const L = (e, t) => {
654
654
  const r = Object.getPrototypeOf(e);
655
655
  return r === null ? !1 : r.constructor.name === t.name || L(r, t);
656
656
  };
657
- function br(e) {
657
+ function Cr(e) {
658
658
  const t = e.getPropertyValue("content");
659
659
  return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
660
660
  }
661
- function Cr(e, t) {
661
+ function Sr(e, t) {
662
662
  return gt(t).map((r) => {
663
- const n = e.getPropertyValue(r), a = e.getPropertyPriority(r);
664
- return `${r}: ${n}${a ? " !important" : ""};`;
663
+ const n = e.getPropertyValue(r), s = e.getPropertyPriority(r);
664
+ return `${r}: ${n}${s ? " !important" : ""};`;
665
665
  }).join(" ");
666
666
  }
667
667
  function Er(e, t, r, n) {
668
- const a = `.${e}:${t}`, s = r.cssText ? br(r) : Cr(r, n);
669
- return document.createTextNode(`${a}{${s}}`);
668
+ const s = `.${e}:${t}`, a = r.cssText ? Cr(r) : Sr(r, n);
669
+ return document.createTextNode(`${s}{${a}}`);
670
670
  }
671
- function nt(e, t, r, n) {
672
- const a = window.getComputedStyle(e, r), s = a.getPropertyValue("content");
673
- if (s === "" || s === "none")
671
+ function rt(e, t, r, n) {
672
+ const s = window.getComputedStyle(e, r), a = s.getPropertyValue("content");
673
+ if (a === "" || a === "none")
674
674
  return;
675
- const i = fr();
675
+ const i = hr();
676
676
  try {
677
677
  t.className = `${t.className} ${i}`;
678
678
  } catch {
679
679
  return;
680
680
  }
681
681
  const c = document.createElement("style");
682
- c.appendChild(Er(i, r, a, n)), t.appendChild(c);
682
+ c.appendChild(Er(i, r, s, n)), t.appendChild(c);
683
683
  }
684
- function Sr(e, t, r) {
685
- nt(e, t, ":before", r), nt(e, t, ":after", r);
684
+ function kr(e, t, r) {
685
+ rt(e, t, ":before", r), rt(e, t, ":after", r);
686
686
  }
687
- const st = "application/font-woff", at = "image/jpeg", kr = {
688
- woff: st,
689
- woff2: st,
687
+ const nt = "application/font-woff", at = "image/jpeg", Rr = {
688
+ woff: nt,
689
+ woff2: nt,
690
690
  ttf: "application/font-truetype",
691
691
  eot: "application/vnd.ms-fontobject",
692
692
  png: "image/png",
@@ -697,93 +697,93 @@ const st = "application/font-woff", at = "image/jpeg", kr = {
697
697
  svg: "image/svg+xml",
698
698
  webp: "image/webp"
699
699
  };
700
- function Rr(e) {
700
+ function jr(e) {
701
701
  const t = /\.([^./]*?)$/g.exec(e);
702
702
  return t ? t[1] : "";
703
703
  }
704
704
  function He(e) {
705
- const t = Rr(e).toLowerCase();
706
- return kr[t] || "";
705
+ const t = jr(e).toLowerCase();
706
+ return Rr[t] || "";
707
707
  }
708
- function jr(e) {
708
+ function Or(e) {
709
709
  return e.split(/,/)[1];
710
710
  }
711
711
  function De(e) {
712
712
  return e.search(/^(data:)/) !== -1;
713
713
  }
714
- function Or(e, t) {
714
+ function Tr(e, t) {
715
715
  return `data:${t};base64,${e}`;
716
716
  }
717
- async function xt(e, t, r) {
717
+ async function yt(e, t, r) {
718
718
  const n = await fetch(e, t);
719
719
  if (n.status === 404)
720
720
  throw new Error(`Resource "${n.url}" not found`);
721
- const a = await n.blob();
722
- return new Promise((s, i) => {
721
+ const s = await n.blob();
722
+ return new Promise((a, i) => {
723
723
  const c = new FileReader();
724
724
  c.onerror = i, c.onloadend = () => {
725
725
  try {
726
- s(r({ res: n, result: c.result }));
726
+ a(r({ res: n, result: c.result }));
727
727
  } catch (p) {
728
728
  i(p);
729
729
  }
730
- }, c.readAsDataURL(a);
730
+ }, c.readAsDataURL(s);
731
731
  });
732
732
  }
733
- const Ge = {};
734
- function _r(e, t, r) {
733
+ const $e = {};
734
+ function Vr(e, t, r) {
735
735
  let n = e.replace(/\?.*/, "");
736
736
  return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
737
737
  }
738
738
  async function We(e, t, r) {
739
- const n = _r(e, t, r.includeQueryParams);
740
- if (Ge[n] != null)
741
- return Ge[n];
739
+ const n = Vr(e, t, r.includeQueryParams);
740
+ if ($e[n] != null)
741
+ return $e[n];
742
742
  r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
743
- let a;
743
+ let s;
744
744
  try {
745
- const s = await xt(e, r.fetchRequestInit, ({ res: i, result: c }) => (t || (t = i.headers.get("Content-Type") || ""), jr(c)));
746
- a = Or(s, t);
747
- } catch (s) {
748
- a = r.imagePlaceholder || "";
745
+ const a = await yt(e, r.fetchRequestInit, ({ res: i, result: c }) => (t || (t = i.headers.get("Content-Type") || ""), Or(c)));
746
+ s = Tr(a, t);
747
+ } catch (a) {
748
+ s = r.imagePlaceholder || "";
749
749
  let i = `Failed to fetch resource: ${e}`;
750
- s && (i = typeof s == "string" ? s : s.message), i && console.warn(i);
750
+ a && (i = typeof a == "string" ? a : a.message), i && console.warn(i);
751
751
  }
752
- return Ge[n] = a, a;
752
+ return $e[n] = s, s;
753
753
  }
754
- async function Tr(e) {
754
+ async function _r(e) {
755
755
  const t = e.toDataURL();
756
- return t === "data:," ? e.cloneNode(!1) : Re(t);
756
+ return t === "data:," ? e.cloneNode(!1) : je(t);
757
757
  }
758
- async function Vr(e, t) {
758
+ async function Ar(e, t) {
759
759
  if (e.currentSrc) {
760
- const s = document.createElement("canvas"), i = s.getContext("2d");
761
- s.width = e.clientWidth, s.height = e.clientHeight, i?.drawImage(e, 0, 0, s.width, s.height);
762
- const c = s.toDataURL();
763
- return Re(c);
760
+ const a = document.createElement("canvas"), i = a.getContext("2d");
761
+ a.width = e.clientWidth, a.height = e.clientHeight, i?.drawImage(e, 0, 0, a.width, a.height);
762
+ const c = a.toDataURL();
763
+ return je(c);
764
764
  }
765
- const r = e.poster, n = He(r), a = await We(r, n, t);
766
- return Re(a);
765
+ const r = e.poster, n = He(r), s = await We(r, n, t);
766
+ return je(s);
767
767
  }
768
768
  async function Pr(e, t) {
769
769
  var r;
770
770
  try {
771
771
  if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
772
- return await je(e.contentDocument.body, t, !0);
772
+ return await Te(e.contentDocument.body, t, !0);
773
773
  } catch {
774
774
  }
775
775
  return e.cloneNode(!1);
776
776
  }
777
- async function Ar(e, t) {
778
- return L(e, HTMLCanvasElement) ? Tr(e) : L(e, HTMLVideoElement) ? Vr(e, t) : L(e, HTMLIFrameElement) ? Pr(e, t) : e.cloneNode(wt(e));
777
+ async function Gr(e, t) {
778
+ return L(e, HTMLCanvasElement) ? _r(e) : L(e, HTMLVideoElement) ? Ar(e, t) : L(e, HTMLIFrameElement) ? Pr(e, t) : e.cloneNode(wt(e));
779
779
  }
780
780
  const $r = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", wt = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
781
- async function Gr(e, t, r) {
782
- var n, a;
781
+ async function Nr(e, t, r) {
782
+ var n, s;
783
783
  if (wt(t))
784
784
  return t;
785
- let s = [];
786
- return $r(e) && e.assignedNodes ? s = K(e.assignedNodes()) : L(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = K(e.contentDocument.body.childNodes) : s = K(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || L(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => je(c, r)).then((p) => {
785
+ let a = [];
786
+ return $r(e) && e.assignedNodes ? a = K(e.assignedNodes()) : L(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? a = K(e.contentDocument.body.childNodes) : a = K(((s = e.shadowRoot) !== null && s !== void 0 ? s : e).childNodes), a.length === 0 || L(e, HTMLVideoElement) || await a.reduce((i, c) => i.then(() => Te(c, r)).then((p) => {
787
787
  p && t.appendChild(p);
788
788
  }), Promise.resolve()), t;
789
789
  }
@@ -791,76 +791,76 @@ function Lr(e, t, r) {
791
791
  const n = t.style;
792
792
  if (!n)
793
793
  return;
794
- const a = window.getComputedStyle(e);
795
- a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) : gt(r).forEach((s) => {
796
- let i = a.getPropertyValue(s);
797
- s === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), L(e, HTMLIFrameElement) && s === "display" && i === "inline" && (i = "block"), s === "d" && t.getAttribute("d") && (i = `path(${t.getAttribute("d")})`), n.setProperty(s, i, a.getPropertyPriority(s));
794
+ const s = window.getComputedStyle(e);
795
+ s.cssText ? (n.cssText = s.cssText, n.transformOrigin = s.transformOrigin) : gt(r).forEach((a) => {
796
+ let i = s.getPropertyValue(a);
797
+ a === "font-size" && i.endsWith("px") && (i = `${Math.floor(parseFloat(i.substring(0, i.length - 2))) - 0.1}px`), L(e, HTMLIFrameElement) && a === "display" && i === "inline" && (i = "block"), a === "d" && t.getAttribute("d") && (i = `path(${t.getAttribute("d")})`), n.setProperty(a, i, s.getPropertyPriority(a));
798
798
  });
799
799
  }
800
- function Nr(e, t) {
800
+ function Mr(e, t) {
801
801
  L(e, HTMLTextAreaElement) && (t.innerHTML = e.value), L(e, HTMLInputElement) && t.setAttribute("value", e.value);
802
802
  }
803
- function Mr(e, t) {
803
+ function Ir(e, t) {
804
804
  if (L(e, HTMLSelectElement)) {
805
- const n = Array.from(t.children).find((a) => e.value === a.getAttribute("value"));
805
+ const n = Array.from(t.children).find((s) => e.value === s.getAttribute("value"));
806
806
  n && n.setAttribute("selected", "");
807
807
  }
808
808
  }
809
- function Ir(e, t, r) {
810
- return L(t, Element) && (Lr(e, t, r), Sr(e, t, r), Nr(e, t), Mr(e, t)), t;
809
+ function zr(e, t, r) {
810
+ return L(t, Element) && (Lr(e, t, r), kr(e, t, r), Mr(e, t), Ir(e, t)), t;
811
811
  }
812
- async function zr(e, t) {
812
+ async function Dr(e, t) {
813
813
  const r = e.querySelectorAll ? e.querySelectorAll("use") : [];
814
814
  if (r.length === 0)
815
815
  return e;
816
816
  const n = {};
817
- for (let s = 0; s < r.length; s++) {
818
- const c = r[s].getAttribute("xlink:href");
817
+ for (let a = 0; a < r.length; a++) {
818
+ const c = r[a].getAttribute("xlink:href");
819
819
  if (c) {
820
820
  const p = e.querySelector(c), u = document.querySelector(c);
821
- !p && u && !n[c] && (n[c] = await je(u, t, !0));
821
+ !p && u && !n[c] && (n[c] = await Te(u, t, !0));
822
822
  }
823
823
  }
824
- const a = Object.values(n);
825
- if (a.length) {
826
- const s = "http://www.w3.org/1999/xhtml", i = document.createElementNS(s, "svg");
827
- i.setAttribute("xmlns", s), i.style.position = "absolute", i.style.width = "0", i.style.height = "0", i.style.overflow = "hidden", i.style.display = "none";
828
- const c = document.createElementNS(s, "defs");
824
+ const s = Object.values(n);
825
+ if (s.length) {
826
+ const a = "http://www.w3.org/1999/xhtml", i = document.createElementNS(a, "svg");
827
+ i.setAttribute("xmlns", a), i.style.position = "absolute", i.style.width = "0", i.style.height = "0", i.style.overflow = "hidden", i.style.display = "none";
828
+ const c = document.createElementNS(a, "defs");
829
829
  i.appendChild(c);
830
- for (let p = 0; p < a.length; p++)
831
- c.appendChild(a[p]);
830
+ for (let p = 0; p < s.length; p++)
831
+ c.appendChild(s[p]);
832
832
  e.appendChild(i);
833
833
  }
834
834
  return e;
835
835
  }
836
- async function je(e, t, r) {
837
- return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => Ar(n, t)).then((n) => Gr(e, n, t)).then((n) => Ir(e, n, t)).then((n) => zr(n, t));
836
+ async function Te(e, t, r) {
837
+ return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => Gr(n, t)).then((n) => Nr(e, n, t)).then((n) => zr(e, n, t)).then((n) => Dr(n, t));
838
838
  }
839
- const vt = /url\((['"]?)([^'"]+?)\1\)/g, Dr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Fr = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
840
- function Hr(e) {
839
+ const vt = /url\((['"]?)([^'"]+?)\1\)/g, Fr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Hr = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
840
+ function Wr(e) {
841
841
  const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
842
842
  return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
843
843
  }
844
- function Wr(e) {
844
+ function Ur(e) {
845
845
  const t = [];
846
- return e.replace(vt, (r, n, a) => (t.push(a), r)), t.filter((r) => !De(r));
846
+ return e.replace(vt, (r, n, s) => (t.push(s), r)), t.filter((r) => !De(r));
847
847
  }
848
- async function Br(e, t, r, n, a) {
848
+ async function Br(e, t, r, n, s) {
849
849
  try {
850
- const s = r ? mr(t, r) : t, i = He(t);
850
+ const a = r ? fr(t, r) : t, i = He(t);
851
851
  let c;
852
- return a || (c = await We(s, i, n)), e.replace(Hr(t), `$1${c}$3`);
852
+ return s || (c = await We(a, i, n)), e.replace(Wr(t), `$1${c}$3`);
853
853
  } catch {
854
854
  }
855
855
  return e;
856
856
  }
857
- function Ur(e, { preferredFontFormat: t }) {
858
- return t ? e.replace(Fr, (r) => {
857
+ function qr(e, { preferredFontFormat: t }) {
858
+ return t ? e.replace(Hr, (r) => {
859
859
  for (; ; ) {
860
- const [n, , a] = Dr.exec(r) || [];
861
- if (!a)
860
+ const [n, , s] = Fr.exec(r) || [];
861
+ if (!s)
862
862
  return "";
863
- if (a === t)
863
+ if (s === t)
864
864
  return `src: ${n};`;
865
865
  }
866
866
  }) : e;
@@ -871,197 +871,197 @@ function bt(e) {
871
871
  async function Ct(e, t, r) {
872
872
  if (!bt(e))
873
873
  return e;
874
- const n = Ur(e, r);
875
- return Wr(n).reduce((s, i) => s.then((c) => Br(c, i, t, r)), Promise.resolve(n));
874
+ const n = qr(e, r);
875
+ return Ur(n).reduce((a, i) => a.then((c) => Br(c, i, t, r)), Promise.resolve(n));
876
876
  }
877
- async function oe(e, t, r) {
877
+ async function ie(e, t, r) {
878
878
  var n;
879
- const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
880
- if (a) {
881
- const s = await Ct(a, null, r);
882
- return t.style.setProperty(e, s, t.style.getPropertyPriority(e)), !0;
879
+ const s = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
880
+ if (s) {
881
+ const a = await Ct(s, null, r);
882
+ return t.style.setProperty(e, a, t.style.getPropertyPriority(e)), !0;
883
883
  }
884
884
  return !1;
885
885
  }
886
- async function qr(e, t) {
887
- await oe("background", e, t) || await oe("background-image", e, t), await oe("mask", e, t) || await oe("-webkit-mask", e, t) || await oe("mask-image", e, t) || await oe("-webkit-mask-image", e, t);
888
- }
889
886
  async function Yr(e, t) {
887
+ await ie("background", e, t) || await ie("background-image", e, t), await ie("mask", e, t) || await ie("-webkit-mask", e, t) || await ie("mask-image", e, t) || await ie("-webkit-mask-image", e, t);
888
+ }
889
+ async function Xr(e, t) {
890
890
  const r = L(e, HTMLImageElement);
891
891
  if (!(r && !De(e.src)) && !(L(e, SVGImageElement) && !De(e.href.baseVal)))
892
892
  return;
893
- const n = r ? e.src : e.href.baseVal, a = await We(n, He(n), t);
894
- await new Promise((s, i) => {
895
- e.onload = s, e.onerror = t.onImageErrorHandler ? (...p) => {
893
+ const n = r ? e.src : e.href.baseVal, s = await We(n, He(n), t);
894
+ await new Promise((a, i) => {
895
+ e.onload = a, e.onerror = t.onImageErrorHandler ? (...p) => {
896
896
  try {
897
- s(t.onImageErrorHandler(...p));
897
+ a(t.onImageErrorHandler(...p));
898
898
  } catch (u) {
899
899
  i(u);
900
900
  }
901
901
  } : i;
902
902
  const c = e;
903
- c.decode && (c.decode = s), c.loading === "lazy" && (c.loading = "eager"), r ? (e.srcset = "", e.src = a) : e.href.baseVal = a;
903
+ c.decode && (c.decode = a), c.loading === "lazy" && (c.loading = "eager"), r ? (e.srcset = "", e.src = s) : e.href.baseVal = s;
904
904
  });
905
905
  }
906
- async function Xr(e, t) {
907
- const n = K(e.childNodes).map((a) => Et(a, t));
906
+ async function Jr(e, t) {
907
+ const n = K(e.childNodes).map((s) => St(s, t));
908
908
  await Promise.all(n).then(() => e);
909
909
  }
910
- async function Et(e, t) {
911
- L(e, Element) && (await qr(e, t), await Yr(e, t), await Xr(e, t));
910
+ async function St(e, t) {
911
+ L(e, Element) && (await Yr(e, t), await Xr(e, t), await Jr(e, t));
912
912
  }
913
- function Jr(e, t) {
913
+ function Zr(e, t) {
914
914
  const { style: r } = e;
915
915
  t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
916
916
  const n = t.style;
917
- return n != null && Object.keys(n).forEach((a) => {
918
- r[a] = n[a];
917
+ return n != null && Object.keys(n).forEach((s) => {
918
+ r[s] = n[s];
919
919
  }), e;
920
920
  }
921
- const ot = {};
922
- async function it(e) {
923
- let t = ot[e];
921
+ const st = {};
922
+ async function ot(e) {
923
+ let t = st[e];
924
924
  if (t != null)
925
925
  return t;
926
926
  const n = await (await fetch(e)).text();
927
- return t = { url: e, cssText: n }, ot[e] = t, t;
927
+ return t = { url: e, cssText: n }, st[e] = t, t;
928
928
  }
929
- async function ct(e, t) {
929
+ async function it(e, t) {
930
930
  let r = e.cssText;
931
- const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (i) => {
931
+ const n = /url\(["']?([^"')]+)["']?\)/g, a = (r.match(/url\([^)]+\)/g) || []).map(async (i) => {
932
932
  let c = i.replace(n, "$1");
933
- return c.startsWith("https://") || (c = new URL(c, e.url).href), xt(c, t.fetchRequestInit, ({ result: p }) => (r = r.replace(i, `url(${p})`), [i, p]));
933
+ return c.startsWith("https://") || (c = new URL(c, e.url).href), yt(c, t.fetchRequestInit, ({ result: p }) => (r = r.replace(i, `url(${p})`), [i, p]));
934
934
  });
935
- return Promise.all(s).then(() => r);
935
+ return Promise.all(a).then(() => r);
936
936
  }
937
- function lt(e) {
937
+ function ct(e) {
938
938
  if (e == null)
939
939
  return [];
940
940
  const t = [], r = /(\/\*[\s\S]*?\*\/)/gi;
941
941
  let n = e.replace(r, "");
942
- const a = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
942
+ const s = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
943
943
  for (; ; ) {
944
- const p = a.exec(n);
944
+ const p = s.exec(n);
945
945
  if (p === null)
946
946
  break;
947
947
  t.push(p[0]);
948
948
  }
949
- n = n.replace(a, "");
950
- const s = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, i = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", c = new RegExp(i, "gi");
949
+ n = n.replace(s, "");
950
+ const a = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, i = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", c = new RegExp(i, "gi");
951
951
  for (; ; ) {
952
- let p = s.exec(n);
952
+ let p = a.exec(n);
953
953
  if (p === null) {
954
954
  if (p = c.exec(n), p === null)
955
955
  break;
956
- s.lastIndex = c.lastIndex;
956
+ a.lastIndex = c.lastIndex;
957
957
  } else
958
- c.lastIndex = s.lastIndex;
958
+ c.lastIndex = a.lastIndex;
959
959
  t.push(p[0]);
960
960
  }
961
961
  return t;
962
962
  }
963
- async function Zr(e, t) {
963
+ async function Kr(e, t) {
964
964
  const r = [], n = [];
965
- return e.forEach((a) => {
966
- if ("cssRules" in a)
965
+ return e.forEach((s) => {
966
+ if ("cssRules" in s)
967
967
  try {
968
- K(a.cssRules || []).forEach((s, i) => {
969
- if (s.type === CSSRule.IMPORT_RULE) {
968
+ K(s.cssRules || []).forEach((a, i) => {
969
+ if (a.type === CSSRule.IMPORT_RULE) {
970
970
  let c = i + 1;
971
- const p = s.href, u = it(p).then((v) => ct(v, t)).then((v) => lt(v).forEach((m) => {
971
+ const p = a.href, u = ot(p).then((S) => it(S, t)).then((S) => ct(S).forEach((m) => {
972
972
  try {
973
- a.insertRule(m, m.startsWith("@import") ? c += 1 : a.cssRules.length);
974
- } catch (x) {
973
+ s.insertRule(m, m.startsWith("@import") ? c += 1 : s.cssRules.length);
974
+ } catch (w) {
975
975
  console.error("Error inserting rule from remote css", {
976
976
  rule: m,
977
- error: x
977
+ error: w
978
978
  });
979
979
  }
980
- })).catch((v) => {
981
- console.error("Error loading remote css", v.toString());
980
+ })).catch((S) => {
981
+ console.error("Error loading remote css", S.toString());
982
982
  });
983
983
  n.push(u);
984
984
  }
985
985
  });
986
- } catch (s) {
986
+ } catch (a) {
987
987
  const i = e.find((c) => c.href == null) || document.styleSheets[0];
988
- a.href != null && n.push(it(a.href).then((c) => ct(c, t)).then((c) => lt(c).forEach((p) => {
988
+ s.href != null && n.push(ot(s.href).then((c) => it(c, t)).then((c) => ct(c).forEach((p) => {
989
989
  i.insertRule(p, i.cssRules.length);
990
990
  })).catch((c) => {
991
991
  console.error("Error loading remote stylesheet", c);
992
- })), console.error("Error inlining remote css file", s);
992
+ })), console.error("Error inlining remote css file", a);
993
993
  }
994
- }), Promise.all(n).then(() => (e.forEach((a) => {
995
- if ("cssRules" in a)
994
+ }), Promise.all(n).then(() => (e.forEach((s) => {
995
+ if ("cssRules" in s)
996
996
  try {
997
- K(a.cssRules || []).forEach((s) => {
998
- r.push(s);
997
+ K(s.cssRules || []).forEach((a) => {
998
+ r.push(a);
999
999
  });
1000
- } catch (s) {
1001
- console.error(`Error while reading CSS rules from ${a.href}`, s);
1000
+ } catch (a) {
1001
+ console.error(`Error while reading CSS rules from ${s.href}`, a);
1002
1002
  }
1003
1003
  }), r));
1004
1004
  }
1005
- function Kr(e) {
1005
+ function Qr(e) {
1006
1006
  return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => bt(t.style.getPropertyValue("src")));
1007
1007
  }
1008
- async function Qr(e, t) {
1008
+ async function en(e, t) {
1009
1009
  if (e.ownerDocument == null)
1010
1010
  throw new Error("Provided element is not within a Document");
1011
- const r = K(e.ownerDocument.styleSheets), n = await Zr(r, t);
1012
- return Kr(n);
1011
+ const r = K(e.ownerDocument.styleSheets), n = await Kr(r, t);
1012
+ return Qr(n);
1013
1013
  }
1014
- function St(e) {
1014
+ function Et(e) {
1015
1015
  return e.trim().replace(/["']/g, "");
1016
1016
  }
1017
- function en(e) {
1017
+ function tn(e) {
1018
1018
  const t = /* @__PURE__ */ new Set();
1019
1019
  function r(n) {
1020
- (n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((s) => {
1021
- t.add(St(s));
1022
- }), Array.from(n.children).forEach((s) => {
1023
- s instanceof HTMLElement && r(s);
1020
+ (n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((a) => {
1021
+ t.add(Et(a));
1022
+ }), Array.from(n.children).forEach((a) => {
1023
+ a instanceof HTMLElement && r(a);
1024
1024
  });
1025
1025
  }
1026
1026
  return r(e), t;
1027
1027
  }
1028
- async function tn(e, t) {
1029
- const r = await Qr(e, t), n = en(e);
1030
- return (await Promise.all(r.filter((s) => n.has(St(s.style.fontFamily))).map((s) => {
1031
- const i = s.parentStyleSheet ? s.parentStyleSheet.href : null;
1032
- return Ct(s.cssText, i, t);
1028
+ async function rn(e, t) {
1029
+ const r = await en(e, t), n = tn(e);
1030
+ return (await Promise.all(r.filter((a) => n.has(Et(a.style.fontFamily))).map((a) => {
1031
+ const i = a.parentStyleSheet ? a.parentStyleSheet.href : null;
1032
+ return Ct(a.cssText, i, t);
1033
1033
  }))).join(`
1034
1034
  `);
1035
1035
  }
1036
- async function rn(e, t) {
1037
- const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await tn(e, t);
1036
+ async function nn(e, t) {
1037
+ const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await rn(e, t);
1038
1038
  if (r) {
1039
- const n = document.createElement("style"), a = document.createTextNode(r);
1040
- n.appendChild(a), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
1039
+ const n = document.createElement("style"), s = document.createTextNode(r);
1040
+ n.appendChild(s), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
1041
1041
  }
1042
1042
  }
1043
- async function nn(e, t = {}) {
1044
- const { width: r, height: n } = yt(e, t), a = await je(e, t, !0);
1045
- return await rn(a, t), await Et(a, t), Jr(a, t), await vr(a, r, n);
1043
+ async function an(e, t = {}) {
1044
+ const { width: r, height: n } = xt(e, t), s = await Te(e, t, !0);
1045
+ return await nn(s, t), await St(s, t), Zr(s, t), await br(s, r, n);
1046
1046
  }
1047
1047
  async function sn(e, t = {}) {
1048
- const { width: r, height: n } = yt(e, t), a = await nn(e, t), s = await Re(a), i = document.createElement("canvas"), c = i.getContext("2d"), p = t.pixelRatio || yr(), u = t.canvasWidth || r, v = t.canvasHeight || n;
1049
- return i.width = u * p, i.height = v * p, t.skipAutoScale || xr(i), i.style.width = `${u}`, i.style.height = `${v}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(s, 0, 0, i.width, i.height), i;
1048
+ const { width: r, height: n } = xt(e, t), s = await an(e, t), a = await je(s), i = document.createElement("canvas"), c = i.getContext("2d"), p = t.pixelRatio || yr(), u = t.canvasWidth || r, S = t.canvasHeight || n;
1049
+ return i.width = u * p, i.height = S * p, t.skipAutoScale || wr(i), i.style.width = `${u}`, i.style.height = `${S}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(a, 0, 0, i.width, i.height), i;
1050
1050
  }
1051
- async function dt(e, t = {}) {
1051
+ async function lt(e, t = {}) {
1052
1052
  return (await sn(e, t)).toDataURL();
1053
1053
  }
1054
- const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 15, xe = "data-vg-pin-id", ln = () => {
1054
+ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 15, Oe = "data-vg-pin-id", dn = () => {
1055
1055
  const e = window.innerWidth;
1056
1056
  return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
1057
- }, dn = (e) => {
1057
+ }, un = (e) => {
1058
1058
  let t = 0;
1059
1059
  for (let r = 0; r < e.length; r++) {
1060
1060
  const n = e.charCodeAt(r);
1061
1061
  t = (t << 5) - t + n, t = t & t;
1062
1062
  }
1063
1063
  return Math.abs(t).toString(16);
1064
- }, un = (e, t) => {
1064
+ }, dt = (e, t) => {
1065
1065
  if (!e) return "";
1066
1066
  try {
1067
1067
  const r = new Date(e);
@@ -1079,16 +1079,16 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1079
1079
  }, pn = (e) => {
1080
1080
  const t = (e.innerText || "").slice(0, 30).trim(), r = {
1081
1081
  tag: e.tagName.toLowerCase(),
1082
- classHash: dn(e.className),
1082
+ classHash: un(e.className),
1083
1083
  textSnippet: t,
1084
1084
  parentTag: e.parentElement?.tagName.toLowerCase(),
1085
1085
  neighborCount: e.parentElement?.children.length || 0
1086
1086
  }, n = e.getAttribute("aria-label");
1087
1087
  n && (r.ariaLabel = n);
1088
- const a = e.getAttribute("role");
1089
- a && (r.role = a);
1090
- const s = e.getAttribute("name");
1091
- return s && (r.name = s), r;
1088
+ const s = e.getAttribute("role");
1089
+ s && (r.role = s);
1090
+ const a = e.getAttribute("name");
1091
+ return a && (r.name = a), r;
1092
1092
  }, mn = /* @__PURE__ */ (() => {
1093
1093
  let e = null, t = null;
1094
1094
  return (r) => {
@@ -1097,32 +1097,32 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1097
1097
  try {
1098
1098
  if (e || (e = document.createElement("canvas"), e.width = 1, e.height = 1), t || (t = e.getContext("2d", { willReadFrequently: !0 })), t) {
1099
1099
  t.fillStyle = "#000000", t.fillStyle = r;
1100
- const s = t.fillStyle;
1101
- if (s && !s.includes("oklch") && !s.includes("oklab"))
1102
- return s;
1100
+ const a = t.fillStyle;
1101
+ if (a && !a.includes("oklch") && !a.includes("oklab"))
1102
+ return a;
1103
1103
  }
1104
1104
  const n = document.createElement("div");
1105
1105
  n.style.color = r, document.body.appendChild(n);
1106
- const a = getComputedStyle(n).color;
1107
- return document.body.removeChild(n), a && !a.includes("oklch") ? a : "rgb(0,0,0)";
1106
+ const s = getComputedStyle(n).color;
1107
+ return document.body.removeChild(n), s && !s.includes("oklch") ? s : "rgb(0,0,0)";
1108
1108
  } catch {
1109
1109
  return "rgb(0,0,0)";
1110
1110
  }
1111
1111
  return r;
1112
1112
  };
1113
- })(), ut = (e, t, r, n) => new Promise((a) => {
1114
- const s = new Image();
1115
- s.onload = () => {
1113
+ })(), ut = (e, t, r, n) => new Promise((s) => {
1114
+ const a = new Image();
1115
+ a.onload = () => {
1116
1116
  const i = document.createElement("canvas"), c = window.devicePixelRatio || 1, p = t.width + r * 2, u = t.height + r * 2;
1117
1117
  i.width = p * c, i.height = u * c;
1118
- const v = i.getContext("2d");
1119
- if (v) {
1120
- v.scale(c, c);
1121
- let m = (t.left - r) * n, x = (t.top - r) * n, f = p * n, w = u * n, T = 0, P = 0, z = p, D = u;
1122
- m < 0 && (T = Math.abs(m) / n, f += m, z -= T, m = 0), m + f > s.width && (f = s.width - m, z = f / n), x < 0 && (P = Math.abs(x) / n, w += x, D -= P, x = 0), x + w > s.height && (w = s.height - x, D = w / n), v.fillStyle = "#ffffff", v.fillRect(0, 0, p, u), f > 0 && w > 0 && v.drawImage(s, m, x, f, w, T, P, z, D);
1118
+ const S = i.getContext("2d");
1119
+ if (S) {
1120
+ S.scale(c, c);
1121
+ let m = (t.left - r) * n, w = (t.top - r) * n, f = p * n, b = u * n, T = 0, A = 0, F = p, H = u;
1122
+ m < 0 && (T = Math.abs(m) / n, f += m, F -= T, m = 0), m + f > a.width && (f = a.width - m, F = f / n), w < 0 && (A = Math.abs(w) / n, b += w, H -= A, w = 0), w + b > a.height && (b = a.height - w, H = b / n), S.fillStyle = "#ffffff", S.fillRect(0, 0, p, u), f > 0 && b > 0 && S.drawImage(a, m, w, f, b, T, A, F, H);
1123
1123
  }
1124
- a(i.toDataURL("image/png"));
1125
- }, s.onerror = () => a(""), s.src = e;
1124
+ s(i.toDataURL("image/png"));
1125
+ }, a.onerror = () => s(""), a.src = e;
1126
1126
  }), fn = (e) => {
1127
1127
  const t = window.getComputedStyle(e), r = {};
1128
1128
  return [
@@ -1136,38 +1136,38 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1136
1136
  "width",
1137
1137
  "height",
1138
1138
  "z-index"
1139
- ].forEach((a) => {
1140
- const s = t.getPropertyValue(a);
1141
- r[a] = mn(s);
1139
+ ].forEach((s) => {
1140
+ const a = t.getPropertyValue(s);
1141
+ r[s] = mn(a);
1142
1142
  }), r;
1143
1143
  }, hn = (e) => {
1144
- const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
1144
+ const r = Object.keys(e).find((a) => a.startsWith("__reactFiber$") || a.startsWith("__reactInternalInstance$"));
1145
1145
  if (!r) return "";
1146
1146
  const n = [];
1147
- let a = e[r];
1148
- for (; a; ) {
1149
- const s = a.type;
1150
- if (typeof s == "function") {
1151
- const i = s.displayName || s.name;
1147
+ let s = e[r];
1148
+ for (; s; ) {
1149
+ const a = s.type;
1150
+ if (typeof a == "function") {
1151
+ const i = a.displayName || a.name;
1152
1152
  i && !i.includes("ViewGate") && !n.includes(i) && n.unshift(i);
1153
1153
  }
1154
- a = a.return;
1154
+ s = s.return;
1155
1155
  }
1156
1156
  return n.join(" > ") || "Generic Component";
1157
1157
  }, kt = (e) => {
1158
1158
  if (!e) return !1;
1159
1159
  const t = window.getComputedStyle(e), r = e.getBoundingClientRect(), n = e.getAttribute("role");
1160
1160
  if (n && ["listbox", "menu", "combobox", "tooltip", "option"].includes(n)) return !1;
1161
- const s = 120;
1162
- return r.width < s && r.height < s || t.position !== "fixed" && t.position !== "absolute" ? !1 : !!(e.closest('[role="dialog"]') || e.closest('[aria-modal="true"]') || e.classList.contains("modal") || e.classList.contains("modal-content"));
1163
- }, ye = (e) => {
1161
+ const a = 120;
1162
+ return r.width < a && r.height < a || t.position !== "fixed" && t.position !== "absolute" ? !1 : !!(e.closest('[role="dialog"]') || e.closest('[aria-modal="true"]') || e.classList.contains("modal") || e.classList.contains("modal-content"));
1163
+ }, le = (e) => {
1164
1164
  if (!e.isConnected) return !1;
1165
1165
  const t = window.getComputedStyle(e);
1166
1166
  if (t.display === "none" || t.visibility === "hidden" || t.opacity === "0" || e.offsetWidth === 0 || e.offsetHeight === 0) return !1;
1167
1167
  let r = e.parentElement;
1168
1168
  for (; r; ) {
1169
- const a = window.getComputedStyle(r);
1170
- if (a.display === "none" || a.visibility === "hidden" || a.opacity === "0") return !1;
1169
+ const s = window.getComputedStyle(r);
1170
+ if (s.display === "none" || s.visibility === "hidden" || s.opacity === "0") return !1;
1171
1171
  r = r.parentElement;
1172
1172
  }
1173
1173
  const n = e.getBoundingClientRect();
@@ -1176,10 +1176,10 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1176
1176
  const r = t.querySelector(e);
1177
1177
  if (r) return r;
1178
1178
  const n = t.querySelectorAll("*");
1179
- for (const a of Array.from(n)) {
1180
- const s = a.shadowRoot;
1181
- if (s) {
1182
- const i = Fe(e, s);
1179
+ for (const s of Array.from(n)) {
1180
+ const a = s.shadowRoot;
1181
+ if (a) {
1182
+ const i = Fe(e, a);
1183
1183
  if (i) return i;
1184
1184
  }
1185
1185
  }
@@ -1196,51 +1196,51 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1196
1196
  if (!e.tag) return null;
1197
1197
  const t = document.getElementsByTagName(e.tag);
1198
1198
  let r = null, n = 0;
1199
- for (let a = 0; a < t.length; a++) {
1200
- const s = t[a];
1199
+ for (let s = 0; s < t.length; s++) {
1200
+ const a = t[s];
1201
1201
  let i = 0;
1202
- const c = s.getAttribute("placeholder");
1203
- e.attributes?.placeholder && c === e.attributes.placeholder ? i += 6 : c && e.attributes?.placeholder && c.includes(e.attributes.placeholder) && (i += 2), s.innerText?.trim() === e.text.trim() ? i += 5 : s.innerText?.includes(e.text.slice(0, 20)) && (i += 3), e.fingerprint?.classHash && s.className.includes(e.fingerprint.classHash) && (i += 2), e.fingerprint?.ariaLabel && s.getAttribute("aria-label") === e.fingerprint.ariaLabel && (i += 3), e.fingerprint?.role && s.getAttribute("role") === e.fingerprint.role && (i += 2), e.parentContext && (s.parentElement?.innerText || "").includes(e.parentContext.slice(0, 30)) && (i += 2), e.fingerprint?.neighborCount === s.parentElement?.children.length && (i += 1), e.fingerprint?.parentTag === s.parentElement?.tagName.toLowerCase() && (i += 1), i > n && i >= 7 && (n = i, r = s);
1202
+ const c = a.getAttribute("placeholder");
1203
+ e.attributes?.placeholder && c === e.attributes.placeholder ? i += 6 : c && e.attributes?.placeholder && c.includes(e.attributes.placeholder) && (i += 2), a.innerText?.trim() === e.text.trim() ? i += 5 : a.innerText?.includes(e.text.slice(0, 20)) && (i += 3), e.fingerprint?.classHash && a.className.includes(e.fingerprint.classHash) && (i += 2), e.fingerprint?.ariaLabel && a.getAttribute("aria-label") === e.fingerprint.ariaLabel && (i += 3), e.fingerprint?.role && a.getAttribute("role") === e.fingerprint.role && (i += 2), e.parentContext && (a.parentElement?.innerText || "").includes(e.parentContext.slice(0, 30)) && (i += 2), e.fingerprint?.neighborCount === a.parentElement?.children.length && (i += 1), e.fingerprint?.parentTag === a.parentElement?.tagName.toLowerCase() && (i += 1), i > n && i >= 7 && (n = i, r = a);
1204
1204
  }
1205
1205
  return r;
1206
- }, yn = (e, t) => {
1206
+ }, xn = (e, t) => {
1207
1207
  if (t) {
1208
- const n = Array.from(document.querySelectorAll(`[${xe}="${t}"]`));
1208
+ const n = Array.from(document.querySelectorAll(`[${Oe}="${t}"]`));
1209
1209
  if (n.length > 0) {
1210
- const a = n.find((s) => !(!ye(s) || e.metadata?.isModal && !s.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')));
1211
- return a ? (n.forEach((s) => {
1212
- s !== a && s.removeAttribute(xe);
1213
- }), a) : null;
1210
+ const s = n.find((a) => !(!le(a) || e.metadata?.isModal && !a.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')));
1211
+ return s ? (n.forEach((a) => {
1212
+ a !== s && a.removeAttribute(Oe);
1213
+ }), s) : null;
1214
1214
  }
1215
1215
  }
1216
1216
  let r = Fe(e.selector);
1217
- if (r && ye(r))
1217
+ if (r && le(r))
1218
1218
  if (e.metadata?.isModal && !r.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content'))
1219
1219
  r = null;
1220
1220
  else
1221
1221
  return r;
1222
1222
  if (e.fallbackSelectors) {
1223
1223
  for (const n of e.fallbackSelectors)
1224
- if (r = Fe(n), r && ye(r)) {
1224
+ if (r = Fe(n), r && le(r)) {
1225
1225
  if (e.metadata?.isModal && !r.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')) continue;
1226
1226
  return r;
1227
1227
  }
1228
1228
  }
1229
- return r = gn(e), r && ye(r) ? e.metadata?.isModal && !r.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content') ? null : r : null;
1229
+ return r = gn(e), r && le(r) ? e.metadata?.isModal && !r.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content') ? null : r : null;
1230
1230
  }, Me = (e) => ({
1231
1231
  tag: e.tagName.toLowerCase(),
1232
1232
  text: (e.innerText || e.getAttribute("placeholder") || "").slice(0, 50).trim(),
1233
1233
  role: e.getAttribute("role") || void 0,
1234
1234
  type: e.getAttribute("type") || void 0
1235
- }), xn = (e) => {
1235
+ }), yn = (e) => {
1236
1236
  const t = e.parentElement;
1237
1237
  if (!t) return;
1238
- const r = Array.from(t.children).filter((i) => i !== e).slice(0, 5).map((i) => Me(i)), n = Array.from(t.children), a = n.indexOf(e);
1239
- let s = "middle";
1240
- return a === 0 && (s = "start"), a === n.length - 1 && (s = "end"), {
1238
+ const r = Array.from(t.children).filter((i) => i !== e).slice(0, 5).map((i) => Me(i)), n = Array.from(t.children), s = n.indexOf(e);
1239
+ let a = "middle";
1240
+ return s === 0 && (a = "start"), s === n.length - 1 && (a = "end"), {
1241
1241
  target: {
1242
1242
  ...Me(e),
1243
- location: `${s} of ${t.tagName.toLowerCase()}`
1243
+ location: `${a} of ${t.tagName.toLowerCase()}`
1244
1244
  },
1245
1245
  parent: Me(t),
1246
1246
  siblings: r
@@ -1255,53 +1255,53 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1255
1255
  }
1256
1256
  r = r.parentElement;
1257
1257
  }
1258
- const n = hn(e), a = [], s = [], i = (m) => {
1259
- const x = [];
1258
+ const n = hn(e), s = [], a = [], i = (m) => {
1259
+ const w = [];
1260
1260
  let f = m;
1261
1261
  for (; f && f.nodeType === Node.ELEMENT_NODE; ) {
1262
- let w = f.nodeName.toLowerCase();
1263
- s.unshift(w);
1262
+ let b = f.nodeName.toLowerCase();
1263
+ a.unshift(b);
1264
1264
  const T = f.id && !f.id.startsWith("__") ? f.id : null;
1265
- T && a.push(`#${T}`);
1266
- const P = f.getAttribute("data-testid") || f.getAttribute("data-qa");
1267
- P && a.push(`[data-testid="${P}"]`);
1268
- const z = f.getAttribute("placeholder"), D = f.getAttribute("aria-label"), A = f.getAttribute("role"), F = f.getAttribute("name"), _ = f.getAttribute("title");
1269
- if (P) {
1270
- w = `[${f.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${P}"]`, x.unshift(w);
1265
+ T && s.push(`#${T}`);
1266
+ const A = f.getAttribute("data-testid") || f.getAttribute("data-qa");
1267
+ A && s.push(`[data-testid="${A}"]`);
1268
+ const F = f.getAttribute("placeholder"), H = f.getAttribute("aria-label"), P = f.getAttribute("role"), W = f.getAttribute("name"), V = f.getAttribute("title");
1269
+ if (A) {
1270
+ b = `[${f.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${A}"]`, w.unshift(b);
1271
1271
  break;
1272
1272
  } else if (T) {
1273
- w = "#" + T, x.unshift(w);
1273
+ b = "#" + T, w.unshift(b);
1274
1274
  break;
1275
- } else if (z) {
1276
- w = `${f.localName}[placeholder="${z}"]`, x.unshift(w);
1275
+ } else if (F) {
1276
+ b = `${f.localName}[placeholder="${F}"]`, w.unshift(b);
1277
1277
  break;
1278
- } else if (D) {
1279
- w = `${f.localName}[aria-label="${D}"]`, x.unshift(w);
1278
+ } else if (H) {
1279
+ b = `${f.localName}[aria-label="${H}"]`, w.unshift(b);
1280
1280
  break;
1281
- } else if (A) {
1282
- w = `${f.localName}[role="${A}"]`, x.unshift(w);
1281
+ } else if (P) {
1282
+ b = `${f.localName}[role="${P}"]`, w.unshift(b);
1283
1283
  break;
1284
- } else if (F) {
1285
- w = `${f.localName}[name="${F}"]`, x.unshift(w);
1284
+ } else if (W) {
1285
+ b = `${f.localName}[name="${W}"]`, w.unshift(b);
1286
1286
  break;
1287
- } else if (_) {
1288
- w = `${f.localName}[title="${_}"]`, x.unshift(w);
1287
+ } else if (V) {
1288
+ b = `${f.localName}[title="${V}"]`, w.unshift(b);
1289
1289
  break;
1290
1290
  } else {
1291
- let W = f, $ = 1;
1292
- for (; W.previousElementSibling; )
1293
- W = W.previousElementSibling, W.nodeName.toLowerCase() === f.nodeName.toLowerCase() && $++;
1294
- $ > 1 && (w += `:nth-of-type(${$})`);
1291
+ let X = f, G = 1;
1292
+ for (; X.previousElementSibling; )
1293
+ X = X.previousElementSibling, X.nodeName.toLowerCase() === f.nodeName.toLowerCase() && G++;
1294
+ G > 1 && (b += `:nth-of-type(${G})`);
1295
1295
  }
1296
- x.unshift(w), f = f.parentElement;
1296
+ w.unshift(b), f = f.parentElement;
1297
1297
  }
1298
- return x.join(" > ");
1298
+ return w.join(" > ");
1299
1299
  }, c = kt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')), p = i(e), u = {};
1300
1300
  ["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((m) => {
1301
- const x = e.getAttribute(m);
1302
- x && (u[m] = x);
1301
+ const w = e.getAttribute(m);
1302
+ w && (u[m] = w);
1303
1303
  });
1304
- const v = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${p.split(" > ").slice(-1)}`;
1304
+ const S = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${p.split(" > ").slice(-1)}`;
1305
1305
  return {
1306
1306
  tag: e.tagName.toLowerCase(),
1307
1307
  id: e.id || "",
@@ -1311,246 +1311,250 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1311
1311
  outerHtml: e.outerHTML,
1312
1312
  parentContext: (e.parentElement?.innerText || "").slice(0, 150).trim(),
1313
1313
  componentPath: n,
1314
- signature: v,
1314
+ signature: S,
1315
1315
  source: t,
1316
1316
  attributes: u,
1317
- fallbackSelectors: [...new Set(a)].slice(0, 5),
1318
- domPath: s.slice(-10),
1317
+ fallbackSelectors: [...new Set(s)].slice(0, 5),
1318
+ domPath: a.slice(-10),
1319
1319
  viewportSize: { width: window.innerWidth, height: window.innerHeight },
1320
- uiContext: xn(e),
1320
+ uiContext: yn(e),
1321
1321
  fingerprint: pn(e),
1322
1322
  metadata: {
1323
1323
  hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`,
1324
1324
  computedStyles: fn(e),
1325
- viewportBreakpoint: ln(),
1325
+ viewportBreakpoint: dn(),
1326
1326
  outerHtml: e.outerHTML.slice(0, 1500),
1327
1327
  scrollPosition: { x: window.scrollX, y: window.scrollY },
1328
1328
  isModal: c
1329
1329
  }
1330
1330
  };
1331
1331
  }, vn = () => {
1332
- const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a, disableViewGate: s, hasActiveToasts: i } = ur(), [c, p] = j(!1), [u, v] = j(null), [m, x] = j(null), [f, w] = j(""), [T, P] = j(!1), [z, D] = j(!1), [A, F] = j(!1), [_, W] = j([]), [$, H] = j(null), [we, Be] = j(!1), [ce, te] = j(!1), [ve, be] = j({}), [B, re] = j(null), [Q, le] = j(!1), [U, Ce] = j(() => {
1332
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: s, disableViewGate: a, hasActiveToasts: i } = pr(), [c, p] = k(!1), [u, S] = k(null), [m, w] = k(null), [f, b] = k(""), [T, A] = k(!1), [F, H] = k(!1), [P, W] = k(!1), [V, X] = k([]), [G, B] = k(null), [ye, Ue] = k(!1), [de, re] = k(!1), [we, ve] = k({}), [q, ne] = k(null), [Q, ue] = k(!1), [pe, be] = k([]), [l, x] = k(() => {
1333
1333
  if (typeof window > "u") return { top: 24, right: 24 };
1334
1334
  const d = localStorage.getItem("vg-exit-pos");
1335
1335
  return d ? JSON.parse(d) : { top: 24, right: 24 };
1336
- }), [l, y] = j(!1), b = ge(null), [k, ne] = j(() => {
1336
+ }), [E, R] = k(!1), $ = xe(null), [Y, j] = k(() => {
1337
1337
  if (typeof window > "u") return { bottom: 30, right: 30 };
1338
1338
  const d = localStorage.getItem("vg-bar-pos");
1339
1339
  return d ? JSON.parse(d) : { bottom: 30, right: 30 };
1340
- }), [q, O] = j(!1), V = ge(null), de = (d) => {
1340
+ }), [z, ae] = k(!1), U = xe(null), jt = (d) => {
1341
1341
  d.preventDefault(), d.stopPropagation();
1342
1342
  const h = d.currentTarget.parentElement?.getBoundingClientRect();
1343
- h && (y(!0), b.current = {
1343
+ h && (R(!0), $.current = {
1344
1344
  x: d.clientX,
1345
1345
  y: d.clientY,
1346
- top: U.top,
1347
- right: U.right,
1346
+ top: l.top,
1347
+ right: l.right,
1348
1348
  width: h.width,
1349
1349
  height: h.height
1350
1350
  });
1351
- }, _e = (d) => {
1351
+ }, Ot = (d) => {
1352
1352
  d.preventDefault(), d.stopPropagation();
1353
1353
  const h = d.currentTarget.parentElement?.getBoundingClientRect();
1354
- h && (O(!0), V.current = {
1354
+ h && (ae(!0), U.current = {
1355
1355
  x: d.clientX,
1356
1356
  y: d.clientY,
1357
- bottom: k.bottom,
1358
- right: k.right,
1357
+ bottom: Y.bottom,
1358
+ right: Y.right,
1359
1359
  width: h.width,
1360
1360
  height: h.height
1361
1361
  });
1362
1362
  };
1363
1363
  Z(() => {
1364
- if (!l && !q) return;
1365
- const d = (g) => {
1366
- if (l && b.current) {
1367
- const G = g.clientX - b.current.x, C = g.clientY - b.current.y;
1368
- let E = b.current.top + C, S = b.current.right - G;
1369
- const R = 10;
1370
- E = Math.max(R, Math.min(window.innerHeight - b.current.height - R, E)), S = Math.max(R, Math.min(window.innerWidth - b.current.width - R, S)), Ce({ top: E, right: S });
1364
+ if (!E && !z) return;
1365
+ const d = (y) => {
1366
+ if (E && $.current) {
1367
+ const _ = y.clientX - $.current.x, O = y.clientY - $.current.y;
1368
+ let C = $.current.top + O, g = $.current.right - _;
1369
+ const v = 10;
1370
+ C = Math.max(v, Math.min(window.innerHeight - $.current.height - v, C)), g = Math.max(v, Math.min(window.innerWidth - $.current.width - v, g)), x({ top: C, right: g });
1371
1371
  }
1372
- if (q && V.current) {
1373
- const G = g.clientX - V.current.x, C = g.clientY - V.current.y;
1374
- let E = V.current.bottom - C, S = V.current.right - G;
1375
- const R = 10;
1376
- E = Math.max(R, Math.min(window.innerHeight - V.current.height - R, E)), S = Math.max(R, Math.min(window.innerWidth - V.current.width - R, S)), ne({ bottom: E, right: S });
1372
+ if (z && U.current) {
1373
+ const _ = y.clientX - U.current.x, O = y.clientY - U.current.y;
1374
+ let C = U.current.bottom - O, g = U.current.right - _;
1375
+ const v = 10;
1376
+ C = Math.max(v, Math.min(window.innerHeight - U.current.height - v, C)), g = Math.max(v, Math.min(window.innerWidth - U.current.width - v, g)), j({ bottom: C, right: g });
1377
1377
  }
1378
1378
  }, h = () => {
1379
- l && (y(!1), localStorage.setItem("vg-exit-pos", JSON.stringify(U)), b.current = null), q && (O(!1), localStorage.setItem("vg-bar-pos", JSON.stringify(k)), V.current = null);
1379
+ E && (R(!1), localStorage.setItem("vg-exit-pos", JSON.stringify(l)), $.current = null), z && (ae(!1), localStorage.setItem("vg-bar-pos", JSON.stringify(Y)), U.current = null);
1380
1380
  };
1381
1381
  return window.addEventListener("mousemove", d), window.addEventListener("mouseup", h), () => {
1382
1382
  window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", h);
1383
1383
  };
1384
- }, [l, q, U, k]);
1385
- const [Ue, Te] = j(null), [qe, Ye] = j(""), [jt, Ot] = j({}), se = ge(null), ue = ge(null), pe = Ee(() => {
1386
- ue.current || (ue.current = requestAnimationFrame(() => {
1387
- const d = {}, g = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((C) => kt(C) && ye(C)), G = !!g;
1388
- _.forEach((C) => {
1384
+ }, [E, z, l, Y]);
1385
+ const [Be, _e] = k(null), [qe, Ye] = k(""), [bn, Cn] = k({}), se = xe(null), me = xe(null), fe = Se(() => {
1386
+ me.current || (me.current = requestAnimationFrame(() => {
1387
+ const d = /* @__PURE__ */ new Map(), y = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((C) => kt(C) && le(C)), _ = !!y;
1388
+ V.forEach((C) => {
1389
1389
  if (!C.reference) return;
1390
- const E = yn(C.reference, C._id), S = !!C.reference.metadata?.isModal;
1391
- if (E) {
1392
- const R = E.getAttribute(xe);
1393
- R ? R !== C._id && (console.warn(`Element already tagged with ${R}, skipping ${C._id}`), R.length < 10 && E.setAttribute(xe, C._id)) : E.setAttribute(xe, C._id);
1394
- let Y = !1;
1395
- if (G ? Y = g.contains(E) : Y = !S, !Y) return;
1396
- const M = E.getBoundingClientRect(), me = M.left + M.width / 2, X = M.top + M.height / 2;
1397
- if (me >= 0 && me <= window.innerWidth && X >= 0 && X <= window.innerHeight) {
1398
- const J = document.elementFromPoint(me, X);
1399
- if (J && !E.contains(J) && !se.current?.contains(J))
1400
- return;
1401
- }
1402
- d[C._id] = {
1403
- top: M.top + window.scrollY,
1404
- left: M.left + window.scrollX,
1405
- width: M.width,
1406
- isModal: S
1407
- };
1390
+ const g = xn(C.reference, C._id);
1391
+ if (!g || !le(g)) return;
1392
+ const v = !!C.reference.metadata?.isModal;
1393
+ let D = !1;
1394
+ if (_ ? D = y.contains(g) : D = !v, !D) return;
1395
+ g.getAttribute(Oe) || g.setAttribute(Oe, C._id), d.has(g) || d.set(g, []), d.get(g).push(C);
1396
+ });
1397
+ const O = [];
1398
+ d.forEach((C, g) => {
1399
+ const v = g.getBoundingClientRect(), D = v.left + v.width / 2, N = v.top + v.height / 2;
1400
+ if (D >= 0 && D <= window.innerWidth && N >= 0 && N <= window.innerHeight) {
1401
+ const J = document.elementFromPoint(D, N);
1402
+ if (J && !g.contains(J) && !se.current?.contains(J))
1403
+ return;
1408
1404
  }
1409
- }), Ot(d), ue.current = null;
1405
+ O.push({
1406
+ id: C[0]._id,
1407
+ // Group identified by its primary annotation
1408
+ element: g,
1409
+ rect: v,
1410
+ annotations: C.sort((J, te) => new Date(te.timestamp || te.createdAt).getTime() - new Date(J.timestamp || J.createdAt).getTime()),
1411
+ isModal: !!C[0].reference?.metadata?.isModal
1412
+ });
1413
+ }), be(O), me.current = null;
1410
1414
  }));
1411
- }, [_]), ee = Ee(async () => {
1415
+ }, [V]), ee = Se(async () => {
1412
1416
  if (n) {
1413
- te(!0);
1417
+ re(!0);
1414
1418
  try {
1415
- const d = await fetch(`${a}/api/annotations`, {
1419
+ const d = await fetch(`${s}/api/annotations`, {
1416
1420
  headers: { "x-api-key": n }
1417
1421
  });
1418
1422
  if (d.ok) {
1419
- const G = ((await d.json()).data || []).reduce((C, E) => C.find((R) => R._id === E._id) ? C : C.concat([E]), []);
1420
- W(G);
1423
+ const _ = ((await d.json()).data || []).reduce((O, C) => O.find((v) => v._id === C._id) ? O : O.concat([C]), []);
1424
+ X(_);
1421
1425
  }
1422
1426
  } catch (d) {
1423
1427
  console.error("Failed to fetch annotations", d);
1424
1428
  } finally {
1425
- te(!1);
1429
+ re(!1);
1426
1430
  }
1427
1431
  }
1428
- }, [n, a]);
1432
+ }, [n, s]);
1429
1433
  Z(() => {
1430
- A && _.length === 0 && !ce && F(!1);
1431
- }, [A, _.length, ce]), Z(() => {
1432
- if (!c && _.length > 0) {
1433
- pe();
1434
- const d = new MutationObserver(() => pe()), h = new ResizeObserver(() => pe()), g = () => pe();
1434
+ P && V.length === 0 && !de && W(!1);
1435
+ }, [P, V.length, de]), Z(() => {
1436
+ if (!c && V.length > 0) {
1437
+ fe();
1438
+ const d = new MutationObserver(() => fe()), h = new ResizeObserver(() => fe()), y = () => fe();
1435
1439
  return d.observe(document.documentElement, {
1436
1440
  childList: !0,
1437
1441
  subtree: !0,
1438
1442
  attributes: !0
1439
- }), h.observe(document.documentElement), window.addEventListener("scroll", g, !0), () => {
1440
- d.disconnect(), h.disconnect(), window.removeEventListener("scroll", g, !0), ue.current && cancelAnimationFrame(ue.current);
1443
+ }), h.observe(document.documentElement), window.addEventListener("scroll", y, !0), () => {
1444
+ d.disconnect(), h.disconnect(), window.removeEventListener("scroll", y, !0), me.current && cancelAnimationFrame(me.current);
1441
1445
  };
1442
1446
  }
1443
- }, [c, _.length, pe]), Z(() => {
1447
+ }, [c, V.length, fe]), Z(() => {
1444
1448
  ee();
1445
1449
  }, [ee]), Z(() => {
1446
1450
  se.current = document.getElementById("viewgate-shadow-host");
1447
1451
  }, []);
1448
- const Ve = Ee((d) => {
1452
+ const Ae = Se((d) => {
1449
1453
  if (!c || m) return;
1450
1454
  const h = pt(d.clientX, d.clientY);
1451
1455
  if (!h || se.current?.contains(h) || h.closest(".vg-no-capture")) {
1452
- v(null);
1456
+ S(null);
1453
1457
  return;
1454
1458
  }
1455
- const g = h.getBoundingClientRect();
1456
- v({
1459
+ const y = h.getBoundingClientRect();
1460
+ S({
1457
1461
  tag: h.tagName.toLowerCase(),
1458
1462
  source: h.getAttribute("data-source-path") || "unknown:0",
1459
- rect: g,
1463
+ rect: y,
1460
1464
  element: h,
1461
1465
  previewText: (h.innerText || "").slice(0, 100) || (h.getAttribute("placeholder") || "").slice(0, 100) || h.tagName.toLowerCase(),
1462
1466
  semanticReference: {
1463
1467
  ...wn(h),
1464
1468
  normalizedOffset: {
1465
- x: (d.clientX - g.left) / g.width,
1466
- y: (d.clientY - g.top) / g.height
1469
+ x: (d.clientX - y.left) / y.width,
1470
+ y: (d.clientY - y.top) / y.height
1467
1471
  }
1468
1472
  }
1469
1473
  });
1470
- }, [c, m]), Pe = Ee(async (d) => {
1474
+ }, [c, m]), Pe = Se(async (d) => {
1471
1475
  if (!c || m) return;
1472
1476
  const h = pt(d.clientX, d.clientY);
1473
1477
  if (!(!h || se.current?.contains(h) || h.closest(".vg-no-capture")) && u) {
1474
- d.preventDefault(), d.stopPropagation(), D(!0);
1478
+ d.preventDefault(), d.stopPropagation(), H(!0);
1475
1479
  try {
1476
- const C = window.scrollX, E = window.scrollY, S = await dt(document.documentElement, {
1480
+ const O = window.scrollX, C = window.scrollY, g = await lt(document.documentElement, {
1477
1481
  pixelRatio: 1.5,
1478
1482
  cacheBust: !0,
1479
1483
  width: window.innerWidth,
1480
1484
  height: window.innerHeight,
1481
1485
  backgroundColor: "#ffffff",
1482
1486
  style: {
1483
- transform: `scale(${1 / window.devicePixelRatio}) translate(-${C}px, -${E}px)`,
1487
+ transform: `scale(${1 / window.devicePixelRatio}) translate(-${O}px, -${C}px)`,
1484
1488
  transformOrigin: "top left"
1485
1489
  },
1486
- filter: (X) => {
1487
- const J = X;
1488
- return !(se.current?.contains(J) || J.id === "viewgate-ui");
1490
+ filter: (te) => {
1491
+ const Ce = te;
1492
+ return !(se.current?.contains(Ce) || Ce.id === "viewgate-ui");
1489
1493
  }
1490
- }), R = u.element.getBoundingClientRect(), Y = R.top >= 0 && R.left >= 0 && R.bottom <= window.innerHeight && R.right <= window.innerWidth;
1491
- let M = "";
1492
- if (Y && R.width > 0 && R.height > 0)
1493
- M = await ut(S, R, 24, 1.5);
1494
+ }), v = u.element.getBoundingClientRect(), D = v.top >= 0 && v.left >= 0 && v.bottom <= window.innerHeight && v.right <= window.innerWidth;
1495
+ let N = "";
1496
+ if (D && v.width > 0 && v.height > 0)
1497
+ N = await ut(g, v, 24, 1.5);
1494
1498
  else
1495
1499
  try {
1496
- M = await dt(u.element, {
1500
+ N = await lt(u.element, {
1497
1501
  pixelRatio: 2,
1498
1502
  cacheBust: !0,
1499
1503
  backgroundColor: "#ffffff",
1500
- filter: (X) => {
1501
- const J = X;
1502
- return !se.current?.contains(J);
1504
+ filter: (te) => {
1505
+ const Ce = te;
1506
+ return !se.current?.contains(Ce);
1503
1507
  }
1504
1508
  });
1505
1509
  } catch {
1506
- M = await ut(S, R, 24, 1.5);
1510
+ N = await ut(g, v, 24, 1.5);
1507
1511
  }
1508
- const me = {
1512
+ const J = {
1509
1513
  ...u.semanticReference,
1510
1514
  metadata: {
1511
1515
  ...u.semanticReference.metadata,
1512
- screenshotUrl: S,
1513
- elementScreenshot: M
1516
+ screenshotUrl: g,
1517
+ elementScreenshot: N
1514
1518
  }
1515
1519
  };
1516
- x({
1520
+ w({
1517
1521
  ...u,
1518
- visualPreview: M,
1519
- semanticReference: me
1522
+ visualPreview: N,
1523
+ semanticReference: J
1520
1524
  });
1521
- } catch (g) {
1522
- console.error("Failed to capture preview:", g), x(u);
1525
+ } catch (y) {
1526
+ console.error("Failed to capture preview:", y), w(u);
1523
1527
  } finally {
1524
- D(!1), v(null);
1528
+ H(!1), S(null);
1525
1529
  }
1526
1530
  }
1527
1531
  }, [c, u, m]);
1528
1532
  Z(() => {
1529
1533
  const d = (h) => {
1530
1534
  if (h.key === "Escape") {
1531
- m ? x(null) : A ? F(!1) : c && p(!1);
1535
+ m ? w(null) : P ? W(!1) : c && p(!1);
1532
1536
  return;
1533
1537
  }
1534
- const G = (() => {
1535
- let S = document.activeElement;
1536
- for (; S && S.shadowRoot && S.shadowRoot.activeElement; )
1537
- S = S.shadowRoot.activeElement;
1538
- return S;
1538
+ const _ = (() => {
1539
+ let g = document.activeElement;
1540
+ for (; g && g.shadowRoot && g.shadowRoot.activeElement; )
1541
+ g = g.shadowRoot.activeElement;
1542
+ return g;
1539
1543
  })();
1540
- if (["input", "textarea"].includes((G?.tagName || "").toLowerCase()) || G?.isContentEditable) return;
1541
- const E = h.key.toLowerCase();
1542
- E === "c" && !m && !A && p((S) => !S), E === "v" && !m && (_.length > 0 || A) && (F((S) => !S), A || p(!1));
1544
+ if (["input", "textarea"].includes((_?.tagName || "").toLowerCase()) || _?.isContentEditable) return;
1545
+ const C = h.key.toLowerCase();
1546
+ C === "c" && !m && !P && p((g) => !g), C === "v" && !m && (V.length > 0 || P) && (W((g) => !g), P || p(!1));
1543
1547
  };
1544
- return c && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", Ve, !0), window.addEventListener("click", Pe, !0), () => {
1545
- document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", Ve, !0), window.removeEventListener("click", Pe, !0);
1548
+ return c && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", Ae, !0), window.addEventListener("click", Pe, !0), () => {
1549
+ document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", Ae, !0), window.removeEventListener("click", Pe, !0);
1546
1550
  };
1547
- }, [c, m, A, _, Ve, Pe]);
1548
- const _t = async () => {
1551
+ }, [c, m, P, V, Ae, Pe]);
1552
+ const Tt = async () => {
1549
1553
  if (!m || !f.trim()) return;
1550
- P(!0);
1551
- const { semanticReference: d } = m, [h, g] = (d.source || "").split(":"), G = g || "0";
1554
+ A(!0);
1555
+ const { semanticReference: d } = m, [h, y] = (d.source || "").split(":"), _ = y || "0";
1552
1556
  try {
1553
- if (!(await fetch(`${a}/api/annotations`, {
1557
+ if (!(await fetch(`${s}/api/annotations`, {
1554
1558
  method: "POST",
1555
1559
  headers: {
1556
1560
  "Content-Type": "application/json",
@@ -1558,7 +1562,7 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1558
1562
  },
1559
1563
  body: JSON.stringify({
1560
1564
  filePath: h,
1561
- line: parseInt(G),
1565
+ line: parseInt(_),
1562
1566
  url: window.location.href,
1563
1567
  message: f,
1564
1568
  componentName: d.componentPath || m.tag,
@@ -1573,32 +1577,32 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1573
1577
  }
1574
1578
  })
1575
1579
  })).ok) throw new Error("Backend failed");
1576
- e(r.success, "success"), x(null), w(""), p(!1), ee();
1577
- } catch (C) {
1578
- console.error(C), e(r.error, "error");
1580
+ e(r.success, "success"), w(null), b(""), p(!1), ee();
1581
+ } catch (O) {
1582
+ console.error(O), e(r.error, "error");
1579
1583
  } finally {
1580
- P(!1);
1584
+ A(!1);
1581
1585
  }
1582
1586
  };
1583
- return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1077", className: "vg-container", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1078", className: "vg-no-capture", children: [
1587
+ return /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1080", className: "vg-container", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1081", className: "vg-no-capture", children: [
1584
1588
  !i && /* @__PURE__ */ o.jsxs(
1585
1589
  "div",
1586
1590
  {
1587
1591
  style: {
1588
1592
  position: "fixed",
1589
- top: `${U.top}px`,
1590
- right: `${U.right}px`,
1591
- zIndex: Le + 10,
1593
+ top: `${l.top}px`,
1594
+ right: `${l.right}px`,
1595
+ zIndex: Ne + 10,
1592
1596
  display: "flex",
1593
1597
  alignItems: "center",
1594
1598
  gap: "8px",
1595
- transition: l ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
1599
+ transition: E ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
1596
1600
  },
1597
1601
  children: [
1598
1602
  /* @__PURE__ */ o.jsx(
1599
1603
  "div",
1600
1604
  {
1601
- onMouseDown: de,
1605
+ onMouseDown: jt,
1602
1606
  style: {
1603
1607
  width: "20px",
1604
1608
  height: "32px",
@@ -1622,18 +1626,18 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1622
1626
  onMouseLeave: (d) => {
1623
1627
  d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", d.currentTarget.style.color = "#1e293b";
1624
1628
  },
1625
- children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1122", size: 14 })
1629
+ children: /* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1125", size: 14 })
1626
1630
  }
1627
1631
  ),
1628
1632
  /* @__PURE__ */ o.jsx(
1629
1633
  "button",
1630
1634
  {
1631
1635
  onClick: (d) => {
1632
- d.stopPropagation(), H({
1636
+ d.stopPropagation(), B({
1633
1637
  title: r.exitConfirmTitle || "Close ViewGate?",
1634
1638
  message: r.exitConfirmMessage || "Are you sure you want to close ViewGate?",
1635
1639
  type: "danger",
1636
- onConfirm: () => s()
1640
+ onConfirm: () => a()
1637
1641
  });
1638
1642
  },
1639
1643
  title: "Cerrar ViewGate",
@@ -1658,7 +1662,7 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1658
1662
  onMouseLeave: (d) => {
1659
1663
  d.currentTarget.style.transform = "scale(1) rotate(0deg)", d.currentTarget.style.color = "#64748b", d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
1660
1664
  },
1661
- children: /* @__PURE__ */ o.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1162", size: 20, strokeWidth: 2.5 })
1665
+ children: /* @__PURE__ */ o.jsx(Ge, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1165", size: 20, strokeWidth: 2.5 })
1662
1666
  }
1663
1667
  )
1664
1668
  ]
@@ -1667,23 +1671,23 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1667
1671
  /* @__PURE__ */ o.jsxs(
1668
1672
  "div",
1669
1673
  {
1670
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1168",
1674
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1171",
1671
1675
  style: {
1672
1676
  position: "fixed",
1673
- bottom: `${k.bottom}px`,
1674
- right: `${k.right}px`,
1675
- zIndex: Le,
1677
+ bottom: `${Y.bottom}px`,
1678
+ right: `${Y.right}px`,
1679
+ zIndex: Ne,
1676
1680
  display: "flex",
1677
1681
  alignItems: "center",
1678
1682
  gap: "8px",
1679
- transition: q ? "none" : "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"
1683
+ transition: z ? "none" : "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"
1680
1684
  },
1681
1685
  id: "viewgate-ui",
1682
1686
  children: [
1683
1687
  /* @__PURE__ */ o.jsx(
1684
1688
  "div",
1685
1689
  {
1686
- onMouseDown: _e,
1690
+ onMouseDown: Ot,
1687
1691
  style: {
1688
1692
  width: "24px",
1689
1693
  height: "40px",
@@ -1708,10 +1712,10 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1708
1712
  d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", d.currentTarget.style.color = "#1e293b";
1709
1713
  },
1710
1714
  className: "vg-animate-slide-up",
1711
- children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1211", size: 16 })
1715
+ children: /* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1214", size: 16 })
1712
1716
  }
1713
1717
  ),
1714
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1214", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
1718
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1217", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
1715
1719
  /* @__PURE__ */ o.jsx(
1716
1720
  "button",
1717
1721
  {
@@ -1721,23 +1725,23 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1721
1725
  padding: "12px 24px",
1722
1726
  background: c ? "#ef4444" : void 0
1723
1727
  },
1724
- children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1223", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
1725
- c ? /* @__PURE__ */ o.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1224", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1224", size: 20, className: "vg-animate-pop" }),
1726
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1225", children: c ? r.exitMode : r.enterMode })
1728
+ children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1226", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
1729
+ c ? /* @__PURE__ */ o.jsx(Ge, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1227", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(ke, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1227", size: 20, className: "vg-animate-pop" }),
1730
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1228", children: c ? r.exitMode : r.enterMode })
1727
1731
  ] })
1728
1732
  }
1729
1733
  ),
1730
- _.length > 0 && /* @__PURE__ */ o.jsxs(
1734
+ V.length > 0 && /* @__PURE__ */ o.jsxs(
1731
1735
  "button",
1732
1736
  {
1733
1737
  onClick: () => {
1734
- F(!A), p(!1), x(null);
1738
+ W(!P), p(!1), w(null);
1735
1739
  },
1736
1740
  className: "vg-button-ghost vg-animate-pop",
1737
1741
  style: { animationDelay: "0.1s" },
1738
1742
  children: [
1739
- /* @__PURE__ */ o.jsx(Xt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1238", size: 20 }),
1740
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1239", children: r.viewComments })
1743
+ /* @__PURE__ */ o.jsx(Jt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1241", size: 20 }),
1744
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1242", children: r.viewComments })
1741
1745
  ]
1742
1746
  }
1743
1747
  )
@@ -1745,7 +1749,7 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1745
1749
  ]
1746
1750
  }
1747
1751
  ),
1748
- z && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1247", style: {
1752
+ F && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1250", style: {
1749
1753
  position: "fixed",
1750
1754
  top: 0,
1751
1755
  left: 0,
@@ -1756,16 +1760,16 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1756
1760
  display: "flex",
1757
1761
  alignItems: "center",
1758
1762
  justifyContent: "center",
1759
- zIndex: Le + 1,
1763
+ zIndex: Ne + 1,
1760
1764
  cursor: "wait"
1761
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1253", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
1762
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1254", className: "vg-spinner" }),
1763
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1255", style: { fontWeight: 600, fontSize: "14px", color: "#000000" }, children: "Capturando..." })
1765
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1256", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
1766
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1257", className: "vg-spinner" }),
1767
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1258", style: { fontWeight: 600, fontSize: "14px", color: "#000000" }, children: "Capturando..." })
1764
1768
  ] }) }),
1765
1769
  c && !m && /* @__PURE__ */ o.jsx(
1766
1770
  "div",
1767
1771
  {
1768
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1262",
1772
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1265",
1769
1773
  className: "vg-backdrop-blur",
1770
1774
  style: {
1771
1775
  opacity: 1,
@@ -1777,36 +1781,36 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1777
1781
  ${u.rect.left}px ${u.rect.bottom}px,
1778
1782
  ${u.rect.left}px ${u.rect.top}px
1779
1783
  )` : "none",
1780
- zIndex: an
1784
+ zIndex: on
1781
1785
  }
1782
1786
  }
1783
1787
  ),
1784
- c && u && !m && !z && /* @__PURE__ */ o.jsx(
1788
+ c && u && !m && !F && /* @__PURE__ */ o.jsx(
1785
1789
  "div",
1786
1790
  {
1787
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1281",
1791
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1284",
1788
1792
  className: "vg-selection-pulse",
1789
1793
  style: {
1790
1794
  top: u.rect.top - 4,
1791
1795
  left: u.rect.left - 4,
1792
1796
  width: u.rect.width + 8,
1793
1797
  height: u.rect.height + 8,
1794
- zIndex: on
1798
+ zIndex: cn
1795
1799
  },
1796
1800
  children: /* @__PURE__ */ o.jsxs(
1797
1801
  "div",
1798
1802
  {
1799
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1291",
1803
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1294",
1800
1804
  className: "vg-selection-label",
1801
1805
  style: {
1802
1806
  ...u.rect.top < 60 ? u.rect.bottom > window.innerHeight - 60 ? { top: "8px", bottom: "auto" } : { top: "100%", marginTop: "8px", bottom: "auto" } : { top: "-40px", bottom: "auto" },
1803
1807
  ...u.rect.left + 200 > window.innerWidth ? { left: "auto", right: "0" } : { left: "0", right: "auto" }
1804
1808
  },
1805
1809
  children: [
1806
- /* @__PURE__ */ o.jsx(tr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1307", size: 16 }),
1807
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1308", style: { display: "flex", flexDirection: "column" }, children: [
1808
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1309", style: { fontWeight: 700 }, children: r.selectToComment }),
1809
- /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1310", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
1810
+ /* @__PURE__ */ o.jsx(rr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1310", size: 16 }),
1811
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1311", style: { display: "flex", flexDirection: "column" }, children: [
1812
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1312", style: { fontWeight: 700 }, children: r.selectToComment }),
1813
+ /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1313", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
1810
1814
  Math.round(u.rect.width),
1811
1815
  " × ",
1812
1816
  Math.round(u.rect.height)
@@ -1817,7 +1821,7 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1817
1821
  )
1818
1822
  }
1819
1823
  ),
1820
- m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1320", className: "vg-animate-fade", style: {
1824
+ m && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1323", className: "vg-animate-fade", style: {
1821
1825
  position: "fixed",
1822
1826
  top: 0,
1823
1827
  left: 0,
@@ -1828,14 +1832,14 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1828
1832
  display: "flex",
1829
1833
  alignItems: "center",
1830
1834
  justifyContent: "center",
1831
- zIndex: Ne
1832
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1325", className: "vg-glassmorphism vg-animate-slide", style: {
1835
+ zIndex: Le
1836
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1328", className: "vg-glassmorphism vg-animate-slide", style: {
1833
1837
  padding: "40px",
1834
1838
  width: "500px",
1835
1839
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
1836
1840
  }, children: [
1837
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1329", style: { textAlign: "center", marginBottom: "32px" }, children: [
1838
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1330", style: {
1841
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1332", style: { textAlign: "center", marginBottom: "32px" }, children: [
1842
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1333", style: {
1839
1843
  width: "48px",
1840
1844
  height: "48px",
1841
1845
  background: "var(--vg-primary-gradient)",
@@ -1846,11 +1850,11 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1846
1850
  margin: "0 auto 16px",
1847
1851
  color: "white",
1848
1852
  boxShadow: "0 8px 16px rgba(99, 102, 241, 0.3)"
1849
- }, children: /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1335", size: 24 }) }),
1850
- /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1337", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
1851
- /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1338", style: { margin: 0, color: "#000000", fontSize: "15px" }, children: r.feedbackSubheader })
1853
+ }, children: /* @__PURE__ */ o.jsx(ke, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1338", size: 24 }) }),
1854
+ /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1340", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
1855
+ /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1341", style: { margin: 0, color: "#000000", fontSize: "15px" }, children: r.feedbackSubheader })
1852
1856
  ] }),
1853
- m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1342", style: {
1857
+ m.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1345", style: {
1854
1858
  marginBottom: "24px",
1855
1859
  borderRadius: "12px",
1856
1860
  overflow: "hidden",
@@ -1871,18 +1875,18 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1871
1875
  {
1872
1876
  className: "vg-textarea",
1873
1877
  value: f,
1874
- onChange: (d) => w(d.target.value),
1878
+ onChange: (d) => b(d.target.value),
1875
1879
  rows: 4,
1876
1880
  placeholder: r.placeholder,
1877
1881
  autoFocus: !0,
1878
1882
  style: { fontSize: "15px", padding: "16px", marginBottom: "24px" }
1879
1883
  }
1880
1884
  ),
1881
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1369", style: { display: "flex", gap: "12px" }, children: [
1885
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1372", style: { display: "flex", gap: "12px" }, children: [
1882
1886
  /* @__PURE__ */ o.jsx(
1883
1887
  "button",
1884
1888
  {
1885
- onClick: () => !T && x(null),
1889
+ onClick: () => !T && w(null),
1886
1890
  className: "vg-button-ghost",
1887
1891
  disabled: T,
1888
1892
  style: { flex: 1, padding: "12px" },
@@ -1892,19 +1896,19 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1892
1896
  /* @__PURE__ */ o.jsx(
1893
1897
  "button",
1894
1898
  {
1895
- onClick: _t,
1899
+ onClick: Tt,
1896
1900
  className: "vg-button-primary",
1897
1901
  disabled: T || !f.trim(),
1898
1902
  style: { flex: 2 },
1899
- children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1384", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1900
- T ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1385", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(ir, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1385", size: 18 }),
1901
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1386", children: T ? r.submitting : r.sendFeedback || "Send Comment" })
1903
+ children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1387", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1904
+ T ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1388", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(cr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1388", size: 18 }),
1905
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1389", children: T ? r.submitting : r.sendFeedback || "Send Comment" })
1902
1906
  ] })
1903
1907
  }
1904
1908
  )
1905
1909
  ] })
1906
1910
  ] }) }),
1907
- A && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1396", className: "vg-animate-fade", style: {
1911
+ P && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1399", className: "vg-animate-fade", style: {
1908
1912
  position: "fixed",
1909
1913
  top: 0,
1910
1914
  left: 0,
@@ -1915,48 +1919,52 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1915
1919
  display: "flex",
1916
1920
  alignItems: "center",
1917
1921
  justifyContent: "center",
1918
- zIndex: Ne
1919
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1401", className: "vg-glassmorphism vg-animate-slide", style: {
1922
+ zIndex: Le
1923
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1404", className: "vg-glassmorphism vg-animate-slide", style: {
1920
1924
  padding: "32px",
1921
1925
  width: "650px",
1922
1926
  maxHeight: "85vh",
1923
1927
  display: "flex",
1924
1928
  flexDirection: "column"
1925
1929
  }, children: [
1926
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1405", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
1927
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1406", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
1928
- /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1407", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: B ? r.commentDetails : r.annotations }),
1929
- !B && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1411", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: _.length })
1930
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1408", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
1931
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1409", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
1932
+ /* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1410", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: q ? r.commentDetails : r.annotations }),
1933
+ !q && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1414", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: V.length })
1930
1934
  ] }),
1931
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1416", style: { display: "flex", gap: "8px" }, children: [
1932
- B && /* @__PURE__ */ o.jsx(
1935
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1419", style: { display: "flex", gap: "8px" }, children: [
1936
+ q && /* @__PURE__ */ o.jsx(
1933
1937
  "button",
1934
1938
  {
1935
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1418",
1939
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1421",
1936
1940
  className: "vg-button-ghost",
1937
1941
  style: { padding: "6px 14px", fontSize: "12px" },
1938
- onClick: () => re(null),
1942
+ onClick: () => ne(null),
1939
1943
  children: r.viewAll || "View All"
1940
1944
  }
1941
1945
  ),
1942
1946
  /* @__PURE__ */ o.jsx(
1943
1947
  "button",
1944
1948
  {
1945
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1426",
1949
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1429",
1946
1950
  className: "vg-button-ghost",
1947
1951
  style: { padding: "8px", borderRadius: "50%" },
1948
1952
  onClick: () => {
1949
- F(!1), re(null);
1953
+ W(!1), ne(null);
1950
1954
  },
1951
- children: /* @__PURE__ */ o.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1431", size: 20 })
1955
+ children: /* @__PURE__ */ o.jsx(Ge, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1434", size: 20 })
1952
1956
  }
1953
1957
  )
1954
1958
  ] })
1955
1959
  ] }),
1956
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1436", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: ce ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1438", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1439", className: "vg-spinner" }) }) : (B ? _.filter((d) => d._id === B) : _).map((d, h) => /* @__PURE__ */ o.jsxs(
1960
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1439", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: de ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1441", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1442", className: "vg-spinner" }) }) : (() => {
1961
+ if (!q) return V;
1962
+ const d = pe.find((h) => h.annotations.some((y) => y._id === q));
1963
+ return d ? d.annotations : V.filter((h) => h._id === q);
1964
+ })().map((d, h) => /* @__PURE__ */ o.jsxs(
1957
1965
  "div",
1958
1966
  {
1959
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1443",
1967
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1451",
1960
1968
  className: "vg-glassmorphism vg-animate-slide",
1961
1969
  style: {
1962
1970
  padding: "20px",
@@ -1966,43 +1974,43 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
1966
1974
  animationDelay: `${h * 0.05}s`
1967
1975
  },
1968
1976
  children: [
1969
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1454", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1455", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
1970
- d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1457", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
1971
- /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1458", size: 14 }),
1977
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1462", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1463", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
1978
+ d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1465", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
1979
+ /* @__PURE__ */ o.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1466", size: 14 }),
1972
1980
  " ",
1973
1981
  r.readyForReview
1974
- ] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1461", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
1975
- /* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1462", size: 14 }),
1982
+ ] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1469", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
1983
+ /* @__PURE__ */ o.jsx(qt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1470", size: 14 }),
1976
1984
  " ",
1977
1985
  r.pending
1978
1986
  ] }),
1979
- /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1465", style: { fontSize: "12px", color: "#000000" }, children: un(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
1987
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1473", style: { fontSize: "12px", color: "#000000" }, children: dt(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
1980
1988
  ] }) }),
1981
- Ue === d._id ? /* @__PURE__ */ o.jsx(
1989
+ Be === d._id ? /* @__PURE__ */ o.jsx(
1982
1990
  "textarea",
1983
1991
  {
1984
1992
  className: "vg-textarea",
1985
1993
  value: qe,
1986
- onChange: (g) => Ye(g.target.value),
1994
+ onChange: (y) => Ye(y.target.value),
1987
1995
  rows: 3,
1988
1996
  autoFocus: !0,
1989
1997
  style: { marginBottom: "16px" }
1990
1998
  }
1991
- ) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1481", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
1992
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1484", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: Ue === d._id ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1999
+ ) : /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1489", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
2000
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1492", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: Be === d._id ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1993
2001
  /* @__PURE__ */ o.jsx(
1994
2002
  "button",
1995
2003
  {
1996
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1487",
2004
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1495",
1997
2005
  className: "vg-button-primary vg-animate-pop",
1998
2006
  style: { padding: "8px 16px", fontSize: "13px" },
1999
2007
  onClick: async () => {
2000
2008
  try {
2001
- (await fetch(`${a}/api/annotations/${d._id}`, {
2009
+ (await fetch(`${s}/api/annotations/${d._id}`, {
2002
2010
  method: "PATCH",
2003
2011
  headers: { "Content-Type": "application/json", "x-api-key": n },
2004
2012
  body: JSON.stringify({ message: qe })
2005
- })).ok && (Te(null), ee(), e(r.updateSuccess, "success"));
2013
+ })).ok && (_e(null), ee(), e(r.updateSuccess, "success"));
2006
2014
  } catch {
2007
2015
  e(r.error, "error");
2008
2016
  }
@@ -2010,19 +2018,19 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2010
2018
  children: r.save
2011
2019
  }
2012
2020
  ),
2013
- /* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1509", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => Te(null), children: r.cancel })
2021
+ /* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1517", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => _e(null), children: r.cancel })
2014
2022
  ] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
2015
2023
  /* @__PURE__ */ o.jsxs(
2016
2024
  "button",
2017
2025
  {
2018
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1513",
2026
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1521",
2019
2027
  className: "vg-button-ghost vg-animate-pop",
2020
2028
  style: { padding: "8px 16px", fontSize: "13px" },
2021
2029
  onClick: () => {
2022
- Te(d._id), Ye(d.message);
2030
+ _e(d._id), Ye(d.message);
2023
2031
  },
2024
2032
  children: [
2025
- /* @__PURE__ */ o.jsx(nr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1521", size: 14 }),
2033
+ /* @__PURE__ */ o.jsx(ar, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1529", size: 14 }),
2026
2034
  " ",
2027
2035
  r.edit
2028
2036
  ]
@@ -2031,14 +2039,14 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2031
2039
  /* @__PURE__ */ o.jsxs(
2032
2040
  "button",
2033
2041
  {
2034
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1523",
2042
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1531",
2035
2043
  className: "vg-button-ghost vg-animate-pop",
2036
2044
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.05s" },
2037
2045
  onClick: () => {
2038
2046
  d.url && (window.location.href = d.url);
2039
2047
  },
2040
2048
  children: [
2041
- /* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1530", size: 14 }),
2049
+ /* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1538", size: 14 }),
2042
2050
  " ",
2043
2051
  r.review
2044
2052
  ]
@@ -2047,17 +2055,17 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2047
2055
  d.status === "pending" ? /* @__PURE__ */ o.jsxs(
2048
2056
  "button",
2049
2057
  {
2050
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1533",
2058
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1541",
2051
2059
  className: "vg-button-primary vg-animate-pop",
2052
2060
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
2053
2061
  onClick: () => {
2054
- H({
2062
+ B({
2055
2063
  title: r.markReadyConfirm,
2056
2064
  message: r.confirmMarkReady,
2057
2065
  type: "success",
2058
2066
  onConfirm: async () => {
2059
2067
  try {
2060
- (await fetch(`${a}/api/annotations/${d._id}`, {
2068
+ (await fetch(`${s}/api/annotations/${d._id}`, {
2061
2069
  method: "PATCH",
2062
2070
  headers: { "Content-Type": "application/json", "x-api-key": n },
2063
2071
  body: JSON.stringify({ status: "ready_for_review" })
@@ -2065,13 +2073,13 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2065
2073
  } catch {
2066
2074
  e(r.error, "error");
2067
2075
  } finally {
2068
- H(null);
2076
+ B(null);
2069
2077
  }
2070
2078
  }
2071
2079
  });
2072
2080
  },
2073
2081
  children: [
2074
- /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1561", size: 14 }),
2082
+ /* @__PURE__ */ o.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1569", size: 14 }),
2075
2083
  " ",
2076
2084
  r.markReady
2077
2085
  ]
@@ -2079,18 +2087,18 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2079
2087
  ) : /* @__PURE__ */ o.jsxs(
2080
2088
  "button",
2081
2089
  {
2082
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1564",
2090
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1572",
2083
2091
  className: "vg-button-ghost vg-animate-pop",
2084
2092
  style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
2085
2093
  onClick: () => {
2086
- H({
2094
+ B({
2087
2095
  title: r.reopenConfirm,
2088
2096
  message: r.confirmReopen,
2089
2097
  type: "success",
2090
2098
  // Reopening is a positive action, use success theme (indigo/check) or we could add a neutral theme
2091
2099
  onConfirm: async () => {
2092
2100
  try {
2093
- (await fetch(`${a}/api/annotations/${d._id}`, {
2101
+ (await fetch(`${s}/api/annotations/${d._id}`, {
2094
2102
  method: "PATCH",
2095
2103
  headers: { "Content-Type": "application/json", "x-api-key": n },
2096
2104
  body: JSON.stringify({ status: "pending" })
@@ -2098,13 +2106,13 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2098
2106
  } catch {
2099
2107
  e(r.error, "error");
2100
2108
  } finally {
2101
- H(null);
2109
+ B(null);
2102
2110
  }
2103
2111
  }
2104
2112
  });
2105
2113
  },
2106
2114
  children: [
2107
- /* @__PURE__ */ o.jsx(ar, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1592", size: 14 }),
2115
+ /* @__PURE__ */ o.jsx(or, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1600", size: 14 }),
2108
2116
  " ",
2109
2117
  r.reopen
2110
2118
  ]
@@ -2113,29 +2121,29 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2113
2121
  /* @__PURE__ */ o.jsx(
2114
2122
  "button",
2115
2123
  {
2116
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1595",
2124
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1603",
2117
2125
  className: "vg-button-ghost vg-animate-pop",
2118
2126
  style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
2119
2127
  onClick: () => {
2120
- H({
2128
+ B({
2121
2129
  title: r.deleteConfirm,
2122
2130
  message: r.confirmDelete,
2123
2131
  type: "danger",
2124
2132
  onConfirm: async () => {
2125
2133
  try {
2126
- (await fetch(`${a}/api/annotations/${d._id}`, {
2134
+ (await fetch(`${s}/api/annotations/${d._id}`, {
2127
2135
  method: "DELETE",
2128
2136
  headers: { "x-api-key": n }
2129
2137
  })).ok && (ee(), e(r.deleteSuccess, "success"));
2130
2138
  } catch {
2131
2139
  e(r.error, "error");
2132
2140
  } finally {
2133
- H(null);
2141
+ B(null);
2134
2142
  }
2135
2143
  }
2136
2144
  });
2137
2145
  },
2138
- children: /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1622", size: 16 })
2146
+ children: /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1630", size: 16 })
2139
2147
  }
2140
2148
  )
2141
2149
  ] }) })
@@ -2144,7 +2152,7 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2144
2152
  d._id
2145
2153
  )) })
2146
2154
  ] }) }),
2147
- $ && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1637", className: "vg-animate-fade", style: {
2155
+ G && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1645", className: "vg-animate-fade", style: {
2148
2156
  position: "fixed",
2149
2157
  top: 0,
2150
2158
  left: 0,
@@ -2155,36 +2163,36 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2155
2163
  display: "flex",
2156
2164
  alignItems: "center",
2157
2165
  justifyContent: "center",
2158
- zIndex: Ne + 100
2159
- }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1642", className: "vg-glassmorphism vg-animate-slide", style: {
2166
+ zIndex: Le + 100
2167
+ }, children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1650", className: "vg-glassmorphism vg-animate-slide", style: {
2160
2168
  padding: "40px",
2161
2169
  width: "420px",
2162
2170
  textAlign: "center",
2163
2171
  border: "1px solid rgba(255, 255, 255, 0.1)",
2164
2172
  boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.5)"
2165
2173
  }, children: [
2166
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1649", style: {
2174
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1657", style: {
2167
2175
  width: "64px",
2168
2176
  height: "64px",
2169
- background: $.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
2177
+ background: G.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
2170
2178
  borderRadius: "20px",
2171
2179
  display: "flex",
2172
2180
  alignItems: "center",
2173
2181
  justifyContent: "center",
2174
2182
  margin: "0 auto 24px",
2175
- color: $.type === "danger" ? "#ef4444" : "#6366f1",
2183
+ color: G.type === "danger" ? "#ef4444" : "#6366f1",
2176
2184
  transform: "rotate(-5deg)"
2177
- }, children: $.type === "danger" ? /* @__PURE__ */ o.jsx(rt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1658", size: 32 }) : /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1658", size: 32 }) }),
2178
- /* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1660", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children: $.title }),
2179
- /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1661", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children: $.message }),
2180
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1662", style: { display: "flex", gap: "16px" }, children: [
2185
+ }, children: G.type === "danger" ? /* @__PURE__ */ o.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1666", size: 32 }) : /* @__PURE__ */ o.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1666", size: 32 }) }),
2186
+ /* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1668", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children: G.title }),
2187
+ /* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1669", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children: G.message }),
2188
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1670", style: { display: "flex", gap: "16px" }, children: [
2181
2189
  /* @__PURE__ */ o.jsx(
2182
2190
  "button",
2183
2191
  {
2184
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1663",
2192
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1671",
2185
2193
  className: "vg-button-ghost",
2186
2194
  style: { flex: 1, height: "44px" },
2187
- onClick: () => !Q && H(null),
2195
+ onClick: () => !Q && B(null),
2188
2196
  disabled: Q,
2189
2197
  children: r.no
2190
2198
  }
@@ -2192,13 +2200,13 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2192
2200
  /* @__PURE__ */ o.jsx(
2193
2201
  "button",
2194
2202
  {
2195
- "data-source-path": "/src/components/ViewGateOverlay.tsx:1671",
2203
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:1679",
2196
2204
  className: "vg-button-primary",
2197
2205
  style: {
2198
2206
  flex: 1,
2199
2207
  height: "44px",
2200
- backgroundColor: $.type === "danger" ? "#ef4444" : void 0,
2201
- backgroundImage: $.type === "danger" ? "none" : void 0,
2208
+ backgroundColor: G.type === "danger" ? "#ef4444" : void 0,
2209
+ backgroundImage: G.type === "danger" ? "none" : void 0,
2202
2210
  display: "flex",
2203
2211
  alignItems: "center",
2204
2212
  justifyContent: "center",
@@ -2206,82 +2214,89 @@ const Oe = 2147483647, Le = Oe, Ne = 2e6, an = Oe - 10, on = Oe - 5, cn = Oe - 1
2206
2214
  },
2207
2215
  disabled: Q,
2208
2216
  onClick: async () => {
2209
- le(!0);
2217
+ ue(!0);
2210
2218
  try {
2211
- await $.onConfirm();
2219
+ await G.onConfirm();
2212
2220
  } catch (d) {
2213
2221
  console.error("Confirmation error:", d);
2214
2222
  } finally {
2215
- le(!1);
2223
+ ue(!1);
2216
2224
  }
2217
2225
  },
2218
- children: Q ? /* @__PURE__ */ o.jsx(Kt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1696", size: 18, className: "vg-animate-spin" }) : r.yes
2226
+ children: Q ? /* @__PURE__ */ o.jsx(Qt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1704", size: 18, className: "vg-animate-spin" }) : r.yes
2219
2227
  }
2220
2228
  )
2221
2229
  ] })
2222
2230
  ] }) }),
2223
- !c && !A && _.map((d, h) => {
2224
- const g = jt[d._id];
2225
- if (!g) return null;
2226
- const C = _.slice(0, h).filter(
2227
- (E) => E.reference?.selector && E.reference.selector === d.reference?.selector
2228
- ).length * 34;
2231
+ !c && !P && pe.map((d, h) => {
2232
+ const { rect: y, annotations: _, isModal: O } = d, C = _[0], g = _.length;
2229
2233
  return /* @__PURE__ */ o.jsxs(
2230
2234
  "div",
2231
2235
  {
2232
2236
  className: "vg-pin-container vg-animate-pop",
2233
2237
  style: {
2234
2238
  position: "fixed",
2235
- top: g.top - 20 - window.scrollY,
2236
- left: g.left + g.width / 2 - 16 + C - window.scrollX,
2239
+ top: y.top - 20,
2240
+ left: y.left + y.width / 2 - 16,
2237
2241
  cursor: "pointer",
2238
- animationDelay: `${h * 0.08}s`,
2239
2242
  transition: "all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",
2240
- zIndex: cn - h
2241
- // Ensure staggered pins don't overlap tooltips weirdly
2243
+ zIndex: ln
2242
2244
  },
2243
- onMouseEnter: (E) => {
2244
- const S = E.currentTarget.getBoundingClientRect();
2245
- window.innerHeight - S.bottom < 180 ? be((Y) => ({ ...Y, [d._id]: "vg-top" })) : be((Y) => ({ ...Y, [d._id]: "" }));
2245
+ onMouseEnter: (v) => {
2246
+ window.innerHeight - y.bottom < 250 ? ve((N) => ({ ...N, [d.id]: "vg-top" })) : ve((N) => ({ ...N, [d.id]: "" }));
2246
2247
  },
2247
2248
  onClick: () => {
2248
- F(!0), re(d._id);
2249
+ W(!0), ne(C._id);
2249
2250
  },
2250
2251
  children: [
2251
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1743", className: `vg-pin-tooltip ${ve[d._id] || ""}`, children: [
2252
- /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1744", style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
2253
- d.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1746", style: { display: "flex", alignItems: "center", gap: "6px", color: "#16a34a", fontWeight: 700, fontSize: "11px" }, children: [
2254
- /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1747", size: 12 }),
2255
- " ",
2256
- r.readyForReview
2257
- ] }) : /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1750", style: { display: "flex", alignItems: "center", gap: "6px", color: g.isModal ? "#f59e0b" : "#ea580c", fontWeight: 700, fontSize: "11px" }, children: [
2258
- /* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1751", size: 12 }),
2259
- " ",
2260
- r.pending
2252
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1743", className: `vg-pin-tooltip ${we[d.id] || ""}`, style: { width: "280px", padding: "16px" }, children: [
2253
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1744", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "12px" }, children: [
2254
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1745", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2255
+ /* @__PURE__ */ o.jsx(ke, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1746", size: 14, color: "#6366f1" }),
2256
+ /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1747", style: { fontWeight: 800, fontSize: "13px", color: "#0f172a" }, children: [
2257
+ g,
2258
+ " ",
2259
+ g === 1 ? "Comentario" : "Comentarios"
2260
+ ] })
2261
2261
  ] }),
2262
- g.isModal && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1755", style: { display: "flex", alignItems: "center", gap: "6px", color: "#f59e0b", fontWeight: 700, fontSize: "11px", marginLeft: "auto" }, children: /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1756", children: "MODAL" }) })
2262
+ O && /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1752", className: "vg-badge", style: { fontSize: "10px", background: "#fef3c7", color: "#92400e", border: "none" }, children: "MODAL" })
2263
2263
  ] }),
2264
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1760", style: { fontWeight: 500, color: "#1e293b", lineHeight: 1.4 }, children: d.message })
2264
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1755", className: "vg-tooltip-scroll", style: { maxHeight: "180px", overflowY: "auto" }, children: _.map((v, D) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1757", style: {
2265
+ padding: "10px 0",
2266
+ borderTop: D === 0 ? "none" : "1px solid #f1f5f9",
2267
+ display: "flex",
2268
+ flexDirection: "column",
2269
+ gap: "4px"
2270
+ }, children: [
2271
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
2272
+ /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1765", style: { fontSize: "10px", fontWeight: 600, color: "#64748b" }, children: dt(v.timestamp || v.createdAt, t) }),
2273
+ v.status === "ready_for_review" && /* @__PURE__ */ o.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1768", size: 12, color: "#22c55e" })
2274
+ ] }),
2275
+ /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1770", style: { fontSize: "13px", color: "#1e293b", lineHeight: 1.4, fontWeight: 500 }, children: v.message.length > 80 ? v.message.slice(0, 80) + "..." : v.message })
2276
+ ] }, v._id)) })
2265
2277
  ] }),
2266
- /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1763", className: `vg-formal-pin ${d.status === "ready_for_review" ? "ready" : ""} ${g.isModal ? "modal-variant" : ""}`, children: d.status === "ready_for_review" ? /* @__PURE__ */ o.jsx(ie, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", size: 18 }) : g.isModal ? /* @__PURE__ */ o.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", size: 16 }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", size: 16 }) })
2278
+ /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1778", className: `vg-formal-pin ${C.status === "ready_for_review" ? "ready" : ""} ${O ? "modal-variant" : ""}`, style: { position: "relative" }, children: [
2279
+ C.status === "ready_for_review" ? /* @__PURE__ */ o.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1779", size: 18 }) : O ? /* @__PURE__ */ o.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1779", size: 16 }) : /* @__PURE__ */ o.jsx(ke, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1779", size: 16 }),
2280
+ g > 1 && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1782", className: "vg-pin-badge vg-animate-pop", children: g })
2281
+ ] })
2267
2282
  ]
2268
2283
  },
2269
- `pin-${d._id}`
2284
+ `group-${d.id}`
2270
2285
  );
2271
2286
  })
2272
2287
  ] }) });
2273
2288
  };
2274
2289
  function Rt(e, t, r) {
2275
2290
  if (!t.endsWith(".tsx") && !t.endsWith(".jsx") || t.includes("node_modules")) return e;
2276
- const n = (c) => c.replace(/\\/g, "/"), a = n(t).replace(n(r), "");
2291
+ const n = (c) => c.replace(/\\/g, "/"), s = n(t).replace(n(r), "");
2277
2292
  return e.split(`
2278
2293
  `).map((c, p) => {
2279
2294
  const u = p + 1;
2280
- return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (v, m, x) => v.includes("data-source-path") || x === "Fragment" || x === "React.Fragment" ? v : `${m}<${x} data-source-path="${a}:${u}"`);
2295
+ return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (S, m, w) => S.includes("data-source-path") || w === "Fragment" || w === "React.Fragment" ? S : `${m}<${w} data-source-path="${s}:${u}"`);
2281
2296
  }).join(`
2282
2297
  `);
2283
2298
  }
2284
- function Sn() {
2299
+ function Rn() {
2285
2300
  return {
2286
2301
  name: "vite-plugin-viewgate",
2287
2302
  enforce: "pre",
@@ -2293,15 +2308,15 @@ function Sn() {
2293
2308
  }
2294
2309
  };
2295
2310
  }
2296
- function kn(e) {
2311
+ function jn(e) {
2297
2312
  const t = this.resourcePath;
2298
2313
  return t ? (process.env.NODE_ENV, Rt(e, t, process.cwd())) : e;
2299
2314
  }
2300
2315
  export {
2301
- En as ViewGate,
2316
+ kn as ViewGate,
2302
2317
  vn as ViewGateOverlay,
2303
2318
  Rt as transformSourcePaths,
2304
- ur as useViewGate,
2305
- kn as viewgateNextLoader,
2306
- Sn as viewgatePlugin
2319
+ pr as useViewGate,
2320
+ jn as viewgateNextLoader,
2321
+ Rn as viewgatePlugin
2307
2322
  };