viewgate-wrapper 1.9.2 → 1.9.3

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,9 +1,9 @@
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;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}@keyframes vg-pop-in{0%{transform:scale(.9) translateY(10px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}.vg-button-appear{animation:vg-pop-in .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import Ae, { createContext as Le, useState as C, useContext as Ge, useCallback as oe, useEffect as Z } from "react";
3
- var K = { exports: {} }, U = {};
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;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}@keyframes vg-pop-in{0%{transform:scale(.9) translateY(10px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}.vg-button-appear{animation:vg-pop-in .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import Ae, { createContext as Ge, useState as C, useContext as $e, useCallback as ae, useEffect as ue } from "react";
3
+ var J = { exports: {} }, H = {};
4
4
  var de;
5
- function $e() {
6
- if (de) return U;
5
+ function Le() {
6
+ if (de) return H;
7
7
  de = 1;
8
8
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
9
9
  function r(n, a, s) {
@@ -21,50 +21,50 @@ function $e() {
21
21
  props: s
22
22
  };
23
23
  }
24
- return U.Fragment = t, U.jsx = r, U.jsxs = r, U;
24
+ return H.Fragment = t, H.jsx = r, H.jsxs = r, H;
25
25
  }
26
- var Y = {};
26
+ var W = {};
27
27
  var fe;
28
28
  function Ie() {
29
29
  return fe || (fe = 1, process.env.NODE_ENV !== "production" && (function() {
30
30
  function e(o) {
31
31
  if (o == null) return null;
32
32
  if (typeof o == "function")
33
- return o.$$typeof === _ ? null : o.displayName || o.name || null;
33
+ return o.$$typeof === k ? null : o.displayName || o.name || null;
34
34
  if (typeof o == "string") return o;
35
35
  switch (o) {
36
- case A:
36
+ case P:
37
37
  return "Fragment";
38
- case B:
38
+ case Y:
39
39
  return "Profiler";
40
- case N:
40
+ case F:
41
41
  return "StrictMode";
42
- case M:
42
+ case D:
43
43
  return "Suspense";
44
- case ne:
44
+ case ee:
45
45
  return "SuspenseList";
46
- case J:
46
+ case q:
47
47
  return "Activity";
48
48
  }
49
49
  if (typeof o == "object")
50
50
  switch (typeof o.tag == "number" && console.error(
51
51
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
52
52
  ), o.$$typeof) {
53
- case q:
53
+ case U:
54
54
  return "Portal";
55
- case re:
55
+ case Q:
56
56
  return o.displayName || "Context";
57
- case D:
57
+ case N:
58
58
  return (o._context.displayName || "Context") + ".Consumer";
59
- case L:
60
- var p = o.render;
61
- return o = o.displayName, o || (o = p.displayName || p.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
62
- case se:
63
- return p = o.displayName || null, p !== null ? p : e(o.type) || "Memo";
64
- case H:
65
- p = o._payload, o = o._init;
59
+ case _:
60
+ var f = o.render;
61
+ return o = o.displayName, o || (o = f.displayName || f.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
62
+ case te:
63
+ return f = o.displayName || null, f !== null ? f : e(o.type) || "Memo";
64
+ case M:
65
+ f = o._payload, o = o._init;
66
66
  try {
67
- return e(o(p));
67
+ return e(o(f));
68
68
  } catch {
69
69
  }
70
70
  }
@@ -76,50 +76,50 @@ function Ie() {
76
76
  function r(o) {
77
77
  try {
78
78
  t(o);
79
- var p = !1;
79
+ var f = !1;
80
80
  } catch {
81
- p = !0;
81
+ f = !0;
82
82
  }
83
- if (p) {
84
- p = console;
85
- var x = p.error, w = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
83
+ if (f) {
84
+ f = console;
85
+ var x = f.error, w = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
86
86
  return x.call(
87
- p,
87
+ f,
88
88
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
89
89
  w
90
90
  ), t(o);
91
91
  }
92
92
  }
93
93
  function n(o) {
94
- if (o === A) return "<>";
95
- if (typeof o == "object" && o !== null && o.$$typeof === H)
94
+ if (o === P) return "<>";
95
+ if (typeof o == "object" && o !== null && o.$$typeof === M)
96
96
  return "<...>";
97
97
  try {
98
- var p = e(o);
99
- return p ? "<" + p + ">" : "<...>";
98
+ var f = e(o);
99
+ return f ? "<" + f + ">" : "<...>";
100
100
  } catch {
101
101
  return "<...>";
102
102
  }
103
103
  }
104
104
  function a() {
105
- var o = G.A;
105
+ var o = T.A;
106
106
  return o === null ? null : o.getOwner();
107
107
  }
108
108
  function s() {
109
109
  return Error("react-stack-top-frame");
110
110
  }
111
111
  function i(o) {
112
- if (j.call(o, "key")) {
113
- var p = Object.getOwnPropertyDescriptor(o, "key").get;
114
- if (p && p.isReactWarning) return !1;
112
+ if (V.call(o, "key")) {
113
+ var f = Object.getOwnPropertyDescriptor(o, "key").get;
114
+ if (f && f.isReactWarning) return !1;
115
115
  }
116
116
  return o.key !== void 0;
117
117
  }
118
- function c(o, p) {
118
+ function c(o, f) {
119
119
  function x() {
120
- X || (X = !0, console.error(
120
+ p || (p = !0, console.error(
121
121
  "%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)",
122
- p
122
+ f
123
123
  ));
124
124
  }
125
125
  x.isReactWarning = !0, Object.defineProperty(o, "key", {
@@ -129,19 +129,19 @@ function Ie() {
129
129
  }
130
130
  function u() {
131
131
  var o = e(this.type);
132
- return W[o] || (W[o] = !0, console.error(
132
+ return h[o] || (h[o] = !0, console.error(
133
133
  "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."
134
134
  )), o = this.props.ref, o !== void 0 ? o : null;
135
135
  }
136
- function d(o, p, x, w, $, R) {
137
- var y = x.ref;
136
+ function d(o, f, x, w, B, ne) {
137
+ var v = x.ref;
138
138
  return o = {
139
- $$typeof: k,
139
+ $$typeof: R,
140
140
  type: o,
141
- key: p,
141
+ key: f,
142
142
  props: x,
143
143
  _owner: w
144
- }, (y !== void 0 ? y : null) !== null ? Object.defineProperty(o, "ref", {
144
+ }, (v !== void 0 ? v : null) !== null ? Object.defineProperty(o, "ref", {
145
145
  enumerable: !1,
146
146
  get: u
147
147
  }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
@@ -158,33 +158,33 @@ function Ie() {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
- value: $
161
+ value: B
162
162
  }), Object.defineProperty(o, "_debugTask", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: R
166
+ value: ne
167
167
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
168
168
  }
169
- function h(o, p, x, w, $, R) {
170
- var y = p.children;
171
- if (y !== void 0)
169
+ function m(o, f, x, w, B, ne) {
170
+ var v = f.children;
171
+ if (v !== void 0)
172
172
  if (w)
173
- if (z(y)) {
174
- for (w = 0; w < y.length; w++)
175
- g(y[w]);
176
- Object.freeze && Object.freeze(y);
173
+ if (re(v)) {
174
+ for (w = 0; w < v.length; w++)
175
+ g(v[w]);
176
+ Object.freeze && Object.freeze(v);
177
177
  } else
178
178
  console.error(
179
179
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
180
180
  );
181
- else g(y);
182
- if (j.call(p, "key")) {
183
- y = e(o);
184
- var O = Object.keys(p).filter(function(Ve) {
181
+ else g(v);
182
+ if (V.call(f, "key")) {
183
+ v = e(o);
184
+ var $ = Object.keys(f).filter(function(Ve) {
185
185
  return Ve !== "key";
186
186
  });
187
- w = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", T[y + w] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
187
+ w = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", z[v + w] || ($ = 0 < $.length ? "{" + $.join(": ..., ") + ": ...}" : "{}", console.error(
188
188
  `A props object containing a "key" prop is being spread into JSX:
189
189
  let props = %s;
190
190
  <%s {...props} />
@@ -192,35 +192,35 @@ React keys must be passed directly to JSX without using spread:
192
192
  let props = %s;
193
193
  <%s key={someKey} {...props} />`,
194
194
  w,
195
- y,
196
- O,
197
- y
198
- ), T[y + w] = !0);
195
+ v,
196
+ $,
197
+ v
198
+ ), z[v + w] = !0);
199
199
  }
200
- if (y = null, x !== void 0 && (r(x), y = "" + x), i(p) && (r(p.key), y = "" + p.key), "key" in p) {
200
+ if (v = null, x !== void 0 && (r(x), v = "" + x), i(f) && (r(f.key), v = "" + f.key), "key" in f) {
201
201
  x = {};
202
- for (var ae in p)
203
- ae !== "key" && (x[ae] = p[ae]);
204
- } else x = p;
205
- return y && c(
202
+ for (var se in f)
203
+ se !== "key" && (x[se] = f[se]);
204
+ } else x = f;
205
+ return v && c(
206
206
  x,
207
207
  typeof o == "function" ? o.displayName || o.name || "Unknown" : o
208
208
  ), d(
209
209
  o,
210
- y,
210
+ v,
211
211
  x,
212
212
  a(),
213
- $,
214
- R
213
+ B,
214
+ ne
215
215
  );
216
216
  }
217
217
  function g(o) {
218
- v(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === H && (o._payload.status === "fulfilled" ? v(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
218
+ y(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === M && (o._payload.status === "fulfilled" ? y(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
219
219
  }
220
- function v(o) {
221
- return typeof o == "object" && o !== null && o.$$typeof === k;
220
+ function y(o) {
221
+ return typeof o == "object" && o !== null && o.$$typeof === R;
222
222
  }
223
- var E = Ae, k = /* @__PURE__ */ Symbol.for("react.transitional.element"), q = /* @__PURE__ */ Symbol.for("react.portal"), A = /* @__PURE__ */ Symbol.for("react.fragment"), N = /* @__PURE__ */ Symbol.for("react.strict_mode"), B = /* @__PURE__ */ Symbol.for("react.profiler"), D = /* @__PURE__ */ Symbol.for("react.consumer"), re = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), ne = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), H = /* @__PURE__ */ Symbol.for("react.lazy"), J = /* @__PURE__ */ Symbol.for("react.activity"), _ = /* @__PURE__ */ Symbol.for("react.client.reference"), G = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, z = Array.isArray, V = console.createTask ? console.createTask : function() {
223
+ var E = Ae, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), U = /* @__PURE__ */ Symbol.for("react.portal"), P = /* @__PURE__ */ Symbol.for("react.fragment"), F = /* @__PURE__ */ Symbol.for("react.strict_mode"), Y = /* @__PURE__ */ Symbol.for("react.profiler"), N = /* @__PURE__ */ Symbol.for("react.consumer"), Q = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), D = /* @__PURE__ */ Symbol.for("react.suspense"), ee = /* @__PURE__ */ Symbol.for("react.suspense_list"), te = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), q = /* @__PURE__ */ Symbol.for("react.activity"), k = /* @__PURE__ */ Symbol.for("react.client.reference"), T = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, re = Array.isArray, A = console.createTask ? console.createTask : function() {
224
224
  return null;
225
225
  };
226
226
  E = {
@@ -228,36 +228,36 @@ React keys must be passed directly to JSX without using spread:
228
228
  return o();
229
229
  }
230
230
  };
231
- var X, W = {}, f = E.react_stack_bottom_frame.bind(
231
+ var p, h = {}, O = E.react_stack_bottom_frame.bind(
232
232
  E,
233
233
  s
234
- )(), m = V(n(s)), T = {};
235
- Y.Fragment = A, Y.jsx = function(o, p, x) {
236
- var w = 1e4 > G.recentlyCreatedOwnerStacks++;
237
- return h(
234
+ )(), G = A(n(s)), z = {};
235
+ W.Fragment = P, W.jsx = function(o, f, x) {
236
+ var w = 1e4 > T.recentlyCreatedOwnerStacks++;
237
+ return m(
238
238
  o,
239
- p,
239
+ f,
240
240
  x,
241
241
  !1,
242
- w ? Error("react-stack-top-frame") : f,
243
- w ? V(n(o)) : m
242
+ w ? Error("react-stack-top-frame") : O,
243
+ w ? A(n(o)) : G
244
244
  );
245
- }, Y.jsxs = function(o, p, x) {
246
- var w = 1e4 > G.recentlyCreatedOwnerStacks++;
247
- return h(
245
+ }, W.jsxs = function(o, f, x) {
246
+ var w = 1e4 > T.recentlyCreatedOwnerStacks++;
247
+ return m(
248
248
  o,
249
- p,
249
+ f,
250
250
  x,
251
251
  !0,
252
- w ? Error("react-stack-top-frame") : f,
253
- w ? V(n(o)) : m
252
+ w ? Error("react-stack-top-frame") : O,
253
+ w ? A(n(o)) : G
254
254
  );
255
255
  };
256
- })()), Y;
256
+ })()), W;
257
257
  }
258
258
  var pe;
259
259
  function Fe() {
260
- return pe || (pe = 1, process.env.NODE_ENV === "production" ? K.exports = $e() : K.exports = Ie()), K.exports;
260
+ return pe || (pe = 1, process.env.NODE_ENV === "production" ? J.exports = Le() : J.exports = Ie()), J.exports;
261
261
  }
262
262
  var l = Fe();
263
263
  const Ne = {
@@ -325,20 +325,20 @@ const Ne = {
325
325
  updateSuccess: "Estado actualizado correctamente.",
326
326
  navigating: "Redirigiendo a revisión..."
327
327
  }
328
- }, be = Le(void 0), De = () => {
329
- const e = Ge(be);
328
+ }, be = Ge(void 0), De = () => {
329
+ const e = $e(be);
330
330
  if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
331
331
  return e;
332
332
  }, Ft = ({ children: e, language: t = "es", apiKey: r, baseUrl: n = "https://view-gate.vercel.app" }) => {
333
333
  const [a, s] = C([]), i = (u, d) => {
334
- const h = Date.now();
335
- s((g) => [...g, { id: h, message: u, type: d }]), setTimeout(() => {
336
- s((g) => g.filter((v) => v.id !== h));
334
+ const m = Date.now();
335
+ s((g) => [...g, { id: m, message: u, type: d }]), setTimeout(() => {
336
+ s((g) => g.filter((y) => y.id !== m));
337
337
  }, 4e3);
338
338
  }, c = Ne[t];
339
339
  return /* @__PURE__ */ l.jsxs(be.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:136", value: { addToast: i, language: t, t: c, apiKey: r, baseUrl: n }, children: [
340
340
  e,
341
- /* @__PURE__ */ l.jsx($t, { "data-source-path": "/src/components/ViewGateProvider.tsx:138" }),
341
+ /* @__PURE__ */ l.jsx(Lt, { "data-source-path": "/src/components/ViewGateProvider.tsx:138" }),
342
342
  /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:139", className: "vg-toasts", children: a.map((u) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:141", className: `vg-toast vg-glassmorphism vg-animate-slide ${u.type}`, children: [
343
343
  /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:142", style: { fontSize: "20px" }, children: u.type === "success" ? "✅" : "❌" }),
344
344
  /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:143", children: [
@@ -358,7 +358,7 @@ function Me(e, t) {
358
358
  const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), a = r.createElement("a");
359
359
  return r.head.appendChild(n), r.body.appendChild(a), t && (n.href = t), a.href = e, a.href;
360
360
  }
361
- const He = /* @__PURE__ */ (() => {
361
+ const ze = /* @__PURE__ */ (() => {
362
362
  let e = 0;
363
363
  const t = () => (
364
364
  // eslint-disable-next-line no-bitwise
@@ -366,30 +366,30 @@ const He = /* @__PURE__ */ (() => {
366
366
  );
367
367
  return () => (e += 1, `u${t()}${e}`);
368
368
  })();
369
- function P(e) {
369
+ function j(e) {
370
370
  const t = [];
371
371
  for (let r = 0, n = e.length; r < n; r++)
372
372
  t.push(e[r]);
373
373
  return t;
374
374
  }
375
- let I = null;
375
+ let L = null;
376
376
  function Ee(e = {}) {
377
- return I || (e.includeStyleProperties ? (I = e.includeStyleProperties, I) : (I = P(window.getComputedStyle(document.documentElement)), I));
377
+ return L || (e.includeStyleProperties ? (L = e.includeStyleProperties, L) : (L = j(window.getComputedStyle(document.documentElement)), L));
378
378
  }
379
- function Q(e, t) {
379
+ function X(e, t) {
380
380
  const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
381
381
  return n ? parseFloat(n.replace("px", "")) : 0;
382
382
  }
383
- function ze(e) {
384
- const t = Q(e, "border-left-width"), r = Q(e, "border-right-width");
383
+ function He(e) {
384
+ const t = X(e, "border-left-width"), r = X(e, "border-right-width");
385
385
  return e.clientWidth + t + r;
386
386
  }
387
387
  function We(e) {
388
- const t = Q(e, "border-top-width"), r = Q(e, "border-bottom-width");
388
+ const t = X(e, "border-top-width"), r = X(e, "border-bottom-width");
389
389
  return e.clientHeight + t + r;
390
390
  }
391
391
  function Se(e, t = {}) {
392
- const r = t.width || ze(e), n = t.height || We(e);
392
+ const r = t.width || He(e), n = t.height || We(e);
393
393
  return { width: r, height: n };
394
394
  }
395
395
  function Ue() {
@@ -405,7 +405,7 @@ const S = 16384;
405
405
  function Ye(e) {
406
406
  (e.width > S || e.height > S) && (e.width > S && e.height > S ? e.width > e.height ? (e.height *= S / e.width, e.width = S) : (e.width *= S / e.height, e.height = S) : e.width > S ? (e.height *= S / e.width, e.width = S) : (e.width *= S / e.height, e.height = S));
407
407
  }
408
- function ee(e) {
408
+ function Z(e) {
409
409
  return new Promise((t, r) => {
410
410
  const n = new Image();
411
411
  n.onload = () => {
@@ -446,7 +446,7 @@ function me(e, t, r, n) {
446
446
  const a = window.getComputedStyle(e, r), s = a.getPropertyValue("content");
447
447
  if (s === "" || s === "none")
448
448
  return;
449
- const i = He();
449
+ const i = ze();
450
450
  try {
451
451
  t.className = `${t.className} ${i}`;
452
452
  } catch {
@@ -475,14 +475,14 @@ function et(e) {
475
475
  const t = /\.([^./]*?)$/g.exec(e);
476
476
  return t ? t[1] : "";
477
477
  }
478
- function le(e) {
478
+ function ce(e) {
479
479
  const t = et(e).toLowerCase();
480
480
  return Qe[t] || "";
481
481
  }
482
482
  function tt(e) {
483
483
  return e.split(/,/)[1];
484
484
  }
485
- function ce(e) {
485
+ function ie(e) {
486
486
  return e.search(/^(data:)/) !== -1;
487
487
  }
488
488
  function rt(e, t) {
@@ -504,15 +504,15 @@ async function Ce(e, t, r) {
504
504
  }, c.readAsDataURL(a);
505
505
  });
506
506
  }
507
- const ie = {};
507
+ const oe = {};
508
508
  function nt(e, t, r) {
509
509
  let n = e.replace(/\?.*/, "");
510
510
  return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
511
511
  }
512
- async function ue(e, t, r) {
512
+ async function le(e, t, r) {
513
513
  const n = nt(e, t, r.includeQueryParams);
514
- if (ie[n] != null)
515
- return ie[n];
514
+ if (oe[n] != null)
515
+ return oe[n];
516
516
  r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
517
517
  let a;
518
518
  try {
@@ -523,27 +523,27 @@ async function ue(e, t, r) {
523
523
  let i = `Failed to fetch resource: ${e}`;
524
524
  s && (i = typeof s == "string" ? s : s.message), i && console.warn(i);
525
525
  }
526
- return ie[n] = a, a;
526
+ return oe[n] = a, a;
527
527
  }
528
528
  async function st(e) {
529
529
  const t = e.toDataURL();
530
- return t === "data:," ? e.cloneNode(!1) : ee(t);
530
+ return t === "data:," ? e.cloneNode(!1) : Z(t);
531
531
  }
532
532
  async function at(e, t) {
533
533
  if (e.currentSrc) {
534
534
  const s = document.createElement("canvas"), i = s.getContext("2d");
535
535
  s.width = e.clientWidth, s.height = e.clientHeight, i?.drawImage(e, 0, 0, s.width, s.height);
536
536
  const c = s.toDataURL();
537
- return ee(c);
537
+ return Z(c);
538
538
  }
539
- const r = e.poster, n = le(r), a = await ue(r, n, t);
540
- return ee(a);
539
+ const r = e.poster, n = ce(r), a = await le(r, n, t);
540
+ return Z(a);
541
541
  }
542
542
  async function ot(e, t) {
543
543
  var r;
544
544
  try {
545
545
  if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
546
- return await te(e.contentDocument.body, t, !0);
546
+ return await K(e.contentDocument.body, t, !0);
547
547
  } catch {
548
548
  }
549
549
  return e.cloneNode(!1);
@@ -557,7 +557,7 @@ async function lt(e, t, r) {
557
557
  if (Re(t))
558
558
  return t;
559
559
  let s = [];
560
- return ct(e) && e.assignedNodes ? s = P(e.assignedNodes()) : b(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = P(e.contentDocument.body.childNodes) : s = P(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || b(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => te(c, r)).then((u) => {
560
+ return ct(e) && e.assignedNodes ? s = j(e.assignedNodes()) : b(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = j(e.contentDocument.body.childNodes) : s = j(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || b(e, HTMLVideoElement) || await s.reduce((i, c) => i.then(() => K(c, r)).then((u) => {
561
561
  u && t.appendChild(u);
562
562
  }), Promise.resolve()), t;
563
563
  }
@@ -592,7 +592,7 @@ async function mt(e, t) {
592
592
  const c = r[s].getAttribute("xlink:href");
593
593
  if (c) {
594
594
  const u = e.querySelector(c), d = document.querySelector(c);
595
- !u && d && !n[c] && (n[c] = await te(d, t, !0));
595
+ !u && d && !n[c] && (n[c] = await K(d, t, !0));
596
596
  }
597
597
  }
598
598
  const a = Object.values(n);
@@ -607,7 +607,7 @@ async function mt(e, t) {
607
607
  }
608
608
  return e;
609
609
  }
610
- async function te(e, t, r) {
610
+ async function K(e, t, r) {
611
611
  return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => it(n, t)).then((n) => lt(e, n, t)).then((n) => pt(e, n, t)).then((n) => mt(n, t));
612
612
  }
613
613
  const ke = /url\((['"]?)([^'"]+?)\1\)/g, ht = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, gt = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
@@ -617,13 +617,13 @@ function xt(e) {
617
617
  }
618
618
  function yt(e) {
619
619
  const t = [];
620
- return e.replace(ke, (r, n, a) => (t.push(a), r)), t.filter((r) => !ce(r));
620
+ return e.replace(ke, (r, n, a) => (t.push(a), r)), t.filter((r) => !ie(r));
621
621
  }
622
622
  async function wt(e, t, r, n, a) {
623
623
  try {
624
- const s = r ? Me(t, r) : t, i = le(t);
624
+ const s = r ? Me(t, r) : t, i = ce(t);
625
625
  let c;
626
- return a || (c = await ue(s, i, n)), e.replace(xt(t), `$1${c}$3`);
626
+ return a || (c = await le(s, i, n)), e.replace(xt(t), `$1${c}$3`);
627
627
  } catch {
628
628
  }
629
629
  return e;
@@ -648,7 +648,7 @@ async function Te(e, t, r) {
648
648
  const n = vt(e, r);
649
649
  return yt(n).reduce((s, i) => s.then((c) => wt(c, i, t, r)), Promise.resolve(n));
650
650
  }
651
- async function F(e, t, r) {
651
+ async function I(e, t, r) {
652
652
  var n;
653
653
  const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
654
654
  if (a) {
@@ -658,13 +658,13 @@ async function F(e, t, r) {
658
658
  return !1;
659
659
  }
660
660
  async function bt(e, t) {
661
- await F("background", e, t) || await F("background-image", e, t), await F("mask", e, t) || await F("-webkit-mask", e, t) || await F("mask-image", e, t) || await F("-webkit-mask-image", e, t);
661
+ await I("background", e, t) || await I("background-image", e, t), await I("mask", e, t) || await I("-webkit-mask", e, t) || await I("mask-image", e, t) || await I("-webkit-mask-image", e, t);
662
662
  }
663
663
  async function Et(e, t) {
664
664
  const r = b(e, HTMLImageElement);
665
- if (!(r && !ce(e.src)) && !(b(e, SVGImageElement) && !ce(e.href.baseVal)))
665
+ if (!(r && !ie(e.src)) && !(b(e, SVGImageElement) && !ie(e.href.baseVal)))
666
666
  return;
667
- const n = r ? e.src : e.href.baseVal, a = await ue(n, le(n), t);
667
+ const n = r ? e.src : e.href.baseVal, a = await le(n, ce(n), t);
668
668
  await new Promise((s, i) => {
669
669
  e.onload = s, e.onerror = t.onImageErrorHandler ? (...u) => {
670
670
  try {
@@ -678,7 +678,7 @@ async function Et(e, t) {
678
678
  });
679
679
  }
680
680
  async function St(e, t) {
681
- const n = P(e.childNodes).map((a) => Oe(a, t));
681
+ const n = j(e.childNodes).map((a) => Oe(a, t));
682
682
  await Promise.all(n).then(() => e);
683
683
  }
684
684
  async function Oe(e, t) {
@@ -739,20 +739,20 @@ async function Rt(e, t) {
739
739
  return e.forEach((a) => {
740
740
  if ("cssRules" in a)
741
741
  try {
742
- P(a.cssRules || []).forEach((s, i) => {
742
+ j(a.cssRules || []).forEach((s, i) => {
743
743
  if (s.type === CSSRule.IMPORT_RULE) {
744
744
  let c = i + 1;
745
- const u = s.href, d = ye(u).then((h) => we(h, t)).then((h) => ve(h).forEach((g) => {
745
+ const u = s.href, d = ye(u).then((m) => we(m, t)).then((m) => ve(m).forEach((g) => {
746
746
  try {
747
747
  a.insertRule(g, g.startsWith("@import") ? c += 1 : a.cssRules.length);
748
- } catch (v) {
748
+ } catch (y) {
749
749
  console.error("Error inserting rule from remote css", {
750
750
  rule: g,
751
- error: v
751
+ error: y
752
752
  });
753
753
  }
754
- })).catch((h) => {
755
- console.error("Error loading remote css", h.toString());
754
+ })).catch((m) => {
755
+ console.error("Error loading remote css", m.toString());
756
756
  });
757
757
  n.push(d);
758
758
  }
@@ -768,7 +768,7 @@ async function Rt(e, t) {
768
768
  }), Promise.all(n).then(() => (e.forEach((a) => {
769
769
  if ("cssRules" in a)
770
770
  try {
771
- P(a.cssRules || []).forEach((s) => {
771
+ j(a.cssRules || []).forEach((s) => {
772
772
  r.push(s);
773
773
  });
774
774
  } catch (s) {
@@ -782,7 +782,7 @@ function kt(e) {
782
782
  async function jt(e, t) {
783
783
  if (e.ownerDocument == null)
784
784
  throw new Error("Provided element is not within a Document");
785
- const r = P(e.ownerDocument.styleSheets), n = await Rt(r, t);
785
+ const r = j(e.ownerDocument.styleSheets), n = await Rt(r, t);
786
786
  return kt(n);
787
787
  }
788
788
  function Pe(e) {
@@ -815,17 +815,17 @@ async function Pt(e, t) {
815
815
  }
816
816
  }
817
817
  async function _t(e, t = {}) {
818
- const { width: r, height: n } = Se(e, t), a = await te(e, t, !0);
818
+ const { width: r, height: n } = Se(e, t), a = await K(e, t, !0);
819
819
  return await Pt(a, t), await Oe(a, t), Ct(a, t), await Be(a, r, n);
820
820
  }
821
821
  async function Vt(e, t = {}) {
822
- const { width: r, height: n } = Se(e, t), a = await _t(e, t), s = await ee(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, h = t.canvasHeight || n;
823
- return i.width = d * u, i.height = h * u, t.skipAutoScale || Ye(i), i.style.width = `${d}`, i.style.height = `${h}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(s, 0, 0, i.width, i.height), i;
822
+ const { width: r, height: n } = Se(e, t), a = await _t(e, t), s = await Z(a), i = document.createElement("canvas"), c = i.getContext("2d"), u = t.pixelRatio || Ue(), d = t.canvasWidth || r, m = t.canvasHeight || n;
823
+ return i.width = d * u, i.height = m * u, t.skipAutoScale || Ye(i), i.style.width = `${d}`, i.style.height = `${m}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, i.width, i.height)), c.drawImage(s, 0, 0, i.width, i.height), i;
824
824
  }
825
825
  async function At(e, t = {}) {
826
826
  return (await Vt(e, t)).toDataURL();
827
827
  }
828
- const Lt = (e) => {
828
+ const Gt = (e) => {
829
829
  const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
830
830
  if (!r) return "";
831
831
  const n = [];
@@ -839,7 +839,7 @@ const Lt = (e) => {
839
839
  a = a.return;
840
840
  }
841
841
  return n.join(" > ") || "Generic Component";
842
- }, Gt = (e) => {
842
+ }, $t = (e) => {
843
843
  let t = "unknown:0", r = e;
844
844
  for (; r; ) {
845
845
  const d = r.getAttribute("data-source-path");
@@ -849,27 +849,27 @@ const Lt = (e) => {
849
849
  }
850
850
  r = r.parentElement;
851
851
  }
852
- const n = Lt(e), s = ((d) => {
853
- const h = [];
852
+ const n = Gt(e), s = ((d) => {
853
+ const m = [];
854
854
  let g = d;
855
855
  for (; g && g.nodeType === Node.ELEMENT_NODE; ) {
856
- let v = g.nodeName.toLowerCase();
856
+ let y = g.nodeName.toLowerCase();
857
857
  if (g.id) {
858
- v += "#" + g.id, h.unshift(v);
858
+ y += "#" + g.id, m.unshift(y);
859
859
  break;
860
860
  } else {
861
- let E = g, k = 1;
861
+ let E = g, R = 1;
862
862
  for (; E.previousElementSibling; )
863
- E = E.previousElementSibling, E.nodeName.toLowerCase() === v && k++;
864
- k > 1 && (v += `:nth-of-type(${k})`);
863
+ E = E.previousElementSibling, E.nodeName.toLowerCase() === y && R++;
864
+ R > 1 && (y += `:nth-of-type(${R})`);
865
865
  }
866
- h.unshift(v), g = g.parentElement;
866
+ m.unshift(y), g = g.parentElement;
867
867
  }
868
- return h.join(" > ");
868
+ return m.join(" > ");
869
869
  })(e), i = (e.innerText || "").slice(0, 50).trim(), c = {};
870
870
  ["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((d) => {
871
- const h = e.getAttribute(d);
872
- h && (c[d] = h);
871
+ const m = e.getAttribute(d);
872
+ m && (c[d] = m);
873
873
  });
874
874
  const u = `${e.tagName.toLowerCase()}-${i.replace(/\s+/g, "_")}-${s.split(" > ").slice(-2).join("_")}`;
875
875
  return {
@@ -889,82 +889,50 @@ const Lt = (e) => {
889
889
  hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`
890
890
  }
891
891
  };
892
- }, $t = () => {
893
- const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, h] = C(null), [g, v] = C(""), [E, k] = C(!1), [q, A] = C(!1), [N, B] = C(!1), [D, re] = C([]), [L, M] = C(null), [ne, se] = C(!1), [H, J] = C(!1), [_, G] = C(null), j = oe(async () => {
892
+ }, Lt = () => {
893
+ const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d, m] = C(null), [g, y] = C(""), [E, R] = C(!1), [U, P] = C(!1), [F, Y] = C(!1), [N, Q] = C([]), [_, D] = C(null), [ee, te] = C(!1), [M, q] = C(!1), k = ae(async () => {
894
894
  if (n) {
895
- J(!0);
895
+ q(!0);
896
896
  try {
897
- const f = await fetch(`${a}/api/annotations`, {
897
+ const p = await fetch(`${a}/api/annotations`, {
898
898
  headers: { "x-api-key": n }
899
899
  });
900
- if (f.ok) {
901
- const m = await f.json();
902
- re(m);
900
+ if (p.ok) {
901
+ const h = await p.json();
902
+ Q(h);
903
903
  }
904
- } catch (f) {
905
- console.error("Failed to fetch annotations", f);
904
+ } catch (p) {
905
+ console.error("Failed to fetch annotations", p);
906
906
  } finally {
907
- J(!1);
907
+ q(!1);
908
908
  }
909
909
  }
910
910
  }, [n, a]);
911
- Z(() => {
912
- const f = () => {
913
- const m = window.location.hash;
914
- if (m.includes("vg_hl=")) {
915
- const o = m.split("vg_hl=")[1];
916
- if (!o) return;
917
- const p = decodeURIComponent(o);
918
- [100, 500, 1e3, 2e3].forEach((w) => {
919
- setTimeout(() => {
920
- const $ = document.querySelectorAll("*");
921
- for (const R of $)
922
- if (R.tagName.toLowerCase() === p.split("-")[0]) {
923
- const y = R.getBoundingClientRect();
924
- if (y.width > 0 && y.height > 0) {
925
- const O = (R.innerText || "").slice(0, 50).trim().replace(/\s+/g, "_");
926
- if (p.includes(O)) {
927
- R.classList.add("vg-highlight-active"), G(R), R.scrollIntoView({ behavior: "smooth", block: "center" });
928
- break;
929
- }
930
- }
931
- }
932
- }, w);
933
- });
934
- }
935
- };
936
- return f(), window.addEventListener("hashchange", f), () => window.removeEventListener("hashchange", f);
937
- }, []), Z(() => {
938
- if (!_) return;
939
- const f = () => {
940
- _.classList.remove("vg-highlight-active"), G(null), window.history.replaceState && window.history.replaceState(null, "", window.location.pathname + window.location.search);
941
- };
942
- return _.addEventListener("mouseover", f), () => _.removeEventListener("mouseover", f);
943
- }, [_]), Z(() => {
944
- j();
945
- }, [j]);
946
- const z = oe((f) => {
911
+ ue(() => {
912
+ k();
913
+ }, [k]);
914
+ const T = ae((p) => {
947
915
  if (!s || d) return;
948
- const m = document.elementFromPoint(f.clientX, f.clientY);
949
- if (!m || m.id === "viewgate-overlay" || m.closest("#viewgate-ui")) {
916
+ const h = document.elementFromPoint(p.clientX, p.clientY);
917
+ if (!h || h.id === "viewgate-overlay" || h.closest("#viewgate-ui")) {
950
918
  u(null);
951
919
  return;
952
920
  }
953
- m.getAttribute("data-source-path"), u({
954
- tag: m.tagName.toLowerCase(),
955
- source: m.getAttribute("data-source-path") || "unknown:0",
956
- rect: m.getBoundingClientRect(),
957
- element: m,
958
- previewText: (m.innerText || "").slice(0, 100) || (m.getAttribute("placeholder") || "").slice(0, 100) || m.tagName.toLowerCase(),
959
- semanticReference: Gt(m)
921
+ h.getAttribute("data-source-path"), u({
922
+ tag: h.tagName.toLowerCase(),
923
+ source: h.getAttribute("data-source-path") || "unknown:0",
924
+ rect: h.getBoundingClientRect(),
925
+ element: h,
926
+ previewText: (h.innerText || "").slice(0, 100) || (h.getAttribute("placeholder") || "").slice(0, 100) || h.tagName.toLowerCase(),
927
+ semanticReference: $t(h)
960
928
  });
961
- }, [s, d]), V = oe(async (f) => {
929
+ }, [s, d]), V = ae(async (p) => {
962
930
  if (!(!s || d) && c) {
963
- f.preventDefault(), f.stopPropagation(), A(!0);
931
+ p.preventDefault(), p.stopPropagation(), P(!0);
964
932
  try {
965
- const m = c.element.style.display, T = window.getComputedStyle(c.element).display === "inline";
966
- T && (c.element.style.display = "inline-block");
967
- const o = await At(c.element, {
933
+ const h = c.element.style.display, O = window.getComputedStyle(c.element).display === "inline";
934
+ O && (c.element.style.display = "inline-block");
935
+ const G = await At(c.element, {
968
936
  pixelRatio: 2,
969
937
  skipFonts: !1,
970
938
  cacheBust: !0,
@@ -973,21 +941,21 @@ const Lt = (e) => {
973
941
  padding: "4px"
974
942
  }
975
943
  });
976
- T && (c.element.style.display = m), h({ ...c, visualPreview: o });
977
- } catch (m) {
978
- console.error("Failed to capture preview:", m), h(c);
944
+ O && (c.element.style.display = h), m({ ...c, visualPreview: G });
945
+ } catch (h) {
946
+ console.error("Failed to capture preview:", h), m(c);
979
947
  } finally {
980
- A(!1), u(null);
948
+ P(!1), u(null);
981
949
  }
982
950
  }
983
- }, [s, c, d, N]);
984
- Z(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", z), window.addEventListener("click", V, !0), () => {
985
- document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", z), window.removeEventListener("click", V, !0);
986
- }), [s, d, z, V]);
987
- const X = async () => {
951
+ }, [s, c, d, F]);
952
+ ue(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", T), window.addEventListener("click", V, !0), () => {
953
+ document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", T), window.removeEventListener("click", V, !0);
954
+ }), [s, d, T, V]);
955
+ const re = async () => {
988
956
  if (!d || !g.trim()) return;
989
- k(!0);
990
- const { semanticReference: f } = d, [m, T] = f.source.split(":"), o = T || "0";
957
+ R(!0);
958
+ const { semanticReference: p } = d, [h, O] = p.source.split(":"), G = O || "0";
991
959
  try {
992
960
  if (!(await fetch(`${a}/api/annotations`, {
993
961
  method: "POST",
@@ -996,23 +964,23 @@ const Lt = (e) => {
996
964
  "x-api-key": n
997
965
  },
998
966
  body: JSON.stringify({
999
- filePath: m,
1000
- line: parseInt(o),
967
+ filePath: h,
968
+ line: parseInt(G),
1001
969
  url: window.location.href,
1002
970
  message: g,
1003
- componentName: f.componentPath || d.tag,
1004
- reference: f
971
+ componentName: p.componentPath || d.tag,
972
+ reference: p
1005
973
  })
1006
974
  })).ok) throw new Error("Backend failed");
1007
- e(r.success, "success"), h(null), v(""), i(!1), j();
1008
- } catch (p) {
1009
- console.error(p), e(r.error, "error");
975
+ e(r.success, "success"), m(null), y(""), i(!1), k();
976
+ } catch (z) {
977
+ console.error(z), e(r.error, "error");
1010
978
  } finally {
1011
- k(!1);
979
+ R(!1);
1012
980
  }
1013
- }, W = (f) => f.split("/").pop()?.split("\\").pop() || "unknown";
981
+ }, A = (p) => p.split("/").pop()?.split("\\").pop() || "unknown";
1014
982
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1015
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:345", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
983
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:282", style: { position: "fixed", bottom: "30px", right: "30px", zIndex: 99999 }, id: "viewgate-ui", children: [
1016
984
  /* @__PURE__ */ l.jsx(
1017
985
  "button",
1018
986
  {
@@ -1022,11 +990,11 @@ const Lt = (e) => {
1022
990
  children: s ? r.exitMode : r.enterMode
1023
991
  }
1024
992
  ),
1025
- D.length > 0 && /* @__PURE__ */ l.jsx(
993
+ N.length > 0 && /* @__PURE__ */ l.jsx(
1026
994
  "button",
1027
995
  {
1028
996
  onClick: () => {
1029
- B(!N), i(!1), h(null);
997
+ Y(!F), i(!1), m(null);
1030
998
  },
1031
999
  className: "vg-button-ghost vg-button-appear",
1032
1000
  style: { padding: "12px 24px", fontSize: "15px", marginLeft: "12px", background: "white" },
@@ -1035,7 +1003,7 @@ const Lt = (e) => {
1035
1003
  "view-comments"
1036
1004
  )
1037
1005
  ] }),
1038
- q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:371", style: {
1006
+ U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:308", style: {
1039
1007
  position: "fixed",
1040
1008
  top: 0,
1041
1009
  left: 0,
@@ -1047,11 +1015,11 @@ const Lt = (e) => {
1047
1015
  justifyContent: "center",
1048
1016
  zIndex: 1e5,
1049
1017
  cursor: "wait"
1050
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:384", className: "vg-glassmorphism", style: { padding: "30px 50px", fontWeight: 700, display: "flex", flexDirection: "column", alignItems: "center", backgroundColor: "rgba(0,0,0,0.7)", color: "white", border: "1px solid rgba(255,255,255,0.1)" }, children: [
1051
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:385", className: "vg-spinner" }),
1018
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:321", className: "vg-glassmorphism", style: { padding: "30px 50px", fontWeight: 700, display: "flex", flexDirection: "column", alignItems: "center", backgroundColor: "rgba(0,0,0,0.7)", color: "white", border: "1px solid rgba(255,255,255,0.1)" }, children: [
1019
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:322", className: "vg-spinner" }),
1052
1020
  "Capturing..."
1053
1021
  ] }) }),
1054
- s && c && !d && !q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:393", style: {
1022
+ s && c && !d && !U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:330", style: {
1055
1023
  position: "fixed",
1056
1024
  top: c.rect.top,
1057
1025
  left: c.rect.left,
@@ -1065,7 +1033,7 @@ const Lt = (e) => {
1065
1033
  boxShadow: "0 0 15px rgba(37, 19, 236, 0.2)",
1066
1034
  transition: "all 0.1s ease-out"
1067
1035
  } }),
1068
- d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:411", className: "vg-animate-fade", style: {
1036
+ d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:348", className: "vg-animate-fade", style: {
1069
1037
  position: "fixed",
1070
1038
  top: 0,
1071
1039
  left: 0,
@@ -1077,34 +1045,34 @@ const Lt = (e) => {
1077
1045
  alignItems: "center",
1078
1046
  justifyContent: "center",
1079
1047
  zIndex: 99999
1080
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:424", className: "vg-glassmorphism vg-animate-slide", style: {
1048
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:361", className: "vg-glassmorphism vg-animate-slide", style: {
1081
1049
  padding: "32px",
1082
1050
  width: "460px",
1083
1051
  background: "white",
1084
1052
  color: "#0f172a"
1085
1053
  }, children: [
1086
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:430", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1087
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:432", style: { marginBottom: "20px" }, children: [
1088
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:433", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1089
- d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:435", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1054
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:367", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1055
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:369", style: { marginBottom: "20px" }, children: [
1056
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:370", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1057
+ d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:372", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
1090
1058
  "📦 ",
1091
1059
  d.tag
1092
- ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:439", className: "vg-badge", children: d.tag }),
1093
- d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:444", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1060
+ ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:376", className: "vg-badge", children: d.tag }),
1061
+ d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:381", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
1094
1062
  "📄 ",
1095
- W(d.semanticReference.source.split(":")[0] || "unknown")
1096
- ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:449", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1063
+ A(d.semanticReference.source.split(":")[0] || "unknown")
1064
+ ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:386", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1097
1065
  "🆔 ",
1098
1066
  d.semanticReference.signature
1099
1067
  ] })
1100
1068
  ] }),
1101
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:454", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1069
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:391", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
1102
1070
  "🎯 ",
1103
1071
  d.semanticReference.selector
1104
1072
  ] })
1105
1073
  ] }),
1106
- d.visualPreview && /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:461", style: { marginBottom: "24px" }, children: [
1107
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:462", style: {
1074
+ d.visualPreview && /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:398", style: { marginBottom: "24px" }, children: [
1075
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:399", style: {
1108
1076
  fontSize: "11px",
1109
1077
  fontWeight: 800,
1110
1078
  textTransform: "uppercase",
@@ -1112,14 +1080,14 @@ const Lt = (e) => {
1112
1080
  letterSpacing: "0.05em",
1113
1081
  marginBottom: "10px"
1114
1082
  }, children: r.preview }),
1115
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:472", style: {
1083
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:409", style: {
1116
1084
  border: "1px dashed #e2e8f0",
1117
1085
  borderRadius: "10px",
1118
1086
  padding: "16px",
1119
1087
  display: "flex",
1120
1088
  justifyContent: "center",
1121
1089
  backgroundColor: "#fdfdfd"
1122
- }, children: /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:480", style: {
1090
+ }, children: /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:417", style: {
1123
1091
  position: "relative",
1124
1092
  width: "100%",
1125
1093
  height: "100%",
@@ -1148,17 +1116,17 @@ const Lt = (e) => {
1148
1116
  {
1149
1117
  className: "vg-textarea",
1150
1118
  value: g,
1151
- onChange: (f) => v(f.target.value),
1119
+ onChange: (p) => y(p.target.value),
1152
1120
  rows: 4,
1153
1121
  placeholder: r.placeholder,
1154
1122
  autoFocus: !0
1155
1123
  }
1156
1124
  ),
1157
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:515", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1125
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:452", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
1158
1126
  /* @__PURE__ */ l.jsx(
1159
1127
  "button",
1160
1128
  {
1161
- onClick: () => h(null),
1129
+ onClick: () => m(null),
1162
1130
  className: "vg-button-ghost",
1163
1131
  children: r.cancel
1164
1132
  }
@@ -1166,7 +1134,7 @@ const Lt = (e) => {
1166
1134
  /* @__PURE__ */ l.jsx(
1167
1135
  "button",
1168
1136
  {
1169
- onClick: X,
1137
+ onClick: re,
1170
1138
  className: "vg-button-primary",
1171
1139
  disabled: E || !g.trim(),
1172
1140
  style: { opacity: E || !g.trim() ? 0.6 : 1 },
@@ -1175,7 +1143,7 @@ const Lt = (e) => {
1175
1143
  )
1176
1144
  ] })
1177
1145
  ] }) }),
1178
- N && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:537", className: "vg-animate-fade", style: {
1146
+ F && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:474", className: "vg-animate-fade", style: {
1179
1147
  position: "fixed",
1180
1148
  top: 0,
1181
1149
  left: 0,
@@ -1187,7 +1155,7 @@ const Lt = (e) => {
1187
1155
  alignItems: "center",
1188
1156
  justifyContent: "center",
1189
1157
  zIndex: 99999
1190
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:550", className: "vg-glassmorphism vg-animate-slide", style: {
1158
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:487", className: "vg-glassmorphism vg-animate-slide", style: {
1191
1159
  padding: "32px",
1192
1160
  width: "600px",
1193
1161
  maxHeight: "80vh",
@@ -1196,55 +1164,55 @@ const Lt = (e) => {
1196
1164
  display: "flex",
1197
1165
  flexDirection: "column"
1198
1166
  }, children: [
1199
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:559", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1200
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:560", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1201
- /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:561", onClick: () => B(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1167
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:496", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1168
+ /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:497", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1169
+ /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:498", onClick: () => Y(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
1202
1170
  ] }),
1203
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:564", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: H ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:566", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : D.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:568", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : D.map((f) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:571", style: {
1171
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:501", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: M ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:503", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : N.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:505", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : N.map((p) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:508", style: {
1204
1172
  border: "1px solid #e2e8f0",
1205
1173
  borderRadius: "12px",
1206
1174
  padding: "16px",
1207
- backgroundColor: f.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1175
+ backgroundColor: p.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1208
1176
  }, children: [
1209
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:577", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:578", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1210
- f.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:580", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1177
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:514", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:515", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1178
+ p.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:517", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
1211
1179
  "✓ ",
1212
1180
  r.readyForReview
1213
- ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:582", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1181
+ ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:519", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
1214
1182
  "⏳ ",
1215
1183
  r.pending
1216
1184
  ] }),
1217
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:584", style: { fontSize: "12px", color: "#64748b" }, children: new Date(f.timestamp).toLocaleString() })
1185
+ /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:521", style: { fontSize: "12px", color: "#64748b" }, children: new Date(p.timestamp).toLocaleString() })
1218
1186
  ] }) }),
1219
- /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:590", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1187
+ /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:527", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
1220
1188
  '"',
1221
- f.message,
1189
+ p.message,
1222
1190
  '"'
1223
1191
  ] }),
1224
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:592", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1225
- /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:593", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1192
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:529", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1193
+ /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:530", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1226
1194
  "📦 ",
1227
- f.componentName?.split(" > ").pop() || "UI Element"
1195
+ p.componentName?.split(" > ").pop() || "UI Element"
1228
1196
  ] }),
1229
- f.filePath && f.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:597", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1197
+ p.filePath && p.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:534", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
1230
1198
  "📄 ",
1231
- W(f.filePath)
1199
+ A(p.filePath)
1232
1200
  ] })
1233
1201
  ] }),
1234
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:603", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1235
- f.status === "pending" ? /* @__PURE__ */ l.jsxs(
1202
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:540", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1203
+ p.status === "pending" ? /* @__PURE__ */ l.jsxs(
1236
1204
  "button",
1237
1205
  {
1238
- "data-source-path": "/src/components/ViewGateOverlay.tsx:605",
1206
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:542",
1239
1207
  className: "vg-button-primary",
1240
1208
  style: { display: "flex", alignItems: "center", gap: "6px" },
1241
1209
  onClick: async () => {
1242
1210
  try {
1243
- (await fetch(`${a}/api/annotations/${f._id}`, {
1211
+ (await fetch(`${a}/api/annotations/${p._id}`, {
1244
1212
  method: "PATCH",
1245
1213
  headers: { "Content-Type": "application/json", "x-api-key": n },
1246
1214
  body: JSON.stringify({ status: "ready_for_review" })
1247
- })).ok && (j(), e(r.updateSuccess, "success"));
1215
+ })).ok && (k(), e(r.updateSuccess, "success"));
1248
1216
  } catch {
1249
1217
  e(r.error, "error");
1250
1218
  }
@@ -1257,16 +1225,16 @@ const Lt = (e) => {
1257
1225
  ) : /* @__PURE__ */ l.jsxs(
1258
1226
  "button",
1259
1227
  {
1260
- "data-source-path": "/src/components/ViewGateOverlay.tsx:627",
1228
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:564",
1261
1229
  className: "vg-button-ghost",
1262
1230
  style: { display: "flex", alignItems: "center", gap: "6px" },
1263
1231
  onClick: async () => {
1264
1232
  try {
1265
- (await fetch(`${a}/api/annotations/${f._id}`, {
1233
+ (await fetch(`${a}/api/annotations/${p._id}`, {
1266
1234
  method: "PATCH",
1267
1235
  headers: { "Content-Type": "application/json", "x-api-key": n },
1268
1236
  body: JSON.stringify({ status: "pending" })
1269
- })).ok && (j(), e(r.updateSuccess, "success"));
1237
+ })).ok && (k(), e(r.updateSuccess, "success"));
1270
1238
  } catch {
1271
1239
  e(r.error, "error");
1272
1240
  }
@@ -1280,17 +1248,13 @@ const Lt = (e) => {
1280
1248
  /* @__PURE__ */ l.jsxs(
1281
1249
  "button",
1282
1250
  {
1283
- "data-source-path": "/src/components/ViewGateOverlay.tsx:650",
1251
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:587",
1284
1252
  className: "vg-button-ghost",
1285
1253
  style: { display: "flex", alignItems: "center", gap: "6px" },
1286
1254
  onClick: () => {
1287
- if (f.url) {
1288
- se(!0);
1289
- const m = new URL(f.url);
1290
- m.hash = `vg_hl=${encodeURIComponent(f.reference.signature)}`, setTimeout(() => {
1291
- window.location.href = m.toString();
1292
- }, 1e3);
1293
- }
1255
+ p.url && (te(!0), setTimeout(() => {
1256
+ window.location.href = p.url;
1257
+ }, 1e3));
1294
1258
  },
1295
1259
  children: [
1296
1260
  "👁️ ",
@@ -1301,23 +1265,23 @@ const Lt = (e) => {
1301
1265
  /* @__PURE__ */ l.jsxs(
1302
1266
  "button",
1303
1267
  {
1304
- "data-source-path": "/src/components/ViewGateOverlay.tsx:667",
1268
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:602",
1305
1269
  className: "vg-button-primary",
1306
1270
  style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
1307
1271
  onClick: () => {
1308
- M({
1272
+ D({
1309
1273
  title: r.deleteConfirm,
1310
1274
  message: r.confirmDelete,
1311
1275
  onConfirm: async () => {
1312
1276
  try {
1313
- (await fetch(`${a}/api/annotations/${f._id}`, {
1277
+ (await fetch(`${a}/api/annotations/${p._id}`, {
1314
1278
  method: "DELETE",
1315
1279
  headers: { "x-api-key": n }
1316
- })).ok && (j(), e(r.deleteSuccess, "success"));
1280
+ })).ok && (k(), e(r.deleteSuccess, "success"));
1317
1281
  } catch {
1318
1282
  e(r.error, "error");
1319
1283
  } finally {
1320
- M(null);
1284
+ D(null);
1321
1285
  }
1322
1286
  }
1323
1287
  });
@@ -1329,9 +1293,9 @@ const Lt = (e) => {
1329
1293
  }
1330
1294
  )
1331
1295
  ] })
1332
- ] }, f._id)) })
1296
+ ] }, p._id)) })
1333
1297
  ] }) }),
1334
- ne && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:706", style: {
1298
+ ee && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:641", style: {
1335
1299
  position: "fixed",
1336
1300
  top: 0,
1337
1301
  left: 0,
@@ -1344,11 +1308,11 @@ const Lt = (e) => {
1344
1308
  zIndex: 3e5,
1345
1309
  backdropFilter: "blur(10px)",
1346
1310
  color: "white"
1347
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:720", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
1348
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:721", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
1349
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:722", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
1311
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:655", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
1312
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:656", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
1313
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:657", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
1350
1314
  ] }) }),
1351
- L && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:729", className: "vg-animate-fade", style: {
1315
+ _ && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:664", className: "vg-animate-fade", style: {
1352
1316
  position: "fixed",
1353
1317
  top: 0,
1354
1318
  left: 0,
@@ -1360,22 +1324,22 @@ const Lt = (e) => {
1360
1324
  alignItems: "center",
1361
1325
  justifyContent: "center",
1362
1326
  zIndex: 2e5
1363
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:742", className: "vg-glassmorphism vg-animate-slide", style: {
1327
+ }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:677", className: "vg-glassmorphism vg-animate-slide", style: {
1364
1328
  padding: "32px",
1365
1329
  width: "400px",
1366
1330
  background: "white",
1367
1331
  textAlign: "center"
1368
1332
  }, children: [
1369
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:748", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1370
- /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:749", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: L.title }),
1371
- /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:750", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: L.message }),
1372
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:752", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
1333
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:683", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1334
+ /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:684", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: _.title }),
1335
+ /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:685", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: _.message }),
1336
+ /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:687", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
1373
1337
  /* @__PURE__ */ l.jsx(
1374
1338
  "button",
1375
1339
  {
1376
- "data-source-path": "/src/components/ViewGateOverlay.tsx:753",
1340
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:688",
1377
1341
  className: "vg-button-ghost",
1378
- onClick: () => M(null),
1342
+ onClick: () => D(null),
1379
1343
  style: { flex: 1 },
1380
1344
  children: r.no
1381
1345
  }
@@ -1383,10 +1347,10 @@ const Lt = (e) => {
1383
1347
  /* @__PURE__ */ l.jsx(
1384
1348
  "button",
1385
1349
  {
1386
- "data-source-path": "/src/components/ViewGateOverlay.tsx:760",
1350
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:695",
1387
1351
  className: "vg-button-primary",
1388
1352
  style: { backgroundColor: "#ef4444", flex: 1 },
1389
- onClick: L.onConfirm,
1353
+ onClick: _.onConfirm,
1390
1354
  children: r.yes
1391
1355
  }
1392
1356
  )
@@ -1400,7 +1364,7 @@ function _e(e, t, r) {
1400
1364
  return e.split(`
1401
1365
  `).map((c, u) => {
1402
1366
  const d = u + 1;
1403
- return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (h, g, v) => h.includes("data-source-path") || v === "Fragment" || v === "React.Fragment" ? h : `${g}<${v} data-source-path="${a}:${d}"`);
1367
+ return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (m, g, y) => m.includes("data-source-path") || y === "Fragment" || y === "React.Fragment" ? m : `${g}<${y} data-source-path="${a}:${d}"`);
1404
1368
  }).join(`
1405
1369
  `);
1406
1370
  }
@@ -1422,7 +1386,7 @@ function Dt(e) {
1422
1386
  }
1423
1387
  export {
1424
1388
  Ft as ViewGate,
1425
- $t as ViewGateOverlay,
1389
+ Lt as ViewGateOverlay,
1426
1390
  _e as transformSourcePaths,
1427
1391
  De as useViewGate,
1428
1392
  Dt as viewgateNextLoader,