@mhosaic/feedback 0.18.1 → 0.19.0

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/embed.min.js CHANGED
@@ -1,9 +1,9 @@
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 k,_;let t=((k=e.endpoint)!=null?k:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');qt(t);let r=(_=e.fetch)!=null?_:globalThis.fetch;async function n(v){var L,T,F;let p=v;if(e.beforeSend&&(p=await e.beforeSend(v)),p===!1)throw new Error("Submission cancelled by beforeSend");let u=new FormData;for(let P of Ot)u.append(P,String(p[P]));u.append("technical_context",JSON.stringify(p.technical_context)),p.screenshot&&u.append("screenshot",p.screenshot,"screenshot.png"),p.synthetic&&u.append("synthetic","true"),(L=p.user)!=null&&L.id&&u.append("user",JSON.stringify(p.user)),p.widget_version&&u.append("widget_version",p.widget_version);let m={Authorization:`Bearer ${e.apiKey}`};p.synthetic&&(m["X-Mhosaic-Capture-Source"]="error-tracking");let x=(T=e.getSignedIdentity)==null?void 0:T.call(e);x&&x.userHash&&x.exp&&((F=p.user)!=null&&F.id)&&(m["X-Mhosaic-User"]=String(p.user.id),m["X-Mhosaic-User-Hmac"]=x.userHash,m["X-Mhosaic-User-Exp"]=String(x.exp),x.email&&(m["X-Mhosaic-User-Email"]=x.email));let R=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:m,body:u});if(!R.ok){let P=await R.text().catch(()=>"");throw new Error(`Feedback submit failed: ${R.status} ${P}`)}return R.json()}function a(v){var m;let p={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":v},u=(m=e.getSignedIdentity)==null?void 0:m.call(e);return u&&u.userHash&&u.exp&&(p["X-Mhosaic-User-Hmac"]=u.userHash,p["X-Mhosaic-User-Exp"]=String(u.exp),u.email&&(p["X-Mhosaic-User-Email"]=u.email)),p}async function i(v){let p=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:a(v)});if(p.status===404)return[];if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`listMine failed: ${p.status} ${u}`)}return p.json()}async function s(v){let p=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:a(v)});if(p.status===404)return[];if(!p.ok){let u=await p.text().catch(()=>"");throw new Error(`listChangelog failed: ${p.status} ${u}`)}return p.json()}async function l(v,p){let u=await r(`${t}/api/feedback/v1/reports/widget/${v}/`,{method:"GET",headers:a(p)});if(!u.ok){let m=await u.text().catch(()=>"");throw new Error(`getReport failed: ${u.status} ${m}`)}return u.json()}async function f(v,p,u,m){let x=await r(`${t}/api/feedback/v1/reports/widget/${v}/comments/`,{method:"POST",headers:{...a(p),"Content-Type":"application/json"},body:JSON.stringify({body:u,...m!==void 0&&{client_nonce:m}})});if(!x.ok){let R=await x.text().catch(()=>"");throw new Error(`addComment failed: ${x.status} ${R}`)}return x.json()}async function c(v,p){let u=await r(`${t}/api/feedback/v1/reports/widget/${v}/`,{method:"PATCH",headers:{...a(p),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!u.ok){let m=await u.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${u.status} ${m}`)}return u.json()}function b(v){var m,x,R;if(!v)return"";let p=new URLSearchParams;(m=v.status)==null||m.forEach(L=>p.append("status",L)),(x=v.type)==null||x.forEach(L=>p.append("type",L)),(R=v.severity)==null||R.forEach(L=>p.append("severity",L)),v.q&&p.set("q",v.q),v.mine&&p.set("mine","1"),v.page&&v.page>1&&p.set("page",String(v.page));let u=p.toString();return u?`?${u}`:""}async function d(v,p){let u=await r(`${t}/api/feedback/v1/reports/widget/board/${b(p)}`,{method:"GET",headers:a(v)});if(u.status===404)return{count:0,next:null,previous:null,results:[]};if(!u.ok){let m=await u.text().catch(()=>"");throw new Error(`listBoard failed: ${u.status} ${m}`)}return u.json()}async function y(v,p){let u=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${b(p)}`,{method:"GET",headers:a(v)});if(u.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!u.ok){let m=await u.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${u.status} ${m}`)}return u.json()}async function g(v,p){let u=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...a(v),"Content-Type":"application/json"},body:JSON.stringify({external_id:v,...p?{email:p}:{}})});if(!u.ok)throw new Error(`checkVisibility failed: ${u.status}`);return!!(await u.json()).show}return{submitReport:n,checkVisibility:g,listMine:i,listChangelog:s,getReport:l,addComment:f,closeAsResolved:c,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 Y(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,l)=>{Vt.test(l)||Xt(s)?i.set(l,"[redacted]"):i.set(l,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 j(e){let t=e;for(let r of Zt)t=t.replace(r,"[redacted-token]");return t}function Ue(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,n=document.referrer||void 0,a=n!==void 0?Y(n):void 0,i=Y(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:j(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 l=s.map(Yt).join(" "),f=j(l).slice(0,2e3),c={level:n,message:f,ts:Date.now()};if(n==="error"){let b=new Error().stack;b&&(c.stack=b.split(`
1
+ "use strict";var MhosaicFeedback=(()=>{var Nt=Object.defineProperty;var jt=(e,t,r)=>t in e?Nt(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 Ue(e){var _,x;let t=((_=e.endpoint)!=null?_:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');qt(t);let r=(x=e.fetch)!=null?x:globalThis.fetch;async function n(u){var M,F,z;let f=u;if(e.beforeSend&&(f=await e.beforeSend(u)),f===!1)throw new Error("Submission cancelled by beforeSend");let p=new FormData;for(let A of Ot)p.append(A,String(f[A]));p.append("technical_context",JSON.stringify(f.technical_context)),f.screenshot&&p.append("screenshot",f.screenshot,"screenshot.png"),f.synthetic&&p.append("synthetic","true"),(M=f.user)!=null&&M.id&&p.append("user",JSON.stringify(f.user)),f.widget_version&&p.append("widget_version",f.widget_version);let y={Authorization:`Bearer ${e.apiKey}`};f.synthetic&&(y["X-Mhosaic-Capture-Source"]="error-tracking");let C=(F=e.getSignedIdentity)==null?void 0:F.call(e);C&&C.userHash&&C.exp&&((z=f.user)!=null&&z.id)&&(y["X-Mhosaic-User"]=String(f.user.id),y["X-Mhosaic-User-Hmac"]=C.userHash,y["X-Mhosaic-User-Exp"]=String(C.exp),C.email&&(y["X-Mhosaic-User-Email"]=C.email));let L=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:y,body:p});if(!L.ok){let A=await L.text().catch(()=>"");throw new Error(`Feedback submit failed: ${L.status} ${A}`)}return L.json()}function a(u){var y;let f={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":u},p=(y=e.getSignedIdentity)==null?void 0:y.call(e);return p&&p.userHash&&p.exp&&(f["X-Mhosaic-User-Hmac"]=p.userHash,f["X-Mhosaic-User-Exp"]=String(p.exp),p.email&&(f["X-Mhosaic-User-Email"]=p.email)),f}async function i(u){let f=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:a(u)});if(f.status===404)return[];if(!f.ok){let p=await f.text().catch(()=>"");throw new Error(`listMine failed: ${f.status} ${p}`)}return f.json()}async function s(u){let f=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:a(u)});if(f.status===404)return[];if(!f.ok){let p=await f.text().catch(()=>"");throw new Error(`listChangelog failed: ${f.status} ${p}`)}return f.json()}async function l(u,f){let p=await r(`${t}/api/feedback/v1/reports/widget/${u}/`,{method:"GET",headers:a(f)});if(!p.ok){let y=await p.text().catch(()=>"");throw new Error(`getReport failed: ${p.status} ${y}`)}return p.json()}async function m(u,f,p,y){let C=await r(`${t}/api/feedback/v1/reports/widget/${u}/comments/`,{method:"POST",headers:{...a(f),"Content-Type":"application/json"},body:JSON.stringify({body:p,...y!==void 0&&{client_nonce:y}})});if(!C.ok){let L=await C.text().catch(()=>"");throw new Error(`addComment failed: ${C.status} ${L}`)}return C.json()}async function c(u,f){let p=await r(`${t}/api/feedback/v1/reports/widget/${u}/`,{method:"PATCH",headers:{...a(f),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!p.ok){let y=await p.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${p.status} ${y}`)}return p.json()}async function b(u,f){let p=await r(`${t}/api/feedback/v1/reports/widget/${u}/`,{method:"PATCH",headers:{...a(f),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!p.ok){let y=await p.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${p.status} ${y}`)}return p.json()}function d(u){var y,C,L;if(!u)return"";let f=new URLSearchParams;(y=u.status)==null||y.forEach(M=>f.append("status",M)),(C=u.type)==null||C.forEach(M=>f.append("type",M)),(L=u.severity)==null||L.forEach(M=>f.append("severity",M)),u.q&&f.set("q",u.q),u.mine&&f.set("mine","1"),u.page&&u.page>1&&f.set("page",String(u.page));let p=f.toString();return p?`?${p}`:""}async function v(u,f){let p=await r(`${t}/api/feedback/v1/reports/widget/board/${d(f)}`,{method:"GET",headers:a(u)});if(p.status===404)return{count:0,next:null,previous:null,results:[]};if(!p.ok){let y=await p.text().catch(()=>"");throw new Error(`listBoard failed: ${p.status} ${y}`)}return p.json()}async function g(u,f){let p=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${d(f)}`,{method:"GET",headers:a(u)});if(p.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!p.ok){let y=await p.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${p.status} ${y}`)}return p.json()}async function S(u,f){let p=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...a(u),"Content-Type":"application/json"},body:JSON.stringify({external_id:u,...f?{email:f}:{}})});if(!p.ok)throw new Error(`checkVisibility failed: ${p.status}`);return!!(await p.json()).show}return{submitReport:n,checkVisibility:S,listMine:i,listChangelog:s,getReport:l,addComment:m,closeAsResolved:c,reopenUnresolved:b,listBoard:v,fetchBoardKpis:g}}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 J(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,l)=>{Vt.test(l)||Xt(s)?i.set(l,"[redacted]"):i.set(l,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 Ne(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,n=document.referrer||void 0,a=n!==void 0?J(n):void 0,i=J(window.location.pathname+window.location.search),s;try{let m=new URL(i,window.location.origin);s=m.pathname+m.search}catch(m){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 l=s.map(Yt).join(" "),m=N(l).slice(0,2e3),c={level:n,message:m,ts:Date.now()};if(n==="error"){let b=new Error().stack;b&&(c.stack=b.split(`
2
2
  `).slice(2,8).join(`
3
- `))}e.push(c)}catch(l){}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(),l=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 c=await r(a,i);return e.push({url:t(l),method:f,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let b=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:f,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:j(b)}),c}},()=>{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,l){return this.__mfb={method:s.toUpperCase(),url:typeof l=="string"?l:l.toString(),start:performance.now()},n.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let l=this.__mfb;if(!l)return;e.push({url:t(l.url),method:l.method,status:this.status,durationMs:Math.round(performance.now()-l.start),ts:Date.now()})}catch(l){}}),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?j(a):void 0;e.push({message:j(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,l=s!==void 0?j(s):void 0;e.push({message:j(i),...l!==void 0&&{stack:l},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: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 te=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 g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:n=20}=e,a=(g=e.sanitizeUrl)!=null?g:Y,i=new te(t),s=new te(r),l=new te(n),f=je(i),c=Oe(s,a),b=qe(s,a),d=Ve(l),y=Ge();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Ue(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){f(),c(),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.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","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.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","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 be,z,tt,rr,X,Ye,rt,ot,Re,ce,ie,nt,Pe,Ee,Me,or,ue={},fe=[],nr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,he=Array.isArray;function G(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?be.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 de(e,s,n,a,null)}function de(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 U(e){return e.children}function pe(e,t){this.props=e,this.context=t}function re(e,t){if(t==null)return e.__?re(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"?re(e):null}function ar(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],a=[],i=G({},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?re(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)&&X.push(e)&&!me.__r++||Ye!=z.debounceRendering)&&((Ye=z.debounceRendering)||rt)(me)}function me(){try{for(var e,t=1;X.length;)X.length>t&&X.sort(ot),e=X.shift(),t=X.length,ar(e)}finally{X.length=me.__r=0}}function it(e,t,r,n,a,i,s,l,f,c,b){var d,y,g,k,_,v,p,u=n&&n.__k||fe,m=t.length;for(f=ir(r,t,u,f,m),d=0;d<m;d++)(g=r.__k[d])!=null&&(y=g.__i!=-1&&u[g.__i]||ue,g.__i=d,v=Le(e,g,y,a,i,s,l,f,c,b),k=g.__e,g.ref&&y.ref!=g.ref&&(y.ref&&Fe(y.ref,null,g),b.push(g.ref,g.__c||k,g)),_==null&&k!=null&&(_=k),(p=!!(4&g.__u))||y.__k===g.__k?(f=st(g,f,e,p),p&&y.__e&&(y.__e=null)):typeof g.type=="function"&&v!==void 0?f=v:k&&(f=k.nextSibling),g.__u&=-7);return r.__e=_,f}function ir(e,t,r,n,a){var i,s,l,f,c,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]=de(null,s,null,null,null):he(s)?s=e.__k[i]=de(U,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=de(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,l=null,(c=s.__i=sr(s,r,f,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(a>b?y--:a<b&&y++),typeof s.type!="function"&&(s.__u|=4)):c!=f&&(c==f-1?y--:c==f+1?y++:(c>f?y--:y++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<b;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==n&&(n=re(l)),dt(l,l));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=re(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,l=e.key,f=e.type,c=t[r],b=c!=null&&(2&c.__u)==0;if(c===null&&l==null||b&&l==c.key&&f==c.type)return r;if(n>(b?1:0)){for(a=r-1,i=r+1;a>=0||i<t.length;)if((c=t[s=a>=0?a--:i++])!=null&&(2&c.__u)==0&&l==c.key&&f==c.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 le(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[ie]=n[ie]:(r[ie]=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(l){}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[ce]==null)t[ce]=Pe++;else if(t[ce]<r[ie])return;return r(z.event?z.event(t):t)}}}function Le(e,t,r,n,a,i,s,l,f,c){var b,d,y,g,k,_,v,p,u,m,x,R,L,T,F,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),i=[l=t.__e=r.__e]),(b=z.__b)&&b(t);e:if(typeof P=="function")try{if(p=t.props,u=P.prototype&&P.prototype.render,m=(b=P.contextType)&&n[b.__c],x=b?m?m.props.value:b.__:n,r.__c?v=(d=t.__c=r.__c).__=d.__E:(u?t.__c=d=new P(p,x):(t.__c=d=new pe(p,x),d.constructor=P,d.render=cr),m&&m.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&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=G({},d.__s)),G(d.__s,P.getDerivedStateFromProps(p,d.__s))),g=d.props,k=d.state,d.__v=t,y)u&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),u&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(u&&P.getDerivedStateFromProps==null&&p!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(p,x),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(p,d.__s,x)===!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(K){K&&(K.__=t)}),fe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(p,d.__s,x),u&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,k,_)})}if(d.context=x,d.props=p,d.__P=e,d.__e=!1,R=z.__r,L=0,u)d.state=d.__s,d.__d=!1,R&&R(t),b=d.render(d.props,d.state,d.context),fe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,R&&R(t),b=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++L<25);d.state=d.__s,d.getChildContext!=null&&(n=G(G({},n),d.getChildContext())),u&&!y&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(g,k)),T=b!=null&&b.type===U&&b.key==null?ct(b.props.children):b,l=it(e,he(T)?T:[T],t,r,n,a,i,s,l,f,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(K){if(t.__v=null,f||i!=null)if(K.then){for(t.__u|=f?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)ze(i[F]);Te(t)}else t.__e=r.__e,t.__k=r.__k,K.then||Te(t);z.__e(K,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=lr(r.__e,t,r,n,a,i,s,f,c);return(b=z.diffed)&&b(t),128&t.__u?void 0:l}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:he(e)?e.map(ct):G({},e)}function lr(e,t,r,n,a,i,s,l,f){var c,b,d,y,g,k,_,v=r.props||ue,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(c=0;c<i.length;c++)if((g=i[c])&&"setAttribute"in g==!!u&&(u?g.localName==u:g.nodeType==3)){e=g,i[c]=null;break}}if(e==null){if(u==null)return document.createTextNode(p);e=document.createElementNS(a,u,p.is&&p),l&&(z.__m&&z.__m(t,i),l=!1),i=null}if(u==null)v===p||l&&e.data==p||(e.data=p);else{if(i=i&&be.call(e.childNodes),!l&&i!=null)for(v={},c=0;c<e.attributes.length;c++)v[(g=e.attributes[c]).name]=g.value;for(c in v)g=v[c],c=="dangerouslySetInnerHTML"?d=g:c=="children"||c in p||c=="value"&&"defaultValue"in p||c=="checked"&&"defaultChecked"in p||le(e,c,null,g,a);for(c in p)g=p[c],c=="children"?y=g:c=="dangerouslySetInnerHTML"?b=g:c=="value"?k=g:c=="checked"?_=g:l&&typeof g!="function"||v[c]===g||le(e,c,g,v[c],a);if(b)l||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,he(y)?y:[y],t,r,n,u=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:r.__k&&re(r,0),l,f),i!=null)for(c=i.length;c--;)ze(i[c]);l||(c="value",u=="progress"&&k==null?e.removeAttribute("value"):k!=null&&(k!==e[c]||u=="progress"&&!k||u=="option"&&k!=v[c])&&le(e,c,k,v[c],a),c="checked",_!=null&&_!=e[c]&&le(e,c,_,v[c],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(U,null,[e]),a||ue,ue,t.namespaceURI,!n&&r?[r]:a?null:t.firstChild?be.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,s),lt(i,e,s)}be=fe.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(l){e=l}throw e}},tt=0,rr=function(e){return e!=null&&e.constructor===void 0},pe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=G({},this.state),typeof e=="function"&&(e=e(G({},r),this.props)),e&&G(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Je(this))},pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Je(this))},pe.prototype.render=U,X=[],rt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ot=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,Re=Math.random().toString(8),ce="__d"+Re,ie="__a"+Re,nt=/(PointerCapture)$|Capture$/i,Pe=0,Ee=et(!1),Me=et(!0),or=0;var oe,A,Ie,pt,se=0,yt=[],$=z,ut=$.__b,ft=$.__r,mt=$.diffed,bt=$.__c,ht=$.unmount,gt=$.__;function ve(e,t){$.__h&&$.__h(A,e,se||t),se=0;var r=A.__H||(A.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function C(e){return se=1,dr(xt,e)}function dr(e,t,r){var n=ve(oe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xt(void 0,t),function(l){var f=n.__N?n.__N[0]:n.__[0],c=n.t(f,l);f!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=A,!A.__f)){var a=function(l,f,c){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,l,f,c);var d=n.__c.props!==l;return b.some(function(y){if(y.__N){var g=y.__[0];y.__=y.__N,y.__N=void 0,g!==y.__[0]&&(d=!0)}}),i&&i.call(this,l,f,c)||d};A.__f=!0;var i=A.shouldComponentUpdate,s=A.componentWillUpdate;A.componentWillUpdate=function(l,f,c){if(this.__e){var b=i;i=void 0,a(l,f,c),i=b}s&&s.call(this,l,f,c)},A.shouldComponentUpdate=a}return n.__N||n.__}function D(e,t){var r=ve(oe++,3);!$.__s&&Ke(r.__H,t)&&(r.__=e,r.u=t,A.__H.__h.push(r))}function De(e,t){var r=ve(oe++,4);!$.__s&&Ke(r.__H,t)&&(r.__=e,r.u=t,A.__h.push(r))}function W(e){return se=5,J(function(){return{current:e}},[])}function J(e,t){var r=ve(oe++,7);return Ke(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function _t(e,t){return se=8,J(function(){return e},t)}function pr(){for(var e;e=yt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ge),t.__h.some($e),t.__h=[]}catch(r){t.__h=[],$.__e(r,e.__v)}}}$.__b=function(e){A=null,ut&&ut(e)},$.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),gt&&gt(e,t)},$.__r=function(e){ft&&ft(e),oe=0;var t=(A=e.__c).__H;t&&(Ie===A?(t.__h=[],A.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(ge),t.__h.some($e),t.__h=[],oe=0)),Ie=A},$.diffed=function(e){mt&&mt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(yt.push(t)!==1&&pt===$.requestAnimationFrame||((pt=$.requestAnimationFrame)||ur)(pr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ie=A=null},$.__c=function(e,t){t.some(function(r){try{r.__h.some(ge),r.__h=r.__h.filter(function(n){return!n.__||$e(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],$.__e(n,r.__v)}}),bt&&bt(e,t)},$.unmount=function(e){ht&&ht(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{ge(n)}catch(a){t=a}}),r.__H=void 0,t&&$.__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 ge(e){var t=A,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),A=t}function $e(e){var t=A;e.__c=e.__(),A=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,l,f=t;if("ref"in f)for(l in f={},t)l=="ref"?s=t[l]:f[l]=t[l];var c={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(l in s)f[l]===void 0&&(f[l]=s[l]);return z.vnode&&z.vnode(c),c}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",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),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 ne(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 We(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 ye({api:e,externalId:t,reportId:r,strings:n,onBack:a,canModerate:i=!0,variant:s="modal"}){var F,P,K;let[l,f]=C(null),[c,b]=C(null),[d,y]=C(""),[g,k]=C(!1),[_,v]=C(!1),p=W(!0),u=async()=>{try{let B=await e.getReport(r,t);if(!p.current)return;f(B),b(null)}catch(B){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",B),!p.current)return;b("load_failed")}};D(()=>{p.current=!0,u();let B=setInterval(()=>{u()},hr);return()=>{p.current=!1,clearInterval(B)}},[r,t]);let m=async()=>{if(!(!d.trim()||g)){k(!0);try{let B=`${r}:${Date.now()}`,O=await e.addComment(r,t,d.trim(),B);if(!p.current)return;y(""),f(N=>N&&{...N,comments:gr(N.comments,O)}),u()}catch(B){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",B),!p.current)return;b(n["detail.send_failed"])}finally{p.current&&k(!1)}}},x=async()=>{if(!_){v(!0);try{let B=await e.closeAsResolved(r,t);if(!p.current)return;f(B)}catch(B){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",B),!p.current)return;b(n["detail.close_failed"])}finally{p.current&&v(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:n["mine.loading"]});if(!l)return o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:n["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:n["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.load_failed.cta"]]})]});let R=(F=l.is_mine)!=null?F:i,L=R&&l.status==="awaiting_validation",T=R;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--${l.status}`,children:(P=n[`status.${l.status}`])!=null?P:l.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--${l.status}`,children:(K=n[`status.${l.status}`])!=null?K:l.status})]}),o("div",{class:"report-detail-body",children:[o(vr,{detail:l,strings:n}),o("p",{class:"report-detail-description",children:l.description}),l.screenshot_url&&(()=>{let B=We(l.screenshot_url);return B?o("a",{class:"report-detail-screenshot",href:B,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})})})(),o("h3",{class:"report-detail-section",children:n["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:n["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(B=>o("li",{children:o(wt,{comment:B,strings:n})}))}),l.status_history&&l.status_history.length>0&&o(Er,{rows:l.status_history,strings:n}),l.technical_context&&o(xr,{ctx:l.technical_context,strings:n}),T?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:n["detail.compose_placeholder"],onInput:B=>y(B.target.value),disabled:g}),o("div",{class:"report-compose-actions",children:[L&&o("button",{type:"button",class:"btn",onClick:x,disabled:_,children:_?n["detail.close_busy"]:n["detail.close_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:m,disabled:!d.trim()||g,children:g?n["detail.compose_sending"]:n["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:n["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}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=We(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:ne(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:ne(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 c,b,d;let r=(c=e.errors)!=null?c:[],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 l=r.length,f=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===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(U,{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:ne(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Rr(e){let t=e.split(`
3
+ `))}e.push(c)}catch(l){}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(),l=typeof a=="string"?a:a instanceof URL?a.toString():a.url,m=((i==null?void 0:i.method)||(a instanceof Request?a.method:"GET")).toUpperCase();try{let c=await r(a,i);return e.push({url:t(l),method:m,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let b=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:m,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:N(b)}),c}},()=>{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,l){return this.__mfb={method:s.toUpperCase(),url:typeof l=="string"?l:l.toString(),start:performance.now()},n.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let l=this.__mfb;if(!l)return;e.push({url:t(l.url),method:l.method,status:this.status,durationMs:Math.round(performance.now()-l.start),ts:Date.now()})}catch(l){}}),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(m){return String(a)}})(),s=a instanceof Error?a.stack:void 0,l=s!==void 0?N(s):void 0;e.push({message:N(i),...l!==void 0&&{stack:l},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:J(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 re=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 g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:n=20}=e,a=(g=e.sanitizeUrl)!=null?g:J,i=new re(t),s=new re(r),l=new re(n),m=je(i),c=Oe(s,a),b=qe(s,a),d=Ve(l),v=Ge();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Ne(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){m(),c(),b(),d(),v.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.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","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.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","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 be,B,tt,rr,Y,Ye,rt,ot,Re,ce,ie,nt,Pe,Ee,Me,or,ue={},fe=[],nr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,he=Array.isArray;function Z(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?be.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 de(e,s,n,a,null)}function de(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&&B.vnode!=null&&B.vnode(i),i}function H(e){return e.children}function pe(e,t){this.props=e,this.context=t}function oe(e,t){if(t==null)return e.__?oe(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"?oe(e):null}function ar(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],a=[],i=Z({},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?oe(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)&&Y.push(e)&&!me.__r++||Ye!=B.debounceRendering)&&((Ye=B.debounceRendering)||rt)(me)}function me(){try{for(var e,t=1;Y.length;)Y.length>t&&Y.sort(ot),e=Y.shift(),t=Y.length,ar(e)}finally{Y.length=me.__r=0}}function it(e,t,r,n,a,i,s,l,m,c,b){var d,v,g,S,_,x,u,f=n&&n.__k||fe,p=t.length;for(m=ir(r,t,f,m,p),d=0;d<p;d++)(g=r.__k[d])!=null&&(v=g.__i!=-1&&f[g.__i]||ue,g.__i=d,x=Le(e,g,v,a,i,s,l,m,c,b),S=g.__e,g.ref&&v.ref!=g.ref&&(v.ref&&Fe(v.ref,null,g),b.push(g.ref,g.__c||S,g)),_==null&&S!=null&&(_=S),(u=!!(4&g.__u))||v.__k===g.__k?(m=st(g,m,e,u),u&&v.__e&&(v.__e=null)):typeof g.type=="function"&&x!==void 0?m=x:S&&(m=S.nextSibling),g.__u&=-7);return r.__e=_,m}function ir(e,t,r,n,a){var i,s,l,m,c,b=r.length,d=b,v=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]=de(null,s,null,null,null):he(s)?s=e.__k[i]=de(H,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=de(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,m=i+v,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=sr(s,r,m,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(a>b?v--:a<b&&v++),typeof s.type!="function"&&(s.__u|=4)):c!=m&&(c==m-1?v--:c==m+1?v++:(c>m?v--:v++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<b;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==n&&(n=oe(l)),dt(l,l));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=oe(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,l=e.key,m=e.type,c=t[r],b=c!=null&&(2&c.__u)==0;if(c===null&&l==null||b&&l==c.key&&m==c.type)return r;if(n>(b?1:0)){for(a=r-1,i=r+1;a>=0||i<t.length;)if((c=t[s=a>=0?a--:i++])!=null&&(2&c.__u)==0&&l==c.key&&m==c.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 le(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[ie]=n[ie]:(r[ie]=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(l){}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[ce]==null)t[ce]=Pe++;else if(t[ce]<r[ie])return;return r(B.event?B.event(t):t)}}}function Le(e,t,r,n,a,i,s,l,m,c){var b,d,v,g,S,_,x,u,f,p,y,C,L,M,F,z=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(m=!!(32&r.__u),i=[l=t.__e=r.__e]),(b=B.__b)&&b(t);e:if(typeof z=="function")try{if(u=t.props,f=z.prototype&&z.prototype.render,p=(b=z.contextType)&&n[b.__c],y=b?p?p.props.value:b.__:n,r.__c?x=(d=t.__c=r.__c).__=d.__E:(f?t.__c=d=new z(u,y):(t.__c=d=new pe(u,y),d.constructor=z,d.render=cr),p&&p.sub(d),d.state||(d.state={}),d.__n=n,v=d.__d=!0,d.__h=[],d._sb=[]),f&&d.__s==null&&(d.__s=d.state),f&&z.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Z({},d.__s)),Z(d.__s,z.getDerivedStateFromProps(u,d.__s))),g=d.props,S=d.state,d.__v=t,v)f&&z.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),f&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(f&&z.getDerivedStateFromProps==null&&u!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(u,y),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(u,d.__s,y)===!1){t.__v!=r.__v&&(d.props=u,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(A){A&&(A.__=t)}),fe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(u,d.__s,y),f&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,S,_)})}if(d.context=y,d.props=u,d.__P=e,d.__e=!1,C=B.__r,L=0,f)d.state=d.__s,d.__d=!1,C&&C(t),b=d.render(d.props,d.state,d.context),fe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,C&&C(t),b=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++L<25);d.state=d.__s,d.getChildContext!=null&&(n=Z(Z({},n),d.getChildContext())),f&&!v&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(g,S)),M=b!=null&&b.type===H&&b.key==null?ct(b.props.children):b,l=it(e,he(M)?M:[M],t,r,n,a,i,s,l,m,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),x&&(d.__E=d.__=null)}catch(A){if(t.__v=null,m||i!=null)if(A.then){for(t.__u|=m?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)ze(i[F]);Te(t)}else t.__e=r.__e,t.__k=r.__k,A.then||Te(t);B.__e(A,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=lr(r.__e,t,r,n,a,i,s,m,c);return(b=B.diffed)&&b(t),128&t.__u?void 0:l}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]);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 ct(e){return typeof e!="object"||e==null||e.__b>0?e:he(e)?e.map(ct):Z({},e)}function lr(e,t,r,n,a,i,s,l,m){var c,b,d,v,g,S,_,x=r.props||ue,u=t.props,f=t.type;if(f=="svg"?a="http://www.w3.org/2000/svg":f=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((g=i[c])&&"setAttribute"in g==!!f&&(f?g.localName==f:g.nodeType==3)){e=g,i[c]=null;break}}if(e==null){if(f==null)return document.createTextNode(u);e=document.createElementNS(a,f,u.is&&u),l&&(B.__m&&B.__m(t,i),l=!1),i=null}if(f==null)x===u||l&&e.data==u||(e.data=u);else{if(i=i&&be.call(e.childNodes),!l&&i!=null)for(x={},c=0;c<e.attributes.length;c++)x[(g=e.attributes[c]).name]=g.value;for(c in x)g=x[c],c=="dangerouslySetInnerHTML"?d=g:c=="children"||c in u||c=="value"&&"defaultValue"in u||c=="checked"&&"defaultChecked"in u||le(e,c,null,g,a);for(c in u)g=u[c],c=="children"?v=g:c=="dangerouslySetInnerHTML"?b=g:c=="value"?S=g:c=="checked"?_=g:l&&typeof g!="function"||x[c]===g||le(e,c,g,x[c],a);if(b)l||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,he(v)?v:[v],t,r,n,f=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:r.__k&&oe(r,0),l,m),i!=null)for(c=i.length;c--;)ze(i[c]);l||(c="value",f=="progress"&&S==null?e.removeAttribute("value"):S!=null&&(S!==e[c]||f=="progress"&&!S||f=="option"&&S!=x[c])&&le(e,c,S,x[c],a),c="checked",_!=null&&_!=e[c]&&le(e,c,_,x[c],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 dt(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]&&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),B.__&&B.__(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||ue,ue,t.namespaceURI,!n&&r?[r]:a?null:t.firstChild?be.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,s),lt(i,e,s)}be=fe.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(l){e=l}throw e}},tt=0,rr=function(e){return e!=null&&e.constructor===void 0},pe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Z({},this.state),typeof e=="function"&&(e=e(Z({},r),this.props)),e&&Z(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Je(this))},pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Je(this))},pe.prototype.render=H,Y=[],rt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ot=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,Re=Math.random().toString(8),ce="__d"+Re,ie="__a"+Re,nt=/(PointerCapture)$|Capture$/i,Pe=0,Ee=et(!1),Me=et(!0),or=0;var ne,I,Ie,pt,se=0,yt=[],D=B,ut=D.__b,ft=D.__r,mt=D.diffed,bt=D.__c,ht=D.unmount,gt=D.__;function ve(e,t){D.__h&&D.__h(I,e,se||t),se=0;var r=I.__H||(I.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return se=1,dr(xt,e)}function dr(e,t,r){var n=ve(ne++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):xt(void 0,t),function(l){var m=n.__N?n.__N[0]:n.__[0],c=n.t(m,l);m!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=I,!I.__f)){var a=function(l,m,c){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(v){return v.__c});if(b.every(function(v){return!v.__N}))return!i||i.call(this,l,m,c);var d=n.__c.props!==l;return b.some(function(v){if(v.__N){var g=v.__[0];v.__=v.__N,v.__N=void 0,g!==v.__[0]&&(d=!0)}}),i&&i.call(this,l,m,c)||d};I.__f=!0;var i=I.shouldComponentUpdate,s=I.componentWillUpdate;I.componentWillUpdate=function(l,m,c){if(this.__e){var b=i;i=void 0,a(l,m,c),i=b}s&&s.call(this,l,m,c)},I.shouldComponentUpdate=a}return n.__N||n.__}function W(e,t){var r=ve(ne++,3);!D.__s&&We(r.__H,t)&&(r.__=e,r.u=t,I.__H.__h.push(r))}function De(e,t){var r=ve(ne++,4);!D.__s&&We(r.__H,t)&&(r.__=e,r.u=t,I.__h.push(r))}function K(e){return se=5,Q(function(){return{current:e}},[])}function Q(e,t){var r=ve(ne++,7);return We(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function _t(e,t){return se=8,Q(function(){return e},t)}function pr(){for(var e;e=yt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ge),t.__h.some($e),t.__h=[]}catch(r){t.__h=[],D.__e(r,e.__v)}}}D.__b=function(e){I=null,ut&&ut(e)},D.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),gt&&gt(e,t)},D.__r=function(e){ft&&ft(e),ne=0;var t=(I=e.__c).__H;t&&(Ie===I?(t.__h=[],I.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(ge),t.__h.some($e),t.__h=[],ne=0)),Ie=I},D.diffed=function(e){mt&&mt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(yt.push(t)!==1&&pt===D.requestAnimationFrame||((pt=D.requestAnimationFrame)||ur)(pr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ie=I=null},D.__c=function(e,t){t.some(function(r){try{r.__h.some(ge),r.__h=r.__h.filter(function(n){return!n.__||$e(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],D.__e(n,r.__v)}}),bt&&bt(e,t)},D.unmount=function(e){ht&&ht(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{ge(n)}catch(a){t=a}}),r.__H=void 0,t&&D.__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 ge(e){var t=I,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),I=t}function $e(e){var t=I;e.__c=e.__(),I=t}function We(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,l,m=t;if("ref"in m)for(l in m={},t)l=="ref"?s=t[l]:m[l]=t[l];var c={type:e,props:m,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(l in s)m[l]===void 0&&(m[l]=s[l]);return B.vnode&&B.vnode(c),c}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",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),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 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)}`}function Ke(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 ye({api:e,externalId:t,reportId:r,strings:n,onBack:a,canModerate:i=!0,variant:s="modal"}){var j,U,O;let[l,m]=R(null),[c,b]=R(null),[d,v]=R(""),[g,S]=R(!1),[_,x]=R(!1),[u,f]=R(!1),p=K(!0),y=async()=>{try{let E=await e.getReport(r,t);if(!p.current)return;m(E),b(null)}catch(E){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",E),!p.current)return;b("load_failed")}};W(()=>{p.current=!0,y();let E=setInterval(()=>{y()},hr);return()=>{p.current=!1,clearInterval(E)}},[r,t]);let C=async()=>{if(!(!d.trim()||g)){S(!0);try{let E=`${r}:${Date.now()}`,X=await e.addComment(r,t,d.trim(),E);if(!p.current)return;v(""),m(q=>q&&{...q,comments:gr(q.comments,X)}),y()}catch(E){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",E),!p.current)return;b(n["detail.send_failed"])}finally{p.current&&S(!1)}}},L=async()=>{if(!(_||u)){x(!0);try{let E=await e.closeAsResolved(r,t);if(!p.current)return;m(E)}catch(E){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",E),!p.current)return;b(n["detail.close_failed"])}finally{p.current&&x(!1)}}},M=async()=>{if(!(_||u)){f(!0);try{let E=await e.reopenUnresolved(r,t);if(!p.current)return;m(E)}catch(E){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",E),!p.current)return;b(n["detail.reopen_failed"])}finally{p.current&&f(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:n["mine.loading"]});if(!l)return o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:n["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:n["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.load_failed.cta"]]})]});let F=(j=l.is_mine)!=null?j:i,z=F&&l.status==="awaiting_validation",A=F;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--${l.status}`,children:(U=n[`status.${l.status}`])!=null?U:l.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--${l.status}`,children:(O=n[`status.${l.status}`])!=null?O:l.status})]}),o("div",{class:"report-detail-body",children:[o(vr,{detail:l,strings:n}),o("p",{class:"report-detail-description",children:l.description}),l.screenshot_url&&(()=>{let E=Ke(l.screenshot_url);return E?o("a",{class:"report-detail-screenshot",href:E,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})})})(),o("h3",{class:"report-detail-section",children:n["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:n["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(E=>o("li",{children:o(wt,{comment:E,strings:n})}))}),l.status_history&&l.status_history.length>0&&o(Er,{rows:l.status_history,strings:n}),l.technical_context&&o(xr,{ctx:l.technical_context,strings:n}),A?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:n["detail.compose_placeholder"],onInput:E=>v(E.target.value),disabled:g}),o("div",{class:"report-compose-actions",children:[z&&o("button",{type:"button",class:"btn",onClick:L,disabled:_||u,children:_?n["detail.close_busy"]:n["detail.close_cta"]}),z&&o("button",{type:"button",class:"btn btn--ghost",onClick:M,disabled:_||u,children:u?n["detail.reopen_busy"]:n["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:C,disabled:!d.trim()||g,children:g?n["detail.compose_sending"]:n["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:n["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}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=Ke(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:ae(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:ae(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 c,b,d;let r=(c=e.errors)!=null?c:[],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 l=r.length,m=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===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:m}),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:ae(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 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,l;let n=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,a=(l=t[`status.${r.to_status}`])!=null?l: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]=C({}),[i,s]=C(null),[l,f]=C(null),[c,b]=C(!0),[d,y]=C(null),[g,k]=C(null),[_,v]=C(0),p=J(()=>{var x,R,L,T,F,P;return((R=(x=n.status)==null?void 0:x.length)!=null?R:0)+((T=(L=n.type)==null?void 0:L.length)!=null?T:0)+((P=(F=n.severity)==null?void 0:F.length)!=null?P:0)+(n.q?1:0)+(n.mine?1:0)},[n]);D(()=>{let x=!1,R=null,L=async()=>{try{let[T,F]=await Promise.all([e.listBoard(t,n),e.fetchBoardKpis(t,n)]);if(x)return;s(T),f(F),y(null)}catch(T){if(x)return;y(T instanceof Error?T.message:String(T))}finally{x||b(!1),x||(R=setTimeout(L,Mr))}};return b(!0),L(),()=>{x=!0,R&&clearTimeout(R)}},[e,t,Ur(n)]);let u=J(()=>{var x;return!g||!i?null:(x=i.results.find(R=>R.id===g))!=null?x:null},[g,i]),m=x=>{k(x.id),v(R=>R+1)};return o("div",{class:"board-view",children:[o(Br,{strings:r,kpis:l}),o(Fr,{filters:n,onChange:a,activeCount:p,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":c&&!i,children:[d&&o("div",{class:"board-error",children:r["board.list.error"]}),!d&&c&&!i&&o(Dr,{}),!d&&i&&i.results.length===0&&!c&&o($r,{strings:r}),!d&&i&&i.results.length>0&&o(Ar,{rows:i.results,selectedId:g,onPick:m,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${u?"has-selection":""}`,children:u?o(ye,{api:e,externalId:t,reportId:u.id,strings:r,onBack:()=>k(null),canModerate:u.is_mine,variant:"board"},_):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,l,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=(l=e==null?void 0:e.by_status)==null?void 0:l.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(c=>o("div",{class:`board-kpi-card ${c.tone}`,children:[o("div",{class:"board-kpi-value",children:c.value}),o("div",{class:"board-kpi-label",children:c.label})]},c.key))})}function Fr({filters:e,onChange:t,activeCount:r,strings:n}){var b,d,y,g,k,_,v;let a=p=>{if(p===""){let{status:u,...m}=e;t(m)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:u,...m}=e;t(m)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:u,...m}=e;t(m)}else t({...e,severity:[p]})},l=p=>t({...e,q:p}),f=()=>{if(e.mine){let{mine:p,...u}=e;t(u)}else t({...e,mine:!0})},c=()=>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:(g=(y=e.type)==null?void 0:y[0])!=null?g:"",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:(_=(k=e.severity)==null?void 0:k[0])!=null?_:"",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:(v=e.q)!=null?v:"",onInput:p=>l(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:c,children:[o(Wr,{}),n["board.filter.clear"]]})]})}function Ar({rows:e,selectedId:t,onPick:r,strings:n,total:a}){return o(U,{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 Dr(){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 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 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 _e({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]=C(null),[s,l]=C(null),[f,c]=C(!1),b=W(!0),d=async()=>{c(!0),l(null);try{let _=await e.listChangelog(t);if(!b.current)return;i(_)}catch(_){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",_),!b.current)return;l(r["mine.error"])}finally{b.current&&c(!1)}};D(()=>{b.current=!0,d();let _=setInterval(()=>{d()},Zr);return()=>{b.current=!1,clearInterval(_)}},[t]);let y=J(()=>a?Jr(a):[],[a]),g=a===null&&!s,k=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"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),k&&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(_=>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}",_.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[_.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(_.rows.length))})]}),o("ul",{class:"mine-rows",children:_.rows.map(v=>o("li",{children:o(_e,{row:v,strings:r,onClick:()=>n(v)})}))})]},_.weekKey))})]})}function eo(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:[o("path",{d:"m8 2 1.88 1.88"}),o("path",{d:"M14.12 3.88 16 2"}),o("path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"}),o("path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"}),o("path",{d:"M12 20v-9"}),o("path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5"}),o("path",{d:"M6 13H2"}),o("path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4"}),o("path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4"}),o("path",{d:"M22 13h-4"}),o("path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4"})]})}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(xe(t.x,t.w),xe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&oo(e,t,r);e.restore()}function xe(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=xe(t.x,t.w),a=xe(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let f=a;f<a+s;f+=l)for(let c=n;c<n+i;c+=l){let b=Math.min(l,n+i-c),d=Math.min(l,a+s-f);e.drawImage(r,c,f,b,d,c,f,b,d)}e.imageSmoothingEnabled=!1;for(let f=a;f<a+s;f+=l)for(let c=n;c<n+i;c+=l){let b=Math.min(l,n+i-c),d=Math.min(l,a+s-f);e.drawImage(r,c,f,1,1,c,f,b,d)}e.imageSmoothingEnabled=!0}var V={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),[l,f]=C("rectangle"),[c,b]=C(Mt[0]),[d,y]=C([]),[g,k]=C([]),[_,v]=C([]),p=W(!1),[u,m]=C(null),[x,R]=C(!1),[L,T]=C(!1),F=W(1);function P(h){y(w=>(k(E=>[...E,w]),[...w,h])),v([])}function K(){y(h=>(k(w=>[...w,h]),[])),v([])}function B(){k(h=>{if(h.length===0)return h;let w=h[h.length-1];return y(E=>(v(M=>[E,...M]),w)),h.slice(0,-1)})}function O(){v(h=>{if(h.length===0)return h;let w=h[0];return y(E=>(k(M=>[...M,E]),w)),h.slice(1)})}De(()=>{let h=w=>{w.key==="Escape"&&(w.stopPropagation(),n())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),D(()=>{let h=w=>{if(!(w.metaKey||w.ctrlKey))return;let M=w.key.toLowerCase();M==="z"?(w.preventDefault(),w.stopPropagation(),w.shiftKey?O():B()):M==="y"&&(w.preventDefault(),w.stopPropagation(),O())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[g,_,d]),D(()=>{let h=URL.createObjectURL(e),w=new Image;return w.onload=()=>{s.current=w,R(!0)},w.src=h,()=>URL.revokeObjectURL(h)},[e]),De(()=>{if(!x||!a.current||!s.current||!i.current)return;let h=s.current,E=i.current.clientWidth-16,M=window.innerHeight*.65,q=Math.min(E/h.width,M/h.height,1);F.current=q;let ee=a.current;ee.width=h.width,ee.height=h.height,ee.style.width=`${h.width*q}px`,ee.style.height=`${h.height*q}px`,N()},[x]),D(()=>{N()},[d,u]);function N(){let h=a.current,w=s.current;if(!h||!w)return;let E=h.getContext("2d");if(E){E.clearRect(0,0,h.width,h.height),E.drawImage(w,0,0);for(let M of d)Tt(E,M,w);u&&Tt(E,u,w)}}function H(h){let E=a.current.getBoundingClientRect();return{x:(h.clientX-E.left)/F.current,y:(h.clientY-E.top)/F.current}}let Z=h=>{if(!x)return;let{x:w,y:E}=H(h),M=a.current.width,q=Math.max(3,Math.round(M/400)),ee=Math.max(8,Math.round(M/80));if(l==="text"){let Se=window.prompt(t["annotator.text_prompt"]);Se&&Se.trim()&&P({kind:"text",x:w,y:E,text:Se.trim(),color:c,fontSize:Math.max(16,Math.round(M/50)),lineWidth:1});return}p.current=!0,l==="rectangle"?m({kind:"rectangle",x:w,y:E,w:0,h:0,color:c,lineWidth:q}):l==="arrow"?m({kind:"arrow",x1:w,y1:E,x2:w,y2:E,color:c,lineWidth:q}):l==="freehand"?m({kind:"freehand",points:[{x:w,y:E}],color:c,lineWidth:q}):l==="highlight"?m({kind:"highlight",x:w,y:E,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&m({kind:"blur",x:w,y:E,w:0,h:0,color:"#000000",lineWidth:0,tile:ee})},ae=h=>{if(!p.current)return;let{x:w,y:E}=H(h);m(M=>M&&(M.kind==="rectangle"||M.kind==="highlight"||M.kind==="blur"?{...M,w:w-M.x,h:E-M.y}:M.kind==="arrow"?{...M,x2:w,y2:E}:M.kind==="freehand"?{...M,points:[...M.points,{x:w,y:E}]}:M))},ke=()=>{m(h=>(p.current&&h&&((h.kind==="rectangle"||h.kind==="highlight"||h.kind==="blur")&&Math.abs(h.w)<4&&Math.abs(h.h)<4||h.kind==="arrow"&&Math.hypot(h.x2-h.x1,h.y2-h.y1)<4||h.kind==="freehand"&&h.points.length<3||P(h)),null)),p.current=!1},S=async()=>{let h=a.current;if(h){T(!0);try{let w=await new Promise(E=>h.toBlob(E,"image/png",.92));w&&r(w)}finally{T(!1)}}},I=[{id:"rectangle",icon:V.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:V.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:V.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:V.text,label:t["annotator.tool.text"]},{id:"highlight",icon:V.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:V.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:h=>{h.target===h.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:V.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:I.map(h=>o("button",{type:"button",onClick:()=>f(h.id),title:h.label,"aria-label":h.label,"aria-pressed":l===h.id,class:`annotator-tool ${l===h.id?"is-active":""}`,children:h.icon},h.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Mt.map(h=>o("button",{type:"button",onClick:()=>b(h),"aria-label":h,"aria-pressed":c===h,class:`annotator-color ${c===h?"is-active":""}`,style:{backgroundColor:h}},h)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:h=>b(h.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:B,disabled:g.length===0,title:t["annotator.undo"],children:[V.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:O,disabled:_.length===0,title:t["annotator.redo"],children:[V.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:K,disabled:d.length===0,children:[V.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:x?o("canvas",{ref:a,onMouseDown:Z,onMouseMove:ae,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:S,disabled:L||!x,children:L?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]=C(""),[l,f]=C("bug"),[c,b]=C("medium"),[d,y]=C(""),[g,k]=C(null),[_,v]=C(null),[p,u]=C(!1),[m,x]=C(!1),R=W(null),L=W(null),T=n==="submitting",F=T?e["form.submitting"]:e["form.submit"],P=typeof window!="undefined"?window.location.href:"";D(()=>()=>{_&&URL.revokeObjectURL(_)},[_]);let K=S=>{if(y(""),S instanceof File){let I=kt(S);if(I){y(I.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(I.maxMb)));return}}_&&URL.revokeObjectURL(_),k(S),v(URL.createObjectURL(S))},B=()=>{_&&URL.revokeObjectURL(_),v(null),k(null),y(""),R.current&&(R.current.value="")},O=S=>{var h;let I=(h=S.target.files)==null?void 0:h[0];I&&K(I)},N=S=>{S.preventDefault(),S.stopPropagation(),u(!0)},H=S=>{S.preventDefault(),S.stopPropagation(),S.currentTarget===S.target&&u(!1)},Z=S=>{var h,w;S.preventDefault(),S.stopPropagation(),u(!1);let I=(w=(h=S.dataTransfer)==null?void 0:h.files)==null?void 0:w[0];I&&K(I)};D(()=>{let S=L.current;if(!S)return;let I=h=>{var E;let w=(E=h.clipboardData)==null?void 0:E.items;if(w){for(let M of Array.from(w))if(M.kind==="file"&&M.type.startsWith("image/")){let q=M.getAsFile();if(q){h.preventDefault(),K(q);return}}}};return S.addEventListener("paste",I),()=>S.removeEventListener("paste",I)},[_]);let ae=S=>{_&&URL.revokeObjectURL(_),k(S),v(URL.createObjectURL(S)),x(!1)};return o("form",{onSubmit:S=>{if(S.preventDefault(),!i.trim()){y(e["form.description.required"]);return}y("");let I={description:i.trim(),feedback_type:l,severity:c};g&&(I.screenshot=g,I.capture_method="manual"),t(I)},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:S=>s(S.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:l,onChange:S=>f(S.target.value),children:no.map(S=>o("option",{value:S,children:e[`type.${S}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:S=>b(S.target.value),children:ao.map(S=>o("option",{value:S,children:e[`severity.${S}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:R,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:O,"aria-hidden":"true",tabIndex:-1}),_?o("div",{class:"screenshot-preview",children:[o("img",{src:_,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>x(!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:B,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:L,class:`screenshot-dropzone ${p?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var S;return(S=R.current)==null?void 0:S.click()},onKeyDown:S=>{var I;(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),(I=R.current)==null||I.click())},onDragOver:N,onDragLeave:H,onDrop:Z,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"]})]})]}),P&&o("div",{class:"page-context",title:P,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ne(P,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:T,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:T,children:F})]}),m&&g&&o(Pt,{imageBlob:g,strings:e,onCancel:()=>x(!1),onSave:ae})]})}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(l=>{let f=t===l.key,c=f?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${f?" is-active":""}`,onClick:()=>r(c),"aria-pressed":f,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var co=3e4;function Ft({api:e,externalId:t,strings:r,onSelect:n}){var u;let[a,i]=C(null),[s,l]=C(null),[f,c]=C(!1),[b,d]=C("all"),y=W(!0),g=async()=>{c(!0),l(null);try{let m=await e.listMine(t);if(!y.current)return;i(m)}catch(m){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",m),!y.current)return;l(r["mine.error"])}finally{y.current&&c(!1)}};D(()=>{y.current=!0,g();let m=setInterval(()=>{g()},co);return()=>{y.current=!1,clearInterval(m)}},[t]);let k=a!==null&&a.length===0,_=a===null&&!s,v=a?Bt(a,b):null,p=!!a&&a.length>0&&((u=v==null?void 0:v.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:()=>{g()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),a&&a.length>0&&o(Lt,{rows:a,filter:b,onFilter:d,strings:r}),_&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),k&&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"]})}),v&&v.length>0&&o("ul",{class:"mine-rows",children:v.map(m=>o("li",{children:o(_e,{row:m,strings:r,onClick:()=>n(m)})}))})]})}function At({onDismiss:e,children:t,closeLabel:r="Close",expanded:n=!1}){let a=W(null),i=W(null);return D(()=>{var f;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let b=(d=a.current)==null?void 0:d.getRootNode();b instanceof ShadowRoot&&b.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(f=a.current)==null?void 0:f.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let c=i.current;c&&typeof c.focus=="function"&&c.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=`
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,l;let n=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,a=(l=t[`status.${r.to_status}`])!=null?l: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),[l,m]=R(null),[c,b]=R(!0),[d,v]=R(null),[g,S]=R(null),[_,x]=R(0),u=Q(()=>{var y,C,L,M,F,z;return((C=(y=n.status)==null?void 0:y.length)!=null?C:0)+((M=(L=n.type)==null?void 0:L.length)!=null?M:0)+((z=(F=n.severity)==null?void 0:F.length)!=null?z:0)+(n.q?1:0)+(n.mine?1:0)},[n]);W(()=>{let y=!1,C=null,L=async()=>{try{let[M,F]=await Promise.all([e.listBoard(t,n),e.fetchBoardKpis(t,n)]);if(y)return;s(M),m(F),v(null)}catch(M){if(y)return;v(M instanceof Error?M.message:String(M))}finally{y||b(!1),y||(C=setTimeout(L,Mr))}};return b(!0),L(),()=>{y=!0,C&&clearTimeout(C)}},[e,t,Nr(n)]);let f=Q(()=>{var y;return!g||!i?null:(y=i.results.find(C=>C.id===g))!=null?y:null},[g,i]),p=y=>{S(y.id),x(C=>C+1)};return o("div",{class:"board-view",children:[o(Br,{strings:r,kpis:l}),o(Fr,{filters:n,onChange:a,activeCount:u,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":c&&!i,children:[d&&o("div",{class:"board-error",children:r["board.list.error"]}),!d&&c&&!i&&o(Dr,{}),!d&&i&&i.results.length===0&&!c&&o($r,{strings:r}),!d&&i&&i.results.length>0&&o(Ar,{rows:i.results,selectedId:g,onPick:p,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${f?"has-selection":""}`,children:f?o(ye,{api:e,externalId:t,reportId:f.id,strings:r,onBack:()=>S(null),canModerate:f.is_mine,variant:"board"},_):o("div",{class:"board-detail-empty",children:[o(Ur,{}),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,l,m;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((m=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?m: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(c=>o("div",{class:`board-kpi-card ${c.tone}`,children:[o("div",{class:"board-kpi-value",children:c.value}),o("div",{class:"board-kpi-label",children:c.label})]},c.key))})}function Fr({filters:e,onChange:t,activeCount:r,strings:n}){var b,d,v,g,S,_,x;let a=u=>{if(u===""){let{status:f,...p}=e;t(p)}else t({...e,status:[u]})},i=u=>{if(u===""){let{type:f,...p}=e;t(p)}else t({...e,type:[u]})},s=u=>{if(u===""){let{severity:f,...p}=e;t(p)}else t({...e,severity:[u]})},l=u=>t({...e,q:u}),m=()=>{if(e.mine){let{mine:u,...f}=e;t(f)}else t({...e,mine:!0})},c=()=>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:u=>a(u.target.value),children:[o("option",{value:"",children:n["board.filter.status"]}),Tr.map(u=>{var f;return o("option",{value:u,children:(f=n[`board.kpi.${u}`])!=null?f:u},u)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.type"],value:(g=(v=e.type)==null?void 0:v[0])!=null?g:"",onChange:u=>i(u.target.value),children:[o("option",{value:"",children:n["board.filter.type"]}),Pr.map(u=>{var f;return o("option",{value:u,children:(f=n[`type.${u}`])!=null?f:u},u)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.severity"],value:(_=(S=e.severity)==null?void 0:S[0])!=null?_:"",onChange:u=>s(u.target.value),children:[o("option",{value:"",children:n["board.filter.severity"]}),zr.map(u=>{var f;return o("option",{value:u,children:(f=n[`severity.${u}`])!=null?f:u},u)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:n["board.filter.search.placeholder"],value:(x=e.q)!=null?x:"",onInput:u=>l(u.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:m}),o("span",{children:n["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:c,children:[o(Kr,{}),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(Wr,{})," ",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 Dr(){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 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("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 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("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 Ur(){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 Nr(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 _e({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,l]=R(null),[m,c]=R(!1),b=K(!0),d=async()=>{c(!0),l(null);try{let _=await e.listChangelog(t);if(!b.current)return;i(_)}catch(_){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",_),!b.current)return;l(r["mine.error"])}finally{b.current&&c(!1)}};W(()=>{b.current=!0,d();let _=setInterval(()=>{d()},Zr);return()=>{b.current=!1,clearInterval(_)}},[t]);let v=Q(()=>a?Jr(a):[],[a]),g=a===null&&!s,S=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:m,children:m?r["mine.loading"]:r["mine.refresh"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),S&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),v.length>0&&o("div",{class:"changelog-groups",children:v.map(_=>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}",_.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[_.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(_.rows.length))})]}),o("ul",{class:"mine-rows",children:_.rows.map(x=>o("li",{children:o(_e,{row:x,strings:r,onClick:()=>n(x)})}))})]},_.weekKey))})]})}function eo(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:[o("path",{d:"m8 2 1.88 1.88"}),o("path",{d:"M14.12 3.88 16 2"}),o("path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"}),o("path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"}),o("path",{d:"M12 20v-9"}),o("path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5"}),o("path",{d:"M6 13H2"}),o("path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4"}),o("path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4"}),o("path",{d:"M22 13h-4"}),o("path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4"})]})}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(xe(t.x,t.w),xe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&oo(e,t,r);e.restore()}function xe(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=xe(t.x,t.w),a=xe(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let m=a;m<a+s;m+=l)for(let c=n;c<n+i;c+=l){let b=Math.min(l,n+i-c),d=Math.min(l,a+s-m);e.drawImage(r,c,m,b,d,c,m,b,d)}e.imageSmoothingEnabled=!1;for(let m=a;m<a+s;m+=l)for(let c=n;c<n+i;c+=l){let b=Math.min(l,n+i-c),d=Math.min(l,a+s-m);e.drawImage(r,c,m,1,1,c,m,b,d)}e.imageSmoothingEnabled=!0}var G={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=K(null),i=K(null),s=K(null),[l,m]=R("rectangle"),[c,b]=R(Mt[0]),[d,v]=R([]),[g,S]=R([]),[_,x]=R([]),u=K(!1),[f,p]=R(null),[y,C]=R(!1),[L,M]=R(!1),F=K(1);function z(h){v(w=>(S(T=>[...T,w]),[...w,h])),x([])}function A(){v(h=>(S(w=>[...w,h]),[])),x([])}function j(){S(h=>{if(h.length===0)return h;let w=h[h.length-1];return v(T=>(x(P=>[T,...P]),w)),h.slice(0,-1)})}function U(){x(h=>{if(h.length===0)return h;let w=h[0];return v(T=>(S(P=>[...P,T]),w)),h.slice(1)})}De(()=>{let h=w=>{w.key==="Escape"&&(w.stopPropagation(),n())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),W(()=>{let h=w=>{if(!(w.metaKey||w.ctrlKey))return;let P=w.key.toLowerCase();P==="z"?(w.preventDefault(),w.stopPropagation(),w.shiftKey?U():j()):P==="y"&&(w.preventDefault(),w.stopPropagation(),U())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[g,_,d]),W(()=>{let h=URL.createObjectURL(e),w=new Image;return w.onload=()=>{s.current=w,C(!0)},w.src=h,()=>URL.revokeObjectURL(h)},[e]),De(()=>{if(!y||!a.current||!s.current||!i.current)return;let h=s.current,T=i.current.clientWidth-16,P=window.innerHeight*.65,V=Math.min(T/h.width,P/h.height,1);F.current=V;let te=a.current;te.width=h.width,te.height=h.height,te.style.width=`${h.width*V}px`,te.style.height=`${h.height*V}px`,O()},[y]),W(()=>{O()},[d,f]);function O(){let h=a.current,w=s.current;if(!h||!w)return;let T=h.getContext("2d");if(T){T.clearRect(0,0,h.width,h.height),T.drawImage(w,0,0);for(let P of d)Tt(T,P,w);f&&Tt(T,f,w)}}function E(h){let T=a.current.getBoundingClientRect();return{x:(h.clientX-T.left)/F.current,y:(h.clientY-T.top)/F.current}}let X=h=>{if(!y)return;let{x:w,y:T}=E(h),P=a.current.width,V=Math.max(3,Math.round(P/400)),te=Math.max(8,Math.round(P/80));if(l==="text"){let Se=window.prompt(t["annotator.text_prompt"]);Se&&Se.trim()&&z({kind:"text",x:w,y:T,text:Se.trim(),color:c,fontSize:Math.max(16,Math.round(P/50)),lineWidth:1});return}u.current=!0,l==="rectangle"?p({kind:"rectangle",x:w,y:T,w:0,h:0,color:c,lineWidth:V}):l==="arrow"?p({kind:"arrow",x1:w,y1:T,x2:w,y2:T,color:c,lineWidth:V}):l==="freehand"?p({kind:"freehand",points:[{x:w,y:T}],color:c,lineWidth:V}):l==="highlight"?p({kind:"highlight",x:w,y:T,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&p({kind:"blur",x:w,y:T,w:0,h:0,color:"#000000",lineWidth:0,tile:te})},q=h=>{if(!u.current)return;let{x:w,y:T}=E(h);p(P=>P&&(P.kind==="rectangle"||P.kind==="highlight"||P.kind==="blur"?{...P,w:w-P.x,h:T-P.y}:P.kind==="arrow"?{...P,x2:w,y2:T}:P.kind==="freehand"?{...P,points:[...P.points,{x:w,y:T}]}:P))},ke=()=>{p(h=>(u.current&&h&&((h.kind==="rectangle"||h.kind==="highlight"||h.kind==="blur")&&Math.abs(h.w)<4&&Math.abs(h.h)<4||h.kind==="arrow"&&Math.hypot(h.x2-h.x1,h.y2-h.y1)<4||h.kind==="freehand"&&h.points.length<3||z(h)),null)),u.current=!1},k=async()=>{let h=a.current;if(h){M(!0);try{let w=await new Promise(T=>h.toBlob(T,"image/png",.92));w&&r(w)}finally{M(!1)}}},$=[{id:"rectangle",icon:G.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:G.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:G.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:G.text,label:t["annotator.tool.text"]},{id:"highlight",icon:G.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:G.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:h=>{h.target===h.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:G.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:$.map(h=>o("button",{type:"button",onClick:()=>m(h.id),title:h.label,"aria-label":h.label,"aria-pressed":l===h.id,class:`annotator-tool ${l===h.id?"is-active":""}`,children:h.icon},h.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Mt.map(h=>o("button",{type:"button",onClick:()=>b(h),"aria-label":h,"aria-pressed":c===h,class:`annotator-color ${c===h?"is-active":""}`,style:{backgroundColor:h}},h)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:h=>b(h.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:j,disabled:g.length===0,title:t["annotator.undo"],children:[G.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:U,disabled:_.length===0,title:t["annotator.redo"],children:[G.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:A,disabled:d.length===0,children:[G.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:y?o("canvas",{ref:a,onMouseDown:X,onMouseMove:q,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:L||!y,children:L?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(""),[l,m]=R("bug"),[c,b]=R("medium"),[d,v]=R(""),[g,S]=R(null),[_,x]=R(null),[u,f]=R(!1),[p,y]=R(!1),C=K(null),L=K(null),M=n==="submitting",F=M?e["form.submitting"]:e["form.submit"],z=typeof window!="undefined"?window.location.href:"";W(()=>()=>{_&&URL.revokeObjectURL(_)},[_]);let A=k=>{if(v(""),k instanceof File){let $=kt(k);if($){v($.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String($.maxMb)));return}}_&&URL.revokeObjectURL(_),S(k),x(URL.createObjectURL(k))},j=()=>{_&&URL.revokeObjectURL(_),x(null),S(null),v(""),C.current&&(C.current.value="")},U=k=>{var h;let $=(h=k.target.files)==null?void 0:h[0];$&&A($)},O=k=>{k.preventDefault(),k.stopPropagation(),f(!0)},E=k=>{k.preventDefault(),k.stopPropagation(),k.currentTarget===k.target&&f(!1)},X=k=>{var h,w;k.preventDefault(),k.stopPropagation(),f(!1);let $=(w=(h=k.dataTransfer)==null?void 0:h.files)==null?void 0:w[0];$&&A($)};W(()=>{let k=L.current;if(!k)return;let $=h=>{var T;let w=(T=h.clipboardData)==null?void 0:T.items;if(w){for(let P of Array.from(w))if(P.kind==="file"&&P.type.startsWith("image/")){let V=P.getAsFile();if(V){h.preventDefault(),A(V);return}}}};return k.addEventListener("paste",$),()=>k.removeEventListener("paste",$)},[_]);let q=k=>{_&&URL.revokeObjectURL(_),S(k),x(URL.createObjectURL(k)),y(!1)};return o("form",{onSubmit:k=>{if(k.preventDefault(),!i.trim()){v(e["form.description.required"]);return}v("");let $={description:i.trim(),feedback_type:l,severity:c};g&&($.screenshot=g,$.capture_method="manual"),t($)},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:l,onChange:k=>m(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:c,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:C,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:U,"aria-hidden":"true",tabIndex:-1}),_?o("div",{class:"screenshot-preview",children:[o("img",{src:_,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>y(!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:j,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:L,class:`screenshot-dropzone ${u?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var k;return(k=C.current)==null?void 0:k.click()},onKeyDown:k=>{var $;(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),($=C.current)==null||$.click())},onDragOver:O,onDragLeave:E,onDrop:X,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"]})]})]}),z&&o("div",{class:"page-context",title:z,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ae(z,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:M,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:M,children:F})]}),p&&g&&o(Pt,{imageBlob:g,strings:e,onCancel:()=>y(!1),onSave:q})]})}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(l=>{let m=t===l.key,c=m?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${m?" is-active":""}`,onClick:()=>r(c),"aria-pressed":m,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var co=3e4;function Ft({api:e,externalId:t,strings:r,onSelect:n}){var f;let[a,i]=R(null),[s,l]=R(null),[m,c]=R(!1),[b,d]=R("all"),v=K(!0),g=async()=>{c(!0),l(null);try{let p=await e.listMine(t);if(!v.current)return;i(p)}catch(p){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",p),!v.current)return;l(r["mine.error"])}finally{v.current&&c(!1)}};W(()=>{v.current=!0,g();let p=setInterval(()=>{g()},co);return()=>{v.current=!1,clearInterval(p)}},[t]);let S=a!==null&&a.length===0,_=a===null&&!s,x=a?Bt(a,b):null,u=!!a&&a.length>0&&((f=x==null?void 0:x.length)!=null?f: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:()=>{g()},disabled:m,children:m?r["mine.loading"]:r["mine.refresh"]})]}),a&&a.length>0&&o(Lt,{rows:a,filter:b,onFilter:d,strings:r}),_&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),S&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),u&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),x&&x.length>0&&o("ul",{class:"mine-rows",children:x.map(p=>o("li",{children:o(_e,{row:p,strings:r,onClick:()=>n(p)})}))})]})}function At({onDismiss:e,children:t,closeLabel:r="Close",expanded:n=!1}){let a=K(null),i=K(null);return W(()=>{var m;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let b=(d=a.current)==null?void 0:d.getRootNode();b instanceof ShadowRoot&&b.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(m=a.current)==null?void 0:m.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let c=i.current;c&&typeof c.focus=="function"&&c.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;
@@ -1690,5 +1690,5 @@
1690
1690
  @media (prefers-reduced-motion: reduce) {
1691
1691
  .skeleton-line { animation: none; }
1692
1692
  }
1693
- `;function po(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}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(c){a=c,Ae(Be(f,{state:c}),n)}function l(c){let{selectedReportId:b,...d}=c;return d}function f({state:c}){var v;let b=_t(async p=>{s({...a,status:"submitting"});try{await e.onSubmit(p),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(u){typeof console!="undefined"&&console.warn("[mhosaic] submit:",u),s({...a,status:"error",error:e.strings["form.error"]})}},[]),d=(v=e.getExternalId)==null?void 0:v.call(e),[y,g]=C(!e.requiresVisibilityCheck);D(()=>{if(!e.requiresVisibilityCheck){g(!0);return}if(!d||!e.checkVisibility){g(!1);return}let p=!1;return e.checkVisibility(d).then(u=>{p||g(u)}).catch(()=>{p||g(!1)}),()=>{p=!0}},[d]);let k=po(e,d,y),_=!!(e.api&&d);return o(U,{children:[k&&o(Et,{label:e.strings["fab.label"],onClick:()=>s({...a,open:!0})}),c.open&&o(At,{onDismiss:()=>s(l({...a,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:c.tab==="board",children:[_&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":c.tab==="send",class:`tab-button ${c.tab==="send"?"is-active":""}`,onClick:()=>s(l({...a,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="mine",class:`tab-button ${c.tab==="mine"?"is-active":""}`,onClick:()=>s(l({...a,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="changelog",class:`tab-button ${c.tab==="changelog"?"is-active":""}`,onClick:()=>s(l({...a,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="board",class:`tab-button tab-button--board ${c.tab==="board"?"is-active":""}`,onClick:()=>s(l({...a,tab:"board"})),children:e.strings["tab.board"]})]}),c.tab==="send"&&o(zt,{strings:e.strings,onSubmit:b,onCancel:()=>s({...a,open:!1,status:"idle"}),status:c.status,...c.error!==void 0&&{errorMessage:c.error}}),c.tab==="mine"&&e.api&&d&&!c.selectedReportId&&o(Ft,{api:e.api,externalId:d,strings:e.strings,onSelect:p=>s({...a,selectedReportId:p.id})}),(c.tab==="mine"||c.tab==="changelog")&&e.api&&d&&c.selectedReportId&&o(ye,{api:e.api,externalId:d,reportId:c.selectedReportId,strings:e.strings,onBack:()=>s(l({...a}))}),c.tab==="changelog"&&e.api&&d&&!c.selectedReportId&&o(Rt,{api:e.api,externalId:d,strings:e.strings,onSelect:p=>s({...a,selectedReportId:p.id})}),c.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 g,k,_,v,p,u;let t=(g=e.env)!=null?g:"prod",r=(k=e.locale)!=null?k:typeof navigator!="undefined"?navigator.language:void 0,n=Ze((_=e.translations)!=null?_:{},r!==void 0?{locale:r}:{}),a=Xe({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(v=e.metadata)!=null?v:{},l=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=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let m=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;m==null||m.appendChild(c)}else document.body.appendChild(c);async function b(m){var P,K,B,O,N;let x=m.synthetic?void 0:m.screenshot,R=a.snapshot();if(i){let{userHash:H,exp:Z,...ae}=i;R.user=ae}s&&Object.keys(s).length>0&&(R.metadata={...s});let L=x?(P=m.capture_method)!=null?P:"manual":"none",T={description:m.description,feedback_type:(K=m.feedback_type)!=null?K:"bug",severity:(B=m.severity)!=null?B:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:L,technical_context:R};T.widget_version="0.18.1",x&&(T.screenshot=x),m.synthetic&&(T.synthetic=!0),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(T.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let F=T;for(let H of f)F=await H(F);try{let H=await l.submitReport(F);return(O=e.onSubmitSuccess)==null||O.call(e,H),a.clear(),H}catch(H){let Z=H instanceof Error?H:new Error(String(H));throw(N=e.onError)==null||N.call(e,Z),Z}}let d=$t({host:c,strings:n,showFAB:(p=e.showFAB)!=null?p:!0,onSubmit:async m=>{await b(m)},api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(u=e.requiresVisibilityCheck)!=null?u:!1,checkVisibility:m=>l.checkVisibility(m,i==null?void 0:i.email)}),y={show(){d.open()},hide(){d.close()},open(m){d.open()},async submit(m){return b({description:m.description,...m.feedback_type!==void 0&&{feedback_type:m.feedback_type},...m.severity!==void 0&&{severity:m.severity},...m.synthetic!==void 0&&{synthetic:m.synthetic},...m.screenshot!==void 0&&{screenshot:m.screenshot}})},identify(m){i=m,d.notifyIdentityChanged()},setMetadata(m){s={...s,...m}},shutdown(){d.dispose(),a.dispose(),c.remove();let m=window;m.mhosaicFeedback===y&&delete m.mhosaicFeedback},_registerTransformer(m){f.push(m)}};return window.mhosaicFeedback=y,y}var Ht=window;function uo(){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 Q=null,Kt,Wt,we=(Wt=(Kt=Ht.Feedback)==null?void 0:Kt.q)!=null?Wt:[];function Nt(e){let[t,r]=e;if(t==="init"){if(Q)return;Q=He(r);return}if(!Q){we.push(e);return}t==="identify"?Q.identify(r):t==="setMetadata"?Q.setMetadata(r):t==="open"&&Q.open(r)}var Dt=uo();Dt&&(Q=He(Dt));for(;we.length>0;)Nt(we.shift());var fo=Object.assign(function(t,r){Nt([t,r])},{q:we});Ht.Feedback=fo;})();
1693
+ `;function po(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}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(c){a=c,Ae(Be(m,{state:c}),n)}function l(c){let{selectedReportId:b,...d}=c;return d}function m({state:c}){var x;let b=_t(async u=>{s({...a,status:"submitting"});try{await e.onSubmit(u),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(f){typeof console!="undefined"&&console.warn("[mhosaic] submit:",f),s({...a,status:"error",error:e.strings["form.error"]})}},[]),d=(x=e.getExternalId)==null?void 0:x.call(e),[v,g]=R(!e.requiresVisibilityCheck);W(()=>{if(!e.requiresVisibilityCheck){g(!0);return}if(!d||!e.checkVisibility){g(!1);return}let u=!1;return e.checkVisibility(d).then(f=>{u||g(f)}).catch(()=>{u||g(!1)}),()=>{u=!0}},[d]);let S=po(e,d,v),_=!!(e.api&&d);return o(H,{children:[S&&o(Et,{label:e.strings["fab.label"],onClick:()=>s({...a,open:!0})}),c.open&&o(At,{onDismiss:()=>s(l({...a,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:c.tab==="board",children:[_&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":c.tab==="send",class:`tab-button ${c.tab==="send"?"is-active":""}`,onClick:()=>s(l({...a,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="mine",class:`tab-button ${c.tab==="mine"?"is-active":""}`,onClick:()=>s(l({...a,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="changelog",class:`tab-button ${c.tab==="changelog"?"is-active":""}`,onClick:()=>s(l({...a,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="board",class:`tab-button tab-button--board ${c.tab==="board"?"is-active":""}`,onClick:()=>s(l({...a,tab:"board"})),children:e.strings["tab.board"]})]}),c.tab==="send"&&o(zt,{strings:e.strings,onSubmit:b,onCancel:()=>s({...a,open:!1,status:"idle"}),status:c.status,...c.error!==void 0&&{errorMessage:c.error}}),c.tab==="mine"&&e.api&&d&&!c.selectedReportId&&o(Ft,{api:e.api,externalId:d,strings:e.strings,onSelect:u=>s({...a,selectedReportId:u.id})}),(c.tab==="mine"||c.tab==="changelog")&&e.api&&d&&c.selectedReportId&&o(ye,{api:e.api,externalId:d,reportId:c.selectedReportId,strings:e.strings,onBack:()=>s(l({...a}))}),c.tab==="changelog"&&e.api&&d&&!c.selectedReportId&&o(Rt,{api:e.api,externalId:d,strings:e.strings,onSelect:u=>s({...a,selectedReportId:u.id})}),c.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 g,S,_,x,u,f;let t=(g=e.env)!=null?g:"prod",r=(S=e.locale)!=null?S:typeof navigator!="undefined"?navigator.language:void 0,n=Ze((_=e.translations)!=null?_:{},r!==void 0?{locale:r}:{}),a=Xe({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(x=e.metadata)!=null?x:{},l=Ue({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}}),m=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let p=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;p==null||p.appendChild(c)}else document.body.appendChild(c);async function b(p){var z,A,j,U,O;let y=p.synthetic?void 0:p.screenshot,C=a.snapshot();if(i){let{userHash:E,exp:X,...q}=i;C.user=q}s&&Object.keys(s).length>0&&(C.metadata={...s});let L=y?(z=p.capture_method)!=null?z:"manual":"none",M={description:p.description,feedback_type:(A=p.feedback_type)!=null?A:"bug",severity:(j=p.severity)!=null?j:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:L,technical_context:C};M.widget_version="0.19.0",y&&(M.screenshot=y),p.synthetic&&(M.synthetic=!0),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(M.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let F=M;for(let E of m)F=await E(F);try{let E=await l.submitReport(F);return(U=e.onSubmitSuccess)==null||U.call(e,E),a.clear(),E}catch(E){let X=E instanceof Error?E:new Error(String(E));throw(O=e.onError)==null||O.call(e,X),X}}let d=$t({host:c,strings:n,showFAB:(u=e.showFAB)!=null?u:!0,onSubmit:async p=>{await b(p)},api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(f=e.requiresVisibilityCheck)!=null?f:!1,checkVisibility:p=>l.checkVisibility(p,i==null?void 0:i.email)}),v={show(){d.open()},hide(){d.close()},open(p){d.open()},async submit(p){return b({description:p.description,...p.feedback_type!==void 0&&{feedback_type:p.feedback_type},...p.severity!==void 0&&{severity:p.severity},...p.synthetic!==void 0&&{synthetic:p.synthetic},...p.screenshot!==void 0&&{screenshot:p.screenshot}})},identify(p){i=p,d.notifyIdentityChanged()},setMetadata(p){s={...s,...p}},shutdown(){d.dispose(),a.dispose(),c.remove();let p=window;p.mhosaicFeedback===v&&delete p.mhosaicFeedback},_registerTransformer(p){m.push(p)}};return window.mhosaicFeedback=v,v}var Ht=window;function uo(){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 ee=null,Wt,Kt,we=(Kt=(Wt=Ht.Feedback)==null?void 0:Wt.q)!=null?Kt:[];function Ut(e){let[t,r]=e;if(t==="init"){if(ee)return;ee=He(r);return}if(!ee){we.push(e);return}t==="identify"?ee.identify(r):t==="setMetadata"?ee.setMetadata(r):t==="open"&&ee.open(r)}var Dt=uo();Dt&&(ee=He(Dt));for(;we.length>0;)Ut(we.shift());var fo=Object.assign(function(t,r){Ut([t,r])},{q:we});Ht.Feedback=fo;})();
1694
1694
  //# sourceMappingURL=embed.min.js.map