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.
- package/dist/cli.js +74 -0
- package/dist/components/ViewGateOverlay.d.ts.map +1 -1
- package/dist/plugin/next-loader.js +11 -0
- package/dist/plugin/transform-logic.js +20 -0
- package/dist/plugin/vite-plugin-viewgate.js +14 -0
- package/dist/viewgate-wrapper.js +296 -340
- package/dist/viewgate-wrapper.umd.cjs +6 -6
- package/package.json +1 -1
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 Ge, useState as C, useContext 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
|
-
_owner:
|
|
144
|
-
}, (
|
|
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:
|
|
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 (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
for (
|
|
175
|
-
g(w
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
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(
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var $ = Object.keys(
|
|
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
|
-
|
|
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
|
-
|
|
198
|
-
),
|
|
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
|
|
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
|
-
|
|
243
|
-
|
|
242
|
+
w ? Error("react-stack-top-frame") : O,
|
|
243
|
+
w ? A(n(o)) : G
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
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
|
-
|
|
253
|
-
|
|
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 = {
|
|
@@ -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 =
|
|
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,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
|
|
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();
|
|
@@ -839,7 +839,7 @@ const Gt = (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");
|
|
@@ -850,26 +850,26 @@ const Gt = (e) => {
|
|
|
850
850
|
r = r.parentElement;
|
|
851
851
|
}
|
|
852
852
|
const n = Gt(e), s = ((d) => {
|
|
853
|
-
const
|
|
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,106 +889,73 @@ const Gt = (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 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
|
|
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]),
|
|
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
|
|
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: !
|
|
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
|
-
|
|
978
|
-
} catch (
|
|
979
|
-
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);
|
|
980
947
|
} finally {
|
|
981
|
-
|
|
948
|
+
P(!1), u(null);
|
|
982
949
|
}
|
|
983
950
|
}
|
|
984
|
-
}, [s, c, d,
|
|
985
|
-
|
|
986
|
-
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("mousemove",
|
|
987
|
-
}), [s, d,
|
|
988
|
-
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 () => {
|
|
989
956
|
if (!d || !g.trim()) return;
|
|
990
|
-
|
|
991
|
-
const { semanticReference:
|
|
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:
|
|
1001
|
-
line: parseInt(
|
|
967
|
+
filePath: h,
|
|
968
|
+
line: parseInt(G),
|
|
1002
969
|
url: window.location.href,
|
|
1003
970
|
message: g,
|
|
1004
|
-
componentName:
|
|
1005
|
-
reference:
|
|
971
|
+
componentName: p.componentPath || d.tag,
|
|
972
|
+
reference: p
|
|
1006
973
|
})
|
|
1007
974
|
})).ok) throw new Error("Backend failed");
|
|
1008
|
-
e(r.success, "success"),
|
|
1009
|
-
} catch (
|
|
1010
|
-
console.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
|
-
|
|
979
|
+
R(!1);
|
|
1013
980
|
}
|
|
1014
|
-
},
|
|
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:
|
|
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
|
-
|
|
993
|
+
N.length > 0 && /* @__PURE__ */ l.jsx(
|
|
1027
994
|
"button",
|
|
1028
995
|
{
|
|
1029
996
|
onClick: () => {
|
|
1030
|
-
|
|
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
|
-
|
|
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:
|
|
1052
|
-
/* @__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" }),
|
|
1053
1020
|
"Capturing..."
|
|
1054
1021
|
] }) }),
|
|
1055
|
-
s && c && !d && !
|
|
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:
|
|
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:
|
|
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:
|
|
1088
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1089
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1090
|
-
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: [
|
|
1091
1058
|
"📦 ",
|
|
1092
1059
|
d.tag
|
|
1093
|
-
] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
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:
|
|
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
|
-
|
|
1097
|
-
] }) }) : /* @__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: [
|
|
1098
1065
|
"🆔 ",
|
|
1099
1066
|
d.semanticReference.signature
|
|
1100
1067
|
] })
|
|
1101
1068
|
] }),
|
|
1102
|
-
/* @__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: [
|
|
1103
1070
|
"🎯 ",
|
|
1104
1071
|
d.semanticReference.selector
|
|
1105
1072
|
] })
|
|
1106
1073
|
] }),
|
|
1107
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1117
|
-
|
|
1118
|
-
|
|
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:
|
|
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
|
-
) })
|
|
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: (
|
|
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:
|
|
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: () =>
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
1208
|
-
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1209
|
-
/* @__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: "✕" })
|
|
1210
1170
|
] }),
|
|
1211
|
-
/* @__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: {
|
|
1212
1172
|
border: "1px solid #e2e8f0",
|
|
1213
1173
|
borderRadius: "12px",
|
|
1214
1174
|
padding: "16px",
|
|
1215
|
-
backgroundColor:
|
|
1175
|
+
backgroundColor: p.status === "ready_for_review" ? "#f0fdf4" : "#fff"
|
|
1216
1176
|
}, children: [
|
|
1217
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1218
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
1189
|
+
p.message,
|
|
1230
1190
|
'"'
|
|
1231
1191
|
] }),
|
|
1232
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1233
|
-
/* @__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: [
|
|
1234
1194
|
"📦 ",
|
|
1235
|
-
|
|
1195
|
+
p.componentName?.split(" > ").pop() || "UI Element"
|
|
1236
1196
|
] }),
|
|
1237
|
-
|
|
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
|
-
|
|
1199
|
+
A(p.filePath)
|
|
1240
1200
|
] })
|
|
1241
1201
|
] }),
|
|
1242
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1243
|
-
|
|
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:
|
|
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/${
|
|
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 && (
|
|
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:
|
|
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/${
|
|
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 && (
|
|
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:
|
|
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
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
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:
|
|
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
|
-
|
|
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/${
|
|
1277
|
+
(await fetch(`${a}/api/annotations/${p._id}`, {
|
|
1322
1278
|
method: "DELETE",
|
|
1323
1279
|
headers: { "x-api-key": n }
|
|
1324
|
-
})).ok && (
|
|
1280
|
+
})).ok && (k(), e(r.deleteSuccess, "success"));
|
|
1325
1281
|
} catch {
|
|
1326
1282
|
e(r.error, "error");
|
|
1327
1283
|
} finally {
|
|
1328
|
-
|
|
1284
|
+
D(null);
|
|
1329
1285
|
}
|
|
1330
1286
|
}
|
|
1331
1287
|
});
|
|
@@ -1337,9 +1293,9 @@ const Gt = (e) => {
|
|
|
1337
1293
|
}
|
|
1338
1294
|
)
|
|
1339
1295
|
] })
|
|
1340
|
-
] },
|
|
1296
|
+
] }, p._id)) })
|
|
1341
1297
|
] }) }),
|
|
1342
|
-
|
|
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:
|
|
1356
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1357
|
-
/* @__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 })
|
|
1358
1314
|
] }) }),
|
|
1359
|
-
|
|
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:
|
|
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:
|
|
1378
|
-
/* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1379
|
-
/* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1380
|
-
/* @__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: [
|
|
1381
1337
|
/* @__PURE__ */ l.jsx(
|
|
1382
1338
|
"button",
|
|
1383
1339
|
{
|
|
1384
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1340
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:688",
|
|
1385
1341
|
className: "vg-button-ghost",
|
|
1386
|
-
onClick: () =>
|
|
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:
|
|
1350
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:695",
|
|
1395
1351
|
className: "vg-button-primary",
|
|
1396
1352
|
style: { backgroundColor: "#ef4444", flex: 1 },
|
|
1397
|
-
onClick:
|
|
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, (
|
|
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
|
-
|
|
1389
|
+
Lt as ViewGateOverlay,
|
|
1434
1390
|
_e as transformSourcePaths,
|
|
1435
1391
|
De as useViewGate,
|
|
1436
1392
|
Dt as viewgateNextLoader,
|