@siteping/widget 0.9.9 → 0.9.10

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.
package/README.md CHANGED
@@ -75,6 +75,8 @@ All configuration options for `initSiteping()`:
75
75
  | `locale` | `'en' \| 'fr' \| 'de' \| 'es' \| 'it' \| 'pt' \| 'ru'` | `'en'` | Widget UI language. Unknown locales fall back to English |
76
76
  | `forceShow` | `boolean` | `false` | Show the widget in production (hidden by default) |
77
77
  | `debug` | `boolean` | `false` | Enable debug logging to console |
78
+ | `identity` | `{ name: string; email: string }` | — | Pre-fill author identity from the host (SSO). When set, the widget skips the identity modal |
79
+ | `deepLink` | `boolean \| { param?: string }` | `false` | On initial load, focus the annotation referenced by `?siteping=<id>` (or a custom query key). SPA navigations are ignored — use `focusFeedback()` for route-change focus |
78
80
 
79
81
  > **Custom translations** — Use `registerLocale(code, translations)` to add your own locale at runtime.
80
82
 
@@ -121,6 +123,14 @@ widget.open() // Open the feedback panel
121
123
  widget.close() // Close the feedback panel
122
124
  widget.refresh() // Refresh feedbacks from the server
123
125
  widget.destroy() // Remove the widget and clean up all DOM elements + listeners
126
+
127
+ // Scroll a specific annotation into view, pin its highlight, and pulse the
128
+ // marker. Counterpart to the `deepLink` config option for hosts that drive
129
+ // focus from JS (e.g. a notification click handler) instead of a URL query.
130
+ // Returns `false` when no visible marker matches the given ID (unknown ID,
131
+ // filtered by `scopeAnnotationsByUrl`, or markers not yet loaded — initial
132
+ // fetch is async).
133
+ widget.focusFeedback('feedback-id') // => boolean
124
134
  ```
125
135
 
126
136
  ## Event system
@@ -1,4 +1,4 @@
1
- function c(o){let s=document.createRange().createContextualFragment(o).firstElementChild;if(!s||s.nodeName.toLowerCase()!=="svg")throw new Error("[siteping] Invalid SVG string");for(let n of [...s.attributes])n.name.startsWith("on")&&s.removeAttribute(n.name);for(let n of s.querySelectorAll("*"))for(let i of [...n.attributes])i.name.startsWith("on")&&n.removeAttribute(i.name);return s}function r(o,e){let t=document.createElement(o);if(e)for(let[s,n]of Object.entries(e))s==="class"?t.className=n:s==="style"?t.style.cssText=n:t.setAttribute(s,n);return t}function a(o,e){o.textContent=e;}function L(o){let e=Array.from(o.childNodes).map(t=>t.cloneNode(true));return o.disabled=true,o.replaceChildren(r("div",{class:"sp-spinner sp-spinner--sm"})),()=>{o.replaceChildren(...e),o.disabled=false;}}function Re(o,e="en"){let t=Date.now()-new Date(o).getTime(),s=Math.floor(t/1e3);if(s<60)return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"second");let n=new Intl.RelativeTimeFormat(e,{numeric:"always",style:"narrow"}),i=Math.floor(s/60);if(i<60)return n.format(-i,"minute");let l=Math.floor(i/60);if(l<24)return n.format(-l,"hour");let d=Math.floor(l/24);return d<7?n.format(-d,"day"):new Date(o).toLocaleDateString(e)}var Oe='<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 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><circle cx="12" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="8" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1" fill="currentColor" stroke="none"/></svg>',Fe='<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 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',Ne='<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="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 3v18"/></svg>',je='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',_e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',De='<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>',$e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',Pe='<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>',ze='<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"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',Ie='<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 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>',Ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="6" width="8" height="14" rx="4"/><path d="M19 9h2"/><path d="M3 9h2"/><path d="M19 13h2"/><path d="M3 13h2"/><path d="M19 17h2"/><path d="M3 17h2"/><path d="M10 2h4"/></svg>',Ge='<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="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',Ue='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>',Ye='<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="9"/><circle cx="12" cy="12" r="3" fill="currentColor" stroke="none"/></svg>',Ke='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>',qe='<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>',Qe='<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>';var F="#0066ff",J=/^#[0-9a-fA-F]{6}$/,O=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,Z=/^#[0-9a-fA-F]{8}$/;function ee(o){if(J.test(o))return o;let e=O.test(o)?o.match(O):null;return e?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:Z.test(o)?o.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${o}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),F)}function te(o,e){let t=Math.max(0,Math.round(parseInt(o.slice(1,3),16)*(1-e))),s=Math.max(0,Math.round(parseInt(o.slice(3,5),16)*(1-e))),n=Math.max(0,Math.round(parseInt(o.slice(5,7),16)*(1-e)));return `#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}`}function se(){return typeof window>"u"?false:window.matchMedia("(prefers-color-scheme: dark)").matches}function oe(o){return o==="dark"||o==="auto"&&se()?"dark":"light"}function Xe(o=F,e){let t=ee(o),s=te(t,.15);return oe(e)==="dark"?{accent:t,accentLight:t+"22",accentDark:s,accentGlow:t+"44",accentGradient:`linear-gradient(135deg, ${t}, ${s})`,bg:"#0f172a",bgHover:"#1e293b",text:"#f1f5f9",textSecondary:"#94a3b8",textTertiary:"#64748b",border:"#334155",shadow:"rgba(0, 0, 0, 0.3)",glassBg:"rgba(15, 23, 42, 0.78)",glassBgHeavy:"rgba(15, 23, 42, 0.88)",glassBorder:"rgba(51, 65, 85, 0.5)",glassBorderSubtle:"rgba(51, 65, 85, 0.3)",typeQuestion:"#60a5fa",typeChange:"#fbbf24",typeBug:"#f87171",typeOther:"#94a3b8",typeQuestionBg:"rgba(59, 130, 246, 0.15)",typeChangeBg:"rgba(245, 158, 11, 0.15)",typeBugBg:"rgba(239, 68, 68, 0.15)",typeOtherBg:"rgba(100, 116, 139, 0.15)",statusOpen:"#4ade80",statusOpenBg:"rgba(74, 222, 128, 0.15)",statusResolved:"#94a3b8",statusResolvedBg:"rgba(148, 163, 184, 0.15)"}:{accent:t,accentLight:t+"14",accentDark:s,accentGlow:t+"33",accentGradient:`linear-gradient(135deg, ${t}, ${s})`,bg:"#ffffff",bgHover:"#f8f9fb",text:"#0f172a",textSecondary:"#475569",textTertiary:"#64748b",border:"#e2e8f0",shadow:"rgba(0, 0, 0, 0.06)",glassBg:"rgba(255, 255, 255, 0.72)",glassBgHeavy:"rgba(255, 255, 255, 0.85)",glassBorder:"rgba(255, 255, 255, 0.35)",glassBorderSubtle:"rgba(255, 255, 255, 0.18)",typeQuestion:"#3b82f6",typeChange:"#b45309",typeBug:"#ef4444",typeOther:"#64748b",typeQuestionBg:"#eff6ff",typeChangeBg:"#fffbeb",typeBugBg:"#fef2f2",typeOtherBg:"#f8fafc",statusOpen:"#16a34a",statusOpenBg:"#f0fdf4",statusResolved:"#64748b",statusResolvedBg:"#f1f5f9"}}function A(o,e){switch(o){case "question":return e.typeQuestion;case "change":return e.typeChange;case "bug":return e.typeBug;default:return e.typeOther}}function N(o,e){switch(o){case "question":return e.typeQuestionBg;case "change":return e.typeChangeBg;case "bug":return e.typeBugBg;default:return e.typeOtherBg}}function Je(o){return `
1
+ function c(o){let s=document.createRange().createContextualFragment(o).firstElementChild;if(!s||s.nodeName.toLowerCase()!=="svg")throw new Error("[siteping] Invalid SVG string");for(let r of [...s.attributes])r.name.startsWith("on")&&s.removeAttribute(r.name);for(let r of s.querySelectorAll("*"))for(let i of [...r.attributes])i.name.startsWith("on")&&r.removeAttribute(i.name);return s}function n(o,e){let t=document.createElement(o);if(e)for(let[s,r]of Object.entries(e))s==="class"?t.className=r:s==="style"?t.style.cssText=r:t.setAttribute(s,r);return t}function a(o,e){o.textContent=e;}function L(o){let e=Array.from(o.childNodes).map(t=>t.cloneNode(true));return o.disabled=true,o.replaceChildren(n("div",{class:"sp-spinner sp-spinner--sm"})),()=>{o.replaceChildren(...e),o.disabled=false;}}function Re(o,e="en"){let t=Date.now()-new Date(o).getTime(),s=Math.floor(t/1e3);if(s<60)return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"second");let r=new Intl.RelativeTimeFormat(e,{numeric:"always",style:"narrow"}),i=Math.floor(s/60);if(i<60)return r.format(-i,"minute");let l=Math.floor(i/60);if(l<24)return r.format(-l,"hour");let d=Math.floor(l/24);return d<7?r.format(-d,"day"):new Date(o).toLocaleDateString(e)}var Oe='<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 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><circle cx="12" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="8" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1" fill="currentColor" stroke="none"/></svg>',Fe='<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 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',Ne='<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="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 3v18"/></svg>',je='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',De='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',_e='<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>',$e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>',Pe='<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>',Ie='<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"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',ze='<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 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>',Ve='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="6" width="8" height="14" rx="4"/><path d="M19 9h2"/><path d="M3 9h2"/><path d="M19 13h2"/><path d="M3 13h2"/><path d="M19 17h2"/><path d="M3 17h2"/><path d="M10 2h4"/></svg>',Ge='<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="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',Ue='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>',Ye='<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="9"/><circle cx="12" cy="12" r="3" fill="currentColor" stroke="none"/></svg>',qe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>',Ke='<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>',Qe='<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>';var F="#0066ff",J=/^#[0-9a-fA-F]{6}$/,O=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,Z=/^#[0-9a-fA-F]{8}$/;function ee(o){if(J.test(o))return o;let e=O.test(o)?o.match(O):null;return e?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:Z.test(o)?o.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${o}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),F)}function te(o,e){let t=Math.max(0,Math.round(parseInt(o.slice(1,3),16)*(1-e))),s=Math.max(0,Math.round(parseInt(o.slice(3,5),16)*(1-e))),r=Math.max(0,Math.round(parseInt(o.slice(5,7),16)*(1-e)));return `#${t.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}function se(){return typeof window>"u"?false:window.matchMedia("(prefers-color-scheme: dark)").matches}function oe(o){return o==="dark"||o==="auto"&&se()?"dark":"light"}function Xe(o=F,e){let t=ee(o),s=te(t,.15);return oe(e)==="dark"?{accent:t,accentLight:t+"22",accentDark:s,accentGlow:t+"44",accentGradient:`linear-gradient(135deg, ${t}, ${s})`,bg:"#0f172a",bgHover:"#1e293b",text:"#f1f5f9",textSecondary:"#94a3b8",textTertiary:"#64748b",border:"#334155",shadow:"rgba(0, 0, 0, 0.3)",glassBg:"rgba(15, 23, 42, 0.78)",glassBgHeavy:"rgba(15, 23, 42, 0.88)",glassBorder:"rgba(51, 65, 85, 0.5)",glassBorderSubtle:"rgba(51, 65, 85, 0.3)",typeQuestion:"#60a5fa",typeChange:"#fbbf24",typeBug:"#f87171",typeOther:"#94a3b8",typeQuestionBg:"rgba(59, 130, 246, 0.15)",typeChangeBg:"rgba(245, 158, 11, 0.15)",typeBugBg:"rgba(239, 68, 68, 0.15)",typeOtherBg:"rgba(100, 116, 139, 0.15)",statusOpen:"#4ade80",statusOpenBg:"rgba(74, 222, 128, 0.15)",statusResolved:"#94a3b8",statusResolvedBg:"rgba(148, 163, 184, 0.15)"}:{accent:t,accentLight:t+"14",accentDark:s,accentGlow:t+"33",accentGradient:`linear-gradient(135deg, ${t}, ${s})`,bg:"#ffffff",bgHover:"#f8f9fb",text:"#0f172a",textSecondary:"#475569",textTertiary:"#64748b",border:"#e2e8f0",shadow:"rgba(0, 0, 0, 0.06)",glassBg:"rgba(255, 255, 255, 0.72)",glassBgHeavy:"rgba(255, 255, 255, 0.85)",glassBorder:"rgba(255, 255, 255, 0.35)",glassBorderSubtle:"rgba(255, 255, 255, 0.18)",typeQuestion:"#3b82f6",typeChange:"#b45309",typeBug:"#ef4444",typeOther:"#64748b",typeQuestionBg:"#eff6ff",typeChangeBg:"#fffbeb",typeBugBg:"#fef2f2",typeOtherBg:"#f8fafc",statusOpen:"#16a34a",statusOpenBg:"#f0fdf4",statusResolved:"#64748b",statusResolvedBg:"#f1f5f9"}}function A(o,e){switch(o){case "question":return e.typeQuestion;case "change":return e.typeChange;case "bug":return e.typeBug;default:return e.typeOther}}function N(o,e){switch(o){case "question":return e.typeQuestionBg;case "change":return e.typeChangeBg;case "bug":return e.typeBugBg;default:return e.typeOtherBg}}function Je(o){return `
2
2
  --sp-accent: ${o.accent};
