@visulima/dev-toolbar 1.0.0-alpha.5 → 1.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/bin/mcp.js +29 -0
  3. package/dist/apps/annotations/annotations-app.d.ts +4 -0
  4. package/dist/apps/annotations/index.d.ts +3 -0
  5. package/dist/apps/annotations/index.js +18 -0
  6. package/dist/apps/inspector/a11y-capture.d.ts +12 -0
  7. package/dist/apps/inspector/annotation-overlay.d.ts +55 -0
  8. package/dist/apps/inspector/annotation-settings.d.ts +33 -0
  9. package/dist/apps/inspector/element-utils.d.ts +115 -0
  10. package/dist/apps/inspector/freeze-animations.d.ts +22 -0
  11. package/dist/apps/inspector/index.js +15 -2
  12. package/dist/apps/inspector/rulers.d.ts +14 -0
  13. package/dist/apps/inspector/theme-palette.d.ts +34 -0
  14. package/dist/apps/seo/index.js +2 -2
  15. package/dist/apps/settings/index.js +2 -2
  16. package/dist/client/overlay.js +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/mcp/server.d.ts +12 -0
  19. package/dist/mcp/server.js +1 -0
  20. package/dist/packem_chunks/inject-source.js +6 -6
  21. package/dist/packem_shared/Select-C0CQOOqZ.js +1 -0
  22. package/dist/packem_shared/annotation-settings-DOyUbJ_T.js +1 -0
  23. package/dist/packem_shared/annotation-store-bLQRYMaI.js +1 -0
  24. package/dist/packem_shared/createServerRPCContext-CJ6F87o_.js +1 -0
  25. package/dist/packem_shared/sharedToolbarStylesheet-CaTdYhVe.js +2 -0
  26. package/dist/rpc/functions/annotations.d.ts +28 -0
  27. package/dist/rpc/functions/vite-config.d.ts +1 -1
  28. package/dist/store/annotation-store.d.ts +41 -0
  29. package/dist/toolbar/index.js +1 -1
  30. package/dist/types/annotations.d.ts +156 -0
  31. package/dist/types/index.d.ts +1 -0
  32. package/dist/types/rpc.d.ts +33 -0
  33. package/dist/ui/components/select.d.ts +54 -0
  34. package/dist/ui/index.d.ts +2 -0
  35. package/dist/ui/index.js +1 -1
  36. package/dist/vite-plugin.d.ts +1 -0
  37. package/dist/vite-plugin.js +5 -2
  38. package/package.json +27 -6
  39. package/dist/packem_shared/createServerRPCContext-CJXa8ezf.js +0 -1
  40. package/dist/packem_shared/sharedToolbarStylesheet-JFwZE8kq.js +0 -2
@@ -1,4 +1,4 @@
1
- var q=Object.defineProperty;var B=(t,e)=>q(t,"name",{value:e,configurable:!0});import{b as H}from"../../packem_shared/use-frame-state-CxrlPUM5.js";const P=`<!-- @license lucide-static v0.577.0 - ISC -->
1
+ var Bn=Object.defineProperty;var ae=(e,t)=>Bn(e,"name",{value:t,configurable:!0});import{l as _t,g as Gt}from"../../packem_shared/annotation-settings-DOyUbJ_T.js";import{b as Mn}from"../../packem_shared/use-frame-state-CxrlPUM5.js";const zn=`<!-- @license lucide-static v0.577.0 - ISC -->
2
2
  <svg
3
3
  class="lucide lucide-inspect"
4
4
  xmlns="http://www.w3.org/2000/svg"
@@ -14,4 +14,17 @@ var q=Object.defineProperty;var B=(t,e)=>q(t,"name",{value:e,configurable:!0});i
14
14
  <path d="M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z" />
15
15
  <path d="M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6" />
16
16
  </svg>
