@ytspar/devbar 1.15.0 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,6 +36,7 @@ export declare class GlobalDevBar {
36
36
  ws: WebSocket | null;
37
37
  consoleLogs: ConsoleLog[];
38
38
  sweetlinkConnected: boolean;
39
+ sweetlinkAutoConnect: boolean;
39
40
  collapsed: boolean;
40
41
  capturing: boolean;
41
42
  copiedToClipboard: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalDevBar.d.ts","sourceRoot":"","sources":["../src/GlobalDevBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,cAAc,EAA0B,MAAM,0CAA0C,CAAC;AAQlG,OAAO,EAIL,cAAc,EAKf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAwB,MAAM,YAAY,CAAC;AAc/D,OAAO,EAAE,KAAK,cAAc,EAAsB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,SAAS,EACV,MAAM,YAAY,CAAC;AAGpB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3F,YAAY,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,SAAS,GACV,CAAC;AAiCF,QAAA,MAAM,cAAc,gBAA4C,CAAC;AASjE,qBAAa,YAAY;IAKvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAgC;IAEpE,OAAO,CAAC,MAAM,KAAK,cAAc,GAOhC;IAED,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AAG,IAAI,CAErD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C;AAGD,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,CAAC"}
@@ -86,6 +86,7 @@ export class GlobalDevBar {
86
86
  ws = null;
87
87
  consoleLogs = [];
88
88
  sweetlinkConnected = false;
89
+ sweetlinkAutoConnect = true;
89
90
  collapsed = false;
90
91
  capturing = false;
91
92
  copiedToClipboard = false;
@@ -206,6 +207,7 @@ export class GlobalDevBar {
206
207
  wsPath: sweetlinkOptions?.wsPath ?? runtimeConfig.wsPath,
207
208
  fallbackPort: this.baseWsPort,
208
209
  });
210
+ this.sweetlinkAutoConnect = sweetlinkOptions?.autoConnect ?? true;
209
211
  }