3
3
  --sp-accent-light: ${o.accentLight};
4
4
  --sp-accent-dark: ${o.accentDark};
@@ -35,7 +35,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
35
35
  --sp-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
36
36
  --sp-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
37
37
  --sp-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
38
- `}var j={"panel.title":"Feedbacks","panel.ariaLabel":"Siteping feedback panel","panel.feedbackList":"Feedback list","panel.loading":"Loading feedbacks","panel.close":"Close panel","panel.deleteAll":"Delete all","panel.deleteAllConfirmTitle":"Delete all","panel.deleteAllConfirmMessage":"Delete all feedbacks for this project? This action cannot be undone.","panel.search":"Search...","panel.searchAria":"Search feedbacks","panel.filterAll":"All","panel.loadError":"Failed to load","panel.retry":"Retry","panel.empty":"No feedback yet","panel.showMore":"Show more","panel.showLess":"Show less","panel.resolve":"Resolve","panel.reopen":"Reopen","panel.delete":"Delete","panel.cancel":"Cancel","panel.confirmDelete":"Delete","panel.loadMore":"Load more ({remaining} remaining)","panel.statusAll":"All","panel.statusOpen":"Open","panel.statusResolved":"Resolved","type.label":"Type","type.question":"Question","type.change":"Change","type.bug":"Bug","type.other":"Other","status.label":"Status","scope.label":"Scope","scope.thisPage":"This page","scope.thisType":"This type","scope.all":"All pages","fab.aria":"Siteping \u2014 Feedback menu","fab.messages":"Messages","fab.annotate":"Annotate","fab.annotations":"Annotations","annotator.instruction":"Draw a rectangle on the area to comment","annotator.cancel":"Cancel","popup.ariaLabel":"Feedback form","popup.placeholder":"Describe your feedback...","popup.textareaAria":"Feedback message","popup.submitHintMac":"\u2318+Enter to send","popup.submitHintOther":"Ctrl+Enter to send","popup.cancel":"Cancel","popup.submit":"Send","identity.title":"Identify yourself","identity.nameLabel":"Name","identity.namePlaceholder":"Your name","identity.emailLabel":"Email","identity.emailPlaceholder":"your@email.com","identity.cancel":"Cancel","identity.submit":"Continue","marker.approximate":"Approximate position (confidence: {confidence}%)","marker.aria":"Feedback #{number}: {type} \u2014 {message}","marker.count":"{count} feedback markers displayed","fab.badge":"{count} unresolved feedbacks","feedback.sent.confirmation":"Feedback sent successfully","feedback.error.message":"Failed to send feedback","feedback.deleted.confirmation":"Feedback deleted","badge.count":"{count} unresolved feedbacks","bulk.selectAll":"Select all","bulk.selected":"{count} selected","bulk.resolve":"Resolve","bulk.delete":"Delete","bulk.deselect":"Deselect","sort.newest":"Newest first","sort.oldest":"Oldest first","sort.byType":"By type","sort.openFirst":"Open first","sort.label":"Sort","group.byPage":"By page","group.feedbacks":"{count} feedbacks","stats.open":"Open","stats.resolved":"Resolved","stats.bugs":"Bugs","stats.progress":"{percent}% resolved","detail.back":"Back","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Message","detail.screenshot":"Screenshot","detail.screenshotAlt":"Screenshot of the annotated area","detail.metadata":"Details","detail.annotation":"Annotation","detail.page":"Page","detail.author":"Author","detail.date":"Created","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Resolved at","detail.goToAnnotation":"Go to annotation","detail.element":"Element","detail.selector":"Selector","detail.position":"Position","detail.resolve":"Resolve","detail.reopen":"Reopen","detail.delete":"Delete","detail.diagnostics":"Diagnostics","detail.diagnostics.console":"Console","detail.diagnostics.network":"Failed network","detail.diagnostics.expand":"Show diagnostics","detail.diagnostics.collapse":"Hide diagnostics","detail.diagnostics.noEntries":"No entries","shortcuts.title":"Keyboard shortcuts","shortcuts.navigate":"Navigate feedbacks","shortcuts.resolve":"Resolve / Reopen","shortcuts.delete":"Delete","shortcuts.search":"Focus search","shortcuts.select":"Toggle selection","shortcuts.help":"Show shortcuts","shortcuts.close":"Close","shortcuts.hint":"Keyboard shortcuts","export.label":"Export","export.csv":"Export CSV","export.json":"Export JSON"};var w={en:j},_=new Set(["de","es","fr","it","pt","ru"]);async function st(o){let e=(o.split("-")[0]??o).toLowerCase();if(w[e])return w[e];if(!_.has(e))return null;let t;switch(e){case "de":t=await import('./de-32TXJQIE.js');break;case "es":t=await import('./es-GFAPKPTK.js');break;case "fr":t=await import('./fr-W2JZ3EUC.js');break;case "it":t=await import('./it-GASU527B.js');break;case "pt":t=await import('./pt-AYXM6FG4.js');break;case "ru":t=await import('./ru-5DW2JCKR.js');break;default:return null}let s=t[e];return s?(w[e]=s,s):null}function ot(o){let e=(o.split("-")[0]??o).toLowerCase();return e!=="en"&&!w[e]&&!_.has(e)&&console.warn(`[siteping] Unknown locale "${o}", falling back to "en"`),t=>(w[e]??w.en??{})[t]??w.en?.[t]??t}function nt(o,e){switch(o){case "question":return e("type.question");case "change":return e("type.change");case "bug":return e("type.bug");case "other":return e("type.other");default:return o}}var 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 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',re='<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="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="15" x2="21" y2="15"/><line x1="9" y1="3" x2="9" y2="21"/><line x1="15" y1="3" x2="15" y2="21"/></svg>',ie='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H6a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2 2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h2"/><path d="M16 3h2a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2 2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2"/></svg>',at=`
38
+ `}var j={"panel.title":"Feedbacks","panel.ariaLabel":"Siteping feedback panel","panel.feedbackList":"Feedback list","panel.loading":"Loading feedbacks","panel.close":"Close panel","panel.deleteAll":"Delete all","panel.deleteAllConfirmTitle":"Delete all","panel.deleteAllConfirmMessage":"Delete all feedbacks for this project? This action cannot be undone.","panel.search":"Search...","panel.searchAria":"Search feedbacks","panel.filterAll":"All","panel.loadError":"Failed to load","panel.retry":"Retry","panel.empty":"No feedback yet","panel.showMore":"Show more","panel.showLess":"Show less","panel.resolve":"Resolve","panel.reopen":"Reopen","panel.delete":"Delete","panel.cancel":"Cancel","panel.confirmDelete":"Delete","panel.loadMore":"Load more ({remaining} remaining)","panel.statusAll":"All","panel.statusOpen":"Open","panel.statusResolved":"Resolved","type.label":"Type","type.question":"Question","type.change":"Change","type.bug":"Bug","type.other":"Other","status.label":"Status","scope.label":"Scope","scope.thisPage":"This page","scope.thisType":"This type","scope.all":"All pages","fab.aria":"Siteping \u2014 Feedback menu","fab.messages":"Messages","fab.annotate":"Annotate","fab.annotations":"Annotations","annotator.instruction":"Draw a rectangle on the area to comment","annotator.cancel":"Cancel","popup.ariaLabel":"Feedback form","popup.placeholder":"Describe your feedback...","popup.textareaAria":"Feedback message","popup.submitHintMac":"\u2318+Enter to send","popup.submitHintOther":"Ctrl+Enter to send","popup.cancel":"Cancel","popup.submit":"Send","identity.title":"Identify yourself","identity.nameLabel":"Name","identity.namePlaceholder":"Your name","identity.emailLabel":"Email","identity.emailPlaceholder":"your@email.com","identity.cancel":"Cancel","identity.submit":"Continue","marker.approximate":"Approximate position (confidence: {confidence}%)","marker.aria":"Feedback #{number}: {type} \u2014 {message}","marker.count":"{count} feedback markers displayed","fab.badge":"{count} unresolved feedbacks","feedback.sent.confirmation":"Feedback sent successfully","feedback.error.message":"Failed to send feedback","feedback.deleted.confirmation":"Feedback deleted","badge.count":"{count} unresolved feedbacks","bulk.selectAll":"Select all","bulk.selected":"{count} selected","bulk.resolve":"Resolve","bulk.delete":"Delete","bulk.deselect":"Deselect","sort.newest":"Newest first","sort.oldest":"Oldest first","sort.byType":"By type","sort.openFirst":"Open first","sort.label":"Sort","group.byPage":"By page","group.feedbacks":"{count} feedbacks","stats.open":"Open","stats.resolved":"Resolved","stats.bugs":"Bugs","stats.progress":"{percent}% resolved","detail.back":"Back","detail.title":"Feedback #{number}","detail.status":"Status","detail.message":"Message","detail.screenshot":"Screenshot","detail.screenshotAlt":"Screenshot of the annotated area","detail.metadata":"Details","detail.annotation":"Annotation","detail.page":"Page","detail.author":"Author","detail.date":"Created","detail.viewport":"Viewport","detail.browser":"Browser","detail.resolvedAt":"Resolved at","detail.goToAnnotation":"Go to annotation","detail.element":"Element","detail.selector":"Selector","detail.position":"Position","detail.resolve":"Resolve","detail.reopen":"Reopen","detail.delete":"Delete","detail.diagnostics":"Diagnostics","detail.diagnostics.console":"Console","detail.diagnostics.network":"Failed network","detail.diagnostics.expand":"Show diagnostics","detail.diagnostics.collapse":"Hide diagnostics","detail.diagnostics.noEntries":"No entries","shortcuts.title":"Keyboard shortcuts","shortcuts.navigate":"Navigate feedbacks","shortcuts.resolve":"Resolve / Reopen","shortcuts.delete":"Delete","shortcuts.search":"Focus search","shortcuts.select":"Toggle selection","shortcuts.help":"Show shortcuts","shortcuts.close":"Close","shortcuts.hint":"Keyboard shortcuts","export.label":"Export","export.csv":"Export CSV","export.json":"Export JSON"};var w={en:j},D=new Set(["de","es","fr","it","pt","ru"]);async function st(o){let e=(o.split("-")[0]??o).toLowerCase();if(w[e])return w[e];if(!D.has(e))return null;let t;switch(e){case "de":t=await import('./de-32TXJQIE.js');break;case "es":t=await import('./es-GFAPKPTK.js');break;case "fr":t=await import('./fr-W2JZ3EUC.js');break;case "it":t=await import('./it-GASU527B.js');break;case "pt":t=await import('./pt-AYXM6FG4.js');break;case "ru":t=await import('./ru-5DW2JCKR.js');break;default:return null}let s=t[e];return s?(w[e]=s,s):null}function ot(o){let e=(o.split("-")[0]??o).toLowerCase();return e!=="en"&&!w[e]&&!D.has(e)&&console.warn(`[siteping] Unknown locale "${o}", falling back to "en"`),t=>(w[e]??w.en??{})[t]??w.en?.[t]??t}function rt(o,e){switch(o){case "question":return e("type.question");case "change":return e("type.change");case "bug":return e("type.bug");case "other":return e("type.other");default:return o}}var re='<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 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',ne='<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="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="15" x2="21" y2="15"/><line x1="9" y1="3" x2="9" y2="21"/><line x1="15" y1="3" x2="15" y2="21"/></svg>',ie='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H6a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2 2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h2"/><path d="M16 3h2a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2 2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2"/></svg>',at=`
39
39
  /* ============================
40
40
  Export Button & Menu
41
41
  ============================ */
