@mhosaic/feedback 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-A4MBOFRR.mjs → chunk-3YLD2AJI.mjs} +83 -31
- package/dist/chunk-3YLD2AJI.mjs.map +1 -0
- package/dist/{chunk-DKE6ELJ4.mjs → chunk-FGA63IEZ.mjs} +16 -4
- package/dist/chunk-FGA63IEZ.mjs.map +1 -0
- package/dist/embed.min.js +18 -7
- package/dist/embed.min.js.map +1 -1
- package/dist/error-tracking.d.ts +19 -0
- package/dist/error-tracking.mjs +23 -3
- package/dist/error-tracking.mjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/react.mjs +2 -2
- package/dist/webvitals.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-A4MBOFRR.mjs.map +0 -1
- package/dist/chunk-DKE6ELJ4.mjs.map +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// src/capture/scrub.ts
|
|
2
2
|
var SENSITIVE_TOKEN_PATTERNS = [
|
|
3
|
-
// Mhosaic feedback keys.
|
|
4
|
-
|
|
3
|
+
// Mhosaic feedback keys. Match ANY tail length — a backend error echo can
|
|
4
|
+
// truncate the suffix (e.g. `sk_proj_***abc`) and the redaction must still
|
|
5
|
+
// catch the prefix.
|
|
6
|
+
/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,
|
|
5
7
|
// JWT shape (header.payload.signature).
|
|
6
8
|
/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,
|
|
7
9
|
// "Bearer <token>" and "Authorization: …" headers.
|
|
@@ -14,7 +16,17 @@ var SENSITIVE_TOKEN_PATTERNS = [
|
|
|
14
16
|
// AWS access key id.
|
|
15
17
|
/\bAKIA[0-9A-Z]{12,}\b/g,
|
|
16
18
|
// Slack tokens.
|
|
17
|
-
/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g
|
|
19
|
+
/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,
|
|
20
|
+
// Google API keys (Maps, GCP, Firebase, etc.).
|
|
21
|
+
/\bAIza[0-9A-Za-z_-]{35}\b/g,
|
|
22
|
+
// OpenAI API keys (legacy, project-scoped, service-account).
|
|
23
|
+
/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,
|
|
24
|
+
// Anthropic API keys.
|
|
25
|
+
/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,
|
|
26
|
+
// Twilio account / API SIDs (paired secret would also be redacted by the
|
|
27
|
+
// Stripe-shape regex if it's prefixed sk_).
|
|
28
|
+
/\bAC[a-f0-9]{32}\b/g,
|
|
29
|
+
/\bSK[a-f0-9]{32}\b/g
|
|
18
30
|
];
|
|
19
31
|
function scrubCredentials(text) {
|
|
20
32
|
let out = text;
|
|
@@ -27,4 +39,4 @@ function scrubCredentials(text) {
|
|
|
27
39
|
export {
|
|
28
40
|
scrubCredentials
|
|
29
41
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-FGA63IEZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/capture/scrub.ts"],"sourcesContent":["/**\n * Shared credential-shaped-string scrubber.\n *\n * Used by every capture module (console, error, performance, network) so a\n * single regression in any one path can't leak credentials a sibling path\n * already cleans. Patterns mirror the ones in the URL sanitizer's\n * value-shape detector — keep them in sync.\n */\n\nexport const SENSITIVE_TOKEN_PATTERNS: RegExp[] = [\n // Mhosaic feedback keys. Match ANY tail length — a backend error echo can\n // truncate the suffix (e.g. `sk_proj_***abc`) and the redaction must still\n // catch the prefix.\n /\\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,\n // JWT shape (header.payload.signature).\n /\\beyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\b/g,\n // \"Bearer <token>\" and \"Authorization: …\" headers.\n /\\bBearer\\s+[A-Za-z0-9._~+/=-]{16,}\\b/g,\n /\\bAuthorization\\s*[:=]\\s*[\"']?[A-Za-z0-9._~+/=-]{16,}[\"']?/gi,\n // GitHub PATs.\n /\\bgh[pousr]_[A-Za-z0-9]{30,}\\b/g,\n // Stripe live/test secret keys + webhook secrets.\n /\\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\\b/g,\n // AWS access key id.\n /\\bAKIA[0-9A-Z]{12,}\\b/g,\n // Slack tokens.\n /\\bxox[abprso]-[A-Za-z0-9-]{12,}\\b/g,\n // Google API keys (Maps, GCP, Firebase, etc.).\n /\\bAIza[0-9A-Za-z_-]{35}\\b/g,\n // OpenAI API keys (legacy, project-scoped, service-account).\n /\\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\\b/g,\n // Anthropic API keys.\n /\\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\\b/g,\n // Twilio account / API SIDs (paired secret would also be redacted by the\n // Stripe-shape regex if it's prefixed sk_).\n /\\bAC[a-f0-9]{32}\\b/g,\n /\\bSK[a-f0-9]{32}\\b/g,\n]\n\nexport function scrubCredentials(text: string): string {\n let out = text\n for (const re of SENSITIVE_TOKEN_PATTERNS) {\n out = out.replace(re, '[redacted-token]')\n }\n return out\n}\n"],"mappings":";AASO,IAAM,2BAAqC;AAAA;AAAA;AAAA;AAAA,EAIhD;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA;AAAA,EAGA;AAAA,EACA;AACF;AAEO,SAAS,iBAAiB,MAAsB;AACrD,MAAI,MAAM;AACV,aAAW,MAAM,0BAA0B;AACzC,UAAM,IAAI,QAAQ,IAAI,kBAAkB;AAAA,EAC1C;AACA,SAAO;AACT;","names":[]}
|
package/dist/embed.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";var MhosaicFeedback=(()=>{var
|
|
1
|
+
"use strict";var MhosaicFeedback=(()=>{var Ut=Object.defineProperty;var jt=(e,t,r)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ce=(e,t,r)=>jt(e,typeof t!="symbol"?t+"":t,r);var Ot=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function qt(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}function Ne(e){var v,w;let t=((v=e.endpoint)!=null?v:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');qt(t);let r=(w=e.fetch)!=null?w:globalThis.fetch;async function n(h){var E,B,P;let m=h;if(e.beforeSend&&(m=await e.beforeSend(h)),m===!1)throw new Error("Submission cancelled by beforeSend");let p=new FormData;for(let C of Ot)p.append(C,String(m[C]));p.append("technical_context",JSON.stringify(m.technical_context)),m.screenshot&&p.append("screenshot",m.screenshot,"screenshot.png"),m.synthetic&&p.append("synthetic","true"),(E=m.user)!=null&&E.id&&p.append("user",JSON.stringify(m.user)),m.widget_version&&p.append("widget_version",m.widget_version);let u={Authorization:`Bearer ${e.apiKey}`};m.synthetic&&(u["X-Mhosaic-Capture-Source"]="error-tracking");let _=(B=e.getSignedIdentity)==null?void 0:B.call(e);_&&_.userHash&&_.exp&&((P=m.user)!=null&&P.id)&&(u["X-Mhosaic-User"]=String(m.user.id),u["X-Mhosaic-User-Hmac"]=_.userHash,u["X-Mhosaic-User-Exp"]=String(_.exp),_.email&&(u["X-Mhosaic-User-Email"]=_.email));let S=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:u,body:p});if(!S.ok){let C=await S.text().catch(()=>"");throw new Error(`Feedback submit failed: ${S.status} ${C}`)}return S.json()}function a(h){var u;let m={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":h},p=(u=e.getSignedIdentity)==null?void 0:u.call(e);return p&&p.userHash&&p.exp&&(m["X-Mhosaic-User-Hmac"]=p.userHash,m["X-Mhosaic-User-Exp"]=String(p.exp),p.email&&(m["X-Mhosaic-User-Email"]=p.email)),m}async function i(h){let m=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:a(h)});if(m.status===404)return[];if(!m.ok){let p=await m.text().catch(()=>"");throw new Error(`listMine failed: ${m.status} ${p}`)}return m.json()}async function s(h){let m=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:a(h)});if(m.status===404)return[];if(!m.ok){let p=await m.text().catch(()=>"");throw new Error(`listChangelog failed: ${m.status} ${p}`)}return m.json()}async function c(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${h}/`,{method:"GET",headers:a(m)});if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`getReport failed: ${p.status} ${u}`)}return p.json()}async function f(h,m,p,u){let _=await r(`${t}/api/feedback/v1/reports/widget/${h}/comments/`,{method:"POST",headers:{...a(m),"Content-Type":"application/json"},body:JSON.stringify({body:p,...u!==void 0&&{client_nonce:u}})});if(!_.ok){let S=await _.text().catch(()=>"");throw new Error(`addComment failed: ${_.status} ${S}`)}return _.json()}async function l(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/${h}/`,{method:"PATCH",headers:{...a(m),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${p.status} ${u}`)}return p.json()}function b(h){var u,_,S;if(!h)return"";let m=new URLSearchParams;(u=h.status)==null||u.forEach(E=>m.append("status",E)),(_=h.type)==null||_.forEach(E=>m.append("type",E)),(S=h.severity)==null||S.forEach(E=>m.append("severity",E)),h.q&&m.set("q",h.q),h.mine&&m.set("mine","1"),h.page&&h.page>1&&m.set("page",String(h.page));let p=m.toString();return p?`?${p}`:""}async function d(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/${b(m)}`,{method:"GET",headers:a(h)});if(p.status===404)return{count:0,next:null,previous:null,results:[]};if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`listBoard failed: ${p.status} ${u}`)}return p.json()}async function y(h,m){let p=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${b(m)}`,{method:"GET",headers:a(h)});if(p.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${p.status} ${u}`)}return p.json()}return{submitReport:n,listMine:i,listChangelog:s,getReport:c,addComment:f,closeAsResolved:l,listBoard:d,fetchBoardKpis:y}}var Vt=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Gt=[/^eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^(?:sk|pk)_proj_[A-Za-z0-9_-]{16,}$/,/^gh[pousr]_[A-Za-z0-9]{30,}$/,/^(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}$/,/^AKIA[0-9A-Z]{12,}$/,/^xox[abprso]-[A-Za-z0-9-]{12,}$/,/^[a-f0-9]{40,}$/i,/^[A-Za-z0-9_-]{40,}$/];function Xt(e){return Gt.some(t=>t.test(e))}function Z(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let n=typeof window!="undefined"?window.location.origin:"http://localhost",a=new URL(e,n),i=new URLSearchParams;return a.searchParams.forEach((s,c)=>{Vt.test(c)||Xt(s)?i.set(c,"[redacted]"):i.set(c,s)}),a.search=i.toString(),a.hash=a.hash?"#[redacted]":"",a.toString()}catch(t){return e}}var Zt=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function N(e){let t=e;for(let r of Zt)t=t.replace(r,"[redacted-token]");return t}function Ue(){var c;let e=navigator,t=(c=e.connection)==null?void 0:c.effectiveType,r=e.deviceMemory,n=document.referrer||void 0,a=n!==void 0?Z(n):void 0,i=Z(window.location.pathname+window.location.search),s;try{let f=new URL(i,window.location.origin);s=f.pathname+f.search}catch(f){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...a!==void 0&&{referrer:a},title:N(document.title||"").slice(0,200),pathname:s}}function Yt(e){if(e==null)return String(e);if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(e instanceof Error)return`${e.name}: ${e.message}`;if(e instanceof Element)return`<${e.tagName.toLowerCase()}>`;try{return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)}catch(t){try{return String(e)}catch(r){return"[unserializable]"}}}function je(e){let t=["log","info","warn","error","debug"],r={};for(let n of t){let a=console[n];typeof a=="function"&&(r[n]=a,console[n]=function(...s){try{let c=s.map(Yt).join(" "),f=N(c).slice(0,2e3),l={level:n,message:f,ts:Date.now()};if(n==="error"){let b=new Error().stack;b&&(l.stack=b.split(`
|
|
2
2
|
`).slice(2,8).join(`
|
|
3
|
-
`))}e.push(l)}catch(c){}a.apply(console,s)})}return()=>{for(let[n,a]of Object.entries(r))console[n]=a}}function je(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(a,i){let s=performance.now(),c=typeof a=="string"?a:a instanceof URL?a.toString():a.url,f=((i==null?void 0:i.method)||(a instanceof Request?a.method:"GET")).toUpperCase();try{let l=await r(a,i);return e.push({url:t(c),method:f,status:l.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),l}catch(l){let b=l instanceof Error?l.message:String(l);throw e.push({url:t(c),method:f,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:N(b)}),l}},()=>{window.fetch=r}}function Oe(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,n=r.prototype.open,a=r.prototype.send;return r.prototype.open=function(s,c){return this.__mfb={method:s.toUpperCase(),url:typeof c=="string"?c:c.toString(),start:performance.now()},n.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let c=this.__mfb;if(!c)return;e.push({url:t(c.url),method:c.method,status:this.status,durationMs:Math.round(performance.now()-c.start),ts:Date.now()})}catch(c){}}),a.call(this,s!=null?s:null)},()=>{r.prototype.open=n,r.prototype.send=a}}function qe(e){if(typeof window=="undefined")return()=>{};let t=n=>{let a=n.error instanceof Error?n.error.stack:void 0,i=a!==void 0?N(a):void 0;e.push({message:N(n.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=n=>{let a=n.reason,i=a instanceof Error?a.message:typeof a=="string"?a:(()=>{try{return JSON.stringify(a)}catch(f){return String(a)}})(),s=a instanceof Error?a.stack:void 0,c=s!==void 0?N(s):void 0;e.push({message:N(i),...c!==void 0&&{stack:c},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function Ve(e=1e3){let t=[],r=[],n=null;if(typeof PerformanceObserver!="undefined")try{n=new PerformanceObserver(a=>{for(let i of a.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:Y(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),n.observe({entryTypes:["longtask","resource"]})}catch(a){}return{snapshot(){let a=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=a?{type:a.type,duration:a.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){n==null||n.disconnect()}}}var ee=class{constructor(t){Ce(this,"max",t);Ce(this,"items",[])}push(t){for(this.items.push(t);this.items.length>this.max;)this.items.shift()}snapshot(){return this.items.slice()}clear(){this.items.length=0}};function Ge(e={}){var v;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:n=20}=e,a=(v=e.sanitizeUrl)!=null?v:Y,i=new ee(t),s=new ee(r),c=new ee(n),f=Ue(i),l=je(s,a),b=Oe(s,a),d=qe(c),y=Ve();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:c.snapshot(),device:Ne(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),c.clear()},dispose(){f(),l(),b(),d(),y.dispose()}}}var Yt={"fab.label":"Send feedback","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.context.label":"Page","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports. Try again.","board.list.you":"you","board.list.count":"{n} of {total}","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},Zt={"fab.label":"Envoyer un commentaire","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.context.label":"Page","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports. R\xE9essayez.","board.list.you":"vous","board.list.count":"{n} sur {total}","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},Jt={fr:Zt};function Qt(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=Jt[t])!=null?r:null}function Xe(e,t={}){var n;let r=(n=Qt(t.locale))!=null?n:{};return{...Yt,...r,...e}}var fe,B,et,er,V,Ye,tt,rt,Re,se,oe,ot,Pe,Ee,Me,tr,de={},pe=[],rr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function O(e,t){for(var r in t)e[r]=t[r];return e}function Be(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ze(e,t,r){var n,a,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?fe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return le(e,s,n,a,null)}function le(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a==null?++et:a,__i:-1,__u:0};return a==null&&B.vnode!=null&&B.vnode(i),i}function H(e){return e.children}function ce(e,t){this.props=e,this.context=t}function te(e,t){if(t==null)return e.__?te(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?te(e):null}function or(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],a=[],i=O({},t);i.__v=t.__v+1,B.vnode&&B.vnode(i),Le(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,n,r==null?te(t):r,!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,st(n,i,a),t.__e=t.__=null,i.__e!=r&&nt(i)}}function nt(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),nt(e)}function Ze(e){(!e.__d&&(e.__d=!0)&&V.push(e)&&!ue.__r++||Ye!=B.debounceRendering)&&((Ye=B.debounceRendering)||tt)(ue)}function ue(){try{for(var e,t=1;V.length;)V.length>t&&V.sort(rt),e=V.shift(),t=V.length,or(e)}finally{V.length=ue.__r=0}}function at(e,t,r,n,a,i,s,c,f,l,b){var d,y,v,w,h,m,p,u=n&&n.__k||pe,_=t.length;for(f=nr(r,t,u,f,_),d=0;d<_;d++)(v=r.__k[d])!=null&&(y=v.__i!=-1&&u[v.__i]||de,v.__i=d,m=Le(e,v,y,a,i,s,c,f,l,b),w=v.__e,v.ref&&y.ref!=v.ref&&(y.ref&&Fe(y.ref,null,v),b.push(v.ref,v.__c||w,v)),h==null&&w!=null&&(h=w),(p=!!(4&v.__u))||y.__k===v.__k?(f=it(v,f,e,p),p&&y.__e&&(y.__e=null)):typeof v.type=="function"&&m!==void 0?f=m:w&&(f=w.nextSibling),v.__u&=-7);return r.__e=h,f}function nr(e,t,r,n,a){var i,s,c,f,l,b=r.length,d=b,y=0;for(e.__k=new Array(a),i=0;i<a;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=le(null,s,null,null,null):me(s)?s=e.__k[i]=le(H,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=le(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,f=i+y,s.__=e,s.__b=e.__b+1,c=null,(l=s.__i=ar(s,r,f,d))!=-1&&(d--,(c=r[l])&&(c.__u|=2)),c==null||c.__v==null?(l==-1&&(a>b?y--:a<b&&y++),typeof s.type!="function"&&(s.__u|=4)):l!=f&&(l==f-1?y--:l==f+1?y++:(l>f?y--:y++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<b;i++)(c=r[i])!=null&&(2&c.__u)==0&&(c.__e==n&&(n=te(c)),ct(c,c));return n}function it(e,t,r,n){var a,i;if(typeof e.type=="function"){for(a=e.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=e,t=it(a[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=te(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ar(e,t,r,n){var a,i,s,c=e.key,f=e.type,l=t[r],b=l!=null&&(2&l.__u)==0;if(l===null&&c==null||b&&c==l.key&&f==l.type)return r;if(n>(b?1:0)){for(a=r-1,i=r+1;a>=0||i<t.length;)if((l=t[s=a>=0?a--:i++])!=null&&(2&l.__u)==0&&c==l.key&&f==l.type)return s}return-1}function Je(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||rr.test(t)?r:r+"px"}function ie(e,t,r,n,a){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Je(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Je(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(ot,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[oe]=n[oe]:(r[oe]=Pe,e.addEventListener(t,i?Me:Ee,i)):e.removeEventListener(t,i?Me:Ee,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(c){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Qe(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[se]==null)t[se]=Pe++;else if(t[se]<r[oe])return;return r(B.event?B.event(t):t)}}}function Le(e,t,r,n,a,i,s,c,f,l){var b,d,y,v,w,h,m,p,u,_,S,E,z,P,C,L=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),i=[c=t.__e=r.__e]),(b=B.__b)&&b(t);e:if(typeof L=="function")try{if(p=t.props,u=L.prototype&&L.prototype.render,_=(b=L.contextType)&&n[b.__c],S=b?_?_.props.value:b.__:n,r.__c?m=(d=t.__c=r.__c).__=d.__E:(u?t.__c=d=new L(p,S):(t.__c=d=new ce(p,S),d.constructor=L,d.render=sr),_&&_.sub(d),d.state||(d.state={}),d.__n=n,y=d.__d=!0,d.__h=[],d._sb=[]),u&&d.__s==null&&(d.__s=d.state),u&&L.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=O({},d.__s)),O(d.__s,L.getDerivedStateFromProps(p,d.__s))),v=d.props,w=d.state,d.__v=t,y)u&&L.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),u&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(u&&L.getDerivedStateFromProps==null&&p!==v&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(p,S),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(p,d.__s,S)===!1){t.__v!=r.__v&&(d.props=p,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function($){$&&($.__=t)}),pe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(p,d.__s,S),u&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(v,w,h)})}if(d.context=S,d.props=p,d.__P=e,d.__e=!1,E=B.__r,z=0,u)d.state=d.__s,d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),pe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++z<25);d.state=d.__s,d.getChildContext!=null&&(n=O(O({},n),d.getChildContext())),u&&!y&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(v,w)),P=b!=null&&b.type===H&&b.key==null?lt(b.props.children):b,c=at(e,me(P)?P:[P],t,r,n,a,i,s,c,f,l),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),m&&(d.__E=d.__=null)}catch($){if(t.__v=null,f||i!=null)if($.then){for(t.__u|=f?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;i[i.indexOf(c)]=null,t.__e=c}else{for(C=i.length;C--;)Be(i[C]);Te(t)}else t.__e=r.__e,t.__k=r.__k,$.then||Te(t);B.__e($,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):c=t.__e=ir(r.__e,t,r,n,a,i,s,f,l);return(b=B.diffed)&&b(t),128&t.__u?void 0:c}function Te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Te))}function st(e,t,r){for(var n=0;n<r.length;n++)Fe(r[n],r[++n],r[++n]);B.__c&&B.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){B.__e(i,a.__v)}})}function lt(e){return typeof e!="object"||e==null||e.__b>0?e:me(e)?e.map(lt):O({},e)}function ir(e,t,r,n,a,i,s,c,f){var l,b,d,y,v,w,h,m=r.props||de,p=t.props,u=t.type;if(u=="svg"?a="http://www.w3.org/2000/svg":u=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(l=0;l<i.length;l++)if((v=i[l])&&"setAttribute"in v==!!u&&(u?v.localName==u:v.nodeType==3)){e=v,i[l]=null;break}}if(e==null){if(u==null)return document.createTextNode(p);e=document.createElementNS(a,u,p.is&&p),c&&(B.__m&&B.__m(t,i),c=!1),i=null}if(u==null)m===p||c&&e.data==p||(e.data=p);else{if(i=i&&fe.call(e.childNodes),!c&&i!=null)for(m={},l=0;l<e.attributes.length;l++)m[(v=e.attributes[l]).name]=v.value;for(l in m)v=m[l],l=="dangerouslySetInnerHTML"?d=v:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||ie(e,l,null,v,a);for(l in p)v=p[l],l=="children"?y=v:l=="dangerouslySetInnerHTML"?b=v:l=="value"?w=v:l=="checked"?h=v:c&&typeof v!="function"||m[l]===v||ie(e,l,v,m[l],a);if(b)c||d&&(b.__html==d.__html||b.__html==e.innerHTML)||(e.innerHTML=b.__html),t.__k=[];else if(d&&(e.innerHTML=""),at(t.type=="template"?e.content:e,me(y)?y:[y],t,r,n,u=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:r.__k&&te(r,0),c,f),i!=null)for(l=i.length;l--;)Be(i[l]);c||(l="value",u=="progress"&&w==null?e.removeAttribute("value"):w!=null&&(w!==e[l]||u=="progress"&&!w||u=="option"&&w!=m[l])&&ie(e,l,w,m[l],a),l="checked",h!=null&&h!=e[l]&&ie(e,l,h,m[l],a))}return e}function Fe(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(a){B.__e(a,r)}}function ct(e,t,r){var n,a;if(B.unmount&&B.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Fe(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){B.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&ct(n[a],t,r||typeof e.type!="function");r||Be(e.__e),e.__c=e.__=e.__e=void 0}function sr(e,t,r){return this.constructor(e,r)}function Ae(e,t,r){var n,a,i,s;t==document&&(t=document.documentElement),B.__&&B.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Le(t,e=(!n&&r||t).__k=ze(H,null,[e]),a||de,de,t.namespaceURI,!n&&r?[r]:a?null:t.firstChild?fe.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,s),st(i,e,s)}fe=pe.slice,B={__e:function(e,t,r,n){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),s=a.__d),s)return a.__E=a}catch(c){e=c}throw e}},et=0,er=function(e){return e!=null&&e.constructor===void 0},ce.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=O({},this.state),typeof e=="function"&&(e=e(O({},r),this.props)),e&&O(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ze(this))},ce.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ze(this))},ce.prototype.render=H,V=[],tt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,rt=function(e,t){return e.__v.__b-t.__v.__b},ue.__r=0,Re=Math.random().toString(8),se="__d"+Re,oe="__a"+Re,ot=/(PointerCapture)$|Capture$/i,Pe=0,Ee=Qe(!1),Me=Qe(!0),tr=0;var re,F,Ie,dt,ne=0,vt=[],I=B,pt=I.__b,ut=I.__r,ft=I.diffed,mt=I.__c,bt=I.unmount,ht=I.__;function he(e,t){I.__h&&I.__h(F,e,ne||t),ne=0;var r=F.__H||(F.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return ne=1,lr(_t,e)}function lr(e,t,r){var n=he(re++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):_t(void 0,t),function(c){var f=n.__N?n.__N[0]:n.__[0],l=n.t(f,c);f!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=F,!F.__f)){var a=function(c,f,l){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(y){return y.__c});if(b.every(function(y){return!y.__N}))return!i||i.call(this,c,f,l);var d=n.__c.props!==c;return b.some(function(y){if(y.__N){var v=y.__[0];y.__=y.__N,y.__N=void 0,v!==y.__[0]&&(d=!0)}}),i&&i.call(this,c,f,l)||d};F.__f=!0;var i=F.shouldComponentUpdate,s=F.componentWillUpdate;F.componentWillUpdate=function(c,f,l){if(this.__e){var b=i;i=void 0,a(c,f,l),i=b}s&&s.call(this,c,f,l)},F.shouldComponentUpdate=a}return n.__N||n.__}function K(e,t){var r=he(re++,3);!I.__s&&Ke(r.__H,t)&&(r.__=e,r.u=t,F.__H.__h.push(r))}function We(e,t){var r=he(re++,4);!I.__s&&Ke(r.__H,t)&&(r.__=e,r.u=t,F.__h.push(r))}function W(e){return ne=5,Z(function(){return{current:e}},[])}function Z(e,t){var r=he(re++,7);return Ke(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function yt(e,t){return ne=8,Z(function(){return e},t)}function cr(){for(var e;e=vt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(be),t.__h.some($e),t.__h=[]}catch(r){t.__h=[],I.__e(r,e.__v)}}}I.__b=function(e){F=null,pt&&pt(e)},I.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ht&&ht(e,t)},I.__r=function(e){ut&&ut(e),re=0;var t=(F=e.__c).__H;t&&(Ie===F?(t.__h=[],F.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(be),t.__h.some($e),t.__h=[],re=0)),Ie=F},I.diffed=function(e){ft&&ft(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(vt.push(t)!==1&&dt===I.requestAnimationFrame||((dt=I.requestAnimationFrame)||dr)(cr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ie=F=null},I.__c=function(e,t){t.some(function(r){try{r.__h.some(be),r.__h=r.__h.filter(function(n){return!n.__||$e(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],I.__e(n,r.__v)}}),mt&&mt(e,t)},I.unmount=function(e){bt&&bt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{be(n)}catch(a){t=a}}),r.__H=void 0,t&&I.__e(t,r.__v))};var gt=typeof requestAnimationFrame=="function";function dr(e){var t,r=function(){clearTimeout(n),gt&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);gt&&(t=requestAnimationFrame(r))}function be(e){var t=F,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),F=t}function $e(e){var t=F;e.__c=e.__(),F=t}function Ke(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function _t(e,t){return typeof t=="function"?t(e):t}var pr=0;function o(e,t,r,n,a,i){t||(t={});var s,c,f=t;if("ref"in f)for(c in f={},t)c=="ref"?s=t[c]:f[c]=t[c];var l={type:e,props:f,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--pr,__i:-1,__u:0,__source:a,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(c in s)f[c]===void 0&&(f[c]=s[c]);return B.vnode&&B.vnode(l),l}function xt({comment:e,strings:t}){let r=e.is_mine,n=!r&&e.author_source==="mcp",a=!r&&e.author_source==="system",i=n?"mcp":a?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",c=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&c&&o("div",{class:`comment-author comment-author--${i}`,children:c}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:ur(e.created_at)})]})}function ur(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var fr=["image/png","image/jpeg","image/webp"];function wt(e){return fr.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function ae(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),n=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-n)}`}var mr=3e4;function ge({api:e,externalId:t,reportId:r,strings:n,onBack:a,canModerate:i=!0,variant:s="modal"}){var z,P;let[c,f]=R(null),[l,b]=R(null),[d,y]=R(""),[v,w]=R(!1),[h,m]=R(!1),p=W(!0),u=async()=>{try{let C=await e.getReport(r,t);if(!p.current)return;f(C),b(null)}catch(C){if(!p.current)return;b(C instanceof Error?C.message:"load_failed")}};K(()=>{p.current=!0,u();let C=setInterval(()=>{u()},mr);return()=>{p.current=!1,clearInterval(C)}},[r,t]);let _=async()=>{if(!(!d.trim()||v)){w(!0);try{let C=`${r}:${Date.now()}`,L=await e.addComment(r,t,d.trim(),C);if(!p.current)return;y(""),f($=>$&&{...$,comments:br($.comments,L)}),u()}catch(C){if(!p.current)return;b(C instanceof Error?C.message:"comment_failed")}finally{p.current&&w(!1)}}},S=async()=>{if(!h){m(!0);try{let C=await e.closeAsResolved(r,t);if(!p.current)return;f(C)}catch(C){if(!p.current)return;b(C instanceof Error?C.message:"close_failed")}finally{p.current&&m(!1)}}};if(!c&&!l)return o("div",{class:"mine-loading",children:n["mine.loading"]});if(!c)return o("div",{class:"error",role:"alert",children:l});let E=i&&c.status==="awaiting_validation";return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${c.status}`,children:(z=n[`status.${c.status}`])!=null?z:c.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:a,"aria-label":n["board.back"],children:["\u2190 ",n["board.back"]]}),o("span",{class:`pill pill-status pill-status--${c.status}`,children:(P=n[`status.${c.status}`])!=null?P:c.status})]}),o("div",{class:"report-detail-body",children:[o(hr,{detail:c,strings:n}),o("p",{class:"report-detail-description",children:c.description}),c.screenshot_url&&o("a",{class:"report-detail-screenshot",href:c.screenshot_url,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:c.screenshot_url,alt:"",loading:"lazy"})}),o("h3",{class:"report-detail-section",children:n["detail.thread"]}),c.comments.length===0?o("p",{class:"report-detail-empty",children:n["detail.no_replies"]}):o("ul",{class:"report-comments",children:c.comments.map(C=>o("li",{children:o(xt,{comment:C,strings:n})}))}),c.status_history&&c.status_history.length>0&&o(Cr,{rows:c.status_history,strings:n}),c.technical_context&&o(yr,{ctx:c.technical_context,strings:n}),o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:n["detail.compose_placeholder"],onInput:C=>y(C.target.value),disabled:v}),o("div",{class:"report-compose-actions",children:[E&&o("button",{type:"button",class:"btn",onClick:S,disabled:h,children:h?n["detail.close_busy"]:n["detail.close_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:_,disabled:!d.trim()||v,children:v?n["detail.compose_sending"]:n["detail.compose_send"]})]})]}),l&&o("div",{class:"error",children:l})]})]})}function br(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function hr({detail:e,strings:t}){var a;let r=`detail.context.capture.${e.capture_method}`,n=(a=t[r])!=null?a:e.capture_method;return o("div",{class:"report-detail-context",children:[o("div",{class:"report-detail-context-pills",children:[o("span",{class:"pill pill-type",children:t[`type.${e.feedback_type}`]}),o("span",{class:`pill pill-severity pill-severity--${e.severity}`,children:t[`severity.${e.severity}`]}),o("span",{class:"pill pill-capture",children:n})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:kt(e.created_at)})]}),e.page_url&&o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),o("a",{class:"report-detail-context-url",href:e.page_url,target:"_blank",rel:"noopener noreferrer",children:ae(e.page_url,64)})]})]})}function kt(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var gr=20,vr=15;function yr({ctx:e,strings:t}){var l,b,d;let r=(l=e.errors)!=null?l:[],n=((b=e.consoleLogs)!=null?b:[]).slice(-gr),a=((d=e.networkRequests)!=null?d:[]).slice(-vr),i=e.device;if(!(!!i||r.length>0||n.length>0||a.length>0))return null;let c=r.length,f=c>0?`${t["detail.tech.title"]} \xB7 ${c} ${c===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:f}),o("div",{class:"tech-body",children:[i&&o(_r,{device:i,strings:t}),r.length>0&&o(xr,{errors:r,strings:t}),n.length>0&&o(wr,{logs:n,strings:t}),a.length>0&&o(kr,{rows:a,strings:t})]})]})}function _r({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let n=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${n}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(n=>o(H,{children:[o("dt",{children:n.label}),o("dd",{children:n.value})]}))})]})}function xr({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Sr(r.stack)})]}))})]})}function wr({logs:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.console"]}),o("ul",{class:"tech-console",children:e.map(r=>o("li",{class:`tech-console-row tech-console-row--${r.level}`,children:[o("span",{class:"tech-console-level",children:r.level}),o("span",{class:"tech-console-msg",children:r.message})]}))})]})}function kr({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let n=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${n?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:ae(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Sr(e){let t=e.split(`
|
|
3
|
+
`))}e.push(l)}catch(c){}a.apply(console,s)})}return()=>{for(let[n,a]of Object.entries(r))console[n]=a}}function Oe(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(a,i){let s=performance.now(),c=typeof a=="string"?a:a instanceof URL?a.toString():a.url,f=((i==null?void 0:i.method)||(a instanceof Request?a.method:"GET")).toUpperCase();try{let l=await r(a,i);return e.push({url:t(c),method:f,status:l.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),l}catch(l){let b=l instanceof Error?l.message:String(l);throw e.push({url:t(c),method:f,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:N(b)}),l}},()=>{window.fetch=r}}function qe(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,n=r.prototype.open,a=r.prototype.send;return r.prototype.open=function(s,c){return this.__mfb={method:s.toUpperCase(),url:typeof c=="string"?c:c.toString(),start:performance.now()},n.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let c=this.__mfb;if(!c)return;e.push({url:t(c.url),method:c.method,status:this.status,durationMs:Math.round(performance.now()-c.start),ts:Date.now()})}catch(c){}}),a.call(this,s!=null?s:null)},()=>{r.prototype.open=n,r.prototype.send=a}}function Ve(e){if(typeof window=="undefined")return()=>{};let t=n=>{let a=n.error instanceof Error?n.error.stack:void 0,i=a!==void 0?N(a):void 0;e.push({message:N(n.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=n=>{let a=n.reason,i=a instanceof Error?a.message:typeof a=="string"?a:(()=>{try{return JSON.stringify(a)}catch(f){return String(a)}})(),s=a instanceof Error?a.stack:void 0,c=s!==void 0?N(s):void 0;e.push({message:N(i),...c!==void 0&&{stack:c},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function Ge(e=1e3){let t=[],r=[],n=null;if(typeof PerformanceObserver!="undefined")try{n=new PerformanceObserver(a=>{for(let i of a.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:Z(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),n.observe({entryTypes:["longtask","resource"]})}catch(a){}return{snapshot(){let a=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=a?{type:a.type,duration:a.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){n==null||n.disconnect()}}}var ee=class{constructor(t){Ce(this,"max",t);Ce(this,"items",[])}push(t){for(this.items.push(t);this.items.length>this.max;)this.items.shift()}snapshot(){return this.items.slice()}clear(){this.items.length=0}};function Xe(e={}){var v;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:n=20}=e,a=(v=e.sanitizeUrl)!=null?v:Z,i=new ee(t),s=new ee(r),c=new ee(n),f=je(i),l=Oe(s,a),b=qe(s,a),d=Ve(c),y=Ge();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:c.snapshot(),device:Ue(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),c.clear()},dispose(){f(),l(),b(),d(),y.dispose()}}}var Jt={"fab.label":"Send feedback","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.context.label":"Page","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports. Try again.","board.list.you":"you","board.list.count":"{n} of {total}","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},Qt={"fab.label":"Envoyer un commentaire","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.context.label":"Page","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports. R\xE9essayez.","board.list.you":"vous","board.list.count":"{n} sur {total}","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},er={fr:Qt};function tr(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=er[t])!=null?r:null}function Ze(e,t={}){var n;let r=(n=tr(t.locale))!=null?n:{};return{...Jt,...r,...e}}var me,z,tt,rr,G,Ye,rt,ot,Re,le,ae,nt,Pe,Ee,Me,or,pe={},ue=[],nr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,be=Array.isArray;function O(e,t){for(var r in t)e[r]=t[r];return e}function ze(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Be(e,t,r){var n,a,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ce(e,s,n,a,null)}function ce(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a==null?++tt:a,__i:-1,__u:0};return a==null&&z.vnode!=null&&z.vnode(i),i}function H(e){return e.children}function de(e,t){this.props=e,this.context=t}function te(e,t){if(t==null)return e.__?te(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?te(e):null}function ar(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],a=[],i=O({},t);i.__v=t.__v+1,z.vnode&&z.vnode(i),Le(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,n,r==null?te(t):r,!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,lt(n,i,a),t.__e=t.__=null,i.__e!=r&&at(i)}}function at(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),at(e)}function Je(e){(!e.__d&&(e.__d=!0)&&G.push(e)&&!fe.__r++||Ye!=z.debounceRendering)&&((Ye=z.debounceRendering)||rt)(fe)}function fe(){try{for(var e,t=1;G.length;)G.length>t&&G.sort(ot),e=G.shift(),t=G.length,ar(e)}finally{G.length=fe.__r=0}}function it(e,t,r,n,a,i,s,c,f,l,b){var d,y,v,w,h,m,p,u=n&&n.__k||ue,_=t.length;for(f=ir(r,t,u,f,_),d=0;d<_;d++)(v=r.__k[d])!=null&&(y=v.__i!=-1&&u[v.__i]||pe,v.__i=d,m=Le(e,v,y,a,i,s,c,f,l,b),w=v.__e,v.ref&&y.ref!=v.ref&&(y.ref&&Fe(y.ref,null,v),b.push(v.ref,v.__c||w,v)),h==null&&w!=null&&(h=w),(p=!!(4&v.__u))||y.__k===v.__k?(f=st(v,f,e,p),p&&y.__e&&(y.__e=null)):typeof v.type=="function"&&m!==void 0?f=m:w&&(f=w.nextSibling),v.__u&=-7);return r.__e=h,f}function ir(e,t,r,n,a){var i,s,c,f,l,b=r.length,d=b,y=0;for(e.__k=new Array(a),i=0;i<a;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=ce(null,s,null,null,null):be(s)?s=e.__k[i]=ce(H,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=ce(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,f=i+y,s.__=e,s.__b=e.__b+1,c=null,(l=s.__i=sr(s,r,f,d))!=-1&&(d--,(c=r[l])&&(c.__u|=2)),c==null||c.__v==null?(l==-1&&(a>b?y--:a<b&&y++),typeof s.type!="function"&&(s.__u|=4)):l!=f&&(l==f-1?y--:l==f+1?y++:(l>f?y--:y++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<b;i++)(c=r[i])!=null&&(2&c.__u)==0&&(c.__e==n&&(n=te(c)),dt(c,c));return n}function st(e,t,r,n){var a,i;if(typeof e.type=="function"){for(a=e.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=e,t=st(a[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=te(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function sr(e,t,r,n){var a,i,s,c=e.key,f=e.type,l=t[r],b=l!=null&&(2&l.__u)==0;if(l===null&&c==null||b&&c==l.key&&f==l.type)return r;if(n>(b?1:0)){for(a=r-1,i=r+1;a>=0||i<t.length;)if((l=t[s=a>=0?a--:i++])!=null&&(2&l.__u)==0&&c==l.key&&f==l.type)return s}return-1}function Qe(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||nr.test(t)?r:r+"px"}function se(e,t,r,n,a){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Qe(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Qe(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(nt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[ae]=n[ae]:(r[ae]=Pe,e.addEventListener(t,i?Me:Ee,i)):e.removeEventListener(t,i?Me:Ee,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(c){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function et(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[le]==null)t[le]=Pe++;else if(t[le]<r[ae])return;return r(z.event?z.event(t):t)}}}function Le(e,t,r,n,a,i,s,c,f,l){var b,d,y,v,w,h,m,p,u,_,S,E,B,P,C,L=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),i=[c=t.__e=r.__e]),(b=z.__b)&&b(t);e:if(typeof L=="function")try{if(p=t.props,u=L.prototype&&L.prototype.render,_=(b=L.contextType)&&n[b.__c],S=b?_?_.props.value:b.__:n,r.__c?m=(d=t.__c=r.__c).__=d.__E:(u?t.__c=d=new L(p,S):(t.__c=d=new de(p,S),d.constructor=L,d.render=cr),_&&_.sub(d),d.state||(d.state={}),d.__n=n,y=d.__d=!0,d.__h=[],d._sb=[]),u&&d.__s==null&&(d.__s=d.state),u&&L.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=O({},d.__s)),O(d.__s,L.getDerivedStateFromProps(p,d.__s))),v=d.props,w=d.state,d.__v=t,y)u&&L.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),u&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(u&&L.getDerivedStateFromProps==null&&p!==v&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(p,S),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(p,d.__s,S)===!1){t.__v!=r.__v&&(d.props=p,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function($){$&&($.__=t)}),ue.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(p,d.__s,S),u&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(v,w,h)})}if(d.context=S,d.props=p,d.__P=e,d.__e=!1,E=z.__r,B=0,u)d.state=d.__s,d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),ue.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,E&&E(t),b=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++B<25);d.state=d.__s,d.getChildContext!=null&&(n=O(O({},n),d.getChildContext())),u&&!y&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(v,w)),P=b!=null&&b.type===H&&b.key==null?ct(b.props.children):b,c=it(e,be(P)?P:[P],t,r,n,a,i,s,c,f,l),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),m&&(d.__E=d.__=null)}catch($){if(t.__v=null,f||i!=null)if($.then){for(t.__u|=f?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;i[i.indexOf(c)]=null,t.__e=c}else{for(C=i.length;C--;)ze(i[C]);Te(t)}else t.__e=r.__e,t.__k=r.__k,$.then||Te(t);z.__e($,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):c=t.__e=lr(r.__e,t,r,n,a,i,s,f,l);return(b=z.diffed)&&b(t),128&t.__u?void 0:c}function Te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Te))}function lt(e,t,r){for(var n=0;n<r.length;n++)Fe(r[n],r[++n],r[++n]);z.__c&&z.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){z.__e(i,a.__v)}})}function ct(e){return typeof e!="object"||e==null||e.__b>0?e:be(e)?e.map(ct):O({},e)}function lr(e,t,r,n,a,i,s,c,f){var l,b,d,y,v,w,h,m=r.props||pe,p=t.props,u=t.type;if(u=="svg"?a="http://www.w3.org/2000/svg":u=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(l=0;l<i.length;l++)if((v=i[l])&&"setAttribute"in v==!!u&&(u?v.localName==u:v.nodeType==3)){e=v,i[l]=null;break}}if(e==null){if(u==null)return document.createTextNode(p);e=document.createElementNS(a,u,p.is&&p),c&&(z.__m&&z.__m(t,i),c=!1),i=null}if(u==null)m===p||c&&e.data==p||(e.data=p);else{if(i=i&&me.call(e.childNodes),!c&&i!=null)for(m={},l=0;l<e.attributes.length;l++)m[(v=e.attributes[l]).name]=v.value;for(l in m)v=m[l],l=="dangerouslySetInnerHTML"?d=v:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||se(e,l,null,v,a);for(l in p)v=p[l],l=="children"?y=v:l=="dangerouslySetInnerHTML"?b=v:l=="value"?w=v:l=="checked"?h=v:c&&typeof v!="function"||m[l]===v||se(e,l,v,m[l],a);if(b)c||d&&(b.__html==d.__html||b.__html==e.innerHTML)||(e.innerHTML=b.__html),t.__k=[];else if(d&&(e.innerHTML=""),it(t.type=="template"?e.content:e,be(y)?y:[y],t,r,n,u=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:r.__k&&te(r,0),c,f),i!=null)for(l=i.length;l--;)ze(i[l]);c||(l="value",u=="progress"&&w==null?e.removeAttribute("value"):w!=null&&(w!==e[l]||u=="progress"&&!w||u=="option"&&w!=m[l])&&se(e,l,w,m[l],a),l="checked",h!=null&&h!=e[l]&&se(e,l,h,m[l],a))}return e}function Fe(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(a){z.__e(a,r)}}function dt(e,t,r){var n,a;if(z.unmount&&z.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Fe(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){z.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&dt(n[a],t,r||typeof e.type!="function");r||ze(e.__e),e.__c=e.__=e.__e=void 0}function cr(e,t,r){return this.constructor(e,r)}function Ae(e,t,r){var n,a,i,s;t==document&&(t=document.documentElement),z.__&&z.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Le(t,e=(!n&&r||t).__k=Be(H,null,[e]),a||pe,pe,t.namespaceURI,!n&&r?[r]:a?null:t.firstChild?me.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,s),lt(i,e,s)}me=ue.slice,z={__e:function(e,t,r,n){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),s=a.__d),s)return a.__E=a}catch(c){e=c}throw e}},tt=0,rr=function(e){return e!=null&&e.constructor===void 0},de.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=O({},this.state),typeof e=="function"&&(e=e(O({},r),this.props)),e&&O(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Je(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Je(this))},de.prototype.render=H,G=[],rt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ot=function(e,t){return e.__v.__b-t.__v.__b},fe.__r=0,Re=Math.random().toString(8),le="__d"+Re,ae="__a"+Re,nt=/(PointerCapture)$|Capture$/i,Pe=0,Ee=et(!1),Me=et(!0),or=0;var re,F,Ie,pt,ie=0,yt=[],I=z,ut=I.__b,ft=I.__r,mt=I.diffed,bt=I.__c,ht=I.unmount,gt=I.__;function ge(e,t){I.__h&&I.__h(F,e,ie||t),ie=0;var r=F.__H||(F.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return ie=1,dr(xt,e)}function dr(e,t,r){var n=ge(re++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xt(void 0,t),function(c){var f=n.__N?n.__N[0]:n.__[0],l=n.t(f,c);f!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=F,!F.__f)){var a=function(c,f,l){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(y){return y.__c});if(b.every(function(y){return!y.__N}))return!i||i.call(this,c,f,l);var d=n.__c.props!==c;return b.some(function(y){if(y.__N){var v=y.__[0];y.__=y.__N,y.__N=void 0,v!==y.__[0]&&(d=!0)}}),i&&i.call(this,c,f,l)||d};F.__f=!0;var i=F.shouldComponentUpdate,s=F.componentWillUpdate;F.componentWillUpdate=function(c,f,l){if(this.__e){var b=i;i=void 0,a(c,f,l),i=b}s&&s.call(this,c,f,l)},F.shouldComponentUpdate=a}return n.__N||n.__}function K(e,t){var r=ge(re++,3);!I.__s&&Ke(r.__H,t)&&(r.__=e,r.u=t,F.__H.__h.push(r))}function We(e,t){var r=ge(re++,4);!I.__s&&Ke(r.__H,t)&&(r.__=e,r.u=t,F.__h.push(r))}function W(e){return ie=5,Y(function(){return{current:e}},[])}function Y(e,t){var r=ge(re++,7);return Ke(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function _t(e,t){return ie=8,Y(function(){return e},t)}function pr(){for(var e;e=yt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(he),t.__h.some($e),t.__h=[]}catch(r){t.__h=[],I.__e(r,e.__v)}}}I.__b=function(e){F=null,ut&&ut(e)},I.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),gt&>(e,t)},I.__r=function(e){ft&&ft(e),re=0;var t=(F=e.__c).__H;t&&(Ie===F?(t.__h=[],F.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(he),t.__h.some($e),t.__h=[],re=0)),Ie=F},I.diffed=function(e){mt&&mt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(yt.push(t)!==1&&pt===I.requestAnimationFrame||((pt=I.requestAnimationFrame)||ur)(pr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ie=F=null},I.__c=function(e,t){t.some(function(r){try{r.__h.some(he),r.__h=r.__h.filter(function(n){return!n.__||$e(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],I.__e(n,r.__v)}}),bt&&bt(e,t)},I.unmount=function(e){ht&&ht(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{he(n)}catch(a){t=a}}),r.__H=void 0,t&&I.__e(t,r.__v))};var vt=typeof requestAnimationFrame=="function";function ur(e){var t,r=function(){clearTimeout(n),vt&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);vt&&(t=requestAnimationFrame(r))}function he(e){var t=F,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),F=t}function $e(e){var t=F;e.__c=e.__(),F=t}function Ke(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function xt(e,t){return typeof t=="function"?t(e):t}var fr=0;function o(e,t,r,n,a,i){t||(t={});var s,c,f=t;if("ref"in f)for(c in f={},t)c=="ref"?s=t[c]:f[c]=t[c];var l={type:e,props:f,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--fr,__i:-1,__u:0,__source:a,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(c in s)f[c]===void 0&&(f[c]=s[c]);return z.vnode&&z.vnode(l),l}function wt({comment:e,strings:t}){let r=e.is_mine,n=!r&&e.author_source==="mcp",a=!r&&e.author_source==="system",i=n?"mcp":a?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",c=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&c&&o("div",{class:`comment-author comment-author--${i}`,children:c}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:mr(e.created_at)})]})}function mr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var br=["image/png","image/jpeg","image/webp"];function kt(e){return br.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function oe(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),n=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-n)}`}function De(e){if(!e)return;let t;try{t=new URL(e)}catch(r){return}if(t.protocol==="https:"||t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]"))return t.toString()}var hr=3e4;function ve({api:e,externalId:t,reportId:r,strings:n,onBack:a,canModerate:i=!0,variant:s="modal"}){var B,P;let[c,f]=R(null),[l,b]=R(null),[d,y]=R(""),[v,w]=R(!1),[h,m]=R(!1),p=W(!0),u=async()=>{try{let C=await e.getReport(r,t);if(!p.current)return;f(C),b(null)}catch(C){if(!p.current)return;b(C instanceof Error?C.message:"load_failed")}};K(()=>{p.current=!0,u();let C=setInterval(()=>{u()},hr);return()=>{p.current=!1,clearInterval(C)}},[r,t]);let _=async()=>{if(!(!d.trim()||v)){w(!0);try{let C=`${r}:${Date.now()}`,L=await e.addComment(r,t,d.trim(),C);if(!p.current)return;y(""),f($=>$&&{...$,comments:gr($.comments,L)}),u()}catch(C){if(!p.current)return;b(C instanceof Error?C.message:"comment_failed")}finally{p.current&&w(!1)}}},S=async()=>{if(!h){m(!0);try{let C=await e.closeAsResolved(r,t);if(!p.current)return;f(C)}catch(C){if(!p.current)return;b(C instanceof Error?C.message:"close_failed")}finally{p.current&&m(!1)}}};if(!c&&!l)return o("div",{class:"mine-loading",children:n["mine.loading"]});if(!c)return o("div",{class:"error",role:"alert",children:l});let E=i&&c.status==="awaiting_validation";return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${c.status}`,children:(B=n[`status.${c.status}`])!=null?B:c.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:a,"aria-label":n["board.back"],children:["\u2190 ",n["board.back"]]}),o("span",{class:`pill pill-status pill-status--${c.status}`,children:(P=n[`status.${c.status}`])!=null?P:c.status})]}),o("div",{class:"report-detail-body",children:[o(vr,{detail:c,strings:n}),o("p",{class:"report-detail-description",children:c.description}),c.screenshot_url&&(()=>{let C=De(c.screenshot_url);return C?o("a",{class:"report-detail-screenshot",href:C,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:c.screenshot_url,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:c.screenshot_url,alt:"",loading:"lazy"})})})(),o("h3",{class:"report-detail-section",children:n["detail.thread"]}),c.comments.length===0?o("p",{class:"report-detail-empty",children:n["detail.no_replies"]}):o("ul",{class:"report-comments",children:c.comments.map(C=>o("li",{children:o(wt,{comment:C,strings:n})}))}),c.status_history&&c.status_history.length>0&&o(Er,{rows:c.status_history,strings:n}),c.technical_context&&o(xr,{ctx:c.technical_context,strings:n}),o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:n["detail.compose_placeholder"],onInput:C=>y(C.target.value),disabled:v}),o("div",{class:"report-compose-actions",children:[E&&o("button",{type:"button",class:"btn",onClick:S,disabled:h,children:h?n["detail.close_busy"]:n["detail.close_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:_,disabled:!d.trim()||v,children:v?n["detail.compose_sending"]:n["detail.compose_send"]})]})]}),l&&o("div",{class:"error",children:l})]})]})}function gr(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function vr({detail:e,strings:t}){var a;let r=`detail.context.capture.${e.capture_method}`,n=(a=t[r])!=null?a:e.capture_method;return o("div",{class:"report-detail-context",children:[o("div",{class:"report-detail-context-pills",children:[o("span",{class:"pill pill-type",children:t[`type.${e.feedback_type}`]}),o("span",{class:`pill pill-severity pill-severity--${e.severity}`,children:t[`severity.${e.severity}`]}),o("span",{class:"pill pill-capture",children:n})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:St(e.created_at)})]}),e.page_url&&(()=>{let i=De(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:oe(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:oe(e.page_url,64)})]})})()]})}function St(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var yr=20,_r=15;function xr({ctx:e,strings:t}){var l,b,d;let r=(l=e.errors)!=null?l:[],n=((b=e.consoleLogs)!=null?b:[]).slice(-yr),a=((d=e.networkRequests)!=null?d:[]).slice(-_r),i=e.device;if(!(!!i||r.length>0||n.length>0||a.length>0))return null;let c=r.length,f=c>0?`${t["detail.tech.title"]} \xB7 ${c} ${c===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:f}),o("div",{class:"tech-body",children:[i&&o(wr,{device:i,strings:t}),r.length>0&&o(kr,{errors:r,strings:t}),n.length>0&&o(Sr,{logs:n,strings:t}),a.length>0&&o(Cr,{rows:a,strings:t})]})]})}function wr({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let n=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${n}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(n=>o(H,{children:[o("dt",{children:n.label}),o("dd",{children:n.value})]}))})]})}function kr({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Rr(r.stack)})]}))})]})}function Sr({logs:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.console"]}),o("ul",{class:"tech-console",children:e.map(r=>o("li",{class:`tech-console-row tech-console-row--${r.level}`,children:[o("span",{class:"tech-console-level",children:r.level}),o("span",{class:"tech-console-msg",children:r.message})]}))})]})}function Cr({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let n=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${n?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:oe(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Rr(e){let t=e.split(`
|
|
4
4
|
`);return t.length<=12?e:t.slice(0,12).join(`
|
|
5
5
|
`)+`
|
|
6
|
-
\u2026`}function Cr({rows:e,strings:t}){return o("div",{class:"report-detail-history",children:[o("h3",{class:"report-detail-section",children:t["detail.history"]}),o("ol",{class:"status-history",children:e.map(r=>{var s,c;let n=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,a=(c=t[`status.${r.to_status}`])!=null?c:r.to_status,i=r.changed_by_source==="mcp"?"detail.author.mcp":r.changed_by_source==="system"?"detail.author.system":"detail.author.staff";return o("li",{class:"status-history-row",children:[o("span",{class:"status-history-time",children:kt(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:n}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:a})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Rr=3e4,Er=["new","in_progress","awaiting_validation","closed","rejected"],Mr=["bug","feature","question","praise","typo"],Tr=["blocker","high","medium","low"];function St({api:e,externalId:t,strings:r}){let[n,a]=R({}),[i,s]=R(null),[c,f]=R(null),[l,b]=R(!0),[d,y]=R(null),[v,w]=R(null),[h,m]=R(0),p=Z(()=>{var S,E,z,P,C,L;return((E=(S=n.status)==null?void 0:S.length)!=null?E:0)+((P=(z=n.type)==null?void 0:z.length)!=null?P:0)+((L=(C=n.severity)==null?void 0:C.length)!=null?L:0)+(n.q?1:0)+(n.mine?1:0)},[n]);K(()=>{let S=!1,E=null,z=async()=>{try{let[P,C]=await Promise.all([e.listBoard(t,n),e.fetchBoardKpis(t,n)]);if(S)return;s(P),f(C),y(null)}catch(P){if(S)return;y(P instanceof Error?P.message:String(P))}finally{S||b(!1),S||(E=setTimeout(z,Rr))}};return b(!0),z(),()=>{S=!0,E&&clearTimeout(E)}},[e,t,Hr(n)]);let u=Z(()=>{var S;return!v||!i?null:(S=i.results.find(E=>E.id===v))!=null?S:null},[v,i]),_=S=>{w(S.id),m(E=>E+1)};return o("div",{class:"board-view",children:[o(Pr,{strings:r,kpis:c}),o(zr,{filters:n,onChange:a,activeCount:p,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":l&&!i,children:[d&&o("div",{class:"board-error",children:r["board.list.error"]}),!d&&l&&!i&&o(Ir,{}),!d&&i&&i.results.length===0&&!l&&o(Ar,{strings:r}),!d&&i&&i.results.length>0&&o(Lr,{rows:i.results,selectedId:v,onPick:_,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${u?"has-selection":""}`,children:u?o(ge,{api:e,externalId:t,reportId:u.id,strings:r,onBack:()=>w(null),canModerate:u.is_mine,variant:"board"},h):o("div",{class:"board-detail-empty",children:[o(Dr,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Pr({strings:e,kpis:t}){let r=(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${r}`:r})]})]}),o(Br,{kpis:t,strings:e})]})}function Br({kpis:e,strings:t}){var n,a,i,s,c,f;let r=[{key:"new",label:t["board.kpi.new"],value:String((a=(n=e==null?void 0:e.by_status)==null?void 0:n.new)!=null?a:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((f=(c=e==null?void 0:e.by_status)==null?void 0:c.awaiting_validation)!=null?f:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(l=>o("div",{class:`board-kpi-card ${l.tone}`,children:[o("div",{class:"board-kpi-value",children:l.value}),o("div",{class:"board-kpi-label",children:l.label})]},l.key))})}function zr({filters:e,onChange:t,activeCount:r,strings:n}){var b,d,y,v,w,h,m;let a=p=>{if(p===""){let{status:u,..._}=e;t(_)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:u,..._}=e;t(_)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:u,..._}=e;t(_)}else t({...e,severity:[p]})},c=p=>t({...e,q:p}),f=()=>{if(e.mine){let{mine:p,...u}=e;t(u)}else t({...e,mine:!0})},l=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":n["board.filter.status"],value:(d=(b=e.status)==null?void 0:b[0])!=null?d:"",onChange:p=>a(p.target.value),children:[o("option",{value:"",children:n["board.filter.status"]}),Er.map(p=>{var u;return o("option",{value:p,children:(u=n[`board.kpi.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.type"],value:(v=(y=e.type)==null?void 0:y[0])!=null?v:"",onChange:p=>i(p.target.value),children:[o("option",{value:"",children:n["board.filter.type"]}),Mr.map(p=>{var u;return o("option",{value:p,children:(u=n[`type.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.severity"],value:(h=(w=e.severity)==null?void 0:w[0])!=null?h:"",onChange:p=>s(p.target.value),children:[o("option",{value:"",children:n["board.filter.severity"]}),Tr.map(p=>{var u;return o("option",{value:p,children:(u=n[`severity.${p}`])!=null?u:p},p)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:n["board.filter.search.placeholder"],value:(m=e.q)!=null?m:"",onInput:p=>c(p.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:f}),o("span",{children:n["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:l,children:[o(Wr,{}),n["board.filter.clear"]]})]})}function Lr({rows:e,selectedId:t,onPick:r,strings:n,total:a}){return o(H,{children:[o("div",{class:"board-list-count",children:n["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(a))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Fr,{row:i,selected:i.id===t,onPick:r,strings:n},i.id))})]})}function Fr({row:e,selected:t,onPick:r,strings:n}){var i,s;let a=e.is_mine?n["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=n[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=n[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:a}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o($r,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Nr(e.created_at)})]})]})})}function Ar({strings:e}){return o("div",{class:"board-empty",children:[o(Kr,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function Ir(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function $r(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Wr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Kr(){return o("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("circle",{cx:"32",cy:"32",r:"28",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2"}),o("path",{d:"M22 32h20M32 22v20",stroke:"currentColor","stroke-opacity":"0.35","stroke-width":"2","stroke-linecap":"round"})]})}function Dr(){return o("svg",{width:"80",height:"80",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("rect",{x:"10",y:"12",width:"44",height:"36",rx:"4",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2"}),o("line",{x1:"18",y1:"22",x2:"46",y2:"22",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"30",x2:"38",y2:"30",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"38",x2:"32",y2:"38",stroke:"currentColor","stroke-opacity":"0.14","stroke-width":"2","stroke-linecap":"round"})]})}function Hr(e){var t,r,n,a;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(n=e.severity)==null?void 0:n.slice().sort(),q:(a=e.q)!=null?a:"",m:!!e.mine})}function Nr(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),n=Math.floor(r/6e4);if(n<1)return"just now";if(n<60)return`${n}m`;let a=Math.floor(n/60);if(a<24)return`${a}h`;let i=Math.floor(a/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}function Ur(e){return`pill pill-status pill-status--${e}`}function jr(e){return`pill pill-severity pill-severity--${e}`}function Or(){return"pill pill-type"}function qr(e){let t=Date.parse(e);if(!Number.isFinite(t))return"";let r=Math.max(1,Math.round((Date.now()-t)/1e3));if(r<60)return`${r}s`;let n=Math.round(r/60);if(n<60)return`${n}m`;let a=Math.round(n/60);return a<48?`${a}h`:`${Math.round(a/24)}d`}function Vr(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function ve({row:e,strings:t,onClick:r}){var a;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Ur(e.status),children:(a=t[`status.${e.status}`])!=null?a:e.status}),o("span",{class:Or(),children:t[`type.${e.feedback_type}`]}),o("span",{class:jr(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:qr(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Vr(e.comment_count,t)]})]})]})}var Gr=3e4;function Xr(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(t.getUTCDay()+6)%7;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)).toISOString().slice(0,10)}function Yr(e){let t=new Map;for(let r of e){let n=Xr(r.resolved_at);if(!n)continue;let a=t.get(n);a?a.push(r):t.set(n,[r])}return Array.from(t.entries()).sort(([r],[n])=>r<n?1:-1).map(([r,n])=>({weekKey:r,label:Zr(r),rows:n}))}function Zr(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Ct({api:e,externalId:t,strings:r,onSelect:n}){let[a,i]=R(null),[s,c]=R(null),[f,l]=R(!1),b=W(!0),d=async()=>{l(!0),c(null);try{let h=await e.listChangelog(t);if(!b.current)return;i(h)}catch(h){if(!b.current)return;c(h instanceof Error?h.message:r["mine.error"])}finally{b.current&&l(!1)}};K(()=>{b.current=!0,d();let h=setInterval(()=>{d()},Gr);return()=>{b.current=!1,clearInterval(h)}},[t]);let y=Z(()=>a?Yr(a):[],[a]),v=a===null&&!s,w=a!==null&&a.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{d()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),v&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),w&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),y.length>0&&o("div",{class:"changelog-groups",children:y.map(h=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",h.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[h.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(h.rows.length))})]}),o("ul",{class:"mine-rows",children:h.rows.map(m=>o("li",{children:o(ve,{row:m,strings:r,onClick:()=>n(m)})}))})]},h.weekKey))})]})}function Jr(){return o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:o("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",fill:"currentColor"})})}function Rt({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(Jr,{})})}var Et=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],Qr=.35;function Mt(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")eo(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let n=1;n<t.points.length;n++)e.lineTo(t.points[n].x,t.points[n].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let n=e.measureText(t.text),a=4,i=n.width+a*2,s=t.fontSize+a*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-a,t.y-a,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=Qr,e.fillRect(ye(t.x,t.w),ye(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&to(e,t,r);e.restore()}function ye(e,t){return t<0?e+t:e}function eo(e,t,r,n,a){let s=Math.atan2(a-r,n-t);e.beginPath(),e.moveTo(t,r),e.lineTo(n,a),e.stroke(),e.beginPath(),e.moveTo(n,a),e.lineTo(n-14*Math.cos(s-Math.PI/6),a-14*Math.sin(s-Math.PI/6)),e.lineTo(n-14*Math.cos(s+Math.PI/6),a-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function to(e,t,r){if(!r)return;let n=ye(t.x,t.w),a=ye(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let c=Math.max(4,t.tile);for(let f=a;f<a+s;f+=c)for(let l=n;l<n+i;l+=c){let b=Math.min(c,n+i-l),d=Math.min(c,a+s-f);e.drawImage(r,l,f,b,d,l,f,b,d)}e.imageSmoothingEnabled=!1;for(let f=a;f<a+s;f+=c)for(let l=n;l<n+i;l+=c){let b=Math.min(c,n+i-l),d=Math.min(c,a+s-f);e.drawImage(r,l,f,1,1,l,f,b,d)}e.imageSmoothingEnabled=!0}var j={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Tt({imageBlob:e,strings:t,onSave:r,onCancel:n}){let a=W(null),i=W(null),s=W(null),[c,f]=R("rectangle"),[l,b]=R(Et[0]),[d,y]=R([]),[v,w]=R([]),[h,m]=R([]),p=W(!1),[u,_]=R(null),[S,E]=R(!1),[z,P]=R(!1),C=W(1);function L(g){y(x=>(w(M=>[...M,x]),[...x,g])),m([])}function $(){y(g=>(w(x=>[...x,g]),[])),m([])}function G(){w(g=>{if(g.length===0)return g;let x=g[g.length-1];return y(M=>(m(T=>[M,...T]),x)),g.slice(0,-1)})}function q(){m(g=>{if(g.length===0)return g;let x=g[0];return y(M=>(w(T=>[...T,M]),x)),g.slice(1)})}We(()=>{let g=x=>{x.key==="Escape"&&(x.stopPropagation(),n())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[n]),K(()=>{let g=x=>{if(!(x.metaKey||x.ctrlKey))return;let T=x.key.toLowerCase();T==="z"?(x.preventDefault(),x.stopPropagation(),x.shiftKey?q():G()):T==="y"&&(x.preventDefault(),x.stopPropagation(),q())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[v,h,d]),K(()=>{let g=URL.createObjectURL(e),x=new Image;return x.onload=()=>{s.current=x,E(!0)},x.src=g,()=>URL.revokeObjectURL(g)},[e]),We(()=>{if(!S||!a.current||!s.current||!i.current)return;let g=s.current,M=i.current.clientWidth-16,T=window.innerHeight*.65,U=Math.min(M/g.width,T/g.height,1);C.current=U;let Q=a.current;Q.width=g.width,Q.height=g.height,Q.style.width=`${g.width*U}px`,Q.style.height=`${g.height*U}px`,D()},[S]),K(()=>{D()},[d,u]);function D(){let g=a.current,x=s.current;if(!g||!x)return;let M=g.getContext("2d");if(M){M.clearRect(0,0,g.width,g.height),M.drawImage(x,0,0);for(let T of d)Mt(M,T,x);u&&Mt(M,u,x)}}function X(g){let M=a.current.getBoundingClientRect();return{x:(g.clientX-M.left)/C.current,y:(g.clientY-M.top)/C.current}}let xe=g=>{if(!S)return;let{x,y:M}=X(g),T=a.current.width,U=Math.max(3,Math.round(T/400)),Q=Math.max(8,Math.round(T/80));if(c==="text"){let Se=window.prompt(t["annotator.text_prompt"]);Se&&Se.trim()&&L({kind:"text",x,y:M,text:Se.trim(),color:l,fontSize:Math.max(16,Math.round(T/50)),lineWidth:1});return}p.current=!0,c==="rectangle"?_({kind:"rectangle",x,y:M,w:0,h:0,color:l,lineWidth:U}):c==="arrow"?_({kind:"arrow",x1:x,y1:M,x2:x,y2:M,color:l,lineWidth:U}):c==="freehand"?_({kind:"freehand",points:[{x,y:M}],color:l,lineWidth:U}):c==="highlight"?_({kind:"highlight",x,y:M,w:0,h:0,color:l==="#ffffff"?"#fde047":l,lineWidth:1}):c==="blur"&&_({kind:"blur",x,y:M,w:0,h:0,color:"#000000",lineWidth:0,tile:Q})},we=g=>{if(!p.current)return;let{x,y:M}=X(g);_(T=>T&&(T.kind==="rectangle"||T.kind==="highlight"||T.kind==="blur"?{...T,w:x-T.x,h:M-T.y}:T.kind==="arrow"?{...T,x2:x,y2:M}:T.kind==="freehand"?{...T,points:[...T.points,{x,y:M}]}:T))},ke=()=>{_(g=>(p.current&&g&&((g.kind==="rectangle"||g.kind==="highlight"||g.kind==="blur")&&Math.abs(g.w)<4&&Math.abs(g.h)<4||g.kind==="arrow"&&Math.hypot(g.x2-g.x1,g.y2-g.y1)<4||g.kind==="freehand"&&g.points.length<3||L(g)),null)),p.current=!1},k=async()=>{let g=a.current;if(g){P(!0);try{let x=await new Promise(M=>g.toBlob(M,"image/png",.92));x&&r(x)}finally{P(!1)}}},A=[{id:"rectangle",icon:j.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:j.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:j.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:j.text,label:t["annotator.tool.text"]},{id:"highlight",icon:j.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:j.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:g=>{g.target===g.currentTarget&&n()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:n,children:j.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:A.map(g=>o("button",{type:"button",onClick:()=>f(g.id),title:g.label,"aria-label":g.label,"aria-pressed":c===g.id,class:`annotator-tool ${c===g.id?"is-active":""}`,children:g.icon},g.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Et.map(g=>o("button",{type:"button",onClick:()=>b(g),"aria-label":g,"aria-pressed":l===g,class:`annotator-color ${l===g?"is-active":""}`,style:{backgroundColor:g}},g)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:l,onInput:g=>b(g.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:G,disabled:v.length===0,title:t["annotator.undo"],children:[j.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:q,disabled:h.length===0,title:t["annotator.redo"],children:[j.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:$,disabled:d.length===0,children:[j.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[d.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:S?o("canvas",{ref:a,onMouseDown:xe,onMouseMove:we,onMouseUp:ke,onMouseLeave:ke,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:n,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:k,disabled:z||!S,children:z?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var ro=["bug","feature","question","praise","typo"],oo=["blocker","high","medium","low"];function Pt({strings:e,onSubmit:t,onCancel:r,status:n,errorMessage:a}){let[i,s]=R(""),[c,f]=R("bug"),[l,b]=R("medium"),[d,y]=R(""),[v,w]=R(null),[h,m]=R(null),[p,u]=R(!1),[_,S]=R(!1),E=W(null),z=W(null),P=n==="submitting",C=P?e["form.submitting"]:e["form.submit"],L=typeof window!="undefined"?window.location.href:"";K(()=>()=>{h&&URL.revokeObjectURL(h)},[h]);let $=k=>{if(y(""),k instanceof File){let A=wt(k);if(A){y(A.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(A.maxMb)));return}}h&&URL.revokeObjectURL(h),w(k),m(URL.createObjectURL(k))},G=()=>{h&&URL.revokeObjectURL(h),m(null),w(null),y(""),E.current&&(E.current.value="")},q=k=>{var g;let A=(g=k.target.files)==null?void 0:g[0];A&&$(A)},D=k=>{k.preventDefault(),k.stopPropagation(),u(!0)},X=k=>{k.preventDefault(),k.stopPropagation(),k.currentTarget===k.target&&u(!1)},xe=k=>{var g,x;k.preventDefault(),k.stopPropagation(),u(!1);let A=(x=(g=k.dataTransfer)==null?void 0:g.files)==null?void 0:x[0];A&&$(A)};K(()=>{let k=z.current;if(!k)return;let A=g=>{var M;let x=(M=g.clipboardData)==null?void 0:M.items;if(x){for(let T of Array.from(x))if(T.kind==="file"&&T.type.startsWith("image/")){let U=T.getAsFile();if(U){g.preventDefault(),$(U);return}}}};return k.addEventListener("paste",A),()=>k.removeEventListener("paste",A)},[h]);let we=k=>{h&&URL.revokeObjectURL(h),w(k),m(URL.createObjectURL(k)),S(!1)};return o("form",{onSubmit:k=>{if(k.preventDefault(),!i.trim()){y(e["form.description.required"]);return}y("");let A={description:i.trim(),feedback_type:c,severity:l};v&&(A.screenshot=v,A.capture_method="manual"),t(A)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:i,placeholder:e["form.description.placeholder"],onInput:k=>s(k.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:c,onChange:k=>f(k.target.value),children:ro.map(k=>o("option",{value:k,children:e[`type.${k}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:l,onChange:k=>b(k.target.value),children:oo.map(k=>o("option",{value:k,children:e[`severity.${k}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:E,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:q,"aria-hidden":"true",tabIndex:-1}),h?o("div",{class:"screenshot-preview",children:[o("img",{src:h,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>S(!0),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:G,children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]}):o("div",{ref:z,class:`screenshot-dropzone ${p?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var k;return(k=E.current)==null?void 0:k.click()},onKeyDown:k=>{var A;(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),(A=E.current)==null||A.click())},onDragOver:D,onDragLeave:X,onDrop:xe,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),L&&o("div",{class:"page-context",title:L,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ae(L,90)})]}),d&&o("div",{class:"error",children:d}),n==="error"&&a&&o("div",{class:"error",children:a}),n==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:P,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:P,children:C})]}),_&&v&&o(Tt,{imageBlob:v,strings:e,onCancel:()=>S(!1),onSave:we})]})}function no(e){let t={new:0,in_progress:0,awaiting_validation:0,resolved:0,total:0};for(let r of e)switch(t.total+=1,r.status){case"new":t.new+=1;break;case"in_progress":t.in_progress+=1;break;case"awaiting_validation":t.awaiting_validation+=1;break;case"closed":case"rejected":case"duplicate":case"wontfix":t.resolved+=1;break}return t}function ao(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var io={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Bt(e,t){return t==="all"?e:e.filter(r=>io[r.status]===t)}function zt({rows:e,filter:t,onFilter:r,strings:n}){let a=no(e),i=ao(a),s=[{key:"new",label:n["kpi.new"],value:String(a.new)},{key:"in_progress",label:n["kpi.in_progress"],value:String(a.in_progress)},{key:"awaiting_validation",label:n["kpi.awaiting_validation"],value:String(a.awaiting_validation)},{key:"resolved",label:n["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(c=>{let f=t===c.key,l=f?"all":c.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${c.key}${f?" is-active":""}`,onClick:()=>r(l),"aria-pressed":f,children:[o("span",{class:"kpi-value",children:c.value}),o("span",{class:"kpi-label",children:c.label})]})})})}var so=3e4;function Lt({api:e,externalId:t,strings:r,onSelect:n}){var u;let[a,i]=R(null),[s,c]=R(null),[f,l]=R(!1),[b,d]=R("all"),y=W(!0),v=async()=>{l(!0),c(null);try{let _=await e.listMine(t);if(!y.current)return;i(_)}catch(_){if(!y.current)return;c(_ instanceof Error?_.message:r["mine.error"])}finally{y.current&&l(!1)}};K(()=>{y.current=!0,v();let _=setInterval(()=>{v()},so);return()=>{y.current=!1,clearInterval(_)}},[t]);let w=a!==null&&a.length===0,h=a===null&&!s,m=a?Bt(a,b):null,p=!!a&&a.length>0&&((u=m==null?void 0:m.length)!=null?u:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{v()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),a&&a.length>0&&o(zt,{rows:a,filter:b,onFilter:d,strings:r}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),w&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),p&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),m&&m.length>0&&o("ul",{class:"mine-rows",children:m.map(_=>o("li",{children:o(ve,{row:_,strings:r,onClick:()=>n(_)})}))})]})}function Ft({onDismiss:e,children:t,closeLabel:r="Close",expanded:n=!1}){let a=W(null),i=W(null);return K(()=>{var f;i.current=document.activeElement;let s=l=>{var d;if(l.key!=="Escape")return;let b=(d=a.current)==null?void 0:d.getRootNode();b instanceof ShadowRoot&&b.querySelector(".annotator-backdrop")||(l.stopPropagation(),e())};window.addEventListener("keydown",s);let c=(f=a.current)==null?void 0:f.querySelector("textarea, input, select, button");return c==null||c.focus(),()=>{window.removeEventListener("keydown",s);let l=i.current;l&&typeof l.focus=="function"&&l.focus()}},[e]),o("div",{class:`backdrop ${n?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e()},children:o("div",{ref:a,class:`modal ${n?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:e,children:"\xD7"}),t]})})}var At=`
|
|
6
|
+
\u2026`}function Er({rows:e,strings:t}){return o("div",{class:"report-detail-history",children:[o("h3",{class:"report-detail-section",children:t["detail.history"]}),o("ol",{class:"status-history",children:e.map(r=>{var s,c;let n=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,a=(c=t[`status.${r.to_status}`])!=null?c:r.to_status,i=r.changed_by_source==="mcp"?"detail.author.mcp":r.changed_by_source==="system"?"detail.author.system":"detail.author.staff";return o("li",{class:"status-history-row",children:[o("span",{class:"status-history-time",children:St(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:n}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:a})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Mr=3e4,Tr=["new","in_progress","awaiting_validation","closed","rejected"],Pr=["bug","feature","question","praise","typo"],zr=["blocker","high","medium","low"];function Ct({api:e,externalId:t,strings:r}){let[n,a]=R({}),[i,s]=R(null),[c,f]=R(null),[l,b]=R(!0),[d,y]=R(null),[v,w]=R(null),[h,m]=R(0),p=Y(()=>{var S,E,B,P,C,L;return((E=(S=n.status)==null?void 0:S.length)!=null?E:0)+((P=(B=n.type)==null?void 0:B.length)!=null?P:0)+((L=(C=n.severity)==null?void 0:C.length)!=null?L:0)+(n.q?1:0)+(n.mine?1:0)},[n]);K(()=>{let S=!1,E=null,B=async()=>{try{let[P,C]=await Promise.all([e.listBoard(t,n),e.fetchBoardKpis(t,n)]);if(S)return;s(P),f(C),y(null)}catch(P){if(S)return;y(P instanceof Error?P.message:String(P))}finally{S||b(!1),S||(E=setTimeout(B,Mr))}};return b(!0),B(),()=>{S=!0,E&&clearTimeout(E)}},[e,t,Ur(n)]);let u=Y(()=>{var S;return!v||!i?null:(S=i.results.find(E=>E.id===v))!=null?S:null},[v,i]),_=S=>{w(S.id),m(E=>E+1)};return o("div",{class:"board-view",children:[o(Br,{strings:r,kpis:c}),o(Fr,{filters:n,onChange:a,activeCount:p,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":l&&!i,children:[d&&o("div",{class:"board-error",children:r["board.list.error"]}),!d&&l&&!i&&o(Wr,{}),!d&&i&&i.results.length===0&&!l&&o($r,{strings:r}),!d&&i&&i.results.length>0&&o(Ar,{rows:i.results,selectedId:v,onPick:_,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${u?"has-selection":""}`,children:u?o(ve,{api:e,externalId:t,reportId:u.id,strings:r,onBack:()=>w(null),canModerate:u.is_mine,variant:"board"},h):o("div",{class:"board-detail-empty",children:[o(Nr,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Br({strings:e,kpis:t}){let r=(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${r}`:r})]})]}),o(Lr,{kpis:t,strings:e})]})}function Lr({kpis:e,strings:t}){var n,a,i,s,c,f;let r=[{key:"new",label:t["board.kpi.new"],value:String((a=(n=e==null?void 0:e.by_status)==null?void 0:n.new)!=null?a:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((f=(c=e==null?void 0:e.by_status)==null?void 0:c.awaiting_validation)!=null?f:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(l=>o("div",{class:`board-kpi-card ${l.tone}`,children:[o("div",{class:"board-kpi-value",children:l.value}),o("div",{class:"board-kpi-label",children:l.label})]},l.key))})}function Fr({filters:e,onChange:t,activeCount:r,strings:n}){var b,d,y,v,w,h,m;let a=p=>{if(p===""){let{status:u,..._}=e;t(_)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:u,..._}=e;t(_)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:u,..._}=e;t(_)}else t({...e,severity:[p]})},c=p=>t({...e,q:p}),f=()=>{if(e.mine){let{mine:p,...u}=e;t(u)}else t({...e,mine:!0})},l=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":n["board.filter.status"],value:(d=(b=e.status)==null?void 0:b[0])!=null?d:"",onChange:p=>a(p.target.value),children:[o("option",{value:"",children:n["board.filter.status"]}),Tr.map(p=>{var u;return o("option",{value:p,children:(u=n[`board.kpi.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.type"],value:(v=(y=e.type)==null?void 0:y[0])!=null?v:"",onChange:p=>i(p.target.value),children:[o("option",{value:"",children:n["board.filter.type"]}),Pr.map(p=>{var u;return o("option",{value:p,children:(u=n[`type.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.severity"],value:(h=(w=e.severity)==null?void 0:w[0])!=null?h:"",onChange:p=>s(p.target.value),children:[o("option",{value:"",children:n["board.filter.severity"]}),zr.map(p=>{var u;return o("option",{value:p,children:(u=n[`severity.${p}`])!=null?u:p},p)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:n["board.filter.search.placeholder"],value:(m=e.q)!=null?m:"",onInput:p=>c(p.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:f}),o("span",{children:n["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:l,children:[o(Dr,{}),n["board.filter.clear"]]})]})}function Ar({rows:e,selectedId:t,onPick:r,strings:n,total:a}){return o(H,{children:[o("div",{class:"board-list-count",children:n["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(a))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Ir,{row:i,selected:i.id===t,onPick:r,strings:n},i.id))})]})}function Ir({row:e,selected:t,onPick:r,strings:n}){var i,s;let a=e.is_mine?n["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=n[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=n[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:a}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Kr,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:jr(e.created_at)})]})]})})}function $r({strings:e}){return o("div",{class:"board-empty",children:[o(Hr,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function Wr(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function Kr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Dr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Hr(){return o("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("circle",{cx:"32",cy:"32",r:"28",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2"}),o("path",{d:"M22 32h20M32 22v20",stroke:"currentColor","stroke-opacity":"0.35","stroke-width":"2","stroke-linecap":"round"})]})}function Nr(){return o("svg",{width:"80",height:"80",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("rect",{x:"10",y:"12",width:"44",height:"36",rx:"4",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2"}),o("line",{x1:"18",y1:"22",x2:"46",y2:"22",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"30",x2:"38",y2:"30",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"38",x2:"32",y2:"38",stroke:"currentColor","stroke-opacity":"0.14","stroke-width":"2","stroke-linecap":"round"})]})}function Ur(e){var t,r,n,a;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(n=e.severity)==null?void 0:n.slice().sort(),q:(a=e.q)!=null?a:"",m:!!e.mine})}function jr(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),n=Math.floor(r/6e4);if(n<1)return"just now";if(n<60)return`${n}m`;let a=Math.floor(n/60);if(a<24)return`${a}h`;let i=Math.floor(a/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}function Or(e){return`pill pill-status pill-status--${e}`}function qr(e){return`pill pill-severity pill-severity--${e}`}function Vr(){return"pill pill-type"}function Gr(e){let t=Date.parse(e);if(!Number.isFinite(t))return"";let r=Math.max(1,Math.round((Date.now()-t)/1e3));if(r<60)return`${r}s`;let n=Math.round(r/60);if(n<60)return`${n}m`;let a=Math.round(n/60);return a<48?`${a}h`:`${Math.round(a/24)}d`}function Xr(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function ye({row:e,strings:t,onClick:r}){var a;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Or(e.status),children:(a=t[`status.${e.status}`])!=null?a:e.status}),o("span",{class:Vr(),children:t[`type.${e.feedback_type}`]}),o("span",{class:qr(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:Gr(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Xr(e.comment_count,t)]})]})]})}var Zr=3e4;function Yr(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(t.getUTCDay()+6)%7;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)).toISOString().slice(0,10)}function Jr(e){let t=new Map;for(let r of e){let n=Yr(r.resolved_at);if(!n)continue;let a=t.get(n);a?a.push(r):t.set(n,[r])}return Array.from(t.entries()).sort(([r],[n])=>r<n?1:-1).map(([r,n])=>({weekKey:r,label:Qr(r),rows:n}))}function Qr(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Rt({api:e,externalId:t,strings:r,onSelect:n}){let[a,i]=R(null),[s,c]=R(null),[f,l]=R(!1),b=W(!0),d=async()=>{l(!0),c(null);try{let h=await e.listChangelog(t);if(!b.current)return;i(h)}catch(h){if(!b.current)return;c(h instanceof Error?h.message:r["mine.error"])}finally{b.current&&l(!1)}};K(()=>{b.current=!0,d();let h=setInterval(()=>{d()},Zr);return()=>{b.current=!1,clearInterval(h)}},[t]);let y=Y(()=>a?Jr(a):[],[a]),v=a===null&&!s,w=a!==null&&a.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{d()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),v&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),w&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),y.length>0&&o("div",{class:"changelog-groups",children:y.map(h=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",h.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[h.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(h.rows.length))})]}),o("ul",{class:"mine-rows",children:h.rows.map(m=>o("li",{children:o(ye,{row:m,strings:r,onClick:()=>n(m)})}))})]},h.weekKey))})]})}function eo(){return o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:o("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z",fill:"currentColor"})})}function Et({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(eo,{})})}var Mt=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],to=.35;function Tt(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")ro(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let n=1;n<t.points.length;n++)e.lineTo(t.points[n].x,t.points[n].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let n=e.measureText(t.text),a=4,i=n.width+a*2,s=t.fontSize+a*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-a,t.y-a,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=to,e.fillRect(_e(t.x,t.w),_e(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&oo(e,t,r);e.restore()}function _e(e,t){return t<0?e+t:e}function ro(e,t,r,n,a){let s=Math.atan2(a-r,n-t);e.beginPath(),e.moveTo(t,r),e.lineTo(n,a),e.stroke(),e.beginPath(),e.moveTo(n,a),e.lineTo(n-14*Math.cos(s-Math.PI/6),a-14*Math.sin(s-Math.PI/6)),e.lineTo(n-14*Math.cos(s+Math.PI/6),a-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function oo(e,t,r){if(!r)return;let n=_e(t.x,t.w),a=_e(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let c=Math.max(4,t.tile);for(let f=a;f<a+s;f+=c)for(let l=n;l<n+i;l+=c){let b=Math.min(c,n+i-l),d=Math.min(c,a+s-f);e.drawImage(r,l,f,b,d,l,f,b,d)}e.imageSmoothingEnabled=!1;for(let f=a;f<a+s;f+=c)for(let l=n;l<n+i;l+=c){let b=Math.min(c,n+i-l),d=Math.min(c,a+s-f);e.drawImage(r,l,f,1,1,l,f,b,d)}e.imageSmoothingEnabled=!0}var j={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Pt({imageBlob:e,strings:t,onSave:r,onCancel:n}){let a=W(null),i=W(null),s=W(null),[c,f]=R("rectangle"),[l,b]=R(Mt[0]),[d,y]=R([]),[v,w]=R([]),[h,m]=R([]),p=W(!1),[u,_]=R(null),[S,E]=R(!1),[B,P]=R(!1),C=W(1);function L(g){y(x=>(w(M=>[...M,x]),[...x,g])),m([])}function $(){y(g=>(w(x=>[...x,g]),[])),m([])}function X(){w(g=>{if(g.length===0)return g;let x=g[g.length-1];return y(M=>(m(T=>[M,...T]),x)),g.slice(0,-1)})}function q(){m(g=>{if(g.length===0)return g;let x=g[0];return y(M=>(w(T=>[...T,M]),x)),g.slice(1)})}We(()=>{let g=x=>{x.key==="Escape"&&(x.stopPropagation(),n())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[n]),K(()=>{let g=x=>{if(!(x.metaKey||x.ctrlKey))return;let T=x.key.toLowerCase();T==="z"?(x.preventDefault(),x.stopPropagation(),x.shiftKey?q():X()):T==="y"&&(x.preventDefault(),x.stopPropagation(),q())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[v,h,d]),K(()=>{let g=URL.createObjectURL(e),x=new Image;return x.onload=()=>{s.current=x,E(!0)},x.src=g,()=>URL.revokeObjectURL(g)},[e]),We(()=>{if(!S||!a.current||!s.current||!i.current)return;let g=s.current,M=i.current.clientWidth-16,T=window.innerHeight*.65,U=Math.min(M/g.width,T/g.height,1);C.current=U;let Q=a.current;Q.width=g.width,Q.height=g.height,Q.style.width=`${g.width*U}px`,Q.style.height=`${g.height*U}px`,D()},[S]),K(()=>{D()},[d,u]);function D(){let g=a.current,x=s.current;if(!g||!x)return;let M=g.getContext("2d");if(M){M.clearRect(0,0,g.width,g.height),M.drawImage(x,0,0);for(let T of d)Tt(M,T,x);u&&Tt(M,u,x)}}function V(g){let M=a.current.getBoundingClientRect();return{x:(g.clientX-M.left)/C.current,y:(g.clientY-M.top)/C.current}}let ne=g=>{if(!S)return;let{x,y:M}=V(g),T=a.current.width,U=Math.max(3,Math.round(T/400)),Q=Math.max(8,Math.round(T/80));if(c==="text"){let Se=window.prompt(t["annotator.text_prompt"]);Se&&Se.trim()&&L({kind:"text",x,y:M,text:Se.trim(),color:l,fontSize:Math.max(16,Math.round(T/50)),lineWidth:1});return}p.current=!0,c==="rectangle"?_({kind:"rectangle",x,y:M,w:0,h:0,color:l,lineWidth:U}):c==="arrow"?_({kind:"arrow",x1:x,y1:M,x2:x,y2:M,color:l,lineWidth:U}):c==="freehand"?_({kind:"freehand",points:[{x,y:M}],color:l,lineWidth:U}):c==="highlight"?_({kind:"highlight",x,y:M,w:0,h:0,color:l==="#ffffff"?"#fde047":l,lineWidth:1}):c==="blur"&&_({kind:"blur",x,y:M,w:0,h:0,color:"#000000",lineWidth:0,tile:Q})},we=g=>{if(!p.current)return;let{x,y:M}=V(g);_(T=>T&&(T.kind==="rectangle"||T.kind==="highlight"||T.kind==="blur"?{...T,w:x-T.x,h:M-T.y}:T.kind==="arrow"?{...T,x2:x,y2:M}:T.kind==="freehand"?{...T,points:[...T.points,{x,y:M}]}:T))},ke=()=>{_(g=>(p.current&&g&&((g.kind==="rectangle"||g.kind==="highlight"||g.kind==="blur")&&Math.abs(g.w)<4&&Math.abs(g.h)<4||g.kind==="arrow"&&Math.hypot(g.x2-g.x1,g.y2-g.y1)<4||g.kind==="freehand"&&g.points.length<3||L(g)),null)),p.current=!1},k=async()=>{let g=a.current;if(g){P(!0);try{let x=await new Promise(M=>g.toBlob(M,"image/png",.92));x&&r(x)}finally{P(!1)}}},A=[{id:"rectangle",icon:j.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:j.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:j.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:j.text,label:t["annotator.tool.text"]},{id:"highlight",icon:j.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:j.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:g=>{g.target===g.currentTarget&&n()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:n,children:j.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:A.map(g=>o("button",{type:"button",onClick:()=>f(g.id),title:g.label,"aria-label":g.label,"aria-pressed":c===g.id,class:`annotator-tool ${c===g.id?"is-active":""}`,children:g.icon},g.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Mt.map(g=>o("button",{type:"button",onClick:()=>b(g),"aria-label":g,"aria-pressed":l===g,class:`annotator-color ${l===g?"is-active":""}`,style:{backgroundColor:g}},g)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:l,onInput:g=>b(g.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:X,disabled:v.length===0,title:t["annotator.undo"],children:[j.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:q,disabled:h.length===0,title:t["annotator.redo"],children:[j.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:$,disabled:d.length===0,children:[j.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[d.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:S?o("canvas",{ref:a,onMouseDown:ne,onMouseMove:we,onMouseUp:ke,onMouseLeave:ke,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:n,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:k,disabled:B||!S,children:B?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var no=["bug","feature","question","praise","typo"],ao=["blocker","high","medium","low"];function zt({strings:e,onSubmit:t,onCancel:r,status:n,errorMessage:a}){let[i,s]=R(""),[c,f]=R("bug"),[l,b]=R("medium"),[d,y]=R(""),[v,w]=R(null),[h,m]=R(null),[p,u]=R(!1),[_,S]=R(!1),E=W(null),B=W(null),P=n==="submitting",C=P?e["form.submitting"]:e["form.submit"],L=typeof window!="undefined"?window.location.href:"";K(()=>()=>{h&&URL.revokeObjectURL(h)},[h]);let $=k=>{if(y(""),k instanceof File){let A=kt(k);if(A){y(A.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(A.maxMb)));return}}h&&URL.revokeObjectURL(h),w(k),m(URL.createObjectURL(k))},X=()=>{h&&URL.revokeObjectURL(h),m(null),w(null),y(""),E.current&&(E.current.value="")},q=k=>{var g;let A=(g=k.target.files)==null?void 0:g[0];A&&$(A)},D=k=>{k.preventDefault(),k.stopPropagation(),u(!0)},V=k=>{k.preventDefault(),k.stopPropagation(),k.currentTarget===k.target&&u(!1)},ne=k=>{var g,x;k.preventDefault(),k.stopPropagation(),u(!1);let A=(x=(g=k.dataTransfer)==null?void 0:g.files)==null?void 0:x[0];A&&$(A)};K(()=>{let k=B.current;if(!k)return;let A=g=>{var M;let x=(M=g.clipboardData)==null?void 0:M.items;if(x){for(let T of Array.from(x))if(T.kind==="file"&&T.type.startsWith("image/")){let U=T.getAsFile();if(U){g.preventDefault(),$(U);return}}}};return k.addEventListener("paste",A),()=>k.removeEventListener("paste",A)},[h]);let we=k=>{h&&URL.revokeObjectURL(h),w(k),m(URL.createObjectURL(k)),S(!1)};return o("form",{onSubmit:k=>{if(k.preventDefault(),!i.trim()){y(e["form.description.required"]);return}y("");let A={description:i.trim(),feedback_type:c,severity:l};v&&(A.screenshot=v,A.capture_method="manual"),t(A)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:i,placeholder:e["form.description.placeholder"],onInput:k=>s(k.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:c,onChange:k=>f(k.target.value),children:no.map(k=>o("option",{value:k,children:e[`type.${k}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:l,onChange:k=>b(k.target.value),children:ao.map(k=>o("option",{value:k,children:e[`severity.${k}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:E,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:q,"aria-hidden":"true",tabIndex:-1}),h?o("div",{class:"screenshot-preview",children:[o("img",{src:h,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>S(!0),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:X,children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]}):o("div",{ref:B,class:`screenshot-dropzone ${p?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var k;return(k=E.current)==null?void 0:k.click()},onKeyDown:k=>{var A;(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),(A=E.current)==null||A.click())},onDragOver:D,onDragLeave:V,onDrop:ne,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),L&&o("div",{class:"page-context",title:L,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:oe(L,90)})]}),d&&o("div",{class:"error",children:d}),n==="error"&&a&&o("div",{class:"error",children:a}),n==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:P,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:P,children:C})]}),_&&v&&o(Pt,{imageBlob:v,strings:e,onCancel:()=>S(!1),onSave:we})]})}function io(e){let t={new:0,in_progress:0,awaiting_validation:0,resolved:0,total:0};for(let r of e)switch(t.total+=1,r.status){case"new":t.new+=1;break;case"in_progress":t.in_progress+=1;break;case"awaiting_validation":t.awaiting_validation+=1;break;case"closed":case"rejected":case"duplicate":case"wontfix":t.resolved+=1;break}return t}function so(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var lo={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Bt(e,t){return t==="all"?e:e.filter(r=>lo[r.status]===t)}function Lt({rows:e,filter:t,onFilter:r,strings:n}){let a=io(e),i=so(a),s=[{key:"new",label:n["kpi.new"],value:String(a.new)},{key:"in_progress",label:n["kpi.in_progress"],value:String(a.in_progress)},{key:"awaiting_validation",label:n["kpi.awaiting_validation"],value:String(a.awaiting_validation)},{key:"resolved",label:n["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(c=>{let f=t===c.key,l=f?"all":c.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${c.key}${f?" is-active":""}`,onClick:()=>r(l),"aria-pressed":f,children:[o("span",{class:"kpi-value",children:c.value}),o("span",{class:"kpi-label",children:c.label})]})})})}var co=3e4;function Ft({api:e,externalId:t,strings:r,onSelect:n}){var u;let[a,i]=R(null),[s,c]=R(null),[f,l]=R(!1),[b,d]=R("all"),y=W(!0),v=async()=>{l(!0),c(null);try{let _=await e.listMine(t);if(!y.current)return;i(_)}catch(_){if(!y.current)return;c(_ instanceof Error?_.message:r["mine.error"])}finally{y.current&&l(!1)}};K(()=>{y.current=!0,v();let _=setInterval(()=>{v()},co);return()=>{y.current=!1,clearInterval(_)}},[t]);let w=a!==null&&a.length===0,h=a===null&&!s,m=a?Bt(a,b):null,p=!!a&&a.length>0&&((u=m==null?void 0:m.length)!=null?u:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{v()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),a&&a.length>0&&o(Lt,{rows:a,filter:b,onFilter:d,strings:r}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),w&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),p&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),m&&m.length>0&&o("ul",{class:"mine-rows",children:m.map(_=>o("li",{children:o(ye,{row:_,strings:r,onClick:()=>n(_)})}))})]})}function At({onDismiss:e,children:t,closeLabel:r="Close",expanded:n=!1}){let a=W(null),i=W(null);return K(()=>{var f;i.current=document.activeElement;let s=l=>{var d;if(l.key!=="Escape")return;let b=(d=a.current)==null?void 0:d.getRootNode();b instanceof ShadowRoot&&b.querySelector(".annotator-backdrop")||(l.stopPropagation(),e())};window.addEventListener("keydown",s);let c=(f=a.current)==null?void 0:f.querySelector("textarea, input, select, button");return c==null||c.focus(),()=>{window.removeEventListener("keydown",s);let l=i.current;l&&typeof l.focus=="function"&&l.focus()}},[e]),o("div",{class:`backdrop ${n?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e()},children:o("div",{ref:a,class:`modal ${n?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:e,children:"\xD7"}),t]})})}var It=`
|
|
7
7
|
:host {
|
|
8
8
|
--mfb-accent: #3b82f6;
|
|
9
9
|
--mfb-accent-contrast: #ffffff;
|
|
@@ -1205,9 +1205,16 @@
|
|
|
1205
1205
|
* Width/height/max-* are animated together; padding too, since the
|
|
1206
1206
|
* board's denser layout needs less of the modal's default padding. */
|
|
1207
1207
|
.modal.is-expanded {
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1208
|
+
/* Margin around the expanded board view. --mfb-space-7 (48px) matches
|
|
1209
|
+
* the breathing room of the default modal \u2014 24px top + 24px bottom +
|
|
1210
|
+
* 24px on each side \u2014 so the panel reads as "near-fullscreen with a
|
|
1211
|
+
* visible frame" instead of "the whole viewport, content cut off".
|
|
1212
|
+
* Was --mfb-space-5 (24px total = 12px each side), which felt
|
|
1213
|
+
* claustrophobic and tricked users into expecting more vertical
|
|
1214
|
+
* scroll under the viewport edge. */
|
|
1215
|
+
width: min(1280px, calc(100vw - var(--mfb-space-7)));
|
|
1216
|
+
max-height: calc(100vh - var(--mfb-space-7));
|
|
1217
|
+
height: calc(100vh - var(--mfb-space-7));
|
|
1211
1218
|
padding: var(--mfb-space-5);
|
|
1212
1219
|
transition:
|
|
1213
1220
|
width 320ms cubic-bezier(0.22, 1, 0.36, 1),
|
|
@@ -1221,6 +1228,10 @@
|
|
|
1221
1228
|
.backdrop.is-expanded { /* hook for any backdrop-level overrides */ }
|
|
1222
1229
|
|
|
1223
1230
|
@media (max-width: 640px) {
|
|
1231
|
+
/* On mobile the sheet still snaps to the bottom edge and stretches
|
|
1232
|
+
* almost the full viewport \u2014 24px gap from the top is enough to
|
|
1233
|
+
* convey "this is a panel, not a takeover", but we don't pull margin
|
|
1234
|
+
* off the sides where users expect the sheet to fill the viewport. */
|
|
1224
1235
|
.modal.is-expanded {
|
|
1225
1236
|
width: 100vw;
|
|
1226
1237
|
height: calc(100vh - var(--mfb-space-5));
|
|
@@ -1623,5 +1634,5 @@
|
|
|
1623
1634
|
@media (prefers-reduced-motion: reduce) {
|
|
1624
1635
|
.skeleton-line { animation: none; }
|
|
1625
1636
|
}
|
|
1626
|
-
`;function
|
|
1637
|
+
`;function $t(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=It,t.appendChild(r);let n=document.createElement("div");t.appendChild(n);let a={open:!1,status:"idle",tab:"send"},i=null;function s(l){a=l,Ae(Be(f,{state:l}),n)}function c(l){let{selectedReportId:b,...d}=l;return d}function f({state:l}){var w;let b=_t(async h=>{s({...a,status:"submitting"});try{await e.onSubmit(h),s({...a,status:"success"}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s({...a,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(m){s({...a,status:"error",error:m instanceof Error?m.message:String(m)})}},[]),d=(w=e.getExternalId)==null?void 0:w.call(e),y=e.showFAB&&(e.getExternalId===void 0?!0:!!d),v=!!(e.api&&d);return o(H,{children:[y&&o(Et,{label:e.strings["fab.label"],onClick:()=>s({...a,open:!0})}),l.open&&o(At,{onDismiss:()=>s(c({...a,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:l.tab==="board",children:[v&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":l.tab==="send",class:`tab-button ${l.tab==="send"?"is-active":""}`,onClick:()=>s(c({...a,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":l.tab==="mine",class:`tab-button ${l.tab==="mine"?"is-active":""}`,onClick:()=>s(c({...a,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":l.tab==="changelog",class:`tab-button ${l.tab==="changelog"?"is-active":""}`,onClick:()=>s(c({...a,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":l.tab==="board",class:`tab-button tab-button--board ${l.tab==="board"?"is-active":""}`,onClick:()=>s(c({...a,tab:"board"})),children:e.strings["tab.board"]})]}),l.tab==="send"&&o(zt,{strings:e.strings,onSubmit:b,onCancel:()=>s({...a,open:!1,status:"idle"}),status:l.status,...l.error!==void 0&&{errorMessage:l.error}}),l.tab==="mine"&&e.api&&d&&!l.selectedReportId&&o(Ft,{api:e.api,externalId:d,strings:e.strings,onSelect:h=>s({...a,selectedReportId:h.id})}),(l.tab==="mine"||l.tab==="changelog")&&e.api&&d&&l.selectedReportId&&o(ve,{api:e.api,externalId:d,reportId:l.selectedReportId,strings:e.strings,onBack:()=>s(c({...a}))}),l.tab==="changelog"&&e.api&&d&&!l.selectedReportId&&o(Rt,{api:e.api,externalId:d,strings:e.strings,onSelect:h=>s({...a,selectedReportId:h.id})}),l.tab==="board"&&e.api&&d&&o(Ct,{api:e.api,externalId:d,strings:e.strings})]})]})}return s(a),{open(){s({...a,open:!0})},close(){s({...a,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),Ae(null,n),e.host.innerHTML=""},notifyIdentityChanged(){s({...a})}}}function He(e){var v,w,h,m,p;let t=(v=e.env)!=null?v:"prod",r=(w=e.locale)!=null?w:typeof navigator!="undefined"?navigator.language:void 0,n=Ze((h=e.translations)!=null?h:{},r!==void 0?{locale:r}:{}),a=Xe({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(m=e.metadata)!=null?m:{},c=Ne({apiKey:e.apiKey,endpoint:e.endpoint,...e.fetchImpl!==void 0&&{fetch:e.fetchImpl},...e.beforeSend!==void 0&&{beforeSend:e.beforeSend},getSignedIdentity:()=>!i||!i.userHash||!i.exp||!i.email?null:{userHash:i.userHash,exp:i.exp,email:i.email}}),f=[],l=document.createElement("div");if(l.className="mhosaic-feedback",e.attachTo){let u=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;u==null||u.appendChild(l)}else document.body.appendChild(l);async function b(u){var C,L,$,X,q;let _=u.synthetic?void 0:u.screenshot,S=a.snapshot();if(i){let{userHash:D,exp:V,...ne}=i;S.user=ne}s&&Object.keys(s).length>0&&(S.metadata={...s});let E=_?(C=u.capture_method)!=null?C:"manual":"none",B={description:u.description,feedback_type:(L=u.feedback_type)!=null?L:"bug",severity:($=u.severity)!=null?$:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:E,technical_context:S};B.widget_version="0.15.1",_&&(B.screenshot=_),u.synthetic&&(B.synthetic=!0),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(B.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let P=B;for(let D of f)P=await D(P);try{let D=await c.submitReport(P);return(X=e.onSubmitSuccess)==null||X.call(e,D),a.clear(),D}catch(D){let V=D instanceof Error?D:new Error(String(D));throw(q=e.onError)==null||q.call(e,V),V}}let d=$t({host:l,strings:n,showFAB:(p=e.showFAB)!=null?p:!0,onSubmit:async u=>{await b(u)},api:c,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0}),y={show(){d.open()},hide(){d.close()},open(u){d.open()},async submit(u){return b({description:u.description,...u.feedback_type!==void 0&&{feedback_type:u.feedback_type},...u.severity!==void 0&&{severity:u.severity},...u.synthetic!==void 0&&{synthetic:u.synthetic},...u.screenshot!==void 0&&{screenshot:u.screenshot}})},identify(u){i=u,d.notifyIdentityChanged()},setMetadata(u){s={...s,...u}},shutdown(){d.dispose(),a.dispose(),l.remove();let u=window;u.mhosaicFeedback===y&&delete u.mhosaicFeedback},_registerTransformer(u){f.push(u)}};return window.mhosaicFeedback=y,y}var Ht=window;function po(){let e=document.currentScript;if(!e)return null;let t=e.dataset.key,r=e.dataset.endpoint;if(!t||!r)return null;let n=e.dataset.env;return{apiKey:t,endpoint:r,...n!==void 0&&{env:n}}}var J=null,Kt,Dt,xe=(Dt=(Kt=Ht.Feedback)==null?void 0:Kt.q)!=null?Dt:[];function Nt(e){let[t,r]=e;if(t==="init"){if(J)return;J=He(r);return}if(!J){xe.push(e);return}t==="identify"?J.identify(r):t==="setMetadata"?J.setMetadata(r):t==="open"&&J.open(r)}var Wt=po();Wt&&(J=He(Wt));for(;xe.length>0;)Nt(xe.shift());var uo=Object.assign(function(t,r){Nt([t,r])},{q:xe});Ht.Feedback=uo;})();
|
|
1627
1638
|
//# sourceMappingURL=embed.min.js.map
|