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