@@ -153,9 +153,9 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
153
153
  outline: 3px solid Highlight !important;
154
154
  }
155
155
  }
156
- `,D=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"];function ae(o){return o.includes('"')||o.includes(",")||o.includes(`
157
- `)||o.includes("\r")?`"${o.replace(/"/g,'""')}"`:o}function le(o){let e=D.join(","),t=o.map(s=>D.map(n=>{let i=s[n];return ae(i==null?"":String(i))}).join(","));return [e,...t].join(`
158
- `)}function pe(o){return JSON.stringify(o,null,2)}function $(o,e,t){let s=new Blob([o],{type:t}),n=URL.createObjectURL(s),i=document.createElement("a");i.href=n,i.download=e,i.style.display="none",document.body.appendChild(i),i.click(),requestAnimationFrame(()=>{URL.revokeObjectURL(n),i.remove();});}var P=class{constructor(e,t,s){this.getFeedbacks=t;this.element=r("div",{style:"position: relative; display: inline-flex;"});let n=document.createElement("button");n.className="sp-export-btn",n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded","false"),n.appendChild(c(ne));let i=document.createElement("span");a(i,s("export.label")),n.appendChild(i),n.addEventListener("click",p=>{p.stopPropagation(),this.toggle();}),this.menu=r("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let l=this.createOption(re,s("export.csv"),()=>{this.exportAs("csv");}),d=this.createOption(ie,s("export.json"),()=>{this.exportAs("json");});this.menu.appendChild(l),this.menu.appendChild(d),this.element.appendChild(n),this.element.appendChild(this.menu),this.onDocumentClick=p=>{this.isOpen&&!this.element.contains(p.target)&&this.close();},document.addEventListener("click",this.onDocumentClick,true);}getFeedbacks;element;menu;isOpen=false;onDocumentClick;createOption(e,t,s){let n=document.createElement("button");n.className="sp-export-option",n.setAttribute("role","menuitem");let i=r("span",{class:"sp-export-option-icon"});i.appendChild(c(e));let l=r("span",{class:"sp-export-option-label"});return a(l,t),n.appendChild(i),n.appendChild(l),n.addEventListener("click",d=>{d.stopPropagation(),s(),this.close();}),n}toggle(){this.isOpen?this.close():this.open();}open(){this.isOpen=true,this.menu.classList.add("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","true");}close(){this.isOpen=false,this.menu.classList.remove("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","false");}exportAs(e){let t=this.getFeedbacks();if(t.length===0)return;let s=t[0]?.projectName??"feedbacks",n=new Date().toISOString().slice(0,10),i=s.replace(/[^a-zA-Z0-9_-]/g,"_");if(e==="csv"){let l=le(t);$(l,`feedbacks-${i}-${n}.csv`,"text/csv;charset=utf-8");}else {let l=pe(t);$(l,`feedbacks-${i}-${n}.json`,"application/json;charset=utf-8");}}destroy(){document.removeEventListener("click",this.onDocumentClick,true),this.element.remove();}};var T='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" stroke="currentColor" stroke-width="2"/></svg>',z='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" fill="url(#sp-cb-grad)" stroke="none"/><polyline points="5 9 8 12 13 6" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><defs><linearGradient id="sp-cb-grad" x1="0" y1="0" x2="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="var(--sp-accent)"/><stop offset="100%" stop-color="var(--sp-accent-dark)"/></linearGradient></defs></svg>',dt=`
156
+ `,_=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"];function ae(o){return o.includes('"')||o.includes(",")||o.includes(`
157
+ `)||o.includes("\r")?`"${o.replace(/"/g,'""')}"`:o}function le(o){let e=_.join(","),t=o.map(s=>_.map(r=>{let i=s[r];return ae(i==null?"":String(i))}).join(","));return [e,...t].join(`
158
+ `)}function pe(o){return JSON.stringify(o,null,2)}function $(o,e,t){let s=new Blob([o],{type:t}),r=URL.createObjectURL(s),i=document.createElement("a");i.href=r,i.download=e,i.style.display="none",document.body.appendChild(i),i.click(),requestAnimationFrame(()=>{URL.revokeObjectURL(r),i.remove();});}var P=class{constructor(e,t,s){this.getFeedbacks=t;this.element=n("div",{style:"position: relative; display: inline-flex;"});let r=document.createElement("button");r.className="sp-export-btn",r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(c(re));let i=document.createElement("span");a(i,s("export.label")),r.appendChild(i),r.addEventListener("click",p=>{p.stopPropagation(),this.toggle();}),this.menu=n("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let l=this.createOption(ne,s("export.csv"),()=>{this.exportAs("csv");}),d=this.createOption(ie,s("export.json"),()=>{this.exportAs("json");});this.menu.appendChild(l),this.menu.appendChild(d),this.element.appendChild(r),this.element.appendChild(this.menu),this.onDocumentClick=p=>{this.isOpen&&!this.element.contains(p.target)&&this.close();},document.addEventListener("click",this.onDocumentClick,true);}getFeedbacks;element;menu;isOpen=false;onDocumentClick;createOption(e,t,s){let r=document.createElement("button");r.className="sp-export-option",r.setAttribute("role","menuitem");let i=n("span",{class:"sp-export-option-icon"});i.appendChild(c(e));let l=n("span",{class:"sp-export-option-label"});return a(l,t),r.appendChild(i),r.appendChild(l),r.addEventListener("click",d=>{d.stopPropagation(),s(),this.close();}),r}toggle(){this.isOpen?this.close():this.open();}open(){this.isOpen=true,this.menu.classList.add("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","true");}close(){this.isOpen=false,this.menu.classList.remove("sp-export-menu--open"),this.element.querySelector(".sp-export-btn")?.setAttribute("aria-expanded","false");}exportAs(e){let t=this.getFeedbacks();if(t.length===0)return;let s=t[0]?.projectName??"feedbacks",r=new Date().toISOString().slice(0,10),i=s.replace(/[^a-zA-Z0-9_-]/g,"_");if(e==="csv"){let l=le(t);$(l,`feedbacks-${i}-${r}.csv`,"text/csv;charset=utf-8");}else {let l=pe(t);$(l,`feedbacks-${i}-${r}.json`,"application/json;charset=utf-8");}}destroy(){document.removeEventListener("click",this.onDocumentClick,true),this.element.remove();}};var T='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" stroke="currentColor" stroke-width="2"/></svg>',I='<svg viewBox="0 0 18 18" fill="none" aria-hidden="true"><rect x="1" y="1" width="16" height="16" rx="4" fill="url(#sp-cb-grad)" stroke="none"/><polyline points="5 9 8 12 13 6" fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><defs><linearGradient id="sp-cb-grad" x1="0" y1="0" x2="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="var(--sp-accent)"/><stop offset="100%" stop-color="var(--sp-accent-dark)"/></linearGradient></defs></svg>',dt=`
159
159
  /* ============================
160
160
  Bulk Checkbox
161
161
  ============================ */
@@ -453,7 +453,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
453
453
  transition-duration: 0.01ms !important;
454
454
  }
455
455
  }
