@siteping/widget 0.9.16 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +1 -0
  2. package/dist/{chunk-GRXZBZ42.js → chunk-GP6ZPMBW.js} +23 -11
  3. package/dist/chunk-GP6ZPMBW.js.map +1 -0
  4. package/dist/de-MXWDD2BZ.js +2 -0
  5. package/dist/de-MXWDD2BZ.js.map +1 -0
  6. package/dist/es-74ACSG45.js +2 -0
  7. package/dist/es-74ACSG45.js.map +1 -0
  8. package/dist/fr-XAQKRFFY.js +2 -0
  9. package/dist/fr-XAQKRFFY.js.map +1 -0
  10. package/dist/index.global.js +121 -98
  11. package/dist/index.global.js.map +1 -1
  12. package/dist/index.js +79 -68
  13. package/dist/index.js.map +1 -1
  14. package/dist/it-4RBJ7CH6.js +2 -0
  15. package/dist/it-4RBJ7CH6.js.map +1 -0
  16. package/dist/panel-5ZGIFFJ4.js +2 -0
  17. package/dist/panel-5ZGIFFJ4.js.map +1 -0
  18. package/dist/pt-VNIESRZN.js +2 -0
  19. package/dist/pt-VNIESRZN.js.map +1 -0
  20. package/dist/react.js +83 -72
  21. package/dist/react.js.map +1 -1
  22. package/dist/ru-O4MZAQXF.js +2 -0
  23. package/dist/ru-O4MZAQXF.js.map +1 -0
  24. package/dist/schema.d.ts +4 -0
  25. package/dist/siteping-core.d.ts +2 -2
  26. package/dist/types.d.ts +76 -1
  27. package/package.json +1 -1
  28. package/dist/chunk-GRXZBZ42.js.map +0 -1
  29. package/dist/de-CO2K72R2.js +0 -2
  30. package/dist/de-CO2K72R2.js.map +0 -1
  31. package/dist/es-2QYDBGOD.js +0 -2
  32. package/dist/es-2QYDBGOD.js.map +0 -1
  33. package/dist/fr-7YJBFS2W.js +0 -2
  34. package/dist/fr-7YJBFS2W.js.map +0 -1
  35. package/dist/it-44RM76KH.js +0 -2
  36. package/dist/it-44RM76KH.js.map +0 -1
  37. package/dist/panel-4KOYCMDH.js +0 -2
  38. package/dist/panel-4KOYCMDH.js.map +0 -1
  39. package/dist/pt-DRKIF4UZ.js +0 -2
  40. package/dist/pt-DRKIF4UZ.js.map +0 -1
  41. package/dist/ru-EAKBDL3X.js +0 -2
  42. package/dist/ru-EAKBDL3X.js.map +0 -1
package/README.md CHANGED
@@ -79,6 +79,7 @@ All configuration options for `initSiteping()`:
79
79
  | `identity` | `{ name: string; email: string }` | — | Pre-fill author identity from the host (SSO). When set, the widget skips the identity modal |
