viewgate-wrapper 1.10.14 → 1.10.16

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