456
- `,I=class{constructor(e,t,s){this.callbacks=t;this.t=s,this.barElement=r("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label","Bulk actions"),this.countLabel=r("span",{class:"sp-bulk-bar-count"}),a(this.countLabel,this.t("bulk.selected").replace("{count}","0"));let n=r("div",{class:"sp-bulk-bar-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.className="sp-bulk-btn-resolve",this.resolveBtn.type="button",this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.className="sp-bulk-btn-delete",this.deleteBtn.type="button",this.deleteBtn.addEventListener("click",()=>this.handleDelete());let i=document.createElement("button");i.className="sp-bulk-btn-deselect",i.type="button",i.setAttribute("aria-label",this.t("bulk.deselect")),i.appendChild(c('<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>')),i.addEventListener("click",()=>this.deselectAll()),n.appendChild(this.resolveBtn),n.appendChild(this.deleteBtn),n.appendChild(i),this.barElement.appendChild(this.countLabel),this.barElement.appendChild(n),this.updateButtonLabels();}callbacks;barElement;selected=new Set;checkboxMap=new Map;countLabel;resolveBtn;deleteBtn;selectAllCheckbox=null;listContainer=null;isProcessing=false;t;createCheckbox(e){let t=r("div",{class:"sp-bulk-checkbox"});return t.setAttribute("role","checkbox"),t.setAttribute("aria-checked","false"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`Select feedback ${e}`),t.appendChild(c(T)),t.addEventListener("click",s=>{s.stopPropagation(),this.toggle(e);}),t.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),s.stopPropagation(),this.toggle(e));}),this.checkboxMap.set(e,t),t}createSelectAllBar(e,t){let s=r("div",{class:"sp-bulk-select-all"}),n=r("div",{class:"sp-bulk-checkbox"});n.appendChild(c(T)),this.selectAllCheckbox=n;let i=r("span");return a(i,t),s.appendChild(n),s.appendChild(i),s.addEventListener("click",()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e);}),s}setListContainer(e){this.listContainer=e;}toggle(e){this.isProcessing||(this.selected.has(e)?this.selected.delete(e):this.selected.add(e),this.updateCheckbox(e),this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass(),this.updateCardSelectedState(e));}selectAll(e){if(!this.isProcessing){for(let t of e)this.selected.add(t),this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let t of e)this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}get selectedIds(){return [...this.selected]}get count(){return this.selected.size}get hasSelection(){return this.selected.size>0}reset(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.isProcessing=false,this.updateBar(),this.updateListSelectionClass();}destroy(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.listContainer=null,this.barElement.remove();}updateBar(){let e=this.selected.size,t=e>0;this.barElement.classList.toggle("sp-bulk-bar--visible",t),a(this.countLabel,this.t("bulk.selected").replace("{count}",String(e))),this.updateButtonLabels();}updateButtonLabels(){let e=this.selected.size,t=this.t("bulk.resolve"),s=this.t("bulk.delete");this.resolveBtn.replaceChildren();let n=document.createElement("span");a(n,e>0?`${t} ${e}`:t),this.resolveBtn.appendChild(n),this.deleteBtn.replaceChildren();let i=document.createElement("span");a(i,e>0?`${s} ${e}`:s),this.deleteBtn.appendChild(i);}updateCheckbox(e){let t=this.checkboxMap.get(e);if(!t)return;let s=this.selected.has(e);t.classList.toggle("sp-bulk-checkbox--checked",s),t.setAttribute("aria-checked",String(s)),t.replaceChildren(),t.appendChild(c(s?z:T));}updateSelectAllCheckbox(){if(!this.selectAllCheckbox)return;let e=this.selected.size>0&&this.selected.size===this.checkboxMap.size;this.selectAllCheckbox.classList.toggle("sp-bulk-checkbox--checked",e),this.selectAllCheckbox.setAttribute("aria-checked",String(e)),this.selectAllCheckbox.replaceChildren(),this.selectAllCheckbox.appendChild(c(e?z:T));}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0);}updateCardSelectedState(e){if(!this.listContainer)return;let t=CSS.escape(e),s=this.listContainer.querySelector(`[data-feedback-id="${t}"]`);s&&s.classList.toggle("sp-card--selected",this.selected.has(e));}async handleResolve(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],t=L(this.resolveBtn);this.deleteBtn.disabled=true;try{await this.callbacks.onResolve(e),this.reset();}catch{t(),this.deleteBtn.disabled=false;}finally{this.isProcessing=false;}}async handleDelete(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],t=L(this.deleteBtn);this.resolveBtn.disabled=true;try{await this.callbacks.onDelete(e),this.reset();}catch{t(),this.resolveBtn.disabled=false;}finally{this.isProcessing=false;}}};var de='<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>',R='<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>',ce='<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>',he='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',ue='<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>',ge='<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>',H='<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>',V='<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>',G='<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>',be='<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>',ve='<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>',xe='<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>',me='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>',gt=`
456
+ `,z=class{constructor(e,t,s){this.callbacks=t;this.t=s,this.barElement=n("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label","Bulk actions"),this.countLabel=n("span",{class:"sp-bulk-bar-count"}),a(this.countLabel,this.t("bulk.selected").replace("{count}","0"));let r=n("div",{class:"sp-bulk-bar-actions"});this.resolveBtn=document.createElement("button"),this.resolveBtn.className="sp-bulk-btn-resolve",this.resolveBtn.type="button",this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.className="sp-bulk-btn-delete",this.deleteBtn.type="button",this.deleteBtn.addEventListener("click",()=>this.handleDelete());let i=document.createElement("button");i.className="sp-bulk-btn-deselect",i.type="button",i.setAttribute("aria-label",this.t("bulk.deselect")),i.appendChild(c('<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>')),i.addEventListener("click",()=>this.deselectAll()),r.appendChild(this.resolveBtn),r.appendChild(this.deleteBtn),r.appendChild(i),this.barElement.appendChild(this.countLabel),this.barElement.appendChild(r),this.updateButtonLabels();}callbacks;barElement;selected=new Set;checkboxMap=new Map;countLabel;resolveBtn;deleteBtn;selectAllCheckbox=null;listContainer=null;isProcessing=false;t;createCheckbox(e){let t=n("div",{class:"sp-bulk-checkbox"});return t.setAttribute("role","checkbox"),t.setAttribute("aria-checked","false"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`Select feedback ${e}`),t.appendChild(c(T)),t.addEventListener("click",s=>{s.stopPropagation(),this.toggle(e);}),t.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),s.stopPropagation(),this.toggle(e));}),this.checkboxMap.set(e,t),t}createSelectAllBar(e,t){let s=n("div",{class:"sp-bulk-select-all"}),r=n("div",{class:"sp-bulk-checkbox"});r.appendChild(c(T)),this.selectAllCheckbox=r;let i=n("span");return a(i,t),s.appendChild(r),s.appendChild(i),s.addEventListener("click",()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e);}),s}setListContainer(e){this.listContainer=e;}toggle(e){this.isProcessing||(this.selected.has(e)?this.selected.delete(e):this.selected.add(e),this.updateCheckbox(e),this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass(),this.updateCardSelectedState(e));}selectAll(e){if(!this.isProcessing){for(let t of e)this.selected.add(t),this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let t of e)this.updateCheckbox(t),this.updateCardSelectedState(t);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}get selectedIds(){return [...this.selected]}get count(){return this.selected.size}get hasSelection(){return this.selected.size>0}reset(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.isProcessing=false,this.updateBar(),this.updateListSelectionClass();}destroy(){this.selected.clear(),this.checkboxMap.clear(),this.selectAllCheckbox=null,this.listContainer=null,this.barElement.remove();}updateBar(){let e=this.selected.size,t=e>0;this.barElement.classList.toggle("sp-bulk-bar--visible",t),a(this.countLabel,this.t("bulk.selected").replace("{count}",String(e))),this.updateButtonLabels();}updateButtonLabels(){let e=this.selected.size,t=this.t("bulk.resolve"),s=this.t("bulk.delete");this.resolveBtn.replaceChildren();let r=document.createElement("span");a(r,e>0?`${t} ${e}`:t),this.resolveBtn.appendChild(r),this.deleteBtn.replaceChildren();let i=document.createElement("span");a(i,e>0?`${s} ${e}`:s),this.deleteBtn.appendChild(i);}updateCheckbox(e){let t=this.checkboxMap.get(e);if(!t)return;let s=this.selected.has(e);t.classList.toggle("sp-bulk-checkbox--checked",s),t.setAttribute("aria-checked",String(s)),t.replaceChildren(),t.appendChild(c(s?I:T));}updateSelectAllCheckbox(){if(!this.selectAllCheckbox)return;let e=this.selected.size>0&&this.selected.size===this.checkboxMap.size;this.selectAllCheckbox.classList.toggle("sp-bulk-checkbox--checked",e),this.selectAllCheckbox.setAttribute("aria-checked",String(e)),this.selectAllCheckbox.replaceChildren(),this.selectAllCheckbox.appendChild(c(e?I:T));}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0);}updateCardSelectedState(e){if(!this.listContainer)return;let t=CSS.escape(e),s=this.listContainer.querySelector(`[data-feedback-id="${t}"]`);s&&s.classList.toggle("sp-card--selected",this.selected.has(e));}async handleResolve(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],t=L(this.resolveBtn);this.deleteBtn.disabled=true;try{await this.callbacks.onResolve(e),this.reset();}catch{t(),this.deleteBtn.disabled=false;}finally{this.isProcessing=false;}}async handleDelete(){if(this.isProcessing||this.selected.size===0)return;this.isProcessing=true;let e=[...this.selected],t=L(this.deleteBtn);this.resolveBtn.disabled=true;try{await this.callbacks.onDelete(e),this.reset();}catch{t(),this.resolveBtn.disabled=false;}finally{this.isProcessing=false;}}};var de='<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>',R='<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>',ce='<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>',he='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',ue='<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>',ge='<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>',H='<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>',V='<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>',G='<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>',be='<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>',ve='<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>',xe='<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>',fe='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 17 10 11 4 5"/><line x1="12" y1="19" x2="20" y2="19"/></svg>',gt=`
457
457
  /* ============================
458
458
  Detail View \u2014 Panel-in-Panel
459
459
  ============================ */
@@ -477,6 +477,39 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
477
477
  transform: translateX(0);
478
478
  }
479
479
 
480
+ /* Fallback for browsers that cannot deliver a readable "frosted glass":
481
+ drop the translucent background to a solid one so the underlying list
482
+ does not bleed through. Two disjoint cohorts:
483
+
484
+ 1. No backdrop-filter at all (Firefox <=102, legacy Edge / IE,
485
+ older Chromium on Linux).
486
+ 2. Safari / iOS Safari where backdrop-filter is detectable only
487
+ via the -webkit- prefix. Empirically this still includes recent
488
+ Safari (observed on macOS Safari 18.6 in 2026, where
489
+ CSS.supports('backdrop-filter', 'blur(...)') returns false even
490
+ though the unprefixed property has shipped). On these builds the
491
+ long-standing nested-backdrop + transform compositing bug
492
+ silently no-ops the blur on .sp-detail (which is transformed and
493
+ lives inside another backdrop-filter ancestor, .sp-panel), so
494
+ the translucent default is unreadable. Detection is a pure
495
+ feature query: prefixed supported AND unprefixed not. No
496
+ user-agent sniffing.
497
+
498
+ Browsers where the glass effect renders correctly (most Chromium,
499
+ modern Firefox, any engine that advertises both property names via
500
+ CSS.supports) are unaffected. */
501
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
502
+ .sp-detail {
503
+ background: var(--sp-bg);
504
+ }
505
+ }
506
+
507
+ @supports (-webkit-backdrop-filter: blur(1px)) and (not (backdrop-filter: blur(1px))) {
508
+ .sp-detail {
509
+ background: var(--sp-bg);
510
+ }
511
+ }
512
+
480
513
  /* ---- Header ---- */
481
514
 
482
515
  .sp-detail-header {
@@ -1132,7 +1165,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
1132
1165
  animation-duration: 0.01ms !important;
1133
1166
  }
1134
1167
  }