80
80
  | `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 |
81
81
  | `watchNavigation` | `boolean` | `true` | Auto re-fetch feedbacks on client-side (SPA) navigation. The widget patches the History API + listens for `popstate`/`hashchange`, so the panel list and markers follow route changes even when the widget is mounted once in a persistent layout (e.g. Next.js App Router). Re-fetches data only — it never re-scrolls. Set `false` to opt out and drive updates via `refresh()` |
82
+ | `enableRightClickComment` | `boolean` | `false` | Right-click anywhere on the page to instantly open the comment composer at the cursor. Modifier-key right-clicks (Shift/Ctrl/Alt/Meta) fall through to the native context menu. Right-clicks on SitePing's own UI are ignored. Note: on Android, `contextmenu` fires on long-press — relevant for ≥768 px tablets where the widget loads |
82
83
 
83
84
  > **Custom translations** — Use `registerLocale(code, translations)` to add your own locale at runtime.
84
85
 
@@ -1,4 +1,4 @@
1
- function c(t){let s=document.createRange().createContextualFragment(t).firstElementChild;if(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 o(t,e){let n=document.createElement(t);if(e)for(let[s,r]of Object.entries(e))s==="class"?n.className=r:s==="style"?n.style.cssText=r:n.setAttribute(s,r);return n}function a(t,e){t.textContent=e;}function R(t){let e=Array.from(t.childNodes).map(n=>n.cloneNode(true));return t.disabled=true,t.replaceChildren(o("div",{class:"sp-spinner sp-spinner--sm"})),()=>{t.replaceChildren(...e),t.disabled=false;}}function $e(t,e="en"){let n=Date.now()-new Date(t).getTime(),s=Math.floor(n/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(t).toLocaleDateString(e)}var Ke='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="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>';var Ue='<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>',Ve='<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>',Ye='<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>',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="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></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="20 6 9 17 4 12"/></svg>',We='<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>',Xe='<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>',Qe='<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>',Je='<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>',Ze='<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>',et='<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>',tt='<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>',st='<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>',nt='<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>',rt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>',ot='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>';var j="#0066ff",oe=/^#[0-9a-fA-F]{6}$/,I=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,ie=/^#[0-9a-fA-F]{8}$/;function ae(t){if(oe.test(t))return t;let e=I.test(t)?t.match(I):null;return e?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:ie.test(t)?t.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${t}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),j)}function le(t,e){let n=Math.max(0,Math.round(parseInt(t.slice(1,3),16)*(1-e))),s=Math.max(0,Math.round(parseInt(t.slice(3,5),16)*(1-e))),r=Math.max(0,Math.round(parseInt(t.slice(5,7),16)*(1-e)));return `#${n.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}function pe(){return typeof window>"u"?false:window.matchMedia("(prefers-color-scheme: dark)").matches}function de(t){return t==="dark"||t==="auto"&&pe()?"dark":"light"}function at(t=j,e){let n=ae(t),s=le(n,.15);return de(e)==="dark"?{accent:n,accentLight:n+"22",accentDark:s,accentGlow:n+"44",accentGradient:`linear-gradient(135deg, ${n}, ${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:n,accentLight:n+"14",accentDark:s,accentGlow:n+"33",accentGradient:`linear-gradient(135deg, ${n}, ${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 M(t,e){switch(t){case "question":return e.typeQuestion;case "change":return e.typeChange;case "bug":return e.typeBug;default:return e.typeOther}}function _(t,e){switch(t){case "question":return e.typeQuestionBg;case "change":return e.typeChangeBg;case "bug":return e.typeBugBg;default:return e.typeOtherBg}}function lt(t){return `
1
+ function c(t){let n=document.createRange().createContextualFragment(t).firstElementChild;if(n?.nodeName.toLowerCase()!=="svg")throw new Error("[siteping] Invalid SVG string");for(let r of [...n.attributes])r.name.startsWith("on")&&n.removeAttribute(r.name);for(let r of n.querySelectorAll("*"))for(let i of [...r.attributes])i.name.startsWith("on")&&r.removeAttribute(i.name);return n}function o(t,e){let s=document.createElement(t);if(e)for(let[n,r]of Object.entries(e))n==="class"?s.className=r:n==="style"?s.style.cssText=r:s.setAttribute(n,r);return s}function a(t,e){t.textContent=e;}function F(t){let e=Array.from(t.childNodes).map(s=>s.cloneNode(true));return t.disabled=true,t.replaceChildren(o("div",{class:"sp-spinner sp-spinner--sm"})),()=>{t.replaceChildren(...e),t.disabled=false;}}function Ve(t,e="en"){let s=Date.now()-new Date(t).getTime(),n=Math.floor(s/1e3);if(n<60)return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(0,"second");let r=new Intl.RelativeTimeFormat(e,{numeric:"always",style:"narrow"}),i=Math.floor(n/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(t).toLocaleDateString(e)}var Ge='<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>';var qe='<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>',We='<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>',Xe='<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>',Qe='<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>',Je='<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>',et='<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>',tt='<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>',st='<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>',nt='<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>',rt='<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>',ot='<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>',it='<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>',at='<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>',lt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>',pt='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>';var j="#0066ff",le=/^#[0-9a-fA-F]{6}$/,_=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,pe=/^#[0-9a-fA-F]{8}$/;function de(t){if(le.test(t))return t;let e=_.test(t)?t.match(_):null;return e?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:pe.test(t)?t.slice(0,7):(console.warn(`[siteping] Invalid accentColor "${t}" \u2014 only hex colors (#RGB, #RRGGBB, #RRGGBBAA) are supported. Using default.`),j)}function ce(t,e){let s=Math.max(0,Math.round(parseInt(t.slice(1,3),16)*(1-e))),n=Math.max(0,Math.round(parseInt(t.slice(3,5),16)*(1-e))),r=Math.max(0,Math.round(parseInt(t.slice(5,7),16)*(1-e)));return `#${s.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}function ue(){return typeof window>"u"?false:window.matchMedia("(prefers-color-scheme: dark)").matches}function he(t){return t==="dark"||t==="auto"&&ue()?"dark":"light"}function ct(t=j,e){let s=de(t),n=ce(s,.15);return he(e)==="dark"?{accent:s,accentLight:s+"22",accentDark:n,accentGlow:s+"44",accentGradient:`linear-gradient(135deg, ${s}, ${n})`,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)",statusInProgress:"#fbbf24",statusInProgressBg:"rgba(245, 158, 11, 0.15)",statusWontFix:"#94a3b8",statusWontFixBg:"rgba(148, 163, 184, 0.15)"}:{accent:s,accentLight:s+"14",accentDark:n,accentGlow:s+"33",accentGradient:`linear-gradient(135deg, ${s}, ${n})`,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",statusInProgress:"#d97706",statusInProgressBg:"#fffbeb",statusWontFix:"#64748b",statusWontFixBg:"#f1f5f9"}}function M(t,e){switch(t){case "question":return e.typeQuestion;case "change":return e.typeChange;case "bug":return e.typeBug;default:return e.typeOther}}function ut(t,e){switch(t){case "in_progress":return e.statusInProgress;case "resolved":return e.statusResolved;case "wont_fix":return e.statusWontFix;default:return e.statusOpen}}function ht(t,e){switch(t){case "in_progress":return e.statusInProgressBg;case "resolved":return e.statusResolvedBg;case "wont_fix":return e.statusWontFixBg;default:return e.statusOpenBg}}function $(t,e){switch(t){case "question":return e.typeQuestionBg;case "change":return e.typeChangeBg;case "bug":return e.typeBugBg;default:return e.typeOtherBg}}function gt(t){return `
2
2
  --sp-accent: ${t.accent};
3
3
  --sp-accent-light: ${t.accentLight};
4
4
  --sp-accent-dark: ${t.accentDark};
@@ -35,7 +35,7 @@ function c(t){let s=document.createRange().createContextualFragment(t).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 S=class extends Error{code;retryable;constructor(e,n,s){super(e),this.code=n,this.retryable=s,this.name="SitepingError";}},F=class extends S{constructor(e){super(e,"NETWORK",true),this.name="SitepingNetworkError";}},P=class extends S{constructor(e){super(e,"VALIDATION",false),this.name="SitepingValidationError";}},O=class extends S{constructor(e){super(e,"AUTH",false),this.name="SitepingAuthError";}};function $(t){return typeof t=="object"&&t!==null}function ce(t,e){return $(t)&&e in t}var N=["en","fr","de","es","it","pt","ru"];function ue(t){return {cssSelector:t.anchor.cssSelector,xpath:t.anchor.xpath,textSnippet:t.anchor.textSnippet,elementTag:t.anchor.elementTag,elementId:t.anchor.elementId,textPrefix:t.anchor.textPrefix,textSuffix:t.anchor.textSuffix,fingerprint:t.anchor.fingerprint,neighborText:t.anchor.neighborText,anchorKey:t.anchor.anchorKey??null,xPct:t.rect.xPct,yPct:t.rect.yPct,wPct:t.rect.wPct,hPct:t.rect.hPct,scrollX:t.scrollX,scrollY:t.scrollY,viewportW:t.viewportW,viewportH:t.viewportH,devicePixelRatio:t.devicePixelRatio}}var z={"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":"Show sidebar","fab.annotate":"Create new annotation","fab.annotations":"Show or hide markers","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 E={en:z},he=new Set(N.filter(t=>t!=="en"));function K(t){return he.has(t)}function U(t){return (t.split("-")[0]??t).toLowerCase()}async function At(t){let e=U(t),n=E[e];if(n)return n;if(!K(e))return null;let s;switch(e){case "de":s=await import('./de-CO2K72R2.js');break;case "es":s=await import('./es-2QYDBGOD.js');break;case "fr":s=await import('./fr-7YJBFS2W.js');break;case "it":s=await import('./it-44RM76KH.js');break;case "pt":s=await import('./pt-DRKIF4UZ.js');break;case "ru":s=await import('./ru-EAKBDL3X.js');break;default:return null}let r=s[e];return r?(E[e]=r,r):null}function Lt(t){let e=U(t);return e!=="en"&&!E[e]&&!K(e)&&console.warn(`[siteping] Unknown locale "${t}", falling back to "en"`),n=>(E[e]??E.en)?.[n]??E.en?.[n]??n}function Rt(t,e){switch(t){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 t}}var ge='<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>',be='<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>',ve='<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>',Pt=`
38
+ `}function K(t){return typeof t=="object"&&t!==null}function ge(t,e){return K(t)&&e in t}var P=["en","fr","de","es","it","pt","ru"];var be=["open","in_progress","resolved","wont_fix"],z=["resolved","wont_fix"];function C(t){return z.includes(t)}function xe(t){return {cssSelector:t.anchor.cssSelector,xpath:t.anchor.xpath,textSnippet:t.anchor.textSnippet,elementTag:t.anchor.elementTag,elementId:t.anchor.elementId,textPrefix:t.anchor.textPrefix,textSuffix:t.anchor.textSuffix,fingerprint:t.anchor.fingerprint,neighborText:t.anchor.neighborText,anchorKey:t.anchor.anchorKey??null,xPct:t.rect.xPct,yPct:t.rect.yPct,wPct:t.rect.wPct,hPct:t.rect.hPct,scrollX:t.scrollX,scrollY:t.scrollY,viewportW:t.viewportW,viewportH:t.viewportH,devicePixelRatio:t.devicePixelRatio}}var E=class extends Error{code;retryable;constructor(e,s,n){super(e),this.code=s,this.retryable=n,this.name="SitepingError";}},O=class extends E{constructor(e){super(e,"NETWORK",true),this.name="SitepingNetworkError";}},N=class extends E{constructor(e){super(e,"VALIDATION",false),this.name="SitepingValidationError";}},D=class extends E{constructor(e){super(e,"AUTH",false),this.name="SitepingAuthError";}};var U={"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","panel.statusInProgress":"In progress","panel.statusWontFix":"Won't fix","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":"Show sidebar","fab.annotate":"Create new annotation","fab.annotations":"Show or hide markers","annotator.instruction":"Draw a rectangle on the area to comment","annotator.instantInstruction":"Comment on the clicked spot","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.closedAt":"Closed 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 T={en:U},ve=new Set(P.filter(t=>t!=="en"));function V(t){return ve.has(t)}function Y(t){return (t.split("-")[0]??t).toLowerCase()}async function Pt(t){let e=Y(t),s=T[e];if(s)return s;if(!V(e))return null;let n;switch(e){case "de":n=await import('./de-MXWDD2BZ.js');break;case "es":n=await import('./es-74ACSG45.js');break;case "fr":n=await import('./fr-XAQKRFFY.js');break;case "it":n=await import('./it-4RBJ7CH6.js');break;case "pt":n=await import('./pt-VNIESRZN.js');break;case "ru":n=await import('./ru-O4MZAQXF.js');break;default:return null}let r=n[e];return r?(T[e]=r,r):null}function Ot(t){let e=Y(t);return e!=="en"&&!T[e]&&!V(e)&&console.warn(`[siteping] Unknown locale "${t}", falling back to "en"`),s=>(T[e]??T.en)?.[s]??T.en?.[s]??s}function Nt(t,e){switch(t){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 t}}function G(t,e){switch(t){case "open":return e("panel.statusOpen");case "in_progress":return e("panel.statusInProgress");case "resolved":return e("panel.statusResolved");case "wont_fix":return e("panel.statusWontFix");default:return t}}var 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 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>',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="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>',ye='<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>',It=`
39
39
  /* ============================
40
40
  Export Button & Menu
41
41
  ============================ */
@@ -153,9 +153,9 @@ function c(t){let s=document.createRange().createContextualFragment(t).firstElem
153
153
  outline: 3px solid Highlight !important;
154
154
  }
155
155
  }
156
- `,V=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"];function xe(t){let e=/^[=+\-@\t\r]/.test(t)?`'${t}`:t;return e.includes('"')||e.includes(",")||e.includes(`
157
- `)||e.includes("\r")?`"${e.replace(/"/g,'""')}"`:e}function fe(t){let e=V.join(","),n=t.map(s=>V.map(r=>{let i=s[r];return xe(i==null?"":String(i))}).join(","));return [e,...n].join(`
158
- `)}function me(t){return JSON.stringify(t,null,2)}function Y(t,e,n){let s=new Blob([t],{type:n}),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 G=class{constructor(e,n,s){this.getFeedbacks=n;this.element=o("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(ge));let i=document.createElement("span");a(i,s("export.label")),r.appendChild(i),r.addEventListener("click",p=>{p.stopPropagation(),this.toggle();}),this.menu=o("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let l=this.createOption(be,s("export.csv"),()=>{this.exportAs("csv");}),d=this.createOption(ve,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,n,s){let r=document.createElement("button");r.className="sp-export-option",r.setAttribute("role","menuitem");let i=o("span",{class:"sp-export-option-icon"});i.appendChild(c(e));let l=o("span",{class:"sp-export-option-label"});return a(l,n),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 n=this.getFeedbacks();if(n.length===0)return;let s=n[0]?.projectName??"feedbacks",r=new Date().toISOString().slice(0,10),i=s.replace(/[^a-zA-Z0-9_-]/g,"_");if(e==="csv"){let l=fe(n);Y(l,`feedbacks-${i}-${r}.csv`,"text/csv;charset=utf-8");}else {let l=me(n);Y(l,`feedbacks-${i}-${r}.json`,"application/json;charset=utf-8");}}destroy(){document.removeEventListener("click",this.onDocumentClick,true),this.element.remove();}};var B='<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>',q='<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
+ `,q=["id","type","status","message","url","authorName","authorEmail","createdAt","resolvedAt","viewport"];function ke(t){let e=/^[=+\-@\t\r]/.test(t)?`'${t}`:t;return e.includes('"')||e.includes(",")||e.includes(`
157
+ `)||e.includes("\r")?`"${e.replace(/"/g,'""')}"`:e}function Ce(t){let e=q.join(","),s=t.map(n=>q.map(r=>{let i=n[r];return ke(i==null?"":String(i))}).join(","));return [e,...s].join(`
158
+ `)}function we(t){return JSON.stringify(t,null,2)}function W(t,e,s){let n=new Blob([t],{type:s}),r=URL.createObjectURL(n),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 X=class{constructor(e,s,n){this.getFeedbacks=s;this.element=o("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(fe));let i=document.createElement("span");a(i,n("export.label")),r.appendChild(i),r.addEventListener("click",p=>{p.stopPropagation(),this.toggle();}),this.menu=o("div",{class:"sp-export-menu"}),this.menu.setAttribute("role","menu");let l=this.createOption(me,n("export.csv"),()=>{this.exportAs("csv");}),d=this.createOption(ye,n("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,s,n){let r=document.createElement("button");r.className="sp-export-option",r.setAttribute("role","menuitem");let i=o("span",{class:"sp-export-option-icon"});i.appendChild(c(e));let l=o("span",{class:"sp-export-option-label"});return a(l,s),r.appendChild(i),r.appendChild(l),r.addEventListener("click",d=>{d.stopPropagation(),n(),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 s=this.getFeedbacks();if(s.length===0)return;let n=s[0]?.projectName??"feedbacks",r=new Date().toISOString().slice(0,10),i=n.replace(/[^a-zA-Z0-9_-]/g,"_");if(e==="csv"){let l=Ce(s);W(l,`feedbacks-${i}-${r}.csv`,"text/csv;charset=utf-8");}else {let l=we(s);W(l,`feedbacks-${i}-${r}.json`,"application/json;charset=utf-8");}}destroy(){document.removeEventListener("click",this.onDocumentClick,true),this.element.remove();}};var A='<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>',Q='<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>',$t=`
159
159
  /* ============================
160
160
  Bulk Checkbox
161
161
  ============================ */
@@ -453,7 +453,7 @@ function c(t){let s=document.createRange().createContextualFragment(t).firstElem
453
453
  transition-duration: 0.01ms !important;
454
454
  }
455
455
  }
456
- `,W=class{constructor(e,n,s){this.callbacks=n;this.t=s,this.barElement=o("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label","Bulk actions"),this.countLabel=o("span",{class:"sp-bulk-bar-count"}),a(this.countLabel,this.t("bulk.selected").replace("{count}","0"));let r=o("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 n=o("div",{class:"sp-bulk-checkbox"});return n.setAttribute("role","checkbox"),n.setAttribute("aria-checked","false"),n.setAttribute("tabindex","0"),n.setAttribute("aria-label",`Select feedback ${e}`),n.appendChild(c(B)),n.addEventListener("click",s=>{s.stopPropagation(),this.toggle(e);}),n.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),s.stopPropagation(),this.toggle(e));}),this.checkboxMap.set(e,n),n}createSelectAllBar(e,n){let s=o("div",{class:"sp-bulk-select-all"}),r=o("div",{class:"sp-bulk-checkbox"});r.appendChild(c(B)),this.selectAllCheckbox=r;let i=o("span");return a(i,n),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 n of e)this.selected.add(n),this.updateCheckbox(n),this.updateCardSelectedState(n);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let n of e)this.updateCheckbox(n),this.updateCardSelectedState(n);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,n=e>0;this.barElement.classList.toggle("sp-bulk-bar--visible",n),a(this.countLabel,this.t("bulk.selected").replace("{count}",String(e))),this.updateButtonLabels();}updateButtonLabels(){let e=this.selected.size,n=this.t("bulk.resolve"),s=this.t("bulk.delete");this.resolveBtn.replaceChildren();let r=document.createElement("span");a(r,e>0?`${n} ${e}`:n),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 n=this.checkboxMap.get(e);if(!n)return;let s=this.selected.has(e);n.classList.toggle("sp-bulk-checkbox--checked",s),n.setAttribute("aria-checked",String(s)),n.replaceChildren(),n.appendChild(c(s?q:B));}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?q:B));}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0);}updateCardSelectedState(e){if(!this.listContainer)return;let n=CSS.escape(e),s=this.listContainer.querySelector(`[data-feedback-id="${n}"]`);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],n=R(this.resolveBtn);this.deleteBtn.disabled=true;try{await this.callbacks.onResolve(e),this.reset();}catch{n(),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],n=R(this.deleteBtn);this.resolveBtn.disabled=true;try{await this.callbacks.onDelete(e),this.reset();}catch{n(),this.resolveBtn.disabled=false;}finally{this.isProcessing=false;}}};var ye='<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>',D='<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>',ke='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="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>',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="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>',we='<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>',Se='<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>',X='<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>',Q='<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>',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="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>',Te='<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>',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="9 18 15 12 9 6"/></svg>',Ae='<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>',_t=`
456
+ `,J=class{constructor(e,s,n){this.callbacks=s;this.t=n,this.barElement=o("div",{class:"sp-bulk-bar"}),this.barElement.setAttribute("role","toolbar"),this.barElement.setAttribute("aria-label","Bulk actions"),this.countLabel=o("span",{class:"sp-bulk-bar-count"}),a(this.countLabel,this.t("bulk.selected").replace("{count}","0"));let r=o("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 s=o("div",{class:"sp-bulk-checkbox"});return s.setAttribute("role","checkbox"),s.setAttribute("aria-checked","false"),s.setAttribute("tabindex","0"),s.setAttribute("aria-label",`Select feedback ${e}`),s.appendChild(c(A)),s.addEventListener("click",n=>{n.stopPropagation(),this.toggle(e);}),s.addEventListener("keydown",n=>{(n.key===" "||n.key==="Enter")&&(n.preventDefault(),n.stopPropagation(),this.toggle(e));}),this.checkboxMap.set(e,s),s}createSelectAllBar(e,s){let n=o("div",{class:"sp-bulk-select-all"}),r=o("div",{class:"sp-bulk-checkbox"});r.appendChild(c(A)),this.selectAllCheckbox=r;let i=o("span");return a(i,s),n.appendChild(r),n.appendChild(i),n.addEventListener("click",()=>{this.selected.size===e.length&&e.length>0?this.deselectAll():this.selectAll(e);}),n}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 s of e)this.selected.add(s),this.updateCheckbox(s),this.updateCardSelectedState(s);this.updateBar(),this.updateSelectAllCheckbox(),this.updateListSelectionClass();}}deselectAll(){let e=[...this.selected];this.selected.clear();for(let s of e)this.updateCheckbox(s),this.updateCardSelectedState(s);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,s=e>0;this.barElement.classList.toggle("sp-bulk-bar--visible",s),a(this.countLabel,this.t("bulk.selected").replace("{count}",String(e))),this.updateButtonLabels();}updateButtonLabels(){let e=this.selected.size,s=this.t("bulk.resolve"),n=this.t("bulk.delete");this.resolveBtn.replaceChildren();let r=document.createElement("span");a(r,e>0?`${s} ${e}`:s),this.resolveBtn.appendChild(r),this.deleteBtn.replaceChildren();let i=document.createElement("span");a(i,e>0?`${n} ${e}`:n),this.deleteBtn.appendChild(i);}updateCheckbox(e){let s=this.checkboxMap.get(e);if(!s)return;let n=this.selected.has(e);s.classList.toggle("sp-bulk-checkbox--checked",n),s.setAttribute("aria-checked",String(n)),s.replaceChildren(),s.appendChild(c(n?Q:A));}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?Q:A));}updateListSelectionClass(){this.listContainer&&this.listContainer.classList.toggle("sp-list--has-selection",this.selected.size>0);}updateCardSelectedState(e){if(!this.listContainer)return;let s=CSS.escape(e),n=this.listContainer.querySelector(`[data-feedback-id="${s}"]`);n&&n.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],s=F(this.resolveBtn);this.deleteBtn.disabled=true;try{await this.callbacks.onResolve(e),this.reset();}catch{s(),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],s=F(this.deleteBtn);this.resolveBtn.disabled=true;try{await this.callbacks.onDelete(e),this.reset();}catch{s(),this.resolveBtn.disabled=false;}finally{this.isProcessing=false;}}};var Se='<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>',H='<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>',Ee='<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>',Te='<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>',Be='<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>',Ae='<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>',I='<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>',Z='<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>',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="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>',Le='<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>',Re='<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>',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="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=`
457
457
  /* ============================
458
458
  Detail View \u2014 Panel-in-Panel
459
459
  ============================ */
@@ -669,6 +669,18 @@ function c(t){let s=document.createRange().createContextualFragment(t).firstElem
669
669
  border: 1px solid rgba(156, 163, 175, 0.2);
670
670
  }
671
671
 
672
+ .sp-detail-status-pill--in-progress {
673
+ background: rgba(245, 158, 11, 0.1);
674
+ color: #f59e0b;
675
+ border: 1px solid rgba(245, 158, 11, 0.2);
676
+ }
677
+
678
+ .sp-detail-status-pill--wont-fix {
679
+ background: rgba(148, 163, 184, 0.1);
680
+ color: #94a3b8;
681
+ border: 1px solid rgba(148, 163, 184, 0.2);
682
+ }
683
+
672
684
  .sp-detail-status-dot {
673
685
  width: 6px;
674
686
  height: 6px;
@@ -1165,7 +1177,7 @@ function c(t){let s=document.createRange().createContextualFragment(t).firstElem
1165
1177
  animation-duration: 0.01ms !important;
1166
1178
  }
1167
1179
  }
1168
- `;function Le(t){if(/Edg\//i.test(t)){let e=t.match(/Edg\/([\d.]+)/);return e?`Edge ${e[1]}`:"Edge"}if(/OPR\//i.test(t)||/Opera/i.test(t)){let e=t.match(/OPR\/([\d.]+)/);return e?`Opera ${e[1]}`:"Opera"}if(/Firefox\//i.test(t)){let e=t.match(/Firefox\/([\d.]+)/);return e?`Firefox ${e[1]}`:"Firefox"}if(/Chrome\//i.test(t)&&!/Chromium/i.test(t)){let e=t.match(/Chrome\/([\d.]+)/);return e?`Chrome ${e[1]}`:"Chrome"}if(/Safari\//i.test(t)&&!/Chrome/i.test(t)){let e=t.match(/Version\/([\d.]+)/);return e?`Safari ${e[1]}`:"Safari"}return "Unknown"}function J(t,e){try{return new Date(t).toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function Re(t){try{return new URL(t).pathname}catch{return t}}function Me(t){return !!(/^data:image\/(jpeg|png|webp);/i.test(t)||/^https:\/\//i.test(t))}function A(t,e){return t.length<=e?t:t.slice(0,e-1)+"\u2026"}function Fe(t){if(!t)return false;let e=Array.isArray(t.console)?t.console.length:0,n=Array.isArray(t.network)?t.network.length:0;return e>0||n>0}function Pe(t){return !Number.isFinite(t)||t<0?"\u2014":t<1e3?`${Math.round(t)} ms`:`${(t/1e3).toFixed(1)} s`}var Z=class{constructor(e,n,s,r){this.colors=e;this.callbacks=n;this.t=s,this.locale=r,this.element=o("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label","Feedback detail"),this.element.setAttribute("aria-hidden","true");let i=o("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(ye)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=o("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,n){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=o("span",{class:"sp-detail-title"});a(i,this.t("detail.title").replace("{number}",String(n))),s.appendChild(i);let l=o("span",{class:"sp-badge"});l.style.background=_(e.type,this.colors),l.style.color=M(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 h=this.buildSection(d++),u=o("div",{class:"sp-detail-section-title"});a(u,this.t("detail.message")),h.appendChild(u);let v=o("div",{class:"sp-detail-message"});if(v.style.borderLeftColor=M(e.type,this.colors),a(v,e.message),h.appendChild(v),this.content.appendChild(h),e.screenshotUrl&&Me(e.screenshotUrl)){let g=this.buildSection(d++),x=o("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=o("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=o("div",{class:"sp-detail-section-title"});x.appendChild(c(D));let b=o("span");a(b,this.t("detail.annotation")),x.appendChild(b),g.appendChild(x),this.buildAnnotation(g,e),this.content.appendChild(g);}if(Fe(e.diagnostics)){let g=this.buildSection(d++),x=o("div",{class:"sp-detail-section-title"});x.appendChild(c(Ae));let b=o("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 n=o("div",{class:"sp-detail-section"});return n.style.animationDelay=`${e*40}ms`,n}buildStatusActions(e,n){let s=n.status==="resolved",r=o("div",{class:"sp-detail-section-title"});a(r,this.t("detail.status")),e.appendChild(r);let i=o("div",{class:"sp-detail-status"}),l=o("span",{class:`sp-detail-status-pill ${s?"sp-detail-status-pill--resolved":"sp-detail-status-pill--open"}`}),d=o("span",{class:"sp-detail-status-dot"});d.style.background=s?"#9ca3af":"#22c55e",l.appendChild(d);let p=o("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 h=o("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(X));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(Q));let u=document.createElement("span");a(u,this.t("detail.delete")),this.deleteBtn.appendChild(u),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),h.appendChild(this.resolveBtn),h.appendChild(this.deleteBtn),e.appendChild(h);}buildMetadata(e,n){let s=o("div",{class:"sp-detail-meta"});if(this.addMetaRow(s,ke,this.t("detail.page"),()=>{let r=o("div",{class:"sp-detail-meta-value"}),i=Re(n.url);return a(r,A(i,60)),r.title=n.url,r}),this.addMetaRow(s,Ce,this.t("detail.author"),()=>{let r=o("div",{class:"sp-detail-meta-value"}),i=n.authorName||"Anonymous",l=n.authorEmail;return a(r,l?`${i} (${l})`:i),r}),this.addMetaRow(s,we,this.t("detail.date"),()=>{let r=o("div",{class:"sp-detail-meta-value"});return a(r,J(n.createdAt,this.locale.startsWith("fr")?"fr":"en")),r}),this.addMetaRow(s,Se,this.t("detail.viewport"),()=>{let r=o("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return a(r,n.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=o("div",{class:"sp-detail-meta-value"});return a(r,Le(n.userAgent)),r}),n.resolvedAt){let r=n.resolvedAt;this.addMetaRow(s,H,this.t("detail.resolvedAt"),()=>{let i=o("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return a(i,J(r,this.locale.startsWith("fr")?"fr":"en")),i});}e.appendChild(s);}addMetaRow(e,n,s,r){let i=o("div",{class:"sp-detail-meta-row"});i.appendChild(c(n));let l=o("div",{class:"sp-detail-meta-content"}),d=o("div",{class:"sp-detail-meta-label"});a(d,s),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}buildAnnotation(e,n){let s=n.annotations[0];if(!s)return;let r=o("div",{class:"sp-detail-annotation"}),i=o("div",{class:"sp-detail-annotation-info"});this.addAnnotationRow(i,Ee,this.t("detail.element"),()=>{let p=o("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),h=s.elementId?`<${s.elementTag}#${s.elementId}>`:`<${s.elementTag}>`;return a(p,h),p}),this.addAnnotationRow(i,Te,this.t("detail.selector"),()=>{let p=o("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return a(p,A(s.cssSelector,60)),p.title=s.cssSelector,p}),this.addAnnotationRow(i,D,this.t("detail.position"),()=>{let p=o("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(D));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,n){let s=n.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=o("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 h=document.createElement("span"),u=document.createElement("span");u.style.display="inline-flex",u.style.alignItems="center",u.style.gap="8px",u.appendChild(c(Be)),a(h,this.t("detail.diagnostics")),u.appendChild(h),p.appendChild(u);let v=o("span",{class:"sp-detail-diag-counts"}),m=o("span",{class:`sp-detail-diag-count${l>0?" sp-detail-diag-count--errors":""}`});a(m,`${r.length} console`);let f=o("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=o("div",{class:"sp-detail-diag-body"});if(r.length>0){let x=document.createElement("div"),b=o("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"),T=o("span",{class:`sp-detail-diag-level sp-detail-diag-level--${y.level}`});a(T,y.level);let w=o("span",{class:"sp-detail-diag-message"});a(w,A(y.message,240)),w.title=y.message,k.appendChild(T),k.appendChild(w),C.appendChild(k);}x.appendChild(C),g.appendChild(x);}if(i.length>0){let x=document.createElement("div"),b=o("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 T=o("span",{class:"sp-detail-diag-net-status"});a(T,y.status===0?"ERR":String(y.status));let w=o("span",{class:"sp-detail-diag-net-method"});a(w,y.method);let L=o("span",{class:"sp-detail-diag-net-url"});a(L,A(y.url,120)),L.title=`${y.url} \u2014 ${Pe(y.durationMs)}`,k.appendChild(T),k.appendChild(w),k.appendChild(L),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,n,s,r){let i=o("div",{class:"sp-detail-annotation-row"});i.appendChild(c(n));let l=o("div",{class:"sp-detail-meta-content"}),d=o("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(o("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let n=e.status==="resolved";this.resolveBtn.appendChild(c(n?X:H));let s=document.createElement("span");a(s,n?this.t("detail.reopen"):this.t("detail.resolve")),this.resolveBtn.appendChild(s);}restoreDeleteBtn(){if(!this.deleteBtn)return;this.deleteBtn.disabled=false,this.deleteBtn.replaceChildren(),this.deleteBtn.appendChild(c(Q));let e=document.createElement("span");a(e,this.t("detail.delete")),this.deleteBtn.appendChild(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="M11 5h10"/><path d="M11 9h7"/><path d="M11 13h4"/><path d="M3 17l3 3 3-3"/><path d="M6 18V4"/></svg>',se='<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>',Ne='<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>',ee={question:0,change:1,bug:2,other:3};function Kt(t,e){let n=[...t];switch(e){case "newest":n.sort((s,r)=>new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime());break;case "oldest":n.sort((s,r)=>new Date(s.createdAt).getTime()-new Date(r.createdAt).getTime());break;case "by-type":n.sort((s,r)=>{let i=ee[s.type]??99,l=ee[r.type]??99;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(s.createdAt).getTime()});break;case "open-first":n.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 n}function De(t){try{return new URL(t).pathname}catch{return t}}function He(t,e){if(t.length<=e)return t;let n="\u2026",s=Math.floor((e-1)/2);return t.slice(0,s)+n+t.slice(-s)}function Ut(t){let e=new Map;for(let s of t){let r=De(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 Vt(t,e,n){let s=o("div",{class:"sp-group-header"});s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.setAttribute("aria-expanded","true"),s.style.borderBottomColor=n.border;let r=o("span",{class:"sp-group-header-chevron"});r.appendChild(c(Ne)),s.appendChild(r);let i=o("span",{class:"sp-group-header-icon"});i.appendChild(c(se)),s.appendChild(i);let l=o("span",{class:"sp-group-header-path"}),d=He(t,40);a(l,d),t.length>40&&(l.title=t),s.appendChild(l);let p=o("span",{class:"sp-group-header-count"});p.style.background=n.accentLight,p.style.color=n.accent,a(p,String(e)),s.appendChild(p);let h=()=>{let u=s.getAttribute("aria-expanded")==="true";s.setAttribute("aria-expanded",String(!u)),s.classList.toggle("sp-group-header--collapsed",u);let v=s.nextElementSibling;v?.classList.contains("sp-group-content")&&v.classList.toggle("sp-group-content--collapsed",u);};return s.addEventListener("click",h),s.addEventListener("keydown",u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),h());}),s}var te=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;groupToggle;t;colors;onChange;outsideClickHandler=null;constructor(e,n,s){this.colors=e,this.onChange=n,this.t=s,this.element=o("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(Oe);this.sortBtn.appendChild(r);let i=o("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(se);this.groupToggle.appendChild(l);let d=o("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=o("div",{class:"sp-sort-menu"}),this.menuEl.setAttribute("role","listbox"),this.menuEl.setAttribute("aria-label",this.t("sort.label")),this.sortBtn.setAttribute("aria-expanded","true");let e=[{mode:"newest",label:this.t("sort.newest")},{mode:"oldest",label:this.t("sort.oldest")},{mode:"by-type",label:this.t("sort.byType")},{mode:"open-first",label:this.t("sort.openFirst")}];for(let n of e){let s=document.createElement("button");s.className=`sp-sort-option${n.mode===this._sortMode?" sp-sort-option--active":""}`,s.setAttribute("role","option"),s.setAttribute("aria-selected",String(n.mode===this._sortMode)),n.mode===this._sortMode&&(s.style.background=this.colors.accentLight,s.style.color=this.colors.accent),a(s,n.label),s.addEventListener("click",r=>{r.stopPropagation(),this._sortMode=n.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(s);}this.element.appendChild(this.menuEl),requestAnimationFrame(()=>{this.outsideClickHandler=n=>{this.menuEl&&!this.element.contains(n.target)&&this.closeMenu();},document.addEventListener("click",this.outsideClickHandler,true);}),this.menuEl.addEventListener("keydown",n=>{n.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")},n=this.sortBtn.querySelector(".sp-sort-btn-label");n&&a(n,e[this._sortMode]);}destroy(){this.closeMenu();}},Yt=`
1180
+ `;function Pe(t){if(/Edg\//i.test(t)){let e=t.match(/Edg\/([\d.]+)/);return e?`Edge ${e[1]}`:"Edge"}if(/OPR\//i.test(t)||/Opera/i.test(t)){let e=t.match(/OPR\/([\d.]+)/);return e?`Opera ${e[1]}`:"Opera"}if(/Firefox\//i.test(t)){let e=t.match(/Firefox\/([\d.]+)/);return e?`Firefox ${e[1]}`:"Firefox"}if(/Chrome\//i.test(t)&&!/Chromium/i.test(t)){let e=t.match(/Chrome\/([\d.]+)/);return e?`Chrome ${e[1]}`:"Chrome"}if(/Safari\//i.test(t)&&!/Chrome/i.test(t)){let e=t.match(/Version\/([\d.]+)/);return e?`Safari ${e[1]}`:"Safari"}return "Unknown"}function te(t,e){try{return new Date(t).toLocaleString(e,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function Oe(t){try{return new URL(t).pathname}catch{return t}}function Ne(t){return !!(/^data:image\/(jpeg|png|webp);/i.test(t)||/^https:\/\//i.test(t))}function L(t,e){return t.length<=e?t:t.slice(0,e-1)+"\u2026"}function De(t){if(!t)return false;let e=Array.isArray(t.console)?t.console.length:0,s=Array.isArray(t.network)?t.network.length:0;return e>0||s>0}function He(t){return !Number.isFinite(t)||t<0?"\u2014":t<1e3?`${Math.round(t)} ms`:`${(t/1e3).toFixed(1)} s`}var se=class{constructor(e,s,n,r){this.colors=e;this.callbacks=s;this.t=n,this.locale=r,this.element=o("div",{class:"sp-detail"}),this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label","Feedback detail"),this.element.setAttribute("aria-hidden","true");let i=o("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(Se)),l.addEventListener("click",()=>{this.hide(),this.callbacks.onBack();}),this.element.appendChild(i),i.appendChild(l),this.content=o("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,s){this.currentFeedback=e,this.isProcessing=false;let n=this.element.querySelector(".sp-detail-header");if(!n)return;let r=n.querySelector(".sp-detail-back");if(!r)return;n.replaceChildren(r);let i=o("span",{class:"sp-detail-title"});a(i,this.t("detail.title").replace("{number}",String(s))),n.appendChild(i);let l=o("span",{class:"sp-badge"});l.style.background=$(e.type,this.colors),l.style.color=M(e.type,this.colors),a(l,e.type),n.appendChild(l),this.content.replaceChildren();let d=0,p=this.buildSection(d++);this.buildStatusActions(p,e),this.content.appendChild(p);let h=this.buildSection(d++),u=o("div",{class:"sp-detail-section-title"});a(u,this.t("detail.message")),h.appendChild(u);let v=o("div",{class:"sp-detail-message"});if(v.style.borderLeftColor=M(e.type,this.colors),a(v,e.message),h.appendChild(v),this.content.appendChild(h),e.screenshotUrl&&Ne(e.screenshotUrl)){let g=this.buildSection(d++),x=o("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=o("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=o("div",{class:"sp-detail-section-title"});x.appendChild(c(H));let b=o("span");a(b,this.t("detail.annotation")),x.appendChild(b),g.appendChild(x),this.buildAnnotation(g,e),this.content.appendChild(g);}if(De(e.diagnostics)){let g=this.buildSection(d++),x=o("div",{class:"sp-detail-section-title"});x.appendChild(c(Me));let b=o("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 s=o("div",{class:"sp-detail-section"});return s.style.animationDelay=`${e*40}ms`,s}buildStatusActions(e,s){let n=C(s.status),r=o("div",{class:"sp-detail-section-title"});a(r,this.t("detail.status")),e.appendChild(r);let i=s.status.replace(/_/g,"-"),l={open:"#22c55e",in_progress:"#f59e0b",resolved:"#9ca3af",wont_fix:"#94a3b8"},d=o("div",{class:"sp-detail-status"}),p=o("span",{class:`sp-detail-status-pill sp-detail-status-pill--${i}`}),h=o("span",{class:"sp-detail-status-dot"});h.style.background=l[s.status]??l.open,p.appendChild(h);let u=o("span");a(u,G(s.status,this.t)),p.appendChild(u),d.appendChild(p),e.appendChild(d);let v=o("div",{class:"sp-detail-actions"});if(this.resolveBtn=document.createElement("button"),this.resolveBtn.type="button",n){this.resolveBtn.className="sp-detail-btn-reopen",this.resolveBtn.appendChild(c(Z));let f=document.createElement("span");a(f,this.t("detail.reopen")),this.resolveBtn.appendChild(f);}else {this.resolveBtn.className="sp-detail-btn-resolve",this.resolveBtn.appendChild(c(I));let f=document.createElement("span");a(f,this.t("detail.resolve")),this.resolveBtn.appendChild(f);}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(ee));let m=document.createElement("span");a(m,this.t("detail.delete")),this.deleteBtn.appendChild(m),this.deleteBtn.addEventListener("click",()=>this.handleDelete()),v.appendChild(this.resolveBtn),v.appendChild(this.deleteBtn),e.appendChild(v);}buildMetadata(e,s){let n=o("div",{class:"sp-detail-meta"});if(this.addMetaRow(n,Ee,this.t("detail.page"),()=>{let r=o("div",{class:"sp-detail-meta-value"}),i=Oe(s.url);return a(r,L(i,60)),r.title=s.url,r}),this.addMetaRow(n,Te,this.t("detail.author"),()=>{let r=o("div",{class:"sp-detail-meta-value"}),i=s.authorName||"Anonymous",l=s.authorEmail;return a(r,l?`${i} (${l})`:i),r}),this.addMetaRow(n,Be,this.t("detail.date"),()=>{let r=o("div",{class:"sp-detail-meta-value"});return a(r,te(s.createdAt,this.locale.startsWith("fr")?"fr":"en")),r}),this.addMetaRow(n,Ae,this.t("detail.viewport"),()=>{let r=o("div",{class:"sp-detail-meta-value sp-detail-meta-value--mono"});return a(r,s.viewport||"Unknown"),r}),this.addMetaRow(n,'<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=o("div",{class:"sp-detail-meta-value"});return a(r,Pe(s.userAgent)),r}),s.resolvedAt){let r=s.resolvedAt,i=s.status==="wont_fix"?this.t("detail.closedAt"):this.t("detail.resolvedAt");this.addMetaRow(n,I,i,()=>{let l=o("div",{class:"sp-detail-meta-value sp-detail-meta-value--secondary"});return a(l,te(r,this.locale.startsWith("fr")?"fr":"en")),l});}e.appendChild(n);}addMetaRow(e,s,n,r){let i=o("div",{class:"sp-detail-meta-row"});i.appendChild(c(s));let l=o("div",{class:"sp-detail-meta-content"}),d=o("div",{class:"sp-detail-meta-label"});a(d,n),l.appendChild(d),l.appendChild(r()),i.appendChild(l),e.appendChild(i);}buildAnnotation(e,s){let n=s.annotations[0];if(!n)return;let r=o("div",{class:"sp-detail-annotation"}),i=o("div",{class:"sp-detail-annotation-info"});this.addAnnotationRow(i,Le,this.t("detail.element"),()=>{let p=o("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"}),h=n.elementId?`<${n.elementTag}#${n.elementId}>`:`<${n.elementTag}>`;return a(p,h),p}),this.addAnnotationRow(i,Re,this.t("detail.selector"),()=>{let p=o("span",{class:"sp-detail-annotation-value sp-detail-annotation-value--mono"});return a(p,L(n.cssSelector,60)),p.title=n.cssSelector,p}),this.addAnnotationRow(i,H,this.t("detail.position"),()=>{let p=o("span",{class:"sp-detail-annotation-value"});return a(p,`${n.xPct.toFixed(1)}%, ${n.yPct.toFixed(1)}%`+(n.wPct>0||n.hPct>0?` (${n.wPct.toFixed(1)}% \xD7 ${n.hPct.toFixed(1)}%)`:"")),p}),r.appendChild(i);let l=document.createElement("button");l.type="button",l.className="sp-detail-btn-goto",l.appendChild(c(H));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,s){let n=s.diagnostics;if(!n)return;let r=Array.isArray(n.console)?n.console:[],i=Array.isArray(n.network)?n.network:[],l=r.filter(x=>x.level==="error").length,d=o("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 h=document.createElement("span"),u=document.createElement("span");u.style.display="inline-flex",u.style.alignItems="center",u.style.gap="8px",u.appendChild(c(Fe)),a(h,this.t("detail.diagnostics")),u.appendChild(h),p.appendChild(u);let v=o("span",{class:"sp-detail-diag-counts"}),m=o("span",{class:`sp-detail-diag-count${l>0?" sp-detail-diag-count--errors":""}`});a(m,`${r.length} console`);let f=o("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=o("div",{class:"sp-detail-diag-body"});if(r.length>0){let x=document.createElement("div"),b=o("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.console")),x.appendChild(b);let w=document.createElement("ul");w.className="sp-detail-diag-list";for(let y of r){let k=document.createElement("li"),B=o("span",{class:`sp-detail-diag-level sp-detail-diag-level--${y.level}`});a(B,y.level);let S=o("span",{class:"sp-detail-diag-message"});a(S,L(y.message,240)),S.title=y.message,k.appendChild(B),k.appendChild(S),w.appendChild(k);}x.appendChild(w),g.appendChild(x);}if(i.length>0){let x=document.createElement("div"),b=o("div",{class:"sp-detail-diag-group-title"});a(b,this.t("detail.diagnostics.network")),x.appendChild(b);let w=document.createElement("ul");w.className="sp-detail-diag-list";for(let y of i){let k=document.createElement("li");k.classList.add("sp-detail-diag-net");let B=o("span",{class:"sp-detail-diag-net-status"});a(B,y.status===0?"ERR":String(y.status));let S=o("span",{class:"sp-detail-diag-net-method"});a(S,y.method);let R=o("span",{class:"sp-detail-diag-net-url"});a(R,L(y.url,120)),R.title=`${y.url} \u2014 ${He(y.durationMs)}`,k.appendChild(B),k.appendChild(S),k.appendChild(R),w.appendChild(k);}x.appendChild(w),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,s,n,r){let i=o("div",{class:"sp-detail-annotation-row"});i.appendChild(c(s));let l=o("div",{class:"sp-detail-meta-content"}),d=o("div",{class:"sp-detail-annotation-label"});a(d,n),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(o("div",{class:"sp-spinner sp-spinner--sm"}));}restoreResolveBtn(e){if(!this.resolveBtn)return;this.resolveBtn.disabled=false,this.resolveBtn.replaceChildren();let s=C(e.status);this.resolveBtn.appendChild(c(s?Z:I));let n=document.createElement("span");a(n,s?this.t("detail.reopen"):this.t("detail.resolve")),this.resolveBtn.appendChild(n);}restoreDeleteBtn(){if(!this.deleteBtn)return;this.deleteBtn.disabled=false,this.deleteBtn.replaceChildren(),this.deleteBtn.appendChild(c(ee));let e=document.createElement("span");a(e,this.t("detail.delete")),this.deleteBtn.appendChild(e);}};var 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 5h10"/><path d="M11 9h7"/><path d="M11 13h4"/><path d="M3 17l3 3 3-3"/><path d="M6 18V4"/></svg>',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="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>',_e='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 18 15 12 9 6"/></svg>',ne={question:0,change:1,bug:2,other:3};function Qt(t,e){let s=[...t];switch(e){case "newest":s.sort((n,r)=>new Date(r.createdAt).getTime()-new Date(n.createdAt).getTime());break;case "oldest":s.sort((n,r)=>new Date(n.createdAt).getTime()-new Date(r.createdAt).getTime());break;case "by-type":s.sort((n,r)=>{let i=ne[n.type]??99,l=ne[r.type]??99;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(n.createdAt).getTime()});break;case "open-first":s.sort((n,r)=>{let i=C(n.status)?1:0,l=C(r.status)?1:0;return i!==l?i-l:new Date(r.createdAt).getTime()-new Date(n.createdAt).getTime()});break}return s}function je(t){try{return new URL(t).pathname}catch{return t}}function $e(t,e){if(t.length<=e)return t;let s="\u2026",n=Math.floor((e-1)/2);return t.slice(0,n)+s+t.slice(-n)}function Jt(t){let e=new Map;for(let n of t){let r=je(n.url),i=e.get(r);i?i.push(n):e.set(r,[n]);}return new Map([...e.entries()].sort((n,r)=>r[1].length-n[1].length))}function Zt(t,e,s){let n=o("div",{class:"sp-group-header"});n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.setAttribute("aria-expanded","true"),n.style.borderBottomColor=s.border;let r=o("span",{class:"sp-group-header-chevron"});r.appendChild(c(_e)),n.appendChild(r);let i=o("span",{class:"sp-group-header-icon"});i.appendChild(c(oe)),n.appendChild(i);let l=o("span",{class:"sp-group-header-path"}),d=$e(t,40);a(l,d),t.length>40&&(l.title=t),n.appendChild(l);let p=o("span",{class:"sp-group-header-count"});p.style.background=s.accentLight,p.style.color=s.accent,a(p,String(e)),n.appendChild(p);let h=()=>{let u=n.getAttribute("aria-expanded")==="true";n.setAttribute("aria-expanded",String(!u)),n.classList.toggle("sp-group-header--collapsed",u);let v=n.nextElementSibling;v?.classList.contains("sp-group-content")&&v.classList.toggle("sp-group-content--collapsed",u);};return n.addEventListener("click",h),n.addEventListener("keydown",u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),h());}),n}var re=class{element;_sortMode="newest";_groupByPage=false;menuEl=null;sortBtn;groupToggle;t;colors;onChange;outsideClickHandler=null;constructor(e,s,n){this.colors=e,this.onChange=s,this.t=n,this.element=o("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(Ie);this.sortBtn.appendChild(r);let i=o("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(oe);this.groupToggle.appendChild(l);let d=o("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=o("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 s of e){let n=document.createElement("button");n.className=`sp-sort-option${s.mode===this._sortMode?" sp-sort-option--active":""}`,n.setAttribute("role","option"),n.setAttribute("aria-selected",String(s.mode===this._sortMode)),s.mode===this._sortMode&&(n.style.background=this.colors.accentLight,n.style.color=this.colors.accent),a(n,s.label),n.addEventListener("click",r=>{r.stopPropagation(),this._sortMode=s.mode,this.updateSortLabel(),this.closeMenu(),this.onChange();}),this.menuEl.appendChild(n);}this.element.appendChild(this.menuEl),requestAnimationFrame(()=>{this.outsideClickHandler=s=>{this.menuEl&&!this.element.contains(s.target)&&this.closeMenu();},document.addEventListener("click",this.outsideClickHandler,true);}),this.menuEl.addEventListener("keydown",s=>{s.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")},s=this.sortBtn.querySelector(".sp-sort-btn-label");s&&a(s,e[this._sortMode]);}destroy(){this.closeMenu();}},es=`
1169
1181
  /* ============================
1170
1182
  Sort Controls Container
1171
1183
  ============================ */
@@ -1470,7 +1482,7 @@ function c(t){let s=document.createRange().createContextualFragment(t).firstElem
1470
1482
  transition: none;
1471
1483
  }
1472
1484
  }
1473
- `;var Wt=`
1485
+ `;var rs=`
1474
1486
  .sp-stats-bar {
1475
1487
  display: flex;
1476
1488
  flex-direction: column;
@@ -1553,7 +1565,7 @@ function c(t){let s=document.createRange().createContextualFragment(t).firstElem
1553
1565
  min-width: 64px;
1554
1566
  text-align: right;
1555
1567
  }
1556
- `,ne=class{constructor(e,n){this.colors=e;this.t=n,this.element=o("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label","Feedback statistics"),this.element.hidden=true;let s=o("div",{class:"sp-stats-row"}),r=o("div",{class:"sp-stats-item"}),i=o("span",{class:"sp-stats-dot"});i.style.background="#22c55e",this.valueOpen=o("span",{class:"sp-stats-value"}),a(this.valueOpen,"0");let l=o("span",{class:"sp-stats-label"});a(l,this.t("stats.open")),r.appendChild(i),r.appendChild(this.valueOpen),r.appendChild(l);let d=o("div",{class:"sp-stats-item"}),p=o("span",{class:"sp-stats-dot"});p.style.background="#9ca3af",this.valueResolved=o("span",{class:"sp-stats-value"}),a(this.valueResolved,"0");let h=o("span",{class:"sp-stats-label"});a(h,this.t("stats.resolved")),d.appendChild(p),d.appendChild(this.valueResolved),d.appendChild(h);let u=o("div",{class:"sp-stats-item"}),v=o("span",{class:"sp-stats-dot"});v.style.background=this.colors.typeBug,this.valueBugs=o("span",{class:"sp-stats-value"}),a(this.valueBugs,"0");let m=o("span",{class:"sp-stats-label"});a(m,this.t("stats.bugs")),u.appendChild(v),u.appendChild(this.valueBugs),u.appendChild(m),s.appendChild(r),s.appendChild(d),s.appendChild(u);let f=o("div",{class:"sp-stats-progress"}),g=o("div",{class:"sp-stats-progress-track"});this.progressFill=o("div",{class:"sp-stats-progress-fill"}),g.appendChild(this.progressFill),this.progressLabel=o("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,n){if(n===0){this.element.hidden=true;return}this.element.hidden=false;let s=0,r=0,i=0;for(let h of e)h.status==="open"&&s++,h.status==="resolved"&&r++,h.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 Ie='<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 Jt(t){let e=t.querySelectorAll(".sp-card");for(let n=0;n<e.length;n++)if(e[n]?.classList.contains("sp-card--focused"))return n;return -1}function Zt(t,e){let n=t.querySelectorAll(".sp-card");if(n.length===0)return;for(let i of n)i.classList.remove("sp-card--focused");let s=Math.max(0,Math.min(e,n.length-1)),r=n[s];r&&(r.classList.add("sp-card--focused"),r.scrollIntoView({block:"nearest",behavior:"smooth"}),r.focus({preventScroll:true}));}var je=[{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"}],es=`
1568
+ `,ie=class{constructor(e,s){this.colors=e;this.t=s,this.element=o("div",{class:"sp-stats-bar"}),this.element.setAttribute("aria-label","Feedback statistics"),this.element.hidden=true;let n=o("div",{class:"sp-stats-row"}),r=o("div",{class:"sp-stats-item"}),i=o("span",{class:"sp-stats-dot"});i.style.background="#22c55e",this.valueOpen=o("span",{class:"sp-stats-value"}),a(this.valueOpen,"0");let l=o("span",{class:"sp-stats-label"});a(l,this.t("stats.open")),r.appendChild(i),r.appendChild(this.valueOpen),r.appendChild(l);let d=o("div",{class:"sp-stats-item"}),p=o("span",{class:"sp-stats-dot"});p.style.background="#9ca3af",this.valueResolved=o("span",{class:"sp-stats-value"}),a(this.valueResolved,"0");let h=o("span",{class:"sp-stats-label"});a(h,this.t("stats.resolved")),d.appendChild(p),d.appendChild(this.valueResolved),d.appendChild(h);let u=o("div",{class:"sp-stats-item"}),v=o("span",{class:"sp-stats-dot"});v.style.background=this.colors.typeBug,this.valueBugs=o("span",{class:"sp-stats-value"}),a(this.valueBugs,"0");let m=o("span",{class:"sp-stats-label"});a(m,this.t("stats.bugs")),u.appendChild(v),u.appendChild(this.valueBugs),u.appendChild(m),n.appendChild(r),n.appendChild(d),n.appendChild(u);let f=o("div",{class:"sp-stats-progress"}),g=o("div",{class:"sp-stats-progress-track"});this.progressFill=o("div",{class:"sp-stats-progress-fill"}),g.appendChild(this.progressFill),this.progressLabel=o("span",{class:"sp-stats-progress-label"}),a(this.progressLabel,""),f.appendChild(g),f.appendChild(this.progressLabel),this.element.appendChild(n),this.element.appendChild(f);}colors;element;valueOpen;valueResolved;valueBugs;progressFill;progressLabel;t;update(e,s){if(s===0){this.element.hidden=true;return}this.element.hidden=false;let n=0,r=0,i=0;for(let h of e)C(h.status)?r++:n++,h.type==="bug"&&i++;a(this.valueOpen,String(n)),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 Ke='<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 as(t){let e=t.querySelectorAll(".sp-card");for(let s=0;s<e.length;s++)if(e[s]?.classList.contains("sp-card--focused"))return s;return -1}function ls(t,e){let s=t.querySelectorAll(".sp-card");if(s.length===0)return;for(let i of s)i.classList.remove("sp-card--focused");let n=Math.max(0,Math.min(e,s.length-1)),r=s[n];r&&(r.classList.add("sp-card--focused"),r.scrollIntoView({block:"nearest",behavior:"smooth"}),r.focus({preventScroll:true}));}var ze=[{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"}],ps=`
1557
1569
  /* ---- Help overlay backdrop ---- */
1558
1570
 
1559
1571
  .sp-shortcuts-overlay {
@@ -1780,5 +1792,5 @@ function c(t){let s=document.createRange().createContextualFragment(t).firstElem
1780
1792
  transition-duration: 0.01ms !important;
1781
1793
  }
1782
1794
  }
1783
- `,_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>',re=class{constructor(e,n,s){this.t=s;this.keyMap=new Map([["j",()=>n.onNavigate("down")],["k",()=>n.onNavigate("up")],["r",()=>n.onResolve()],["d",()=>n.onDelete()],["f",()=>n.onFocusSearch()],["/",()=>n.onFocusSearch()],["x",()=>n.onToggleSelect()],["?",()=>this.toggleHelp()]]),this.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 n=e.composedPath()[0];if(n){let r=n.tagName?.toLowerCase();if(r==="input"||r==="textarea"||r==="select"||n.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=o("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 n=o("div",{class:"sp-shortcuts-card"}),s=o("div",{class:"sp-shortcuts-title"});s.appendChild(c(Ie));let r=o("span");a(r,this.t("shortcuts.title")),s.appendChild(r),n.appendChild(s);let i=document.createElement("button");i.className="sp-shortcuts-close",i.setAttribute("aria-label",this.t("shortcuts.close")),i.appendChild(c(_e)),i.addEventListener("click",()=>this.hideHelp()),n.appendChild(i);let l=o("div",{class:"sp-shortcuts-grid"});for(let d of je){let p=o("div",{class:"sp-shortcuts-row"}),h=o("div",{class:"sp-shortcuts-keys"});d.keys.forEach((v,m)=>{if(m>0){let g=o("span",{class:"sp-shortcuts-separator"});a(g,"/"),h.appendChild(g);}let f=o("span",{class:"sp-kbd"});a(f,v),h.appendChild(f);});let u=o("span",{class:"sp-shortcuts-desc"});a(u,this.t(d.label)),p.appendChild(h),p.appendChild(u),l.appendChild(p);}return n.appendChild(l),e.appendChild(n),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",n=>{n.stopPropagation(),this.toggleHelp();}),e}};export{S as A,F as B,P as C,O as D,ce as E,ue as F,At as G,Lt as H,Rt as I,Pt as J,G as K,Dt as L,W as M,_t as N,Z as O,Kt as P,Ut as Q,Vt as R,te as S,Yt as T,Wt as U,ne as V,Jt as W,Zt as X,es as Y,re as Z,c as a,o as b,a as c,R as d,$e as e,Ke as f,Ue as g,Ve as h,Ye as i,Ge as j,qe as k,We as l,Xe as m,Qe as n,Je as o,Ze as p,et as q,tt as r,st as s,nt as t,rt as u,ot as v,at as w,M as x,_ as y,lt as z};//# sourceMappingURL=chunk-GRXZBZ42.js.map
1784
- //# sourceMappingURL=chunk-GRXZBZ42.js.map
1795
+ `,Ue='<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>',ae=class{constructor(e,s,n){this.t=n;this.keyMap=new Map([["j",()=>s.onNavigate("down")],["k",()=>s.onNavigate("up")],["r",()=>s.onResolve()],["d",()=>s.onDelete()],["f",()=>s.onFocusSearch()],["/",()=>s.onFocusSearch()],["x",()=>s.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 s=e.composedPath()[0];if(s){let r=s.tagName?.toLowerCase();if(r==="input"||r==="textarea"||r==="select"||s.isContentEditable)return}if(e.ctrlKey||e.altKey||e.metaKey)return;let n=this.keyMap.get(e.key);n&&(e.preventDefault(),e.stopPropagation(),n());}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=o("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 s=o("div",{class:"sp-shortcuts-card"}),n=o("div",{class:"sp-shortcuts-title"});n.appendChild(c(Ke));let r=o("span");a(r,this.t("shortcuts.title")),n.appendChild(r),s.appendChild(n);let i=document.createElement("button");i.className="sp-shortcuts-close",i.setAttribute("aria-label",this.t("shortcuts.close")),i.appendChild(c(Ue)),i.addEventListener("click",()=>this.hideHelp()),s.appendChild(i);let l=o("div",{class:"sp-shortcuts-grid"});for(let d of ze){let p=o("div",{class:"sp-shortcuts-row"}),h=o("div",{class:"sp-shortcuts-keys"});d.keys.forEach((v,m)=>{if(m>0){let g=o("span",{class:"sp-shortcuts-separator"});a(g,"/"),h.appendChild(g);}let f=o("span",{class:"sp-kbd"});a(f,v),h.appendChild(f);});let u=o("span",{class:"sp-shortcuts-desc"});a(u,this.t(d.label)),p.appendChild(h),p.appendChild(u),l.appendChild(p);}return s.appendChild(l),e.appendChild(s),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",s=>{s.stopPropagation(),this.toggleHelp();}),e}};export{ie as $,$ as A,gt as B,E as C,O as D,N as E,D as F,ge as G,be as H,z as I,C as J,xe as K,Pt as L,Ot as M,Nt as N,G as O,It as P,X as Q,$t as R,J as S,Gt as T,se as U,Qt as V,Jt as W,Zt as X,re as Y,es as Z,rs as _,c as a,as as aa,o as b,ls as ba,a as c,ps as ca,F as d,ae as da,Ve as e,Ge as f,qe as g,We as h,Xe as i,Qe as j,Je as k,Ze as l,et as m,tt as n,st as o,nt as p,rt as q,ot as r,it as s,at as t,lt as u,pt as v,ct as w,M as x,ut as y,ht as z};//# sourceMappingURL=chunk-GP6ZPMBW.js.map
1796
+ //# sourceMappingURL=chunk-GP6ZPMBW.js.map