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