1135
- `;function fe(o){if(/Edg\//i.test(o)){let e=o.match(/Edg\/([\d.]+)/);return e?`Edge ${e[1]}`:"Edge"}if(/OPR\//i.test(o)||/Opera/i.test(o)){let e=o.match(/OPR\/([\d.]+)/);return e?`Opera ${e[1]}`:"Opera"}if(/Firefox\//i.test(o)){let e=o.match(/Firefox\/([\d.]+)/);return e?`Firefox ${e[1]}`:"Firefox"}if(/Chrome\//i.test(o)&&!/Chromium/i.test(o)){let e=o.match(/Chrome\/([\d.]+)/);return e?`Chrome ${e[1]}`:"Chrome"}if(/Safari\//i.test(o)&&!/Chrome/i.test(o)){let e=o.match(/Version\/([\d.]+)/);return e?`Safari ${e[1]}`:"Safari"}return "Unknown"}function U(o,e){try{return new Date(o).toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return o}}function ye(o){try{return new URL(o).pathname}catch{return o}}function ke(o){return !!(/^data:image\/(jpeg|png|webp);/i.test(o)||/^https:\/\//i.test(o))}function S(o,e){return o.length<=e?o:o.slice(0,e-1)+"\u2026"}function Ce(o){if(!o)return false;let e=Array.isArray(o.console)?o.console.length:0,t=Array.isArray(o.network)?o.network.length:0;return e>0||t>0}function we(o){return !Number.isFinite(o)||o<0?"\u2014":o<1e3?`${Math.round(o)} ms`:`${(o/1e3).toFixed(1)} s`}var Y=class{constructor(e,t,s,n){this.colors=e;this.callbacks=t;this.t=s,this.locale=n,this.element=r("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label","Feedback detail"),this.element.setAttribute("aria-hidden","true");let i=r("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(c(de)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=r("div",{class:"sp-detail-content"}),this.element.appendChild(this.content);}colors;callbacks;element;_isVisible=false;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;isProcessing=false;show(e,t){this.currentFeedback=e,this.isProcessing=false;let s=this.element.querySelector(".sp-detail-header");if(!s)return;let n=s.querySelector(".sp-detail-back");if(!n)return;s.replaceChildren(n);let i=r("span",{class:"sp-detail-title"});a(i,this.t("detail.title").replace("{number}",String(t))),s.appendChild(i);let l=r("span",{class:"sp-badge"});l.style.background=N(e.type,this.colors),l.style.color=A(e.type,this.colors),a(l,e.type),s.appendChild(l),this.content.replaceChildren();let d=0,p=this.buildSection(d++);this.buildStatusActions(p,e),this.content.appendChild(p);let u=this.buildSection(d++),h=r("div",{class:"sp-detail-section-title"});a(h,this.t("detail.message")),u.appendChild(h);let v=r("div",{class:"sp-detail-message"});if(v.style.borderLeftColor=A(e.type,this.colors),a(v,e.message),u.appendChild(v),this.content.appendChild(u),e.screenshotUrl&&ke(e.screenshotUrl)){let g=this.buildSection(d++),x=r("div",{class:"sp-detail-section-title"});a(x,this.t("detail.screenshot")),g.appendChild(x);let b=document.createElement("img");b.className="sp-detail-screenshot",b.src=e.screenshotUrl,b.alt=this.t("detail.screenshotAlt"),b.loading="lazy",b.referrerPolicy="no-referrer",g.appendChild(b),this.content.appendChild(g);}let f=this.buildSection(d++),m=r("div",{class:"sp-detail-section-title"});if(a(m,this.t("detail.metadata")),f.appendChild(m),this.buildMetadata(f,e),this.content.appendChild(f),e.annotations.length>0){let g=this.buildSection(d++),x=r("div",{class:"sp-detail-section-title"});x.appendChild(c(R));let b=r("span");a(b,this.t("detail.annotation")),x.appendChild(b),g.appendChild(x),this.buildAnnotation(g,e),this.content.appendChild(g);}if(Ce(e.diagnostics)){let g=this.buildSection(d++),x=r("div",{class:"sp-detail-section-title"});x.appendChild(c(me));let b=r("span");a(b,this.t("detail.diagnostics")),x.appendChild(b),g.appendChild(x),this.buildDiagnostics(g,e),this.content.appendChild(g);}this._isVisible=true,this.element.setAttribute("aria-hidden","false"),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),requestAnimationFrame(()=>{n.focus();});}hide(){this._isVisible&&(this._isVisible=false,this.element.classList.remove("sp-detail--visible"),this.element.setAttribute("aria-hidden","true"),this.currentFeedback=null,this.resolveBtn=null,this.deleteBtn=null);}get isVisible(){return this._isVisible}destroy(){this.hide(),this.element.remove();}buildSection(e){let t=r("div",{class:"sp-detail-section"});return t.style.animationDelay=`${e*40}ms`,t}buildStatusActions(e,t){let s=t.status==="resolved",n=r("div",{class:"sp-detail-section-title"});a(n,this.t("detail.status")),e.appendChild(n);let i=r("div",{class:"sp-detail-status"}),l=r("span",{class:`sp-detail-status-pill ${s?"sp-detail-status-pill--resolved":"sp-detail-status-pill--open"}`}),d=r("span",{class:"sp-detail-status-dot"});d.style.background=s?"#9ca3af":"#22c55e",l.appendChild(d);let p=r("span");a(p,s?this.t("detail.reopen"):this.t("detail.resolve")),a(p,s?"Resolved":"Open"),l.appendChild(p),i.appendChild(l),e.appendChild(i);let u=r("div",{class:"sp-detail-actions"});if(this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",s){this.resolveBtn.className="sp-detail-btn-reopen",this.resolveBtn.appendChild(c(V));let v=document.createElement("span");a(v,this.t("detail.reopen")),this.resolveBtn.appendChild(v);}else {this.resolveBtn.className="sp-detail-btn-resolve",this.resolveBtn.appendChild(c(H));let v=document.createElement("span");a(v,this.t("detail.resolve")),this.resolveBtn.appendChild(v);}this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.type="button",this.deleteBtn.className="sp-detail-btn-delete",this.deleteBtn.appendChild(c(G));let h=document.createElement("span");a(h,this.t("detail.delete")),this.deleteBtn.appendChild(h),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),u.appendChild(this.resolveBtn),u.appendChild(this.deleteBtn),e.appendChild(u);}buildMetadata(e,t){let s=r("div",{class:"sp-detail-meta"});if(this.addMetaRow(s,ce,this.t("detail.page"),()=>{let n=r("div",{class:"sp-detail-meta-value"}),i=ye(t.url);return a(n,S(i,60)),n.title=t.url,n}),this.addMetaRow(s,he,this.t("detail.author"),()=>{let n=r("div",{class:"sp-detail-meta-value"}),i=t.authorName||"Anonymous",l=t.authorEmail;return a(n,l?`${i} (${l})`:i),n}),this.addMetaRow(s,ue,this.t("detail.date"),()=>{let n=r("div",{class:"sp-detail-meta-value"});return a(n,U(t.createdAt,this.locale.startsWith("fr")?"fr":"en")),n}),this.addMetaRow(s,ge,this.t("detail.viewport"),()=>{let n=r("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return a(n,t.viewport||"Unknown"),n}),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 n=r("div",{class:"sp-detail-meta-value"});return a(n,fe(t.userAgent)),n}),t.resolvedAt){let n=t.resolvedAt;this.addMetaRow(s,H,this.t("detail.resolvedAt"),()=>{let i=r("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return a(i,U(n,this.locale.startsWith("fr")?"fr":"en")),i});}e.appendChild(s);}addMetaRow(e,t,s,n){let i=r("div",{class:"sp-detail-meta-row"});i.appendChild(c(t));let l=r("div",{class:"sp-detail-meta-content"}),d=r("div",{class:"sp-detail-meta-label"});a(d,s),l.appendChild(d),l.appendChild(n()),i.appendChild(l),e.appendChild(i);}buildAnnotation(e,t){let s=t.annotations[0];if(!s)return;let n=r("div",{class:"sp-detail-annotation"}),i=r("div",{class:"sp-detail-annotation-info"});this.addAnnotationRow(i,be,this.t("detail.element"),()=>{let p=r("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),u=s.elementId?`<${s.elementTag}#${s.elementId}>`:`<${s.elementTag}>`;return a(p,u),p}),this.addAnnotationRow(i,ve,this.t("detail.selector"),()=>{let p=r("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return a(p,S(s.cssSelector,60)),p.title=s.cssSelector,p}),this.addAnnotationRow(i,R,this.t("detail.position"),()=>{let p=r("span",{class:"sp-detail-annotation-value"});return a(p,`${s.xPct.toFixed(1)}%, ${s.yPct.toFixed(1)}%`+(s.wPct>0||s.hPct>0?` (${s.wPct.toFixed(1)}% \xD7 ${s.hPct.toFixed(1)}%)`:"")),p}),n.appendChild(i);let l=document.createElement("button");l.type="button",l.className="sp-detail-btn-goto",l.appendChild(c(R));let d=document.createElement("span");a(d,this.t("detail.goToAnnotation")),l.appendChild(d),l.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback);}),n.appendChild(l),e.appendChild(n);}buildDiagnostics(e,t){let s=t.diagnostics;if(!s)return;let n=Array.isArray(s.console)?s.console:[],i=Array.isArray(s.network)?s.network:[],l=n.filter(x=>x.level==="error").length,d=r("div",{class:"sp-detail-diag"}),p=document.createElement("button");p.type="button",p.className="sp-detail-diag-toggle",p.setAttribute("aria-expanded","false"),p.setAttribute("aria-label",this.t("detail.diagnostics.expand"));let u=document.createElement("span"),h=document.createElement("span");h.style.display="inline-flex",h.style.alignItems="center",h.style.gap="8px",h.appendChild(c(xe)),a(u,this.t("detail.diagnostics")),h.appendChild(u),p.appendChild(h);let v=r("span",{class:"sp-detail-diag-counts"}),f=r("span",{class:`sp-detail-diag-count${l>0?" sp-detail-diag-count--errors":""}`});a(f,`${n.length} console`);let m=r("span",{class:`sp-detail-diag-count${i.length>0?" sp-detail-diag-count--errors":""}`});a(m,`${i.length} net`),v.appendChild(f),v.appendChild(m),p.appendChild(v);let g=r("div",{class:"sp-detail-diag-body"});if(n.length>0){let x=document.createElement("div"),b=r("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.console")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of n){let k=document.createElement("li"),E=r("span",{class:`sp-detail-diag-level sp-detail-diag-level--${y.level}`});a(E,y.level);let B=r("span",{class:"sp-detail-diag-message"});a(B,S(y.message,240)),B.title=y.message,k.appendChild(E),k.appendChild(B),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}if(i.length>0){let x=document.createElement("div"),b=r("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.network")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of i){let k=document.createElement("li");k.classList.add("sp-detail-diag-net");let E=r("span",{class:"sp-detail-diag-net-status"});a(E,y.status===0?"ERR":String(y.status));let B=r("span",{class:"sp-detail-diag-net-method"});a(B,y.method);let M=r("span",{class:"sp-detail-diag-net-url"});a(M,S(y.url,120)),M.title=`${y.url} \u2014 ${we(y.durationMs)}`,k.appendChild(E),k.appendChild(B),k.appendChild(M),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}p.addEventListener("click",()=>{let b=!(p.getAttribute("aria-expanded")==="true");p.setAttribute("aria-expanded",String(b)),p.setAttribute("aria-label",b?this.t("detail.diagnostics.collapse"):this.t("detail.diagnostics.expand")),g.classList.toggle("sp-detail-diag-body--open",b);}),d.appendChild(p),d.appendChild(g),e.appendChild(d);}addAnnotationRow(e,t,s,n){let i=r("div",{class:"sp-detail-annotation-row"});i.appendChild(c(t));let l=r("div",{class:"sp-detail-meta-content"}),d=r("div",{class:"sp-detail-annotation-label"});a(d,s),l.appendChild(d),l.appendChild(n()),i.appendChild(l),e.appendChild(i);}async handleResolve(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.resolveBtn&&this.setButtonLoading(this.resolveBtn),this.deleteBtn&&(this.deleteBtn.disabled=true);try{await this.callbacks.onResolve(this.currentFeedback);}catch{this.isProcessing=false,this.resolveBtn&&this.restoreResolveBtn(this.currentFeedback),this.deleteBtn&&(this.deleteBtn.disabled=false);}}}async handleDelete(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.deleteBtn&&this.setButtonLoading(this.deleteBtn),this.resolveBtn&&(this.resolveBtn.disabled=true);try{await this.callbacks.onDelete(this.currentFeedback);}catch{this.isProcessing=false,this.deleteBtn&&this.restoreDeleteBtn(),this.resolveBtn&&(this.resolveBtn.disabled=false);}}}setButtonLoading(e){e.disabled=true,e.replaceChildren(r("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let t=e.status==="resolved";this.resolveBtn.appendChild(c(t?V:H));let s=document.createElement("span");a(s,t?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(c(G));let e=document.createElement("span");a(e,this.t("detail.delete")),this.deleteBtn.appendChild(e);}};var Be='<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>',Q='<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>',Ee='<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>',K={question:0,change:1,bug:2,other:3};function xt(o,e){let t=[...o];switch(e){case "newest":t.sort((s,n)=>new Date(n.createdAt).getTime()-new Date(s.createdAt).getTime());break;case "oldest":t.sort((s,n)=>new Date(s.createdAt).getTime()-new Date(n.createdAt).getTime());break;case "by-type":t.sort((s,n)=>{let i=K[s.type]??99,l=K[n.type]??99;return i!==l?i-l:new Date(n.createdAt).getTime()-new Date(s.createdAt).getTime()});break;case "open-first":t.sort((s,n)=>{let i=s.status==="open"?0:1,l=n.status==="open"?0:1;return i!==l?i-l:new Date(n.createdAt).getTime()-new Date(s.createdAt).getTime()});break}return t}function Te(o){try{return new URL(o).pathname}catch{return o}}function Se(o,e){if(o.length<=e)return o;let t="\u2026",s=Math.floor((e-1)/2);return o.slice(0,s)+t+o.slice(-s)}function mt(o){let e=new Map;for(let s of o){let n=Te(s.url),i=e.get(n);i?i.push(s):e.set(n,[s]);}return new Map([...e.entries()].sort((s,n)=>n[1].length-s[1].length))}function ft(o,e,t){let s=r("div",{class:"sp-group-header"});s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.setAttribute("aria-expanded","true"),s.style.borderBottomColor=t.border;let n=r("span",{class:"sp-group-header-chevron"});n.appendChild(c(Ee)),s.appendChild(n);let i=r("span",{class:"sp-group-header-icon"});i.appendChild(c(Q)),s.appendChild(i);let l=r("span",{class:"sp-group-header-path"}),d=Se(o,40);a(l,d),o.length>40&&(l.title=o),s.appendChild(l);let p=r("span",{class:"sp-group-header-count"});p.style.background=t.accentLight,p.style.color=t.accent,a(p,String(e)),s.appendChild(p);let u=()=>{let h=s.getAttribute("aria-expanded")==="true";s.setAttribute("aria-expanded",String(!h)),s.classList.toggle("sp-group-header--collapsed",h);let v=s.nextElementSibling;v?.classList.contains("sp-group-content")&&v.classList.toggle("sp-group-content--collapsed",h);};return s.addEventListener("click",u),s.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),u());}),s}var q=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;groupToggle;t;colors;onChange;outsideClickHandler=null;constructor(e,t,s){this.colors=e,this.onChange=t,this.t=s,this.element=r("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"),this.sortBtn.setAttribute("aria-label",this.t("sort.label"));let n=c(Be);this.sortBtn.appendChild(n);let i=r("span",{class:"sp-sort-btn-label"});a(i,this.t("sort.newest")),this.sortBtn.appendChild(i),this.sortBtn.addEventListener("click",p=>{p.stopPropagation(),this.toggleMenu();}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let l=c(Q);this.groupToggle.appendChild(l);let d=r("span",{class:"sp-group-toggle-label"});a(d,this.t("group.byPage")),this.groupToggle.appendChild(d),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.element.appendChild(this.sortBtn),this.element.appendChild(this.groupToggle);}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){if(this.menuEl){this.closeMenu();return}this.openMenu();}openMenu(){this.menuEl=r("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 t of e){let s=document.createElement("button");s.className=`sp-sort-option${t.mode===this._sortMode?" sp-sort-option--active":""}`,s.setAttribute("role","option"),s.setAttribute("aria-selected",String(t.mode===this._sortMode)),t.mode===this._sortMode&&(s.style.background=this.colors.accentLight,s.style.color=this.colors.accent),a(s,t.label),s.addEventListener("click",n=>{n.stopPropagation(),this._sortMode=t.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(s);}this.element.appendChild(this.menuEl),requestAnimationFrame(()=>{this.outsideClickHandler=t=>{this.menuEl&&!this.element.contains(t.target)&&this.closeMenu();},document.addEventListener("click",this.outsideClickHandler,true);}),this.menuEl.addEventListener("keydown",t=>{t.key==="Escape"&&(this.closeMenu(),this.sortBtn.focus());});}closeMenu(){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),this.sortBtn.setAttribute("aria-expanded","false"),this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,true),this.outsideClickHandler=null);}updateSortLabel(){let e={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")},t=this.sortBtn.querySelector(".sp-sort-btn-label");t&&a(t,e[this._sortMode]);}destroy(){this.closeMenu();}},yt=`
1168
+ `;function me(o){if(/Edg\//i.test(o)){let e=o.match(/Edg\/([\d.]+)/);return e?`Edge ${e[1]}`:"Edge"}if(/OPR\//i.test(o)||/Opera/i.test(o)){let e=o.match(/OPR\/([\d.]+)/);return e?`Opera ${e[1]}`:"Opera"}if(/Firefox\//i.test(o)){let e=o.match(/Firefox\/([\d.]+)/);return e?`Firefox ${e[1]}`:"Firefox"}if(/Chrome\//i.test(o)&&!/Chromium/i.test(o)){let e=o.match(/Chrome\/([\d.]+)/);return e?`Chrome ${e[1]}`:"Chrome"}if(/Safari\//i.test(o)&&!/Chrome/i.test(o)){let e=o.match(/Version\/([\d.]+)/);return e?`Safari ${e[1]}`:"Safari"}return "Unknown"}function U(o,e){try{return new Date(o).toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return o}}function ye(o){try{return new URL(o).pathname}catch{return o}}function ke(o){return !!(/^data:image\/(jpeg|png|webp);/i.test(o)||/^https:\/\//i.test(o))}function S(o,e){return o.length<=e?o:o.slice(0,e-1)+"\u2026"}function Ce(o){if(!o)return false;let e=Array.isArray(o.console)?o.console.length:0,t=Array.isArray(o.network)?o.network.length:0;return e>0||t>0}function we(o){return !Number.isFinite(o)||o<0?"\u2014":o<1e3?`${Math.round(o)} ms`:`${(o/1e3).toFixed(1)} s`}var Y=class{constructor(e,t,s,r){this.colors=e;this.callbacks=t;this.t=s,this.locale=r,this.element=n("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label","Feedback detail"),this.element.setAttribute("aria-hidden","true");let i=n("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(c(de)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=n("div",{class:"sp-detail-content"}),this.element.appendChild(this.content);}colors;callbacks;element;_isVisible=false;currentFeedback=null;content;t;locale;resolveBtn=null;deleteBtn=null;isProcessing=false;show(e,t){this.currentFeedback=e,this.isProcessing=false;let s=this.element.querySelector(".sp-detail-header");if(!s)return;let r=s.querySelector(".sp-detail-back");if(!r)return;s.replaceChildren(r);let i=n("span",{class:"sp-detail-title"});a(i,this.t("detail.title").replace("{number}",String(t))),s.appendChild(i);let l=n("span",{class:"sp-badge"});l.style.background=N(e.type,this.colors),l.style.color=A(e.type,this.colors),a(l,e.type),s.appendChild(l),this.content.replaceChildren();let d=0,p=this.buildSection(d++);this.buildStatusActions(p,e),this.content.appendChild(p);let u=this.buildSection(d++),h=n("div",{class:"sp-detail-section-title"});a(h,this.t("detail.message")),u.appendChild(h);let v=n("div",{class:"sp-detail-message"});if(v.style.borderLeftColor=A(e.type,this.colors),a(v,e.message),u.appendChild(v),this.content.appendChild(u),e.screenshotUrl&&ke(e.screenshotUrl)){let g=this.buildSection(d++),x=n("div",{class:"sp-detail-section-title"});a(x,this.t("detail.screenshot")),g.appendChild(x);let b=document.createElement("img");b.className="sp-detail-screenshot",b.src=e.screenshotUrl,b.alt=this.t("detail.screenshotAlt"),b.loading="lazy",b.referrerPolicy="no-referrer",g.appendChild(b),this.content.appendChild(g);}let m=this.buildSection(d++),f=n("div",{class:"sp-detail-section-title"});if(a(f,this.t("detail.metadata")),m.appendChild(f),this.buildMetadata(m,e),this.content.appendChild(m),e.annotations.length>0){let g=this.buildSection(d++),x=n("div",{class:"sp-detail-section-title"});x.appendChild(c(R));let b=n("span");a(b,this.t("detail.annotation")),x.appendChild(b),g.appendChild(x),this.buildAnnotation(g,e),this.content.appendChild(g);}if(Ce(e.diagnostics)){let g=this.buildSection(d++),x=n("div",{class:"sp-detail-section-title"});x.appendChild(c(fe));let b=n("span");a(b,this.t("detail.diagnostics")),x.appendChild(b),g.appendChild(x),this.buildDiagnostics(g,e),this.content.appendChild(g);}this._isVisible=true,this.element.setAttribute("aria-hidden","false"),this.element.offsetHeight,this.element.classList.add("sp-detail--visible"),requestAnimationFrame(()=>{r.focus();});}hide(){this._isVisible&&(this._isVisible=false,this.element.classList.remove("sp-detail--visible"),this.element.setAttribute("aria-hidden","true"),this.currentFeedback=null,this.resolveBtn=null,this.deleteBtn=null);}get isVisible(){return this._isVisible}destroy(){this.hide(),this.element.remove();}buildSection(e){let t=n("div",{class:"sp-detail-section"});return t.style.animationDelay=`${e*40}ms`,t}buildStatusActions(e,t){let s=t.status==="resolved",r=n("div",{class:"sp-detail-section-title"});a(r,this.t("detail.status")),e.appendChild(r);let i=n("div",{class:"sp-detail-status"}),l=n("span",{class:`sp-detail-status-pill ${s?"sp-detail-status-pill--resolved":"sp-detail-status-pill--open"}`}),d=n("span",{class:"sp-detail-status-dot"});d.style.background=s?"#9ca3af":"#22c55e",l.appendChild(d);let p=n("span");a(p,s?this.t("detail.reopen"):this.t("detail.resolve")),a(p,s?"Resolved":"Open"),l.appendChild(p),i.appendChild(l),e.appendChild(i);let u=n("div",{class:"sp-detail-actions"});if(this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",s){this.resolveBtn.className="sp-detail-btn-reopen",this.resolveBtn.appendChild(c(V));let v=document.createElement("span");a(v,this.t("detail.reopen")),this.resolveBtn.appendChild(v);}else {this.resolveBtn.className="sp-detail-btn-resolve",this.resolveBtn.appendChild(c(H));let v=document.createElement("span");a(v,this.t("detail.resolve")),this.resolveBtn.appendChild(v);}this.resolveBtn.addEventListener("click",()=>this.handleResolve()),this.deleteBtn=document.createElement("button"),this.deleteBtn.type="button",this.deleteBtn.className="sp-detail-btn-delete",this.deleteBtn.appendChild(c(G));let h=document.createElement("span");a(h,this.t("detail.delete")),this.deleteBtn.appendChild(h),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),u.appendChild(this.resolveBtn),u.appendChild(this.deleteBtn),e.appendChild(u);}buildMetadata(e,t){let s=n("div",{class:"sp-detail-meta"});if(this.addMetaRow(s,ce,this.t("detail.page"),()=>{let r=n("div",{class:"sp-detail-meta-value"}),i=ye(t.url);return a(r,S(i,60)),r.title=t.url,r}),this.addMetaRow(s,he,this.t("detail.author"),()=>{let r=n("div",{class:"sp-detail-meta-value"}),i=t.authorName||"Anonymous",l=t.authorEmail;return a(r,l?`${i} (${l})`:i),r}),this.addMetaRow(s,ue,this.t("detail.date"),()=>{let r=n("div",{class:"sp-detail-meta-value"});return a(r,U(t.createdAt,this.locale.startsWith("fr")?"fr":"en")),r}),this.addMetaRow(s,ge,this.t("detail.viewport"),()=>{let r=n("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return a(r,t.viewport||"Unknown"),r}),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 r=n("div",{class:"sp-detail-meta-value"});return a(r,me(t.userAgent)),r}),t.resolvedAt){let r=t.resolvedAt;this.addMetaRow(s,H,this.t("detail.resolvedAt"),()=>{let i=n("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return a(i,U(r,this.locale.startsWith("fr")?"fr":"en")),i});}e.appendChild(s);}addMetaRow(e,t,s,r){let i=n("div",{class:"sp-detail-meta-row"});i.appendChild(c(t));let l=n("div",{class:"sp-detail-meta-content"}),d=n("div",{class:"sp-detail-meta-label"});a(d,s),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}buildAnnotation(e,t){let s=t.annotations[0];if(!s)return;let r=n("div",{class:"sp-detail-annotation"}),i=n("div",{class:"sp-detail-annotation-info"});this.addAnnotationRow(i,be,this.t("detail.element"),()=>{let p=n("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),u=s.elementId?`<${s.elementTag}#${s.elementId}>`:`<${s.elementTag}>`;return a(p,u),p}),this.addAnnotationRow(i,ve,this.t("detail.selector"),()=>{let p=n("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return a(p,S(s.cssSelector,60)),p.title=s.cssSelector,p}),this.addAnnotationRow(i,R,this.t("detail.position"),()=>{let p=n("span",{class:"sp-detail-annotation-value"});return a(p,`${s.xPct.toFixed(1)}%, ${s.yPct.toFixed(1)}%`+(s.wPct>0||s.hPct>0?` (${s.wPct.toFixed(1)}% \xD7 ${s.hPct.toFixed(1)}%)`:"")),p}),r.appendChild(i);let l=document.createElement("button");l.type="button",l.className="sp-detail-btn-goto",l.appendChild(c(R));let d=document.createElement("span");a(d,this.t("detail.goToAnnotation")),l.appendChild(d),l.addEventListener("click",()=>{this.currentFeedback&&this.callbacks.onGoToAnnotation(this.currentFeedback);}),r.appendChild(l),e.appendChild(r);}buildDiagnostics(e,t){let s=t.diagnostics;if(!s)return;let r=Array.isArray(s.console)?s.console:[],i=Array.isArray(s.network)?s.network:[],l=r.filter(x=>x.level==="error").length,d=n("div",{class:"sp-detail-diag"}),p=document.createElement("button");p.type="button",p.className="sp-detail-diag-toggle",p.setAttribute("aria-expanded","false"),p.setAttribute("aria-label",this.t("detail.diagnostics.expand"));let u=document.createElement("span"),h=document.createElement("span");h.style.display="inline-flex",h.style.alignItems="center",h.style.gap="8px",h.appendChild(c(xe)),a(u,this.t("detail.diagnostics")),h.appendChild(u),p.appendChild(h);let v=n("span",{class:"sp-detail-diag-counts"}),m=n("span",{class:`sp-detail-diag-count${l>0?" sp-detail-diag-count--errors":""}`});a(m,`${r.length} console`);let f=n("span",{class:`sp-detail-diag-count${i.length>0?" sp-detail-diag-count--errors":""}`});a(f,`${i.length} net`),v.appendChild(m),v.appendChild(f),p.appendChild(v);let g=n("div",{class:"sp-detail-diag-body"});if(r.length>0){let x=document.createElement("div"),b=n("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.console")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of r){let k=document.createElement("li"),E=n("span",{class:`sp-detail-diag-level sp-detail-diag-level--${y.level}`});a(E,y.level);let B=n("span",{class:"sp-detail-diag-message"});a(B,S(y.message,240)),B.title=y.message,k.appendChild(E),k.appendChild(B),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}if(i.length>0){let x=document.createElement("div"),b=n("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.network")),x.appendChild(b);let C=document.createElement("ul");C.className="sp-detail-diag-list";for(let y of i){let k=document.createElement("li");k.classList.add("sp-detail-diag-net");let E=n("span",{class:"sp-detail-diag-net-status"});a(E,y.status===0?"ERR":String(y.status));let B=n("span",{class:"sp-detail-diag-net-method"});a(B,y.method);let M=n("span",{class:"sp-detail-diag-net-url"});a(M,S(y.url,120)),M.title=`${y.url} \u2014 ${we(y.durationMs)}`,k.appendChild(E),k.appendChild(B),k.appendChild(M),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}p.addEventListener("click",()=>{let b=!(p.getAttribute("aria-expanded")==="true");p.setAttribute("aria-expanded",String(b)),p.setAttribute("aria-label",b?this.t("detail.diagnostics.collapse"):this.t("detail.diagnostics.expand")),g.classList.toggle("sp-detail-diag-body--open",b);}),d.appendChild(p),d.appendChild(g),e.appendChild(d);}addAnnotationRow(e,t,s,r){let i=n("div",{class:"sp-detail-annotation-row"});i.appendChild(c(t));let l=n("div",{class:"sp-detail-meta-content"}),d=n("div",{class:"sp-detail-annotation-label"});a(d,s),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}async handleResolve(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.resolveBtn&&this.setButtonLoading(this.resolveBtn),this.deleteBtn&&(this.deleteBtn.disabled=true);try{await this.callbacks.onResolve(this.currentFeedback);}catch{this.isProcessing=false,this.resolveBtn&&this.restoreResolveBtn(this.currentFeedback),this.deleteBtn&&(this.deleteBtn.disabled=false);}}}async handleDelete(){if(!(this.isProcessing||!this.currentFeedback)){this.isProcessing=true,this.deleteBtn&&this.setButtonLoading(this.deleteBtn),this.resolveBtn&&(this.resolveBtn.disabled=true);try{await this.callbacks.onDelete(this.currentFeedback);}catch{this.isProcessing=false,this.deleteBtn&&this.restoreDeleteBtn(),this.resolveBtn&&(this.resolveBtn.disabled=false);}}}setButtonLoading(e){e.disabled=true,e.replaceChildren(n("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let t=e.status==="resolved";this.resolveBtn.appendChild(c(t?V:H));let s=document.createElement("span");a(s,t?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(c(G));let e=document.createElement("span");a(e,this.t("detail.delete")),this.deleteBtn.appendChild(e);}};var Be='<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>',Q='<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>',Ee='<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>',q={question:0,change:1,bug:2,other:3};function xt(o,e){let t=[...o];switch(e){case "newest":t.sort((s,r)=>new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime());break;case "oldest":t.sort((s,r)=>new Date(s.createdAt).getTime()-new Date(r.createdAt).getTime());break;case "by-type":t.sort((s,r)=>{let i=q[s.type]??99,l=q[r.type]??99;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime()});break;case "open-first":t.sort((s,r)=>{let i=s.status==="open"?0:1,l=r.status==="open"?0:1;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime()});break}return t}function Te(o){try{return new URL(o).pathname}catch{return o}}function Se(o,e){if(o.length<=e)return o;let t="\u2026",s=Math.floor((e-1)/2);return o.slice(0,s)+t+o.slice(-s)}function ft(o){let e=new Map;for(let s of o){let r=Te(s.url),i=e.get(r);i?i.push(s):e.set(r,[s]);}return new Map([...e.entries()].sort((s,r)=>r[1].length-s[1].length))}function mt(o,e,t){let s=n("div",{class:"sp-group-header"});s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.setAttribute("aria-expanded","true"),s.style.borderBottomColor=t.border;let r=n("span",{class:"sp-group-header-chevron"});r.appendChild(c(Ee)),s.appendChild(r);let i=n("span",{class:"sp-group-header-icon"});i.appendChild(c(Q)),s.appendChild(i);let l=n("span",{class:"sp-group-header-path"}),d=Se(o,40);a(l,d),o.length>40&&(l.title=o),s.appendChild(l);let p=n("span",{class:"sp-group-header-count"});p.style.background=t.accentLight,p.style.color=t.accent,a(p,String(e)),s.appendChild(p);let u=()=>{let h=s.getAttribute("aria-expanded")==="true";s.setAttribute("aria-expanded",String(!h)),s.classList.toggle("sp-group-header--collapsed",h);let v=s.nextElementSibling;v?.classList.contains("sp-group-content")&&v.classList.toggle("sp-group-content--collapsed",h);};return s.addEventListener("click",u),s.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),u());}),s}var K=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;groupToggle;t;colors;onChange;outsideClickHandler=null;constructor(e,t,s){this.colors=e,this.onChange=t,this.t=s,this.element=n("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"),this.sortBtn.setAttribute("aria-label",this.t("sort.label"));let r=c(Be);this.sortBtn.appendChild(r);let i=n("span",{class:"sp-sort-btn-label"});a(i,this.t("sort.newest")),this.sortBtn.appendChild(i),this.sortBtn.addEventListener("click",p=>{p.stopPropagation(),this.toggleMenu();}),this.groupToggle=document.createElement("button"),this.groupToggle.className="sp-group-toggle",this.groupToggle.setAttribute("aria-pressed","false");let l=c(Q);this.groupToggle.appendChild(l);let d=n("span",{class:"sp-group-toggle-label"});a(d,this.t("group.byPage")),this.groupToggle.appendChild(d),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.element.appendChild(this.sortBtn),this.element.appendChild(this.groupToggle);}get sortMode(){return this._sortMode}get groupByPage(){return this._groupByPage}toggleMenu(){if(this.menuEl){this.closeMenu();return}this.openMenu();}openMenu(){this.menuEl=n("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 t of e){let s=document.createElement("button");s.className=`sp-sort-option${t.mode===this._sortMode?" sp-sort-option--active":""}`,s.setAttribute("role","option"),s.setAttribute("aria-selected",String(t.mode===this._sortMode)),t.mode===this._sortMode&&(s.style.background=this.colors.accentLight,s.style.color=this.colors.accent),a(s,t.label),s.addEventListener("click",r=>{r.stopPropagation(),this._sortMode=t.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(s);}this.element.appendChild(this.menuEl),requestAnimationFrame(()=>{this.outsideClickHandler=t=>{this.menuEl&&!this.element.contains(t.target)&&this.closeMenu();},document.addEventListener("click",this.outsideClickHandler,true);}),this.menuEl.addEventListener("keydown",t=>{t.key==="Escape"&&(this.closeMenu(),this.sortBtn.focus());});}closeMenu(){this.menuEl&&(this.menuEl.remove(),this.menuEl=null),this.sortBtn.setAttribute("aria-expanded","false"),this.outsideClickHandler&&(document.removeEventListener("click",this.outsideClickHandler,true),this.outsideClickHandler=null);}updateSortLabel(){let e={newest:this.t("sort.newest"),oldest:this.t("sort.oldest"),"by-type":this.t("sort.byType"),"open-first":this.t("sort.openFirst")},t=this.sortBtn.querySelector(".sp-sort-btn-label");t&&a(t,e[this._sortMode]);}destroy(){this.closeMenu();}},yt=`
1136
1169
  /* ============================
1137
1170
  Sort Controls Container
1138
1171
  ============================ */
