viewgate-wrapper 1.9.0 → 1.9.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,wBAAwB,CAAC;AA+GhC,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"ViewGateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ViewGateOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,wBAAwB,CAAC;AA+GhC,eAAO,MAAM,eAAe,EAAE,EAupB7B,CAAC"}
|
package/dist/viewgate-wrapper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}@keyframes vg-pop-in{0%{transform:scale(.9) translateY(10px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}.vg-button-appear{animation:vg-pop-in .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
import Ae, { createContext as Ge, useState as C, useContext as Le, useCallback as oe, useEffect as Z } from "react";
|
|
3
3
|
var K = { exports: {} }, U = {};
|
|
4
4
|
var de;
|
|
@@ -1018,7 +1018,7 @@ const Gt = (e) => {
|
|
|
1018
1018
|
"button",
|
|
1019
1019
|
{
|
|
1020
1020
|
onClick: () => i(!s),
|
|
1021
|
-
className: "vg-button-primary",
|
|
1021
|
+
className: "vg-button-primary vg-button-appear",
|
|
1022
1022
|
style: { padding: "12px 24px", fontSize: "15px" },
|
|
1023
1023
|
children: s ? r.exitMode : r.enterMode
|
|
1024
1024
|
}
|
|
@@ -1029,13 +1029,14 @@ const Gt = (e) => {
|
|
|
1029
1029
|
onClick: () => {
|
|
1030
1030
|
B(!N), i(!1), h(null);
|
|
1031
1031
|
},
|
|
1032
|
-
className: "vg-button-ghost",
|
|
1032
|
+
className: "vg-button-ghost vg-button-appear",
|
|
1033
1033
|
style: { padding: "12px 24px", fontSize: "15px", marginLeft: "12px", background: "white" },
|
|
1034
1034
|
children: r.viewComments
|
|
1035
|
-
}
|
|
1035
|
+
},
|
|
1036
|
+
"view-comments"
|
|
1036
1037
|
)
|
|
1037
1038
|
] }),
|
|
1038
|
-
q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1039
|
+
q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:370", style: {
|
|
1039
1040
|
position: "fixed",
|
|
1040
1041
|
top: 0,
|
|
1041
1042
|
left: 0,
|
|
@@ -1047,11 +1048,11 @@ const Gt = (e) => {
|
|
|
1047
1048
|
justifyContent: "center",
|
|
1048
1049
|
zIndex: 1e5,
|
|
1049
1050
|
cursor: "wait"
|
|
1050
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1051
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1051
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:383", className: "vg-glassmorphism", style: { padding: "30px 50px", fontWeight: 700, display: "flex", flexDirection: "column", alignItems: "center", backgroundColor: "rgba(0,0,0,0.7)", color: "white", border: "1px solid rgba(255,255,255,0.1)" }, children: [
|
|
1052
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:384", className: "vg-spinner" }),
|
|
1052
1053
|
"Capturing..."
|
|
1053
1054
|
] }) }),
|
|
1054
|
-
s && c && !d && !q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1055
|
+
s && c && !d && !q && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:392", style: {
|
|
1055
1056
|
position: "fixed",
|
|
1056
1057
|
top: c.rect.top,
|
|
1057
1058
|
left: c.rect.left,
|
|
@@ -1065,7 +1066,7 @@ const Gt = (e) => {
|
|
|
1065
1066
|
boxShadow: "0 0 15px rgba(37, 19, 236, 0.2)",
|
|
1066
1067
|
transition: "all 0.1s ease-out"
|
|
1067
1068
|
} }),
|
|
1068
|
-
d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1069
|
+
d && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:410", className: "vg-animate-fade", style: {
|
|
1069
1070
|
position: "fixed",
|
|
1070
1071
|
top: 0,
|
|
1071
1072
|
left: 0,
|
|
@@ -1077,33 +1078,33 @@ const Gt = (e) => {
|
|
|
1077
1078
|
alignItems: "center",
|
|
1078
1079
|
justifyContent: "center",
|
|
1079
1080
|
zIndex: 99999
|
|
1080
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1081
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:423", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1081
1082
|
padding: "32px",
|
|
1082
1083
|
width: "460px",
|
|
1083
1084
|
background: "white",
|
|
1084
1085
|
color: "#0f172a"
|
|
1085
1086
|
}, children: [
|
|
1086
|
-
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1087
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1088
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1089
|
-
d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1087
|
+
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:429", style: { margin: "0 0 10px 0", fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
|
|
1088
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:431", style: { marginBottom: "20px" }, children: [
|
|
1089
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:432", style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" }, children: [
|
|
1090
|
+
d.semanticReference.componentPath ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:434", className: "vg-badge", style: { backgroundColor: "#f5f3ff", color: "#7c3aed", borderColor: "#ddd6fe" }, children: [
|
|
1090
1091
|
"📦 ",
|
|
1091
1092
|
d.tag
|
|
1092
|
-
] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1093
|
-
d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1093
|
+
] }) : /* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:438", className: "vg-badge", children: d.tag }),
|
|
1094
|
+
d.semanticReference.source && !d.semanticReference.source.startsWith("unknown") ? /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:443", className: "vg-badge", style: { backgroundColor: "#fdf2f8", color: "#db2777", borderColor: "#fbcfe8" }, children: [
|
|
1094
1095
|
"📄 ",
|
|
1095
1096
|
W(d.semanticReference.source.split(":")[0] || "unknown")
|
|
1096
|
-
] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1097
|
+
] }) }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:448", className: "vg-badge", style: { backgroundColor: "#f0f9ff", color: "#0369a1", borderColor: "#bae6fd", maxWidth: "300px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
|
|
1097
1098
|
"🆔 ",
|
|
1098
1099
|
d.semanticReference.signature
|
|
1099
1100
|
] })
|
|
1100
1101
|
] }),
|
|
1101
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1102
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:453", style: { marginTop: "8px", fontSize: "11px", color: "#94a3b8" }, children: [
|
|
1102
1103
|
"🎯 ",
|
|
1103
1104
|
d.semanticReference.selector
|
|
1104
1105
|
] })
|
|
1105
1106
|
] }),
|
|
1106
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1107
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:459", style: {
|
|
1107
1108
|
backgroundColor: "#f8fafc",
|
|
1108
1109
|
borderRadius: "8px",
|
|
1109
1110
|
border: "1px solid #e2e8f0",
|
|
@@ -1112,8 +1113,8 @@ const Gt = (e) => {
|
|
|
1112
1113
|
display: "flex",
|
|
1113
1114
|
flexDirection: "column"
|
|
1114
1115
|
}, children: [
|
|
1115
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1116
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1116
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:468", style: { padding: "8px 12px", fontSize: "10px", color: "#94a3b8", textTransform: "uppercase", fontWeight: 700, borderBottom: "1px solid #f1f5f9" }, children: r.preview }),
|
|
1117
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:471", style: {
|
|
1117
1118
|
padding: "12px",
|
|
1118
1119
|
display: "flex",
|
|
1119
1120
|
justifyContent: "center",
|
|
@@ -1122,7 +1123,7 @@ const Gt = (e) => {
|
|
|
1122
1123
|
maxHeight: "200px",
|
|
1123
1124
|
overflow: "hidden",
|
|
1124
1125
|
backgroundColor: "#fdfdfd"
|
|
1125
|
-
}, children: d.visualPreview ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1126
|
+
}, children: d.visualPreview ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:482", style: {
|
|
1126
1127
|
position: "relative",
|
|
1127
1128
|
width: "100%",
|
|
1128
1129
|
height: "100%",
|
|
@@ -1144,7 +1145,7 @@ const Gt = (e) => {
|
|
|
1144
1145
|
backgroundColor: "white"
|
|
1145
1146
|
}
|
|
1146
1147
|
}
|
|
1147
|
-
) }) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1148
|
+
) }) : /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:505", style: { fontSize: "13px", color: "#64748b", fontStyle: "italic", textAlign: "center", padding: "0 20px" }, children: [
|
|
1148
1149
|
'"',
|
|
1149
1150
|
d.previewText,
|
|
1150
1151
|
'"'
|
|
@@ -1161,7 +1162,7 @@ const Gt = (e) => {
|
|
|
1161
1162
|
autoFocus: !0
|
|
1162
1163
|
}
|
|
1163
1164
|
),
|
|
1164
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1165
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:521", style: { display: "flex", justifyContent: "flex-end", gap: "12px", marginTop: "24px" }, children: [
|
|
1165
1166
|
/* @__PURE__ */ l.jsx(
|
|
1166
1167
|
"button",
|
|
1167
1168
|
{
|
|
@@ -1182,7 +1183,7 @@ const Gt = (e) => {
|
|
|
1182
1183
|
)
|
|
1183
1184
|
] })
|
|
1184
1185
|
] }) }),
|
|
1185
|
-
N && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1186
|
+
N && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:543", className: "vg-animate-fade", style: {
|
|
1186
1187
|
position: "fixed",
|
|
1187
1188
|
top: 0,
|
|
1188
1189
|
left: 0,
|
|
@@ -1194,7 +1195,7 @@ const Gt = (e) => {
|
|
|
1194
1195
|
alignItems: "center",
|
|
1195
1196
|
justifyContent: "center",
|
|
1196
1197
|
zIndex: 99999
|
|
1197
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1198
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:556", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1198
1199
|
padding: "32px",
|
|
1199
1200
|
width: "600px",
|
|
1200
1201
|
maxHeight: "80vh",
|
|
@@ -1203,46 +1204,46 @@ const Gt = (e) => {
|
|
|
1203
1204
|
display: "flex",
|
|
1204
1205
|
flexDirection: "column"
|
|
1205
1206
|
}, children: [
|
|
1206
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1207
|
-
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1208
|
-
/* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1207
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:565", style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "20px" }, children: [
|
|
1208
|
+
/* @__PURE__ */ l.jsx("h2", { "data-source-path": "/src/components/ViewGateOverlay.tsx:566", style: { margin: 0, fontSize: "24px", fontWeight: 800 }, children: r.feedbackHeader }),
|
|
1209
|
+
/* @__PURE__ */ l.jsx("button", { "data-source-path": "/src/components/ViewGateOverlay.tsx:567", onClick: () => B(!1), className: "vg-button-ghost", style: { padding: "6px 12px" }, children: "✕" })
|
|
1209
1210
|
] }),
|
|
1210
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1211
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:570", style: { overflowY: "auto", flex: 1, paddingRight: "8px", display: "flex", flexDirection: "column", gap: "16px" }, children: H ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:572", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: "Cargando..." }) : D.length === 0 ? /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:574", style: { textAlign: "center", padding: "40px", color: "#64748b" }, children: r.noComments }) : D.map((f) => /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:577", style: {
|
|
1211
1212
|
border: "1px solid #e2e8f0",
|
|
1212
1213
|
borderRadius: "12px",
|
|
1213
1214
|
padding: "16px",
|
|
1214
1215
|
backgroundColor: f.status === "ready_for_review" ? "#f0fdf4" : "#fff"
|
|
1215
1216
|
}, children: [
|
|
1216
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1217
|
-
f.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1217
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:583", style: { display: "flex", justifyContent: "space-between", marginBottom: "12px" }, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:584", style: { display: "flex", gap: "8px", alignItems: "center" }, children: [
|
|
1218
|
+
f.status === "ready_for_review" ? /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:586", className: "vg-badge", style: { backgroundColor: "#dcfce7", color: "#166534", borderColor: "#bbf7d0" }, children: [
|
|
1218
1219
|
"✓ ",
|
|
1219
1220
|
r.readyForReview
|
|
1220
|
-
] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1221
|
+
] }) : /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:588", className: "vg-badge", style: { backgroundColor: "#fef3c7", color: "#92400e", borderColor: "#fde68a" }, children: [
|
|
1221
1222
|
"⏳ ",
|
|
1222
1223
|
r.pending
|
|
1223
1224
|
] }),
|
|
1224
|
-
/* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1225
|
+
/* @__PURE__ */ l.jsx("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:590", style: { fontSize: "12px", color: "#64748b" }, children: new Date(f.timestamp).toLocaleString() })
|
|
1225
1226
|
] }) }),
|
|
1226
|
-
/* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1227
|
+
/* @__PURE__ */ l.jsxs("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:596", style: { margin: "0 0 12px 0", fontSize: "15px", fontWeight: 600 }, children: [
|
|
1227
1228
|
'"',
|
|
1228
1229
|
f.message,
|
|
1229
1230
|
'"'
|
|
1230
1231
|
] }),
|
|
1231
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1232
|
-
/* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1232
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:598", style: { display: "flex", gap: "6px", flexWrap: "wrap", marginBottom: "16px" }, children: [
|
|
1233
|
+
/* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:599", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
|
|
1233
1234
|
"📦 ",
|
|
1234
1235
|
f.componentName?.split(" > ").pop() || "UI Element"
|
|
1235
1236
|
] }),
|
|
1236
|
-
f.filePath && f.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1237
|
+
f.filePath && f.filePath !== "unknown" && /* @__PURE__ */ l.jsxs("span", { "data-source-path": "/src/components/ViewGateOverlay.tsx:603", className: "vg-badge", style: { backgroundColor: "#f1f5f9", color: "#475569", border: "none" }, children: [
|
|
1237
1238
|
"📄 ",
|
|
1238
1239
|
W(f.filePath)
|
|
1239
1240
|
] })
|
|
1240
1241
|
] }),
|
|
1241
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1242
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:609", style: { display: "flex", gap: "8px", justifyContent: "flex-end", borderTop: "1px solid #e2e8f0", paddingTop: "16px", marginTop: "8px" }, children: [
|
|
1242
1243
|
f.status === "pending" ? /* @__PURE__ */ l.jsxs(
|
|
1243
1244
|
"button",
|
|
1244
1245
|
{
|
|
1245
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1246
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:611",
|
|
1246
1247
|
className: "vg-button-primary",
|
|
1247
1248
|
style: { display: "flex", alignItems: "center", gap: "6px" },
|
|
1248
1249
|
onClick: async () => {
|
|
@@ -1264,7 +1265,7 @@ const Gt = (e) => {
|
|
|
1264
1265
|
) : /* @__PURE__ */ l.jsxs(
|
|
1265
1266
|
"button",
|
|
1266
1267
|
{
|
|
1267
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1268
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:633",
|
|
1268
1269
|
className: "vg-button-ghost",
|
|
1269
1270
|
style: { display: "flex", alignItems: "center", gap: "6px" },
|
|
1270
1271
|
onClick: async () => {
|
|
@@ -1287,7 +1288,7 @@ const Gt = (e) => {
|
|
|
1287
1288
|
/* @__PURE__ */ l.jsxs(
|
|
1288
1289
|
"button",
|
|
1289
1290
|
{
|
|
1290
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1291
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:656",
|
|
1291
1292
|
className: "vg-button-ghost",
|
|
1292
1293
|
style: { display: "flex", alignItems: "center", gap: "6px" },
|
|
1293
1294
|
onClick: () => {
|
|
@@ -1308,7 +1309,7 @@ const Gt = (e) => {
|
|
|
1308
1309
|
/* @__PURE__ */ l.jsxs(
|
|
1309
1310
|
"button",
|
|
1310
1311
|
{
|
|
1311
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1312
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:673",
|
|
1312
1313
|
className: "vg-button-primary",
|
|
1313
1314
|
style: { backgroundColor: "#ef4444", display: "flex", alignItems: "center", gap: "6px" },
|
|
1314
1315
|
onClick: () => {
|
|
@@ -1338,7 +1339,7 @@ const Gt = (e) => {
|
|
|
1338
1339
|
] })
|
|
1339
1340
|
] }, f._id)) })
|
|
1340
1341
|
] }) }),
|
|
1341
|
-
ne && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1342
|
+
ne && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:712", style: {
|
|
1342
1343
|
position: "fixed",
|
|
1343
1344
|
top: 0,
|
|
1344
1345
|
left: 0,
|
|
@@ -1351,11 +1352,11 @@ const Gt = (e) => {
|
|
|
1351
1352
|
zIndex: 3e5,
|
|
1352
1353
|
backdropFilter: "blur(10px)",
|
|
1353
1354
|
color: "white"
|
|
1354
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1355
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1356
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1355
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:726", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "20px" }, children: [
|
|
1356
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:727", className: "vg-spinner", style: { width: "50px", height: "50px", borderTopColor: "white" } }),
|
|
1357
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:728", style: { fontSize: "18px", fontWeight: 600, letterSpacing: "0.5px" }, children: r.navigating })
|
|
1357
1358
|
] }) }),
|
|
1358
|
-
A && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1359
|
+
A && /* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:735", className: "vg-animate-fade", style: {
|
|
1359
1360
|
position: "fixed",
|
|
1360
1361
|
top: 0,
|
|
1361
1362
|
left: 0,
|
|
@@ -1367,20 +1368,20 @@ const Gt = (e) => {
|
|
|
1367
1368
|
alignItems: "center",
|
|
1368
1369
|
justifyContent: "center",
|
|
1369
1370
|
zIndex: 2e5
|
|
1370
|
-
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1371
|
+
}, children: /* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:748", className: "vg-glassmorphism vg-animate-slide", style: {
|
|
1371
1372
|
padding: "32px",
|
|
1372
1373
|
width: "400px",
|
|
1373
1374
|
background: "white",
|
|
1374
1375
|
textAlign: "center"
|
|
1375
1376
|
}, children: [
|
|
1376
|
-
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1377
|
-
/* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1378
|
-
/* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1379
|
-
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1377
|
+
/* @__PURE__ */ l.jsx("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:754", style: { fontSize: "48px", marginBottom: "16px" }, children: "⚠️" }),
|
|
1378
|
+
/* @__PURE__ */ l.jsx("h3", { "data-source-path": "/src/components/ViewGateOverlay.tsx:755", style: { margin: "0 0 12px 0", fontSize: "20px", fontWeight: 700, color: "#0f172a" }, children: A.title }),
|
|
1379
|
+
/* @__PURE__ */ l.jsx("p", { "data-source-path": "/src/components/ViewGateOverlay.tsx:756", style: { margin: "0 0 24px 0", fontSize: "15px", color: "#64748b", lineHeight: 1.5 }, children: A.message }),
|
|
1380
|
+
/* @__PURE__ */ l.jsxs("div", { "data-source-path": "/src/components/ViewGateOverlay.tsx:758", style: { display: "flex", gap: "12px", justifyContent: "center" }, children: [
|
|
1380
1381
|
/* @__PURE__ */ l.jsx(
|
|
1381
1382
|
"button",
|
|
1382
1383
|
{
|
|
1383
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1384
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:759",
|
|
1384
1385
|
className: "vg-button-ghost",
|
|
1385
1386
|
onClick: () => M(null),
|
|
1386
1387
|
style: { flex: 1 },
|
|
@@ -1390,7 +1391,7 @@ const Gt = (e) => {
|
|
|
1390
1391
|
/* @__PURE__ */ l.jsx(
|
|
1391
1392
|
"button",
|
|
1392
1393
|
{
|
|
1393
|
-
"data-source-path": "/src/components/ViewGateOverlay.tsx:
|
|
1394
|
+
"data-source-path": "/src/components/ViewGateOverlay.tsx:766",
|
|
1394
1395
|
className: "vg-button-primary",
|
|
1395
1396
|
style: { backgroundColor: "#ef4444", flex: 1 },
|
|
1396
1397
|
onClick: A.onConfirm,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap";:root{--vg-primary: #2513ec;--vg-primary-gradient: linear-gradient(135deg, #2513ec 0%, #7e3ff2 100%);--vg-glass: rgba(255, 255, 255, .7);--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow: 0 8px 32px 0 rgba(31, 38, 135, .37);--vg-radius: 16px}body{font-family:Inter,system-ui,-apple-system,sans-serif!important;margin:0}.vg-glassmorphism{background:var(--vg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--vg-glass-border);box-shadow:var(--vg-shadow);border-radius:var(--vg-radius)}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:10px 24px;border-radius:12px;font-weight:600;cursor:pointer;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 12px #2513ec4d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 16px #2513ec66}.vg-button-ghost{background:transparent;color:#444;border:1px solid #ddd;padding:10px 24px;border-radius:12px;cursor:pointer;transition:background .2s}.vg-button-ghost:hover{background:#0000000d}.vg-badge{background:#2513ec1a;color:var(--vg-primary);padding:4px 12px;border-radius:20px;font-size:12px;font-family:JetBrains Mono,monospace;font-weight:700;border:1px solid rgba(37,19,236,.2)}.vg-textarea{width:100%;border:1.5px solid #eee;border-radius:12px;padding:12px;font-family:inherit;color:#0f172a;resize:none;transition:border-color .2s,box-shadow .2s;outline:none}.vg-textarea:focus{border-color:var(--vg-primary);box-shadow:0 0 0 4px #2513ec1a}@keyframes vg-slide-in{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes vg-fade-in{0%{opacity:0}to{opacity:1}}.vg-animate-slide{animation:vg-slide-in .3s cubic-bezier(.16,1,.3,1)}.vg-animate-fade{animation:vg-fade-in .2s ease-out}@keyframes vg-pop-in{0%{transform:scale(.9) translateY(10px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}.vg-button-appear{animation:vg-pop-in .4s cubic-bezier(.34,1.56,.64,1) forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px;z-index:100000}.vg-toast{padding:16px 24px;display:flex;align-items:center;gap:12px;min-width:300px}.vg-toast.success{background:#ecfdf5;border:1px solid #10b981;color:#065f46}.vg-toast.error{background:#fef2f2;border:1px solid #ef4444;color:#991b1b}.vg-cursor-pointer *{cursor:pointer!important}@keyframes vg-pulse-green{0%{box-shadow:0 0 #10b981b3;border-color:#10b981}70%{box-shadow:0 0 0 15px #10b98100;border-color:#10b981}to{box-shadow:0 0 #10b98100;border-color:#10b981}}.vg-highlight-active{animation:vg-pulse-green 2s infinite!important;outline:4px solid #10b981!important;outline-offset:2px!important;transition:all .3s ease!important;position:relative!important;z-index:9999!important}.vg-highlight-active:after{content:"✓ Revised";position:absolute;top:-25px;left:0;background:#10b981;color:#fff;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:800;text-transform:uppercase;white-space:nowrap;pointer-events:none}@keyframes vg-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.vg-spinner{border:4px solid rgba(255,255,255,.3);border-top:4px solid white;border-radius:50%;width:40px;height:40px;animation:vg-spin 1s linear infinite;margin-bottom:16px}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
(function(R,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],g):(R=typeof globalThis<"u"?globalThis:R||self,g(R.ViewGateWrapper={},R.React))})(this,(function(R,g){"use strict";var J={exports:{}},M={};var de;function Ae(){if(de)return M;de=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:s}}return M.Fragment=t,M.jsx=r,M.jsxs=r,M}var H={};var fe;function Ge(){return fe||(fe=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===_?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case L:return"Fragment";case q:return"Profiler";case z:return"StrictMode";case U:return"Suspense";case ce:return"SuspenseList";case ee:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case Q:return"Portal";case ie:return o.displayName||"Context";case W:return(o._context.displayName||"Context")+".Consumer";case I:var p=o.render;return o=o.displayName,o||(o=p.displayName||p.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case le:return p=o.displayName||null,p!==null?p:e(o.type)||"Memo";case $:p=o._payload,o=o._init;try{return e(o(p))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var p=!1}catch{p=!0}if(p){p=console;var y=p.error,w=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return y.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",w),t(o)}}function n(o){if(o===L)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===$)return"<...>";try{var p=e(o);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function a(){var o=F.A;return o===null?null:o.getOwner()}function s(){return Error("react-stack-top-frame")}function i(o){if(O.call(o,"key")){var p=Object.getOwnPropertyDescriptor(o,"key").get;if(p&&p.isReactWarning)return!1}return o.key!==void 0}function c(o,p){function y(){te||(te=!0,console.error("%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)",p))}y.isReactWarning=!0,Object.defineProperty(o,"key",{get:y,configurable:!0})}function u(){var o=e(this.type);return B[o]||(B[o]=!0,console.error("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.")),o=this.props.ref,o!==void 0?o:null}function d(o,p,y,w,k,N){var v=y.ref;return o={$$typeof:T,type:o,key:p,props:y,_owner:w},(v!==void 0?v:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:u}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function h(o,p,y,w,k,N){var v=p.children;if(v!==void 0)if(w)if(Y(v)){for(w=0;w<v.length;w++)x(v[w]);Object.freeze&&Object.freeze(v)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(v);if(O.call(p,"key")){v=e(o);var D=Object.keys(p).filter(function(Lt){return Lt!=="key"});w=0<D.length?"{key: someKey, "+D.join(": ..., ")+": ...}":"{key: someKey}",j[v+w]||(D=0<D.length?"{"+D.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
3
3
|
let props = %s;
|
|
4
4
|
<%s {...props} />
|
|
5
5
|
React keys must be passed directly to JSX without using spread:
|
|
6
6
|
let props = %s;
|
|
7
7
|
<%s key={someKey} {...props} />`,w,v,D,v),j[v+w]=!0)}if(v=null,y!==void 0&&(r(y),v=""+y),i(p)&&(r(p.key),v=""+p.key),"key"in p){y={};for(var ue in p)ue!=="key"&&(y[ue]=p[ue])}else y=p;return v&&c(y,typeof o=="function"?o.displayName||o.name||"Unknown":o),d(o,v,y,a(),k,N)}function x(o){b(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===$&&(o._payload.status==="fulfilled"?b(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function b(o){return typeof o=="object"&&o!==null&&o.$$typeof===T}var C=g,T=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),W=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),F=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,Y=Array.isArray,V=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(o){return o()}};var te,B={},f=C.react_stack_bottom_frame.bind(C,s)(),m=V(n(s)),j={};H.Fragment=L,H.jsx=function(o,p,y){var w=1e4>F.recentlyCreatedOwnerStacks++;return h(o,p,y,!1,w?Error("react-stack-top-frame"):f,w?V(n(o)):m)},H.jsxs=function(o,p,y){var w=1e4>F.recentlyCreatedOwnerStacks++;return h(o,p,y,!0,w?Error("react-stack-top-frame"):f,w?V(n(o)):m)}})()),H}var pe;function Le(){return pe||(pe=1,process.env.NODE_ENV==="production"?J.exports=Ae():J.exports=Ge()),J.exports}var l=Le();const Ie={en:{enterMode:"🚀 Enter Feedback Mode",exitMode:"✨ Exit Mode",feedbackHeader:"Feedback",selectedElement:"Selected element:",line:"Line",placeholder:"Tell us what you'd like to change...",cancel:"Cancel",send:"Send Feedback",submitting:"Submitting...",success:"Your feedback has been submitted successfully!",error:"Failed to submit feedback. Check backend connection.",successHeader:"Success",errorHeader:"Error",preview:"Preview",viewComments:"👀 View Comments",close:"Close",observe:"Observe",pending:"Pending",readyForReview:"Ready for Review",noComments:"No comments found.",deleteConfirm:"Are you sure you want to close/delete this comment?",markReady:"Mark as Ready",reopen:"Reopen",review:"Review",confirmDelete:"Are you sure you want to delete this annotation?",yes:"Yes, delete",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",updateSuccess:"Status updated successfully.",navigating:"Redirecting to review..."},es:{enterMode:"🚀 Activar Modo Comentarios",exitMode:"✨ Salir del Modo",feedbackHeader:"Comentarios",selectedElement:"Elemento seleccionado:",line:"Línea",placeholder:"Cuéntanos qué te gustaría cambiar...",cancel:"Cancelar",send:"Enviar Comentarios",submitting:"Enviando...",success:"¡Tus comentarios se han enviado con éxito!",error:"Error al enviar comentarios. Revisa la conexión con el servidor.",successHeader:"Éxito",errorHeader:"Error",preview:"Vista previa",viewComments:"👀 Ver Comentarios",close:"Cerrar",observe:"Observar",pending:"Pendiente",readyForReview:"Lista para revisión",noComments:"No hay comentarios.",deleteConfirm:"¿Estás seguro de que deseas cerrar y eliminar este comentario?",markReady:"Marcar como Listo",reopen:"Reabrir",review:"Revisar",confirmDelete:"¿Estás seguro de que deseas eliminar este comentario?",yes:"Sí, eliminar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Estado actualizado correctamente.",navigating:"Redirigiendo a revisión..."}},me=g.createContext(void 0),he=()=>{const e=g.useContext(me);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},Fe=({children:e,language:t="es",apiKey:r,baseUrl:n="https://view-gate.vercel.app"})=>{const[a,s]=g.useState([]),i=(u,d)=>{const h=Date.now();s(x=>[...x,{id:h,message:u,type:d}]),setTimeout(()=>{s(x=>x.filter(b=>b.id!==h))},4e3)},c=Ie[t];return l.jsxs(me.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:136",value:{addToast:i,language:t,t:c,apiKey:r,baseUrl:n},children:[e,l.jsx(Ve,{"data-source-path":"/src/components/ViewGateProvider.tsx:138"}),l.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:139",className:"vg-toasts",children:a.map(u=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:141",className:`vg-toast vg-glassmorphism vg-animate-slide ${u.type}`,children:[l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:142",style:{fontSize:"20px"},children:u.type==="success"?"✅":"❌"}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:143",children:[l.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:144",style:{display:"block"},children:u.type==="success"?c.successHeader:c.errorHeader}),l.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:145",style:{fontSize:"14px"},children:u.message})]})]},u.id))})]})};function Ne(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(a),t&&(n.href=t),a.href=e,a.href}const De=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function P(e){const t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}let A=null;function ge(e={}){return A||(e.includeStyleProperties?(A=e.includeStyleProperties,A):(A=P(window.getComputedStyle(document.documentElement)),A))}function X(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function Me(e){const t=X(e,"border-left-width"),r=X(e,"border-right-width");return e.clientWidth+t+r}function He(e){const t=X(e,"border-top-width"),r=X(e,"border-bottom-width");return e.clientHeight+t+r}function xe(e,t={}){const r=t.width||Me(e),n=t.height||He(e);return{width:r,height:n}}function ze(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const E=16384;function We(e){(e.width>E||e.height>E)&&(e.width>E&&e.height>E?e.width>e.height?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E):e.width>E?(e.height*=E/e.width,e.width=E):(e.width*=E/e.height,e.height=E))}function Z(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function Ue(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function $e(e,t,r){const n="http://www.w3.org/2000/svg",a=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");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),Ue(a)}const S=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||S(r,t)};function Ye(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Be(e,t){return ge(t).map(r=>{const n=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${n}${a?" !important":""};`}).join(" ")}function Je(e,t,r,n){const a=`.${e}:${t}`,s=r.cssText?Ye(r):Be(r,n);return document.createTextNode(`${a}{${s}}`)}function ye(e,t,r,n){const a=window.getComputedStyle(e,r),s=a.getPropertyValue("content");if(s===""||s==="none")return;const i=De();try{t.className=`${t.className} ${i}`}catch{return}const c=document.createElement("style");c.appendChild(Je(i,r,a,n)),t.appendChild(c)}function Xe(e,t,r){ye(e,t,":before",r),ye(e,t,":after",r)}const we="application/font-woff",ve="image/jpeg",Ze={woff:we,woff2:we,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ve,jpeg:ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ke(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function re(e){const t=Ke(e).toLowerCase();return Ze[t]||""}function Qe(e){return e.split(/,/)[1]}function ne(e){return e.search(/^(data:)/)!==-1}function qe(e,t){return`data:${t};base64,${e}`}async function be(e,t,r){const n=await fetch(e,t);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const a=await n.blob();return new Promise((s,i)=>{const c=new FileReader;c.onerror=i,c.onloadend=()=>{try{s(r({res:n,result:c.result}))}catch(u){i(u)}},c.readAsDataURL(a)})}const se={};function et(e,t,r){let n=e.replace(/\?.*/,"");return r&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function ae(e,t,r){const n=et(e,t,r.includeQueryParams);if(se[n]!=null)return se[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await be(e,r.fetchRequestInit,({res:i,result:c})=>(t||(t=i.headers.get("Content-Type")||""),Qe(c)));a=qe(s,t)}catch(s){a=r.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;s&&(i=typeof s=="string"?s:s.message),i&&console.warn(i)}return se[n]=a,a}async function tt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Z(t)}async function rt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),i=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,i?.drawImage(e,0,0,s.width,s.height);const c=s.toDataURL();return Z(c)}const r=e.poster,n=re(r),a=await ae(r,n,t);return Z(a)}async function nt(e,t){var r;try{if(!((r=e?.contentDocument)===null||r===void 0)&&r.body)return await K(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function st(e,t){return S(e,HTMLCanvasElement)?tt(e):S(e,HTMLVideoElement)?rt(e,t):S(e,HTMLIFrameElement)?nt(e,t):e.cloneNode(Se(e))}const at=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Se=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ot(e,t,r){var n,a;if(Se(t))return t;let s=[];return at(e)&&e.assignedNodes?s=P(e.assignedNodes()):S(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=P(e.contentDocument.body.childNodes):s=P(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||S(e,HTMLVideoElement)||await s.reduce((i,c)=>i.then(()=>K(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function it(e,t,r){const n=t.style;if(!n)return;const a=window.getComputedStyle(e);a.cssText?(n.cssText=a.cssText,n.transformOrigin=a.transformOrigin):ge(r).forEach(s=>{let i=a.getPropertyValue(s);s==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),S(e,HTMLIFrameElement)&&s==="display"&&i==="inline"&&(i="block"),s==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),n.setProperty(s,i,a.getPropertyPriority(s))})}function ct(e,t){S(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),S(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lt(e,t){if(S(e,HTMLSelectElement)){const n=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));n&&n.setAttribute("selected","")}}function ut(e,t,r){return S(t,Element)&&(it(e,t,r),Xe(e,t,r),ct(e,t),lt(e,t)),t}async function dt(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const n={};for(let s=0;s<r.length;s++){const c=r[s].getAttribute("xlink:href");if(c){const u=e.querySelector(c),d=document.querySelector(c);!u&&d&&!n[c]&&(n[c]=await K(d,t,!0))}}const a=Object.values(n);if(a.length){const s="http://www.w3.org/1999/xhtml",i=document.createElementNS(s,"svg");i.setAttribute("xmlns",s),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const c=document.createElementNS(s,"defs");i.appendChild(c);for(let u=0;u<a.length;u++)c.appendChild(a[u]);e.appendChild(i)}return e}async function K(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>st(n,t)).then(n=>ot(e,n,t)).then(n=>ut(e,n,t)).then(n=>dt(n,t))}const Ee=/url\((['"]?)([^'"]+?)\1\)/g,ft=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,pt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function mt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ht(e){const t=[];return e.replace(Ee,(r,n,a)=>(t.push(a),r)),t.filter(r=>!ne(r))}async function gt(e,t,r,n,a){try{const s=r?Ne(t,r):t,i=re(t);let c;return a||(c=await ae(s,i,n)),e.replace(mt(t),`$1${c}$3`)}catch{}return e}function xt(e,{preferredFontFormat:t}){return t?e.replace(pt,r=>{for(;;){const[n,,a]=ft.exec(r)||[];if(!a)return"";if(a===t)return`src: ${n};`}}):e}function Ce(e){return e.search(Ee)!==-1}async function Re(e,t,r){if(!Ce(e))return e;const n=xt(e,r);return ht(n).reduce((s,i)=>s.then(c=>gt(c,i,t,r)),Promise.resolve(n))}async function G(e,t,r){var n;const a=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(a){const s=await Re(a,null,r);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function yt(e,t){await G("background",e,t)||await G("background-image",e,t),await G("mask",e,t)||await G("-webkit-mask",e,t)||await G("mask-image",e,t)||await G("-webkit-mask-image",e,t)}async function wt(e,t){const r=S(e,HTMLImageElement);if(!(r&&!ne(e.src))&&!(S(e,SVGImageElement)&&!ne(e.href.baseVal)))return;const n=r?e.src:e.href.baseVal,a=await ae(n,re(n),t);await new Promise((s,i)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(d){i(d)}}:i;const c=e;c.decode&&(c.decode=s),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function vt(e,t){const n=P(e.childNodes).map(a=>ke(a,t));await Promise.all(n).then(()=>e)}async function ke(e,t){S(e,Element)&&(await yt(e,t),await wt(e,t),await vt(e,t))}function bt(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const n=t.style;return n!=null&&Object.keys(n).forEach(a=>{r[a]=n[a]}),e}const je={};async function Te(e){let t=je[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},je[e]=t,t}async function Oe(e,t){let r=e.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,s=(r.match(/url\([^)]+\)/g)||[]).map(async i=>{let c=i.replace(n,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),be(c,t.fetchRequestInit,({result:u})=>(r=r.replace(i,`url(${u})`),[i,u]))});return Promise.all(s).then(()=>r)}function Pe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(n);if(u===null)break;t.push(u[0])}n=n.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(i,"gi");for(;;){let u=s.exec(n);if(u===null){if(u=c.exec(n),u===null)break;s.lastIndex=c.lastIndex}else c.lastIndex=s.lastIndex;t.push(u[0])}return t}async function St(e,t){const r=[],n=[];return e.forEach(a=>{if("cssRules"in a)try{P(a.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let c=i+1;const u=s.href,d=Te(u).then(h=>Oe(h,t)).then(h=>Pe(h).forEach(x=>{try{a.insertRule(x,x.startsWith("@import")?c+=1:a.cssRules.length)}catch(b){console.error("Error inserting rule from remote css",{rule:x,error:b})}})).catch(h=>{console.error("Error loading remote css",h.toString())});n.push(d)}})}catch(s){const i=e.find(c=>c.href==null)||document.styleSheets[0];a.href!=null&&n.push(Te(a.href).then(c=>Oe(c,t)).then(c=>Pe(c).forEach(u=>{i.insertRule(u,i.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",s)}}),Promise.all(n).then(()=>(e.forEach(a=>{if("cssRules"in a)try{P(a.cssRules||[]).forEach(s=>{r.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),r))}function Et(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ce(t.style.getPropertyValue("src")))}async function Ct(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=P(e.ownerDocument.styleSheets),n=await St(r,t);return Et(n)}function _e(e){return e.trim().replace(/["']/g,"")}function Rt(e){const t=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{t.add(_e(s))}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&r(s)})}return r(e),t}async function kt(e,t){const r=await Ct(e,t),n=Rt(e);return(await Promise.all(r.filter(s=>n.has(_e(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return Re(s.cssText,i,t)}))).join(`
|
|
8
|
-
`)}async function jt(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await kt(e,t);if(r){const n=document.createElement("style"),a=document.createTextNode(r);n.appendChild(a),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function Tt(e,t={}){const{width:r,height:n}=xe(e,t),a=await K(e,t,!0);return await jt(a,t),await ke(a,t),bt(a,t),await $e(a,r,n)}async function Ot(e,t={}){const{width:r,height:n}=xe(e,t),a=await Tt(e,t),s=await Z(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||ze(),d=t.canvasWidth||r,h=t.canvasHeight||n;return i.width=d*u,i.height=h*u,t.skipAutoScale||We(i),i.style.width=`${d}`,i.style.height=`${h}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,i.width,i.height)),c.drawImage(s,0,0,i.width,i.height),i}async function Pt(e,t={}){return(await Ot(e,t)).toDataURL()}const _t=e=>{const r=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!r)return"";const n=[];let a=e[r];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!n.includes(i)&&n.unshift(i)}a=a.return}return n.join(" > ")||"Generic Component"},Vt=e=>{let t="unknown:0",r=e;for(;r;){const d=r.getAttribute("data-source-path");if(d){t=d;break}r=r.parentElement}const n=_t(e),s=(d=>{const h=[];let x=d;for(;x&&x.nodeType===Node.ELEMENT_NODE;){let b=x.nodeName.toLowerCase();if(x.id){b+="#"+x.id,h.unshift(b);break}else{let C=x,T=1;for(;C.previousElementSibling;)C=C.previousElementSibling,C.nodeName.toLowerCase()===b&&T++;T>1&&(b+=`:nth-of-type(${T})`)}h.unshift(b),x=x.parentElement}return h.join(" > ")})(e),i=(e.innerText||"").slice(0,50).trim(),c={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(d=>{const h=e.getAttribute(d);h&&(c[d]=h)});const u=`${e.tagName.toLowerCase()}-${i.replace(/\s+/g,"_")}-${s.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:s,outerHtml:(e.outerHTML||"").slice(0,1e3),parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:n,signature:u,source:t,attributes:c,metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`}}},Ve=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=he(),[s,i]=g.useState(!1),[c,u]=g.useState(null),[d,h]=g.useState(null),[x,b]=g.useState(""),[C,T]=g.useState(!1),[Q,L]=g.useState(!1),[z,q]=g.useState(!1),[W,ie]=g.useState([]),[I,U]=g.useState(null),[ce,le]=g.useState(!1),[$,ee]=g.useState(!1),[_,F]=g.useState(null),O=g.useCallback(async()=>{if(n){ee(!0);try{const f=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(f.ok){const m=await f.json();ie(m)}}catch(f){console.error("Failed to fetch annotations",f)}finally{ee(!1)}}},[n,a]);g.useEffect(()=>{const f=()=>{const m=window.location.hash;if(m.includes("vg_hl=")){const j=m.split("vg_hl=");if(j.length<2)return;const o=decodeURIComponent(j[1]);[100,500,1e3,2e3].forEach(y=>{setTimeout(()=>{const w=document.querySelectorAll("*");for(const k of w)if(k.tagName.toLowerCase()===o.split("-")[0]){const N=k.getBoundingClientRect();if(N.width>0&&N.height>0){const v=(k.innerText||"").slice(0,50).trim().replace(/\s+/g,"_");if(o.includes(v)){k.classList.add("vg-highlight-active"),F(k),k.scrollIntoView({behavior:"smooth",block:"center"});break}}}},y)})}};return f(),window.addEventListener("hashchange",f),()=>window.removeEventListener("hashchange",f)},[]),g.useEffect(()=>{if(!_)return;const f=()=>{_.classList.remove("vg-highlight-active"),F(null),window.history.replaceState&&window.history.replaceState(null,"",window.location.pathname+window.location.search)};return _.addEventListener("mouseover",f),()=>_.removeEventListener("mouseover",f)},[_]),g.useEffect(()=>{O()},[O]);const Y=g.useCallback(f=>{if(!s||d)return;const m=document.elementFromPoint(f.clientX,f.clientY);if(!m||m.id==="viewgate-overlay"||m.closest("#viewgate-ui")){u(null);return}m.getAttribute("data-source-path"),u({tag:m.tagName.toLowerCase(),source:m.getAttribute("data-source-path")||"unknown:0",rect:m.getBoundingClientRect(),element:m,previewText:(m.innerText||"").slice(0,100)||(m.getAttribute("placeholder")||"").slice(0,100)||m.tagName.toLowerCase(),semanticReference:Vt(m)})},[s,d]),V=g.useCallback(async f=>{if(!(!s||d)&&c){f.preventDefault(),f.stopPropagation(),L(!0);try{const m=c.element.style.display,j=window.getComputedStyle(c.element).display==="inline";j&&(c.element.style.display="inline-block");const o=await Pt(c.element,{backgroundColor:"#ffffff",pixelRatio:2,skipFonts:!0,style:{margin:"0",padding:"4px"}});j&&(c.element.style.display=m),h({...c,visualPreview:o})}catch(m){console.error("Failed to capture preview:",m),h(c)}finally{L(!1),u(null)}}},[s,c,d,z]);g.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",Y),window.addEventListener("click",V,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",Y),window.removeEventListener("click",V,!0)}),[s,d,Y,V]);const te=async()=>{if(!d||!x.trim())return;T(!0);const{semanticReference:f}=d,[m,j]=f.source.split(":"),o=j||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({filePath:m,line:parseInt(o),url:window.location.href,message:x,componentName:f.componentPath||d.tag,reference:f})})).ok)throw new Error("Backend failed");e(r.success,"success"),h(null),b(""),i(!1),O()}catch(p){console.error(p),e(r.error,"error")}finally{T(!1)}},B=f=>f.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:344",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:99999},id:"viewgate-ui",children:[l.jsx("button",{onClick:()=>i(!s),className:"vg-button-primary",style:{padding:"12px 24px",fontSize:"15px"},children:s?r.exitMode:r.enterMode}),W.length>0&&l.jsx("button",{onClick:()=>{q(!z),i(!1),h(null)},className:"vg-button-ghost",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments})]}),Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:369",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e5,cursor:"wait"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:382",className:"vg-glassmorphism",style:{padding:"30px 50px",fontWeight:700,display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"rgba(0,0,0,0.7)",color:"white",border:"1px solid rgba(255,255,255,0.1)"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:383",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:391",style:{position:"fixed",top:c.rect.top,left:c.rect.left,width:c.rect.width,height:c.rect.height,border:"2px solid var(--vg-primary)",backgroundColor:"rgba(37, 19, 236, 0.05)",pointerEvents:"none",zIndex:99998,borderRadius:"4px",boxShadow:"0 0 15px rgba(37, 19, 236, 0.2)",transition:"all 0.1s ease-out"}}),d&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:409",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:422",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"460px",background:"white",color:"#0f172a"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:428",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:430",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:431",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:433",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.tag]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:437",className:"vg-badge",children:d.tag}),d.semanticReference.source&&!d.semanticReference.source.startsWith("unknown")?l.jsx(l.Fragment,{children:l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:442",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",B(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:447",className:"vg-badge",style:{backgroundColor:"#f0f9ff",color:"#0369a1",borderColor:"#bae6fd",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["🆔 ",d.semanticReference.signature]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:452",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:458",style:{backgroundColor:"#f8fafc",borderRadius:"8px",border:"1px solid #e2e8f0",marginBottom:"20px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:467",style:{padding:"8px 12px",fontSize:"10px",color:"#94a3b8",textTransform:"uppercase",fontWeight:700,borderBottom:"1px solid #f1f5f9"},children:r.preview}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:470",style:{padding:"12px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px",maxHeight:"200px",overflow:"hidden",backgroundColor:"#fdfdfd"},children:d.visualPreview?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:481",style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx("img",{src:d.visualPreview,alt:"Element Preview",style:{maxWidth:"90%",maxHeight:"160px",objectFit:"contain",boxShadow:"0 4px 12px rgba(0,0,0,0.12)",borderRadius:"6px",border:"1px solid #e2e8f0",backgroundColor:"white"}})}):l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:504",style:{fontSize:"13px",color:"#64748b",fontStyle:"italic",textAlign:"center",padding:"0 20px"},children:['"',d.previewText,'"']})})]}),l.jsx("textarea",{className:"vg-textarea",value:x,onChange:f=>b(f.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:520",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:te,className:"vg-button-primary",disabled:C||!x.trim(),style:{opacity:C||!x.trim()?.6:1},children:C?r.submitting:r.send})]})]})}),z&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:542",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:555",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"600px",maxHeight:"80vh",background:"white",color:"#0f172a",display:"flex",flexDirection:"column"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:564",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:565",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:566",onClick:()=>q(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:569",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:$?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:571",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):W.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:573",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):W.map(f=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:576",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:f.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:582",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:583",style:{display:"flex",gap:"8px",alignItems:"center"},children:[f.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:585",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:587",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:589",style:{fontSize:"12px",color:"#64748b"},children:new Date(f.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:595",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',f.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:597",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:598",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📦 ",f.componentName?.split(" > ").pop()||"UI Element"]}),f.filePath&&f.filePath!=="unknown"&&l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:602",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📄 ",B(f.filePath)]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:608",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[f.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:610",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(O(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:632",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(O(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:655",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{if(f.url){le(!0);const m=new URL(f.url);m.hash=`vg_hl=${encodeURIComponent(f.reference.signature)}`,setTimeout(()=>{window.location.href=m.toString()},1e3)}},children:["👁️ ",r.review]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:672",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{U({title:r.deleteConfirm,message:r.confirmDelete,onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(O(),e(r.deleteSuccess,"success"))}catch{e(r.error,"error")}finally{U(null)}}})},children:["🗑️ ",r.close]})]})]},f._id))})]})}),ce&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:711",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e5,backdropFilter:"blur(10px)",color:"white"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:725",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"20px"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:726",className:"vg-spinner",style:{width:"50px",height:"50px",borderTopColor:"white"}}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:727",style:{fontSize:"18px",fontWeight:600,letterSpacing:"0.5px"},children:r.navigating})]})}),I&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:734",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e5},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:747",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",background:"white",textAlign:"center"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:753",style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),l.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:754",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:700,color:"#0f172a"},children:I.title}),l.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:755",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#64748b",lineHeight:1.5},children:I.message}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:757",style:{display:"flex",gap:"12px",justifyContent:"center"},children:[l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:758",className:"vg-button-ghost",onClick:()=>U(null),style:{flex:1},children:r.no}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:765",className:"vg-button-primary",style:{backgroundColor:"#ef4444",flex:1},onClick:I.onConfirm,children:r.yes})]})]})})]})};function oe(e,t,r){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const n=c=>c.replace(/\\/g,"/"),a=n(t).replace(n(r),"");return e.split(`
|
|
8
|
+
`)}async function jt(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await kt(e,t);if(r){const n=document.createElement("style"),a=document.createTextNode(r);n.appendChild(a),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function Tt(e,t={}){const{width:r,height:n}=xe(e,t),a=await K(e,t,!0);return await jt(a,t),await ke(a,t),bt(a,t),await $e(a,r,n)}async function Ot(e,t={}){const{width:r,height:n}=xe(e,t),a=await Tt(e,t),s=await Z(a),i=document.createElement("canvas"),c=i.getContext("2d"),u=t.pixelRatio||ze(),d=t.canvasWidth||r,h=t.canvasHeight||n;return i.width=d*u,i.height=h*u,t.skipAutoScale||We(i),i.style.width=`${d}`,i.style.height=`${h}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,i.width,i.height)),c.drawImage(s,0,0,i.width,i.height),i}async function Pt(e,t={}){return(await Ot(e,t)).toDataURL()}const _t=e=>{const r=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!r)return"";const n=[];let a=e[r];for(;a;){const s=a.type;if(typeof s=="function"){const i=s.displayName||s.name;i&&!i.includes("ViewGate")&&!n.includes(i)&&n.unshift(i)}a=a.return}return n.join(" > ")||"Generic Component"},Vt=e=>{let t="unknown:0",r=e;for(;r;){const d=r.getAttribute("data-source-path");if(d){t=d;break}r=r.parentElement}const n=_t(e),s=(d=>{const h=[];let x=d;for(;x&&x.nodeType===Node.ELEMENT_NODE;){let b=x.nodeName.toLowerCase();if(x.id){b+="#"+x.id,h.unshift(b);break}else{let C=x,T=1;for(;C.previousElementSibling;)C=C.previousElementSibling,C.nodeName.toLowerCase()===b&&T++;T>1&&(b+=`:nth-of-type(${T})`)}h.unshift(b),x=x.parentElement}return h.join(" > ")})(e),i=(e.innerText||"").slice(0,50).trim(),c={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(d=>{const h=e.getAttribute(d);h&&(c[d]=h)});const u=`${e.tagName.toLowerCase()}-${i.replace(/\s+/g,"_")}-${s.split(" > ").slice(-2).join("_")}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:s,outerHtml:(e.outerHTML||"").slice(0,1e3),parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:n,signature:u,source:t,attributes:c,metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`}}},Ve=()=>{const{addToast:e,language:t,t:r,apiKey:n,baseUrl:a}=he(),[s,i]=g.useState(!1),[c,u]=g.useState(null),[d,h]=g.useState(null),[x,b]=g.useState(""),[C,T]=g.useState(!1),[Q,L]=g.useState(!1),[z,q]=g.useState(!1),[W,ie]=g.useState([]),[I,U]=g.useState(null),[ce,le]=g.useState(!1),[$,ee]=g.useState(!1),[_,F]=g.useState(null),O=g.useCallback(async()=>{if(n){ee(!0);try{const f=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":n}});if(f.ok){const m=await f.json();ie(m)}}catch(f){console.error("Failed to fetch annotations",f)}finally{ee(!1)}}},[n,a]);g.useEffect(()=>{const f=()=>{const m=window.location.hash;if(m.includes("vg_hl=")){const j=m.split("vg_hl=");if(j.length<2)return;const o=decodeURIComponent(j[1]);[100,500,1e3,2e3].forEach(y=>{setTimeout(()=>{const w=document.querySelectorAll("*");for(const k of w)if(k.tagName.toLowerCase()===o.split("-")[0]){const N=k.getBoundingClientRect();if(N.width>0&&N.height>0){const v=(k.innerText||"").slice(0,50).trim().replace(/\s+/g,"_");if(o.includes(v)){k.classList.add("vg-highlight-active"),F(k),k.scrollIntoView({behavior:"smooth",block:"center"});break}}}},y)})}};return f(),window.addEventListener("hashchange",f),()=>window.removeEventListener("hashchange",f)},[]),g.useEffect(()=>{if(!_)return;const f=()=>{_.classList.remove("vg-highlight-active"),F(null),window.history.replaceState&&window.history.replaceState(null,"",window.location.pathname+window.location.search)};return _.addEventListener("mouseover",f),()=>_.removeEventListener("mouseover",f)},[_]),g.useEffect(()=>{O()},[O]);const Y=g.useCallback(f=>{if(!s||d)return;const m=document.elementFromPoint(f.clientX,f.clientY);if(!m||m.id==="viewgate-overlay"||m.closest("#viewgate-ui")){u(null);return}m.getAttribute("data-source-path"),u({tag:m.tagName.toLowerCase(),source:m.getAttribute("data-source-path")||"unknown:0",rect:m.getBoundingClientRect(),element:m,previewText:(m.innerText||"").slice(0,100)||(m.getAttribute("placeholder")||"").slice(0,100)||m.tagName.toLowerCase(),semanticReference:Vt(m)})},[s,d]),V=g.useCallback(async f=>{if(!(!s||d)&&c){f.preventDefault(),f.stopPropagation(),L(!0);try{const m=c.element.style.display,j=window.getComputedStyle(c.element).display==="inline";j&&(c.element.style.display="inline-block");const o=await Pt(c.element,{backgroundColor:"#ffffff",pixelRatio:2,skipFonts:!0,style:{margin:"0",padding:"4px"}});j&&(c.element.style.display=m),h({...c,visualPreview:o})}catch(m){console.error("Failed to capture preview:",m),h(c)}finally{L(!1),u(null)}}},[s,c,d,z]);g.useEffect(()=>(s&&!d?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("mousemove",Y),window.addEventListener("click",V,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("mousemove",Y),window.removeEventListener("click",V,!0)}),[s,d,Y,V]);const te=async()=>{if(!d||!x.trim())return;T(!0);const{semanticReference:f}=d,[m,j]=f.source.split(":"),o=j||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({filePath:m,line:parseInt(o),url:window.location.href,message:x,componentName:f.componentPath||d.tag,reference:f})})).ok)throw new Error("Backend failed");e(r.success,"success"),h(null),b(""),i(!1),O()}catch(p){console.error(p),e(r.error,"error")}finally{T(!1)}},B=f=>f.split("/").pop()?.split("\\").pop()||"unknown";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:344",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:99999},id:"viewgate-ui",children:[l.jsx("button",{onClick:()=>i(!s),className:"vg-button-primary vg-button-appear",style:{padding:"12px 24px",fontSize:"15px"},children:s?r.exitMode:r.enterMode}),W.length>0&&l.jsx("button",{onClick:()=>{q(!z),i(!1),h(null)},className:"vg-button-ghost vg-button-appear",style:{padding:"12px 24px",fontSize:"15px",marginLeft:"12px",background:"white"},children:r.viewComments},"view-comments")]}),Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:370",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e5,cursor:"wait"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:383",className:"vg-glassmorphism",style:{padding:"30px 50px",fontWeight:700,display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:"rgba(0,0,0,0.7)",color:"white",border:"1px solid rgba(255,255,255,0.1)"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:384",className:"vg-spinner"}),"Capturing..."]})}),s&&c&&!d&&!Q&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:392",style:{position:"fixed",top:c.rect.top,left:c.rect.left,width:c.rect.width,height:c.rect.height,border:"2px solid var(--vg-primary)",backgroundColor:"rgba(37, 19, 236, 0.05)",pointerEvents:"none",zIndex:99998,borderRadius:"4px",boxShadow:"0 0 15px rgba(37, 19, 236, 0.2)",transition:"all 0.1s ease-out"}}),d&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:410",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:423",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"460px",background:"white",color:"#0f172a"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:429",style:{margin:"0 0 10px 0",fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:431",style:{marginBottom:"20px"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:432",style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[d.semanticReference.componentPath?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:434",className:"vg-badge",style:{backgroundColor:"#f5f3ff",color:"#7c3aed",borderColor:"#ddd6fe"},children:["📦 ",d.tag]}):l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:438",className:"vg-badge",children:d.tag}),d.semanticReference.source&&!d.semanticReference.source.startsWith("unknown")?l.jsx(l.Fragment,{children:l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:443",className:"vg-badge",style:{backgroundColor:"#fdf2f8",color:"#db2777",borderColor:"#fbcfe8"},children:["📄 ",B(d.semanticReference.source.split(":")[0]||"unknown")]})}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:448",className:"vg-badge",style:{backgroundColor:"#f0f9ff",color:"#0369a1",borderColor:"#bae6fd",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["🆔 ",d.semanticReference.signature]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:453",style:{marginTop:"8px",fontSize:"11px",color:"#94a3b8"},children:["🎯 ",d.semanticReference.selector]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:459",style:{backgroundColor:"#f8fafc",borderRadius:"8px",border:"1px solid #e2e8f0",marginBottom:"20px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:468",style:{padding:"8px 12px",fontSize:"10px",color:"#94a3b8",textTransform:"uppercase",fontWeight:700,borderBottom:"1px solid #f1f5f9"},children:r.preview}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:471",style:{padding:"12px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100px",maxHeight:"200px",overflow:"hidden",backgroundColor:"#fdfdfd"},children:d.visualPreview?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:482",style:{position:"relative",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx("img",{src:d.visualPreview,alt:"Element Preview",style:{maxWidth:"90%",maxHeight:"160px",objectFit:"contain",boxShadow:"0 4px 12px rgba(0,0,0,0.12)",borderRadius:"6px",border:"1px solid #e2e8f0",backgroundColor:"white"}})}):l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:505",style:{fontSize:"13px",color:"#64748b",fontStyle:"italic",textAlign:"center",padding:"0 20px"},children:['"',d.previewText,'"']})})]}),l.jsx("textarea",{className:"vg-textarea",value:x,onChange:f=>b(f.target.value),rows:4,placeholder:r.placeholder,autoFocus:!0}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:521",style:{display:"flex",justifyContent:"flex-end",gap:"12px",marginTop:"24px"},children:[l.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",children:r.cancel}),l.jsx("button",{onClick:te,className:"vg-button-primary",disabled:C||!x.trim(),style:{opacity:C||!x.trim()?.6:1},children:C?r.submitting:r.send})]})]})}),z&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:543",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:556",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"600px",maxHeight:"80vh",background:"white",color:"#0f172a",display:"flex",flexDirection:"column"},children:[l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:565",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px"},children:[l.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:566",style:{margin:0,fontSize:"24px",fontWeight:800},children:r.feedbackHeader}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:567",onClick:()=>q(!1),className:"vg-button-ghost",style:{padding:"6px 12px"},children:"✕"})]}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:570",style:{overflowY:"auto",flex:1,paddingRight:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:$?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:572",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:"Cargando..."}):W.length===0?l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:574",style:{textAlign:"center",padding:"40px",color:"#64748b"},children:r.noComments}):W.map(f=>l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:577",style:{border:"1px solid #e2e8f0",borderRadius:"12px",padding:"16px",backgroundColor:f.status==="ready_for_review"?"#f0fdf4":"#fff"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:583",style:{display:"flex",justifyContent:"space-between",marginBottom:"12px"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:584",style:{display:"flex",gap:"8px",alignItems:"center"},children:[f.status==="ready_for_review"?l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:586",className:"vg-badge",style:{backgroundColor:"#dcfce7",color:"#166534",borderColor:"#bbf7d0"},children:["✓ ",r.readyForReview]}):l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:588",className:"vg-badge",style:{backgroundColor:"#fef3c7",color:"#92400e",borderColor:"#fde68a"},children:["⏳ ",r.pending]}),l.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:590",style:{fontSize:"12px",color:"#64748b"},children:new Date(f.timestamp).toLocaleString()})]})}),l.jsxs("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:596",style:{margin:"0 0 12px 0",fontSize:"15px",fontWeight:600},children:['"',f.message,'"']}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:598",style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"16px"},children:[l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:599",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📦 ",f.componentName?.split(" > ").pop()||"UI Element"]}),f.filePath&&f.filePath!=="unknown"&&l.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:603",className:"vg-badge",style:{backgroundColor:"#f1f5f9",color:"#475569",border:"none"},children:["📄 ",B(f.filePath)]})]}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:609",style:{display:"flex",gap:"8px",justifyContent:"flex-end",borderTop:"1px solid #e2e8f0",paddingTop:"16px",marginTop:"8px"},children:[f.status==="pending"?l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:611",className:"vg-button-primary",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"ready_for_review"})})).ok&&(O(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["✅ ",r.markReady]}):l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:633",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":n},body:JSON.stringify({status:"pending"})})).ok&&(O(),e(r.updateSuccess,"success"))}catch{e(r.error,"error")}},children:["🔄 ",r.reopen]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:656",className:"vg-button-ghost",style:{display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{if(f.url){le(!0);const m=new URL(f.url);m.hash=`vg_hl=${encodeURIComponent(f.reference.signature)}`,setTimeout(()=>{window.location.href=m.toString()},1e3)}},children:["👁️ ",r.review]}),l.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:673",className:"vg-button-primary",style:{backgroundColor:"#ef4444",display:"flex",alignItems:"center",gap:"6px"},onClick:()=>{U({title:r.deleteConfirm,message:r.confirmDelete,onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${f._id}`,{method:"DELETE",headers:{"x-api-key":n}})).ok&&(O(),e(r.deleteSuccess,"success"))}catch{e(r.error,"error")}finally{U(null)}}})},children:["🗑️ ",r.close]})]})]},f._id))})]})}),ce&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:712",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:3e5,backdropFilter:"blur(10px)",color:"white"},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:726",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"20px"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:727",className:"vg-spinner",style:{width:"50px",height:"50px",borderTopColor:"white"}}),l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:728",style:{fontSize:"18px",fontWeight:600,letterSpacing:"0.5px"},children:r.navigating})]})}),I&&l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:735",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2e5},children:l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:748",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",background:"white",textAlign:"center"},children:[l.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:754",style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),l.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:755",style:{margin:"0 0 12px 0",fontSize:"20px",fontWeight:700,color:"#0f172a"},children:I.title}),l.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:756",style:{margin:"0 0 24px 0",fontSize:"15px",color:"#64748b",lineHeight:1.5},children:I.message}),l.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:758",style:{display:"flex",gap:"12px",justifyContent:"center"},children:[l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:759",className:"vg-button-ghost",onClick:()=>U(null),style:{flex:1},children:r.no}),l.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:766",className:"vg-button-primary",style:{backgroundColor:"#ef4444",flex:1},onClick:I.onConfirm,children:r.yes})]})]})})]})};function oe(e,t,r){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const n=c=>c.replace(/\\/g,"/"),a=n(t).replace(n(r),"");return e.split(`
|
|
9
9
|
`).map((c,u)=>{const d=u+1;return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(h,x,b)=>h.includes("data-source-path")||b==="Fragment"||b==="React.Fragment"?h:`${x}<${b} data-source-path="${a}:${d}"`)}).join(`
|
|
10
10
|
`)}function At(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:oe(e,t,process.cwd()),map:null}}}}function Gt(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,oe(e,t,process.cwd())):e}R.ViewGate=Fe,R.ViewGateOverlay=Ve,R.transformSourcePaths=oe,R.useViewGate=he,R.viewgateNextLoader=Gt,R.viewgatePlugin=At,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
|