viewgate-wrapper 1.10.14 → 1.10.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/viewgate-wrapper.js
CHANGED
|
@@ -1,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-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 .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s 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 .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out 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:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;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.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:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .3s cubic-bezier(.19,1,.22,1);border:1px solid rgba(255,255,255,.5);z-index:1000}.vg-tooltip-scroll{scrollbar-width:thin;scrollbar-color:rgba(99,102,241,.2) transparent}.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-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;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}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import Vt, { useRef as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
var Ee = { exports: {} },
|
|
2
|
+
import Vt, { useRef as ge, useState as E, useEffect as J, forwardRef as mt, createElement as ze, createContext as _t, useContext as Pt, useCallback as Ce } from "react";
|
|
3
|
+
import { createPortal as At } from "react-dom";
|
|
4
|
+
var Ee = { exports: {} }, fe = {};
|
|
5
5
|
var Xe;
|
|
6
6
|
function Gt() {
|
|
7
|
-
if (Xe) return
|
|
7
|
+
if (Xe) return fe;
|
|
8
8
|
Xe = 1;
|
|
9
9
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
10
|
-
function r(n,
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
for (var c in
|
|
15
|
-
c !== "key" && (
|
|
16
|
-
} else
|
|
17
|
-
return
|
|
10
|
+
function r(n, a, s) {
|
|
11
|
+
var o = null;
|
|
12
|
+
if (s !== void 0 && (o = "" + s), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
13
|
+
s = {};
|
|
14
|
+
for (var c in a)
|
|
15
|
+
c !== "key" && (s[c] = a[c]);
|
|
16
|
+
} else s = a;
|
|
17
|
+
return a = s.ref, {
|
|
18
18
|
$$typeof: e,
|
|
19
19
|
type: n,
|
|
20
|
-
key:
|
|
21
|
-
ref:
|
|
22
|
-
props:
|
|
20
|
+
key: o,
|
|
21
|
+
ref: a !== void 0 ? a : null,
|
|
22
|
+
props: s
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return fe.Fragment = t, fe.jsx = r, fe.jsxs = r, fe;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var he = {};
|
|
28
28
|
var Je;
|
|
29
29
|
function $t() {
|
|
30
30
|
return Je || (Je = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
31
31
|
function e(l) {
|
|
32
32
|
if (l == null) return null;
|
|
33
33
|
if (typeof l == "function")
|
|
34
|
-
return l.$$typeof ===
|
|
34
|
+
return l.$$typeof === le ? null : l.displayName || l.name || null;
|
|
35
35
|
if (typeof l == "string") return l;
|
|
36
36
|
switch (l) {
|
|
37
|
-
case
|
|
37
|
+
case F:
|
|
38
38
|
return "Fragment";
|
|
39
|
-
case
|
|
39
|
+
case q:
|
|
40
40
|
return "Profiler";
|
|
41
|
-
case
|
|
41
|
+
case B:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case _e:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case z:
|
|
46
46
|
return "SuspenseList";
|
|
47
47
|
case Ue:
|
|
48
48
|
return "Activity";
|
|
@@ -51,18 +51,18 @@ function $t() {
|
|
|
51
51
|
switch (typeof l.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
|
), l.$$typeof) {
|
|
54
|
-
case
|
|
54
|
+
case $:
|
|
55
55
|
return "Portal";
|
|
56
|
-
case
|
|
56
|
+
case Y:
|
|
57
57
|
return l.displayName || "Context";
|
|
58
|
-
case
|
|
58
|
+
case M:
|
|
59
59
|
return (l._context.displayName || "Context") + ".Consumer";
|
|
60
60
|
case V:
|
|
61
61
|
var x = l.render;
|
|
62
62
|
return l = l.displayName, l || (l = x.displayName || x.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
63
|
-
case
|
|
63
|
+
case H:
|
|
64
64
|
return x = l.displayName || null, x !== null ? x : e(l.type) || "Memo";
|
|
65
|
-
case
|
|
65
|
+
case xe:
|
|
66
66
|
x = l._payload, l = l._init;
|
|
67
67
|
try {
|
|
68
68
|
return e(l(x));
|
|
@@ -83,17 +83,17 @@ function $t() {
|
|
|
83
83
|
}
|
|
84
84
|
if (x) {
|
|
85
85
|
x = console;
|
|
86
|
-
var
|
|
87
|
-
return
|
|
86
|
+
var b = x.error, S = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
87
|
+
return b.call(
|
|
88
88
|
x,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
90
|
+
S
|
|
91
91
|
), t(l);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function n(l) {
|
|
95
|
-
if (l ===
|
|
96
|
-
if (typeof l == "object" && l !== null && l.$$typeof ===
|
|
95
|
+
if (l === F) return "<>";
|
|
96
|
+
if (typeof l == "object" && l !== null && l.$$typeof === xe)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
99
|
var x = e(l);
|
|
@@ -102,49 +102,49 @@ function $t() {
|
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function a() {
|
|
106
106
|
var l = re.A;
|
|
107
107
|
return l === null ? null : l.getOwner();
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function s() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
112
|
+
function o(l) {
|
|
113
|
+
if (ye.call(l, "key")) {
|
|
114
114
|
var x = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
115
115
|
if (x && x.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
117
|
return l.key !== void 0;
|
|
118
118
|
}
|
|
119
119
|
function c(l, x) {
|
|
120
|
-
function
|
|
120
|
+
function b() {
|
|
121
121
|
ne || (ne = !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
|
));
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
126
|
+
b.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
127
|
+
get: b,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function u() {
|
|
132
132
|
var l = e(this.type);
|
|
133
|
-
return
|
|
133
|
+
return K[l] || (K[l] = !0, console.error(
|
|
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
|
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
var
|
|
137
|
+
function p(l, x, b, S, _, U) {
|
|
138
|
+
var k = b.ref;
|
|
139
139
|
return l = {
|
|
140
|
-
$$typeof:
|
|
140
|
+
$$typeof: T,
|
|
141
141
|
type: l,
|
|
142
142
|
key: x,
|
|
143
|
-
props:
|
|
144
|
-
_owner:
|
|
145
|
-
}, (
|
|
143
|
+
props: b,
|
|
144
|
+
_owner: S
|
|
145
|
+
}, (k !== void 0 ? k : null) !== null ? Object.defineProperty(l, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
147
|
-
get:
|
|
147
|
+
get: u
|
|
148
148
|
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
149
149
|
configurable: !1,
|
|
150
150
|
enumerable: !1,
|
|
@@ -159,129 +159,129 @@ function $t() {
|
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
|
-
value:
|
|
162
|
+
value: _
|
|
163
163
|
}), Object.defineProperty(l, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
167
|
+
value: U
|
|
168
168
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
m(
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
170
|
+
function h(l, x, b, S, _, U) {
|
|
171
|
+
var k = x.children;
|
|
172
|
+
if (k !== void 0)
|
|
173
|
+
if (S)
|
|
174
|
+
if (we(k)) {
|
|
175
|
+
for (S = 0; S < k.length; S++)
|
|
176
|
+
m(k[S]);
|
|
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 m(
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
182
|
+
else m(k);
|
|
183
|
+
if (ye.call(x, "key")) {
|
|
184
|
+
k = e(l);
|
|
185
|
+
var I = Object.keys(x).filter(function(D) {
|
|
186
|
+
return D !== "key";
|
|
187
187
|
});
|
|
188
|
-
|
|
188
|
+
S = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", ve[k + S] || (I = 0 < I.length ? "{" + I.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} />
|
|
192
192
|
React keys must be passed directly to JSX without using spread:
|
|
193
193
|
let props = %s;
|
|
194
194
|
<%s key={someKey} {...props} />`,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
),
|
|
195
|
+
S,
|
|
196
|
+
k,
|
|
197
|
+
I,
|
|
198
|
+
k
|
|
199
|
+
), ve[k + S] = !0);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
201
|
+
if (k = null, b !== void 0 && (r(b), k = "" + b), o(x) && (r(x.key), k = "" + x.key), "key" in x) {
|
|
202
|
+
b = {};
|
|
203
203
|
for (var ae in x)
|
|
204
|
-
ae !== "key" && (
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
204
|
+
ae !== "key" && (b[ae] = x[ae]);
|
|
205
|
+
} else b = x;
|
|
206
|
+
return k && c(
|
|
207
|
+
b,
|
|
208
208
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
209
|
-
),
|
|
209
|
+
), p(
|
|
210
210
|
l,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
211
|
+
k,
|
|
212
|
+
b,
|
|
213
|
+
a(),
|
|
214
|
+
_,
|
|
215
|
+
U
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
function m(l) {
|
|
219
|
-
|
|
219
|
+
C(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === xe && (l._payload.status === "fulfilled" ? C(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
return typeof l == "object" && l !== null && l.$$typeof ===
|
|
221
|
+
function C(l) {
|
|
222
|
+
return typeof l == "object" && l !== null && l.$$typeof === T;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var j = Vt, T = /* @__PURE__ */ Symbol.for("react.transitional.element"), $ = /* @__PURE__ */ Symbol.for("react.portal"), F = /* @__PURE__ */ Symbol.for("react.fragment"), B = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), M = /* @__PURE__ */ Symbol.for("react.consumer"), Y = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__PURE__ */ Symbol.for("react.forward_ref"), _e = /* @__PURE__ */ Symbol.for("react.suspense"), z = /* @__PURE__ */ Symbol.for("react.suspense_list"), H = /* @__PURE__ */ Symbol.for("react.memo"), xe = /* @__PURE__ */ Symbol.for("react.lazy"), Ue = /* @__PURE__ */ Symbol.for("react.activity"), le = /* @__PURE__ */ Symbol.for("react.client.reference"), re = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ye = Object.prototype.hasOwnProperty, we = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
j = {
|
|
228
228
|
react_stack_bottom_frame: function(l) {
|
|
229
229
|
return l();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var ne,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
238
|
-
return
|
|
232
|
+
var ne, K = {}, de = j.react_stack_bottom_frame.bind(
|
|
233
|
+
j,
|
|
234
|
+
s
|
|
235
|
+
)(), ue = W(n(s)), ve = {};
|
|
236
|
+
he.Fragment = F, he.jsx = function(l, x, b) {
|
|
237
|
+
var S = 1e4 > re.recentlyCreatedOwnerStacks++;
|
|
238
|
+
return h(
|
|
239
239
|
l,
|
|
240
240
|
x,
|
|
241
|
-
|
|
241
|
+
b,
|
|
242
242
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
S ? Error("react-stack-top-frame") : de,
|
|
244
|
+
S ? W(n(l)) : ue
|
|
245
245
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
248
|
-
return
|
|
246
|
+
}, he.jsxs = function(l, x, b) {
|
|
247
|
+
var S = 1e4 > re.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return h(
|
|
249
249
|
l,
|
|
250
250
|
x,
|
|
251
|
-
|
|
251
|
+
b,
|
|
252
252
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
S ? Error("react-stack-top-frame") : de,
|
|
254
|
+
S ? W(n(l)) : ue
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
|
-
})()),
|
|
257
|
+
})()), he;
|
|
258
258
|
}
|
|
259
259
|
var Ze;
|
|
260
260
|
function Nt() {
|
|
261
261
|
return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? Ee.exports = Gt() : Ee.exports = $t()), Ee.exports;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
-
const t =
|
|
266
|
-
return
|
|
263
|
+
var i = Nt();
|
|
264
|
+
const Mt = ({ children: e }) => {
|
|
265
|
+
const t = ge(null), [r, n] = E(null);
|
|
266
|
+
return J(() => {
|
|
267
267
|
if (t.current && !t.current.shadowRoot) {
|
|
268
|
-
const
|
|
268
|
+
const a = t.current.attachShadow({ mode: "open" });
|
|
269
269
|
document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach((c) => {
|
|
270
|
-
(c.textContent?.includes(".vg-") || c.textContent?.includes("--vg-")) &&
|
|
270
|
+
(c.textContent?.includes(".vg-") || c.textContent?.includes("--vg-")) && a.appendChild(c.cloneNode(!0));
|
|
271
271
|
});
|
|
272
|
-
const
|
|
273
|
-
|
|
272
|
+
const o = document.createElement("link");
|
|
273
|
+
o.rel = "stylesheet", o.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap", a.appendChild(o), n(a);
|
|
274
274
|
}
|
|
275
|
-
}, []), /* @__PURE__ */
|
|
275
|
+
}, []), /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ShadowRootWrapper.tsx:38", ref: t, id: "viewgate-shadow-host", children: r && At(e, r) });
|
|
276
276
|
};
|
|
277
277
|
const ft = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
|
|
278
|
-
const
|
|
279
|
-
const
|
|
278
|
+
const It = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
279
|
+
const Lt = (e) => e.replace(
|
|
280
280
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
281
281
|
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
282
282
|
);
|
|
283
283
|
const Ke = (e) => {
|
|
284
|
-
const t =
|
|
284
|
+
const t = Lt(e);
|
|
285
285
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
286
286
|
};
|
|
287
287
|
var zt = {
|
|
@@ -307,40 +307,40 @@ const Ft = mt(
|
|
|
307
307
|
size: t = 24,
|
|
308
308
|
strokeWidth: r = 2,
|
|
309
309
|
absoluteStrokeWidth: n,
|
|
310
|
-
className:
|
|
311
|
-
children:
|
|
312
|
-
iconNode:
|
|
310
|
+
className: a = "",
|
|
311
|
+
children: s,
|
|
312
|
+
iconNode: o,
|
|
313
313
|
...c
|
|
314
|
-
},
|
|
314
|
+
}, u) => ze(
|
|
315
315
|
"svg",
|
|
316
316
|
{
|
|
317
|
-
ref:
|
|
317
|
+
ref: u,
|
|
318
318
|
...zt,
|
|
319
319
|
width: t,
|
|
320
320
|
height: t,
|
|
321
321
|
stroke: e,
|
|
322
322
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
323
|
-
className: ft("lucide",
|
|
324
|
-
...!
|
|
323
|
+
className: ft("lucide", a),
|
|
324
|
+
...!s && !Dt(c) && { "aria-hidden": "true" },
|
|
325
325
|
...c
|
|
326
326
|
},
|
|
327
327
|
[
|
|
328
|
-
...
|
|
329
|
-
...Array.isArray(
|
|
328
|
+
...o.map(([p, h]) => ze(p, h)),
|
|
329
|
+
...Array.isArray(s) ? s : [s]
|
|
330
330
|
]
|
|
331
331
|
)
|
|
332
332
|
);
|
|
333
|
-
const
|
|
333
|
+
const G = (e, t) => {
|
|
334
334
|
const r = mt(
|
|
335
|
-
({ className: n, ...
|
|
336
|
-
ref:
|
|
335
|
+
({ className: n, ...a }, s) => ze(Ft, {
|
|
336
|
+
ref: s,
|
|
337
337
|
iconNode: t,
|
|
338
338
|
className: ft(
|
|
339
|
-
`lucide-${
|
|
339
|
+
`lucide-${It(Ke(e))}`,
|
|
340
340
|
`lucide-${e}`,
|
|
341
341
|
n
|
|
342
342
|
),
|
|
343
|
-
...
|
|
343
|
+
...a
|
|
344
344
|
})
|
|
345
345
|
);
|
|
346
346
|
return r.displayName = Ke(e), r;
|
|
@@ -349,20 +349,20 @@ const Ht = [
|
|
|
349
349
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
350
350
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
351
351
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
352
|
-
], Wt =
|
|
352
|
+
], Wt = G("circle-alert", Ht);
|
|
353
353
|
const Ut = [
|
|
354
354
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
355
355
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
356
|
-
], ce =
|
|
356
|
+
], ce = G("circle-check", Ut);
|
|
357
357
|
const Bt = [
|
|
358
358
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
359
359
|
["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
|
|
360
|
-
], qt =
|
|
360
|
+
], qt = G("clock", Bt);
|
|
361
361
|
const Yt = [
|
|
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
|
-
], Qe =
|
|
365
|
+
], Qe = G("external-link", Yt);
|
|
366
366
|
const Xt = [
|
|
367
367
|
[
|
|
368
368
|
"path",
|
|
@@ -372,7 +372,7 @@ const Xt = [
|
|
|
372
372
|
}
|
|
373
373
|
],
|
|
374
374
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
375
|
-
], Jt =
|
|
375
|
+
], Jt = G("eye", Xt);
|
|
376
376
|
const Zt = [
|
|
377
377
|
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
378
378
|
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
@@ -380,8 +380,8 @@ const Zt = [
|
|
|
380
380
|
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
|
|
381
381
|
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
382
382
|
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
383
|
-
], et =
|
|
384
|
-
const Kt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Qt =
|
|
383
|
+
], et = G("grip-vertical", Zt);
|
|
384
|
+
const Kt = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Qt = G("loader-circle", Kt);
|
|
385
385
|
const er = [
|
|
386
386
|
[
|
|
387
387
|
"path",
|
|
@@ -390,7 +390,7 @@ const er = [
|
|
|
390
390
|
key: "18887p"
|
|
391
391
|
}
|
|
392
392
|
]
|
|
393
|
-
],
|
|
393
|
+
], Se = G("message-square", er);
|
|
394
394
|
const tr = [
|
|
395
395
|
[
|
|
396
396
|
"path",
|
|
@@ -399,7 +399,7 @@ const tr = [
|
|
|
399
399
|
key: "edeuup"
|
|
400
400
|
}
|
|
401
401
|
]
|
|
402
|
-
], rr =
|
|
402
|
+
], rr = G("mouse-pointer-2", tr);
|
|
403
403
|
const nr = [
|
|
404
404
|
[
|
|
405
405
|
"path",
|
|
@@ -409,11 +409,11 @@ const nr = [
|
|
|
409
409
|
}
|
|
410
410
|
],
|
|
411
411
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
412
|
-
], ar =
|
|
412
|
+
], ar = G("pencil", nr);
|
|
413
413
|
const sr = [
|
|
414
414
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
415
415
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
416
|
-
], or =
|
|
416
|
+
], or = G("rotate-ccw", sr);
|
|
417
417
|
const ir = [
|
|
418
418
|
[
|
|
419
419
|
"path",
|
|
@@ -423,18 +423,18 @@ const ir = [
|
|
|
423
423
|
}
|
|
424
424
|
],
|
|
425
425
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
426
|
-
], cr =
|
|
426
|
+
], cr = G("send", ir);
|
|
427
427
|
const lr = [
|
|
428
428
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
429
429
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
430
430
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
431
431
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
432
432
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
433
|
-
], tt =
|
|
433
|
+
], tt = G("trash-2", lr);
|
|
434
434
|
const dr = [
|
|
435
435
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
436
436
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
437
|
-
],
|
|
437
|
+
], $e = G("x", dr), ur = {
|
|
438
438
|
en: {
|
|
439
439
|
enterMode: "Enter Feedback Mode",
|
|
440
440
|
exitMode: "Exit Mode",
|
|
@@ -528,47 +528,47 @@ const dr = [
|
|
|
528
528
|
exitConfirmMessage: "¿Estás seguro de que deseas cerrar ViewGate? Puedes volver a activarlo en cualquier momento agregando ?viewgate=true a la URL."
|
|
529
529
|
}
|
|
530
530
|
}, ht = _t(void 0), pr = () => {
|
|
531
|
-
const e =
|
|
531
|
+
const e = Pt(ht);
|
|
532
532
|
if (!e) throw new Error("useViewGate must be used within a ViewGateProvider");
|
|
533
533
|
return e;
|
|
534
|
-
},
|
|
534
|
+
}, De = "viewgate_enabled", mr = () => typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("viewgate") ? (sessionStorage.setItem(De, "true"), !0) : sessionStorage.getItem(De) === "true", kn = ({
|
|
535
535
|
children: e,
|
|
536
536
|
language: t = "es",
|
|
537
537
|
apiKey: r,
|
|
538
538
|
baseUrl: n = "https://view-gate.vercel.app"
|
|
539
539
|
}) => {
|
|
540
|
-
const [
|
|
541
|
-
|
|
542
|
-
|
|
540
|
+
const [a, s] = E(!1), [o, c] = E([]);
|
|
541
|
+
J(() => {
|
|
542
|
+
s(mr());
|
|
543
543
|
}, []);
|
|
544
|
-
const
|
|
545
|
-
if (sessionStorage.removeItem(
|
|
544
|
+
const u = () => {
|
|
545
|
+
if (sessionStorage.removeItem(De), s(!1), typeof window < "u") {
|
|
546
546
|
const m = new URL(window.location.href);
|
|
547
547
|
m.searchParams.delete("viewgate"), window.history.replaceState({}, "", m.toString());
|
|
548
548
|
}
|
|
549
|
-
},
|
|
550
|
-
const
|
|
551
|
-
c((
|
|
552
|
-
c((
|
|
549
|
+
}, p = (m, C) => {
|
|
550
|
+
const j = Date.now();
|
|
551
|
+
c((T) => [...T, { id: j, message: m, type: C }]), setTimeout(() => {
|
|
552
|
+
c((T) => T.filter(($) => $.id !== j));
|
|
553
553
|
}, 4e3);
|
|
554
|
-
},
|
|
555
|
-
return /* @__PURE__ */
|
|
556
|
-
addToast:
|
|
554
|
+
}, h = ur[t];
|
|
555
|
+
return /* @__PURE__ */ i.jsxs(ht.Provider, { "data-source-path": "/src/components/ViewGateProvider.tsx:249", value: {
|
|
556
|
+
addToast: p,
|
|
557
557
|
language: t,
|
|
558
|
-
t:
|
|
558
|
+
t: h,
|
|
559
559
|
apiKey: r,
|
|
560
560
|
baseUrl: n,
|
|
561
|
-
disableViewGate:
|
|
562
|
-
hasActiveToasts:
|
|
561
|
+
disableViewGate: u,
|
|
562
|
+
hasActiveToasts: o.length > 0
|
|
563
563
|
}, children: [
|
|
564
564
|
e,
|
|
565
|
-
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
-
/* @__PURE__ */
|
|
568
|
-
m.type === "success" ? /* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
565
|
+
a && /* @__PURE__ */ i.jsx(Mt, { "data-source-path": "/src/components/ViewGateProvider.tsx:260", children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:261", className: "vg-container", children: [
|
|
566
|
+
/* @__PURE__ */ i.jsx(vn, { "data-source-path": "/src/components/ViewGateProvider.tsx:262" }),
|
|
567
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:263", className: "vg-toasts", style: { zIndex: 2147483646 }, children: o.map((m) => /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:265", className: `vg-toast vg-animate-slide ${m.type}`, children: [
|
|
568
|
+
m.type === "success" ? /* @__PURE__ */ i.jsx(ce, { "data-source-path": "/src/components/ViewGateProvider.tsx:267", size: 24, color: "#22c55e" }) : /* @__PURE__ */ i.jsx(Wt, { "data-source-path": "/src/components/ViewGateProvider.tsx:269", size: 24, color: "#ef4444" }),
|
|
569
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateProvider.tsx:271", children: [
|
|
570
|
+
/* @__PURE__ */ i.jsx("strong", { "data-source-path": "/src/components/ViewGateProvider.tsx:272", style: { display: "block", fontSize: "13px", color: "#0f172a", textTransform: "uppercase", marginBottom: "2px" }, children: m.type === "success" ? h.successHeader : h.errorHeader }),
|
|
571
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateProvider.tsx:275", style: { fontSize: "14px", color: "#000000" }, children: m.message })
|
|
572
572
|
] })
|
|
573
573
|
] }, m.id)) })
|
|
574
574
|
] }) })
|
|
@@ -581,8 +581,8 @@ function fr(e, t) {
|
|
|
581
581
|
return window.location.protocol + e;
|
|
582
582
|
if (e.match(/^[a-z]+:/i))
|
|
583
583
|
return e;
|
|
584
|
-
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"),
|
|
585
|
-
return r.head.appendChild(n), r.body.appendChild(
|
|
584
|
+
const r = document.implementation.createHTMLDocument(), n = r.createElement("base"), a = r.createElement("a");
|
|
585
|
+
return r.head.appendChild(n), r.body.appendChild(a), t && (n.href = t), a.href = e, a.href;
|
|
586
586
|
}
|
|
587
587
|
const hr = /* @__PURE__ */ (() => {
|
|
588
588
|
let e = 0;
|
|
@@ -592,7 +592,7 @@ const hr = /* @__PURE__ */ (() => {
|
|
|
592
592
|
);
|
|
593
593
|
return () => (e += 1, `u${t()}${e}`);
|
|
594
594
|
})();
|
|
595
|
-
function
|
|
595
|
+
function Z(e) {
|
|
596
596
|
const t = [];
|
|
597
597
|
for (let r = 0, n = e.length; r < n; r++)
|
|
598
598
|
t.push(e[r]);
|
|
@@ -600,18 +600,18 @@ function K(e) {
|
|
|
600
600
|
}
|
|
601
601
|
let oe = null;
|
|
602
602
|
function gt(e = {}) {
|
|
603
|
-
return oe || (e.includeStyleProperties ? (oe = e.includeStyleProperties, oe) : (oe =
|
|
603
|
+
return oe || (e.includeStyleProperties ? (oe = e.includeStyleProperties, oe) : (oe = Z(window.getComputedStyle(document.documentElement)), oe));
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function ke(e, t) {
|
|
606
606
|
const n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
607
607
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
608
608
|
}
|
|
609
609
|
function gr(e) {
|
|
610
|
-
const t =
|
|
610
|
+
const t = ke(e, "border-left-width"), r = ke(e, "border-right-width");
|
|
611
611
|
return e.clientWidth + t + r;
|
|
612
612
|
}
|
|
613
613
|
function xr(e) {
|
|
614
|
-
const t =
|
|
614
|
+
const t = ke(e, "border-top-width"), r = ke(e, "border-bottom-width");
|
|
615
615
|
return e.clientHeight + t + r;
|
|
616
616
|
}
|
|
617
617
|
function xt(e, t = {}) {
|
|
@@ -627,11 +627,11 @@ function yr() {
|
|
|
627
627
|
const r = t && t.env ? t.env.devicePixelRatio : null;
|
|
628
628
|
return r && (e = parseInt(r, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
629
629
|
}
|
|
630
|
-
const
|
|
630
|
+
const N = 16384;
|
|
631
631
|
function wr(e) {
|
|
632
|
-
(e.width >
|
|
632
|
+
(e.width > N || e.height > N) && (e.width > N && e.height > N ? e.width > e.height ? (e.height *= N / e.width, e.width = N) : (e.width *= N / e.height, e.height = N) : e.width > N ? (e.height *= N / e.width, e.width = N) : (e.width *= N / e.height, e.height = N));
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Re(e) {
|
|
635
635
|
return new Promise((t, r) => {
|
|
636
636
|
const n = new Image();
|
|
637
637
|
n.onload = () => {
|
|
@@ -645,41 +645,41 @@ async function vr(e) {
|
|
|
645
645
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
|
|
646
646
|
}
|
|
647
647
|
async function br(e, t, r) {
|
|
648
|
-
const n = "http://www.w3.org/2000/svg",
|
|
649
|
-
return
|
|
648
|
+
const n = "http://www.w3.org/2000/svg", a = document.createElementNS(n, "svg"), s = document.createElementNS(n, "foreignObject");
|
|
649
|
+
return a.setAttribute("width", `${t}`), a.setAttribute("height", `${r}`), a.setAttribute("viewBox", `0 0 ${t} ${r}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), a.appendChild(s), s.appendChild(e), vr(a);
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const A = (e, t) => {
|
|
652
652
|
if (e instanceof t)
|
|
653
653
|
return !0;
|
|
654
654
|
const r = Object.getPrototypeOf(e);
|
|
655
|
-
return r === null ? !1 : r.constructor.name === t.name ||
|
|
655
|
+
return r === null ? !1 : r.constructor.name === t.name || A(r, t);
|
|
656
656
|
};
|
|
657
657
|
function Cr(e) {
|
|
658
658
|
const t = e.getPropertyValue("content");
|
|
659
659
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function Er(e, t) {
|
|
662
662
|
return gt(t).map((r) => {
|
|
663
|
-
const n = e.getPropertyValue(r),
|
|
664
|
-
return `${r}: ${n}${
|
|
663
|
+
const n = e.getPropertyValue(r), a = e.getPropertyPriority(r);
|
|
664
|
+
return `${r}: ${n}${a ? " !important" : ""};`;
|
|
665
665
|
}).join(" ");
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
const
|
|
669
|
-
return document.createTextNode(`${
|
|
667
|
+
function Sr(e, t, r, n) {
|
|
668
|
+
const a = `.${e}:${t}`, s = r.cssText ? Cr(r) : Er(r, n);
|
|
669
|
+
return document.createTextNode(`${a}{${s}}`);
|
|
670
670
|
}
|
|
671
671
|
function rt(e, t, r, n) {
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
672
|
+
const a = window.getComputedStyle(e, r), s = a.getPropertyValue("content");
|
|
673
|
+
if (s === "" || s === "none")
|
|
674
674
|
return;
|
|
675
|
-
const
|
|
675
|
+
const o = hr();
|
|
676
676
|
try {
|
|
677
|
-
t.className = `${t.className} ${
|
|
677
|
+
t.className = `${t.className} ${o}`;
|
|
678
678
|
} catch {
|
|
679
679
|
return;
|
|
680
680
|
}
|
|
681
681
|
const c = document.createElement("style");
|
|
682
|
-
c.appendChild(
|
|
682
|
+
c.appendChild(Sr(o, r, a, n)), t.appendChild(c);
|
|
683
683
|
}
|
|
684
684
|
function kr(e, t, r) {
|
|
685
685
|
rt(e, t, ":before", r), rt(e, t, ":after", r);
|
|
@@ -708,7 +708,7 @@ function He(e) {
|
|
|
708
708
|
function Or(e) {
|
|
709
709
|
return e.split(/,/)[1];
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Fe(e) {
|
|
712
712
|
return e.search(/^(data:)/) !== -1;
|
|
713
713
|
}
|
|
714
714
|
function Tr(e, t) {
|
|
@@ -718,54 +718,54 @@ async function yt(e, t, r) {
|
|
|
718
718
|
const n = await fetch(e, t);
|
|
719
719
|
if (n.status === 404)
|
|
720
720
|
throw new Error(`Resource "${n.url}" not found`);
|
|
721
|
-
const
|
|
722
|
-
return new Promise((
|
|
721
|
+
const a = await n.blob();
|
|
722
|
+
return new Promise((s, o) => {
|
|
723
723
|
const c = new FileReader();
|
|
724
|
-
c.onerror =
|
|
724
|
+
c.onerror = o, c.onloadend = () => {
|
|
725
725
|
try {
|
|
726
|
-
|
|
727
|
-
} catch (
|
|
728
|
-
|
|
726
|
+
s(r({ res: n, result: c.result }));
|
|
727
|
+
} catch (u) {
|
|
728
|
+
o(u);
|
|
729
729
|
}
|
|
730
|
-
}, c.readAsDataURL(
|
|
730
|
+
}, c.readAsDataURL(a);
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
const
|
|
733
|
+
const Ne = {};
|
|
734
734
|
function Vr(e, t, r) {
|
|
735
735
|
let n = e.replace(/\?.*/, "");
|
|
736
736
|
return r && (n = e), /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")), t ? `[${t}]${n}` : n;
|
|
737
737
|
}
|
|
738
738
|
async function We(e, t, r) {
|
|
739
739
|
const n = Vr(e, t, r.includeQueryParams);
|
|
740
|
-
if (
|
|
741
|
-
return
|
|
740
|
+
if (Ne[n] != null)
|
|
741
|
+
return Ne[n];
|
|
742
742
|
r.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
743
|
-
let
|
|
743
|
+
let a;
|
|
744
744
|
try {
|
|
745
|
-
const
|
|
746
|
-
|
|
747
|
-
} catch (
|
|
748
|
-
|
|
749
|
-
let
|
|
750
|
-
|
|
745
|
+
const s = await yt(e, r.fetchRequestInit, ({ res: o, result: c }) => (t || (t = o.headers.get("Content-Type") || ""), Or(c)));
|
|
746
|
+
a = Tr(s, t);
|
|
747
|
+
} catch (s) {
|
|
748
|
+
a = r.imagePlaceholder || "";
|
|
749
|
+
let o = `Failed to fetch resource: ${e}`;
|
|
750
|
+
s && (o = typeof s == "string" ? s : s.message), o && console.warn(o);
|
|
751
751
|
}
|
|
752
|
-
return
|
|
752
|
+
return Ne[n] = a, a;
|
|
753
753
|
}
|
|
754
754
|
async function _r(e) {
|
|
755
755
|
const t = e.toDataURL();
|
|
756
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
756
|
+
return t === "data:," ? e.cloneNode(!1) : Re(t);
|
|
757
757
|
}
|
|
758
|
-
async function
|
|
758
|
+
async function Pr(e, t) {
|
|
759
759
|
if (e.currentSrc) {
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
const c =
|
|
763
|
-
return
|
|
760
|
+
const s = document.createElement("canvas"), o = s.getContext("2d");
|
|
761
|
+
s.width = e.clientWidth, s.height = e.clientHeight, o?.drawImage(e, 0, 0, s.width, s.height);
|
|
762
|
+
const c = s.toDataURL();
|
|
763
|
+
return Re(c);
|
|
764
764
|
}
|
|
765
|
-
const r = e.poster, n = He(r),
|
|
766
|
-
return
|
|
765
|
+
const r = e.poster, n = He(r), a = await We(r, n, t);
|
|
766
|
+
return Re(a);
|
|
767
767
|
}
|
|
768
|
-
async function
|
|
768
|
+
async function Ar(e, t) {
|
|
769
769
|
var r;
|
|
770
770
|
try {
|
|
771
771
|
if (!((r = e?.contentDocument) === null || r === void 0) && r.body)
|
|
@@ -775,61 +775,61 @@ async function Pr(e, t) {
|
|
|
775
775
|
return e.cloneNode(!1);
|
|
776
776
|
}
|
|
777
777
|
async function Gr(e, t) {
|
|
778
|
-
return
|
|
778
|
+
return A(e, HTMLCanvasElement) ? _r(e) : A(e, HTMLVideoElement) ? Pr(e, t) : A(e, HTMLIFrameElement) ? Ar(e, t) : e.cloneNode(wt(e));
|
|
779
779
|
}
|
|
780
780
|
const $r = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", wt = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
781
781
|
async function Nr(e, t, r) {
|
|
782
|
-
var n,
|
|
782
|
+
var n, a;
|
|
783
783
|
if (wt(t))
|
|
784
784
|
return t;
|
|
785
|
-
let
|
|
786
|
-
return $r(e) && e.assignedNodes ?
|
|
787
|
-
|
|
785
|
+
let s = [];
|
|
786
|
+
return $r(e) && e.assignedNodes ? s = Z(e.assignedNodes()) : A(e, HTMLIFrameElement) && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? s = Z(e.contentDocument.body.childNodes) : s = Z(((a = e.shadowRoot) !== null && a !== void 0 ? a : e).childNodes), s.length === 0 || A(e, HTMLVideoElement) || await s.reduce((o, c) => o.then(() => Te(c, r)).then((u) => {
|
|
787
|
+
u && t.appendChild(u);
|
|
788
788
|
}), Promise.resolve()), t;
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function Mr(e, t, r) {
|
|
791
791
|
const n = t.style;
|
|
792
792
|
if (!n)
|
|
793
793
|
return;
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
let
|
|
797
|
-
|
|
794
|
+
const a = window.getComputedStyle(e);
|
|
795
|
+
a.cssText ? (n.cssText = a.cssText, n.transformOrigin = a.transformOrigin) : gt(r).forEach((s) => {
|
|
796
|
+
let o = a.getPropertyValue(s);
|
|
797
|
+
s === "font-size" && o.endsWith("px") && (o = `${Math.floor(parseFloat(o.substring(0, o.length - 2))) - 0.1}px`), A(e, HTMLIFrameElement) && s === "display" && o === "inline" && (o = "block"), s === "d" && t.getAttribute("d") && (o = `path(${t.getAttribute("d")})`), n.setProperty(s, o, a.getPropertyPriority(s));
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
|
-
function Mr(e, t) {
|
|
801
|
-
L(e, HTMLTextAreaElement) && (t.innerHTML = e.value), L(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
802
|
-
}
|
|
803
800
|
function Ir(e, t) {
|
|
804
|
-
|
|
805
|
-
|
|
801
|
+
A(e, HTMLTextAreaElement) && (t.innerHTML = e.value), A(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
802
|
+
}
|
|
803
|
+
function Lr(e, t) {
|
|
804
|
+
if (A(e, HTMLSelectElement)) {
|
|
805
|
+
const n = Array.from(t.children).find((a) => e.value === a.getAttribute("value"));
|
|
806
806
|
n && n.setAttribute("selected", "");
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
809
|
function zr(e, t, r) {
|
|
810
|
-
return
|
|
810
|
+
return A(t, Element) && (Mr(e, t, r), kr(e, t, r), Ir(e, t), Lr(e, t)), t;
|
|
811
811
|
}
|
|
812
812
|
async function Dr(e, t) {
|
|
813
813
|
const r = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
814
814
|
if (r.length === 0)
|
|
815
815
|
return e;
|
|
816
816
|
const n = {};
|
|
817
|
-
for (let
|
|
818
|
-
const c = r[
|
|
817
|
+
for (let s = 0; s < r.length; s++) {
|
|
818
|
+
const c = r[s].getAttribute("xlink:href");
|
|
819
819
|
if (c) {
|
|
820
|
-
const
|
|
821
|
-
!
|
|
820
|
+
const u = e.querySelector(c), p = document.querySelector(c);
|
|
821
|
+
!u && p && !n[c] && (n[c] = await Te(p, t, !0));
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
826
|
-
const
|
|
827
|
-
|
|
828
|
-
const c = document.createElementNS(
|
|
829
|
-
|
|
830
|
-
for (let
|
|
831
|
-
c.appendChild(
|
|
832
|
-
e.appendChild(
|
|
824
|
+
const a = Object.values(n);
|
|
825
|
+
if (a.length) {
|
|
826
|
+
const s = "http://www.w3.org/1999/xhtml", o = document.createElementNS(s, "svg");
|
|
827
|
+
o.setAttribute("xmlns", s), o.style.position = "absolute", o.style.width = "0", o.style.height = "0", o.style.overflow = "hidden", o.style.display = "none";
|
|
828
|
+
const c = document.createElementNS(s, "defs");
|
|
829
|
+
o.appendChild(c);
|
|
830
|
+
for (let u = 0; u < a.length; u++)
|
|
831
|
+
c.appendChild(a[u]);
|
|
832
|
+
e.appendChild(o);
|
|
833
833
|
}
|
|
834
834
|
return e;
|
|
835
835
|
}
|
|
@@ -843,13 +843,13 @@ function Wr(e) {
|
|
|
843
843
|
}
|
|
844
844
|
function Ur(e) {
|
|
845
845
|
const t = [];
|
|
846
|
-
return e.replace(vt, (r, n,
|
|
846
|
+
return e.replace(vt, (r, n, a) => (t.push(a), r)), t.filter((r) => !Fe(r));
|
|
847
847
|
}
|
|
848
|
-
async function Br(e, t, r, n,
|
|
848
|
+
async function Br(e, t, r, n, a) {
|
|
849
849
|
try {
|
|
850
|
-
const
|
|
850
|
+
const s = r ? fr(t, r) : t, o = He(t);
|
|
851
851
|
let c;
|
|
852
|
-
return
|
|
852
|
+
return a || (c = await We(s, o, n)), e.replace(Wr(t), `$1${c}$3`);
|
|
853
853
|
} catch {
|
|
854
854
|
}
|
|
855
855
|
return e;
|
|
@@ -857,10 +857,10 @@ async function Br(e, t, r, n, s) {
|
|
|
857
857
|
function qr(e, { preferredFontFormat: t }) {
|
|
858
858
|
return t ? e.replace(Hr, (r) => {
|
|
859
859
|
for (; ; ) {
|
|
860
|
-
const [n, ,
|
|
861
|
-
if (!
|
|
860
|
+
const [n, , a] = Fr.exec(r) || [];
|
|
861
|
+
if (!a)
|
|
862
862
|
return "";
|
|
863
|
-
if (
|
|
863
|
+
if (a === t)
|
|
864
864
|
return `src: ${n};`;
|
|
865
865
|
}
|
|
866
866
|
}) : e;
|
|
@@ -872,14 +872,14 @@ async function Ct(e, t, r) {
|
|
|
872
872
|
if (!bt(e))
|
|
873
873
|
return e;
|
|
874
874
|
const n = qr(e, r);
|
|
875
|
-
return Ur(n).reduce((
|
|
875
|
+
return Ur(n).reduce((s, o) => s.then((c) => Br(c, o, t, r)), Promise.resolve(n));
|
|
876
876
|
}
|
|
877
877
|
async function ie(e, t, r) {
|
|
878
878
|
var n;
|
|
879
|
-
const
|
|
880
|
-
if (
|
|
881
|
-
const
|
|
882
|
-
return t.style.setProperty(e,
|
|
879
|
+
const a = (n = t.style) === null || n === void 0 ? void 0 : n.getPropertyValue(e);
|
|
880
|
+
if (a) {
|
|
881
|
+
const s = await Ct(a, null, r);
|
|
882
|
+
return t.style.setProperty(e, s, t.style.getPropertyPriority(e)), !0;
|
|
883
883
|
}
|
|
884
884
|
return !1;
|
|
885
885
|
}
|
|
@@ -887,35 +887,35 @@ async function Yr(e, t) {
|
|
|
887
887
|
await ie("background", e, t) || await ie("background-image", e, t), await ie("mask", e, t) || await ie("-webkit-mask", e, t) || await ie("mask-image", e, t) || await ie("-webkit-mask-image", e, t);
|
|
888
888
|
}
|
|
889
889
|
async function Xr(e, t) {
|
|
890
|
-
const r =
|
|
891
|
-
if (!(r && !
|
|
890
|
+
const r = A(e, HTMLImageElement);
|
|
891
|
+
if (!(r && !Fe(e.src)) && !(A(e, SVGImageElement) && !Fe(e.href.baseVal)))
|
|
892
892
|
return;
|
|
893
|
-
const n = r ? e.src : e.href.baseVal,
|
|
894
|
-
await new Promise((
|
|
895
|
-
e.onload =
|
|
893
|
+
const n = r ? e.src : e.href.baseVal, a = await We(n, He(n), t);
|
|
894
|
+
await new Promise((s, o) => {
|
|
895
|
+
e.onload = s, e.onerror = t.onImageErrorHandler ? (...u) => {
|
|
896
896
|
try {
|
|
897
|
-
|
|
898
|
-
} catch (
|
|
899
|
-
|
|
897
|
+
s(t.onImageErrorHandler(...u));
|
|
898
|
+
} catch (p) {
|
|
899
|
+
o(p);
|
|
900
900
|
}
|
|
901
|
-
} :
|
|
901
|
+
} : o;
|
|
902
902
|
const c = e;
|
|
903
|
-
c.decode && (c.decode =
|
|
903
|
+
c.decode && (c.decode = s), c.loading === "lazy" && (c.loading = "eager"), r ? (e.srcset = "", e.src = a) : e.href.baseVal = a;
|
|
904
904
|
});
|
|
905
905
|
}
|
|
906
906
|
async function Jr(e, t) {
|
|
907
|
-
const n =
|
|
907
|
+
const n = Z(e.childNodes).map((a) => Et(a, t));
|
|
908
908
|
await Promise.all(n).then(() => e);
|
|
909
909
|
}
|
|
910
|
-
async function
|
|
911
|
-
|
|
910
|
+
async function Et(e, t) {
|
|
911
|
+
A(e, Element) && (await Yr(e, t), await Xr(e, t), await Jr(e, t));
|
|
912
912
|
}
|
|
913
913
|
function Zr(e, t) {
|
|
914
914
|
const { style: r } = e;
|
|
915
915
|
t.backgroundColor && (r.backgroundColor = t.backgroundColor), t.width && (r.width = `${t.width}px`), t.height && (r.height = `${t.height}px`);
|
|
916
916
|
const n = t.style;
|
|
917
|
-
return n != null && Object.keys(n).forEach((
|
|
918
|
-
r[
|
|
917
|
+
return n != null && Object.keys(n).forEach((a) => {
|
|
918
|
+
r[a] = n[a];
|
|
919
919
|
}), e;
|
|
920
920
|
}
|
|
921
921
|
const st = {};
|
|
@@ -928,77 +928,77 @@ async function ot(e) {
|
|
|
928
928
|
}
|
|
929
929
|
async function it(e, t) {
|
|
930
930
|
let r = e.cssText;
|
|
931
|
-
const n = /url\(["']?([^"')]+)["']?\)/g,
|
|
932
|
-
let c =
|
|
933
|
-
return c.startsWith("https://") || (c = new URL(c, e.url).href), yt(c, t.fetchRequestInit, ({ result:
|
|
931
|
+
const n = /url\(["']?([^"')]+)["']?\)/g, s = (r.match(/url\([^)]+\)/g) || []).map(async (o) => {
|
|
932
|
+
let c = o.replace(n, "$1");
|
|
933
|
+
return c.startsWith("https://") || (c = new URL(c, e.url).href), yt(c, t.fetchRequestInit, ({ result: u }) => (r = r.replace(o, `url(${u})`), [o, u]));
|
|
934
934
|
});
|
|
935
|
-
return Promise.all(
|
|
935
|
+
return Promise.all(s).then(() => r);
|
|
936
936
|
}
|
|
937
937
|
function ct(e) {
|
|
938
938
|
if (e == null)
|
|
939
939
|
return [];
|
|
940
940
|
const t = [], r = /(\/\*[\s\S]*?\*\/)/gi;
|
|
941
941
|
let n = e.replace(r, "");
|
|
942
|
-
const
|
|
942
|
+
const a = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
943
943
|
for (; ; ) {
|
|
944
|
-
const
|
|
945
|
-
if (
|
|
944
|
+
const u = a.exec(n);
|
|
945
|
+
if (u === null)
|
|
946
946
|
break;
|
|
947
|
-
t.push(
|
|
947
|
+
t.push(u[0]);
|
|
948
948
|
}
|
|
949
|
-
n = n.replace(
|
|
950
|
-
const
|
|
949
|
+
n = n.replace(a, "");
|
|
950
|
+
const s = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, o = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", c = new RegExp(o, "gi");
|
|
951
951
|
for (; ; ) {
|
|
952
|
-
let
|
|
953
|
-
if (
|
|
954
|
-
if (
|
|
952
|
+
let u = s.exec(n);
|
|
953
|
+
if (u === null) {
|
|
954
|
+
if (u = c.exec(n), u === null)
|
|
955
955
|
break;
|
|
956
|
-
|
|
956
|
+
s.lastIndex = c.lastIndex;
|
|
957
957
|
} else
|
|
958
|
-
c.lastIndex =
|
|
959
|
-
t.push(
|
|
958
|
+
c.lastIndex = s.lastIndex;
|
|
959
|
+
t.push(u[0]);
|
|
960
960
|
}
|
|
961
961
|
return t;
|
|
962
962
|
}
|
|
963
963
|
async function Kr(e, t) {
|
|
964
964
|
const r = [], n = [];
|
|
965
|
-
return e.forEach((
|
|
966
|
-
if ("cssRules" in
|
|
965
|
+
return e.forEach((a) => {
|
|
966
|
+
if ("cssRules" in a)
|
|
967
967
|
try {
|
|
968
|
-
|
|
969
|
-
if (
|
|
970
|
-
let c =
|
|
971
|
-
const
|
|
968
|
+
Z(a.cssRules || []).forEach((s, o) => {
|
|
969
|
+
if (s.type === CSSRule.IMPORT_RULE) {
|
|
970
|
+
let c = o + 1;
|
|
971
|
+
const u = s.href, p = ot(u).then((h) => it(h, t)).then((h) => ct(h).forEach((m) => {
|
|
972
972
|
try {
|
|
973
|
-
|
|
974
|
-
} catch (
|
|
973
|
+
a.insertRule(m, m.startsWith("@import") ? c += 1 : a.cssRules.length);
|
|
974
|
+
} catch (C) {
|
|
975
975
|
console.error("Error inserting rule from remote css", {
|
|
976
976
|
rule: m,
|
|
977
|
-
error:
|
|
977
|
+
error: C
|
|
978
978
|
});
|
|
979
979
|
}
|
|
980
|
-
})).catch((
|
|
981
|
-
console.error("Error loading remote css",
|
|
980
|
+
})).catch((h) => {
|
|
981
|
+
console.error("Error loading remote css", h.toString());
|
|
982
982
|
});
|
|
983
|
-
n.push(
|
|
983
|
+
n.push(p);
|
|
984
984
|
}
|
|
985
985
|
});
|
|
986
|
-
} catch (
|
|
987
|
-
const
|
|
988
|
-
|
|
989
|
-
|
|
986
|
+
} catch (s) {
|
|
987
|
+
const o = e.find((c) => c.href == null) || document.styleSheets[0];
|
|
988
|
+
a.href != null && n.push(ot(a.href).then((c) => it(c, t)).then((c) => ct(c).forEach((u) => {
|
|
989
|
+
o.insertRule(u, o.cssRules.length);
|
|
990
990
|
})).catch((c) => {
|
|
991
991
|
console.error("Error loading remote stylesheet", c);
|
|
992
|
-
})), console.error("Error inlining remote css file",
|
|
992
|
+
})), console.error("Error inlining remote css file", s);
|
|
993
993
|
}
|
|
994
|
-
}), Promise.all(n).then(() => (e.forEach((
|
|
995
|
-
if ("cssRules" in
|
|
994
|
+
}), Promise.all(n).then(() => (e.forEach((a) => {
|
|
995
|
+
if ("cssRules" in a)
|
|
996
996
|
try {
|
|
997
|
-
|
|
998
|
-
r.push(
|
|
997
|
+
Z(a.cssRules || []).forEach((s) => {
|
|
998
|
+
r.push(s);
|
|
999
999
|
});
|
|
1000
|
-
} catch (
|
|
1001
|
-
console.error(`Error while reading CSS rules from ${
|
|
1000
|
+
} catch (s) {
|
|
1001
|
+
console.error(`Error while reading CSS rules from ${a.href}`, s);
|
|
1002
1002
|
}
|
|
1003
1003
|
}), r));
|
|
1004
1004
|
}
|
|
@@ -1008,59 +1008,52 @@ function Qr(e) {
|
|
|
1008
1008
|
async function en(e, t) {
|
|
1009
1009
|
if (e.ownerDocument == null)
|
|
1010
1010
|
throw new Error("Provided element is not within a Document");
|
|
1011
|
-
const r =
|
|
1011
|
+
const r = Z(e.ownerDocument.styleSheets), n = await Kr(r, t);
|
|
1012
1012
|
return Qr(n);
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1014
|
+
function St(e) {
|
|
1015
1015
|
return e.trim().replace(/["']/g, "");
|
|
1016
1016
|
}
|
|
1017
1017
|
function tn(e) {
|
|
1018
1018
|
const t = /* @__PURE__ */ new Set();
|
|
1019
1019
|
function r(n) {
|
|
1020
|
-
(n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((
|
|
1021
|
-
t.add(
|
|
1022
|
-
}), Array.from(n.children).forEach((
|
|
1023
|
-
|
|
1020
|
+
(n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach((s) => {
|
|
1021
|
+
t.add(St(s));
|
|
1022
|
+
}), Array.from(n.children).forEach((s) => {
|
|
1023
|
+
s instanceof HTMLElement && r(s);
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
1026
|
return r(e), t;
|
|
1027
1027
|
}
|
|
1028
1028
|
async function rn(e, t) {
|
|
1029
1029
|
const r = await en(e, t), n = tn(e);
|
|
1030
|
-
return (await Promise.all(r.filter((
|
|
1031
|
-
const
|
|
1032
|
-
return Ct(
|
|
1030
|
+
return (await Promise.all(r.filter((s) => n.has(St(s.style.fontFamily))).map((s) => {
|
|
1031
|
+
const o = s.parentStyleSheet ? s.parentStyleSheet.href : null;
|
|
1032
|
+
return Ct(s.cssText, o, t);
|
|
1033
1033
|
}))).join(`
|
|
1034
1034
|
`);
|
|
1035
1035
|
}
|
|
1036
1036
|
async function nn(e, t) {
|
|
1037
1037
|
const r = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await rn(e, t);
|
|
1038
1038
|
if (r) {
|
|
1039
|
-
const n = document.createElement("style"),
|
|
1040
|
-
n.appendChild(
|
|
1039
|
+
const n = document.createElement("style"), a = document.createTextNode(r);
|
|
1040
|
+
n.appendChild(a), e.firstChild ? e.insertBefore(n, e.firstChild) : e.appendChild(n);
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
async function an(e, t = {}) {
|
|
1044
|
-
const { width: r, height: n } = xt(e, t),
|
|
1045
|
-
return await nn(
|
|
1044
|
+
const { width: r, height: n } = xt(e, t), a = await Te(e, t, !0);
|
|
1045
|
+
return await nn(a, t), await Et(a, t), Zr(a, t), await br(a, r, n);
|
|
1046
1046
|
}
|
|
1047
1047
|
async function sn(e, t = {}) {
|
|
1048
|
-
const { width: r, height: n } = xt(e, t),
|
|
1049
|
-
return
|
|
1048
|
+
const { width: r, height: n } = xt(e, t), a = await an(e, t), s = await Re(a), o = document.createElement("canvas"), c = o.getContext("2d"), u = t.pixelRatio || yr(), p = t.canvasWidth || r, h = t.canvasHeight || n;
|
|
1049
|
+
return o.width = p * u, o.height = h * u, t.skipAutoScale || wr(o), o.style.width = `${p}`, o.style.height = `${h}`, t.backgroundColor && (c.fillStyle = t.backgroundColor, c.fillRect(0, 0, o.width, o.height)), c.drawImage(s, 0, 0, o.width, o.height), o;
|
|
1050
1050
|
}
|
|
1051
1051
|
async function lt(e, t = {}) {
|
|
1052
1052
|
return (await sn(e, t)).toDataURL();
|
|
1053
1053
|
}
|
|
1054
|
-
const Ve = 2147483647,
|
|
1054
|
+
const Ve = 2147483647, Me = Ve, Ie = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 15, je = "data-vg-pin-id", dn = () => {
|
|
1055
1055
|
const e = window.innerWidth;
|
|
1056
1056
|
return e < 768 ? "mobile" : e < 1024 ? "tablet" : "desktop";
|
|
1057
|
-
}, un = (e) => {
|
|
1058
|
-
let t = 0;
|
|
1059
|
-
for (let r = 0; r < e.length; r++) {
|
|
1060
|
-
const n = e.charCodeAt(r);
|
|
1061
|
-
t = (t << 5) - t + n, t = t & t;
|
|
1062
|
-
}
|
|
1063
|
-
return Math.abs(t).toString(16);
|
|
1064
1057
|
}, dt = (e, t) => {
|
|
1065
1058
|
if (!e) return "";
|
|
1066
1059
|
try {
|
|
@@ -1076,20 +1069,47 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1076
1069
|
} catch {
|
|
1077
1070
|
return "";
|
|
1078
1071
|
}
|
|
1079
|
-
},
|
|
1080
|
-
const t =
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1072
|
+
}, Oe = (e) => {
|
|
1073
|
+
const t = [], r = [], n = [];
|
|
1074
|
+
let a = e;
|
|
1075
|
+
for (; a && a.nodeType === Node.ELEMENT_NODE; ) {
|
|
1076
|
+
if (a.id && !a.id.startsWith("vg-") && !a.id.includes(":")) {
|
|
1077
|
+
t.unshift(`#${a.id}`), n.unshift(`${a.localName}#${a.id}`);
|
|
1078
|
+
break;
|
|
1079
|
+
}
|
|
1080
|
+
let s = a.localName;
|
|
1081
|
+
const o = Array.from(a.parentNode?.children || []).indexOf(a), c = `${a.localName}[${o}]`;
|
|
1082
|
+
n.unshift(c);
|
|
1083
|
+
const u = a.getAttribute("data-testid") || a.getAttribute("data-qa");
|
|
1084
|
+
if (u && r.push(`[data-testid="${u}"]`), a.getAttribute("placeholder"), a.getAttribute("aria-label"), a.getAttribute("role"), a.getAttribute("name"), a.getAttribute("title"), u) {
|
|
1085
|
+
s = `[${a.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${u}"]`, t.unshift(s);
|
|
1086
|
+
break;
|
|
1087
|
+
}
|
|
1088
|
+
const p = Array.from(a.parentNode?.children || []).filter((h) => h.localName === a?.localName);
|
|
1089
|
+
if (p.length > 1) {
|
|
1090
|
+
const h = p.indexOf(a) + 1;
|
|
1091
|
+
s += `:nth-of-type(${h})`;
|
|
1092
|
+
}
|
|
1093
|
+
t.unshift(s), a = a.parentElement;
|
|
1094
|
+
}
|
|
1095
|
+
return {
|
|
1096
|
+
selector: t.join(" > "),
|
|
1097
|
+
fallbacks: r,
|
|
1098
|
+
vgPath: n.join(" > ")
|
|
1099
|
+
};
|
|
1100
|
+
}, un = (e) => {
|
|
1101
|
+
const { vgPath: t } = Oe(e);
|
|
1102
|
+
return {
|
|
1103
|
+
vgPath: t,
|
|
1104
|
+
classHash: e.className,
|
|
1084
1105
|
parentTag: e.parentElement?.tagName.toLowerCase(),
|
|
1085
|
-
neighborCount: e.parentElement?.children.length
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
}, mn = /* @__PURE__ */ (() => {
|
|
1106
|
+
neighborCount: e.parentElement?.children.length,
|
|
1107
|
+
ariaLabel: e.getAttribute("aria-label") || void 0,
|
|
1108
|
+
role: e.getAttribute("role") || void 0,
|
|
1109
|
+
name: e.getAttribute("name") || void 0,
|
|
1110
|
+
textSnippet: (e.innerText || "").slice(0, 30).trim()
|
|
1111
|
+
};
|
|
1112
|
+
}, pn = /* @__PURE__ */ (() => {
|
|
1093
1113
|
let e = null, t = null;
|
|
1094
1114
|
return (r) => {
|
|
1095
1115
|
if (!r || typeof window > "u" || typeof document > "u") return r;
|
|
@@ -1097,33 +1117,33 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1097
1117
|
try {
|
|
1098
1118
|
if (e || (e = document.createElement("canvas"), e.width = 1, e.height = 1), t || (t = e.getContext("2d", { willReadFrequently: !0 })), t) {
|
|
1099
1119
|
t.fillStyle = "#000000", t.fillStyle = r;
|
|
1100
|
-
const
|
|
1101
|
-
if (
|
|
1102
|
-
return
|
|
1120
|
+
const s = t.fillStyle;
|
|
1121
|
+
if (s && !s.includes("oklch") && !s.includes("oklab"))
|
|
1122
|
+
return s;
|
|
1103
1123
|
}
|
|
1104
1124
|
const n = document.createElement("div");
|
|
1105
1125
|
n.style.color = r, document.body.appendChild(n);
|
|
1106
|
-
const
|
|
1107
|
-
return document.body.removeChild(n),
|
|
1126
|
+
const a = getComputedStyle(n).color;
|
|
1127
|
+
return document.body.removeChild(n), a && !a.includes("oklch") ? a : "rgb(0,0,0)";
|
|
1108
1128
|
} catch {
|
|
1109
1129
|
return "rgb(0,0,0)";
|
|
1110
1130
|
}
|
|
1111
1131
|
return r;
|
|
1112
1132
|
};
|
|
1113
|
-
})(), ut = (e, t, r, n) => new Promise((
|
|
1114
|
-
const
|
|
1115
|
-
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1121
|
-
let m = (t.left - r) * n,
|
|
1122
|
-
m < 0 && (
|
|
1133
|
+
})(), ut = (e, t, r, n) => new Promise((a) => {
|
|
1134
|
+
const s = new Image();
|
|
1135
|
+
s.onload = () => {
|
|
1136
|
+
const o = document.createElement("canvas"), c = window.devicePixelRatio || 1, u = t.width + r * 2, p = t.height + r * 2;
|
|
1137
|
+
o.width = u * c, o.height = p * c;
|
|
1138
|
+
const h = o.getContext("2d");
|
|
1139
|
+
if (h) {
|
|
1140
|
+
h.scale(c, c);
|
|
1141
|
+
let m = (t.left - r) * n, C = (t.top - r) * n, j = u * n, T = p * n, $ = 0, F = 0, B = u, q = p;
|
|
1142
|
+
m < 0 && ($ = Math.abs(m) / n, j += m, B -= $, m = 0), m + j > s.width && (j = s.width - m, B = j / n), C < 0 && (F = Math.abs(C) / n, T += C, q -= F, C = 0), C + T > s.height && (T = s.height - C, q = T / n), h.fillStyle = "#ffffff", h.fillRect(0, 0, u, p), j > 0 && T > 0 && h.drawImage(s, m, C, j, T, $, F, B, q);
|
|
1123
1143
|
}
|
|
1124
|
-
|
|
1125
|
-
},
|
|
1126
|
-
}),
|
|
1144
|
+
a(o.toDataURL("image/png"));
|
|
1145
|
+
}, s.onerror = () => a(""), s.src = e;
|
|
1146
|
+
}), mn = (e) => {
|
|
1127
1147
|
const t = window.getComputedStyle(e), r = {};
|
|
1128
1148
|
return [
|
|
1129
1149
|
"display",
|
|
@@ -1136,51 +1156,51 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1136
1156
|
"width",
|
|
1137
1157
|
"height",
|
|
1138
1158
|
"z-index"
|
|
1139
|
-
].forEach((
|
|
1140
|
-
const
|
|
1141
|
-
r[
|
|
1159
|
+
].forEach((a) => {
|
|
1160
|
+
const s = t.getPropertyValue(a);
|
|
1161
|
+
r[a] = pn(s);
|
|
1142
1162
|
}), r;
|
|
1143
|
-
},
|
|
1144
|
-
const r = Object.keys(e).find((
|
|
1163
|
+
}, fn = (e) => {
|
|
1164
|
+
const r = Object.keys(e).find((s) => s.startsWith("__reactFiber$") || s.startsWith("__reactInternalInstance$"));
|
|
1145
1165
|
if (!r) return "";
|
|
1146
1166
|
const n = [];
|
|
1147
|
-
let
|
|
1148
|
-
for (;
|
|
1149
|
-
const
|
|
1150
|
-
if (typeof
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1167
|
+
let a = e[r];
|
|
1168
|
+
for (; a; ) {
|
|
1169
|
+
const s = a.type;
|
|
1170
|
+
if (typeof s == "function") {
|
|
1171
|
+
const o = s.displayName || s.name;
|
|
1172
|
+
o && !o.includes("ViewGate") && !n.includes(o) && n.unshift(o);
|
|
1153
1173
|
}
|
|
1154
|
-
|
|
1174
|
+
a = a.return;
|
|
1155
1175
|
}
|
|
1156
1176
|
return n.join(" > ") || "Generic Component";
|
|
1157
|
-
},
|
|
1177
|
+
}, hn = (e) => {
|
|
1158
1178
|
if (!e) return !1;
|
|
1159
1179
|
const t = window.getComputedStyle(e), r = e.getBoundingClientRect(), n = e.getAttribute("role");
|
|
1160
1180
|
if (n && ["listbox", "menu", "combobox", "tooltip", "option"].includes(n)) return !1;
|
|
1161
|
-
const
|
|
1162
|
-
return r.width <
|
|
1163
|
-
},
|
|
1181
|
+
const s = 120;
|
|
1182
|
+
return r.width < s && r.height < s || 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"));
|
|
1183
|
+
}, te = (e) => {
|
|
1164
1184
|
if (!e.isConnected) return !1;
|
|
1165
1185
|
const t = window.getComputedStyle(e);
|
|
1166
1186
|
if (t.display === "none" || t.visibility === "hidden" || t.opacity === "0" || e.offsetWidth === 0 || e.offsetHeight === 0) return !1;
|
|
1167
1187
|
let r = e.parentElement;
|
|
1168
1188
|
for (; r; ) {
|
|
1169
|
-
const
|
|
1170
|
-
if (
|
|
1189
|
+
const a = window.getComputedStyle(r);
|
|
1190
|
+
if (a.display === "none" || a.visibility === "hidden" || a.opacity === "0") return !1;
|
|
1171
1191
|
r = r.parentElement;
|
|
1172
1192
|
}
|
|
1173
1193
|
const n = e.getBoundingClientRect();
|
|
1174
1194
|
return !(n.width === 0 || n.height === 0 || n.top === 0 && n.left === 0 && n.width > window.innerWidth * 0.9);
|
|
1175
|
-
},
|
|
1195
|
+
}, kt = (e, t = document) => {
|
|
1176
1196
|
const r = t.querySelector(e);
|
|
1177
1197
|
if (r) return r;
|
|
1178
1198
|
const n = t.querySelectorAll("*");
|
|
1179
|
-
for (const
|
|
1180
|
-
const
|
|
1181
|
-
if (
|
|
1182
|
-
const
|
|
1183
|
-
if (
|
|
1199
|
+
for (const a of Array.from(n)) {
|
|
1200
|
+
const s = a.shadowRoot;
|
|
1201
|
+
if (s) {
|
|
1202
|
+
const o = kt(e, s);
|
|
1203
|
+
if (o) return o;
|
|
1184
1204
|
}
|
|
1185
1205
|
}
|
|
1186
1206
|
return null;
|
|
@@ -1196,38 +1216,46 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1196
1216
|
if (!e.tag) return null;
|
|
1197
1217
|
const t = document.getElementsByTagName(e.tag);
|
|
1198
1218
|
let r = null, n = 0;
|
|
1199
|
-
for (let
|
|
1200
|
-
const
|
|
1201
|
-
let
|
|
1202
|
-
const c =
|
|
1203
|
-
e.attributes?.placeholder && c === e.attributes.placeholder ?
|
|
1219
|
+
for (let a = 0; a < t.length; a++) {
|
|
1220
|
+
const s = t[a];
|
|
1221
|
+
let o = 0;
|
|
1222
|
+
const c = s.getAttribute("placeholder");
|
|
1223
|
+
e.attributes?.placeholder && c === e.attributes.placeholder ? o += 6 : c && e.attributes?.placeholder && c.includes(e.attributes.placeholder) && (o += 2), s.innerText?.trim() === e.text.trim() ? o += 5 : s.innerText?.includes(e.text.slice(0, 20)) && (o += 3), e.fingerprint?.classHash && s.className.includes(e.fingerprint.classHash) && (o += 2), e.fingerprint?.ariaLabel && s.getAttribute("aria-label") === e.fingerprint.ariaLabel && (o += 3), e.fingerprint?.role && s.getAttribute("role") === e.fingerprint.role && (o += 2), e.parentContext && (s.parentElement?.innerText || "").includes(e.parentContext.slice(0, 30)) && (o += 2), e.fingerprint?.neighborCount === s.parentElement?.children.length && (o += 1), e.fingerprint?.parentTag === s.parentElement?.tagName.toLowerCase() && (o += 1), o > n && o >= 7 && (n = o, r = s);
|
|
1204
1224
|
}
|
|
1205
1225
|
return r;
|
|
1206
1226
|
}, xn = (e, t) => {
|
|
1207
1227
|
if (t) {
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
}),
|
|
1228
|
+
const s = Array.from(document.querySelectorAll(`[${je}="${t}"]`));
|
|
1229
|
+
if (s.length > 0) {
|
|
1230
|
+
const o = s.find((u) => {
|
|
1231
|
+
const { vgPath: p } = Oe(u);
|
|
1232
|
+
return p === e.vgPath || e.fingerprint?.vgPath === p;
|
|
1233
|
+
}), c = o && te(o) ? o : s.find((u) => !(!te(u) || e.metadata?.isModal && !u.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')));
|
|
1234
|
+
return c ? (s.forEach((u) => {
|
|
1235
|
+
u !== c && u.removeAttribute(je);
|
|
1236
|
+
}), c) : null;
|
|
1214
1237
|
}
|
|
1215
1238
|
}
|
|
1216
|
-
let r =
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1239
|
+
let r = Array.from(document.querySelectorAll(e.selector || "")), n = (r.length === 1 ? r[0] : r.find((s) => {
|
|
1240
|
+
const { vgPath: o } = Oe(s);
|
|
1241
|
+
return o === e.vgPath || e.fingerprint?.vgPath === o;
|
|
1242
|
+
})) || r[0] || null;
|
|
1243
|
+
if (n && te(n))
|
|
1244
|
+
if (e.metadata?.isModal && !n.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content'))
|
|
1245
|
+
n = null;
|
|
1220
1246
|
else
|
|
1221
|
-
return
|
|
1222
|
-
if (e.fallbackSelectors)
|
|
1223
|
-
for (const
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1247
|
+
return n;
|
|
1248
|
+
if (e.fallbackSelectors)
|
|
1249
|
+
for (const s of e.fallbackSelectors) {
|
|
1250
|
+
const o = kt(s);
|
|
1251
|
+
if (o && te(o)) {
|
|
1252
|
+
if (e.metadata?.isModal && !o.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')) continue;
|
|
1253
|
+
return o;
|
|
1227
1254
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1255
|
+
}
|
|
1256
|
+
const a = gn(e);
|
|
1257
|
+
return a && te(a) ? e.metadata?.isModal && !a.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content') ? null : a : null;
|
|
1258
|
+
}, Le = (e) => ({
|
|
1231
1259
|
tag: e.tagName.toLowerCase(),
|
|
1232
1260
|
text: (e.innerText || e.getAttribute("placeholder") || "").slice(0, 50).trim(),
|
|
1233
1261
|
role: e.getAttribute("role") || void 0,
|
|
@@ -1235,193 +1263,153 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1235
1263
|
}), yn = (e) => {
|
|
1236
1264
|
const t = e.parentElement;
|
|
1237
1265
|
if (!t) return;
|
|
1238
|
-
const r = Array.from(t.children).filter((
|
|
1239
|
-
let
|
|
1240
|
-
return
|
|
1266
|
+
const r = Array.from(t.children).filter((o) => o !== e).slice(0, 5).map((o) => Le(o)), n = Array.from(t.children), a = n.indexOf(e);
|
|
1267
|
+
let s = "middle";
|
|
1268
|
+
return a === 0 && (s = "start"), a === n.length - 1 && (s = "end"), {
|
|
1241
1269
|
target: {
|
|
1242
|
-
...
|
|
1243
|
-
location: `${
|
|
1270
|
+
...Le(e),
|
|
1271
|
+
location: `${s} of ${t.tagName.toLowerCase()}`
|
|
1244
1272
|
},
|
|
1245
|
-
parent:
|
|
1273
|
+
parent: Le(t),
|
|
1246
1274
|
siblings: r
|
|
1247
1275
|
};
|
|
1248
1276
|
}, wn = (e) => {
|
|
1249
1277
|
let t = "unknown:0", r = e;
|
|
1250
1278
|
for (; r; ) {
|
|
1251
|
-
const
|
|
1252
|
-
if (
|
|
1253
|
-
t =
|
|
1279
|
+
const h = r.getAttribute("data-source-path");
|
|
1280
|
+
if (h) {
|
|
1281
|
+
t = h;
|
|
1254
1282
|
break;
|
|
1255
1283
|
}
|
|
1256
1284
|
r = r.parentElement;
|
|
1257
1285
|
}
|
|
1258
|
-
const n =
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
let b = f.nodeName.toLowerCase();
|
|
1263
|
-
a.unshift(b);
|
|
1264
|
-
const T = f.id && !f.id.startsWith("__") ? f.id : null;
|
|
1265
|
-
T && s.push(`#${T}`);
|
|
1266
|
-
const A = f.getAttribute("data-testid") || f.getAttribute("data-qa");
|
|
1267
|
-
A && s.push(`[data-testid="${A}"]`);
|
|
1268
|
-
const F = f.getAttribute("placeholder"), H = f.getAttribute("aria-label"), P = f.getAttribute("role"), W = f.getAttribute("name"), V = f.getAttribute("title");
|
|
1269
|
-
if (A) {
|
|
1270
|
-
b = `[${f.hasAttribute("data-testid") ? "data-testid" : "data-qa"}="${A}"]`, w.unshift(b);
|
|
1271
|
-
break;
|
|
1272
|
-
} else if (T) {
|
|
1273
|
-
b = "#" + T, w.unshift(b);
|
|
1274
|
-
break;
|
|
1275
|
-
} else if (F) {
|
|
1276
|
-
b = `${f.localName}[placeholder="${F}"]`, w.unshift(b);
|
|
1277
|
-
break;
|
|
1278
|
-
} else if (H) {
|
|
1279
|
-
b = `${f.localName}[aria-label="${H}"]`, w.unshift(b);
|
|
1280
|
-
break;
|
|
1281
|
-
} else if (P) {
|
|
1282
|
-
b = `${f.localName}[role="${P}"]`, w.unshift(b);
|
|
1283
|
-
break;
|
|
1284
|
-
} else if (W) {
|
|
1285
|
-
b = `${f.localName}[name="${W}"]`, w.unshift(b);
|
|
1286
|
-
break;
|
|
1287
|
-
} else if (V) {
|
|
1288
|
-
b = `${f.localName}[title="${V}"]`, w.unshift(b);
|
|
1289
|
-
break;
|
|
1290
|
-
} else {
|
|
1291
|
-
let X = f, G = 1;
|
|
1292
|
-
for (; X.previousElementSibling; )
|
|
1293
|
-
X = X.previousElementSibling, X.nodeName.toLowerCase() === f.nodeName.toLowerCase() && G++;
|
|
1294
|
-
G > 1 && (b += `:nth-of-type(${G})`);
|
|
1295
|
-
}
|
|
1296
|
-
w.unshift(b), f = f.parentElement;
|
|
1297
|
-
}
|
|
1298
|
-
return w.join(" > ");
|
|
1299
|
-
}, c = kt(e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content')), p = i(e), u = {};
|
|
1300
|
-
["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((m) => {
|
|
1301
|
-
const w = e.getAttribute(m);
|
|
1302
|
-
w && (u[m] = w);
|
|
1286
|
+
const n = fn(e), { selector: a, fallbacks: s, vgPath: o } = Oe(e), c = {};
|
|
1287
|
+
["placeholder", "aria-label", "name", "type", "alt", "title", "value", "role"].forEach((h) => {
|
|
1288
|
+
const m = e.getAttribute(h);
|
|
1289
|
+
m && (c[h] = m);
|
|
1303
1290
|
});
|
|
1304
|
-
const
|
|
1291
|
+
const u = !!e.closest('[role="dialog"], [aria-modal="true"], .modal, .modal-content'), p = `${e.tagName.toLowerCase()}-${(e.innerText || "").slice(0, 20).replace(/\s+/g, "_")}-${a.split(" > ").slice(-1)}`;
|
|
1305
1292
|
return {
|
|
1306
1293
|
tag: e.tagName.toLowerCase(),
|
|
1307
1294
|
id: e.id || "",
|
|
1308
1295
|
classes: e.className || "",
|
|
1309
1296
|
text: (e.innerText || "").slice(0, 100).trim(),
|
|
1310
|
-
selector:
|
|
1297
|
+
selector: a,
|
|
1298
|
+
vgPath: o,
|
|
1311
1299
|
outerHtml: e.outerHTML,
|
|
1312
1300
|
parentContext: (e.parentElement?.innerText || "").slice(0, 150).trim(),
|
|
1313
1301
|
componentPath: n,
|
|
1314
|
-
signature:
|
|
1302
|
+
signature: p,
|
|
1315
1303
|
source: t,
|
|
1316
|
-
attributes:
|
|
1304
|
+
attributes: c,
|
|
1317
1305
|
fallbackSelectors: [...new Set(s)].slice(0, 5),
|
|
1318
|
-
domPath:
|
|
1306
|
+
domPath: [],
|
|
1319
1307
|
viewportSize: { width: window.innerWidth, height: window.innerHeight },
|
|
1320
1308
|
uiContext: yn(e),
|
|
1321
|
-
fingerprint:
|
|
1309
|
+
fingerprint: un(e),
|
|
1322
1310
|
metadata: {
|
|
1323
1311
|
hint: `Edit ${t.split(":")[0]} at line ${t.split(":")[1] || "?"}`,
|
|
1324
|
-
computedStyles:
|
|
1312
|
+
computedStyles: mn(e),
|
|
1325
1313
|
viewportBreakpoint: dn(),
|
|
1326
1314
|
outerHtml: e.outerHTML.slice(0, 1500),
|
|
1327
1315
|
scrollPosition: { x: window.scrollX, y: window.scrollY },
|
|
1328
|
-
isModal:
|
|
1316
|
+
isModal: u
|
|
1329
1317
|
}
|
|
1330
1318
|
};
|
|
1331
1319
|
}, vn = () => {
|
|
1332
|
-
const { addToast: e, language: t, t: r, apiKey: n, baseUrl:
|
|
1320
|
+
const { addToast: e, language: t, t: r, apiKey: n, baseUrl: a, disableViewGate: s, hasActiveToasts: o } = pr(), [c, u] = E(!1), [p, h] = E(null), [m, C] = E(null), [j, T] = E(""), [$, F] = E(!1), [B, q] = E(!1), [M, Y] = E(!1), [V, _e] = E([]), [z, H] = E(null), [xe, Ue] = E(!1), [le, re] = E(!1), [ye, we] = E({}), [W, ne] = E(null), [K, de] = E(!1), [ue, ve] = E([]), [l, x] = E(() => {
|
|
1333
1321
|
if (typeof window > "u") return { top: 24, right: 24 };
|
|
1334
1322
|
const d = localStorage.getItem("vg-exit-pos");
|
|
1335
1323
|
return d ? JSON.parse(d) : { top: 24, right: 24 };
|
|
1336
|
-
}), [
|
|
1324
|
+
}), [b, S] = E(!1), _ = ge(null), [U, k] = E(() => {
|
|
1337
1325
|
if (typeof window > "u") return { bottom: 30, right: 30 };
|
|
1338
1326
|
const d = localStorage.getItem("vg-bar-pos");
|
|
1339
1327
|
return d ? JSON.parse(d) : { bottom: 30, right: 30 };
|
|
1340
|
-
}), [
|
|
1328
|
+
}), [I, ae] = E(!1), D = ge(null), jt = (d) => {
|
|
1341
1329
|
d.preventDefault(), d.stopPropagation();
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1330
|
+
const f = d.currentTarget.parentElement?.getBoundingClientRect();
|
|
1331
|
+
f && (S(!0), _.current = {
|
|
1344
1332
|
x: d.clientX,
|
|
1345
1333
|
y: d.clientY,
|
|
1346
1334
|
top: l.top,
|
|
1347
1335
|
right: l.right,
|
|
1348
|
-
width:
|
|
1349
|
-
height:
|
|
1336
|
+
width: f.width,
|
|
1337
|
+
height: f.height
|
|
1350
1338
|
});
|
|
1351
1339
|
}, Ot = (d) => {
|
|
1352
1340
|
d.preventDefault(), d.stopPropagation();
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1341
|
+
const f = d.currentTarget.parentElement?.getBoundingClientRect();
|
|
1342
|
+
f && (ae(!0), D.current = {
|
|
1355
1343
|
x: d.clientX,
|
|
1356
1344
|
y: d.clientY,
|
|
1357
|
-
bottom:
|
|
1358
|
-
right:
|
|
1359
|
-
width:
|
|
1360
|
-
height:
|
|
1345
|
+
bottom: U.bottom,
|
|
1346
|
+
right: U.right,
|
|
1347
|
+
width: f.width,
|
|
1348
|
+
height: f.height
|
|
1361
1349
|
});
|
|
1362
1350
|
};
|
|
1363
|
-
|
|
1364
|
-
if (!
|
|
1351
|
+
J(() => {
|
|
1352
|
+
if (!b && !I) return;
|
|
1365
1353
|
const d = (y) => {
|
|
1366
|
-
if (
|
|
1367
|
-
const
|
|
1368
|
-
let
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1354
|
+
if (b && _.current) {
|
|
1355
|
+
const O = y.clientX - _.current.x, R = y.clientY - _.current.y;
|
|
1356
|
+
let v = _.current.top + R, g = _.current.right - O;
|
|
1357
|
+
const w = 10;
|
|
1358
|
+
v = Math.max(w, Math.min(window.innerHeight - _.current.height - w, v)), g = Math.max(w, Math.min(window.innerWidth - _.current.width - w, g)), x({ top: v, right: g });
|
|
1371
1359
|
}
|
|
1372
|
-
if (
|
|
1373
|
-
const
|
|
1374
|
-
let
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1360
|
+
if (I && D.current) {
|
|
1361
|
+
const O = y.clientX - D.current.x, R = y.clientY - D.current.y;
|
|
1362
|
+
let v = D.current.bottom - R, g = D.current.right - O;
|
|
1363
|
+
const w = 10;
|
|
1364
|
+
v = Math.max(w, Math.min(window.innerHeight - D.current.height - w, v)), g = Math.max(w, Math.min(window.innerWidth - D.current.width - w, g)), k({ bottom: v, right: g });
|
|
1377
1365
|
}
|
|
1378
|
-
},
|
|
1379
|
-
|
|
1366
|
+
}, f = () => {
|
|
1367
|
+
b && (S(!1), localStorage.setItem("vg-exit-pos", JSON.stringify(l)), _.current = null), I && (ae(!1), localStorage.setItem("vg-bar-pos", JSON.stringify(U)), D.current = null);
|
|
1380
1368
|
};
|
|
1381
|
-
return window.addEventListener("mousemove", d), window.addEventListener("mouseup",
|
|
1382
|
-
window.removeEventListener("mousemove", d), window.removeEventListener("mouseup",
|
|
1369
|
+
return window.addEventListener("mousemove", d), window.addEventListener("mouseup", f), () => {
|
|
1370
|
+
window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", f);
|
|
1383
1371
|
};
|
|
1384
|
-
}, [
|
|
1385
|
-
const [Be,
|
|
1386
|
-
|
|
1387
|
-
const d = /* @__PURE__ */ new Map(), y = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((
|
|
1388
|
-
V.forEach((
|
|
1389
|
-
if (!
|
|
1390
|
-
const g = xn(
|
|
1391
|
-
if (!g || !
|
|
1392
|
-
const
|
|
1393
|
-
let
|
|
1394
|
-
if (
|
|
1395
|
-
g.getAttribute(
|
|
1372
|
+
}, [b, I, l, U]);
|
|
1373
|
+
const [Be, Pe] = E(null), [qe, Ye] = E(""), [bn, Cn] = E({}), se = ge(null), pe = ge(null), me = Ce(() => {
|
|
1374
|
+
pe.current || (pe.current = requestAnimationFrame(() => {
|
|
1375
|
+
const d = /* @__PURE__ */ new Map(), y = Array.from(document.querySelectorAll('[role="dialog"], [aria-modal="true"], .modal, .modal-content')).find((v) => hn(v) && te(v)), O = !!y;
|
|
1376
|
+
V.forEach((v) => {
|
|
1377
|
+
if (!v.reference) return;
|
|
1378
|
+
const g = xn(v.reference, v._id);
|
|
1379
|
+
if (!g || !te(g)) return;
|
|
1380
|
+
const w = !!v.reference.metadata?.isModal;
|
|
1381
|
+
let L = !1;
|
|
1382
|
+
if (O ? L = y.contains(g) : L = !w, !L) return;
|
|
1383
|
+
g.getAttribute(je) || g.setAttribute(je, v._id), d.has(g) || d.set(g, []), d.get(g).push(v);
|
|
1396
1384
|
});
|
|
1397
|
-
const
|
|
1398
|
-
d.forEach((
|
|
1399
|
-
const
|
|
1400
|
-
if (
|
|
1401
|
-
const
|
|
1402
|
-
if (
|
|
1385
|
+
const R = [];
|
|
1386
|
+
d.forEach((v, g) => {
|
|
1387
|
+
const w = g.getBoundingClientRect(), L = w.left + w.width / 2, P = w.top + w.height / 2;
|
|
1388
|
+
if (L >= 0 && L <= window.innerWidth && P >= 0 && P <= window.innerHeight) {
|
|
1389
|
+
const X = document.elementFromPoint(L, P);
|
|
1390
|
+
if (X && !g.contains(X) && !se.current?.contains(X))
|
|
1403
1391
|
return;
|
|
1404
1392
|
}
|
|
1405
|
-
|
|
1406
|
-
id:
|
|
1393
|
+
R.push({
|
|
1394
|
+
id: v[0]._id,
|
|
1407
1395
|
// Group identified by its primary annotation
|
|
1408
1396
|
element: g,
|
|
1409
|
-
rect:
|
|
1410
|
-
annotations:
|
|
1411
|
-
isModal: !!
|
|
1397
|
+
rect: w,
|
|
1398
|
+
annotations: v.sort((X, ee) => new Date(ee.timestamp || ee.createdAt).getTime() - new Date(X.timestamp || X.createdAt).getTime()),
|
|
1399
|
+
isModal: !!v[0].reference?.metadata?.isModal
|
|
1412
1400
|
});
|
|
1413
|
-
}),
|
|
1401
|
+
}), ve(R), pe.current = null;
|
|
1414
1402
|
}));
|
|
1415
|
-
}, [V]),
|
|
1403
|
+
}, [V]), Q = Ce(async () => {
|
|
1416
1404
|
if (n) {
|
|
1417
1405
|
re(!0);
|
|
1418
1406
|
try {
|
|
1419
|
-
const d = await fetch(`${
|
|
1407
|
+
const d = await fetch(`${a}/api/annotations`, {
|
|
1420
1408
|
headers: { "x-api-key": n }
|
|
1421
1409
|
});
|
|
1422
1410
|
if (d.ok) {
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1411
|
+
const O = ((await d.json()).data || []).reduce((R, v) => R.find((w) => w._id === v._id) ? R : R.concat([v]), []);
|
|
1412
|
+
_e(O);
|
|
1425
1413
|
}
|
|
1426
1414
|
} catch (d) {
|
|
1427
1415
|
console.error("Failed to fetch annotations", d);
|
|
@@ -1429,142 +1417,142 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1429
1417
|
re(!1);
|
|
1430
1418
|
}
|
|
1431
1419
|
}
|
|
1432
|
-
}, [n,
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
}, [
|
|
1420
|
+
}, [n, a]);
|
|
1421
|
+
J(() => {
|
|
1422
|
+
M && V.length === 0 && !le && Y(!1);
|
|
1423
|
+
}, [M, V.length, le]), J(() => {
|
|
1436
1424
|
if (!c && V.length > 0) {
|
|
1437
|
-
|
|
1438
|
-
const d = new MutationObserver(() =>
|
|
1425
|
+
me();
|
|
1426
|
+
const d = new MutationObserver(() => me()), f = new ResizeObserver(() => me()), y = () => me();
|
|
1439
1427
|
return d.observe(document.documentElement, {
|
|
1440
1428
|
childList: !0,
|
|
1441
1429
|
subtree: !0,
|
|
1442
1430
|
attributes: !0
|
|
1443
|
-
}),
|
|
1444
|
-
d.disconnect(),
|
|
1431
|
+
}), f.observe(document.documentElement), window.addEventListener("scroll", y, !0), () => {
|
|
1432
|
+
d.disconnect(), f.disconnect(), window.removeEventListener("scroll", y, !0), pe.current && cancelAnimationFrame(pe.current);
|
|
1445
1433
|
};
|
|
1446
1434
|
}
|
|
1447
|
-
}, [c, V.length,
|
|
1448
|
-
|
|
1449
|
-
}, [
|
|
1435
|
+
}, [c, V.length, me]), J(() => {
|
|
1436
|
+
Q();
|
|
1437
|
+
}, [Q]), J(() => {
|
|
1450
1438
|
se.current = document.getElementById("viewgate-shadow-host");
|
|
1451
1439
|
}, []);
|
|
1452
|
-
const Ae =
|
|
1440
|
+
const Ae = Ce((d) => {
|
|
1453
1441
|
if (!c || m) return;
|
|
1454
|
-
const
|
|
1455
|
-
if (!
|
|
1456
|
-
|
|
1442
|
+
const f = pt(d.clientX, d.clientY);
|
|
1443
|
+
if (!f || se.current?.contains(f) || f.closest(".vg-no-capture")) {
|
|
1444
|
+
h(null);
|
|
1457
1445
|
return;
|
|
1458
1446
|
}
|
|
1459
|
-
const y =
|
|
1460
|
-
|
|
1461
|
-
tag:
|
|
1462
|
-
source:
|
|
1447
|
+
const y = f.getBoundingClientRect();
|
|
1448
|
+
h({
|
|
1449
|
+
tag: f.tagName.toLowerCase(),
|
|
1450
|
+
source: f.getAttribute("data-source-path") || "unknown:0",
|
|
1463
1451
|
rect: y,
|
|
1464
|
-
element:
|
|
1465
|
-
previewText: (
|
|
1452
|
+
element: f,
|
|
1453
|
+
previewText: (f.innerText || "").slice(0, 100) || (f.getAttribute("placeholder") || "").slice(0, 100) || f.tagName.toLowerCase(),
|
|
1466
1454
|
semanticReference: {
|
|
1467
|
-
...wn(
|
|
1455
|
+
...wn(f),
|
|
1468
1456
|
normalizedOffset: {
|
|
1469
1457
|
x: (d.clientX - y.left) / y.width,
|
|
1470
1458
|
y: (d.clientY - y.top) / y.height
|
|
1471
1459
|
}
|
|
1472
1460
|
}
|
|
1473
1461
|
});
|
|
1474
|
-
}, [c, m]),
|
|
1462
|
+
}, [c, m]), Ge = Ce(async (d) => {
|
|
1475
1463
|
if (!c || m) return;
|
|
1476
|
-
const
|
|
1477
|
-
if (!(!
|
|
1478
|
-
d.preventDefault(), d.stopPropagation(),
|
|
1464
|
+
const f = pt(d.clientX, d.clientY);
|
|
1465
|
+
if (!(!f || se.current?.contains(f) || f.closest(".vg-no-capture")) && p) {
|
|
1466
|
+
d.preventDefault(), d.stopPropagation(), q(!0);
|
|
1479
1467
|
try {
|
|
1480
|
-
const
|
|
1468
|
+
const R = window.scrollX, v = window.scrollY, g = await lt(document.documentElement, {
|
|
1481
1469
|
pixelRatio: 1.5,
|
|
1482
1470
|
cacheBust: !0,
|
|
1483
1471
|
width: window.innerWidth,
|
|
1484
1472
|
height: window.innerHeight,
|
|
1485
1473
|
backgroundColor: "#ffffff",
|
|
1486
1474
|
style: {
|
|
1487
|
-
transform: `scale(${1 / window.devicePixelRatio}) translate(-${
|
|
1475
|
+
transform: `scale(${1 / window.devicePixelRatio}) translate(-${R}px, -${v}px)`,
|
|
1488
1476
|
transformOrigin: "top left"
|
|
1489
1477
|
},
|
|
1490
|
-
filter: (
|
|
1491
|
-
const
|
|
1492
|
-
return !(se.current?.contains(
|
|
1478
|
+
filter: (ee) => {
|
|
1479
|
+
const be = ee;
|
|
1480
|
+
return !(se.current?.contains(be) || be.id === "viewgate-ui");
|
|
1493
1481
|
}
|
|
1494
|
-
}),
|
|
1495
|
-
let
|
|
1496
|
-
if (
|
|
1497
|
-
|
|
1482
|
+
}), w = p.element.getBoundingClientRect(), L = w.top >= 0 && w.left >= 0 && w.bottom <= window.innerHeight && w.right <= window.innerWidth;
|
|
1483
|
+
let P = "";
|
|
1484
|
+
if (L && w.width > 0 && w.height > 0)
|
|
1485
|
+
P = await ut(g, w, 24, 1.5);
|
|
1498
1486
|
else
|
|
1499
1487
|
try {
|
|
1500
|
-
|
|
1488
|
+
P = await lt(p.element, {
|
|
1501
1489
|
pixelRatio: 2,
|
|
1502
1490
|
cacheBust: !0,
|
|
1503
1491
|
backgroundColor: "#ffffff",
|
|
1504
|
-
filter: (
|
|
1505
|
-
const
|
|
1506
|
-
return !se.current?.contains(
|
|
1492
|
+
filter: (ee) => {
|
|
1493
|
+
const be = ee;
|
|
1494
|
+
return !se.current?.contains(be);
|
|
1507
1495
|
}
|
|
1508
1496
|
});
|
|
1509
1497
|
} catch {
|
|
1510
|
-
|
|
1498
|
+
P = await ut(g, w, 24, 1.5);
|
|
1511
1499
|
}
|
|
1512
|
-
const
|
|
1513
|
-
...
|
|
1500
|
+
const X = {
|
|
1501
|
+
...p.semanticReference,
|
|
1514
1502
|
metadata: {
|
|
1515
|
-
...
|
|
1503
|
+
...p.semanticReference.metadata,
|
|
1516
1504
|
screenshotUrl: g,
|
|
1517
|
-
elementScreenshot:
|
|
1505
|
+
elementScreenshot: P
|
|
1518
1506
|
}
|
|
1519
1507
|
};
|
|
1520
|
-
|
|
1521
|
-
...
|
|
1522
|
-
visualPreview:
|
|
1523
|
-
semanticReference:
|
|
1508
|
+
C({
|
|
1509
|
+
...p,
|
|
1510
|
+
visualPreview: P,
|
|
1511
|
+
semanticReference: X
|
|
1524
1512
|
});
|
|
1525
1513
|
} catch (y) {
|
|
1526
|
-
console.error("Failed to capture preview:", y),
|
|
1514
|
+
console.error("Failed to capture preview:", y), C(p);
|
|
1527
1515
|
} finally {
|
|
1528
|
-
|
|
1516
|
+
q(!1), h(null);
|
|
1529
1517
|
}
|
|
1530
1518
|
}
|
|
1531
|
-
}, [c,
|
|
1532
|
-
|
|
1533
|
-
const d = (
|
|
1534
|
-
if (
|
|
1535
|
-
m ?
|
|
1519
|
+
}, [c, p, m]);
|
|
1520
|
+
J(() => {
|
|
1521
|
+
const d = (f) => {
|
|
1522
|
+
if (f.key === "Escape") {
|
|
1523
|
+
m ? C(null) : M ? Y(!1) : c && u(!1);
|
|
1536
1524
|
return;
|
|
1537
1525
|
}
|
|
1538
|
-
const
|
|
1526
|
+
const O = (() => {
|
|
1539
1527
|
let g = document.activeElement;
|
|
1540
1528
|
for (; g && g.shadowRoot && g.shadowRoot.activeElement; )
|
|
1541
1529
|
g = g.shadowRoot.activeElement;
|
|
1542
1530
|
return g;
|
|
1543
1531
|
})();
|
|
1544
|
-
if (["input", "textarea"].includes((
|
|
1545
|
-
const
|
|
1546
|
-
|
|
1532
|
+
if (["input", "textarea"].includes((O?.tagName || "").toLowerCase()) || O?.isContentEditable) return;
|
|
1533
|
+
const v = f.key.toLowerCase();
|
|
1534
|
+
v === "c" && !m && !M && u((g) => !g), v === "v" && !m && (V.length > 0 || M) && (Y((g) => !g), M || u(!1));
|
|
1547
1535
|
};
|
|
1548
|
-
return c && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", Ae, !0), window.addEventListener("click",
|
|
1549
|
-
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", Ae, !0), window.removeEventListener("click",
|
|
1536
|
+
return c && !m ? document.body.classList.add("vg-cursor-pointer") : document.body.classList.remove("vg-cursor-pointer"), window.addEventListener("keydown", d), window.addEventListener("mousemove", Ae, !0), window.addEventListener("click", Ge, !0), () => {
|
|
1537
|
+
document.body.classList.remove("vg-cursor-pointer"), window.removeEventListener("keydown", d), window.removeEventListener("mousemove", Ae, !0), window.removeEventListener("click", Ge, !0);
|
|
1550
1538
|
};
|
|
1551
|
-
}, [c, m,
|
|
1539
|
+
}, [c, m, M, V, Ae, Ge]);
|
|
1552
1540
|
const Tt = async () => {
|
|
1553
|
-
if (!m || !
|
|
1554
|
-
|
|
1555
|
-
const { semanticReference: d } = m, [
|
|
1541
|
+
if (!m || !j.trim()) return;
|
|
1542
|
+
F(!0);
|
|
1543
|
+
const { semanticReference: d } = m, [f, y] = (d.source || "").split(":"), O = y || "0";
|
|
1556
1544
|
try {
|
|
1557
|
-
if (!(await fetch(`${
|
|
1545
|
+
if (!(await fetch(`${a}/api/annotations`, {
|
|
1558
1546
|
method: "POST",
|
|
1559
1547
|
headers: {
|
|
1560
1548
|
"Content-Type": "application/json",
|
|
1561
1549
|
"x-api-key": n
|
|
1562
1550
|
},
|
|
1563
1551
|
body: JSON.stringify({
|
|
1564
|
-
filePath:
|
|
1565
|
-
line: parseInt(
|
|
1552
|
+
filePath: f,
|
|
1553
|
+
line: parseInt(O),
|
|
1566
1554
|
url: window.location.href,
|
|
1567
|
-
message:
|
|
1555
|
+
message: j,
|
|
1568
1556
|
componentName: d.componentPath || m.tag,
|
|
1569
1557
|
reference: {
|
|
1570
1558
|
...d,
|
|
@@ -1577,29 +1565,29 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1577
1565
|
}
|
|
1578
1566
|
})
|
|
1579
1567
|
})).ok) throw new Error("Backend failed");
|
|
1580
|
-
e(r.success, "success"),
|
|
1581
|
-
} catch (
|
|
1582
|
-
console.error(
|
|
1568
|
+
e(r.success, "success"), C(null), T(""), u(!1), Q();
|
|
1569
|
+
} catch (R) {
|
|
1570
|
+
console.error(R), e(r.error, "error");
|
|
1583
1571
|
} finally {
|
|
1584
|
-
|
|
1572
|
+
F(!1);
|
|
1585
1573
|
}
|
|
1586
1574
|
};
|
|
1587
|
-
return /* @__PURE__ */
|
|
1588
|
-
!
|
|
1575
|
+
return /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1066", className: "vg-container", children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1067", className: "vg-no-capture", children: [
|
|
1576
|
+
!o && /* @__PURE__ */ i.jsxs(
|
|
1589
1577
|
"div",
|
|
1590
1578
|
{
|
|
1591
1579
|
style: {
|
|
1592
1580
|
position: "fixed",
|
|
1593
1581
|
top: `${l.top}px`,
|
|
1594
1582
|
right: `${l.right}px`,
|
|
1595
|
-
zIndex:
|
|
1583
|
+
zIndex: Me + 10,
|
|
1596
1584
|
display: "flex",
|
|
1597
1585
|
alignItems: "center",
|
|
1598
1586
|
gap: "8px",
|
|
1599
|
-
transition:
|
|
1587
|
+
transition: b ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1600
1588
|
},
|
|
1601
1589
|
children: [
|
|
1602
|
-
/* @__PURE__ */
|
|
1590
|
+
/* @__PURE__ */ i.jsx(
|
|
1603
1591
|
"div",
|
|
1604
1592
|
{
|
|
1605
1593
|
onMouseDown: jt,
|
|
@@ -1626,18 +1614,18 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1626
1614
|
onMouseLeave: (d) => {
|
|
1627
1615
|
d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", d.currentTarget.style.color = "#1e293b";
|
|
1628
1616
|
},
|
|
1629
|
-
children: /* @__PURE__ */
|
|
1617
|
+
children: /* @__PURE__ */ i.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1111", size: 14 })
|
|
1630
1618
|
}
|
|
1631
1619
|
),
|
|
1632
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ i.jsx(
|
|
1633
1621
|
"button",
|
|
1634
1622
|
{
|
|
1635
1623
|
onClick: (d) => {
|
|
1636
|
-
d.stopPropagation(),
|
|
1624
|
+
d.stopPropagation(), H({
|
|
1637
1625
|
title: r.exitConfirmTitle || "Close ViewGate?",
|
|
1638
1626
|
message: r.exitConfirmMessage || "Are you sure you want to close ViewGate?",
|
|
1639
1627
|
type: "danger",
|
|
1640
|
-
onConfirm: () =>
|
|
1628
|
+
onConfirm: () => s()
|
|
1641
1629
|
});
|
|
1642
1630
|
},
|
|
1643
1631
|
title: "Cerrar ViewGate",
|
|
@@ -1662,29 +1650,29 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1662
1650
|
onMouseLeave: (d) => {
|
|
1663
1651
|
d.currentTarget.style.transform = "scale(1) rotate(0deg)", d.currentTarget.style.color = "#64748b", d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
|
|
1664
1652
|
},
|
|
1665
|
-
children: /* @__PURE__ */
|
|
1653
|
+
children: /* @__PURE__ */ i.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1151", size: 20, strokeWidth: 2.5 })
|
|
1666
1654
|
}
|
|
1667
1655
|
)
|
|
1668
1656
|
]
|
|
1669
1657
|
}
|
|
1670
1658
|
),
|
|
1671
|
-
/* @__PURE__ */
|
|
1659
|
+
/* @__PURE__ */ i.jsxs(
|
|
1672
1660
|
"div",
|
|
1673
1661
|
{
|
|
1674
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1662
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1157",
|
|
1675
1663
|
style: {
|
|
1676
1664
|
position: "fixed",
|
|
1677
|
-
bottom: `${
|
|
1678
|
-
right: `${
|
|
1679
|
-
zIndex:
|
|
1665
|
+
bottom: `${U.bottom}px`,
|
|
1666
|
+
right: `${U.right}px`,
|
|
1667
|
+
zIndex: Me,
|
|
1680
1668
|
display: "flex",
|
|
1681
1669
|
alignItems: "center",
|
|
1682
1670
|
gap: "8px",
|
|
1683
|
-
transition:
|
|
1671
|
+
transition: I ? "none" : "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
1684
1672
|
},
|
|
1685
1673
|
id: "viewgate-ui",
|
|
1686
1674
|
children: [
|
|
1687
|
-
/* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ i.jsx(
|
|
1688
1676
|
"div",
|
|
1689
1677
|
{
|
|
1690
1678
|
onMouseDown: Ot,
|
|
@@ -1712,36 +1700,36 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1712
1700
|
d.currentTarget.style.backgroundColor = "rgba(255, 255, 255, 0.85)", d.currentTarget.style.color = "#1e293b";
|
|
1713
1701
|
},
|
|
1714
1702
|
className: "vg-animate-slide-up",
|
|
1715
|
-
children: /* @__PURE__ */
|
|
1703
|
+
children: /* @__PURE__ */ i.jsx(et, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1200", size: 16 })
|
|
1716
1704
|
}
|
|
1717
1705
|
),
|
|
1718
|
-
/* @__PURE__ */
|
|
1719
|
-
/* @__PURE__ */
|
|
1706
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1203", className: "vg-action-bar vg-animate-slide-up", style: { transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)" }, children: [
|
|
1707
|
+
/* @__PURE__ */ i.jsx(
|
|
1720
1708
|
"button",
|
|
1721
1709
|
{
|
|
1722
|
-
onClick: () =>
|
|
1710
|
+
onClick: () => u(!c),
|
|
1723
1711
|
className: "vg-button-primary vg-animate-pop",
|
|
1724
1712
|
style: {
|
|
1725
1713
|
padding: "12px 24px",
|
|
1726
1714
|
background: c ? "#ef4444" : void 0
|
|
1727
1715
|
},
|
|
1728
|
-
children: /* @__PURE__ */
|
|
1729
|
-
c ? /* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1716
|
+
children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1212", style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
1717
|
+
c ? /* @__PURE__ */ i.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1213", size: 20, className: "vg-animate-pop" }) : /* @__PURE__ */ i.jsx(Se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1213", size: 20, className: "vg-animate-pop" }),
|
|
1718
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1214", children: c ? r.exitMode : r.enterMode })
|
|
1731
1719
|
] })
|
|
1732
1720
|
}
|
|
1733
1721
|
),
|
|
1734
|
-
V.length > 0 && /* @__PURE__ */
|
|
1722
|
+
V.length > 0 && /* @__PURE__ */ i.jsxs(
|
|
1735
1723
|
"button",
|
|
1736
1724
|
{
|
|
1737
1725
|
onClick: () => {
|
|
1738
|
-
|
|
1726
|
+
Y(!M), u(!1), C(null);
|
|
1739
1727
|
},
|
|
1740
1728
|
className: "vg-button-ghost vg-animate-pop",
|
|
1741
1729
|
style: { animationDelay: "0.1s" },
|
|
1742
1730
|
children: [
|
|
1743
|
-
/* @__PURE__ */
|
|
1744
|
-
/* @__PURE__ */
|
|
1731
|
+
/* @__PURE__ */ i.jsx(Jt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1227", size: 20 }),
|
|
1732
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1228", children: r.viewComments })
|
|
1745
1733
|
]
|
|
1746
1734
|
}
|
|
1747
1735
|
)
|
|
@@ -1749,7 +1737,7 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1749
1737
|
]
|
|
1750
1738
|
}
|
|
1751
1739
|
),
|
|
1752
|
-
|
|
1740
|
+
B && /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1236", style: {
|
|
1753
1741
|
position: "fixed",
|
|
1754
1742
|
top: 0,
|
|
1755
1743
|
left: 0,
|
|
@@ -1760,60 +1748,60 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1760
1748
|
display: "flex",
|
|
1761
1749
|
alignItems: "center",
|
|
1762
1750
|
justifyContent: "center",
|
|
1763
|
-
zIndex:
|
|
1751
|
+
zIndex: Me + 1,
|
|
1764
1752
|
cursor: "wait"
|
|
1765
|
-
}, children: /* @__PURE__ */
|
|
1766
|
-
/* @__PURE__ */
|
|
1767
|
-
/* @__PURE__ */
|
|
1753
|
+
}, children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1242", className: "vg-glassmorphism", style: { padding: "30px 50px", display: "flex", flexDirection: "column", alignItems: "center", gap: "16px" }, children: [
|
|
1754
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1243", className: "vg-spinner" }),
|
|
1755
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1244", style: { fontWeight: 600, fontSize: "14px", color: "#000000" }, children: "Capturando..." })
|
|
1768
1756
|
] }) }),
|
|
1769
|
-
c && !m && /* @__PURE__ */
|
|
1757
|
+
c && !m && /* @__PURE__ */ i.jsx(
|
|
1770
1758
|
"div",
|
|
1771
1759
|
{
|
|
1772
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1760
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1251",
|
|
1773
1761
|
className: "vg-backdrop-blur",
|
|
1774
1762
|
style: {
|
|
1775
1763
|
opacity: 1,
|
|
1776
|
-
clipPath:
|
|
1764
|
+
clipPath: p ? `polygon(
|
|
1777
1765
|
0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
|
|
1778
|
-
${
|
|
1779
|
-
${
|
|
1780
|
-
${
|
|
1781
|
-
${
|
|
1782
|
-
${
|
|
1766
|
+
${p.rect.left}px ${p.rect.top}px,
|
|
1767
|
+
${p.rect.right}px ${p.rect.top}px,
|
|
1768
|
+
${p.rect.right}px ${p.rect.bottom}px,
|
|
1769
|
+
${p.rect.left}px ${p.rect.bottom}px,
|
|
1770
|
+
${p.rect.left}px ${p.rect.top}px
|
|
1783
1771
|
)` : "none",
|
|
1784
1772
|
zIndex: on
|
|
1785
1773
|
}
|
|
1786
1774
|
}
|
|
1787
1775
|
),
|
|
1788
|
-
c &&
|
|
1776
|
+
c && p && !m && !B && /* @__PURE__ */ i.jsx(
|
|
1789
1777
|
"div",
|
|
1790
1778
|
{
|
|
1791
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1779
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1270",
|
|
1792
1780
|
className: "vg-selection-pulse",
|
|
1793
1781
|
style: {
|
|
1794
|
-
top:
|
|
1795
|
-
left:
|
|
1796
|
-
width:
|
|
1797
|
-
height:
|
|
1782
|
+
top: p.rect.top - 4,
|
|
1783
|
+
left: p.rect.left - 4,
|
|
1784
|
+
width: p.rect.width + 8,
|
|
1785
|
+
height: p.rect.height + 8,
|
|
1798
1786
|
zIndex: cn
|
|
1799
1787
|
},
|
|
1800
|
-
children: /* @__PURE__ */
|
|
1788
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
1801
1789
|
"div",
|
|
1802
1790
|
{
|
|
1803
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1791
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1280",
|
|
1804
1792
|
className: "vg-selection-label",
|
|
1805
1793
|
style: {
|
|
1806
|
-
...
|
|
1807
|
-
...
|
|
1794
|
+
...p.rect.top < 60 ? p.rect.bottom > window.innerHeight - 60 ? { top: "8px", bottom: "auto" } : { top: "100%", marginTop: "8px", bottom: "auto" } : { top: "-40px", bottom: "auto" },
|
|
1795
|
+
...p.rect.left + 200 > window.innerWidth ? { left: "auto", right: "0" } : { left: "0", right: "auto" }
|
|
1808
1796
|
},
|
|
1809
1797
|
children: [
|
|
1810
|
-
/* @__PURE__ */
|
|
1811
|
-
/* @__PURE__ */
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
1814
|
-
Math.round(
|
|
1798
|
+
/* @__PURE__ */ i.jsx(rr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1296", size: 16 }),
|
|
1799
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1297", style: { display: "flex", flexDirection: "column" }, children: [
|
|
1800
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1298", style: { fontWeight: 700 }, children: r.selectToComment }),
|
|
1801
|
+
/* @__PURE__ */ i.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1299", style: { fontSize: "10px", opacity: 0.8, fontFamily: "monospace" }, children: [
|
|
1802
|
+
Math.round(p.rect.width),
|
|
1815
1803
|
" × ",
|
|
1816
|
-
Math.round(
|
|
1804
|
+
Math.round(p.rect.height)
|
|
1817
1805
|
] })
|
|
1818
1806
|
] })
|
|
1819
1807
|
]
|
|
@@ -1821,7 +1809,7 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1821
1809
|
)
|
|
1822
1810
|
}
|
|
1823
1811
|
),
|
|
1824
|
-
m && /* @__PURE__ */
|
|
1812
|
+
m && /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1309", className: "vg-animate-fade", style: {
|
|
1825
1813
|
position: "fixed",
|
|
1826
1814
|
top: 0,
|
|
1827
1815
|
left: 0,
|
|
@@ -1832,14 +1820,14 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1832
1820
|
display: "flex",
|
|
1833
1821
|
alignItems: "center",
|
|
1834
1822
|
justifyContent: "center",
|
|
1835
|
-
zIndex:
|
|
1836
|
-
}, children: /* @__PURE__ */
|
|
1823
|
+
zIndex: Ie
|
|
1824
|
+
}, children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1314", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1837
1825
|
padding: "40px",
|
|
1838
1826
|
width: "500px",
|
|
1839
1827
|
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
1840
1828
|
}, children: [
|
|
1841
|
-
/* @__PURE__ */
|
|
1842
|
-
/* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1318", style: { textAlign: "center", marginBottom: "32px" }, children: [
|
|
1830
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1319", style: {
|
|
1843
1831
|
width: "48px",
|
|
1844
1832
|
height: "48px",
|
|
1845
1833
|
background: "var(--vg-primary-gradient)",
|
|
@@ -1850,11 +1838,11 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1850
1838
|
margin: "0 auto 16px",
|
|
1851
1839
|
color: "white",
|
|
1852
1840
|
boxShadow: "0 8px 16px rgba(99, 102, 241, 0.3)"
|
|
1853
|
-
}, children: /* @__PURE__ */
|
|
1854
|
-
/* @__PURE__ */
|
|
1855
|
-
/* @__PURE__ */
|
|
1841
|
+
}, children: /* @__PURE__ */ i.jsx(Se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1324", size: 24 }) }),
|
|
1842
|
+
/* @__PURE__ */ i.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1326", style: { margin: "0 0 8px 0", fontSize: "24px", fontWeight: 800, color: "#0f172a" }, children: r.feedbackHeader }),
|
|
1843
|
+
/* @__PURE__ */ i.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1327", style: { margin: 0, color: "#000000", fontSize: "15px" }, children: r.feedbackSubheader })
|
|
1856
1844
|
] }),
|
|
1857
|
-
m.visualPreview && /* @__PURE__ */
|
|
1845
|
+
m.visualPreview && /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1331", style: {
|
|
1858
1846
|
marginBottom: "24px",
|
|
1859
1847
|
borderRadius: "12px",
|
|
1860
1848
|
overflow: "hidden",
|
|
@@ -1862,7 +1850,7 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1862
1850
|
background: "#f8fafc",
|
|
1863
1851
|
width: "fit-content",
|
|
1864
1852
|
margin: "0 auto 24px auto"
|
|
1865
|
-
}, children: /* @__PURE__ */
|
|
1853
|
+
}, children: /* @__PURE__ */ i.jsx(
|
|
1866
1854
|
"img",
|
|
1867
1855
|
{
|
|
1868
1856
|
src: m.visualPreview,
|
|
@@ -1870,45 +1858,45 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1870
1858
|
style: { maxWidth: "100%", maxHeight: "200px", objectFit: "contain", display: "block" }
|
|
1871
1859
|
}
|
|
1872
1860
|
) }),
|
|
1873
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ i.jsx(
|
|
1874
1862
|
"textarea",
|
|
1875
1863
|
{
|
|
1876
1864
|
className: "vg-textarea",
|
|
1877
|
-
value:
|
|
1878
|
-
onChange: (d) =>
|
|
1865
|
+
value: j,
|
|
1866
|
+
onChange: (d) => T(d.target.value),
|
|
1879
1867
|
rows: 4,
|
|
1880
1868
|
placeholder: r.placeholder,
|
|
1881
1869
|
autoFocus: !0,
|
|
1882
1870
|
style: { fontSize: "15px", padding: "16px", marginBottom: "24px" }
|
|
1883
1871
|
}
|
|
1884
1872
|
),
|
|
1885
|
-
/* @__PURE__ */
|
|
1886
|
-
/* @__PURE__ */
|
|
1873
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1358", style: { display: "flex", gap: "12px" }, children: [
|
|
1874
|
+
/* @__PURE__ */ i.jsx(
|
|
1887
1875
|
"button",
|
|
1888
1876
|
{
|
|
1889
|
-
onClick: () =>
|
|
1877
|
+
onClick: () => !$ && C(null),
|
|
1890
1878
|
className: "vg-button-ghost",
|
|
1891
|
-
disabled:
|
|
1879
|
+
disabled: $,
|
|
1892
1880
|
style: { flex: 1, padding: "12px" },
|
|
1893
1881
|
children: r.cancel
|
|
1894
1882
|
}
|
|
1895
1883
|
),
|
|
1896
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ i.jsx(
|
|
1897
1885
|
"button",
|
|
1898
1886
|
{
|
|
1899
1887
|
onClick: Tt,
|
|
1900
1888
|
className: "vg-button-primary",
|
|
1901
|
-
disabled:
|
|
1889
|
+
disabled: $ || !j.trim(),
|
|
1902
1890
|
style: { flex: 2 },
|
|
1903
|
-
children: /* @__PURE__ */
|
|
1904
|
-
|
|
1905
|
-
/* @__PURE__ */
|
|
1891
|
+
children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1373", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1892
|
+
$ ? /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1374", className: "vg-spinner", style: { width: "16px", height: "16px", borderWidth: "2px" } }) : /* @__PURE__ */ i.jsx(cr, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1374", size: 18 }),
|
|
1893
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1375", children: $ ? r.submitting : r.sendFeedback || "Send Comment" })
|
|
1906
1894
|
] })
|
|
1907
1895
|
}
|
|
1908
1896
|
)
|
|
1909
1897
|
] })
|
|
1910
1898
|
] }) }),
|
|
1911
|
-
|
|
1899
|
+
M && /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1385", className: "vg-animate-fade", style: {
|
|
1912
1900
|
position: "fixed",
|
|
1913
1901
|
top: 0,
|
|
1914
1902
|
left: 0,
|
|
@@ -1919,74 +1907,74 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1919
1907
|
display: "flex",
|
|
1920
1908
|
alignItems: "center",
|
|
1921
1909
|
justifyContent: "center",
|
|
1922
|
-
zIndex:
|
|
1923
|
-
}, children: /* @__PURE__ */
|
|
1910
|
+
zIndex: Ie
|
|
1911
|
+
}, children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1390", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1924
1912
|
padding: "32px",
|
|
1925
1913
|
width: "650px",
|
|
1926
1914
|
maxHeight: "85vh",
|
|
1927
1915
|
display: "flex",
|
|
1928
1916
|
flexDirection: "column"
|
|
1929
1917
|
}, children: [
|
|
1930
|
-
/* @__PURE__ */
|
|
1931
|
-
/* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
!
|
|
1918
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1394", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "20px" }, children: [
|
|
1919
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1395", style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
1920
|
+
/* @__PURE__ */ i.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1396", style: { margin: 0, fontSize: "20px", fontWeight: 800, color: "#0f172a" }, children: W ? r.commentDetails : r.annotations }),
|
|
1921
|
+
!W && /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1400", className: "vg-badge", style: { background: "#e0e7ff", color: "#6366f1" }, children: V.length })
|
|
1934
1922
|
] }),
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
|
|
1923
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1405", style: { display: "flex", gap: "8px" }, children: [
|
|
1924
|
+
W && /* @__PURE__ */ i.jsx(
|
|
1937
1925
|
"button",
|
|
1938
1926
|
{
|
|
1939
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1927
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1407",
|
|
1940
1928
|
className: "vg-button-ghost",
|
|
1941
1929
|
style: { padding: "6px 14px", fontSize: "12px" },
|
|
1942
1930
|
onClick: () => ne(null),
|
|
1943
1931
|
children: r.viewAll || "View All"
|
|
1944
1932
|
}
|
|
1945
1933
|
),
|
|
1946
|
-
/* @__PURE__ */
|
|
1934
|
+
/* @__PURE__ */ i.jsx(
|
|
1947
1935
|
"button",
|
|
1948
1936
|
{
|
|
1949
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1937
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1415",
|
|
1950
1938
|
className: "vg-button-ghost",
|
|
1951
1939
|
style: { padding: "8px", borderRadius: "50%" },
|
|
1952
1940
|
onClick: () => {
|
|
1953
|
-
|
|
1941
|
+
Y(!1), ne(null);
|
|
1954
1942
|
},
|
|
1955
|
-
children: /* @__PURE__ */
|
|
1943
|
+
children: /* @__PURE__ */ i.jsx($e, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1420", size: 20 })
|
|
1956
1944
|
}
|
|
1957
1945
|
)
|
|
1958
1946
|
] })
|
|
1959
1947
|
] }),
|
|
1960
|
-
/* @__PURE__ */
|
|
1961
|
-
if (!
|
|
1962
|
-
const d =
|
|
1963
|
-
return d ? d.annotations : V.filter((
|
|
1964
|
-
})().map((d,
|
|
1948
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1425", style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "10px" }, className: "vg-custom-scrollbar", children: le ? /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1427", style: { display: "flex", justifyContent: "center", padding: "40px" }, children: /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1428", className: "vg-spinner" }) }) : (() => {
|
|
1949
|
+
if (!W) return V;
|
|
1950
|
+
const d = ue.find((f) => f.annotations.some((y) => y._id === W));
|
|
1951
|
+
return d ? d.annotations : V.filter((f) => f._id === W);
|
|
1952
|
+
})().map((d, f) => /* @__PURE__ */ i.jsxs(
|
|
1965
1953
|
"div",
|
|
1966
1954
|
{
|
|
1967
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1955
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1437",
|
|
1968
1956
|
className: "vg-glassmorphism vg-animate-slide",
|
|
1969
1957
|
style: {
|
|
1970
1958
|
padding: "20px",
|
|
1971
1959
|
marginBottom: "16px",
|
|
1972
1960
|
border: "1px solid rgba(0,0,0,0.05)",
|
|
1973
1961
|
background: "rgba(255,255,255,0.5)",
|
|
1974
|
-
animationDelay: `${
|
|
1962
|
+
animationDelay: `${f * 0.05}s`
|
|
1975
1963
|
},
|
|
1976
1964
|
children: [
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
d.status === "ready_for_review" ? /* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
1965
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1448", style: { display: "flex", justifyContent: "space-between", marginBottom: "16px", alignItems: "center" }, children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1449", style: { display: "flex", gap: "12px", alignItems: "center" }, children: [
|
|
1966
|
+
d.status === "ready_for_review" ? /* @__PURE__ */ i.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1451", className: "vg-badge", style: { backgroundColor: "#f0fdf4", color: "#16a34a" }, children: [
|
|
1967
|
+
/* @__PURE__ */ i.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1452", size: 14 }),
|
|
1980
1968
|
" ",
|
|
1981
1969
|
r.readyForReview
|
|
1982
|
-
] }) : /* @__PURE__ */
|
|
1983
|
-
/* @__PURE__ */
|
|
1970
|
+
] }) : /* @__PURE__ */ i.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1455", className: "vg-badge", style: { backgroundColor: "#fff7ed", color: "#ea580c" }, children: [
|
|
1971
|
+
/* @__PURE__ */ i.jsx(qt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1456", size: 14 }),
|
|
1984
1972
|
" ",
|
|
1985
1973
|
r.pending
|
|
1986
1974
|
] }),
|
|
1987
|
-
/* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1459", style: { fontSize: "12px", color: "#000000" }, children: dt(d.timestamp || d.createdAt || d.reference?.timestamp, t) })
|
|
1988
1976
|
] }) }),
|
|
1989
|
-
Be === d._id ? /* @__PURE__ */
|
|
1977
|
+
Be === d._id ? /* @__PURE__ */ i.jsx(
|
|
1990
1978
|
"textarea",
|
|
1991
1979
|
{
|
|
1992
1980
|
className: "vg-textarea",
|
|
@@ -1996,21 +1984,21 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
1996
1984
|
autoFocus: !0,
|
|
1997
1985
|
style: { marginBottom: "16px" }
|
|
1998
1986
|
}
|
|
1999
|
-
) : /* @__PURE__ */
|
|
2000
|
-
/* @__PURE__ */
|
|
2001
|
-
/* @__PURE__ */
|
|
1987
|
+
) : /* @__PURE__ */ i.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1475", style: { margin: "0 0 20px 0", fontSize: "16px", color: "#1e293b", lineHeight: 1.6 }, children: d.message }),
|
|
1988
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1478", style: { display: "flex", gap: "12px", justifyContent: "flex-end", borderTop: "1px solid #f1f5f9", paddingTop: "16px" }, children: Be === d._id ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1989
|
+
/* @__PURE__ */ i.jsx(
|
|
2002
1990
|
"button",
|
|
2003
1991
|
{
|
|
2004
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1992
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1481",
|
|
2005
1993
|
className: "vg-button-primary vg-animate-pop",
|
|
2006
1994
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
2007
1995
|
onClick: async () => {
|
|
2008
1996
|
try {
|
|
2009
|
-
(await fetch(`${
|
|
1997
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
2010
1998
|
method: "PATCH",
|
|
2011
1999
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2012
2000
|
body: JSON.stringify({ message: qe })
|
|
2013
|
-
})).ok && (
|
|
2001
|
+
})).ok && (Pe(null), Q(), e(r.updateSuccess, "success"));
|
|
2014
2002
|
} catch {
|
|
2015
2003
|
e(r.error, "error");
|
|
2016
2004
|
}
|
|
@@ -2018,132 +2006,132 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
2018
2006
|
children: r.save
|
|
2019
2007
|
}
|
|
2020
2008
|
),
|
|
2021
|
-
/* @__PURE__ */
|
|
2022
|
-
] }) : /* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ i.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1503", className: "vg-button-ghost vg-animate-pop", style: { padding: "8px 16px", fontSize: "13px" }, onClick: () => Pe(null), children: r.cancel })
|
|
2010
|
+
] }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
2011
|
+
/* @__PURE__ */ i.jsxs(
|
|
2024
2012
|
"button",
|
|
2025
2013
|
{
|
|
2026
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2014
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1507",
|
|
2027
2015
|
className: "vg-button-ghost vg-animate-pop",
|
|
2028
2016
|
style: { padding: "8px 16px", fontSize: "13px" },
|
|
2029
2017
|
onClick: () => {
|
|
2030
|
-
|
|
2018
|
+
Pe(d._id), Ye(d.message);
|
|
2031
2019
|
},
|
|
2032
2020
|
children: [
|
|
2033
|
-
/* @__PURE__ */
|
|
2021
|
+
/* @__PURE__ */ i.jsx(ar, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1515", size: 14 }),
|
|
2034
2022
|
" ",
|
|
2035
2023
|
r.edit
|
|
2036
2024
|
]
|
|
2037
2025
|
}
|
|
2038
2026
|
),
|
|
2039
|
-
/* @__PURE__ */
|
|
2027
|
+
/* @__PURE__ */ i.jsxs(
|
|
2040
2028
|
"button",
|
|
2041
2029
|
{
|
|
2042
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2030
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1517",
|
|
2043
2031
|
className: "vg-button-ghost vg-animate-pop",
|
|
2044
2032
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.05s" },
|
|
2045
2033
|
onClick: () => {
|
|
2046
2034
|
d.url && (window.location.href = d.url);
|
|
2047
2035
|
},
|
|
2048
2036
|
children: [
|
|
2049
|
-
/* @__PURE__ */
|
|
2037
|
+
/* @__PURE__ */ i.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1524", size: 14 }),
|
|
2050
2038
|
" ",
|
|
2051
2039
|
r.review
|
|
2052
2040
|
]
|
|
2053
2041
|
}
|
|
2054
2042
|
),
|
|
2055
|
-
d.status === "pending" ? /* @__PURE__ */
|
|
2043
|
+
d.status === "pending" ? /* @__PURE__ */ i.jsxs(
|
|
2056
2044
|
"button",
|
|
2057
2045
|
{
|
|
2058
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2046
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1527",
|
|
2059
2047
|
className: "vg-button-primary vg-animate-pop",
|
|
2060
2048
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
2061
2049
|
onClick: () => {
|
|
2062
|
-
|
|
2050
|
+
H({
|
|
2063
2051
|
title: r.markReadyConfirm,
|
|
2064
2052
|
message: r.confirmMarkReady,
|
|
2065
2053
|
type: "success",
|
|
2066
2054
|
onConfirm: async () => {
|
|
2067
2055
|
try {
|
|
2068
|
-
(await fetch(`${
|
|
2056
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
2069
2057
|
method: "PATCH",
|
|
2070
2058
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2071
2059
|
body: JSON.stringify({ status: "ready_for_review" })
|
|
2072
|
-
})).ok && (
|
|
2060
|
+
})).ok && (Q(), e(r.updateSuccess, "success"));
|
|
2073
2061
|
} catch {
|
|
2074
2062
|
e(r.error, "error");
|
|
2075
2063
|
} finally {
|
|
2076
|
-
|
|
2064
|
+
H(null);
|
|
2077
2065
|
}
|
|
2078
2066
|
}
|
|
2079
2067
|
});
|
|
2080
2068
|
},
|
|
2081
2069
|
children: [
|
|
2082
|
-
/* @__PURE__ */
|
|
2070
|
+
/* @__PURE__ */ i.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1555", size: 14 }),
|
|
2083
2071
|
" ",
|
|
2084
2072
|
r.markReady
|
|
2085
2073
|
]
|
|
2086
2074
|
}
|
|
2087
|
-
) : /* @__PURE__ */
|
|
2075
|
+
) : /* @__PURE__ */ i.jsxs(
|
|
2088
2076
|
"button",
|
|
2089
2077
|
{
|
|
2090
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2078
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1558",
|
|
2091
2079
|
className: "vg-button-ghost vg-animate-pop",
|
|
2092
2080
|
style: { padding: "8px 16px", fontSize: "13px", animationDelay: "0.1s" },
|
|
2093
2081
|
onClick: () => {
|
|
2094
|
-
|
|
2082
|
+
H({
|
|
2095
2083
|
title: r.reopenConfirm,
|
|
2096
2084
|
message: r.confirmReopen,
|
|
2097
2085
|
type: "success",
|
|
2098
2086
|
// Reopening is a positive action, use success theme (indigo/check) or we could add a neutral theme
|
|
2099
2087
|
onConfirm: async () => {
|
|
2100
2088
|
try {
|
|
2101
|
-
(await fetch(`${
|
|
2089
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
2102
2090
|
method: "PATCH",
|
|
2103
2091
|
headers: { "Content-Type": "application/json", "x-api-key": n },
|
|
2104
2092
|
body: JSON.stringify({ status: "pending" })
|
|
2105
|
-
})).ok && (
|
|
2093
|
+
})).ok && (Q(), e(r.updateSuccess, "success"));
|
|
2106
2094
|
} catch {
|
|
2107
2095
|
e(r.error, "error");
|
|
2108
2096
|
} finally {
|
|
2109
|
-
|
|
2097
|
+
H(null);
|
|
2110
2098
|
}
|
|
2111
2099
|
}
|
|
2112
2100
|
});
|
|
2113
2101
|
},
|
|
2114
2102
|
children: [
|
|
2115
|
-
/* @__PURE__ */
|
|
2103
|
+
/* @__PURE__ */ i.jsx(or, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1586", size: 14 }),
|
|
2116
2104
|
" ",
|
|
2117
2105
|
r.reopen
|
|
2118
2106
|
]
|
|
2119
2107
|
}
|
|
2120
2108
|
),
|
|
2121
|
-
/* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ i.jsx(
|
|
2122
2110
|
"button",
|
|
2123
2111
|
{
|
|
2124
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2112
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1589",
|
|
2125
2113
|
className: "vg-button-ghost vg-animate-pop",
|
|
2126
2114
|
style: { padding: "8px 12px", color: "#ef4444", borderColor: "#fee2e2", animationDelay: "0.15s" },
|
|
2127
2115
|
onClick: () => {
|
|
2128
|
-
|
|
2116
|
+
H({
|
|
2129
2117
|
title: r.deleteConfirm,
|
|
2130
2118
|
message: r.confirmDelete,
|
|
2131
2119
|
type: "danger",
|
|
2132
2120
|
onConfirm: async () => {
|
|
2133
2121
|
try {
|
|
2134
|
-
(await fetch(`${
|
|
2122
|
+
(await fetch(`${a}/api/annotations/${d._id}`, {
|
|
2135
2123
|
method: "DELETE",
|
|
2136
2124
|
headers: { "x-api-key": n }
|
|
2137
|
-
})).ok && (
|
|
2125
|
+
})).ok && (Q(), e(r.deleteSuccess, "success"));
|
|
2138
2126
|
} catch {
|
|
2139
2127
|
e(r.error, "error");
|
|
2140
2128
|
} finally {
|
|
2141
|
-
|
|
2129
|
+
H(null);
|
|
2142
2130
|
}
|
|
2143
2131
|
}
|
|
2144
2132
|
});
|
|
2145
2133
|
},
|
|
2146
|
-
children: /* @__PURE__ */
|
|
2134
|
+
children: /* @__PURE__ */ i.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1616", size: 16 })
|
|
2147
2135
|
}
|
|
2148
2136
|
)
|
|
2149
2137
|
] }) })
|
|
@@ -2152,7 +2140,7 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
2152
2140
|
d._id
|
|
2153
2141
|
)) })
|
|
2154
2142
|
] }) }),
|
|
2155
|
-
|
|
2143
|
+
z && /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1631", className: "vg-animate-fade", style: {
|
|
2156
2144
|
position: "fixed",
|
|
2157
2145
|
top: 0,
|
|
2158
2146
|
left: 0,
|
|
@@ -2163,74 +2151,74 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
2163
2151
|
display: "flex",
|
|
2164
2152
|
alignItems: "center",
|
|
2165
2153
|
justifyContent: "center",
|
|
2166
|
-
zIndex:
|
|
2167
|
-
}, children: /* @__PURE__ */
|
|
2154
|
+
zIndex: Ie + 100
|
|
2155
|
+
}, children: /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1636", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
2168
2156
|
padding: "40px",
|
|
2169
2157
|
width: "420px",
|
|
2170
2158
|
textAlign: "center",
|
|
2171
2159
|
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
2172
2160
|
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.5)"
|
|
2173
2161
|
}, children: [
|
|
2174
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1643", style: {
|
|
2175
2163
|
width: "64px",
|
|
2176
2164
|
height: "64px",
|
|
2177
|
-
background:
|
|
2165
|
+
background: z.type === "danger" ? "rgba(239, 68, 68, 0.1)" : "rgba(99, 102, 241, 0.1)",
|
|
2178
2166
|
borderRadius: "20px",
|
|
2179
2167
|
display: "flex",
|
|
2180
2168
|
alignItems: "center",
|
|
2181
2169
|
justifyContent: "center",
|
|
2182
2170
|
margin: "0 auto 24px",
|
|
2183
|
-
color:
|
|
2171
|
+
color: z.type === "danger" ? "#ef4444" : "#6366f1",
|
|
2184
2172
|
transform: "rotate(-5deg)"
|
|
2185
|
-
}, children:
|
|
2186
|
-
/* @__PURE__ */
|
|
2187
|
-
/* @__PURE__ */
|
|
2188
|
-
/* @__PURE__ */
|
|
2189
|
-
/* @__PURE__ */
|
|
2173
|
+
}, children: z.type === "danger" ? /* @__PURE__ */ i.jsx(tt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1652", size: 32 }) : /* @__PURE__ */ i.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1652", size: 32 }) }),
|
|
2174
|
+
/* @__PURE__ */ i.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1654", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 800, color: "#000000", letterSpacing: "-0.02em" }, children: z.title }),
|
|
2175
|
+
/* @__PURE__ */ i.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1655", style: { margin: "0 0 32px 0", fontSize: "15px", color: "#000000", lineHeight: 1.6 }, children: z.message }),
|
|
2176
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1656", style: { display: "flex", gap: "16px" }, children: [
|
|
2177
|
+
/* @__PURE__ */ i.jsx(
|
|
2190
2178
|
"button",
|
|
2191
2179
|
{
|
|
2192
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2180
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1657",
|
|
2193
2181
|
className: "vg-button-ghost",
|
|
2194
2182
|
style: { flex: 1, height: "44px" },
|
|
2195
|
-
onClick: () => !
|
|
2196
|
-
disabled:
|
|
2183
|
+
onClick: () => !K && H(null),
|
|
2184
|
+
disabled: K,
|
|
2197
2185
|
children: r.no
|
|
2198
2186
|
}
|
|
2199
2187
|
),
|
|
2200
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ i.jsx(
|
|
2201
2189
|
"button",
|
|
2202
2190
|
{
|
|
2203
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
2191
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:1665",
|
|
2204
2192
|
className: "vg-button-primary",
|
|
2205
2193
|
style: {
|
|
2206
2194
|
flex: 1,
|
|
2207
2195
|
height: "44px",
|
|
2208
|
-
backgroundColor:
|
|
2209
|
-
backgroundImage:
|
|
2196
|
+
backgroundColor: z.type === "danger" ? "#ef4444" : void 0,
|
|
2197
|
+
backgroundImage: z.type === "danger" ? "none" : void 0,
|
|
2210
2198
|
display: "flex",
|
|
2211
2199
|
alignItems: "center",
|
|
2212
2200
|
justifyContent: "center",
|
|
2213
2201
|
gap: "8px"
|
|
2214
2202
|
},
|
|
2215
|
-
disabled:
|
|
2203
|
+
disabled: K,
|
|
2216
2204
|
onClick: async () => {
|
|
2217
|
-
|
|
2205
|
+
de(!0);
|
|
2218
2206
|
try {
|
|
2219
|
-
await
|
|
2207
|
+
await z.onConfirm();
|
|
2220
2208
|
} catch (d) {
|
|
2221
2209
|
console.error("Confirmation error:", d);
|
|
2222
2210
|
} finally {
|
|
2223
|
-
|
|
2211
|
+
de(!1);
|
|
2224
2212
|
}
|
|
2225
2213
|
},
|
|
2226
|
-
children:
|
|
2214
|
+
children: K ? /* @__PURE__ */ i.jsx(Qt, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1690", size: 18, className: "vg-animate-spin" }) : r.yes
|
|
2227
2215
|
}
|
|
2228
2216
|
)
|
|
2229
2217
|
] })
|
|
2230
2218
|
] }) }),
|
|
2231
|
-
!c && !
|
|
2232
|
-
const { rect: y, annotations:
|
|
2233
|
-
return /* @__PURE__ */
|
|
2219
|
+
!c && !M && ue.map((d, f) => {
|
|
2220
|
+
const { rect: y, annotations: O, isModal: R } = d, v = O[0], g = O.length;
|
|
2221
|
+
return /* @__PURE__ */ i.jsxs(
|
|
2234
2222
|
"div",
|
|
2235
2223
|
{
|
|
2236
2224
|
className: "vg-pin-container vg-animate-pop",
|
|
@@ -2242,42 +2230,42 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
2242
2230
|
transition: "all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",
|
|
2243
2231
|
zIndex: ln
|
|
2244
2232
|
},
|
|
2245
|
-
onMouseEnter: (
|
|
2246
|
-
window.innerHeight - y.bottom < 250 ?
|
|
2233
|
+
onMouseEnter: (w) => {
|
|
2234
|
+
window.innerHeight - y.bottom < 250 ? we((P) => ({ ...P, [d.id]: "vg-top" })) : we((P) => ({ ...P, [d.id]: "" }));
|
|
2247
2235
|
},
|
|
2248
2236
|
onClick: () => {
|
|
2249
|
-
|
|
2237
|
+
Y(!0), ne(v._id);
|
|
2250
2238
|
},
|
|
2251
2239
|
children: [
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2254
|
-
/* @__PURE__ */
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
/* @__PURE__ */
|
|
2240
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1729", className: `vg-pin-tooltip ${ye[d.id] || ""}`, style: { width: "280px", padding: "16px" }, children: [
|
|
2241
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1730", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "12px" }, children: [
|
|
2242
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1731", style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2243
|
+
/* @__PURE__ */ i.jsx(Se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1732", size: 14, color: "#6366f1" }),
|
|
2244
|
+
/* @__PURE__ */ i.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1733", style: { fontWeight: 800, fontSize: "13px", color: "#0f172a" }, children: [
|
|
2257
2245
|
g,
|
|
2258
2246
|
" ",
|
|
2259
2247
|
g === 1 ? "Comentario" : "Comentarios"
|
|
2260
2248
|
] })
|
|
2261
2249
|
] }),
|
|
2262
|
-
|
|
2250
|
+
R && /* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1738", className: "vg-badge", style: { fontSize: "10px", background: "#fef3c7", color: "#92400e", border: "none" }, children: "MODAL" })
|
|
2263
2251
|
] }),
|
|
2264
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1741", className: "vg-tooltip-scroll", style: { maxHeight: "180px", overflowY: "auto" }, children: O.map((w, L) => /* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1743", style: {
|
|
2265
2253
|
padding: "10px 0",
|
|
2266
|
-
borderTop:
|
|
2254
|
+
borderTop: L === 0 ? "none" : "1px solid #f1f5f9",
|
|
2267
2255
|
display: "flex",
|
|
2268
2256
|
flexDirection: "column",
|
|
2269
2257
|
gap: "4px"
|
|
2270
2258
|
}, children: [
|
|
2271
|
-
/* @__PURE__ */
|
|
2272
|
-
/* @__PURE__ */
|
|
2273
|
-
|
|
2259
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1750", style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
2260
|
+
/* @__PURE__ */ i.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1751", style: { fontSize: "10px", fontWeight: 600, color: "#64748b" }, children: dt(w.timestamp || w.createdAt, t) }),
|
|
2261
|
+
w.status === "ready_for_review" && /* @__PURE__ */ i.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1754", size: 12, color: "#22c55e" })
|
|
2274
2262
|
] }),
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
] },
|
|
2263
|
+
/* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1756", style: { fontSize: "13px", color: "#1e293b", lineHeight: 1.4, fontWeight: 500 }, children: w.message.length > 80 ? w.message.slice(0, 80) + "..." : w.message })
|
|
2264
|
+
] }, w._id)) })
|
|
2277
2265
|
] }),
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
|
|
2280
|
-
g > 1 && /* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ i.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1764", className: `vg-formal-pin ${v.status === "ready_for_review" ? "ready" : ""} ${R ? "modal-variant" : ""}`, style: { position: "relative" }, children: [
|
|
2267
|
+
v.status === "ready_for_review" ? /* @__PURE__ */ i.jsx(ce, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1765", size: 18 }) : R ? /* @__PURE__ */ i.jsx(Qe, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1765", size: 16 }) : /* @__PURE__ */ i.jsx(Se, { "data-source-path": "/src/components/ViewGateOverlay.tsx:1765", size: 16 }),
|
|
2268
|
+
g > 1 && /* @__PURE__ */ i.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:1768", className: "vg-pin-badge vg-animate-pop", children: g })
|
|
2281
2269
|
] })
|
|
2282
2270
|
]
|
|
2283
2271
|
},
|
|
@@ -2288,11 +2276,11 @@ const Ve = 2147483647, Ne = Ve, Le = 2e6, on = Ve - 10, cn = Ve - 5, ln = Ve - 1
|
|
|
2288
2276
|
};
|
|
2289
2277
|
function Rt(e, t, r) {
|
|
2290
2278
|
if (!t.endsWith(".tsx") && !t.endsWith(".jsx") || t.includes("node_modules")) return e;
|
|
2291
|
-
const n = (c) => c.replace(/\\/g, "/"),
|
|
2279
|
+
const n = (c) => c.replace(/\\/g, "/"), a = n(t).replace(n(r), "");
|
|
2292
2280
|
return e.split(`
|
|
2293
|
-
`).map((c,
|
|
2294
|
-
const
|
|
2295
|
-
return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (
|
|
2281
|
+
`).map((c, u) => {
|
|
2282
|
+
const p = u + 1;
|
|
2283
|
+
return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g, (h, m, C) => h.includes("data-source-path") || C === "Fragment" || C === "React.Fragment" ? h : `${m}<${C} data-source-path="${a}:${p}"`);
|
|
2296
2284
|
}).join(`
|
|
2297
2285
|
`);
|
|
2298
2286
|
}
|