@@ -1520,7 +1553,7 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
1520
1553
  min-width: 64px;
1521
1554
  text-align: right;
1522
1555
  }
1523
- `,W=class{constructor(e,t){this.colors=e;this.t=t,this.element=r("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label","Feedback statistics"),this.element.hidden=true;let s=r("div",{class:"sp-stats-row"}),n=r("div",{class:"sp-stats-item"}),i=r("span",{class:"sp-stats-dot"});i.style.background="#22c55e",this.valueOpen=r("span",{class:"sp-stats-value"}),a(this.valueOpen,"0");let l=r("span",{class:"sp-stats-label"});a(l,this.t("stats.open")),n.appendChild(i),n.appendChild(this.valueOpen),n.appendChild(l);let d=r("div",{class:"sp-stats-item"}),p=r("span",{class:"sp-stats-dot"});p.style.background="#9ca3af",this.valueResolved=r("span",{class:"sp-stats-value"}),a(this.valueResolved,"0");let u=r("span",{class:"sp-stats-label"});a(u,this.t("stats.resolved")),d.appendChild(p),d.appendChild(this.valueResolved),d.appendChild(u);let h=r("div",{class:"sp-stats-item"}),v=r("span",{class:"sp-stats-dot"});v.style.background=this.colors.typeBug,this.valueBugs=r("span",{class:"sp-stats-value"}),a(this.valueBugs,"0");let f=r("span",{class:"sp-stats-label"});a(f,this.t("stats.bugs")),h.appendChild(v),h.appendChild(this.valueBugs),h.appendChild(f),s.appendChild(n),s.appendChild(d),s.appendChild(h);let m=r("div",{class:"sp-stats-progress"}),g=r("div",{class:"sp-stats-progress-track"});this.progressFill=r("div",{class:"sp-stats-progress-fill"}),g.appendChild(this.progressFill),this.progressLabel=r("span",{class:"sp-stats-progress-label"}),a(this.progressLabel,""),m.appendChild(g),m.appendChild(this.progressLabel),this.element.appendChild(s),this.element.appendChild(m);}colors;element;valueOpen;valueResolved;valueBugs;progressFill;progressLabel;t;update(e,t){if(t===0){this.element.hidden=true;return}this.element.hidden=false;let s=0,n=0,i=0;for(let u of e)u.status==="open"&&s++,u.status==="resolved"&&n++,u.type==="bug"&&i++;a(this.valueOpen,String(s)),a(this.valueResolved,String(n)),a(this.valueBugs,String(i));let l=e.length,d=l>0?Math.round(n/l*100):0;requestAnimationFrame(()=>{this.progressFill.style.width=`${d}%`;});let p=this.t("stats.progress").replace("{percent}",String(d));a(this.progressLabel,p);}};var Me='<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 Tt(o){let e=o.querySelectorAll(".sp-card");for(let t=0;t<e.length;t++)if(e[t]?.classList.contains("sp-card--focused"))return t;return -1}function St(o,e){let t=o.querySelectorAll(".sp-card");if(t.length===0)return;for(let i of t)i.classList.remove("sp-card--focused");let s=Math.max(0,Math.min(e,t.length-1)),n=t[s];n&&(n.classList.add("sp-card--focused"),n.scrollIntoView({block:"nearest",behavior:"smooth"}),n.focus({preventScroll:true}));}var Le=[{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"}],Mt=`
1556
+ `,W=class{constructor(e,t){this.colors=e;this.t=t,this.element=n("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label","Feedback statistics"),this.element.hidden=true;let s=n("div",{class:"sp-stats-row"}),r=n("div",{class:"sp-stats-item"}),i=n("span",{class:"sp-stats-dot"});i.style.background="#22c55e",this.valueOpen=n("span",{class:"sp-stats-value"}),a(this.valueOpen,"0");let l=n("span",{class:"sp-stats-label"});a(l,this.t("stats.open")),r.appendChild(i),r.appendChild(this.valueOpen),r.appendChild(l);let d=n("div",{class:"sp-stats-item"}),p=n("span",{class:"sp-stats-dot"});p.style.background="#9ca3af",this.valueResolved=n("span",{class:"sp-stats-value"}),a(this.valueResolved,"0");let u=n("span",{class:"sp-stats-label"});a(u,this.t("stats.resolved")),d.appendChild(p),d.appendChild(this.valueResolved),d.appendChild(u);let h=n("div",{class:"sp-stats-item"}),v=n("span",{class:"sp-stats-dot"});v.style.background=this.colors.typeBug,this.valueBugs=n("span",{class:"sp-stats-value"}),a(this.valueBugs,"0");let m=n("span",{class:"sp-stats-label"});a(m,this.t("stats.bugs")),h.appendChild(v),h.appendChild(this.valueBugs),h.appendChild(m),s.appendChild(r),s.appendChild(d),s.appendChild(h);let f=n("div",{class:"sp-stats-progress"}),g=n("div",{class:"sp-stats-progress-track"});this.progressFill=n("div",{class:"sp-stats-progress-fill"}),g.appendChild(this.progressFill),this.progressLabel=n("span",{class:"sp-stats-progress-label"}),a(this.progressLabel,""),f.appendChild(g),f.appendChild(this.progressLabel),this.element.appendChild(s),this.element.appendChild(f);}colors;element;valueOpen;valueResolved;valueBugs;progressFill;progressLabel;t;update(e,t){if(t===0){this.element.hidden=true;return}this.element.hidden=false;let s=0,r=0,i=0;for(let u of e)u.status==="open"&&s++,u.status==="resolved"&&r++,u.type==="bug"&&i++;a(this.valueOpen,String(s)),a(this.valueResolved,String(r)),a(this.valueBugs,String(i));let l=e.length,d=l>0?Math.round(r/l*100):0;requestAnimationFrame(()=>{this.progressFill.style.width=`${d}%`;});let p=this.t("stats.progress").replace("{percent}",String(d));a(this.progressLabel,p);}};var Me='<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 Tt(o){let e=o.querySelectorAll(".sp-card");for(let t=0;t<e.length;t++)if(e[t]?.classList.contains("sp-card--focused"))return t;return -1}function St(o,e){let t=o.querySelectorAll(".sp-card");if(t.length===0)return;for(let i of t)i.classList.remove("sp-card--focused");let s=Math.max(0,Math.min(e,t.length-1)),r=t[s];r&&(r.classList.add("sp-card--focused"),r.scrollIntoView({block:"nearest",behavior:"smooth"}),r.focus({preventScroll:true}));}var Le=[{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"}],Mt=`
1524
1557
  /* ---- Help overlay backdrop ---- */