210
212
  else {
211
213
  this.currentAppPort = 0;
@@ -344,8 +346,13 @@ export class GlobalDevBar {
344
346
  setupTheme(this);
345
347
  // Load compact mode from storage
346
348
  loadCompactMode(this);
347
- // Setup WebSocket connection
348
- this.connectWebSocket();
349
+ // Setup WebSocket connection (skipped when sweetlink.autoConnect === false)
350
+ if (this.sweetlinkAutoConnect) {
351
+ this.connectWebSocket();
352
+ }
353
+ else {
354
+ this.debug.ws('Sweetlink autoConnect disabled; skipping initial WebSocket connect');
355
+ }
349
356
  // Setup breakpoint detection
350
357
  setupBreakpointDetection(this);
351
358
  // Setup performance monitoring
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalDevBar.js","sourceRoot":"","sources":["../src/GlobalDevBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,cAAc,EAA0B,MAAM,0CAA0C,CAAC;AAClG,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,eAAe,EACf,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,UAAU,EACV,aAAa,EACb,QAAQ,EACR,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,OAAO,EACP,OAAO,GACR,MA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onEnter:()=>{b.style.opacity="0",b.styl
467
467
  `),l.ownerDocument.head.appendChild(c)}}}function $9(A,n){let o=window.innerWidth*n,l=window.innerHeight*n,c=window.scrollX*n,m=window.scrollY*n;if(A.width<=o&&A.height<=l)return A;let g=document.createElement("canvas");g.width=o,g.height=l;let v=g.getContext("2d");return v?(v.drawImage(A,c,m,o,l,0,0,o,l),g):A}async function uy(A,n){try{await navigator.clipboard.writeText(n),A.copiedPath=!0,A.copiedPathTimeout&&clearTimeout(A.copiedPathTimeout),A.copiedPathTimeout=setTimeout(()=>{A.copiedPath=!1,A.render()},rf),A.render()}catch(o){console.error("[GlobalDevBar] Failed to copy path:",o)}}async function cy(A,n=!1){if(A.capturing)return;let o=gA(A.options.saveLocation,A.sweetlinkConnected);if(!n&&o==="local"&&!A.sweetlinkConnected)return;let l=null;try{A.capturing=!0,A.render(),l=uu(),await cu(Af);let m=await(await oi())(document.body,ly(af,n));l(),l=null;let g=n?$9(m,af):m;if(n)try{await kp(g),A.copiedToClipboard=!0,A.render(),A.screenshotTimeout&&clearTimeout(A.screenshotTimeout),A.screenshotTimeout=setTimeout(()=>{A.copiedToClipboard=!1,A.render()},rf)}catch(v){console.error("[GlobalDevBar] Failed to copy to clipboard:",v)}else{let v=lu(g,{format:"jpeg",quality:A.options.screenshotQuality});if(o==="local"&&A.ws?.readyState===WebSocket.OPEN){let b={};A.lcpValue!==null&&(b.lcp=Math.round(A.lcpValue)),A.clsValue>0&&(b.cls=A.clsValue),A.inpValue>0&&(b.inp=Math.round(A.inpValue));let C=performance.getEntriesByType("paint").find(R=>R.name==="first-contentful-paint");C&&(b.fcp=Math.round(C.startTime));let E=0,D=performance.getEntriesByType("navigation")[0];D&&(E+=D.transferSize||0),performance.getEntriesByType("resource").forEach(R=>{E+=R.transferSize||0}),A.ws.send(JSON.stringify({type:"save-screenshot",data:{screenshot:v,width:g.width,height:g.height,logs:A.consoleLogs,url:window.location.href,timestamp:Date.now(),webVitals:Object.keys(b).length>0?b:void 0,pageSize:E>0?E:void 0}}))}else{let b=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);sy(`devbar-screenshot-${b}.jpg`,v),A.handleNotification("screenshot","screenshot downloaded",ta)}}}catch(c){console.error("[GlobalDevBar] Screenshot failed:",c),l&&l()}finally{A.capturing=!1,A.render()}}async function Z9(A){if(A.designReviewInProgress||!A.sweetlinkConnected)return;let n=null;try{A.designReviewInProgress=!0,A.designReviewError=null,A.designReviewErrorTimeout&&(clearTimeout(A.designReviewErrorTimeout),A.designReviewErrorTimeout=null),A.render(),n=uu(),await cu(Af);let l=await(await oi())(document.body,ly(1,!1));n(),n=null;let c=lu(l,{format:"png"});A.ws?.readyState===WebSocket.OPEN&&A.ws.send(JSON.stringify({type:"design-review-screenshot",data:{screenshot:c,width:l.width,height:l.height,logs:A.consoleLogs,url:window.location.href,timestamp:Date.now()}}))}catch(o){console.error("[GlobalDevBar] Design review failed:",o),n&&n(),A.designReviewInProgress=!1,A.render()}}function dy(A){A.sweetlinkConnected&&(A.ws?.readyState===WebSocket.OPEN&&A.ws.send(JSON.stringify({type:"check-api-key"})),qt(A),A.showDesignReviewConfirm=!0,A.render())}function fy(A){if(!A.apiKeyStatus?.pricing)return null;let n=window.innerWidth,o=window.innerHeight,l=Math.ceil(n*o/750),c=500,m=1500,g=l+c,{input:v,output:b}=A.apiKeyStatus.pricing,C=g/1e6*v,E=m/1e6*b,D=C+E;return{tokens:g+m,cost:D<.01?"<$0.01":`~$${D.toFixed(2)}`}}function py(A){A.showDesignReviewConfirm=!1,A.apiKeyStatus=null,A.render()}function hy(A){A.showDesignReviewConfirm=!1,Z9(A)}function Lp(A,n){let o=A[n];qt(A),A[n]=!o,A.render()}function my(A){Lp(A,"showOutlineModal")}function gy(A){Lp(A,"showSchemaModal")}function vy(A){Lp(A,"showA11yModal")}function wy(A,n){if(A.savingA11yAudit)return;let o=Js(n);du(A,{type:"save-a11y",data:{markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingA11yAudit",downloadFilename:"a11y-audit",downloadContent:o,downloadMimeType:"text/markdown",notificationKey:"a11y",notificationMessage:"a11y report downloaded"})}function by(A){if(A.savingOutline)return;let n=JA(),o=mA(n);du(A,{type:"save-outline",data:{outline:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingOutline",downloadFilename:"outline",downloadContent:o,downloadMimeType:"text/markdown",notificationKey:"outline",notificationMessage:"outline downloaded"})}function Hp(A){return A.length===0?"_No logs_":A.map(n=>`- **[${new Date(n.timestamp).toLocaleTimeString()}]** \`${n.level}\` ${n.message}`).join(`
468
468
  `)}function By(A,n){if(A.savingConsoleLogs)return;let o=Hp(n);du(A,{type:"save-console-logs",data:{logs:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingConsoleLogs",downloadFilename:"console-logs",downloadContent:o,downloadMimeType:"text/markdown",notificationKey:"consoleLogs",notificationMessage:"console logs downloaded"})}function yy(A){if(A.savingSchema)return;let n=$A(),o=qs(n),l=Ws(),c=ZA(n,{missingTags:o,favicons:l});du(A,{type:"save-schema",data:{schema:n,markdown:c,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingSchema",downloadFilename:"schema",downloadContent:c,downloadMimeType:"text/markdown",notificationKey:"schema",notificationMessage:"schema downloaded"})}function ii(A,n,o){if(mf(o)){A.addSuccess(`${n} simulated`,o),A.addWarning($w());return}let l=o.endsWith("downloaded");A.addSuccess(l?`${n} downloaded!`:`${n} saved!`,l?void 0:o)}function Jn(A,n,o,l){let m={error:"error",warn:"warning",info:"info"}[n],g=A.consoleFilter===n,v=document.createElement("span");return v.className="devbar-badge",Object.assign(v.style,{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"18px",height:"18px",padding:"0 5px",borderRadius:"9999px",backgroundColor:l,color:"#fff",fontSize:"0.625rem",fontWeight:"600",cursor:"pointer",boxShadow:g?`0 0 8px ${J(l,80)}`:"none"}),v.textContent=o>99?"99+":String(o),Cr(A,v,()=>`${o} console ${m}${o===1?"":"s"} (click to view)`),v.onclick=()=>{let b=A.consoleFilter===n?null:n;qt(A),A.consoleFilter=b,A.render()},v}function fu(A,n){let o=document.createElement("button");o.type="button",o.setAttribute("aria-label","Screenshot");let l=A.copiedToClipboard||A.copiedPath||A.lastScreenshot,c=A.capturing,m=gA(A.options.saveLocation,A.sweetlinkConnected),g=m==="local"&&!A.sweetlinkConnected&&!l;return Zr(A,o,n,(v,b)=>{if(A.copiedToClipboard){b.addSuccess("Copied to clipboard!");return}if(A.copiedPath){b.addSuccess("Path copied to clipboard!");return}if(A.lastScreenshot){let C=A.lastScreenshot;if(mf(C)){ii(b,"Screenshot",C);return}if(C.endsWith("downloaded"))b.addSuccess("Screenshot downloaded!");else{b.addSuccess("Screenshot saved!",C);let D=document.createElement("div");Object.assign(D.style,{color:n,cursor:"pointer",fontSize:"0.625rem",marginTop:"6px",opacity:"0.8",transition:"opacity 150ms"}),D.textContent="copy path",D.onmouseenter=()=>{D.style.opacity="1"},D.onmouseleave=()=>{D.style.opacity="0.8"},D.onclick=async R=>{R.stopPropagation();try{await navigator.clipboard.writeText(C),D.textContent="\u2713 copied!",D.style.cursor="default",D.onclick=null}catch{D.textContent="\xD7 failed to copy",D.style.color=H.error}},v.appendChild(D)}return}if(b.addTitle("Screenshot"),b.addSectionHeader("Actions"),m==="local"&&!A.sweetlinkConnected)b.addShortcut("Shift+Click","Copy to clipboard"),b.addWarning("Sweetlink not connected. Switch save method to Auto or Download.");else{let C=m==="local"?"Save to file":"Download";b.addShortcut("Click",C),b.addShortcut("Shift+Click","Copy to clipboard"),b.addShortcut("Alt+Click","HiFi screenshot (pixel-perfect via daemon)"),b.addSectionHeader("Keyboard"),b.addShortcut("Cmd or Ctrl+Shift+S",C),b.addShortcut("Cmd or Ctrl+Shift+C","Copy")}}),Object.assign(o.style,{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",minWidth:"24px",minHeight:"24px",flexShrink:"0",borderRadius:"50%",border:"1px solid",borderColor:l?n:J(n,50),backgroundColor:l?J(n,20):"transparent",color:l?n:J(n,60),cursor:c?"not-allowed":"pointer",opacity:g?"0.4":"1",transition:"all 150ms"}),o.disabled=c,o.onclick=v=>{if(v.altKey){if(!A.ws||!A.sweetlinkConnected)return;A.ws.send(JSON.stringify({type:"hifi-screenshot"})),A.capturing=!0,A.render();return}A.lastScreenshot&&!v.shiftKey?uy(A,A.lastScreenshot):A.handleScreenshot(v.shiftKey)},A.copiedToClipboard||A.copiedPath||A.lastScreenshot?(o.textContent="\u2713",o.style.fontSize="0.6rem"):A.capturing?(o.textContent="...",o.style.fontSize="0.5rem"):o.appendChild(Nr("M19.844 7.938H7.938v11.905m0 11.113v11.906h11.905m23.019-11.906v11.906H30.956m11.906-23.018V7.938H30.956",{viewBox:"0 0 50.8 50.8",stroke:!0,strokeWidth:"4",children:[{type:"circle",cx:"25.4",cy:"25.4",r:"8.731"}]})),o}function Cy(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","AI Design Review");let o=!!A.designReviewError,l=A.designReviewInProgress||!!A.lastDesignReview||o,c=A.designReviewInProgress||!A.sweetlinkConnected,m=o?H.error:Pe.review;return Zr(A,n,m,(g,v)=>{if(A.designReviewInProgress){v.addProgress("AI Design Review in progress...");return}if(A.designReviewError){v.addError("Design review failed",A.designReviewError);return}if(A.lastDesignReview){ii(v,"Design review",A.lastDesignReview);return}v.addTitle("AI Design Review"),v.addDescription("Captures screenshot and sends to Claude for design analysis."),v.addSectionHeader("Requirements"),v.addShortcut("API Key","ANTHROPIC_API_KEY"),en()&&v.addWarning("Demo mode: no Claude request will be sent."),A.sweetlinkConnected||v.addWarning("Sweetlink not connected")}),Object.assign(n.style,Mr(m,l,c)),A.sweetlinkConnected||(n.style.opacity="0.5"),n.disabled=c,n.onclick=()=>dy(A),A.designReviewInProgress?(n.textContent="~",n.style.fontSize="0.5rem",n.style.animation="pulse 1s infinite"):A.designReviewError?(n.textContent="\xD7",n.style.fontSize="0.875rem",n.style.fontWeight="bold"):A.lastDesignReview?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Nr("M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z",{fill:!0})),n}function Ey(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Document Outline");let o=A.showOutlineModal||!!A.lastOutline;return Zr(A,n,Pe.outline,(l,c)=>{if(A.lastOutline){ii(c,"Outline",A.lastOutline);return}c.addTitle("Document Outline"),c.addDescription("View page heading structure and save as markdown."),en()&&c.addWarning("Demo mode: save actions return example paths only."),A.options.saveLocation==="local"&&!A.sweetlinkConnected&&c.addWarning("Sweetlink not connected. Switch save method to Auto or Download.")}),Object.assign(n.style,Mr(Pe.outline,o,!1)),n.onclick=()=>my(A),A.lastOutline?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Nr("M3 4h18v2H3V4zm0 7h12v2H3v-2zm0 7h18v2H3v-2z",{fill:!0})),n}function xy(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Page Schema");let o=A.showSchemaModal||!!A.lastSchema;return Zr(A,n,Pe.schema,(l,c)=>{if(A.lastSchema){ii(c,"Schema",A.lastSchema);return}c.addTitle("Page Schema"),c.addDescription("View JSON-LD, Open Graph, and other structured data."),en()&&c.addWarning("Demo mode: save actions return example paths only."),A.options.saveLocation==="local"&&!A.sweetlinkConnected&&c.addWarning("Sweetlink not connected. Switch save method to Auto or Download.")}),Object.assign(n.style,Mr(Pe.schema,o,!1)),n.onclick=()=>gy(A),A.lastSchema?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Nr("M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z",{fill:!0})),n}function Fy(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Accessibility Audit");let o=A.showA11yModal||!!A.lastA11yAudit;return Zr(A,n,Pe.a11y,(l,c)=>{if(A.lastA11yAudit){ii(c,"A11y report",A.lastA11yAudit);return}c.addTitle("Accessibility Audit"),c.addDescription("Run axe-core audit to check WCAG compliance."),en()&&c.addWarning("Demo mode: save actions return example paths only."),A.options.saveLocation==="local"&&!A.sweetlinkConnected&&c.addWarning("Sweetlink not connected. Switch save method to Auto or Download.")}),n.addEventListener("mouseenter",()=>kw(),{once:!0}),Object.assign(n.style,Mr(Pe.a11y,o,!1)),n.onclick=()=>vy(A),A.lastA11yAudit?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Nr("M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z",{fill:!0})),n}function Dy(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Ruler");let o=A.rulerMode;return Zr(A,n,Pe.ruler,(l,c)=>{o?(c.addTitle("Ruler Mode Active"),c.addDescription("Click elements to pin measurements. Press Esc or click here to exit.")):(c.addTitle("Ruler"),c.addDescription("Measure element dimensions and positions on page."))}),Object.assign(n.style,Mr(Pe.ruler,o,!1)),n.onclick=()=>{A.rulerMode?(A.rulerMode=!1,A.rulerCleanup&&(A.rulerCleanup(),A.rulerCleanup=null)):(qt(A),A.rulerMode=!0,A.rulerCleanup=ab(A)),A.render()},o?(n.textContent="\u2716",n.style.fontSize="0.5rem"):n.appendChild(Nr("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.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0zM14.5 12.5l2-2M11.5 9.5l2-2M8.5 6.5l2-2M17.5 15.5l2-2",{stroke:!0,strokeWidth:"2"})),n}function Qy(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label",A.recordingActive?"Stop Recording":"Start Recording");let o=A.recordingActive;if(Zr(A,n,Pe.error,(l,c)=>{if(o){let m=A.recordingStartedAt?((Date.now()-A.recordingStartedAt)/1e3).toFixed(0):"0";c.addTitle(`Recording: ${m}s`),c.addShortcut("Click","Stop recording & open viewer")}else A.lastViewerPath?(en()?(c.addSuccess("Demo recording simulated",A.lastViewerPath),c.addWarning("Demo only: no recording file was written.")):c.addSuccess("Last session recorded"),c.addShortcut("Click","Start new recording"),c.addShortcut("Shift+Click","Open last viewer")):(c.addTitle("Session Recording"),c.addShortcut("Click","Start recording (video + actions)"),en()&&c.addWarning("Demo mode: no video or action manifest will be recorded."))}),Object.assign(n.style,{...Mr(ce.red,o,!1),borderColor:o?ce.red:J(ce.red,50),backgroundColor:o?J(ce.red,20):"transparent",color:o?ce.red:J(ce.red,60),...o&&{animation:"devbar-pulse 1.5s ease-in-out infinite"}}),n.onclick=l=>{if(l.shiftKey&&A.lastViewerPath&&!o){window.open(A.lastViewerPath,"_blank");return}if(!(!A.ws||!A.sweetlinkConnected))if(o){let c=window.open("about:blank","_blank");A.pendingViewerWindow=c,A.ws.send(JSON.stringify({type:"record-stop"})),A.recordingTimer&&clearInterval(A.recordingTimer),A.recordingActive=!1,A.recordingTimer=null,A.recordingStartedAt=null,A.render()}else A.ws.send(JSON.stringify({type:"record-start"})),A.recordingActive=!0,A.recordingStartedAt=Date.now(),A.recordingSessionId=null,A.recordingTimer=setInterval(()=>A.render(),1e3),A.render()},o){let l=document.createElement("span");Object.assign(l.style,{display:"block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ce.red}),n.appendChild(l)}else{let l=document.createElement("span");Object.assign(l.style,{display:"block",width:"8px",height:"8px",borderRadius:"50%",border:"2px solid currentColor"}),n.appendChild(l)}return n}function Sy(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label",A.demoActive?"Demo in progress":"Start Demo");let o=A.demoActive;return Zr(A,n,Pe.info,(l,c)=>{o?(c.addTitle(`Demo: "${A.demoTitle??"Untitled"}"`),c.addShortcut(`${A.demoSectionCount} sections`,""),c.addShortcut("Click","Add screenshot to demo")):(c.addTitle("Demo Document"),c.addShortcut("Click","Start demo (prompts for title)"),en()&&c.addWarning("Demo mode: no markdown document will be written."))}),Object.assign(n.style,{...Mr(Pe.info,o,!1)}),n.onclick=()=>{if(!(!A.ws||!A.sweetlinkConnected))if(o)A.ws.send(JSON.stringify({type:"demo-screenshot"})),A.demoSectionCount++,A.render();else{let l=prompt("Demo title:");if(!l)return;A.ws.send(JSON.stringify({type:"demo-init",data:{title:l}})),A.demoActive=!0,A.demoTitle=l,A.demoSectionCount=0,A.render()}},o?(n.textContent=String(A.demoSectionCount),n.style.fontSize="0.6rem"):n.appendChild(Nr("M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",{stroke:!0,strokeWidth:"2"})),n}function pu(A){let n=document.createElement("button");n.type="button",n.setAttribute("data-testid","devbar-settings-button"),n.setAttribute("aria-label","Settings"),Zr(A,n,H.textSecondary,(c,m)=>{m.addTitle("Settings"),m.addSectionHeader("Keyboard"),m.addShortcut("Cmd or Ctrl+Shift+M","Toggle compact mode")});let o=A.showSettingsPopover,l=H.textSecondary;return Object.assign(n.style,Mr(l,o,!1)),n.onclick=()=>{let c=A.showSettingsPopover;qt(A),A.showSettingsPopover=!c,A.render()},n.appendChild(Nr("M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",{stroke:!0,children:[{type:"circle",cx:"12",cy:"12",r:"3"}]})),n}function Uy(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label",A.compactMode?"Switch to expanded mode":"Switch to compact mode");let o=A.compactMode,{accentColor:l}=A.options,c=H.textSecondary;Object.assign(n.style,Mr(c,!1,!1)),n.style.borderColor=J(l,38),Cr(A,n,()=>o?"Expand (Cmd or Ctrl+Shift+M)":"Compact (Cmd or Ctrl+Shift+M)",{onEnter:()=>{n.style.borderColor=l,n.style.backgroundColor=J(l,13),n.style.color=c},onLeave:()=>{n.style.borderColor=J(l,38),n.style.backgroundColor="transparent",n.style.color=J(c,60)}}),n.onclick=()=>{A.toggleCompactMode()};let m=o?"9 18 15 12 9 6":"15 18 9 12 15 6";return n.appendChild(Nr("",{stroke:!0,children:[{type:"polyline",points:m}]})),n}function Ty(A,n=[]){if(!A.container)return;let{position:o,accentColor:l}=A.options,{errorCount:c,warningCount:m,infoCount:g}=A.getLogCounts(),v=ia[o]??ia["bottom-left"],b=A.container;n.length>0?b.dataset.devbarCustomControls="true":delete b.dataset.devbarCustomControls,A.resetPositionStyles(b),Object.assign(b.style,{position:"fixed",...v,zIndex:"9999",backgroundColor:"var(--devbar-color-bg-card)",border:`1px solid ${l}`,borderRadius:"20px",color:l,boxShadow:`${Bt.shadows.dropToolbar}, 0 0 0 1px ${J(l,10)}`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",padding:"6px 10px",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"8px",boxSizing:"border-box",maxWidth:o==="bottom-center"?"calc(100vw - 32px)":"calc(100vw - 96px)",minWidth:"0",fontFamily:ht,fontSize:"0.6875rem"});let C=el(A),E=C.querySelector(".devbar-conn-dot");if(Cr(A,C,()=>oa(A.sweetlinkConnected)),C.onclick=R=>{R.stopPropagation(),Do(A,E),A.collapsed=!0,A.debug.state("Collapsed DevBar from compact mode"),A.render()},b.appendChild(C),c>0&&b.appendChild(Jn(A,"error",c,Pe.error)),m>0&&b.appendChild(Jn(A,"warn",m,Pe.warning)),g>0&&b.appendChild(Jn(A,"info",g,Pe.info)),A.options.showScreenshot&&b.appendChild(fu(A,l)),b.appendChild(pu(A)),n.length>0)for(let R of n)b.appendChild(Qo(R,l,A));let D=document.createElement("button");D.type="button",Object.assign(D.style,{display:"flex",alignItems:"center",justifyContent:"center",width:"18px",height:"18px",borderRadius:"50%",border:`1px solid ${J(l,38)}`,backgroundColor:"transparent",color:J(l,60),cursor:"pointer",fontSize:"0.5rem",transition:"all 150ms"}),D.textContent="\u27EB",Cr(A,D,()=>"Expand DevBar",{onEnter:()=>{D.style.backgroundColor=J(l,13),D.style.borderColor=l,D.style.color=l},onLeave:()=>{D.style.backgroundColor="transparent",D.style.borderColor=J(l,38),D.style.color=J(l,60)}}),D.onclick=()=>{A.toggleCompactMode()},b.appendChild(D)}function Fa(A,n,o={}){let l=typeof window<"u"?window.location.href:"unknown",c=typeof window<"u"?`${window.innerWidth}x${window.innerHeight} @${window.devicePixelRatio||1}x`:"unknown",m=A.lastScreenshot??"not captured yet",g=o.artifactPath??"not saved yet",v=`Run pnpm sweetlink inspect --url ${l} before acting to refresh @e refs.`,b=[`# ${n}`,`- URL: ${l}`,`- Viewport: ${c}`,`- Screenshot: ${m}`,`- Artifact: ${g}`,`- Refs: ${v}`];return o.observation&&b.push(`- Observation: ${o.observation}`),{title:"Agent Context",items:[{label:"URL",value:l},{label:"Viewport",value:c},{label:"Screenshot",value:m},{label:"Artifact",value:g},{label:"Refs",value:v}],copyText:b.join(`
469
469
  `)}}function Iy(A,n){let o=A.consoleFilter;if(!o)return;let l=n.getLogs().filter(k=>k.level===o),m={error:Pe.error,warn:Pe.warning,info:Pe.info}[o],v={error:"Errors",warn:"Warnings",info:"Info"}[o],b=()=>{A.consoleFilter=null,A.render()},C=Hn(b),E=Mn(m,`Console ${v}`),D=rn({color:m,title:`Console ${v} (${l.length})`,onClose:b,onCopyMd:async()=>{await wn(Hp(l))},onSave:()=>By(A,l),onClear:()=>A.clearConsoleLogs(),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingConsoleLogs,savedPath:A.lastConsoleLogs,evidenceContext:Fa(A,`Console ${v}`,{artifactPath:A.lastConsoleLogs,observation:`${l.length} ${o} log${l.length===1?"":"s"} in the current filter.`})});E.appendChild(D);let R=nn();l.length===0?R.appendChild(vA(`No ${o}s recorded`)):e7(R,l,m),E.appendChild(R),C.appendChild(E),A.overlayElement=C,document.body.appendChild(C),Nn(E)}function e7(A,n,o){n.forEach((l,c)=>{let m=document.createElement("div");Object.assign(m.style,{padding:"8px 14px",borderBottom:c<n.length-1?`1px solid ${H.borderSubtle}`:"none"});let g=document.createElement("span");Object.assign(g.style,{color:H.textMuted,fontSize:"0.625rem",marginRight:"8px"}),g.textContent=new Date(l.timestamp).toLocaleTimeString(),m.appendChild(g);let v=document.createElement("span");Object.assign(v.style,{color:o,fontSize:"0.6875rem",wordBreak:"break-word",whiteSpace:"pre-wrap"}),v.textContent=l.message,m.appendChild(v),A.appendChild(m)})}function t7(A,n,o){if(A.lastDotPosition&&!o){let m=n.endsWith("right"),g;return m?g=n.startsWith("top")?{top:"20px",right:"16px"}:{bottom:"20px",right:"16px"}:g={top:`${A.lastDotPosition.top-15}px`,left:`${A.lastDotPosition.left-19}px`},A.lastDotPosition=null,g}return ia[n]??ia["bottom-left"]}function r7(A,n,o,l,c){A.resetPositionStyles(n);let m=A.options.sizeOverrides,g="fit-content",v="auto",b=c?"calc(100vw - 32px)":"calc(100vw - 96px)";Object.assign(n.style,{position:"fixed",...o,zIndex:"9999",backgroundColor:"var(--devbar-color-bg-card)",border:`1px solid ${l}`,borderRadius:"12px",color:l,boxShadow:`${Bt.shadows.dropToolbar}, 0 0 0 1px ${J(l,10)}`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",boxSizing:"border-box",width:m?.width??g,maxWidth:m?.maxWidth??b,minWidth:m?.minWidth??v,cursor:"default"}),n.ondblclick=C=>{if(C.target?.closest("button, input, select, a"))return;let D=n.querySelector(".devbar-status span span");D&&Do(A,D),A.collapsed=!0,A.debug.state("Collapsed DevBar (double-click)"),A.render()}}function n7(){let A=document.createElement("div");return A.className="devbar-main",Object.assign(A.style,{display:"flex",alignItems:"center",alignContent:"flex-start",justifyContent:"flex-start",gap:"0.5rem",padding:"0.5rem 0.75rem",minWidth:"0",boxSizing:"border-box",fontFamily:ht,fontSize:"0.6875rem",lineHeight:"1rem"}),A}function A7(A){let n=el(A);return Cr(A,n,()=>oa(A.sweetlinkConnected,"click to minimize")),n.onclick=o=>{o.stopPropagation(),Do(A,n),A.collapsed=!0,A.debug.state("Collapsed DevBar (connection dot click)"),A.render()},n}function a7(A,n){let o=document.createElement("div");return o.className="devbar-info",Object.assign(o.style,{display:"flex",alignItems:"center",gap:"0.5rem",textTransform:"uppercase",letterSpacing:"0.05em",flexShrink:"1",minWidth:"0",overflow:"visible"}),n.breakpoint&&A.breakpointInfo&&o7(A,o),A.perfStats&&s7(A,o,n),o}function o7(A,n){if(!A.breakpointInfo)return;let o=A.breakpointInfo.tailwindBreakpoint,l=ra[o],c=document.createElement("span");c.className="devbar-item",Object.assign(c.style,{opacity:"0.9",cursor:"default"}),Yw(A,c,o,A.breakpointInfo.dimensions,l?.label||"");let m=o;o!=="base"&&(m=o==="sm"?`${o} - ${A.breakpointInfo.dimensions.split("x")[0]}`:`${o} - ${A.breakpointInfo.dimensions}`),c.textContent=m,n.appendChild(c)}function i7(A){return{fcp:{label:"FCP",value:A.fcp,title:"First Contentful Paint (FCP)",description:"Time until the first text or image renders on screen.",thresholds:{good:"<1.8s",needsWork:"1.8-3s",poor:">3s"}},lcp:{label:"LCP",value:A.lcp,title:"Largest Contentful Paint (LCP)",description:"Time until the largest visible element renders on screen.",thresholds:{good:"<2.5s",needsWork:"2.5-4s",poor:">4s"}},cls:{label:"CLS",value:A.cls,title:"Cumulative Layout Shift (CLS)",description:"Visual stability score. Higher values mean more unexpected layout shifts.",thresholds:{good:"<0.1",needsWork:"0.1-0.25",poor:">0.25"}},inp:{label:"INP",value:A.inp,title:"Interaction to Next Paint (INP)",description:"Responsiveness to user input. Measures the longest interaction delay.",thresholds:{good:"<200ms",needsWork:"200-500ms",poor:">500ms"}},pageSize:{label:"",value:A.totalSize,title:"Total Page Size",description:"Compressed/transferred size including HTML, CSS, JS, images, and other resources."}}}function s7(A,n,o){if(!A.perfStats)return;let{visible:l,hidden:c}=Nw(A),m=i7(A.perfStats),g=()=>{let b=document.createElement("span");b.style.opacity="0.4",b.textContent="|",n.appendChild(b)};for(let b of l){if(!o[b])continue;let C=m[b];g();let E=document.createElement("span");E.className="devbar-item",Object.assign(E.style,{opacity:b==="pageSize"?"0.7":"0.85",cursor:"default"}),E.textContent=C.label?`${C.label} ${C.value}`:C.value,C.thresholds?Xw(A,E,C.title,C.description,C.thresholds):Jw(A,E,C.title,C.description),n.appendChild(E)}let v=c.filter(b=>o[b]);v.length>0&&(g(),l7(A,n,v,m))}function l7(A,n,o,l){let c=document.createElement("span");c.className="devbar-item devbar-clickable",Object.assign(c.style,{opacity:"0.7",cursor:"pointer",padding:"0 2px"}),c.textContent="\xB7\xB7\xB7",qw(A,c,m=>{aa(A,m,"More Metrics");let g=document.createElement("div");Object.assign(g.style,{display:"flex",flexDirection:"column",gap:"6px",marginTop:"8px"});for(let v of o){let b=l[v],C=document.createElement("div");Object.assign(C.style,{display:"flex",justifyContent:"space-between",gap:"12px"});let E=document.createElement("span");Object.assign(E.style,{color:H.textMuted}),E.textContent=b.title.split("(")[0].trim();let D=document.createElement("span");Object.assign(D.style,{color:H.text,fontWeight:"500"}),D.textContent=b.value,C.appendChild(E),C.appendChild(D),g.appendChild(C)}m.appendChild(g)}),n.appendChild(c)}function u7(A,n,o,l,c,m){let g=A7(A),v=document.createElement("div");v.className="devbar-status",Object.assign(v.style,{display:"flex",alignItems:"center",gap:"0.5rem",flexWrap:"nowrap",flexShrink:"1",minWidth:"0"}),v.appendChild(g);let b=a7(A,n);return v.appendChild(b),o&&(l>0&&v.appendChild(Jn(A,"error",l,Pe.error)),c>0&&v.appendChild(Jn(A,"warn",c,Pe.warning)),m>0&&v.appendChild(Jn(A,"info",m,Pe.info))),v}function c7(A,n,o){let l=document.createElement("div");return l.className="devbar-actions",n&&l.appendChild(fu(A,o)),l.appendChild(Cy(A)),l.appendChild(Ey(A)),l.appendChild(xy(A)),l.appendChild(Fy(A)),l.appendChild(Dy(A)),l.appendChild(Qy(A)),l.appendChild(Sy(A)),l.appendChild(pu(A)),l.appendChild(Uy(A)),l}function d7(A,n,o,l){if(n.length===0)return null;let c=document.createElement("div");c.className=A,Object.assign(c.style,{display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",justifyContent:"flex-start",gap:"0.5rem",padding:"0 0.75rem 0.5rem 0.75rem",borderTop:`1px solid ${J(o,19)}`,marginTop:"0",paddingTop:"0.5rem",width:"100%",maxWidth:"100%",minWidth:"0",overflow:"visible",boxSizing:"border-box",fontFamily:ht,fontSize:"0.6875rem"});for(let m of n)c.appendChild(Qo(m,o,l));return c}function f7(A,n,o){let l=A.filter(m=>!m.group),c=d7("devbar-custom-controls devbar-custom-controls-inline",l,n,o);return c?(Object.assign(c.style,{padding:"0",borderTop:"0",width:"fit-content",flex:"0 1 auto",overflow:"hidden"}),c):null}function p7(A,n,o){let l=A.filter(g=>g.group);if(l.length===0)return null;let c=document.createElement("div");c.className="devbar-custom-controls devbar-custom-controls-row",Object.assign(c.style,{display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",justifyContent:"flex-start",gap:"0.5rem",padding:"0 0.75rem 0.5rem 0.75rem",borderTop:`1px solid ${J(n,19)}`,marginTop:"0",paddingTop:"0.5rem",width:"100%",maxWidth:"100%",minWidth:"0",overflow:"visible",boxSizing:"border-box",fontFamily:ht,fontSize:"0.6875rem"});let m=new Map;for(let g of l){if(!g.group)continue;let v=m.get(g.group)??[];v.push(g),m.set(g.group,v)}for(let[g,v]of m){let b=document.createElement("span");b.className="devbar-custom-group-label",Object.assign(b.style,{color:J(n,50),fontSize:"0.5625rem",textTransform:"uppercase",letterSpacing:"0.05em",flex:"0 1 auto",minWidth:"0",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginLeft:[...m.keys()].indexOf(g)>0?"0.25rem":"0"}),b.textContent=g,c.appendChild(b);for(let C of v)c.appendChild(Qo(C,n,o))}return c}function _y(A,n){if(!A.container)return;let{position:o,accentColor:l,showMetrics:c,showScreenshot:m,showConsoleBadges:g}=A.options,{errorCount:v,warningCount:b,infoCount:C}=A.getLogCounts(),E=o==="bottom-center",D=A.container;n.length>0?D.dataset.devbarCustomControls="true":delete D.dataset.devbarCustomControls;let R=t7(A,o,E);r7(A,D,R,l,E);let k=n7(),G=u7(A,c,g,v,b,C);k.appendChild(G);let W=f7(n,l,A);W&&k.appendChild(W);let q=c7(A,m,l);k.appendChild(q),D.appendChild(k);let ae=p7(n,l,A);ae&&D.appendChild(ae)}function ky(A){let n=JA(),o=Pe.outline,l=()=>{A.showOutlineModal=!1,A.render()},c=Hn(l),m=Mn(o,"Document Outline"),g=rn({color:o,title:"Document Outline",onClose:l,onCopyMd:async()=>{let b=mA(n);await wn(b)},onSave:()=>by(A),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingOutline,savedPath:A.lastOutline,evidenceContext:Fa(A,"Document Outline",{artifactPath:A.lastOutline,observation:`${n.length} top-level semantic node${n.length===1?"":"s"} found.`})});m.appendChild(g);let v=nn();n.length===0?v.appendChild(vA("No semantic elements found in this document")):Ly(n,v,0,{lastHeadingLevel:0}),m.appendChild(v),c.appendChild(m),A.overlayElement=c,document.body.appendChild(c),Nn(m)}function Ly(A,n,o,l){for(let c of A){let m=c.category==="heading"&&c.level>0,g=m&&c.level>l.lastHeadingLevel+1;m&&(l.lastHeadingLevel=c.level);let v=document.createElement("div");if(Object.assign(v.style,{padding:`4px 0 4px ${o*16}px`}),g){let R=document.createElement("span");Object.assign(R.style,{color:H.error,fontSize:"0.625rem",marginRight:"4px"}),R.textContent="\u26A0",R.title=`Heading level skipped (expected h${c.level-1} or higher before h${c.level})`,v.appendChild(R)}let b=document.createElement("span"),C=of[c.category||"other"]||of.other;if(Object.assign(b.style,{color:g?H.error:C,fontSize:"0.6875rem",fontWeight:"500"}),b.textContent=`<${c.tagName}>`,v.appendChild(b),c.category){let R=document.createElement("span");Object.assign(R.style,{color:H.textMuted,fontSize:"0.625rem",marginLeft:"6px"}),R.textContent=`[${c.category}]`,v.appendChild(R)}let E=document.createElement("span");Object.assign(E.style,{color:H.textSecondary,fontSize:"0.6875rem",marginLeft:"8px"});let D=c.text.length>60?`${c.text.slice(0,60)}...`:c.text;if(E.textContent=D,v.appendChild(E),c.id){let R=document.createElement("span");Object.assign(R.style,{color:H.textSecondary,fontSize:"0.625rem",marginLeft:"6px"}),R.textContent=`#${c.id}`,v.appendChild(R)}n.appendChild(v),c.children.length>0&&Ly(c.children,n,o+1,l)}}function Hy(A){let n=$A(),o=Pe.schema,l=()=>{A.showSchemaModal=!1,A.render()},c=Hn(l),m=Mn(o,"Page Schema"),g=qs(n),v=Ws(),b=rn({color:o,title:"Page Schema",onClose:l,onCopyMd:async()=>{let D=ZA(n,{missingTags:g,favicons:v});await wn(D)},onSave:()=>yy(A),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingSchema,savedPath:A.lastSchema,evidenceContext:Fa(A,"Page Schema",{artifactPath:A.lastSchema,observation:g.length?`${g.length} recommended metadata item${g.length===1?"":"s"} missing.`:"Schema evidence captured for this page."})});m.appendChild(b);let C=nn();n.jsonLd.length>0||Object.keys(n.openGraph).length>0||Object.keys(n.twitter).length>0||Object.keys(n.metaTags).length>0||v.length>0||g.length>0?(g.length>0&&y7(C,g),hu(C,"Open Graph",n.openGraph,H.info),hu(C,"Twitter Cards",n.twitter,H.cyan),v.length>0&&b7(C,v),hu(C,"JSON-LD",n.jsonLd,o),hu(C,"Meta Tags",n.metaTags,H.textMuted)):C.appendChild(vA("No structured data found on this page")),m.appendChild(C),c.appendChild(m),A.overlayElement=c,document.body.appendChild(c),Nn(m)}function Np(A,n,o,l){let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",gap:"8px",marginBottom:"10px",paddingBottom:"6px",borderBottom:`1px solid ${J(o,19)}`});let m=document.createElement("h3");Object.assign(m.style,{color:o,fontSize:"0.8125rem",fontWeight:"600",margin:"0"}),m.textContent=n,c.appendChild(m);let g=document.createElement("span");Object.assign(g.style,{color:J(o,80),fontSize:"0.5625rem",backgroundColor:J(o,9),padding:"1px 6px",borderRadius:"8px",letterSpacing:"0.03em"}),g.textContent=String(l),c.appendChild(g),A.appendChild(c)}function hu(A,n,o,l){let c=Array.isArray(o)?o.length:Object.keys(o).length;if(c===0)return;let m=document.createElement("div");m.style.marginBottom="20px",Np(m,n,l,c),Array.isArray(o)?h7(m,o,l):g7(m,o),A.appendChild(m)}function h7(A,n,o){n.forEach((l,c)=>{let m=document.createElement("div");m.style.marginBottom="10px";let g=l,v=typeof g?.["@type"]=="string"?g["@type"]:null,b=document.createElement("div");Object.assign(b.style,{display:"flex",alignItems:"center",gap:"6px",marginBottom:"4px"});let C=document.createElement("span");if(Object.assign(C.style,{color:H.textSecondary,fontSize:"0.6875rem"}),C.textContent=`Schema ${c+1}`,b.appendChild(C),v){let D=document.createElement("span");Object.assign(D.style,{color:J(o,80),fontSize:"0.5625rem",backgroundColor:J(o,8),border:`1px solid ${J(o,15)}`,padding:"0 5px",borderRadius:"3px"}),D.textContent=v,b.appendChild(D)}m.appendChild(b);let E=document.createElement("pre");Object.assign(E.style,{backgroundColor:"rgba(0, 0, 0, 0.25)",borderRadius:"4px",borderLeft:`2px solid ${J(o,31)}`,padding:"10px 10px 10px 12px",fontSize:"0.625rem",margin:"0",whiteSpace:"pre-wrap",wordBreak:"break-word"}),m7(E,JSON.stringify(l,null,2)),m.appendChild(E),A.appendChild(m)})}function m7(A,n){let o={key:H.primary,string:H.warning,number:H.purple,boolean:H.info,nullVal:H.error,punct:H.textMuted},l=/("(?:\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*")(\s*:)?|(\btrue\b|\bfalse\b)|(\bnull\b)|(-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)|([{}[\],])|(\s+)/g;for(let c of n.matchAll(l)){let[,m,g,v,b,C,E,D]=c;if(D)A.appendChild(document.createTextNode(D));else if(m!==void 0){let R=document.createElement("span");if(R.style.color=g?o.key:o.string,R.textContent=m,A.appendChild(R),g){let k=document.createElement("span");k.style.color=o.punct,k.textContent=":",A.appendChild(k)}}else if(v){let R=document.createElement("span");R.style.color=o.boolean,R.textContent=v,A.appendChild(R)}else if(b){let R=document.createElement("span");R.style.color=o.nullVal,R.textContent=b,A.appendChild(R)}else if(C){let R=document.createElement("span");R.style.color=o.number,R.textContent=C,A.appendChild(R)}else if(E){let R=document.createElement("span");R.style.color=o.punct,R.textContent=E,A.appendChild(R)}}}function g7(A,n){Object.entries(n).forEach(([l,c],m)=>{let g=pw(l),v=document.createElement("div");Object.assign(v.style,{display:"flex",padding:g?"6px 8px":"3px 8px",alignItems:"flex-start",borderRadius:"3px",backgroundColor:m%2===0?"rgba(255, 255, 255, 0.02)":"transparent"});let b=document.createElement("span");if(Object.assign(b.style,{color:H.textSecondary,fontSize:"0.6875rem",width:"120px",minWidth:"120px",maxWidth:"120px",flexShrink:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:g?"2px":"0"}),b.textContent=l,l.length>18&&(b.title=l),v.appendChild(b),g&&c){let C=document.createElement("div");Object.assign(C.style,{flex:"1",minWidth:"0"});let E=document.createElement("div");Object.assign(E.style,{display:"inline-block",padding:"4px",backgroundColor:"rgba(0, 0, 0, 0.2)",border:"1px solid rgba(255, 255, 255, 0.06)",borderRadius:"4px",marginBottom:"4px",minHeight:"60px",minWidth:"80px"});let D=document.createElement("img");Object.assign(D.style,{width:"200px",height:"120px",objectFit:"contain",borderRadius:"2px",display:"block"}),D.src=c,D.alt=l,D.onerror=()=>{E.style.display="none"},D.onload=()=>{D.naturalWidth&&(R.textContent=`${D.naturalWidth}\xD7${D.naturalHeight}`)},E.appendChild(D),C.appendChild(E);let R=document.createElement("div");Object.assign(R.style,{color:H.textMuted,fontSize:"0.5625rem",minHeight:"0.75rem",letterSpacing:"0.02em"}),C.appendChild(R);let k=document.createElement("div");Object.assign(k.style,{color:H.textMuted,fontSize:"0.5625rem",wordBreak:"break-all",opacity:"0.7"}),k.textContent=c,C.appendChild(k),v.appendChild(C)}else{let C=document.createElement("span");Object.assign(C.style,{color:H.text,fontSize:"0.6875rem",flex:"1",wordBreak:"break-word",whiteSpace:"pre-wrap",opacity:"0.85"}),C.textContent=String(c),v.appendChild(C)}A.appendChild(v)})}function v7(A,n){let o=parseInt(n||"",10);return A.includes("apple")?{text:"Apple home screen",color:H.info}:n==="any"||A.includes("svg")?{text:"Scalable (any)",color:H.cyan}:o>=192?{text:"Android / PWA",color:H.primary}:o>=48?{text:"Taskbar / shortcut",color:H.purple}:o>0?{text:"Browser tab",color:H.textSecondary}:{text:"General",color:H.textMuted}}function w7(A,n){let o=v7(A.label,A.size),l=document.createElement("div");Object.assign(l.style,{display:"flex",alignItems:"center",padding:"6px 8px",gap:"10px",borderRadius:"3px",backgroundColor:n%2===0?"rgba(255, 255, 255, 0.02)":"transparent"});let c=document.createElement("div");Object.assign(c.style,{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.25)",border:"1px solid rgba(255, 255, 255, 0.06)",borderRadius:"4px",flexShrink:"0"});let m=document.createElement("img");Object.assign(m.style,{width:"22px",height:"22px",objectFit:"contain"}),m.src=A.url,m.alt=A.label,m.onerror=()=>{c.style.opacity="0.3"},c.appendChild(m),l.appendChild(c);let g=document.createElement("div");Object.assign(g.style,{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"2px"});let v=document.createElement("div");Object.assign(v.style,{display:"flex",alignItems:"center",gap:"6px"});let b=document.createElement("span");Object.assign(b.style,{color:H.text,fontSize:"0.6875rem",fontWeight:"500",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),b.textContent=A.label,A.label.length>24&&(b.title=A.label),v.appendChild(b);let C=document.createElement("span");Object.assign(C.style,{color:o.color,fontSize:"0.5rem",backgroundColor:J(o.color,7),padding:"1px 6px",borderRadius:"6px",letterSpacing:"0.03em",whiteSpace:"nowrap",flexShrink:"0"}),C.textContent=o.text,v.appendChild(C),g.appendChild(v);let E=document.createElement("div");if(Object.assign(E.style,{display:"flex",alignItems:"center",gap:"6px",fontSize:"0.5625rem",color:H.textMuted}),A.size){let G=document.createElement("span");G.textContent=A.size,G.style.opacity="0.8",E.appendChild(G)}let D=document.createElement("span");D.style.letterSpacing="0.02em",E.appendChild(D),m.onload=()=>{if(m.naturalWidth){let G=`${m.naturalWidth}\xD7${m.naturalHeight}`;A.size?D.textContent=`\u2192 ${G}`:D.textContent=G}};let R=document.createElement("span");R.textContent="\xB7",R.style.opacity="0.4",E.appendChild(R);let k=document.createElement("span");return Object.assign(k.style,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",opacity:"0.6"}),k.textContent=A.url,k.title=A.url,E.appendChild(k),g.appendChild(E),l.appendChild(g),l}function b7(A,n){let o=H.purple,l=document.createElement("div");l.style.marginBottom="20px",Np(l,"Favicons",o,n.length),n.forEach((c,m)=>{l.appendChild(w7(c,m))}),A.appendChild(l)}function Ry(A,n){let o=document.createElement("span");return Object.assign(o.style,{color:n,fontSize:"0.5625rem",backgroundColor:J(n,8),padding:"2px 8px",borderRadius:"8px",letterSpacing:"0.03em"}),o.textContent=A,o}function B7(A,n){let o=document.createElement("div");return Object.assign(o.style,{display:"flex",alignItems:"center",padding:"4px 8px",gap:"8px",borderRadius:"3px",backgroundColor:A%2===0?"rgba(255, 255, 255, 0.02)":"transparent",...n?{borderLeft:`2px solid ${J(n,25)}`}:{}}),o}function Mp(A,n){let o=document.createElement("span");return Object.assign(o.style,n),o.textContent=A,o}function y7(A,n){let o=document.createElement("div");o.style.marginBottom="20px";let l=n.filter(v=>v.severity==="error").length,c=n.length-l,g=l>0?H.error:H.warning;if(Np(o,"Missing Tags",g,n.length),l>0||c>0){let v=document.createElement("div");Object.assign(v.style,{display:"flex",gap:"8px",marginBottom:"8px"}),l>0&&v.appendChild(Ry(`${l} error${l>1?"s":""}`,H.error)),c>0&&v.appendChild(Ry(`${c} warning${c>1?"s":""}`,H.warning)),o.appendChild(v)}n.forEach((v,b)=>{let C=v.severity==="error",E=C?H.error:H.warning,D=B7(b,E),R=Mp(C?"\u2718":"\u26A0",{fontSize:"0.625rem",flexShrink:"0",width:"14px",textAlign:"center",color:E});D.appendChild(R),D.appendChild(Mp(v.tag,{color:H.text,fontSize:"0.6875rem",width:"120px",minWidth:"120px",flexShrink:"0",fontWeight:"500"})),D.appendChild(Mp(v.hint,{color:H.textMuted,fontSize:"0.6875rem",flex:"1",opacity:"0.85"})),o.appendChild(D)}),A.appendChild(o)}function My(A){let n=Pe.a11y,o=()=>{A.showA11yModal=!1,A.render()},l=Hn(o),c=Mn(n,"Accessibility Audit");C7(c,n,o,A),l.appendChild(c),A.overlayElement=l,document.body.appendChild(l),Nn(c),Ys().then(m=>{if(!A.showA11yModal)return;let g=Js(m);wf(c);let v=m.violations.length,b=v===0?"Accessibility Audit \u2014 No Issues":`Accessibility Audit \u2014 ${v} Violation${v===1?"":"s"}`,C=rn({color:n,title:b,onClose:o,onCopyMd:async()=>{await wn(g)},onSave:()=>wy(A,m),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingA11yAudit,savedPath:A.lastA11yAudit,evidenceContext:Fa(A,b,{artifactPath:A.lastA11yAudit,observation:v===0?`${m.passes.length} axe rule${m.passes.length===1?"":"s"} passed.`:`${v} accessibility violation${v===1?"":"s"} found.`})});c.appendChild(C);let E=nn();E7(E,m,n),c.appendChild(E)}).catch(m=>{if(!A.showA11yModal)return;wf(c);let g=rn({color:H.error,title:"Accessibility Audit \u2014 Error",onClose:o,onCopyMd:async()=>{},sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation});c.appendChild(g);let v=nn();v.appendChild(la(H.error,"Audit Failed",`${m instanceof Error?m.message:"Unknown error"}`)),c.appendChild(v)})}function C7(A,n,o,l){let c=nn(),m=document.createElement("div");Object.assign(m.style,{textAlign:"center",padding:"40px",color:H.textSecondary,fontSize:"0.875rem"}),m.textContent="Running accessibility audit...",m.style.animation="pulse 1.5s ease-in-out infinite",c.appendChild(m);let g=rn({color:n,title:"Accessibility Audit",onClose:o,onCopyMd:async()=>{},sweetlinkConnected:l.sweetlinkConnected,saveLocation:l.options.saveLocation});A.appendChild(g),A.appendChild(c)}function E7(A,n,o){if(x7(A,n,o),n.violations.length===0){let l=document.createElement("div");if(Object.assign(l.style,{textAlign:"center",padding:"40px",color:H.primary,fontSize:"0.875rem"}),l.textContent="No accessibility violations found!",A.appendChild(l),n.passes.length>0){let c=document.createElement("div");Object.assign(c.style,{textAlign:"center",color:H.textMuted,fontSize:"0.75rem",marginTop:"8px"}),c.textContent=`${n.passes.length} rules passed`,A.appendChild(c)}}else{let l=cf(n.violations),c=document.createElement("div");Object.assign(c.style,{display:"flex",gap:"12px",marginBottom:"16px",padding:"10px 12px",backgroundColor:J(o,6),border:`1px solid ${J(o,19)}`,borderRadius:"6px",flexWrap:"wrap"});for(let g of["critical","serious","moderate","minor"]){if(l[g]===0)continue;let v=document.createElement("span"),b=ff(g);Object.assign(v.style,{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"0.6875rem",fontWeight:"600",color:b});let C=document.createElement("span");Object.assign(C.style,{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:b}),v.appendChild(C),v.appendChild(document.createTextNode(`${l[g]} ${g}`)),c.appendChild(v)}A.appendChild(c);let m=df(n.violations);for(let[g,v]of m)v.length!==0&&D7(A,g,v)}}function x7(A,n,o){let l=[`${n.passes.length} axe rule${n.passes.length===1?"":"s"} passed`,`${n.violations.length} violation${n.violations.length===1?"":"s"} found`,"current DOM, focus semantics, names, landmarks, forms, and color contrast where browser APIs expose enough paint data"];A.appendChild(la(o,"What was checked",l.join(" \xB7 ")))}function Oy(A){let n=document.createElement("div");return Object.assign(n.style,{padding:"3px 6px",marginBottom:"2px",backgroundColor:"rgba(0,0,0,0.2)",borderRadius:"3px",fontSize:"0.625rem",color:H.textSecondary,fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),n.textContent=A.html.length>100?`${A.html.slice(0,100)}...`:A.html,n.title=A.html,n}function F7(A,n){let o=document.createElement("div");Object.assign(o.style,{marginBottom:"12px",padding:"10px 12px",backgroundColor:J(n,3),border:`1px solid ${J(n,13)}`,borderRadius:"6px"});let l=document.createElement("div");Object.assign(l.style,{color:n,fontSize:"0.6875rem",fontWeight:"600",marginBottom:"4px"}),l.textContent=A.id,o.appendChild(l);let c=document.createElement("div");Object.assign(c.style,{color:H.text,fontSize:"0.75rem",marginBottom:"4px"}),c.textContent=A.help,o.appendChild(c);let m=document.createElement("div");Object.assign(m.style,{color:H.textSecondary,fontSize:"0.6875rem",marginBottom:"6px"}),m.textContent=A.description,o.appendChild(m);let g=document.createElement("div");Object.assign(g.style,{color:H.textMuted,fontSize:"0.625rem",marginBottom:"4px"}),g.textContent=`${A.nodes.length} element${A.nodes.length===1?"":"s"} affected`,o.appendChild(g);let v=document.createElement("div");Object.assign(v.style,{marginTop:"6px"});let b=A.nodes.slice(0,3);for(let C of b)v.appendChild(Oy(C));if(A.nodes.length>3){let C=document.createElement("button");Object.assign(C.style,{background:"none",border:"none",color:n,fontSize:"0.625rem",cursor:"pointer",padding:"2px 0",fontFamily:ht}),C.textContent=`+ ${A.nodes.length-3} more`,C.onclick=()=>{C.remove();for(let E of A.nodes.slice(3))v.appendChild(Oy(E))},v.appendChild(C)}return o.appendChild(v),o}function D7(A,n,o){let l=ff(n),c=document.createElement("div");c.style.marginBottom="20px";let m=document.createElement("h3");Object.assign(m.style,{color:l,fontSize:"0.8125rem",fontWeight:"600",marginBottom:"10px",borderBottom:`1px solid ${J(l,25)}`,paddingBottom:"6px",textTransform:"capitalize"}),m.textContent=`${n} (${o.length})`,c.appendChild(m);for(let g of o)c.appendChild(F7(g,l));A.appendChild(c)}function Ny(A){let n=Pe.review,o=()=>py(A),l=Hn(o),c=Mn(n,"AI Design Review");c.style.maxWidth="450px",c.appendChild(rn({color:n,title:"AI Design Review",onClose:o}));let m=nn();if(Object.assign(m.style,{color:H.text,fontSize:"0.8125rem",lineHeight:"1.6"}),A.apiKeyStatus===null?m.appendChild(vA("Checking API key configuration...")):A.apiKeyStatus.configured?m.appendChild(S7(A)):m.appendChild(Q7()),c.appendChild(m),A.apiKeyStatus?.configured){let g=document.createElement("div");Object.assign(g.style,{display:"flex",justifyContent:"flex-end",gap:"10px",padding:"14px 18px",borderTop:`1px solid ${H.border}`});let v=tn({color:n,text:"Run Review",padding:"8px 16px"});v.style.backgroundColor=J(n,13),v.onclick=()=>hy(A),g.appendChild(v),c.appendChild(g)}l.appendChild(c),A.overlayElement=l,document.body.appendChild(l),Nn(c)}function Q7(){let A=document.createElement("div");A.appendChild(la(H.error,"API Key Not Configured","The ANTHROPIC_API_KEY environment variable is not set."));let n=document.createElement("div");Object.assign(n.style,{marginBottom:"12px"});let o=document.createElement("div");return Object.assign(o.style,{color:H.textSecondary,fontWeight:"600",marginBottom:"8px"}),o.textContent="To configure:",n.appendChild(o),[{text:"1. Get an API key from console.anthropic.com",highlight:!1},{text:"2. Add to your .env file:",highlight:!1},{text:" ANTHROPIC_API_KEY=sk-ant-...",highlight:!0},{text:"3. Restart your dev server",highlight:!1}].forEach(({text:c,highlight:m})=>{let g=document.createElement("div");Object.assign(g.style,{color:m?H.primary:H.textMuted,fontSize:"0.75rem",marginBottom:"4px",fontFamily:ht}),g.textContent=c,n.appendChild(g)}),A.appendChild(n),A}function S7(A){let n=document.createElement("div");Object.assign(n.style,{marginBottom:"16px"});let o=document.createElement("p");Object.assign(o.style,{color:H.textSecondary,marginBottom:"12px"}),o.textContent="This will capture a screenshot and send it to Claude for design analysis.",n.appendChild(o);let l=fy(A);if(l){let c=la(H.primary,"Estimated Cost",[]);c.style.marginBottom="0",c.style.padding="12px";let m=document.createElement("div");Object.assign(m.style,{display:"flex",justifyContent:"space-between",color:H.textSecondary,fontSize:"0.75rem"});let g=document.createElement("span");g.textContent=`~${l.tokens.toLocaleString()} tokens`,m.appendChild(g);let v=document.createElement("span");Object.assign(v.style,{color:H.warning,fontWeight:"600"}),v.textContent=l.cost,m.appendChild(v),c.appendChild(m),n.appendChild(c)}if(A.apiKeyStatus?.model){let c=document.createElement("div");Object.assign(c.style,{color:H.textMuted,fontSize:"0.6875rem",marginTop:"12px"}),c.textContent=`Model: ${A.apiKeyStatus.model}`,n.appendChild(c)}return n}var U7=860;function Pp(A){return A?!0:typeof window>"u"?!1:window.innerWidth<=U7}function Py(A){let n=A.settingsManager.getSettings();A.themeMode=A.forcedThemeMode??n.themeMode,A.forcedThemeMode&&n.themeMode!==A.forcedThemeMode&&A.settingsManager.saveSettingsNow({themeMode:A.forcedThemeMode}),Aa(na(A.themeMode)),A.debug.state("Theme loaded",{mode:A.themeMode}),typeof window<"u"&&window.matchMedia&&(A.themeMediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),A.themeMediaHandler=()=>{A.themeMode==="system"&&(Aa(na(A.themeMode)),A.debug.state("System theme changed",{effectiveTheme:Co(A.themeMode)}),window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:A.themeMode}})),A.render())},A.themeMediaQuery.addEventListener("change",A.themeMediaHandler))}function Ky(A){let n=A.settingsManager.getSettings();A.compactMode=Pp(n.compactMode),A.debug.state("Compact mode loaded",{compactMode:A.compactMode})}function mu(A,n){let o=A.forcedThemeMode??n;A.themeMode=o,A.settingsManager.saveSettings({themeMode:o}),Dw(o),Aa(na(o)),A.debug.state("Theme mode changed",{mode:o,effectiveTheme:Co(o)}),typeof window<"u"&&window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:o}})),A.render()}function Vy(A){let{position:n,accentColor:o}=A.options,l=document.createElement("div");l.setAttribute("data-devbar","true"),l.setAttribute("data-devbar-overlay","true"),Object.assign(l.style,{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",zIndex:"10003"}),l.onclick=k=>{k.target===l&&(A.showSettingsPopover=!1,A.render())};let c=document.createElement("div");c.setAttribute("data-devbar","true"),c.setAttribute("role","dialog"),c.setAttribute("aria-modal","true"),c.setAttribute("aria-label","Settings"),c.tabIndex=-1;let m=n.startsWith("top"),g=480,v=16,b;if(A.container&&window.innerWidth>640){let k=A.container.getBoundingClientRect(),G=k.left+k.width/2;b=Math.max(v,Math.min(G-g/2,window.innerWidth-g-v))}else b=Math.max(v,(window.innerWidth-g)/2);Object.assign(c.style,{position:"fixed",[m?"top":"bottom"]:"70px",left:`${b}px`,zIndex:"10003",backgroundColor:"var(--devbar-color-bg-elevated)",border:`1px solid ${o}`,borderRadius:"8px",boxShadow:`${Bt.shadows.dropLg}, 0 0 0 1px ${J(o,20)}`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",width:`${g}px`,maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 100px)",overflowY:"auto",fontFamily:ht}),c.appendChild(T7(A));let C=document.createElement("div");C.className="devbar-settings-grid",Object.assign(C.style,{display:"grid",gridTemplateColumns:"1fr 1fr"});let E=H.textSecondary,D=document.createElement("div");Object.assign(D.style,{borderRight:`1px solid ${J(E,13)}`}),D.appendChild(I7(A)),D.appendChild(_7(A)),C.appendChild(D);let R=document.createElement("div");R.appendChild(N7(A)),R.appendChild(K7(A)),C.appendChild(R),c.appendChild(C),c.appendChild(V7(A)),l.appendChild(c),A.overlayElement=l,document.body.appendChild(l),c.focus()}function T7(A){let{accentColor:n}=A.options,o=document.createElement("div");Object.assign(o.style,{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 14px",borderBottom:`1px solid ${J(n,19)}`,position:"sticky",top:"0",backgroundColor:"var(--devbar-color-bg-elevated)",zIndex:"1"});let l=document.createElement("span");return Object.assign(l.style,{color:n,fontSize:"0.75rem",fontWeight:"600"}),l.textContent="Settings",o.appendChild(l),o.appendChild(Uo(()=>{A.showSettingsPopover=!1,A.render()})),o}function I7(A){let{accentColor:n}=A.options,o=!!A.forcedThemeMode,l=gu("Theme");vu(l,o?`Theme is controlled by the host app: ${A.forcedThemeMode}.`:"Follow OS/browser preference, force dark, or force light while reviewing.");let c=document.createElement("div");return Object.assign(c.style,{display:"flex",gap:"6px"}),["system","dark","light"].forEach(g=>{let v=Gy({label:g,isActive:A.themeMode===g,accentColor:n,disabled:o&&g!==A.forcedThemeMode,disabledTitle:"Theme controlled by host app",onClick:()=>mu(A,g)});v.style.textTransform="capitalize",c.appendChild(v)}),l.appendChild(c),l}function _7(A){let n=gu("Display & appearance");return vu(n,"Change where DevBar lives and how evidence captures are rendered."),n.appendChild(R7(A)),n.appendChild(O7(A)),n.appendChild(k7(A)),n.appendChild(M7(A)),n}function R7(A){let{accentColor:n}=A.options,o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{marginBottom:"10px"});let c=document.createElement("div");Object.assign(c.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),c.textContent="Position",l.appendChild(c);let m=document.createElement("div");return Object.assign(m.style,{position:"relative",width:"100%",height:"70px",backgroundColor:"var(--devbar-color-bg-input)",border:`1px solid ${J(o,19)}`,borderRadius:"4px"}),[{value:"top-left",style:{top:"6px",left:"6px"},title:"Top Left"},{value:"top-right",style:{top:"6px",right:"6px"},title:"Top Right"},{value:"bottom-left",style:{bottom:"6px",left:"6px"},title:"Bottom Left"},{value:"bottom-right",style:{bottom:"6px",right:"6px"},title:"Bottom Right"},{value:"bottom-center",style:{bottom:"6px",left:"50%",transform:"translateX(-50%)"},title:"Bottom Center"}].forEach(({value:v,style:b,title:C})=>{let E=document.createElement("button");E.setAttribute("data-position",v);let D=A.options.position===v;Object.assign(E.style,{position:"absolute",width:"24px",height:"6px",backgroundColor:D?n:H.textMuted,border:`1px solid ${D?n:H.textMuted}`,borderRadius:"2px",cursor:"pointer",padding:"0",transition:"all 150ms",boxShadow:D?`0 0 8px ${J(n,38)}`:"none",opacity:D?"1":"0.5",...b}),E.title=C,E.onclick=()=>{A.options.position=v,A.settingsManager.saveSettings({position:v}),A.render()},E.onmouseenter=()=>{D||(E.style.backgroundColor=n,E.style.borderColor=n,E.style.boxShadow=`0 0 6px ${J(n,25)}`,E.style.opacity="1")},E.onmouseleave=()=>{D||(E.style.backgroundColor=H.textMuted,E.style.borderColor=H.textMuted,E.style.boxShadow="none",E.style.opacity="0.5")},m.appendChild(E)}),l.appendChild(m),l}function O7(A){let{accentColor:n}=A.options,o=document.createDocumentFragment();o.appendChild(si("Compact Mode",A.compactMode,n,()=>{A.toggleCompactMode()}));let l=document.createElement("div");return Object.assign(l.style,{color:H.textMuted,fontSize:"0.5625rem",marginTop:"2px",marginBottom:"8px"}),l.textContent="Keyboard: Cmd or Ctrl+Shift+M",o.appendChild(l),o}function k7(A){let n=document.createElement("div");Object.assign(n.style,{marginBottom:"6px"});let o=document.createElement("div");Object.assign(o.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),o.textContent="Accent Color",n.appendChild(o);let l=document.createElement("div");Object.assign(l.style,{display:"flex",gap:"6px",flexWrap:"wrap",alignItems:"center"});let c=A.options.accentColor,m=c===H.primary,v=!yf.some(b=>b.value===c)&&!m;if(yf.forEach(({name:b,value:C})=>{let E=document.createElement("button"),D=c===C||m&&b==="Emerald";Object.assign(E.style,{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:C,border:D?"2px solid #fff":"2px solid transparent",cursor:"pointer",transition:"all 150ms",boxShadow:D?`0 0 8px ${C}`:"none"}),E.title=b,E.onclick=()=>{A.options.accentColor=C,A.settingsManager.saveSettings({accentColor:C}),A.render()},l.appendChild(E)}),v){let b=document.createElement("button");b.type="button",b.setAttribute("data-accent-reset","true"),b.title=`Custom color (${c}). Click to reset to theme default.`,Object.assign(b.style,{marginLeft:"4px",padding:"2px 8px",borderRadius:"10px",border:`1px dashed ${c}`,backgroundColor:"transparent",color:c,fontSize:"0.625rem",fontFamily:ht,cursor:"pointer",lineHeight:"1.4"}),b.textContent="custom \xB7 reset",b.onclick=()=>{let C=So.accentColor;A.options.accentColor=C,A.settingsManager.saveSettings({accentColor:C}),A.render()},l.appendChild(b)}return n.appendChild(l),n}function L7(A,n){return[`#${A}::-webkit-slider-thumb {`," -webkit-appearance: none;"," width: 12px; height: 12px;"," border-radius: 50%;",` background: ${n};`,` border: 2px solid ${H.bg};`,` box-shadow: 0 0 4px ${J(n,50)};`," cursor: grab;","}",`#${A}::-webkit-slider-thumb:active { cursor: grabbing; }`,`#${A}::-moz-range-thumb {`," width: 12px; height: 12px;"," border-radius: 50%;",` background: ${n};`,` border: 2px solid ${H.bg};`,` box-shadow: 0 0 4px ${J(n,50)};`," cursor: grab;","}",`#${A}::-webkit-slider-runnable-track { background: transparent; }`,`#${A}::-moz-range-track { background: transparent; }`].join(`
470
- `)}function H7(A,n,o,l){A.oninput=()=>{let c=parseFloat(A.value);n.textContent=c.toFixed(2),o.style.width=`${c*100}%`,l.options.screenshotQuality=c},A.onchange=()=>{l.settingsManager.saveSettings({screenshotQuality:l.options.screenshotQuality})}}function M7(A){let{accentColor:n}=A.options,o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{marginTop:"8px"});let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"6px"});let m=document.createElement("span");Object.assign(m.style,{color:H.text,fontSize:"0.6875rem"}),m.textContent="Screenshot Quality",c.appendChild(m);let g=document.createElement("span");Object.assign(g.style,{color:n,fontSize:"0.6875rem",fontFamily:"monospace",minWidth:"28px",textAlign:"right"});let v=A.options.screenshotQuality;g.textContent=v.toFixed(2),c.appendChild(g),l.appendChild(c);let b=document.createElement("div");Object.assign(b.style,{position:"relative",height:"20px"});let C=document.createElement("div");Object.assign(C.style,{position:"absolute",top:"50%",left:"0",right:"0",height:"2px",transform:"translateY(-50%)",borderRadius:"1px",background:J(o,25),pointerEvents:"none"});let E=document.createElement("div");Object.assign(E.style,{height:"100%",width:`${v*100}%`,borderRadius:"1px",background:n}),C.appendChild(E),b.appendChild(C);let D=document.createElement("input");D.type="range",D.min="0",D.max="1",D.step="0.01",D.value=String(v),Object.assign(D.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",appearance:"none",WebkitAppearance:"none",background:"transparent",outline:"none",cursor:"pointer",margin:"0"});let R=`devbar-quality-${Date.now()}`;D.id=R;let k=document.createElement("style");return k.textContent=L7(R,n),b.appendChild(k),H7(D,g,E,A),b.appendChild(D),l.appendChild(b),l}function N7(A){let{accentColor:n}=A.options,o=gu("Evidence workflow");return vu(o,"Choose the controls and save behavior an agent sees during inspect, verify, and handoff."),o.appendChild(P7(A)),o.appendChild(si("Screenshot Button",A.options.showScreenshot,n,()=>{A.options.showScreenshot=!A.options.showScreenshot,A.settingsManager.saveSettings({showScreenshot:A.options.showScreenshot}),A.render()})),o.appendChild(si("Console Badges",A.options.showConsoleBadges,n,()=>{A.options.showConsoleBadges=!A.options.showConsoleBadges,A.settingsManager.saveSettings({showConsoleBadges:A.options.showConsoleBadges}),A.render()})),o.appendChild(si("Tooltips",A.options.showTooltips,n,()=>{A.options.showTooltips=!A.options.showTooltips,A.settingsManager.saveSettings({showTooltips:A.options.showTooltips}),A.render()})),o}function P7(A){let{accentColor:n}=A.options,o=document.createElement("div");Object.assign(o.style,{marginBottom:"10px"});let l=document.createElement("div");Object.assign(l.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),l.textContent="Save Method",o.appendChild(l);let c=document.createElement("div");Object.assign(c.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",marginBottom:"8px"}),c.textContent="Auto saves artifacts through Sweetlink when connected, otherwise downloads in-browser.",o.appendChild(c);let m=document.createElement("div");return Object.assign(m.style,{display:"flex",gap:"6px",flexWrap:"wrap"}),[{value:"auto",label:"Auto"},{value:"download",label:"Download"},{value:"local",label:"Local"}].forEach(({value:v,label:b})=>{let C=v==="local"&&!A.sweetlinkConnected,E=Gy({label:b,isActive:A.options.saveLocation===v,accentColor:n,disabled:C,disabledTitle:"Sweetlink not connected",onClick:()=>{A.options.saveLocation=v,A.settingsManager.saveSettings({saveLocation:v}),A.render()}});m.appendChild(E)}),o.appendChild(m),o}function K7(A){let{accentColor:n}=A.options,o=gu("Metrics");return vu(o,"Keep the toolbar focused by hiding metrics that are not useful now."),[{key:"breakpoint",label:"Breakpoint"},{key:"fcp",label:"FCP"},{key:"lcp",label:"LCP"},{key:"cls",label:"CLS"},{key:"inp",label:"INP"},{key:"pageSize",label:"Page Size"}].forEach(({key:c,label:m})=>{let g=A.options.showMetrics[c]??!0;o.appendChild(si(m,g,n,()=>{A.options.showMetrics[c]=!A.options.showMetrics[c],A.settingsManager.saveSettings({showMetrics:{breakpoint:A.options.showMetrics.breakpoint??!0,fcp:A.options.showMetrics.fcp??!0,lcp:A.options.showMetrics.lcp??!0,cls:A.options.showMetrics.cls??!0,inp:A.options.showMetrics.inp??!0,pageSize:A.options.showMetrics.pageSize??!0}}),A.render()}))}),o}function V7(A){let n=H.textSecondary,o=document.createElement("div");Object.assign(o.style,{padding:"10px 14px",borderTop:`1px solid ${J(n,13)}`});let l=tn({color:H.textMuted,text:"Reset to Defaults",padding:"6px 12px",fontSize:"0.625rem"});Object.assign(l.style,{width:"100%",justifyContent:"center",border:"1px solid transparent"});let c=H.textMuted;return l.onmouseenter=()=>{l.style.border=`1px solid ${c}`,l.style.backgroundColor=J(c,6)},l.onmouseleave=()=>{l.style.border="1px solid transparent",l.style.backgroundColor="transparent"},l.onclick=()=>{A.settingsManager.resetToDefaults();let m=So;A.applySettings(m)},o.appendChild(l),o}function gu(A,n=!0){let o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{padding:"10px 14px",borderBottom:n?`1px solid ${J(o,13)}`:"none"});let c=document.createElement("div");return Object.assign(c.style,{color:o,fontSize:"0.625rem",textTransform:"uppercase",letterSpacing:"0.1em",marginBottom:"8px"}),c.textContent=A,l.appendChild(c),l}function vu(A,n){let o=document.createElement("div");Object.assign(o.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",margin:"-2px 0 10px"}),o.textContent=n,A.appendChild(o)}function Gy(A){let{label:n,isActive:o,accentColor:l,disabled:c,disabledTitle:m,onClick:g}=A,v=H.textSecondary,b=document.createElement("button");return Object.assign(b.style,{padding:"6px 10px",minHeight:"28px",backgroundColor:o?J(l,13):"transparent",border:`1px solid ${o?l:"transparent"}`,borderRadius:"4px",color:o?l:v,fontFamily:ht,fontSize:"0.625rem",cursor:c?"not-allowed":"pointer",transition:"all 150ms",opacity:c?"0.5":"1"}),b.textContent=n,c?m&&(b.title=m):o||(b.onmouseenter=()=>{b.style.borderColor=`${v}`,b.style.backgroundColor=J(v,6)},b.onmouseleave=()=>{b.style.borderColor="transparent",b.style.backgroundColor="transparent"}),b.onclick=()=>{c||g()},b}function si(A,n,o,l){let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:"28px",marginBottom:"6px",gap:"12px"});let m=document.createElement("span");Object.assign(m.style,{color:H.text,fontSize:"0.6875rem"}),m.textContent=A,c.appendChild(m);let g=document.createElement("button");Object.assign(g.style,{width:"32px",height:"18px",borderRadius:"9px",border:`1px solid ${n?o:H.border}`,backgroundColor:n?o:H.bgInput,position:"relative",cursor:"pointer",transition:"all 150ms",flexShrink:"0",boxSizing:"border-box"});let v=document.createElement("span");return Object.assign(v.style,{position:"absolute",top:"2px",left:n?"14px":"2px",width:"12px",height:"12px",borderRadius:"50%",backgroundColor:n?"#fff":H.textMuted,boxShadow:"0 1px 2px rgba(0,0,0,0.2)",transition:"left 150ms, background-color 150ms"}),g.appendChild(v),g.onclick=l,c.appendChild(g),c}function G7(A,n){if(A.consoleFilter){let o=A.consoleFilter;qt(A),A.consoleFilter=o,Iy(A,n)}else A.showOutlineModal?(qt(A),A.showOutlineModal=!0,ky(A)):A.showSchemaModal?(qt(A),A.showSchemaModal=!0,Hy(A)):A.showA11yModal?(qt(A),A.showA11yModal=!0,My(A)):A.showDesignReviewConfirm?(qt(A),A.showDesignReviewConfirm=!0,Ny(A)):A.showSettingsPopover&&(qt(A),A.showSettingsPopover=!0,Vy(A))}function jy(A,n,o){if(!A.destroyed&&!(typeof document>"u")&&!gf){vf(!0),Gw(A),A.overlayElement&&(A.overlayElement.remove(),A.overlayElement=null,document.body.style.overflow=""),A.container&&A.container.remove(),A.container=document.createElement("div"),A.container.setAttribute("data-devbar","true"),A.container.setAttribute("role","toolbar"),A.container.setAttribute("aria-label","DevBar"),document.body.appendChild(A.container);try{A.collapsed?Zw(A):A.compactMode?Ty(A,o):_y(A,o)}catch(l){console.error("[GlobalDevBar] Render failed:",l)}try{G7(A,n)}catch(l){console.error("[GlobalDevBar] Overlay render failed:",l)}A.overlayElement&&(document.body.style.overflow="hidden"),vf(!1)}}function Wy(A){if(A.pendingViewerWindow){try{A.pendingViewerWindow.close()}catch{}A.pendingViewerWindow=null}}function zy(A){return`ws://localhost:${A.baseWsPort}`}function Kp(A){return A.wsUrlCandidates?.length?A.wsUrlCandidates:[zy(A)]}function q7(A,n){return typeof n=="string"?n:typeof n=="number"?`ws://localhost:${n}`:Kp(A)[0]??zy(A)}function Xy(A){try{let n=new URL(A);if(n.protocol!=="ws:"&&n.protocol!=="wss:")return null;let o=Number(n.port);return Number.isInteger(o)&&o>0?o:null}catch{return null}}function qy(A,n,o=100){let l=Kp(A),c=l.indexOf(n);if(c>=0&&c+1<l.length){setTimeout(()=>Da(A,l[c+1]),o);return}let m=Xy(n);if(m!==null){let g=m+1;if(g<A.baseWsPort+10){setTimeout(()=>Da(A,g),o);return}}setTimeout(()=>Da(A),xw)}function Da(A,n){if(A.destroyed)return;let o=q7(A,n),l=Xy(o);A.debug.ws("Connecting to WebSocket",{url:o,port:l??"same-origin",appPort:A.currentAppPort});let c=new WebSocket(o),m=!1;A.ws=c,A.wsVerified=!1,c.onopen=()=>{A.debug.ws("WebSocket socket opened, awaiting server-info"),c.send(JSON.stringify({type:"browser-client-ready"}))},c.onmessage=async g=>{try{let v=JSON.parse(g.data);if(v.type==="server-info"){let C=v.appPort;if(!(C===null||C===A.currentAppPort)){A.debug.ws("Server mismatch",{serverAppPort:C,currentAppPort:A.currentAppPort,targetUrl:o}),m=!0,c.close(),qy(A,o);return}A.wsVerified=!0,A.sweetlinkConnected=!0,A.reconnectAttempts=0,A.serverProjectDir=v.projectDir??null,A.serverGitBranch=v.gitBranch??null,A.serverAppName=v.appName??null,A.debug.ws("Server verified",{appPort:C??"any",projectDir:A.serverProjectDir,gitBranch:A.serverGitBranch}),A.settingsManager.setWebSocket(c),A.settingsManager.setConnected(!0),c.send(JSON.stringify({type:"load-settings"})),A.render();return}if(!A.wsVerified){A.debug.ws("Ignoring command before verification",{type:v.type});return}if(v.type==="hifi-screenshot"){A.capturing=!1,A.render();return}if(v.type==="record-start-response"&&v.success){A.recordingActive=!0,A.recordingSessionId=v.sessionId??null,A.recordingStartedAt=Date.now(),A.recordingTimer=setInterval(()=>A.render(),1e3),A.render();return}if(v.type==="record-stop-response"||v.type==="record-stop"){if(A.recordingActive=!1,A.recordingTimer&&clearInterval(A.recordingTimer),A.recordingTimer=null,A.recordingStartedAt=null,v.success){let E=v.viewerUrl;E&&A.pendingViewerWindow?(A.pendingViewerWindow.location.href=E,A.pendingViewerWindow=null):Wy(A),E&&(A.lastViewerPath=E)}else Wy(A);A.render();return}let b=v;A.debug.ws("Received command",{type:b.type}),await vK(A,b)}catch(v){console.error("[GlobalDevBar] Error handling command:",v)}},c.onclose=()=>{if(A.wsVerified){if(A.sweetlinkConnected=!1,A.wsVerified=!1,A.serverProjectDir=null,A.settingsManager.setConnected(!1),A.debug.ws("WebSocket disconnected"),A.render(),!A.destroyed&&A.reconnectAttempts<Xs){let g=Cw*2**A.reconnectAttempts;A.reconnectAttempts++,A.debug.ws("Scheduling reconnect",{attempt:A.reconnectAttempts,delayMs:g}),A.reconnectTimeout=setTimeout(()=>Da(A,A.baseWsPort),Math.min(g,Ew))}}else if(!A.destroyed&&!m){let g=Kp(A),v=g.indexOf(o);v>=0&&v+1<g.length&&(A.debug.ws("WebSocket closed before verification, trying next candidate"),qy(A,o))}},c.onerror=()=>{A.debug.ws("WebSocket error")}}function wu(A,n,o=ta){return(l,c)=>{li(l,A,c[n],o)}}function bu(A,n){return(o,l)=>{n&&(o[n]=!1),console.error(`[GlobalDevBar] ${A} failed:`,l.error),n&&o.render()}}var z7=wu("outline","outlinePath"),X7=wu("schema","schemaPath"),Y7=wu("consoleLogs","consoleLogsPath"),J7=wu("a11y","a11yPath"),$7=(A,n)=>{A.capturing=!1,li(A,"screenshot",n.path,ta)},Z7=bu("Outline save"),eK=bu("Schema save"),tK=bu("Console logs save","savingConsoleLogs"),rK=bu("A11y save","savingA11yAudit");async function nK(A,n){let o=n.selector&&document.querySelector(n.selector)||document.body,c=await(await oi())(o,{logging:!1,useCORS:!0,allowTaint:!0});A.send(JSON.stringify({success:!0,data:{screenshot:c.toDataURL("image/png"),width:c.width,height:c.height,selector:n.selector||"body"},timestamp:Date.now()}))}function AK(A,n,o){let l=A.consoleLogs;if(o.filter){let c=o.filter.toLowerCase();l=l.filter(m=>m.level.includes(c)||m.message.toLowerCase().includes(c))}n.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}function aK(A,n){if(n.selector){let l=Array.from(document.querySelectorAll(n.selector)).map(c=>n.property?c[n.property]??null:{tagName:c.tagName,className:c.className,id:c.id,textContent:c.textContent?.trim().slice(0,100)});A.send(JSON.stringify({success:!0,data:{count:l.length,results:l},timestamp:Date.now()}))}}function oK(A,n){if(n.code&&typeof n.code=="string"&&n.code.length<=1e4)try{let l=(0,eval)(n.code);A.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Execution failed",timestamp:Date.now()}))}}async function iK(A,n){try{let o=await Ys(n.forceRefresh),l={critical:0,serious:0,moderate:0,minor:0};for(let c of o.violations)l[c.impact]=(l[c.impact]||0)+1;A.send(JSON.stringify({success:!0,data:{result:o,summary:{totalViolations:o.violations.length,totalPasses:o.passes.length,totalIncomplete:o.incomplete.length,byImpact:l},url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Accessibility audit failed",timestamp:Date.now()}))}}function sK(A){try{let n=JA(),o=mA(n);A.send(JSON.stringify({success:!0,data:{outline:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Outline extraction failed",timestamp:Date.now()}))}}function lK(A){try{let n=$A(),o=ZA(n);A.send(JSON.stringify({success:!0,data:{schema:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Schema extraction failed",timestamp:Date.now()}))}}async function uK(A){try{let o=performance.getEntriesByType("paint").find(q=>q.name==="first-contentful-paint"),l=o?Math.round(o.startTime):null,c=q=>new Promise(ae=>{try{let Z=[],he=new PerformanceObserver(Se=>{Z.push(...Se.getEntries())});he.observe({type:q,buffered:!0}),setTimeout(()=>{he.disconnect(),ae(Z)},0)}catch{ae([])}}),[m,g,v]=await Promise.all([c("largest-contentful-paint"),c("layout-shift"),c("event")]),b=m.length>0?Math.round(m[m.length-1].startTime):null,C=null;if(g.length>0){let q=0;for(let ae of g){let Z=ae;Z.hadRecentInput||(q+=Z.value)}C=Math.round(q*1e3)/1e3}let E=null;if(v.length>0){let q=0;for(let ae of v){let Z=ae;Z.duration>q&&(q=Z.duration)}E=Math.round(q)}let D=null,R=performance.getEntriesByType("resource"),k=0;for(let q of R)k+=q.transferSize||0;k>0&&(D=k);let G={fcp:l,lcp:b,cls:C,inp:E,pageSize:D,url:window.location.href,title:document.title,timestamp:Date.now()},W=[];l!==null&&W.push(`FCP: ${l}ms`),b!==null&&W.push(`LCP: ${b}ms`),C!==null&&W.push(`CLS: ${C}`),E!==null&&W.push(`INP: ${E}ms`),D!==null&&W.push(`Page size: ${Math.round(D/1024)}KB`),A.send(JSON.stringify({success:!0,data:{vitals:G,summary:W.join(", ")||"No metrics available yet"},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Vitals collection failed",timestamp:Date.now()}))}}function cK(A){try{window.location.reload(),A.send(JSON.stringify({success:!0,timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Refresh failed",timestamp:Date.now()}))}}function dK(A,n){A.designReviewInProgress=!1,li(A,"designReview",n.reviewPath,nf)}function fK(A,n){A.designReviewInProgress=!1,A.designReviewError=n.error||"Unknown error",console.error("[GlobalDevBar] Design review failed:",n.error),A.designReviewErrorTimeout&&clearTimeout(A.designReviewErrorTimeout),A.designReviewErrorTimeout=setTimeout(()=>{A.designReviewError=null,A.render()},nf),A.render()}function pK(A,n){let o=n;A.apiKeyStatus={configured:o.configured??!1,model:o.model,pricing:o.pricing},A.render()}function hK(A,n){wK(A,n.settings)}function mK(A,n){A.debug.state("Settings saved to server",{path:n.settingsPath})}function gK(A){console.error("[GlobalDevBar] Settings operation failed:",A.error)}async function vK(A,n){let o=A.ws;if(!(!o||o.readyState!==WebSocket.OPEN))switch(n.type){case"screenshot":await nK(o,n);break;case"get-logs":AK(A,o,n);break;case"query-dom":aK(o,n);break;case"exec-js":oK(o,n);break;case"get-a11y":await iK(o,n);break;case"get-outline":sK(o);break;case"get-schema":lK(o);break;case"get-vitals":await uK(o);break;case"refresh":cK(o);break;case"screenshot-saved":$7(A,n);break;case"design-review-saved":dK(A,n);break;case"design-review-error":fK(A,n);break;case"api-key-status":pK(A,n);break;case"outline-saved":z7(A,n);break;case"outline-error":Z7(A,n);break;case"schema-saved":X7(A,n);break;case"schema-error":eK(A,n);break;case"console-logs-saved":Y7(A,n);break;case"console-logs-error":tK(A,n);break;case"a11y-saved":J7(A,n);break;case"a11y-error":rK(A,n);break;case"settings-loaded":hK(A,n);break;case"settings-saved":mK(A,n);break;case"settings-error":gK(n);break;default:break}}function li(A,n,o,l){if(o){switch(n){case"screenshot":A.lastScreenshot=o,A.screenshotTimeout&&clearTimeout(A.screenshotTimeout),A.screenshotTimeout=setTimeout(()=>{A.lastScreenshot=null,A.render()},l);break;case"designReview":A.lastDesignReview=o,A.designReviewTimeout&&clearTimeout(A.designReviewTimeout),A.designReviewTimeout=setTimeout(()=>{A.lastDesignReview=null,A.render()},l);break;case"outline":A.savingOutline=!1,A.lastOutline=o,A.outlineTimeout&&clearTimeout(A.outlineTimeout),A.outlineTimeout=setTimeout(()=>{A.lastOutline=null,A.render()},l);break;case"schema":A.savingSchema=!1,A.lastSchema=o,A.schemaTimeout&&clearTimeout(A.schemaTimeout),A.schemaTimeout=setTimeout(()=>{A.lastSchema=null,A.render()},l);break;case"consoleLogs":A.savingConsoleLogs=!1,A.lastConsoleLogs=o,A.consoleLogsTimeout&&clearTimeout(A.consoleLogsTimeout),A.consoleLogsTimeout=setTimeout(()=>{A.lastConsoleLogs=null,A.render()},l);break;case"a11y":A.savingA11yAudit=!1,A.lastA11yAudit=o,A.a11yTimeout&&clearTimeout(A.a11yTimeout),A.a11yTimeout=setTimeout(()=>{A.lastA11yAudit=null,A.render()},l);break}A.render()}}function wK(A,n){if(!n){A.debug.state("No server settings found, using local");return}A.debug.state("Settings loaded from server",n),A.settingsManager.handleSettingsLoaded(n),A.applySettings(n)}function bK(A,n){let o=[],l=m=>{m&&!o.includes(m)&&o.push(m)};l(n.wsUrl),n.wsPath&&l(yw(A,n.wsPath));let c=ea(n.wsPort)??n.fallbackPort;return l(`ws://localhost:${c}`),o}var Ar=new zs({trackCounts:!0});Ar.importEarlyLogs();Ar.start();Ar.startErrorHandlers();var yu=class A{static CONTROLS_KEY="__YTSPAR_DEVBAR_CONTROLS__";static get customControls(){return typeof window>"u"?[]:window[A.CONTROLS_KEY]??[]}static set customControls(n){typeof window<"u"&&(window[A.CONTROLS_KEY]=n)}options;forcedThemeMode;debugConfig;debug;container=null;ws=null;consoleLogs=[];sweetlinkConnected=!1;collapsed=!1;capturing=!1;copiedToClipboard=!1;copiedPath=!1;lastScreenshot=null;designReviewInProgress=!1;lastDesignReview=null;designReviewError=null;showDesignReviewConfirm=!1;apiKeyStatus=null;lastOutline=null;lastSchema=null;savingOutline=!1;savingSchema=!1;consoleFilter=null;savingConsoleLogs=!1;lastConsoleLogs=null;consoleLogsTimeout;showOutlineModal=!1;showSchemaModal=!1;showA11yModal=!1;a11yLoading=!1;lastA11yAudit=null;savingA11yAudit=!1;a11yTimeout=null;recordingActive=!1;recordingSessionId=null;recordingStartedAt=null;recordingTimer=null;lastViewerPath=null;pendingViewerWindow=null;demoActive=!1;demoTitle=null;demoSectionCount=0;rulerMode=!1;rulerOverlay=null;rulerPinnedElements=[];rulerCleanup=null;activeTooltips=new Set;breakpointInfo=null;perfStats=null;lcpValue=null;clsValue=0;inpValue=0;reconnectAttempts=0;currentAppPort;baseWsPort;wsUrlCandidates;wsVerified=!1;serverProjectDir=null;serverGitBranch=null;serverAppName=null;lastDotPosition=null;reconnectTimeout=null;screenshotTimeout=null;copiedPathTimeout=null;designReviewTimeout=null;designReviewErrorTimeout=null;outlineTimeout=null;schemaTimeout=null;resizeHandler=null;keydownHandler=null;fcpObserver=null;lcpObserver=null;clsObserver=null;inpObserver=null;destroyed=!1;themeMode="system";themeMediaQuery=null;themeMediaHandler=null;compactMode=!1;showSettingsPopover=!1;overlayElement=null;settingsManager;logChangeListener=null;constructor(n={}){if(this.debugConfig=Lw(n.debug),this.debug=new $s(this.debugConfig),this.forcedThemeMode=n.themeMode,this.settingsManager=tb(n.defaultThemeMode?{themeMode:n.defaultThemeMode}:{}),this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),typeof window<"u"){let o=bw(window),l=n.sweetlink,c=l?.appPort??Bw(window.location,o);this.currentAppPort=c,this.baseWsPort=l?.wsPort??ea(o.wsPort)??ww(c),this.wsUrlCandidates=bK(window.location,{wsUrl:l?.wsUrl??o.wsUrl,wsPort:l?.wsPort??o.wsPort,wsPath:l?.wsPath??o.wsPath,fallbackPort:this.baseWsPort})}else this.currentAppPort=0,this.baseWsPort=9223,this.wsUrlCandidates=[`ws://localhost:${9223}`];this.options={position:n.position??"bottom-left",accentColor:n.accentColor??H.primary,showMetrics:{breakpoint:n.showMetrics?.breakpoint??!0,fcp:n.showMetrics?.fcp??!0,lcp:n.showMetrics?.lcp??!0,cls:n.showMetrics?.cls??!0,inp:n.showMetrics?.inp??!0,pageSize:n.showMetrics?.pageSize??!0},showScreenshot:n.showScreenshot??!0,showConsoleBadges:n.showConsoleBadges??!0,showTooltips:n.showTooltips??!0,saveLocation:n.saveLocation??"auto",screenshotQuality:n.screenshotQuality??.65,sizeOverrides:n.sizeOverrides},this.debug.lifecycle("GlobalDevBar constructed",{options:this.options})}getLogCounts(){return{errorCount:Ar.getErrorCount(),warningCount:Ar.getWarningCount(),infoCount:Ar.getInfoCount()}}resetPositionStyles(n){Object.assign(n.style,{top:"",bottom:"",left:"",right:"",transform:""})}createCollapsedBadge(n,o,l){let c=document.createElement("span");return Object.assign(c.style,{position:"absolute",top:"-6px",right:l,minWidth:"16px",height:"16px",padding:"0 4px",borderRadius:"9999px",backgroundColor:o,color:ce.white,fontSize:"0.5625rem",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center"}),c.textContent=n>99?"!":String(n),c}static registerControl(n){A.customControls=A.customControls.filter(l=>l.id!==n.id),A.customControls.push(n);let o=Bu();o&&o.render()}static unregisterControl(n){A.customControls=A.customControls.filter(l=>l.id!==n);let o=Bu();o&&o.render()}static getControls(){return[...A.customControls]}static clearControls(){A.customControls=[];let n=Bu();n&&n.render()}init(){typeof window>"u"||this.destroyed||(this.debug.lifecycle("Initializing DevBar"),this.injectStyles(),this.consoleLogs=Ar.getLogs(),this.debug.lifecycle("Copied console logs",{count:this.consoleLogs.length}),this.logChangeListener=()=>{this.consoleLogs=Ar.getLogs(),this.overlayElement||this.render()},Ar.addListener(this.logChangeListener),Py(this),Ky(this),this.connectWebSocket(),Mw(this),Pw(this),Hw(this),this.render(),this.debug.lifecycle("DevBar initialized successfully"))}getPosition(){return this.options.position}destroy(){this.debug.lifecycle("Destroying DevBar"),this.destroyed=!0,this.reconnectAttempts=Xs,this.reconnectTimeout&&clearTimeout(this.reconnectTimeout),this.ws&&this.ws.close(),this.screenshotTimeout&&clearTimeout(this.screenshotTimeout),this.copiedPathTimeout&&clearTimeout(this.copiedPathTimeout),this.designReviewTimeout&&clearTimeout(this.designReviewTimeout),this.outlineTimeout&&clearTimeout(this.outlineTimeout),this.schemaTimeout&&clearTimeout(this.schemaTimeout),this.consoleLogsTimeout&&clearTimeout(this.consoleLogsTimeout),this.a11yTimeout&&clearTimeout(this.a11yTimeout),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.keydownHandler&&window.removeEventListener("keydown",this.keydownHandler),this.fcpObserver&&this.fcpObserver.disconnect(),this.lcpObserver&&this.lcpObserver.disconnect(),this.clsObserver&&this.clsObserver.disconnect(),this.inpObserver&&this.inpObserver.disconnect(),this.themeMediaQuery&&this.themeMediaHandler&&this.themeMediaQuery.removeEventListener("change",this.themeMediaHandler),this.logChangeListener&&(Ar.removeListener(this.logChangeListener),this.logChangeListener=null),Ar.stop(),this.container&&(this.container.remove(),this.container=null),this.overlayElement&&(this.overlayElement.remove(),this.overlayElement=null,document.body.style.overflow=""),this.debug.lifecycle("DevBar destroyed")}injectStyles(){let n="devbar-styles";if(!document.getElementById(n)){let o=document.createElement("style");o.id=n,o.textContent=Iw,document.head.appendChild(o)}}connectWebSocket(n){Da(this,n)}handleNotification(n,o,l){li(this,n,o,l)}applySettings(n){let o=this.forcedThemeMode?{...n,themeMode:this.forcedThemeMode}:n,l=this.themeMode;this.forcedThemeMode&&this.settingsManager.get("themeMode")!==this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),this.themeMode=o.themeMode,this.compactMode=Pp(o.compactMode),this.options.position=o.position,this.options.accentColor=o.accentColor,this.options.showScreenshot=o.showScreenshot,this.options.showConsoleBadges=o.showConsoleBadges,this.options.showTooltips=o.showTooltips,this.options.saveLocation=o.saveLocation,this.options.screenshotQuality=o.screenshotQuality??.65,this.options.showMetrics={...o.showMetrics},Aa(na(o.themeMode)),l!==o.themeMode&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:o.themeMode}})),this.render()}clearConsoleLogs(){Ar.clear(),this.consoleLogs=[],this.consoleFilter=null,this.render()}handleScreenshot(n){return cy(this,n)}getThemeMode(){return this.themeMode}setThemeMode(n){mu(this,n)}getColors(){return Qw(this.themeMode)}toggleCompactMode(){this.compactMode=!this.compactMode,this.settingsManager.saveSettings({compactMode:this.compactMode}),this.debug.state("Compact mode toggled",{compactMode:this.compactMode}),this.render()}isCompactMode(){return this.compactMode}render(){jy(this,Ar,A.customControls)}},$y="__YTSPAR_DEVBAR_INSTANCE__";function Bu(){return typeof window>"u"?null:window[$y]??null}function Jy(A){typeof window>"u"||(window[$y]=A)}function Cu(A){let n=Bu();if(n){let l=n.getPosition(),c=A?.position??"bottom-left";if(l===c)return n;n.destroy(),Jy(null)}let o=new yu(A);return o.init(),Jy(o),o}typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Cu()):Cu());export{Cu as initGlobalDevBar};
470
+ `)}function H7(A,n,o,l){A.oninput=()=>{let c=parseFloat(A.value);n.textContent=c.toFixed(2),o.style.width=`${c*100}%`,l.options.screenshotQuality=c},A.onchange=()=>{l.settingsManager.saveSettings({screenshotQuality:l.options.screenshotQuality})}}function M7(A){let{accentColor:n}=A.options,o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{marginTop:"8px"});let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"6px"});let m=document.createElement("span");Object.assign(m.style,{color:H.text,fontSize:"0.6875rem"}),m.textContent="Screenshot Quality",c.appendChild(m);let g=document.createElement("span");Object.assign(g.style,{color:n,fontSize:"0.6875rem",fontFamily:"monospace",minWidth:"28px",textAlign:"right"});let v=A.options.screenshotQuality;g.textContent=v.toFixed(2),c.appendChild(g),l.appendChild(c);let b=document.createElement("div");Object.assign(b.style,{position:"relative",height:"20px"});let C=document.createElement("div");Object.assign(C.style,{position:"absolute",top:"50%",left:"0",right:"0",height:"2px",transform:"translateY(-50%)",borderRadius:"1px",background:J(o,25),pointerEvents:"none"});let E=document.createElement("div");Object.assign(E.style,{height:"100%",width:`${v*100}%`,borderRadius:"1px",background:n}),C.appendChild(E),b.appendChild(C);let D=document.createElement("input");D.type="range",D.min="0",D.max="1",D.step="0.01",D.value=String(v),Object.assign(D.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",appearance:"none",WebkitAppearance:"none",background:"transparent",outline:"none",cursor:"pointer",margin:"0"});let R=`devbar-quality-${Date.now()}`;D.id=R;let k=document.createElement("style");return k.textContent=L7(R,n),b.appendChild(k),H7(D,g,E,A),b.appendChild(D),l.appendChild(b),l}function N7(A){let{accentColor:n}=A.options,o=gu("Evidence workflow");return vu(o,"Choose the controls and save behavior an agent sees during inspect, verify, and handoff."),o.appendChild(P7(A)),o.appendChild(si("Screenshot Button",A.options.showScreenshot,n,()=>{A.options.showScreenshot=!A.options.showScreenshot,A.settingsManager.saveSettings({showScreenshot:A.options.showScreenshot}),A.render()})),o.appendChild(si("Console Badges",A.options.showConsoleBadges,n,()=>{A.options.showConsoleBadges=!A.options.showConsoleBadges,A.settingsManager.saveSettings({showConsoleBadges:A.options.showConsoleBadges}),A.render()})),o.appendChild(si("Tooltips",A.options.showTooltips,n,()=>{A.options.showTooltips=!A.options.showTooltips,A.settingsManager.saveSettings({showTooltips:A.options.showTooltips}),A.render()})),o}function P7(A){let{accentColor:n}=A.options,o=document.createElement("div");Object.assign(o.style,{marginBottom:"10px"});let l=document.createElement("div");Object.assign(l.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),l.textContent="Save Method",o.appendChild(l);let c=document.createElement("div");Object.assign(c.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",marginBottom:"8px"}),c.textContent="Auto saves artifacts through Sweetlink when connected, otherwise downloads in-browser.",o.appendChild(c);let m=document.createElement("div");return Object.assign(m.style,{display:"flex",gap:"6px",flexWrap:"wrap"}),[{value:"auto",label:"Auto"},{value:"download",label:"Download"},{value:"local",label:"Local"}].forEach(({value:v,label:b})=>{let C=v==="local"&&!A.sweetlinkConnected,E=Gy({label:b,isActive:A.options.saveLocation===v,accentColor:n,disabled:C,disabledTitle:"Sweetlink not connected",onClick:()=>{A.options.saveLocation=v,A.settingsManager.saveSettings({saveLocation:v}),A.render()}});m.appendChild(E)}),o.appendChild(m),o}function K7(A){let{accentColor:n}=A.options,o=gu("Metrics");return vu(o,"Keep the toolbar focused by hiding metrics that are not useful now."),[{key:"breakpoint",label:"Breakpoint"},{key:"fcp",label:"FCP"},{key:"lcp",label:"LCP"},{key:"cls",label:"CLS"},{key:"inp",label:"INP"},{key:"pageSize",label:"Page Size"}].forEach(({key:c,label:m})=>{let g=A.options.showMetrics[c]??!0;o.appendChild(si(m,g,n,()=>{A.options.showMetrics[c]=!A.options.showMetrics[c],A.settingsManager.saveSettings({showMetrics:{breakpoint:A.options.showMetrics.breakpoint??!0,fcp:A.options.showMetrics.fcp??!0,lcp:A.options.showMetrics.lcp??!0,cls:A.options.showMetrics.cls??!0,inp:A.options.showMetrics.inp??!0,pageSize:A.options.showMetrics.pageSize??!0}}),A.render()}))}),o}function V7(A){let n=H.textSecondary,o=document.createElement("div");Object.assign(o.style,{padding:"10px 14px",borderTop:`1px solid ${J(n,13)}`});let l=tn({color:H.textMuted,text:"Reset to Defaults",padding:"6px 12px",fontSize:"0.625rem"});Object.assign(l.style,{width:"100%",justifyContent:"center",border:"1px solid transparent"});let c=H.textMuted;return l.onmouseenter=()=>{l.style.border=`1px solid ${c}`,l.style.backgroundColor=J(c,6)},l.onmouseleave=()=>{l.style.border="1px solid transparent",l.style.backgroundColor="transparent"},l.onclick=()=>{A.settingsManager.resetToDefaults();let m=So;A.applySettings(m)},o.appendChild(l),o}function gu(A,n=!0){let o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{padding:"10px 14px",borderBottom:n?`1px solid ${J(o,13)}`:"none"});let c=document.createElement("div");return Object.assign(c.style,{color:o,fontSize:"0.625rem",textTransform:"uppercase",letterSpacing:"0.1em",marginBottom:"8px"}),c.textContent=A,l.appendChild(c),l}function vu(A,n){let o=document.createElement("div");Object.assign(o.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",margin:"-2px 0 10px"}),o.textContent=n,A.appendChild(o)}function Gy(A){let{label:n,isActive:o,accentColor:l,disabled:c,disabledTitle:m,onClick:g}=A,v=H.textSecondary,b=document.createElement("button");return Object.assign(b.style,{padding:"6px 10px",minHeight:"28px",backgroundColor:o?J(l,13):"transparent",border:`1px solid ${o?l:"transparent"}`,borderRadius:"4px",color:o?l:v,fontFamily:ht,fontSize:"0.625rem",cursor:c?"not-allowed":"pointer",transition:"all 150ms",opacity:c?"0.5":"1"}),b.textContent=n,c?m&&(b.title=m):o||(b.onmouseenter=()=>{b.style.borderColor=`${v}`,b.style.backgroundColor=J(v,6)},b.onmouseleave=()=>{b.style.borderColor="transparent",b.style.backgroundColor="transparent"}),b.onclick=()=>{c||g()},b}function si(A,n,o,l){let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:"28px",marginBottom:"6px",gap:"12px"});let m=document.createElement("span");Object.assign(m.style,{color:H.text,fontSize:"0.6875rem"}),m.textContent=A,c.appendChild(m);let g=document.createElement("button");Object.assign(g.style,{width:"32px",height:"18px",borderRadius:"9px",border:`1px solid ${n?o:H.border}`,backgroundColor:n?o:H.bgInput,position:"relative",cursor:"pointer",transition:"all 150ms",flexShrink:"0",boxSizing:"border-box"});let v=document.createElement("span");return Object.assign(v.style,{position:"absolute",top:"2px",left:n?"14px":"2px",width:"12px",height:"12px",borderRadius:"50%",backgroundColor:n?"#fff":H.textMuted,boxShadow:"0 1px 2px rgba(0,0,0,0.2)",transition:"left 150ms, background-color 150ms"}),g.appendChild(v),g.onclick=l,c.appendChild(g),c}function G7(A,n){if(A.consoleFilter){let o=A.consoleFilter;qt(A),A.consoleFilter=o,Iy(A,n)}else A.showOutlineModal?(qt(A),A.showOutlineModal=!0,ky(A)):A.showSchemaModal?(qt(A),A.showSchemaModal=!0,Hy(A)):A.showA11yModal?(qt(A),A.showA11yModal=!0,My(A)):A.showDesignReviewConfirm?(qt(A),A.showDesignReviewConfirm=!0,Ny(A)):A.showSettingsPopover&&(qt(A),A.showSettingsPopover=!0,Vy(A))}function jy(A,n,o){if(!A.destroyed&&!(typeof document>"u")&&!gf){vf(!0),Gw(A),A.overlayElement&&(A.overlayElement.remove(),A.overlayElement=null,document.body.style.overflow=""),A.container&&A.container.remove(),A.container=document.createElement("div"),A.container.setAttribute("data-devbar","true"),A.container.setAttribute("role","toolbar"),A.container.setAttribute("aria-label","DevBar"),document.body.appendChild(A.container);try{A.collapsed?Zw(A):A.compactMode?Ty(A,o):_y(A,o)}catch(l){console.error("[GlobalDevBar] Render failed:",l)}try{G7(A,n)}catch(l){console.error("[GlobalDevBar] Overlay render failed:",l)}A.overlayElement&&(document.body.style.overflow="hidden"),vf(!1)}}function Wy(A){if(A.pendingViewerWindow){try{A.pendingViewerWindow.close()}catch{}A.pendingViewerWindow=null}}function zy(A){return`ws://localhost:${A.baseWsPort}`}function Kp(A){return A.wsUrlCandidates?.length?A.wsUrlCandidates:[zy(A)]}function q7(A,n){return typeof n=="string"?n:typeof n=="number"?`ws://localhost:${n}`:Kp(A)[0]??zy(A)}function Xy(A){try{let n=new URL(A);if(n.protocol!=="ws:"&&n.protocol!=="wss:")return null;let o=Number(n.port);return Number.isInteger(o)&&o>0?o:null}catch{return null}}function qy(A,n,o=100){let l=Kp(A),c=l.indexOf(n);if(c>=0&&c+1<l.length){setTimeout(()=>Da(A,l[c+1]),o);return}let m=Xy(n);if(m!==null){let g=m+1;if(g<A.baseWsPort+10){setTimeout(()=>Da(A,g),o);return}}setTimeout(()=>Da(A),xw)}function Da(A,n){if(A.destroyed)return;let o=q7(A,n),l=Xy(o);A.debug.ws("Connecting to WebSocket",{url:o,port:l??"same-origin",appPort:A.currentAppPort});let c=new WebSocket(o),m=!1;A.ws=c,A.wsVerified=!1,c.onopen=()=>{A.debug.ws("WebSocket socket opened, awaiting server-info"),c.send(JSON.stringify({type:"browser-client-ready"}))},c.onmessage=async g=>{try{let v=JSON.parse(g.data);if(v.type==="server-info"){let C=v.appPort;if(!(C===null||C===A.currentAppPort)){A.debug.ws("Server mismatch",{serverAppPort:C,currentAppPort:A.currentAppPort,targetUrl:o}),m=!0,c.close(),qy(A,o);return}A.wsVerified=!0,A.sweetlinkConnected=!0,A.reconnectAttempts=0,A.serverProjectDir=v.projectDir??null,A.serverGitBranch=v.gitBranch??null,A.serverAppName=v.appName??null,A.debug.ws("Server verified",{appPort:C??"any",projectDir:A.serverProjectDir,gitBranch:A.serverGitBranch}),A.settingsManager.setWebSocket(c),A.settingsManager.setConnected(!0),c.send(JSON.stringify({type:"load-settings"})),A.render();return}if(!A.wsVerified){A.debug.ws("Ignoring command before verification",{type:v.type});return}if(v.type==="hifi-screenshot"){A.capturing=!1,A.render();return}if(v.type==="record-start-response"&&v.success){A.recordingActive=!0,A.recordingSessionId=v.sessionId??null,A.recordingStartedAt=Date.now(),A.recordingTimer=setInterval(()=>A.render(),1e3),A.render();return}if(v.type==="record-stop-response"||v.type==="record-stop"){if(A.recordingActive=!1,A.recordingTimer&&clearInterval(A.recordingTimer),A.recordingTimer=null,A.recordingStartedAt=null,v.success){let E=v.viewerUrl;E&&A.pendingViewerWindow?(A.pendingViewerWindow.location.href=E,A.pendingViewerWindow=null):Wy(A),E&&(A.lastViewerPath=E)}else Wy(A);A.render();return}let b=v;A.debug.ws("Received command",{type:b.type}),await vK(A,b)}catch(v){console.error("[GlobalDevBar] Error handling command:",v)}},c.onclose=()=>{if(A.wsVerified){if(A.sweetlinkConnected=!1,A.wsVerified=!1,A.serverProjectDir=null,A.settingsManager.setConnected(!1),A.debug.ws("WebSocket disconnected"),A.render(),!A.destroyed&&A.reconnectAttempts<Xs){let g=Cw*2**A.reconnectAttempts;A.reconnectAttempts++,A.debug.ws("Scheduling reconnect",{attempt:A.reconnectAttempts,delayMs:g}),A.reconnectTimeout=setTimeout(()=>Da(A,A.baseWsPort),Math.min(g,Ew))}}else if(!A.destroyed&&!m){let g=Kp(A),v=g.indexOf(o);v>=0&&v+1<g.length&&(A.debug.ws("WebSocket closed before verification, trying next candidate"),qy(A,o))}},c.onerror=()=>{A.debug.ws("WebSocket error")}}function wu(A,n,o=ta){return(l,c)=>{li(l,A,c[n],o)}}function bu(A,n){return(o,l)=>{n&&(o[n]=!1),console.error(`[GlobalDevBar] ${A} failed:`,l.error),n&&o.render()}}var z7=wu("outline","outlinePath"),X7=wu("schema","schemaPath"),Y7=wu("consoleLogs","consoleLogsPath"),J7=wu("a11y","a11yPath"),$7=(A,n)=>{A.capturing=!1,li(A,"screenshot",n.path,ta)},Z7=bu("Outline save"),eK=bu("Schema save"),tK=bu("Console logs save","savingConsoleLogs"),rK=bu("A11y save","savingA11yAudit");async function nK(A,n){let o=n.selector&&document.querySelector(n.selector)||document.body,c=await(await oi())(o,{logging:!1,useCORS:!0,allowTaint:!0});A.send(JSON.stringify({success:!0,data:{screenshot:c.toDataURL("image/png"),width:c.width,height:c.height,selector:n.selector||"body"},timestamp:Date.now()}))}function AK(A,n,o){let l=A.consoleLogs;if(o.filter){let c=o.filter.toLowerCase();l=l.filter(m=>m.level.includes(c)||m.message.toLowerCase().includes(c))}n.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}function aK(A,n){if(n.selector){let l=Array.from(document.querySelectorAll(n.selector)).map(c=>n.property?c[n.property]??null:{tagName:c.tagName,className:c.className,id:c.id,textContent:c.textContent?.trim().slice(0,100)});A.send(JSON.stringify({success:!0,data:{count:l.length,results:l},timestamp:Date.now()}))}}function oK(A,n){if(n.code&&typeof n.code=="string"&&n.code.length<=1e4)try{let l=(0,eval)(n.code);A.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Execution failed",timestamp:Date.now()}))}}async function iK(A,n){try{let o=await Ys(n.forceRefresh),l={critical:0,serious:0,moderate:0,minor:0};for(let c of o.violations)l[c.impact]=(l[c.impact]||0)+1;A.send(JSON.stringify({success:!0,data:{result:o,summary:{totalViolations:o.violations.length,totalPasses:o.passes.length,totalIncomplete:o.incomplete.length,byImpact:l},url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Accessibility audit failed",timestamp:Date.now()}))}}function sK(A){try{let n=JA(),o=mA(n);A.send(JSON.stringify({success:!0,data:{outline:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Outline extraction failed",timestamp:Date.now()}))}}function lK(A){try{let n=$A(),o=ZA(n);A.send(JSON.stringify({success:!0,data:{schema:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Schema extraction failed",timestamp:Date.now()}))}}async function uK(A){try{let o=performance.getEntriesByType("paint").find(q=>q.name==="first-contentful-paint"),l=o?Math.round(o.startTime):null,c=q=>new Promise(ae=>{try{let Z=[],he=new PerformanceObserver(Se=>{Z.push(...Se.getEntries())});he.observe({type:q,buffered:!0}),setTimeout(()=>{he.disconnect(),ae(Z)},0)}catch{ae([])}}),[m,g,v]=await Promise.all([c("largest-contentful-paint"),c("layout-shift"),c("event")]),b=m.length>0?Math.round(m[m.length-1].startTime):null,C=null;if(g.length>0){let q=0;for(let ae of g){let Z=ae;Z.hadRecentInput||(q+=Z.value)}C=Math.round(q*1e3)/1e3}let E=null;if(v.length>0){let q=0;for(let ae of v){let Z=ae;Z.duration>q&&(q=Z.duration)}E=Math.round(q)}let D=null,R=performance.getEntriesByType("resource"),k=0;for(let q of R)k+=q.transferSize||0;k>0&&(D=k);let G={fcp:l,lcp:b,cls:C,inp:E,pageSize:D,url:window.location.href,title:document.title,timestamp:Date.now()},W=[];l!==null&&W.push(`FCP: ${l}ms`),b!==null&&W.push(`LCP: ${b}ms`),C!==null&&W.push(`CLS: ${C}`),E!==null&&W.push(`INP: ${E}ms`),D!==null&&W.push(`Page size: ${Math.round(D/1024)}KB`),A.send(JSON.stringify({success:!0,data:{vitals:G,summary:W.join(", ")||"No metrics available yet"},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Vitals collection failed",timestamp:Date.now()}))}}function cK(A){try{window.location.reload(),A.send(JSON.stringify({success:!0,timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Refresh failed",timestamp:Date.now()}))}}function dK(A,n){A.designReviewInProgress=!1,li(A,"designReview",n.reviewPath,nf)}function fK(A,n){A.designReviewInProgress=!1,A.designReviewError=n.error||"Unknown error",console.error("[GlobalDevBar] Design review failed:",n.error),A.designReviewErrorTimeout&&clearTimeout(A.designReviewErrorTimeout),A.designReviewErrorTimeout=setTimeout(()=>{A.designReviewError=null,A.render()},nf),A.render()}function pK(A,n){let o=n;A.apiKeyStatus={configured:o.configured??!1,model:o.model,pricing:o.pricing},A.render()}function hK(A,n){wK(A,n.settings)}function mK(A,n){A.debug.state("Settings saved to server",{path:n.settingsPath})}function gK(A){console.error("[GlobalDevBar] Settings operation failed:",A.error)}async function vK(A,n){let o=A.ws;if(!(!o||o.readyState!==WebSocket.OPEN))switch(n.type){case"screenshot":await nK(o,n);break;case"get-logs":AK(A,o,n);break;case"query-dom":aK(o,n);break;case"exec-js":oK(o,n);break;case"get-a11y":await iK(o,n);break;case"get-outline":sK(o);break;case"get-schema":lK(o);break;case"get-vitals":await uK(o);break;case"refresh":cK(o);break;case"screenshot-saved":$7(A,n);break;case"design-review-saved":dK(A,n);break;case"design-review-error":fK(A,n);break;case"api-key-status":pK(A,n);break;case"outline-saved":z7(A,n);break;case"outline-error":Z7(A,n);break;case"schema-saved":X7(A,n);break;case"schema-error":eK(A,n);break;case"console-logs-saved":Y7(A,n);break;case"console-logs-error":tK(A,n);break;case"a11y-saved":J7(A,n);break;case"a11y-error":rK(A,n);break;case"settings-loaded":hK(A,n);break;case"settings-saved":mK(A,n);break;case"settings-error":gK(n);break;default:break}}function li(A,n,o,l){if(o){switch(n){case"screenshot":A.lastScreenshot=o,A.screenshotTimeout&&clearTimeout(A.screenshotTimeout),A.screenshotTimeout=setTimeout(()=>{A.lastScreenshot=null,A.render()},l);break;case"designReview":A.lastDesignReview=o,A.designReviewTimeout&&clearTimeout(A.designReviewTimeout),A.designReviewTimeout=setTimeout(()=>{A.lastDesignReview=null,A.render()},l);break;case"outline":A.savingOutline=!1,A.lastOutline=o,A.outlineTimeout&&clearTimeout(A.outlineTimeout),A.outlineTimeout=setTimeout(()=>{A.lastOutline=null,A.render()},l);break;case"schema":A.savingSchema=!1,A.lastSchema=o,A.schemaTimeout&&clearTimeout(A.schemaTimeout),A.schemaTimeout=setTimeout(()=>{A.lastSchema=null,A.render()},l);break;case"consoleLogs":A.savingConsoleLogs=!1,A.lastConsoleLogs=o,A.consoleLogsTimeout&&clearTimeout(A.consoleLogsTimeout),A.consoleLogsTimeout=setTimeout(()=>{A.lastConsoleLogs=null,A.render()},l);break;case"a11y":A.savingA11yAudit=!1,A.lastA11yAudit=o,A.a11yTimeout&&clearTimeout(A.a11yTimeout),A.a11yTimeout=setTimeout(()=>{A.lastA11yAudit=null,A.render()},l);break}A.render()}}function wK(A,n){if(!n){A.debug.state("No server settings found, using local");return}A.debug.state("Settings loaded from server",n),A.settingsManager.handleSettingsLoaded(n),A.applySettings(n)}function bK(A,n){let o=[],l=m=>{m&&!o.includes(m)&&o.push(m)};l(n.wsUrl),n.wsPath&&l(yw(A,n.wsPath));let c=ea(n.wsPort)??n.fallbackPort;return l(`ws://localhost:${c}`),o}var Ar=new zs({trackCounts:!0});Ar.importEarlyLogs();Ar.start();Ar.startErrorHandlers();var yu=class A{static CONTROLS_KEY="__YTSPAR_DEVBAR_CONTROLS__";static get customControls(){return typeof window>"u"?[]:window[A.CONTROLS_KEY]??[]}static set customControls(n){typeof window<"u"&&(window[A.CONTROLS_KEY]=n)}options;forcedThemeMode;debugConfig;debug;container=null;ws=null;consoleLogs=[];sweetlinkConnected=!1;sweetlinkAutoConnect=!0;collapsed=!1;capturing=!1;copiedToClipboard=!1;copiedPath=!1;lastScreenshot=null;designReviewInProgress=!1;lastDesignReview=null;designReviewError=null;showDesignReviewConfirm=!1;apiKeyStatus=null;lastOutline=null;lastSchema=null;savingOutline=!1;savingSchema=!1;consoleFilter=null;savingConsoleLogs=!1;lastConsoleLogs=null;consoleLogsTimeout;showOutlineModal=!1;showSchemaModal=!1;showA11yModal=!1;a11yLoading=!1;lastA11yAudit=null;savingA11yAudit=!1;a11yTimeout=null;recordingActive=!1;recordingSessionId=null;recordingStartedAt=null;recordingTimer=null;lastViewerPath=null;pendingViewerWindow=null;demoActive=!1;demoTitle=null;demoSectionCount=0;rulerMode=!1;rulerOverlay=null;rulerPinnedElements=[];rulerCleanup=null;activeTooltips=new Set;breakpointInfo=null;perfStats=null;lcpValue=null;clsValue=0;inpValue=0;reconnectAttempts=0;currentAppPort;baseWsPort;wsUrlCandidates;wsVerified=!1;serverProjectDir=null;serverGitBranch=null;serverAppName=null;lastDotPosition=null;reconnectTimeout=null;screenshotTimeout=null;copiedPathTimeout=null;designReviewTimeout=null;designReviewErrorTimeout=null;outlineTimeout=null;schemaTimeout=null;resizeHandler=null;keydownHandler=null;fcpObserver=null;lcpObserver=null;clsObserver=null;inpObserver=null;destroyed=!1;themeMode="system";themeMediaQuery=null;themeMediaHandler=null;compactMode=!1;showSettingsPopover=!1;overlayElement=null;settingsManager;logChangeListener=null;constructor(n={}){if(this.debugConfig=Lw(n.debug),this.debug=new $s(this.debugConfig),this.forcedThemeMode=n.themeMode,this.settingsManager=tb(n.defaultThemeMode?{themeMode:n.defaultThemeMode}:{}),this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),typeof window<"u"){let o=bw(window),l=n.sweetlink,c=l?.appPort??Bw(window.location,o);this.currentAppPort=c,this.baseWsPort=l?.wsPort??ea(o.wsPort)??ww(c),this.wsUrlCandidates=bK(window.location,{wsUrl:l?.wsUrl??o.wsUrl,wsPort:l?.wsPort??o.wsPort,wsPath:l?.wsPath??o.wsPath,fallbackPort:this.baseWsPort}),this.sweetlinkAutoConnect=l?.autoConnect??!0}else this.currentAppPort=0,this.baseWsPort=9223,this.wsUrlCandidates=[`ws://localhost:${9223}`];this.options={position:n.position??"bottom-left",accentColor:n.accentColor??H.primary,showMetrics:{breakpoint:n.showMetrics?.breakpoint??!0,fcp:n.showMetrics?.fcp??!0,lcp:n.showMetrics?.lcp??!0,cls:n.showMetrics?.cls??!0,inp:n.showMetrics?.inp??!0,pageSize:n.showMetrics?.pageSize??!0},showScreenshot:n.showScreenshot??!0,showConsoleBadges:n.showConsoleBadges??!0,showTooltips:n.showTooltips??!0,saveLocation:n.saveLocation??"auto",screenshotQuality:n.screenshotQuality??.65,sizeOverrides:n.sizeOverrides},this.debug.lifecycle("GlobalDevBar constructed",{options:this.options})}getLogCounts(){return{errorCount:Ar.getErrorCount(),warningCount:Ar.getWarningCount(),infoCount:Ar.getInfoCount()}}resetPositionStyles(n){Object.assign(n.style,{top:"",bottom:"",left:"",right:"",transform:""})}createCollapsedBadge(n,o,l){let c=document.createElement("span");return Object.assign(c.style,{position:"absolute",top:"-6px",right:l,minWidth:"16px",height:"16px",padding:"0 4px",borderRadius:"9999px",backgroundColor:o,color:ce.white,fontSize:"0.5625rem",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center"}),c.textContent=n>99?"!":String(n),c}static registerControl(n){A.customControls=A.customControls.filter(l=>l.id!==n.id),A.customControls.push(n);let o=Bu();o&&o.render()}static unregisterControl(n){A.customControls=A.customControls.filter(l=>l.id!==n);let o=Bu();o&&o.render()}static getControls(){return[...A.customControls]}static clearControls(){A.customControls=[];let n=Bu();n&&n.render()}init(){typeof window>"u"||this.destroyed||(this.debug.lifecycle("Initializing DevBar"),this.injectStyles(),this.consoleLogs=Ar.getLogs(),this.debug.lifecycle("Copied console logs",{count:this.consoleLogs.length}),this.logChangeListener=()=>{this.consoleLogs=Ar.getLogs(),this.overlayElement||this.render()},Ar.addListener(this.logChangeListener),Py(this),Ky(this),this.sweetlinkAutoConnect?this.connectWebSocket():this.debug.ws("Sweetlink autoConnect disabled; skipping initial WebSocket connect"),Mw(this),Pw(this),Hw(this),this.render(),this.debug.lifecycle("DevBar initialized successfully"))}getPosition(){return this.options.position}destroy(){this.debug.lifecycle("Destroying DevBar"),this.destroyed=!0,this.reconnectAttempts=Xs,this.reconnectTimeout&&clearTimeout(this.reconnectTimeout),this.ws&&this.ws.close(),this.screenshotTimeout&&clearTimeout(this.screenshotTimeout),this.copiedPathTimeout&&clearTimeout(this.copiedPathTimeout),this.designReviewTimeout&&clearTimeout(this.designReviewTimeout),this.outlineTimeout&&clearTimeout(this.outlineTimeout),this.schemaTimeout&&clearTimeout(this.schemaTimeout),this.consoleLogsTimeout&&clearTimeout(this.consoleLogsTimeout),this.a11yTimeout&&clearTimeout(this.a11yTimeout),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.keydownHandler&&window.removeEventListener("keydown",this.keydownHandler),this.fcpObserver&&this.fcpObserver.disconnect(),this.lcpObserver&&this.lcpObserver.disconnect(),this.clsObserver&&this.clsObserver.disconnect(),this.inpObserver&&this.inpObserver.disconnect(),this.themeMediaQuery&&this.themeMediaHandler&&this.themeMediaQuery.removeEventListener("change",this.themeMediaHandler),this.logChangeListener&&(Ar.removeListener(this.logChangeListener),this.logChangeListener=null),Ar.stop(),this.container&&(this.container.remove(),this.container=null),this.overlayElement&&(this.overlayElement.remove(),this.overlayElement=null,document.body.style.overflow=""),this.debug.lifecycle("DevBar destroyed")}injectStyles(){let n="devbar-styles";if(!document.getElementById(n)){let o=document.createElement("style");o.id=n,o.textContent=Iw,document.head.appendChild(o)}}connectWebSocket(n){Da(this,n)}handleNotification(n,o,l){li(this,n,o,l)}applySettings(n){let o=this.forcedThemeMode?{...n,themeMode:this.forcedThemeMode}:n,l=this.themeMode;this.forcedThemeMode&&this.settingsManager.get("themeMode")!==this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),this.themeMode=o.themeMode,this.compactMode=Pp(o.compactMode),this.options.position=o.position,this.options.accentColor=o.accentColor,this.options.showScreenshot=o.showScreenshot,this.options.showConsoleBadges=o.showConsoleBadges,this.options.showTooltips=o.showTooltips,this.options.saveLocation=o.saveLocation,this.options.screenshotQuality=o.screenshotQuality??.65,this.options.showMetrics={...o.showMetrics},Aa(na(o.themeMode)),l!==o.themeMode&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:o.themeMode}})),this.render()}clearConsoleLogs(){Ar.clear(),this.consoleLogs=[],this.consoleFilter=null,this.render()}handleScreenshot(n){return cy(this,n)}getThemeMode(){return this.themeMode}setThemeMode(n){mu(this,n)}getColors(){return Qw(this.themeMode)}toggleCompactMode(){this.compactMode=!this.compactMode,this.settingsManager.saveSettings({compactMode:this.compactMode}),this.debug.state("Compact mode toggled",{compactMode:this.compactMode}),this.render()}isCompactMode(){return this.compactMode}render(){jy(this,Ar,A.customControls)}},$y="__YTSPAR_DEVBAR_INSTANCE__";function Bu(){return typeof window>"u"?null:window[$y]??null}function Jy(A){typeof window>"u"||(window[$y]=A)}function Cu(A){let n=Bu();if(n){let l=n.getPosition(),c=A?.position??"bottom-left";if(l===c)return n;n.destroy(),Jy(null)}let o=new yu(A);return o.init(),Jy(o),o}typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Cu()):Cu());export{Cu as initGlobalDevBar};
@@ -537,5 +537,5 @@ ${v}
537
537
  `),l.ownerDocument.head.appendChild(c)}}}function B7(A,n){let o=window.innerWidth*n,l=window.innerHeight*n,c=window.scrollX*n,h=window.scrollY*n;if(A.width<=o&&A.height<=l)return A;let g=document.createElement("canvas");g.width=o,g.height=l;let v=g.getContext("2d");return v?(v.drawImage(A,c,h,o,l,0,0,o,l),g):A}async function BB(A,n){try{await navigator.clipboard.writeText(n),A.copiedPath=!0,A.copiedPathTimeout&&clearTimeout(A.copiedPathTimeout),A.copiedPathTimeout=setTimeout(()=>{A.copiedPath=!1,A.render()},ff),A.render()}catch(o){console.error("[GlobalDevBar] Failed to copy path:",o)}}async function CB(A,n=!1){if(A.capturing)return;let o=Nn(A.options.saveLocation,A.sweetlinkConnected);if(!n&&o==="local"&&!A.sweetlinkConnected)return;let l=null;try{A.capturing=!0,A.render(),l=pi(),await hi(hf);let h=await(await LA())(document.body,yB(mf,n));l(),l=null;let g=n?B7(h,mf):h;if(n)try{await Bu(g),A.copiedToClipboard=!0,A.render(),A.screenshotTimeout&&clearTimeout(A.screenshotTimeout),A.screenshotTimeout=setTimeout(()=>{A.copiedToClipboard=!1,A.render()},ff)}catch(v){console.error("[GlobalDevBar] Failed to copy to clipboard:",v)}else{let v=fi(g,{format:"jpeg",quality:A.options.screenshotQuality});if(o==="local"&&A.ws?.readyState===WebSocket.OPEN){let b={};A.lcpValue!==null&&(b.lcp=Math.round(A.lcpValue)),A.clsValue>0&&(b.cls=A.clsValue),A.inpValue>0&&(b.inp=Math.round(A.inpValue));let C=performance.getEntriesByType("paint").find(R=>R.name==="first-contentful-paint");C&&(b.fcp=Math.round(C.startTime));let E=0,F=performance.getEntriesByType("navigation")[0];F&&(E+=F.transferSize||0),performance.getEntriesByType("resource").forEach(R=>{E+=R.transferSize||0}),A.ws.send(JSON.stringify({type:"save-screenshot",data:{screenshot:v,width:g.width,height:g.height,logs:A.consoleLogs,url:window.location.href,timestamp:Date.now(),webVitals:Object.keys(b).length>0?b:void 0,pageSize:E>0?E:void 0}}))}else{let b=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);bB(`devbar-screenshot-${b}.jpg`,v),A.handleNotification("screenshot","screenshot downloaded",la)}}}catch(c){console.error("[GlobalDevBar] Screenshot failed:",c),l&&l()}finally{A.capturing=!1,A.render()}}async function C7(A){if(A.designReviewInProgress||!A.sweetlinkConnected)return;let n=null;try{A.designReviewInProgress=!0,A.designReviewError=null,A.designReviewErrorTimeout&&(clearTimeout(A.designReviewErrorTimeout),A.designReviewErrorTimeout=null),A.render(),n=pi(),await hi(hf);let l=await(await LA())(document.body,yB(1,!1));n(),n=null;let c=fi(l,{format:"png"});A.ws?.readyState===WebSocket.OPEN&&A.ws.send(JSON.stringify({type:"design-review-screenshot",data:{screenshot:c,width:l.width,height:l.height,logs:A.consoleLogs,url:window.location.href,timestamp:Date.now()}}))}catch(o){console.error("[GlobalDevBar] Design review failed:",o),n&&n(),A.designReviewInProgress=!1,A.render()}}function EB(A){A.sweetlinkConnected&&(A.ws?.readyState===WebSocket.OPEN&&A.ws.send(JSON.stringify({type:"check-api-key"})),qt(A),A.showDesignReviewConfirm=!0,A.render())}function xB(A){if(!A.apiKeyStatus?.pricing)return null;let n=window.innerWidth,o=window.innerHeight,l=Math.ceil(n*o/750),c=500,h=1500,g=l+c,{input:v,output:b}=A.apiKeyStatus.pricing,C=g/1e6*v,E=h/1e6*b,F=C+E;return{tokens:g+h,cost:F<.01?"<$0.01":`~$${F.toFixed(2)}`}}function FB(A){A.showDesignReviewConfirm=!1,A.apiKeyStatus=null,A.render()}function DB(A){A.showDesignReviewConfirm=!1,C7(A)}function zp(A,n){let o=A[n];qt(A),A[n]=!o,A.render()}function QB(A){zp(A,"showOutlineModal")}function SB(A){zp(A,"showSchemaModal")}function UB(A){zp(A,"showA11yModal")}function TB(A,n){if(A.savingA11yAudit)return;let o=ul(n);Cu(A,{type:"save-a11y",data:{markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingA11yAudit",downloadFilename:"a11y-audit",downloadContent:o,downloadMimeType:"text/markdown",notificationKey:"a11y",notificationMessage:"a11y report downloaded"})}function IB(A){if(A.savingOutline)return;let n=wA(),o=Mn(n);Cu(A,{type:"save-outline",data:{outline:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingOutline",downloadFilename:"outline",downloadContent:o,downloadMimeType:"text/markdown",notificationKey:"outline",notificationMessage:"outline downloaded"})}function Xp(A){return A.length===0?"_No logs_":A.map(n=>`- **[${new Date(n.timestamp).toLocaleTimeString()}]** \`${n.level}\` ${n.message}`).join(`
538
538
  `)}function _B(A,n){if(A.savingConsoleLogs)return;let o=Xp(n);Cu(A,{type:"save-console-logs",data:{logs:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingConsoleLogs",downloadFilename:"console-logs",downloadContent:o,downloadMimeType:"text/markdown",notificationKey:"consoleLogs",notificationMessage:"console logs downloaded"})}function RB(A){if(A.savingSchema)return;let n=bA(),o=rl(n),l=tl(),c=yA(n,{missingTags:o,favicons:l});Cu(A,{type:"save-schema",data:{schema:n,markdown:c,url:window.location.href,title:document.title,timestamp:Date.now()},savingFlag:"savingSchema",downloadFilename:"schema",downloadContent:c,downloadMimeType:"text/markdown",notificationKey:"schema",notificationMessage:"schema downloaded"})}function mi(A,n,o){if(Df(o)){A.addSuccess(`${n} simulated`,o),A.addWarning(lb());return}let l=o.endsWith("downloaded");A.addSuccess(l?`${n} downloaded!`:`${n} saved!`,l?void 0:o)}function eA(A,n,o,l){let h={error:"error",warn:"warning",info:"info"}[n],g=A.consoleFilter===n,v=document.createElement("span");return v.className="devbar-badge",Object.assign(v.style,{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"18px",height:"18px",padding:"0 5px",borderRadius:"9999px",backgroundColor:l,color:"#fff",fontSize:"0.625rem",fontWeight:"600",cursor:"pointer",boxShadow:g?`0 0 8px ${J(l,80)}`:"none"}),v.textContent=o>99?"99+":String(o),Er(A,v,()=>`${o} console ${h}${o===1?"":"s"} (click to view)`),v.onclick=()=>{let b=A.consoleFilter===n?null:n;qt(A),A.consoleFilter=b,A.render()},v}function Eu(A,n){let o=document.createElement("button");o.type="button",o.setAttribute("aria-label","Screenshot");let l=A.copiedToClipboard||A.copiedPath||A.lastScreenshot,c=A.capturing,h=Nn(A.options.saveLocation,A.sweetlinkConnected),g=h==="local"&&!A.sweetlinkConnected&&!l;return en(A,o,n,(v,b)=>{if(A.copiedToClipboard){b.addSuccess("Copied to clipboard!");return}if(A.copiedPath){b.addSuccess("Path copied to clipboard!");return}if(A.lastScreenshot){let C=A.lastScreenshot;if(Df(C)){mi(b,"Screenshot",C);return}if(C.endsWith("downloaded"))b.addSuccess("Screenshot downloaded!");else{b.addSuccess("Screenshot saved!",C);let F=document.createElement("div");Object.assign(F.style,{color:n,cursor:"pointer",fontSize:"0.625rem",marginTop:"6px",opacity:"0.8",transition:"opacity 150ms"}),F.textContent="copy path",F.onmouseenter=()=>{F.style.opacity="1"},F.onmouseleave=()=>{F.style.opacity="0.8"},F.onclick=async R=>{R.stopPropagation();try{await navigator.clipboard.writeText(C),F.textContent="\u2713 copied!",F.style.cursor="default",F.onclick=null}catch{F.textContent="\xD7 failed to copy",F.style.color=H.error}},v.appendChild(F)}return}if(b.addTitle("Screenshot"),b.addSectionHeader("Actions"),h==="local"&&!A.sweetlinkConnected)b.addShortcut("Shift+Click","Copy to clipboard"),b.addWarning("Sweetlink not connected. Switch save method to Auto or Download.");else{let C=h==="local"?"Save to file":"Download";b.addShortcut("Click",C),b.addShortcut("Shift+Click","Copy to clipboard"),b.addShortcut("Alt+Click","HiFi screenshot (pixel-perfect via daemon)"),b.addSectionHeader("Keyboard"),b.addShortcut("Cmd or Ctrl+Shift+S",C),b.addShortcut("Cmd or Ctrl+Shift+C","Copy")}}),Object.assign(o.style,{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",minWidth:"24px",minHeight:"24px",flexShrink:"0",borderRadius:"50%",border:"1px solid",borderColor:l?n:J(n,50),backgroundColor:l?J(n,20):"transparent",color:l?n:J(n,60),cursor:c?"not-allowed":"pointer",opacity:g?"0.4":"1",transition:"all 150ms"}),o.disabled=c,o.onclick=v=>{if(v.altKey){if(!A.ws||!A.sweetlinkConnected)return;A.ws.send(JSON.stringify({type:"hifi-screenshot"})),A.capturing=!0,A.render();return}A.lastScreenshot&&!v.shiftKey?BB(A,A.lastScreenshot):A.handleScreenshot(v.shiftKey)},A.copiedToClipboard||A.copiedPath||A.lastScreenshot?(o.textContent="\u2713",o.style.fontSize="0.6rem"):A.capturing?(o.textContent="...",o.style.fontSize="0.5rem"):o.appendChild(Pr("M19.844 7.938H7.938v11.905m0 11.113v11.906h11.905m23.019-11.906v11.906H30.956m11.906-23.018V7.938H30.956",{viewBox:"0 0 50.8 50.8",stroke:!0,strokeWidth:"4",children:[{type:"circle",cx:"25.4",cy:"25.4",r:"8.731"}]})),o}function OB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","AI Design Review");let o=!!A.designReviewError,l=A.designReviewInProgress||!!A.lastDesignReview||o,c=A.designReviewInProgress||!A.sweetlinkConnected,h=o?H.error:Me.review;return en(A,n,h,(g,v)=>{if(A.designReviewInProgress){v.addProgress("AI Design Review in progress...");return}if(A.designReviewError){v.addError("Design review failed",A.designReviewError);return}if(A.lastDesignReview){mi(v,"Design review",A.lastDesignReview);return}v.addTitle("AI Design Review"),v.addDescription("Captures screenshot and sends to Claude for design analysis."),v.addSectionHeader("Requirements"),v.addShortcut("API Key","ANTHROPIC_API_KEY"),tn()&&v.addWarning("Demo mode: no Claude request will be sent."),A.sweetlinkConnected||v.addWarning("Sweetlink not connected")}),Object.assign(n.style,Nr(h,l,c)),A.sweetlinkConnected||(n.style.opacity="0.5"),n.disabled=c,n.onclick=()=>EB(A),A.designReviewInProgress?(n.textContent="~",n.style.fontSize="0.5rem",n.style.animation="pulse 1s infinite"):A.designReviewError?(n.textContent="\xD7",n.style.fontSize="0.875rem",n.style.fontWeight="bold"):A.lastDesignReview?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Pr("M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z",{fill:!0})),n}function kB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Document Outline");let o=A.showOutlineModal||!!A.lastOutline;return en(A,n,Me.outline,(l,c)=>{if(A.lastOutline){mi(c,"Outline",A.lastOutline);return}c.addTitle("Document Outline"),c.addDescription("View page heading structure and save as markdown."),tn()&&c.addWarning("Demo mode: save actions return example paths only."),A.options.saveLocation==="local"&&!A.sweetlinkConnected&&c.addWarning("Sweetlink not connected. Switch save method to Auto or Download.")}),Object.assign(n.style,Nr(Me.outline,o,!1)),n.onclick=()=>QB(A),A.lastOutline?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Pr("M3 4h18v2H3V4zm0 7h12v2H3v-2zm0 7h18v2H3v-2z",{fill:!0})),n}function LB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Page Schema");let o=A.showSchemaModal||!!A.lastSchema;return en(A,n,Me.schema,(l,c)=>{if(A.lastSchema){mi(c,"Schema",A.lastSchema);return}c.addTitle("Page Schema"),c.addDescription("View JSON-LD, Open Graph, and other structured data."),tn()&&c.addWarning("Demo mode: save actions return example paths only."),A.options.saveLocation==="local"&&!A.sweetlinkConnected&&c.addWarning("Sweetlink not connected. Switch save method to Auto or Download.")}),Object.assign(n.style,Nr(Me.schema,o,!1)),n.onclick=()=>SB(A),A.lastSchema?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Pr("M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z",{fill:!0})),n}function HB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Accessibility Audit");let o=A.showA11yModal||!!A.lastA11yAudit;return en(A,n,Me.a11y,(l,c)=>{if(A.lastA11yAudit){mi(c,"A11y report",A.lastA11yAudit);return}c.addTitle("Accessibility Audit"),c.addDescription("Run axe-core audit to check WCAG compliance."),tn()&&c.addWarning("Demo mode: save actions return example paths only."),A.options.saveLocation==="local"&&!A.sweetlinkConnected&&c.addWarning("Sweetlink not connected. Switch save method to Auto or Download.")}),n.addEventListener("mouseenter",()=>Cf(),{once:!0}),Object.assign(n.style,Nr(Me.a11y,o,!1)),n.onclick=()=>UB(A),A.lastA11yAudit?(n.textContent="v",n.style.fontSize="0.5rem"):n.appendChild(Pr("M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z",{fill:!0})),n}function MB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Ruler");let o=A.rulerMode;return en(A,n,Me.ruler,(l,c)=>{o?(c.addTitle("Ruler Mode Active"),c.addDescription("Click elements to pin measurements. Press Esc or click here to exit.")):(c.addTitle("Ruler"),c.addDescription("Measure element dimensions and positions on page."))}),Object.assign(n.style,Nr(Me.ruler,o,!1)),n.onclick=()=>{A.rulerMode?(A.rulerMode=!1,A.rulerCleanup&&(A.rulerCleanup(),A.rulerCleanup=null)):(qt(A),A.rulerMode=!0,A.rulerCleanup=gb(A)),A.render()},o?(n.textContent="\u2716",n.style.fontSize="0.5rem"):n.appendChild(Pr("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.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0zM14.5 12.5l2-2M11.5 9.5l2-2M8.5 6.5l2-2M17.5 15.5l2-2",{stroke:!0,strokeWidth:"2"})),n}function NB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label",A.recordingActive?"Stop Recording":"Start Recording");let o=A.recordingActive;if(en(A,n,Me.error,(l,c)=>{if(o){let h=A.recordingStartedAt?((Date.now()-A.recordingStartedAt)/1e3).toFixed(0):"0";c.addTitle(`Recording: ${h}s`),c.addShortcut("Click","Stop recording & open viewer")}else A.lastViewerPath?(tn()?(c.addSuccess("Demo recording simulated",A.lastViewerPath),c.addWarning("Demo only: no recording file was written.")):c.addSuccess("Last session recorded"),c.addShortcut("Click","Start new recording"),c.addShortcut("Shift+Click","Open last viewer")):(c.addTitle("Session Recording"),c.addShortcut("Click","Start recording (video + actions)"),tn()&&c.addWarning("Demo mode: no video or action manifest will be recorded."))}),Object.assign(n.style,{...Nr(ue.red,o,!1),borderColor:o?ue.red:J(ue.red,50),backgroundColor:o?J(ue.red,20):"transparent",color:o?ue.red:J(ue.red,60),...o&&{animation:"devbar-pulse 1.5s ease-in-out infinite"}}),n.onclick=l=>{if(l.shiftKey&&A.lastViewerPath&&!o){window.open(A.lastViewerPath,"_blank");return}if(!(!A.ws||!A.sweetlinkConnected))if(o){let c=window.open("about:blank","_blank");A.pendingViewerWindow=c,A.ws.send(JSON.stringify({type:"record-stop"})),A.recordingTimer&&clearInterval(A.recordingTimer),A.recordingActive=!1,A.recordingTimer=null,A.recordingStartedAt=null,A.render()}else A.ws.send(JSON.stringify({type:"record-start"})),A.recordingActive=!0,A.recordingStartedAt=Date.now(),A.recordingSessionId=null,A.recordingTimer=setInterval(()=>A.render(),1e3),A.render()},o){let l=document.createElement("span");Object.assign(l.style,{display:"block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:ue.red}),n.appendChild(l)}else{let l=document.createElement("span");Object.assign(l.style,{display:"block",width:"8px",height:"8px",borderRadius:"50%",border:"2px solid currentColor"}),n.appendChild(l)}return n}function PB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label",A.demoActive?"Demo in progress":"Start Demo");let o=A.demoActive;return en(A,n,Me.info,(l,c)=>{o?(c.addTitle(`Demo: "${A.demoTitle??"Untitled"}"`),c.addShortcut(`${A.demoSectionCount} sections`,""),c.addShortcut("Click","Add screenshot to demo")):(c.addTitle("Demo Document"),c.addShortcut("Click","Start demo (prompts for title)"),tn()&&c.addWarning("Demo mode: no markdown document will be written."))}),Object.assign(n.style,{...Nr(Me.info,o,!1)}),n.onclick=()=>{if(!(!A.ws||!A.sweetlinkConnected))if(o)A.ws.send(JSON.stringify({type:"demo-screenshot"})),A.demoSectionCount++,A.render();else{let l=prompt("Demo title:");if(!l)return;A.ws.send(JSON.stringify({type:"demo-init",data:{title:l}})),A.demoActive=!0,A.demoTitle=l,A.demoSectionCount=0,A.render()}},o?(n.textContent=String(A.demoSectionCount),n.style.fontSize="0.6rem"):n.appendChild(Pr("M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",{stroke:!0,strokeWidth:"2"})),n}function xu(A){let n=document.createElement("button");n.type="button",n.setAttribute("data-testid","devbar-settings-button"),n.setAttribute("aria-label","Settings"),en(A,n,H.textSecondary,(c,h)=>{h.addTitle("Settings"),h.addSectionHeader("Keyboard"),h.addShortcut("Cmd or Ctrl+Shift+M","Toggle compact mode")});let o=A.showSettingsPopover,l=H.textSecondary;return Object.assign(n.style,Nr(l,o,!1)),n.onclick=()=>{let c=A.showSettingsPopover;qt(A),A.showSettingsPopover=!c,A.render()},n.appendChild(Pr("M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",{stroke:!0,children:[{type:"circle",cx:"12",cy:"12",r:"3"}]})),n}function KB(A){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label",A.compactMode?"Switch to expanded mode":"Switch to compact mode");let o=A.compactMode,{accentColor:l}=A.options,c=H.textSecondary;Object.assign(n.style,Nr(c,!1,!1)),n.style.borderColor=J(l,38),Er(A,n,()=>o?"Expand (Cmd or Ctrl+Shift+M)":"Compact (Cmd or Ctrl+Shift+M)",{onEnter:()=>{n.style.borderColor=l,n.style.backgroundColor=J(l,13),n.style.color=c},onLeave:()=>{n.style.borderColor=J(l,38),n.style.backgroundColor="transparent",n.style.color=J(c,60)}}),n.onclick=()=>{A.toggleCompactMode()};let h=o?"9 18 15 12 9 6":"15 18 9 12 15 6";return n.appendChild(Pr("",{stroke:!0,children:[{type:"polyline",points:h}]})),n}function VB(A,n=[]){if(!A.container)return;let{position:o,accentColor:l}=A.options,{errorCount:c,warningCount:h,infoCount:g}=A.getLogCounts(),v=fa[o]??fa["bottom-left"],b=A.container;n.length>0?b.dataset.devbarCustomControls="true":delete b.dataset.devbarCustomControls,A.resetPositionStyles(b),Object.assign(b.style,{position:"fixed",...v,zIndex:"9999",backgroundColor:"var(--devbar-color-bg-card)",border:`1px solid ${l}`,borderRadius:"20px",color:l,boxShadow:`${mt.shadows.dropToolbar}, 0 0 0 1px ${J(l,10)}`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",padding:"6px 10px",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"8px",boxSizing:"border-box",maxWidth:o==="bottom-center"?"calc(100vw - 32px)":"calc(100vw - 96px)",minWidth:"0",fontFamily:ut,fontSize:"0.6875rem"});let C=dl(A),E=C.querySelector(".devbar-conn-dot");if(Er(A,C,()=>da(A.sweetlinkConnected)),C.onclick=R=>{R.stopPropagation(),Oo(A,E),A.collapsed=!0,A.debug.state("Collapsed DevBar from compact mode"),A.render()},b.appendChild(C),c>0&&b.appendChild(eA(A,"error",c,Me.error)),h>0&&b.appendChild(eA(A,"warn",h,Me.warning)),g>0&&b.appendChild(eA(A,"info",g,Me.info)),A.options.showScreenshot&&b.appendChild(Eu(A,l)),b.appendChild(xu(A)),n.length>0)for(let R of n)b.appendChild(ko(R,l,A));let F=document.createElement("button");F.type="button",Object.assign(F.style,{display:"flex",alignItems:"center",justifyContent:"center",width:"18px",height:"18px",borderRadius:"50%",border:`1px solid ${J(l,38)}`,backgroundColor:"transparent",color:J(l,60),cursor:"pointer",fontSize:"0.5rem",transition:"all 150ms"}),F.textContent="\u27EB",Er(A,F,()=>"Expand DevBar",{onEnter:()=>{F.style.backgroundColor=J(l,13),F.style.borderColor=l,F.style.color=l},onLeave:()=>{F.style.backgroundColor="transparent",F.style.borderColor=J(l,38),F.style.color=J(l,60)}}),F.onclick=()=>{A.toggleCompactMode()},b.appendChild(F)}function Ia(A,n,o={}){let l=typeof window<"u"?window.location.href:"unknown",c=typeof window<"u"?`${window.innerWidth}x${window.innerHeight} @${window.devicePixelRatio||1}x`:"unknown",h=A.lastScreenshot??"not captured yet",g=o.artifactPath??"not saved yet",v=`Run pnpm sweetlink inspect --url ${l} before acting to refresh @e refs.`,b=[`# ${n}`,`- URL: ${l}`,`- Viewport: ${c}`,`- Screenshot: ${h}`,`- Artifact: ${g}`,`- Refs: ${v}`];return o.observation&&b.push(`- Observation: ${o.observation}`),{title:"Agent Context",items:[{label:"URL",value:l},{label:"Viewport",value:c},{label:"Screenshot",value:h},{label:"Artifact",value:g},{label:"Refs",value:v}],copyText:b.join(`
539
539
  `)}}function GB(A,n){let o=A.consoleFilter;if(!o)return;let l=n.getLogs().filter(k=>k.level===o),h={error:Me.error,warn:Me.warning,info:Me.info}[o],v={error:"Errors",warn:"Warnings",info:"Info"}[o],b=()=>{A.consoleFilter=null,A.render()},C=Pn(b),E=Kn(h,`Console ${v}`),F=nn({color:h,title:`Console ${v} (${l.length})`,onClose:b,onCopyMd:async()=>{await bn(Xp(l))},onSave:()=>_B(A,l),onClear:()=>A.clearConsoleLogs(),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingConsoleLogs,savedPath:A.lastConsoleLogs,evidenceContext:Ia(A,`Console ${v}`,{artifactPath:A.lastConsoleLogs,observation:`${l.length} ${o} log${l.length===1?"":"s"} in the current filter.`})});E.appendChild(F);let R=An();l.length===0?R.appendChild(DA(`No ${o}s recorded`)):E7(R,l,h),E.appendChild(R),C.appendChild(E),A.overlayElement=C,document.body.appendChild(C),Vn(E)}function E7(A,n,o){n.forEach((l,c)=>{let h=document.createElement("div");Object.assign(h.style,{padding:"8px 14px",borderBottom:c<n.length-1?`1px solid ${H.borderSubtle}`:"none"});let g=document.createElement("span");Object.assign(g.style,{color:H.textMuted,fontSize:"0.625rem",marginRight:"8px"}),g.textContent=new Date(l.timestamp).toLocaleTimeString(),h.appendChild(g);let v=document.createElement("span");Object.assign(v.style,{color:o,fontSize:"0.6875rem",wordBreak:"break-word",whiteSpace:"pre-wrap"}),v.textContent=l.message,h.appendChild(v),A.appendChild(h)})}function x7(A,n,o){if(A.lastDotPosition&&!o){let h=n.endsWith("right"),g;return h?g=n.startsWith("top")?{top:"20px",right:"16px"}:{bottom:"20px",right:"16px"}:g={top:`${A.lastDotPosition.top-15}px`,left:`${A.lastDotPosition.left-19}px`},A.lastDotPosition=null,g}return fa[n]??fa["bottom-left"]}function F7(A,n,o,l,c){A.resetPositionStyles(n);let h=A.options.sizeOverrides,g="fit-content",v="auto",b=c?"calc(100vw - 32px)":"calc(100vw - 96px)";Object.assign(n.style,{position:"fixed",...o,zIndex:"9999",backgroundColor:"var(--devbar-color-bg-card)",border:`1px solid ${l}`,borderRadius:"12px",color:l,boxShadow:`${mt.shadows.dropToolbar}, 0 0 0 1px ${J(l,10)}`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",boxSizing:"border-box",width:h?.width??g,maxWidth:h?.maxWidth??b,minWidth:h?.minWidth??v,cursor:"default"}),n.ondblclick=C=>{if(C.target?.closest("button, input, select, a"))return;let F=n.querySelector(".devbar-status span span");F&&Oo(A,F),A.collapsed=!0,A.debug.state("Collapsed DevBar (double-click)"),A.render()}}function D7(){let A=document.createElement("div");return A.className="devbar-main",Object.assign(A.style,{display:"flex",alignItems:"center",alignContent:"flex-start",justifyContent:"flex-start",gap:"0.5rem",padding:"0.5rem 0.75rem",minWidth:"0",boxSizing:"border-box",fontFamily:ut,fontSize:"0.6875rem",lineHeight:"1rem"}),A}function Q7(A){let n=dl(A);return Er(A,n,()=>da(A.sweetlinkConnected,"click to minimize")),n.onclick=o=>{o.stopPropagation(),Oo(A,n),A.collapsed=!0,A.debug.state("Collapsed DevBar (connection dot click)"),A.render()},n}function S7(A,n){let o=document.createElement("div");return o.className="devbar-info",Object.assign(o.style,{display:"flex",alignItems:"center",gap:"0.5rem",textTransform:"uppercase",letterSpacing:"0.05em",flexShrink:"1",minWidth:"0",overflow:"visible"}),n.breakpoint&&A.breakpointInfo&&U7(A,o),A.perfStats&&I7(A,o,n),o}function U7(A,n){if(!A.breakpointInfo)return;let o=A.breakpointInfo.tailwindBreakpoint,l=BA[o],c=document.createElement("span");c.className="devbar-item",Object.assign(c.style,{opacity:"0.9",cursor:"default"}),ib(A,c,o,A.breakpointInfo.dimensions,l?.label||"");let h=o;o!=="base"&&(h=o==="sm"?`${o} - ${A.breakpointInfo.dimensions.split("x")[0]}`:`${o} - ${A.breakpointInfo.dimensions}`),c.textContent=h,n.appendChild(c)}function T7(A){return{fcp:{label:"FCP",value:A.fcp,title:"First Contentful Paint (FCP)",description:"Time until the first text or image renders on screen.",thresholds:{good:"<1.8s",needsWork:"1.8-3s",poor:">3s"}},lcp:{label:"LCP",value:A.lcp,title:"Largest Contentful Paint (LCP)",description:"Time until the largest visible element renders on screen.",thresholds:{good:"<2.5s",needsWork:"2.5-4s",poor:">4s"}},cls:{label:"CLS",value:A.cls,title:"Cumulative Layout Shift (CLS)",description:"Visual stability score. Higher values mean more unexpected layout shifts.",thresholds:{good:"<0.1",needsWork:"0.1-0.25",poor:">0.25"}},inp:{label:"INP",value:A.inp,title:"Interaction to Next Paint (INP)",description:"Responsiveness to user input. Measures the longest interaction delay.",thresholds:{good:"<200ms",needsWork:"200-500ms",poor:">500ms"}},pageSize:{label:"",value:A.totalSize,title:"Total Page Size",description:"Compressed/transferred size including HTML, CSS, JS, images, and other resources."}}}function I7(A,n,o){if(!A.perfStats)return;let{visible:l,hidden:c}=Jw(A),h=T7(A.perfStats),g=()=>{let b=document.createElement("span");b.style.opacity="0.4",b.textContent="|",n.appendChild(b)};for(let b of l){if(!o[b])continue;let C=h[b];g();let E=document.createElement("span");E.className="devbar-item",Object.assign(E.style,{opacity:b==="pageSize"?"0.7":"0.85",cursor:"default"}),E.textContent=C.label?`${C.label} ${C.value}`:C.value,C.thresholds?ob(A,E,C.title,C.description,C.thresholds):sb(A,E,C.title,C.description),n.appendChild(E)}let v=c.filter(b=>o[b]);v.length>0&&(g(),_7(A,n,v,h))}function _7(A,n,o,l){let c=document.createElement("span");c.className="devbar-item devbar-clickable",Object.assign(c.style,{opacity:"0.7",cursor:"pointer",padding:"0 2px"}),c.textContent="\xB7\xB7\xB7",Ab(A,c,h=>{ca(A,h,"More Metrics");let g=document.createElement("div");Object.assign(g.style,{display:"flex",flexDirection:"column",gap:"6px",marginTop:"8px"});for(let v of o){let b=l[v],C=document.createElement("div");Object.assign(C.style,{display:"flex",justifyContent:"space-between",gap:"12px"});let E=document.createElement("span");Object.assign(E.style,{color:H.textMuted}),E.textContent=b.title.split("(")[0].trim();let F=document.createElement("span");Object.assign(F.style,{color:H.text,fontWeight:"500"}),F.textContent=b.value,C.appendChild(E),C.appendChild(F),g.appendChild(C)}h.appendChild(g)}),n.appendChild(c)}function R7(A,n,o,l,c,h){let g=Q7(A),v=document.createElement("div");v.className="devbar-status",Object.assign(v.style,{display:"flex",alignItems:"center",gap:"0.5rem",flexWrap:"nowrap",flexShrink:"1",minWidth:"0"}),v.appendChild(g);let b=S7(A,n);return v.appendChild(b),o&&(l>0&&v.appendChild(eA(A,"error",l,Me.error)),c>0&&v.appendChild(eA(A,"warn",c,Me.warning)),h>0&&v.appendChild(eA(A,"info",h,Me.info))),v}function O7(A,n,o){let l=document.createElement("div");return l.className="devbar-actions",n&&l.appendChild(Eu(A,o)),l.appendChild(OB(A)),l.appendChild(kB(A)),l.appendChild(LB(A)),l.appendChild(HB(A)),l.appendChild(MB(A)),l.appendChild(NB(A)),l.appendChild(PB(A)),l.appendChild(xu(A)),l.appendChild(KB(A)),l}function k7(A,n,o,l){if(n.length===0)return null;let c=document.createElement("div");c.className=A,Object.assign(c.style,{display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",justifyContent:"flex-start",gap:"0.5rem",padding:"0 0.75rem 0.5rem 0.75rem",borderTop:`1px solid ${J(o,19)}`,marginTop:"0",paddingTop:"0.5rem",width:"100%",maxWidth:"100%",minWidth:"0",overflow:"visible",boxSizing:"border-box",fontFamily:ut,fontSize:"0.6875rem"});for(let h of n)c.appendChild(ko(h,o,l));return c}function L7(A,n,o){let l=A.filter(h=>!h.group),c=k7("devbar-custom-controls devbar-custom-controls-inline",l,n,o);return c?(Object.assign(c.style,{padding:"0",borderTop:"0",width:"fit-content",flex:"0 1 auto",overflow:"hidden"}),c):null}function H7(A,n,o){let l=A.filter(g=>g.group);if(l.length===0)return null;let c=document.createElement("div");c.className="devbar-custom-controls devbar-custom-controls-row",Object.assign(c.style,{display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",justifyContent:"flex-start",gap:"0.5rem",padding:"0 0.75rem 0.5rem 0.75rem",borderTop:`1px solid ${J(n,19)}`,marginTop:"0",paddingTop:"0.5rem",width:"100%",maxWidth:"100%",minWidth:"0",overflow:"visible",boxSizing:"border-box",fontFamily:ut,fontSize:"0.6875rem"});let h=new Map;for(let g of l){if(!g.group)continue;let v=h.get(g.group)??[];v.push(g),h.set(g.group,v)}for(let[g,v]of h){let b=document.createElement("span");b.className="devbar-custom-group-label",Object.assign(b.style,{color:J(n,50),fontSize:"0.5625rem",textTransform:"uppercase",letterSpacing:"0.05em",flex:"0 1 auto",minWidth:"0",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginLeft:[...h.keys()].indexOf(g)>0?"0.25rem":"0"}),b.textContent=g,c.appendChild(b);for(let C of v)c.appendChild(ko(C,n,o))}return c}function jB(A,n){if(!A.container)return;let{position:o,accentColor:l,showMetrics:c,showScreenshot:h,showConsoleBadges:g}=A.options,{errorCount:v,warningCount:b,infoCount:C}=A.getLogCounts(),E=o==="bottom-center",F=A.container;n.length>0?F.dataset.devbarCustomControls="true":delete F.dataset.devbarCustomControls;let R=x7(A,o,E);F7(A,F,R,l,E);let k=D7(),G=R7(A,c,g,v,b,C);k.appendChild(G);let W=L7(n,l,A);W&&k.appendChild(W);let q=O7(A,h,l);k.appendChild(q),F.appendChild(k);let ae=H7(n,l,A);ae&&F.appendChild(ae)}function zB(A){let n=wA(),o=Me.outline,l=()=>{A.showOutlineModal=!1,A.render()},c=Pn(l),h=Kn(o,"Document Outline"),g=nn({color:o,title:"Document Outline",onClose:l,onCopyMd:async()=>{let b=Mn(n);await bn(b)},onSave:()=>IB(A),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingOutline,savedPath:A.lastOutline,evidenceContext:Ia(A,"Document Outline",{artifactPath:A.lastOutline,observation:`${n.length} top-level semantic node${n.length===1?"":"s"} found.`})});h.appendChild(g);let v=An();n.length===0?v.appendChild(DA("No semantic elements found in this document")):XB(n,v,0,{lastHeadingLevel:0}),h.appendChild(v),c.appendChild(h),A.overlayElement=c,document.body.appendChild(c),Vn(h)}function XB(A,n,o,l){for(let c of A){let h=c.category==="heading"&&c.level>0,g=h&&c.level>l.lastHeadingLevel+1;h&&(l.lastHeadingLevel=c.level);let v=document.createElement("div");if(Object.assign(v.style,{padding:`4px 0 4px ${o*16}px`}),g){let R=document.createElement("span");Object.assign(R.style,{color:H.error,fontSize:"0.625rem",marginRight:"4px"}),R.textContent="\u26A0",R.title=`Heading level skipped (expected h${c.level-1} or higher before h${c.level})`,v.appendChild(R)}let b=document.createElement("span"),C=al[c.category||"other"]||al.other;if(Object.assign(b.style,{color:g?H.error:C,fontSize:"0.6875rem",fontWeight:"500"}),b.textContent=`<${c.tagName}>`,v.appendChild(b),c.category){let R=document.createElement("span");Object.assign(R.style,{color:H.textMuted,fontSize:"0.625rem",marginLeft:"6px"}),R.textContent=`[${c.category}]`,v.appendChild(R)}let E=document.createElement("span");Object.assign(E.style,{color:H.textSecondary,fontSize:"0.6875rem",marginLeft:"8px"});let F=c.text.length>60?`${c.text.slice(0,60)}...`:c.text;if(E.textContent=F,v.appendChild(E),c.id){let R=document.createElement("span");Object.assign(R.style,{color:H.textSecondary,fontSize:"0.625rem",marginLeft:"6px"}),R.textContent=`#${c.id}`,v.appendChild(R)}n.appendChild(v),c.children.length>0&&XB(c.children,n,o+1,l)}}function YB(A){let n=bA(),o=Me.schema,l=()=>{A.showSchemaModal=!1,A.render()},c=Pn(l),h=Kn(o,"Page Schema"),g=rl(n),v=tl(),b=nn({color:o,title:"Page Schema",onClose:l,onCopyMd:async()=>{let F=yA(n,{missingTags:g,favicons:v});await bn(F)},onSave:()=>RB(A),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingSchema,savedPath:A.lastSchema,evidenceContext:Ia(A,"Page Schema",{artifactPath:A.lastSchema,observation:g.length?`${g.length} recommended metadata item${g.length===1?"":"s"} missing.`:"Schema evidence captured for this page."})});h.appendChild(b);let C=An();n.jsonLd.length>0||Object.keys(n.openGraph).length>0||Object.keys(n.twitter).length>0||Object.keys(n.metaTags).length>0||v.length>0||g.length>0?(g.length>0&&W7(C,g),Fu(C,"Open Graph",n.openGraph,H.info),Fu(C,"Twitter Cards",n.twitter,H.cyan),v.length>0&&G7(C,v),Fu(C,"JSON-LD",n.jsonLd,o),Fu(C,"Meta Tags",n.metaTags,H.textMuted)):C.appendChild(DA("No structured data found on this page")),h.appendChild(C),c.appendChild(h),A.overlayElement=c,document.body.appendChild(c),Vn(h)}function Jp(A,n,o,l){let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",gap:"8px",marginBottom:"10px",paddingBottom:"6px",borderBottom:`1px solid ${J(o,19)}`});let h=document.createElement("h3");Object.assign(h.style,{color:o,fontSize:"0.8125rem",fontWeight:"600",margin:"0"}),h.textContent=n,c.appendChild(h);let g=document.createElement("span");Object.assign(g.style,{color:J(o,80),fontSize:"0.5625rem",backgroundColor:J(o,9),padding:"1px 6px",borderRadius:"8px",letterSpacing:"0.03em"}),g.textContent=String(l),c.appendChild(g),A.appendChild(c)}function Fu(A,n,o,l){let c=Array.isArray(o)?o.length:Object.keys(o).length;if(c===0)return;let h=document.createElement("div");h.style.marginBottom="20px",Jp(h,n,l,c),Array.isArray(o)?M7(h,o,l):P7(h,o),A.appendChild(h)}function M7(A,n,o){n.forEach((l,c)=>{let h=document.createElement("div");h.style.marginBottom="10px";let g=l,v=typeof g?.["@type"]=="string"?g["@type"]:null,b=document.createElement("div");Object.assign(b.style,{display:"flex",alignItems:"center",gap:"6px",marginBottom:"4px"});let C=document.createElement("span");if(Object.assign(C.style,{color:H.textSecondary,fontSize:"0.6875rem"}),C.textContent=`Schema ${c+1}`,b.appendChild(C),v){let F=document.createElement("span");Object.assign(F.style,{color:J(o,80),fontSize:"0.5625rem",backgroundColor:J(o,8),border:`1px solid ${J(o,15)}`,padding:"0 5px",borderRadius:"3px"}),F.textContent=v,b.appendChild(F)}h.appendChild(b);let E=document.createElement("pre");Object.assign(E.style,{backgroundColor:"rgba(0, 0, 0, 0.25)",borderRadius:"4px",borderLeft:`2px solid ${J(o,31)}`,padding:"10px 10px 10px 12px",fontSize:"0.625rem",margin:"0",whiteSpace:"pre-wrap",wordBreak:"break-word"}),N7(E,JSON.stringify(l,null,2)),h.appendChild(E),A.appendChild(h)})}function N7(A,n){let o={key:H.primary,string:H.warning,number:H.purple,boolean:H.info,nullVal:H.error,punct:H.textMuted},l=/("(?:\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*")(\s*:)?|(\btrue\b|\bfalse\b)|(\bnull\b)|(-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)|([{}[\],])|(\s+)/g;for(let c of n.matchAll(l)){let[,h,g,v,b,C,E,F]=c;if(F)A.appendChild(document.createTextNode(F));else if(h!==void 0){let R=document.createElement("span");if(R.style.color=g?o.key:o.string,R.textContent=h,A.appendChild(R),g){let k=document.createElement("span");k.style.color=o.punct,k.textContent=":",A.appendChild(k)}}else if(v){let R=document.createElement("span");R.style.color=o.boolean,R.textContent=v,A.appendChild(R)}else if(b){let R=document.createElement("span");R.style.color=o.nullVal,R.textContent=b,A.appendChild(R)}else if(C){let R=document.createElement("span");R.style.color=o.number,R.textContent=C,A.appendChild(R)}else if(E){let R=document.createElement("span");R.style.color=o.punct,R.textContent=E,A.appendChild(R)}}}function P7(A,n){Object.entries(n).forEach(([l,c],h)=>{let g=Sw(l),v=document.createElement("div");Object.assign(v.style,{display:"flex",padding:g?"6px 8px":"3px 8px",alignItems:"flex-start",borderRadius:"3px",backgroundColor:h%2===0?"rgba(255, 255, 255, 0.02)":"transparent"});let b=document.createElement("span");if(Object.assign(b.style,{color:H.textSecondary,fontSize:"0.6875rem",width:"120px",minWidth:"120px",maxWidth:"120px",flexShrink:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",paddingTop:g?"2px":"0"}),b.textContent=l,l.length>18&&(b.title=l),v.appendChild(b),g&&c){let C=document.createElement("div");Object.assign(C.style,{flex:"1",minWidth:"0"});let E=document.createElement("div");Object.assign(E.style,{display:"inline-block",padding:"4px",backgroundColor:"rgba(0, 0, 0, 0.2)",border:"1px solid rgba(255, 255, 255, 0.06)",borderRadius:"4px",marginBottom:"4px",minHeight:"60px",minWidth:"80px"});let F=document.createElement("img");Object.assign(F.style,{width:"200px",height:"120px",objectFit:"contain",borderRadius:"2px",display:"block"}),F.src=c,F.alt=l,F.onerror=()=>{E.style.display="none"},F.onload=()=>{F.naturalWidth&&(R.textContent=`${F.naturalWidth}\xD7${F.naturalHeight}`)},E.appendChild(F),C.appendChild(E);let R=document.createElement("div");Object.assign(R.style,{color:H.textMuted,fontSize:"0.5625rem",minHeight:"0.75rem",letterSpacing:"0.02em"}),C.appendChild(R);let k=document.createElement("div");Object.assign(k.style,{color:H.textMuted,fontSize:"0.5625rem",wordBreak:"break-all",opacity:"0.7"}),k.textContent=c,C.appendChild(k),v.appendChild(C)}else{let C=document.createElement("span");Object.assign(C.style,{color:H.text,fontSize:"0.6875rem",flex:"1",wordBreak:"break-word",whiteSpace:"pre-wrap",opacity:"0.85"}),C.textContent=String(c),v.appendChild(C)}A.appendChild(v)})}function K7(A,n){let o=parseInt(n||"",10);return A.includes("apple")?{text:"Apple home screen",color:H.info}:n==="any"||A.includes("svg")?{text:"Scalable (any)",color:H.cyan}:o>=192?{text:"Android / PWA",color:H.primary}:o>=48?{text:"Taskbar / shortcut",color:H.purple}:o>0?{text:"Browser tab",color:H.textSecondary}:{text:"General",color:H.textMuted}}function V7(A,n){let o=K7(A.label,A.size),l=document.createElement("div");Object.assign(l.style,{display:"flex",alignItems:"center",padding:"6px 8px",gap:"10px",borderRadius:"3px",backgroundColor:n%2===0?"rgba(255, 255, 255, 0.02)":"transparent"});let c=document.createElement("div");Object.assign(c.style,{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.25)",border:"1px solid rgba(255, 255, 255, 0.06)",borderRadius:"4px",flexShrink:"0"});let h=document.createElement("img");Object.assign(h.style,{width:"22px",height:"22px",objectFit:"contain"}),h.src=A.url,h.alt=A.label,h.onerror=()=>{c.style.opacity="0.3"},c.appendChild(h),l.appendChild(c);let g=document.createElement("div");Object.assign(g.style,{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"2px"});let v=document.createElement("div");Object.assign(v.style,{display:"flex",alignItems:"center",gap:"6px"});let b=document.createElement("span");Object.assign(b.style,{color:H.text,fontSize:"0.6875rem",fontWeight:"500",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),b.textContent=A.label,A.label.length>24&&(b.title=A.label),v.appendChild(b);let C=document.createElement("span");Object.assign(C.style,{color:o.color,fontSize:"0.5rem",backgroundColor:J(o.color,7),padding:"1px 6px",borderRadius:"6px",letterSpacing:"0.03em",whiteSpace:"nowrap",flexShrink:"0"}),C.textContent=o.text,v.appendChild(C),g.appendChild(v);let E=document.createElement("div");if(Object.assign(E.style,{display:"flex",alignItems:"center",gap:"6px",fontSize:"0.5625rem",color:H.textMuted}),A.size){let G=document.createElement("span");G.textContent=A.size,G.style.opacity="0.8",E.appendChild(G)}let F=document.createElement("span");F.style.letterSpacing="0.02em",E.appendChild(F),h.onload=()=>{if(h.naturalWidth){let G=`${h.naturalWidth}\xD7${h.naturalHeight}`;A.size?F.textContent=`\u2192 ${G}`:F.textContent=G}};let R=document.createElement("span");R.textContent="\xB7",R.style.opacity="0.4",E.appendChild(R);let k=document.createElement("span");return Object.assign(k.style,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",opacity:"0.6"}),k.textContent=A.url,k.title=A.url,E.appendChild(k),g.appendChild(E),l.appendChild(g),l}function G7(A,n){let o=H.purple,l=document.createElement("div");l.style.marginBottom="20px",Jp(l,"Favicons",o,n.length),n.forEach((c,h)=>{l.appendChild(V7(c,h))}),A.appendChild(l)}function WB(A,n){let o=document.createElement("span");return Object.assign(o.style,{color:n,fontSize:"0.5625rem",backgroundColor:J(n,8),padding:"2px 8px",borderRadius:"8px",letterSpacing:"0.03em"}),o.textContent=A,o}function j7(A,n){let o=document.createElement("div");return Object.assign(o.style,{display:"flex",alignItems:"center",padding:"4px 8px",gap:"8px",borderRadius:"3px",backgroundColor:A%2===0?"rgba(255, 255, 255, 0.02)":"transparent",...n?{borderLeft:`2px solid ${J(n,25)}`}:{}}),o}function Yp(A,n){let o=document.createElement("span");return Object.assign(o.style,n),o.textContent=A,o}function W7(A,n){let o=document.createElement("div");o.style.marginBottom="20px";let l=n.filter(v=>v.severity==="error").length,c=n.length-l,g=l>0?H.error:H.warning;if(Jp(o,"Missing Tags",g,n.length),l>0||c>0){let v=document.createElement("div");Object.assign(v.style,{display:"flex",gap:"8px",marginBottom:"8px"}),l>0&&v.appendChild(WB(`${l} error${l>1?"s":""}`,H.error)),c>0&&v.appendChild(WB(`${c} warning${c>1?"s":""}`,H.warning)),o.appendChild(v)}n.forEach((v,b)=>{let C=v.severity==="error",E=C?H.error:H.warning,F=j7(b,E),R=Yp(C?"\u2718":"\u26A0",{fontSize:"0.625rem",flexShrink:"0",width:"14px",textAlign:"center",color:E});F.appendChild(R),F.appendChild(Yp(v.tag,{color:H.text,fontSize:"0.6875rem",width:"120px",minWidth:"120px",flexShrink:"0",fontWeight:"500"})),F.appendChild(Yp(v.hint,{color:H.textMuted,fontSize:"0.6875rem",flex:"1",opacity:"0.85"})),o.appendChild(F)}),A.appendChild(o)}function JB(A){let n=Me.a11y,o=()=>{A.showA11yModal=!1,A.render()},l=Pn(o),c=Kn(n,"Accessibility Audit");q7(c,n,o,A),l.appendChild(c),A.overlayElement=l,document.body.appendChild(l),Vn(c),To().then(h=>{if(!A.showA11yModal)return;let g=ul(h);Uf(c);let v=h.violations.length,b=v===0?"Accessibility Audit \u2014 No Issues":`Accessibility Audit \u2014 ${v} Violation${v===1?"":"s"}`,C=nn({color:n,title:b,onClose:o,onCopyMd:async()=>{await bn(g)},onSave:()=>TB(A,h),sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation,isSaving:A.savingA11yAudit,savedPath:A.lastA11yAudit,evidenceContext:Ia(A,b,{artifactPath:A.lastA11yAudit,observation:v===0?`${h.passes.length} axe rule${h.passes.length===1?"":"s"} passed.`:`${v} accessibility violation${v===1?"":"s"} found.`})});c.appendChild(C);let E=An();z7(E,h,n),c.appendChild(E)}).catch(h=>{if(!A.showA11yModal)return;Uf(c);let g=nn({color:H.error,title:"Accessibility Audit \u2014 Error",onClose:o,onCopyMd:async()=>{},sweetlinkConnected:A.sweetlinkConnected,saveLocation:A.options.saveLocation});c.appendChild(g);let v=An();v.appendChild(ha(H.error,"Audit Failed",`${h instanceof Error?h.message:"Unknown error"}`)),c.appendChild(v)})}function q7(A,n,o,l){let c=An(),h=document.createElement("div");Object.assign(h.style,{textAlign:"center",padding:"40px",color:H.textSecondary,fontSize:"0.875rem"}),h.textContent="Running accessibility audit...",h.style.animation="pulse 1.5s ease-in-out infinite",c.appendChild(h);let g=nn({color:n,title:"Accessibility Audit",onClose:o,onCopyMd:async()=>{},sweetlinkConnected:l.sweetlinkConnected,saveLocation:l.options.saveLocation});A.appendChild(g),A.appendChild(c)}function z7(A,n,o){if(X7(A,n,o),n.violations.length===0){let l=document.createElement("div");if(Object.assign(l.style,{textAlign:"center",padding:"40px",color:H.primary,fontSize:"0.875rem"}),l.textContent="No accessibility violations found!",A.appendChild(l),n.passes.length>0){let c=document.createElement("div");Object.assign(c.style,{textAlign:"center",color:H.textMuted,fontSize:"0.75rem",marginTop:"8px"}),c.textContent=`${n.passes.length} rules passed`,A.appendChild(c)}}else{let l=il(n.violations),c=document.createElement("div");Object.assign(c.style,{display:"flex",gap:"12px",marginBottom:"16px",padding:"10px 12px",backgroundColor:J(o,6),border:`1px solid ${J(o,19)}`,borderRadius:"6px",flexWrap:"wrap"});for(let g of["critical","serious","moderate","minor"]){if(l[g]===0)continue;let v=document.createElement("span"),b=ll(g);Object.assign(v.style,{display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"0.6875rem",fontWeight:"600",color:b});let C=document.createElement("span");Object.assign(C.style,{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:b}),v.appendChild(C),v.appendChild(document.createTextNode(`${l[g]} ${g}`)),c.appendChild(v)}A.appendChild(c);let h=sl(n.violations);for(let[g,v]of h)v.length!==0&&J7(A,g,v)}}function X7(A,n,o){let l=[`${n.passes.length} axe rule${n.passes.length===1?"":"s"} passed`,`${n.violations.length} violation${n.violations.length===1?"":"s"} found`,"current DOM, focus semantics, names, landmarks, forms, and color contrast where browser APIs expose enough paint data"];A.appendChild(ha(o,"What was checked",l.join(" \xB7 ")))}function qB(A){let n=document.createElement("div");return Object.assign(n.style,{padding:"3px 6px",marginBottom:"2px",backgroundColor:"rgba(0,0,0,0.2)",borderRadius:"3px",fontSize:"0.625rem",color:H.textSecondary,fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),n.textContent=A.html.length>100?`${A.html.slice(0,100)}...`:A.html,n.title=A.html,n}function Y7(A,n){let o=document.createElement("div");Object.assign(o.style,{marginBottom:"12px",padding:"10px 12px",backgroundColor:J(n,3),border:`1px solid ${J(n,13)}`,borderRadius:"6px"});let l=document.createElement("div");Object.assign(l.style,{color:n,fontSize:"0.6875rem",fontWeight:"600",marginBottom:"4px"}),l.textContent=A.id,o.appendChild(l);let c=document.createElement("div");Object.assign(c.style,{color:H.text,fontSize:"0.75rem",marginBottom:"4px"}),c.textContent=A.help,o.appendChild(c);let h=document.createElement("div");Object.assign(h.style,{color:H.textSecondary,fontSize:"0.6875rem",marginBottom:"6px"}),h.textContent=A.description,o.appendChild(h);let g=document.createElement("div");Object.assign(g.style,{color:H.textMuted,fontSize:"0.625rem",marginBottom:"4px"}),g.textContent=`${A.nodes.length} element${A.nodes.length===1?"":"s"} affected`,o.appendChild(g);let v=document.createElement("div");Object.assign(v.style,{marginTop:"6px"});let b=A.nodes.slice(0,3);for(let C of b)v.appendChild(qB(C));if(A.nodes.length>3){let C=document.createElement("button");Object.assign(C.style,{background:"none",border:"none",color:n,fontSize:"0.625rem",cursor:"pointer",padding:"2px 0",fontFamily:ut}),C.textContent=`+ ${A.nodes.length-3} more`,C.onclick=()=>{C.remove();for(let E of A.nodes.slice(3))v.appendChild(qB(E))},v.appendChild(C)}return o.appendChild(v),o}function J7(A,n,o){let l=ll(n),c=document.createElement("div");c.style.marginBottom="20px";let h=document.createElement("h3");Object.assign(h.style,{color:l,fontSize:"0.8125rem",fontWeight:"600",marginBottom:"10px",borderBottom:`1px solid ${J(l,25)}`,paddingBottom:"6px",textTransform:"capitalize"}),h.textContent=`${n} (${o.length})`,c.appendChild(h);for(let g of o)c.appendChild(Y7(g,l));A.appendChild(c)}function $B(A){let n=Me.review,o=()=>FB(A),l=Pn(o),c=Kn(n,"AI Design Review");c.style.maxWidth="450px",c.appendChild(nn({color:n,title:"AI Design Review",onClose:o}));let h=An();if(Object.assign(h.style,{color:H.text,fontSize:"0.8125rem",lineHeight:"1.6"}),A.apiKeyStatus===null?h.appendChild(DA("Checking API key configuration...")):A.apiKeyStatus.configured?h.appendChild(Z7(A)):h.appendChild($7()),c.appendChild(h),A.apiKeyStatus?.configured){let g=document.createElement("div");Object.assign(g.style,{display:"flex",justifyContent:"flex-end",gap:"10px",padding:"14px 18px",borderTop:`1px solid ${H.border}`});let v=rn({color:n,text:"Run Review",padding:"8px 16px"});v.style.backgroundColor=J(n,13),v.onclick=()=>DB(A),g.appendChild(v),c.appendChild(g)}l.appendChild(c),A.overlayElement=l,document.body.appendChild(l),Vn(c)}function $7(){let A=document.createElement("div");A.appendChild(ha(H.error,"API Key Not Configured","The ANTHROPIC_API_KEY environment variable is not set."));let n=document.createElement("div");Object.assign(n.style,{marginBottom:"12px"});let o=document.createElement("div");return Object.assign(o.style,{color:H.textSecondary,fontWeight:"600",marginBottom:"8px"}),o.textContent="To configure:",n.appendChild(o),[{text:"1. Get an API key from console.anthropic.com",highlight:!1},{text:"2. Add to your .env file:",highlight:!1},{text:" ANTHROPIC_API_KEY=sk-ant-...",highlight:!0},{text:"3. Restart your dev server",highlight:!1}].forEach(({text:c,highlight:h})=>{let g=document.createElement("div");Object.assign(g.style,{color:h?H.primary:H.textMuted,fontSize:"0.75rem",marginBottom:"4px",fontFamily:ut}),g.textContent=c,n.appendChild(g)}),A.appendChild(n),A}function Z7(A){let n=document.createElement("div");Object.assign(n.style,{marginBottom:"16px"});let o=document.createElement("p");Object.assign(o.style,{color:H.textSecondary,marginBottom:"12px"}),o.textContent="This will capture a screenshot and send it to Claude for design analysis.",n.appendChild(o);let l=xB(A);if(l){let c=ha(H.primary,"Estimated Cost",[]);c.style.marginBottom="0",c.style.padding="12px";let h=document.createElement("div");Object.assign(h.style,{display:"flex",justifyContent:"space-between",color:H.textSecondary,fontSize:"0.75rem"});let g=document.createElement("span");g.textContent=`~${l.tokens.toLocaleString()} tokens`,h.appendChild(g);let v=document.createElement("span");Object.assign(v.style,{color:H.warning,fontWeight:"600"}),v.textContent=l.cost,h.appendChild(v),c.appendChild(h),n.appendChild(c)}if(A.apiKeyStatus?.model){let c=document.createElement("div");Object.assign(c.style,{color:H.textMuted,fontSize:"0.6875rem",marginTop:"12px"}),c.textContent=`Model: ${A.apiKeyStatus.model}`,n.appendChild(c)}return n}var eK=860;function $p(A){return A?!0:typeof window>"u"?!1:window.innerWidth<=eK}function ZB(A){let n=A.settingsManager.getSettings();A.themeMode=A.forcedThemeMode??n.themeMode,A.forcedThemeMode&&n.themeMode!==A.forcedThemeMode&&A.settingsManager.saveSettingsNow({themeMode:A.forcedThemeMode}),EA(CA(A.themeMode)),A.debug.state("Theme loaded",{mode:A.themeMode}),typeof window<"u"&&window.matchMedia&&(A.themeMediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),A.themeMediaHandler=()=>{A.themeMode==="system"&&(EA(CA(A.themeMode)),A.debug.state("System theme changed",{effectiveTheme:ua(A.themeMode)}),window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:A.themeMode}})),A.render())},A.themeMediaQuery.addEventListener("change",A.themeMediaHandler))}function eC(A){let n=A.settingsManager.getSettings();A.compactMode=$p(n.compactMode),A.debug.state("Compact mode loaded",{compactMode:A.compactMode})}function Du(A,n){let o=A.forcedThemeMode??n;A.themeMode=o,A.settingsManager.saveSettings({themeMode:o}),wf(o),EA(CA(o)),A.debug.state("Theme mode changed",{mode:o,effectiveTheme:ua(o)}),typeof window<"u"&&window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:o}})),A.render()}function tC(A){let{position:n,accentColor:o}=A.options,l=document.createElement("div");l.setAttribute("data-devbar","true"),l.setAttribute("data-devbar-overlay","true"),Object.assign(l.style,{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",zIndex:"10003"}),l.onclick=k=>{k.target===l&&(A.showSettingsPopover=!1,A.render())};let c=document.createElement("div");c.setAttribute("data-devbar","true"),c.setAttribute("role","dialog"),c.setAttribute("aria-modal","true"),c.setAttribute("aria-label","Settings"),c.tabIndex=-1;let h=n.startsWith("top"),g=480,v=16,b;if(A.container&&window.innerWidth>640){let k=A.container.getBoundingClientRect(),G=k.left+k.width/2;b=Math.max(v,Math.min(G-g/2,window.innerWidth-g-v))}else b=Math.max(v,(window.innerWidth-g)/2);Object.assign(c.style,{position:"fixed",[h?"top":"bottom"]:"70px",left:`${b}px`,zIndex:"10003",backgroundColor:"var(--devbar-color-bg-elevated)",border:`1px solid ${o}`,borderRadius:"8px",boxShadow:`${mt.shadows.dropLg}, 0 0 0 1px ${J(o,20)}`,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",width:`${g}px`,maxWidth:"calc(100vw - 32px)",maxHeight:"calc(100vh - 100px)",overflowY:"auto",fontFamily:ut}),c.appendChild(tK(A));let C=document.createElement("div");C.className="devbar-settings-grid",Object.assign(C.style,{display:"grid",gridTemplateColumns:"1fr 1fr"});let E=H.textSecondary,F=document.createElement("div");Object.assign(F.style,{borderRight:`1px solid ${J(E,13)}`}),F.appendChild(rK(A)),F.appendChild(nK(A)),C.appendChild(F);let R=document.createElement("div");R.appendChild(uK(A)),R.appendChild(dK(A)),C.appendChild(R),c.appendChild(C),c.appendChild(fK(A)),l.appendChild(c),A.overlayElement=l,document.body.appendChild(l),c.focus()}function tK(A){let{accentColor:n}=A.options,o=document.createElement("div");Object.assign(o.style,{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 14px",borderBottom:`1px solid ${J(n,19)}`,position:"sticky",top:"0",backgroundColor:"var(--devbar-color-bg-elevated)",zIndex:"1"});let l=document.createElement("span");return Object.assign(l.style,{color:n,fontSize:"0.75rem",fontWeight:"600"}),l.textContent="Settings",o.appendChild(l),o.appendChild(Lo(()=>{A.showSettingsPopover=!1,A.render()})),o}function rK(A){let{accentColor:n}=A.options,o=!!A.forcedThemeMode,l=Qu("Theme");Su(l,o?`Theme is controlled by the host app: ${A.forcedThemeMode}.`:"Follow OS/browser preference, force dark, or force light while reviewing.");let c=document.createElement("div");return Object.assign(c.style,{display:"flex",gap:"6px"}),["system","dark","light"].forEach(g=>{let v=rC({label:g,isActive:A.themeMode===g,accentColor:n,disabled:o&&g!==A.forcedThemeMode,disabledTitle:"Theme controlled by host app",onClick:()=>Du(A,g)});v.style.textTransform="capitalize",c.appendChild(v)}),l.appendChild(c),l}function nK(A){let n=Qu("Display & appearance");return Su(n,"Change where DevBar lives and how evidence captures are rendered."),n.appendChild(AK(A)),n.appendChild(aK(A)),n.appendChild(oK(A)),n.appendChild(lK(A)),n}function AK(A){let{accentColor:n}=A.options,o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{marginBottom:"10px"});let c=document.createElement("div");Object.assign(c.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),c.textContent="Position",l.appendChild(c);let h=document.createElement("div");return Object.assign(h.style,{position:"relative",width:"100%",height:"70px",backgroundColor:"var(--devbar-color-bg-input)",border:`1px solid ${J(o,19)}`,borderRadius:"4px"}),[{value:"top-left",style:{top:"6px",left:"6px"},title:"Top Left"},{value:"top-right",style:{top:"6px",right:"6px"},title:"Top Right"},{value:"bottom-left",style:{bottom:"6px",left:"6px"},title:"Bottom Left"},{value:"bottom-right",style:{bottom:"6px",right:"6px"},title:"Bottom Right"},{value:"bottom-center",style:{bottom:"6px",left:"50%",transform:"translateX(-50%)"},title:"Bottom Center"}].forEach(({value:v,style:b,title:C})=>{let E=document.createElement("button");E.setAttribute("data-position",v);let F=A.options.position===v;Object.assign(E.style,{position:"absolute",width:"24px",height:"6px",backgroundColor:F?n:H.textMuted,border:`1px solid ${F?n:H.textMuted}`,borderRadius:"2px",cursor:"pointer",padding:"0",transition:"all 150ms",boxShadow:F?`0 0 8px ${J(n,38)}`:"none",opacity:F?"1":"0.5",...b}),E.title=C,E.onclick=()=>{A.options.position=v,A.settingsManager.saveSettings({position:v}),A.render()},E.onmouseenter=()=>{F||(E.style.backgroundColor=n,E.style.borderColor=n,E.style.boxShadow=`0 0 6px ${J(n,25)}`,E.style.opacity="1")},E.onmouseleave=()=>{F||(E.style.backgroundColor=H.textMuted,E.style.borderColor=H.textMuted,E.style.boxShadow="none",E.style.opacity="0.5")},h.appendChild(E)}),l.appendChild(h),l}function aK(A){let{accentColor:n}=A.options,o=document.createDocumentFragment();o.appendChild(gi("Compact Mode",A.compactMode,n,()=>{A.toggleCompactMode()}));let l=document.createElement("div");return Object.assign(l.style,{color:H.textMuted,fontSize:"0.5625rem",marginTop:"2px",marginBottom:"8px"}),l.textContent="Keyboard: Cmd or Ctrl+Shift+M",o.appendChild(l),o}function oK(A){let n=document.createElement("div");Object.assign(n.style,{marginBottom:"6px"});let o=document.createElement("div");Object.assign(o.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),o.textContent="Accent Color",n.appendChild(o);let l=document.createElement("div");Object.assign(l.style,{display:"flex",gap:"6px",flexWrap:"wrap",alignItems:"center"});let c=A.options.accentColor,h=c===H.primary,v=!pl.some(b=>b.value===c)&&!h;if(pl.forEach(({name:b,value:C})=>{let E=document.createElement("button"),F=c===C||h&&b==="Emerald";Object.assign(E.style,{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:C,border:F?"2px solid #fff":"2px solid transparent",cursor:"pointer",transition:"all 150ms",boxShadow:F?`0 0 8px ${C}`:"none"}),E.title=b,E.onclick=()=>{A.options.accentColor=C,A.settingsManager.saveSettings({accentColor:C}),A.render()},l.appendChild(E)}),v){let b=document.createElement("button");b.type="button",b.setAttribute("data-accent-reset","true"),b.title=`Custom color (${c}). Click to reset to theme default.`,Object.assign(b.style,{marginLeft:"4px",padding:"2px 8px",borderRadius:"10px",border:`1px dashed ${c}`,backgroundColor:"transparent",color:c,fontSize:"0.625rem",fontFamily:ut,cursor:"pointer",lineHeight:"1.4"}),b.textContent="custom \xB7 reset",b.onclick=()=>{let C=pa.accentColor;A.options.accentColor=C,A.settingsManager.saveSettings({accentColor:C}),A.render()},l.appendChild(b)}return n.appendChild(l),n}function iK(A,n){return[`#${A}::-webkit-slider-thumb {`," -webkit-appearance: none;"," width: 12px; height: 12px;"," border-radius: 50%;",` background: ${n};`,` border: 2px solid ${H.bg};`,` box-shadow: 0 0 4px ${J(n,50)};`," cursor: grab;","}",`#${A}::-webkit-slider-thumb:active { cursor: grabbing; }`,`#${A}::-moz-range-thumb {`," width: 12px; height: 12px;"," border-radius: 50%;",` background: ${n};`,` border: 2px solid ${H.bg};`,` box-shadow: 0 0 4px ${J(n,50)};`," cursor: grab;","}",`#${A}::-webkit-slider-runnable-track { background: transparent; }`,`#${A}::-moz-range-track { background: transparent; }`].join(`
540
- `)}function sK(A,n,o,l){A.oninput=()=>{let c=parseFloat(A.value);n.textContent=c.toFixed(2),o.style.width=`${c*100}%`,l.options.screenshotQuality=c},A.onchange=()=>{l.settingsManager.saveSettings({screenshotQuality:l.options.screenshotQuality})}}function lK(A){let{accentColor:n}=A.options,o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{marginTop:"8px"});let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"6px"});let h=document.createElement("span");Object.assign(h.style,{color:H.text,fontSize:"0.6875rem"}),h.textContent="Screenshot Quality",c.appendChild(h);let g=document.createElement("span");Object.assign(g.style,{color:n,fontSize:"0.6875rem",fontFamily:"monospace",minWidth:"28px",textAlign:"right"});let v=A.options.screenshotQuality;g.textContent=v.toFixed(2),c.appendChild(g),l.appendChild(c);let b=document.createElement("div");Object.assign(b.style,{position:"relative",height:"20px"});let C=document.createElement("div");Object.assign(C.style,{position:"absolute",top:"50%",left:"0",right:"0",height:"2px",transform:"translateY(-50%)",borderRadius:"1px",background:J(o,25),pointerEvents:"none"});let E=document.createElement("div");Object.assign(E.style,{height:"100%",width:`${v*100}%`,borderRadius:"1px",background:n}),C.appendChild(E),b.appendChild(C);let F=document.createElement("input");F.type="range",F.min="0",F.max="1",F.step="0.01",F.value=String(v),Object.assign(F.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",appearance:"none",WebkitAppearance:"none",background:"transparent",outline:"none",cursor:"pointer",margin:"0"});let R=`devbar-quality-${Date.now()}`;F.id=R;let k=document.createElement("style");return k.textContent=iK(R,n),b.appendChild(k),sK(F,g,E,A),b.appendChild(F),l.appendChild(b),l}function uK(A){let{accentColor:n}=A.options,o=Qu("Evidence workflow");return Su(o,"Choose the controls and save behavior an agent sees during inspect, verify, and handoff."),o.appendChild(cK(A)),o.appendChild(gi("Screenshot Button",A.options.showScreenshot,n,()=>{A.options.showScreenshot=!A.options.showScreenshot,A.settingsManager.saveSettings({showScreenshot:A.options.showScreenshot}),A.render()})),o.appendChild(gi("Console Badges",A.options.showConsoleBadges,n,()=>{A.options.showConsoleBadges=!A.options.showConsoleBadges,A.settingsManager.saveSettings({showConsoleBadges:A.options.showConsoleBadges}),A.render()})),o.appendChild(gi("Tooltips",A.options.showTooltips,n,()=>{A.options.showTooltips=!A.options.showTooltips,A.settingsManager.saveSettings({showTooltips:A.options.showTooltips}),A.render()})),o}function cK(A){let{accentColor:n}=A.options,o=document.createElement("div");Object.assign(o.style,{marginBottom:"10px"});let l=document.createElement("div");Object.assign(l.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),l.textContent="Save Method",o.appendChild(l);let c=document.createElement("div");Object.assign(c.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",marginBottom:"8px"}),c.textContent="Auto saves artifacts through Sweetlink when connected, otherwise downloads in-browser.",o.appendChild(c);let h=document.createElement("div");return Object.assign(h.style,{display:"flex",gap:"6px",flexWrap:"wrap"}),[{value:"auto",label:"Auto"},{value:"download",label:"Download"},{value:"local",label:"Local"}].forEach(({value:v,label:b})=>{let C=v==="local"&&!A.sweetlinkConnected,E=rC({label:b,isActive:A.options.saveLocation===v,accentColor:n,disabled:C,disabledTitle:"Sweetlink not connected",onClick:()=>{A.options.saveLocation=v,A.settingsManager.saveSettings({saveLocation:v}),A.render()}});h.appendChild(E)}),o.appendChild(h),o}function dK(A){let{accentColor:n}=A.options,o=Qu("Metrics");return Su(o,"Keep the toolbar focused by hiding metrics that are not useful now."),[{key:"breakpoint",label:"Breakpoint"},{key:"fcp",label:"FCP"},{key:"lcp",label:"LCP"},{key:"cls",label:"CLS"},{key:"inp",label:"INP"},{key:"pageSize",label:"Page Size"}].forEach(({key:c,label:h})=>{let g=A.options.showMetrics[c]??!0;o.appendChild(gi(h,g,n,()=>{A.options.showMetrics[c]=!A.options.showMetrics[c],A.settingsManager.saveSettings({showMetrics:{breakpoint:A.options.showMetrics.breakpoint??!0,fcp:A.options.showMetrics.fcp??!0,lcp:A.options.showMetrics.lcp??!0,cls:A.options.showMetrics.cls??!0,inp:A.options.showMetrics.inp??!0,pageSize:A.options.showMetrics.pageSize??!0}}),A.render()}))}),o}function fK(A){let n=H.textSecondary,o=document.createElement("div");Object.assign(o.style,{padding:"10px 14px",borderTop:`1px solid ${J(n,13)}`});let l=rn({color:H.textMuted,text:"Reset to Defaults",padding:"6px 12px",fontSize:"0.625rem"});Object.assign(l.style,{width:"100%",justifyContent:"center",border:"1px solid transparent"});let c=H.textMuted;return l.onmouseenter=()=>{l.style.border=`1px solid ${c}`,l.style.backgroundColor=J(c,6)},l.onmouseleave=()=>{l.style.border="1px solid transparent",l.style.backgroundColor="transparent"},l.onclick=()=>{A.settingsManager.resetToDefaults();let h=pa;A.applySettings(h)},o.appendChild(l),o}function Qu(A,n=!0){let o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{padding:"10px 14px",borderBottom:n?`1px solid ${J(o,13)}`:"none"});let c=document.createElement("div");return Object.assign(c.style,{color:o,fontSize:"0.625rem",textTransform:"uppercase",letterSpacing:"0.1em",marginBottom:"8px"}),c.textContent=A,l.appendChild(c),l}function Su(A,n){let o=document.createElement("div");Object.assign(o.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",margin:"-2px 0 10px"}),o.textContent=n,A.appendChild(o)}function rC(A){let{label:n,isActive:o,accentColor:l,disabled:c,disabledTitle:h,onClick:g}=A,v=H.textSecondary,b=document.createElement("button");return Object.assign(b.style,{padding:"6px 10px",minHeight:"28px",backgroundColor:o?J(l,13):"transparent",border:`1px solid ${o?l:"transparent"}`,borderRadius:"4px",color:o?l:v,fontFamily:ut,fontSize:"0.625rem",cursor:c?"not-allowed":"pointer",transition:"all 150ms",opacity:c?"0.5":"1"}),b.textContent=n,c?h&&(b.title=h):o||(b.onmouseenter=()=>{b.style.borderColor=`${v}`,b.style.backgroundColor=J(v,6)},b.onmouseleave=()=>{b.style.borderColor="transparent",b.style.backgroundColor="transparent"}),b.onclick=()=>{c||g()},b}function gi(A,n,o,l){let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:"28px",marginBottom:"6px",gap:"12px"});let h=document.createElement("span");Object.assign(h.style,{color:H.text,fontSize:"0.6875rem"}),h.textContent=A,c.appendChild(h);let g=document.createElement("button");Object.assign(g.style,{width:"32px",height:"18px",borderRadius:"9px",border:`1px solid ${n?o:H.border}`,backgroundColor:n?o:H.bgInput,position:"relative",cursor:"pointer",transition:"all 150ms",flexShrink:"0",boxSizing:"border-box"});let v=document.createElement("span");return Object.assign(v.style,{position:"absolute",top:"2px",left:n?"14px":"2px",width:"12px",height:"12px",borderRadius:"50%",backgroundColor:n?"#fff":H.textMuted,boxShadow:"0 1px 2px rgba(0,0,0,0.2)",transition:"left 150ms, background-color 150ms"}),g.appendChild(v),g.onclick=l,c.appendChild(g),c}function pK(A,n){if(A.consoleFilter){let o=A.consoleFilter;qt(A),A.consoleFilter=o,GB(A,n)}else A.showOutlineModal?(qt(A),A.showOutlineModal=!0,zB(A)):A.showSchemaModal?(qt(A),A.showSchemaModal=!0,YB(A)):A.showA11yModal?(qt(A),A.showA11yModal=!0,JB(A)):A.showDesignReviewConfirm?(qt(A),A.showDesignReviewConfirm=!0,$B(A)):A.showSettingsPopover&&(qt(A),A.showSettingsPopover=!0,tC(A))}function nC(A,n,o){if(!A.destroyed&&!(typeof document>"u")&&!Qf){Sf(!0),tb(A),A.overlayElement&&(A.overlayElement.remove(),A.overlayElement=null,document.body.style.overflow=""),A.container&&A.container.remove(),A.container=document.createElement("div"),A.container.setAttribute("data-devbar","true"),A.container.setAttribute("role","toolbar"),A.container.setAttribute("aria-label","DevBar"),document.body.appendChild(A.container);try{A.collapsed?ub(A):A.compactMode?VB(A,o):jB(A,o)}catch(l){console.error("[GlobalDevBar] Render failed:",l)}try{pK(A,n)}catch(l){console.error("[GlobalDevBar] Overlay render failed:",l)}A.overlayElement&&(document.body.style.overflow="hidden"),Sf(!1)}}function AC(A){if(A.pendingViewerWindow){try{A.pendingViewerWindow.close()}catch{}A.pendingViewerWindow=null}}function oC(A){return`ws://localhost:${A.baseWsPort}`}function Zp(A){return A.wsUrlCandidates?.length?A.wsUrlCandidates:[oC(A)]}function gK(A,n){return typeof n=="string"?n:typeof n=="number"?`ws://localhost:${n}`:Zp(A)[0]??oC(A)}function iC(A){try{let n=new URL(A);if(n.protocol!=="ws:"&&n.protocol!=="wss:")return null;let o=Number(n.port);return Number.isInteger(o)&&o>0?o:null}catch{return null}}function aC(A,n,o=100){let l=Zp(A),c=l.indexOf(n);if(c>=0&&c+1<l.length){setTimeout(()=>_a(A,l[c+1]),o);return}let h=iC(n);if(h!==null){let g=h+1;if(g<A.baseWsPort+10){setTimeout(()=>_a(A,g),o);return}}setTimeout(()=>_a(A),Nw)}function _a(A,n){if(A.destroyed)return;let o=gK(A,n),l=iC(o);A.debug.ws("Connecting to WebSocket",{url:o,port:l??"same-origin",appPort:A.currentAppPort});let c=new WebSocket(o),h=!1;A.ws=c,A.wsVerified=!1,c.onopen=()=>{A.debug.ws("WebSocket socket opened, awaiting server-info"),c.send(JSON.stringify({type:"browser-client-ready"}))},c.onmessage=async g=>{try{let v=JSON.parse(g.data);if(v.type==="server-info"){let C=v.appPort;if(!(C===null||C===A.currentAppPort)){A.debug.ws("Server mismatch",{serverAppPort:C,currentAppPort:A.currentAppPort,targetUrl:o}),h=!0,c.close(),aC(A,o);return}A.wsVerified=!0,A.sweetlinkConnected=!0,A.reconnectAttempts=0,A.serverProjectDir=v.projectDir??null,A.serverGitBranch=v.gitBranch??null,A.serverAppName=v.appName??null,A.debug.ws("Server verified",{appPort:C??"any",projectDir:A.serverProjectDir,gitBranch:A.serverGitBranch}),A.settingsManager.setWebSocket(c),A.settingsManager.setConnected(!0),c.send(JSON.stringify({type:"load-settings"})),A.render();return}if(!A.wsVerified){A.debug.ws("Ignoring command before verification",{type:v.type});return}if(v.type==="hifi-screenshot"){A.capturing=!1,A.render();return}if(v.type==="record-start-response"&&v.success){A.recordingActive=!0,A.recordingSessionId=v.sessionId??null,A.recordingStartedAt=Date.now(),A.recordingTimer=setInterval(()=>A.render(),1e3),A.render();return}if(v.type==="record-stop-response"||v.type==="record-stop"){if(A.recordingActive=!1,A.recordingTimer&&clearInterval(A.recordingTimer),A.recordingTimer=null,A.recordingStartedAt=null,v.success){let E=v.viewerUrl;E&&A.pendingViewerWindow?(A.pendingViewerWindow.location.href=E,A.pendingViewerWindow=null):AC(A),E&&(A.lastViewerPath=E)}else AC(A);A.render();return}let b=v;A.debug.ws("Received command",{type:b.type}),await KK(A,b)}catch(v){console.error("[GlobalDevBar] Error handling command:",v)}},c.onclose=()=>{if(A.wsVerified){if(A.sweetlinkConnected=!1,A.wsVerified=!1,A.serverProjectDir=null,A.settingsManager.setConnected(!1),A.debug.ws("WebSocket disconnected"),A.render(),!A.destroyed&&A.reconnectAttempts<Al){let g=Hw*2**A.reconnectAttempts;A.reconnectAttempts++,A.debug.ws("Scheduling reconnect",{attempt:A.reconnectAttempts,delayMs:g}),A.reconnectTimeout=setTimeout(()=>_a(A,A.baseWsPort),Math.min(g,Mw))}}else if(!A.destroyed&&!h){let g=Zp(A),v=g.indexOf(o);v>=0&&v+1<g.length&&(A.debug.ws("WebSocket closed before verification, trying next candidate"),aC(A,o))}},c.onerror=()=>{A.debug.ws("WebSocket error")}}function Uu(A,n,o=la){return(l,c)=>{vi(l,A,c[n],o)}}function Tu(A,n){return(o,l)=>{n&&(o[n]=!1),console.error(`[GlobalDevBar] ${A} failed:`,l.error),n&&o.render()}}var vK=Uu("outline","outlinePath"),wK=Uu("schema","schemaPath"),bK=Uu("consoleLogs","consoleLogsPath"),yK=Uu("a11y","a11yPath"),BK=(A,n)=>{A.capturing=!1,vi(A,"screenshot",n.path,la)},CK=Tu("Outline save"),EK=Tu("Schema save"),xK=Tu("Console logs save","savingConsoleLogs"),FK=Tu("A11y save","savingA11yAudit");async function DK(A,n){let o=n.selector&&document.querySelector(n.selector)||document.body,c=await(await LA())(o,{logging:!1,useCORS:!0,allowTaint:!0});A.send(JSON.stringify({success:!0,data:{screenshot:c.toDataURL("image/png"),width:c.width,height:c.height,selector:n.selector||"body"},timestamp:Date.now()}))}function QK(A,n,o){let l=A.consoleLogs;if(o.filter){let c=o.filter.toLowerCase();l=l.filter(h=>h.level.includes(c)||h.message.toLowerCase().includes(c))}n.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}function SK(A,n){if(n.selector){let l=Array.from(document.querySelectorAll(n.selector)).map(c=>n.property?c[n.property]??null:{tagName:c.tagName,className:c.className,id:c.id,textContent:c.textContent?.trim().slice(0,100)});A.send(JSON.stringify({success:!0,data:{count:l.length,results:l},timestamp:Date.now()}))}}function UK(A,n){if(n.code&&typeof n.code=="string"&&n.code.length<=1e4)try{let l=(0,eval)(n.code);A.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Execution failed",timestamp:Date.now()}))}}async function TK(A,n){try{let o=await To(n.forceRefresh),l={critical:0,serious:0,moderate:0,minor:0};for(let c of o.violations)l[c.impact]=(l[c.impact]||0)+1;A.send(JSON.stringify({success:!0,data:{result:o,summary:{totalViolations:o.violations.length,totalPasses:o.passes.length,totalIncomplete:o.incomplete.length,byImpact:l},url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Accessibility audit failed",timestamp:Date.now()}))}}function IK(A){try{let n=wA(),o=Mn(n);A.send(JSON.stringify({success:!0,data:{outline:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Outline extraction failed",timestamp:Date.now()}))}}function _K(A){try{let n=bA(),o=yA(n);A.send(JSON.stringify({success:!0,data:{schema:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Schema extraction failed",timestamp:Date.now()}))}}async function RK(A){try{let o=performance.getEntriesByType("paint").find(q=>q.name==="first-contentful-paint"),l=o?Math.round(o.startTime):null,c=q=>new Promise(ae=>{try{let Z=[],he=new PerformanceObserver(Se=>{Z.push(...Se.getEntries())});he.observe({type:q,buffered:!0}),setTimeout(()=>{he.disconnect(),ae(Z)},0)}catch{ae([])}}),[h,g,v]=await Promise.all([c("largest-contentful-paint"),c("layout-shift"),c("event")]),b=h.length>0?Math.round(h[h.length-1].startTime):null,C=null;if(g.length>0){let q=0;for(let ae of g){let Z=ae;Z.hadRecentInput||(q+=Z.value)}C=Math.round(q*1e3)/1e3}let E=null;if(v.length>0){let q=0;for(let ae of v){let Z=ae;Z.duration>q&&(q=Z.duration)}E=Math.round(q)}let F=null,R=performance.getEntriesByType("resource"),k=0;for(let q of R)k+=q.transferSize||0;k>0&&(F=k);let G={fcp:l,lcp:b,cls:C,inp:E,pageSize:F,url:window.location.href,title:document.title,timestamp:Date.now()},W=[];l!==null&&W.push(`FCP: ${l}ms`),b!==null&&W.push(`LCP: ${b}ms`),C!==null&&W.push(`CLS: ${C}`),E!==null&&W.push(`INP: ${E}ms`),F!==null&&W.push(`Page size: ${Math.round(F/1024)}KB`),A.send(JSON.stringify({success:!0,data:{vitals:G,summary:W.join(", ")||"No metrics available yet"},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Vitals collection failed",timestamp:Date.now()}))}}function OK(A){try{window.location.reload(),A.send(JSON.stringify({success:!0,timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Refresh failed",timestamp:Date.now()}))}}function kK(A,n){A.designReviewInProgress=!1,vi(A,"designReview",n.reviewPath,pf)}function LK(A,n){A.designReviewInProgress=!1,A.designReviewError=n.error||"Unknown error",console.error("[GlobalDevBar] Design review failed:",n.error),A.designReviewErrorTimeout&&clearTimeout(A.designReviewErrorTimeout),A.designReviewErrorTimeout=setTimeout(()=>{A.designReviewError=null,A.render()},pf),A.render()}function HK(A,n){let o=n;A.apiKeyStatus={configured:o.configured??!1,model:o.model,pricing:o.pricing},A.render()}function MK(A,n){VK(A,n.settings)}function NK(A,n){A.debug.state("Settings saved to server",{path:n.settingsPath})}function PK(A){console.error("[GlobalDevBar] Settings operation failed:",A.error)}async function KK(A,n){let o=A.ws;if(!(!o||o.readyState!==WebSocket.OPEN))switch(n.type){case"screenshot":await DK(o,n);break;case"get-logs":QK(A,o,n);break;case"query-dom":SK(o,n);break;case"exec-js":UK(o,n);break;case"get-a11y":await TK(o,n);break;case"get-outline":IK(o);break;case"get-schema":_K(o);break;case"get-vitals":await RK(o);break;case"refresh":OK(o);break;case"screenshot-saved":BK(A,n);break;case"design-review-saved":kK(A,n);break;case"design-review-error":LK(A,n);break;case"api-key-status":HK(A,n);break;case"outline-saved":vK(A,n);break;case"outline-error":CK(A,n);break;case"schema-saved":wK(A,n);break;case"schema-error":EK(A,n);break;case"console-logs-saved":bK(A,n);break;case"console-logs-error":xK(A,n);break;case"a11y-saved":yK(A,n);break;case"a11y-error":FK(A,n);break;case"settings-loaded":MK(A,n);break;case"settings-saved":NK(A,n);break;case"settings-error":PK(n);break;default:break}}function vi(A,n,o,l){if(o){switch(n){case"screenshot":A.lastScreenshot=o,A.screenshotTimeout&&clearTimeout(A.screenshotTimeout),A.screenshotTimeout=setTimeout(()=>{A.lastScreenshot=null,A.render()},l);break;case"designReview":A.lastDesignReview=o,A.designReviewTimeout&&clearTimeout(A.designReviewTimeout),A.designReviewTimeout=setTimeout(()=>{A.lastDesignReview=null,A.render()},l);break;case"outline":A.savingOutline=!1,A.lastOutline=o,A.outlineTimeout&&clearTimeout(A.outlineTimeout),A.outlineTimeout=setTimeout(()=>{A.lastOutline=null,A.render()},l);break;case"schema":A.savingSchema=!1,A.lastSchema=o,A.schemaTimeout&&clearTimeout(A.schemaTimeout),A.schemaTimeout=setTimeout(()=>{A.lastSchema=null,A.render()},l);break;case"consoleLogs":A.savingConsoleLogs=!1,A.lastConsoleLogs=o,A.consoleLogsTimeout&&clearTimeout(A.consoleLogsTimeout),A.consoleLogsTimeout=setTimeout(()=>{A.lastConsoleLogs=null,A.render()},l);break;case"a11y":A.savingA11yAudit=!1,A.lastA11yAudit=o,A.a11yTimeout&&clearTimeout(A.a11yTimeout),A.a11yTimeout=setTimeout(()=>{A.lastA11yAudit=null,A.render()},l);break}A.render()}}function VK(A,n){if(!n){A.debug.state("No server settings found, using local");return}A.debug.state("Settings loaded from server",n),A.settingsManager.handleSettingsLoaded(n),A.applySettings(n)}function GK(A,n){let o=[],l=h=>{h&&!o.includes(h)&&o.push(h)};l(n.wsUrl),n.wsPath&&l(Lw(A,n.wsPath));let c=sa(n.wsPort)??n.fallbackPort;return l(`ws://localhost:${c}`),o}var Ar=new nl({trackCounts:!0});Ar.importEarlyLogs();Ar.start();Ar.startErrorHandlers();var ar=class A{static CONTROLS_KEY="__YTSPAR_DEVBAR_CONTROLS__";static get customControls(){return typeof window>"u"?[]:window[A.CONTROLS_KEY]??[]}static set customControls(n){typeof window<"u"&&(window[A.CONTROLS_KEY]=n)}options;forcedThemeMode;debugConfig;debug;container=null;ws=null;consoleLogs=[];sweetlinkConnected=!1;collapsed=!1;capturing=!1;copiedToClipboard=!1;copiedPath=!1;lastScreenshot=null;designReviewInProgress=!1;lastDesignReview=null;designReviewError=null;showDesignReviewConfirm=!1;apiKeyStatus=null;lastOutline=null;lastSchema=null;savingOutline=!1;savingSchema=!1;consoleFilter=null;savingConsoleLogs=!1;lastConsoleLogs=null;consoleLogsTimeout;showOutlineModal=!1;showSchemaModal=!1;showA11yModal=!1;a11yLoading=!1;lastA11yAudit=null;savingA11yAudit=!1;a11yTimeout=null;recordingActive=!1;recordingSessionId=null;recordingStartedAt=null;recordingTimer=null;lastViewerPath=null;pendingViewerWindow=null;demoActive=!1;demoTitle=null;demoSectionCount=0;rulerMode=!1;rulerOverlay=null;rulerPinnedElements=[];rulerCleanup=null;activeTooltips=new Set;breakpointInfo=null;perfStats=null;lcpValue=null;clsValue=0;inpValue=0;reconnectAttempts=0;currentAppPort;baseWsPort;wsUrlCandidates;wsVerified=!1;serverProjectDir=null;serverGitBranch=null;serverAppName=null;lastDotPosition=null;reconnectTimeout=null;screenshotTimeout=null;copiedPathTimeout=null;designReviewTimeout=null;designReviewErrorTimeout=null;outlineTimeout=null;schemaTimeout=null;resizeHandler=null;keydownHandler=null;fcpObserver=null;lcpObserver=null;clsObserver=null;inpObserver=null;destroyed=!1;themeMode="system";themeMediaQuery=null;themeMediaHandler=null;compactMode=!1;showSettingsPopover=!1;overlayElement=null;settingsManager;logChangeListener=null;constructor(n={}){if(this.debugConfig=Ef(n.debug),this.debug=new Io(this.debugConfig),this.forcedThemeMode=n.themeMode,this.settingsManager=_f(n.defaultThemeMode?{themeMode:n.defaultThemeMode}:{}),this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),typeof window<"u"){let o=Ow(window),l=n.sweetlink,c=l?.appPort??kw(window.location,o);this.currentAppPort=c,this.baseWsPort=l?.wsPort??sa(o.wsPort)??Rw(c),this.wsUrlCandidates=GK(window.location,{wsUrl:l?.wsUrl??o.wsUrl,wsPort:l?.wsPort??o.wsPort,wsPath:l?.wsPath??o.wsPath,fallbackPort:this.baseWsPort})}else this.currentAppPort=0,this.baseWsPort=9223,this.wsUrlCandidates=[`ws://localhost:${9223}`];this.options={position:n.position??"bottom-left",accentColor:n.accentColor??H.primary,showMetrics:{breakpoint:n.showMetrics?.breakpoint??!0,fcp:n.showMetrics?.fcp??!0,lcp:n.showMetrics?.lcp??!0,cls:n.showMetrics?.cls??!0,inp:n.showMetrics?.inp??!0,pageSize:n.showMetrics?.pageSize??!0},showScreenshot:n.showScreenshot??!0,showConsoleBadges:n.showConsoleBadges??!0,showTooltips:n.showTooltips??!0,saveLocation:n.saveLocation??"auto",screenshotQuality:n.screenshotQuality??.65,sizeOverrides:n.sizeOverrides},this.debug.lifecycle("GlobalDevBar constructed",{options:this.options})}getLogCounts(){return{errorCount:Ar.getErrorCount(),warningCount:Ar.getWarningCount(),infoCount:Ar.getInfoCount()}}resetPositionStyles(n){Object.assign(n.style,{top:"",bottom:"",left:"",right:"",transform:""})}createCollapsedBadge(n,o,l){let c=document.createElement("span");return Object.assign(c.style,{position:"absolute",top:"-6px",right:l,minWidth:"16px",height:"16px",padding:"0 4px",borderRadius:"9999px",backgroundColor:o,color:ue.white,fontSize:"0.5625rem",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center"}),c.textContent=n>99?"!":String(n),c}static registerControl(n){A.customControls=A.customControls.filter(l=>l.id!==n.id),A.customControls.push(n);let o=Ra();o&&o.render()}static unregisterControl(n){A.customControls=A.customControls.filter(l=>l.id!==n);let o=Ra();o&&o.render()}static getControls(){return[...A.customControls]}static clearControls(){A.customControls=[];let n=Ra();n&&n.render()}init(){typeof window>"u"||this.destroyed||(this.debug.lifecycle("Initializing DevBar"),this.injectStyles(),this.consoleLogs=Ar.getLogs(),this.debug.lifecycle("Copied console logs",{count:this.consoleLogs.length}),this.logChangeListener=()=>{this.consoleLogs=Ar.getLogs(),this.overlayElement||this.render()},Ar.addListener(this.logChangeListener),ZB(this),eC(this),this.connectWebSocket(),Yw(this),$w(this),Xw(this),this.render(),this.debug.lifecycle("DevBar initialized successfully"))}getPosition(){return this.options.position}destroy(){this.debug.lifecycle("Destroying DevBar"),this.destroyed=!0,this.reconnectAttempts=Al,this.reconnectTimeout&&clearTimeout(this.reconnectTimeout),this.ws&&this.ws.close(),this.screenshotTimeout&&clearTimeout(this.screenshotTimeout),this.copiedPathTimeout&&clearTimeout(this.copiedPathTimeout),this.designReviewTimeout&&clearTimeout(this.designReviewTimeout),this.outlineTimeout&&clearTimeout(this.outlineTimeout),this.schemaTimeout&&clearTimeout(this.schemaTimeout),this.consoleLogsTimeout&&clearTimeout(this.consoleLogsTimeout),this.a11yTimeout&&clearTimeout(this.a11yTimeout),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.keydownHandler&&window.removeEventListener("keydown",this.keydownHandler),this.fcpObserver&&this.fcpObserver.disconnect(),this.lcpObserver&&this.lcpObserver.disconnect(),this.clsObserver&&this.clsObserver.disconnect(),this.inpObserver&&this.inpObserver.disconnect(),this.themeMediaQuery&&this.themeMediaHandler&&this.themeMediaQuery.removeEventListener("change",this.themeMediaHandler),this.logChangeListener&&(Ar.removeListener(this.logChangeListener),this.logChangeListener=null),Ar.stop(),this.container&&(this.container.remove(),this.container=null),this.overlayElement&&(this.overlayElement.remove(),this.overlayElement=null,document.body.style.overflow=""),this.debug.lifecycle("DevBar destroyed")}injectStyles(){let n="devbar-styles";if(!document.getElementById(n)){let o=document.createElement("style");o.id=n,o.textContent=jw,document.head.appendChild(o)}}connectWebSocket(n){_a(this,n)}handleNotification(n,o,l){vi(this,n,o,l)}applySettings(n){let o=this.forcedThemeMode?{...n,themeMode:this.forcedThemeMode}:n,l=this.themeMode;this.forcedThemeMode&&this.settingsManager.get("themeMode")!==this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),this.themeMode=o.themeMode,this.compactMode=$p(o.compactMode),this.options.position=o.position,this.options.accentColor=o.accentColor,this.options.showScreenshot=o.showScreenshot,this.options.showConsoleBadges=o.showConsoleBadges,this.options.showTooltips=o.showTooltips,this.options.saveLocation=o.saveLocation,this.options.screenshotQuality=o.screenshotQuality??.65,this.options.showMetrics={...o.showMetrics},EA(CA(o.themeMode)),l!==o.themeMode&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:o.themeMode}})),this.render()}clearConsoleLogs(){Ar.clear(),this.consoleLogs=[],this.consoleFilter=null,this.render()}handleScreenshot(n){return CB(this,n)}getThemeMode(){return this.themeMode}setThemeMode(n){Du(this,n)}getColors(){return bf(this.themeMode)}toggleCompactMode(){this.compactMode=!this.compactMode,this.settingsManager.saveSettings({compactMode:this.compactMode}),this.debug.state("Compact mode toggled",{compactMode:this.compactMode}),this.render()}isCompactMode(){return this.compactMode}render(){nC(this,Ar,A.customControls)}},lC="__YTSPAR_DEVBAR_INSTANCE__";function Ra(){return typeof window>"u"?null:window[lC]??null}function e1(A){typeof window>"u"||(window[lC]=A)}function HA(A){let n=Ra();if(n){let l=n.getPosition(),c=A?.position??"bottom-left";if(l===c)return n;n.destroy(),e1(null)}let o=new ar(A);return o.init(),e1(o),o}function t1(){return Ra()}function jK(){let A=Ra();A&&(A.destroy(),e1(null))}var r1=class{entries=[];observer=null;listeners=new Set;maxEntries=200;start(){if(typeof PerformanceObserver>"u"){console.warn("[NetworkMonitor] PerformanceObserver not supported");return}let n=performance.getEntriesByType("resource");for(let o of n)this.addEntry(o);try{this.observer=new PerformanceObserver(o=>{for(let l of o.getEntries())this.addEntry(l);this.notifyListeners()}),this.observer.observe({type:"resource",buffered:!0})}catch(o){console.warn("[NetworkMonitor] Failed to start observer",o)}}stop(){this.observer&&(this.observer.disconnect(),this.observer=null)}addEntry(n){let o={url:n.name,name:this.getResourceName(n.name),initiatorType:n.initiatorType,duration:Math.round(n.duration),transferSize:n.transferSize,encodedBodySize:n.encodedBodySize,decodedBodySize:n.decodedBodySize,startTime:Math.round(n.startTime),responseEnd:Math.round(n.responseEnd)};this.entries.push(o),this.entries.length>this.maxEntries&&(this.entries=this.entries.slice(-this.maxEntries))}getResourceName(n){try{let o=new URL(n),c=o.pathname.split("/").filter(Boolean);return c.length>0?c[c.length-1]:o.hostname}catch{return n.slice(0,50)}}getState(){let n=0;for(let o of this.entries)n+=o.transferSize||0;return{entries:[...this.entries],totalRequests:this.entries.length,totalSize:n,pendingCount:0}}getEntriesByType(n){return this.entries.filter(o=>o.initiatorType===n)}search(n){let o=n.toLowerCase();return this.entries.filter(l=>l.url.toLowerCase().includes(o)||l.name.toLowerCase().includes(o)||l.initiatorType.toLowerCase().includes(o))}clear(){this.entries=[],this.notifyListeners()}subscribe(n){return this.listeners.add(n),()=>this.listeners.delete(n)}notifyListeners(){let n=this.getState();for(let o of this.listeners)o(n)}};var uC="devbar-plugin-app-version";function WK(A,n={}){let{prefix:o="v",variant:l="default",onClick:c}=n;return ar.registerControl({id:uC,label:`${o}${A}`,variant:l,onClick:c?()=>c(A):void 0}),()=>{ar.unregisterControl(uC)}}var n1="devbar-plugin-git-branch",qK=2e3;function zK(A={}){let{prefix:n="\uE0A0",variant:o="info",onClick:l}=A,c=null,h=!1;function g(){if(h)return;let C=t1()?.serverGitBranch??null;C!==c&&(c=C,C?ar.registerControl({id:n1,label:`${n} ${C}`,variant:o,onClick:l?()=>l(C):void 0}):ar.unregisterControl(n1))}g();let v=setInterval(g,qK);return()=>{h=!0,clearInterval(v),ar.unregisterControl(n1)}}var XK="devbar-plugin-release-info";function YK(A){let n=A instanceof Date?A:new Date(A);return Number.isNaN(n.getTime())?null:n}function JK(A){return A instanceof Date?A.toISOString():String(A)}function cC(A,n={}){let o=YK(A);return o?new Intl.DateTimeFormat(n.locale,{dateStyle:"medium",timeStyle:"short",timeZone:n.timeZone}).format(o):JK(A)}function $K(A,n={}){if(n.label)return n.label;let o=cC(A.releasedAt,n);return A.version?`${n.versionPrefix??"v"}${A.version} ${o}`:o}function ZK(A,n={}){let o=[A.version?`Release ${n.versionPrefix??"v"}${A.version}`:"Release",`Released: ${cC(A.releasedAt,n)}`];if(A.changelog&&A.changelog.length>0){o.push("","Changelog");for(let l of A.changelog)o.push(`- ${l}`)}return o.join(`
540
+ `)}function sK(A,n,o,l){A.oninput=()=>{let c=parseFloat(A.value);n.textContent=c.toFixed(2),o.style.width=`${c*100}%`,l.options.screenshotQuality=c},A.onchange=()=>{l.settingsManager.saveSettings({screenshotQuality:l.options.screenshotQuality})}}function lK(A){let{accentColor:n}=A.options,o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{marginTop:"8px"});let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"6px"});let h=document.createElement("span");Object.assign(h.style,{color:H.text,fontSize:"0.6875rem"}),h.textContent="Screenshot Quality",c.appendChild(h);let g=document.createElement("span");Object.assign(g.style,{color:n,fontSize:"0.6875rem",fontFamily:"monospace",minWidth:"28px",textAlign:"right"});let v=A.options.screenshotQuality;g.textContent=v.toFixed(2),c.appendChild(g),l.appendChild(c);let b=document.createElement("div");Object.assign(b.style,{position:"relative",height:"20px"});let C=document.createElement("div");Object.assign(C.style,{position:"absolute",top:"50%",left:"0",right:"0",height:"2px",transform:"translateY(-50%)",borderRadius:"1px",background:J(o,25),pointerEvents:"none"});let E=document.createElement("div");Object.assign(E.style,{height:"100%",width:`${v*100}%`,borderRadius:"1px",background:n}),C.appendChild(E),b.appendChild(C);let F=document.createElement("input");F.type="range",F.min="0",F.max="1",F.step="0.01",F.value=String(v),Object.assign(F.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",appearance:"none",WebkitAppearance:"none",background:"transparent",outline:"none",cursor:"pointer",margin:"0"});let R=`devbar-quality-${Date.now()}`;F.id=R;let k=document.createElement("style");return k.textContent=iK(R,n),b.appendChild(k),sK(F,g,E,A),b.appendChild(F),l.appendChild(b),l}function uK(A){let{accentColor:n}=A.options,o=Qu("Evidence workflow");return Su(o,"Choose the controls and save behavior an agent sees during inspect, verify, and handoff."),o.appendChild(cK(A)),o.appendChild(gi("Screenshot Button",A.options.showScreenshot,n,()=>{A.options.showScreenshot=!A.options.showScreenshot,A.settingsManager.saveSettings({showScreenshot:A.options.showScreenshot}),A.render()})),o.appendChild(gi("Console Badges",A.options.showConsoleBadges,n,()=>{A.options.showConsoleBadges=!A.options.showConsoleBadges,A.settingsManager.saveSettings({showConsoleBadges:A.options.showConsoleBadges}),A.render()})),o.appendChild(gi("Tooltips",A.options.showTooltips,n,()=>{A.options.showTooltips=!A.options.showTooltips,A.settingsManager.saveSettings({showTooltips:A.options.showTooltips}),A.render()})),o}function cK(A){let{accentColor:n}=A.options,o=document.createElement("div");Object.assign(o.style,{marginBottom:"10px"});let l=document.createElement("div");Object.assign(l.style,{color:H.text,fontSize:"0.6875rem",marginBottom:"6px"}),l.textContent="Save Method",o.appendChild(l);let c=document.createElement("div");Object.assign(c.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",marginBottom:"8px"}),c.textContent="Auto saves artifacts through Sweetlink when connected, otherwise downloads in-browser.",o.appendChild(c);let h=document.createElement("div");return Object.assign(h.style,{display:"flex",gap:"6px",flexWrap:"wrap"}),[{value:"auto",label:"Auto"},{value:"download",label:"Download"},{value:"local",label:"Local"}].forEach(({value:v,label:b})=>{let C=v==="local"&&!A.sweetlinkConnected,E=rC({label:b,isActive:A.options.saveLocation===v,accentColor:n,disabled:C,disabledTitle:"Sweetlink not connected",onClick:()=>{A.options.saveLocation=v,A.settingsManager.saveSettings({saveLocation:v}),A.render()}});h.appendChild(E)}),o.appendChild(h),o}function dK(A){let{accentColor:n}=A.options,o=Qu("Metrics");return Su(o,"Keep the toolbar focused by hiding metrics that are not useful now."),[{key:"breakpoint",label:"Breakpoint"},{key:"fcp",label:"FCP"},{key:"lcp",label:"LCP"},{key:"cls",label:"CLS"},{key:"inp",label:"INP"},{key:"pageSize",label:"Page Size"}].forEach(({key:c,label:h})=>{let g=A.options.showMetrics[c]??!0;o.appendChild(gi(h,g,n,()=>{A.options.showMetrics[c]=!A.options.showMetrics[c],A.settingsManager.saveSettings({showMetrics:{breakpoint:A.options.showMetrics.breakpoint??!0,fcp:A.options.showMetrics.fcp??!0,lcp:A.options.showMetrics.lcp??!0,cls:A.options.showMetrics.cls??!0,inp:A.options.showMetrics.inp??!0,pageSize:A.options.showMetrics.pageSize??!0}}),A.render()}))}),o}function fK(A){let n=H.textSecondary,o=document.createElement("div");Object.assign(o.style,{padding:"10px 14px",borderTop:`1px solid ${J(n,13)}`});let l=rn({color:H.textMuted,text:"Reset to Defaults",padding:"6px 12px",fontSize:"0.625rem"});Object.assign(l.style,{width:"100%",justifyContent:"center",border:"1px solid transparent"});let c=H.textMuted;return l.onmouseenter=()=>{l.style.border=`1px solid ${c}`,l.style.backgroundColor=J(c,6)},l.onmouseleave=()=>{l.style.border="1px solid transparent",l.style.backgroundColor="transparent"},l.onclick=()=>{A.settingsManager.resetToDefaults();let h=pa;A.applySettings(h)},o.appendChild(l),o}function Qu(A,n=!0){let o=H.textSecondary,l=document.createElement("div");Object.assign(l.style,{padding:"10px 14px",borderBottom:n?`1px solid ${J(o,13)}`:"none"});let c=document.createElement("div");return Object.assign(c.style,{color:o,fontSize:"0.625rem",textTransform:"uppercase",letterSpacing:"0.1em",marginBottom:"8px"}),c.textContent=A,l.appendChild(c),l}function Su(A,n){let o=document.createElement("div");Object.assign(o.style,{color:H.textMuted,fontSize:"0.5625rem",lineHeight:"1.4",margin:"-2px 0 10px"}),o.textContent=n,A.appendChild(o)}function rC(A){let{label:n,isActive:o,accentColor:l,disabled:c,disabledTitle:h,onClick:g}=A,v=H.textSecondary,b=document.createElement("button");return Object.assign(b.style,{padding:"6px 10px",minHeight:"28px",backgroundColor:o?J(l,13):"transparent",border:`1px solid ${o?l:"transparent"}`,borderRadius:"4px",color:o?l:v,fontFamily:ut,fontSize:"0.625rem",cursor:c?"not-allowed":"pointer",transition:"all 150ms",opacity:c?"0.5":"1"}),b.textContent=n,c?h&&(b.title=h):o||(b.onmouseenter=()=>{b.style.borderColor=`${v}`,b.style.backgroundColor=J(v,6)},b.onmouseleave=()=>{b.style.borderColor="transparent",b.style.backgroundColor="transparent"}),b.onclick=()=>{c||g()},b}function gi(A,n,o,l){let c=document.createElement("div");Object.assign(c.style,{display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:"28px",marginBottom:"6px",gap:"12px"});let h=document.createElement("span");Object.assign(h.style,{color:H.text,fontSize:"0.6875rem"}),h.textContent=A,c.appendChild(h);let g=document.createElement("button");Object.assign(g.style,{width:"32px",height:"18px",borderRadius:"9px",border:`1px solid ${n?o:H.border}`,backgroundColor:n?o:H.bgInput,position:"relative",cursor:"pointer",transition:"all 150ms",flexShrink:"0",boxSizing:"border-box"});let v=document.createElement("span");return Object.assign(v.style,{position:"absolute",top:"2px",left:n?"14px":"2px",width:"12px",height:"12px",borderRadius:"50%",backgroundColor:n?"#fff":H.textMuted,boxShadow:"0 1px 2px rgba(0,0,0,0.2)",transition:"left 150ms, background-color 150ms"}),g.appendChild(v),g.onclick=l,c.appendChild(g),c}function pK(A,n){if(A.consoleFilter){let o=A.consoleFilter;qt(A),A.consoleFilter=o,GB(A,n)}else A.showOutlineModal?(qt(A),A.showOutlineModal=!0,zB(A)):A.showSchemaModal?(qt(A),A.showSchemaModal=!0,YB(A)):A.showA11yModal?(qt(A),A.showA11yModal=!0,JB(A)):A.showDesignReviewConfirm?(qt(A),A.showDesignReviewConfirm=!0,$B(A)):A.showSettingsPopover&&(qt(A),A.showSettingsPopover=!0,tC(A))}function nC(A,n,o){if(!A.destroyed&&!(typeof document>"u")&&!Qf){Sf(!0),tb(A),A.overlayElement&&(A.overlayElement.remove(),A.overlayElement=null,document.body.style.overflow=""),A.container&&A.container.remove(),A.container=document.createElement("div"),A.container.setAttribute("data-devbar","true"),A.container.setAttribute("role","toolbar"),A.container.setAttribute("aria-label","DevBar"),document.body.appendChild(A.container);try{A.collapsed?ub(A):A.compactMode?VB(A,o):jB(A,o)}catch(l){console.error("[GlobalDevBar] Render failed:",l)}try{pK(A,n)}catch(l){console.error("[GlobalDevBar] Overlay render failed:",l)}A.overlayElement&&(document.body.style.overflow="hidden"),Sf(!1)}}function AC(A){if(A.pendingViewerWindow){try{A.pendingViewerWindow.close()}catch{}A.pendingViewerWindow=null}}function oC(A){return`ws://localhost:${A.baseWsPort}`}function Zp(A){return A.wsUrlCandidates?.length?A.wsUrlCandidates:[oC(A)]}function gK(A,n){return typeof n=="string"?n:typeof n=="number"?`ws://localhost:${n}`:Zp(A)[0]??oC(A)}function iC(A){try{let n=new URL(A);if(n.protocol!=="ws:"&&n.protocol!=="wss:")return null;let o=Number(n.port);return Number.isInteger(o)&&o>0?o:null}catch{return null}}function aC(A,n,o=100){let l=Zp(A),c=l.indexOf(n);if(c>=0&&c+1<l.length){setTimeout(()=>_a(A,l[c+1]),o);return}let h=iC(n);if(h!==null){let g=h+1;if(g<A.baseWsPort+10){setTimeout(()=>_a(A,g),o);return}}setTimeout(()=>_a(A),Nw)}function _a(A,n){if(A.destroyed)return;let o=gK(A,n),l=iC(o);A.debug.ws("Connecting to WebSocket",{url:o,port:l??"same-origin",appPort:A.currentAppPort});let c=new WebSocket(o),h=!1;A.ws=c,A.wsVerified=!1,c.onopen=()=>{A.debug.ws("WebSocket socket opened, awaiting server-info"),c.send(JSON.stringify({type:"browser-client-ready"}))},c.onmessage=async g=>{try{let v=JSON.parse(g.data);if(v.type==="server-info"){let C=v.appPort;if(!(C===null||C===A.currentAppPort)){A.debug.ws("Server mismatch",{serverAppPort:C,currentAppPort:A.currentAppPort,targetUrl:o}),h=!0,c.close(),aC(A,o);return}A.wsVerified=!0,A.sweetlinkConnected=!0,A.reconnectAttempts=0,A.serverProjectDir=v.projectDir??null,A.serverGitBranch=v.gitBranch??null,A.serverAppName=v.appName??null,A.debug.ws("Server verified",{appPort:C??"any",projectDir:A.serverProjectDir,gitBranch:A.serverGitBranch}),A.settingsManager.setWebSocket(c),A.settingsManager.setConnected(!0),c.send(JSON.stringify({type:"load-settings"})),A.render();return}if(!A.wsVerified){A.debug.ws("Ignoring command before verification",{type:v.type});return}if(v.type==="hifi-screenshot"){A.capturing=!1,A.render();return}if(v.type==="record-start-response"&&v.success){A.recordingActive=!0,A.recordingSessionId=v.sessionId??null,A.recordingStartedAt=Date.now(),A.recordingTimer=setInterval(()=>A.render(),1e3),A.render();return}if(v.type==="record-stop-response"||v.type==="record-stop"){if(A.recordingActive=!1,A.recordingTimer&&clearInterval(A.recordingTimer),A.recordingTimer=null,A.recordingStartedAt=null,v.success){let E=v.viewerUrl;E&&A.pendingViewerWindow?(A.pendingViewerWindow.location.href=E,A.pendingViewerWindow=null):AC(A),E&&(A.lastViewerPath=E)}else AC(A);A.render();return}let b=v;A.debug.ws("Received command",{type:b.type}),await KK(A,b)}catch(v){console.error("[GlobalDevBar] Error handling command:",v)}},c.onclose=()=>{if(A.wsVerified){if(A.sweetlinkConnected=!1,A.wsVerified=!1,A.serverProjectDir=null,A.settingsManager.setConnected(!1),A.debug.ws("WebSocket disconnected"),A.render(),!A.destroyed&&A.reconnectAttempts<Al){let g=Hw*2**A.reconnectAttempts;A.reconnectAttempts++,A.debug.ws("Scheduling reconnect",{attempt:A.reconnectAttempts,delayMs:g}),A.reconnectTimeout=setTimeout(()=>_a(A,A.baseWsPort),Math.min(g,Mw))}}else if(!A.destroyed&&!h){let g=Zp(A),v=g.indexOf(o);v>=0&&v+1<g.length&&(A.debug.ws("WebSocket closed before verification, trying next candidate"),aC(A,o))}},c.onerror=()=>{A.debug.ws("WebSocket error")}}function Uu(A,n,o=la){return(l,c)=>{vi(l,A,c[n],o)}}function Tu(A,n){return(o,l)=>{n&&(o[n]=!1),console.error(`[GlobalDevBar] ${A} failed:`,l.error),n&&o.render()}}var vK=Uu("outline","outlinePath"),wK=Uu("schema","schemaPath"),bK=Uu("consoleLogs","consoleLogsPath"),yK=Uu("a11y","a11yPath"),BK=(A,n)=>{A.capturing=!1,vi(A,"screenshot",n.path,la)},CK=Tu("Outline save"),EK=Tu("Schema save"),xK=Tu("Console logs save","savingConsoleLogs"),FK=Tu("A11y save","savingA11yAudit");async function DK(A,n){let o=n.selector&&document.querySelector(n.selector)||document.body,c=await(await LA())(o,{logging:!1,useCORS:!0,allowTaint:!0});A.send(JSON.stringify({success:!0,data:{screenshot:c.toDataURL("image/png"),width:c.width,height:c.height,selector:n.selector||"body"},timestamp:Date.now()}))}function QK(A,n,o){let l=A.consoleLogs;if(o.filter){let c=o.filter.toLowerCase();l=l.filter(h=>h.level.includes(c)||h.message.toLowerCase().includes(c))}n.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}function SK(A,n){if(n.selector){let l=Array.from(document.querySelectorAll(n.selector)).map(c=>n.property?c[n.property]??null:{tagName:c.tagName,className:c.className,id:c.id,textContent:c.textContent?.trim().slice(0,100)});A.send(JSON.stringify({success:!0,data:{count:l.length,results:l},timestamp:Date.now()}))}}function UK(A,n){if(n.code&&typeof n.code=="string"&&n.code.length<=1e4)try{let l=(0,eval)(n.code);A.send(JSON.stringify({success:!0,data:l,timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Execution failed",timestamp:Date.now()}))}}async function TK(A,n){try{let o=await To(n.forceRefresh),l={critical:0,serious:0,moderate:0,minor:0};for(let c of o.violations)l[c.impact]=(l[c.impact]||0)+1;A.send(JSON.stringify({success:!0,data:{result:o,summary:{totalViolations:o.violations.length,totalPasses:o.passes.length,totalIncomplete:o.incomplete.length,byImpact:l},url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(o){A.send(JSON.stringify({success:!1,error:o instanceof Error?o.message:"Accessibility audit failed",timestamp:Date.now()}))}}function IK(A){try{let n=wA(),o=Mn(n);A.send(JSON.stringify({success:!0,data:{outline:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Outline extraction failed",timestamp:Date.now()}))}}function _K(A){try{let n=bA(),o=yA(n);A.send(JSON.stringify({success:!0,data:{schema:n,markdown:o,url:window.location.href,title:document.title,timestamp:Date.now()},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Schema extraction failed",timestamp:Date.now()}))}}async function RK(A){try{let o=performance.getEntriesByType("paint").find(q=>q.name==="first-contentful-paint"),l=o?Math.round(o.startTime):null,c=q=>new Promise(ae=>{try{let Z=[],he=new PerformanceObserver(Se=>{Z.push(...Se.getEntries())});he.observe({type:q,buffered:!0}),setTimeout(()=>{he.disconnect(),ae(Z)},0)}catch{ae([])}}),[h,g,v]=await Promise.all([c("largest-contentful-paint"),c("layout-shift"),c("event")]),b=h.length>0?Math.round(h[h.length-1].startTime):null,C=null;if(g.length>0){let q=0;for(let ae of g){let Z=ae;Z.hadRecentInput||(q+=Z.value)}C=Math.round(q*1e3)/1e3}let E=null;if(v.length>0){let q=0;for(let ae of v){let Z=ae;Z.duration>q&&(q=Z.duration)}E=Math.round(q)}let F=null,R=performance.getEntriesByType("resource"),k=0;for(let q of R)k+=q.transferSize||0;k>0&&(F=k);let G={fcp:l,lcp:b,cls:C,inp:E,pageSize:F,url:window.location.href,title:document.title,timestamp:Date.now()},W=[];l!==null&&W.push(`FCP: ${l}ms`),b!==null&&W.push(`LCP: ${b}ms`),C!==null&&W.push(`CLS: ${C}`),E!==null&&W.push(`INP: ${E}ms`),F!==null&&W.push(`Page size: ${Math.round(F/1024)}KB`),A.send(JSON.stringify({success:!0,data:{vitals:G,summary:W.join(", ")||"No metrics available yet"},timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Vitals collection failed",timestamp:Date.now()}))}}function OK(A){try{window.location.reload(),A.send(JSON.stringify({success:!0,timestamp:Date.now()}))}catch(n){A.send(JSON.stringify({success:!1,error:n instanceof Error?n.message:"Refresh failed",timestamp:Date.now()}))}}function kK(A,n){A.designReviewInProgress=!1,vi(A,"designReview",n.reviewPath,pf)}function LK(A,n){A.designReviewInProgress=!1,A.designReviewError=n.error||"Unknown error",console.error("[GlobalDevBar] Design review failed:",n.error),A.designReviewErrorTimeout&&clearTimeout(A.designReviewErrorTimeout),A.designReviewErrorTimeout=setTimeout(()=>{A.designReviewError=null,A.render()},pf),A.render()}function HK(A,n){let o=n;A.apiKeyStatus={configured:o.configured??!1,model:o.model,pricing:o.pricing},A.render()}function MK(A,n){VK(A,n.settings)}function NK(A,n){A.debug.state("Settings saved to server",{path:n.settingsPath})}function PK(A){console.error("[GlobalDevBar] Settings operation failed:",A.error)}async function KK(A,n){let o=A.ws;if(!(!o||o.readyState!==WebSocket.OPEN))switch(n.type){case"screenshot":await DK(o,n);break;case"get-logs":QK(A,o,n);break;case"query-dom":SK(o,n);break;case"exec-js":UK(o,n);break;case"get-a11y":await TK(o,n);break;case"get-outline":IK(o);break;case"get-schema":_K(o);break;case"get-vitals":await RK(o);break;case"refresh":OK(o);break;case"screenshot-saved":BK(A,n);break;case"design-review-saved":kK(A,n);break;case"design-review-error":LK(A,n);break;case"api-key-status":HK(A,n);break;case"outline-saved":vK(A,n);break;case"outline-error":CK(A,n);break;case"schema-saved":wK(A,n);break;case"schema-error":EK(A,n);break;case"console-logs-saved":bK(A,n);break;case"console-logs-error":xK(A,n);break;case"a11y-saved":yK(A,n);break;case"a11y-error":FK(A,n);break;case"settings-loaded":MK(A,n);break;case"settings-saved":NK(A,n);break;case"settings-error":PK(n);break;default:break}}function vi(A,n,o,l){if(o){switch(n){case"screenshot":A.lastScreenshot=o,A.screenshotTimeout&&clearTimeout(A.screenshotTimeout),A.screenshotTimeout=setTimeout(()=>{A.lastScreenshot=null,A.render()},l);break;case"designReview":A.lastDesignReview=o,A.designReviewTimeout&&clearTimeout(A.designReviewTimeout),A.designReviewTimeout=setTimeout(()=>{A.lastDesignReview=null,A.render()},l);break;case"outline":A.savingOutline=!1,A.lastOutline=o,A.outlineTimeout&&clearTimeout(A.outlineTimeout),A.outlineTimeout=setTimeout(()=>{A.lastOutline=null,A.render()},l);break;case"schema":A.savingSchema=!1,A.lastSchema=o,A.schemaTimeout&&clearTimeout(A.schemaTimeout),A.schemaTimeout=setTimeout(()=>{A.lastSchema=null,A.render()},l);break;case"consoleLogs":A.savingConsoleLogs=!1,A.lastConsoleLogs=o,A.consoleLogsTimeout&&clearTimeout(A.consoleLogsTimeout),A.consoleLogsTimeout=setTimeout(()=>{A.lastConsoleLogs=null,A.render()},l);break;case"a11y":A.savingA11yAudit=!1,A.lastA11yAudit=o,A.a11yTimeout&&clearTimeout(A.a11yTimeout),A.a11yTimeout=setTimeout(()=>{A.lastA11yAudit=null,A.render()},l);break}A.render()}}function VK(A,n){if(!n){A.debug.state("No server settings found, using local");return}A.debug.state("Settings loaded from server",n),A.settingsManager.handleSettingsLoaded(n),A.applySettings(n)}function GK(A,n){let o=[],l=h=>{h&&!o.includes(h)&&o.push(h)};l(n.wsUrl),n.wsPath&&l(Lw(A,n.wsPath));let c=sa(n.wsPort)??n.fallbackPort;return l(`ws://localhost:${c}`),o}var Ar=new nl({trackCounts:!0});Ar.importEarlyLogs();Ar.start();Ar.startErrorHandlers();var ar=class A{static CONTROLS_KEY="__YTSPAR_DEVBAR_CONTROLS__";static get customControls(){return typeof window>"u"?[]:window[A.CONTROLS_KEY]??[]}static set customControls(n){typeof window<"u"&&(window[A.CONTROLS_KEY]=n)}options;forcedThemeMode;debugConfig;debug;container=null;ws=null;consoleLogs=[];sweetlinkConnected=!1;sweetlinkAutoConnect=!0;collapsed=!1;capturing=!1;copiedToClipboard=!1;copiedPath=!1;lastScreenshot=null;designReviewInProgress=!1;lastDesignReview=null;designReviewError=null;showDesignReviewConfirm=!1;apiKeyStatus=null;lastOutline=null;lastSchema=null;savingOutline=!1;savingSchema=!1;consoleFilter=null;savingConsoleLogs=!1;lastConsoleLogs=null;consoleLogsTimeout;showOutlineModal=!1;showSchemaModal=!1;showA11yModal=!1;a11yLoading=!1;lastA11yAudit=null;savingA11yAudit=!1;a11yTimeout=null;recordingActive=!1;recordingSessionId=null;recordingStartedAt=null;recordingTimer=null;lastViewerPath=null;pendingViewerWindow=null;demoActive=!1;demoTitle=null;demoSectionCount=0;rulerMode=!1;rulerOverlay=null;rulerPinnedElements=[];rulerCleanup=null;activeTooltips=new Set;breakpointInfo=null;perfStats=null;lcpValue=null;clsValue=0;inpValue=0;reconnectAttempts=0;currentAppPort;baseWsPort;wsUrlCandidates;wsVerified=!1;serverProjectDir=null;serverGitBranch=null;serverAppName=null;lastDotPosition=null;reconnectTimeout=null;screenshotTimeout=null;copiedPathTimeout=null;designReviewTimeout=null;designReviewErrorTimeout=null;outlineTimeout=null;schemaTimeout=null;resizeHandler=null;keydownHandler=null;fcpObserver=null;lcpObserver=null;clsObserver=null;inpObserver=null;destroyed=!1;themeMode="system";themeMediaQuery=null;themeMediaHandler=null;compactMode=!1;showSettingsPopover=!1;overlayElement=null;settingsManager;logChangeListener=null;constructor(n={}){if(this.debugConfig=Ef(n.debug),this.debug=new Io(this.debugConfig),this.forcedThemeMode=n.themeMode,this.settingsManager=_f(n.defaultThemeMode?{themeMode:n.defaultThemeMode}:{}),this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),typeof window<"u"){let o=Ow(window),l=n.sweetlink,c=l?.appPort??kw(window.location,o);this.currentAppPort=c,this.baseWsPort=l?.wsPort??sa(o.wsPort)??Rw(c),this.wsUrlCandidates=GK(window.location,{wsUrl:l?.wsUrl??o.wsUrl,wsPort:l?.wsPort??o.wsPort,wsPath:l?.wsPath??o.wsPath,fallbackPort:this.baseWsPort}),this.sweetlinkAutoConnect=l?.autoConnect??!0}else this.currentAppPort=0,this.baseWsPort=9223,this.wsUrlCandidates=[`ws://localhost:${9223}`];this.options={position:n.position??"bottom-left",accentColor:n.accentColor??H.primary,showMetrics:{breakpoint:n.showMetrics?.breakpoint??!0,fcp:n.showMetrics?.fcp??!0,lcp:n.showMetrics?.lcp??!0,cls:n.showMetrics?.cls??!0,inp:n.showMetrics?.inp??!0,pageSize:n.showMetrics?.pageSize??!0},showScreenshot:n.showScreenshot??!0,showConsoleBadges:n.showConsoleBadges??!0,showTooltips:n.showTooltips??!0,saveLocation:n.saveLocation??"auto",screenshotQuality:n.screenshotQuality??.65,sizeOverrides:n.sizeOverrides},this.debug.lifecycle("GlobalDevBar constructed",{options:this.options})}getLogCounts(){return{errorCount:Ar.getErrorCount(),warningCount:Ar.getWarningCount(),infoCount:Ar.getInfoCount()}}resetPositionStyles(n){Object.assign(n.style,{top:"",bottom:"",left:"",right:"",transform:""})}createCollapsedBadge(n,o,l){let c=document.createElement("span");return Object.assign(c.style,{position:"absolute",top:"-6px",right:l,minWidth:"16px",height:"16px",padding:"0 4px",borderRadius:"9999px",backgroundColor:o,color:ue.white,fontSize:"0.5625rem",fontWeight:"600",display:"flex",alignItems:"center",justifyContent:"center"}),c.textContent=n>99?"!":String(n),c}static registerControl(n){A.customControls=A.customControls.filter(l=>l.id!==n.id),A.customControls.push(n);let o=Ra();o&&o.render()}static unregisterControl(n){A.customControls=A.customControls.filter(l=>l.id!==n);let o=Ra();o&&o.render()}static getControls(){return[...A.customControls]}static clearControls(){A.customControls=[];let n=Ra();n&&n.render()}init(){typeof window>"u"||this.destroyed||(this.debug.lifecycle("Initializing DevBar"),this.injectStyles(),this.consoleLogs=Ar.getLogs(),this.debug.lifecycle("Copied console logs",{count:this.consoleLogs.length}),this.logChangeListener=()=>{this.consoleLogs=Ar.getLogs(),this.overlayElement||this.render()},Ar.addListener(this.logChangeListener),ZB(this),eC(this),this.sweetlinkAutoConnect?this.connectWebSocket():this.debug.ws("Sweetlink autoConnect disabled; skipping initial WebSocket connect"),Yw(this),$w(this),Xw(this),this.render(),this.debug.lifecycle("DevBar initialized successfully"))}getPosition(){return this.options.position}destroy(){this.debug.lifecycle("Destroying DevBar"),this.destroyed=!0,this.reconnectAttempts=Al,this.reconnectTimeout&&clearTimeout(this.reconnectTimeout),this.ws&&this.ws.close(),this.screenshotTimeout&&clearTimeout(this.screenshotTimeout),this.copiedPathTimeout&&clearTimeout(this.copiedPathTimeout),this.designReviewTimeout&&clearTimeout(this.designReviewTimeout),this.outlineTimeout&&clearTimeout(this.outlineTimeout),this.schemaTimeout&&clearTimeout(this.schemaTimeout),this.consoleLogsTimeout&&clearTimeout(this.consoleLogsTimeout),this.a11yTimeout&&clearTimeout(this.a11yTimeout),this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),this.keydownHandler&&window.removeEventListener("keydown",this.keydownHandler),this.fcpObserver&&this.fcpObserver.disconnect(),this.lcpObserver&&this.lcpObserver.disconnect(),this.clsObserver&&this.clsObserver.disconnect(),this.inpObserver&&this.inpObserver.disconnect(),this.themeMediaQuery&&this.themeMediaHandler&&this.themeMediaQuery.removeEventListener("change",this.themeMediaHandler),this.logChangeListener&&(Ar.removeListener(this.logChangeListener),this.logChangeListener=null),Ar.stop(),this.container&&(this.container.remove(),this.container=null),this.overlayElement&&(this.overlayElement.remove(),this.overlayElement=null,document.body.style.overflow=""),this.debug.lifecycle("DevBar destroyed")}injectStyles(){let n="devbar-styles";if(!document.getElementById(n)){let o=document.createElement("style");o.id=n,o.textContent=jw,document.head.appendChild(o)}}connectWebSocket(n){_a(this,n)}handleNotification(n,o,l){vi(this,n,o,l)}applySettings(n){let o=this.forcedThemeMode?{...n,themeMode:this.forcedThemeMode}:n,l=this.themeMode;this.forcedThemeMode&&this.settingsManager.get("themeMode")!==this.forcedThemeMode&&this.settingsManager.saveSettingsNow({themeMode:this.forcedThemeMode}),this.themeMode=o.themeMode,this.compactMode=$p(o.compactMode),this.options.position=o.position,this.options.accentColor=o.accentColor,this.options.showScreenshot=o.showScreenshot,this.options.showConsoleBadges=o.showConsoleBadges,this.options.showTooltips=o.showTooltips,this.options.saveLocation=o.saveLocation,this.options.screenshotQuality=o.screenshotQuality??.65,this.options.showMetrics={...o.showMetrics},EA(CA(o.themeMode)),l!==o.themeMode&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("devbar-theme-change",{detail:{mode:o.themeMode}})),this.render()}clearConsoleLogs(){Ar.clear(),this.consoleLogs=[],this.consoleFilter=null,this.render()}handleScreenshot(n){return CB(this,n)}getThemeMode(){return this.themeMode}setThemeMode(n){Du(this,n)}getColors(){return bf(this.themeMode)}toggleCompactMode(){this.compactMode=!this.compactMode,this.settingsManager.saveSettings({compactMode:this.compactMode}),this.debug.state("Compact mode toggled",{compactMode:this.compactMode}),this.render()}isCompactMode(){return this.compactMode}render(){nC(this,Ar,A.customControls)}},lC="__YTSPAR_DEVBAR_INSTANCE__";function Ra(){return typeof window>"u"?null:window[lC]??null}function e1(A){typeof window>"u"||(window[lC]=A)}function HA(A){let n=Ra();if(n){let l=n.getPosition(),c=A?.position??"bottom-left";if(l===c)return n;n.destroy(),e1(null)}let o=new ar(A);return o.init(),e1(o),o}function t1(){return Ra()}function jK(){let A=Ra();A&&(A.destroy(),e1(null))}var r1=class{entries=[];observer=null;listeners=new Set;maxEntries=200;start(){if(typeof PerformanceObserver>"u"){console.warn("[NetworkMonitor] PerformanceObserver not supported");return}let n=performance.getEntriesByType("resource");for(let o of n)this.addEntry(o);try{this.observer=new PerformanceObserver(o=>{for(let l of o.getEntries())this.addEntry(l);this.notifyListeners()}),this.observer.observe({type:"resource",buffered:!0})}catch(o){console.warn("[NetworkMonitor] Failed to start observer",o)}}stop(){this.observer&&(this.observer.disconnect(),this.observer=null)}addEntry(n){let o={url:n.name,name:this.getResourceName(n.name),initiatorType:n.initiatorType,duration:Math.round(n.duration),transferSize:n.transferSize,encodedBodySize:n.encodedBodySize,decodedBodySize:n.decodedBodySize,startTime:Math.round(n.startTime),responseEnd:Math.round(n.responseEnd)};this.entries.push(o),this.entries.length>this.maxEntries&&(this.entries=this.entries.slice(-this.maxEntries))}getResourceName(n){try{let o=new URL(n),c=o.pathname.split("/").filter(Boolean);return c.length>0?c[c.length-1]:o.hostname}catch{return n.slice(0,50)}}getState(){let n=0;for(let o of this.entries)n+=o.transferSize||0;return{entries:[...this.entries],totalRequests:this.entries.length,totalSize:n,pendingCount:0}}getEntriesByType(n){return this.entries.filter(o=>o.initiatorType===n)}search(n){let o=n.toLowerCase();return this.entries.filter(l=>l.url.toLowerCase().includes(o)||l.name.toLowerCase().includes(o)||l.initiatorType.toLowerCase().includes(o))}clear(){this.entries=[],this.notifyListeners()}subscribe(n){return this.listeners.add(n),()=>this.listeners.delete(n)}notifyListeners(){let n=this.getState();for(let o of this.listeners)o(n)}};var uC="devbar-plugin-app-version";function WK(A,n={}){let{prefix:o="v",variant:l="default",onClick:c}=n;return ar.registerControl({id:uC,label:`${o}${A}`,variant:l,onClick:c?()=>c(A):void 0}),()=>{ar.unregisterControl(uC)}}var n1="devbar-plugin-git-branch",qK=2e3;function zK(A={}){let{prefix:n="\uE0A0",variant:o="info",onClick:l}=A,c=null,h=!1;function g(){if(h)return;let C=t1()?.serverGitBranch??null;C!==c&&(c=C,C?ar.registerControl({id:n1,label:`${n} ${C}`,variant:o,onClick:l?()=>l(C):void 0}):ar.unregisterControl(n1))}g();let v=setInterval(g,qK);return()=>{h=!0,clearInterval(v),ar.unregisterControl(n1)}}var XK="devbar-plugin-release-info";function YK(A){let n=A instanceof Date?A:new Date(A);return Number.isNaN(n.getTime())?null:n}function JK(A){return A instanceof Date?A.toISOString():String(A)}function cC(A,n={}){let o=YK(A);return o?new Intl.DateTimeFormat(n.locale,{dateStyle:"medium",timeStyle:"short",timeZone:n.timeZone}).format(o):JK(A)}function $K(A,n={}){if(n.label)return n.label;let o=cC(A.releasedAt,n);return A.version?`${n.versionPrefix??"v"}${A.version} ${o}`:o}function ZK(A,n={}){let o=[A.version?`Release ${n.versionPrefix??"v"}${A.version}`:"Release",`Released: ${cC(A.releasedAt,n)}`];if(A.changelog&&A.changelog.length>0){o.push("","Changelog");for(let l of A.changelog)o.push(`- ${l}`)}return o.join(`
541
541
  `)}function eV(A,n={}){let o=n.id??XK;return ar.registerControl({id:o,label:$K(A,n),tooltip:()=>ZK(A,n),variant:n.variant??"info",onClick:n.onClick?()=>n.onClick?.(A):void 0}),()=>{ar.unregisterControl(o)}}var dC={showMetrics:{breakpoint:!1,fcp:!1,lcp:!1,cls:!1,inp:!1,pageSize:!1},showScreenshot:!1,showConsoleBadges:!0,showTooltips:!1},fC={showMetrics:{breakpoint:!0,fcp:!0,lcp:!0,cls:!0,inp:!0,pageSize:!0},showScreenshot:!0,showConsoleBadges:!0,showTooltips:!0},pC={showMetrics:{breakpoint:!1,fcp:!0,lcp:!0,cls:!0,inp:!0,pageSize:!0},showScreenshot:!1,showConsoleBadges:!1,showTooltips:!0},hC={showMetrics:{breakpoint:!0,fcp:!1,lcp:!1,cls:!1,inp:!1,pageSize:!1},showScreenshot:!0,showConsoleBadges:!1,showTooltips:!0},mC={showMetrics:{breakpoint:!0,fcp:!0,lcp:!0,cls:!0,inp:!0,pageSize:!0},showScreenshot:!0,showConsoleBadges:!0,showTooltips:!0,debug:!0};function tV(A){return HA({...dC,...A})}function rV(A){return HA({...fC,...A})}function nV(A){return HA({...pC,...A})}function AV(A){return HA({...hC,...A})}function aV(A){return HA({...mC,...A})}function oV(A){try{return{parsed:JSON.parse(A),success:!0}}catch{return{parsed:void 0,success:!1}}}function gC(A){let n=[];for(let o=0;o<A.length;o++){let l=A.key(o);if(l===null)continue;let c=A.getItem(l)??"",{parsed:h,success:g}=oV(c);n.push({key:l,value:c,parsedValue:g?h:void 0,isParseable:g,size:new Blob([c]).size})}return n.sort((o,l)=>o.key.localeCompare(l.key))}function vC(){return typeof localStorage>"u"?[]:gC(localStorage)}function wC(){return typeof sessionStorage>"u"?[]:gC(sessionStorage)}function bC(){return typeof document>"u"||!document.cookie?[]:document.cookie.split(";").map(A=>{let[n,...o]=A.trim().split("="),l=o.join("=");return{name:n.trim(),value:decodeURIComponent(l||""),size:new Blob([l||""]).size}}).filter(A=>A.name).sort((A,n)=>A.name.localeCompare(n.name))}function iV(){return{localStorage:vC(),sessionStorage:wC(),cookies:bC()}}function sV(A,n){typeof localStorage>"u"||localStorage.setItem(A,n)}function lV(A){typeof localStorage>"u"||localStorage.removeItem(A)}function uV(A,n){typeof sessionStorage>"u"||sessionStorage.setItem(A,n)}function cV(A){typeof sessionStorage>"u"||sessionStorage.removeItem(A)}function dV(A){typeof document>"u"||(document.cookie=`${A}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`)}export{pl as ACCENT_COLOR_PRESETS,Me as BUTTON_COLORS,al as CATEGORY_COLORS,pa as DEFAULT_SETTINGS,FA as DEVBAR_LOGO_COLORS,db as DEVBAR_LOGO_PATHS,xA as DEVBAR_LOGO_SHAPES,Rf as DEVBAR_LOGO_VIEWBOX,mt as DEVBAR_THEME,vf as DEVBAR_THEME_LIGHT,Io as DebugLogger,EH as EARLY_CONSOLE_CAPTURE_SCRIPT,ut as FONT_MONO,ar as GlobalDevBar,r1 as NetworkMonitor,ue as PALETTE,mC as PRESET_DEBUG,fC as PRESET_FULL,dC as PRESET_MINIMAL,pC as PRESET_PERFORMANCE,hC as PRESET_RESPONSIVE,gf as STORAGE_KEYS,BA as TAILWIND_BREAKPOINTS,WK as appVersionPlugin,fi as canvasToDataUrl,Bu as copyCanvasToClipboard,JH as createDevBarLogo,hi as delay,dV as deleteCookie,lV as deleteLocalStorageItem,cV as deleteSessionStorageItem,jK as destroyGlobalDevBar,Ar as earlyConsoleCapture,wA as extractDocumentOutline,bA as extractPageSchema,uf as formatArg,cf as formatArgs,Pw as generateThemeCSSVars,bC as getCookies,$H as getDevBarLogoSvg,ua as getEffectiveTheme,t1 as getGlobalDevBar,LA as getHtml2Canvas,ll as getImpactColor,vC as getLocalStorage,wC as getSessionStorage,_f as getSettingsManager,iV as getStorageData,UH as getStoredThemeMode,CA as getTheme,bf as getThemeColors,il as getViolationCounts,zK as gitBranchPlugin,sl as groupViolationsByImpact,aV as initDebug,rV as initFull,HA as initGlobalDevBar,tV as initMinimal,nV as initPerformance,AV as initResponsive,EA as injectThemeCSS,IH as isAxeLoaded,Ef as normalizeDebugConfig,Mn as outlineToMarkdown,Cf as preloadAxe,pi as prepareForCapture,eV as releaseInfoPlugin,Nn as resolveSaveLocation,To as runA11yAudit,yA as schemaToMarkdown,sV as setLocalStorageItem,uV as setSessionStorageItem,wf as setStoredThemeMode};
@@ -28,6 +28,12 @@ export interface DevBarState {
28
28
  overlayElement: HTMLDivElement | null;
29
29
  ws: WebSocket | null;
30
30
  sweetlinkConnected: boolean;
31
+ /**
32
+ * When false, the initial connectWebSocket() call from setup is skipped.
33
+ * Sourced from `options.sweetlink.autoConnect`. Operators can still call
34
+ * `globalDevBar.connectWebSocket()` manually to opt in at runtime.
35
+ */
36
+ sweetlinkAutoConnect: boolean;
31
37
  wsVerified: boolean;
32
38
  serverProjectDir: string | null;
33
39
  serverGitBranch: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/modules/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA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AAS,EACxB,UAAU,EAAE,MAAM,KACf,IAAI,CAAC;IACV,aAAa,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;IAClD,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAgBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/modules/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8KH;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAkB;IAC/C,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,eAAe,GAAG,KAAK,CAAC;IAC9B,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;IAC5B,KAAK,CAAC,mBAAmB,GAAG,KAAK,CAAC;IAClC,KAAK,CAAC,uBAAuB,GAAG,KAAK,CAAC;IACtC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;IAC3B,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;QACxB,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACvB,KAAK,CAAC,YAAY,EAAE,CAAC;YACrB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC5B,CAAC;QACD,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC1B,KAAK,CAAC,mBAAmB,GAAG,EAAE,CAAC;IACjC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/modules/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoLH;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAkB;IAC/C,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,eAAe,GAAG,KAAK,CAAC;IAC9B,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;IAC5B,KAAK,CAAC,mBAAmB,GAAG,KAAK,CAAC;IAClC,KAAK,CAAC,uBAAuB,GAAG,KAAK,CAAC;IACtC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;IAC3B,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;QACxB,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACvB,KAAK,CAAC,YAAY,EAAE,CAAC;YACrB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC5B,CAAC;QACD,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;QAC1B,KAAK,CAAC,mBAAmB,GAAG,EAAE,CAAC;IACjC,CAAC;AACH,CAAC"}
package/dist/types.d.ts CHANGED
@@ -77,6 +77,16 @@ export interface GlobalDevBarOptions {
77
77
  wsUrl?: string;
78
78
  /** Same-origin WebSocket path exposed by framework integrations. */
79
79
  wsPath?: string;
80
+ /**
81
+ * Whether to automatically attempt the WebSocket connection to the
82
+ * Sweetlink CLI on startup. Default: true.
83
+ *
84
+ * Set to false in projects that load DevBar but don't run the Sweetlink
85
+ * CLI — this silences the `WebSocket connection to 'ws://...' failed:
86
+ * ECONNREFUSED` noise the browser logs on every page load. The user can
87
+ * still opt in at runtime by calling `globalDevBar.connectWebSocket()`.
88
+ */
89
+ autoConnect?: boolean;
80
90
  };
81
91
  /** Enable debug logging. Pass true for all options, or an object for specific options. */
82
92
  debug?: boolean | DebugConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,EACT,aAAa,EACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AAMjC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG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EAAE;QACd,iGAAiG;QACjG,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,8FAA8F;QAC9F,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,6CAA6C;QAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,qEAAqE;IACrE,SAAS,CAAC,EAAE;QACV,mFAAmF;QACnF,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,kFAAkF;QAClF,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,kEAAkE;QAClE,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,oEAAoE;QACpE,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;;;;;;;WAQG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,0FAA0F;IAC1F,KAAK,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CAC/B;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ytspar/devbar",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Development toolbar and utilities with Sweetlink integration - pure vanilla JS, no framework dependencies",