17
- `;var A=Object.defineProperty,s=B((t,e)=>A(t,"name",{value:e,configurable:!0}),"i$1");const L={bg:"#18181b",btnBg:"rgba(196,181,253,0.08)",btnBgHover:"rgba(196,181,253,0.16)",btnBorder:"rgba(196,181,253,0.25)",btnBorderHover:"rgba(196,181,253,0.5)",fg:"#fafafa",muted:"#a1a1aa",overlayBg:"rgba(196,181,253,0.06)",overlayBorder:"rgba(196,181,253,0.7)",primary:"#c4b5fd",shadow:"0 8px 32px rgba(0,0,0,.75)"},C={bg:"#ffffff",btnBg:"rgba(124,58,237,0.08)",btnBgHover:"rgba(124,58,237,0.16)",btnBorder:"rgba(124,58,237,0.25)",btnBorderHover:"rgba(124,58,237,0.5)",fg:"#18181b",muted:"#52525b",overlayBg:"rgba(124,58,237,0.06)",overlayBorder:"rgba(124,58,237,0.7)",primary:"#7c3aed",shadow:"0 8px 32px rgba(0,0,0,.15)"},$=s(()=>{try{const t=localStorage.getItem("__v_dt__theme");if(t==="light")return C;if(t==="dark")return L}catch{}return globalThis.window?.matchMedia("(prefers-color-scheme: dark)").matches?L:C},"getThemePalette"),x="__vdt_inspector_overlay",M="__vdt_inspector_label",E="__vdt_inspector_cursor",y="__vdt_inspector_badge",T="__vdt_inspector_kf",h="__vdt_inspector_result",D=s(()=>{let t=document.querySelector(`#${x}`);if(!t){const e=$();t=document.createElement("div"),t.id=x,t.style.cssText=["position:fixed","pointer-events:none","z-index:2147483644","box-sizing:border-box",`border:1px solid ${e.overlayBorder}`,`background:${e.overlayBg}`,"transition:top 60ms,left 60ms,width 60ms,height 60ms","display:none"].join(";");const o=document.createElement("div");o.id=M,o.style.cssText=["position:absolute","bottom:calc(100% + 2px)","left:0",`background:${e.bg}`,`color:${e.primary}`,"font:11px/1.2 'JetBrains Mono',monospace","padding:2px 6px","white-space:nowrap","pointer-events:none",`border:1px solid ${e.btnBorder}`].join(";"),t.append(o),document.body.append(t)}return t},"getOrCreateOverlay"),O=s(t=>{let e=t;for(;e;){const o=e.dataset.vdtSource;if(o)return o;e=e.parentElement??void 0}},"findSource"),R=s(t=>{const e=t.split(":");if(e.length<3)return t;const o=e[e.length-2],n=e.slice(0,-2).join(":");return`${n.split("/").pop()??n}:${o}`},"formatSourceShort"),N=s(t=>{const e=document.querySelector(`#${x}`);if(!e)return;const o=t.getBoundingClientRect();e.style.display="block",e.style.top=`${o.top}px`,e.style.left=`${o.left}px`,e.style.width=`${o.width}px`,e.style.height=`${o.height}px`;const n=document.querySelector(`#${M}`);if(n){const r=t.tagName.toLowerCase(),c=t.id?`#${t.id}`:"",l=t.classList.length>0?`.${[...t.classList].slice(0,3).join(".")}`:"",d=`${r}${c}${l}`,g=O(t);n.textContent=g?`${d} · ${R(g)}`:d,o.top<28?(n.style.bottom="auto",n.style.top="calc(100% + 2px)"):(n.style.top="",n.style.bottom="calc(100% + 2px)")}},"updateOverlayPosition"),_=s(()=>{const t=document.querySelector(`#${x}`);t&&(t.style.display="none")},"hideOverlay"),V=s(()=>{document.querySelector(`#${x}`)?.remove(),document.querySelector(`#${E}`)?.remove()},"removeOverlay"),S=s(t=>{let e=document.querySelector(`#${E}`);t?(e||(e=document.createElement("style"),e.id=E,document.head.append(e)),e.textContent=`*, *::before, *::after { cursor: crosshair !important; } #${y}, #${y} *, #${h}, #${h} * { cursor: pointer !important; }`):e&&e.remove()},"setCrosshairCursor"),I=s(()=>{document.querySelector(`#${y}`)?.remove()},"removeFloatingBadge"),z=s(t=>{if(!document.querySelector(`#${T}`)){const d=document.createElement("style");d.id=T,d.textContent="@keyframes __vdt_pulse{0%,100%{opacity:1}50%{opacity:.3}}",document.head.append(d)}I();const e=$(),o=document.createElement("div");o.id=y,o.style.cssText=["position:fixed","bottom:4rem","left:50%","transform:translateX(-50%)","z-index:2147483645","display:flex","align-items:center","gap:8px","padding:6px 14px 6px 10px",`background:${e.bg}`,`border:1px solid ${e.btnBorder}`,`box-shadow:${e.shadow}`,"font:12px/1 'JetBrains Mono',monospace",`color:${e.fg}`,"pointer-events:auto","user-select:none","white-space:nowrap"].join(";"),o.addEventListener("click",d=>{d.stopPropagation(),t()});const n=document.createElement("span");n.style.cssText=`display:inline-block;width:7px;height:7px;border-radius:50%;background:${e.primary};animation:__vdt_pulse 1.4s ease-in-out infinite;flex-shrink:0;`;const r=document.createElement("span");r.textContent="Click any element to inspect";const c=document.createElement("span");c.style.cssText=`color:${e.muted};margin:0 4px;`,c.textContent="·";const l=document.createElement("span");l.textContent="Cancel",l.style.cssText=`color:${e.primary};text-decoration:underline;text-underline-offset:3px;`,o.append(n,r,c,l),document.body.append(o)},"createFloatingBadge");let v;const J=s(t=>{const e=t.split(":"),o=Number.parseInt(e.at(-1)??"0",10)||void 0,n=Number.parseInt(e.at(-2)??"0",10)||void 0,r=e.slice(0,-2).join(":");globalThis.__VISULIMA_DEVTOOLS__?.rpc?.openInEditor?.(r,n,o,H()).catch(()=>{})},"openInEditor"),b=s(()=>{v?.(),v=void 0,document.querySelector(`#${h}`)?.remove()},"removeResultPopup"),k=s((t,e)=>{const o=$(),n=document.createElement("button");return n.textContent=t,n.style.cssText=[`background:${o.btnBg}`,`border:1px solid ${o.btnBorder}`,`color:${o.primary}`,"cursor:pointer","font:11px/1 'JetBrains Mono',monospace","padding:5px 10px","white-space:nowrap"].join(";"),n.addEventListener("pointerover",()=>{n.style.background=o.btnBgHover,n.style.borderColor=o.btnBorderHover}),n.addEventListener("pointerout",()=>{n.style.background=o.btnBg,n.style.borderColor=o.btnBorder}),n.addEventListener("click",r=>{r.stopPropagation(),e()}),n},"makeActionButton"),G=s((t,e,o)=>{v?.(),v=void 0,b();const n=$(),r=document.createElement("div");r.id=h,r.style.cssText=["position:fixed","z-index:2147483646",`background:${n.bg}`,`border:1px solid ${n.btnBorder}`,"padding:10px 32px 10px 12px","font:12px/1.4 'JetBrains Mono',monospace",`color:${n.fg}`,`box-shadow:${n.shadow}`,"min-width:200px","max-width:400px","pointer-events:auto"].join(";");let c=e.bottom+8;c+110>window.innerHeight&&(c=e.top-110-8);let{left:l}=e;l+280>window.innerWidth&&(l=Math.max(8,window.innerWidth-288)),r.style.top=`${c}px`,r.style.left=`${l}px`;const d=t.tagName.toLowerCase(),g=t.id?`#${t.id}`:"",i=t.classList.length>0?`.${[...t.classList].slice(0,3).join(".")}`:"",a=document.createElement("div");if(a.style.cssText=`color:${n.primary};font-weight:bold;margin-bottom:4px;word-break:break-all;`,a.textContent=`${d}${g}${i}`,r.append(a),o){const m=document.createElement("div");m.style.cssText=`color:${n.muted};margin-bottom:10px;word-break:break-all;font-size:10px;`,m.textContent=o,r.append(m)}const u=document.createElement("div");u.style.cssText="display:flex;gap:6px;flex-wrap:wrap;",o&&u.append(k("Open in editor",()=>{J(o),b()})),u.append(k("Copy HTML",()=>{navigator.clipboard.writeText(t.outerHTML).catch(()=>{}),b()})),o&&u.append(k("Copy path",()=>{navigator.clipboard.writeText(o).catch(()=>{}),b()})),r.append(u);const p=document.createElement("button");p.textContent="×",p.style.cssText=["position:absolute","top:6px","right:8px","background:transparent","border:none",`color:${n.muted}`,"cursor:pointer","font:16px/1 'JetBrains Mono',monospace","padding:0","line-height:1","transition:color 0.15s"].join(";"),p.addEventListener("pointerover",()=>{p.style.color=n.fg}),p.addEventListener("pointerout",()=>{p.style.color=n.muted}),p.addEventListener("click",m=>{m.stopPropagation(),b()}),r.append(p),document.body.append(r);const w=s(m=>{r.contains(m.target)||(b(),document.removeEventListener("click",w,!0),v=void 0)},"handleOutside"),j=setTimeout(()=>{document.addEventListener("click",w,!0)},100);v=s(()=>{clearTimeout(j),document.removeEventListener("click",w,!0)},"removePopupOutsideHandler")},"showResultPopup");let f;const K=s(t=>{f?.(),D(),S(!0);const e=s(()=>document.querySelector(`#${y}`)??void 0,"badgeElement"),o=s(i=>{if(!i)return!1;const a=e();return!!(a&&(i===a||a.contains(i)))},"isOverBadge"),n=s(i=>{if(!i)return!1;const a=document.querySelector(`#${h}`);return!!(a&&(i===a||a.contains(i)))},"isOverResultPopup"),r={cleanup(){document.removeEventListener("mousemove",r.handleMouseMove),document.removeEventListener("click",r.handleClick,!0),document.removeEventListener("keydown",r.handleKeyDown),_(),V(),S(!1),I(),f=void 0},handleClick(i){const a=i.target;if(!a||a.tagName==="DEV-TOOLBAR"||o(a)||n(a))return;i.preventDefault(),i.stopPropagation();const u=a.getBoundingClientRect(),p=O(a);_(),G(a,u,p)},handleKeyDown(i){i.key==="Escape"&&(r.cleanup(),t())},handleMouseMove(i){const a=i.target;if(!a||a.tagName==="DEV-TOOLBAR"||o(a)||n(a)){_();return}N(a)}},{cleanup:c,handleClick:l,handleKeyDown:d,handleMouseMove:g}=r;z(()=>{c(),t()}),document.addEventListener("mousemove",g),document.addEventListener("click",l,!0),document.addEventListener("keydown",d),f=c},"startGlobalInspection"),F=s(()=>{f?.(),b()},"stopGlobalInspection"),X={icon:P,id:"dev-toolbar:inspector",name:"Inspector",onClick(){const t=globalThis.__VISULIMA_DEVTOOLS__;K(()=>{t?.setAppActive&&t.setAppActive("dev-toolbar:inspector",!1)})},onDeactivate(){F()}};export{X as default};
17
+ `;var Pn=Object.defineProperty,P=ae((e,t)=>Pn(e,"name",{value:t,configurable:!0}),"l$2");const Zt=P(e=>{try{const t=e.contentDocument;return t!==null&&t.body!==null}catch{return!1}},"isSameOriginIframe"),_e=P((e,t)=>{let n=document.elementFromPoint(e,t);if(!n)return null;let o=!0;for(;o;){for(o=!1;n?.shadowRoot;){const i=n.shadowRoot.elementFromPoint(e,t);if(!i||i===n)break;n=i,o=!0}if(n?.tagName==="IFRAME"){const i=n;if(Zt(i)){const r=i.getBoundingClientRect(),a=e-r.left,l=t-r.top;try{const d=i.contentDocument.elementFromPoint(a,l);d&&d!==i&&(n=d,o=!0)}catch{}}}}return n},"deepElementFromPoint"),st=P(e=>{const t=e.getBoundingClientRect();let n=0,o=0,i=e.ownerDocument;for(;i!==document;){const r=i.defaultView?.frameElement;if(!r)break;const a=r.getBoundingClientRect();n+=a.left,o+=a.top,i=r.ownerDocument}return new DOMRect(t.x+n,t.y+o,t.width,t.height)},"getViewportRect"),Rn=new Set(["ARTICLE","ASIDE","DIV","FOOTER","HEADER","MAIN","NAV","SECTION","SPAN"]),gt=P(e=>{if(typeof e.checkVisibility=="function")return!e.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0});let t=e;for(;t&&t!==document.body;){if(getComputedStyle(t).opacity==="0")return!0;t=t.parentElement}return!1},"isEffectivelyInvisible"),Dt=P(e=>{if(!Rn.has(e.tagName))return!0;for(const t of e.childNodes)if(t.nodeType===Node.TEXT_NODE&&t.textContent?.trim())return!0;return!1},"hasDirectContent"),rt=P((e,t)=>{const n=document.elementFromPoint(e,t);if(!n)return null;let o=n;for(;o.shadowRoot;){const x=o.shadowRoot.elementFromPoint(e,t);if(!x||x===o)break;o=x}if(Dt(o)&&!gt(o))return o;const i=document.elementsFromPoint(e,t);for(const x of i){if(x===n||x===document.documentElement||x===document.body)continue;let h=x;for(;h.shadowRoot;){const c=h.shadowRoot.elementFromPoint(e,t);if(!c||c===h)break;h=c}if(Dt(h)&&!gt(h))return h}const r=o.getBoundingClientRect(),a=r.width*r.height;let l=null,d=a;for(const x of i){if(x===n||x===document.documentElement||x===document.body||gt(x))continue;const h=x.getBoundingClientRect(),c=h.width*h.height;c>0&&c<d&&(l=x,d=c)}return l??o},"pierceElementFromPoint"),en=P(e=>{if(e.parentElement)return e.parentElement;const t=e.getRootNode();return t instanceof ShadowRoot?t.host:null},"getParentElement"),tn=P(e=>{let t=e;for(;t;){const{position:n}=getComputedStyle(t);if(n==="fixed"||n==="sticky")return!0;t=en(t)}return!1},"isElementFixed"),Tt=P(e=>{const t=e.tagName.toLowerCase();if(t==="button"||e.type==="submit"){const r=e.textContent?.trim().slice(0,40);return r?`button "${r}"`:"button"}if(t==="a"){const r=e.getAttribute("href"),a=e.textContent?.trim().slice(0,30);return r&&!r.startsWith("javascript:")?a?`link "${a}" to ${r}`:`link to ${r}`:a?`link "${a}"`:"link"}if(t==="img"){const{alt:r}=e;return r?`image "${r.slice(0,40)}"`:"image"}if(t==="input"){const{type:r}=e,{placeholder:a}=e;return a?`input[${r}] "${a.slice(0,30)}"`:`input[${r}]`}if(t==="textarea"){const{placeholder:r}=e;return r?`textarea "${r.slice(0,30)}"`:"textarea"}if(/^h[1-6]$/.test(t)){const r=e.textContent?.trim().slice(0,50);return r?`${t} "${r}"`:t}if(t==="select"){const r=e.getAttribute("aria-label")??e.name;return r?`select "${r}"`:"select"}const n=e.textContent?.trim();if(n&&n.length<=30&&n.length>0)return`${t} "${n}"`;const o=e.id?`#${e.id}`:"",i=e.classList.length>0?`.${[...e.classList].slice(0,2).join(".")}`:"";return`${t}${o}${i}`||t},"getElementLabel"),In=new Set(["active","checked","disabled","focus","hover","selected","visited"]),nn=P(e=>{if(e.id)return`#${CSS.escape(e.id)}`;const t=[...e.classList].filter(i=>!In.has(i)&&!i.startsWith("__")&&!Dn(i));if(t.length>0){const i=e.tagName.toLowerCase();for(const r of t){const a=`${i}.${CSS.escape(r)}`;if(document.querySelectorAll(a).length===1)return a}for(let r=0;r<t.length;r++)for(let a=r+1;a<t.length;a++){const l=`${i}.${CSS.escape(t[r])}.${CSS.escape(t[a])}`;if(document.querySelectorAll(l).length===1)return l}}const n=[];let o=e;for(;o&&o!==document.body&&o!==document.documentElement;){let i=o.tagName.toLowerCase();if(o.id){n.unshift(`#${CSS.escape(o.id)}`);break}const r=o.parentElement;if(r){const a=[...r.children].filter(l=>l.tagName===o.tagName);if(a.length>1){const l=a.indexOf(o)+1;i+=`:nth-of-type(${l})`}}n.unshift(i),o=r}return n.join(" > ")},"generateSelector"),on=/[_-][a-f0-9]{5,}$/i,Dn=P(e=>on.test(e),"isModuleHash"),rn=P(e=>Array.from(e,t=>t.replace(on,"")).filter(Boolean).join(" "),"cleanCssClasses"),an=P(e=>{const t=[];let n=e;for(;n&&n!==document.documentElement;){const o=n.tagName.toLowerCase();if(o==="body"){t.unshift("body");break}const i=n.getRootNode();i instanceof ShadowRoot?(t.unshift(`${o} ⟨shadow⟩`),n=i.host):(t.unshift(o),n=n.parentElement)}return t.join(" > ")},"getFullDomPath"),sn=P(e=>{const t=e.parentElement;return t?[...t.children].filter(n=>n!==e).slice(0,5).map(n=>n.tagName.toLowerCase()+(n.id?`#${n.id}`:"")).join(", "):""},"getNearbyElements"),ln=P((e,t=120)=>{const n=e.textContent?.trim()??"";if(n.length>0)return n.length>t?`${n.slice(0,t)}…`:n;const o=e.getAttribute("aria-label")??e.getAttribute("title")??"";return o?o.length>t?`${o.slice(0,t)}…`:o:e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e.placeholder?.slice(0,t)??"":""},"getNearbyText"),cn=P((e=80)=>{const t=globalThis.getSelection();if(!t||t.isCollapsed)return"";const n=t.toString().trim();return n.length>e?`${n.slice(0,e)}…`:n},"getSelectedText"),Fn=new Set(["A","BUTTON","INPUT","SELECT","TEXTAREA"]),dn=P(e=>{const t=e,n=t.getAttribute("role")??t.tagName.toLowerCase(),o=t.getAttribute("aria-label")??void 0,i=t.getAttribute("aria-describedby")?document.getElementById(t.getAttribute("aria-describedby"))?.textContent?.trim():void 0,r=t.getAttribute("tabindex"),a=r===null?void 0:Number.parseInt(r,10),l=Fn.has(t.tagName)||a!==void 0&&a>=0;return{ariaDescribedBy:i,ariaLabel:o,focusable:l,role:n===t.tagName.toLowerCase()?void 0:n,tabindex:a}},"captureAccessibility"),On=["display","position","color","background-color","font-size","font-family","font-weight","line-height","padding","margin","border","width","height","overflow","z-index","opacity"],wt=P(e=>{const t=getComputedStyle(e),n=[];for(const o of On){const i=t.getPropertyValue(o);i&&i!=="normal"&&i!=="none"&&i!=="auto"&&i!=="0px"&&n.push(`${o}: ${i}`)}return n.join("; ")},"captureComputedStyles"),jn=P(e=>{const t=Object.keys(e).find(l=>l.startsWith("__reactFiber$")||l.startsWith("__reactInternalInstance$"));if(!t)return;let n=e[t],o,i,r;const a=[];for(;n;){if(typeof n.type=="function"||typeof n.type=="object"){const l=n.type?.displayName??n.type?.name;l&&!l.startsWith("_")&&l!=="Fragment"&&l!=="Suspense"&&l.length>1&&(a.push(l),o||(o=l,n._debugSource&&(i=n._debugSource.fileName,r=n._debugSource.lineNumber)))}n=n.return}if(o)return{componentName:o,componentStack:a.length>1?a.reverse():void 0,framework:"react",sourceFile:i,sourceLine:r}},"detectReact"),Nn=P(e=>{let t=e.__vueParentComponent;if(!t){let r=e;for(;r&&(t=r.__vueParentComponent,!t);)r=r.parentElement}if(!t)return;const n=t.type?.__name??t.type?.name??t.type?.__file?.split("/").pop()?.replace(".vue","");if(!n)return;const o=[n];let{parent:i}=t;for(;i;){const r=i.type?.__name??i.type?.name;r&&o.push(r),i=i.parent}return{componentName:n,componentStack:o.length>1?o.reverse():void 0,framework:"vue",sourceFile:t.type?.__file}},"detectVue"),qn=P(e=>{let t=e;for(;t;){const n=t.__svelte_meta;if(n){const o=n.loc?.file??"";return{componentName:o.split("/").pop()?.replace(".svelte","")??"Unknown",framework:"svelte",sourceFile:o,sourceLine:n.loc?.line}}t=t.parentElement}},"detectSvelte"),pn=P(e=>jn(e)??Nn(e)??qn(e),"detectFrameworkComponent"),un=P(async e=>{try{const t=e.getBoundingClientRect(),n=20,o=window.devicePixelRatio||1,i=await navigator.mediaDevices.getDisplayMedia({audio:!1,video:{displaySurface:"browser"}});if(!i.getVideoTracks()[0])return i.getTracks().forEach(b=>b.stop()),null;const r=document.createElement("video");r.srcObject=i,r.muted=!0,await r.play(),await new Promise(b=>{requestAnimationFrame(()=>b())});const a=document.createElement("canvas");a.width=r.videoWidth,a.height=r.videoHeight;const l=a.getContext("2d");if(!l)return i.getTracks().forEach(b=>b.stop()),null;l.drawImage(r,0,0),i.getTracks().forEach(b=>b.stop());const d=Math.max(0,(t.left-n)*o),x=Math.max(0,(t.top-n)*o),h=Math.min((t.width+n*2)*o,a.width-d),c=Math.min((t.height+n*2)*o,a.height-x),u=document.createElement("canvas");u.width=h,u.height=c;const p=u.getContext("2d");return p?(p.drawImage(a,d,x,h,c,0,0,h,c),u.toDataURL("image/png")):null}catch{return null}},"captureElementScreenshot"),Hn=P(e=>{const t=[],n=P(o=>{for(const i of o.querySelectorAll(e))t.push(i);for(const i of o.querySelectorAll("iframe"))if(Zt(i))try{n(i.contentDocument)}catch{}},"searchDocument");return n(document),t},"querySelectorAllWithIframes"),mn=P(e=>{const t=[],n=Math.max(10,e.width/20),o=Math.max(10,e.height/20),i=new Set;for(let{x:a}=e;a<=e.x+e.width;a+=n)for(let{y:l}=e;l<=e.y+e.height;l+=o){const d=_e(a,l);if(d&&!i.has(d)&&d.tagName!=="BODY"&&d.tagName!=="HTML"&&!d.tagName.includes("-")){const x=st(d);x.left>=e.x-5&&x.top>=e.y-5&&x.right<=e.x+e.width+5&&x.bottom<=e.y+e.height+5&&(i.add(d),t.push(d))}}const r="button, a, input, img, p, h1, h2, h3, h4, h5, h6, li, label, td, th";for(const a of Hn(r)){if(i.has(a)||a.tagName==="BODY"||a.tagName==="HTML")continue;const l=st(a);l.width>window.innerWidth*.8&&l.height>window.innerHeight*.5||l.width<10||l.height<10||l.left<e.x+e.width&&l.right>e.x&&l.top<e.y+e.height&&l.bottom>e.y&&(i.add(a),t.push(a))}return t.filter(a=>!t.some(l=>l!==a&&a.contains(l)))},"getElementsInRect"),gn=P(e=>e.map(t=>{const n=st(t);return{height:n.height,width:n.width,x:n.x,y:n.y}}),"getElementBoundingBoxes"),Ct=P((e,t="standard")=>{if(e.length===0)return`# Annotations
18
+
19
+ No annotations found.`;if(t==="compact"){const o=[`# Annotations (${e.length})`,""];for(const i of e){const r=i.elementLabel??i.elementTag,a=i.selectedText?` (re: "${i.selectedText.slice(0,30)}...")`:"";o.push(`- **${r}:** ${i.comment}${a}`)}return o.join(`
20
+ `)}const n=["# Annotations","",`> ${e.length} annotation(s)`,""];for(const[o,i]of e.entries()){const r=i.elementLabel??i.elementTag;if(n.push(`## ${o+1}. [${i.intent.toUpperCase()}] ${i.severity} — ${r}`,"",`**Status:** ${i.status}`,`**URL:** ${i.url}`),i.elementPath&&n.push(`**Selector:** \`${i.elementPath}\``),i.source&&n.push(`**Source:** \`${i.source}\``),i.frameworkContext){const a=i.frameworkContext;n.push(`**Component:** ${a.componentName} (${a.framework})`),a.componentStack&&a.componentStack.length>1&&n.push(`**Stack:** ${a.componentStack.join(" > ")}`),a.sourceFile&&n.push(`**File:** \`${a.sourceFile}${a.sourceLine?`:${a.sourceLine}`:""}\``)}i.selectedText&&n.push(`**Selected:** "${i.selectedText}"`),(t==="detailed"||t==="forensic")&&(i.cssClasses&&n.push(`**Classes:** \`${i.cssClasses}\``),i.nearbyText&&n.push(`**Context:** ${i.nearbyText}`),i.fullPath&&n.push(`**DOM Path:** \`${i.fullPath}\``)),t==="forensic"&&(i.accessibility?.role&&n.push(`**Role:** ${i.accessibility.role}`),i.nearbyElements&&n.push(`**Nearby:** ${i.nearbyElements}`),i.computedStyles&&n.push(`**Styles:** \`${i.computedStyles}\``)),n.push("",i.comment,"","---","")}return n.join(`
21
+ `)},"annotationsToMarkdown"),Vn=Object.defineProperty({__proto__:null,annotationsToMarkdown:Ct,captureAccessibility:dn,captureComputedStyles:wt,captureElementScreenshot:un,cleanCssClasses:rn,deepElementFromPoint:_e,detectFrameworkComponent:pn,generateSelector:nn,getElementBoundingBoxes:gn,getElementLabel:Tt,getElementsInRect:mn,getFullDomPath:an,getNearbyElements:sn,getNearbyText:ln,getParentElement:en,getSelectedText:cn,getViewportRect:st,isElementFixed:tn,pierceElementFromPoint:rt},Symbol.toStringTag,{value:"Module"});var Yn=Object.defineProperty,ue=ae((e,t)=>Yn(e,"name",{value:t,configurable:!0}),"r$1");const Xn=["id^='__vdt_'","class*='__vdt_'"],xt=Xn.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join(""),$t="__vdt_freeze_styles",ht="__vdt_freeze_state",ce=1e3,Un=ue(()=>{if(globalThis.window===void 0)return{frozen:!1,frozenRAFQueue:[],frozenTimeoutQueue:[],installed:!0,origRAF:ue((()=>0),"origRAF"),origSetInterval:ue((()=>0),"origSetInterval"),origSetTimeout:ue((()=>0),"origSetTimeout"),pausedAnimations:[]};const e=globalThis;return e[ht]||(e[ht]={frozen:!1,frozenRAFQueue:[],frozenTimeoutQueue:[],installed:!1,origRAF:null,origSetInterval:null,origSetTimeout:null,pausedAnimations:[]}),e[ht]},"getState"),E=Un();globalThis.window!==void 0&&!E.installed&&(E.origSetTimeout=globalThis.setTimeout.bind(globalThis),E.origSetInterval=globalThis.setInterval.bind(globalThis),E.origRAF=globalThis.requestAnimationFrame.bind(globalThis),globalThis.setTimeout=(e,t,...n)=>typeof e=="string"?E.origSetTimeout(e,t):E.origSetTimeout((...o)=>{E.frozen?E.frozenTimeoutQueue.length<ce?E.frozenTimeoutQueue.push(()=>e(...o)):E.frozenTimeoutQueue.length===ce&&(E.frozenTimeoutQueue.push(()=>{}),console.warn(`[dev-toolbar] frozenTimeoutQueue exceeded ${ce} entries — further callbacks are being dropped.`)):e(...o)},t,...n),globalThis.setInterval=(e,t,...n)=>typeof e=="string"?E.origSetInterval(e,t):E.origSetInterval((...o)=>{E.frozen||e(...o)},t,...n),globalThis.requestAnimationFrame=e=>E.origRAF(t=>{E.frozen?E.frozenRAFQueue.length<ce?E.frozenRAFQueue.push(e):E.frozenRAFQueue.length===ce&&(E.frozenRAFQueue.push(()=>{}),console.warn(`[dev-toolbar] frozenRAFQueue exceeded ${ce} entries — further callbacks are being dropped.`)):e(t)}),E.installed=!0);const xn=E.origSetTimeout,Qn=ue(()=>E.frozen,"isFrozen"),Kn=ue(()=>{if(typeof document>"u"||E.frozen)return;E.frozen=!0,E.frozenTimeoutQueue=[],E.frozenRAFQueue=[];let e=document.getElementById($t);e||(e=document.createElement("style"),e.id=$t),e.textContent=`
22
+ *${xt},
23
+ *${xt}::before,
24
+ *${xt}::after {
25
+ animation-play-state: paused !important;
26
+ transition: none !important;
27
+ }
28
+ `,document.head.append(e),E.pausedAnimations=[];try{for(const t of document.getAnimations()){if(t.playState!=="running")continue;const n=t.effect?.target;n&&!n.closest?.("[id^='__vdt_']")&&!n.closest?.("dev-toolbar")&&(t.pause(),E.pausedAnimations.push(t))}}catch{}for(const t of document.querySelectorAll("video"))t.paused||(t.dataset.wasPaused="false",t.pause())},"freezeAll"),hn=ue(()=>{if(typeof document>"u"||!E.frozen)return;E.frozen=!1;const e=E.frozenTimeoutQueue;E.frozenTimeoutQueue=[];for(const n of e)E.origSetTimeout(()=>{if(E.frozen){E.frozenTimeoutQueue.length<ce&&E.frozenTimeoutQueue.push(n);return}try{n()}catch{}},0);const t=E.frozenRAFQueue;E.frozenRAFQueue=[];for(const n of t)E.origRAF(o=>{if(E.frozen){E.frozenRAFQueue.length<ce&&E.frozenRAFQueue.push(n);return}n(o)});for(const n of E.pausedAnimations)try{n.play()}catch{}E.pausedAnimations=[],document.getElementById($t)?.remove();for(const n of document.querySelectorAll("video[data-was-paused='false']"))n.play().catch(()=>{}),delete n.dataset.wasPaused},"unfreezeAll"),Jn=ue(()=>E.frozen?(hn(),!1):(Kn(),!0),"toggleFreeze");var Wn=Object.defineProperty,Je=ae((e,t)=>Wn(e,"name",{value:t,configurable:!0}),"r");const fn={bg:"#212121",btnBg:"rgba(196,181,253,0.08)",btnBgHover:"rgba(196,181,253,0.16)",btnBorder:"rgba(196,181,253,0.25)",btnBorderHover:"rgba(196,181,253,0.5)",fg:"#fafafa",muted:"#a1a1aa",primary:"#c4b5fd",shadow:"0 6px 24px rgba(0,0,0,.7),0 2px 8px rgba(0,0,0,.5)"},bn={bg:"#f2f2f2",btnBg:"rgba(124,58,237,0.08)",btnBgHover:"rgba(124,58,237,0.16)",btnBorder:"rgba(124,58,237,0.25)",btnBorderHover:"rgba(124,58,237,0.5)",fg:"#18181b",muted:"#52525b",primary:"#7c3aed",shadow:"0 4px 20px rgba(0,0,0,.12),0 0 0 1px rgba(0,0,0,.08)"},yn={...fn,overlayBg:"rgba(196,181,253,0.06)",overlayBorder:"rgba(196,181,253,0.7)"},Gn={...bn,overlayBg:"rgba(124,58,237,0.06)",overlayBorder:"rgba(124,58,237,0.7)"},Zn={...fn,danger:"#ef4444",success:"#22c55e"},eo={...bn,danger:"#dc2626",success:"#16a34a"};let de;const St=Je(()=>{if(de!==void 0)return de;try{const e=localStorage.getItem("__v_dt__theme");if(e==="light")return de=!1,!1;if(e==="dark")return de=!0,!0}catch{}return de=globalThis.window?.matchMedia("(prefers-color-scheme: dark)").matches??!0,de},"resolveIsDark");Je(()=>St(),"isDarkTheme");const to=Je(()=>St()?yn:Gn,"getInspectorPalette"),no=Je(()=>St()?Zn:eo,"getAnnotationPalette");Je(()=>{de=void 0},"resetPaletteCache");const Ft="__vdt_palette_listener";globalThis.window!==void 0&&!globalThis[Ft]&&(globalThis[Ft]=!0,globalThis.addEventListener("storage",e=>{e.key==="__v_dt__theme"&&(de=void 0)}));var oo=Object.defineProperty,_=ae((e,t)=>oo(e,"name",{value:t,configurable:!0}),"p");const fe="__vdt_annotation_marker",be="__vdt_annotation_form",Lt="__vdt_annotation_detail",it="__vdt_area_outline",U={approve:{bg:"rgba(34,197,94,0.15)",border:"rgba(34,197,94,0.6)",fg:"#22c55e"},change:{bg:"rgba(234,179,8,0.15)",border:"rgba(234,179,8,0.6)",fg:"#eab308"},fix:{bg:"rgba(239,68,68,0.15)",border:"rgba(239,68,68,0.6)",fg:"#ef4444"},question:{bg:"rgba(59,130,246,0.15)",border:"rgba(59,130,246,0.6)",fg:"#3b82f6"}},Qe={approve:"Approve",change:"Change",fix:"Fix",question:"Question"},Ke={blocking:"Blocking",important:"Important",suggestion:"Suggestion"},We=no,Y=_(()=>globalThis.__VISULIMA_DEVTOOLS__?.rpc,"getRpc"),ft=_(e=>{if(!e)return null;try{return document.querySelector(e)}catch{return null}},"safeQuerySelector"),K=_((e,t="success")=>{const n="__vdt_toast";document.getElementById(n)?.remove();const o=document.createElement("div");o.id=n,o.textContent=e,o.style.cssText=`position:fixed;z-index:2147483648;bottom:1rem;right:1rem;padding:6px 14px;background:${t==="success"?"#22c55e":"#ef4444"};color:#fff;font:12px/1 "JetBrains Mono","Geist Mono",ui-monospace,"Cascadia Code","Fira Code",monospace;font-weight:600;pointer-events:none;opacity:0;transition:opacity 0.2s,transform 0.2s;transform:translateY(4px);`,document.body.append(o),requestAnimationFrame(()=>{o.style.opacity="1",o.style.transform="translateY(0)"}),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),200)},1500)},"showToast"),ro=_(e=>{try{const t=new URL(e),n=globalThis.location;return t.origin===n.origin&&t.pathname===n.pathname}catch{return e===globalThis.location.href}},"matchesCurrentPage"),he=_((e,t,n)=>{const o=We(),i=document.createElement("button");return i.type="button",i.textContent=e,i.style.cssText=`background:${o.btnBg};border:1px solid ${o.btnBorder};color:${n??o.primary};cursor:pointer;font:11px/1 'JetBrains Mono',monospace;padding:5px 10px;white-space:nowrap;`,i.addEventListener("pointerover",()=>{i.style.background=o.btnBgHover,i.style.borderColor=o.btnBorderHover}),i.addEventListener("pointerout",()=>{i.style.background=o.btnBg,i.style.borderColor=o.btnBorder}),i.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),t()}),i},"makeButton"),se=_((e,t,n,o)=>{const i=document.createElement("div"),r=document.createElement("b");r.textContent=`${t}: `;const a=document.createElement("span");a.textContent=n,o&&(a.style.color=o),i.append(r,a),e.append(i)},"addMetaRow"),At=_((e,t)=>{const n=document.createElement("button");return n.type="button",n.textContent="×",n.style.cssText=`position:absolute;top:6px;right:8px;background:transparent;border:none;color:${e.muted};cursor:pointer;font:16px/1 monospace;padding:0;`,n.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),t()}),n},"makeCloseButton"),io=_(()=>globalThis.__VISULIMA_DEVTOOLS__?.getApps?.().some(e=>e.id==="dev-toolbar:annotations")??!1,"isAnnotationsAppEnabled");let W=[],Te,je,ge;const Bt=_((e,t,n=!1)=>({x:e/window.innerWidth*100,y:n?t:t+window.scrollY}),"toPageCoords"),Ne=_((e,t,n=!1)=>({left:e/100*window.innerWidth,top:n?t:t-window.scrollY}),"toViewportCoords"),ao=_(()=>{const e=document.querySelectorAll(`.${fe}`);for(const t of e){const n=Number.parseFloat(t.dataset.pageX??"0"),o=Number.parseFloat(t.dataset.pageY??"0"),i=t.dataset.isFixed==="true",{left:r,top:a}=Ne(n,o,i);t.style.left=`${r-11}px`,t.style.top=`${a-11}px`,t.style.display=a<-24||a>window.innerHeight+24?"none":"flex"}},"repositionMarkers");let bt=!1;const Ot=_(()=>{bt||(bt=!0,xn(()=>{ao(),bt=!1},16))},"throttledReposition"),so=_(()=>{Te||(Te=Ot,je=Ot,window.addEventListener("scroll",Te,{passive:!0}),window.addEventListener("resize",je,{passive:!0}))},"attachScrollListeners"),lo=_(()=>{Te&&(window.removeEventListener("scroll",Te),Te=void 0),je&&(window.removeEventListener("resize",je),je=void 0)},"detachScrollListeners");let qe,He,pe=[];const co=_(()=>{if(ge)return;ge=_(()=>{X().catch(()=>{})},"navigationHandler"),globalThis.addEventListener("popstate",ge),qe=history.pushState.bind(history),He=history.replaceState.bind(history);const e=ge;history.pushState=(...t)=>{qe(...t);const n=setTimeout(()=>{e(),pe=pe.filter(o=>o!==n)},50);pe.push(n)},history.replaceState=(...t)=>{He(...t);const n=setTimeout(()=>{e(),pe=pe.filter(o=>o!==n)},50);pe.push(n)}},"attachNavigationListener"),po=_(()=>{ge&&(globalThis.removeEventListener("popstate",ge),ge=void 0);for(const e of pe)clearTimeout(e);pe=[],qe&&(history.pushState=qe,qe=void 0),He&&(history.replaceState=He,He=void 0)},"detachNavigationListener");let xe;const uo=_(()=>{if(!xe)try{xe=new EventSource("/__devtoolbar/events"),xe.addEventListener("annotations.changed",()=>{const e=Y();e?.getAnnotations&&e.getAnnotations().then(t=>{W=t,lt()}).catch(()=>{})}),xe.addEventListener("error",()=>{})}catch{}},"attachSSE"),mo=_(()=>{xe&&(xe.close(),xe=void 0)},"detachSSE"),X=_(async()=>{if(!io())return;const e=Y();if(e?.getAnnotations)try{W=await e.getAnnotations(),lt(),so(),co(),uo()}catch{}},"loadAndShowMarkers"),vn=_(()=>{for(const e of document.querySelectorAll(`.${fe}`))e.remove();wn(),lo(),po(),mo(),hn()},"removeAllMarkers"),wn=_(()=>{q(),N(),document.getElementById(it)?.remove()},"closeAnnotationPopups"),lt=_(()=>{for(const t of document.querySelectorAll(`.${fe}`))t.remove();const e=W.filter(t=>(t.status==="pending"||t.status==="acknowledged")&&ro(t.url));for(const[t,n]of e.entries())xo(n,t+1)},"renderMarkers"),ne="__vdt_annotation_highlight",go={bg:"#22c55e",border:"#16a34a",fg:"#fff",highlightBg:"rgba(34,197,94,0.12)"},xo=_((e,t)=>{const n=_t(),o=e.isMultiSelect&&t>1?go:Gt(n),i=e.isFixed??!1,{left:r,top:a}=Ne(e.x,e.y,i),l=e.status==="acknowledged",d=document.createElement("div");d.className=fe,d.dataset.annotationId=e.id,d.dataset.pageX=String(e.x),d.dataset.pageY=String(e.y),d.dataset.isFixed=String(i),d.title=(e.elementLabel??e.comment.slice(0,60))||"Annotation",d.style.cssText=["position:fixed",`top:${a-11}px`,`left:${r-11}px`,"width:22px","height:22px","z-index:2147483643","pointer-events:auto","cursor:pointer","display:flex","align-items:center","justify-content:center",`background:${o.bg}`,"border:none","border-radius:50%","transition:transform 0.18s cubic-bezier(0.34,1.56,0.64,1),box-shadow 0.18s,opacity 0.15s",`box-shadow:0 1px 3px rgba(0,0,0,0.3),0 4px 12px ${o.border}66,inset 0 1px 0 rgba(255,255,255,0.2)`,l?"opacity:0.55":"",e.screenshot?`outline:2px solid ${o.bg};outline-offset:2px`:""].join(";");const x=document.createElement("span");x.style.cssText=[`color:${o.fg}`,"font-size:11px","font-weight:700","line-height:1","font-family:-apple-system,BlinkMacSystemFont,system-ui,sans-serif","letter-spacing:-0.02em"].join(";"),x.textContent=String(t),d.append(x),d.addEventListener("pointerover",()=>{d.style.transform="scale(1.25)",d.style.boxShadow=`0 2px 8px rgba(0,0,0,0.35),0 6px 20px ${o.border}88,inset 0 1px 0 rgba(255,255,255,0.25)`,x.style.display="none";let h=d.querySelector(".__vdt_edit_icon");if(h)h.style.display="flex";else{h=document.createElement("span"),h.className="__vdt_edit_icon",h.style.cssText="display:flex;align-items:center;justify-content:center;";const c=new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="${o.fg}" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><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"/></svg>`,"image/svg+xml");h.append(c.documentElement),d.append(h)}if(e.isMultiSelect&&e.boundingBox&&!e.elementBoundingBoxes?.length){const c=e.boundingBox,u=i?c.y:c.y-window.scrollY;let p=document.getElementById(ne);p||(p=document.createElement("div"),p.id=ne,document.body.append(p)),p.style.cssText=`position:fixed;pointer-events:none;z-index:2147483642;box-sizing:border-box;border:2px dashed ${o.bg};background:${o.highlightBg};transition:all 0.1s;top:${u}px;left:${c.x}px;width:${c.width}px;height:${c.height}px;`}else{let c=null;if(e.elementPath&&(c=ft(e.elementPath)),!c&&e.boundingBox){const u=e.boundingBox,p=u.x+u.width/2,b=i?u.y+u.height/2:u.y+u.height/2-window.scrollY;if(c=_e(p,b),c){const T=c.getBoundingClientRect(),v=u.width>0?T.width/u.width:1,D=u.height>0?T.height/u.height:1;(v<.5||D<.5)&&(c=null)}}if(c){const u=c.getBoundingClientRect();let p=document.getElementById(ne);p||(p=document.createElement("div"),p.id=ne,document.body.append(p)),p.style.cssText=`position:fixed;pointer-events:none;z-index:2147483642;box-sizing:border-box;border:2px solid ${o.bg};background:${o.highlightBg};transition:all 0.1s;top:${u.top}px;left:${u.left}px;width:${u.width}px;height:${u.height}px;`}else if(e.boundingBox){const u=e.boundingBox,p=i?u.y:u.y-window.scrollY;let b=document.getElementById(ne);b||(b=document.createElement("div"),b.id=ne,document.body.append(b)),b.style.cssText=`position:fixed;pointer-events:none;z-index:2147483642;box-sizing:border-box;border:2px dashed ${o.bg};background:${o.highlightBg};transition:all 0.1s;top:${p}px;left:${u.x}px;width:${u.width}px;height:${u.height}px;`}}if(e.elementBoundingBoxes&&e.elementBoundingBoxes.length>0)for(const[c,u]of e.elementBoundingBoxes.entries()){const p=`${ne}_${c}`;let b=document.getElementById(p);b||(b=document.createElement("div"),b.id=p,document.body.append(b));const T=u.y-window.scrollY;b.style.cssText=`position:fixed;pointer-events:none;z-index:2147483642;box-sizing:border-box;border:2px solid ${o.bg};background:${o.highlightBg};transition:all 0.1s;top:${T}px;left:${u.x}px;width:${u.width}px;height:${u.height}px;`}}),d.addEventListener("pointerout",()=>{if(d.dataset.popupOpen==="true")return;d.style.transform="",d.style.boxShadow=`0 1px 3px rgba(0,0,0,0.3),0 4px 12px ${o.border}66,inset 0 1px 0 rgba(255,255,255,0.2)`,x.style.display="";const h=d.querySelector(".__vdt_edit_icon");if(h&&(h.style.display="none"),document.getElementById(ne)?.remove(),e.elementBoundingBoxes)for(let c=0;c<e.elementBoundingBoxes.length;c++)document.getElementById(`${ne}_${c}`)?.remove()}),d.addEventListener("click",h=>{if(h.stopPropagation(),h.preventDefault(),n.markerClickBehavior==="delete")Y()?.deleteAnnotation?.(e.id)?.then(()=>{X().catch(()=>{})});else if(n.markerClickBehavior==="edit"){const c=ft(e.elementPath),{left:u,top:p}=Ne(e.x,e.y,e.isFixed),b=c?.getBoundingClientRect()??new DOMRect(u,p,100,20);ct(c??document.body,b,e.source,e)}else $e(e)}),d.addEventListener("contextmenu",h=>{if(h.preventDefault(),h.stopPropagation(),n.markerClickBehavior==="delete"){const c=ft(e.elementPath),{left:u,top:p}=Ne(e.x,e.y,e.isFixed),b=c?.getBoundingClientRect()??new DOMRect(u,p,100,20);ct(c??document.body,b,e.source,e)}else $e(e)}),(a<-24||a>window.innerHeight+24)&&(d.style.display="none"),document.body.append(d)},"createMarkerElement"),ho=_(e=>{e&&e.__resizeObserver?.disconnect()},"cleanupResizeObserver"),q=_(()=>{const e=document.querySelector(`#${be}`),t=!!e;e?.annotationId&&ut(e.annotationId,!1),ho(e),e?.remove(),document.querySelector("#__vdt_pending_marker")?.remove(),t&&document.dispatchEvent(new CustomEvent("__vdt_annotation_form_closed"))},"removeAnnotationForm"),Ze=_(()=>!!document.querySelector(`#${be}`),"isAnnotationFormOpen"),fo=_(()=>{const e=document.querySelector(`#${be}`);if(!e)return;const t="__vdt_shake_kf";if(!document.getElementById(t)){const n=document.createElement("style");n.id=t,n.textContent="@keyframes __vdt_shake{0%,100%{transform:translateX(0)}15%{transform:translateX(-6px)}30%{transform:translateX(5px)}45%{transform:translateX(-4px)}60%{transform:translateX(3px)}75%{transform:translateX(-2px)}90%{transform:translateX(1px)}}",document.head.append(n)}e.style.animation="none",e.style.animation="__vdt_shake 0.4s ease",e.addEventListener("animationend",()=>{e.style.animation=""},{once:!0})},"shakeAnnotationForm"),ct=_((e,t,n,o,i)=>{q(),N();const r=We(),a=e.tagName.toLowerCase(),l=e.id?`#${e.id}`:"",d=e.classList.length>0?`.${[...e.classList].slice(0,3).join(".")}`:"",x=nn(e),h=ln(e),c=cn(),u=pn(e),p=document.createElement("div");p.id=be,o&&(p.annotationId=o.id,ut(o.id,!0)),p.style.cssText=["position:fixed","z-index:2147483647",`background:${r.bg}`,`border:1px solid ${r.btnBorder}`,"padding:12px","font:12px/1.4 'JetBrains Mono',monospace",`color:${r.fg}`,`box-shadow:${r.shadow}`,"min-width:300px","max-width:400px","pointer-events:auto"].join(";");const b=i?.y??t.bottom,T=i?.x??t.left,v="__vdt_pending_marker";if(document.getElementById(v)?.remove(),i&&!o){const f=Gt(),M=document.createElement("div");M.id=v,M.style.cssText=["position:fixed",`top:${i.y-11}px`,`left:${i.x-11}px`,"width:22px","height:22px","z-index:2147483643","pointer-events:none","display:flex","align-items:center","justify-content:center",`background:${f.bg}`,"border:none","border-radius:50%",`box-shadow:0 1px 3px rgba(0,0,0,0.3),0 4px 12px ${f.border}66,inset 0 1px 0 rgba(255,255,255,0.2)`,"animation:__vdt_pulse 1.4s ease-in-out infinite"].join(";");const L=document.createElement("span");L.style.cssText=`color:${f.fg};font-size:13px;font-weight:700;line-height:1;`,L.textContent="+",M.append(L),document.body.append(M)}const D=document.createElement("div");D.style.cssText=`color:${r.primary};font-weight:bold;margin-bottom:8px;font-size:12px;`,D.textContent=o?"Edit Annotation":"Annotate Element",p.append(D);const k=document.createElement("div");k.style.cssText=`color:${r.muted};font-size:10px;margin-bottom:8px;padding:4px 6px;background:${r.btnBg};border:1px solid ${r.btnBorder};word-break:break-all;`;const C=document.createElement("span");if(C.textContent=`${a}${l}${d}`,k.append(C),n){const f=document.createElement("div");f.style.cssText=`color:${r.primary};opacity:0.6;margin-top:2px;`,f.textContent=n,k.append(f)}if(u){const f=document.createElement("div");f.style.cssText=`color:${r.success};margin-top:2px;`,f.textContent=`${u.framework}: <${u.componentName}>`,k.append(f)}if(c){const f=document.createElement("div");f.style.cssText=`color:${r.fg};opacity:0.5;margin-top:2px;font-style:italic;`,f.textContent=`"${c}"`,k.append(f)}if(p.append(k),!o){const f=wt(e);if(f){const M=document.createElement("details");M.style.cssText=`margin-bottom:8px;font-size:10px;color:${r.muted};`;const L=document.createElement("summary");L.style.cssText="cursor:pointer;font-size:10px;padding:2px 0;",L.textContent="Computed Styles",L.addEventListener("click",te=>te.stopPropagation());const Q=document.createElement("div");Q.style.cssText=`padding:4px 6px;margin-top:4px;background:${r.btnBg};border:1px solid ${r.btnBorder};font-family:'JetBrains Mono',monospace;white-space:pre-wrap;word-break:break-all;line-height:1.6;`,Q.textContent=f.replaceAll("; ",`;
29
+ `),M.append(L,Q),p.append(M)}}let F=o?.intent??"fix";const R=Se(r,"Intent",["fix","change","question","approve"].map(f=>({active:f===F,activeStyle:`background:${U[f].bg};border-color:${U[f].border};color:${U[f].fg}`,key:f,label:Qe[f]})),f=>{F=f});p.append(R);let $=o?.severity??"important";const B=Se(r,"Severity",["blocking","important","suggestion"].map(f=>({active:f===$,activeStyle:`background:${r.btnBg};border-color:${r.primary};color:${r.primary}`,key:f,label:Ke[f]})),f=>{$=f});p.append(B);let A=o?.screenshot?"existing":null;const s=document.createElement("div");s.style.cssText="margin-bottom:8px;";const g=document.createElement("button");g.type="button",g.textContent=A?"Remove Screenshot":"Capture Screenshot",g.style.cssText=`cursor:pointer;font:10px/1 'JetBrains Mono',monospace;padding:4px 8px;background:${r.btnBg};border:1px solid ${r.btnBorder};color:${r.primary};`,g.addEventListener("click",async f=>{if(f.preventDefault(),f.stopPropagation(),A)A=null,g.textContent="Capture Screenshot",m.style.display="none";else{g.textContent="Capturing...",g.disabled=!0;const M=await un(e);M?(A=M,g.textContent="Remove Screenshot",m.style.display="block",m.style.backgroundImage=`url(${M})`):g.textContent="Capture Failed — Retry",g.disabled=!1}}),s.append(g);const m=document.createElement("div");m.style.cssText=`margin-top:4px;height:80px;background-size:contain;background-repeat:no-repeat;background-position:center;border:1px solid ${r.btnBorder};display:${A?"block":"none"};`,s.append(m),p.append(s);const y=document.createElement("textarea");y.placeholder=h?`Feedback about "${h.slice(0,40)}..."`:"Describe the issue or feedback...",y.value=o?.comment??"",y.style.cssText=`width:100%;min-height:60px;resize:vertical;margin-bottom:8px;padding:6px 8px;background:${r.btnBg};border:1px solid ${r.btnBorder};color:${r.fg};font:11px/1.4 'JetBrains Mono',monospace;box-sizing:border-box;outline:none;`,y.addEventListener("focus",()=>{y.style.borderColor=r.primary}),y.addEventListener("blur",()=>{y.style.borderColor=r.btnBorder}),y.addEventListener("click",f=>f.stopPropagation()),y.addEventListener("keydown",f=>{f.stopPropagation(),f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),z.click()),f.key==="Escape"&&(f.preventDefault(),q())}),p.append(y);const w=document.createElement("div");w.style.cssText="display:flex;gap:6px;";const z=he(o?"Save":"Create",async()=>{const f=y.value.trim();if(!f){y.style.borderColor=r.danger;return}const M=Y();if(M){z.textContent=o?"Saving...":"Creating...",z.disabled=!0;try{if(o)await M.updateAnnotation(o.id,{comment:f,intent:F,severity:$,...A!=="existing"&&{screenshot:A}}),A&&A!=="existing"&&await M.saveScreenshot(o.id,A).catch(()=>{});else{const L=tn(e),Q=i?.x??t.x+t.width/2,te=i?.y??t.y+t.height/2,re=Bt(Q,te,L),ye=dn(e),Me=wt(e),ze=an(e),Pe=sn(e),Ge=Tt(e),Re={accessibility:ye,boundingBox:{height:t.height,width:t.width,x:t.x+(L?0:window.scrollX),y:t.y+(L?0:window.scrollY)},comment:f,computedStyles:Me||void 0,cssClasses:rn(e.classList),elementLabel:Ge,elementPath:x,elementTag:a,frameworkContext:u,fullPath:ze,intent:F,isFixed:L||void 0,nearbyElements:Pe||void 0,nearbyText:h||void 0,selectedText:c||void 0,severity:$,source:n,url:globalThis.location.href,x:re.x,y:re.y},j=await M.createAnnotation(Re);A&&A!=="existing"&&await M.saveScreenshot(j.id,A).catch(()=>{}),W.push(j)}await X(),q(),K(o?"Annotation saved":"Annotation created")}catch{z.textContent="Error — retry",z.disabled=!1}}});w.append(z,he("Cancel",()=>q())),o&&w.append(he("Delete",async()=>{await Y()?.deleteAnnotation?.(o.id),await X(),q()},r.danger)),p.append(w),p.append(At(r,()=>q())),pt(p,T,b,y)},"showAnnotationForm"),jt=_((e,t,n)=>{q(),N();const o=We(),i=e.slice(0,5).map(p=>p.tagName.toLowerCase()).join(", "),r=document.createElement("div");r.id=be,r.style.cssText=["position:fixed","z-index:2147483647",`background:${o.bg}`,`border:1px solid ${o.btnBorder}`,"padding:12px","font:12px/1.4 'JetBrains Mono',monospace",`color:${o.fg}`,`box-shadow:${o.shadow}`,"min-width:300px","max-width:400px","pointer-events:auto"].join(";");const a=document.createElement("div");a.style.cssText=`color:${o.primary};font-weight:bold;margin-bottom:8px;font-size:12px;`,a.textContent=`Multi-Select: ${e.length} elements`,r.append(a);const l=document.createElement("div");l.style.cssText=`color:${o.muted};font-size:10px;margin-bottom:8px;padding:4px 6px;background:${o.btnBg};border:1px solid ${o.btnBorder};`,l.textContent=i+(e.length>5?` +${e.length-5} more`:""),r.append(l);let d="fix";r.append(Se(o,"Intent",["fix","change","question","approve"].map(p=>({active:p===d,activeStyle:`background:${U[p].bg};border-color:${U[p].border};color:${U[p].fg}`,key:p,label:Qe[p]})),p=>{d=p}));let x="important";r.append(Se(o,"Severity",["blocking","important","suggestion"].map(p=>({active:p===x,activeStyle:`background:${o.btnBg};border-color:${o.primary};color:${o.primary}`,key:p,label:Ke[p]})),p=>{x=p}));const h=document.createElement("textarea");h.placeholder=`Feedback about ${e.length} selected elements...`,h.style.cssText=`width:100%;min-height:60px;resize:vertical;margin-bottom:8px;padding:6px 8px;background:${o.btnBg};border:1px solid ${o.btnBorder};color:${o.fg};font:11px/1.4 'JetBrains Mono',monospace;box-sizing:border-box;outline:none;`,h.addEventListener("click",p=>p.stopPropagation()),h.addEventListener("keydown",p=>{p.stopPropagation(),p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),u.click()),p.key==="Escape"&&(p.preventDefault(),q())}),r.append(h);const c=document.createElement("div");c.style.cssText="display:flex;gap:6px;";const u=he("Create",async()=>{const p=h.value.trim();if(!p){h.style.borderColor=o.danger;return}const b=Y();if(!b)return;const T=Bt(t.x+t.width/2,t.y+t.height/2),v={boundingBox:{height:t.height,width:t.width,x:t.x+window.scrollX,y:t.y+window.scrollY},comment:p,elementBoundingBoxes:n,elementTag:"multi-select",intent:d,isMultiSelect:!0,severity:x,url:globalThis.location.href,x:T.x,y:T.y};await b.createAnnotation(v),await X(),q(),K("Annotation created")});c.append(u),c.append(he("Cancel",()=>q())),r.append(c),r.append(At(o,()=>q())),pt(r,t.x+t.width/2,t.bottom,h)},"showMultiSelectForm"),bo=_(e=>{q(),N();const t=We();document.getElementById(it)?.remove();const n=document.createElement("div");n.id=it,n.style.cssText=["position:fixed","pointer-events:none","z-index:2147483644","box-sizing:border-box",`top:${e.y}px`,`left:${e.x}px`,`width:${e.width}px`,`height:${e.height}px`,"border:2px dashed rgba(34,197,94,0.7)","background:rgba(34,197,94,0.04)","transition:opacity 0.15s"].join(";");const o=document.createElement("div");o.style.cssText="position:absolute;top:-10px;right:-10px;width:20px;height:20px;border-radius:50%;background:#22c55e;color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:bold;line-height:1;pointer-events:none;",o.textContent="+",n.append(o),document.body.append(n);const i=document.createElement("div");i.id=be,i.style.cssText=["position:fixed","z-index:2147483647",`background:${t.bg}`,`border:1px solid ${t.btnBorder}`,"padding:12px","font:12px/1.4 'JetBrains Mono',monospace",`color:${t.fg}`,`box-shadow:${t.shadow}`,"min-width:280px","max-width:360px","pointer-events:auto"].join(";");const r=document.createElement("div");r.style.cssText=`color:${t.primary};font-weight:bold;margin-bottom:8px;font-size:12px;`,r.textContent="Area selection",i.append(r);let a="fix";i.append(Se(t,"Intent",["fix","change","question","approve"].map(u=>({active:u===a,activeStyle:`background:${U[u].bg};border-color:${U[u].border};color:${U[u].fg}`,key:u,label:Qe[u]})),u=>{a=u}));let l="important";i.append(Se(t,"Severity",["blocking","important","suggestion"].map(u=>({active:u===l,activeStyle:`background:${t.btnBg};border-color:${t.primary};color:${t.primary}`,key:u,label:Ke[u]})),u=>{l=u}));const d=document.createElement("textarea");d.placeholder="Describe what should change in this area...",d.style.cssText=`width:100%;min-height:60px;resize:vertical;margin-bottom:8px;padding:6px 8px;background:${t.btnBg};border:1px solid ${t.btnBorder};color:${t.fg};font:11px/1.4 'JetBrains Mono',monospace;box-sizing:border-box;outline:none;`,d.addEventListener("click",u=>u.stopPropagation()),d.addEventListener("keydown",u=>{u.stopPropagation(),u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),c.click()),u.key==="Escape"&&(u.preventDefault(),x())}),i.append(d);const x=_(()=>{q(),document.getElementById(it)?.remove()},"cleanup"),h=document.createElement("div");h.style.cssText="display:flex;gap:6px;justify-content:flex-end;",h.append(he("Cancel",x));const c=he("Add",async()=>{const u=d.value.trim();if(!u){d.style.borderColor=t.danger;return}const p=Y();if(p){c.textContent="Adding...",c.disabled=!0;try{const b=Bt(e.x+e.width/2,e.y+e.height/2),T={boundingBox:{height:e.height,width:e.width,x:e.x+window.scrollX,y:e.y+window.scrollY},comment:u,elementLabel:"Area selection",elementPath:`region at (${Math.round(e.x)}, ${Math.round(e.y)})`,elementTag:"area",intent:a,isMultiSelect:!0,severity:l,url:globalThis.location.href,x:b.x,y:b.y};await p.createAnnotation(T),await X(),x(),K("Annotation created")}catch{c.textContent="Error — retry",c.disabled=!1}}},"#22c55e");h.append(c),i.append(h),i.append(At(t,x)),pt(i,e.x+e.width/2,e.bottom,d)},"showAreaSelectionForm"),yo=_((e,t,n)=>{const o=window.innerWidth,i=window.innerHeight,r=8;let a;n+r+e.height<=i-r?a=n+r:n-r-e.height>=r?a=n-r-e.height:a=Math.max(r,i-e.height-r);let l;return t+e.width<=o-r?l=t:t-e.width>=r?l=t-e.width:l=Math.max(r,o-e.width-r),{left:l,top:a}},"computePopupPosition"),pt=_((e,t,n,o)=>{e.style.top="-9999px",e.style.left="-9999px",e.parentElement||document.body.append(e);const i=_(()=>{if(!document.contains(e))return;const a=e.getBoundingClientRect(),{left:l,top:d}=yo(a,t,n);e.style.top=`${d}px`,e.style.left=`${l}px`},"applyPosition");requestAnimationFrame(()=>{i(),o?.focus()});const r=new ResizeObserver(()=>{i()});r.observe(e),e.__resizeObserver=r},"positionFormNearAnchor"),Se=_((e,t,n,o)=>{const i=document.createElement("div");i.style.cssText="margin-bottom:8px;";const r=document.createElement("div");r.style.cssText=`color:${e.muted};font-size:10px;margin-bottom:4px;`,r.textContent=t,i.append(r);const a=document.createElement("div");a.style.cssText="display:flex;gap:4px;";const l=[];for(const d of n){const x=document.createElement("button");x.type="button",x.textContent=d.label,x.dataset.key=d.key,x.style.cssText=`cursor:pointer;font:10px/1 'JetBrains Mono',monospace;padding:4px 8px;border:1px solid;white-space:nowrap;${d.active?d.activeStyle:`background:${e.btnBg};border-color:${e.btnBorder};color:${e.muted}`}`,x.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),o(d.key);for(const c of l){const u=n.find(p=>p.key===c.dataset.key);c.dataset.key===d.key&&u?Object.assign(c.style,vo(u.activeStyle)):(c.style.background=e.btnBg,c.style.borderColor=e.btnBorder,c.style.color=e.muted)}}),l.push(x),a.append(x)}return i.append(a),i},"createToggleGroup"),vo=_(e=>{const t={};for(const n of e.split(";")){const o=n.indexOf(":");if(o===-1)continue;const i=n.slice(0,o).trim(),r=n.slice(o+1).trim();if(i&&r){const a=i.replaceAll(/-([a-z])/g,(l,d)=>d.toUpperCase());t[a]=r}}return t},"parseInlineStyle"),N=_(()=>{const e=document.querySelector(`#${Lt}`);e?.annotationId&&ut(e.annotationId,!1),e?.__cleanup?.(),e?.__resizeObserver?.disconnect(),e?.remove()},"removeAnnotationDetail"),ut=_((e,t)=>{const n=document.querySelector(`.${fe}[data-annotation-id="${e}"]`);if(n)if(t){n.dataset.popupOpen="true",n.style.transform="scale(1.25)";const o=n.querySelector("span:not(.__vdt_edit_icon)");if(o&&(o.style.display="none"),n.querySelector(".__vdt_edit_icon"))n.querySelector(".__vdt_edit_icon").style.display="flex";else{const i=document.createElement("span");i.className="__vdt_edit_icon",i.style.cssText="display:flex;align-items:center;justify-content:center;";const r=new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><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"/></svg>',"image/svg+xml");i.append(r.documentElement),n.append(i)}}else{delete n.dataset.popupOpen,n.style.transform="";const o=n.querySelector("span:not(.__vdt_edit_icon)");o&&(o.style.display="");const i=n.querySelector(".__vdt_edit_icon");i&&(i.style.display="none")}},"setMarkerPopupOpen"),$e=_(e=>{N(),q(),ut(e.id,!0);const t=We(),n=U[e.intent],o=t.bg==="#18181b",i=document.createElement("div");i.id=Lt,i.annotationId=e.id,i.style.cssText=["position:fixed","z-index:2147483647",`background:${t.bg}`,`border:1px solid ${o?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.1)"}`,"padding:0","font:12px/1.5 -apple-system,BlinkMacSystemFont,system-ui,sans-serif",`color:${t.fg}`,`box-shadow:0 8px 32px rgba(0,0,0,${o?"0.5":"0.15"}),0 0 0 1px rgba(${o?"255,255,255,0.06":"0,0,0,0.06"})`,"width:360px","max-height:70vh","overflow:hidden","display:flex","flex-direction:column","pointer-events:auto"].join(";");const{left:r,top:a}=Ne(e.x,e.y,e.isFixed??!1),l=document.createElement("div");l.style.cssText=`display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid ${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)"};flex-shrink:0;`;const d=document.createElement("span");d.textContent=Qe[e.intent].toUpperCase(),d.style.cssText=`font-size:10px;font-weight:700;letter-spacing:0.05em;padding:2px 6px;background:${n.bg};color:${n.fg};`,l.append(d);const x=document.createElement("span");x.textContent=Ke[e.severity],x.style.cssText=`font-size:10px;font-weight:600;color:${e.severity==="blocking"?t.danger:t.muted};`,l.append(x);const h=document.createElement("span");h.textContent=e.status.toUpperCase(),h.style.cssText=`font-size:10px;font-weight:700;letter-spacing:0.08em;padding:2px 6px;margin-left:auto;background:${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)"};color:${t.muted};`,l.append(h);const c=document.createElement("button");c.type="button",c.textContent="×",c.style.cssText=`background:none;border:none;color:${t.muted};cursor:pointer;font-size:16px;padding:0 0 0 4px;line-height:1;`,c.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation(),N()}),l.append(c),i.append(l);const u=document.createElement("div");u.style.cssText="flex:1;overflow-y:auto;padding:10px 12px;";const p=document.createElement("div");p.style.cssText=`padding:8px 10px;background:${o?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.03)"};font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-word;margin-bottom:10px;`,p.textContent=e.comment,u.append(p);const b=document.createElement("details");b.style.cssText=`margin-bottom:10px;font-size:10px;color:${t.muted};`;const T=document.createElement("summary");T.textContent=`${e.elementLabel??e.elementTag}${e.source?` • ${e.source.split("/").pop()}`:""}`,T.style.cssText=`cursor:pointer;font-size:10px;color:${t.muted};padding:4px 0;list-style:none;`,T.addEventListener("click",m=>m.stopPropagation()),b.append(T);const v=document.createElement("div");if(v.style.cssText="padding:6px 0;line-height:1.7;",se(v,"Element",`${e.elementTag}${e.cssClasses?` .${e.cssClasses}`:""}`),e.elementPath&&se(v,"Selector",e.elementPath),e.source&&se(v,"Source",e.source,t.primary),e.frameworkContext&&se(v,"Component",`${e.frameworkContext.componentName} (${e.frameworkContext.framework})`,t.success),e.nearbyText&&se(v,"Context",e.nearbyText),e.selectedText&&se(v,"Selected",`"${e.selectedText}"`),se(v,"URL",e.url),se(v,"Created",new Date(e.createdAt).toLocaleString()),b.append(v),u.append(b),e.thread&&e.thread.length>0){const m=document.createElement("div");m.style.cssText=`font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.06em;color:${t.muted};margin-bottom:6px;`,m.textContent=`Thread · ${e.thread.length}`,u.append(m);const y=document.createElement("div");y.style.cssText="max-height:160px;overflow-y:auto;margin-bottom:8px;display:flex;flex-direction:column;gap:4px;";for(const w of e.thread){const z=w.role==="human",f=document.createElement("div");f.style.cssText=["max-width:85%","padding:6px 10px",`border-radius:${z?"2px 2px 0 2px":"2px 2px 2px 0"}`,"font-size:11px","line-height:1.45","white-space:pre-wrap","word-break:break-word",`align-self:${z?"flex-end":"flex-start"}`,z?`background:${t.primary};color:#18181b`:`background:${o?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"};color:${t.fg}`].join(";"),f.textContent=w.content;const M=document.createElement("div");M.style.cssText=`font-size:10px;color:${t.muted};margin-top:2px;opacity:0.6;text-align:${z?"right":"left"};`,M.textContent=new Date(w.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});const L=document.createElement("div");L.style.cssText=`display:flex;flex-direction:column;align-items:${z?"flex-end":"flex-start"};`,L.append(f,M),y.append(L)}requestAnimationFrame(()=>{y.scrollTop=y.scrollHeight}),u.append(y)}i.append(u);const D=document.createElement("div");D.style.cssText=`display:flex;gap:6px;align-items:flex-end;padding:8px 12px;border-top:1px solid ${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)"};flex-shrink:0;`;const k=document.createElement("textarea");k.placeholder="Message...",k.rows=1,k.style.cssText=`flex:1;min-height:28px;max-height:80px;resize:none;padding:5px 8px;background:${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"};border:1px solid transparent;color:${t.fg};font:11px/1.4 -apple-system,BlinkMacSystemFont,system-ui,sans-serif;box-sizing:border-box;outline:none;`,k.addEventListener("click",m=>m.stopPropagation()),k.addEventListener("keydown",m=>m.stopPropagation()),k.addEventListener("focus",()=>{k.style.borderColor=t.primary}),k.addEventListener("blur",()=>{k.style.borderColor="transparent"}),k.addEventListener("input",()=>{k.style.height="auto",k.style.height=`${Math.min(k.scrollHeight,80)}px`}),D.append(k);const C=document.createElement("button");C.type="button",C.style.cssText=`width:28px;height:28px;border-radius:50%;border:none;background:${t.primary};color:#18181b;cursor:not-allowed;opacity:0.3;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:opacity 0.15s,background 0.15s;`;const F=new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12 7-7 7 7"/><path d="M12 19V5"/></svg>',"image/svg+xml");C.append(F.documentElement),C.disabled=!0,k.addEventListener("input",()=>{const m=k.value.trim().length>0;C.disabled=!m,C.style.opacity=m?"1":"0.3",C.style.cursor=m?"pointer":"not-allowed"}),C.addEventListener("click",async m=>{m.preventDefault(),m.stopPropagation();const y=k.value.trim();if(!y)return;await Y()?.updateAnnotation?.(e.id,{threadMessage:{content:y,role:"human",timestamp:new Date().toISOString()}}),K("Message sent"),await X();const w=W.find(z=>z.id===e.id);w&&$e(w)}),D.append(C),i.append(D);const R=document.createElement("div");if(R.style.cssText=`display:flex;align-items:center;gap:4px;padding:6px 12px;border-top:1px solid ${o?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)"};flex-shrink:0;`,e.status==="pending"){const m=document.createElement("button");m.type="button",m.textContent="Resolve",m.style.cssText=`padding:4px 10px;border:none;background:${t.success};color:#fff;font-size:10px;font-weight:600;cursor:pointer;`,m.addEventListener("click",async w=>{w.stopPropagation(),await Y()?.updateAnnotation?.(e.id,{status:"resolved"}),K("Annotation resolved"),await X(),N()}),R.append(m);const y=document.createElement("button");y.type="button",y.textContent="Edit",y.style.cssText=`padding:4px 10px;border:1px solid ${t.btnBorder};background:transparent;color:${t.fg};font-size:10px;font-weight:500;cursor:pointer;`,y.addEventListener("click",w=>{for(w.stopPropagation();i.firstChild;)i.firstChild.remove();i.style.padding="0",i.style.overflow="hidden",i.style.display="flex";const z=document.createElement("div");z.style.cssText=`display:flex;align-items:center;padding:10px 12px;border-bottom:1px solid ${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)"};flex-shrink:0;`;const f=document.createElement("span");f.textContent="Edit Annotation",f.style.cssText=`font-size:12px;font-weight:700;color:${t.fg};`,z.append(f);const M=document.createElement("button");M.type="button",M.textContent="×",M.style.cssText=`background:none;border:none;color:${t.muted};cursor:pointer;font-size:16px;padding:0;line-height:1;margin-left:auto;`,M.addEventListener("click",I=>{I.preventDefault(),I.stopPropagation(),N(),$e(e)}),z.append(M),i.append(z);const L=document.createElement("div");L.style.cssText="flex:1;overflow-y:auto;padding:12px;";const Q=document.createElement("div");Q.style.cssText=`font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.06em;color:${t.muted};margin-bottom:6px;`,Q.textContent="Intent",L.append(Q);let te=e.intent;const re=document.createElement("div");re.style.cssText="display:flex;gap:4px;margin-bottom:12px;";const ye=[];for(const I of["fix","change","question","approve"]){const O=U[I],V=document.createElement("button");V.type="button",V.textContent=Qe[I],V.dataset.intent=I,V.style.cssText=`padding:4px 10px;border:none;font-size:10px;font-weight:600;cursor:pointer;transition:all 0.15s;${I===te?`background:${O.bg};color:${O.fg};box-shadow:0 0 0 1px ${O.border};`:`background:${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)"};color:${t.muted};`}`,V.addEventListener("click",G=>{G.preventDefault(),G.stopPropagation(),te=I;for(const ie of ye){const mt=U[ie.dataset.intent];ie.dataset.intent===I?(ie.style.background=mt.bg,ie.style.color=mt.fg,ie.style.boxShadow=`0 0 0 1px ${mt.border}`):(ie.style.background=o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)",ie.style.color=t.muted,ie.style.boxShadow="none")}}),ye.push(V),re.append(V)}L.append(re);const Me=document.createElement("div");Me.style.cssText=`font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.06em;color:${t.muted};margin-bottom:6px;`,Me.textContent="Severity",L.append(Me);let ze=e.severity;const Pe=document.createElement("div");Pe.style.cssText="display:flex;gap:4px;margin-bottom:12px;";const Ge=[];for(const I of["blocking","important","suggestion"]){const O=document.createElement("button");O.type="button",O.textContent=Ke[I],O.dataset.severity=I,O.style.cssText=`padding:4px 10px;border:none;font-size:10px;font-weight:600;cursor:pointer;transition:all 0.15s;${I===ze?`background:${t.primary};color:#18181b;`:`background:${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)"};color:${t.muted};`}`,O.addEventListener("click",V=>{V.preventDefault(),V.stopPropagation(),ze=I;for(const G of Ge)G.dataset.severity===I?(G.style.background=t.primary,G.style.color="#18181b"):(G.style.background=o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)",G.style.color=t.muted)}),Ge.push(O),Pe.append(O)}L.append(Pe);const Re=document.createElement("div");Re.style.cssText=`font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:0.06em;color:${t.muted};margin-bottom:6px;`,Re.textContent="Comment",L.append(Re);const j=document.createElement("textarea");j.value=e.comment,j.style.cssText=`width:100%;min-height:90px;resize:vertical;padding:8px 10px;background:${o?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.03)"};border:1px solid ${o?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"};color:${t.fg};font:12px/1.5 -apple-system,BlinkMacSystemFont,system-ui,sans-serif;box-sizing:border-box;outline:none;transition:border-color 0.15s;`,j.addEventListener("click",I=>I.stopPropagation()),j.addEventListener("keydown",I=>I.stopPropagation()),j.addEventListener("focus",()=>{j.style.borderColor=t.primary}),j.addEventListener("blur",()=>{j.style.borderColor=o?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"}),L.append(j),i.append(L);const Ie=document.createElement("div");Ie.style.cssText=`display:flex;align-items:center;gap:6px;padding:8px 12px;border-top:1px solid ${o?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)"};flex-shrink:0;`;const De=document.createElement("button");De.type="button",De.textContent="Save",De.style.cssText=`padding:4px 10px;border:none;background:${t.primary};color:#18181b;font-size:10px;font-weight:600;cursor:pointer;`,De.addEventListener("click",async I=>{I.stopPropagation();const O=j.value.trim();if(!O){j.style.borderColor=t.danger;return}await Y()?.updateAnnotation?.(e.id,{comment:O,intent:te,severity:ze}),K("Annotation saved"),await X();const V=W.find(G=>G.id===e.id);V?(N(),$e(V)):N()}),Ie.append(De);const Fe=document.createElement("button");Fe.type="button",Fe.textContent="Cancel",Fe.style.cssText=`padding:4px 10px;border:1px solid ${t.btnBorder};background:transparent;color:${t.fg};font-size:10px;font-weight:500;cursor:pointer;`,Fe.addEventListener("click",I=>{I.stopPropagation(),N(),$e(e)}),Ie.append(Fe);const Oe=document.createElement("button");Oe.type="button",Oe.textContent="Delete",Oe.style.cssText=`padding:4px 10px;border:none;background:transparent;color:${t.danger};font-size:10px;cursor:pointer;margin-left:auto;`,Oe.addEventListener("click",async I=>{I.stopPropagation(),await Y()?.deleteAnnotation?.(e.id),W=W.filter(O=>O.id!==e.id),K("Annotation deleted"),N(),lt()}),Ie.append(Oe),i.append(Ie),setTimeout(()=>j.focus(),50)}),R.append(y)}const $=document.createElement("div");if($.style.cssText="display:flex;gap:2px;margin-left:auto;",e.status==="pending"){const m=document.createElement("button");m.type="button",m.textContent="Dismiss",m.style.cssText=`padding:4px 8px;border:none;background:transparent;color:${t.muted};font-size:10px;cursor:pointer;`,m.addEventListener("click",async y=>{y.stopPropagation(),await Y()?.updateAnnotation?.(e.id,{status:"dismissed"}),K("Annotation dismissed"),await X(),N()}),$.append(m)}const B=document.createElement("button");B.type="button",B.textContent="Copy",B.style.cssText=`padding:4px 8px;border:none;background:transparent;color:${t.muted};font-size:10px;cursor:pointer;`,B.addEventListener("click",async m=>{m.stopPropagation();try{await navigator.clipboard.writeText(Ct([e])),K("Copied to clipboard")}catch{K("Copy failed","error")}}),$.append(B);const A=document.createElement("button");A.type="button",A.textContent="Delete",A.style.cssText=`padding:4px 8px;border:none;background:transparent;color:${t.danger};font-size:10px;cursor:pointer;`,A.addEventListener("click",async m=>{m.stopPropagation(),await Y()?.deleteAnnotation?.(e.id),W=W.filter(y=>y.id!==e.id),K("Annotation deleted"),N(),lt()}),$.append(A),R.append($),i.append(R),pt(i,r+16,a);const s=_(m=>{!i.contains(m.target)&&!m.target?.classList.contains(fe)&&N()},"outsideHandler"),g=setTimeout(()=>{document.addEventListener("click",s,!0)},100);i.__cleanup=()=>{clearTimeout(g),document.removeEventListener("click",s,!0)}},"showAnnotationDetail");let Ce;const wo=_(()=>{Ce||(Ce=_(e=>{if((e.ctrlKey||e.metaKey)&&e.shiftKey&&e.key==="C"){e.preventDefault();const t=Ct(W);navigator.clipboard.writeText(t).catch(()=>{})}},"markdownShortcutHandler"),document.addEventListener("keydown",Ce))},"attachMarkdownShortcut"),$n=_(()=>{Ce&&(document.removeEventListener("keydown",Ce),Ce=void 0)},"detachMarkdownShortcut"),Nt=_(e=>{if(!e)return!1;for(const t of[be,Lt]){const n=document.querySelector(`#${t}`);if(n&&(e===n||n.contains(e)))return!0}return!!e.closest?.(`.${fe}`)},"isOverAnnotationOverlay");var $o=Object.defineProperty,kn=ae((e,t)=>$o(e,"name",{value:t,configurable:!0}),"o");const ko=kn(e=>{const t={};for(const h of e.attributes)h.name.startsWith("aria-")&&(t[h.name]=h.value);const n=e.getAttribute("role"),o=e.getAttribute("tabindex"),i=o!==null?Number.parseInt(o,10):null,r=new Set(["a","button","input","select","textarea","details","summary"]),a=e.tagName.toLowerCase(),l=r.has(a)&&!e.hasAttribute("disabled"),d=e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false",x=l||d||i!==null&&i>=0;return{ariaAttributes:t,focusable:x,role:n,tabindex:i}},"captureA11yInfo"),Eo=kn(e=>{const t=[];e.role&&t.push(`role: ${e.role}`),t.push(`focusable: ${e.focusable}`),e.tabindex!==null&&t.push(`tabindex: ${e.tabindex}`);for(const[n,o]of Object.entries(e.ariaAttributes))t.push(`${n}: ${o}`);return t.join(`
30
+ `)},"formatA11yText");var _o=Object.defineProperty,H=ae((e,t)=>_o(e,"name",{value:t,configurable:!0}),"u");const Mt="__vdt_ruler_corner",zt="__vdt_ruler_h",Pt="__vdt_ruler_v",Rt="__vdt_guideline",En='9px "JetBrains Mono","Geist Mono",ui-monospace,monospace';let Le=!1,ke=null,Z=null,ee=null,dt=new Set,Ve=null,Ye=null,Xe=null;const _n=H(e=>{const t=80/e,n=10**Math.floor(Math.log10(t)),o=t/n;let i;o<=1?i=1:o<=2?i=2:o<=5?i=5:i=10;const r=i*n,a=10,l=r/a;return{major:r,minor:l,stepsPerMajor:a}},"computeTickIntervals"),Tn=H((e,t)=>{const n=window.devicePixelRatio||1,o=e.clientWidth,i=20;e.width=o*n,e.height=i*n;const r=e.getContext("2d");if(!r)return;r.scale(n,n),r.clearRect(0,0,o,i),r.strokeStyle=t.btnBorder,r.lineWidth=1,r.beginPath(),r.moveTo(0,i-.5),r.lineTo(o,i-.5),r.stroke();const a=window.scrollX,{minor:l,stepsPerMajor:d}=_n(1);r.fillStyle=t.muted,r.strokeStyle=t.muted,r.lineWidth=1,r.font=En,r.textAlign="center",r.textBaseline="top";const x=Math.floor(a/l),h=Math.ceil((a+o)/l);for(let c=x;c<=h;c++){const u=c*l,p=u-a;if(p<0||p>o)continue;const b=c%d===0,T=c%(d/2)===0;let v;b?v=10:T?v=7:v=4,r.beginPath(),r.moveTo(Math.round(p)+.5,i),r.lineTo(Math.round(p)+.5,i-v),r.stroke(),b&&(r.fillStyle=t.fg,r.fillText(String(Math.round(u)),Math.round(p),2),r.fillStyle=t.muted)}},"drawHorizontalRuler"),Cn=H((e,t)=>{const n=window.devicePixelRatio||1,o=20,i=e.clientHeight;e.width=o*n,e.height=i*n;const r=e.getContext("2d");if(!r)return;r.scale(n,n),r.clearRect(0,0,o,i),r.strokeStyle=t.btnBorder,r.lineWidth=1,r.beginPath(),r.moveTo(o-.5,0),r.lineTo(o-.5,i),r.stroke();const a=window.scrollY,{minor:l,stepsPerMajor:d}=_n(1);r.fillStyle=t.muted,r.strokeStyle=t.muted,r.lineWidth=1,r.font=En;const x=Math.floor(a/l),h=Math.ceil((a+i)/l);for(let c=x;c<=h;c++){const u=c*l,p=u-a;if(p<0||p>i)continue;const b=c%d===0,T=c%(d/2)===0;let v;b?v=10:T?v=7:v=4,r.beginPath(),r.moveTo(o,Math.round(p)+.5),r.lineTo(o-v,Math.round(p)+.5),r.stroke(),b&&(r.save(),r.fillStyle=t.fg,r.translate(9,Math.round(p)),r.rotate(-Math.PI/2),r.textAlign="center",r.textBaseline="top",r.fillText(String(Math.round(u)),0,0),r.restore())}},"drawVerticalRuler"),qt=H(()=>{Xe&&(Z&&Tn(Z,Xe),ee&&Cn(ee,Xe))},"redraw"),To=H(e=>{const t=[],n=document.querySelectorAll("body *"),o=2e3;let i=0;for(const r of n){if(i>=o)break;if(r.id===Mt||r.id===zt||r.id===Pt||r.classList.contains(Rt))continue;const a=r.getBoundingClientRect();a.width===0&&a.height===0||(e==="horizontal"?t.push(a.top,a.bottom):t.push(a.left,a.right),i++)}return t},"collectSnapEdges"),Co=H((e,t)=>{let n=null,o=6;for(const i of t){const r=Math.abs(i-e);r<o&&(o=r,n=i)}return n},"findSnapEdge"),et=9,Ht=H((e,t,n)=>{const o=document.createElement("div");o.className=Rt;const i=e==="horizontal";o.style.cssText=["position:fixed","z-index:2147483644","pointer-events:none",i?`top:${t}px;left:0;width:100vw;height:0`:`left:${t}px;top:0;width:0;height:100vh`].join(";");const r=document.createElement("div");r.style.cssText=["position:absolute","pointer-events:none",i?"left:0;right:0;height:1px;top:0;transform:translateY(-0.5px)":"top:0;bottom:0;width:1px;left:0;transform:translateX(-0.5px)",`background:${n.primary}`].join(";"),o.append(r);const a=document.createElement("div");a.style.cssText=["position:absolute","pointer-events:auto",i?`left:0;right:0;height:${et*2+1}px;top:${-et}px`:`top:0;bottom:0;width:${et*2+1}px;left:${-et}px`,"background:transparent",i?"cursor:row-resize":"cursor:col-resize"].join(";"),o.append(a);const l=document.createElement("div");l.style.cssText=["position:absolute",`background:${n.primary}`,"color:#fff",'font:9px/1 "JetBrains Mono","Geist Mono",ui-monospace,monospace',"padding:2px 4px","white-space:nowrap","pointer-events:none",i?"left:24px;top:2px":"top:24px;left:2px"].join(";"),o.append(l),document.body.append(o),dt.add(o);let d=t;const x=H(c=>{d=c,i?o.style.top=`${d}px`:o.style.left=`${d}px`;const u=i?d+window.scrollY:d+window.scrollX;l.textContent=`${Math.round(u)}px`},"updatePosition"),h=H(()=>{let c=performance.now(),u=d,p=!1,b=null;l.style.display="";const T=H(D=>{const k=performance.now(),C=i?D.clientY:D.clientX,F=Math.abs(C-u)/Math.max(1,k-c);if(c=k,u=C,b===null&&(b=To(e)),F<3){const R=Co(C,b);if(R!==null){x(R),p||(p=!0,r.style.background="#0D99FF",l.style.background="#0D99FF");return}}p&&(p=!1,r.style.background=n.primary,l.style.background=n.primary),x(C)},"onPointerMove"),v=H(()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",v),l.style.display="none",r.style.background=n.primary,l.style.background=n.primary,(i&&d<20||!i&&d<20)&&(o.remove(),dt.delete(o))},"onPointerUp");document.addEventListener("pointermove",T),document.addEventListener("pointerup",v)},"startDrag");a.addEventListener("pointerdown",c=>{c.preventDefault(),c.stopPropagation(),h()}),x(d),h()},"spawnGuideline"),So=H(e=>{Le||(Xe=e,ke=document.createElement("div"),ke.id=Mt,ke.style.cssText=["position:fixed","top:0","left:0","width:20px","height:20px",`background:${e.bg}`,`border-right:1px solid ${e.btnBorder}`,`border-bottom:1px solid ${e.btnBorder}`,"z-index:2147483646","pointer-events:none"].join(";"),document.body.append(ke),Z=document.createElement("canvas"),Z.id=zt,Z.style.cssText=["position:fixed","top:0","left:20px","height:20px","width:calc(100vw - 20px)",`background:${e.bg}`,"z-index:2147483646","pointer-events:auto","cursor:s-resize"].join(";"),Z.addEventListener("pointerdown",t=>{t.preventDefault(),Ht("horizontal",t.clientY,e)}),document.body.append(Z),ee=document.createElement("canvas"),ee.id=Pt,ee.style.cssText=["position:fixed","top:20px","left:0","width:20px","height:calc(100vh - 20px)",`background:${e.bg}`,"z-index:2147483646","pointer-events:auto","cursor:e-resize"].join(";"),ee.addEventListener("pointerdown",t=>{t.preventDefault(),Ht("vertical",t.clientX,e)}),document.body.append(ee),Tn(Z,e),Cn(ee,e),Ve=qt,window.addEventListener("resize",Ve),Ye=qt,window.addEventListener("scroll",Ye,{passive:!0}),Le=!0)},"createRulers"),Sn=H(()=>{if(Le){ke?.remove(),Z?.remove(),ee?.remove();for(const e of dt)e.remove();dt.clear(),Ve&&(window.removeEventListener("resize",Ve),Ve=null),Ye&&(window.removeEventListener("scroll",Ye),Ye=null),ke=null,Z=null,ee=null,Xe=null,Le=!1}},"removeRulers"),Vt=H(()=>Le,"areRulersVisible"),yt=H(e=>{if(!Le)return!1;const t=e.id;return t===Mt||t===zt||t===Pt?!0:e.classList.contains(Rt)},"isRulerElement");var Lo=Object.defineProperty,S=ae((e,t)=>Lo(e,"name",{value:t,configurable:!0}),"l");const Ae=to,Ao=yn,me="__vdt_inspector_overlay",Bo=new Set(["A","B","BLOCKQUOTE","CITE","CODE","EM","FIGCAPTION","H1","H2","H3","H4","H5","H6","I","LABEL","LI","MARK","P","PRE","Q","S","SMALL","SPAN","STRONG","TD","TH","TIME","U"]),Ln="__vdt_inspector_label",kt="__vdt_inspector_cursor",J="__vdt_inspector_badge",Yt="__vdt_inspector_kf",Be="__vdt_inspector_result",tt=S(e=>{if(!e)return!1;if(e.tagName==="DEV-TOOLBAR")return!0;let t=e;for(;t;)if(t instanceof ShadowRoot){if(t.host?.tagName==="DEV-TOOLBAR")return!0;t=t.host}else t=t.parentNode;return!1},"isInsideDevToolbar"),Mo=S(()=>{let e=document.querySelector(`#${me}`);if(!e){const t=Ae();e=document.createElement("div"),e.id=me,e.style.cssText=["position:fixed","pointer-events:none","z-index:2147483644","box-sizing:border-box",`border:1px solid ${t.overlayBorder}`,`background:${t.overlayBg}`,"transition:top 60ms,left 60ms,width 60ms,height 60ms","display:none"].join(";");const n=document.createElement("div");n.id=Ln,n.style.cssText=["position:absolute","bottom:calc(100% + 2px)","left:0",`background:${t.bg}`,`color:${t.primary}`,"font:11px/1.2 'JetBrains Mono',monospace","padding:2px 6px","white-space:nowrap","pointer-events:none",`border:1px solid ${t.btnBorder}`].join(";"),e.append(n),document.body.append(e)}return e},"getOrCreateOverlay"),Et=S(e=>{let t=e;for(;t;){const n=t.dataset.vdtSource;if(n)return n;t=t.parentElement??void 0}},"findSource"),zo=S(e=>{const t=e.split(":");if(t.length<3)return e;const n=t[t.length-2],o=t.slice(0,-2).join(":");return`${o.split("/").pop()??o}:${n}`},"formatSourceShort"),nt=S(e=>{const t=document.querySelector(`#${me}`);if(!t)return;const n=e.getBoundingClientRect();t.style.display="block",t.style.top=`${n.top}px`,t.style.left=`${n.left}px`,t.style.width=`${n.width}px`,t.style.height=`${n.height}px`;const o=document.querySelector(`#${Ln}`);if(o){const i=e.tagName.toLowerCase(),r=e.id?`#${e.id}`:"",a=e.classList.length>0?`.${[...e.classList].slice(0,3).join(".")}`:"",l=`${i}${r}${a}`,d=Et(e);o.textContent=d?`${l} · ${zo(d)}`:l,n.top<28?(o.style.bottom="auto",o.style.top="calc(100% + 2px)"):(o.style.top="",o.style.bottom="calc(100% + 2px)")}},"updateOverlayPosition"),ve=S(()=>{const e=document.querySelector(`#${me}`);e&&(e.style.display="none")},"hideOverlay"),Po=S(()=>{document.querySelector(`#${me}`)?.remove(),document.querySelector(`#${kt}`)?.remove()},"removeOverlay"),Xt=S(e=>{let t=document.querySelector(`#${kt}`);e?(t||(t=document.createElement("style"),t.id=kt,document.head.append(t)),t.textContent=["*, *::before, *::after { cursor: crosshair !important; }",`#${J}, #${J} * { cursor: pointer !important; }`,`#${Be}, #${Be} * { cursor: pointer !important; }`,".__vdt_annotation_marker, .__vdt_annotation_marker * { cursor: pointer !important; }","#__vdt_annotation_form, #__vdt_annotation_form * { cursor: auto !important; }","#__vdt_annotation_form textarea { cursor: text !important; }","#__vdt_annotation_form button, #__vdt_annotation_form select { cursor: pointer !important; }","#__vdt_annotation_detail, #__vdt_annotation_detail * { cursor: auto !important; }","#__vdt_annotation_detail textarea { cursor: text !important; }","#__vdt_annotation_detail button { cursor: pointer !important; }","#__vdt_clear_confirm, #__vdt_clear_confirm * { cursor: auto !important; }","#__vdt_clear_confirm button { cursor: pointer !important; }","#__vdt_area_outline { cursor: auto !important; }","#__vdt_ruler_h { cursor: s-resize !important; }","#__vdt_ruler_v { cursor: e-resize !important; }",".__vdt_guideline { cursor: row-resize !important; }"].join(" ")):t&&t.remove()},"setCrosshairCursor");let Ue="inspect";const An=S(()=>{document.querySelector(`#${J}`)?.remove()},"removeFloatingBadge"),It=S(e=>new DOMParser().parseFromString(e,"image/svg+xml").documentElement,"parseSvg"),Ut='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>',Qt='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>',Kt='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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"/><circle cx="12" cy="12" r="3"/></svg>',Ro='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>',Io='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>',Do='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/></svg>',Fo='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>',Oo='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z"/><path d="M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6"/></svg>',jo='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/><path d="M12 8v4"/><path d="M12 16h.01"/></svg>',No='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"/><path d="m14.5 12.5 2-2"/><path d="m11.5 9.5 2-2"/><path d="m8.5 6.5 2-2"/><path d="m17.5 15.5 2-2"/></svg>';let oe=!0;const we=S((e,t,n,o,i=!1)=>{const r=document.createElement("button");r.type="button",r.title=n,r.dataset.active=i?"1":"",r.style.cssText=["position:relative","display:flex","justify-content:center","align-items:center","border:0","white-space:nowrap","padding:0","margin:0","cursor:pointer",`background:${i?`${e.primary}1f`:"transparent"}`,`color:${i?e.primary:e.muted}`,"transition:all 150ms"].join(";");const a=document.createElement("div");return a.style.cssText="width:24px;height:24px;display:flex;align-items:center;justify-content:center;user-select:none;",a.append(It(t)),r.append(a),r.addEventListener("pointerover",()=>{r.style.background=`${e.primary}14`,r.style.color=e.primary}),r.addEventListener("pointerout",()=>{const l=r.dataset.active==="1";r.style.background=l?`${e.primary}1f`:"transparent",r.style.color=l?e.primary:e.muted}),r.addEventListener("pointerdown",()=>{r.style.transform="scale(0.94)"}),r.addEventListener("pointerup",()=>{r.style.transform=""}),r.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),o()}),r},"makeToolbarButton"),Jt=S((e,t)=>{const n=e.querySelector("svg");n&&n.replaceWith(It(t))},"setButtonIcon"),vt=S((e,t="success")=>{const n="__vdt_toast";document.getElementById(n)?.remove();const o=document.createElement("div");o.id=n,o.textContent=e,o.style.cssText=["position:fixed","z-index:2147483646","bottom:1rem","right:1rem","padding:6px 14px","border-radius:4px",`background:${t==="success"?"#22c55e":"#ef4444"}`,"color:#fff",'font:12px/1 "JetBrains Mono","Geist Mono",ui-monospace,"Cascadia Code","Fira Code",monospace',"font-weight:600","pointer-events:none","opacity:0","transition:opacity 0.2s,transform 0.2s","transform:translateY(4px)"].join(";"),document.body.append(o),requestAnimationFrame(()=>{o.style.opacity="1",o.style.transform="translateY(0)"}),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),200)},1500)},"showToast"),qo=S(e=>{if(!document.querySelector(`#${Yt}`)){const $=document.createElement("style");$.id=Yt,$.textContent="@keyframes __vdt_pulse{0%,100%{opacity:1}50%{opacity:.3}}",document.head.append($)}An(),oe=!0;const t=Ae(),n=document.createElement("div"),o=t===Ao,i=o?"0 6px 24px rgba(0,0,0,.7),0 2px 8px rgba(0,0,0,.5)":"0 4px 20px rgba(0,0,0,.12),0 0 0 1px rgba(0,0,0,.08)";n.id=J,n.style.cssText=["position:fixed","bottom:4rem","left:50%","transform:translateX(-50%)","z-index:2147483645","display:flex","align-items:center","gap:4px","padding:4px",`background:${t.bg}`,"border:0",`box-shadow:${i}`,"pointer-events:auto","user-select:none",'font:13px/1.6 "JetBrains Mono","Geist Mono",ui-monospace,"Cascadia Code","Fira Code",monospace'].join(";"),n.addEventListener("click",$=>$.stopPropagation()),n.addEventListener("mousedown",$=>$.stopPropagation());let r=0,a=0;const l=S($=>{n.style.left=`${$.clientX-r}px`,n.style.top=`${$.clientY-a}px`,n.style.transform="none",n.style.bottom="auto",n.style.cursor="grabbing"},"onDragMove"),d=S(()=>{document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",d),n.style.cursor=""},"onDragEnd");n.addEventListener("pointerdown",$=>{if($.target.closest("button"))return;const B=n.getBoundingClientRect();r=$.clientX-B.left,a=$.clientY-B.top,document.addEventListener("pointermove",l),document.addEventListener("pointerup",d)});const x=document.createElement("div");x.style.cssText=["display:flex","flex-direction:column","gap:2px","padding:2px 4px","cursor:grab",`color:${t.muted}`,"opacity:0.4","transition:opacity 0.15s"].join(";"),x.addEventListener("pointerover",()=>{x.style.opacity="0.8"}),x.addEventListener("pointerout",()=>{x.style.opacity="0.4"});for(let $=0;$<3;$++){const B=document.createElement("div");B.style.cssText="display:flex;gap:2px;";for(let A=0;A<2;A++){const s=document.createElement("div");s.style.cssText=`width:2px;height:2px;border-radius:50%;background:${t.muted};`,B.append(s)}x.append(B)}n.append(x),Ue="inspect";const h=S(($,B,A)=>{const s=document.createElement("button");s.type="button",s.title=B;const g=document.createElement("div");g.style.cssText="width:24px;height:24px;display:flex;align-items:center;justify-content:center;user-select:none;",g.append(It($)),s.append(g);const m=S(()=>{const y=Ue===A;s.style.cssText=["position:relative","display:flex","justify-content:center","align-items:center","border:0","white-space:nowrap","padding:0","margin:0","cursor:pointer",`background:${y?`${t.primary}1f`:"transparent"}`,`color:${y?t.primary:t.muted}`,"transition:all 150ms"].join(";")},"applyState");return m(),s.addEventListener("pointerover",()=>{s.style.background=`${t.primary}14`,s.style.color=t.primary}),s.addEventListener("pointerout",m),s.addEventListener("pointerdown",()=>{s.style.transform="scale(0.94)"}),s.addEventListener("pointerup",()=>{s.style.transform=""}),s.addEventListener("click",y=>{y.preventDefault(),y.stopPropagation(),Ue=A,m();for(const w of n.querySelectorAll("[data-mode]"))w!==s&&w.dispatchEvent(new Event("pointerout"))}),s.dataset.mode=A,s},"createModeButton"),c=h(Oo,"Inspect mode — click to view source & info","inspect");n.append(c);const u=h(jo,"Annotate mode — click to add feedback","annotate");n.append(u);const p=document.createElement("span");p.style.cssText=`width:1px;height:20px;background:${o?"rgba(196,181,253,0.2)":"rgba(124,58,237,0.2)"};flex-shrink:0;`,n.append(p);const b=Qn(),T=we(t,b?Qt:Ut,b?"Resume animations (P)":"Pause animations (P)",()=>{const $=Jn();Jt(T,$?Qt:Ut),T.title=$?"Resume animations (P)":"Pause animations (P)",T.dataset.active=$?"1":"",T.style.color=$?t.primary:t.muted,T.style.background=$?`${t.primary}22`:"transparent"},b);n.append(T);const v=we(t,Kt,"Toggle markers (H)",()=>{oe=!oe;for(const $ of document.querySelectorAll(".__vdt_annotation_marker"))$.style.visibility=oe?"visible":"hidden";Jt(v,oe?Kt:Ro),v.title=oe?"Hide markers (H)":"Show markers (H)",v.dataset.active=oe?"":"1",v.style.color=oe?t.muted:t.primary,v.style.background=oe?"transparent":`${t.primary}22`});n.append(v);const D=we(t,Io,"Copy annotations (C)",async()=>{const $=globalThis.__VISULIMA_DEVTOOLS__?.rpc;if($?.getAnnotations)try{const B=await $.getAnnotations(),{annotationsToMarkdown:A}=await Promise.resolve().then(()=>Vn),s=A(B,_t().outputDetail);await navigator.clipboard.writeText(s),vt("Copied to clipboard")}catch{vt("Copy failed","error")}});n.append(D);const k=Vt(),C=we(t,No,"Toggle rulers (R)",()=>{Vt()?(Sn(),C.dataset.active="",C.style.color=t.muted,C.style.background="transparent"):(So(t),C.dataset.active="1",C.style.color=t.primary,C.style.background=`${t.primary}22`)},k);n.append(C);const F="__vdt_clear_confirm";n.append(we(t,Do,"Clear all annotations (X)",()=>{document.getElementById(F)?.remove();const $=n.getBoundingClientRect(),B=document.createElement("div");B.id=F,B.style.cssText=["position:fixed","z-index:2147483646",`bottom:${window.innerHeight-$.top+6}px`,`left:${$.left}px`,`background:${t.bg}`,`box-shadow:${i}`,"padding:6px 12px","display:flex","align-items:center","gap:8px",'font:12px/1 "JetBrains Mono","Geist Mono",ui-monospace,"Cascadia Code","Fira Code",monospace',`color:${t.fg}`,"pointer-events:auto"].join(";"),B.addEventListener("click",m=>m.stopPropagation()),B.addEventListener("mousedown",m=>m.stopPropagation());const A=document.createElement("span");A.textContent="Clear all annotations?",A.style.cssText=`color:${t.muted};font-size:11px;`;const s=document.createElement("button");s.type="button",s.textContent="Yes, clear",s.style.cssText="background:#ef4444;color:#fff;border:none;padding:4px 10px;cursor:pointer;font-size:11px;font-weight:600;",s.addEventListener("click",async m=>{m.stopPropagation(),B.remove();const y=globalThis.__VISULIMA_DEVTOOLS__?.rpc;if(!y?.getAnnotations||!y?.deleteAnnotation)return;const w=await y.getAnnotations();await Promise.all(w.map(z=>y.deleteAnnotation(z.id))),await X(),vt(`${w.length} annotation${w.length===1?"":"s"} cleared`)});const g=document.createElement("button");g.type="button",g.textContent="Cancel",g.style.cssText=`background:transparent;color:${t.muted};border:1px solid ${t.btnBorder};padding:4px 10px;cursor:pointer;font-size:11px;`,g.addEventListener("click",m=>{m.stopPropagation(),B.remove()}),B.append(A,s,g),document.body.append(B),setTimeout(()=>B.remove(),5e3)}));const R=document.createElement("span");R.style.cssText=`width:1px;height:20px;background:${o?"rgba(196,181,253,0.2)":"rgba(124,58,237,0.2)"};flex-shrink:0;`,n.append(R),n.append(we(t,Fo,"Close inspector (Esc)",()=>{e()})),document.body.append(n)},"createFloatingBadge"),Ho=S((e,t)=>{const n=document.createElement("div");n.style.cssText=`margin-bottom:10px;padding:6px 8px;background:${t.btnBg};border:1px solid ${t.btnBorder};font-size:10px;line-height:1.6;`;const o=document.createElement("div");o.style.cssText=`color:${t.primary};font-weight:bold;margin-bottom:2px;font-size:11px;`,o.textContent="Accessibility",n.append(o);const i=S((a,l,d=!1)=>{const x=document.createElement("div");x.style.cssText="display:flex;gap:6px;align-items:baseline;";const h=document.createElement("span");h.style.cssText=`color:${t.muted};min-width:70px;`,h.textContent=a;const c=document.createElement("span");c.style.cssText=`color:${d?t.primary:t.fg};word-break:break-all;`,c.textContent=l,x.append(h,c),n.append(x)},"addRow");e.role&&i("role",e.role,!0),i("focusable",String(e.focusable)),e.tabindex!==null&&i("tabindex",String(e.tabindex));const r=Object.keys(e.ariaAttributes);for(const a of r)i(a,e.ariaAttributes[a]);if(!e.role&&r.length===0&&e.tabindex===null){const a=document.createElement("div");a.style.cssText=`color:${t.muted};font-style:italic;`,a.textContent="No ARIA attributes",n.append(a)}return n},"renderA11ySection");let Ee;const Vo=S(e=>{const t=e.split(":"),n=Number.parseInt(t.at(-1)??"0",10)||void 0,o=Number.parseInt(t.at(-2)??"0",10)||void 0,i=t.slice(0,-2).join(":");globalThis.__VISULIMA_DEVTOOLS__?.rpc?.openInEditor?.(i,o,n,Mn()).catch(()=>{})},"openInEditor"),le=S(()=>{Ee?.(),Ee=void 0,document.querySelector(`#${Be}`)?.remove()},"removeResultPopup"),ot=S((e,t)=>{const n=Ae(),o=document.createElement("button");return o.textContent=e,o.style.cssText=[`background:${n.btnBg}`,`border:1px solid ${n.btnBorder}`,`color:${n.primary}`,"cursor:pointer","font:11px/1 'JetBrains Mono',monospace","padding:5px 10px","white-space:nowrap"].join(";"),o.addEventListener("pointerover",()=>{o.style.background=n.btnBgHover,o.style.borderColor=n.btnBorderHover}),o.addEventListener("pointerout",()=>{o.style.background=n.btnBg,o.style.borderColor=n.btnBorder}),o.addEventListener("click",i=>{i.stopPropagation(),t()}),o},"makeActionButton"),Wt=S((e,t,n,o,i)=>{Ee?.(),Ee=void 0,le();const r=Ae(),a=document.createElement("div");a.id=Be,a.style.cssText=["position:fixed","z-index:2147483646",`background:${r.bg}`,`border:1px solid ${r.btnBorder}`,"padding:10px 32px 10px 12px","font:12px/1.4 'JetBrains Mono',monospace",`color:${r.fg}`,`box-shadow:${r.shadow}`,"min-width:200px","max-width:400px","pointer-events:auto"].join(";");const l=o??t.left,d=i??t.bottom,x=e.tagName.toLowerCase(),h=e.id?`#${e.id}`:"",c=e.classList.length>0?`.${[...e.classList].slice(0,3).join(".")}`:"",u=document.createElement("div");if(u.style.cssText=`color:${r.primary};font-weight:bold;margin-bottom:4px;word-break:break-all;`,u.textContent=`${x}${h}${c}`,a.append(u),n){const k=document.createElement("div");k.style.cssText=`color:${r.muted};margin-bottom:10px;word-break:break-all;font-size:10px;`,k.textContent=n,a.append(k)}const p=ko(e);a.append(Ho(p,r));const b=document.createElement("div");b.style.cssText="display:flex;gap:6px;flex-wrap:wrap;",n&&b.append(ot("Open in editor",()=>{Vo(n),le()})),b.append(ot("Copy HTML",()=>{navigator.clipboard.writeText(e.outerHTML).catch(()=>{}),le()})),n&&b.append(ot("Copy path",()=>{navigator.clipboard.writeText(n).catch(()=>{}),le()})),b.append(ot("Copy A11y",()=>{navigator.clipboard.writeText(Eo(p)).catch(()=>{}),le()})),a.append(b);const T=document.createElement("button");T.textContent="×",T.style.cssText=["position:absolute","top:6px","right:8px","background:transparent","border:none",`color:${r.muted}`,"cursor:pointer","font:16px/1 'JetBrains Mono',monospace","padding:0","line-height:1","transition:color 0.15s"].join(";"),T.addEventListener("pointerover",()=>{T.style.color=r.fg}),T.addEventListener("pointerout",()=>{T.style.color=r.muted}),T.addEventListener("click",k=>{k.stopPropagation(),le()}),a.append(T),a.style.top="-9999px",a.style.left="-9999px",document.body.append(a),xn(()=>{if(!document.contains(a))return;const k=a.getBoundingClientRect(),C=window.innerWidth,F=window.innerHeight,R=8;let $;d+R+k.height<=F-R?$=d+R:d-t.height-R-k.height>=R?$=d-t.height-R-k.height:$=Math.max(R,F-k.height-R);let B;B=l+k.width<=C-R?l:Math.max(R,C-k.width-R),a.style.top=`${$}px`,a.style.left=`${B}px`},0);const v=S(k=>{a.contains(k.target)||(le(),document.removeEventListener("click",v,!0),Ee=void 0)},"handleOutside"),D=setTimeout(()=>{document.addEventListener("click",v,!0)},100);Ee=S(()=>{clearTimeout(D),document.removeEventListener("click",v,!0)},"removePopupOutsideHandler")},"showResultPopup");let at;const Yo=S(e=>{at?.(),Mo(),Xt(!0),X().catch(()=>{}),wo();const t=S(()=>document.querySelector(`#${J}`)??void 0,"badgeElement"),n=S(s=>{if(!s)return!1;const g=t();return!!(g&&(s===g||g.contains(s)))},"isOverBadge"),o=S(s=>{if(!s)return!1;const g=document.querySelector(`#${Be}`);return!!(g&&(s===g||g.contains(s)))},"isOverResultPopup"),i=new MutationObserver(s=>{for(const g of s)for(const m of g.addedNodes)if(m instanceof HTMLElement&&(m.tagName==="VITE-ERROR-OVERLAY"||m.id==="vite-error-overlay")){C.cleanup(),e();return}});i.observe(document.body,{childList:!0});const r="__vdt_multi_select_outline";let a=[];const l={cmd:!1,shift:!1},d=S(()=>{for(const g of document.querySelectorAll(`.${r}`))g.remove();const s=a.length>1;for(const g of a){const m=g.element.getBoundingClientRect(),y=document.createElement("div");y.className=r,y.style.cssText=["position:fixed","pointer-events:none","z-index:2147483644","box-sizing:border-box",`top:${m.top}px`,`left:${m.left}px`,`width:${m.width}px`,`height:${m.height}px`,s?"border:2px solid rgba(34,197,94,0.7);background:rgba(34,197,94,0.08);":`border:2px solid ${Ae().overlayBorder};background:${Ae().overlayBg};`,"transition:all 0.1s;"].join(""),document.body.append(y)}},"renderMultiSelectOutlines"),x=S(()=>{for(const s of document.querySelectorAll(`.${r}`))s.remove()},"removeMultiSelectOutlines"),h=S(()=>{if(a.length!==0)if(ve(),a.length===1){const s=a[0],g=s.element.getBoundingClientRect(),m=Et(s.element);x(),a=[],Ue==="annotate"?ct(s.element,g,m,void 0,{x:g.left+g.width/2,y:g.top+g.height/2}):Wt(s.element,g,m)}else{const s=a.map(w=>w.element),g=s.map(w=>w.getBoundingClientRect()),m=g.map(w=>({height:w.height,width:w.width,x:w.x,y:w.y})),y=new DOMRect(Math.min(...g.map(w=>w.left)),Math.min(...g.map(w=>w.top)),Math.max(...g.map(w=>w.right))-Math.min(...g.map(w=>w.left)),Math.max(...g.map(w=>w.bottom))-Math.min(...g.map(w=>w.top)));x(),a=[],jt(s,y,m)}},"commitMultiSelect"),c={hasMoved:!1,x:0,y:0},u=S(s=>{if((s.key==="Meta"||s.key==="Control")&&(l.cmd=!0,c.hasMoved&&!Ze())){const g=rt(c.x,c.y);if(g&&!tt(g)){nt(g);const m=document.querySelector(`#${me}`);m&&(m.style.borderStyle="dashed")}}s.key==="Shift"&&(l.shift=!0)},"handleModifierKeyDown"),p=S(s=>{const g=l.cmd&&l.shift;if((s.key==="Meta"||s.key==="Control")&&(l.cmd=!1,c.hasMoved&&!Ze())){const y=_e(c.x,c.y);if(y&&!tt(y)){nt(y);const w=document.querySelector(`#${me}`);w&&(w.style.borderStyle="solid")}}s.key==="Shift"&&(l.shift=!1);const m=l.cmd&&l.shift;g&&!m&&a.length>0&&h()},"handleModifierKeyUp"),b=S(()=>{l.cmd=!1,l.shift=!1,a.length>0&&(x(),a=[])},"handleModifierBlur");document.addEventListener("keydown",u),document.addEventListener("keyup",p),window.addEventListener("blur",b);const T="__vdt_drag_rect";let v,D=!1;const k=S(()=>{document.querySelector(`#${T}`)?.remove(),v=void 0,D=!1},"removeDragRect"),C={cleanup(){document.removeEventListener("mousemove",C.handleMouseMove),document.removeEventListener("mousedown",C.handleMouseDown),document.removeEventListener("mouseup",C.handleMouseUp,!0),document.removeEventListener("click",C.handleClick,!0),document.removeEventListener("keydown",C.handleKeyDown),i.disconnect(),ve(),Po(),k(),x(),a=[],document.removeEventListener("__vdt_annotation_form_closed",A),document.removeEventListener("keydown",u),document.removeEventListener("keyup",p),window.removeEventListener("blur",b),Xt(!1),Sn(),An(),at=void 0},handleClick(s){const g=((s.metaKey||s.ctrlKey)&&!s.shiftKey?rt(s.clientX,s.clientY):_e(s.clientX,s.clientY))??s.target;if(!g||tt(g)||n(g)||o(g)||Nt(g)||yt(g))return;if((s.metaKey||s.ctrlKey)&&s.shiftKey){s.preventDefault(),s.stopPropagation();const w=a.findIndex(z=>z.element===g);w===-1?a.push({element:g,name:Tt(g),rect:g.getBoundingClientRect()}):a.splice(w,1),d();return}if(s.preventDefault(),s.stopPropagation(),Ze()){fo();return}if(!_t().blockInteractions&&g.closest?.("button, a, input, select, textarea, [role='button'], [onclick]"))return;wn();const m=g.getBoundingClientRect(),y=Et(g);Ue==="annotate"?(nt(g),ct(g,m,y,void 0,{x:s.clientX,y:s.clientY})):(ve(),Wt(g,m,y,s.clientX,s.clientY))},handleKeyDown(s){const g=s.target?.tagName;if(g==="INPUT"||g==="TEXTAREA"||g==="SELECT")return;if(s.key==="Escape"){if(a.length>0){x(),a=[];return}C.cleanup(),e();return}const m=s.key.toLowerCase();if(m==="p"){s.preventDefault(),document.querySelector(`#${J} button[title*="animations"]`)?.click();return}if(m==="h"){s.preventDefault(),document.querySelector(`#${J} button[title*="markers"]`)?.click();return}if(m==="c"&&!s.ctrlKey&&!s.metaKey){s.preventDefault(),document.querySelector(`#${J} button[title*="Copy"]`)?.click();return}if(m==="r"){s.preventDefault(),document.querySelector(`#${J} button[title*="rulers"]`)?.click();return}m==="x"&&(s.preventDefault(),document.querySelector(`#${J} button[title*="Clear"]`)?.click())},handleMouseDown(s){const g=s.composedPath()[0]||s.target;g.closest?.(`#${J}`)||g.closest?.(`#${Be}`)||g.classList?.contains("__vdt_annotation_marker")||yt(g)||g.closest?.("#__vdt_annotation_form")||g.closest?.("#__vdt_annotation_detail")||Bo.has(g.tagName)||g.isContentEditable||(v={x:s.clientX,y:s.clientY},D=!1)},handleMouseMove(s){if(Ze())return;if(v){const w=s.clientX-v.x,z=s.clientY-v.y,f=w*w+z*z,M=8;if(!D&&f<M*M)return;D=!0;let L=document.querySelector(`#${T}`);L||(L=document.createElement("div"),L.id=T,L.style.cssText="position:fixed;pointer-events:none;z-index:2147483644;border:2px dashed rgba(99,102,241,0.7);background:rgba(99,102,241,0.1);",document.body.append(L));const Q=Math.min(v.x,s.clientX),te=Math.min(v.y,s.clientY),re=Math.abs(s.clientX-v.x),ye=Math.abs(s.clientY-v.y);L.style.left=`${Q}px`,L.style.top=`${te}px`,L.style.width=`${re}px`,L.style.height=`${ye}px`;return}c.x=s.clientX,c.y=s.clientY,c.hasMoved=!0;const g=(s.metaKey||s.ctrlKey)&&!s.shiftKey,m=(g?rt(s.clientX,s.clientY):_e(s.clientX,s.clientY))??s.target;if(!m||tt(m)||n(m)||o(m)||Nt(m)||yt(m)){ve();return}nt(m);const y=document.querySelector(`#${me}`);y&&(y.style.borderStyle=g?"dashed":"solid")},handleMouseUp(s){if(!v||!D){k();return}s.preventDefault(),s.stopPropagation();const g=Math.min(v.x,s.clientX),m=Math.min(v.y,s.clientY),y=Math.abs(s.clientX-v.x),w=Math.abs(s.clientY-v.y);if(k(),y<20||w<20)return;const z=new DOMRect(g,m,y,w),f=mn(z);if(ve(),f.length===0)bo(z);else{const M=gn(f);jt(f,z,M)}}},{cleanup:F,handleClick:R,handleKeyDown:$,handleMouseMove:B}=C;qo(()=>{F(),e()});const A=S(()=>{ve()},"onFormClosed");document.addEventListener("__vdt_annotation_form_closed",A),document.addEventListener("mousemove",B),document.addEventListener("mousedown",C.handleMouseDown),document.addEventListener("mouseup",C.handleMouseUp,!0),document.addEventListener("click",R,!0),document.addEventListener("keydown",$),at=F},"startGlobalInspection"),Xo=S(()=>{at?.(),le(),vn(),$n();const e=globalThis.__VISULIMA_DEVTOOLS__;e?.getActiveApp?.()==="dev-toolbar:annotations"&&e.setAppActive?.("dev-toolbar:annotations",!1)},"stopGlobalInspection"),Jo={icon:zn,id:"dev-toolbar:inspector",name:"Inspector",onClick(){const e=globalThis.__VISULIMA_DEVTOOLS__;Yo(async()=>{try{if(vn(),$n(),e?.getActiveApp?.()==="dev-toolbar:annotations")try{await e.closeApp?.()}catch{}}finally{e?.setAppActive&&e.setAppActive("dev-toolbar:inspector",!1)}})},onDeactivate(){Xo()}};export{Jo as default};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Viewport rulers & draggable guidelines for the inspector.
3
+ *
4
+ * Rulers are rendered with Canvas 2D (DPR-aware) along the top and left
5
+ * viewport edges. Users can drag from a ruler to spawn a guideline — a
6
+ * reference line that snaps to nearby element edges. Dragging a guideline
7
+ * back onto the ruler removes it.
8
+ */
9
+ import type { InspectorPalette } from "./theme-palette.d.ts";
10
+ export declare const createRulers: (palette: InspectorPalette) => void;
11
+ export declare const removeRulers: () => void;
12
+ export declare const areRulersVisible: () => boolean;
13
+ /** Check if an element is part of the ruler/guideline system. */
14
+ export declare const isRulerElement: (element: Element) => boolean;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Shared theme palette for inspector and annotation overlay.
3
+ * Both run in document.body (outside Shadow DOM) so CSS variables
4
+ * from the toolbar's :host are not available. We resolve the theme
5
+ * from the same localStorage key used by use-theme.ts.
6
+ */
7
+ export interface BasePalette {
8
+ bg: string;
9
+ btnBg: string;
10
+ btnBgHover: string;
11
+ btnBorder: string;
12
+ btnBorderHover: string;
13
+ fg: string;
14
+ muted: string;
15
+ primary: string;
16
+ shadow: string;
17
+ }
18
+ export interface InspectorPalette extends BasePalette {
19
+ overlayBg: string;
20
+ overlayBorder: string;
21
+ }
22
+ export interface AnnotationPalette extends BasePalette {
23
+ danger: string;
24
+ success: string;
25
+ }
26
+ export declare const INSPECTOR_DARK: InspectorPalette;
27
+ export declare const INSPECTOR_LIGHT: InspectorPalette;
28
+ export declare const ANNOTATION_DARK: AnnotationPalette;
29
+ export declare const ANNOTATION_LIGHT: AnnotationPalette;
30
+ export declare const isDarkTheme: () => boolean;
31
+ export declare const getInspectorPalette: () => InspectorPalette;
32
+ export declare const getAnnotationPalette: () => AnnotationPalette;
33
+ /** Reset cache (e.g. when theme changes). */
34
+ export declare const resetPaletteCache: () => void;
@@ -1,4 +1,4 @@
1
- var J=Object.defineProperty;var j=(r,e)=>J(r,"name",{value:e,configurable:!0});import{addHookName as h}from"preact/devtools";import{clsx as b}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as v,useRef as Y,useEffect as X}from"preact/hooks";import{jsxs as i,jsx as t,Fragment as E}from"preact/jsx-runtime";import _ from"../../packem_shared/Button-Bkx66Co7.js";import K from"../../packem_shared/Badge-BEgU04nl.js";const F=`<!-- @license lucide-static v0.577.0 - ISC -->
1
+ var G=Object.defineProperty;var P=(r,e)=>G(r,"name",{value:e,configurable:!0});import{addHookName as f}from"preact/devtools";import{clsx as y}from"../../packem_shared/clsx-wGlvpUfw.js";import{useState as v,useRef as H,useEffect as W}from"preact/hooks";import{jsxs as n,jsx as t,Fragment as E}from"preact/jsx-runtime";import B from"../../packem_shared/Button-Bkx66Co7.js";import K from"../../packem_shared/Badge-BEgU04nl.js";const Q=`<!-- @license lucide-static v0.577.0 - ISC -->
2
2
  <svg
