viewgate-wrapper 1.10.21 → 1.10.23
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/components/ViewGateOverlay.d.ts.map +1 -1
- package/dist/components/ViewGateProvider.d.ts +0 -1
- package/dist/components/ViewGateProvider.d.ts.map +1 -1
- package/dist/viewgate-wrapper.js +607 -608
- package/dist/viewgate-wrapper.umd.cjs +6 -6
- package/mcp-server/dist/index.js +11 -3
- package/package.json +1 -1
package/dist/viewgate-wrapper.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled,.vg-button-ghost:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(.4);transform:none!important;box-shadow:none!important;pointer-events:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}@keyframes vg-slide-in{0%{transform:translateY(30px) scale(.96);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .5s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .5s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .35s cubic-bezier(.22,1,.36,1) forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#f97316,#ea580c);border:3px solid white;box-shadow:0 4px 12px #ea580c66;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-formal-pin.mixed{background:linear-gradient(135deg,#10b981,#059669);border:3px solid #f97316;box-shadow:0 4px 15px #f9731666}.vg-formal-pin.modal-variant{background:linear-gradient(135deg,#f59e0b,#d97706);box-shadow:0 4px 12px #f59e0b66;border-style:dashed}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:16px;border-radius:16px;background:#ffffffe6;backdrop-filter:blur(12px) saturate(160%);-webkit-backdrop-filter:blur(12px) saturate(160%);color:#1e293b;width:320px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;visibility:hidden;pointer-events:none;transition:all .3s cubic-bezier(.19,1,.22,1);border:1px solid rgba(255,255,255,.5);z-index:1000;overflow:hidden}.vg-tooltip-scroll{scrollbar-width:thin;scrollbar-color:rgba(99,102,241,.2) transparent;overflow-y:auto;overflow-x:hidden;padding-right:12px;scroll-behavior:smooth}.vg-tooltip-scroll::-webkit-scrollbar{width:4px}.vg-tooltip-scroll::-webkit-scrollbar-track{background:transparent}.vg-tooltip-scroll::-webkit-scrollbar-thumb{background:#6366f14d;border-radius:10px}.vg-tooltip-scroll::-webkit-scrollbar-thumb:hover{background:#6366f180}.vg-text-wrap{word-break:break-word;overflow-wrap:break-word;word-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;white-space:pre-wrap}.vg-line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word;max-height:2.8em}.vg-pin-badge{position:absolute;top:-8px;right:-8px;background:#f43f5e;color:#fff;font-size:10px;font-weight:800;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:2px solid white;box-shadow:0 4px 12px #f43f5e66;z-index:2}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-animate-spin{animation:vg-spin .8s linear infinite}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}.vg-url-tag{position:relative;cursor:help;transition:all .2s ease}.vg-url-tag:hover{background:#f1f5f9!important;border-color:var(--vg-primary)!important}.vg-url-tooltip{position:fixed;left:0;top:0;background:#0f172a;color:#fff;padding:8px 14px;border-radius:10px;font-size:11px;font-weight:500;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;box-shadow:0 10px 25px -5px #0006;z-index:2147483647;border:1px solid rgba(255,255,255,.1)}.vg-url-tooltip.visible{opacity:1}.vg-url-tooltip:after{content:"";position:absolute;left:50%;transform:translate(-50%);border-width:6px;border-style:solid}.vg-url-tooltip.vg-top:after{top:100%;border-color:#0f172a transparent transparent transparent}.vg-url-tooltip.vg-bottom:after{bottom:100%;border-color:transparent transparent #0f172a transparent}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import $t, { useRef as
|
|
2
|
+
import $t, { useRef as ue, useState as S, useEffect as K, forwardRef as yt, createElement as We, createContext as Mt, useContext as Nt, useMemo as It, useCallback as Re } from "react";
|
|
3
3
|
import { createPortal as Lt } from "react-dom";
|
|
4
|
-
var
|
|
4
|
+
var Oe = { exports: {} }, ye = {};
|
|
5
5
|
var et;
|
|
6
6
|
function zt() {
|
|
7
|
-
if (et) return
|
|
7
|
+
if (et) return ye;
|
|
8
8
|
et = 1;
|
|
9
9
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
-
function r(n,
|
|
10
|
+
function r(n, s, a) {
|
|
11
11
|
var c = null;
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
for (var i in
|
|
15
|
-
i !== "key" && (
|
|
16
|
-
} else
|
|
17
|
-
return
|
|
12
|
+
if (a !== void 0 && (c = "" + a), s.key !== void 0 && (c = "" + s.key), "key" in s) {
|
|
13
|
+
a = {};
|
|
14
|
+
for (var i in s)
|
|
15
|
+
i !== "key" && (a[i] = s[i]);
|
|
16
|
+
} else a = s;
|
|
17
|
+
return s = a.ref, {
|
|
18
18
|
$$typeof: e,
|
|
19
19
|
type: n,
|
|
20
20
|
key: c,
|
|
21
|
-
ref:
|
|
22
|
-
props:
|
|
21
|
+
ref: s !== void 0 ? s : null,
|
|
22
|
+
props: a
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return ye.Fragment = t, ye.jsx = r, ye.jsxs = r, ye;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var we = {};
|
|
28
28
|
var tt;
|
|
29
29
|
function Dt() {
|
|
30
30
|
return tt || (tt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
31
|
function e(d) {
|
|
32
32
|
if (d == null) return null;
|
|
33
33
|
if (typeof d == "function")
|
|
34
|
-
return d.$$typeof ===
|
|
34
|
+
return d.$$typeof === pe ? null : d.displayName || d.name || null;
|
|
35
35
|
if (typeof d == "string") return d;
|
|
36
36
|
switch (d) {
|
|
37
37
|
case ne:
|
|
38
38
|
return "Fragment";
|
|
39
|
-
case
|
|
39
|
+
case Se:
|
|
40
40
|
return "Profiler";
|
|
41
|
-
case
|
|
41
|
+
case be:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case Ce:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case z:
|
|
46
46
|
return "SuspenseList";
|
|
47
47
|
case Xe:
|
|
48
48
|
return "Activity";
|
|
@@ -51,18 +51,18 @@ function Dt() {
|
|
|
51
51
|
switch (typeof d.tag == "number" && console.error(
|
|
52
52
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
53
|
), d.$$typeof) {
|
|
54
|
-
case
|
|
54
|
+
case B:
|
|
55
55
|
return "Portal";
|
|
56
|
-
case
|
|
56
|
+
case q:
|
|
57
57
|
return d.displayName || "Context";
|
|
58
|
-
case
|
|
58
|
+
case N:
|
|
59
59
|
return (d._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
60
|
+
case V:
|
|
61
61
|
var x = d.render;
|
|
62
62
|
return d = d.displayName, d || (d = x.displayName || x.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
63
|
-
case
|
|
63
|
+
case D:
|
|
64
64
|
return x = d.displayName || null, x !== null ? x : e(d.type) || "Memo";
|
|
65
|
-
case
|
|
65
|
+
case Ee:
|
|
66
66
|
x = d._payload, d = d._init;
|
|
67
67
|
try {
|
|
68
68
|
return e(d(x));
|
|
@@ -93,7 +93,7 @@ function Dt() {
|
|
|
93
93
|
}
|
|
94
94
|
function n(d) {
|
|
95
95
|
if (d === ne) return "<>";
|
|
96
|
-
if (typeof d == "object" && d !== null && d.$$typeof ===
|
|
96
|
+
if (typeof d == "object" && d !== null && d.$$typeof === Ee)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
99
|
var x = e(d);
|
|
@@ -102,15 +102,15 @@ function Dt() {
|
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
var d =
|
|
105
|
+
function s() {
|
|
106
|
+
var d = se.A;
|
|
107
107
|
return d === null ? null : d.getOwner();
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function a() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
112
|
function c(d) {
|
|
113
|
-
if (
|
|
113
|
+
if (ke.call(d, "key")) {
|
|
114
114
|
var x = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
115
115
|
if (x && x.isReactWarning) return !1;
|
|
116
116
|
}
|
|
@@ -118,7 +118,7 @@ function Dt() {
|
|
|
118
118
|
}
|
|
119
119
|
function i(d, x) {
|
|
120
120
|
function v() {
|
|
121
|
-
|
|
121
|
+
Z || (Z = !0, console.error(
|
|
122
122
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
123
|
x
|
|
124
124
|
));
|
|
@@ -134,10 +134,10 @@ function Dt() {
|
|
|
134
134
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
135
|
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
136
136
|
}
|
|
137
|
-
function p(d, x, v, b,
|
|
137
|
+
function p(d, x, v, b, ae, Y) {
|
|
138
138
|
var k = v.ref;
|
|
139
139
|
return d = {
|
|
140
|
-
$$typeof:
|
|
140
|
+
$$typeof: L,
|
|
141
141
|
type: d,
|
|
142
142
|
key: x,
|
|
143
143
|
props: v,
|
|
@@ -159,33 +159,33 @@ function Dt() {
|
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
|
-
value:
|
|
162
|
+
value: ae
|
|
163
163
|
}), Object.defineProperty(d, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
167
|
+
value: Y
|
|
168
168
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
169
169
|
}
|
|
170
|
-
function m(d, x, v, b,
|
|
170
|
+
function m(d, x, v, b, ae, Y) {
|
|
171
171
|
var k = x.children;
|
|
172
172
|
if (k !== void 0)
|
|
173
173
|
if (b)
|
|
174
|
-
if (
|
|
174
|
+
if (je(k)) {
|
|
175
175
|
for (b = 0; b < k.length; b++)
|
|
176
|
-
|
|
176
|
+
f(k[b]);
|
|
177
177
|
Object.freeze && Object.freeze(k);
|
|
178
178
|
} else
|
|
179
179
|
console.error(
|
|
180
180
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
181
|
);
|
|
182
|
-
else
|
|
183
|
-
if (
|
|
182
|
+
else f(k);
|
|
183
|
+
if (ke.call(x, "key")) {
|
|
184
184
|
k = e(d);
|
|
185
|
-
var
|
|
186
|
-
return
|
|
185
|
+
var T = Object.keys(x).filter(function($e) {
|
|
186
|
+
return $e !== "key";
|
|
187
187
|
});
|
|
188
|
-
b = 0 <
|
|
188
|
+
b = 0 < T.length ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}", fe[k + b] || (T = 0 < T.length ? "{" + T.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
190
|
let props = %s;
|
|
191
191
|
<%s {...props} />
|
|
@@ -194,14 +194,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
194
194
|
<%s key={someKey} {...props} />`,
|
|
195
195
|
b,
|
|
196
196
|
k,
|
|
197
|
-
|
|
197
|
+
T,
|
|
198
198
|
k
|
|
199
|
-
),
|
|
199
|
+
), fe[k + b] = !0);
|
|
200
200
|
}
|
|
201
201
|
if (k = null, v !== void 0 && (r(v), k = "" + v), c(x) && (r(x.key), k = "" + x.key), "key" in x) {
|
|
202
202
|
v = {};
|
|
203
|
-
for (var
|
|
204
|
-
|
|
203
|
+
for (var H in x)
|
|
204
|
+
H !== "key" && (v[H] = x[H]);
|
|
205
205
|
} else v = x;
|
|
206
206
|
return k && i(
|
|
207
207
|
v,
|
|
@@ -210,67 +210,67 @@ React keys must be passed directly to JSX without using spread:
|
|
|
210
210
|
d,
|
|
211
211
|
k,
|
|
212
212
|
v,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
s(),
|
|
214
|
+
ae,
|
|
215
|
+
Y
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
218
|
+
function f(d) {
|
|
219
|
+
R(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === Ee && (d._payload.status === "fulfilled" ? R(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return typeof d == "object" && d !== null && d.$$typeof ===
|
|
221
|
+
function R(d) {
|
|
222
|
+
return typeof d == "object" && d !== null && d.$$typeof === L;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var P = $t, L = /* @__PURE__ */ Symbol.for("react.transitional.element"), B = /* @__PURE__ */ Symbol.for("react.portal"), ne = /* @__PURE__ */ Symbol.for("react.fragment"), be = /* @__PURE__ */ Symbol.for("react.strict_mode"), Se = /* @__PURE__ */ Symbol.for("react.profiler"), N = /* @__PURE__ */ Symbol.for("react.consumer"), q = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__PURE__ */ Symbol.for("react.forward_ref"), Ce = /* @__PURE__ */ Symbol.for("react.suspense"), z = /* @__PURE__ */ Symbol.for("react.suspense_list"), D = /* @__PURE__ */ Symbol.for("react.memo"), Ee = /* @__PURE__ */ Symbol.for("react.lazy"), Xe = /* @__PURE__ */ Symbol.for("react.activity"), pe = /* @__PURE__ */ Symbol.for("react.client.reference"), se = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ke = Object.prototype.hasOwnProperty, je = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
P = {
|
|
228
228
|
react_stack_bottom_frame: function(d) {
|
|
229
229
|
return d();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var b = 1e4 >
|
|
232
|
+
var Z, ee = {}, me = P.react_stack_bottom_frame.bind(
|
|
233
|
+
P,
|
|
234
|
+
a
|
|
235
|
+
)(), F = I(n(a)), fe = {};
|
|
236
|
+
we.Fragment = ne, we.jsx = function(d, x, v) {
|
|
237
|
+
var b = 1e4 > se.recentlyCreatedOwnerStacks++;
|
|
238
238
|
return m(
|
|
239
239
|
d,
|
|
240
240
|
x,
|
|
241
241
|
v,
|
|
242
242
|
!1,
|
|
243
|
-
b ? Error("react-stack-top-frame") :
|
|
244
|
-
b ?
|
|
243
|
+
b ? Error("react-stack-top-frame") : me,
|
|
244
|
+
b ? I(n(d)) : F
|
|
245
245
|
);
|
|
246
|
-
},
|
|
247
|
-
var b = 1e4 >
|
|
246
|
+
}, we.jsxs = function(d, x, v) {
|
|
247
|
+
var b = 1e4 > se.recentlyCreatedOwnerStacks++;
|
|
248
248
|
return m(
|
|
249
249
|
d,
|
|
250
250
|
x,
|
|
251
251
|
v,
|
|
252
252
|
!0,
|
|
253
|
-
b ? Error("react-stack-top-frame") :
|
|
254
|
-
b ?
|
|
253
|
+
b ? Error("react-stack-top-frame") : me,
|
|
254
|
+
b ? I(n(d)) : F
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
|
-
})()),
|
|
257
|
+
})()), we;
|
|
258
258
|
}
|
|
259
259
|
var rt;
|
|
260
260
|
function Ft() {
|
|
261
|
-
return rt || (rt = 1, process.env.NODE_ENV === "production" ?
|
|
261
|
+
return rt || (rt = 1, process.env.NODE_ENV === "production" ? Oe.exports = zt() : Oe.exports = Dt()), Oe.exports;
|
|
262
262
|
}
|
|
263
263
|
var o = Ft();
|
|
264
264
|
const Ht = ({ children: e }) => {
|
|
265
|
-
const t =
|
|
265
|
+
const t = ue(null), [r, n] = S(null);
|
|
266
266
|
return K(() => {
|
|
267
267
|
if (t.current && !t.current.shadowRoot) {
|
|
268
|
-
const
|
|
268
|
+
const s = t.current.attachShadow({ mode: "open" });
|
|
269
269
|
document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((i) => {
|
|
270
|
-
(i.textContent?.includes(".vg-") || i.textContent?.includes("--vg-")) &&
|
|
270
|
+
(i.textContent?.includes(".vg-") || i.textContent?.includes("--vg-")) && s.appendChild(i.cloneNode(!0));
|
|
271
271
|
});
|
|
272
272
|
const c = document.createElement("link");
|
|
273
|
-
c.rel = "stylesheet", c.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",
|
|
273
|
+
c.rel = "stylesheet", c.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap", s.appendChild(c), n(s);
|
|
274
274
|
}
|
|
275
275
|
}, []), /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && Lt(e, r) });
|
|
276
276
|
};
|
|
@@ -307,8 +307,8 @@ const Yt = yt(
|
|
|
307
307
|
size: t = 24,
|
|
308
308
|
strokeWidth: r = 2,
|
|
309
309
|
absoluteStrokeWidth: n,
|
|
310
|
-
className:
|
|
311
|
-
children:
|
|
310
|
+
className: s = "",
|
|
311
|
+
children: a,
|
|
312
312
|
iconNode: c,
|
|
313
313
|
...i
|
|
314
314
|
}, u) => We(
|
|
@@ -320,27 +320,27 @@ const Yt = yt(
|
|
|
320
320
|
height: t,
|
|
321
321
|
stroke: e,
|
|
322
322
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
323
|
-
className: wt("lucide",
|
|
324
|
-
...!
|
|
323
|
+
className: wt("lucide", s),
|
|
324
|
+
...!a && !qt(i) && { "aria-hidden": "true" },
|
|
325
325
|
...i
|
|
326
326
|
},
|
|
327
327
|
[
|
|
328
328
|
...c.map(([p, m]) => We(p, m)),
|
|
329
|
-
...Array.isArray(
|
|
329
|
+
...Array.isArray(a) ? a : [a]
|
|
330
330
|
]
|
|
331
331
|
)
|
|
332
332
|
);
|
|
333
333
|
const _ = (e, t) => {
|
|
334
334
|
const r = yt(
|
|
335
|
-
({ className: n, ...
|
|
336
|
-
ref:
|
|
335
|
+
({ className: n, ...s }, a) => We(Yt, {
|
|
336
|
+
ref: a,
|
|
337
337
|
iconNode: t,
|
|
338
338
|
className: wt(
|
|
339
339
|
`lucide-${Wt(nt(e))}`,
|
|
340
340
|
`lucide-${e}`,
|
|
341
341
|
n
|
|
342
342
|
),
|
|
343
|
-
...
|
|
343
|
+
...s
|
|
344
344
|
})
|
|
345
345
|
);
|
|
346
346
|
return r.displayName = nt(e), r;
|
|
@@ -353,16 +353,16 @@ const Xt = [
|
|
|
353
353
|
const Zt = [
|
|
354
354
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
355
355
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
356
|
-
],
|
|
356
|
+
], de = _("circle-check", Zt);
|
|
357
357
|
const Kt = [
|
|
358
358
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
359
359
|
["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
|
|
360
|
-
],
|
|
360
|
+
], st = _("clock", Kt);
|
|
361
361
|
const Qt = [
|
|
362
362
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
363
363
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
364
364
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
365
|
-
],
|
|
365
|
+
], at = _("external-link", Qt);
|
|
366
366
|
const er = [
|
|
367
367
|
[
|
|
368
368
|
"path",
|
|
@@ -378,15 +378,15 @@ const rr = [
|
|
|
378
378
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
379
379
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
380
380
|
], nr = _("globe", rr);
|
|
381
|
-
const
|
|
381
|
+
const sr = [
|
|
382
382
|
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
383
383
|
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
384
384
|
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
385
385
|
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
|
|
386
386
|
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
387
387
|
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
388
|
-
], ot = _("grip-vertical",
|
|
389
|
-
const
|
|
388
|
+
], ot = _("grip-vertical", sr);
|
|
389
|
+
const ar = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], or = _("loader-circle", ar);
|
|
390
390
|
const ir = [
|
|
391
391
|
[
|
|
392
392
|
"path",
|
|
@@ -395,7 +395,7 @@ const ir = [
|
|
|
395
395
|
key: "18887p"
|
|
396
396
|
}
|
|
397
397
|
]
|
|
398
|
-
],
|
|
398
|
+
], Ae = _("message-square", ir);
|
|
399
399
|
const cr = [
|
|
400
400
|
[
|
|
401
401
|
"path",
|
|
@@ -542,22 +542,22 @@ const xr = [
|
|
|
542
542
|
apiKey: r,
|
|
543
543
|
baseUrl: n = "https://view-gate.vercel.app"
|
|
544
544
|
}) => {
|
|
545
|
-
const [
|
|
545
|
+
const [s, a] = S(!1), [c, i] = S([]);
|
|
546
546
|
K(() => {
|
|
547
|
-
|
|
547
|
+
a(vr());
|
|
548
548
|
}, []);
|
|
549
549
|
const u = () => {
|
|
550
|
-
if (sessionStorage.removeItem(Ue),
|
|
551
|
-
const
|
|
552
|
-
|
|
550
|
+
if (sessionStorage.removeItem(Ue), a(!1), typeof window < "u") {
|
|
551
|
+
const f = new URL(window.location.href);
|
|
552
|
+
f.searchParams.delete("viewgate"), window.history.replaceState({}, "", f.toString());
|
|
553
553
|
}
|
|
554
|
-
}, p = (
|
|
555
|
-
const
|
|
556
|
-
i((
|
|
557
|
-
i((
|
|
554
|
+
}, p = (f, R) => {
|
|
555
|
+
const P = Date.now();
|
|
556
|
+
i((L) => [...L, { id: P, message: f, type: R }]), setTimeout(() => {
|
|
557
|
+
i((L) => L.filter((B) => B.id !== P));
|
|
558
558
|
}, 4e3);
|
|
559
559
|
}, m = yr[t];
|
|
560
|
-
return /* @__PURE__ */ o.jsxs(vt.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:
|
|
560
|
+
return /* @__PURE__ */ o.jsxs(vt.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:251", value: {
|
|
561
561
|
addToast: p,
|
|
562
562
|
language: t,
|
|
563
563
|
t: m,
|
|
@@ -567,15 +567,15 @@ const xr = [
|
|
|
567
567
|
hasActiveToasts: c.length > 0
|
|
568
568
|
}, children: [
|
|
569
569
|
e,
|
|
570
|
-
|
|
571
|
-
/* @__PURE__ */ o.jsx(
|
|
572
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:
|
|
573
|
-
|
|
574
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:
|
|
575
|
-
/* @__PURE__ */ o.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:
|
|
576
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:
|
|
570
|
+
s && /* @__PURE__ */ o.jsx(Ht, { "data-source-path": "/src/components/ViewGateProvider.tsx:262", children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:263", className: "vg-container", children: [
|
|
571
|
+
/* @__PURE__ */ o.jsx(An, { "data-source-path": "/src/components/ViewGateProvider.tsx:264" }),
|
|
572
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:265", className: "vg-toasts", style: { zIndex: 2147483646 }, children: c.map((f) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:267", className: `vg-toast vg-animate-slide ${f.type}`, children: [
|
|
573
|
+
f.type === "success" ? /* @__PURE__ */ o.jsx(de, { "data-source-path": "/src/components/ViewGateProvider.tsx:269", size: 24, color: "#22c55e" }) : /* @__PURE__ */ o.jsx(Jt, { "data-source-path": "/src/components/ViewGateProvider.tsx:271", size: 24, color: "#ef4444" }),
|
|
574
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:273", children: [
|
|
575
|
+
/* @__PURE__ */ o.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:274", style: { display: "block", fontSize: "13px", color: "#0f172a", textTransform: "uppercase", marginBottom: "2px" }, children: f.type === "success" ? m.successHeader : m.errorHeader }),
|
|
576
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:277", style: { fontSize: "14px", color: "#000000" }, children: f.message })
|
|
577
577
|
] })
|
|
578
|
-
] },
|
|
578
|
+
] }, f.id)) })
|
|
579
579
|
] }) })
|
|
580
580
|
] });
|
|
581
581
|
};
|
|
@@ -586,8 +586,8 @@ function br(e, t) {
|
|
|
586
586
|
return window.location.protocol + e;
|
|
587
587
|
if (e.match(/^[a-z]+:/i))
|
|
588
588
|
return e;
|
|
589
|
-
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"),
|
|
590
|
-
return r.head.appendChild(n), r.body.appendChild(
|
|
589
|
+
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), s = r.createElement("a");
|
|
590
|
+
return r.head.appendChild(n), r.body.appendChild(s), t && (n.href = t), s.href = e, s.href;
|
|
591
591
|
}
|
|
592
592
|
const Sr = /* @__PURE__ */ (() => {
|
|
593
593
|
let e = 0;
|
|
@@ -603,20 +603,20 @@ function Q(e) {
|
|
|
603
603
|
t.push(e[r]);
|
|
604
604
|
return t;
|
|
605
605
|
}
|
|
606
|
-
let
|
|
606
|
+
let ce = null;
|
|
607
607
|
function bt(e = {}) {
|
|
608
|
-
return
|
|
608
|
+
return ce || (e.includeStyleProperties ? (ce = e.includeStyleProperties, ce) : (ce = Q(window.getComputedStyle(document.documentElement)), ce));
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Te(e, t) {
|
|
611
611
|
const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
612
612
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
613
613
|
}
|
|
614
614
|
function Cr(e) {
|
|
615
|
-
const t =
|
|
615
|
+
const t = Te(e, "border-left-width"), r = Te(e, "border-right-width");
|
|
616
616
|
return e.clientWidth + t + r;
|
|
617
617
|
}
|
|
618
618
|
function Er(e) {
|
|
619
|
-
const t =
|
|
619
|
+
const t = Te(e, "border-top-width"), r = Te(e, "border-bottom-width");
|
|
620
620
|
return e.clientHeight + t + r;
|
|
621
621
|
}
|
|
622
622
|
function St(e, t = {}) {
|
|
@@ -632,11 +632,11 @@ function kr() {
|
|
|
632
632
|
const r = t && t.env ? t.env.devicePixelRatio : null;
|
|
633
633
|
return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
634
634
|
}
|
|
635
|
-
const
|
|
636
|
-
function
|
|
637
|
-
(e.width >
|
|
635
|
+
const M = 16384;
|
|
636
|
+
function jr(e) {
|
|
637
|
+
(e.width > M || e.height > M) && (e.width > M && e.height > M ? e.width > e.height ? (e.height *= M / e.width, e.width = M) : (e.width *= M / e.height, e.height = M) : e.width > M ? (e.height *= M / e.width, e.width = M) : (e.width *= M / e.height, e.height = M));
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function _e(e) {
|
|
640
640
|
return new Promise((t, r) => {
|
|
641
641
|
const n = new Image();
|
|
642
642
|
n.onload = () => {
|
|
@@ -646,36 +646,36 @@ function Te(e) {
|
|
|
646
646
|
}, n.onerror = r, n.crossOrigin = "anonymous", n.decoding = "async", n.src = e;
|
|
647
647
|
});
|
|
648
648
|
}
|
|
649
|
-
async function
|
|
649
|
+
async function Rr(e) {
|
|
650
650
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
|
|
651
651
|
}
|
|
652
652
|
async function Or(e, t, r) {
|
|
653
|
-
const n = "http://www.w3.org/2000/svg",
|
|
654
|
-
return
|
|
653
|
+
const n = "http://www.w3.org/2000/svg", s = document.createElementNS(n, "svg"), a = document.createElementNS(n, "foreignObject");
|
|
654
|
+
return s.setAttribute("width", `${t}`), s.setAttribute("height", `${r}`), s.setAttribute("viewBox", `0 0 ${t} ${r}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), s.appendChild(a), a.appendChild(e), Rr(s);
|
|
655
655
|
}
|
|
656
|
-
const
|
|
656
|
+
const $ = (e, t) => {
|
|
657
657
|
if (e instanceof t)
|
|
658
658
|
return !0;
|
|
659
659
|
const r = Object.getPrototypeOf(e);
|
|
660
|
-
return r === null ? !1 : r.constructor.name === t.name ||
|
|
660
|
+
return r === null ? !1 : r.constructor.name === t.name || $(r, t);
|
|
661
661
|
};
|
|
662
|
-
function
|
|
662
|
+
function Ar(e) {
|
|
663
663
|
const t = e.getPropertyValue("content");
|
|
664
664
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function Vr(e, t) {
|
|
667
667
|
return bt(t).map((r) => {
|
|
668
|
-
const n = e.getPropertyValue(r),
|
|
669
|
-
return `${r}: ${n}${
|
|
668
|
+
const n = e.getPropertyValue(r), s = e.getPropertyPriority(r);
|
|
669
|
+
return `${r}: ${n}${s ? " !important" : ""};`;
|
|
670
670
|
}).join(" ");
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
const
|
|
674
|
-
return document.createTextNode(`${
|
|
672
|
+
function Tr(e, t, r, n) {
|
|
673
|
+
const s = `.${e}:${t}`, a = r.cssText ? Ar(r) : Vr(r, n);
|
|
674
|
+
return document.createTextNode(`${s}{${a}}`);
|
|
675
675
|
}
|
|
676
676
|
function ct(e, t, r, n) {
|
|
677
|
-
const
|
|
678
|
-
if (
|
|
677
|
+
const s = window.getComputedStyle(e, r), a = s.getPropertyValue("content");
|
|
678
|
+
if (a === "" || a === "none")
|
|
679
679
|
return;
|
|
680
680
|
const c = Sr();
|
|
681
681
|
try {
|
|
@@ -684,9 +684,9 @@ function ct(e, t, r, n) {
|
|
|
684
684
|
return;
|
|
685
685
|
}
|
|
686
686
|
const i = document.createElement("style");
|
|
687
|
-
i.appendChild(
|
|
687
|
+
i.appendChild(Tr(c, r, s, n)), t.appendChild(i);
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function _r(e, t, r) {
|
|
690
690
|
ct(e, t, ":before", r), ct(e, t, ":after", r);
|
|
691
691
|
}
|
|
692
692
|
const lt = "application/font-woff", dt = "image/jpeg", Pr = {
|
|
@@ -723,16 +723,16 @@ async function Ct(e, t, r) {
|
|
|
723
723
|
const n = await fetch(e, t);
|
|
724
724
|
if (n.status === 404)
|
|
725
725
|
throw new Error(`Resource "${n.url}" not found`);
|
|
726
|
-
const
|
|
727
|
-
return new Promise((
|
|
726
|
+
const s = await n.blob();
|
|
727
|
+
return new Promise((a, c) => {
|
|
728
728
|
const i = new FileReader();
|
|
729
729
|
i.onerror = c, i.onloadend = () => {
|
|
730
730
|
try {
|
|
731
|
-
|
|
731
|
+
a(r({ res: n, result: i.result }));
|
|
732
732
|
} catch (u) {
|
|
733
733
|
c(u);
|
|
734
734
|
}
|
|
735
|
-
}, i.readAsDataURL(
|
|
735
|
+
}, i.readAsDataURL(s);
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
738
|
const ze = {};
|
|
@@ -745,50 +745,50 @@ async function Ye(e, t, r) {
|
|
|
745
745
|
if (ze[n] != null)
|
|
746
746
|
return ze[n];
|
|
747
747
|
r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
748
|
-
let
|
|
748
|
+
let s;
|
|
749
749
|
try {
|
|
750
|
-
const
|
|
751
|
-
|
|
752
|
-
} catch (
|
|
753
|
-
|
|
750
|
+
const a = await Ct(e, r.fetchRequestInit, ({ res: c, result: i }) => (t || (t = c.headers.get("Content-Type") || ""), $r(i)));
|
|
751
|
+
s = Mr(a, t);
|
|
752
|
+
} catch (a) {
|
|
753
|
+
s = r.imagePlaceholder || "";
|
|
754
754
|
let c = `Failed to fetch resource: ${e}`;
|
|
755
|
-
|
|
755
|
+
a && (c = typeof a == "string" ? a : a.message), c && console.warn(c);
|
|
756
756
|
}
|
|
757
|
-
return ze[n] =
|
|
757
|
+
return ze[n] = s, s;
|
|
758
758
|
}
|
|
759
759
|
async function Ir(e) {
|
|
760
760
|
const t = e.toDataURL();
|
|
761
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
761
|
+
return t === "data:," ? e.cloneNode(!1) : _e(t);
|
|
762
762
|
}
|
|
763
763
|
async function Lr(e, t) {
|
|
764
764
|
if (e.currentSrc) {
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
const i =
|
|
768
|
-
return
|
|
765
|
+
const a = document.createElement("canvas"), c = a.getContext("2d");
|
|
766
|
+
a.width = e.clientWidth, a.height = e.clientHeight, c?.drawImage(e, 0, 0, a.width, a.height);
|
|
767
|
+
const i = a.toDataURL();
|
|
768
|
+
return _e(i);
|
|
769
769
|
}
|
|
770
|
-
const r = e.poster, n = qe(r),
|
|
771
|
-
return
|
|
770
|
+
const r = e.poster, n = qe(r), s = await Ye(r, n, t);
|
|
771
|
+
return _e(s);
|
|
772
772
|
}
|
|
773
773
|
async function zr(e, t) {
|
|
774
774
|
var r;
|
|
775
775
|
try {
|
|
776
776
|
if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
|
|
777
|
-
return await
|
|
777
|
+
return await Pe(e.contentDocument.body, t, !0);
|
|
778
778
|
} catch {
|
|
779
779
|
}
|
|
780
780
|
return e.cloneNode(!1);
|
|
781
781
|
}
|
|
782
782
|
async function Dr(e, t) {
|
|
783
|
-
return
|
|
783
|
+
return $(e, HTMLCanvasElement) ? Ir(e) : $(e, HTMLVideoElement) ? Lr(e, t) : $(e, HTMLIFrameElement) ? zr(e, t) : e.cloneNode(Et(e));
|
|
784
784
|
}
|
|
785
785
|
const Fr = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Et = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
786
786
|
async function Hr(e, t, r) {
|
|
787
|
-
var n,
|
|
787
|
+
var n, s;
|
|
788
788
|
if (Et(t))
|
|
789
789
|
return t;
|
|
790
|
-
let
|
|
791
|
-
return Fr(e) && e.assignedNodes ?
|
|
790
|
+
let a = [];
|
|
791
|
+
return Fr(e) && e.assignedNodes ? a = Q(e.assignedNodes()) : $(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? a = Q(e.contentDocument.body.childNodes) : a = Q(((s = e.shadowRoot) !== null && s !== void 0 ? s : e).childNodes), a.length === 0 || $(e, HTMLVideoElement) || await a.reduce((c, i) => c.then(() => Pe(i, r)).then((u) => {
|
|
792
792
|
u && t.appendChild(u);
|
|
793
793
|
}), Promise.resolve()), t;
|
|
794
794
|
}
|
|
@@ -796,49 +796,49 @@ function Wr(e, t, r) {
|
|
|
796
796
|
const n = t.style;
|
|
797
797
|
if (!n)
|
|
798
798
|
return;
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
let c =
|
|
802
|
-
|
|
799
|
+
const s = window.getComputedStyle(e);
|
|
800
|
+
s.cssText ? (n.cssText = s.cssText, n.transformOrigin = s.transformOrigin) : bt(r).forEach((a) => {
|
|
801
|
+
let c = s.getPropertyValue(a);
|
|
802
|
+
a === "font-size" && c.endsWith("px") && (c = `${Math.floor(parseFloat(c.substring(0, c.length - 2))) - 0.1}px`), $(e, HTMLIFrameElement) && a === "display" && c === "inline" && (c = "block"), a === "d" && t.getAttribute("d") && (c = `path(${t.getAttribute("d")})`), n.setProperty(a, c, s.getPropertyPriority(a));
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
805
|
function Ur(e, t) {
|
|
806
|
-
|
|
806
|
+
$(e, HTMLTextAreaElement) && (t.innerHTML = e.value), $(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
807
807
|
}
|
|
808
808
|
function Br(e, t) {
|
|
809
|
-
if (
|
|
810
|
-
const n = Array.from(t.children).find((
|
|
809
|
+
if ($(e, HTMLSelectElement)) {
|
|
810
|
+
const n = Array.from(t.children).find((s) => e.value === s.getAttribute("value"));
|
|
811
811
|
n && n.setAttribute("selected", "");
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
function qr(e, t, r) {
|
|
815
|
-
return
|
|
815
|
+
return $(t, Element) && (Wr(e, t, r), _r(e, t, r), Ur(e, t), Br(e, t)), t;
|
|
816
816
|
}
|
|
817
817
|
async function Yr(e, t) {
|
|
818
818
|
const r = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
819
819
|
if (r.length === 0)
|
|
820
820
|
return e;
|
|
821
821
|
const n = {};
|
|
822
|
-
for (let
|
|
823
|
-
const i = r[
|
|
822
|
+
for (let a = 0; a < r.length; a++) {
|
|
823
|
+
const i = r[a].getAttribute("xlink:href");
|
|
824
824
|
if (i) {
|
|
825
825
|
const u = e.querySelector(i), p = document.querySelector(i);
|
|
826
|
-
!u && p && !n[i] && (n[i] = await
|
|
826
|
+
!u && p && !n[i] && (n[i] = await Pe(p, t, !0));
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
|
-
const
|
|
830
|
-
if (
|
|
831
|
-
const
|
|
832
|
-
c.setAttribute("xmlns",
|
|
833
|
-
const i = document.createElementNS(
|
|
829
|
+
const s = Object.values(n);
|
|
830
|
+
if (s.length) {
|
|
831
|
+
const a = "http://www.w3.org/1999/xhtml", c = document.createElementNS(a, "svg");
|
|
832
|
+
c.setAttribute("xmlns", a), c.style.position = "absolute", c.style.width = "0", c.style.height = "0", c.style.overflow = "hidden", c.style.display = "none";
|
|
833
|
+
const i = document.createElementNS(a, "defs");
|
|
834
834
|
c.appendChild(i);
|
|
835
|
-
for (let u = 0; u <
|
|
836
|
-
i.appendChild(
|
|
835
|
+
for (let u = 0; u < s.length; u++)
|
|
836
|
+
i.appendChild(s[u]);
|
|
837
837
|
e.appendChild(c);
|
|
838
838
|
}
|
|
839
839
|
return e;
|
|
840
840
|
}
|
|
841
|
-
async function
|
|
841
|
+
async function Pe(e, t, r) {
|
|
842
842
|
return !r && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((n) => Dr(n, t)).then((n) => Hr(e, n, t)).then((n) => qr(e, n, t)).then((n) => Yr(n, t));
|
|
843
843
|
}
|
|
844
844
|
const kt = /url\((['"]?)([^'"]+?)\1\)/g, Xr = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Jr = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
@@ -848,13 +848,13 @@ function Zr(e) {
|
|
|
848
848
|
}
|
|
849
849
|
function Kr(e) {
|
|
850
850
|
const t = [];
|
|
851
|
-
return e.replace(kt, (r, n,
|
|
851
|
+
return e.replace(kt, (r, n, s) => (t.push(s), r)), t.filter((r) => !Be(r));
|
|
852
852
|
}
|
|
853
|
-
async function Qr(e, t, r, n,
|
|
853
|
+
async function Qr(e, t, r, n, s) {
|
|
854
854
|
try {
|
|
855
|
-
const
|
|
855
|
+
const a = r ? br(t, r) : t, c = qe(t);
|
|
856
856
|
let i;
|
|
857
|
-
return
|
|
857
|
+
return s || (i = await Ye(a, c, n)), e.replace(Zr(t), `$1${i}$3`);
|
|
858
858
|
} catch {
|
|
859
859
|
}
|
|
860
860
|
return e;
|
|
@@ -862,65 +862,65 @@ async function Qr(e, t, r, n, a) {
|
|
|
862
862
|
function en(e, { preferredFontFormat: t }) {
|
|
863
863
|
return t ? e.replace(Jr, (r) => {
|
|
864
864
|
for (; ; ) {
|
|
865
|
-
const [n, ,
|
|
866
|
-
if (!
|
|
865
|
+
const [n, , s] = Xr.exec(r) || [];
|
|
866
|
+
if (!s)
|
|
867
867
|
return "";
|
|
868
|
-
if (
|
|
868
|
+
if (s === t)
|
|
869
869
|
return `src: ${n};`;
|
|
870
870
|
}
|
|
871
871
|
}) : e;
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function jt(e) {
|
|
874
874
|
return e.search(kt) !== -1;
|
|
875
875
|
}
|
|
876
|
-
async function
|
|
877
|
-
if (!
|
|
876
|
+
async function Rt(e, t, r) {
|
|
877
|
+
if (!jt(e))
|
|
878
878
|
return e;
|
|
879
879
|
const n = en(e, r);
|
|
880
|
-
return Kr(n).reduce((
|
|
880
|
+
return Kr(n).reduce((a, c) => a.then((i) => Qr(i, c, t, r)), Promise.resolve(n));
|
|
881
881
|
}
|
|
882
|
-
async function
|
|
882
|
+
async function le(e, t, r) {
|
|
883
883
|
var n;
|
|
884
|
-
const
|
|
885
|
-
if (
|
|
886
|
-
const
|
|
887
|
-
return t.style.setProperty(e,
|
|
884
|
+
const s = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
|
|
885
|
+
if (s) {
|
|
886
|
+
const a = await Rt(s, null, r);
|
|
887
|
+
return t.style.setProperty(e, a, t.style.getPropertyPriority(e)), !0;
|
|
888
888
|
}
|
|
889
889
|
return !1;
|
|
890
890
|
}
|
|
891
891
|
async function tn(e, t) {
|
|
892
|
-
await
|
|
892
|
+
await le("background", e, t) || await le("background-image", e, t), await le("mask", e, t) || await le("-webkit-mask", e, t) || await le("mask-image", e, t) || await le("-webkit-mask-image", e, t);
|
|
893
893
|
}
|
|
894
894
|
async function rn(e, t) {
|
|
895
|
-
const r =
|
|
896
|
-
if (!(r && !Be(e.src)) && !(
|
|
895
|
+
const r = $(e, HTMLImageElement);
|
|
896
|
+
if (!(r && !Be(e.src)) && !($(e, SVGImageElement) && !Be(e.href.baseVal)))
|
|
897
897
|
return;
|
|
898
|
-
const n = r ? e.src : e.href.baseVal,
|
|
899
|
-
await new Promise((
|
|
900
|
-
e.onload =
|
|
898
|
+
const n = r ? e.src : e.href.baseVal, s = await Ye(n, qe(n), t);
|
|
899
|
+
await new Promise((a, c) => {
|
|
900
|
+
e.onload = a, e.onerror = t.onImageErrorHandler ? (...u) => {
|
|
901
901
|
try {
|
|
902
|
-
|
|
902
|
+
a(t.onImageErrorHandler(...u));
|
|
903
903
|
} catch (p) {
|
|
904
904
|
c(p);
|
|
905
905
|
}
|
|
906
906
|
} : c;
|
|
907
907
|
const i = e;
|
|
908
|
-
i.decode && (i.decode =
|
|
908
|
+
i.decode && (i.decode = a), i.loading === "lazy" && (i.loading = "eager"), r ? (e.srcset = "", e.src = s) : e.href.baseVal = s;
|
|
909
909
|
});
|
|
910
910
|
}
|
|
911
911
|
async function nn(e, t) {
|
|
912
|
-
const n = Q(e.childNodes).map((
|
|
912
|
+
const n = Q(e.childNodes).map((s) => Ot(s, t));
|
|
913
913
|
await Promise.all(n).then(() => e);
|
|
914
914
|
}
|
|
915
915
|
async function Ot(e, t) {
|
|
916
|
-
|
|
916
|
+
$(e, Element) && (await tn(e, t), await rn(e, t), await nn(e, t));
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function sn(e, t) {
|
|
919
919
|
const { style: r } = e;
|
|
920
920
|
t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
|
|
921
921
|
const n = t.style;
|
|
922
|
-
return n != null && Object.keys(n).forEach((
|
|
923
|
-
r[
|
|
922
|
+
return n != null && Object.keys(n).forEach((s) => {
|
|
923
|
+
r[s] = n[s];
|
|
924
924
|
}), e;
|
|
925
925
|
}
|
|
926
926
|
const ut = {};
|
|
@@ -933,53 +933,53 @@ async function pt(e) {
|
|
|
933
933
|
}
|
|
934
934
|
async function mt(e, t) {
|
|
935
935
|
let r = e.cssText;
|
|
936
|
-
const n = /url\(["']?([^"')]+)["']?\)/g,
|
|
936
|
+
const n = /url\(["']?([^"')]+)["']?\)/g, a = (r.match(/url\([^)]+\)/g) || []).map(async (c) => {
|
|
937
937
|
let i = c.replace(n, "$1");
|
|
938
938
|
return i.startsWith("https://") || (i = new URL(i, e.url).href), Ct(i, t.fetchRequestInit, ({ result: u }) => (r = r.replace(c, `url(${u})`), [c, u]));
|
|
939
939
|
});
|
|
940
|
-
return Promise.all(
|
|
940
|
+
return Promise.all(a).then(() => r);
|
|
941
941
|
}
|
|
942
942
|
function ft(e) {
|
|
943
943
|
if (e == null)
|
|
944
944
|
return [];
|
|
945
945
|
const t = [], r = /(\/\*[\s\S]*?\*\/)/gi;
|
|
946
946
|
let n = e.replace(r, "");
|
|
947
|
-
const
|
|
947
|
+
const s = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
948
948
|
for (; ; ) {
|
|
949
|
-
const u =
|
|
949
|
+
const u = s.exec(n);
|
|
950
950
|
if (u === null)
|
|
951
951
|
break;
|
|
952
952
|
t.push(u[0]);
|
|
953
953
|
}
|
|
954
|
-
n = n.replace(
|
|
955
|
-
const
|
|
954
|
+
n = n.replace(s, "");
|
|
955
|
+
const a = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, c = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", i = new RegExp(c, "gi");
|
|
956
956
|
for (; ; ) {
|
|
957
|
-
let u =
|
|
957
|
+
let u = a.exec(n);
|
|
958
958
|
if (u === null) {
|
|
959
959
|
if (u = i.exec(n), u === null)
|
|
960
960
|
break;
|
|
961
|
-
|
|
961
|
+
a.lastIndex = i.lastIndex;
|
|
962
962
|
} else
|
|
963
|
-
i.lastIndex =
|
|
963
|
+
i.lastIndex = a.lastIndex;
|
|
964
964
|
t.push(u[0]);
|
|
965
965
|
}
|
|
966
966
|
return t;
|
|
967
967
|
}
|
|
968
|
-
async function
|
|
968
|
+
async function an(e, t) {
|
|
969
969
|
const r = [], n = [];
|
|
970
|
-
return e.forEach((
|
|
971
|
-
if ("cssRules" in
|
|
970
|
+
return e.forEach((s) => {
|
|
971
|
+
if ("cssRules" in s)
|
|
972
972
|
try {
|
|
973
|
-
Q(
|
|
974
|
-
if (
|
|
973
|
+
Q(s.cssRules || []).forEach((a, c) => {
|
|
974
|
+
if (a.type === CSSRule.IMPORT_RULE) {
|
|
975
975
|
let i = c + 1;
|
|
976
|
-
const u =
|
|
976
|
+
const u = a.href, p = pt(u).then((m) => mt(m, t)).then((m) => ft(m).forEach((f) => {
|
|
977
977
|
try {
|
|
978
|
-
|
|
979
|
-
} catch (
|
|
978
|
+
s.insertRule(f, f.startsWith("@import") ? i += 1 : s.cssRules.length);
|
|
979
|
+
} catch (R) {
|
|
980
980
|
console.error("Error inserting rule from remote css", {
|
|
981
|
-
rule:
|
|
982
|
-
error:
|
|
981
|
+
rule: f,
|
|
982
|
+
error: R
|
|
983
983
|
});
|
|
984
984
|
}
|
|
985
985
|
})).catch((m) => {
|
|
@@ -988,75 +988,75 @@ async function sn(e, t) {
|
|
|
988
988
|
n.push(p);
|
|
989
989
|
}
|
|
990
990
|
});
|
|
991
|
-
} catch (
|
|
991
|
+
} catch (a) {
|
|
992
992
|
const c = e.find((i) => i.href == null) || document.styleSheets[0];
|
|
993
|
-
|
|
993
|
+
s.href != null && n.push(pt(s.href).then((i) => mt(i, t)).then((i) => ft(i).forEach((u) => {
|
|
994
994
|
c.insertRule(u, c.cssRules.length);
|
|
995
995
|
})).catch((i) => {
|
|
996
996
|
console.error("Error loading remote stylesheet", i);
|
|
997
|
-
})), console.error("Error inlining remote css file",
|
|
997
|
+
})), console.error("Error inlining remote css file", a);
|
|
998
998
|
}
|
|
999
|
-
}), Promise.all(n).then(() => (e.forEach((
|
|
1000
|
-
if ("cssRules" in
|
|
999
|
+
}), Promise.all(n).then(() => (e.forEach((s) => {
|
|
1000
|
+
if ("cssRules" in s)
|
|
1001
1001
|
try {
|
|
1002
|
-
Q(
|
|
1003
|
-
r.push(
|
|
1002
|
+
Q(s.cssRules || []).forEach((a) => {
|
|
1003
|
+
r.push(a);
|
|
1004
1004
|
});
|
|
1005
|
-
} catch (
|
|
1006
|
-
console.error(`Error while reading CSS rules from ${
|
|
1005
|
+
} catch (a) {
|
|
1006
|
+
console.error(`Error while reading CSS rules from ${s.href}`, a);
|
|
1007
1007
|
}
|
|
1008
1008
|
}), r));
|
|
1009
1009
|
}
|
|
1010
1010
|
function on(e) {
|
|
1011
|
-
return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) =>
|
|
1011
|
+
return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => jt(t.style.getPropertyValue("src")));
|
|
1012
1012
|
}
|
|
1013
1013
|
async function cn(e, t) {
|
|
1014
1014
|
if (e.ownerDocument == null)
|
|
1015
1015
|
throw new Error("Provided element is not within a Document");
|
|
1016
|
-
const r = Q(e.ownerDocument.styleSheets), n = await
|
|
1016
|
+
const r = Q(e.ownerDocument.styleSheets), n = await an(r, t);
|
|
1017
1017
|
return on(n);
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function At(e) {
|
|
1020
1020
|
return e.trim().replace(/["']/g, "");
|
|
1021
1021
|
}
|
|
1022
1022
|
function ln(e) {
|
|
1023
1023
|
const t = /* @__PURE__ */ new Set();
|
|
1024
1024
|
function r(n) {
|
|
1025
|
-
(n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((
|
|
1026
|
-
t.add(
|
|
1027
|
-
}), Array.from(n.children).forEach((
|
|
1028
|
-
|
|
1025
|
+
(n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((a) => {
|
|
1026
|
+
t.add(At(a));
|
|
1027
|
+
}), Array.from(n.children).forEach((a) => {
|
|
1028
|
+
a instanceof HTMLElement && r(a);
|
|
1029
1029
|
});
|
|
1030
1030
|
}
|
|
1031
1031
|
return r(e), t;
|
|
1032
1032
|
}
|
|
1033
1033
|
async function dn(e, t) {
|
|
1034
1034
|
const r = await cn(e, t), n = ln(e);
|
|
1035
|
-
return (await Promise.all(r.filter((
|
|
1036
|
-
const c =
|
|
1037
|
-
return
|
|
1035
|
+
return (await Promise.all(r.filter((a) => n.has(At(a.style.fontFamily))).map((a) => {
|
|
1036
|
+
const c = a.parentStyleSheet ? a.parentStyleSheet.href : null;
|
|
1037
|
+
return Rt(a.cssText, c, t);
|
|
1038
1038
|
}))).join(`
|
|
1039
1039
|
`);
|
|
1040
1040
|
}
|
|
1041
1041
|
async function un(e, t) {
|
|
1042
1042
|
const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await dn(e, t);
|
|
1043
1043
|
if (r) {
|
|
1044
|
-
const n = document.createElement("style"),
|
|
1045
|
-
n.appendChild(
|
|
1044
|
+
const n = document.createElement("style"), s = document.createTextNode(r);
|
|
1045
|
+
n.appendChild(s), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
async function pn(e, t = {}) {
|
|
1049
|
-
const { width: r, height: n } = St(e, t),
|
|
1050
|
-
return await un(
|
|
1049
|
+
const { width: r, height: n } = St(e, t), s = await Pe(e, t, !0);
|
|
1050
|
+
return await un(s, t), await Ot(s, t), sn(s, t), await Or(s, r, n);
|
|
1051
1051
|
}
|
|
1052
1052
|
async function mn(e, t = {}) {
|
|
1053
|
-
const { width: r, height: n } = St(e, t),
|
|
1054
|
-
return c.width = p * u, c.height = m * u, t.skipAutoScale ||
|
|
1053
|
+
const { width: r, height: n } = St(e, t), s = await pn(e, t), a = await _e(s), c = document.createElement("canvas"), i = c.getContext("2d"), u = t.pixelRatio || kr(), p = t.canvasWidth || r, m = t.canvasHeight || n;
|
|
1054
|
+
return c.width = p * u, c.height = m * u, t.skipAutoScale || jr(c), c.style.width = `${p}`, c.style.height = `${m}`, t.backgroundColor && (i.fillStyle = t.backgroundColor, i.fillRect(0, 0, c.width, c.height)), i.drawImage(a, 0, 0, c.width, c.height), c;
|
|
1055
1055
|
}
|
|
1056
1056
|
async function fn(e, t = {}) {
|
|
1057
1057
|
return (await mn(e, t)).toDataURL();
|
|
1058
1058
|
}
|
|
1059
|
-
const
|
|
1059
|
+
const Ge = 2147483647, De = Ge, Fe = 2e6, hn = Ge - 10, gn = Ge - 5, xn = Ge - 15, U = "data-vg-pin-id", yn = () => {
|
|
1060
1060
|
const e = window.innerWidth;
|
|
1061
1061
|
return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
|
|
1062
1062
|
}, ht = (e, t) => {
|
|
@@ -1074,11 +1074,11 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1074
1074
|
} catch {
|
|
1075
1075
|
return "";
|
|
1076
1076
|
}
|
|
1077
|
-
}, gt = ({ url: e, className: t, style: r, tooltipStyle: n, onHover:
|
|
1078
|
-
const
|
|
1079
|
-
if (!
|
|
1080
|
-
const i =
|
|
1081
|
-
|
|
1077
|
+
}, gt = ({ url: e, className: t, style: r, tooltipStyle: n, onHover: s }) => {
|
|
1078
|
+
const a = ue(null), c = () => {
|
|
1079
|
+
if (!a.current || !s) return;
|
|
1080
|
+
const i = a.current.getBoundingClientRect(), u = i.top, p = window.innerHeight - i.bottom, m = u < 140 && p > u ? "bottom" : "top";
|
|
1081
|
+
s({
|
|
1082
1082
|
url: e,
|
|
1083
1083
|
x: i.left + i.width / 2,
|
|
1084
1084
|
y: m === "top" ? i.top : i.bottom,
|
|
@@ -1089,12 +1089,12 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1089
1089
|
"div",
|
|
1090
1090
|
{
|
|
1091
1091
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:106",
|
|
1092
|
-
ref:
|
|
1092
|
+
ref: a,
|
|
1093
1093
|
className: `vg-url-tag ${t || ""}`,
|
|
1094
1094
|
style: r,
|
|
1095
1095
|
onMouseEnter: c,
|
|
1096
1096
|
onMouseMove: c,
|
|
1097
|
-
onMouseLeave: () =>
|
|
1097
|
+
onMouseLeave: () => s?.(null),
|
|
1098
1098
|
children: [
|
|
1099
1099
|
/* @__PURE__ */ o.jsx(nr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:114", size: r?.fontSize ? parseInt(r.fontSize) + 1 : 10 }),
|
|
1100
1100
|
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:115", style: {
|
|
@@ -1106,28 +1106,28 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1106
1106
|
]
|
|
1107
1107
|
}
|
|
1108
1108
|
);
|
|
1109
|
-
},
|
|
1109
|
+
}, ve = (e) => {
|
|
1110
1110
|
const t = [], r = [], n = [];
|
|
1111
|
-
let
|
|
1112
|
-
for (;
|
|
1113
|
-
if (
|
|
1114
|
-
t.unshift(`#${
|
|
1111
|
+
let s = e;
|
|
1112
|
+
for (; s && s.nodeType === Node.ELEMENT_NODE; ) {
|
|
1113
|
+
if (s.id && !s.id.startsWith("vg-") && !s.id.includes(":")) {
|
|
1114
|
+
t.unshift(`#${s.id}`), n.unshift(`${s.localName}#${s.id}`);
|
|
1115
1115
|
break;
|
|
1116
1116
|
}
|
|
1117
|
-
let
|
|
1118
|
-
const c = Array.from(
|
|
1117
|
+
let a = s.localName;
|
|
1118
|
+
const c = Array.from(s.parentNode?.children || []).indexOf(s), i = `${s.localName}[${c}]`;
|
|
1119
1119
|
n.unshift(i);
|
|
1120
|
-
const u =
|
|
1121
|
-
if (u && r.push(`[data-testid="${u}"]`),
|
|
1122
|
-
|
|
1120
|
+
const u = s.getAttribute("data-testid") || s.getAttribute("data-qa");
|
|
1121
|
+
if (u && r.push(`[data-testid="${u}"]`), s.getAttribute("placeholder"), s.getAttribute("aria-label"), s.getAttribute("role"), s.getAttribute("name"), s.getAttribute("title"), u) {
|
|
1122
|
+
a = `[${s.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${u}"]`, t.unshift(a);
|
|
1123
1123
|
break;
|
|
1124
1124
|
}
|
|
1125
|
-
const p = Array.from(
|
|
1125
|
+
const p = Array.from(s.parentNode?.children || []).filter((m) => m.localName === s?.localName);
|
|
1126
1126
|
if (p.length > 1) {
|
|
1127
|
-
const m = p.indexOf(
|
|
1128
|
-
|
|
1127
|
+
const m = p.indexOf(s) + 1;
|
|
1128
|
+
a += `:nth-of-type(${m})`;
|
|
1129
1129
|
}
|
|
1130
|
-
t.unshift(
|
|
1130
|
+
t.unshift(a), s = s.parentElement;
|
|
1131
1131
|
}
|
|
1132
1132
|
return {
|
|
1133
1133
|
selector: t.join(" > "),
|
|
@@ -1135,7 +1135,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1135
1135
|
vgPath: n.join(" > ")
|
|
1136
1136
|
};
|
|
1137
1137
|
}, wn = (e) => {
|
|
1138
|
-
const { vgPath: t } =
|
|
1138
|
+
const { vgPath: t } = ve(e);
|
|
1139
1139
|
return {
|
|
1140
1140
|
vgPath: t,
|
|
1141
1141
|
classHash: e.className,
|
|
@@ -1148,7 +1148,30 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1148
1148
|
placeholder: e.getAttribute("placeholder") || void 0,
|
|
1149
1149
|
textSnippet: (e.innerText || "").slice(0, 30).trim()
|
|
1150
1150
|
};
|
|
1151
|
-
}, vn =
|
|
1151
|
+
}, vn = (e, t, r, n) => new Promise((s) => {
|
|
1152
|
+
const a = new Image();
|
|
1153
|
+
a.onload = () => {
|
|
1154
|
+
const c = document.createElement("canvas"), i = 2, u = t.width + r * 2, p = t.height + r * 2;
|
|
1155
|
+
c.width = u * i, c.height = p * i;
|
|
1156
|
+
const m = c.getContext("2d");
|
|
1157
|
+
if (m) {
|
|
1158
|
+
m.imageSmoothingEnabled = !0, m.imageSmoothingQuality = "high";
|
|
1159
|
+
const f = (t.left - r) * n, R = (t.top - r) * n, P = u * n, L = p * n;
|
|
1160
|
+
m.drawImage(
|
|
1161
|
+
a,
|
|
1162
|
+
f,
|
|
1163
|
+
R,
|
|
1164
|
+
P,
|
|
1165
|
+
L,
|
|
1166
|
+
0,
|
|
1167
|
+
0,
|
|
1168
|
+
c.width,
|
|
1169
|
+
c.height
|
|
1170
|
+
);
|
|
1171
|
+
}
|
|
1172
|
+
s(c.toDataURL("image/png", 0.9));
|
|
1173
|
+
}, a.onerror = () => s(""), a.src = e;
|
|
1174
|
+
}), bn = /* @__PURE__ */ (() => {
|
|
1152
1175
|
let e = null, t = null;
|
|
1153
1176
|
return (r) => {
|
|
1154
1177
|
if (!r || typeof window > "u" || typeof document > "u") return r;
|
|
@@ -1156,43 +1179,20 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1156
1179
|
try {
|
|
1157
1180
|
if (e || (e = document.createElement("canvas"), e.width = 1, e.height = 1), t || (t = e.getContext("2d", { willReadFrequently: !0 })), t) {
|
|
1158
1181
|
t.fillStyle = "#000000", t.fillStyle = r;
|
|
1159
|
-
const
|
|
1160
|
-
if (
|
|
1161
|
-
return
|
|
1182
|
+
const a = t.fillStyle;
|
|
1183
|
+
if (a && !a.includes("oklch") && !a.includes("oklab"))
|
|
1184
|
+
return a;
|
|
1162
1185
|
}
|
|
1163
1186
|
const n = document.createElement("div");
|
|
1164
1187
|
n.style.color = r, document.body.appendChild(n);
|
|
1165
|
-
const
|
|
1166
|
-
return document.body.removeChild(n),
|
|
1188
|
+
const s = getComputedStyle(n).color;
|
|
1189
|
+
return document.body.removeChild(n), s && !s.includes("oklch") ? s : "rgb(0,0,0)";
|
|
1167
1190
|
} catch {
|
|
1168
1191
|
return "rgb(0,0,0)";
|
|
1169
1192
|
}
|
|
1170
1193
|
return r;
|
|
1171
1194
|
};
|
|
1172
|
-
})(),
|
|
1173
|
-
const s = new Image();
|
|
1174
|
-
s.onload = () => {
|
|
1175
|
-
const c = document.createElement("canvas"), i = 2, u = t.width + r * 2, p = t.height + r * 2;
|
|
1176
|
-
c.width = u * i, c.height = p * i;
|
|
1177
|
-
const m = c.getContext("2d");
|
|
1178
|
-
if (m) {
|
|
1179
|
-
m.imageSmoothingEnabled = !0, m.imageSmoothingQuality = "high";
|
|
1180
|
-
const h = (t.left - r) * n, O = (t.top - r) * n, A = u * n, I = p * n;
|
|
1181
|
-
m.drawImage(
|
|
1182
|
-
s,
|
|
1183
|
-
h,
|
|
1184
|
-
O,
|
|
1185
|
-
A,
|
|
1186
|
-
I,
|
|
1187
|
-
0,
|
|
1188
|
-
0,
|
|
1189
|
-
c.width,
|
|
1190
|
-
c.height
|
|
1191
|
-
);
|
|
1192
|
-
}
|
|
1193
|
-
a(c.toDataURL("image/png", 0.9));
|
|
1194
|
-
}, s.onerror = () => a(""), s.src = e;
|
|
1195
|
-
}), Sn = (e) => {
|
|
1195
|
+
})(), Sn = (e) => {
|
|
1196
1196
|
const t = window.getComputedStyle(e), r = {};
|
|
1197
1197
|
return [
|
|
1198
1198
|
"display",
|
|
@@ -1205,50 +1205,50 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1205
1205
|
"width",
|
|
1206
1206
|
"height",
|
|
1207
1207
|
"z-index"
|
|
1208
|
-
].forEach((
|
|
1209
|
-
const
|
|
1210
|
-
r[
|
|
1208
|
+
].forEach((s) => {
|
|
1209
|
+
const a = t.getPropertyValue(s);
|
|
1210
|
+
r[s] = bn(a);
|
|
1211
1211
|
}), r;
|
|
1212
1212
|
}, Cn = (e) => {
|
|
1213
|
-
const r = Object.keys(e).find((
|
|
1213
|
+
const r = Object.keys(e).find((a) => a.startsWith("__reactFiber$") || a.startsWith("__reactInternalInstance$"));
|
|
1214
1214
|
if (!r) return "";
|
|
1215
1215
|
const n = [];
|
|
1216
|
-
let
|
|
1217
|
-
for (;
|
|
1218
|
-
const
|
|
1219
|
-
if (typeof
|
|
1220
|
-
const c =
|
|
1216
|
+
let s = e[r];
|
|
1217
|
+
for (; s; ) {
|
|
1218
|
+
const a = s.type;
|
|
1219
|
+
if (typeof a == "function") {
|
|
1220
|
+
const c = a.displayName || a.name;
|
|
1221
1221
|
c && !c.includes("ViewGate") && !n.includes(c) && n.unshift(c);
|
|
1222
1222
|
}
|
|
1223
|
-
|
|
1223
|
+
s = s.return;
|
|
1224
1224
|
}
|
|
1225
1225
|
return n.join(" > ") || "Generic Component";
|
|
1226
1226
|
}, En = (e) => {
|
|
1227
1227
|
if (!e) return !1;
|
|
1228
1228
|
const t = window.getComputedStyle(e), r = e.getBoundingClientRect(), n = e.getAttribute("role");
|
|
1229
1229
|
if (n && ["listbox", "menu", "combobox", "tooltip", "option"].includes(n)) return !1;
|
|
1230
|
-
const
|
|
1231
|
-
return r.width <
|
|
1230
|
+
const a = 120;
|
|
1231
|
+
return r.width < a && r.height < a || t.position !== "fixed" && t.position !== "absolute" ? !1 : !!(e.closest('[role="dialog"]') || e.closest('[aria-modal="true"]') || e.classList.contains("modal") || e.classList.contains("modal-content"));
|
|
1232
1232
|
}, re = (e) => {
|
|
1233
1233
|
if (!e.isConnected) return !1;
|
|
1234
1234
|
const t = window.getComputedStyle(e);
|
|
1235
1235
|
if (t.display === "none" || t.visibility === "hidden" || t.opacity === "0" || e.offsetWidth === 0 || e.offsetHeight === 0) return !1;
|
|
1236
1236
|
let r = e.parentElement;
|
|
1237
1237
|
for (; r; ) {
|
|
1238
|
-
const
|
|
1239
|
-
if (
|
|
1238
|
+
const s = window.getComputedStyle(r);
|
|
1239
|
+
if (s.display === "none" || s.visibility === "hidden" || s.opacity === "0") return !1;
|
|
1240
1240
|
r = r.parentElement;
|
|
1241
1241
|
}
|
|
1242
1242
|
const n = e.getBoundingClientRect();
|
|
1243
1243
|
return !(n.width === 0 || n.height === 0 || n.top === 0 && n.left === 0 && n.width > window.innerWidth * 0.9);
|
|
1244
|
-
},
|
|
1244
|
+
}, Vt = (e, t = document) => {
|
|
1245
1245
|
const r = t.querySelector(e);
|
|
1246
1246
|
if (r) return r;
|
|
1247
1247
|
const n = t.querySelectorAll("*");
|
|
1248
|
-
for (const
|
|
1249
|
-
const
|
|
1250
|
-
if (
|
|
1251
|
-
const c =
|
|
1248
|
+
for (const s of Array.from(n)) {
|
|
1249
|
+
const a = s.shadowRoot;
|
|
1250
|
+
if (a) {
|
|
1251
|
+
const c = Vt(e, a);
|
|
1252
1252
|
if (c) return c;
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
@@ -1265,77 +1265,77 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1265
1265
|
if (!e.tag) return null;
|
|
1266
1266
|
const t = Array.from(document.getElementsByTagName(e.tag));
|
|
1267
1267
|
let r = null, n = 0;
|
|
1268
|
-
for (const
|
|
1269
|
-
if (!
|
|
1270
|
-
let
|
|
1271
|
-
const c =
|
|
1272
|
-
i && c === i && (
|
|
1273
|
-
const u =
|
|
1274
|
-
if (p && u === p && (
|
|
1275
|
-
const { vgPath: m } =
|
|
1276
|
-
(m === e.vgPath || e.fingerprint?.vgPath === m) && (
|
|
1268
|
+
for (const s of t) {
|
|
1269
|
+
if (!Ve(s, e)) continue;
|
|
1270
|
+
let a = 0;
|
|
1271
|
+
const c = s.getAttribute("placeholder"), i = e.attributes?.placeholder || e.fingerprint?.placeholder;
|
|
1272
|
+
i && c === i && (a += 6);
|
|
1273
|
+
const u = s.getAttribute("type"), p = e.attributes?.type || e.fingerprint?.type;
|
|
1274
|
+
if (p && u === p && (a += 2), s.innerText?.trim() === e.text.trim() && (a += 5), e.fingerprint?.vgPath) {
|
|
1275
|
+
const { vgPath: m } = ve(s);
|
|
1276
|
+
(m === e.vgPath || e.fingerprint?.vgPath === m) && (a += 10);
|
|
1277
1277
|
}
|
|
1278
|
-
|
|
1278
|
+
a > n && a >= 7 && (n = a, r = s);
|
|
1279
1279
|
}
|
|
1280
1280
|
return r;
|
|
1281
|
-
},
|
|
1281
|
+
}, Ve = (e, t) => {
|
|
1282
1282
|
if (e.tagName.toLowerCase() !== t.tag.toLowerCase()) return !1;
|
|
1283
1283
|
const r = e.getAttribute("placeholder"), n = t.attributes?.placeholder || t.fingerprint?.placeholder;
|
|
1284
1284
|
if (n && r && n !== r) return !1;
|
|
1285
|
-
const
|
|
1286
|
-
return !(
|
|
1287
|
-
},
|
|
1285
|
+
const s = e.getAttribute("type"), a = t.attributes?.type || t.fingerprint?.type;
|
|
1286
|
+
return !(a && s && a !== s);
|
|
1287
|
+
}, jn = (e, t) => {
|
|
1288
1288
|
if (t) {
|
|
1289
|
-
const c = Array.from(document.querySelectorAll(`[${
|
|
1289
|
+
const c = Array.from(document.querySelectorAll(`[${U}="${t}"]`));
|
|
1290
1290
|
if (c.length > 0) {
|
|
1291
|
-
const i = c.filter((u) =>
|
|
1291
|
+
const i = c.filter((u) => Ve(u, e));
|
|
1292
1292
|
if (i.length === 0)
|
|
1293
|
-
c.forEach((u) => u.removeAttribute(
|
|
1293
|
+
c.forEach((u) => u.removeAttribute(U));
|
|
1294
1294
|
else {
|
|
1295
1295
|
const u = i.find((m) => {
|
|
1296
|
-
const { vgPath:
|
|
1297
|
-
return
|
|
1296
|
+
const { vgPath: f } = ve(m);
|
|
1297
|
+
return f === e.vgPath || e.fingerprint?.vgPath === f;
|
|
1298
1298
|
}), p = u && re(u) ? u : i.find((m) => !(!re(m) || e.metadata?.isModal && !m.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')));
|
|
1299
1299
|
return p ? (c.forEach((m) => {
|
|
1300
|
-
m !== p && m.removeAttribute(
|
|
1300
|
+
m !== p && m.removeAttribute(U);
|
|
1301
1301
|
}), p) : null;
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
const n = (e.selector ? Array.from(document.querySelectorAll(e.selector)) : []).filter((c) =>
|
|
1306
|
-
let
|
|
1307
|
-
const { vgPath: i } =
|
|
1305
|
+
const n = (e.selector ? Array.from(document.querySelectorAll(e.selector)) : []).filter((c) => Ve(c, e));
|
|
1306
|
+
let s = n.find((c) => {
|
|
1307
|
+
const { vgPath: i } = ve(c);
|
|
1308
1308
|
return i === e.vgPath || e.fingerprint?.vgPath === i;
|
|
1309
1309
|
}) || n[0] || null;
|
|
1310
|
-
if (
|
|
1311
|
-
if (e.metadata?.isModal && !
|
|
1312
|
-
|
|
1310
|
+
if (s && re(s))
|
|
1311
|
+
if (e.metadata?.isModal && !s.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content'))
|
|
1312
|
+
s = null;
|
|
1313
1313
|
else
|
|
1314
|
-
return
|
|
1314
|
+
return s;
|
|
1315
1315
|
if (e.fallbackSelectors)
|
|
1316
1316
|
for (const c of e.fallbackSelectors) {
|
|
1317
|
-
const i =
|
|
1318
|
-
if (i &&
|
|
1317
|
+
const i = Vt(c);
|
|
1318
|
+
if (i && Ve(i, e) && re(i)) {
|
|
1319
1319
|
if (e.metadata?.isModal && !i.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')) continue;
|
|
1320
1320
|
return i;
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
|
-
const
|
|
1324
|
-
return
|
|
1323
|
+
const a = kn(e);
|
|
1324
|
+
return a && re(a) ? e.metadata?.isModal && !a.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content') ? null : a : null;
|
|
1325
1325
|
}, He = (e) => ({
|
|
1326
1326
|
tag: e.tagName.toLowerCase(),
|
|
1327
1327
|
text: (e.innerText || e.getAttribute("placeholder") || "").slice(0, 50).trim(),
|
|
1328
1328
|
role: e.getAttribute("role") || void 0,
|
|
1329
1329
|
type: e.getAttribute("type") || void 0
|
|
1330
|
-
}),
|
|
1330
|
+
}), Rn = (e) => {
|
|
1331
1331
|
const t = e.parentElement;
|
|
1332
1332
|
if (!t) return;
|
|
1333
|
-
const r = Array.from(t.children).filter((c) => c !== e).slice(0, 5).map((c) => He(c)), n = Array.from(t.children),
|
|
1334
|
-
let
|
|
1335
|
-
return
|
|
1333
|
+
const r = Array.from(t.children).filter((c) => c !== e).slice(0, 5).map((c) => He(c)), n = Array.from(t.children), s = n.indexOf(e);
|
|
1334
|
+
let a = "middle";
|
|
1335
|
+
return s === 0 && (a = "start"), s === n.length - 1 && (a = "end"), {
|
|
1336
1336
|
target: {
|
|
1337
1337
|
...He(e),
|
|
1338
|
-
location: `${
|
|
1338
|
+
location: `${a} of ${t.tagName.toLowerCase()}`
|
|
1339
1339
|
},
|
|
1340
1340
|
parent: He(t),
|
|
1341
1341
|
siblings: r
|
|
@@ -1350,18 +1350,18 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1350
1350
|
}
|
|
1351
1351
|
r = r.parentElement;
|
|
1352
1352
|
}
|
|
1353
|
-
const n = Cn(e), { selector:
|
|
1353
|
+
const n = Cn(e), { selector: s, fallbacks: a, vgPath: c } = ve(e), i = {};
|
|
1354
1354
|
["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((m) => {
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1355
|
+
const f = e.getAttribute(m);
|
|
1356
|
+
f && (i[m] = f);
|
|
1357
1357
|
});
|
|
1358
|
-
const u = !!e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content'), p = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${
|
|
1358
|
+
const u = !!e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content'), p = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${s.split(" > ").slice(-1)}`;
|
|
1359
1359
|
return {
|
|
1360
1360
|
tag: e.tagName.toLowerCase(),
|
|
1361
1361
|
id: e.id || "",
|
|
1362
1362
|
classes: e.className || "",
|
|
1363
1363
|
text: (e.innerText || "").slice(0, 100).trim(),
|
|
1364
|
-
selector:
|
|
1364
|
+
selector: s,
|
|
1365
1365
|
vgPath: c,
|
|
1366
1366
|
outerHtml: e.outerHTML,
|
|
1367
1367
|
parentContext: (e.parentElement?.innerText || "").slice(0, 150).trim(),
|
|
@@ -1369,10 +1369,10 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1369
1369
|
signature: p,
|
|
1370
1370
|
source: t,
|
|
1371
1371
|
attributes: i,
|
|
1372
|
-
fallbackSelectors: [...new Set(
|
|
1372
|
+
fallbackSelectors: [...new Set(a)].slice(0, 5),
|
|
1373
1373
|
domPath: [],
|
|
1374
1374
|
viewportSize: { width: window.innerWidth, height: window.innerHeight },
|
|
1375
|
-
uiContext:
|
|
1375
|
+
uiContext: Rn(e),
|
|
1376
1376
|
fingerprint: wn(e),
|
|
1377
1377
|
metadata: {
|
|
1378
1378
|
hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`,
|
|
@@ -1383,237 +1383,236 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1383
1383
|
isModal: u
|
|
1384
1384
|
}
|
|
1385
1385
|
};
|
|
1386
|
-
},
|
|
1387
|
-
const { addToast: e, language: t, t: r, apiKey: n, baseUrl:
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1386
|
+
}, An = () => {
|
|
1387
|
+
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: s, disableViewGate: a, hasActiveToasts: c } = wr(), [i, u] = S(!1), [p, m] = S(null), [f, R] = S(null), [P, L] = S(""), [B, ne] = S(!1), [be, Se] = S(!1), [N, q] = S(!1), [V, Ce] = S([]), [z, D] = S(null), [Ee, Xe] = S(!1), [pe, se] = S(!1), [ke, je] = S({}), [I, Z] = S(null), [ee, me] = S(!1), [F, fe] = S(null), [d, x] = S([]), v = It(() => {
|
|
1388
|
+
const l = Array.isArray(V) ? V : [];
|
|
1389
|
+
if (!I) return l;
|
|
1390
|
+
const h = d.find((g) => g.annotations && Array.isArray(g.annotations) && g.annotations.some((E) => E._id === I));
|
|
1391
|
+
return h ? h.annotations : l.filter((g) => g._id === I);
|
|
1392
|
+
}, [I, V, d]), [b, ae] = S(() => {
|
|
1392
1393
|
if (typeof window > "u") return { top: 24, right: 24 };
|
|
1393
1394
|
const l = localStorage.getItem("vg-exit-pos");
|
|
1394
1395
|
return l ? JSON.parse(l) : { top: 24, right: 24 };
|
|
1395
|
-
}), [
|
|
1396
|
+
}), [Y, k] = S(!1), T = ue(null), [H, $e] = S(() => {
|
|
1396
1397
|
if (typeof window > "u") return { bottom: 30, right: 30 };
|
|
1397
1398
|
const l = localStorage.getItem("vg-bar-pos");
|
|
1398
1399
|
return l ? JSON.parse(l) : { bottom: 30, right: 30 };
|
|
1399
|
-
}), [
|
|
1400
|
+
}), [he, Je] = S(!1), X = ue(null), _t = (l) => {
|
|
1400
1401
|
l.preventDefault(), l.stopPropagation();
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1402
|
+
const h = l.currentTarget.parentElement?.getBoundingClientRect();
|
|
1403
|
+
h && (k(!0), T.current = {
|
|
1403
1404
|
x: l.clientX,
|
|
1404
1405
|
y: l.clientY,
|
|
1405
1406
|
top: b.top,
|
|
1406
1407
|
right: b.right,
|
|
1407
|
-
width:
|
|
1408
|
-
height:
|
|
1408
|
+
width: h.width,
|
|
1409
|
+
height: h.height
|
|
1409
1410
|
});
|
|
1410
1411
|
}, Pt = (l) => {
|
|
1411
1412
|
l.preventDefault(), l.stopPropagation();
|
|
1412
|
-
const
|
|
1413
|
-
|
|
1413
|
+
const h = l.currentTarget.parentElement?.getBoundingClientRect();
|
|
1414
|
+
h && (Je(!0), X.current = {
|
|
1414
1415
|
x: l.clientX,
|
|
1415
1416
|
y: l.clientY,
|
|
1416
|
-
bottom:
|
|
1417
|
-
right:
|
|
1418
|
-
width:
|
|
1419
|
-
height:
|
|
1417
|
+
bottom: H.bottom,
|
|
1418
|
+
right: H.right,
|
|
1419
|
+
width: h.width,
|
|
1420
|
+
height: h.height
|
|
1420
1421
|
});
|
|
1421
1422
|
};
|
|
1422
1423
|
K(() => {
|
|
1423
|
-
if (!
|
|
1424
|
-
const l = (
|
|
1425
|
-
if (
|
|
1426
|
-
const E =
|
|
1427
|
-
let
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1424
|
+
if (!Y && !he) return;
|
|
1425
|
+
const l = (g) => {
|
|
1426
|
+
if (Y && T.current) {
|
|
1427
|
+
const E = g.clientX - T.current.x, j = g.clientY - T.current.y;
|
|
1428
|
+
let O = T.current.top + j, w = T.current.right - E;
|
|
1429
|
+
const y = 10;
|
|
1430
|
+
O = Math.max(y, Math.min(window.innerHeight - T.current.height - y, O)), w = Math.max(y, Math.min(window.innerWidth - T.current.width - y, w)), ae({ top: O, right: w });
|
|
1430
1431
|
}
|
|
1431
|
-
if (
|
|
1432
|
-
const E =
|
|
1433
|
-
let
|
|
1434
|
-
const
|
|
1435
|
-
|
|
1432
|
+
if (he && X.current) {
|
|
1433
|
+
const E = g.clientX - X.current.x, j = g.clientY - X.current.y;
|
|
1434
|
+
let O = X.current.bottom - j, w = X.current.right - E;
|
|
1435
|
+
const y = 10;
|
|
1436
|
+
O = Math.max(y, Math.min(window.innerHeight - X.current.height - y, O)), w = Math.max(y, Math.min(window.innerWidth - X.current.width - y, w)), $e({ bottom: O, right: w });
|
|
1436
1437
|
}
|
|
1437
|
-
},
|
|
1438
|
-
|
|
1438
|
+
}, h = () => {
|
|
1439
|
+
Y && (k(!1), localStorage.setItem("vg-exit-pos", JSON.stringify(b)), T.current = null), he && (Je(!1), localStorage.setItem("vg-bar-pos", JSON.stringify(H)), X.current = null);
|
|
1439
1440
|
};
|
|
1440
|
-
return window.addEventListener("mousemove", l), window.addEventListener("mouseup",
|
|
1441
|
-
window.removeEventListener("mousemove", l), window.removeEventListener("mouseup",
|
|
1441
|
+
return window.addEventListener("mousemove", l), window.addEventListener("mouseup", h), () => {
|
|
1442
|
+
window.removeEventListener("mousemove", l), window.removeEventListener("mouseup", h);
|
|
1442
1443
|
};
|
|
1443
|
-
}, [
|
|
1444
|
-
const [Ze,
|
|
1445
|
-
|
|
1446
|
-
const l = /* @__PURE__ */ new Map(), g = new Set(
|
|
1447
|
-
document.querySelectorAll(`[${
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1444
|
+
}, [Y, he, b, H]);
|
|
1445
|
+
const [Ze, Me] = S(null), [Ke, Qe] = S(""), [Vn, Tn] = S({}), ge = ue(null), xe = ue(null), oe = Re(() => {
|
|
1446
|
+
xe.current || (xe.current = requestAnimationFrame(() => {
|
|
1447
|
+
const l = /* @__PURE__ */ new Map(), h = Array.isArray(V) ? V : [], g = new Set(h.map((y) => y._id));
|
|
1448
|
+
document.querySelectorAll(`[${U}]`).forEach((y) => {
|
|
1449
|
+
const A = y.getAttribute(U);
|
|
1450
|
+
A && !g.has(A) && y.removeAttribute(U);
|
|
1450
1451
|
});
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
if (!
|
|
1454
|
-
const
|
|
1455
|
-
if (!
|
|
1456
|
-
const
|
|
1457
|
-
let
|
|
1458
|
-
if (
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
}),
|
|
1452
|
+
const j = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((y) => En(y) && re(y)), O = !!j;
|
|
1453
|
+
V.forEach((y) => {
|
|
1454
|
+
if (!y.reference) return;
|
|
1455
|
+
const A = jn(y.reference, y._id);
|
|
1456
|
+
if (!A || !re(A)) return;
|
|
1457
|
+
const J = !!y.reference.metadata?.isModal;
|
|
1458
|
+
let W = !1;
|
|
1459
|
+
if (O ? W = j.contains(A) : W = !J, !W) return;
|
|
1460
|
+
const C = A.getAttribute(U);
|
|
1461
|
+
C !== y._id && (document.querySelectorAll(`[${U}="${y._id}"]`).forEach((G) => {
|
|
1462
|
+
G.removeAttribute(U);
|
|
1463
|
+
}), C || A.setAttribute(U, y._id)), l.has(A) || l.set(A, []), l.get(A).push(y);
|
|
1463
1464
|
});
|
|
1464
|
-
const
|
|
1465
|
-
l.forEach((
|
|
1466
|
-
const
|
|
1467
|
-
if (
|
|
1468
|
-
const
|
|
1469
|
-
if (
|
|
1465
|
+
const w = [];
|
|
1466
|
+
l.forEach((y, A) => {
|
|
1467
|
+
const J = A.getBoundingClientRect(), W = J.left + J.width / 2, C = J.top + J.height / 2;
|
|
1468
|
+
if (W >= 0 && W <= window.innerWidth && C >= 0 && C <= window.innerHeight) {
|
|
1469
|
+
const G = document.elementFromPoint(W, C);
|
|
1470
|
+
if (G && !A.contains(G) && !ge.current?.contains(G))
|
|
1470
1471
|
return;
|
|
1471
1472
|
}
|
|
1472
|
-
|
|
1473
|
-
id:
|
|
1473
|
+
w.push({
|
|
1474
|
+
id: y[0]._id,
|
|
1474
1475
|
// Group identified by its primary annotation
|
|
1475
|
-
element:
|
|
1476
|
-
rect:
|
|
1477
|
-
annotations:
|
|
1478
|
-
isModal: !!
|
|
1476
|
+
element: A,
|
|
1477
|
+
rect: J,
|
|
1478
|
+
annotations: y.sort((G, ie) => new Date(ie.timestamp || ie.createdAt).getTime() - new Date(G.timestamp || G.createdAt).getTime()),
|
|
1479
|
+
isModal: !!y[0].reference?.metadata?.isModal
|
|
1479
1480
|
});
|
|
1480
|
-
}), x(
|
|
1481
|
+
}), x(w), xe.current = null;
|
|
1481
1482
|
}));
|
|
1482
|
-
}, [
|
|
1483
|
+
}, [V]), te = Re(async () => {
|
|
1483
1484
|
if (n) {
|
|
1484
|
-
|
|
1485
|
+
se(!0);
|
|
1485
1486
|
try {
|
|
1486
|
-
const l = await fetch(`${
|
|
1487
|
+
const l = await fetch(`${s}/api/annotations`, {
|
|
1487
1488
|
headers: { "x-api-key": n }
|
|
1488
1489
|
});
|
|
1489
1490
|
if (l.ok) {
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1491
|
+
const h = await l.json(), g = Array.isArray(h) ? h : h?.data || [];
|
|
1492
|
+
if (!Array.isArray(g)) {
|
|
1493
|
+
console.error("Expected annotations array, got:", typeof g), Ce([]);
|
|
1494
|
+
return;
|
|
1495
|
+
}
|
|
1496
|
+
const E = g.reduce((j, O) => j.find((y) => y._id === O._id) ? j : j.concat([O]), []);
|
|
1497
|
+
Ce(E);
|
|
1492
1498
|
}
|
|
1493
1499
|
} catch (l) {
|
|
1494
1500
|
console.error("Failed to fetch annotations", l);
|
|
1495
1501
|
} finally {
|
|
1496
|
-
|
|
1502
|
+
se(!1);
|
|
1497
1503
|
}
|
|
1498
1504
|
}
|
|
1499
|
-
}, [n,
|
|
1505
|
+
}, [n, s]);
|
|
1500
1506
|
K(() => {
|
|
1501
|
-
|
|
1502
|
-
}, [
|
|
1503
|
-
if (
|
|
1507
|
+
N && V.length === 0 && !pe && q(!1);
|
|
1508
|
+
}, [N, V.length, pe]), K(() => {
|
|
1509
|
+
if (V.length === 0) {
|
|
1504
1510
|
oe();
|
|
1505
1511
|
return;
|
|
1506
1512
|
}
|
|
1507
1513
|
if (!i) {
|
|
1508
1514
|
oe();
|
|
1509
|
-
const l = new MutationObserver(() => oe()),
|
|
1515
|
+
const l = new MutationObserver(() => oe()), h = new ResizeObserver(() => oe()), g = () => oe();
|
|
1510
1516
|
return l.observe(document.documentElement, {
|
|
1511
1517
|
childList: !0,
|
|
1512
1518
|
subtree: !0,
|
|
1513
1519
|
attributes: !0
|
|
1514
|
-
}),
|
|
1515
|
-
l.disconnect(),
|
|
1520
|
+
}), h.observe(document.documentElement), window.addEventListener("scroll", g, !0), () => {
|
|
1521
|
+
l.disconnect(), h.disconnect(), window.removeEventListener("scroll", g, !0), xe.current && cancelAnimationFrame(xe.current);
|
|
1516
1522
|
};
|
|
1517
1523
|
}
|
|
1518
|
-
}, [i,
|
|
1524
|
+
}, [i, V.length, oe]), K(() => {
|
|
1519
1525
|
te();
|
|
1520
1526
|
}, [te]), K(() => {
|
|
1521
|
-
|
|
1527
|
+
ge.current = document.getElementById("viewgate-shadow-host");
|
|
1522
1528
|
}, []);
|
|
1523
|
-
const
|
|
1524
|
-
if (!i ||
|
|
1525
|
-
const
|
|
1526
|
-
if (!
|
|
1529
|
+
const Ne = Re((l) => {
|
|
1530
|
+
if (!i || f) return;
|
|
1531
|
+
const h = xt(l.clientX, l.clientY);
|
|
1532
|
+
if (!h || ge.current?.contains(h) || h.closest(".vg-no-capture")) {
|
|
1527
1533
|
m(null);
|
|
1528
1534
|
return;
|
|
1529
1535
|
}
|
|
1530
|
-
const
|
|
1536
|
+
const g = h.getBoundingClientRect();
|
|
1531
1537
|
m({
|
|
1532
|
-
tag:
|
|
1533
|
-
source:
|
|
1534
|
-
rect:
|
|
1535
|
-
element:
|
|
1536
|
-
previewText: (
|
|
1538
|
+
tag: h.tagName.toLowerCase(),
|
|
1539
|
+
source: h.getAttribute("data-source-path") || "unknown:0",
|
|
1540
|
+
rect: g,
|
|
1541
|
+
element: h,
|
|
1542
|
+
previewText: (h.innerText || "").slice(0, 100) || (h.getAttribute("placeholder") || "").slice(0, 100) || h.tagName.toLowerCase(),
|
|
1537
1543
|
semanticReference: {
|
|
1538
|
-
...On(
|
|
1544
|
+
...On(h),
|
|
1539
1545
|
normalizedOffset: {
|
|
1540
|
-
x: (l.clientX -
|
|
1541
|
-
y: (l.clientY -
|
|
1546
|
+
x: (l.clientX - g.left) / g.width,
|
|
1547
|
+
y: (l.clientY - g.top) / g.height
|
|
1542
1548
|
}
|
|
1543
1549
|
}
|
|
1544
1550
|
});
|
|
1545
|
-
}, [i,
|
|
1546
|
-
if (!i ||
|
|
1547
|
-
const
|
|
1548
|
-
if (!(!
|
|
1549
|
-
l.preventDefault(), l.stopPropagation(),
|
|
1551
|
+
}, [i, f]), Ie = Re(async (l) => {
|
|
1552
|
+
if (!i || f) return;
|
|
1553
|
+
const h = xt(l.clientX, l.clientY);
|
|
1554
|
+
if (!(!h || ge.current?.contains(h) || h.closest(".vg-no-capture")) && p) {
|
|
1555
|
+
l.preventDefault(), l.stopPropagation(), Se(!0);
|
|
1550
1556
|
try {
|
|
1551
|
-
const
|
|
1557
|
+
const j = await fn(document.body, {
|
|
1552
1558
|
pixelRatio: 2,
|
|
1553
1559
|
cacheBust: !0,
|
|
1554
1560
|
width: window.innerWidth,
|
|
1555
1561
|
height: window.innerHeight,
|
|
1556
1562
|
backgroundColor: "#ffffff",
|
|
1557
1563
|
filter: (w) => {
|
|
1558
|
-
const
|
|
1559
|
-
return !(
|
|
1564
|
+
const y = w;
|
|
1565
|
+
return !(ge.current?.contains(y) || y.id === "viewgate-ui" || y.classList?.contains("vg-no-capture"));
|
|
1560
1566
|
}
|
|
1561
|
-
}),
|
|
1562
|
-
|
|
1563
|
-
metadata: {
|
|
1564
|
-
...p.semanticReference.metadata,
|
|
1565
|
-
elementScreenshot: j
|
|
1566
|
-
}
|
|
1567
|
-
};
|
|
1568
|
-
O({
|
|
1567
|
+
}), O = await vn(j, p.rect, 32, 2);
|
|
1568
|
+
R({
|
|
1569
1569
|
...p,
|
|
1570
|
-
visualPreview:
|
|
1571
|
-
semanticReference: f
|
|
1570
|
+
visualPreview: O
|
|
1572
1571
|
});
|
|
1573
|
-
} catch (
|
|
1574
|
-
console.error("Failed to capture high-fidelity preview:",
|
|
1572
|
+
} catch (g) {
|
|
1573
|
+
console.error("Failed to capture high-fidelity preview:", g), R(p);
|
|
1575
1574
|
} finally {
|
|
1576
|
-
|
|
1575
|
+
Se(!1), m(null);
|
|
1577
1576
|
}
|
|
1578
1577
|
}
|
|
1579
|
-
}, [i, p,
|
|
1578
|
+
}, [i, p, f]);
|
|
1580
1579
|
K(() => {
|
|
1581
|
-
const l = (
|
|
1582
|
-
if (
|
|
1583
|
-
|
|
1580
|
+
const l = (h) => {
|
|
1581
|
+
if (h.key === "Escape") {
|
|
1582
|
+
f ? R(null) : N ? q(!1) : i && u(!1);
|
|
1584
1583
|
return;
|
|
1585
1584
|
}
|
|
1586
1585
|
const E = (() => {
|
|
1587
|
-
let
|
|
1588
|
-
for (;
|
|
1589
|
-
|
|
1590
|
-
return
|
|
1586
|
+
let w = document.activeElement;
|
|
1587
|
+
for (; w && w.shadowRoot && w.shadowRoot.activeElement; )
|
|
1588
|
+
w = w.shadowRoot.activeElement;
|
|
1589
|
+
return w;
|
|
1591
1590
|
})();
|
|
1592
1591
|
if (["input", "textarea"].includes((E?.tagName || "").toLowerCase()) || E?.isContentEditable) return;
|
|
1593
|
-
const
|
|
1594
|
-
|
|
1592
|
+
const O = h.key.toLowerCase();
|
|
1593
|
+
O === "c" && !f && !N && u((w) => !w), O === "v" && !f && (V.length > 0 || N) && (q((w) => !w), N || u(!1));
|
|
1595
1594
|
};
|
|
1596
|
-
return i && !
|
|
1597
|
-
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", l), window.removeEventListener("mousemove",
|
|
1595
|
+
return i && !f ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", l), window.addEventListener("mousemove", Ne, !0), window.addEventListener("click", Ie, !0), () => {
|
|
1596
|
+
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", l), window.removeEventListener("mousemove", Ne, !0), window.removeEventListener("click", Ie, !0);
|
|
1598
1597
|
};
|
|
1599
|
-
}, [i,
|
|
1598
|
+
}, [i, f, N, V, Ne, Ie]);
|
|
1600
1599
|
const Gt = async () => {
|
|
1601
|
-
if (!
|
|
1600
|
+
if (!f || !P.trim()) return;
|
|
1602
1601
|
ne(!0);
|
|
1603
|
-
const { semanticReference: l } =
|
|
1602
|
+
const { semanticReference: l } = f, [h, g] = (l.source || "").split(":"), E = g || "0";
|
|
1604
1603
|
try {
|
|
1605
|
-
if (!(await fetch(`${
|
|
1604
|
+
if (!(await fetch(`${s}/api/annotations`, {
|
|
1606
1605
|
method: "POST",
|
|
1607
1606
|
headers: {
|
|
1608
1607
|
"Content-Type": "application/json",
|
|
1609
1608
|
"x-api-key": n
|
|
1610
1609
|
},
|
|
1611
1610
|
body: JSON.stringify({
|
|
1612
|
-
filePath:
|
|
1611
|
+
filePath: h,
|
|
1613
1612
|
line: parseInt(E),
|
|
1614
1613
|
url: window.location.href,
|
|
1615
|
-
message:
|
|
1616
|
-
componentName: l.componentPath ||
|
|
1614
|
+
message: P,
|
|
1615
|
+
componentName: l.componentPath || f.tag,
|
|
1617
1616
|
reference: {
|
|
1618
1617
|
...l,
|
|
1619
1618
|
viewport: {
|
|
@@ -1625,9 +1624,9 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1625
1624
|
}
|
|
1626
1625
|
})
|
|
1627
1626
|
})).ok) throw new Error("Backend failed");
|
|
1628
|
-
e(r.success, "success"),
|
|
1629
|
-
} catch (
|
|
1630
|
-
console.error(
|
|
1627
|
+
e(r.success, "success"), R(null), L(""), u(!1), te();
|
|
1628
|
+
} catch (j) {
|
|
1629
|
+
console.error(j), e(r.error, "error");
|
|
1631
1630
|
} finally {
|
|
1632
1631
|
ne(!1);
|
|
1633
1632
|
}
|
|
@@ -1644,13 +1643,13 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1644
1643
|
display: "flex",
|
|
1645
1644
|
alignItems: "center",
|
|
1646
1645
|
gap: "8px",
|
|
1647
|
-
transition:
|
|
1646
|
+
transition: Y ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1648
1647
|
},
|
|
1649
1648
|
children: [
|
|
1650
1649
|
/* @__PURE__ */ o.jsx(
|
|
1651
1650
|
"div",
|
|
1652
1651
|
{
|
|
1653
|
-
onMouseDown:
|
|
1652
|
+
onMouseDown: _t,
|
|
1654
1653
|
style: {
|
|
1655
1654
|
width: "20px",
|
|
1656
1655
|
height: "32px",
|
|
@@ -1681,11 +1680,11 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1681
1680
|
"button",
|
|
1682
1681
|
{
|
|
1683
1682
|
onClick: (l) => {
|
|
1684
|
-
l.stopPropagation(),
|
|
1683
|
+
l.stopPropagation(), D({
|
|
1685
1684
|
title: r.exitConfirmTitle || "Close ViewGate?",
|
|
1686
1685
|
message: r.exitConfirmMessage || "Are you sure you want to close ViewGate?",
|
|
1687
1686
|
type: "danger",
|
|
1688
|
-
onConfirm: () =>
|
|
1687
|
+
onConfirm: () => a()
|
|
1689
1688
|
});
|
|
1690
1689
|
},
|
|
1691
1690
|
title: "Cerrar ViewGate",
|
|
@@ -1722,13 +1721,13 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1722
1721
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1366",
|
|
1723
1722
|
style: {
|
|
1724
1723
|
position: "fixed",
|
|
1725
|
-
bottom: `${
|
|
1726
|
-
right: `${
|
|
1724
|
+
bottom: `${H.bottom}px`,
|
|
1725
|
+
right: `${H.right}px`,
|
|
1727
1726
|
zIndex: De,
|
|
1728
1727
|
display: "flex",
|
|
1729
1728
|
alignItems: "center",
|
|
1730
1729
|
gap: "8px",
|
|
1731
|
-
transition:
|
|
1730
|
+
transition: he ? "none" : "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1732
1731
|
},
|
|
1733
1732
|
id: "viewgate-ui",
|
|
1734
1733
|
children: [
|
|
@@ -1774,16 +1773,16 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1774
1773
|
background: i ? "#ef4444" : void 0
|
|
1775
1774
|
},
|
|
1776
1775
|
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1421", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
1777
|
-
i ? /* @__PURE__ */ o.jsx(Le, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1422", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(
|
|
1776
|
+
i ? /* @__PURE__ */ o.jsx(Le, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1422", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1422", size: 20, className: "vg-animate-pop" }),
|
|
1778
1777
|
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1423", children: i ? r.exitMode : r.enterMode })
|
|
1779
1778
|
] })
|
|
1780
1779
|
}
|
|
1781
1780
|
),
|
|
1782
|
-
|
|
1781
|
+
V.length > 0 && /* @__PURE__ */ o.jsxs(
|
|
1783
1782
|
"button",
|
|
1784
1783
|
{
|
|
1785
1784
|
onClick: () => {
|
|
1786
|
-
|
|
1785
|
+
q(!N), u(!1), R(null);
|
|
1787
1786
|
},
|
|
1788
1787
|
className: "vg-button-ghost vg-animate-pop",
|
|
1789
1788
|
style: { animationDelay: "0.1s" },
|
|
@@ -1797,7 +1796,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1797
1796
|
]
|
|
1798
1797
|
}
|
|
1799
1798
|
),
|
|
1800
|
-
|
|
1799
|
+
be && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1445", style: {
|
|
1801
1800
|
position: "fixed",
|
|
1802
1801
|
top: 0,
|
|
1803
1802
|
left: 0,
|
|
@@ -1814,7 +1813,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1814
1813
|
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1452", className: "vg-spinner" }),
|
|
1815
1814
|
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1453", style: { fontWeight: 600, fontSize: "14px", color: "#000000" }, children: "Capturando..." })
|
|
1816
1815
|
] }) }),
|
|
1817
|
-
i && !
|
|
1816
|
+
i && !f && /* @__PURE__ */ o.jsx(
|
|
1818
1817
|
"div",
|
|
1819
1818
|
{
|
|
1820
1819
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1460",
|
|
@@ -1833,7 +1832,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1833
1832
|
}
|
|
1834
1833
|
}
|
|
1835
1834
|
),
|
|
1836
|
-
i && p && !
|
|
1835
|
+
i && p && !f && !be && /* @__PURE__ */ o.jsx(
|
|
1837
1836
|
"div",
|
|
1838
1837
|
{
|
|
1839
1838
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1479",
|
|
@@ -1869,7 +1868,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1869
1868
|
)
|
|
1870
1869
|
}
|
|
1871
1870
|
),
|
|
1872
|
-
|
|
1871
|
+
f && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1518", className: "vg-animate-fade", style: {
|
|
1873
1872
|
position: "fixed",
|
|
1874
1873
|
top: 0,
|
|
1875
1874
|
left: 0,
|
|
@@ -1898,11 +1897,11 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1898
1897
|
margin: "0 auto 16px",
|
|
1899
1898
|
color: "white",
|
|
1900
1899
|
boxShadow: "0 8px 16px rgba(99, 102, 241, 0.3)"
|
|
1901
|
-
}, children: /* @__PURE__ */ o.jsx(
|
|
1900
|
+
}, children: /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1533", size: 24 }) }),
|
|
1902
1901
|
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1535", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
|
|
1903
1902
|
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1536", style: { margin: 0, color: "#000000", fontSize: "15px" }, children: r.feedbackSubheader })
|
|
1904
1903
|
] }),
|
|
1905
|
-
|
|
1904
|
+
f.visualPreview && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1540", style: {
|
|
1906
1905
|
marginBottom: "24px",
|
|
1907
1906
|
borderRadius: "12px",
|
|
1908
1907
|
overflow: "hidden",
|
|
@@ -1913,7 +1912,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1913
1912
|
}, children: /* @__PURE__ */ o.jsx(
|
|
1914
1913
|
"img",
|
|
1915
1914
|
{
|
|
1916
|
-
src:
|
|
1915
|
+
src: f.visualPreview,
|
|
1917
1916
|
alt: "Preview",
|
|
1918
1917
|
style: { maxWidth: "100%", maxHeight: "200px", objectFit: "contain", display: "block" }
|
|
1919
1918
|
}
|
|
@@ -1922,8 +1921,8 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1922
1921
|
"textarea",
|
|
1923
1922
|
{
|
|
1924
1923
|
className: "vg-textarea",
|
|
1925
|
-
value:
|
|
1926
|
-
onChange: (l) =>
|
|
1924
|
+
value: P,
|
|
1925
|
+
onChange: (l) => L(l.target.value),
|
|
1927
1926
|
rows: 4,
|
|
1928
1927
|
placeholder: r.placeholder,
|
|
1929
1928
|
autoFocus: !0,
|
|
@@ -1934,9 +1933,9 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1934
1933
|
/* @__PURE__ */ o.jsx(
|
|
1935
1934
|
"button",
|
|
1936
1935
|
{
|
|
1937
|
-
onClick: () => !
|
|
1936
|
+
onClick: () => !B && R(null),
|
|
1938
1937
|
className: "vg-button-ghost",
|
|
1939
|
-
disabled:
|
|
1938
|
+
disabled: B,
|
|
1940
1939
|
style: { flex: 1, padding: "12px" },
|
|
1941
1940
|
children: r.cancel
|
|
1942
1941
|
}
|
|
@@ -1946,17 +1945,17 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1946
1945
|
{
|
|
1947
1946
|
onClick: Gt,
|
|
1948
1947
|
className: "vg-button-primary",
|
|
1949
|
-
disabled:
|
|
1948
|
+
disabled: B || !P.trim(),
|
|
1950
1949
|
style: { flex: 2 },
|
|
1951
1950
|
children: /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1582", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1952
|
-
|
|
1953
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1584", children:
|
|
1951
|
+
B ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1583", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ o.jsx(hr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1583", size: 18 }),
|
|
1952
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1584", children: B ? r.submitting : r.sendFeedback || "Send Comment" })
|
|
1954
1953
|
] })
|
|
1955
1954
|
}
|
|
1956
1955
|
)
|
|
1957
1956
|
] })
|
|
1958
1957
|
] }) }),
|
|
1959
|
-
|
|
1958
|
+
N && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1593", className: "vg-animate-fade", style: {
|
|
1960
1959
|
position: "fixed",
|
|
1961
1960
|
top: 0,
|
|
1962
1961
|
left: 0,
|
|
@@ -1977,17 +1976,17 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1977
1976
|
}, children: [
|
|
1978
1977
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1602", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
|
|
1979
1978
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1603", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
1980
|
-
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1604", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children:
|
|
1979
|
+
/* @__PURE__ */ o.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1604", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: I ? r.commentDetails : r.annotations }),
|
|
1981
1980
|
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1607", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: v.length })
|
|
1982
1981
|
] }),
|
|
1983
1982
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1611", style: { display: "flex", gap: "8px" }, children: [
|
|
1984
|
-
|
|
1983
|
+
I && /* @__PURE__ */ o.jsx(
|
|
1985
1984
|
"button",
|
|
1986
1985
|
{
|
|
1987
1986
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1613",
|
|
1988
1987
|
className: "vg-button-ghost",
|
|
1989
1988
|
style: { padding: "6px 14px", fontSize: "12px" },
|
|
1990
|
-
onClick: () =>
|
|
1989
|
+
onClick: () => Z(null),
|
|
1991
1990
|
children: r.viewAll || "View All"
|
|
1992
1991
|
}
|
|
1993
1992
|
),
|
|
@@ -1998,7 +1997,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
1998
1997
|
className: "vg-button-ghost",
|
|
1999
1998
|
style: { padding: "8px", borderRadius: "50%" },
|
|
2000
1999
|
onClick: () => {
|
|
2001
|
-
|
|
2000
|
+
q(!1), Z(null);
|
|
2002
2001
|
},
|
|
2003
2002
|
children: /* @__PURE__ */ o.jsx(Le, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1626", size: 20 })
|
|
2004
2003
|
}
|
|
@@ -2011,7 +2010,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2011
2010
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1631",
|
|
2012
2011
|
style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" },
|
|
2013
2012
|
className: "vg-custom-scrollbar",
|
|
2014
|
-
children:
|
|
2013
|
+
children: pe ? /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1637", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1638", className: "vg-spinner" }) }) : v.map((l, h) => /* @__PURE__ */ o.jsxs(
|
|
2015
2014
|
"div",
|
|
2016
2015
|
{
|
|
2017
2016
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1642",
|
|
@@ -2021,7 +2020,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2021
2020
|
marginBottom: "16px",
|
|
2022
2021
|
border: "1px solid rgba(0,0,0,0.05)",
|
|
2023
2022
|
background: "rgba(255,255,255,0.5)",
|
|
2024
|
-
animationDelay: `${
|
|
2023
|
+
animationDelay: `${h * 0.05}s`
|
|
2025
2024
|
},
|
|
2026
2025
|
children: [
|
|
2027
2026
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1653", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: [
|
|
@@ -2032,7 +2031,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2032
2031
|
{
|
|
2033
2032
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1659",
|
|
2034
2033
|
url: l.url,
|
|
2035
|
-
onHover:
|
|
2034
|
+
onHover: fe,
|
|
2036
2035
|
style: {
|
|
2037
2036
|
display: "flex",
|
|
2038
2037
|
alignItems: "center",
|
|
@@ -2049,11 +2048,11 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2049
2048
|
)
|
|
2050
2049
|
] }),
|
|
2051
2050
|
l.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1678", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a", border: "1px solid #dcfce7" }, children: [
|
|
2052
|
-
/* @__PURE__ */ o.jsx(
|
|
2051
|
+
/* @__PURE__ */ o.jsx(de, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1679", size: 14 }),
|
|
2053
2052
|
" ",
|
|
2054
2053
|
r.readyForReview
|
|
2055
2054
|
] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1682", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c", border: "1px solid #ffedd5" }, children: [
|
|
2056
|
-
/* @__PURE__ */ o.jsx(
|
|
2055
|
+
/* @__PURE__ */ o.jsx(st, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1683", size: 14 }),
|
|
2057
2056
|
" ",
|
|
2058
2057
|
r.pending
|
|
2059
2058
|
] })
|
|
@@ -2063,7 +2062,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2063
2062
|
{
|
|
2064
2063
|
className: "vg-textarea",
|
|
2065
2064
|
value: Ke,
|
|
2066
|
-
onChange: (
|
|
2065
|
+
onChange: (g) => Qe(g.target.value),
|
|
2067
2066
|
rows: 3,
|
|
2068
2067
|
autoFocus: !0,
|
|
2069
2068
|
style: { marginBottom: "16px" }
|
|
@@ -2078,11 +2077,11 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2078
2077
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
2079
2078
|
onClick: async () => {
|
|
2080
2079
|
try {
|
|
2081
|
-
(await fetch(`${
|
|
2080
|
+
(await fetch(`${s}/api/annotations/${l._id}`, {
|
|
2082
2081
|
method: "PATCH",
|
|
2083
2082
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2084
2083
|
body: JSON.stringify({ message: Ke })
|
|
2085
|
-
})).ok && (
|
|
2084
|
+
})).ok && (Me(null), te(), e(r.updateSuccess, "success"));
|
|
2086
2085
|
} catch {
|
|
2087
2086
|
e(r.error, "error");
|
|
2088
2087
|
}
|
|
@@ -2090,7 +2089,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2090
2089
|
children: r.save
|
|
2091
2090
|
}
|
|
2092
2091
|
),
|
|
2093
|
-
/* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1726", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () =>
|
|
2092
|
+
/* @__PURE__ */ o.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1726", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => Me(null), children: r.cancel })
|
|
2094
2093
|
] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2095
2094
|
/* @__PURE__ */ o.jsxs(
|
|
2096
2095
|
"button",
|
|
@@ -2099,7 +2098,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2099
2098
|
className: "vg-button-ghost vg-animate-pop",
|
|
2100
2099
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
2101
2100
|
onClick: () => {
|
|
2102
|
-
|
|
2101
|
+
Me(l._id), Qe(l.message);
|
|
2103
2102
|
},
|
|
2104
2103
|
children: [
|
|
2105
2104
|
/* @__PURE__ */ o.jsx(ur, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1738", size: 14 }),
|
|
@@ -2118,7 +2117,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2118
2117
|
l.url && (window.location.href = l.url);
|
|
2119
2118
|
},
|
|
2120
2119
|
children: [
|
|
2121
|
-
/* @__PURE__ */ o.jsx(
|
|
2120
|
+
/* @__PURE__ */ o.jsx(at, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1747", size: 14 }),
|
|
2122
2121
|
" ",
|
|
2123
2122
|
r.review
|
|
2124
2123
|
]
|
|
@@ -2131,13 +2130,13 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2131
2130
|
className: "vg-button-primary vg-animate-pop",
|
|
2132
2131
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
2133
2132
|
onClick: () => {
|
|
2134
|
-
|
|
2133
|
+
D({
|
|
2135
2134
|
title: r.markReadyConfirm,
|
|
2136
2135
|
message: r.confirmMarkReady,
|
|
2137
2136
|
type: "success",
|
|
2138
2137
|
onConfirm: async () => {
|
|
2139
2138
|
try {
|
|
2140
|
-
(await fetch(`${
|
|
2139
|
+
(await fetch(`${s}/api/annotations/${l._id}`, {
|
|
2141
2140
|
method: "PATCH",
|
|
2142
2141
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2143
2142
|
body: JSON.stringify({ status: "ready_for_review" })
|
|
@@ -2145,13 +2144,13 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2145
2144
|
} catch {
|
|
2146
2145
|
e(r.error, "error");
|
|
2147
2146
|
} finally {
|
|
2148
|
-
|
|
2147
|
+
D(null);
|
|
2149
2148
|
}
|
|
2150
2149
|
}
|
|
2151
2150
|
});
|
|
2152
2151
|
},
|
|
2153
2152
|
children: [
|
|
2154
|
-
/* @__PURE__ */ o.jsx(
|
|
2153
|
+
/* @__PURE__ */ o.jsx(de, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1778", size: 14 }),
|
|
2155
2154
|
" ",
|
|
2156
2155
|
r.markReady
|
|
2157
2156
|
]
|
|
@@ -2163,13 +2162,13 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2163
2162
|
className: "vg-button-ghost vg-animate-pop",
|
|
2164
2163
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
2165
2164
|
onClick: () => {
|
|
2166
|
-
|
|
2165
|
+
D({
|
|
2167
2166
|
title: r.reopenConfirm,
|
|
2168
2167
|
message: r.confirmReopen,
|
|
2169
2168
|
type: "success",
|
|
2170
2169
|
onConfirm: async () => {
|
|
2171
2170
|
try {
|
|
2172
|
-
(await fetch(`${
|
|
2171
|
+
(await fetch(`${s}/api/annotations/${l._id}`, {
|
|
2173
2172
|
method: "PATCH",
|
|
2174
2173
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2175
2174
|
body: JSON.stringify({ status: "pending" })
|
|
@@ -2177,7 +2176,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2177
2176
|
} catch {
|
|
2178
2177
|
e(r.error, "error");
|
|
2179
2178
|
} finally {
|
|
2180
|
-
|
|
2179
|
+
D(null);
|
|
2181
2180
|
}
|
|
2182
2181
|
}
|
|
2183
2182
|
});
|
|
@@ -2196,26 +2195,26 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2196
2195
|
className: "vg-button-ghost vg-animate-pop",
|
|
2197
2196
|
style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
|
|
2198
2197
|
onClick: () => {
|
|
2199
|
-
|
|
2198
|
+
D({
|
|
2200
2199
|
title: r.deleteConfirm,
|
|
2201
2200
|
message: r.confirmDelete,
|
|
2202
2201
|
type: "danger",
|
|
2203
2202
|
onConfirm: async () => {
|
|
2204
2203
|
try {
|
|
2205
|
-
if ((await fetch(`${
|
|
2204
|
+
if ((await fetch(`${s}/api/annotations/${l._id}`, {
|
|
2206
2205
|
method: "DELETE",
|
|
2207
2206
|
headers: { "x-api-key": n }
|
|
2208
2207
|
})).ok) {
|
|
2209
|
-
if (
|
|
2210
|
-
const E = v.find((
|
|
2211
|
-
E ?
|
|
2208
|
+
if (I === l._id) {
|
|
2209
|
+
const E = v.find((j) => j._id !== l._id);
|
|
2210
|
+
E ? Z(E._id) : (Z(null), q(!1));
|
|
2212
2211
|
}
|
|
2213
2212
|
te(), e(r.deleteSuccess, "success");
|
|
2214
2213
|
}
|
|
2215
2214
|
} catch {
|
|
2216
2215
|
e(r.error, "error");
|
|
2217
2216
|
} finally {
|
|
2218
|
-
|
|
2217
|
+
D(null);
|
|
2219
2218
|
}
|
|
2220
2219
|
}
|
|
2221
2220
|
});
|
|
@@ -2229,10 +2228,10 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2229
2228
|
l._id
|
|
2230
2229
|
))
|
|
2231
2230
|
},
|
|
2232
|
-
|
|
2231
|
+
I || "all"
|
|
2233
2232
|
)
|
|
2234
2233
|
] }) }),
|
|
2235
|
-
|
|
2234
|
+
z && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1866", className: "vg-animate-fade", style: {
|
|
2236
2235
|
position: "fixed",
|
|
2237
2236
|
top: 0,
|
|
2238
2237
|
left: 0,
|
|
@@ -2254,17 +2253,17 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2254
2253
|
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1878", style: {
|
|
2255
2254
|
width: "64px",
|
|
2256
2255
|
height: "64px",
|
|
2257
|
-
background:
|
|
2256
|
+
background: z.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
|
|
2258
2257
|
borderRadius: "20px",
|
|
2259
2258
|
display: "flex",
|
|
2260
2259
|
alignItems: "center",
|
|
2261
2260
|
justifyContent: "center",
|
|
2262
2261
|
margin: "0 auto 24px",
|
|
2263
|
-
color:
|
|
2262
|
+
color: z.type === "danger" ? "#ef4444" : "#6366f1",
|
|
2264
2263
|
transform: "rotate(-5deg)"
|
|
2265
|
-
}, children:
|
|
2266
|
-
/* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1889", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children:
|
|
2267
|
-
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1890", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children:
|
|
2264
|
+
}, children: z.type === "danger" ? /* @__PURE__ */ o.jsx(it, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1887", size: 32 }) : /* @__PURE__ */ o.jsx(de, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1887", size: 32 }) }),
|
|
2265
|
+
/* @__PURE__ */ o.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1889", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children: z.title }),
|
|
2266
|
+
/* @__PURE__ */ o.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1890", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children: z.message }),
|
|
2268
2267
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1891", style: { display: "flex", gap: "16px" }, children: [
|
|
2269
2268
|
/* @__PURE__ */ o.jsx(
|
|
2270
2269
|
"button",
|
|
@@ -2272,7 +2271,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2272
2271
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:1892",
|
|
2273
2272
|
className: "vg-button-ghost",
|
|
2274
2273
|
style: { flex: 1, height: "44px" },
|
|
2275
|
-
onClick: () => !ee &&
|
|
2274
|
+
onClick: () => !ee && D(null),
|
|
2276
2275
|
disabled: ee,
|
|
2277
2276
|
children: r.no
|
|
2278
2277
|
}
|
|
@@ -2285,8 +2284,8 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2285
2284
|
style: {
|
|
2286
2285
|
flex: 1,
|
|
2287
2286
|
height: "44px",
|
|
2288
|
-
backgroundColor:
|
|
2289
|
-
backgroundImage:
|
|
2287
|
+
backgroundColor: z.type === "danger" ? "#ef4444" : void 0,
|
|
2288
|
+
backgroundImage: z.type === "danger" ? "none" : void 0,
|
|
2290
2289
|
display: "flex",
|
|
2291
2290
|
alignItems: "center",
|
|
2292
2291
|
justifyContent: "center",
|
|
@@ -2294,13 +2293,13 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2294
2293
|
},
|
|
2295
2294
|
disabled: ee,
|
|
2296
2295
|
onClick: async () => {
|
|
2297
|
-
|
|
2296
|
+
me(!0);
|
|
2298
2297
|
try {
|
|
2299
|
-
await
|
|
2298
|
+
await z.onConfirm();
|
|
2300
2299
|
} catch (l) {
|
|
2301
2300
|
console.error("Confirmation error:", l);
|
|
2302
2301
|
} finally {
|
|
2303
|
-
|
|
2302
|
+
me(!1);
|
|
2304
2303
|
}
|
|
2305
2304
|
},
|
|
2306
2305
|
children: ee ? /* @__PURE__ */ o.jsx(or, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1925", size: 18, className: "vg-animate-spin" }) : r.yes
|
|
@@ -2308,60 +2307,60 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2308
2307
|
)
|
|
2309
2308
|
] })
|
|
2310
2309
|
] }) }),
|
|
2311
|
-
!i && !
|
|
2312
|
-
const { rect:
|
|
2310
|
+
!i && !N && d.map((l, h) => {
|
|
2311
|
+
const { rect: g, annotations: E, isModal: j } = l, O = E[0], w = E.length, y = E.some((C) => C.status === "ready_for_review"), A = E.some((C) => C.status !== "ready_for_review"), J = y && A, W = y && !A;
|
|
2313
2312
|
return /* @__PURE__ */ o.jsxs(
|
|
2314
2313
|
"div",
|
|
2315
2314
|
{
|
|
2316
2315
|
className: "vg-pin-container vg-animate-pop",
|
|
2317
2316
|
style: {
|
|
2318
2317
|
position: "fixed",
|
|
2319
|
-
top:
|
|
2320
|
-
left:
|
|
2318
|
+
top: g.top - 20,
|
|
2319
|
+
left: g.left + g.width / 2 - 16,
|
|
2321
2320
|
width: "32px",
|
|
2322
2321
|
height: "32px",
|
|
2323
2322
|
cursor: "pointer",
|
|
2324
2323
|
transition: "all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
2325
2324
|
zIndex: xn
|
|
2326
2325
|
},
|
|
2327
|
-
onMouseEnter: (
|
|
2328
|
-
window.innerHeight -
|
|
2326
|
+
onMouseEnter: (C) => {
|
|
2327
|
+
window.innerHeight - g.bottom < 250 ? je((ie) => ({ ...ie, [l.id]: "vg-top" })) : je((ie) => ({ ...ie, [l.id]: "" }));
|
|
2329
2328
|
},
|
|
2330
|
-
onWheel: (
|
|
2331
|
-
const
|
|
2332
|
-
|
|
2329
|
+
onWheel: (C) => {
|
|
2330
|
+
const G = C.currentTarget.querySelector(".vg-tooltip-scroll");
|
|
2331
|
+
G && G.scrollBy({ top: C.deltaY, behavior: "smooth" });
|
|
2333
2332
|
},
|
|
2334
2333
|
onClick: () => {
|
|
2335
|
-
|
|
2334
|
+
q(!0), Z(O._id);
|
|
2336
2335
|
},
|
|
2337
2336
|
children: [
|
|
2338
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1978", className: `vg-pin-tooltip ${
|
|
2337
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1978", className: `vg-pin-tooltip ${ke[l.id] || ""}`, style: { padding: "16px" }, children: [
|
|
2339
2338
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1979", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "12px" }, children: [
|
|
2340
2339
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1980", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2341
|
-
/* @__PURE__ */ o.jsx(
|
|
2340
|
+
/* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1981", size: 14, color: "#6366f1" }),
|
|
2342
2341
|
/* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1982", style: { fontWeight: 800, fontSize: "13px", color: "#0f172a" }, children: [
|
|
2343
|
-
|
|
2342
|
+
w,
|
|
2344
2343
|
" ",
|
|
2345
|
-
|
|
2344
|
+
w === 1 ? "Comentario" : "Comentarios"
|
|
2346
2345
|
] })
|
|
2347
2346
|
] }),
|
|
2348
|
-
|
|
2347
|
+
j && /* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1987", className: "vg-badge", style: { fontSize: "10px", background: "#fef3c7", color: "#92400e", border: "none" }, children: "MODAL" })
|
|
2349
2348
|
] }),
|
|
2350
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1990", className: "vg-tooltip-scroll", style: { maxHeight: "180px", overflowY: "auto" }, children: E.map((
|
|
2349
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1990", className: "vg-tooltip-scroll", style: { maxHeight: "180px", overflowY: "auto" }, children: E.map((C, G) => /* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1992", style: {
|
|
2351
2350
|
padding: "10px 0",
|
|
2352
|
-
borderTop:
|
|
2351
|
+
borderTop: G === 0 ? "none" : "1px solid #f1f5f9",
|
|
2353
2352
|
display: "flex",
|
|
2354
2353
|
gap: "12px",
|
|
2355
2354
|
alignItems: "flex-start"
|
|
2356
2355
|
}, children: [
|
|
2357
2356
|
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1999", style: { flex: 1, display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
2358
|
-
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2000", style: { fontSize: "10px", fontWeight: 600, color: "#64748b" }, children: ht(
|
|
2359
|
-
|
|
2357
|
+
/* @__PURE__ */ o.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2000", style: { fontSize: "10px", fontWeight: 600, color: "#64748b" }, children: ht(C.timestamp || C.createdAt, t) }),
|
|
2358
|
+
C.url && /* @__PURE__ */ o.jsx(
|
|
2360
2359
|
gt,
|
|
2361
2360
|
{
|
|
2362
2361
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:2004",
|
|
2363
|
-
url:
|
|
2364
|
-
onHover:
|
|
2362
|
+
url: C.url,
|
|
2363
|
+
onHover: fe,
|
|
2365
2364
|
style: {
|
|
2366
2365
|
display: "flex",
|
|
2367
2366
|
alignItems: "center",
|
|
@@ -2377,9 +2376,9 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2377
2376
|
tooltipStyle: { fontSize: "9px" }
|
|
2378
2377
|
}
|
|
2379
2378
|
),
|
|
2380
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2022", className: "vg-line-clamp-2", style: { fontSize: "13px", color: "#1e293b", lineHeight: 1.4, fontWeight: 500 }, children:
|
|
2379
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2022", className: "vg-line-clamp-2", style: { fontSize: "13px", color: "#1e293b", lineHeight: 1.4, fontWeight: 500 }, children: C.message.length > 100 ? C.message.slice(0, 97) + "..." : C.message })
|
|
2381
2380
|
] }),
|
|
2382
|
-
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2026", style: { flexShrink: 0, marginTop: "2px" }, children:
|
|
2381
|
+
/* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2026", style: { flexShrink: 0, marginTop: "2px" }, children: C.status === "ready_for_review" ? /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2028", style: {
|
|
2383
2382
|
display: "flex",
|
|
2384
2383
|
alignItems: "center",
|
|
2385
2384
|
gap: "4px",
|
|
@@ -2392,7 +2391,7 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2392
2391
|
textTransform: "uppercase",
|
|
2393
2392
|
border: "1px solid #dcfce7"
|
|
2394
2393
|
}, children: [
|
|
2395
|
-
/* @__PURE__ */ o.jsx(
|
|
2394
|
+
/* @__PURE__ */ o.jsx(de, { "data-source-path": "/src/components/ViewGateOverlay.tsx:2041", size: 10 }),
|
|
2396
2395
|
r.readyForReview
|
|
2397
2396
|
] }) : /* @__PURE__ */ o.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2045", style: {
|
|
2398
2397
|
display: "flex",
|
|
@@ -2407,14 +2406,14 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2407
2406
|
textTransform: "uppercase",
|
|
2408
2407
|
border: "1px solid #ffedd5"
|
|
2409
2408
|
}, children: [
|
|
2410
|
-
/* @__PURE__ */ o.jsx(
|
|
2409
|
+
/* @__PURE__ */ o.jsx(st, { "data-source-path": "/src/components/ViewGateOverlay.tsx:2058", size: 10 }),
|
|
2411
2410
|
r.pending
|
|
2412
2411
|
] }) })
|
|
2413
|
-
] },
|
|
2412
|
+
] }, C._id)) })
|
|
2414
2413
|
] }),
|
|
2415
|
-
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2068", className: `vg-formal-pin ${
|
|
2416
|
-
|
|
2417
|
-
|
|
2414
|
+
/* @__PURE__ */ o.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2068", className: `vg-formal-pin ${W ? "ready" : J ? "mixed" : ""} ${j ? "modal-variant" : ""}`, style: { position: "relative" }, children: [
|
|
2415
|
+
W ? /* @__PURE__ */ o.jsx(de, { "data-source-path": "/src/components/ViewGateOverlay.tsx:2069", size: 18 }) : j ? /* @__PURE__ */ o.jsx(at, { "data-source-path": "/src/components/ViewGateOverlay.tsx:2069", size: 16 }) : /* @__PURE__ */ o.jsx(Ae, { "data-source-path": "/src/components/ViewGateOverlay.tsx:2069", size: 16 }),
|
|
2416
|
+
w > 1 && /* @__PURE__ */ o.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:2072", className: "vg-pin-badge vg-animate-pop", children: w })
|
|
2418
2417
|
] })
|
|
2419
2418
|
]
|
|
2420
2419
|
},
|
|
@@ -2425,24 +2424,24 @@ const Ae = 2147483647, De = Ae, Fe = 2e6, hn = Ae - 10, gn = Ae - 5, xn = Ae - 1
|
|
|
2425
2424
|
"div",
|
|
2426
2425
|
{
|
|
2427
2426
|
"data-source-path": "/src/components/ViewGateOverlay.tsx:2081",
|
|
2428
|
-
className: `vg-url-tooltip ${
|
|
2427
|
+
className: `vg-url-tooltip ${F ? "visible" : ""} ${F?.direction === "bottom" ? "vg-bottom" : "vg-top"}`,
|
|
2429
2428
|
style: {
|
|
2430
|
-
transform:
|
|
2431
|
-
left:
|
|
2432
|
-
top:
|
|
2429
|
+
transform: F ? `translate(-50%, ${F.direction === "top" ? "-110%" : "10%"})` : "translate(-50%, 0)",
|
|
2430
|
+
left: F?.x || 0,
|
|
2431
|
+
top: F?.y || 0
|
|
2433
2432
|
},
|
|
2434
|
-
children:
|
|
2433
|
+
children: F?.url
|
|
2435
2434
|
}
|
|
2436
2435
|
)
|
|
2437
2436
|
] }) });
|
|
2438
2437
|
};
|
|
2439
|
-
function
|
|
2438
|
+
function Tt(e, t, r) {
|
|
2440
2439
|
if (!t.endsWith(".tsx") && !t.endsWith(".jsx") || t.includes("node_modules")) return e;
|
|
2441
|
-
const n = (i) => i.replace(/\\/g, "/"),
|
|
2440
|
+
const n = (i) => i.replace(/\\/g, "/"), s = n(t).replace(n(r), "");
|
|
2442
2441
|
return e.split(`
|
|
2443
2442
|
`).map((i, u) => {
|
|
2444
2443
|
const p = u + 1;
|
|
2445
|
-
return i.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (m,
|
|
2444
|
+
return i.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (m, f, R) => m.includes("data-source-path") || R === "Fragment" || R === "React.Fragment" ? m : `${f}<${R} data-source-path="${s}:${p}"`);
|
|
2446
2445
|
}).join(`
|
|
2447
2446
|
`);
|
|
2448
2447
|
}
|
|
@@ -2452,7 +2451,7 @@ function $n() {
|
|
|
2452
2451
|
enforce: "pre",
|
|
2453
2452
|
transform(e, t) {
|
|
2454
2453
|
return {
|
|
2455
|
-
code:
|
|
2454
|
+
code: Tt(e, t, process.cwd()),
|
|
2456
2455
|
map: null
|
|
2457
2456
|
};
|
|
2458
2457
|
}
|
|
@@ -2460,12 +2459,12 @@ function $n() {
|
|
|
2460
2459
|
}
|
|
2461
2460
|
function Mn(e) {
|
|
2462
2461
|
const t = this.resourcePath;
|
|
2463
|
-
return t ? (process.env.NODE_ENV,
|
|
2462
|
+
return t ? (process.env.NODE_ENV, Tt(e, t, process.cwd())) : e;
|
|
2464
2463
|
}
|
|
2465
2464
|
export {
|
|
2466
2465
|
Gn as ViewGate,
|
|
2467
|
-
|
|
2468
|
-
|
|
2466
|
+
An as ViewGateOverlay,
|
|
2467
|
+
Tt as transformSourcePaths,
|
|
2469
2468
|
wr as useViewGate,
|
|
2470
2469
|
Mn as viewgateNextLoader,
|
|
2471
2470
|
$n as viewgatePlugin
|