1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9087],{5762:(e,t,r)=>{r.d(t,{Cx:()=>v,JI:()=>h,OC:()=>c,Ok:()=>b,W4:()=>g,dj:()=>m,ls:()=>d,ns:()=>k,nx:()=>f,qh:()=>i,wV:()=>j});var l=r(17263),s=r(57214);let a="km-report-labels-v1",n="km-report-tags",o="km-report-custom-labels",i=["#0044EB","#8B5CF6","#0E9F6E","#F59E0B","#EC4899","#06B6D4","#DC2626","#6B7280"],c={tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",star:"M12 3l2.7 5.6 6.1.8-4.5 4.2 1.1 6-5.4-3-5.4 3 1.1-6L3.2 9.4l6.1-.8L12 3z",flag:"M4 21V4m0 1h12l-2 4 2 4H4",bolt:"M13 2L4 14h6l-1 8 9-12h-6l1-8z",chart:"M4 20h16M7 16v-5m5 5V8m5 8v-3",funnel:"M3 4h18l-7 8v6l-4 2v-8L3 4z",bell:"M6 9a6 6 0 1112 0c0 5 2 6 2 6H4s2-1 2-6M10 20a2 2 0 004 0",target:"M21 12a9 9 0 11-18 0 9 9 0 0118 0zM16 12a4 4 0 11-8 0 4 4 0 018 0z"},d="tag",p={custom:[],assign:{},names:{},filters:{}};function u(){try{let e=(0,l.readScopedItem)(a);if(e){let t=JSON.parse(e);return{...p,...t}}let t={custom:[],assign:{},names:{},filters:{}},r=!1,s=(0,l.readScopedItem)(n);s&&(t.assign=JSON.parse(s),r=!0);let i=(0,l.readScopedItem)(o);return i&&(t.custom=JSON.parse(i),r=!0),r&&((0,l.writeScopedItem)(a,JSON.stringify(t)),(0,l.removeScopedItem)(n),(0,l.removeScopedItem)(o)),t}catch{return{...p}}}function x(e){try{(0,l.writeScopedItem)(a,JSON.stringify(e))}catch{}}function m(){return[...Object.entries((0,s.B4)()).filter(([e])=>"configured"!==e).map(([e,t])=>({id:e,label:t.label,color:t.color,builtin:!0})),...u().custom]}function h(e){let t=m().find(t=>t.id===e);return t?{label:t.label,color:t.color,icon:t.icon}:{label:s.Bl.custom.label,color:s.Bl.custom.color}}function b(e,t,r){let l={id:`c_${e.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,24)}_${Date.now().toString(36)}`,label:e.trim().slice(0,24),color:t,...r&&c[r]?{icon:r}:{}},s=u();return s.custom=[...s.custom,l],x(s),l}function g(e,t){return u().assign[`${e}:${t}`]??[]}function f(e){let t={};for(let[r,l]of Object.entries(u().assign))r.startsWith(`${e}:`)&&(t[Number(r.slice(e.length+1))]=l);return t}function v(e,t,r,l){let s=u(),a=`${e}:${t}`;0===r.length?(delete s.assign[a],delete s.names[a]):(s.assign[a]=r,l&&(s.names[a]=l)),x(s)}function k(e){return u().filters[e]??[]}function j(e,t){let r=u();0===t.length?delete r.filters[e]:r.filters[e]=t,x(r)}},57214:(e,t,r)=>{r.d(t,{B4:()=>n,Bl:()=>s,ue:()=>o});var l=r(17263);let s={growth:{label:"Growth",color:"#0044EB",bg:"#0044EB08",border:"#0044EB"},engagement:{label:"Engagement",color:"#8B5CF6",bg:"#8B5CF608",border:"#8B5CF6"},conversion:{label:"Conversion",color:"#10B981",bg:"#10B98108",border:"#10B981"},health:{label:"Health",color:"#EF4444",bg:"#EF444408",border:"#EF4444"},revenue:{label:"Revenue",color:"#F59E0B",bg:"#F59E0B08",border:"#F59E0B"},custom:{label:"Custom",color:"#6B7280",bg:"#6B728008",border:"#6B7280"},configured:{label:"Configured",color:"#0891B2",bg:"#0891B208",border:"#0891B2"},legacy:{label:"Legacy",color:"#B45309",bg:"#B4530908",border:"#B45309"}},a="km-metric-categories";function n(){try{let e=(0,l.readScopedItem)(a);if(!e)return s;let t=JSON.parse(e),r={...s};for(let[e,l]of Object.entries(t))r[e]={...s[e]??s.custom,...l};return r}catch{return s}}function o(e){(0,l.writeScopedItem)(a,JSON.stringify(e))}},89087:(e,t,r)=>{r.d(t,{Fw:()=>u,qb:()=>x,vw:()=>d,Px:()=>h});var l=r(95155),s=r(12115),a=r(5762),n=r(17263);let o="km-report-stars";function i(){try{let e=(0,n.readScopedItem)(o);return e?JSON.parse(e):{}}catch{return{}}}function c(e){let t=new Set;for(let r of Object.keys(i()))r.startsWith(`${e}:`)&&t.add(Number(r.slice(e.length+1)));return t}function d({tab:e,onTab:t,savedCount:r,createLabel:s="Create new"}){return(0,l.jsx)("div",{className:"flex gap-1 mb-4 border-b",style:{borderColor:"var(--line)"},children:[["saved",`Saved reports${r?` (${r})`:""}`],["create",s],["example","Example"]].map(([r,s])=>(0,l.jsx)("button",{onClick:()=>t(r),"aria-selected":e===r,className:"text-[14px] px-5 py-2.5 -mb-px transition-colors",style:e===r?{color:"var(--acc)",borderBottom:"2.5px solid var(--acc)",fontWeight:700}:{color:"var(--dim)",borderBottom:"2.5px solid transparent"},children:s},r))})}let p=({className:e="h-3 w-3"})=>(0,l.jsx)("svg",{className:e,fill:"none",stroke:"currentColor",strokeWidth:2.2,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16 11V7a4 4 0 00-8 0v4m-2 0h12a1 1 0 011 1v7a2 2 0 01-2 2H7a2 2 0 01-2-2v-7a1 1 0 011-1z"})});function u({label:e,icon:t,color:r,reason:a}
1){let[n,o]=(0,s.useState)(!1);return(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"inline-flex items-center gap-1.5 rounded-lg px-4 py-2.5 text-[13px] font-bold text-white transition-all hover:brightness-110",style:{background:`linear-gradient(120deg, ${r}, color-mix(in srgb, ${r} 55%, #01213A))`},"data-testid":`locked-action-${e.toLowerCase().replace(/[^a-z]+/g,"-")}`,children:[t,e,(0,l.jsx)("span",{className:"ml-1 grid h-5 w-5 place-items-center rounded-full",style:{background:"rgba(255,255,255,0.22)"},children:(0,l.jsx)(p,{})})]}),n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>o(!1)}),(0,l.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1.5 w-72 rounded-xl border bg-card p-3.5 text-left shadow-lg",style:{borderColor:"var(--line)"},children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 text-[12.5px] font-bold",style:{color:"var(--ink)"},children:[(0,l.jsx)("span",{className:"grid h-5 w-5 place-items-center rounded-full",style:{background:`color-mix(in srgb, ${r} 14%, transparent)`,color:r},children:(0,l.jsx)(p,{})}),"Almost yours"]}),(0,l.jsx)("p",{className:"mt-1.5 text-[12px] leading-relaxed",style:{color:"var(--dim)"},children:a})]})]})]})}function x({label:e,reason:t,testId:r="runs-run-locked"}){let[a,n]=(0,s.useState)(!1);return(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>n(e=>!e),className:"flex items-center gap-1.5 rounded-t-lg border border-b-0 px-4 py-2.5 text-[13px] font-semibold shrink-0",style:{background:"color-mix(in srgb, var(--acc) 8%, transparent)",borderColor:"color-mix(in srgb, var(--acc) 25%, transparent)",color:"var(--acc)",marginBottom:"-1px"},"data-testid":r,children:[e,(0,l.jsx)("span",{className:"grid h-4 w-4 place-items-center rounded-full",style:{background:"color-mix(in srgb, var(--acc) 15%, transparent)"},children:(0,l.jsx)(p,{className:"h-2.5 w-2.5"})})]}),a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),(0,l.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1.5 w-72 rounded-xl border bg-card p-3.5 text-left shadow-lg",style:{borderColor:"var(--line)"},children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 text-[12.5px] font-bold",style:{color:"var(--ink)"},children:[(0,l.jsx)("span",{className:"grid h-5 w-5 place-items-center rounded-full",style:{background:"color-mix(in srgb, var(--acc) 14%, transparent)",color:"var(--acc)"},children:(0,l.jsx)(p,{})}),"Almost yours"]}),(0,l.jsx)("p",{className:"mt-1.5 text-[12px] leading-relaxed",style:{color:"var(--dim)"},children:t})]})]})]})}function m(e){if(null==e)return"-";let t=new Date("number"==typeof e?1e3*e:e);return isNaN(t.getTime())?"-":t.toLocaleDateString()}function h({rows:e,onRun:t,onEdit:r,onDelete:d,onSchedule:p,emptyText:u,tagKind:x,accent:b,onCreate:g,createLabel:f}){let v=x??"report",[k,j]=(0,s.useState)(()=>(0,a.dj)()),[y,N]=(0,s.useState)(""),[w,C]=(0,s.useState)("#EC4899"),[B,S]=(0,s.useState)(a.ls),L=e=>k.find(t=>
1t.id===e)??(0,a.JI)(e),[$,M]=(0,s.useState)(()=>(0,a.nx)(v)),[O,E]=(0,s.useState)(null),[z,F]=(0,s.useState)(()=>c(v)),[A,W]=(0,s.useState)(null),[I,D]=(0,s.useState)(""),[J,V]=(0,s.useState)(()=>(0,a.ns)(v));function _(e,t,r){M(l=>{let s=l[e]??[],n=s.includes(t)?s.filter(e=>e!==t):[...s,t];return(0,a.Cx)(v,e,n,r),{...l,[e]:n}})}function T(e){V(t=>{let r=null===e?[]:t.includes(e)?t.filter(t=>t!==e):[...t,e];return(0,a.wV)(v,r),r})}let q=I.trim().toLowerCase(),H=new Map;for(let t of e)for(let e of $[t.id]??[])H.set(e,(H.get(e)??0)+1);let R=J.filter(e=>H.has(e)),U=e.filter(e=>(!q||!!e.name.toLowerCase().includes(q))&&(!(R.length>0)||!!($[e.id]??[]).some(e=>R.includes(e)))).sort((e,t)=>Number(z.has(t.id))-Number(z.has(e.id))),K=(e,t)=>(0,l.jsx)("th",{className:`${t?"text-right":"text-left"} px-5 py-3 font-semibold`,style:{color:"var(--faint)",textTransform:"uppercase",fontSize:11,letterSpacing:"0.06em"},children:e});return(0,l.jsxs)("div",{className:"km-card p-0 mb-5 overflow-hidden",children:[e.length>0&&(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b px-4 py-2.5",style:{borderColor:"var(--line)"},children:[(0,l.jsx)("input",{type:"search",value:I,onChange:e=>D(e.target.value),placeholder:"Search reports...",className:"km-input text-[12.5px] py-1.5 w-56","data-testid":"saved-search"}),H.size>0&&(0,l.jsxs)("span",{className:"flex items-center gap-1.5 flex-wrap","data-testid":"label-filter",children:[(0,l.jsx)("button",{onClick:()=>T(null),className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold border transition-colors",style:0===R.length?{background:"var(--ink)",color:"var(--card)",borderColor:"var(--ink)"}:{background:"var(--card)",color:"var(--dim)",borderColor:"var(--line)"},children:"All"}),[...H.entries()].map(([e,t])=>{let r=L(e),s=R.includes(e);return(0,l.jsxs)("button",{onClick:()=>T(e),className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-semibold border transition-colors",style:s?{background:r.color,color:"#fff",borderColor:r.color}:{background:"var(--card)",color:r.color,borderColor:`color-mix(in srgb, ${r.color} 40%, transparent)`},children:[(0,l.jsx)("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:s?"#fff":r.color}}),r.label,(0,l.jsx)("span",{className:"tabular-nums",style:{opacity:.75},children:t})]},e)})]})]}),0!==e.length||g?e.length>0&&0===U.length?(0,l.jsx)("p",{className:"px-5 py-4 text-[13px]",style:{color:"var(--faint)"},children:"No reports match."}):(0,l.jsxs)("table",{className:"w-full text-[13px]",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{style:{borderBottom:"1px solid var(--line)"},children:[K("Name"),K("Actions"),K("Updated",!0),K("Runs",!0)]})}),(0,l.jsxs)("tbody",{children:[0===e.length&&(0,l.jsx)("tr",{style:{borderBottom:"1px solid var(--line)"},children:(0,l.jsx)("td",{colSpan:4,className:"px-5 py-4 text-[13px]",style:{color:"var(--faint)"},children:u})}),U.map(e=>{let s=($[e.id]??[]).map(L)[0],d=s?.color??b,u=s?.icon?a.OC[s.icon]:void 0;return(0,l.jsxs)("tr",{style:{borderBottom:"1px solid var(--line)"},children:[(0,l.jsx)("td",{className:"px-5 py-3.5 max-w-[420px]",style:{color:"var(--ink)"},children:(0,l.jsxs)("span",{className:"flex items-center gap-2.5 min-w-0",children:[!e.builtin&&(0,l.jsx)("button",{type:"button",onClick:()=>F(function(e,t){let r=i(),l=`${e}:${t}`;r[l]?delete r[l]:r[l]=!0;try{(0,n.writeScopedItem)(o,JSON.stringify(r))}catch{}return c(e)}(v,e.id)),title:z.has(e.id)?"Unstar - stops pinning this report to the top":"Star - pins this report to the top for quick runs","aria-pressed":z.has(e.id),className:"shrink-0 p-0.5 rounded transition-colors hover:bg-line-soft","data-testid":"star-report",children:(0,l.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:z.has(e.id)?"#F59E0B":"none",stroke:z.has(e.id)?"#F59E0B":"var(--faint)",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M12 3l2.7 5.6 6.1.8-4.5 4.2 1.1 6-5.4-3-5.4 3 1.1-6L3.2 9.4l6.1-.8L12 3z"})})}),d&&(0,l.jsx)("span",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-lg",style:{background:`color-mix(in srgb, ${d} 12%, transparent)`,color:d},children:u?(0,l.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:u})}):(0,l.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 17v-6a2 2 0 012-2h2a2 2 0 012 2v6M4 21h16M6 21V9m12 12V5"})})}),(0,l.jsxs)("span",{className:"min-w-0",children:[(0,l.jsx)("span",{className:"block truncate text-[14.5px] font-bold tracking-tight",children:e.name}),null!=e.createdAt||e.createdBy?(0,l.jsxs)("span",{className:"mt-0.5 block truncate text-[11px]",style:{color:"var(--faint)"},children:["Created ",m(e.createdAt),e.createdBy?` by ${e.createdBy}`:""]}):e.builtin?(0,l.jsx)("span",{className:"mt-0.5 block truncate text-[11px]",style:{color:"var(--faint)"},children:"Built-in report by Kissmetrics"}):null]}),e.builtin&&(0,l.jsx)("span",{className:"inline-flex items-center rounded-full px-1.5 py-[1px] text-[9.5px] font-bold uppercase tracking-wide shrink-0",style:{background:"color-mix(in srgb, var(--acc) 12%, transparent)",color:"var(--acc)"},children:"Starter"}),($[e.id]??[]).map(e=>{let t=L(e);return(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-1.5 py-[1px] text-[9.5px] font-bold uppercase tracking-wide shrink-0",style:{background:`${t.color}14`,color:t.color},children:[t.icon&&a.OC[t.icon]&&(0,l.jsx)("svg",{className:"h-2.5 w-2.5",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:a.OC[t.icon]})}),t.label]},e)}),(0,l.jsxs)("span",{className:"relative shrink-0",children:[(0,l.jsx)("button",{onClick:()=>E(O===e.id?null:e.id),className:"p-0.5 rounded hover:bg-line-soft opacity-60 hover:opacity-100",style:{color:"var(--faint)"},title:"Label this report","data-testid":"tag-report",children:(0,l.jsx)("svg",{className:"h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}),O===e.id&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"fixed inset-0 z-30",onClick:()=>E(null)}),(0,l.jsxs)("span",{className:"absolute left-0 top-full z-40 mt-1 block w-56 rounded-lg border bg-card p-2 shadow-lg",style:{borderColor:"var(--line)"},children:[(0,l.jsx)("span",{className:"block px-1 pb-1 text-[9.5px] font-bold uppercase tracking-wider",style:{color:"var(--faint)"},children:"Labels"}),k.map(t=>(0,l.jsxs)("label",{className:"flex items-center gap-2 rounded px-1.5 py-1 text-[12px] curs
1or-pointer hover:bg-line-soft",style:{color:"var(--ink)"},children:[(0,l.jsx)("input",{type:"checkbox",checked:($[e.id]??[]).includes(t.id),onChange:()=>_(e.id,t.id,e.name)}),t.icon&&a.OC[t.icon]?(0,l.jsx)("svg",{className:"h-3 w-3 shrink-0",fill:"none",stroke:t.color,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:a.OC[t.icon]})}):(0,l.jsx)("span",{className:"h-2 w-2 rounded-full shrink-0",style:{background:t.color}}),t.label]},t.id)),(0,l.jsxs)("span",{className:"mt-2 block border-t pt-2",style:{borderColor:"var(--line)"},children:[(0,l.jsx)("input",{value:y,onChange:e=>N(e.target.value),placeholder:"New label...",maxLength:24,className:"km-input w-full text-[12px] py-1.5","data-testid":"new-label-input"}),(0,l.jsx)("span",{className:"mt-1.5 flex items-center gap-1",children:a.qh.map(e=>(0,l.jsx)("button",{onClick:()=>C(e),className:"h-4 w-4 rounded-full transition-transform",style:{background:e,transform:w===e?"scale(1.25)":void 0,outline:w===e?"2px solid var(--ink)":"none",outlineOffset:1},"aria-label":e},e))}),(0,l.jsxs)("span",{className:"mt-1.5 flex items-center gap-1","data-testid":"label-icon-picker",children:[Object.entries(a.OC).map(([e,t])=>(0,l.jsx)("button",{onClick:()=>S(e),className:"grid h-5 w-5 place-items-center rounded transition-colors",style:B===e?{background:`color-mix(in srgb, ${w} 15%, transparent)`,outline:`1.5px solid ${w}`}:void 0,"aria-label":`${e} icon`,title:e,children:(0,l.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:B===e?w:"var(--dim)",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:t})})},e)),(0,l.jsx)("button",{onClick:()=>{let t=y.trim();if(!t)return;let r=(0,a.Ok)(t,w,B);j(e=>[...e,r]),_(e.id,r.id,e.name),N("")},className:"ml-auto rounded-md px-2 py-1 text-[11px] font-bold text-white disabled:opacity-40",style:{background:"var(--acc)"},disabled:!y.trim(),"data-testid":"add-label",children:"Add"})]})]})]})]})]})]})}),(0,l.jsxs)("td",{className:"px-5 py-3.5 whitespace-nowrap",children:[p&&!e.builtin&&(0,l.jsx)("button",{onClick:()=>p(e),className:"text-[12px] font-semibold rounded-full px-3.5 py-1.5 mr-2 transition-colors",style:{background:"color-mix(in srgb, #D97706 12%, transparent)",color:"#B45309"},"data-testid":"saved-schedule",children:"Schedule"}),(0,l.jsx)("button",{onClick:()=>t(e),className:"text-[12px] font-semibold rounded-full px-3.5 py-1.5 mr-2 transition-colors",style:{background:"var(--acc)",color:"var(--card)"},children:"Run"}),r&&!e.builtin&&(0,l.jsx)("button",{onClick:()=>r(e),className:"text-[12px] font-semibold rounded-full px-3.5 py-1.5 mr-2 transition-colors",style:{background:"color-mix(in srgb, var(--acc) 10%, transparent)",color:"var(--acc)"},children:"Edit"}),!e.builtin&&(0,l.jsx)("button",{onClick:()=>W(e),className:"text-[12px] font-medium rounded-full px-3 py-1.5 transition-colors",style:{color:"var(--faint)",border:"1px solid var(--line)"},"data-testid":"saved-delete",children:"Delete"})]}),(0,l.jsx)("td",{className:"px-5 py-3.5 text-right",style:{color:"var(--dim)"},children:m(e.updatedAt)}),(0,l.jsx)("td",{className:"px-5 py-3.5 text-right tabular-nums",style:{color:"var(--dim)"},title:"Times run from this workspace",children:e.runCount??0})]},e.id)}),g&&(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:4,className:"px-5 py-2.5",children:(0,l.jsxs)("button",{type:"button",onClick:g,"data-testid":"table-create-row",className:"flex w-full items-center gap-2.5 rounded-lg border border-dashed px-4 py-3 text-[13px] font-bold transition-colors hover:bg-acc/[0.04]",style:{borderColor:"color-mix(in srgb, var(--acc) 35%, var(--line))",color:"var(--acc)"},children:[(0,l.jsx)("span",{className:"grid h-6 w-6 place-items-center rounded-md",style:{background:"color-mix(in srgb, var(--acc) 12%, transparent)"},children:(0,l.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2.2,viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14M5 12h14"})})}),f??"Create a new report"]})})})]})]}):(0,l.jsx)("p",{className:"px-5 py-4 text-[13px]",style:{color:"var(--faint)"},children:u}),A&&(0,l.jsx)("div",{className:"fixed inset-0 z-[70] grid place-items-center p-4",style:{background:"color-mix(in srgb, var(--ink) 40%, transparent)"},onClick:()=>W(null),"data-testid":"delete-confirm-overlay",children:(0,l.jsxs)("div",{className:"km-card w-full max-w-md p-6",onClick:e=>e.stopPropagation(),role:"alertdialog","aria-label":`Delete ${A.name}?`,children:[(0,l.jsx)("div",{className:"text-[15px] font-bold mb-3",style:{color:"var(--ink)"},children:"Delete this report?"}),(0,l.jsxs)("div",{className:"rounded-xl border px-4 py-3.5 mb-4 flex items-center gap-3",style:{borderColor:"var(--line)",background:"color-mix(in srgb, var(--line) 18%, var(--card))"},children:[(0,l.jsx)("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg",style:{background:`color-mix(in srgb, ${b??"var(--acc)"} 12%, transparent)`,color:b??"var(--acc)"},children:(0,l.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 17v-6a2 2 0 012-2h2a2 2 0 012 2v6M4 21h16M6 21V9m12 12V5"})})}),(0,l.jsxs)("span",{className:"min-w-0",children:[(0,l.jsx)("span",{className:"block truncate text-[14px] font-bold",style:{color:"var(--ink)"},children:A.name}),(0,l.jsxs)("span",{className:"block text-[11.5px]",style:{color:"var(--faint)"},children:[null!=A.createdAt||A.createdBy?(0,l.jsxs)(l.Fragment,{children:["Created ",m(A.createdAt),A.createdBy?` by ${A.createdBy}`:""," \xb7 "]}
1):null,"Updated ",m(A.updatedAt)," \xb7 ",A.runCount??0," runs"]})]})]}),(0,l.jsx)("p",{className:"text-[12.5px] mb-5",style:{color:"var(--dim)"},children:"This removes the saved report for everyone in this workspace. Scheduled deliveries of it stop. This canât be undone."}),(0,l.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,l.jsx)("button",{className:"km-btn text-[13px]",onClick:()=>W(null),"data-testid":"delete-cancel",children:"Keep it"}),(0,l.jsx)("button",{className:"text-[13px] font-semibold rounded-lg px-4 py-2 transition-colors",style:{background:"var(--neg, #DC2626)",color:"#fff"},onClick:()=>{W(null),d(A)},"data-testid":"delete-confirm",children:"Delete report"})]})]})})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.