@siteping/widget 0.12.3 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@ function oe(t){return typeof t=="object"&&t!==null}function R(t,e){return oe(t)&
5
5
  stroke-miterlimit stroke-dasharray stroke-dashoffset stroke-opacity clip-path clip-rule mask offset
6
6
  stop-color stop-opacity gradientunits gradienttransform spreadmethod clippathunits maskunits
7
7
  maskcontentunits`.split(/\s+/)),Mt=/\b(?:(?:rgba?|hsla?|matrix|translate|scale|rotate|skewx|skewy)\([^()\\]*\)|url\(\s*(['"]?)#[\w-]+\1\s*\))/gi,It=t=>!t.includes("\\")&&!t.replace(Mt,"").includes("(");function Me(t){for(let e of [...t.attributes])(!Ft.has(e.name.toLowerCase())||!It(e.value))&&t.removeAttribute(e.name);for(let e of [...t.children])Ot.has(e.localName.toLowerCase())?Me(e):e.remove();}function Nt(t){let e=new DOMParser().parseFromString(t,"text/html").body.firstElementChild;return e?.namespaceURI!=="http://www.w3.org/2000/svg"||e.localName!=="svg"?null:(Me(e),e.setAttribute("aria-hidden","true"),document.importNode(e,true))}function se(t){try{let e=new URL(t,document.baseURI);return /^(https?|mailto):$/.test(e.protocol)?e.href:null}catch{return null}}function Ie(t){return JSON.parse(JSON.stringify(t),(e,n)=>typeof n=="object"&&n!==null?Object.freeze(n):n)}var _t=t=>typeof t.onAction=="function"&&t.href===void 0,Dt=t=>(typeof t.href=="string"||typeof t.href=="function")&&t.onAction===void 0;function eo(t){let e=[];if(!Array.isArray(t))return e;let n=new Set;return t.forEach((s,o)=>{let r=`[siteping] panelActions[${o}]`,i=s?.id;if(typeof i!="string"||!i||typeof s?.label!="string"||!s.label)console.warn(`${r} ignored: it needs a non-empty string \`id\` and \`label\`.`);else if(!_t(s)&&!Dt(s))console.warn(`${r} ("${i}") ignored: it needs either an \`onAction\` function or an \`href\`, not both.`);else if(typeof s.href=="string"&&!se(s.href))console.warn(`${r} ("${i}") ignored: \`href\` must be an http(s) or mailto URL.`);else if(n.has(i))console.warn(`${r} ignored: duplicate id "${i}".`);else {n.add(i);let l=s.icon===void 0?null:Nt(s.icon);s.icon!==void 0&&!l&&console.warn(`${r} ("${i}"): \`icon\` is not SVG markup \u2014 showing the label only.`),e.push({action:s,icon:l});}}),e}var Ht='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>',Ne='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>',$t='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>',jt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>',Ut='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>',_e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>',Kt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="1 4 1 10 7 10"/><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"/></svg>',Vt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>',zt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>',Gt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="22" y1="12" x2="18" y2="12"/><line x1="6" y1="12" x2="2" y2="12"/><line x1="12" y1="6" x2="12" y2="2"/><line x1="12" y1="22" x2="12" y2="18"/></svg>',Wt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>',lo='.sp-detail{position:absolute;inset:0;display:flex;flex-direction:column;z-index:20;transform:translateX(100%);transition:transform 0.2s var(--sp-ease-out);will-change:transform;overflow:clip;}.sp-detail--visible{transform:translateX(0);transition:transform 0.3s var(--sp-ease-drawer);}.sp-panel > :is(.sp-panel-header,.sp-stats-bar,.sp-filters,.sp-list){transition:opacity 0.2s var(--sp-ease-out),transform 0.2s var(--sp-ease-out),visibility 0s;}.sp-panel--detail > :is(.sp-panel-header,.sp-stats-bar,.sp-filters,.sp-list){opacity:0;transform:translateX(-24%);visibility:hidden;transition:opacity 0.3s var(--sp-ease-drawer),transform 0.3s var(--sp-ease-drawer),visibility 0s linear 0.3s;}.sp-panel--detail > :is(.sp-bulk-bar,.sp-shortcuts-hint){visibility:hidden;opacity:0;}.sp-detail-header{display:flex;align-items:center;gap:4px;padding:10px 12px 6px 6px;flex-shrink:0;min-height:60px;}.sp-detail-back{width:44px;height:44px;border-radius:50%;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--sp-accent-ink);transition:var(--sp-tr);flex-shrink:0;padding:0;}@media (hover: hover) and (pointer: fine){.sp-detail-back:hover{background:var(--sp-fill);}}.sp-detail-back svg{width:20px;height:20px;stroke-width:2.4;}.sp-detail-title{font-size:17px;font-weight:600;color:var(--sp-text);letter-spacing:-0.024em;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-detail-header .sp-badge{flex-shrink:0;}.sp-detail-content{flex:1;overflow-y:auto;overflow-x:hidden;padding:0 0 20px;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 10px);mask-image:linear-gradient(to bottom,transparent,#000 10px);}.sp-detail-content::-webkit-scrollbar{width:6px;}.sp-detail-content::-webkit-scrollbar-track{background:transparent;}.sp-detail-content::-webkit-scrollbar-thumb{background:var(--sp-fill-strong);border-radius:var(--sp-radius-full);}@media (hover: hover) and (pointer: fine){.sp-detail-content::-webkit-scrollbar-thumb:hover{background:var(--sp-text-tertiary);}}.sp-detail-section{margin-top:22px;padding:0 16px;}.sp-detail-section:first-child{margin-top:8px;}.sp-detail-section-title{font-size:12px;font-weight:500;color:var(--sp-text-secondary);text-transform:uppercase;letter-spacing:0.04em;margin:0 16px 7px;}.sp-detail-status{display:flex;align-items:center;gap:10px;margin-bottom:12px;}.sp-detail-status-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:var(--sp-radius-full);font-size:13px;font-weight:600;letter-spacing:-0.005em;}.sp-detail-status-pill--open{background:color-mix(in srgb,var(--sp-status-open) 13%,transparent);color:var(--sp-ink-green);}.sp-detail-status-pill--in-progress{background:color-mix(in srgb,var(--sp-status-in-progress) 13%,transparent);color:var(--sp-ink-amber);}.sp-detail-status-pill--resolved,.sp-detail-status-pill--wont-fix{background:var(--sp-fill);color:var(--sp-text-secondary);}.sp-detail-status-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}.sp-detail-actions{display:flex;gap:10px;}.sp-detail-actions button,.sp-detail-actions a{flex:1;height:44px;padding:0 16px;border:none;border-radius:12px;font-family:var(--sp-font);font-size:15px;font-weight:600;letter-spacing:-0.01em;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:var(--sp-tr);}.sp-detail-actions button svg,.sp-detail-actions a svg{width:16px;height:16px;}.sp-detail-btn-resolve{background:color-mix(in srgb,var(--sp-status-open) 14%,transparent);color:var(--sp-ink-green);}.sp-detail-btn-reopen{background:color-mix(in srgb,var(--sp-accent) 13%,transparent);color:var(--sp-accent-ink);}.sp-detail-btn-delete{background:color-mix(in srgb,var(--sp-type-bug) 11%,transparent);color:var(--sp-ink-red);}.sp-detail-btn-custom{background:var(--sp-fill);color:var(--sp-text);text-decoration:none;}@media (hover: hover) and (pointer: fine){.sp-detail-btn-resolve:hover{background:color-mix(in srgb,var(--sp-status-open) 20%,transparent);}.sp-detail-btn-reopen:hover{background:color-mix(in srgb,var(--sp-accent) 19%,transparent);}.sp-detail-btn-delete:hover{background:color-mix(in srgb,var(--sp-type-bug) 16%,transparent);}.sp-detail-btn-custom:hover{background:var(--sp-fill-strong);}}.sp-detail-actions--custom{flex-wrap:wrap;margin-top:8px;}.sp-detail-actions--custom > .sp-detail-btn-custom{flex:1 1 auto;min-width:0;}.sp-detail-btn-custom svg{flex-shrink:0;}.sp-detail-btn-custom span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-detail-actions button:disabled{opacity:0.5;cursor:not-allowed;pointer-events:none;}.sp-detail-message{font-size:15px;line-height:1.47;letter-spacing:-0.012em;color:var(--sp-text);padding:12px 16px;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:var(--sp-shadow-row);white-space:pre-wrap;word-break:break-word;}.sp-thread-list{list-style:none;}.sp-comment{margin-top:8px;}.sp-comment[data-role="team"]{background:color-mix(in srgb,var(--sp-accent) 8%,var(--sp-row));}.sp-comment-head,.sp-thread-foot{display:flex;align-items:center;gap:6px;}.sp-comment-head{margin-bottom:4px;font-size:13px;font-weight:600;}.sp-comment-head time,.sp-thread-foot,.sp-thread-input::placeholder{font-weight:400;color:var(--sp-text-secondary);}.sp-comment-head time{margin-left:auto;}.sp-input.sp-thread-input{height:auto;min-height:84px;margin-top:8px;padding:11px 16px;border-radius:var(--sp-radius-lg);background:var(--sp-row);line-height:1.4;box-shadow:var(--sp-shadow-row);}.sp-input.sp-thread-input:focus{background:var(--sp-row);box-shadow:var(--sp-ring);}.sp-thread-foot{justify-content:space-between;margin-top:8px;padding-left:16px;font-size:12px;}.sp-thread-foot .sp-btn-primary{height:34px;padding:0 18px;border-radius:var(--sp-radius-full);}.sp-thread-foot [aria-busy="true"]::before{content:"";display:inline-block;width:10px;height:10px;margin-right:8px;border:2px solid;border-top-color:transparent;border-radius:50%;animation:sp-spin 0.6s linear infinite;}.sp-thread-error{margin-top:8px;padding:8px 12px;border-radius:12px;background:color-mix(in srgb,var(--sp-type-bug) 11%,transparent);color:var(--sp-ink-red);font-size:12px;}.sp-thread-error:empty{display:none;}.sp-detail-screenshot{display:block;width:100%;height:auto;max-height:400px;object-fit:contain;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:0 0 0 0.5px var(--sp-separator);}.sp-detail-meta,.sp-detail-annotation-info{display:flex;flex-direction:column;padding:0 16px;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:var(--sp-shadow-row);}.sp-detail-meta-row,.sp-detail-annotation-row{display:flex;align-items:flex-start;gap:12px;}.sp-detail-meta-row svg,.sp-detail-annotation-row svg{width:16px;height:16px;color:var(--sp-text-tertiary);flex-shrink:0;margin-top:13px;}.sp-detail-meta-content{flex:1;min-width:0;padding:10px 0;}.sp-detail-meta-row + .sp-detail-meta-row .sp-detail-meta-content,.sp-detail-annotation-row + .sp-detail-annotation-row .sp-detail-meta-content{border-top:0.5px solid var(--sp-separator);}.sp-detail-meta-label,.sp-detail-annotation-label{font-size:11px;font-weight:500;color:var(--sp-text-tertiary);text-transform:uppercase;letter-spacing:0.04em;line-height:1;margin-bottom:3px;}.sp-detail-meta-value,.sp-detail-annotation-value{font-size:15px;line-height:1.33;letter-spacing:-0.01em;color:var(--sp-text);word-break:break-all;}.sp-detail-meta-value--mono,.sp-detail-annotation-value--mono{font-family:var(--sp-font-mono);font-size:12px;letter-spacing:0;background:var(--sp-fill);padding:1px 6px;border-radius:6px;}.sp-detail-meta-value--secondary{color:var(--sp-text-secondary);font-size:13px;}.sp-detail-annotation{display:flex;flex-direction:column;gap:10px;}.sp-detail-annotation-value--mono{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-detail-btn-goto{width:100%;height:44px;padding:0 20px;border-radius:12px;border:none;background:var(--sp-accent);color:#fff;font-family:var(--sp-font);font-size:15px;font-weight:600;letter-spacing:-0.01em;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:var(--sp-tr);}.sp-detail-btn-goto svg{width:16px;height:16px;}@media (hover: hover) and (pointer: fine){.sp-detail-btn-goto:hover{background:var(--sp-accent-dark);}}.sp-detail-diag{display:flex;flex-direction:column;gap:14px;}.sp-detail-diag-toggle{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px 0 16px;border-radius:var(--sp-radius-lg);border:none;background:var(--sp-row);box-shadow:var(--sp-shadow-row);color:var(--sp-text);font-family:var(--sp-font);font-size:15px;font-weight:400;letter-spacing:-0.01em;cursor:pointer;transition:background 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-detail-diag-toggle:hover{background:var(--sp-row-hover);}}.sp-detail-diag-toggle svg{width:12px;height:12px;color:var(--sp-text-tertiary);transition:transform 0.2s ease;}.sp-detail-diag-toggle[aria-expanded="true"] svg{transform:rotate(90deg);}.sp-detail-diag-counts{display:inline-flex;gap:6px;font-weight:500;color:var(--sp-text-secondary);}.sp-detail-diag-count{padding:2px 8px;border-radius:var(--sp-radius-full);background:var(--sp-fill);color:var(--sp-text-secondary);font-size:12px;font-variant-numeric:tabular-nums;}.sp-detail-diag-count--errors{background:color-mix(in srgb,var(--sp-type-bug) 11%,transparent);color:var(--sp-ink-red);}.sp-detail-diag-body{display:none;flex-direction:column;gap:14px;}.sp-detail-diag-body--open{display:flex;}.sp-detail-diag-group-title{font-size:11px;font-weight:500;color:var(--sp-text-secondary);text-transform:uppercase;letter-spacing:0.04em;margin:0 16px 7px;}.sp-detail-diag-list{list-style:none;padding:0;margin:0;border-radius:var(--sp-radius-lg);background:var(--sp-row);box-shadow:var(--sp-shadow-row);max-height:240px;overflow-y:auto;}.sp-detail-diag-list li{display:flex;align-items:flex-start;gap:8px;padding:9px 14px;border-bottom:0.5px solid var(--sp-separator);font-family:var(--sp-font-mono);font-size:11px;line-height:1.45;color:var(--sp-text);}.sp-detail-diag-list li:last-child{border-bottom:none;}.sp-detail-diag-level{flex-shrink:0;font-weight:700;width:44px;text-transform:uppercase;letter-spacing:0.04em;font-size:10px;}.sp-detail-diag-level--log{color:var(--sp-text-tertiary);}.sp-detail-diag-level--info{color:var(--sp-type-question);}.sp-detail-diag-level--warn{color:var(--sp-type-change);}.sp-detail-diag-level--error{color:var(--sp-type-bug);}.sp-detail-diag-message{flex:1;min-width:0;word-break:break-word;white-space:pre-wrap;}.sp-detail-diag-net{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;}.sp-detail-diag-net-status{flex-shrink:0;font-weight:700;color:var(--sp-type-bug);min-width:32px;text-align:right;font-variant-numeric:tabular-nums;}.sp-detail-diag-net-method{flex-shrink:0;font-weight:600;color:var(--sp-text-tertiary);min-width:44px;}.sp-detail-diag-net-url{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--sp-text);}.sp-detail-diag-empty{padding:12px;font-style:italic;font-size:11px;color:var(--sp-text-tertiary);text-align:center;}@media (forced-colors: active){.sp-detail{border:2px solid ButtonText !important;background:Canvas !important;}.sp-detail-back,.sp-detail-btn-goto,.sp-detail-btn-resolve,.sp-detail-btn-reopen,.sp-detail-btn-delete,.sp-detail-btn-custom{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-detail-back:focus-visible,.sp-detail-btn-goto:focus-visible,.sp-detail-btn-resolve:focus-visible,.sp-detail-btn-reopen:focus-visible,.sp-detail-btn-delete:focus-visible,.sp-detail-btn-custom:focus-visible{outline:3px solid Highlight !important;}.sp-detail-status-pill{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-detail-message,.sp-detail-screenshot,.sp-detail-meta,.sp-detail-annotation-info,.sp-detail-diag-toggle,.sp-detail-diag-list{border:1px solid ButtonText;}}';function Xt(t){if(/Edg\//i.test(t)){let e=t.match(/Edg\/([\d.]+)/);return e?`Edge ${e[1]}`:"Edge"}if(/OPR\//i.test(t)||/Opera/i.test(t)){let e=t.match(/OPR\/([\d.]+)/);return e?`Opera ${e[1]}`:"Opera"}if(/Firefox\//i.test(t)){let e=t.match(/Firefox\/([\d.]+)/);return e?`Firefox ${e[1]}`:"Firefox"}if(/Chrome\//i.test(t)&&!/Chromium/i.test(t)){let e=t.match(/Chrome\/([\d.]+)/);return e?`Chrome ${e[1]}`:"Chrome"}if(/Safari\//i.test(t)&&!/Chrome/i.test(t)){let e=t.match(/Version\/([\d.]+)/);return e?`Safari ${e[1]}`:"Safari"}return "Unknown"}function De(t,e){try{return new Date(t).toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function Yt(t){try{return new URL(t).pathname}catch{return t}}function j(t,e){return t.length<=e?t:t.slice(0,e-1)+"\u2026"}function Qt(t){if(!t)return false;let e=Array.isArray(t.console)?t.console.length:0,n=Array.isArray(t.network)?t.network.length:0;return e>0||n>0}function qt(t){return !Number.isFinite(t)||t<0?"\u2014":t<1e3?`${Math.round(t)} ms`:`${(t/1e3).toFixed(1)} s`}function He({action:t,icon:e}){let n=document.createElement("span");return p(n,t.label),e?[e.cloneNode(true),n]:[n]}var $e=class{constructor(e,n,s,o,r=[]){this.colors=e;this.callbacks=n;this.customActions=r;this.t=s,this.locale=o,this.element=a("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label",s("detail.aria")),this.element.setAttribute("aria-hidden","true"),C(this.element,true);let i=a("div",{class:"sp-detail-header"}),l=document.createElement("button");l.type="button",l.className="sp-detail-back",l.setAttribute("aria-label",this.t("detail.back")),l.appendChild(h(Ht)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=a("div",{class:"sp-detail-content"}),this.element.appendChild(this.content);}colors;callbacks;customActions;element;_isVisible=false;opener=null;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;customBtns=[];pending=new Map;show(e,n){this.currentFeedback=e;let s=this.element.querySelector(".sp-detail-header");if(!s)return;let o=s.querySelector(".sp-detail-back");if(!o)return;s.replaceChildren(o);let r=a("span",{class:"sp-detail-title"});p(r,A(this.t,"detail.title",{number:n})),s.appendChild(r);let i=a("span",{class:"sp-badge"});i.style.color=Ee(e.type,this.colors),p(i,Te(e.type,this.t)),s.appendChild(i),this.content.replaceChildren();let l=0,d=this.buildSection(l++);this.buildStatusActions(d,e);let c=this.pending.get(e.id);c&&this.lock(c),this.content.appendChild(d);let u=this.buildSection(l++),f=a("div",{class:"sp-detail-section-title"});p(f,this.t("detail.message")),u.appendChild(f);let k=a("div",{class:"sp-detail-message"});p(k,e.message),u.appendChild(k);let y=this.callbacks.buildThread?.(e);if(y&&u.appendChild(y),this.content.appendChild(u),e.screenshotUrl&&K(e.screenshotUrl)){let g=this.buildSection(l++),b=a("div",{class:"sp-detail-section-title"});p(b,this.t("detail.screenshot")),g.appendChild(b);let m=document.createElement("img");m.className="sp-detail-screenshot",m.src=e.screenshotUrl,m.alt=this.t("detail.screenshotAlt"),m.loading="lazy",m.referrerPolicy="no-referrer",g.appendChild(m),this.content.appendChild(g);}let w=this.buildSection(l++),x=a("div",{class:"sp-detail-section-title"});if(p(x,this.t("detail.metadata")),w.appendChild(x),this.buildMetadata(w,e),this.content.appendChild(w),e.annotations.length>0){let g=this.buildSection(l++),b=a("div",{class:"sp-detail-section-title"});p(b,this.t("detail.annotation")),g.appendChild(b),this.buildAnnotation(g,e),this.content.appendChild(g);}if(Qt(e.diagnostics)){let g=this.buildSection(l++),b=a("div",{class:"sp-detail-section-title"});p(b,this.t("detail.diagnostics")),g.appendChild(b),this.buildDiagnostics(g,e),this.content.appendChild(g);}if(!this._isVisible){let g=this.element.getRootNode().activeElement;this.opener=g instanceof HTMLElement?g:null;}this._isVisible=true,this.element.setAttribute("aria-hidden","false"),C(this.element,false),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),this.element.parentElement?.classList.add("sp-panel--detail"),requestAnimationFrame(()=>{o.focus({preventScroll:true});});}hide(){if(!this._isVisible)return;this._isVisible=false;let e=B(this.element),n=this.currentFeedback?.id;this.element.classList.remove("sp-detail--visible"),this.element.parentElement?.classList.remove("sp-panel--detail"),this.element.setAttribute("aria-hidden","true"),C(this.element,true),e&&(this.element.parentElement?.offsetWidth,(this.opener?.isConnected===true?this.opener:n?this.element.parentElement?.querySelector(`.sp-card[data-feedback-id="${CSS.escape(n)}"]`):null)?.focus()),this.opener=null,this.currentFeedback=null,this.resolveBtn=null,this.deleteBtn=null,this.customBtns=[];}get feedbackId(){return this.currentFeedback?.id??null}get isVisible(){return this._isVisible}destroy(){this.hide(),this.element.remove();}buildSection(e){let n=a("div",{class:"sp-detail-section"});return n.style.animationDelay=`${e*40}ms`,n}buildStatusActions(e,n){let s=E(n.status),o=a("div",{class:"sp-detail-section-title"});p(o,this.t("detail.status")),e.appendChild(o);let r=n.status.replace(/_/g,"-"),i={open:this.colors.statusOpen,in_progress:this.colors.statusInProgress,resolved:this.colors.statusResolved,wont_fix:this.colors.statusWontFix},l=a("div",{class:"sp-detail-status"}),d=a("span",{class:`sp-detail-status-pill sp-detail-status-pill--${r}`}),c=a("span",{class:"sp-detail-status-dot"});c.style.background=i[n.status]??i.open,d.appendChild(c);let u=a("span");p(u,Ae(n.status,this.t)),d.appendChild(u),l.appendChild(d),e.appendChild(l);let f=a("div",{class:"sp-detail-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",this.resolveBtn.className=s?"sp-detail-btn-reopen":"sp-detail-btn-resolve",this.restoreResolveBtn(n),this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.type="button",this.deleteBtn.className="sp-detail-btn-delete",this.restoreDeleteBtn(),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),this.callbacks.permits?.(n,"canChangeStatus")!==false&&f.appendChild(this.resolveBtn),this.callbacks.permits?.(n,"canDelete")!==false&&f.appendChild(this.deleteBtn),e.appendChild(f),this.buildCustomActions(e,n);}buildCustomActions(e,n){if(this.customBtns=[],this.customActions.length===0)return;let s=Ie(n),o=a("div",{class:"sp-detail-actions sp-detail-actions--custom"});for(let r of this.customActions){let{action:i}=r,l;try{if(i.visible&&!i.visible(s))continue;if(i.href===void 0){let d=document.createElement("button");d.type="button",d.setAttribute("aria-label",i.label),d.addEventListener("click",()=>{this.run(r,()=>this.callbacks.onCustomAction(i,s));}),this.customBtns.push(d),l=d;}else {let d=se(typeof i.href=="function"?i.href(s):i.href);if(!d)throw new Error(`[siteping] Panel action "${i.id}": href must be an http(s) or mailto URL.`);let c=document.createElement("a");c.href=d,d.startsWith("mailto:")||(c.target="_blank"),c.rel="noopener noreferrer",l=c;}}catch(d){this.callbacks.onCustomActionError(d);continue}l.className="sp-detail-btn-custom",l.setAttribute("data-action-id",i.id),l.title=i.label,l.append(...He(r)),o.appendChild(l);}o.childElementCount>0&&e.appendChild(o);}buildMetadata(e,n){let s=a("div",{class:"sp-detail-meta"});if(this.addMetaRow(s,$t,this.t("detail.page"),()=>{let o=a("div",{class:"sp-detail-meta-value"}),r=Yt(n.url);return p(o,j(r,60)),o.title=n.url,o}),this.addMetaRow(s,be,this.t("detail.author"),()=>{let o=a("div",{class:"sp-detail-meta-value"}),r=n.authorName||"Anonymous",i=n.authorEmail;return p(o,i?`${r} (${i})`:r),o}),this.addMetaRow(s,jt,this.t("detail.date"),()=>{let o=a("div",{class:"sp-detail-meta-value"});return p(o,De(n.createdAt,this.locale)),o}),this.addMetaRow(s,Ut,this.t("detail.viewport"),()=>{let o=a("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return p(o,n.viewport||"Unknown"),o}),this.addMetaRow(s,'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg>',this.t("detail.browser"),()=>{let o=a("div",{class:"sp-detail-meta-value"});return p(o,Xt(n.userAgent)),o}),n.resolvedAt){let o=n.resolvedAt,r=n.status==="wont_fix"?this.t("detail.closedAt"):this.t("detail.resolvedAt");this.addMetaRow(s,_e,r,()=>{let i=a("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return p(i,De(o,this.locale)),i});}e.appendChild(s);}addMetaRow(e,n,s,o){let r=a("div",{class:"sp-detail-meta-row"});r.appendChild(h(n));let i=a("div",{class:"sp-detail-meta-content"}),l=a("div",{class:"sp-detail-meta-label"});p(l,s),i.appendChild(l),i.appendChild(o()),r.appendChild(i),e.appendChild(r);}buildAnnotation(e,n){let s=n.annotations[0];if(!s)return;let o=a("div",{class:"sp-detail-annotation"}),r=a("div",{class:"sp-detail-annotation-info"});if(this.addAnnotationRow(r,zt,this.t("detail.element"),()=>{let c=a("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),u=s.elementId?`<${s.elementTag}#${s.elementId}>`:`<${s.elementTag}>`;return p(c,u),c}),this.addAnnotationRow(r,Gt,this.t("detail.selector"),()=>{let c=a("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return p(c,j(s.cssSelector,60)),c.title=s.cssSelector,c}),this.addAnnotationRow(r,Ne,this.t("detail.position"),()=>{let c=a("span",{class:"sp-detail-annotation-value"}),u=f=>`${(f*100).toFixed(1)}%`;return p(c,`${u(s.xPct)}, ${u(s.yPct)}`+(s.wPct>0||s.hPct>0?` (${u(s.wPct)} \xD7 ${u(s.hPct)})`:"")),c}),o.appendChild(r),e.appendChild(o),this.callbacks.canGoToAnnotation?.(n)===false)return;let i=document.createElement("button");i.type="button",i.className="sp-detail-btn-goto",i.appendChild(h(Ne));let l=document.createElement("span");p(l,this.t("detail.goToAnnotation")),i.appendChild(l),i.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback);}),o.appendChild(i);let d=this.callbacks.lostNote?.(n.id);d&&o.appendChild(d);}buildDiagnostics(e,n){let s=n.diagnostics;if(!s)return;let o=Array.isArray(s.console)?s.console:[],r=Array.isArray(s.network)?s.network:[],i=o.filter(x=>x.level==="error").length,l=a("div",{class:"sp-detail-diag"}),d=document.createElement("button");d.type="button",d.className="sp-detail-diag-toggle",d.setAttribute("aria-expanded","false");let c=document.createElement("span"),u=document.createElement("span");u.style.display="inline-flex",u.style.alignItems="center",u.style.gap="8px",u.appendChild(h(Wt)),p(c,this.t("detail.diagnostics")),u.appendChild(c),d.appendChild(u);let f=a("span",{class:"sp-detail-diag-counts"}),k=a("span",{class:`sp-detail-diag-count${i>0?" sp-detail-diag-count--errors":""}`});p(k,`${o.length} console`);let y=a("span",{class:`sp-detail-diag-count${r.length>0?" sp-detail-diag-count--errors":""}`});p(y,`${r.length} net`),f.appendChild(k),f.appendChild(y),d.appendChild(f);let w=a("div",{class:"sp-detail-diag-body"});if(o.length>0){let x=document.createElement("div"),g=a("div",{class:"sp-detail-diag-group-title"});p(g,this.t("detail.diagnostics.console")),x.appendChild(g);let b=document.createElement("ul");b.className="sp-detail-diag-list";for(let m of o){let S=document.createElement("li"),O=a("span",{class:`sp-detail-diag-level sp-detail-diag-level--${m.level}`});p(O,m.level);let L=a("span",{class:"sp-detail-diag-message"});p(L,j(m.message,240)),L.title=m.message,S.appendChild(O),S.appendChild(L),b.appendChild(S);}x.appendChild(b),w.appendChild(x);}if(r.length>0){let x=document.createElement("div"),g=a("div",{class:"sp-detail-diag-group-title"});p(g,this.t("detail.diagnostics.network")),x.appendChild(g);let b=document.createElement("ul");b.className="sp-detail-diag-list";for(let m of r){let S=document.createElement("li");S.classList.add("sp-detail-diag-net");let O=a("span",{class:"sp-detail-diag-net-status"});p(O,m.status===0?"ERR":String(m.status));let L=a("span",{class:"sp-detail-diag-net-method"});p(L,m.method);let U=a("span",{class:"sp-detail-diag-net-url"});p(U,j(m.url,120)),U.title=`${m.url} \u2014 ${qt(m.durationMs)}`,S.appendChild(O),S.appendChild(L),S.appendChild(U),b.appendChild(S);}x.appendChild(b),w.appendChild(x);}d.addEventListener("click",()=>{let x=d.getAttribute("aria-expanded")==="true";d.setAttribute("aria-expanded",String(!x)),w.classList.toggle("sp-detail-diag-body--open",!x);}),l.appendChild(d),l.appendChild(w),e.appendChild(l);}addAnnotationRow(e,n,s,o){let r=a("div",{class:"sp-detail-annotation-row"});r.appendChild(h(n));let i=a("div",{class:"sp-detail-meta-content"}),l=a("div",{class:"sp-detail-annotation-label"});p(l,s),i.appendChild(l),i.appendChild(o()),r.appendChild(i),e.appendChild(r);}handleResolve(){return this.run("resolve",e=>this.callbacks.onResolve(e))}handleDelete(){return this.run("delete",e=>this.callbacks.onDelete(e))}async run(e,n){let s=this.currentFeedback;if(!(!s||this.pending.has(s.id))){this.pending.set(s.id,e),this.lock(e);try{await n(s);}catch{}finally{this.pending.delete(s.id),this.currentFeedback?.id===s.id&&this.unlock(e,this.currentFeedback);}}}lock(e){this.setActionsDisabled(true);let n=this.buttonFor(e);n&&(this.setButtonLoading(n),n.setAttribute("aria-busy","true"));}unlock(e,n){let s=this.buttonFor(e);s?.removeAttribute("aria-busy"),e==="resolve"?this.restoreResolveBtn(n):e==="delete"?this.restoreDeleteBtn():s?.replaceChildren(...He(e)),this.setActionsDisabled(false);}buttonFor(e){return e==="resolve"?this.resolveBtn:e==="delete"?this.deleteBtn:this.customBtns.find(n=>n.dataset.actionId===e.action.id)??null}setActionsDisabled(e){for(let n of [this.resolveBtn,this.deleteBtn,...this.customBtns])n&&(n.disabled=e);}setButtonLoading(e){e.disabled=true,e.replaceChildren(a("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let n=E(e.status);this.resolveBtn.appendChild(h(n?Kt:_e));let s=document.createElement("span");p(s,n?this.t("detail.reopen"):this.t("detail.resolve")),this.resolveBtn.appendChild(s);}restoreDeleteBtn(){if(!this.deleteBtn)return;this.deleteBtn.disabled=false,this.deleteBtn.replaceChildren(),this.deleteBtn.appendChild(h(Vt));let e=document.createElement("span");p(e,this.t("detail.delete")),this.deleteBtn.appendChild(e);}};var Jt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11 5h10"/><path d="M11 9h7"/><path d="M11 13h4"/><path d="M3 17l3 3 3-3"/><path d="M6 18V4"/></svg>',Ke='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>',Zt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>',je={question:0,change:1,bug:2,other:3};function go(t,e){let n=[...t];switch(e){case "newest":n.sort((s,o)=>new Date(o.createdAt).getTime()-new Date(s.createdAt).getTime());break;case "oldest":n.sort((s,o)=>new Date(s.createdAt).getTime()-new Date(o.createdAt).getTime());break;case "by-type":n.sort((s,o)=>{let r=je[s.type]??99,i=je[o.type]??99;return r!==i?r-i:new Date(o.createdAt).getTime()-new Date(s.createdAt).getTime()});break;case "open-first":n.sort((s,o)=>{let r=E(s.status)?1:0,i=E(o.status)?1:0;return r!==i?r-i:new Date(o.createdAt).getTime()-new Date(s.createdAt).getTime()});break}return n}function en(t){try{return new URL(t).pathname}catch{return t}}function tn(t,e){if(t.length<=e)return t;let n="\u2026",s=Math.floor((e-1)/2);return t.slice(0,s)+n+t.slice(-s)}function mo(t){let e=new Map;for(let s of t){let o=en(s.url),r=e.get(o);r?r.push(s):e.set(o,[s]);}return new Map([...e.entries()].sort((s,o)=>o[1].length-s[1].length))}function fo(t,e){let n=a("div",{class:"sp-group-header"});n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.setAttribute("aria-expanded","true");let s=a("span",{class:"sp-group-header-chevron"});s.appendChild(h(Zt)),n.appendChild(s);let o=a("span",{class:"sp-group-header-icon"});o.appendChild(h(Ke)),n.appendChild(o);let r=a("span",{class:"sp-group-header-path"}),i=tn(t,40);p(r,i),t.length>40&&(r.title=t),n.appendChild(r);let l=a("span",{class:"sp-group-header-count"});p(l,String(e)),n.appendChild(l);let d=()=>{let c=n.getAttribute("aria-expanded")==="true";n.setAttribute("aria-expanded",String(!c)),n.classList.toggle("sp-group-header--collapsed",c);let u=n.nextElementSibling;u?.classList.contains("sp-group-content")&&u.classList.toggle("sp-group-content--collapsed",c);};return n.addEventListener("click",d),n.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),d());}),n}var Ue=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;sortDropdown;groupToggle;t;onChange;removeOutsideClick=null;constructor(e,n){this.onChange=e,this.t=n,this.element=a("div",{class:"sp-sort-controls"}),this.sortBtn=document.createElement("button"),this.sortBtn.className="sp-sort-btn",this.sortBtn.setAttribute("aria-haspopup","listbox"),this.sortBtn.setAttribute("aria-expanded","false");let s=h(Jt);this.sortBtn.appendChild(s),this.sortBtn.appendChild(a("span",{class:"sp-sort-btn-label"})),this.updateSortLabel(),this.sortBtn.addEventListener("click",i=>{i.stopPropagation(),this.toggleMenu();}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let o=h(Ke);this.groupToggle.appendChild(o);let r=a("span",{class:"sp-group-toggle-label"});p(r,this.t("group.byPage")),this.groupToggle.appendChild(r),this.groupToggle.addEventListener("click",()=>{this._groupByPage=!this._groupByPage,this.groupToggle.classList.toggle("sp-group-toggle--active",this._groupByPage),this.groupToggle.setAttribute("aria-pressed",String(this._groupByPage)),this.onChange();}),this.sortDropdown=a("div",{class:"sp-sort-dropdown"}),this.sortDropdown.appendChild(this.sortBtn),this.element.appendChild(this.sortDropdown),this.element.appendChild(this.groupToggle),this.element.addEventListener("keydown",i=>{i.key!=="Escape"||!this.menuEl||(i.stopPropagation(),this.closeMenu(),this.sortBtn.focus());});}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){if(this.menuEl){this.closeMenu();return}this.openMenu();}openMenu(){this.menuEl=a("div",{class:"sp-sort-menu"}),this.menuEl.setAttribute("role","listbox"),this.menuEl.setAttribute("aria-label",this.t("sort.label")),this.sortBtn.setAttribute("aria-expanded","true");let e=[{mode:"newest",label:this.t("sort.newest")},{mode:"oldest",label:this.t("sort.oldest")},{mode:"by-type",label:this.t("sort.byType")},{mode:"open-first",label:this.t("sort.openFirst")}];for(let n of e){let s=document.createElement("button");s.className=`sp-sort-option${n.mode===this._sortMode?" sp-sort-option--active":""}`,s.setAttribute("role","option"),s.setAttribute("aria-selected",String(n.mode===this._sortMode)),p(s,n.label),n.mode===this._sortMode&&s.appendChild(h(fe)),s.addEventListener("click",o=>{o.stopPropagation(),this._sortMode=n.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(s);}this.sortDropdown.appendChild(this.menuEl),this.removeOutsideClick=N(this.sortDropdown,()=>this.closeMenu());}closeMenu(){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),this.sortBtn.setAttribute("aria-expanded","false"),this.removeOutsideClick?.(),this.removeOutsideClick=null;}updateSortLabel(){let n={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")}[this._sortMode],s=this.sortBtn.querySelector(".sp-sort-btn-label");s&&p(s,n),this.sortBtn.setAttribute("aria-label",`${this.t("sort.label")}: ${n}`);}destroy(){this.closeMenu();}},bo='.sp-sort-controls{display:flex;align-items:center;gap:8px;}.sp-sort-dropdown{display:contents;}.sp-sort-btn,.sp-group-toggle,.sp-mine-toggle{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 12px;border-radius:var(--sp-radius-full);border:none;background:var(--sp-fill);color:var(--sp-text);font-family:var(--sp-font);font-size:13px;font-weight:500;cursor:pointer;white-space:nowrap;transition:var(--sp-tr);}.sp-sort-btn{position:relative;}.sp-sort-btn svg,.sp-group-toggle svg,.sp-mine-toggle svg{width:13px;height:13px;flex-shrink:0;color:var(--sp-text-secondary);}.sp-sort-btn svg{width:14px;height:14px;}@media (hover: hover) and (pointer: fine){.sp-sort-btn:hover,.sp-group-toggle:hover,.sp-mine-toggle:hover{background:var(--sp-fill-strong);}.sp-group-toggle--active:hover,.sp-mine-toggle--active:hover{background:var(--sp-accent-dark);}}.sp-sort-btn[aria-expanded="true"]{background:var(--sp-fill-strong);}.sp-group-toggle--active,.sp-mine-toggle--active{background:var(--sp-accent);color:#fff;}.sp-group-toggle--active svg,.sp-mine-toggle--active svg{color:inherit;}.sp-sort-menu{position:absolute;top:calc(100% - 4px);left:16px;min-width:170px;padding:6px;border-radius:var(--sp-radius-lg);background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);z-index:10;transform-origin:top left;animation:sp-menu-in 0.15s var(--sp-ease-out) backwards;}.sp-sort-option{display:block;width:100%;min-height:34px;padding:7px 10px;border:none;border-radius:8px;background:transparent;color:var(--sp-text);font-family:var(--sp-font);font-size:13px;font-weight:400;letter-spacing:-0.005em;cursor:pointer;text-align:left;transition:var(--sp-tr);}@media (hover: hover) and (pointer: fine){.sp-sort-option:hover{background:var(--sp-fill);}}.sp-sort-option--active{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:600;}.sp-sort-option--active svg{width:13px;height:13px;flex-shrink:0;color:var(--sp-accent-ink);stroke-width:2.5;}.sp-group-header{display:flex;align-items:center;gap:8px;margin:2px -4px 6px;padding:8px;border-radius:var(--sp-radius);background:color-mix(in srgb,var(--sp-grouped) 72%,transparent);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);cursor:pointer;user-select:none;position:sticky;top:0;z-index:2;transition:background-color 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-group-header:hover{background:color-mix(in srgb,var(--sp-grouped) 72%,var(--sp-fill-strong));}}.sp-group-header:focus-visible{outline:2px solid var(--sp-accent);outline-offset:-2px;}.sp-group-header-chevron{display:flex;align-items:center;justify-content:center;width:16px;height:16px;flex-shrink:0;transition:transform 0.2s var(--sp-ease-out);transform:rotate(90deg);}.sp-group-header-chevron svg{width:12px;height:12px;color:var(--sp-text-secondary);}.sp-group-header--collapsed .sp-group-header-chevron{transform:rotate(0deg);}.sp-group-header-icon{display:flex;align-items:center;flex-shrink:0;}.sp-group-header-icon svg{width:14px;height:14px;color:var(--sp-text-secondary);}.sp-group-header-path{font-size:13px;font-weight:600;color:var(--sp-text-secondary);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.sp-group-header-count{font-size:12px;font-weight:600;padding:1px 8px;border-radius:var(--sp-radius-full);background:color-mix(in srgb,var(--sp-accent) 13%,transparent);color:var(--sp-accent-ink);flex-shrink:0;font-variant-numeric:tabular-nums;}.sp-group-content--collapsed{display:none;}@media (forced-colors: active){.sp-sort-btn,.sp-group-toggle,.sp-mine-toggle,.sp-sort-option,.sp-group-header{border:2px solid ButtonText !important;background:Canvas !important;color:ButtonText !important;}.sp-group-toggle--active,.sp-mine-toggle--active{background:Highlight !important;color:HighlightText !important;}.sp-sort-btn:focus-visible,.sp-group-toggle:focus-visible,.sp-mine-toggle:focus-visible,.sp-sort-option:focus-visible,.sp-group-header:focus-visible{outline:3px solid Highlight !important;}.sp-sort-menu{border:2px solid ButtonText !important;background:Canvas !important;}}';var wo='.sp-stats-bar{display:flex;flex-direction:column;gap:8px;padding:2px 20px 12px;user-select:none;}.sp-stats-bar[hidden]{display:none;}.sp-stats-row{display:flex;align-items:center;gap:18px;}.sp-stats-item{display:flex;align-items:center;gap:6px;}.sp-stats-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}.sp-stats-value{font-size:17px;font-weight:600;line-height:1;letter-spacing:-0.02em;color:var(--sp-text);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";transition:opacity 0.2s ease;}.sp-stats-label{font-size:11px;font-weight:500;line-height:1;color:var(--sp-text-secondary);text-transform:uppercase;letter-spacing:0.04em;}.sp-stats-progress{display:flex;align-items:center;gap:8px;}.sp-stats-progress-track{flex:1;height:4px;border-radius:2px;background:var(--sp-fill-strong);overflow:hidden;}.sp-stats-progress-fill{height:100%;border-radius:2px;background:var(--sp-accent);clip-path:inset(0 100% 0 0 round 2px);transition:clip-path 0.3s var(--sp-ease-out);}.sp-stats-progress-label{font-size:11px;line-height:1;color:var(--sp-text-secondary);white-space:nowrap;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";min-width:64px;text-align:right;}',Ve=class{element;valueOpen;valueClosed;valueBugs;progressFill;progressLabel;t;constructor(e){this.t=e,this.element=a("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label",e("stats.aria")),this.element.hidden=true;let n=a("div",{class:"sp-stats-row"}),s=a("div",{class:"sp-stats-item"}),o=a("span",{class:"sp-stats-dot"});o.style.background="#22c55e",this.valueOpen=a("span",{class:"sp-stats-value"}),p(this.valueOpen,"0");let r=a("span",{class:"sp-stats-label"});p(r,this.t("stats.open")),s.appendChild(o),s.appendChild(this.valueOpen),s.appendChild(r);let i=a("div",{class:"sp-stats-item"}),l=a("span",{class:"sp-stats-dot"});l.style.background="#9ca3af",this.valueClosed=a("span",{class:"sp-stats-value"}),p(this.valueClosed,"0");let d=a("span",{class:"sp-stats-label"});p(d,this.t("stats.closed")),i.appendChild(l),i.appendChild(this.valueClosed),i.appendChild(d);let c=a("div",{class:"sp-stats-item"}),u=a("span",{class:"sp-stats-dot"});u.style.background="var(--sp-type-bug)",this.valueBugs=a("span",{class:"sp-stats-value"}),p(this.valueBugs,"0");let f=a("span",{class:"sp-stats-label"});p(f,this.t("stats.bugs")),c.appendChild(u),c.appendChild(this.valueBugs),c.appendChild(f),n.appendChild(s),n.appendChild(i),n.appendChild(c);let k=a("div",{class:"sp-stats-progress"}),y=a("div",{class:"sp-stats-progress-track"});this.progressFill=a("div",{class:"sp-stats-progress-fill"}),y.appendChild(this.progressFill),this.progressLabel=a("span",{class:"sp-stats-progress-label"}),p(this.progressLabel,""),k.appendChild(y),k.appendChild(this.progressLabel),this.element.appendChild(n),this.element.appendChild(k);}update(e,n){if(n===0){this.element.hidden=true;return}this.element.hidden=false;let s=0,o=0,r=0;for(let c of e)E(c.status)?o++:s++,c.type==="bug"&&r++;p(this.valueOpen,String(s)),p(this.valueClosed,String(o)),p(this.valueBugs,String(r));let i=e.length,l=i>0?Math.round(o/i*100):0;this.progressFill.style.clipPath=`inset(0 ${100-l}% 0 0 round 2px)`;let d=A(this.t,"stats.progress",{percent:l});p(this.progressLabel,d);}};var nn='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="M6 8h.01"/><path d="M10 8h.01"/><path d="M14 8h.01"/><path d="M18 8h.01"/><path d="M6 12h.01"/><path d="M18 12h.01"/><path d="M8 16h8"/></svg>';function So(t){let e=Array.from(t.querySelectorAll(".sp-card")),s=t.getRootNode().activeElement?.closest(".sp-card"),o=s?e.indexOf(s):-1;return o>=0?o:e.findIndex(r=>r.classList.contains("sp-card--focused"))}function To(t,e){let n=t.querySelectorAll(".sp-card");if(n.length===0)return;for(let r of n)r.classList.remove("sp-card--focused");let s=Math.max(0,Math.min(e,n.length-1)),o=n[s];o&&(o.classList.add("sp-card--focused"),o.scrollIntoView({block:"nearest"}),o.focus({preventScroll:true}));}var sn=[{keys:["J","K"],label:"shortcuts.navigate"},{keys:["R"],label:"shortcuts.resolve"},{keys:["D"],label:"shortcuts.delete"},{keys:["F","/"],label:"shortcuts.search"},{keys:["X"],label:"shortcuts.select"},{keys:["?"],label:"shortcuts.help"},{keys:["Esc"],label:"shortcuts.close"}],Ao=".sp-shortcuts-overlay{position:fixed;inset:0;background:var(--sp-backdrop, rgba(15, 23, 42, 0.2));display:flex;align-items:center;justify-content:center;z-index:10;opacity:0;pointer-events:none;}.sp-shortcuts-overlay--visible{opacity:1;pointer-events:auto;}.sp-shortcuts-card{width:min(356px,calc(100% - 24px));padding:22px 22px 18px;border-radius:var(--sp-radius-xl);background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-sheet);font-family:var(--sp-font);position:relative;}.sp-shortcuts-title{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:600;letter-spacing:-0.022em;color:var(--sp-text);margin-bottom:18px;}.sp-shortcuts-title svg{width:18px;height:18px;color:var(--sp-text-secondary);flex-shrink:0;}.sp-shortcuts-close{position:absolute;top:14px;right:14px;width:30px;height:30px;border-radius:50%;border:none;background:var(--sp-fill);color:var(--sp-text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.15s ease,color 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-shortcuts-close:hover{background:var(--sp-fill-strong);color:var(--sp-text);}}.sp-shortcuts-close svg{width:14px;height:14px;}.sp-shortcuts-grid{display:flex;flex-direction:column;gap:10px;}.sp-shortcuts-row{display:flex;align-items:center;gap:12px;}.sp-shortcuts-keys{display:flex;align-items:center;gap:4px;min-width:80px;justify-content:flex-end;}.sp-shortcuts-separator{font-size:11px;color:var(--sp-text-secondary);user-select:none;}.sp-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;padding:0 7px;border-radius:6px;background:var(--sp-row);box-shadow:0 0 0 0.5px var(--sp-separator),var(--sp-shadow-edge-drop);font-family:var(--sp-font);font-size:12px;font-weight:500;color:var(--sp-text);text-align:center;line-height:1;user-select:none;}.sp-shortcuts-desc{font-size:13px;color:var(--sp-text);line-height:1.3;}.sp-shortcuts-hint{width:28px;height:28px;border-radius:var(--sp-radius-full);border:none;background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);color:var(--sp-text-secondary);font-family:var(--sp-font);font-size:13px;font-weight:600;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.15s ease,color 0.15s ease;position:absolute;bottom:12px;right:12px;}@media (hover: hover) and (pointer: fine){.sp-shortcuts-hint:hover{background:color-mix(in srgb,var(--sp-accent) 14%,transparent);color:var(--sp-accent-ink);}}.sp-shortcuts-hint::after{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);right:0;padding:5px 10px;border-radius:var(--sp-radius-full);background:var(--sp-material-thick);backdrop-filter:var(--sp-material-blur);-webkit-backdrop-filter:var(--sp-material-blur);box-shadow:inset 0 0.5px 0 var(--sp-edge),var(--sp-shadow-float);font-family:var(--sp-font);font-size:12px;font-weight:500;color:var(--sp-text);white-space:nowrap;opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity 0.15s ease,transform 0.15s ease;}@media (hover: hover) and (pointer: fine){.sp-shortcuts-hint:hover::after{opacity:1;transform:translateY(0);}}@media (forced-colors: active){.sp-shortcuts-card,.sp-shortcuts-hint,.sp-kbd{border:1px solid ButtonText;}}.sp-card--focused{outline:2px solid var(--sp-accent);outline-offset:-2px;border-radius:inherit;}",on='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',ze=class{constructor(e,n,s){this.t=s;this.keyMap=new Map([["j",()=>n.onNavigate("down")],["k",()=>n.onNavigate("up")],["r",()=>n.onResolve()],["d",()=>n.onDelete()],["f",()=>n.onFocusSearch()],["/",()=>n.onFocusSearch()],["x",()=>n.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.isSuspended=n.isSuspended??(()=>false),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=o=>this.handleKeydown(o);}t;helpOverlay;hintButton;keyMap;isSuspended;boundHandler;shadowRoot=null;enabled=false;helpVisible=false;opener=null;destroyed=false;enable(e){if(this.destroyed||this.enabled)return;e&&(this.shadowRoot=e),(this.shadowRoot??document).addEventListener("keydown",this.boundHandler),this.enabled=true;}disable(){if(!this.enabled)return;(this.shadowRoot??document).removeEventListener("keydown",this.boundHandler),this.enabled=false,this.helpVisible&&this.hideHelp();}get isHelpVisible(){return this.helpVisible}toggleHelp(){this.helpVisible?this.hideHelp():this.showHelp();}destroy(){this.destroyed||(this.disable(),this.helpOverlay.remove(),this.hintButton.remove(),this.destroyed=true);}handleKeydown(e){if(e.key==="Escape"){this.helpVisible&&(e.preventDefault(),e.stopPropagation(),this.hideHelp());return}if(this.helpVisible||this.isSuspended())return;let n=e.composedPath();if(n.some(r=>r instanceof Element&&r.getAttribute("aria-modal")==="true"))return;let s=n[0];if(s){let r=s.tagName?.toLowerCase();if(r==="input"||r==="textarea"||r==="select"||s.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let o=this.keyMap.get(e.key);o&&(e.preventDefault(),e.stopPropagation(),o());}showHelp(){let e=this.helpOverlay.getRootNode().activeElement;this.opener=e instanceof HTMLElement?e:null,this.helpVisible=true,C(this.helpOverlay,false),this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus();}hideHelp(){this.helpVisible=false;let e=B(this.helpOverlay);C(this.helpOverlay,true),this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible"),e&&this.opener?.isConnected&&this.opener.focus(),this.opener=null;}buildOverlay(){let e=a("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),C(e,true),e.addEventListener("click",l=>{l.target===e&&this.hideHelp();});let n=a("div",{class:"sp-shortcuts-card"}),s=a("div",{class:"sp-shortcuts-title"});s.appendChild(h(nn));let o=a("span");p(o,this.t("shortcuts.title")),s.appendChild(o),n.appendChild(s);let r=document.createElement("button");r.className="sp-shortcuts-close",r.setAttribute("aria-label",this.t("shortcuts.close")),r.appendChild(h(on)),r.addEventListener("click",()=>this.hideHelp()),n.appendChild(r);let i=a("div",{class:"sp-shortcuts-grid"});for(let l of sn){let d=a("div",{class:"sp-shortcuts-row"}),c=a("div",{class:"sp-shortcuts-keys"});l.keys.forEach((f,k)=>{if(k>0){let w=a("span",{class:"sp-shortcuts-separator"});p(w,"/"),c.appendChild(w);}let y=a("span",{class:"sp-kbd"});p(y,f),c.appendChild(y);});let u=a("span",{class:"sp-shortcuts-desc"});p(u,this.t(l.label)),d.appendChild(c),d.appendChild(u),i.appendChild(d);}return n.appendChild(i),e.appendChild(n),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),p(e,"?"),e.addEventListener("click",n=>{n.stopPropagation(),this.toggleHelp();}),e}};
8
- export{gs as $,ht as A,A as Aa,gt as B,Te as Ba,Yn as C,Ae as Ca,h as D,Xs as Da,a as E,Pe as Ea,p as F,Js as Fa,N as G,Fe as Ga,X as H,eo as Ha,C as I,lo as Ia,Y as J,$e as Ja,qn as K,go as Ka,Jn as L,mo as La,Zn as M,fo as Ma,es as N,Ue as Na,me as O,bo as Oa,ns as P,wo as Pa,ss as Q,Ve as Qa,os as R,So as Ra,rs as S,To as Sa,as as T,Ao as Ta,ls as U,ze as Ua,ps as V,ds as W,cs as X,fe as Y,us as Z,hs as _,st as a,ms as aa,R as b,fs as ba,T as c,bs as ca,P as d,xs as da,M as e,vs as ea,We as f,ks as fa,rt as g,ys as ga,Xe as h,be as ha,Ye as i,ws as ia,ie as j,Cs as ja,E as k,Ss as ka,Qe as l,Ts as la,qe as m,Ee as ma,Je as n,As as na,Ze as o,Ls as oa,et as p,Rs as pa,tt as q,St as qa,it as r,Ps as ra,at as s,Fs as sa,lt as t,Ms as ta,pt as u,Is as ua,dt as v,Ns as va,ct as w,_s as wa,ut as x,Us as xa,pe as y,Ks as ya,Wn as z,Vs as za};//# sourceMappingURL=chunk-HFZPYBZG.js.map
9
- //# sourceMappingURL=chunk-HFZPYBZG.js.map
8
+ export{gs as $,ht as A,A as Aa,gt as B,Te as Ba,Yn as C,Ae as Ca,h as D,Xs as Da,a as E,Pe as Ea,p as F,Js as Fa,N as G,Fe as Ga,X as H,eo as Ha,C as I,lo as Ia,Y as J,$e as Ja,qn as K,go as Ka,Jn as L,mo as La,Zn as M,fo as Ma,es as N,Ue as Na,me as O,bo as Oa,ns as P,wo as Pa,ss as Q,Ve as Qa,os as R,So as Ra,rs as S,To as Sa,as as T,Ao as Ta,ls as U,ze as Ua,ps as V,ds as W,cs as X,fe as Y,us as Z,hs as _,st as a,ms as aa,R as b,fs as ba,T as c,bs as ca,P as d,xs as da,M as e,vs as ea,We as f,ks as fa,rt as g,ys as ga,Xe as h,be as ha,Ye as i,ws as ia,ie as j,Cs as ja,E as k,Ss as ka,Qe as l,Ts as la,qe as m,Ee as ma,Je as n,As as na,Ze as o,Ls as oa,et as p,Rs as pa,tt as q,St as qa,it as r,Ps as ra,at as s,Fs as sa,lt as t,Ms as ta,pt as u,Is as ua,dt as v,Ns as va,ct as w,_s as wa,ut as x,Us as xa,pe as y,Ks as ya,Wn as z,Vs as za};//# sourceMappingURL=chunk-74WBEHHG.js.map
9
+ //# sourceMappingURL=chunk-74WBEHHG.js.map