viewgate-wrapper 1.9.1 → 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 Ge, useState as C, useContext as Le, 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 === P ? 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 V:
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 A:
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, y = 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
- y
89
+ w
90
90
  ), t(o);
91
91
  }
92
92
  }
93
93
  function n(o) {
94
- if (o === V) 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 (T.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, y, R, L) {
137
- var w = x.ref;
136
+ function d(o, f, x, w, B, ne) {
137
+ var v = x.ref;
138
138
  return o = {
139
- $$typeof: j,
139
+ $$typeof: R,
140
140
  type: o,
141
- key: p,
141
+ key: f,
142
142
  props: x,
143
- _owner: y
144
- }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(o, "ref", {
143
+ _owner: w
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,69 +158,69 @@ function Ie() {
158
158
  configurable: !1,
159
159
  enumerable: !1,
160
160
  writable: !0,
161
- value: R
161
+ value: B
162
162
  }), Object.defineProperty(o, "_debugTask", {
163
163
  configurable: !1,
164
164
  enumerable: !1,
165
165
  writable: !0,
166
- value: L
166
+ value: ne
167
167
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
168
168
  }
169
- function h(o, p, x, y, R, L) {
170
- var w = p.children;
171
- if (w !== void 0)
172
- if (y)
173
- if (z(w)) {
174
- for (y = 0; y < w.length; y++)
175
- g(w[y]);
176
- Object.freeze && Object.freeze(w);
169
+ function m(o, f, x, w, B, ne) {
170
+ var v = f.children;
171
+ if (v !== void 0)
172
+ if (w)
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(w);
182
- if (T.call(p, "key")) {
183
- w = e(o);
184
- var $ = 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
- y = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", k[w + y] || ($ = 0 < $.length ? "{" + $.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} />
191
191
  React keys must be passed directly to JSX without using spread:
192
192
  let props = %s;
193
193
  <%s key={someKey} {...props} />`,
194
- y,
195
194
  w,
195
+ v,
196
196
  $,
197
- w
198
- ), k[w + y] = !0);
197
+ v
198
+ ), z[v + w] = !0);
199
199
  }
200
- if (w = null, x !== void 0 && (r(x), w = "" + x), i(p) && (r(p.key), w = "" + 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 w && 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
- w,
210
+ v,
211
211
  x,
212
212
  a(),
213
- R,
214
- L
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 === j;
220
+ function y(o) {
221
+ return typeof o == "object" && o !== null && o.$$typeof === R;
222
222
  }
223
- var E = Ae, j = /* @__PURE__ */ Symbol.for("react.transitional.element"), q = /* @__PURE__ */ Symbol.for("react.portal"), V = /* @__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"), A = /* @__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"), P = /* @__PURE__ */ Symbol.for("react.client.reference"), G = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, z = Array.isArray, _ = 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 = _(n(s)), k = {};
235
- Y.Fragment = V, Y.jsx = function(o, p, x) {
236
- var y = 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
- y ? Error("react-stack-top-frame") : f,
243
- y ? _(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 y = 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
- y ? Error("react-stack-top-frame") : f,
253
- y ? _(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 = {
@@ -326,19 +326,19 @@ const Ne = {
326
326
  navigating: "Redirigiendo a revisión..."
327
327
  }
328
328
  }, be = Ge(void 0), De = () => {
329
- const e = Le(be);
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 O(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 = O(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 = O(e.assignedNodes()) : b(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = O(e.contentDocument.body.childNodes) : s = O(((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 = O(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
- O(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
- O(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 = O(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,12 +815,12 @@ 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();
@@ -839,7 +839,7 @@ const Gt = (e) => {
839
839
  a = a.return;
840
840
  }
841
841
  return n.join(" > ") || "Generic Component";
842
- }, Lt = (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");
@@ -850,26 +850,26 @@ const Gt = (e) => {
850
850
  r = r.parentElement;
851
851
  }
852
852
  const n = Gt(e), s = ((d) => {
853
- const h = [];
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, j = 1;
861
+ let E = g, R = 1;
862
862
  for (; E.previousElementSibling; )
863
- E = E.previousElementSibling, E.nodeName.toLowerCase() === v && j++;
864
- j > 1 && (v += `:nth-of-type(${j})`);
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,106 +889,73 @@ const Gt = (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, j] = C(!1), [q, V] = C(!1), [N, B] = C(!1), [D, re] = C([]), [A, M] = C(null), [ne, se] = C(!1), [H, J] = C(!1), [P, G] = C(null), T = 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 k = m.split("vg_hl=");
916
- if (k.length < 2) return;
917
- const o = decodeURIComponent(k[1]);
918
- [100, 500, 1e3, 2e3].forEach((x) => {
919
- setTimeout(() => {
920
- const y = document.querySelectorAll("*");
921
- for (const R of y)
922
- if (R.tagName.toLowerCase() === o.split("-")[0]) {
923
- const L = R.getBoundingClientRect();
924
- if (L.width > 0 && L.height > 0) {
925
- const w = (R.innerText || "").slice(0, 50).trim().replace(/\s+/g, "_");
926
- if (o.includes(w)) {
927
- R.classList.add("vg-highlight-active"), G(R), R.scrollIntoView({ behavior: "smooth", block: "center" });
928
- break;
929
- }
930
- }
931
- }
932
- }, x);
933
- });
934
- }
935
- };
936
- return f(), window.addEventListener("hashchange", f), () => window.removeEventListener("hashchange", f);
937
- }, []), Z(() => {
938
- if (!P) return;
939
- const f = () => {
940
- P.classList.remove("vg-highlight-active"), G(null), window.history.replaceState && window.history.replaceState(null, "", window.location.pathname + window.location.search);
941
- };
942
- return P.addEventListener("mouseover", f), () => P.removeEventListener("mouseover", f);
943
- }, [P]), Z(() => {
944
- T();
945
- }, [T]);
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: Lt(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]), _ = oe(async (f) => {
929
+ }, [s, d]), V = ae(async (p) => {
962
930
  if (!(!s || d) && c) {
963
- f.preventDefault(), f.stopPropagation(), V(!0);
931
+ p.preventDefault(), p.stopPropagation(), P(!0);
964
932
  try {
965
- const m = c.element.style.display, k = window.getComputedStyle(c.element).display === "inline";
966
- k && (c.element.style.display = "inline-block");
967
- const o = await At(c.element, {
968
- backgroundColor: "#ffffff",
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, {
969
936
  pixelRatio: 2,
970
- skipFonts: !0,
937
+ skipFonts: !1,
938
+ cacheBust: !0,
971
939
  style: {
972
940
  margin: "0",
973
941
  padding: "4px"
974
- // Extra padding for better look
975
942
  }
976
943
  });
977
- k && (c.element.style.display = m), h({ ...c, visualPreview: o });
978
- } catch (m) {
979
- 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);
980
947
  } finally {
981
- V(!1), u(null);
948
+ P(!1), u(null);
982
949
  }
983
950
  }
984
- }, [s, c, d, N]);
985
- Z(() => (s && !d ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("mousemove", z), window.addEventListener("click", _, !0), () => {
986
- document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove", z), window.removeEventListener("click", _, !0);
987
- }), [s, d, z, _]);
988
- 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 () => {
989
956
  if (!d || !g.trim()) return;
990
- j(!0);
991
- const { semanticReference: f } = d, [m, k] = f.source.split(":"), o = k || "0";
957
+ R(!0);
958
+ const { semanticReference: p } = d, [h, O] = p.source.split(":"), G = O || "0";
992
959
  try {
993
960
  if (!(await fetch(`${a}/api/annotations`, {
994
961
  method: "POST",
@@ -997,23 +964,23 @@ const Gt = (e) => {
997
964
  "x-api-key": n
998
965
  },
999
966
  body: JSON.stringify({
1000
- filePath: m,
1001
- line: parseInt(o),
967
+ filePath: h,
968
+ line: parseInt(G),
1002
969
  url: window.location.href,
1003
970
  message: g,
1004
- componentName: f.componentPath || d.tag,
1005
- reference: f
971
+ componentName: p.componentPath || d.tag,
972
+ reference: p
1006
973
  })
1007
974
  })).ok) throw new Error("Backend failed");
1008
- e(r.success, "success"), h(null), v(""), i(!1), T();
1009
- } catch (p) {
1010
- 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");
1011
978
  } finally {
1012
- j(!1);
979
+ R(!1);
1013
980
  }
1014
- }, W = (f) => f.split("/").pop()?.split("\\").pop() || "unknown";
981
+ }, A = (p) => p.split("/").pop()?.split("\\").pop() || "unknown";
1015
982
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
1016
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:344", 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: [
1017
984
  /* @__PURE__ */ l.jsx(
1018
985
  "button",
1019
986
  {
@@ -1023,11 +990,11 @@ const Gt = (e) => {
1023
990
  children: s ? r.exitMode : r.enterMode
1024
991
  }
1025
992
  ),
1026
- D.length > 0 && /* @__PURE__ */ l.jsx(
993
+ N.length > 0 && /* @__PURE__ */ l.jsx(
1027
994
  "button",
1028
995
  {
1029
996
  onClick: () => {
1030
- B(!N), i(!1), h(null);
997
+ Y(!F), i(!1), m(null);
1031
998
  },
1032
999
  className: "vg-button-ghost vg-button-appear",
1033
1000
  style: { padding: "12px 24px", fontSize: "15px", marginLeft: "12px", background: "white" },
@@ -1036,7 +1003,7 @@ const Gt = (e) => {
1036
1003
  "view-comments"
1037
1004
  )
1038
1005
  ] }),
1039
- q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:370", style: {
1006
+ U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:308", style: {
1040
1007
  position: "fixed",
1041
1008
  top: 0,
1042
1009
  left: 0,
@@ -1048,11 +1015,11 @@ const Gt = (e) => {
1048
1015
  justifyContent: "center",
1049
1016
  zIndex: 1e5,
1050
1017
  cursor: "wait"
1051
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:383", 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: [
1052
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:384", 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" }),
1053
1020
  "Capturing..."
1054
1021
  ] }) }),
1055
- s && c && !d && !q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:392", style: {
1022
+ s && c && !d && !U && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:330", style: {
1056
1023
  position: "fixed",
1057
1024
  top: c.rect.top,
1058
1025
  left: c.rect.left,
@@ -1066,7 +1033,7 @@ const Gt = (e) => {
1066
1033
  boxShadow: "0 0 15px rgba(37, 19, 236, 0.2)",
1067
1034
  transition: "all 0.1s ease-out"
1068
1035
  } }),
1069
- d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:410", className: "vg-animate-fade", style: {
1036
+ d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:348", className: "vg-animate-fade", style: {
1070
1037
  position: "fixed",
1071
1038
  top: 0,
1072
1039
  left: 0,
@@ -1078,52 +1045,49 @@ const Gt = (e) => {
1078
1045
  alignItems: "center",
1079
1046
  justifyContent: "center",
1080
1047
  zIndex: 99999
1081
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:423", 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: {
1082
1049
  padding: "32px",
1083
1050
  width: "460px",
1084
1051
  background: "white",
1085
1052
  color: "#0f172a"
1086
1053
  }, children: [
1087
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:429", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1088
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:431", style: { marginBottom: "20px" }, children: [
1089
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:432", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
1090
- d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:434", 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: [
1091
1058
  "📦 ",
1092
1059
  d.tag
1093
- ] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:438", className: "vg-badge", children: d.tag }),
1094
- 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:443", 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: [
1095
1062
  "📄 ",
1096
- W(d.semanticReference.source.split(":")[0] || "unknown")
1097
- ] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:448", 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: [
1098
1065
  "🆔 ",
1099
1066
  d.semanticReference.signature
1100
1067
  ] })
1101
1068
  ] }),
1102
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:453", 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: [
1103
1070
  "🎯 ",
1104
1071
  d.semanticReference.selector
1105
1072
  ] })
1106
1073
  ] }),
1107
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:459", style: {
1108
- backgroundColor: "#f8fafc",
1109
- borderRadius: "8px",
1110
- border: "1px solid #e2e8f0",
1111
- marginBottom: "20px",
1112
- overflow: "hidden",
1113
- display: "flex",
1114
- flexDirection: "column"
1115
- }, children: [
1116
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:468", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
1117
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:471", style: {
1118
- padding: "12px",
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: {
1076
+ fontSize: "11px",
1077
+ fontWeight: 800,
1078
+ textTransform: "uppercase",
1079
+ color: "#94a3b8",
1080
+ letterSpacing: "0.05em",
1081
+ marginBottom: "10px"
1082
+ }, children: r.preview }),
1083
+ /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:409", style: {
1084
+ border: "1px dashed #e2e8f0",
1085
+ borderRadius: "10px",
1086
+ padding: "16px",
1119
1087
  display: "flex",
1120
1088
  justifyContent: "center",
1121
- alignItems: "center",
1122
- minHeight: "100px",
1123
- maxHeight: "200px",
1124
- overflow: "hidden",
1125
1089
  backgroundColor: "#fdfdfd"
1126
- }, children: d.visualPreview ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:482", style: {
1090
+ }, children: /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:417", style: {
1127
1091
  position: "relative",
1128
1092
  width: "100%",
1129
1093
  height: "100%",
@@ -1145,28 +1109,24 @@ const Gt = (e) => {
1145
1109
  backgroundColor: "white"
1146
1110
  }
1147
1111
  }
1148
- ) }) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:505", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic", textAlign: "center", padding: "0 20px" }, children: [
1149
- '"',
1150
- d.previewText,
1151
- '"'
1152
- ] }) })
1112
+ ) }) })
1153
1113
  ] }),
1154
1114
  /* @__PURE__ */ l.jsx(
1155
1115
  "textarea",
1156
1116
  {
1157
1117
  className: "vg-textarea",
1158
1118
  value: g,
1159
- onChange: (f) => v(f.target.value),
1119
+ onChange: (p) => y(p.target.value),
1160
1120
  rows: 4,
1161
1121
  placeholder: r.placeholder,
1162
1122
  autoFocus: !0
1163
1123
  }
1164
1124
  ),
1165
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:521", 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: [
1166
1126
  /* @__PURE__ */ l.jsx(
1167
1127
  "button",
1168
1128
  {
1169
- onClick: () => h(null),
1129
+ onClick: () => m(null),
1170
1130
  className: "vg-button-ghost",
1171
1131
  children: r.cancel
1172
1132
  }
@@ -1174,7 +1134,7 @@ const Gt = (e) => {
1174
1134
  /* @__PURE__ */ l.jsx(
1175
1135
  "button",
1176
1136
  {
1177
- onClick: X,
1137
+ onClick: re,
1178
1138
  className: "vg-button-primary",
1179
1139
  disabled: E || !g.trim(),
1180
1140
  style: { opacity: E || !g.trim() ? 0.6 : 1 },
@@ -1183,7 +1143,7 @@ const Gt = (e) => {
1183
1143
  )
1184
1144
  ] })
1185
1145
  ] }) }),
1186
- N && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:543", className: "vg-animate-fade", style: {
1146
+ F && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:474", className: "vg-animate-fade", style: {
1187
1147
  position: "fixed",
1188
1148
  top: 0,
1189
1149
  left: 0,
@@ -1195,7 +1155,7 @@ const Gt = (e) => {
1195
1155
  alignItems: "center",
1196
1156
  justifyContent: "center",
1197
1157
  zIndex: 99999
1198
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:556", 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: {
1199
1159
  padding: "32px",
1200
1160
  width: "600px",
1201
1161
  maxHeight: "80vh",
@@ -1204,55 +1164,55 @@ const Gt = (e) => {
1204
1164
  display: "flex",
1205
1165
  flexDirection: "column"
1206
1166
  }, children: [
1207
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:565", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
1208
- /* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:566", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
1209
- /* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:567", 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: "✕" })
1210
1170
  ] }),
1211
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:570", 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:572", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : D.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:574", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : D.map((f) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:577", 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: {
1212
1172
  border: "1px solid #e2e8f0",
1213
1173
  borderRadius: "12px",
1214
1174
  padding: "16px",
1215
- backgroundColor: f.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1175
+ backgroundColor: p.status === "ready_for_review" ? "#f0fdf4" : "#fff"
1216
1176
  }, children: [
1217
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:583", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:584", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
1218
- f.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:586", 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: [
1219
1179
  "✓ ",
1220
1180
  r.readyForReview
1221
- ] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:588", 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: [
1222
1182
  "⏳ ",
1223
1183
  r.pending
1224
1184
  ] }),
1225
- /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:590", 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() })
1226
1186
  ] }) }),
1227
- /* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:596", 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: [
1228
1188
  '"',
1229
- f.message,
1189
+ p.message,
1230
1190
  '"'
1231
1191
  ] }),
1232
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:598", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
1233
- /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:599", 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: [
1234
1194
  "📦 ",
1235
- f.componentName?.split(" > ").pop() || "UI Element"
1195
+ p.componentName?.split(" > ").pop() || "UI Element"
1236
1196
  ] }),
1237
- f.filePath && f.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:603", 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: [
1238
1198
  "📄 ",
1239
- W(f.filePath)
1199
+ A(p.filePath)
1240
1200
  ] })
1241
1201
  ] }),
1242
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:609", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
1243
- 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(
1244
1204
  "button",
1245
1205
  {
1246
- "data-source-path": "/src/components/ViewGateOverlay.tsx:611",
1206
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:542",
1247
1207
  className: "vg-button-primary",
1248
1208
  style: { display: "flex", alignItems: "center", gap: "6px" },
1249
1209
  onClick: async () => {
1250
1210
  try {
1251
- (await fetch(`${a}/api/annotations/${f._id}`, {
1211
+ (await fetch(`${a}/api/annotations/${p._id}`, {
1252
1212
  method: "PATCH",
1253
1213
  headers: { "Content-Type": "application/json", "x-api-key": n },
1254
1214
  body: JSON.stringify({ status: "ready_for_review" })
1255
- })).ok && (T(), e(r.updateSuccess, "success"));
1215
+ })).ok && (k(), e(r.updateSuccess, "success"));
1256
1216
  } catch {
1257
1217
  e(r.error, "error");
1258
1218
  }
@@ -1265,16 +1225,16 @@ const Gt = (e) => {
1265
1225
  ) : /* @__PURE__ */ l.jsxs(
1266
1226
  "button",
1267
1227
  {
1268
- "data-source-path": "/src/components/ViewGateOverlay.tsx:633",
1228
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:564",
1269
1229
  className: "vg-button-ghost",
1270
1230
  style: { display: "flex", alignItems: "center", gap: "6px" },
1271
1231
  onClick: async () => {
1272
1232
  try {
1273
- (await fetch(`${a}/api/annotations/${f._id}`, {
1233
+ (await fetch(`${a}/api/annotations/${p._id}`, {
1274
1234
  method: "PATCH",
1275
1235
  headers: { "Content-Type": "application/json", "x-api-key": n },
1276
1236
  body: JSON.stringify({ status: "pending" })
1277
- })).ok && (T(), e(r.updateSuccess, "success"));
1237
+ })).ok && (k(), e(r.updateSuccess, "success"));
1278
1238
  } catch {
1279
1239
  e(r.error, "error");
1280
1240
  }
@@ -1288,17 +1248,13 @@ const Gt = (e) => {
1288
1248
  /* @__PURE__ */ l.jsxs(
1289
1249
  "button",
1290
1250
  {
1291
- "data-source-path": "/src/components/ViewGateOverlay.tsx:656",
1251
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:587",
1292
1252
  className: "vg-button-ghost",
1293
1253
  style: { display: "flex", alignItems: "center", gap: "6px" },
1294
1254
  onClick: () => {
1295
- if (f.url) {
1296
- se(!0);
1297
- const m = new URL(f.url);
1298
- m.hash = `vg_hl=${encodeURIComponent(f.reference.signature)}`, setTimeout(() => {
1299
- window.location.href = m.toString();
1300
- }, 1e3);
1301
- }
1255
+ p.url && (te(!0), setTimeout(() => {
1256
+ window.location.href = p.url;
1257
+ }, 1e3));
1302
1258
  },
1303
1259
  children: [
1304
1260
  "👁️ ",
@@ -1309,23 +1265,23 @@ const Gt = (e) => {
1309
1265
  /* @__PURE__ */ l.jsxs(
1310
1266
  "button",
1311
1267
  {
1312
- "data-source-path": "/src/components/ViewGateOverlay.tsx:673",
1268
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:602",
1313
1269
  className: "vg-button-primary",
1314
1270
  style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
1315
1271
  onClick: () => {
1316
- M({
1272
+ D({
1317
1273
  title: r.deleteConfirm,
1318
1274
  message: r.confirmDelete,
1319
1275
  onConfirm: async () => {
1320
1276
  try {
1321
- (await fetch(`${a}/api/annotations/${f._id}`, {
1277
+ (await fetch(`${a}/api/annotations/${p._id}`, {
1322
1278
  method: "DELETE",
1323
1279
  headers: { "x-api-key": n }
1324
- })).ok && (T(), e(r.deleteSuccess, "success"));
1280
+ })).ok && (k(), e(r.deleteSuccess, "success"));
1325
1281
  } catch {
1326
1282
  e(r.error, "error");
1327
1283
  } finally {
1328
- M(null);
1284
+ D(null);
1329
1285
  }
1330
1286
  }
1331
1287
  });
@@ -1337,9 +1293,9 @@ const Gt = (e) => {
1337
1293
  }
1338
1294
  )
1339
1295
  ] })
1340
- ] }, f._id)) })
1296
+ ] }, p._id)) })
1341
1297
  ] }) }),
1342
- ne && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:712", style: {
1298
+ ee && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:641", style: {
1343
1299
  position: "fixed",
1344
1300
  top: 0,
1345
1301
  left: 0,
@@ -1352,11 +1308,11 @@ const Gt = (e) => {
1352
1308
  zIndex: 3e5,
1353
1309
  backdropFilter: "blur(10px)",
1354
1310
  color: "white"
1355
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:726", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
1356
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:727", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
1357
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:728", 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 })
1358
1314
  ] }) }),
1359
- A && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:735", className: "vg-animate-fade", style: {
1315
+ _ && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:664", className: "vg-animate-fade", style: {
1360
1316
  position: "fixed",
1361
1317
  top: 0,
1362
1318
  left: 0,
@@ -1368,22 +1324,22 @@ const Gt = (e) => {
1368
1324
  alignItems: "center",
1369
1325
  justifyContent: "center",
1370
1326
  zIndex: 2e5
1371
- }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:748", 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: {
1372
1328
  padding: "32px",
1373
1329
  width: "400px",
1374
1330
  background: "white",
1375
1331
  textAlign: "center"
1376
1332
  }, children: [
1377
- /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:754", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
1378
- /* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:755", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: A.title }),
1379
- /* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:756", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: A.message }),
1380
- /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:758", 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: [
1381
1337
  /* @__PURE__ */ l.jsx(
1382
1338
  "button",
1383
1339
  {
1384
- "data-source-path": "/src/components/ViewGateOverlay.tsx:759",
1340
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:688",
1385
1341
  className: "vg-button-ghost",
1386
- onClick: () => M(null),
1342
+ onClick: () => D(null),
1387
1343
  style: { flex: 1 },
1388
1344
  children: r.no
1389
1345
  }
@@ -1391,10 +1347,10 @@ const Gt = (e) => {
1391
1347
  /* @__PURE__ */ l.jsx(
1392
1348
  "button",
1393
1349
  {
1394
- "data-source-path": "/src/components/ViewGateOverlay.tsx:766",
1350
+ "data-source-path": "/src/components/ViewGateOverlay.tsx:695",
1395
1351
  className: "vg-button-primary",
1396
1352
  style: { backgroundColor: "#ef4444", flex: 1 },
1397
- onClick: A.onConfirm,
1353
+ onClick: _.onConfirm,
1398
1354
  children: r.yes
1399
1355
  }
1400
1356
  )
@@ -1408,7 +1364,7 @@ function _e(e, t, r) {
1408
1364
  return e.split(`
1409
1365
  `).map((c, u) => {
1410
1366
  const d = u + 1;
1411
- 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}"`);
1412
1368
  }).join(`
1413
1369
  `);
1414
1370
  }
@@ -1430,7 +1386,7 @@ function Dt(e) {
1430
1386
  }
1431
1387
  export {
1432
1388
  Ft as ViewGate,
1433
- $t as ViewGateOverlay,
1389
+ Lt as ViewGateOverlay,
1434
1390
  _e as transformSourcePaths,
1435
1391
  De as useViewGate,
1436
1392
  Dt as viewgateNextLoader,