1525
1558
 
1526
1559
  .sp-shortcuts-overlay {
@@ -1747,5 +1780,5 @@ function c(o){let s=document.createRange().createContextualFragment(o).firstElem
1747
1780
  transition-duration: 0.01ms !important;
1748
1781
  }
1749
1782
  }
1750
- `,Ae='<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>',X=class{constructor(e,t,s){this.t=s;this.keyMap=new Map([["j",()=>t.onNavigate("down")],["k",()=>t.onNavigate("up")],["r",()=>t.onResolve()],["d",()=>t.onDelete()],["f",()=>t.onFocusSearch()],["/",()=>t.onFocusSearch()],["x",()=>t.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=n=>this.handleKeydown(n);}t;helpOverlay;hintButton;keyMap;boundHandler;shadowRoot=null;enabled=false;helpVisible=false;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();}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)return;let t=e.composedPath()[0];if(t){let n=t.tagName?.toLowerCase();if(n==="input"||n==="textarea"||n==="select"||t.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let s=this.keyMap.get(e.key);s&&(e.preventDefault(),e.stopPropagation(),s());}showHelp(){this.helpVisible=true,this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus();}hideHelp(){this.helpVisible=false,this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible");}buildOverlay(){let e=r("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),e.addEventListener("click",d=>{d.target===e&&this.hideHelp();});let t=r("div",{class:"sp-shortcuts-card"}),s=r("div",{class:"sp-shortcuts-title"});s.appendChild(c(Me));let n=r("span");a(n,this.t("shortcuts.title")),s.appendChild(n),t.appendChild(s);let i=document.createElement("button");i.className="sp-shortcuts-close",i.setAttribute("aria-label",this.t("shortcuts.close")),i.appendChild(c(Ae)),i.addEventListener("click",()=>this.hideHelp()),t.appendChild(i);let l=r("div",{class:"sp-shortcuts-grid"});for(let d of Le){let p=r("div",{class:"sp-shortcuts-row"}),u=r("div",{class:"sp-shortcuts-keys"});d.keys.forEach((v,f)=>{if(f>0){let g=r("span",{class:"sp-shortcuts-separator"});a(g,"/"),u.appendChild(g);}let m=r("span",{class:"sp-kbd"});a(m,v),u.appendChild(m);});let h=r("span",{class:"sp-shortcuts-desc"});a(h,this.t(d.label)),p.appendChild(u),p.appendChild(h),l.appendChild(p);}return t.appendChild(l),e.appendChild(t),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),a(e,"?"),e.addEventListener("click",t=>{t.stopPropagation(),this.toggleHelp();}),e}};export{st as A,ot as B,nt as C,at as D,P as E,dt as F,I as G,gt as H,Y as I,xt as J,mt as K,ft as L,q as M,yt as N,wt as O,W as P,Tt as Q,St as R,Mt as S,X as T,c as a,r as b,a as c,L as d,Re as e,Oe as f,Fe as g,Ne as h,je as i,_e as j,De as k,$e as l,Pe as m,ze as n,Ie as o,Ve as p,Ge as q,Ue as r,Ye as s,Ke as t,qe as u,Qe as v,Xe as w,A as x,N as y,Je as z};//# sourceMappingURL=chunk-OTJZRTBK.js.map
1751
- //# sourceMappingURL=chunk-OTJZRTBK.js.map
1783
+ `,Ae='<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>',X=class{constructor(e,t,s){this.t=s;this.keyMap=new Map([["j",()=>t.onNavigate("down")],["k",()=>t.onNavigate("up")],["r",()=>t.onResolve()],["d",()=>t.onDelete()],["f",()=>t.onFocusSearch()],["/",()=>t.onFocusSearch()],["x",()=>t.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.helpOverlay=this.buildOverlay(),this.hintButton=this.buildHintButton(),this.boundHandler=r=>this.handleKeydown(r);}t;helpOverlay;hintButton;keyMap;boundHandler;shadowRoot=null;enabled=false;helpVisible=false;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();}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)return;let t=e.composedPath()[0];if(t){let r=t.tagName?.toLowerCase();if(r==="input"||r==="textarea"||r==="select"||t.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let s=this.keyMap.get(e.key);s&&(e.preventDefault(),e.stopPropagation(),s());}showHelp(){this.helpVisible=true,this.helpOverlay.classList.add("sp-shortcuts-overlay--visible"),this.helpOverlay.querySelector(".sp-shortcuts-close")?.focus();}hideHelp(){this.helpVisible=false,this.helpOverlay.classList.remove("sp-shortcuts-overlay--visible");}buildOverlay(){let e=n("div",{class:"sp-shortcuts-overlay"});e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-label",this.t("shortcuts.title")),e.addEventListener("click",d=>{d.target===e&&this.hideHelp();});let t=n("div",{class:"sp-shortcuts-card"}),s=n("div",{class:"sp-shortcuts-title"});s.appendChild(c(Me));let r=n("span");a(r,this.t("shortcuts.title")),s.appendChild(r),t.appendChild(s);let i=document.createElement("button");i.className="sp-shortcuts-close",i.setAttribute("aria-label",this.t("shortcuts.close")),i.appendChild(c(Ae)),i.addEventListener("click",()=>this.hideHelp()),t.appendChild(i);let l=n("div",{class:"sp-shortcuts-grid"});for(let d of Le){let p=n("div",{class:"sp-shortcuts-row"}),u=n("div",{class:"sp-shortcuts-keys"});d.keys.forEach((v,m)=>{if(m>0){let g=n("span",{class:"sp-shortcuts-separator"});a(g,"/"),u.appendChild(g);}let f=n("span",{class:"sp-kbd"});a(f,v),u.appendChild(f);});let h=n("span",{class:"sp-shortcuts-desc"});a(h,this.t(d.label)),p.appendChild(u),p.appendChild(h),l.appendChild(p);}return t.appendChild(l),e.appendChild(t),e}buildHintButton(){let e=document.createElement("button");return e.className="sp-shortcuts-hint",e.setAttribute("aria-label",this.t("shortcuts.hint")),a(e,"?"),e.addEventListener("click",t=>{t.stopPropagation(),this.toggleHelp();}),e}};export{st as A,ot as B,rt as C,at as D,P as E,dt as F,z as G,gt as H,Y as I,xt as J,ft as K,mt as L,K as M,yt as N,wt as O,W as P,Tt as Q,St as R,Mt as S,X as T,c as a,n as b,a as c,L as d,Re as e,Oe as f,Fe as g,Ne as h,je as i,De as j,_e as k,$e as l,Pe as m,Ie as n,ze as o,Ve as p,Ge as q,Ue as r,Ye as s,qe as t,Ke as u,Qe as v,Xe as w,A as x,N as y,Je as z};//# sourceMappingURL=chunk-HHREBLKP.js.map
1784
+ //# sourceMappingURL=chunk-HHREBLKP.js.map