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.
package/dist/viewgate-wrapper.js
CHANGED
|
@@ -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-
|
|
2
|
-
import Ae, { createContext as
|
|
3
|
-
var
|
|
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
|
|
6
|
-
if (de) return
|
|
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
|
|
24
|
+
return H.Fragment = t, H.jsx = r, H.jsxs = r, H;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
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 ===
|
|
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
|
|
36
|
+
case P:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case Y:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case F:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case D:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case ee:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
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
|
|
53
|
+
case U:
|
|
54
54
|
return "Portal";
|
|
55
|
-
case
|
|
55
|
+
case Q:
|
|
56
56
|
return o.displayName || "Context";
|
|
57
|
-
case
|
|
57
|
+
case N:
|
|
58
58
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
59
|
-
case
|
|
60
|
-
var
|
|
61
|
-
return o = o.displayName, o || (o =
|
|
62
|
-
case
|
|
63
|
-
return
|
|
64
|
-
case
|
|
65
|
-
|
|
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(
|
|
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
|
|
79
|
+
var f = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
f = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var x =
|
|
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
|
-
|
|
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 ===
|
|
95
|
-
if (typeof o == "object" && o !== null && o.$$typeof ===
|
|
94
|
+
if (o === P) return "<>";
|
|
95
|
+
if (typeof o == "object" && o !== null && o.$$typeof === M)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
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 =
|
|
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 (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
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,
|
|
118
|
+
function c(o, f) {
|
|
119
119
|
function x() {
|
|
120
|
-
|
|
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
|
-
|
|
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
|
|
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,
|
|
137
|
-
var
|
|
136
|
+
function d(o, f, x, w, B, ne) {
|
|
137
|
+
var v = x.ref;
|
|
138
138
|
return o = {
|
|
139
|
-
$$typeof:
|
|
139
|
+
$$typeof: R,
|
|
140
140
|
type: o,
|
|
141
|
-
key:
|
|
141
|
+
key: f,
|
|
142
142
|
props: x,
|
|
143
143
|
_owner: w
|
|
144
|
-
}, (
|
|
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:
|
|
166
|
+
value: ne
|
|
167
167
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
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 (
|
|
174
|
-
for (w = 0; w <
|
|
175
|
-
g(
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
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(
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
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 <
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
),
|
|
195
|
+
v,
|
|
196
|
+
$,
|
|
197
|
+
v
|
|
198
|
+
), z[v + w] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
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
|
|
203
|
-
|
|
204
|
-
} else x =
|
|
205
|
-
return
|
|
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
|
-
|
|
210
|
+
v,
|
|
211
211
|
x,
|
|
212
212
|
a(),
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
B,
|
|
214
|
+
ne
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
function g(o) {
|
|
218
|
-
|
|
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
|
|
221
|
-
return typeof o == "object" && o !== null && o.$$typeof ===
|
|
220
|
+
function y(o) {
|
|
221
|
+
return typeof o == "object" && o !== null && o.$$typeof === R;
|
|
222
222
|
}
|
|
223
|
-
var E = Ae,
|
|
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
|
|
231
|
+
var p, h = {}, O = E.react_stack_bottom_frame.bind(
|
|
232
232
|
E,
|
|
233
233
|
s
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var w = 1e4 >
|
|
237
|
-
return
|
|
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
|
-
|
|
239
|
+
f,
|
|
240
240
|
x,
|
|
241
241
|
!1,
|
|
242
|
-
w ? Error("react-stack-top-frame") :
|
|
243
|
-
w ?
|
|
242
|
+
w ? Error("react-stack-top-frame") : O,
|
|
243
|
+
w ? A(n(o)) : G
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var w = 1e4 >
|
|
247
|
-
return
|
|
245
|
+
}, W.jsxs = function(o, f, x) {
|
|
246
|
+
var w = 1e4 > T.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return m(
|
|
248
248
|
o,
|
|
249
|
-
|
|
249
|
+
f,
|
|
250
250
|
x,
|
|
251
251
|
!0,
|
|
252
|
-
w ? Error("react-stack-top-frame") :
|
|
253
|
-
w ?
|
|
252
|
+
w ? Error("react-stack-top-frame") : O,
|
|
253
|
+
w ? A(n(o)) : G
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), W;
|
|
257
257
|
}
|
|
258
258
|
var pe;
|
|
259
259
|
function Fe() {
|
|
260
|
-
return pe || (pe = 1, process.env.NODE_ENV === "production" ?
|
|
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 =
|
|
329
|
-
const e =
|
|
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
|
|
335
|
-
s((g) => [...g, { id:
|
|
336
|
-
s((g) => g.filter((
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
375
|
+
let L = null;
|
|
376
376
|
function Ee(e = {}) {
|
|
377
|
-
return
|
|
377
|
+
return L || (e.includeStyleProperties ? (L = e.includeStyleProperties, L) : (L = j(window.getComputedStyle(document.documentElement)), L));
|
|
378
378
|
}
|
|
379
|
-
function
|
|
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
|
|
384
|
-
const t =
|
|
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 =
|
|
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 ||
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
512
|
+
async function le(e, t, r) {
|
|
513
513
|
const n = nt(e, t, r.includeQueryParams);
|
|
514
|
-
if (
|
|
515
|
-
return
|
|
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
|
|
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) :
|
|
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
|
|
537
|
+
return Z(c);
|
|
538
538
|
}
|
|
539
|
-
const r = e.poster, n =
|
|
540
|
-
return
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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) => !
|
|
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 =
|
|
624
|
+
const s = r ? Me(t, r) : t, i = ce(t);
|
|
625
625
|
let c;
|
|
626
|
-
return a || (c = await
|
|
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
|
|
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
|
|
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 && !
|
|
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
|
|
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 =
|
|
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
|
-
|
|
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((
|
|
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 (
|
|
748
|
+
} catch (y) {
|
|
749
749
|
console.error("Error inserting rule from remote css", {
|
|
750
750
|
rule: g,
|
|
751
|
-
error:
|
|
751
|
+
error: y
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
|
-
})).catch((
|
|
755
|
-
console.error("Error loading remote css",
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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
|
|
823
|
-
return i.width = d * u, i.height =
|
|
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
|
|
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
|
-
},
|
|
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 =
|
|
853
|
-
const
|
|
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
|
|
856
|
+
let y = g.nodeName.toLowerCase();
|
|
857
857
|
if (g.id) {
|
|
858
|
-
|
|
858
|
+
y += "#" + g.id, m.unshift(y);
|
|
859
859
|
break;
|
|
860
860
|
} else {
|
|
861
|
-
let E = g,
|
|
861
|
+
let E = g, R = 1;
|
|
862
862
|
for (; E.previousElementSibling; )
|
|
863
|
-
E = E.previousElementSibling, E.nodeName.toLowerCase() ===
|
|
864
|
-
|
|
863
|
+
E = E.previousElementSibling, E.nodeName.toLowerCase() === y && R++;
|
|
864
|
+
R > 1 && (y += `:nth-of-type(${R})`);
|
|
865
865
|
}
|
|
866
|
-
|
|
866
|
+
m.unshift(y), g = g.parentElement;
|
|
867
867
|
}
|
|
868
|
-
return
|
|
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
|
|
872
|
-
|
|
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
|
-
},
|
|
893
|
-
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a } = De(), [s, i] = C(!1), [c, u] = C(null), [d,
|
|
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
|
-
|
|
895
|
+
q(!0);
|
|
896
896
|
try {
|
|
897
|
-
const
|
|
897
|
+
const p = await fetch(`${a}/api/annotations`, {
|
|
898
898
|
headers: { "x-api-key": n }
|
|
899
899
|
});
|
|
900
|
-
if (
|
|
901
|
-
const
|
|
902
|
-
|
|
900
|
+
if (p.ok) {
|
|
901
|
+
const h = await p.json();
|
|
902
|
+
Q(h);
|
|
903
903
|
}
|
|
904
|
-
} catch (
|
|
905
|
-
console.error("Failed to fetch annotations",
|
|
904
|
+
} catch (p) {
|
|
905
|
+
console.error("Failed to fetch annotations", p);
|
|
906
906
|
} finally {
|
|
907
|
-
|
|
907
|
+
q(!1);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
}, [n, a]);
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
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
|
|
949
|
-
if (!
|
|
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
|
-
|
|
954
|
-
tag:
|
|
955
|
-
source:
|
|
956
|
-
rect:
|
|
957
|
-
element:
|
|
958
|
-
previewText: (
|
|
959
|
-
semanticReference:
|
|
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 =
|
|
929
|
+
}, [s, d]), V = ae(async (p) => {
|
|
962
930
|
if (!(!s || d) && c) {
|
|
963
|
-
|
|
931
|
+
p.preventDefault(), p.stopPropagation(), P(!0);
|
|
964
932
|
try {
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
const
|
|
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
|
-
|
|
977
|
-
} catch (
|
|
978
|
-
console.error("Failed to capture preview:",
|
|
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
|
-
|
|
948
|
+
P(!1), u(null);
|
|
981
949
|
}
|
|
982
950
|
}
|
|
983
|
-
}, [s, c, d,
|
|
984
|
-
|
|
985
|
-
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove",
|
|
986
|
-
}), [s, d,
|
|
987
|
-
const
|
|
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
|
-
|
|
990
|
-
const { semanticReference:
|
|
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:
|
|
1000
|
-
line: parseInt(
|
|
967
|
+
filePath: h,
|
|
968
|
+
line: parseInt(G),
|
|
1001
969
|
url: window.location.href,
|
|
1002
970
|
message: g,
|
|
1003
|
-
componentName:
|
|
1004
|
-
reference:
|
|
971
|
+
componentName: p.componentPath || d.tag,
|
|
972
|
+
reference: p
|
|
1005
973
|
})
|
|
1006
974
|
})).ok) throw new Error("Backend failed");
|
|
1007
|
-
e(r.success, "success"),
|
|
1008
|
-
} catch (
|
|
1009
|
-
console.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
|
-
|
|
979
|
+
R(!1);
|
|
1012
980
|
}
|
|
1013
|
-
},
|
|
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:
|
|
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
|
-
|
|
993
|
+
N.length > 0 && /* @__PURE__ */ l.jsx(
|
|
1026
994
|
"button",
|
|
1027
995
|
{
|
|
1028
996
|
onClick: () => {
|
|
1029
|
-
|
|
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
|
-
|
|
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:
|
|
1051
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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 && !
|
|
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:
|
|
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:
|
|
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:
|
|
1087
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1088
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1089
|
-
d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
1096
|
-
] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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:
|
|
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:
|
|
1107
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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:
|
|
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:
|
|
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: (
|
|
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:
|
|
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: () =>
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
1200
|
-
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1201
|
-
/* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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:
|
|
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:
|
|
1175
|
+
backgroundColor: p.status === "ready_for_review" ? "#f0fdf4" : "#fff"
|
|
1208
1176
|
}, children: [
|
|
1209
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1210
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
1189
|
+
p.message,
|
|
1222
1190
|
'"'
|
|
1223
1191
|
] }),
|
|
1224
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1225
|
-
/* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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
|
-
|
|
1195
|
+
p.componentName?.split(" > ").pop() || "UI Element"
|
|
1228
1196
|
] }),
|
|
1229
|
-
|
|
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
|
-
|
|
1199
|
+
A(p.filePath)
|
|
1232
1200
|
] })
|
|
1233
1201
|
] }),
|
|
1234
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1235
|
-
|
|
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:
|
|
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/${
|
|
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 && (
|
|
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:
|
|
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/${
|
|
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 && (
|
|
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:
|
|
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
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
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:
|
|
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
|
-
|
|
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/${
|
|
1277
|
+
(await fetch(`${a}/api/annotations/${p._id}`, {
|
|
1314
1278
|
method: "DELETE",
|
|
1315
1279
|
headers: { "x-api-key": n }
|
|
1316
|
-
})).ok && (
|
|
1280
|
+
})).ok && (k(), e(r.deleteSuccess, "success"));
|
|
1317
1281
|
} catch {
|
|
1318
1282
|
e(r.error, "error");
|
|
1319
1283
|
} finally {
|
|
1320
|
-
|
|
1284
|
+
D(null);
|
|
1321
1285
|
}
|
|
1322
1286
|
}
|
|
1323
1287
|
});
|
|
@@ -1329,9 +1293,9 @@ const Lt = (e) => {
|
|
|
1329
1293
|
}
|
|
1330
1294
|
)
|
|
1331
1295
|
] })
|
|
1332
|
-
] },
|
|
1296
|
+
] }, p._id)) })
|
|
1333
1297
|
] }) }),
|
|
1334
|
-
|
|
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:
|
|
1348
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1349
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
1370
|
-
/* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1371
|
-
/* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1372
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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:
|
|
1340
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:688",
|
|
1377
1341
|
className: "vg-button-ghost",
|
|
1378
|
-
onClick: () =>
|
|
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:
|
|
1350
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:695",
|
|
1387
1351
|
className: "vg-button-primary",
|
|
1388
1352
|
style: { backgroundColor: "#ef4444", flex: 1 },
|
|
1389
|
-
onClick:
|
|
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, (
|
|
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
|
-
|
|
1389
|
+
Lt as ViewGateOverlay,
|
|
1426
1390
|
_e as transformSourcePaths,
|
|
1427
1391
|
De as useViewGate,
|
|
1428
1392
|
Dt as viewgateNextLoader,
|