3
3
  class="lucide lucide-search"
4
4
  xmlns="http://www.w3.org/2000/svg"
@@ -14,4 +14,4 @@ var J=Object.defineProperty;var j=(r,e)=>J(r,"name",{value:e,configurable:!0});i
14
14
  <path d="m21 21-4.34-4.34" />
15
15
  <circle cx="11" cy="11" r="8" />
16
16
  </svg>
17
- `;var V=Object.defineProperty,l=j((r,e)=>V(r,"name",{value:e,configurable:!0}),"l");const G=l(()=>{const r=l(s=>document.querySelector(`meta[name="${s}"]`)?.content??"","getMeta"),e=l(s=>document.querySelector(`meta[property="og:${s}"]`)?.content??"","getOg"),o=l(s=>document.querySelector(`meta[name="twitter:${s}"]`)?.content??document.querySelector(`meta[property="twitter:${s}"]`)?.content??"","getTwitter"),n=l(s=>document.querySelector(`meta[property="article:${s}"]`)?.content??"","getArticle");return{articleAuthor:n("author"),articleModifiedTime:n("modified_time"),articlePublishedTime:n("published_time"),articleSection:n("section"),canonical:document.querySelector('link[rel="canonical"]')?.href??"",description:r("description"),ogDescription:e("description"),ogImage:e("image"),ogImageAlt:e("image:alt"),ogLocale:e("locale"),ogSiteName:e("site_name"),ogTitle:e("title"),ogType:e("type"),ogUrl:e("url"),title:document.title??"",twitterCard:o("card"),twitterCreator:o("creator"),twitterDescription:o("description"),twitterImage:o("image"),twitterImageAlt:o("image:alt"),twitterSite:o("site"),twitterTitle:o("title")}},"readMetaTags"),W=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2})?(?:[+-]\d{2}:\d{2}|Z)?)?$/,D=l(r=>typeof r=="string"&&W.test(r),"isISO8601"),a=l((r,e)=>r[e]!==void 0&&r[e]!==null&&r[e]!=="","has"),I=l(r=>Array.isArray(r)&&r.length>0,"isNonEmptyArray"),C=l(r=>{const e=[];if(!a(r,"headline")&&!a(r,"name")&&e.push({message:"headline (or name) is required",property:"headline",severity:"error"}),a(r,"author")){const o=r.author;typeof o=="object"&&!Array.isArray(o)&&!a(o,"name")&&e.push({message:"author.name is missing",property:"author.name",severity:"warning"})}else e.push({message:"author is required",property:"author",severity:"error"});return a(r,"datePublished")?D(r.datePublished)||e.push({message:"datePublished should be ISO 8601 format (e.g. 2024-01-15T09:00:00Z)",property:"datePublished",severity:"warning"}):e.push({message:"datePublished is required",property:"datePublished",severity:"error"}),a(r,"image")||e.push({message:"image is recommended for rich results",property:"image",severity:"warning"}),a(r,"description")||e.push({message:"description is recommended",property:"description",severity:"suggestion"}),e},"validateArticle"),H=l(r=>{const e=[];a(r,"name")||e.push({message:"name is required",property:"name",severity:"error"});const o=a(r,"offers"),n=a(r,"aggregateRating"),s=a(r,"review");if(!o&&!n&&!s&&e.push({message:"At least one of: offers, aggregateRating, or review is required for rich results",property:"offers",severity:"error"}),o){const c=Array.isArray(r.offers)?r.offers[0]:r.offers;c&&typeof c=="object"&&(!a(c,"price")&&!a(c,"priceSpecification")&&e.push({message:"offers.price is required",property:"offers.price",severity:"error"}),a(c,"priceCurrency")||e.push({message:"offers.priceCurrency is required (e.g. 'USD')",property:"offers.priceCurrency",severity:"error"}))}if(n){const c=r.aggregateRating;a(c,"ratingValue")||e.push({message:"aggregateRating.ratingValue is required",property:"aggregateRating.ratingValue",severity:"error"}),!a(c,"reviewCount")&&!a(c,"ratingCount")&&e.push({message:"aggregateRating.reviewCount (or ratingCount) is required",property:"aggregateRating.reviewCount",severity:"error"})}return a(r,"image")||e.push({message:"image is recommended for rich results",property:"image",severity:"suggestion"}),e},"validateProduct"),Q=l(r=>{const e=[],o=r.itemListElement;return I(o)?(o.length<2&&e.push({message:"itemListElement should have at least 2 items",property:"itemListElement",severity:"warning"}),o.forEach((n,s)=>{n.position!==s+1&&e.push({message:`itemListElement[${s}].position should be ${s+1}`,property:`itemListElement[${s}].position`,severity:"warning"}),n.name||n.item?.name||e.push({message:`itemListElement[${s}].name is required`,property:`itemListElement[${s}].name`,severity:"error"})}),e):(e.push({message:"itemListElement array is required",property:"itemListElement",severity:"error"}),e)},"validateBreadcrumbList"),Z=l(r=>{const e=[],o=r.mainEntity;return I(o)?(o.forEach((n,s)=>{a(n,"name")||e.push({message:`mainEntity[${s}].name (question text) is required`,property:`mainEntity[${s}].name`,severity:"error"});const c=n.acceptedAnswer;(!c||!a(c,"text"))&&e.push({message:`mainEntity[${s}].acceptedAnswer.text is required`,property:`mainEntity[${s}].acceptedAnswer.text`,severity:"error"})}),e):(e.push({message:"mainEntity array with at least one Question is required",property:"mainEntity",severity:"error"}),e)},"validateFaqPage"),O=l(r=>{const e=[];a(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),a(r,"startDate")?D(r.startDate)||e.push({message:"startDate should be ISO 8601 format",property:"startDate",severity:"warning"}):e.push({message:"startDate is required",property:"startDate",severity:"error"});const o=r.location;return o?a(o,"name")||e.push({message:"location.name is required",property:"location.name",severity:"error"}):e.push({message:"location is required",property:"location",severity:"error"}),a(r,"description")||e.push({message:"description is recommended",property:"description",severity:"suggestion"}),e},"validateEvent"),P=l(r=>{const e=[];return a(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),a(r,"url")||e.push({message:"url is recommended",property:"url",severity:"warning"}),a(r,"logo")||e.push({message:"logo is recommended for Knowledge Panel eligibility",property:"logo",severity:"suggestion"}),e},"validateOrganization"),ee=l(r=>{const e=[];return a(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),a(r,"url")||e.push({message:"url is recommended",property:"url",severity:"suggestion"}),e},"validatePerson"),re=l(r=>{const e=[];return a(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),a(r,"image")||e.push({message:"image is required for rich results",property:"image",severity:"error"}),!a(r,"recipeIngredient")&&!a(r,"ingredients")&&e.push({message:"recipeIngredient is recommended",property:"recipeIngredient",severity:"suggestion"}),a(r,"recipeInstructions")||e.push({message:"recipeInstructions is recommended",property:"recipeInstructions",severity:"suggestion"}),a(r,"author")||e.push({message:"author is recommended",property:"author",severity:"suggestion"}),e},"validateRecipe"),L=l(r=>{const e=[];return a(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),a(r,"url")||e.push({message:"url is recommended",property:"url",severity:"warning"}),e},"validateWebSiteOrPage"),te=l(r=>{const e=[];return a(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),a(r,"description")||e.push({message:"description is required",property:"description",severity:"error"}),a(r,"thumbnailUrl")||e.push({message:"thumbnailUrl is required for rich results",property:"thumbnailUrl",severity:"error"}),a(r,"uploadDate")?D(r.uploadDate)||e.push({message:"uploadDate should be ISO 8601 format",property:"uploadDate",severity:"warning"}):e.push({message:"uploadDate is required",property:"uploadDate",severity:"error"}),e},"validateVideoObject"),M={Article:C,BlogPosting:C,BreadcrumbList:Q,Event:O,EventSeries:O,FAQPage:Z,LocalBusiness:P,NewsArticle:C,Organization:P,Person:ee,Product:H,Recipe:re,VideoObject:te,WebPage:L,WebSite:L},ie=new Set(Object.keys(M)),se=l(r=>{const e=[],o=String(r["@context"]??""),n=String(r["@type"]??"");if(o?o.includes("schema.org")||e.push({message:"@context should reference schema.org",property:"@context",severity:"warning"}):e.push({message:"@context is missing — should be 'https://schema.org'",property:"@context",severity:"error"}),!n)return e.push({message:"@type is required",property:"@type",severity:"error"}),e;ie.has(n)||e.push({message:`@type '${n}' is not validated — no known rules for this type`,property:"@type",severity:"suggestion"});const s=M[n];return s&&e.push(...s(r)),e},"validateJsonLd"),oe=l(r=>r.some(e=>e.severity==="error")?"error":r.some(e=>e.severity==="warning")?"warning":r.some(e=>e.severity==="suggestion")?"suggestion":"ok","deriveStatus"),R=l((r,e,o,n)=>{const s=se(r),c=String(r["@type"]??"Unknown");return{context:String(r["@context"]??""),graphIndex:o,index:e,messages:s,parsed:r,raw:n??JSON.stringify(r,void 0,2),status:oe(s),type:c}},"processJsonLdNode"),ne=/^\/\/<!\[CDATA\[/,ae=/\/\/\]\]>$/,le=/^<!\[CDATA\[/,ce=/\]\]>$/,de=l(()=>{const r=document.querySelectorAll('script[type="application/ld+json"]'),e=[];return r.forEach((o,n)=>{let s=(o.textContent??"").trim();s=s.replace(ne,"").replace(ae,""),s=s.replace(le,"").replace(ce,"");try{const c=JSON.parse(s);if(I(c["@graph"])){const y=String(c["@context"]??"");c["@graph"].forEach((g,m)=>{const u={"@context":g["@context"]??y,...g};e.push(R(u,n,m,void 0))})}else e.push(R(c,n,void 0,s))}catch{e.push({context:"",index:n,messages:[{message:"Could not parse JSON content",property:"",severity:"error"}],parsed:{},raw:s,status:"error",type:"Invalid JSON"})}}),e},"readJsonLdSchemas"),U=[{description:"Page title shown in browser tabs and search engine results",key:"title",label:"title",priority:"required",snippet:"<title>Your Page Title</title>"},{description:"Title shown when your page is shared on social media",key:"ogTitle",label:"og:title",priority:"required",snippet:'<meta property="og:title" content="Your Page Title" />'},{description:"Description shown when sharing on social media (max 200 chars)",key:"ogDescription",label:"og:description",priority:"required",snippet:'<meta property="og:description" content="Your page description" />'},{description:"Image shown when sharing (recommended: 1200 × 630 px)",key:"ogImage",label:"og:image",priority:"required",snippet:'<meta property="og:image" content="https://yoursite.com/og-image.jpg" />'},{description:"Twitter card format — controls how link previews appear on X / Twitter",key:"twitterCard",label:"twitter:card",priority:"required",snippet:'<meta name="twitter:card" content="summary_large_image" />'},{description:"Meta description used by search engines (max 160 chars)",key:"description",label:"description",priority:"recommended",snippet:'<meta name="description" content="Your page description" />'},{description:"Canonical URL to prevent duplicate content issues with search engines",key:"canonical",label:"canonical",priority:"recommended",snippet:'<link rel="canonical" href="https://yoursite.com/page" />'},{description:"Canonical page URL for Open Graph — should match the canonical link tag",key:"ogUrl",label:"og:url",priority:"recommended",snippet:'<meta property="og:url" content="https://yoursite.com/page" />'},{description:"Type of content: website, article, product, video.movie, etc.",key:"ogType",label:"og:type",priority:"recommended",snippet:'<meta property="og:type" content="website" />'},{description:"Your website name — shown for consistent branding on social platforms",key:"ogSiteName",label:"og:site_name",priority:"recommended",snippet:'<meta property="og:site_name" content="Your Site Name" />'},{description:"Language and territory of page content (e.g. en_US, de_DE, fr_FR)",key:"ogLocale",label:"og:locale",priority:"recommended",snippet:'<meta property="og:locale" content="en_US" />'},{description:"Alt text for the OG image — important for accessibility on social platforms",key:"ogImageAlt",label:"og:image:alt",priority:"recommended",snippet:'<meta property="og:image:alt" content="Description of the shared image" />'},{description:"Override title specifically for X / Twitter cards (falls back to og:title)",key:"twitterTitle",label:"twitter:title",priority:"recommended",snippet:'<meta name="twitter:title" content="Your Page Title" />'},{description:"Override description for X / Twitter cards (falls back to og:description)",key:"twitterDescription",label:"twitter:description",priority:"recommended",snippet:'<meta name="twitter:description" content="Your page description" />'},{description:"Override image for X / Twitter cards (falls back to og:image)",key:"twitterImage",label:"twitter:image",priority:"recommended",snippet:'<meta name="twitter:image" content="https://yoursite.com/twitter-card.jpg" />'},{description:"X / Twitter handle of the website owner (e.g. @yourhandle)",key:"twitterSite",label:"twitter:site",priority:"recommended",snippet:'<meta name="twitter:site" content="@yourhandle" />'}],pe=[{accentClass:"border-blue-500/30",descKey:"ogDescription",id:"facebook",imageKey:"ogImage",name:"Facebook",requiredKeys:["ogTitle","ogDescription","ogImage"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-foreground/20",descKey:"twitterDescription",id:"twitter",imageKey:"twitterImage",name:"X / Twitter",requiredKeys:["twitterTitle","twitterDescription","twitterImage","twitterCard"],titleKey:"twitterTitle",urlKey:"ogUrl"},{accentClass:"border-blue-600/30",descKey:"ogDescription",id:"linkedin",imageKey:"ogImage",name:"LinkedIn",requiredKeys:["ogTitle","ogDescription","ogImage"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-indigo-500/30",descKey:"ogDescription",id:"discord",imageKey:"ogImage",name:"Discord",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-green-500/30",descKey:"ogDescription",id:"slack",imageKey:"ogImage",name:"Slack",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-purple-500/30",descKey:"ogDescription",id:"mastodon",imageKey:"ogImage",name:"Mastodon",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-sky-500/30",descKey:"ogDescription",id:"bluesky",imageKey:"ogImage",name:"Bluesky",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"}],ge=l(({meta:r,platform:e})=>{const o=r[e.titleKey]||r.title||"No title",n=r[e.descKey]||r.description||"",s=r[e.imageKey]||"",c=r[e.urlKey]||r.canonical||"",y=e.requiredKeys.filter(g=>!r[g]);return i("div",{class:b("border bg-card overflow-hidden",e.accentClass),children:[i("div",{class:"flex items-center justify-between gap-2 px-3 py-2 border-b border-border/50 bg-foreground/2",children:[t("span",{class:"text-[0.65rem] font-bold uppercase tracking-wider text-muted-foreground",children:e.name}),y.length>0&&i("span",{class:"text-[0.6rem] px-1.5 py-0.5 bg-warning/10 text-warning border border-warning/20 font-medium",children:["Missing: ",y.join(", ")]})]}),i("div",{class:"p-3",children:[t("div",{class:"w-full aspect-[1200/630] bg-foreground/6 border border-border/50 mb-2.5 overflow-hidden relative",children:s?t("img",{alt:"OG image preview",class:"w-full h-full object-cover",loading:"lazy",src:s}):t("div",{class:"absolute inset-0 flex items-center justify-center",children:t("span",{class:"text-[0.65rem] text-muted-foreground/40 uppercase tracking-wider",children:"No image"})})}),c&&t("div",{class:"text-[0.6rem] text-muted-foreground/60 uppercase tracking-wider truncate mb-1",children:c}),t("div",{class:"text-[0.8rem] font-semibold text-foreground line-clamp-1",children:o}),n&&t("div",{class:"text-[0.7rem] text-muted-foreground line-clamp-2 mt-0.5",children:n})]})]})},"SocialPreview"),p=l(({label:r,required:e=!1,value:o})=>i("div",{class:"flex items-start gap-3 py-2 border-b border-border/30 last:border-0",children:[t("div",{class:"w-44 shrink-0",children:t("span",{class:"text-[0.7rem] font-mono text-muted-foreground",children:r})}),t("div",{class:"flex-1 min-w-0",children:o?t("span",{class:"text-[0.75rem] text-foreground break-all",children:o}):t("span",{class:b("text-[0.7rem]",e?"text-warning":"text-muted-foreground/40"),children:e?"⚠ Missing":"—"})})]}),"MetaRow"),k=l(({children:r})=>i("p",{class:"text-[0.58rem] font-bold uppercase tracking-[0.12em] text-muted-foreground/60 mb-2",children:[t("span",{class:"text-primary/50",children:"// "}),r]}),"SectionHeading"),z=l(({text:r})=>{const[e,o]=h(v(!1),"copied"),n=h(Y(void 0),"timerRef"),s=l(()=>{navigator.clipboard.writeText(r).then(()=>{o(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(o,2e3,!1)}).catch(()=>{})},"handleCopy");return t(_,{class:b("text-[0.6rem] font-mono shrink-0",e?"border-success/40 text-success bg-success/8":""),onClick:s,size:"sm",variant:"outline",children:e?"Copied!":"Copy"})},"CopyButton"),N=l(({def:r})=>i("div",{class:"border border-border/60 bg-card p-3 space-y-2",children:[i("div",{class:"flex items-start justify-between gap-3",children:[t("code",{class:"text-[0.7rem] font-mono font-bold text-foreground",children:r.label}),t(K,{class:"text-[0.58rem] uppercase tracking-wide shrink-0",variant:r.priority==="required"?"destructive":"warning",children:r.priority})]}),t("p",{class:"text-[0.7rem] text-muted-foreground leading-relaxed",children:r.description}),i("div",{class:"flex items-center gap-2",children:[t("code",{class:"flex-1 min-w-0 text-[0.65rem] font-mono text-muted-foreground bg-foreground/4 border border-border/40 px-2 py-1 overflow-x-auto whitespace-nowrap block",children:r.snippet}),t(z,{text:r.snippet})]})]}),"MissingTagCard"),$={error:{color:"text-destructive",icon:"✖",label:"Error"},ok:{color:"text-success",icon:"✔",label:"OK"},suggestion:{color:"text-primary",icon:"ℹ",label:"Info"},warning:{color:"text-warning",icon:"⚠",label:"Warning"}},me={error:"destructive",ok:"success",suggestion:"outline",warning:"warning"},ue=l(({schema:r})=>{const[e,o]=h(v(!1),"open"),[n,s]=h(v(!1),"showRaw"),c=$[r.status],y=r.graphIndex===void 0?`Script ${r.index+1}`:`Script ${r.index+1} @graph[${r.graphIndex}]`;return i("div",{class:"border border-border bg-card overflow-hidden",children:[i("button",{class:"w-full flex items-center justify-between gap-3 px-4 py-3 bg-transparent border-0 cursor-pointer text-left hover:bg-foreground/3 transition-colors",onClick:l(()=>o(g=>!g),"onClick"),type:"button",children:[i("div",{class:"flex items-center gap-2 min-w-0",children:[t("span",{class:b("text-base shrink-0 leading-none",c.color),children:c.icon}),t("span",{class:"text-[0.7rem] text-muted-foreground font-mono shrink-0",children:y}),t("code",{class:"text-[0.75rem] font-mono font-semibold text-foreground truncate",children:r.type})]}),i("div",{class:"flex items-center gap-2 shrink-0",children:[t(K,{variant:me[r.status],children:c.label}),t("span",{class:b("text-muted-foreground text-[0.65rem] transition-transform duration-150",e?"rotate-90":""),children:"▶"})]})]}),e&&i("div",{class:"border-t border-border",children:[r.messages.length>0?t("div",{class:"px-4 py-3 space-y-1.5",children:r.messages.map((g,m)=>{const u=$[g.severity];return i("div",{class:"flex items-start gap-2 text-[0.72rem]",children:[t("span",{class:b("shrink-0 leading-none mt-px",u.color),children:u.icon}),i("div",{class:"min-w-0",children:[g.property&&i("code",{class:"text-[0.65rem] font-mono text-muted-foreground mr-1.5",children:[g.property,":"]}),t("span",{class:"text-foreground/80",children:g.message})]})]},m)})}):i("div",{class:"px-4 py-3 flex items-center gap-2 text-[0.72rem] text-success",children:[t("span",{children:"✔"}),t("span",{children:"No issues found"})]}),i("div",{class:"border-t border-border/50 px-4 py-2 flex items-center justify-between",children:[i("button",{class:"text-[0.65rem] text-muted-foreground hover:text-foreground transition-colors bg-transparent border-0 cursor-pointer p-0",onClick:l(()=>s(g=>!g),"onClick"),type:"button",children:[n?"Hide":"Show"," raw JSON"]}),t(z,{text:r.raw})]}),n&&t("pre",{class:"text-[0.65rem] font-mono leading-relaxed bg-foreground/3 border-t border-border/50 px-4 py-3 overflow-x-auto max-h-60 text-muted-foreground whitespace-pre-wrap break-all m-0",children:r.raw})]})]})},"SchemaCard"),ye=l(r=>{const[e,o]=h(v(void 0),"meta"),[n,s]=h(v([]),"schemas"),[c,y]=h(v("preview"),"activeTab"),g=l(()=>{o(G()),s(de())},"refresh");if(X(()=>{g()},[]),!e)return i("div",{class:"flex flex-col items-center justify-center h-full gap-3 p-8 select-none",children:[t("div",{"aria-hidden":"true",class:"flex gap-1.5 items-center",children:[0,160,320].map(d=>t("span",{class:"size-1.5 bg-primary/50 rounded-full animate-pulse",style:{animationDelay:`${d}ms`}},d))}),t("span",{class:"text-[0.75rem] text-muted-foreground",children:"Reading meta tags…"})]});const m=U.filter(d=>d.priority==="required"&&!e[d.key]),u=U.filter(d=>d.priority==="recommended"&&!e[d.key]),q=m.length+u.length,f=n.filter(d=>d.status==="error").length,A=n.filter(d=>d.status==="warning").length;let x;f>0?x=f:A>0&&(x=A);const B=e.ogType==="article"||!!(e.articleAuthor||e.articlePublishedTime||e.articleModifiedTime||e.articleSection);return i("div",{class:"flex flex-col h-full",children:[i("div",{class:"flex items-center justify-between gap-3 px-4 py-2.5 border-b border-border shrink-0",children:[t("div",{class:"flex items-center gap-0",children:["preview","tags","missing","jsonld"].map(d=>{const T={jsonld:"Structured Data",missing:"Missing",preview:"Social Previews",tags:"Meta Tags"}[d];let w;d==="missing"&&q>0?w=q:d==="jsonld"&&x!==void 0&&(w=x);let S;return d==="missing"?S=m.length>0?"destructive":"warning":S=f>0?"destructive":"warning",i("button",{class:b("flex items-center gap-1.5 px-3 py-1.5 text-[0.75rem] font-medium border-0 cursor-pointer transition-colors capitalize",c===d?"text-foreground border-b-2 border-primary bg-transparent":"text-muted-foreground bg-transparent hover:text-foreground"),onClick:l(()=>y(d),"onClick"),type:"button",children:[T,w!==void 0&&t(K,{class:"text-[0.58rem] min-w-[1.1rem] text-center",variant:S,children:w})]},d)})}),t(_,{onClick:g,size:"sm",variant:"outline",children:"Refresh"})]}),i("div",{class:"flex-1 overflow-auto",children:[c==="preview"&&t("div",{class:"p-4 grid grid-cols-2 gap-4",children:pe.map(d=>t(ge,{meta:e,platform:d},d.id))}),c==="tags"&&i("div",{class:"p-5 space-y-5",children:[i("div",{children:[t(k,{children:"Basic"}),t("div",{class:"border border-border bg-card",children:i("div",{class:"px-4",children:[t(p,{label:"title",required:!0,value:e.title}),t(p,{label:"description",required:!0,value:e.description}),t(p,{label:"canonical",value:e.canonical})]})})]}),i("div",{children:[t(k,{children:"Open Graph"}),t("div",{class:"border border-border bg-card",children:i("div",{class:"px-4",children:[t(p,{label:"og:title",required:!0,value:e.ogTitle}),t(p,{label:"og:description",required:!0,value:e.ogDescription}),t(p,{label:"og:image",required:!0,value:e.ogImage}),t(p,{label:"og:image:alt",value:e.ogImageAlt}),t(p,{label:"og:url",value:e.ogUrl}),t(p,{label:"og:type",value:e.ogType}),t(p,{label:"og:site_name",value:e.ogSiteName}),t(p,{label:"og:locale",value:e.ogLocale})]})})]}),B&&i("div",{children:[t(k,{children:"Article"}),t("div",{class:"border border-border bg-card",children:i("div",{class:"px-4",children:[t(p,{label:"article:author",value:e.articleAuthor}),t(p,{label:"article:published_time",value:e.articlePublishedTime}),t(p,{label:"article:modified_time",value:e.articleModifiedTime}),t(p,{label:"article:section",value:e.articleSection})]})})]}),i("div",{children:[t(k,{children:"X / Twitter"}),t("div",{class:"border border-border bg-card",children:i("div",{class:"px-4",children:[t(p,{label:"twitter:card",required:!0,value:e.twitterCard}),t(p,{label:"twitter:title",value:e.twitterTitle}),t(p,{label:"twitter:description",value:e.twitterDescription}),t(p,{label:"twitter:image",value:e.twitterImage}),t(p,{label:"twitter:image:alt",value:e.twitterImageAlt}),t(p,{label:"twitter:site",value:e.twitterSite}),t(p,{label:"twitter:creator",value:e.twitterCreator})]})})]})]}),c==="jsonld"&&t("div",{class:"p-5 space-y-3",children:n.length===0?i("div",{class:"flex flex-col items-center justify-center py-12 gap-3",children:[t("div",{class:"size-10 border border-border flex items-center justify-center text-muted-foreground/40 text-lg select-none",children:"{}"}),t("p",{class:"text-[0.8rem] font-medium text-foreground/70",children:"No structured data found"}),i("p",{class:"text-[0.7rem] text-muted-foreground text-center max-w-xs leading-relaxed",children:["Add a ",t("code",{class:"font-mono bg-foreground/6 px-1",children:'<script type="application/ld+json">'})," block to help search engines understand your content."]})]}):i(E,{children:[i("div",{class:"flex items-center justify-between mb-1",children:[i("p",{class:"text-[0.65rem] font-bold uppercase tracking-[0.1em] text-muted-foreground",children:[n.length," schema",n.length===1?"":"s"," detected"]}),f>0&&i("span",{class:"text-[0.65rem] text-destructive font-medium",children:[f," error",f===1?"":"s"]})]}),n.map((d,T)=>t(ue,{schema:d},T))]})}),c==="missing"&&t("div",{class:"p-5 space-y-5",children:q===0?i("div",{class:"flex flex-col items-center justify-center py-12 gap-3",children:[t("div",{class:"size-10 border border-success/30 bg-success/8 flex items-center justify-center text-success text-lg select-none",children:"✓"}),t("p",{class:"text-[0.8rem] font-medium text-foreground/70",children:"All recommended tags are present"}),t("p",{class:"text-[0.7rem] text-muted-foreground",children:"Your page has all required and recommended meta tags."})]}):i(E,{children:[m.length>0&&i("div",{children:[i("p",{class:"text-[0.58rem] font-bold uppercase tracking-[0.12em] text-destructive/80 mb-2 flex items-center gap-1.5",children:[t("span",{children:"Required"}),t("span",{class:"bg-destructive/10 border border-destructive/25 text-destructive px-1 font-bold",children:m.length})]}),t("div",{class:"space-y-2",children:m.map(d=>t(N,{def:d},d.key))})]}),u.length>0&&i("div",{children:[i("p",{class:"text-[0.58rem] font-bold uppercase tracking-[0.12em] text-warning/80 mb-2 flex items-center gap-1.5",children:[t("span",{children:"Recommended"}),t("span",{class:"bg-warning/10 border border-warning/25 text-warning px-1 font-bold",children:u.length})]}),t("div",{class:"space-y-2",children:u.map(d=>t(N,{def:d},d.key))})]})]})})]})]})},"SeoApp"),qe={component:ye,icon:F,id:"dev-toolbar:seo",name:"SEO"};export{qe as default};
17
+ `;var Z=Object.defineProperty,a=P((r,e)=>Z(r,"name",{value:e,configurable:!0}),"a");const ee=a(()=>{const r=a(o=>document.querySelector(`meta[name="${o}"]`)?.content??"","getMeta"),e=a(o=>document.querySelector(`meta[property="og:${o}"]`)?.content??"","getOg"),s=a(o=>document.querySelector(`meta[name="twitter:${o}"]`)?.content??document.querySelector(`meta[property="twitter:${o}"]`)?.content??"","getTwitter"),i=a(o=>document.querySelector(`meta[property="article:${o}"]`)?.content??"","getArticle");return{articleAuthor:i("author"),articleModifiedTime:i("modified_time"),articlePublishedTime:i("published_time"),articleSection:i("section"),canonical:document.querySelector('link[rel="canonical"]')?.href??"",description:r("description"),ogDescription:e("description"),ogImage:e("image"),ogImageAlt:e("image:alt"),ogLocale:e("locale"),ogSiteName:e("site_name"),ogTitle:e("title"),ogType:e("type"),ogUrl:e("url"),title:document.title??"",twitterCard:s("card"),twitterCreator:s("creator"),twitterDescription:s("description"),twitterImage:s("image"),twitterImageAlt:s("image:alt"),twitterSite:s("site"),twitterTitle:s("title")}},"readMetaTags"),re=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2})?(?:[+-]\d{2}:\d{2}|Z)?)?$/,A=a(r=>typeof r=="string"&&re.test(r),"isISO8601"),l=a((r,e)=>r[e]!==void 0&&r[e]!==null&&r[e]!=="","has"),j=a(r=>Array.isArray(r)&&r.length>0,"isNonEmptyArray"),C=a(r=>{const e=[];if(!l(r,"headline")&&!l(r,"name")&&e.push({message:"headline (or name) is required",property:"headline",severity:"error"}),l(r,"author")){const s=r.author;typeof s=="object"&&!Array.isArray(s)&&!l(s,"name")&&e.push({message:"author.name is missing",property:"author.name",severity:"warning"})}else e.push({message:"author is required",property:"author",severity:"error"});return l(r,"datePublished")?A(r.datePublished)||e.push({message:"datePublished should be ISO 8601 format (e.g. 2024-01-15T09:00:00Z)",property:"datePublished",severity:"warning"}):e.push({message:"datePublished is required",property:"datePublished",severity:"error"}),l(r,"image")||e.push({message:"image is recommended for rich results",property:"image",severity:"warning"}),l(r,"description")||e.push({message:"description is recommended",property:"description",severity:"suggestion"}),e},"validateArticle"),te=a(r=>{const e=[];l(r,"name")||e.push({message:"name is required",property:"name",severity:"error"});const s=l(r,"offers"),i=l(r,"aggregateRating"),o=l(r,"review");if(!s&&!i&&!o&&e.push({message:"At least one of: offers, aggregateRating, or review is required for rich results",property:"offers",severity:"error"}),s){const c=Array.isArray(r.offers)?r.offers[0]:r.offers;c&&typeof c=="object"&&(!l(c,"price")&&!l(c,"priceSpecification")&&e.push({message:"offers.price is required",property:"offers.price",severity:"error"}),l(c,"priceCurrency")||e.push({message:"offers.priceCurrency is required (e.g. 'USD')",property:"offers.priceCurrency",severity:"error"}))}if(i){const c=r.aggregateRating;l(c,"ratingValue")||e.push({message:"aggregateRating.ratingValue is required",property:"aggregateRating.ratingValue",severity:"error"}),!l(c,"reviewCount")&&!l(c,"ratingCount")&&e.push({message:"aggregateRating.reviewCount (or ratingCount) is required",property:"aggregateRating.reviewCount",severity:"error"})}return l(r,"image")||e.push({message:"image is recommended for rich results",property:"image",severity:"suggestion"}),e},"validateProduct"),ie=a(r=>{const e=[],s=r.itemListElement;return j(s)?(s.length<2&&e.push({message:"itemListElement should have at least 2 items",property:"itemListElement",severity:"warning"}),s.forEach((i,o)=>{i.position!==o+1&&e.push({message:`itemListElement[${o}].position should be ${o+1}`,property:`itemListElement[${o}].position`,severity:"warning"}),i.name||i.item?.name||e.push({message:`itemListElement[${o}].name is required`,property:`itemListElement[${o}].name`,severity:"error"})}),e):(e.push({message:"itemListElement array is required",property:"itemListElement",severity:"error"}),e)},"validateBreadcrumbList"),se=a(r=>{const e=[],s=r.mainEntity;return j(s)?(s.forEach((i,o)=>{l(i,"name")||e.push({message:`mainEntity[${o}].name (question text) is required`,property:`mainEntity[${o}].name`,severity:"error"});const c=i.acceptedAnswer;(!c||!l(c,"text"))&&e.push({message:`mainEntity[${o}].acceptedAnswer.text is required`,property:`mainEntity[${o}].acceptedAnswer.text`,severity:"error"})}),e):(e.push({message:"mainEntity array with at least one Question is required",property:"mainEntity",severity:"error"}),e)},"validateFaqPage"),N=a(r=>{const e=[];l(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),l(r,"startDate")?A(r.startDate)||e.push({message:"startDate should be ISO 8601 format",property:"startDate",severity:"warning"}):e.push({message:"startDate is required",property:"startDate",severity:"error"});const s=r.location;return s?l(s,"name")||e.push({message:"location.name is required",property:"location.name",severity:"error"}):e.push({message:"location is required",property:"location",severity:"error"}),l(r,"description")||e.push({message:"description is recommended",property:"description",severity:"suggestion"}),e},"validateEvent"),L=a(r=>{const e=[];return l(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),l(r,"url")||e.push({message:"url is recommended",property:"url",severity:"warning"}),l(r,"logo")||e.push({message:"logo is recommended for Knowledge Panel eligibility",property:"logo",severity:"suggestion"}),e},"validateOrganization"),oe=a(r=>{const e=[];return l(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),l(r,"url")||e.push({message:"url is recommended",property:"url",severity:"suggestion"}),e},"validatePerson"),ne=a(r=>{const e=[];return l(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),l(r,"image")||e.push({message:"image is required for rich results",property:"image",severity:"error"}),!l(r,"recipeIngredient")&&!l(r,"ingredients")&&e.push({message:"recipeIngredient is recommended",property:"recipeIngredient",severity:"suggestion"}),l(r,"recipeInstructions")||e.push({message:"recipeInstructions is recommended",property:"recipeInstructions",severity:"suggestion"}),l(r,"author")||e.push({message:"author is recommended",property:"author",severity:"suggestion"}),e},"validateRecipe"),$=a(r=>{const e=[];return l(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),l(r,"url")||e.push({message:"url is recommended",property:"url",severity:"warning"}),e},"validateWebSiteOrPage"),ae=a(r=>{const e=[];return l(r,"name")||e.push({message:"name is required",property:"name",severity:"error"}),l(r,"description")||e.push({message:"description is required",property:"description",severity:"error"}),l(r,"thumbnailUrl")||e.push({message:"thumbnailUrl is required for rich results",property:"thumbnailUrl",severity:"error"}),l(r,"uploadDate")?A(r.uploadDate)||e.push({message:"uploadDate should be ISO 8601 format",property:"uploadDate",severity:"warning"}):e.push({message:"uploadDate is required",property:"uploadDate",severity:"error"}),e},"validateVideoObject"),X={Article:C,BlogPosting:C,BreadcrumbList:ie,Event:N,EventSeries:N,FAQPage:se,LocalBusiness:L,NewsArticle:C,Organization:L,Person:oe,Product:te,Recipe:ne,VideoObject:ae,WebPage:$,WebSite:$},le=new Set(Object.keys(X)),ce=a(r=>{const e=[],s=String(r["@context"]??""),i=String(r["@type"]??"");if(s?s.includes("schema.org")||e.push({message:"@context should reference schema.org",property:"@context",severity:"warning"}):e.push({message:"@context is missing — should be 'https://schema.org'",property:"@context",severity:"error"}),!i)return e.push({message:"@type is required",property:"@type",severity:"error"}),e;le.has(i)||e.push({message:`@type '${i}' is not validated — no known rules for this type`,property:"@type",severity:"suggestion"});const o=X[i];return o&&e.push(...o(r)),e},"validateJsonLd"),de=a(r=>r.some(e=>e.severity==="error")?"error":r.some(e=>e.severity==="warning")?"warning":r.some(e=>e.severity==="suggestion")?"suggestion":"ok","deriveStatus"),M=a((r,e,s,i)=>{const o=ce(r),c=String(r["@type"]??"Unknown");return{context:String(r["@context"]??""),graphIndex:s,index:e,messages:o,parsed:r,raw:i??JSON.stringify(r,void 0,2),status:de(o),type:c}},"processJsonLdNode"),pe=/^\/\/<!\[CDATA\[/,me=/\/\/\]\]>$/,ge=/^<!\[CDATA\[/,ue=/\]\]>$/,he=a(()=>{const r=document.querySelectorAll('script[type="application/ld+json"]'),e=[];return r.forEach((s,i)=>{let o=(s.textContent??"").trim();o=o.replace(pe,"").replace(me,""),o=o.replace(ge,"").replace(ue,"");try{const c=JSON.parse(o);if(j(c["@graph"])){const g=String(c["@context"]??"");c["@graph"].forEach((p,u)=>{const h={"@context":p["@context"]??g,...p};e.push(M(h,i,u,void 0))})}else e.push(M(c,i,void 0,o))}catch{e.push({context:"",index:i,messages:[{message:"Could not parse JSON content",property:"",severity:"error"}],parsed:{},raw:o,status:"error",type:"Invalid JSON"})}}),e},"readJsonLdSchemas"),R=[{description:"Page title shown in browser tabs and search engine results",key:"title",label:"title",priority:"required",snippet:"<title>Your Page Title</title>"},{description:"Title shown when your page is shared on social media",key:"ogTitle",label:"og:title",priority:"required",snippet:'<meta property="og:title" content="Your Page Title" />'},{description:"Description shown when sharing on social media (max 200 chars)",key:"ogDescription",label:"og:description",priority:"required",snippet:'<meta property="og:description" content="Your page description" />'},{description:"Image shown when sharing (recommended: 1200 × 630 px)",key:"ogImage",label:"og:image",priority:"required",snippet:'<meta property="og:image" content="https://yoursite.com/og-image.jpg" />'},{description:"Twitter card format — controls how link previews appear on X / Twitter",key:"twitterCard",label:"twitter:card",priority:"required",snippet:'<meta name="twitter:card" content="summary_large_image" />'},{description:"Meta description used by search engines (max 160 chars)",key:"description",label:"description",priority:"recommended",snippet:'<meta name="description" content="Your page description" />'},{description:"Canonical URL to prevent duplicate content issues with search engines",key:"canonical",label:"canonical",priority:"recommended",snippet:'<link rel="canonical" href="https://yoursite.com/page" />'},{description:"Canonical page URL for Open Graph — should match the canonical link tag",key:"ogUrl",label:"og:url",priority:"recommended",snippet:'<meta property="og:url" content="https://yoursite.com/page" />'},{description:"Type of content: website, article, product, video.movie, etc.",key:"ogType",label:"og:type",priority:"recommended",snippet:'<meta property="og:type" content="website" />'},{description:"Your website name — shown for consistent branding on social platforms",key:"ogSiteName",label:"og:site_name",priority:"recommended",snippet:'<meta property="og:site_name" content="Your Site Name" />'},{description:"Language and territory of page content (e.g. en_US, de_DE, fr_FR)",key:"ogLocale",label:"og:locale",priority:"recommended",snippet:'<meta property="og:locale" content="en_US" />'},{description:"Alt text for the OG image — important for accessibility on social platforms",key:"ogImageAlt",label:"og:image:alt",priority:"recommended",snippet:'<meta property="og:image:alt" content="Description of the shared image" />'},{description:"Override title specifically for X / Twitter cards (falls back to og:title)",key:"twitterTitle",label:"twitter:title",priority:"recommended",snippet:'<meta name="twitter:title" content="Your Page Title" />'},{description:"Override description for X / Twitter cards (falls back to og:description)",key:"twitterDescription",label:"twitter:description",priority:"recommended",snippet:'<meta name="twitter:description" content="Your page description" />'},{description:"Override image for X / Twitter cards (falls back to og:image)",key:"twitterImage",label:"twitter:image",priority:"recommended",snippet:'<meta name="twitter:image" content="https://yoursite.com/twitter-card.jpg" />'},{description:"X / Twitter handle of the website owner (e.g. @yourhandle)",key:"twitterSite",label:"twitter:site",priority:"recommended",snippet:'<meta name="twitter:site" content="@yourhandle" />'}],ye=[{accentClass:"border-blue-500/30",descKey:"ogDescription",id:"facebook",imageKey:"ogImage",name:"Facebook",requiredKeys:["ogTitle","ogDescription","ogImage"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-foreground/20",descKey:"twitterDescription",id:"twitter",imageKey:"twitterImage",name:"X / Twitter",requiredKeys:["twitterTitle","twitterDescription","twitterImage","twitterCard"],titleKey:"twitterTitle",urlKey:"ogUrl"},{accentClass:"border-blue-600/30",descKey:"ogDescription",id:"linkedin",imageKey:"ogImage",name:"LinkedIn",requiredKeys:["ogTitle","ogDescription","ogImage"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-indigo-500/30",descKey:"ogDescription",id:"discord",imageKey:"ogImage",name:"Discord",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-green-500/30",descKey:"ogDescription",id:"slack",imageKey:"ogImage",name:"Slack",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-purple-500/30",descKey:"ogDescription",id:"mastodon",imageKey:"ogImage",name:"Mastodon",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"},{accentClass:"border-sky-500/30",descKey:"ogDescription",id:"bluesky",imageKey:"ogImage",name:"Bluesky",requiredKeys:["ogTitle","ogDescription"],titleKey:"ogTitle",urlKey:"ogUrl"}],fe=a(({meta:r,platform:e})=>{const s=r[e.titleKey]||r.title||"No title",i=r[e.descKey]||r.description||"",o=r[e.imageKey]||"",c=r[e.urlKey]||r.canonical||"",g=e.requiredKeys.filter(p=>!r[p]);return n("div",{class:y("border bg-card overflow-hidden",e.accentClass),children:[n("div",{class:"flex items-center justify-between gap-2 px-3 py-2 border-b border-border/50 bg-foreground/2",children:[t("span",{class:"text-[0.65rem] font-bold uppercase tracking-wider text-muted-foreground",children:e.name}),g.length>0&&n("span",{class:"text-[0.6rem] px-1.5 py-0.5 bg-warning/10 text-warning border border-warning/20 font-medium",children:["Missing: ",g.join(", ")]})]}),n("div",{class:"p-3",children:[t("div",{class:"w-full aspect-[1200/630] bg-foreground/6 border border-border/50 mb-2.5 overflow-hidden relative",children:o?t("img",{alt:"OG image preview",class:"w-full h-full object-cover",loading:"lazy",src:o}):t("div",{class:"absolute inset-0 flex items-center justify-center",children:t("span",{class:"text-[0.65rem] text-muted-foreground/40 uppercase tracking-wider",children:"No image"})})}),c&&t("div",{class:"text-[0.6rem] text-muted-foreground/60 uppercase tracking-wider truncate mb-1",children:c}),t("div",{class:"text-[0.8rem] font-semibold text-foreground line-clamp-1",children:s}),i&&t("div",{class:"text-[0.7rem] text-muted-foreground line-clamp-2 mt-0.5",children:i})]})]})},"SocialPreview"),m=a(({label:r,required:e=!1,value:s})=>n("div",{class:"flex items-start gap-3 py-2 border-b border-border/30 last:border-0",children:[t("div",{class:"w-44 shrink-0",children:t("span",{class:"text-[0.7rem] font-mono text-muted-foreground",children:r})}),t("div",{class:"flex-1 min-w-0",children:s?t("span",{class:"text-[0.75rem] text-foreground break-all",children:s}):t("span",{class:y("text-[0.7rem]",e?"text-warning":"text-muted-foreground/40"),children:e?"⚠ Missing":"—"})})]}),"MetaRow"),k=a(({children:r})=>n("p",{class:"text-[0.58rem] font-bold uppercase tracking-[0.12em] text-muted-foreground/60 mb-2",children:[t("span",{class:"text-primary/50",children:"// "}),r]}),"SectionHeading"),F=a(({text:r})=>{const[e,s]=f(v(!1),"copied"),i=f(H(void 0),"timerRef"),o=a(()=>{navigator.clipboard.writeText(r).then(()=>{s(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(s,2e3,!1)}).catch(()=>{})},"handleCopy");return t(B,{class:y("text-[0.6rem] font-mono shrink-0",e?"border-success/40 text-success bg-success/8":""),onClick:o,size:"sm",variant:"outline",children:e?"Copied!":"Copy"})},"CopyButton"),U=a(({def:r})=>n("div",{class:"border border-border/60 bg-card p-3 space-y-2",children:[n("div",{class:"flex items-start justify-between gap-3",children:[t("code",{class:"text-[0.7rem] font-mono font-bold text-foreground",children:r.label}),t(K,{class:"text-[0.58rem] uppercase tracking-wide shrink-0",variant:r.priority==="required"?"destructive":"warning",children:r.priority})]}),t("p",{class:"text-[0.7rem] text-muted-foreground leading-relaxed",children:r.description}),n("div",{class:"flex items-center gap-2",children:[t("code",{class:"flex-1 min-w-0 text-[0.65rem] font-mono text-muted-foreground bg-foreground/4 border border-border/40 px-2 py-1 overflow-x-auto whitespace-nowrap block",children:r.snippet}),t(F,{text:r.snippet})]})]}),"MissingTagCard"),_={error:{color:"text-destructive",icon:"✖",label:"Error"},ok:{color:"text-success",icon:"✔",label:"OK"},suggestion:{color:"text-primary",icon:"ℹ",label:"Info"},warning:{color:"text-warning",icon:"⚠",label:"Warning"}},be={error:"destructive",ok:"success",suggestion:"outline",warning:"warning"},ve=a(({schema:r})=>{const[e,s]=f(v(!1),"open"),[i,o]=f(v(!1),"showRaw"),c=_[r.status],g=r.graphIndex===void 0?`Script ${r.index+1}`:`Script ${r.index+1} @graph[${r.graphIndex}]`;return n("div",{class:"border border-border bg-card overflow-hidden",children:[n("button",{class:"w-full flex items-center justify-between gap-3 px-4 py-3 bg-transparent border-0 cursor-pointer text-left hover:bg-foreground/3 transition-colors",onClick:a(()=>s(p=>!p),"onClick"),type:"button",children:[n("div",{class:"flex items-center gap-2 min-w-0",children:[t("span",{class:y("text-base shrink-0 leading-none",c.color),children:c.icon}),t("span",{class:"text-[0.7rem] text-muted-foreground font-mono shrink-0",children:g}),t("code",{class:"text-[0.75rem] font-mono font-semibold text-foreground truncate",children:r.type})]}),n("div",{class:"flex items-center gap-2 shrink-0",children:[t(K,{variant:be[r.status],children:c.label}),t("span",{class:y("text-muted-foreground text-[0.65rem] transition-transform duration-150",e?"rotate-90":""),children:"▶"})]})]}),e&&n("div",{class:"border-t border-border",children:[r.messages.length>0?t("div",{class:"px-4 py-3 space-y-1.5",children:r.messages.map((p,u)=>{const h=_[p.severity];return n("div",{class:"flex items-start gap-2 text-[0.72rem]",children:[t("span",{class:y("shrink-0 leading-none mt-px",h.color),children:h.icon}),n("div",{class:"min-w-0",children:[p.property&&n("code",{class:"text-[0.65rem] font-mono text-muted-foreground mr-1.5",children:[p.property,":"]}),t("span",{class:"text-foreground/80",children:p.message})]})]},u)})}):n("div",{class:"px-4 py-3 flex items-center gap-2 text-[0.72rem] text-success",children:[t("span",{children:"✔"}),t("span",{children:"No issues found"})]}),n("div",{class:"border-t border-border/50 px-4 py-2 flex items-center justify-between",children:[n("button",{class:"text-[0.65rem] text-muted-foreground hover:text-foreground transition-colors bg-transparent border-0 cursor-pointer p-0",onClick:a(()=>o(p=>!p),"onClick"),type:"button",children:[i?"Hide":"Show"," raw JSON"]}),t(F,{text:r.raw})]}),i&&t("pre",{class:"text-[0.65rem] font-mono leading-relaxed bg-foreground/3 border-t border-border/50 px-4 py-3 overflow-x-auto max-h-60 text-muted-foreground whitespace-pre-wrap break-all m-0",children:r.raw})]})]})},"SchemaCard"),z=60,Y=158,J=120,S="...",xe=[{hasIssue:a(r=>!r.favicon,"hasIssue"),message:"No favicon or icon set on the page."},{hasIssue:a(r=>!r.title.trim(),"hasIssue"),message:"No title tag set on the page."},{hasIssue:a(r=>!r.description.trim(),"hasIssue"),message:"No meta description set on the page."},{hasIssue:a((r,e)=>e.titleOverflow,"hasIssue"),message:"The title exceeds ~60 characters and may be truncated in search results."}],we=[{extraChecks:[{hasIssue:a((r,e)=>e.descriptionOverflow,"hasIssue"),message:"The meta description exceeds ~158 characters and may be trimmed on desktop."}],isMobile:!1,label:"Desktop preview"},{extraChecks:[{hasIssue:a((r,e)=>e.descriptionOverflowMobile,"hasIssue"),message:"Description exceeds the 3-line limit for mobile view (~120 characters)."}],isMobile:!0,label:"Mobile preview"}],D=a((r,e)=>r.length<=e?r:e<=S.length?S:r.slice(0,e-S.length)+S,"truncateToChars"),ke=a(r=>{const e=typeof window<"u"?window.location.href:"",s=r.ogSiteName||(typeof window<"u"?window.location.hostname.replace(/^www\./,""):"");let i=Array.from(document.head.querySelectorAll("link")).find(o=>o.getAttribute("rel")?.toLowerCase().split(/\s+/).includes("icon"))?.getAttribute("href")||null;if(i&&typeof window<"u")try{i=new URL(i,e).href}catch{i=null}return{description:r.description,favicon:i,siteName:s,title:r.title,url:e}},"getSerpFromMeta"),Se=a((r,e,s)=>s.filter(i=>i.hasIssue(r,e)).map(i=>i.message),"getSerpIssues"),qe=a(({data:r,displayDescription:e,displayTitle:s,isMobile:i,issues:o,label:c})=>n("div",{class:"border border-border bg-card p-4 mb-4",children:[t("p",{class:"text-[0.7rem] font-semibold text-muted-foreground mb-3",children:c}),n("div",{class:y("border border-border/50 bg-background p-4 font-sans",i?"max-w-[380px]":"max-w-[600px]"),children:[n("div",{class:"flex items-center gap-3 mb-2",children:[r.favicon?t("img",{alt:"favicon",class:"size-7 rounded-full shrink-0 object-contain",src:r.favicon}):t("div",{class:"size-7 rounded-full shrink-0 bg-foreground/10 flex items-center justify-center"}),n("div",{class:"flex flex-col min-w-0",children:[t("span",{class:"text-[0.875rem] text-foreground leading-snug",children:r.siteName||r.url}),t("span",{class:"text-[0.75rem] text-muted-foreground leading-snug truncate",children:r.url})]})]}),t("p",{class:"text-[1.25rem] font-normal leading-snug mb-1 m-0",style:{color:"var(--color-info, #1a0dab)"},children:s||"No title"}),t("p",{class:y("text-[0.875rem] text-muted-foreground leading-relaxed m-0",i&&"line-clamp-3"),children:e||"No meta description."})]}),o.length>0&&n("div",{class:"mt-3",children:[t("p",{class:"text-[0.7rem] font-semibold text-destructive mb-1",children:"Issues:"}),t("ul",{class:"m-0 pl-5 list-disc",children:o.map((g,p)=>t("li",{class:"text-[0.75rem] text-destructive/80 mt-0.5",children:g},p))})]})]}),"SerpSnippetPreview"),Te=a(({meta:r})=>{const e=ke(r),s=e.title||"No title",i=e.description||"No meta description.",o=D(s,z),c=D(i,Y),g={descriptionOverflow:i.length>Y,descriptionOverflowMobile:i.length>J,titleOverflow:s.length>z};return n("div",{children:[t("p",{class:"text-[0.7rem] text-muted-foreground mb-3 leading-relaxed",children:"See how your title tag and meta description may look in Google search results. Data is read from the current page."}),we.map(p=>{const u=Se(e,g,[...xe,...p.extraChecks]);return t(qe,{data:e,displayDescription:p.isMobile?D(i,J):c,displayTitle:o,isMobile:p.isMobile,issues:u,label:p.label},p.label)})]})},"SerpPreview"),Ie=a(r=>{const[e,s]=f(v(void 0),"meta"),[i,o]=f(v([]),"schemas"),[c,g]=f(v("preview"),"activeTab"),p=a(()=>{s(ee()),o(he())},"refresh");if(W(()=>{p()},[]),!e)return n("div",{class:"flex flex-col items-center justify-center h-full gap-3 p-8 select-none",children:[t("div",{"aria-hidden":"true",class:"flex gap-1.5 items-center",children:[0,160,320].map(d=>t("span",{class:"size-1.5 bg-primary/50 rounded-full animate-pulse",style:{animationDelay:`${d}ms`}},d))}),t("span",{class:"text-[0.75rem] text-muted-foreground",children:"Reading meta tags…"})]});const u=R.filter(d=>d.priority==="required"&&!e[d.key]),h=R.filter(d=>d.priority==="recommended"&&!e[d.key]),q=u.length+h.length,b=i.filter(d=>d.status==="error").length,O=i.filter(d=>d.status==="warning").length;let x;b>0?x=b:O>0&&(x=O);const V=e.ogType==="article"||!!(e.articleAuthor||e.articlePublishedTime||e.articleModifiedTime||e.articleSection);return n("div",{class:"flex flex-col h-full",children:[n("div",{class:"flex items-center justify-between gap-3 px-4 py-2.5 border-b border-border shrink-0",children:[t("div",{class:"flex items-center gap-0",children:["preview","serp","tags","missing","jsonld"].map(d=>{const T={jsonld:"Structured Data",missing:"Missing",preview:"Social Previews",serp:"SERP",tags:"Meta Tags"}[d];let w;d==="missing"&&q>0?w=q:d==="jsonld"&&x!==void 0&&(w=x);let I;return d==="missing"?I=u.length>0?"destructive":"warning":I=b>0?"destructive":"warning",n("button",{class:y("flex items-center gap-1.5 px-3 py-1.5 text-[0.75rem] font-medium border-0 cursor-pointer transition-colors capitalize",c===d?"text-foreground border-b-2 border-primary bg-transparent":"text-muted-foreground bg-transparent hover:text-foreground"),onClick:a(()=>g(d),"onClick"),type:"button",children:[T,w!==void 0&&t(K,{class:"text-[0.58rem] min-w-[1.1rem] text-center",variant:I,children:w})]},d)})}),t(B,{onClick:p,size:"sm",variant:"outline",children:"Refresh"})]}),n("div",{class:"flex-1 overflow-auto",children:[c==="preview"&&t("div",{class:"p-4 grid grid-cols-2 gap-4",children:ye.map(d=>t(fe,{meta:e,platform:d},d.id))}),c==="serp"&&t("div",{class:"p-4",children:t(Te,{meta:e})}),c==="tags"&&n("div",{class:"p-5 space-y-5",children:[n("div",{children:[t(k,{children:"Basic"}),t("div",{class:"border border-border bg-card",children:n("div",{class:"px-4",children:[t(m,{label:"title",required:!0,value:e.title}),t(m,{label:"description",required:!0,value:e.description}),t(m,{label:"canonical",value:e.canonical})]})})]}),n("div",{children:[t(k,{children:"Open Graph"}),t("div",{class:"border border-border bg-card",children:n("div",{class:"px-4",children:[t(m,{label:"og:title",required:!0,value:e.ogTitle}),t(m,{label:"og:description",required:!0,value:e.ogDescription}),t(m,{label:"og:image",required:!0,value:e.ogImage}),t(m,{label:"og:image:alt",value:e.ogImageAlt}),t(m,{label:"og:url",value:e.ogUrl}),t(m,{label:"og:type",value:e.ogType}),t(m,{label:"og:site_name",value:e.ogSiteName}),t(m,{label:"og:locale",value:e.ogLocale})]})})]}),V&&n("div",{children:[t(k,{children:"Article"}),t("div",{class:"border border-border bg-card",children:n("div",{class:"px-4",children:[t(m,{label:"article:author",value:e.articleAuthor}),t(m,{label:"article:published_time",value:e.articlePublishedTime}),t(m,{label:"article:modified_time",value:e.articleModifiedTime}),t(m,{label:"article:section",value:e.articleSection})]})})]}),n("div",{children:[t(k,{children:"X / Twitter"}),t("div",{class:"border border-border bg-card",children:n("div",{class:"px-4",children:[t(m,{label:"twitter:card",required:!0,value:e.twitterCard}),t(m,{label:"twitter:title",value:e.twitterTitle}),t(m,{label:"twitter:description",value:e.twitterDescription}),t(m,{label:"twitter:image",value:e.twitterImage}),t(m,{label:"twitter:image:alt",value:e.twitterImageAlt}),t(m,{label:"twitter:site",value:e.twitterSite}),t(m,{label:"twitter:creator",value:e.twitterCreator})]})})]})]}),c==="jsonld"&&t("div",{class:"p-5 space-y-3",children:i.length===0?n("div",{class:"flex flex-col items-center justify-center py-12 gap-3",children:[t("div",{class:"size-10 border border-border flex items-center justify-center text-muted-foreground/40 text-lg select-none",children:"{}"}),t("p",{class:"text-[0.8rem] font-medium text-foreground/70",children:"No structured data found"}),n("p",{class:"text-[0.7rem] text-muted-foreground text-center max-w-xs leading-relaxed",children:["Add a ",t("code",{class:"font-mono bg-foreground/6 px-1",children:'<script type="application/ld+json">'})," block to help search engines understand your content."]})]}):n(E,{children:[n("div",{class:"flex items-center justify-between mb-1",children:[n("p",{class:"text-[0.65rem] font-bold uppercase tracking-[0.1em] text-muted-foreground",children:[i.length," schema",i.length===1?"":"s"," detected"]}),b>0&&n("span",{class:"text-[0.65rem] text-destructive font-medium",children:[b," error",b===1?"":"s"]})]}),i.map((d,T)=>t(ve,{schema:d},T))]})}),c==="missing"&&t("div",{class:"p-5 space-y-5",children:q===0?n("div",{class:"flex flex-col items-center justify-center py-12 gap-3",children:[t("div",{class:"size-10 border border-success/30 bg-success/8 flex items-center justify-center text-success text-lg select-none",children:"✓"}),t("p",{class:"text-[0.8rem] font-medium text-foreground/70",children:"All recommended tags are present"}),t("p",{class:"text-[0.7rem] text-muted-foreground",children:"Your page has all required and recommended meta tags."})]}):n(E,{children:[u.length>0&&n("div",{children:[n("p",{class:"text-[0.58rem] font-bold uppercase tracking-[0.12em] text-destructive/80 mb-2 flex items-center gap-1.5",children:[t("span",{children:"Required"}),t("span",{class:"bg-destructive/10 border border-destructive/25 text-destructive px-1 font-bold",children:u.length})]}),t("div",{class:"space-y-2",children:u.map(d=>t(U,{def:d},d.key))})]}),h.length>0&&n("div",{children:[n("p",{class:"text-[0.58rem] font-bold uppercase tracking-[0.12em] text-warning/80 mb-2 flex items-center gap-1.5",children:[t("span",{children:"Recommended"}),t("span",{class:"bg-warning/10 border border-warning/25 text-warning px-1 font-bold",children:h.length})]}),t("div",{class:"space-y-2",children:h.map(d=>t(U,{def:d},d.key))})]})]})})]})]})},"SeoApp"),Ee={component:Ie,icon:Q,id:"dev-toolbar:seo",name:"SEO"};export{Ee as default};