viewgate-wrapper 1.10.0 → 1.10.4

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,17 +1,17 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";body{margin:0!important;padding:0!important}:root{--vg-primary: #6366f1;--vg-primary-glow: rgba(99, 102, 241, .5);--vg-primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);--vg-bg-glass: rgba(255, 255, 255, .7);--vg-radius: 16px;--vg-font-main: "Inter", system-ui, sans-serif;--vg-font-alt: "Inter", system-ui, sans-serif;--placeholder-color: #94a3b8;--vg-glass-border: rgba(255, 255, 255, .3);--vg-shadow-premium: 0 20px 50px rgba(0, 0, 0, .1)}.vg-container,.vg-container *{box-sizing:border-box}.vg-container{font-family:var(--vg-font-main);-webkit-font-smoothing:antialiased}.vg-glassmorphism{background:var(--vg-bg-glass);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid var(--vg-glass-border);box-shadow:0 8px 32px #0000001a;border-radius:var(--vg-radius);position:relative}.vg-button-primary{background:var(--vg-primary-gradient);color:#fff;border:none;padding:12px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 12px #6366f14d}.vg-button-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #6366f166}.vg-button-primary:disabled{opacity:.5;cursor:not-allowed;transform:none}.vg-button-ghost{background:#fffc;color:#1e293b;border:1px solid #e2e8f0;padding:10px 24px;font-family:var(--vg-font-main);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;border-radius:99px;display:flex;align-items:center;justify-content:center;gap:8px}.vg-button-ghost:hover{background:#fff;border-color:#cbd5e1;box-shadow:0 4px 12px #0000000d}.vg-badge{background:#f1f5f9;color:#64748b;padding:4px 12px;font-size:11px;border-radius:99px;font-weight:600;display:inline-flex;align-items:center;gap:6px}.vg-textarea{width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:12px;padding:12px;font-family:var(--vg-font-main);font-size:15px;color:#0f172a;resize:none;outline:none;background:#f8fafc;transition:all .2s ease}.vg-textarea:focus{background:#fff;border-color:var(--vg-primary);box-shadow:0 0 0 4px #6366f11a}@keyframes vg-pop-in{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.08);opacity:1}to{transform:scale(1);opacity:1}}@keyframes vg-slide-up-fade{0%{transform:translateY(12px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.vg-animate-pop{animation:vg-pop-in .5s cubic-bezier(.34,1.56,.64,1) forwards}.vg-animate-slide-up{animation:vg-slide-up-fade .4s cubic-bezier(.22,1,.36,1) forwards}.vg-button-primary,.vg-button-ghost,.vg-pin-container,.vg-action-bar,.vg-glassmorphism{transition:all .3s cubic-bezier(.4,0,.2,1)}.vg-animate-slide{animation:vg-slide-in .4s cubic-bezier(.22,1,.36,1) forwards}.vg-animate-fade{animation:vg-fade-in .3s ease-out forwards}.vg-toasts{position:fixed;top:24px;right:24px;display:flex;flex-direction:column;gap:12px}.vg-toast{padding:12px 20px;display:flex;align-items:center;gap:12px;min-width:300px;border-radius:12px;box-shadow:0 10px 30px #0000001a;background:#fff}.vg-toast.success{border-left:6px solid #22c55e}.vg-toast.error{border-left:6px solid #ef4444}.vg-backdrop-blur{position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(8px) grayscale(.2);backdrop-filter:blur(8px) grayscale(.2);background:#0000001a;pointer-events:none;transition:opacity .3s ease,clip-path .2s cubic-bezier(.19,1,.22,1)}.vg-selection-pulse{position:fixed;pointer-events:none;border:2px solid var(--vg-primary);border-radius:8px;box-shadow:0 0 0 0 var(--vg-primary-glow);animation:vg-pulse 2s infinite;transition:all .2s cubic-bezier(.19,1,.22,1)}@keyframes vg-pulse{0%{box-shadow:0 0 0 0 var(--vg-primary-glow)}70%{box-shadow:0 0 0 15px #6366f100}to{box-shadow:0 0 #6366f100}}.vg-selection-label{position:absolute;top:-40px;left:0;background:var(--vg-primary-gradient);color:#fff;padding:8px 16px;border-radius:20px;font-size:13px;font-weight:700;white-space:nowrap;box-shadow:0 4px 12px #6366f14d;display:flex;align-items:center;gap:8px}.vg-pin-container{transition:transform .2s ease}.vg-pin-container:hover{transform:scale(1.1)}.vg-formal-pin{width:32px;height:32px;border-radius:50%;background:var(--vg-primary-gradient);border:3px solid white;box-shadow:0 4px 12px #6366f166;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .2s ease}.vg-formal-pin.ready{background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 4px 12px #10b98166}.vg-pin-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);padding:12px 16px;border-radius:12px;background:#fff;color:#1e293b;width:240px;font-size:13px;box-shadow:0 10px 40px #00000026;opacity:0;pointer-events:none;transition:all .2s ease;border:1px solid #e2e8f0}.vg-pin-tooltip.vg-top{top:auto;bottom:calc(100% + 12px)}.vg-pin-container:hover .vg-pin-tooltip{opacity:1;transform:translate(-50%) translateY(-5px)}.vg-action-bar{display:flex;gap:12px;padding:0;background:transparent;border:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}.vg-custom-scrollbar::-webkit-scrollbar{width:6px}.vg-custom-scrollbar::-webkit-scrollbar-track{background:transparent}.vg-custom-scrollbar::-webkit-scrollbar-thumb{background:#6366f166;border-radius:10px;transition:all .2s ease}.vg-custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#6366f1b3}.vg-spinner{border:3px solid rgba(99,102,241,.1);border-top:3px solid var(--vg-primary);border-radius:50%;width:32px;height:32px;animation:vg-spin .8s linear infinite}@keyframes vg-spin{to{transform:rotate(360deg)}}.vg-cursor-pointer,.vg-cursor-pointer *{cursor:pointer!important}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(_,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(_=typeof globalThis<"u"?globalThis:_||self,m(_.ViewGateWrapper={},_.React,_.ReactDOM))})(this,(function(_,m,Qe){"use strict";var re={exports:{}},K={};var be;function qe(){if(be)return K;be=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var o=null;if(s!==void 0&&(o=""+s),a.key!==void 0&&(o=""+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:r,key:o,ref:a!==void 0?a:null,props:s}}return K.Fragment=t,K.jsx=n,K.jsxs=n,K}var Q={};var Se;function et(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===we?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case I:return"Fragment";case N:return"Profiler";case V:return"StrictMode";case z:return"Suspense";case Je:return"SuspenseList";case ie:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case L:return"Portal";case $:return l.displayName||"Context";case E:return(l._context.displayName||"Context")+".Consumer";case T:var p=l.render;return l=l.displayName,l||(l=p.displayName||p.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Ze:return p=l.displayName||null,p!==null?p:e(l.type)||"Memo";case q:p=l._payload,l=l._init;try{return e(l(p))}catch{}}return null}function t(l){return""+l}function n(l){try{t(l);var p=!1}catch{p=!0}if(p){p=console;var v=p.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return v.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),t(l)}}function r(l){if(l===I)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===q)return"<...>";try{var p=e(l);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function a(){var l=X.A;return l===null?null:l.getOwner()}function s(){return Error("react-stack-top-frame")}function o(l){if(M.call(l,"key")){var p=Object.getOwnPropertyDescriptor(l,"key").get;if(p&&p.isReactWarning)return!1}return l.key!==void 0}function c(l,p){function v(){Z||(Z=!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))}v.isReactWarning=!0,Object.defineProperty(l,"key",{get:v,configurable:!0})}function u(){var l=e(this.type);return te[l]||(te[l]=!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.")),l=this.props.ref,l!==void 0?l:null}function f(l,p,v,b,D,W){var C=v.ref;return l={$$typeof:A,type:l,key:p,props:v,_owner:b},(C!==void 0?C:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:u}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function y(l,p,v,b,D,W){var C=p.children;if(C!==void 0)if(b)if(ee(C)){for(b=0;b<C.length;b++)w(C[b]);Object.freeze&&Object.freeze(C)}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 w(C);if(M.call(p,"key")){C=e(l);var d=Object.keys(p).filter(function(g){return g!=="key"});b=0<d.length?"{key: someKey, "+d.join(": ..., ")+": ...}":"{key: someKey}",le[C+b]||(d=0<d.length?"{"+d.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ (function(_,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(_=typeof globalThis<"u"?globalThis:_||self,m(_.ViewGateWrapper={},_.React,_.ReactDOM))})(this,(function(_,m,Qe){"use strict";var se={exports:{}},K={};var be;function qe(){if(be)return K;be=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var o=null;if(s!==void 0&&(o=""+s),a.key!==void 0&&(o=""+a.key),"key"in a){s={};for(var i in a)i!=="key"&&(s[i]=a[i])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:o,ref:a!==void 0?a:null,props:s}}return K.Fragment=t,K.jsx=n,K.jsxs=n,K}var Q={};var Se;function et(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===ve?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case I:return"Fragment";case N:return"Profiler";case T:return"StrictMode";case z:return"Suspense";case Je:return"SuspenseList";case ce:return"Activity"}if(typeof l=="object")switch(typeof l.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),l.$$typeof){case L:return"Portal";case $:return l.displayName||"Context";case E:return(l._context.displayName||"Context")+".Consumer";case P:var p=l.render;return l=l.displayName,l||(l=p.displayName||p.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Ze:return p=l.displayName||null,p!==null?p:e(l.type)||"Memo";case q:p=l._payload,l=l._init;try{return e(l(p))}catch{}}return null}function t(l){return""+l}function n(l){try{t(l);var p=!1}catch{p=!0}if(p){p=console;var v=p.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&l[Symbol.toStringTag]||l.constructor.name||"Object";return v.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),t(l)}}function r(l){if(l===I)return"<>";if(typeof l=="object"&&l!==null&&l.$$typeof===q)return"<...>";try{var p=e(l);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function a(){var l=X.A;return l===null?null:l.getOwner()}function s(){return Error("react-stack-top-frame")}function o(l){if(M.call(l,"key")){var p=Object.getOwnPropertyDescriptor(l,"key").get;if(p&&p.isReactWarning)return!1}return l.key!==void 0}function i(l,p){function v(){Z||(Z=!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))}v.isReactWarning=!0,Object.defineProperty(l,"key",{get:v,configurable:!0})}function u(){var l=e(this.type);return te[l]||(te[l]=!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.")),l=this.props.ref,l!==void 0?l:null}function f(l,p,v,b,D,W){var C=v.ref;return l={$$typeof:V,type:l,key:p,props:v,_owner:b},(C!==void 0?C:null)!==null?Object.defineProperty(l,"ref",{enumerable:!1,get:u}):Object.defineProperty(l,"ref",{enumerable:!1,value:null}),l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(l,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(l,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(l,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}function h(l,p,v,b,D,W){var C=p.children;if(C!==void 0)if(b)if(ee(C)){for(b=0;b<C.length;b++)w(C[b]);Object.freeze&&Object.freeze(C)}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 w(C);if(M.call(p,"key")){C=e(l);var d=Object.keys(p).filter(function(x){return x!=="key"});b=0<d.length?"{key: someKey, "+d.join(": ..., ")+": ...}":"{key: someKey}",de[C+b]||(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
- <%s key={someKey} {...props} />`,b,C,d,C),le[C+b]=!0)}if(C=null,v!==void 0&&(n(v),C=""+v),o(p)&&(n(p.key),C=""+p.key),"key"in p){v={};for(var h in p)h!=="key"&&(v[h]=p[h])}else v=p;return C&&c(v,typeof l=="function"?l.displayName||l.name||"Unknown":l),f(l,C,v,a(),D,W)}function w(l){x(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===q&&(l._payload.status==="fulfilled"?x(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function x(l){return typeof l=="object"&&l!==null&&l.$$typeof===A}var S=m,A=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),$=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Ze=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),we=Symbol.for("react.client.reference"),X=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,ee=Array.isArray,J=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(l){return l()}};var Z,te={},ne=S.react_stack_bottom_frame.bind(S,s)(),ce=J(r(s)),le={};Q.Fragment=I,Q.jsx=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return y(l,p,v,!1,b?Error("react-stack-top-frame"):ne,b?J(r(l)):ce)},Q.jsxs=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return y(l,p,v,!0,b?Error("react-stack-top-frame"):ne,b?J(r(l)):ce)}})()),Q}var Ce;function tt(){return Ce||(Ce=1,process.env.NODE_ENV==="production"?re.exports=qe():re.exports=et()),re.exports}var i=tt();const nt=({children:e})=>{const t=m.useRef(null),[n,r]=m.useState(null);return m.useEffect(()=>{if(t.current&&!t.current.shadowRoot){const a=t.current.attachShadow({mode:"open"});document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach(c=>{(c.textContent?.includes(".vg-")||c.textContent?.includes("--vg-"))&&a.appendChild(c.cloneNode(!0))});const o=document.createElement("link");o.rel="stylesheet",o.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",a.appendChild(o),r(a)}},[]),i.jsx("div",{"data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:t,id:"viewgate-shadow-host",children:n&&Qe.createPortal(e,n)})};const Ee=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const rt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const st=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ke=e=>{const t=st(e);return t.charAt(0).toUpperCase()+t.slice(1)};var at={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ot=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const it=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:o,...c},u)=>m.createElement("svg",{ref:u,...at,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ee("lucide",a),...!s&&!ot(c)&&{"aria-hidden":"true"},...c},[...o.map(([f,y])=>m.createElement(f,y)),...Array.isArray(s)?s:[s]]));const O=(e,t)=>{const n=m.forwardRef(({className:r,...a},s)=>m.createElement(it,{ref:s,iconNode:t,className:Ee(`lucide-${rt(ke(e))}`,`lucide-${e}`,r),...a}));return n.displayName=ke(e),n};const ct=O("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const U=O("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Re=O("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const lt=O("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const dt=O("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const de=O("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const ut=O("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const pt=O("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const mt=O("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const ft=O("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const _e=O("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const je=O("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ht={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 permanently delete this comment?",markReadyConfirm:"Mark as Ready?",confirmMarkReady:"Are you sure you want to mark this comment as ready for review?",reopenConfirm:"Reopen Comment?",confirmReopen:"Are you sure you want to reopen this comment and set it back to pending?",yes:"Yes, proceed",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",updateSuccess:"Updated successfully.",navigating:"Redirecting to review...",selectToComment:"Click to comment",feedbackSubheader:"What would you like to improve here?",sendFeedback:"Send Comment",edit:"Edit",save:"Save",commentDetails:"Comment Details",annotations:"Comments",viewAll:"View All"},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 permanentemente este comentario?",markReadyConfirm:"¿Marcar como listo?",confirmMarkReady:"¿Estás seguro de que deseas marcar este comentario como listo para revisión?",reopenConfirm:"¿Reabrir comentario?",confirmReopen:"¿Estás seguro de que deseas reabrir este comentario y volverlo al estado pendiente?",yes:"Sí, continuar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Actualizado correctamente.",navigating:"Redirigiendo a revisión...",selectToComment:"Haz clic para comentar",feedbackSubheader:"¿Qué te gustaría mejorar aquí?",sendFeedback:"Enviar Comentario",edit:"Editar",save:"Guardar",commentDetails:"Detalles del Comentario",annotations:"Comentarios",viewAll:"Ver Todos"}},Oe=m.createContext(void 0),Ve=()=>{const e=m.useContext(Oe);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},gt=({children:e,language:t="es",apiKey:n,baseUrl:r="https://view-gate.vercel.app"})=>{const[a,s]=m.useState([]),o=(u,f)=>{const y=Date.now();s(w=>[...w,{id:y,message:u,type:f}]),setTimeout(()=>{s(w=>w.filter(x=>x.id!==y))},4e3)},c=ht[t];return i.jsxs(Oe.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:211",value:{addToast:o,language:t,t:c,apiKey:n,baseUrl:r},children:[e,i.jsx(nt,{"data-source-path":"/src/components/ViewGateProvider.tsx:213",children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:214",className:"vg-container",children:[i.jsx(Xe,{"data-source-path":"/src/components/ViewGateProvider.tsx:215"}),i.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:216",className:"vg-toasts",style:{zIndex:2147483646},children:a.map(u=>i.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:218",className:`vg-toast vg-animate-slide ${u.type}`,children:[u.type==="success"?i.jsx(U,{"data-source-path":"/src/components/ViewGateProvider.tsx:220",size:24,color:"#22c55e"}):i.jsx(ct,{"data-source-path":"/src/components/ViewGateProvider.tsx:222",size:24,color:"#ef4444"}),i.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:224",children:[i.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:225",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:u.type==="success"?c.successHeader:c.errorHeader}),i.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:228",style:{fontSize:"14px",color:"#64748b"},children:u.message})]})]},u.id))})]})})]})};function yt(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 n=document.implementation.createHTMLDocument(),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),t&&(r.href=t),a.href=e,a.href}const xt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function F(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let B=null;function Te(e={}){return B||(e.includeStyleProperties?(B=e.includeStyleProperties,B):(B=F(window.getComputedStyle(document.documentElement)),B))}function se(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function wt(e){const t=se(e,"border-left-width"),n=se(e,"border-right-width");return e.clientWidth+t+n}function vt(e){const t=se(e,"border-top-width"),n=se(e,"border-bottom-width");return e.clientHeight+t+n}function Pe(e,t={}){const n=t.width||wt(e),r=t.height||vt(e);return{width:n,height:r}}function bt(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const j=16384;function St(e){(e.width>j||e.height>j)&&(e.width>j&&e.height>j?e.width>e.height?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j):e.width>j?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j))}function ae(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Ct(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Et(e,t,n){const r="http://www.w3.org/2000/svg",a=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${n}`),a.setAttribute("viewBox",`0 0 ${t} ${n}`),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),Ct(a)}const k=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||k(n,t)};function kt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Rt(e,t){return Te(t).map(n=>{const r=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${r}${a?" !important":""};`}).join(" ")}function _t(e,t,n,r){const a=`.${e}:${t}`,s=n.cssText?kt(n):Rt(n,r);return document.createTextNode(`${a}{${s}}`)}function Ae(e,t,n,r){const a=window.getComputedStyle(e,n),s=a.getPropertyValue("content");if(s===""||s==="none")return;const o=xt();try{t.className=`${t.className} ${o}`}catch{return}const c=document.createElement("style");c.appendChild(_t(o,n,a,r)),t.appendChild(c)}function jt(e,t,n){Ae(e,t,":before",n),Ae(e,t,":after",n)}const Ne="application/font-woff",Ge="image/jpeg",Ot={woff:Ne,woff2:Ne,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ge,jpeg:Ge,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Vt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ue(e){const t=Vt(e).toLowerCase();return Ot[t]||""}function Tt(e){return e.split(/,/)[1]}function pe(e){return e.search(/^(data:)/)!==-1}function Pt(e,t){return`data:${t};base64,${e}`}async function Le(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const a=await r.blob();return new Promise((s,o)=>{const c=new FileReader;c.onerror=o,c.onloadend=()=>{try{s(n({res:r,result:c.result}))}catch(u){o(u)}},c.readAsDataURL(a)})}const me={};function At(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function fe(e,t,n){const r=At(e,t,n.includeQueryParams);if(me[r]!=null)return me[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await Le(e,n.fetchRequestInit,({res:o,result:c})=>(t||(t=o.headers.get("Content-Type")||""),Tt(c)));a=Pt(s,t)}catch(s){a=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o)}return me[r]=a,a}async function Nt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ae(t)}async function Gt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),o=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,o?.drawImage(e,0,0,s.width,s.height);const c=s.toDataURL();return ae(c)}const n=e.poster,r=ue(n),a=await fe(n,r,t);return ae(a)}async function Lt(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await oe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function It(e,t){return k(e,HTMLCanvasElement)?Nt(e):k(e,HTMLVideoElement)?Gt(e,t):k(e,HTMLIFrameElement)?Lt(e,t):e.cloneNode(Ie(e))}const zt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ie=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Ft(e,t,n){var r,a;if(Ie(t))return t;let s=[];return zt(e)&&e.assignedNodes?s=F(e.assignedNodes()):k(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=F(e.contentDocument.body.childNodes):s=F(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||k(e,HTMLVideoElement)||await s.reduce((o,c)=>o.then(()=>oe(c,n)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Mt(e,t,n){const r=t.style;if(!r)return;const a=window.getComputedStyle(e);a.cssText?(r.cssText=a.cssText,r.transformOrigin=a.transformOrigin):Te(n).forEach(s=>{let o=a.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),k(e,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),r.setProperty(s,o,a.getPropertyPriority(s))})}function Dt(e,t){k(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),k(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ht(e,t){if(k(e,HTMLSelectElement)){const r=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));r&&r.setAttribute("selected","")}}function $t(e,t,n){return k(t,Element)&&(Mt(e,t,n),jt(e,t,n),Dt(e,t),Ht(e,t)),t}async function Wt(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const c=n[s].getAttribute("xlink:href");if(c){const u=e.querySelector(c),f=document.querySelector(c);!u&&f&&!r[c]&&(r[c]=await oe(f,t,!0))}}const a=Object.values(r);if(a.length){const s="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg");o.setAttribute("xmlns",s),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const c=document.createElementNS(s,"defs");o.appendChild(c);for(let u=0;u<a.length;u++)c.appendChild(a[u]);e.appendChild(o)}return e}async function oe(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>It(r,t)).then(r=>Ft(e,r,t)).then(r=>$t(e,r,t)).then(r=>Wt(r,t))}const ze=/url\((['"]?)([^'"]+?)\1\)/g,Ut=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Bt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Yt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Xt(e){const t=[];return e.replace(ze,(n,r,a)=>(t.push(a),n)),t.filter(n=>!pe(n))}async function Jt(e,t,n,r,a){try{const s=n?yt(t,n):t,o=ue(t);let c;return a||(c=await fe(s,o,r)),e.replace(Yt(t),`$1${c}$3`)}catch{}return e}function Zt(e,{preferredFontFormat:t}){return t?e.replace(Bt,n=>{for(;;){const[r,,a]=Ut.exec(n)||[];if(!a)return"";if(a===t)return`src: ${r};`}}):e}function Fe(e){return e.search(ze)!==-1}async function Me(e,t,n){if(!Fe(e))return e;const r=Zt(e,n);return Xt(r).reduce((s,o)=>s.then(c=>Jt(c,o,t,n)),Promise.resolve(r))}async function Y(e,t,n){var r;const a=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(a){const s=await Me(a,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function Kt(e,t){await Y("background",e,t)||await Y("background-image",e,t),await Y("mask",e,t)||await Y("-webkit-mask",e,t)||await Y("mask-image",e,t)||await Y("-webkit-mask-image",e,t)}async function Qt(e,t){const n=k(e,HTMLImageElement);if(!(n&&!pe(e.src))&&!(k(e,SVGImageElement)&&!pe(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,a=await fe(r,ue(r),t);await new Promise((s,o)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(f){o(f)}}:o;const c=e;c.decode&&(c.decode=s),c.loading==="lazy"&&(c.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function qt(e,t){const r=F(e.childNodes).map(a=>De(a,t));await Promise.all(r).then(()=>e)}async function De(e,t){k(e,Element)&&(await Kt(e,t),await Qt(e,t),await qt(e,t))}function en(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(a=>{n[a]=r[a]}),e}const He={};async function $e(e){let t=He[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},He[e]=t,t}async function We(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let c=o.replace(r,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),Le(c,t.fetchRequestInit,({result:u})=>(n=n.replace(o,`url(${u})`),[o,u]))});return Promise.all(s).then(()=>n)}function Ue(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(r);if(u===null)break;t.push(u[0])}r=r.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(o,"gi");for(;;){let u=s.exec(r);if(u===null){if(u=c.exec(r),u===null)break;s.lastIndex=c.lastIndex}else c.lastIndex=s.lastIndex;t.push(u[0])}return t}async function tn(e,t){const n=[],r=[];return e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let c=o+1;const u=s.href,f=$e(u).then(y=>We(y,t)).then(y=>Ue(y).forEach(w=>{try{a.insertRule(w,w.startsWith("@import")?c+=1:a.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:w,error:x})}})).catch(y=>{console.error("Error loading remote css",y.toString())});r.push(f)}})}catch(s){const o=e.find(c=>c.href==null)||document.styleSheets[0];a.href!=null&&r.push($e(a.href).then(c=>We(c,t)).then(c=>Ue(c).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),n))}function nn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Fe(t.style.getPropertyValue("src")))}async function rn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=F(e.ownerDocument.styleSheets),r=await tn(n,t);return nn(r)}function Be(e){return e.trim().replace(/["']/g,"")}function sn(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(Be(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function an(e,t){const n=await rn(e,t),r=sn(e);return(await Promise.all(n.filter(s=>r.has(Be(s.style.fontFamily))).map(s=>{const o=s.parentStyleSheet?s.parentStyleSheet.href:null;return Me(s.cssText,o,t)}))).join(`
8
- `)}async function on(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await an(e,t);if(n){const r=document.createElement("style"),a=document.createTextNode(n);r.appendChild(a),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function cn(e,t={}){const{width:n,height:r}=Pe(e,t),a=await oe(e,t,!0);return await on(a,t),await De(a,t),en(a,t),await Et(a,n,r)}async function ln(e,t={}){const{width:n,height:r}=Pe(e,t),a=await cn(e,t),s=await ae(a),o=document.createElement("canvas"),c=o.getContext("2d"),u=t.pixelRatio||bt(),f=t.canvasWidth||n,y=t.canvasHeight||r;return o.width=f*u,o.height=y*u,t.skipAutoScale||St(o),o.style.width=`${f}`,o.style.height=`${y}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,o.width,o.height)),c.drawImage(s,0,0,o.width,o.height),o}async function dn(e,t={}){return(await ln(e,t)).toDataURL("image/jpeg",t.quality||1)}const Ye=2147483647,he=2e6,un=90,pn=100,mn=50,fn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},hn=e=>{let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)},gn=(e,t)=>{if(!e)return"";try{const n=new Date(e);return isNaN(n.getTime())?"":new Intl.DateTimeFormat(t==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n)}catch{return""}},yn=e=>{const t=(e.innerText||"").slice(0,30).trim(),n={tag:e.tagName.toLowerCase(),classHash:hn(e.className),textSnippet:t,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length||0},r=e.getAttribute("aria-label");r&&(n.ariaLabel=r);const a=e.getAttribute("role");a&&(n.role=a);const s=e.getAttribute("name");return s&&(n.name=s),n},xn=(()=>{let e=null,t=null;return n=>{if(!n||typeof window>"u"||typeof document>"u")return n;if(n.includes("oklch")||n.includes("oklab")||n.includes("lab(")||n.includes("lch(")||n.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),t||(t=e.getContext("2d",{willReadFrequently:!0})),t){t.fillStyle="#000000",t.fillStyle=n;const s=t.fillStyle;if(s&&!s.includes("oklch")&&!s.includes("oklab"))return s}const r=document.createElement("div");r.style.color=n,document.body.appendChild(r);const a=getComputedStyle(r).color;return document.body.removeChild(r),a&&!a.includes("oklch")?a:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return n}})(),wn=(e,t,n)=>new Promise(r=>{const a=new Image;a.onload=()=>{const s=document.createElement("canvas"),o=window.devicePixelRatio||1,c=t.width+n*2,u=t.height+n*2;s.width=c*o,s.height=u*o;const f=s.getContext("2d");f&&(f.scale(o,o),f.drawImage(a,t.left-n,t.top-n,c,u,0,0,c,u)),r(s.toDataURL("image/png"))},a.src=e}),vn=e=>{const t=window.getComputedStyle(e),n={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(a=>{const s=t.getPropertyValue(a);n[a]=xn(s)}),n},bn=e=>{const n=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!n)return"";const r=[];let a=e[n];for(;a;){const s=a.type;if(typeof s=="function"){const o=s.displayName||s.name;o&&!o.includes("ViewGate")&&!r.includes(o)&&r.unshift(o)}a=a.return}return r.join(" > ")||"Generic Component"},ge=(e,t=document)=>{const n=t.querySelector(e);if(n)return n;const r=t.querySelectorAll("*");for(const a of Array.from(r)){const s=a.shadowRoot;if(s){const o=ge(e,s);if(o)return o}}return null},Sn=e=>{if(!e.tag)return null;const t=document.getElementsByTagName(e.tag);let n=null,r=0;for(let a=0;a<t.length;a++){const s=t[a];let o=0;s.innerText?.includes(e.text.slice(0,20))&&(o+=4),e.fingerprint?.classHash&&s.className.includes(e.fingerprint.classHash)&&(o+=2),e.fingerprint?.ariaLabel&&s.getAttribute("aria-label")===e.fingerprint.ariaLabel&&(o+=3),e.fingerprint?.role&&s.getAttribute("role")===e.fingerprint.role&&(o+=2),e.parentContext&&(s.parentElement?.innerText||"").includes(e.parentContext.slice(0,30))&&(o+=2),e.fingerprint?.neighborCount===s.parentElement?.children.length&&(o+=1),e.fingerprint?.parentTag===s.parentElement?.tagName.toLowerCase()&&(o+=1),o>r&&o>=5&&(r=o,n=s)}return n},Cn=e=>{let t=ge(e.selector);if(t)return t;if(e.fallbackSelectors){for(const n of e.fallbackSelectors)if(t=ge(n),t)return t}if(t=Sn(e),t)return t;if(e.metadata?.scrollPosition&&e.viewportSize){const n=(e.normalizedOffset?.x||.5)*window.innerWidth,r=(e.normalizedOffset?.y||.5)*window.innerHeight;if(t=document.elementFromPoint(n,r),t&&t.tagName.toLowerCase()===e.tag)return t}return null},ye=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),En=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(o=>o!==e).slice(0,5).map(o=>ye(o)),r=Array.from(t.children),a=r.indexOf(e);let s="middle";return a===0&&(s="start"),a===r.length-1&&(s="end"),{target:{...ye(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:ye(t),siblings:n}},kn=e=>{let t="unknown:0",n=e;for(;n;){const y=n.getAttribute("data-source-path");if(y){t=y;break}n=n.parentElement}const r=bn(e),a=[],s=[],c=(y=>{const w=[];let x=y;for(;x&&x.nodeType===Node.ELEMENT_NODE;){let S=x.nodeName.toLowerCase();s.unshift(S);const A=x.id&&!x.id.startsWith("__")?x.id:null;A&&a.push(`#${A}`);const L=x.getAttribute("data-testid")||x.getAttribute("data-qa");L&&a.push(`[data-testid="${L}"]`);const I=x.getAttribute("aria-label"),V=x.getAttribute("role"),N=x.getAttribute("name");if(L){S=`[${x.hasAttribute("data-testid")?"data-testid":"data-qa"}="${L}"]`,w.unshift(S);break}else if(A){S="#"+A,w.unshift(S);break}else if(I){S=`${x.localName}[aria-label="${I}"]`,w.unshift(S);break}else if(V){S=`${x.localName}[role="${V}"]`,w.unshift(S);break}else if(N){S=`${x.localName}[name="${N}"]`,w.unshift(S);break}else{let E=x,$=1;for(;E.previousElementSibling;)E=E.previousElementSibling,E.nodeName.toLowerCase()===x.nodeName.toLowerCase()&&$++;$>1&&(S+=`:nth-of-type(${$})`)}w.unshift(S),x=x.parentElement}return w.join(" > ")})(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(y=>{const w=e.getAttribute(y);w&&(u[y]=w)});const f=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${c.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:c,outerHtml:e.outerHTML,parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:r,signature:f,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:En(e),fingerprint:yn(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:vn(e),viewportBreakpoint:fn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY}}}},Xe=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a}=Ve(),[s,o]=m.useState(!1),[c,u]=m.useState(null),[f,y]=m.useState(null),[w,x]=m.useState(""),[S,A]=m.useState(!1),[L,I]=m.useState(!1),[V,N]=m.useState(!1),[E,$]=m.useState([]),[T,z]=m.useState(null),[Je,Ze]=m.useState(!1),[q,ie]=m.useState(!1),[we,X]=m.useState({}),[M,ee]=m.useState(null),[J,Z]=m.useState(null),[te,ne]=m.useState(""),[ce,le]=m.useState({}),l=m.useRef(null),p=m.useRef(null),v=m.useCallback(()=>{p.current||(p.current=requestAnimationFrame(()=>{const d={};E.forEach(h=>{if(!h.reference)return;const g=Cn(h.reference);if(g){const P=g.getBoundingClientRect();d[h._id]={top:P.top+window.scrollY,left:P.left+window.scrollX,width:P.width}}}),le(d),p.current=null}))},[E]),b=m.useCallback(async()=>{if(r){ie(!0);try{const d=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(d.ok){const h=await d.json();$(h.data||[])}}catch(d){console.error("Failed to fetch annotations",d)}finally{ie(!1)}}},[r,a]);m.useEffect(()=>{if(!s&&E.length>0){v();const d=new MutationObserver(()=>v()),h=new ResizeObserver(()=>v()),g=()=>v();return d.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),h.observe(document.documentElement),window.addEventListener("scroll",g,!0),()=>{d.disconnect(),h.disconnect(),window.removeEventListener("scroll",g,!0),p.current&&cancelAnimationFrame(p.current)}}},[s,E.length,v]),m.useEffect(()=>{b()},[b]),m.useEffect(()=>{l.current=document.getElementById("viewgate-shadow-host")},[]);const D=m.useCallback(d=>{if(!s||f)return;const h=document.elementFromPoint(d.clientX,d.clientY);if(!h||l.current?.contains(h)||h.closest(".vg-no-capture")){u(null);return}const g=h.getBoundingClientRect();u({tag:h.tagName.toLowerCase(),source:h.getAttribute("data-source-path")||"unknown:0",rect:g,element:h,previewText:(h.innerText||"").slice(0,100)||(h.getAttribute("placeholder")||"").slice(0,100)||h.tagName.toLowerCase(),semanticReference:{...kn(h),normalizedOffset:{x:(d.clientX-g.left)/g.width,y:(d.clientY-g.top)/g.height}}})},[s,f]),W=m.useCallback(async d=>{if(!s||f)return;const h=d.target;if(!(l.current?.contains(h)||h.closest(".vg-no-capture"))&&c){d.preventDefault(),d.stopPropagation(),I(!0);try{const g=c.element.getBoundingClientRect(),P=24,H=await dn(document.body,{quality:.5,pixelRatio:.6,filter:Ke=>!l.current?.contains(Ke)}),G=await wn(H,g,P),R={...c.semanticReference,metadata:{...c.semanticReference.metadata,screenshotUrl:H,elementScreenshot:G}};y({...c,visualPreview:G,semanticReference:R})}catch(g){console.error("Failed to capture preview:",g),y(c)}finally{I(!1),u(null)}}},[s,c,f]);m.useEffect(()=>{const d=h=>{if(h.key==="Escape"){f?y(null):V?N(!1):s&&o(!1);return}const P=(()=>{let R=document.activeElement;for(;R&&R.shadowRoot&&R.shadowRoot.activeElement;)R=R.shadowRoot.activeElement;return R})();if(["input","textarea"].includes((P?.tagName||"").toLowerCase())||P?.isContentEditable)return;const G=h.key.toLowerCase();G==="c"&&!f&&!V&&o(R=>!R),G==="v"&&!f&&(N(R=>!R),V||o(!1))};return s&&!f?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",d),window.addEventListener("mousemove",D,!0),window.addEventListener("click",W,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",d),window.removeEventListener("mousemove",D,!0),window.removeEventListener("click",W,!0)}},[s,f,V,D,W]);const C=async()=>{if(!f||!w.trim())return;A(!0);const{semanticReference:d}=f,[h,g]=(d.source||"").split(":"),P=g||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:h,line:parseInt(P),url:window.location.href,message:w,componentName:d.componentPath||f.tag,reference:{...d,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),y(null),x(""),o(!1),b()}catch(H){console.error(H),e(n.error,"error")}finally{A(!1)}};return i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:701",className:"vg-container",children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:702",className:"vg-no-capture",children:[i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:704",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:Ye},id:"viewgate-ui",children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:705",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[i.jsx("button",{onClick:()=>o(!s),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:s?"#ef4444":void 0},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:714",style:{display:"flex",alignItems:"center",gap:"10px"},children:[s?i.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:715",size:20,className:"vg-animate-pop"}):i.jsx(de,{"data-source-path":"/src/components/ViewGateOverlay.tsx:715",size:20,className:"vg-animate-pop"}),i.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:716",children:s?n.exitMode:n.enterMode})]})}),E.length>0&&i.jsxs("button",{onClick:()=>{N(!V),o(!1),y(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[i.jsx(dt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:729",size:20}),i.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:730",children:n.viewComments})]})]})}),L&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:738",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ye+1,cursor:"wait"},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:744",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:745",className:"vg-spinner"}),i.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:746",style:{fontWeight:600,fontSize:"14px",color:"#1e293b"},children:"Capturando..."})]})}),s&&!f&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:753",className:"vg-backdrop-blur",style:{opacity:1,clipPath:c?`polygon(
7
+ <%s key={someKey} {...props} />`,b,C,d,C),de[C+b]=!0)}if(C=null,v!==void 0&&(n(v),C=""+v),o(p)&&(n(p.key),C=""+p.key),"key"in p){v={};for(var g in p)g!=="key"&&(v[g]=p[g])}else v=p;return C&&i(v,typeof l=="function"?l.displayName||l.name||"Unknown":l),f(l,C,v,a(),D,W)}function w(l){y(l)?l._store&&(l._store.validated=1):typeof l=="object"&&l!==null&&l.$$typeof===q&&(l._payload.status==="fulfilled"?y(l._payload.value)&&l._payload.value._store&&(l._payload.value._store.validated=1):l._store&&(l._store.validated=1))}function y(l){return typeof l=="object"&&l!==null&&l.$$typeof===V}var S=m,V=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),$=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Ze=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ve=Symbol.for("react.client.reference"),X=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,ee=Array.isArray,J=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(l){return l()}};var Z,te={},ne=S.react_stack_bottom_frame.bind(S,s)(),le=J(r(s)),de={};Q.Fragment=I,Q.jsx=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return h(l,p,v,!1,b?Error("react-stack-top-frame"):ne,b?J(r(l)):le)},Q.jsxs=function(l,p,v){var b=1e4>X.recentlyCreatedOwnerStacks++;return h(l,p,v,!0,b?Error("react-stack-top-frame"):ne,b?J(r(l)):le)}})()),Q}var Ce;function tt(){return Ce||(Ce=1,process.env.NODE_ENV==="production"?se.exports=qe():se.exports=et()),se.exports}var c=tt();const nt=({children:e})=>{const t=m.useRef(null),[n,r]=m.useState(null);return m.useEffect(()=>{if(t.current&&!t.current.shadowRoot){const a=t.current.attachShadow({mode:"open"});document.querySelectorAll("style[data-vite-dev-id], style:not([data-vite-dev-id])").forEach(i=>{(i.textContent?.includes(".vg-")||i.textContent?.includes("--vg-"))&&a.appendChild(i.cloneNode(!0))});const o=document.createElement("link");o.rel="stylesheet",o.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap",a.appendChild(o),r(a)}},[]),c.jsx("div",{"data-source-path":"/src/components/ShadowRootWrapper.tsx:38",ref:t,id:"viewgate-shadow-host",children:n&&Qe.createPortal(e,n)})};const Ee=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const rt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const st=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ke=e=>{const t=st(e);return t.charAt(0).toUpperCase()+t.slice(1)};var at={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ot=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const it=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:o,...i},u)=>m.createElement("svg",{ref:u,...at,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ee("lucide",a),...!s&&!ot(i)&&{"aria-hidden":"true"},...i},[...o.map(([f,h])=>m.createElement(f,h)),...Array.isArray(s)?s:[s]]));const O=(e,t)=>{const n=m.forwardRef(({className:r,...a},s)=>m.createElement(it,{ref:s,iconNode:t,className:Ee(`lucide-${rt(ke(e))}`,`lucide-${e}`,r),...a}));return n.displayName=ke(e),n};const ct=O("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const U=O("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Re=O("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);const lt=O("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const dt=O("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const ue=O("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const ut=O("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const pt=O("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const mt=O("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const ft=O("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const _e=O("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const je=O("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ht={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 permanently delete this comment?",markReadyConfirm:"Mark as Ready?",confirmMarkReady:"Are you sure you want to mark this comment as ready for review?",reopenConfirm:"Reopen Comment?",confirmReopen:"Are you sure you want to reopen this comment and set it back to pending?",yes:"Yes, proceed",no:"No, cancel",deleteSuccess:"The annotation has been deleted.",updateSuccess:"Updated successfully.",navigating:"Redirecting to review...",selectToComment:"Click to comment",feedbackSubheader:"What would you like to improve here?",sendFeedback:"Send Comment",edit:"Edit",save:"Save",commentDetails:"Comment Details",annotations:"Comments",viewAll:"View All"},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 permanentemente este comentario?",markReadyConfirm:"¿Marcar como listo?",confirmMarkReady:"¿Estás seguro de que deseas marcar este comentario como listo para revisión?",reopenConfirm:"¿Reabrir comentario?",confirmReopen:"¿Estás seguro de que deseas reabrir este comentario y volverlo al estado pendiente?",yes:"Sí, continuar",no:"No, cancelar",deleteSuccess:"El comentario ha sido eliminado.",updateSuccess:"Actualizado correctamente.",navigating:"Redirigiendo a revisión...",selectToComment:"Haz clic para comentar",feedbackSubheader:"¿Qué te gustaría mejorar aquí?",sendFeedback:"Enviar Comentario",edit:"Editar",save:"Guardar",commentDetails:"Detalles del Comentario",annotations:"Comentarios",viewAll:"Ver Todos"}},Oe=m.createContext(void 0),Ve=()=>{const e=m.useContext(Oe);if(!e)throw new Error("useViewGate must be used within a ViewGateProvider");return e},gt=({children:e,language:t="es",apiKey:n,baseUrl:r="https://view-gate.vercel.app"})=>{const[a,s]=m.useState([]),o=(u,f)=>{const h=Date.now();s(w=>[...w,{id:h,message:u,type:f}]),setTimeout(()=>{s(w=>w.filter(y=>y.id!==h))},4e3)},i=ht[t];return c.jsxs(Oe.Provider,{"data-source-path":"/src/components/ViewGateProvider.tsx:211",value:{addToast:o,language:t,t:i,apiKey:n,baseUrl:r},children:[e,c.jsx(nt,{"data-source-path":"/src/components/ViewGateProvider.tsx:213",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:214",className:"vg-container",children:[c.jsx(Xe,{"data-source-path":"/src/components/ViewGateProvider.tsx:215"}),c.jsx("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:216",className:"vg-toasts",style:{zIndex:2147483646},children:a.map(u=>c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:218",className:`vg-toast vg-animate-slide ${u.type}`,children:[u.type==="success"?c.jsx(U,{"data-source-path":"/src/components/ViewGateProvider.tsx:220",size:24,color:"#22c55e"}):c.jsx(ct,{"data-source-path":"/src/components/ViewGateProvider.tsx:222",size:24,color:"#ef4444"}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateProvider.tsx:224",children:[c.jsx("strong",{"data-source-path":"/src/components/ViewGateProvider.tsx:225",style:{display:"block",fontSize:"13px",color:"#0f172a",textTransform:"uppercase",marginBottom:"2px"},children:u.type==="success"?i.successHeader:i.errorHeader}),c.jsx("span",{"data-source-path":"/src/components/ViewGateProvider.tsx:228",style:{fontSize:"14px",color:"#64748b"},children:u.message})]})]},u.id))})]})})]})};function yt(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 n=document.implementation.createHTMLDocument(),r=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(a),t&&(r.href=t),a.href=e,a.href}const xt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function F(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}let B=null;function Te(e={}){return B||(e.includeStyleProperties?(B=e.includeStyleProperties,B):(B=F(window.getComputedStyle(document.documentElement)),B))}function ae(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function wt(e){const t=ae(e,"border-left-width"),n=ae(e,"border-right-width");return e.clientWidth+t+n}function vt(e){const t=ae(e,"border-top-width"),n=ae(e,"border-bottom-width");return e.clientHeight+t+n}function Pe(e,t={}){const n=t.width||wt(e),r=t.height||vt(e);return{width:n,height:r}}function bt(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const j=16384;function St(e){(e.width>j||e.height>j)&&(e.width>j&&e.height>j?e.width>e.height?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j):e.width>j?(e.height*=j/e.width,e.width=j):(e.width*=j/e.height,e.height=j))}function oe(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function Ct(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Et(e,t,n){const r="http://www.w3.org/2000/svg",a=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${n}`),a.setAttribute("viewBox",`0 0 ${t} ${n}`),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),Ct(a)}const R=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||R(n,t)};function kt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Rt(e,t){return Te(t).map(n=>{const r=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${r}${a?" !important":""};`}).join(" ")}function _t(e,t,n,r){const a=`.${e}:${t}`,s=n.cssText?kt(n):Rt(n,r);return document.createTextNode(`${a}{${s}}`)}function Ae(e,t,n,r){const a=window.getComputedStyle(e,n),s=a.getPropertyValue("content");if(s===""||s==="none")return;const o=xt();try{t.className=`${t.className} ${o}`}catch{return}const i=document.createElement("style");i.appendChild(_t(o,n,a,r)),t.appendChild(i)}function jt(e,t,n){Ae(e,t,":before",n),Ae(e,t,":after",n)}const Ne="application/font-woff",Ge="image/jpeg",Ot={woff:Ne,woff2:Ne,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ge,jpeg:Ge,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Vt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function pe(e){const t=Vt(e).toLowerCase();return Ot[t]||""}function Tt(e){return e.split(/,/)[1]}function me(e){return e.search(/^(data:)/)!==-1}function Pt(e,t){return`data:${t};base64,${e}`}async function Le(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const a=await r.blob();return new Promise((s,o)=>{const i=new FileReader;i.onerror=o,i.onloadend=()=>{try{s(n({res:r,result:i.result}))}catch(u){o(u)}},i.readAsDataURL(a)})}const fe={};function At(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function he(e,t,n){const r=At(e,t,n.includeQueryParams);if(fe[r]!=null)return fe[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const s=await Le(e,n.fetchRequestInit,({res:o,result:i})=>(t||(t=o.headers.get("Content-Type")||""),Tt(i)));a=Pt(s,t)}catch(s){a=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o)}return fe[r]=a,a}async function Nt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):oe(t)}async function Gt(e,t){if(e.currentSrc){const s=document.createElement("canvas"),o=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,o?.drawImage(e,0,0,s.width,s.height);const i=s.toDataURL();return oe(i)}const n=e.poster,r=pe(n),a=await he(n,r,t);return oe(a)}async function Lt(e,t){var n;try{if(!((n=e?.contentDocument)===null||n===void 0)&&n.body)return await ie(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function It(e,t){return R(e,HTMLCanvasElement)?Nt(e):R(e,HTMLVideoElement)?Gt(e,t):R(e,HTMLIFrameElement)?Lt(e,t):e.cloneNode(Ie(e))}const zt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ie=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Ft(e,t,n){var r,a;if(Ie(t))return t;let s=[];return zt(e)&&e.assignedNodes?s=F(e.assignedNodes()):R(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=F(e.contentDocument.body.childNodes):s=F(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),s.length===0||R(e,HTMLVideoElement)||await s.reduce((o,i)=>o.then(()=>ie(i,n)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Mt(e,t,n){const r=t.style;if(!r)return;const a=window.getComputedStyle(e);a.cssText?(r.cssText=a.cssText,r.transformOrigin=a.transformOrigin):Te(n).forEach(s=>{let o=a.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),R(e,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),r.setProperty(s,o,a.getPropertyPriority(s))})}function Dt(e,t){R(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),R(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ht(e,t){if(R(e,HTMLSelectElement)){const r=Array.from(t.children).find(a=>e.value===a.getAttribute("value"));r&&r.setAttribute("selected","")}}function $t(e,t,n){return R(t,Element)&&(Mt(e,t,n),jt(e,t,n),Dt(e,t),Ht(e,t)),t}async function Wt(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const i=n[s].getAttribute("xlink:href");if(i){const u=e.querySelector(i),f=document.querySelector(i);!u&&f&&!r[i]&&(r[i]=await ie(f,t,!0))}}const a=Object.values(r);if(a.length){const s="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg");o.setAttribute("xmlns",s),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const i=document.createElementNS(s,"defs");o.appendChild(i);for(let u=0;u<a.length;u++)i.appendChild(a[u]);e.appendChild(o)}return e}async function ie(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>It(r,t)).then(r=>Ft(e,r,t)).then(r=>$t(e,r,t)).then(r=>Wt(r,t))}const ze=/url\((['"]?)([^'"]+?)\1\)/g,Ut=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Bt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Yt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Xt(e){const t=[];return e.replace(ze,(n,r,a)=>(t.push(a),n)),t.filter(n=>!me(n))}async function Jt(e,t,n,r,a){try{const s=n?yt(t,n):t,o=pe(t);let i;return a||(i=await he(s,o,r)),e.replace(Yt(t),`$1${i}$3`)}catch{}return e}function Zt(e,{preferredFontFormat:t}){return t?e.replace(Bt,n=>{for(;;){const[r,,a]=Ut.exec(n)||[];if(!a)return"";if(a===t)return`src: ${r};`}}):e}function Fe(e){return e.search(ze)!==-1}async function Me(e,t,n){if(!Fe(e))return e;const r=Zt(e,n);return Xt(r).reduce((s,o)=>s.then(i=>Jt(i,o,t,n)),Promise.resolve(r))}async function Y(e,t,n){var r;const a=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(a){const s=await Me(a,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function Kt(e,t){await Y("background",e,t)||await Y("background-image",e,t),await Y("mask",e,t)||await Y("-webkit-mask",e,t)||await Y("mask-image",e,t)||await Y("-webkit-mask-image",e,t)}async function Qt(e,t){const n=R(e,HTMLImageElement);if(!(n&&!me(e.src))&&!(R(e,SVGImageElement)&&!me(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,a=await he(r,pe(r),t);await new Promise((s,o)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...u)=>{try{s(t.onImageErrorHandler(...u))}catch(f){o(f)}}:o;const i=e;i.decode&&(i.decode=s),i.loading==="lazy"&&(i.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function qt(e,t){const r=F(e.childNodes).map(a=>De(a,t));await Promise.all(r).then(()=>e)}async function De(e,t){R(e,Element)&&(await Kt(e,t),await Qt(e,t),await qt(e,t))}function en(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(a=>{n[a]=r[a]}),e}const He={};async function $e(e){let t=He[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},He[e]=t,t}async function We(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let i=o.replace(r,"$1");return i.startsWith("https://")||(i=new URL(i,e.url).href),Le(i,t.fetchRequestInit,({result:u})=>(n=n.replace(o,`url(${u})`),[o,u]))});return Promise.all(s).then(()=>n)}function Ue(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(r);if(u===null)break;t.push(u[0])}r=r.replace(a,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",i=new RegExp(o,"gi");for(;;){let u=s.exec(r);if(u===null){if(u=i.exec(r),u===null)break;s.lastIndex=i.lastIndex}else i.lastIndex=s.lastIndex;t.push(u[0])}return t}async function tn(e,t){const n=[],r=[];return e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let i=o+1;const u=s.href,f=$e(u).then(h=>We(h,t)).then(h=>Ue(h).forEach(w=>{try{a.insertRule(w,w.startsWith("@import")?i+=1:a.cssRules.length)}catch(y){console.error("Error inserting rule from remote css",{rule:w,error:y})}})).catch(h=>{console.error("Error loading remote css",h.toString())});r.push(f)}})}catch(s){const o=e.find(i=>i.href==null)||document.styleSheets[0];a.href!=null&&r.push($e(a.href).then(i=>We(i,t)).then(i=>Ue(i).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(i=>{console.error("Error loading remote stylesheet",i)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(a=>{if("cssRules"in a)try{F(a.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${a.href}`,s)}}),n))}function nn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Fe(t.style.getPropertyValue("src")))}async function rn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=F(e.ownerDocument.styleSheets),r=await tn(n,t);return nn(r)}function Be(e){return e.trim().replace(/["']/g,"")}function sn(e){const t=new Set;function n(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{t.add(Be(s))}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function an(e,t){const n=await rn(e,t),r=sn(e);return(await Promise.all(n.filter(s=>r.has(Be(s.style.fontFamily))).map(s=>{const o=s.parentStyleSheet?s.parentStyleSheet.href:null;return Me(s.cssText,o,t)}))).join(`
8
+ `)}async function on(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await an(e,t);if(n){const r=document.createElement("style"),a=document.createTextNode(n);r.appendChild(a),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function cn(e,t={}){const{width:n,height:r}=Pe(e,t),a=await ie(e,t,!0);return await on(a,t),await De(a,t),en(a,t),await Et(a,n,r)}async function ln(e,t={}){const{width:n,height:r}=Pe(e,t),a=await cn(e,t),s=await oe(a),o=document.createElement("canvas"),i=o.getContext("2d"),u=t.pixelRatio||bt(),f=t.canvasWidth||n,h=t.canvasHeight||r;return o.width=f*u,o.height=h*u,t.skipAutoScale||St(o),o.style.width=`${f}`,o.style.height=`${h}`,t.backgroundColor&&(i.fillStyle=t.backgroundColor,i.fillRect(0,0,o.width,o.height)),i.drawImage(s,0,0,o.width,o.height),o}async function dn(e,t={}){return(await ln(e,t)).toDataURL("image/jpeg",t.quality||1)}const Ye=2147483647,ge=2e6,un=90,pn=100,mn=50,fn=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},hn=e=>{let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)},gn=(e,t)=>{if(!e)return"";try{const n=new Date(e);return isNaN(n.getTime())?"":new Intl.DateTimeFormat(t==="es"?"es-ES":"en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n)}catch{return""}},yn=e=>{const t=(e.innerText||"").slice(0,30).trim(),n={tag:e.tagName.toLowerCase(),classHash:hn(e.className),textSnippet:t,parentTag:e.parentElement?.tagName.toLowerCase(),neighborCount:e.parentElement?.children.length||0},r=e.getAttribute("aria-label");r&&(n.ariaLabel=r);const a=e.getAttribute("role");a&&(n.role=a);const s=e.getAttribute("name");return s&&(n.name=s),n},xn=(()=>{let e=null,t=null;return n=>{if(!n||typeof window>"u"||typeof document>"u")return n;if(n.includes("oklch")||n.includes("oklab")||n.includes("lab(")||n.includes("lch(")||n.includes("color("))try{if(e||(e=document.createElement("canvas"),e.width=1,e.height=1),t||(t=e.getContext("2d",{willReadFrequently:!0})),t){t.fillStyle="#000000",t.fillStyle=n;const s=t.fillStyle;if(s&&!s.includes("oklch")&&!s.includes("oklab"))return s}const r=document.createElement("div");r.style.color=n,document.body.appendChild(r);const a=getComputedStyle(r).color;return document.body.removeChild(r),a&&!a.includes("oklch")?a:"rgb(0,0,0)"}catch{return"rgb(0,0,0)"}return n}})(),wn=(e,t,n,r)=>new Promise(a=>{const s=new Image;s.onload=()=>{const o=document.createElement("canvas"),i=window.devicePixelRatio||1,u=t.width+n*2,f=t.height+n*2;o.width=u*i,o.height=f*i;const h=o.getContext("2d");if(h){h.scale(i,i);const w=(t.left+window.scrollX-n)*r,y=(t.top+window.scrollY-n)*r,S=u*r,V=f*r;h.drawImage(s,w,y,S,V,0,0,u,f)}a(o.toDataURL("image/png"))},s.onerror=()=>a(""),s.src=e}),vn=e=>{const t=window.getComputedStyle(e),n={};return["display","position","margin","padding","font-size","color","background-color","width","height","z-index"].forEach(a=>{const s=t.getPropertyValue(a);n[a]=xn(s)}),n},bn=e=>{const n=Object.keys(e).find(s=>s.startsWith("__reactFiber$")||s.startsWith("__reactInternalInstance$"));if(!n)return"";const r=[];let a=e[n];for(;a;){const s=a.type;if(typeof s=="function"){const o=s.displayName||s.name;o&&!o.includes("ViewGate")&&!r.includes(o)&&r.unshift(o)}a=a.return}return r.join(" > ")||"Generic Component"},ye=(e,t=document)=>{const n=t.querySelector(e);if(n)return n;const r=t.querySelectorAll("*");for(const a of Array.from(r)){const s=a.shadowRoot;if(s){const o=ye(e,s);if(o)return o}}return null},Sn=e=>{if(!e.tag)return null;const t=document.getElementsByTagName(e.tag);let n=null,r=0;for(let a=0;a<t.length;a++){const s=t[a];let o=0;s.innerText?.includes(e.text.slice(0,20))&&(o+=4),e.fingerprint?.classHash&&s.className.includes(e.fingerprint.classHash)&&(o+=2),e.fingerprint?.ariaLabel&&s.getAttribute("aria-label")===e.fingerprint.ariaLabel&&(o+=3),e.fingerprint?.role&&s.getAttribute("role")===e.fingerprint.role&&(o+=2),e.parentContext&&(s.parentElement?.innerText||"").includes(e.parentContext.slice(0,30))&&(o+=2),e.fingerprint?.neighborCount===s.parentElement?.children.length&&(o+=1),e.fingerprint?.parentTag===s.parentElement?.tagName.toLowerCase()&&(o+=1),o>r&&o>=5&&(r=o,n=s)}return n},Cn=e=>{let t=ye(e.selector);if(t)return t;if(e.fallbackSelectors){for(const n of e.fallbackSelectors)if(t=ye(n),t)return t}if(t=Sn(e),t)return t;if(e.metadata?.scrollPosition&&e.viewportSize){const n=(e.normalizedOffset?.x||.5)*window.innerWidth,r=(e.normalizedOffset?.y||.5)*window.innerHeight;if(t=document.elementFromPoint(n,r),t&&t.tagName.toLowerCase()===e.tag)return t}return null},xe=e=>({tag:e.tagName.toLowerCase(),text:(e.innerText||e.getAttribute("placeholder")||"").slice(0,50).trim(),role:e.getAttribute("role")||void 0,type:e.getAttribute("type")||void 0}),En=e=>{const t=e.parentElement;if(!t)return;const n=Array.from(t.children).filter(o=>o!==e).slice(0,5).map(o=>xe(o)),r=Array.from(t.children),a=r.indexOf(e);let s="middle";return a===0&&(s="start"),a===r.length-1&&(s="end"),{target:{...xe(e),location:`${s} of ${t.tagName.toLowerCase()}`},parent:xe(t),siblings:n}},kn=e=>{let t="unknown:0",n=e;for(;n;){const h=n.getAttribute("data-source-path");if(h){t=h;break}n=n.parentElement}const r=bn(e),a=[],s=[],i=(h=>{const w=[];let y=h;for(;y&&y.nodeType===Node.ELEMENT_NODE;){let S=y.nodeName.toLowerCase();s.unshift(S);const V=y.id&&!y.id.startsWith("__")?y.id:null;V&&a.push(`#${V}`);const L=y.getAttribute("data-testid")||y.getAttribute("data-qa");L&&a.push(`[data-testid="${L}"]`);const I=y.getAttribute("aria-label"),T=y.getAttribute("role"),N=y.getAttribute("name");if(L){S=`[${y.hasAttribute("data-testid")?"data-testid":"data-qa"}="${L}"]`,w.unshift(S);break}else if(V){S="#"+V,w.unshift(S);break}else if(I){S=`${y.localName}[aria-label="${I}"]`,w.unshift(S);break}else if(T){S=`${y.localName}[role="${T}"]`,w.unshift(S);break}else if(N){S=`${y.localName}[name="${N}"]`,w.unshift(S);break}else{let E=y,$=1;for(;E.previousElementSibling;)E=E.previousElementSibling,E.nodeName.toLowerCase()===y.nodeName.toLowerCase()&&$++;$>1&&(S+=`:nth-of-type(${$})`)}w.unshift(S),y=y.parentElement}return w.join(" > ")})(e),u={};["placeholder","aria-label","name","type","alt","title","value","role"].forEach(h=>{const w=e.getAttribute(h);w&&(u[h]=w)});const f=`${e.tagName.toLowerCase()}-${(e.innerText||"").slice(0,20).replace(/\s+/g,"_")}-${i.split(" > ").slice(-1)}`;return{tag:e.tagName.toLowerCase(),id:e.id||"",classes:e.className||"",text:(e.innerText||"").slice(0,100).trim(),selector:i,outerHtml:e.outerHTML,parentContext:(e.parentElement?.innerText||"").slice(0,150).trim(),componentPath:r,signature:f,source:t,attributes:u,fallbackSelectors:[...new Set(a)].slice(0,5),domPath:s.slice(-10),viewportSize:{width:window.innerWidth,height:window.innerHeight},uiContext:En(e),fingerprint:yn(e),metadata:{hint:`Edit ${t.split(":")[0]} at line ${t.split(":")[1]||"?"}`,computedStyles:vn(e),viewportBreakpoint:fn(),outerHtml:e.outerHTML.slice(0,1500),scrollPosition:{x:window.scrollX,y:window.scrollY}}}},Xe=()=>{const{addToast:e,language:t,t:n,apiKey:r,baseUrl:a}=Ve(),[s,o]=m.useState(!1),[i,u]=m.useState(null),[f,h]=m.useState(null),[w,y]=m.useState(""),[S,V]=m.useState(!1),[L,I]=m.useState(!1),[T,N]=m.useState(!1),[E,$]=m.useState([]),[P,z]=m.useState(null),[Je,Ze]=m.useState(!1),[q,ce]=m.useState(!1),[ve,X]=m.useState({}),[M,ee]=m.useState(null),[J,Z]=m.useState(null),[te,ne]=m.useState(""),[le,de]=m.useState({}),l=m.useRef(null),p=m.useRef(null),v=m.useCallback(()=>{p.current||(p.current=requestAnimationFrame(()=>{const d={};E.forEach(g=>{if(!g.reference)return;const x=Cn(g.reference);if(x){const A=x.getBoundingClientRect();d[g._id]={top:A.top+window.scrollY,left:A.left+window.scrollX,width:A.width}}}),de(d),p.current=null}))},[E]),b=m.useCallback(async()=>{if(r){ce(!0);try{const d=await fetch(`${a}/api/annotations`,{headers:{"x-api-key":r}});if(d.ok){const g=await d.json();$(g.data||[])}}catch(d){console.error("Failed to fetch annotations",d)}finally{ce(!1)}}},[r,a]);m.useEffect(()=>{if(!s&&E.length>0){v();const d=new MutationObserver(()=>v()),g=new ResizeObserver(()=>v()),x=()=>v();return d.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0}),g.observe(document.documentElement),window.addEventListener("scroll",x,!0),()=>{d.disconnect(),g.disconnect(),window.removeEventListener("scroll",x,!0),p.current&&cancelAnimationFrame(p.current)}}},[s,E.length,v]),m.useEffect(()=>{b()},[b]),m.useEffect(()=>{l.current=document.getElementById("viewgate-shadow-host")},[]);const D=m.useCallback(d=>{if(!s||f)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||l.current?.contains(g)||g.closest(".vg-no-capture")){u(null);return}const x=g.getBoundingClientRect();u({tag:g.tagName.toLowerCase(),source:g.getAttribute("data-source-path")||"unknown:0",rect:x,element:g,previewText:(g.innerText||"").slice(0,100)||(g.getAttribute("placeholder")||"").slice(0,100)||g.tagName.toLowerCase(),semanticReference:{...kn(g),normalizedOffset:{x:(d.clientX-x.left)/x.width,y:(d.clientY-x.top)/x.height}}})},[s,f]),W=m.useCallback(async d=>{if(!s||f)return;const g=d.target;if(!(l.current?.contains(g)||g.closest(".vg-no-capture"))&&i){d.preventDefault(),d.stopPropagation(),I(!0);try{const x=i.element.getBoundingClientRect(),A=24,H=2,G=await dn(document.body,{quality:.95,pixelRatio:H,filter:re=>!l.current?.contains(re)}),k=await wn(G,x,A,H),Ke={...i.semanticReference,metadata:{...i.semanticReference.metadata,screenshotUrl:G,elementScreenshot:k}};h({...i,visualPreview:k,semanticReference:Ke})}catch(x){console.error("Failed to capture preview:",x),h(i)}finally{I(!1),u(null)}}},[s,i,f]);m.useEffect(()=>{const d=g=>{if(g.key==="Escape"){f?h(null):T?N(!1):s&&o(!1);return}const A=(()=>{let k=document.activeElement;for(;k&&k.shadowRoot&&k.shadowRoot.activeElement;)k=k.shadowRoot.activeElement;return k})();if(["input","textarea"].includes((A?.tagName||"").toLowerCase())||A?.isContentEditable)return;const G=g.key.toLowerCase();G==="c"&&!f&&!T&&o(k=>!k),G==="v"&&!f&&(N(k=>!k),T||o(!1))};return s&&!f?document.body.classList.add("vg-cursor-pointer"):document.body.classList.remove("vg-cursor-pointer"),window.addEventListener("keydown",d),window.addEventListener("mousemove",D,!0),window.addEventListener("click",W,!0),()=>{document.body.classList.remove("vg-cursor-pointer"),window.removeEventListener("keydown",d),window.removeEventListener("mousemove",D,!0),window.removeEventListener("click",W,!0)}},[s,f,T,D,W]);const C=async()=>{if(!f||!w.trim())return;V(!0);const{semanticReference:d}=f,[g,x]=(d.source||"").split(":"),A=x||"0";try{if(!(await fetch(`${a}/api/annotations`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({filePath:g,line:parseInt(A),url:window.location.href,message:w,componentName:d.componentPath||f.tag,reference:{...d,viewport:{width:window.innerWidth,height:window.innerHeight},userAgent:navigator.userAgent,timestamp:new Date().toISOString()}})})).ok)throw new Error("Backend failed");e(n.success,"success"),h(null),y(""),o(!1),b()}catch(H){console.error(H),e(n.error,"error")}finally{V(!1)}};return c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:710",className:"vg-container",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:711",className:"vg-no-capture",children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:713",style:{position:"fixed",bottom:"30px",right:"30px",zIndex:Ye},id:"viewgate-ui",children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:714",className:"vg-action-bar vg-animate-slide-up",style:{transition:"all 0.4s cubic-bezier(0.4, 0, 0.2, 1)"},children:[c.jsx("button",{onClick:()=>o(!s),className:"vg-button-primary vg-animate-pop",style:{padding:"12px 24px",background:s?"#ef4444":void 0},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:723",style:{display:"flex",alignItems:"center",gap:"10px"},children:[s?c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:724",size:20,className:"vg-animate-pop"}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:724",size:20,className:"vg-animate-pop"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:725",children:s?n.exitMode:n.enterMode})]})}),E.length>0&&c.jsxs("button",{onClick:()=>{N(!T),o(!1),h(null)},className:"vg-button-ghost vg-animate-pop",style:{animationDelay:"0.1s"},children:[c.jsx(dt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:738",size:20}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:739",children:n.viewComments})]})]})}),L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:747",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:Ye+1,cursor:"wait"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:753",className:"vg-glassmorphism",style:{padding:"30px 50px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:754",className:"vg-spinner"}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:755",style:{fontWeight:600,fontSize:"14px",color:"#1e293b"},children:"Capturando..."})]})}),s&&!f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:762",className:"vg-backdrop-blur",style:{opacity:1,clipPath:i?`polygon(
9
9
  0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,
10
- ${c.rect.left}px ${c.rect.top}px,
11
- ${c.rect.right}px ${c.rect.top}px,
12
- ${c.rect.right}px ${c.rect.bottom}px,
13
- ${c.rect.left}px ${c.rect.bottom}px,
14
- ${c.rect.left}px ${c.rect.top}px
15
- )`:"none",zIndex:un}}),s&&c&&!f&&!L&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:772",className:"vg-selection-pulse",style:{top:c.rect.top-4,left:c.rect.left-4,width:c.rect.width+8,height:c.rect.height+8,zIndex:pn},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:782",className:"vg-selection-label",style:{...c.rect.top<60?c.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...c.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[i.jsx(ut,{"data-source-path":"/src/components/ViewGateOverlay.tsx:798",size:16}),i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:799",style:{display:"flex",flexDirection:"column"},children:[i.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:800",style:{fontWeight:700},children:n.selectToComment}),i.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:801",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(c.rect.width)," × ",Math.round(c.rect.height)]})]})]})}),f&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:811",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:he},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:816",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"500px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},children:[i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:820",style:{textAlign:"center",marginBottom:"32px"},children:[i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:821",style:{width:"48px",height:"48px",background:"var(--vg-primary-gradient)",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",color:"white",boxShadow:"0 8px 16px rgba(99, 102, 241, 0.3)"},children:i.jsx(de,{"data-source-path":"/src/components/ViewGateOverlay.tsx:826",size:24})}),i.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:828",style:{margin:"0 0 8px 0",fontSize:"24px",fontWeight:800,color:"#0f172a"},children:n.feedbackHeader}),i.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:829",style:{margin:0,color:"#64748b",fontSize:"15px"},children:n.feedbackSubheader})]}),f.visualPreview&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:833",style:{marginBottom:"24px",borderRadius:"12px",overflow:"hidden",border:"1px solid #e2e8f0",background:"#f8fafc"},children:i.jsx("img",{src:f.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block",margin:"0 auto"}})}),i.jsx("textarea",{className:"vg-textarea",value:w,onChange:d=>x(d.target.value),rows:4,placeholder:n.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px"}}),i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:852",style:{display:"flex",gap:"12px"},children:[i.jsx("button",{onClick:()=>y(null),className:"vg-button-ghost",style:{flex:1,padding:"12px"},children:n.cancel}),i.jsx("button",{onClick:C,className:"vg-button-primary",disabled:S||!w.trim(),style:{flex:2},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:866",style:{display:"flex",alignItems:"center",gap:"8px"},children:[S?i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:867",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):i.jsx(ft,{"data-source-path":"/src/components/ViewGateOverlay.tsx:867",size:18}),i.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:868",children:S?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),V&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:878",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:he},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:883",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"650px",maxHeight:"85vh",display:"flex",flexDirection:"column"},children:[i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:887",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:888",style:{display:"flex",alignItems:"center",gap:"12px"},children:[i.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:889",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:M?n.commentDetails:n.annotations}),!M&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:893",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:E.length})]}),i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:898",style:{display:"flex",gap:"8px"},children:[M&&i.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:900",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>ee(null),children:n.viewAll||"View All"}),i.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:908",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{N(!1),ee(null)},children:i.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:913",size:20})})]})]}),i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:918",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:q?i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:920",style:{display:"flex",justifyContent:"center",padding:"40px"},children:i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:921",className:"vg-spinner"})}):(M?E.filter(d=>d._id===M):E).map((d,h)=>i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:925",className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${h*.05}s`},children:[i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:936",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:937",style:{display:"flex",gap:"12px",alignItems:"center"},children:[d.status==="ready_for_review"?i.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:939",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[i.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:940",size:14})," ",n.readyForReview]}):i.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:943",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[i.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:944",size:14})," ",n.pending]}),i.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:947",style:{fontSize:"12px",color:"#94a3b8"},children:gn(d.timestamp||d.createdAt||d.reference?.timestamp,t)})]})}),J===d._id?i.jsx("textarea",{className:"vg-textarea",value:te,onChange:g=>ne(g.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):i.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:963",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:d.message}),i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:966",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:J===d._id?i.jsxs(i.Fragment,{children:[i.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:969",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:te})})).ok&&(Z(null),b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),i.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:991",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>Z(null),children:n.cancel})]}):i.jsxs(i.Fragment,{children:[i.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:995",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{Z(d._id),ne(d.message)},children:[i.jsx(pt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1003",size:14})," ",n.edit]}),i.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1005",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{d.url&&(window.location.href=d.url)},children:[i.jsx(lt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1012",size:14})," ",n.review]}),d.status==="pending"?i.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1015",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[i.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1043",size:14})," ",n.markReady]}):i.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1046",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[i.jsx(mt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1074",size:14})," ",n.reopen]}),i.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1077",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{z({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(b(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:i.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1104",size:16})})]})})]},d._id))})]})}),T&&i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1119",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:he+1},children:i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1124",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",textAlign:"center"},children:[i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1125",style:{width:"48px",height:"48px",background:T.type==="danger"?"#fee2e2":"#e0e7ff",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px",color:T.type==="danger"?"#ef4444":"#6366f1"},children:T.type==="danger"?i.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1133",size:24}):i.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1133",size:24})}),i.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1135",style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:800,color:"#0f172a"},children:T.title}),i.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1136",style:{margin:"0 0 24px 0",fontSize:"14px",color:"#64748b",lineHeight:1.5},children:T.message}),i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1137",style:{display:"flex",gap:"12px"},children:[i.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1138",className:"vg-button-ghost",style:{flex:1},onClick:()=>z(null),children:n.no}),i.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1139",className:"vg-button-primary",style:{flex:1,backgroundColor:T.type==="danger"?"#ef4444":void 0,backgroundImage:T.type==="danger"?"none":void 0},onClick:T.onConfirm,children:n.yes})]})]})}),!s&&E.map((d,h)=>{const g=ce[d._id];if(!g)return null;const H=E.slice(0,h).filter(G=>G.reference?.selector&&G.reference.selector===d.reference?.selector).length*34;return i.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:g.top-20-window.scrollY,left:g.left+g.width/2-16+H-window.scrollX,cursor:"pointer",animationDelay:`${h*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:mn-h},onMouseEnter:G=>{const R=G.currentTarget.getBoundingClientRect();window.innerHeight-R.bottom<180?X(ve=>({...ve,[d._id]:"vg-top"})):X(ve=>({...ve,[d._id]:""}))},onClick:()=>{N(!0),ee(d._id)},children:[i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1194",className:`vg-pin-tooltip ${we[d._id]||""}`,children:[i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1195",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:d.status==="ready_for_review"?i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1197",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[i.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1198",size:12})," ",n.readyForReview]}):i.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1201",style:{display:"flex",alignItems:"center",gap:"6px",color:"#ea580c",fontWeight:700,fontSize:"11px"},children:[i.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1202",size:12})," ",n.pending]})}),i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1206",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:d.message})]}),i.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1209",className:`vg-formal-pin ${d.status==="ready_for_review"?"ready":""}`,children:d.status==="ready_for_review"?i.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1210",size:18}):i.jsx(de,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1210",size:16})})]},`pin-${d._id}`)})]})})};function xe(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=c=>c.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
16
- `).map((c,u)=>{const f=u+1;return c.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(y,w,x)=>y.includes("data-source-path")||x==="Fragment"||x==="React.Fragment"?y:`${w}<${x} data-source-path="${a}:${f}"`)}).join(`
17
- `)}function Rn(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:xe(e,t,process.cwd()),map:null}}}}function _n(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,xe(e,t,process.cwd())):e}_.ViewGate=gt,_.ViewGateOverlay=Xe,_.transformSourcePaths=xe,_.useViewGate=Ve,_.viewgateNextLoader=_n,_.viewgatePlugin=Rn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
10
+ ${i.rect.left}px ${i.rect.top}px,
11
+ ${i.rect.right}px ${i.rect.top}px,
12
+ ${i.rect.right}px ${i.rect.bottom}px,
13
+ ${i.rect.left}px ${i.rect.bottom}px,
14
+ ${i.rect.left}px ${i.rect.top}px
15
+ )`:"none",zIndex:un}}),s&&i&&!f&&!L&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:781",className:"vg-selection-pulse",style:{top:i.rect.top-4,left:i.rect.left-4,width:i.rect.width+8,height:i.rect.height+8,zIndex:pn},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:791",className:"vg-selection-label",style:{...i.rect.top<60?i.rect.bottom>window.innerHeight-60?{top:"8px",bottom:"auto"}:{top:"100%",marginTop:"8px",bottom:"auto"}:{top:"-40px",bottom:"auto"},...i.rect.left+200>window.innerWidth?{left:"auto",right:"0"}:{left:"0",right:"auto"}},children:[c.jsx(ut,{"data-source-path":"/src/components/ViewGateOverlay.tsx:807",size:16}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:808",style:{display:"flex",flexDirection:"column"},children:[c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:809",style:{fontWeight:700},children:n.selectToComment}),c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:810",style:{fontSize:"10px",opacity:.8,fontFamily:"monospace"},children:[Math.round(i.rect.width)," × ",Math.round(i.rect.height)]})]})]})}),f&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:820",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.4)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:825",className:"vg-glassmorphism vg-animate-slide",style:{padding:"40px",width:"500px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:829",style:{textAlign:"center",marginBottom:"32px"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:830",style:{width:"48px",height:"48px",background:"var(--vg-primary-gradient)",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 16px",color:"white",boxShadow:"0 8px 16px rgba(99, 102, 241, 0.3)"},children:c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:835",size:24})}),c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:837",style:{margin:"0 0 8px 0",fontSize:"24px",fontWeight:800,color:"#0f172a"},children:n.feedbackHeader}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:838",style:{margin:0,color:"#64748b",fontSize:"15px"},children:n.feedbackSubheader})]}),f.visualPreview&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:842",style:{marginBottom:"24px",borderRadius:"12px",overflow:"hidden",border:"1px solid #e2e8f0",background:"#f8fafc"},children:c.jsx("img",{src:f.visualPreview,alt:"Preview",style:{maxWidth:"100%",maxHeight:"200px",objectFit:"contain",display:"block",margin:"0 auto"}})}),c.jsx("textarea",{className:"vg-textarea",value:w,onChange:d=>y(d.target.value),rows:4,placeholder:n.placeholder,autoFocus:!0,style:{fontSize:"15px",padding:"16px",marginBottom:"24px"}}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:861",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{onClick:()=>h(null),className:"vg-button-ghost",style:{flex:1,padding:"12px"},children:n.cancel}),c.jsx("button",{onClick:C,className:"vg-button-primary",disabled:S||!w.trim(),style:{flex:2},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:875",style:{display:"flex",alignItems:"center",gap:"8px"},children:[S?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:876",className:"vg-spinner",style:{width:"16px",height:"16px",borderWidth:"2px"}}):c.jsx(ft,{"data-source-path":"/src/components/ViewGateOverlay.tsx:876",size:18}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:877",children:S?n.submitting:n.sendFeedback||"Send Comment"})]})})]})]})}),T&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:887",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:892",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"650px",maxHeight:"85vh",display:"flex",flexDirection:"column"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:896",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:897",style:{display:"flex",alignItems:"center",gap:"12px"},children:[c.jsx("h2",{"data-source-path":"/src/components/ViewGateOverlay.tsx:898",style:{margin:0,fontSize:"20px",fontWeight:800,color:"#0f172a"},children:M?n.commentDetails:n.annotations}),!M&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:902",className:"vg-badge",style:{background:"#e0e7ff",color:"#6366f1"},children:E.length})]}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:907",style:{display:"flex",gap:"8px"},children:[M&&c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:909",className:"vg-button-ghost",style:{padding:"6px 14px",fontSize:"12px"},onClick:()=>ee(null),children:n.viewAll||"View All"}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:917",className:"vg-button-ghost",style:{padding:"8px",borderRadius:"50%"},onClick:()=>{N(!1),ee(null)},children:c.jsx(je,{"data-source-path":"/src/components/ViewGateOverlay.tsx:922",size:20})})]})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:927",style:{maxHeight:"60vh",overflowY:"auto",paddingRight:"10px"},className:"vg-custom-scrollbar",children:q?c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:929",style:{display:"flex",justifyContent:"center",padding:"40px"},children:c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:930",className:"vg-spinner"})}):(M?E.filter(d=>d._id===M):E).map((d,g)=>c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:934",className:"vg-glassmorphism vg-animate-slide",style:{padding:"20px",marginBottom:"16px",border:"1px solid rgba(0,0,0,0.05)",background:"rgba(255,255,255,0.5)",animationDelay:`${g*.05}s`},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:945",style:{display:"flex",justifyContent:"space-between",marginBottom:"16px",alignItems:"center"},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:946",style:{display:"flex",gap:"12px",alignItems:"center"},children:[d.status==="ready_for_review"?c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:948",className:"vg-badge",style:{backgroundColor:"#f0fdf4",color:"#16a34a"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:949",size:14})," ",n.readyForReview]}):c.jsxs("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:952",className:"vg-badge",style:{backgroundColor:"#fff7ed",color:"#ea580c"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:953",size:14})," ",n.pending]}),c.jsx("span",{"data-source-path":"/src/components/ViewGateOverlay.tsx:956",style:{fontSize:"12px",color:"#94a3b8"},children:gn(d.timestamp||d.createdAt||d.reference?.timestamp,t)})]})}),J===d._id?c.jsx("textarea",{className:"vg-textarea",value:te,onChange:x=>ne(x.target.value),rows:3,autoFocus:!0,style:{marginBottom:"16px"}}):c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:972",style:{margin:"0 0 20px 0",fontSize:"16px",color:"#1e293b",lineHeight:1.6},children:d.message}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:975",style:{display:"flex",gap:"12px",justifyContent:"flex-end",borderTop:"1px solid #f1f5f9",paddingTop:"16px"},children:J===d._id?c.jsxs(c.Fragment,{children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:978",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({message:te})})).ok&&(Z(null),b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}},children:n.save}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1000",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>Z(null),children:n.cancel})]}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1004",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px"},onClick:()=>{Z(d._id),ne(d.message)},children:[c.jsx(pt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1012",size:14})," ",n.edit]}),c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1014",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.05s"},onClick:()=>{d.url&&(window.location.href=d.url)},children:[c.jsx(lt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1021",size:14})," ",n.review]}),d.status==="pending"?c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1024",className:"vg-button-primary vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.markReadyConfirm,message:n.confirmMarkReady,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"ready_for_review"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1052",size:14})," ",n.markReady]}):c.jsxs("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1055",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 16px",fontSize:"13px",animationDelay:"0.1s"},onClick:()=>{z({title:n.reopenConfirm,message:n.confirmReopen,type:"success",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"PATCH",headers:{"Content-Type":"application/json","x-api-key":r},body:JSON.stringify({status:"pending"})})).ok&&(b(),e(n.updateSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:[c.jsx(mt,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1083",size:14})," ",n.reopen]}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1086",className:"vg-button-ghost vg-animate-pop",style:{padding:"8px 12px",color:"#ef4444",borderColor:"#fee2e2",animationDelay:"0.15s"},onClick:()=>{z({title:n.deleteConfirm,message:n.confirmDelete,type:"danger",onConfirm:async()=>{try{(await fetch(`${a}/api/annotations/${d._id}`,{method:"DELETE",headers:{"x-api-key":r}})).ok&&(b(),e(n.deleteSuccess,"success"))}catch{e(n.error,"error")}finally{z(null)}}})},children:c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1113",size:16})})]})})]},d._id))})]})}),P&&c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1128",className:"vg-animate-fade",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(15, 23, 42, 0.6)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:ge+1},children:c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1133",className:"vg-glassmorphism vg-animate-slide",style:{padding:"32px",width:"400px",textAlign:"center"},children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1134",style:{width:"48px",height:"48px",background:P.type==="danger"?"#fee2e2":"#e0e7ff",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 20px",color:P.type==="danger"?"#ef4444":"#6366f1"},children:P.type==="danger"?c.jsx(_e,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1142",size:24}):c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1142",size:24})}),c.jsx("h3",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1144",style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:800,color:"#0f172a"},children:P.title}),c.jsx("p",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1145",style:{margin:"0 0 24px 0",fontSize:"14px",color:"#64748b",lineHeight:1.5},children:P.message}),c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1146",style:{display:"flex",gap:"12px"},children:[c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1147",className:"vg-button-ghost",style:{flex:1},onClick:()=>z(null),children:n.no}),c.jsx("button",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1148",className:"vg-button-primary",style:{flex:1,backgroundColor:P.type==="danger"?"#ef4444":void 0,backgroundImage:P.type==="danger"?"none":void 0},onClick:P.onConfirm,children:n.yes})]})]})}),!s&&E.map((d,g)=>{const x=le[d._id];if(!x)return null;const H=E.slice(0,g).filter(G=>G.reference?.selector&&G.reference.selector===d.reference?.selector).length*34;return c.jsxs("div",{className:"vg-pin-container vg-animate-pop",style:{position:"fixed",top:x.top-20-window.scrollY,left:x.left+x.width/2-16+H-window.scrollX,cursor:"pointer",animationDelay:`${g*.08}s`,transition:"all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)",zIndex:mn-g},onMouseEnter:G=>{const k=G.currentTarget.getBoundingClientRect();window.innerHeight-k.bottom<180?X(re=>({...re,[d._id]:"vg-top"})):X(re=>({...re,[d._id]:""}))},onClick:()=>{N(!0),ee(d._id)},children:[c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1203",className:`vg-pin-tooltip ${ve[d._id]||""}`,children:[c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1204",style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:d.status==="ready_for_review"?c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1206",style:{display:"flex",alignItems:"center",gap:"6px",color:"#16a34a",fontWeight:700,fontSize:"11px"},children:[c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1207",size:12})," ",n.readyForReview]}):c.jsxs("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1210",style:{display:"flex",alignItems:"center",gap:"6px",color:"#ea580c",fontWeight:700,fontSize:"11px"},children:[c.jsx(Re,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1211",size:12})," ",n.pending]})}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1215",style:{fontWeight:500,color:"#1e293b",lineHeight:1.4},children:d.message})]}),c.jsx("div",{"data-source-path":"/src/components/ViewGateOverlay.tsx:1218",className:`vg-formal-pin ${d.status==="ready_for_review"?"ready":""}`,children:d.status==="ready_for_review"?c.jsx(U,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1219",size:18}):c.jsx(ue,{"data-source-path":"/src/components/ViewGateOverlay.tsx:1219",size:16})})]},`pin-${d._id}`)})]})})};function we(e,t,n){if(!t.endsWith(".tsx")&&!t.endsWith(".jsx")||t.includes("node_modules"))return e;const r=i=>i.replace(/\\/g,"/"),a=r(t).replace(r(n),"");return e.split(`
16
+ `).map((i,u)=>{const f=u+1;return i.replace(/(^|[^a-zA-Z0-9])<([a-zA-Z][a-zA-Z0-9\.]*)(?=[ \t\n\/\>])/g,(h,w,y)=>h.includes("data-source-path")||y==="Fragment"||y==="React.Fragment"?h:`${w}<${y} data-source-path="${a}:${f}"`)}).join(`
17
+ `)}function Rn(){return{name:"vite-plugin-viewgate",enforce:"pre",transform(e,t){return{code:we(e,t,process.cwd()),map:null}}}}function _n(e){const t=this.resourcePath;return t?(process.env.NODE_ENV,we(e,t,process.cwd())):e}_.ViewGate=gt,_.ViewGateOverlay=Xe,_.transformSourcePaths=we,_.useViewGate=Ve,_.viewgateNextLoader=_n,_.viewgatePlugin=Rn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-wrapper",
3
- "version": "1.10.0",
3
+ "version": "1.10.4",
4
4
  "type": "module",
5
5
  "main": "./dist/viewgate-wrapper.umd.cjs",
6
6
  "module": "./dist/viewgate-wrapper.js",