1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/pdf-export-DY6PY77w.js","assets/index-Bkg3wTd0.js","assets/vendor-ui-C6JS9L8d.js","assets/vendor-react-oT2GaWYi.js","assets/vendor-misc-B30D3GR1.js","assets/vendor-query-BXaxu4Tx.js","assets/vendor-supabase-D1dNz6r2.js","assets/vendor-motion-C1HSbwe5.js","assets/index-AMHas3lF.css","assets/url-utils-B9G3izsR.js"])))=>i.map(i=>d[i]); 2import{b8 as g,u as zt,s as $t,a as vt,bl as Ie,b as Gt,bd as le,l as qt,r as Bt,m as Vt,t as Ht,A as Wt,n as et,_ as Kt,o as Te,p as Se}from"./index-Bkg3wTd0.js";import{j as e,b3 as pe,H as yt,p as me,aV as bt,aO as Yt,aZ as ue,au as Zt,x as X,dM as Xt,bs as Jt}from"./vendor-ui-C6JS9L8d.js";import{r as y,L as je,l as Qt,f as es,j as ts}from"./vendor-react-oT2GaWYi.js";import{u as _}from"./vendor-misc-B30D3GR1.js";import{p as ss,s as ns,j as is,a as ce,f as Ae,c as rs,V as as,S as os,B as ls,A as cs,R as ds}from"./AppealLetterSection-GQnWEwEk.js";import{i as us}from"./feature-flags-CfJtp4uA.js";import{t as Ee}from"./ScoreGauge-BFH7pT4y.js";import{e as tt,f as ps,a as st,m as nt,g as ms,r as fs,A as it,u as xs,t as hs,i as gs,h as vs,j as ys}from"./analysis-BHyI6lfg.js";import{u as bs,c as ks,s as js}from"./free-audit-BEQ03FQL.js";import{h as ws,a as Ns}from"./gmc-connection-CdPrfpez.js";import{c as $,b as D,N as ke,E as T,a as Ue,F as ne,B as O,y as kt,e as Cs,T as _s}from"./NotMeasured-qePaN2ri.js";import{n as rt,d as at}from"./audits-DTnZ7V0Z.js";import{T as ie,P as Ts,s as Ss}from"./TextButton-DS4jdGkQ.js";import{r as As}from"./retry-after-Doo6daKs.js";import{i as Rs,g as Fs,r as Re,s as Ps}from"./issue-feedback-DEpI9xOK.js";import{c as v,F as E,N as q,C as H,T as ze}from"./styles-D34sANex.js";import{C as B,F as Is}from"./FilterChips-DyM2qo4D.js";import{D as Ms}from"./DenseTable-B3_z1kaI.js";import{K as de}from"./KpiTile-CpARpgEU.js";import{d as ot}from"./tokens-dHyLsRHg.js";import"./vendor-query-BXaxu4Tx.js";import"./vendor-supabase-D1dNz6r2.js";import"./vendor-motion-C1HSbwe5.js";import"./dialog-DdaMdNtG.js";import"./scroll-area-B8fp_r1E.js";import"./url-utils-B9G3izsR.js";import"./score-bands-EmXW8p8c.js";function Ls(t){const s=t??[];return{critical:s.filter(n=>!n.fixed&&(n.priority==="haute"||n.severity==="high")).length,blocking:s.filter(n=>!n.fixed&&n.blocking===!0).length,important:s.filter(n=>!n.fixed&&n.priority==="moyenne").length,suggestion:s.filter(n=>!n.fixed&&n.priority!=="haute"&&n.priority!=="moyenne"&&n.severity!=="high").length}}function Os(t){return t.blocking>0?{kind:"blocking",n:t.blocking}:t.critical>0||t.important>0?{kind:"todo",critical:t.critical,important:t.important}:t.suggestion>0?{kind:"suggestions",n:t.suggestion}:{kind:"clear"}}const Ds=["critical","important","suggestion","fixed","positive"];function S(t){return typeof t=="string"&&t.trim()?t:void 0}function Es(t){return t==="critical"?"critical":t==="high"||t==="medium"?"important":"suggestion"}function jt(t,s={}){return t.map(n=>{const r=s[n.id]??n.status,i=n.category==="positive",a=!i&&r==="done",p=i?null:Es(n.priority),u=n.source==="google_certified"||n.source==="both";return{key:`ap:${n.id}`,kind:"action",actionId:n.id,group:i?"positive":a?"fixed":p,gravity:p,title:n.title,why:S(n.why_problem),evidence:S(n.evidence),foundAt:S(n.found_at),howToFix:S(n.how_to_fix),howToProve:S(n.how_to_prove),estimatedTime:S(n.estimated_time),certified:u,googleCodes:u?n.google_issue_codes??[]:[],regions:u?n.google_impacted_regions??[]:[],documentationUri:u?n.documentation_uri??null:null,done:a}})}function Us(t){return t.priority==="haute"||t.severity==="high"?"critical":t.priority==="moyenne"?"important":"suggestion"}function zs(t){return t.map((s,n)=>{const r=Us(s),i=Array.isArray(s.evidence)?s.evidence.join(", "):s.evidence;return{key:`rec:${n}`,kind:"recommendation",recIndex:n,group:s.fixed?"fixed":r,gravity:r,title:s.title,description:S(s.description),why:S(s.why_problem),evidence:S(i),quote:S(s.quote),foundAt:S(s.found_at),howToFix:S(s.how_to_fix),certified:!1,googleCodes:[],regions:[],policyUrl:S(s.policy_url),confidence:s.confidence_level,machineVerified:s.machine_verified,done:!!s.fixed,rec:s}})}function $s(t){return Ds.map(s=>({key:s,items:t.filter(n=>n.group===s)})).filter(s=>s.items.length>0)}function wt(t){const s=t.filter(i=>i.group!=="positive"),n=s.filter(i=>i.done).length,r=s.length;return{fixed:n,total:r,pct:r>0?Math.round(n/r*100):0}}function Gs(t,s){return s==="all"?t:t.filter(n=>n.key===s)}function qs(t){return t.filter(s=>s.group==="critical"||s.group==="important"||s.group==="suggestion").length}const Bs=1;function Vs(t,s){const n=["critical","important","suggestion"].flatMap(a=>t.filter(p=>p.group===a)),r=s==="recommendation"?n.slice(0,Bs):[],i=n.filter(a=>!r.includes(a));return{visible:r,locked:{critical:i.filter(a=>a.group==="critical").length,important:i.filter(a=>a.group==="important").length,suggestion:i.filter(a=>a.group==="suggestion").length}}}const Fe=["high_risk","not_ready","almost","ready"];function Hs(t){return!!(t.readiness_data&&t.readiness_data.level&&t.readiness_data.score!=null)}const lt={differs:0,watch:1,info:2,match:3,not_compared:4};function Ws(t){var r;const s=(t.checks??[]).map((i,a)=>{var p,u;return{key:`c:${i.type}:${a}`,type:i.type,site:S(i.website_value)??null,merchant:S(i.gmc_value)??null,verdict:i.status==="match"?"match":i.status==="mismatch"?"differs":i.status==="warning"?"watch":"info",note:S(i.recommendation)??null,details:S(i.details)??null,deepLink:Nt((p=i.action_item)==null?void 0:p.deep_link)?(u=i.action_item)==null?void 0:u.deep_link:null}}),n=(((r=t.coverage)==null?void 0:r.not_compared)??[]).map((i,a)=>({key:`n:${i.type}:${a}
2`,type:i.type,site:null,merchant:null,verdict:"not_compared",note:S(i.reason)??null,details:null,deepLink:null,side:i.side}));return[...s,...n].sort((i,a)=>lt[i.verdict]-lt[a.verdict])}function Ks(t,s){var a;const n=((a=t.metadata)==null?void 0:a.crawl_coverage)||t.crawl_coverage,r=ss(n);if(!r)return null;const i=ns(n,s);return{reason:r,skipped:i,skippedList:is(i,s)}}function Ys(t,s){if(!t)return null;try{const n=new URL(t),r=s?new URL(/^https?:\/\//i.test(s)?s:`https://${s}`):null,i=r&&n.hostname.replace(/^www\./,"")===r.hostname.replace(/^www\./,""),a=`${n.pathname}${n.search}`;return i?a||"/":`${n.hostname.replace(/^www\./,"")}${n.pathname==="/"?"":n.pathname}`}catch{return t}}function Nt(t){if(!t)return!1;try{const s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}function Zs(t,s){var r;const n=((r=t.locale)==null?void 0:r.language)??(t.status==="completed"?"fr":null);return!n||n===s?null:n==="en"?"en":"fr"}function Xs(t){return t==="verdict"||t==="checks"||t==="merchant"||t==="review"||t==="all"?t:"plan"}const ct={critical:0,error:1,suggestion:2,other:3};function Js(t){return t.map((s,n)=>{const r=(s.severity||"").toUpperCase(),i=r==="CRITICAL"?"critical":r==="ERROR"?"error":r==="SUGGESTION"?"suggestion":"other",a=(s.impacted_destinations||[]).flatMap(p=>(p.impacts||[]).map(u=>
2u.region_code).filter(Boolean)).filter((p,u,l)=>l.indexOf(p)===u);return{key:`${s.issue_code}-${n}`,code:s.issue_code,title:s.title||s.issue_code,detail:S(s.detail)??null,severity:i,regions:a,documentationUri:S(s.documentation_uri)??null}}).sort((s,n)=>ct[s.severity]-ct[n.severity])}const z=64,Me=8,Le=(z-Me)/2,Ct=2*Math.PI*Le;function Qs(t){return typeof t!="number"||!Number.isFinite(t)?0:Math.max(0,Math.min(100,t))/100*Ct}function en(t,s){const n=Os(t);switch(n.kind){case"blocking":return n.n===1?s.verdictBlockingOne:g(s.verdictBlocking,{n:n.n});case"todo":{const r=[];return n.critical>0&&r.push(n.critical===1?s.verdictCriticalOne:g(s.verdictCritical,{n:n.critical})),n.important>0&&r.push(n.important===1?s.verdictImportantOne:g(s.verdictImportant,{n:n.important})),g(s.verdictTodo,{parts:r.join(s.and)})}case"suggestions":return n.n===1?s.verdictSuggestionsOne:g(s.verdictSuggestions,{n:n.n});default:return s.verdictClear}}function tn(t,s){if(t==null||!Number.isFinite(t))return null;if(t>=365){const n=Math.floor(t/365);return n===1?s.yearOne:g(s.years,{n})}return t>=30?g(s.months,{n:Math.floor(t/30)}):t===1?s.dayOne:g(s.days,{n:t})}function sn(t,s,n){return[{label:s.store.platform,value:t.platform?`${t.platform}${t.theme?` / ${t.theme}`:""}`:null},{label:s.store.domainAge,value:tn(t.domain_age_days,s)},{label:s.store.language,value:t.language?t.language.toUpperCase():null},{label:s.store.currency,value:t.currency},{label:s.store.collections,value:t.total_collections>0?$(t.total_collections,n):null},{label:s.store.pages,value:t.total_pages_crawled>0?$(t.total_pages_crawled,n):null},{label:s.store.scanTime,value:t.scan_time_seconds>0?g(s.seconds,{n:Math.round(t.scan_time_seconds)}):null}].filter(i=>!!i.value)}function nn(t){return t.replace("dans l'ordre ci-dessous","dans l'ordre du plan d'action").replace("in the order below","in the action plan order")}function rn(t,s){const{t:n}=zt(),r=y.useCallback(f=>Ee(f,s),[s]),[i,a]=y.useState(null),[p,u]=y.useState(!0),[l,c]=y.useState(!1),[o,h]=y.useState(null),[m,k]=y.useState(null);y.useEffect(()=>{i!=null&&i.verification_analysis_id&&tt(i.verification_analysis_id).then(f=>{f.status==="success"&&f.data.score!=null&&k(f.data.score)})},[i==null?void 0:i.verification_analysis_id]);const M=y.useCallback(async()=>{if(t)try{const f=await ps(t);if(f){const P=await st(t);a(nt(f,P))}else a(null);return f}catch(f){return console.error("Error fetching analysis:",f),_.error(n.dashboard.report.loadError),null}finally{u(!1)}},[t]);return y.useEffect(()=>{let f=null,P=!1;const V=15*60*1e3,I=Date.now();let x=0;const N=5,w=R=>Math.min(3e3*Math.pow(2,R),3e4),A=async()=>{if(P)return;const R=await tt(t);if(!P){if(R.status==="success"){const j=await st(t);if(P)return;a(nt(R.data,j))}u(!1)}},L=async()=>{if(P)return;if(Date.now()-I>V){if(console.warn("Analysis polling timeout reached (15 min)."),await A(),P)return;a(j=>(j==null?void 0:j.status)==="processing"?{...j,status:"error",error_details:r("L'analyse a dépassé le délai maximum. Le serveur n'a pas pu terminer le traitement."),troubleshooting:[r("Le site analysé est peut-être trop complexe"),r("Réessayez avec une URL plus simple"),r("Si le problème persiste, contactez le support")]}:j);return}const R=await ms(t);if(!P)if(R.status==="success"){x=0,c(!1);const j=R.data;if(j.status==="completed"||j.status==="error"){await A();return}j.progress&&h(j.progress),a(W=>W?{...W,status:j.status,score:j.score}:{id:t,user_id:"",url:"",score:j.score,critical_issues:0,total_recommendations:0,recommendations:[],status:j.status,created_at:new Date().toISOString(),completed_at:null}),u(!1),f=setTimeout(L,3e3)}else if(R.status==="auth_error"){console.warn("Auth error during polling, attempting session refresh");try{await $t.auth.refreshSession()}catch(j){console.warn("Session refresh failed:",j)}if(x++,x>=3&&c(!0),x>=N){a(j=>j&&{...j,status:"error",error_details:r("Connexion perdue â impossible de suivre l'analyse. Veuillez actualiser la page.")});return}f=setTimeout(L,w(x))}else if(R.status==="network_error"){if(x++,console.warn(`Polling network error (${x}/${N}):`,R.message),x>=3&&c(!0),x>=N){a(j=>j&&{...j,status:"error",error_details:r("Connexion perdue â impossible de suivre l'anal
2yse. Veuillez actualiser la page.")});return}f=setTimeout(L,w(x))}else{if(u(!1),x++,x>=N)return;f=setTimeout(L,w(x))}};return t&&L(),()=>{P=!0,f&&clearTimeout(f)}},[t]),{analysis:i,loading:p,connectionIssue:l,progress:o,verificationScore:m,fetchAnalysis:M}}function an(t,s,n){const{t:r}=vt(),i=r.dashboard.report,[a,p]=y.useState({forId:null,state:{kind:"idle"}}),u=y.useRef(!1),l=on(a,t),c=(h,m)=>p({forId:m,state:h});return{state:l,start:async()=>{if(!t||!s||u.current||l.kind!=="idle")return;u.current=!0;const h=t;c({kind:"submitting"},h);let m={kind:"idle"};try{const k=await fs(t,s);"error"in k?k.errorType===it&&k.existingAnalysisId?(m={kind:"running",analysisId:k.existingAnalysisId},_.info(i.alreadyRunning)):k.errorType===it?_.error(i.alreadyRunningRetry.replace("{minutes}",String(As(k.retryAfter)))):_.error(i.reverifyError,{description:k.error}):(m={kind:"running",analysisId:k.id},_.success(i.reverifyStarted),n==null||n())}finally{u.current=!1,c(m,h)}}}}function on(t,s){return t.forId&&s&&t.forId!==s?{kind:"idle"}:t.state}function ln(t,s,n){const r=x=>Ee(x,n),[i,a]=y.useState({}),[p,u]=y.useState(new Set),[l,c]=y.useState(new Set),o=Rs(),h=(t==null?void 0:t.id)??null,m=t==null?void 0:t.action_plan;y.useEffect(()=>{a({})},[m]),y.useEffect(()=>{if(!o||!h)return;let x=!1;return Fs(h).then(N=>{x||c(N)}).catch(()=>{}),()=>{x=!0}},[h,o]);const k=(x,N)=>u(w=>{const A=new Set(w);return N?A.add(x):A.delete(x),A}),M=async(x,N)=>{if(!h||!m||!x.actionId||p.has(x.key))return;const w=x.actionId,A=i,L={...i,[w]:N},R=wt(jt(m,L)).pct;a(L),k(x.key,!0);try{if(!await xs(h,w,N))throw new Error("Update failed");N==="done"?R===100?_.success(n==="fr"?"Bravo ! Toutes les tâches sont terminées !":"Well done! All tasks completed!"):_.success(n==="fr"?"Tâche marquée comme terminée":"Task marked as done"):_.success(n==="fr"?"Tâche remise en attente":"Task set back to pending"),s()}catch{a(A),_.error(n==="fr"?"Erreur lors de la mise à jour":"Error updating task")}finally{k(x.key,!1)}},f=async x=>{if(!(!h||x.recIndex===void 0)&&!p.has(x.key)){k(x.key,!0);try{await hs(h,x.recIndex),s()}finally{k(x.key,!1)}}};return{overrides:i,updating:p,toggle:x=>x.kind==="action"?M(x,x.done?"pending":"done"):f(x),feedbackEnabled:o,isReported:x=>x.kind==="recommendation"&&l.has(Re(x.title)),reportFalsePositive:async(x,N)=>{if(!h||x.kind!=="recommendation"||!x.rec)return!1;const w=x.rec,A=await Ps({analysis_id:h,issue_id:Re(w.title),is_false_positive:!0,reason:N.trim(),issue_title:w.title,issue_severity:w.severity??w.priority,agent_source:w.source,issue_template_key:w.template_key,issue_confidence_level:w.confidence_level});return A.success?(c(L=>new Set(L).add(Re(w.title))),_.success(r("Merci, votre signalement nous aide à améliorer l'analyse.")),!0):(_.error(A.error||r("Impossible d'envoyer le signalement.")),!1)}}}const cn={breadcrumbAria:"Fil d'Ariane",crumbRoot:"Merchant Center",crumbAudits:"Mes audits",crumbCurrent:"{domain} · audit du {date}",pageHeading:"Rapport dâaudit Merchant Center de {domain}",pageHeadingNoDomain:"Rapport dâaudit Merchant Center",downloadPdf:"Télécharger le PDF",pdfLoading:"Préparation du PDFâ¦",reverify:"Re-vérifier mon site",reverifyStarting:"Lancementâ¦",reverifyRunning:"Re-vérification en cours",reverifyFollow:"Suivre la re-vérification",verdictAria:"Verdict de l'audit",scoreAria:"Score de conformité : {n} sur 100",scoreUnknownAria:"Score de conformité non mesuré",outOf100:"/100",verdictBlocking:"{n} points bloquants avant le réexamen",verdictBlockingOne:"1 point bloquant avant le réexamen",verdictTodo:"{parts} à traiter avant le réexamen",verdictCritical:"{n} points critiques",verdictCriticalOne:"1 point critique",verdictImportant:"{n} points importants",verdictImportantOne:"1 point important",and:" et ",verdictSuggestions:"Aucun point bloquant · {n} suggestions",verdictSuggestionsOne:"Aucun point bloquant · 1 suggestion",verdictClear:"Aucun problème détecté",checksLine:"{passed} conformes · {toFix} à corriger · {unverified} non vérifiées",partialTitle:"Analyse partielle.",partialCause:{rate_limited:"Votre site a limité nos lectures pendant l'anal
2yse : pour ne pas aggraver ce blocage, nous n'avons pas insisté sur le reste. Relancez une analyse dans 30 minutes pour un rapport complet. Ce n'est pas un défaut de votre boutique.",edge_fallback:"Votre site n'était pas joignable par sa route habituelle : nous l'avons lu par un autre point d'entrée de votre hébergeur. Les pages que nous n'avons pas pu confirmer sont marquées « non vérifié ». Ce n'est pas un défaut de votre boutique.",deadline:"L'analyse a atteint son temps maximum avant d'avoir parcouru toutes vos pages. Les pages non parcourues sont marquées « non vérifié ». Relancez une analyse pour un rapport complet. Ce n'est pas un défaut de votre boutique."},partialSkipped:"{n} contrôles n'ont pas été menés jusqu'au bout : {list}. Ils ne sont pas comptés comme conformes.",partialSkippedOne:"1 contrôle n'a pas été mené jusqu'au bout : {list}. Il n'est pas compté comme conforme.",degradedTitle:"Analyse simplifiée.",degradedDefault:"L'analyse approfondie a été simplifiée en raison du temps de réponse du site.",readinessTitle:"Préparation au réexamen",readinessAria:"Préparation au réexamen, échelle à 4 crans : {level}",readinessLevel:"Niveau : ",readinessLevels:{high_risk:"Risque élevé",not_ready:"Pas encore prêt",almost:"Presque prêt",ready:"Prêt pour l'appel"},tabsAria:"Sections du rapport",tabs:{verdict:"Verdict",plan:"Plan d'action",checks:"Vérifications",merchant:"Site â Merchant Center",review:"Réexamen"},readAll:"Tout afficher (lecture continue, comme le PDF)",filterAria:"Filtrer par gravité",filters:{all:"Tout",critical:"à corriger en priorité",important:"Points importants",suggestion:"Suggestions",fixed:"Corrigés"},progress:"Progression : {fixed} sur {total} corrigés",progressAria:"Progression des corrections : {fixed} sur {total}",listAria:"Plan d'action, points à traiter",groups:{critical:"à corriger en priorité",important:"Points importants",suggestion:"Suggestions d'amélioration",fixed:"Corrigés",positive:"Ce qui est déjà bien"},show:"Afficher",hide:"Masquer",foundOn:"Trouvé sur {page}",about:"â {time}",markFixedAria:"Marquer « {title} » comme corrigé",fixedAria:"Corrigé",undo:"Défaire",undoAria:"Remettre « {title} » à corriger",siteReadOn:"Site lu le {date} à {time}",certifiedLegend:"remonté par Merchant Center lui-même",certified:"Certifié Google",gravity:{critical:"Critique",important:"Important",suggestion:"Suggestion"},toCheck:"à vérifier",fixedBadge:"Corrigé",detailAria:"Détail du point sélectionné",selectHint:"Sélectionnez un point dans la liste pour voir la preuve et la correction.",codes:"Codes Google : {codes}",regions:"Régions touchées : {regions}",sections:{finding:"Constat",why:"Pourquoi c'est un problème",evidence:"Preuve relevée",foundAt:"Trouvé sur",fix:"Comment corriger",prove:"Comment le prouver à Google"},estimatedTime:"Temps estimé : {time}",googleDoc:"Documentation Google",policy:"Politique GMC",shopifyGuide:"Guide de correction Shopify",markFixed:"Marquer comme corrigé",markPending:"Remettre à corriger",reportFp:"Signaler un faux positif",reportFpPrompt:"Pourquoi ce point est-il incorrect ? (facultatif)",reportFpPlaceholder:"Ex. : cette information est bien présente sur ma page livraisonâ¦",reportFpSend:"Envoyer le signalement",reportFpCancel:"Annuler",reportFpDone:"Signalement envoyé, merci.",pointsNav:"Parcourir les points",previous:"Point précédent",next:"Point suivant",planEmpty:"Aucune correction nécessaire : votre site est conforme.",planNotReady:"Le plan d'action n'a pas encore été généré.",filterEmpty:"Aucun point dans ce filtre.",suspensionTimeout:"L'analyse de suspension n'a pas pu être complétée dans le temps imparti. Relancez l'analyse pour obtenir votre plan d'action personnalisé.",unlockTitle:"Débloquez le rapport complet.",unlockBody:"Achetez des audits pour voir toutes les corrections, le plan d'action et la lettre d'appel.",lockedCritical:"{n} points critiques de plus",lockedCriticalOne:"1 point critique de plus",lockedImportant:"{n} points importants de plus",lockedImportantOne:"1 point important de plus",lockedSuggestion:"{n} suggestions de plus",lockedSuggestionOne:"1 suggestion de plus",lockedAria:"Points du rapport complet",verdictTitle:"Le verdict",seeFixes:"Voir mes corrections",countsTitle:"Points relevés",checksTitle:"Vérifications",checksPassed:"Conformes",checksToFix:"à corriger",checksUnverified:"Non vérifiées",checksNotApplicable:"Non applicables",storeTitle:"Votre boutique",store:{platform:"Plateforme",domainAge:"Ãge du domaine",language:"Langue",currency:"Devise",collections:"Collections",pages:"Pages analysées",scanTime:"Durée de l'analyse"},years:"{n} ans",yearOne:"1 an",months:"{n} mois",days:"{n} jours",dayOne:"1 jour",seconds:"{n} s",checksDetailTitle:"Détail des {n} vérifications",checksDetailSub:"{passed} conformes · {toFix} à corriger · {unverified} non vérifiées",checksMissing:"Cet audit ne contient pas le détail des vérifications.",scanTitle:"Anomalies techniques du scan",scanSub:"Signaux relevés page par page pendant l'anal
2yse",offsiteTitle:"Checklist hors site",offsiteSub:"Réglages Merchant Center, Shopify et contenu, à vérifier vous-même : notre analyse ne les voit pas.",mcTitle:"Comparaison du site et de Merchant Center",mcCompared:"{n} contrôles comparés sur {total}",mcTableAria:"Comparaison entre votre site et Merchant Center",mcCol:{check:"Contrôle",site:"Votre site",merchant:"Merchant Center",verdict:"Verdict"},mcMobileValues:"Votre site : {site} · Merchant Center : {merchant}",mcVerdict:{match:"Concorde",differs:"Diffère",watch:"à vérifier",info:"Information",not_compared:"Non comparé"},mcSide:{site:"côté site",gmc:"côté Merchant Center"},mcOpenInMc:"Ouvrir dans Merchant Center",scanGroupCount:"{n} à {label}",scanSeverity:{high:"Critique",medium:"Important",low:"Mineur"},scanShow:"Afficher le détail",scanHide:"Masquer le détail",scanLocked:"Détail réservé au rapport complet",scanDetails:"Détails",scanPages:"Pages concernées",scanMore:"⦠et {n} de plus",scanLinkedFrom:"Lié depuis : ",scanFoundOn:"Trouvé sur : ",scanEmptyCollections:"Collections vides ({n})",scanThinCollections:"Collections insuffisantes ({n})",mcRefresh:"Relire Merchant Center",mcRefreshing:"Lecture en coursâ¦",mcRefreshFailed:"La lecture de Merchant Center a échoué.",mcSeePlan:"Voir le plan d'action",mcNone:"Cet audit n'a pas été comparé à Merchant Center.",mcNoneHint:"Connectez Merchant Center avant votre prochain audit pour comparer votre site à ce que Google a enregistré.",mcOpenAudit:"Ouvrir la page d'audit",mcNotReadTitle:"Merchant Center n'a pas été lu pour cet audit.",mcNotReadNoAccount:"Votre compte Google était connecté, mais aucun compte Merchant Center n'était choisi. Choisissez-le sur la page d'audit avant le prochain.",mcNotReadFailed:"La lecture de Merchant Center a échoué pendant cet audit. Vérifiez la connexion sur la page d'audit avant le prochain.",health:{account:"Statut du compte",products:"Produits",feeds:"Flux produits",active:"Actif",warning:"Avertissements",suspended:"Problèmes critiques",approved:"{a}/{t} approuvés",feedsOk:"{n} flux sans erreur",feedsErrors:"{e}/{n} avec erreurs",noFeeds:"Aucun flux"},checkTypes:{delivery_time:"Délai de livraison",return_policy:"Politique de retour",shipping_zones:"Zones de livraison",free_shipping_threshold:"Seuil de livraison gratuite",business_address:"Adresse professionnelle",missing_info:"Information manquante",missing_return_policy:"Politique de retour manquante",missing_shipping_policy:"Politique d'expédition manquante",account_status:"Statut du compte Merchant Center",product_disapprovals:"Produits refusés par Google",feed_health:"Santé des flux produits",return_shipping_fee:"Frais de retour"},googleIssuesTitle:"Problèmes signalés par Google sur votre compte",googleIssuesSub:"{n} problèmes remontés par Merchant Center",googleIssuesSubOne:"1 problème remonté par Merchant Center",issueSeverity:{critical:"Critique",error:"Erreur",suggestion:"Suggestion",other:"Autre"},issueZones:"Zones : {regions}",reviewReadinessTitle:"Préparation au réexamen",reviewReadinessNone:"Cochez « Mon compte Merchant Center est suspendu » lors de votre prochain audit pour évaluer votre préparation au réexamen.",factorsTitle:"Ce qui joue",recommendationsTitle:"Recommandations",beforeAfterTitle:"Avant / après",beforeAfterSub:"Comparaison avec votre dernière vérification",appealTitle:"Passer au réexamen",appealSub:"Générez votre lettre d'appel une fois vos corrections faites.",relaunch:"Relancer une analyse",loading:"Chargement du rapportâ¦",notFound:"Analyse introuvable.",backToAudits:"Retour à Mes audits",processingTitle:"Analyse en cours",processingBody:"L'analyse complète peut prendre 2 à 5 minutes. Cette page se met à jour automatiquement.",cancel:"Annuler l'analyse",cancelling:"Annulationâ¦",errorTitle:"Erreur lors de l'analyse.",errorBody:"Impossible d'analyser cette page.",retry:"Réessayer",unknownTitle:"Ãtat inattendu : {status}.",refresh:"Rafraîchir",connectionTitle:"Problème de connexion.",connectionBody:"Le suivi de l'analyse rencontre des difficultés réseau. L'analyse continue en arr
2ière-plan."},dn={breadcrumbAria:"Breadcrumb",crumbRoot:"Merchant Center",crumbAudits:"My audits",crumbCurrent:"{domain} · audit of {date}",pageHeading:"Merchant Center audit report for {domain}",pageHeadingNoDomain:"Merchant Center audit report",downloadPdf:"Download the PDF",pdfLoading:"Preparing the PDFâ¦",reverify:"Re-check my site",reverifyStarting:"Startingâ¦",reverifyRunning:"Re-check in progress",reverifyFollow:"Follow the re-check",verdictAria:"Audit verdict",scoreAria:"Compliance score: {n} out of 100",scoreUnknownAria:"Compliance score not measured",outOf100:"/100",verdictBlocking:"{n} blocking issues before the review",verdictBlockingOne:"1 blocking issue before the review",verdictTodo:"{parts} to address before the review",verdictCritical:"{n} critical issues",verdictCriticalOne:"1 critical issue",verdictImportant:"{n} important issues",verdictImportantOne:"1 important issue",and:" and ",verdictSuggestions:"No blocking issues · {n} suggestions",verdictSuggestionsOne:"No blocking issues · 1 suggestion",verdictClear:"No issues detected",checksLine:"{passed} compliant · {toFix} to fix · {unverified} unverified",partialTitle:"Incomplete analysis.",partialCause:{rate_limited:"Your site limited our reads during the analysis: to avoid making that block worse, we didn't push further. Run a new analysis in 30 minutes for a complete report. This isn't a flaw in your store.",edge_fallback:"Your site couldn't be reached by its usual route: we read it through another entry point of your host. Pages we couldn't confirm are marked ânot verifiedâ. This isn't a flaw in your store.",deadline:"The analysis hit its time limit before going through all your pages. Pages it didn't reach are marked ânot verifiedâ. Run a new analysis for a complete report. This isn't a flaw in your store."},partialSkipped:"{n} checks weren't carried out in full: {list}. They aren't counted as compliant.",partialSkippedOne:"1 check wasn't carried out in full: {list}. It isn't counted as compliant.",degradedTitle:"Simplified analysis.",degradedDefault:"The in-depth analysis was simplified because of the site's response time.",readinessTitle:"Review readiness",readinessAria:"Review readiness, 4-step scale: {level}",readinessLevel:"Level: ",readinessLevels:{high_risk:"High risk",not_ready:"Not ready yet",almost:"Almost ready",ready:"Ready to appeal"},tabsAria:"Report sections",tabs:{verdict:"Verdict",plan:"Action plan",checks:"Checks",merchant:"Site â Merchant Center",review:"Review"},readAll:"Show everything (continuous reading, like the PDF)",filterAria:"Filter by severity",filters:{all:"All",critical:"Fix f
2irst",important:"Important",suggestion:"Suggestions",fixed:"Fixed"},progress:"Progress: {fixed} of {total} fixed",progressAria:"Fix progress: {fixed} of {total}",listAria:"Action plan, issues to address",groups:{critical:"Fix first",important:"Important issues",suggestion:"Suggestions for improvement",fixed:"Fixed",positive:"Already good"},show:"Show",hide:"Hide",foundOn:"Found on {page}",about:"â {time}",markFixedAria:"Mark â{title}â as fixed",fixedAria:"Fixed",undo:"Undo",undoAria:"Set â{title}â back to fix",siteReadOn:"Site read on {date} at {time}",certifiedLegend:"reported by Merchant Center itself",certified:"Google-certified",gravity:{critical:"Critical",important:"Important",suggestion:"Suggestion"},toCheck:"To check",fixedBadge:"Fixed",detailAria:"Selected issue details",selectHint:"Select an issue in the list to see the evidence and the fix.",codes:"Google codes: {codes}",regions:"Affected regions: {regions}",sections:{finding:"Finding",why:"Why it matters",evidence:"Evidence found",foundAt:"Found on",fix:"How to fix it",prove:"How to prove it to Google"},estimatedTime:"Estimated time: {time}",googleDoc:"Google documentation",policy:"GMC policy",shopifyGuide:"Shopify fix guide",markFixed:"Mark as fixed",markPending:"Set back to fix",reportFp:"Report a false positive",reportFpPrompt:"Why is this issue wrong? (optional)",reportFpPlaceholder:"E.g. this information is on my shipping pageâ¦",reportFpSend:"Send the report",reportFpCancel:"Cancel",reportFpDone:"Report sent, thank you.",pointsNav:"Browse the issues",previous:"Previous issue",next:"Next issue",planEmpty:"No fixes needed: your site is compliant.",planNotReady:"The action plan hasn't been generated yet.",filterEmpty:"No issues in this filter.",suspensionTimeout:"The suspension analysis couldn't be completed in time. Run the analysis again to get your personalized action plan.",unlockTitle:"Unlock the full report.",unlockBody:"Buy audits to see every fix, the action plan and the appeal letter.",lockedCritical:"{n} more critical issues",lockedCriticalOne:"1 more critical issue",lockedImportant:"{n} more important issues",lockedImportantOne:"1 more important issue",lockedSuggestion:"{n} more suggestions",lockedSuggestionOne:"1 more suggestion",lockedAria:"Issues in the full report",verdictTitle:"The verdict",seeFixes:"See my fixes",countsTitle:"Issues found",checksTitle:"Checks",checksPassed:"Compliant",checksToFix:"To fix",checksUnverified:"Unverified",checksNotApplicable:"Not applicable",storeTitle:"Your store",store:{platform:"Platform",domainAge:"Domain age",language:"Language",currency:"Currency",collections:"Collections",pages:"Pages analysed",scanTime:"Analysis time"},years:"{n} years",yearOne:"1 year",months:"{n} months",days:"{n} days",dayOne:"1 day",seconds:"{n}s",checksDetailTitle:"Detail of the {n} checks",checksDetailSub:"{passed} compliant · {toFix} to fix · {unverified} unverified",checksMissing:"This audit doesn't include the detail of the checks.",scanTitle:"Technical scan anomalies",scanSub:"Signals found page by page during the analysis",offsiteTitle:"Off-site checklist",offsiteSub:"Merchant Center, Shopify and content settings to check yourself: our analysis cannot see them.",mcTitle:"Site and Merchant Center comparison",mcCompared:"{n} checks compared out of {total}",mcTableAria:"Comparison between your site and Merchant Center",mcCol:{check:"Check",site:"Your site",merchant:"Merchant Center",verdict:"Verdict"},mcMobileValues:"Your site: {site} · Merchant Center: {merchant}",mcVerdict:{match:"Matches",differs:"Differs",watch:"To check",info:"Information",not_compared:"Not compared"},mcSide:{site:"site side",gmc:"Merchant Center side"},mcOpenInMc:"Open in Merchant Center",scanGroupCount:"{n} à {label}",scanSeverity:{high:"Critical",medium:"Important",low:"Minor"},scanShow:"Show details",scanHide:"Hide details",scanLocked:"Details in the full report",scanDetails:"Details",scanPages:"Affected pages",scanMore:"⦠and {n} more",scanLinkedFrom:"Linked from: ",scanFoundOn:"Found on: ",scanEmptyCollections:"Empty collections ({n})",scanThinCollections:"Collections with too few products ({n})",mcRefresh:"Read Merchant Center again",mcRefreshing:"Readingâ¦",mcRefreshFailed:"Reading Merchant Center failed.",mcSeePlan:"See the action plan",mcNone:"This audit wasn't compared with Merchant Center.",mcNoneHint:"Connect Merchant Center before your next audit to compare your site with what Google has on record.",mcOpenAudit:"Open the audit page",mcNotReadTitle:"Merchant Center wasn't read for this audit.",mcNotReadNoAccount:"Your Google account was connected, but no Merchant Center account was selected. Choose it on the audit page before the next one.",mcNotReadFailed:"Reading Merchant Center failed during this audit. Check the connection on the audit page before the next one.",health:{account:"Account status",products:"Products",feeds:"Product feeds",active:"Active",warning:"Warnings",suspended:"Critical issues",approved:"{a}
2/{t} approved",feedsOk:"{n} feeds without errors",feedsErrors:"{e}/{n} with errors",noFeeds:"No feeds"},checkTypes:{delivery_time:"Delivery time",return_policy:"Return policy",shipping_zones:"Shipping zones",free_shipping_threshold:"Free shipping threshold",business_address:"Business address",missing_info:"Missing information",missing_return_policy:"Missing return policy",missing_shipping_policy:"Missing shipping policy",account_status:"Merchant Center account status",product_disapprovals:"Products disapproved by Google",feed_health:"Product feed health",return_shipping_fee:"Return shipping fee"},googleIssuesTitle:"Issues reported by Google on your account",googleIssuesSub:"{n} issues reported by Merchant Center",googleIssuesSubOne:"1 issue reported by Merchant Center",issueSeverity:{critical:"Critical",error:"Error",suggestion:"Suggestion",other:"Other"},issueZones:"Regions: {regions}",reviewReadinessTitle:"Review readiness",reviewReadinessNone:"Tick âMy Merchant Center account is suspendedâ on your next audit to assess your review readiness.",factorsTitle:"What counts",recommendationsTitle:"Recommendations",beforeAfterTitle:"Before / after",beforeAfterSub:"Comparison with your last check",appealTitle:"Request the review",appealSub:"Generate your appeal letter once your fixes are done.",relaunch:"Run a new analysis",loading:"Loading the reportâ¦",notFound:"Analysis not found.",backToAudits:"Back to My audits",processingTitle:"Analysis in progress",processingBody:"The full analysis can take 2 to 5 minutes. This page updates automatically.",cancel:"Cancel the analysis",cancelling:"Cancellingâ¦",errorTitle:"Error during the analysis.",errorBody:"Unable to analyze this page.",retry:"Try again",unknownTitle:"Unexpected state: {status}.",refresh:"Refresh",connectionTitle:"Connection issue.",connectionBody:"Tracking the analysis is having network trouble. The analysis keeps running in the background."},un={fr:cn,en:dn};function C(t){return un[t]}const se=5,pn={high:"danger",medium:"warn",low:"neutral"};function Oe({n:t,c:s}){return t<=0?null:e.jsx("li",{className:"list-none text-v2-12 font-medium text-v2-text-3",children:g(s.scanMore,{n:t})})}function mn({item:t,kind:s,c:n}){const r=s==="broken_links"||s==="email_domain_mismatch"?t.url:t.text||t.url;return e.jsxs("li",{className:"flex min-w-0 flex-col gap-0.5 border-l-2 border-v2-border py-1 pl-3",children:[e.jsxs("span",{className:"break-all text-v2-13 font-semibold text-v2-text",children:[r,s==="broken_links"&&t.status_code?e.jsxs("span",{className:v(q,"ml-2 text-v2-12 font-semibold text-v2-danger"),children:["HTTP ",t.status_code]}):null]}),s!=="broken_links"&&t.details&&e.jsx("span",{className:"text-v2-12 font-medium text-v2-text-2",children:t.details}),t.found_on&&e.jsxs("span",{className:"break-all text-v2-12 font-medium text-v2-text-3",children:[s==="broken_links"?n.scanLinkedFrom:s==="email_domain_mismatch"?n.scanFoundOn:"",t.found_on]})]})}function fn({items:t,c:s}){const n=t.filter(a=>a.found_on==="VIDE"),r=t.filter(a=>a.found_on==="INSUFFISANT"),i=(a,p)=>p.length>0&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-v2-12 font-semibold text-v2-text-2",children:a}),e.jsxs("ul",{className:"m-0 flex list-none flex-col gap-1 p-0",children:[p.slice(0,se).map((u,l)=>e.jsxs("li",{className:"flex min-w-0 flex-col gap-0.5 border-l-2 border-v2-border py-1 pl-3",children:[e.jsx("span",{className:"text-v2-13 font-semibold text-v2-text",children:u.text}),u.url&&e.jsx("span",{className:"break-all text-v2-12 font-medium text-v2-text-3",children:u.url}),u.details&&e.jsx("span",{className:"text-v2-12 font-medium text-v2-text-2",children:u.details})]},l)),e.jsx(Oe,{n:p.length-se,c:s})]})]});return e.jsxs("div",{className:"flex flex-col gap-3",children:[i(g(s.scanEmptyCollections,{n:n.length}),n),i(g(s.scanThinCollections,{n:r.length}),r)]})}function xn({group:t,locked:s,lang:n}){const r=C(n),[i,a]=y.useState(!1),p=`v2-scan-${y.useId().replace(/:/g,"")}`,u=t.items??[],l=t.pages??[],c=g(r.scanGroupCount,{n:$(t.count,n)??t.count,label:t.label}),o=!s&&(u.length>0||l.length>0);return e.jsxs("li",{className:"flex list-none flex-col rounded-v2-control border border-v2-border bg-v2-surface",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-v2-14 font-semibold text-v2-text",children:[s&&e.jsx(pe,{size:14,strokeWidth:1.75,"aria-hidden":"true",className:"shrink-0 text-v2-text-3"}),c]}),e.jsxs("span",{className:"flex items-center gap-3",children:[e.jsx(D,{tone:pn[t.severity]??"neutral",children:r.scanSeverity[t.severity]??r.scanSeverity.low}),o?e.jsxs("button",{type:"button","aria-expanded":i,"aria-controls":p,onClick:()=>a(h=>!h),className:v("inline-flex items-center gap-1 rounded-v2-control border-0 bg-transparent p-0 font-sans text-v2-13 font-semibold text-v2-primary hover:text-v2-primary-hover",E),children:[i?r.scanHide:r.scanShow,i?e.jsx(yt,{size:14,strokeWidth:1.75,"aria-hidden":"true"}):e.jsx(me,{size:14,strokeWidth:1.75,"aria-hidden":"true"})]}
2):s?e.jsx("span",{className:"text-v2-12 font-medium text-v2-text-3",children:r.scanLocked}):null]})]}),i&&o&&e.jsxs("div",{id:p,className:"flex flex-col gap-3 border-t border-v2-sunken bg-v2-page px-4 py-3",children:[u.length>0&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("span",{className:"text-v2-12 font-semibold text-v2-text-2",children:r.scanDetails}),t.type==="collections_few_products"?e.jsx(fn,{items:u,c:r}):e.jsxs("ul",{className:"m-0 flex list-none flex-col gap-1 p-0",children:[u.slice(0,se).map((h,m)=>e.jsx(mn,{item:h,kind:t.type,c:r},m)),e.jsx(Oe,{n:u.length-se,c:r})]})]}),l.length>0&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("span",{className:"text-v2-12 font-semibold text-v2-text-2",children:r.scanPages}),e.jsxs("ul",{className:"m-0 flex list-none flex-col gap-1 p-0",children:[l.slice(0,se).map((h,m)=>e.jsx("li",{children:e.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:v("break-all rounded-v2-control text-v2-12 font-semibold text-v2-primary no-underline hover:text-v2-primary-hover",E),children:h})},m)),e.jsx(Oe,{n:l.length-se,c:r})]})]})]})]})}function hn({groups:t,locked:s=!1,lang:n}){return!Array.isArray(t)||t.length===0?null:e.jsx("ul",{className:"m-0 flex flex-col gap-2 p-0",children:t.map((r,i)=>e.jsx(xn,{group:r,locked:s,lang:n},`${r.type}:${i}`))})}function gn({score:t,lang:s}){const n=C(s),i=typeof t=="number"&&Number.isFinite(t)?Math.round(t):null,a=Qs(i);return e.jsxs("div",{className:"relative h-16 w-16 shrink-0",children:[e.jsxs("svg",{width:z,height:z,viewBox:`0 0 ${z} ${z}`,role:"img","aria-label":i!==null?g(n.scoreAria,{n:i}):n.scoreUnknownAria,className:"block",children:[e.jsx("circle",{cx:z/2,cy:z/2,r:Le,fill:"none",stroke:ot.sunken,strokeWidth:Me}),a>0&&e.jsx("circle",{cx:z/2,cy:z/2,r:Le,fill:"none",stroke:ot.primary,strokeWidth:Me,strokeLinecap:"round",strokeDasharray:`${a} ${Ct}`,transform:`rotate(-90 ${z/2} ${z/2})`})]}),e.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 flex flex-col items-center justify-center",children:i!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:v(q,"text-v2-18 font-bold text-v2-text"),children:i}),e.jsx("span",{className:v(q,"text-v2-12 font-semibold text-v2-text-2"),children:n.outOf100})]})})]})}function _t({level:t,lang:s,className:n,showTitle:r=!0}){const i=C(s),a=t?Fe.indexOf(t):-1,p=t?i.readinessLevels[t]:null;return e.jsxs("div",{role:"group","aria-label":g(i.readinessAria,{level:p??Ie(s).notMeasured}),className:v("flex w-full flex-col gap-1.5 md:w-[428px] md:shrink-0",n),children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r?e.jsx("span",{className:"whitespace-nowrap text-v2-12 font-semibold text-v2-text-2",children:i.readinessTitle}):e.jsx("span",{}),e.jsxs("span",{className:"whitespace-nowrap text-v2-13 font-semibold text-v2-text",children:[i.readinessLevel,p??e.jsx(ke,{lang:s})]})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-x-1 gap-y-1.5",children:[Fe.map((u,l)=>e.jsx("span",{"aria-hidden":"true",className:v("h-2 rounded-full",l<=a?"bg-v2-primary":"bg-v2-sunken")},u)),Fe.map((u,l)=>e.jsx("span",{"aria-hidden":"true",className:v("text-center text-v2-12 md:truncate",l===a?"font-bold text-v2-text":"font-medium text-v2-text-2"),children:i.readinessLevels[u]},`${u}-label`))]})]})}function vn({score:t,counts:s,checks:n,readiness:r,lang:i}){const a=C(i);return e.jsxs("section",{"aria-label":a.verdictAria,className:v(H,"flex flex-col gap-4 px-5 py-4 md:flex-row md:items-center md:justify-between md:gap-6"),children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[e.jsx(gn,{score:t,lang:i}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[e.jsx("p",{className:"m-0 text-v2-18 font-bold tracking-[-0.005em] text-v2-text",children:en(s,a)}),n&&e.jsx("p",{className:"m-0 text-v2-13 font-medium text-v2-text-2",children:g(a.checksLine,{passed:n.passed,toFix:n.failed+n.warnings,unverified:n.unverified})})]})]}),e.jsx(_t,{level:r,lang:i})]})}const De=e.jsx(me,{size:16,strokeWidth:1.75,"aria-hidden":"true"});function Tt({unlock:t,lang:s}){const n=C(s);return e.jsxs("div",{className:"flex flex-col gap-3 rounded-v2-card border border-v2-primary-soft-border bg-v2-primary-soft p-5",children:[e.jsx("p",{className:"m-0 text-v2-16 font-bold text-v2-text",children:n.unlockTitle}),e.jsx("p",{className:"m-0 text-v2-14 font-medium text-v2-text-2",children:n.unlockBody}),e.jsx("div",{children:e.jsx(O,{variant:"primary",onClick:t.onUnlock,disabled:t.unlocking,"aria-busy":t.unlocking||void 0,children:t.label})})]})}function yn({lang:t,brief:s,items:n,checks:r,store:i,languageNotice:a,planHref:p,checksHref:u}){const l=C(t),c=m=>n.filter(k=>k.group===m).length,o=c("critical")+c("important")+c("suggestion"),h=i?sn(i,l,t):[];return e.jsxs("div",{className:"flex flex-col gap-4",children:[a&&e.jsx(T,{variant:"info",lang:t,children:a}),e.jsxs(B,{title:l.verdictTitle,children:[e.jsx("p",{className:"m-0 text-v2-15 font-medium text-v2-text",children:s}),o>0&&e.jsx("div",{children:e.jsx(Ue,{to:p,variant:"primary",trailingIcon:De,children:l.seeFixes})})]}),e.jsxs("section",{"aria-label":l.countsTitle,className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(de,{label:l.filters.critical,value:$(c("critical"),t)}),e.jsx(de,{label:l.filters.important,value:$(c("important"),t)}),e.jsx(de,{label:l.filters.suggestion,value:$(c("suggestion"),t)}),e.jsx(de,{label:e.jsx("span",{className:"text-v2-ok",children:l.filters.fixed}),value:$(c("fixed"),t)})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[e.jsx(B,{title:l.checksTitle,footer
2:r?e.jsx(ne,{to:u,trailingIcon:De,children:g(l.checksDetailTitle,{n:r.total})}):void 0,children:r?e.jsx("dl",{className:"m-0 grid grid-cols-2 gap-3",children:[[l.checksPassed,r.passed],[l.checksToFix,r.failed+r.warnings],[l.checksUnverified,r.unverified],[l.checksNotApplicable,r.notApplicable]].map(([m,k])=>e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("dt",{className:"text-v2-12 font-semibold text-v2-text-2",children:m}),e.jsx("dd",{className:v(q,"m-0 text-v2-18 font-bold text-v2-text"),children:$(k,t)})]},m))}):e.jsx(T,{variant:"info",lang:t,children:l.checksMissing})}),h.length>0&&e.jsx(B,{title:l.storeTitle,children:e.jsx("dl",{className:"m-0 grid grid-cols-2 gap-3",children:h.map(m=>e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("dt",{className:"text-v2-12 font-semibold text-v2-text-2",children:m.label}),e.jsx("dd",{className:"m-0 text-v2-14 font-semibold text-v2-text",children:m.value})]},m.label))})})]})]})}function bn({lang:t,checks:s,checksNode:n,scanNode:r,scanCount:i,offsiteNode:a}){const p=C(t);return e.jsxs("div",{className:"flex flex-col gap-4",children:[s&&n?e.jsx(B,{title:g(p.checksDetailTitle,{n:s.total}),subtitle:g(p.checksDetailSub,{passed:s.passed,toFix:s.failed+s.warnings,unverified:s.unverified}),children:n}):e.jsx(T,{variant:"info",lang:t,children:p.checksMissing}),r&&e.jsx(B,{title:e.jsxs("span",{className:"inline-flex items-center gap-2",children:[p.scanTitle,e.jsx(D,{tone:"neutral",children:e.jsx("span",{className:q,children:$(i,t)})})]}),subtitle:p.scanSub,children:r}),a&&e.jsx(B,{title:p.offsiteTitle,subtitle:p.offsiteSub,children:a})]})}const dt={match:"ok",differs:"danger",watch:"warn",info:"neutral",not_compared:"neutral"};function kn(t,s,n){const r=t.account_status==="active"?s.health.active:t.account_status==="warning"?s.health.warning:t.account_status==="suspended"?s.health.suspended:null,i=t.products_total>0?g(s.health.approved,{a:$(t.products_approved,n)??"",t:$(t.products_total,n)??""}):null,a=t.feeds_count===0?s.health.noFeeds:t.feeds_with_errors_count>0?g(s.health.feedsErrors,{e:t.feeds_with_errors_count,n:t.feeds_count}):g(s.health.feedsOk,{n:t.feeds_count});return[{label:s.health.account,value:r},{label:s.health.products,value:i},{label:s.health.feeds,value:a}]}function jn({rows:t,lang:s}){const n=C(s);return e.jsx(B,{title:e.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:[n.googleIssuesTitle,e.jsx(D,{tone:"primary",children:n.certified})]}),subtitle:t.length===1?n.googleIssuesSubOne:g(n.googleIssuesSub,{n:t.length}),padding:"none",className:"gap-0 [&>div:first-child]:px-5 [&>div:first-child]:py-4",children:e.jsx("ul",{className:"m-0 flex list-none flex-col p-0",children:t.map(r=>e.jsxs("li",{className:"flex flex-col gap-1 border-t border-v2-sunken px-5 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(D,{tone:r.severity==="critical"?"danger":r.severity==="error"?"warn":"neutral",children:n.issueSeverity[r.severity]}),e.jsx("code",{className:"font-display text-v2-12 font-medium text-v2-text-3",children:r.code}),r.regions.length>0&&e.jsx("span",{className:"text-v2-12 font-medium text-v2-text-2",children:g(n.issueZones,{regions:r.regions.join(", ")})})]}),e.jsx("p",{className:"m-0 text-v2-14 font-semibold text-v2-text",children:r.title}),r.detail&&e.jsx("p",{className:"m-0 text-v2-13l font-medium text-v2-text-2",children:r.detail}),r.documentationUri&&e.jsxs("a",{href:r.documentationUri,target:"_blank",rel:"noopener noreferrer",className:v("inline-flex w-fit items-center gap-1 rounded-v2-control text-v2-13 font-semibold text-v2-primary no-underline hover:text-v2-primary-hover",E),children:[n.googleDoc,e.jsx(ue,{size:14,strokeWidth:1.75,"aria-hidden":"true"})]})]},r.key))})})}function ut({r:t,c:s}){return!t.note&&!t.details&&!t.deepLink?null:e.jsxs("span",{className:"flex max-w-full flex-col gap-0.5",children:[t.note&&e.jsx("span",{className:"block max-w-full text-v2-12 font-medium text-v2-text-2",children:t.side?`${s.mcSide[t.side]} · ${t.note}`:t.note}),t.details&&e.jsx("span",{className:"block max-w-full whitespace-pre-line text-v2-12 font-medium text-v2-text-3",children:t.details}),t.deepLink&&e.jsxs("a",{href:t.deepLink,target:"_blank",rel:"noopener noreferrer",className:v("inline-flex w-fit items-center gap-1 rounded-v2-control text-v2-12 font-semibold text-v2-primary no-underline hover:text-v2-primary-hover",E),children:[s.mcOpenInMc,e.jsx(ue,{size:12,strokeWidth:1.75,"aria-hidden":"true"})]})]})}function wn({lang:t,isFree:s,unlock:n,notRead:r,crossCheck:i,issues:a,auditHref:p,planHref:u,refresh:l}){const c=C(t);if(s)return e.jsx(Tt,{unlock:n,lang:t});const o=i?Ws(i):[],h=Js(a),m=(i==null?void 0:i.checks.filter(f=>f.action_item).length)??0,k=i==null?void 0:i.coverage,M=[{key:"check",header:c.mcCol.check,width:"minmax(0,1.2fr)",cell:f=>e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"block max-w-full truncate text-v2-14 font-semibold text-v2-text",children:c.checkTypes[f.type]??f.type}),e.jsx(ut,{r:f,c})]})},{key:"site",header:c.mcCol.site,width:"minmax(0,1fr)",cell:f=>f.site?e.jsx("span",{className:"text-v2-14 font-medium text-v2-text",children:f.site}):e.jsx(ke,{lang:t})},{key:"merchant",header:c.mcCol.merchant,width:"minmax(0,1fr)",cell:f=>f.merchant?e.jsx("span",{className:"text-v2-14 font-medium text-v2-text",children:f.merchant}):e.jsx(ke,{lang:t})},{key:"verdict",header:c.mcCol.verdict,width:"140px",cell:f=>e.jsx(D,{tone:dt[f.verdict],children:c.mcVerdict[f.verdict]})}];return e.jsxs("div",{className:"flex flex-col gap-4",children:[r&&e.jsx(T,{variant:"warn",lang:t,title:c.mcNotReadTitle,action:e.jsx(ne,{to:p,className:"shrink-0 text-v2-warn hover:text-v2-warn",children:c.mcOpenAudit}),children:r==="no_account"?c.mcNotReadNoAccount:c.mcNotReadFailed}),i?e.jsxs("section",{"aria-labelledby":"v2-mc-title",className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("h2",{id:"v2-mc-title",className:v("m-0",ze.cardTitle),children:c.mcTitle}),k&&e.jsx("p",{className:"m-0 text-v2-12 font-medium text-v2-text-2",children:g(c.mcCompared,{n:k.site_checks_compared,total:k.site_checks_total})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[m>0&&e.jsx(ne,{to:u,trailingIcon:De,children:c.mcSeePlan}),e.jsx(O,{variant:"secondary",onClick:l.onRefresh,disabled:l.refreshing,icon:e.jsx(bt,{size:16,strokeWidth:1.75,"aria-hidden":"true",className:l.refreshing?"animate-spin":void 0}),children:l.refreshing?c.mcRefreshing:c.mcRefresh})]})]}),l.failed&&e.jsx(T,{variant:"error",lang:t,children:c.mcRefreshFailed}),i.health_summary&&e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-3",children:kn(i.health_summary,c,t).map(f=>e.jsx(de,{compact:!0,label:f.label,value:f.value?e.jsx("span",{className:"font-sans text-v2-16",children:f.value}):e.jsx(ke,{lang:t})},f.label))}),e.jsx(Ms,{ariaLabel:c.mcTableAria,columns:M,rows:o,getRowKey:f=>f.key,lang:t,empty:e.jsx(T,{variant:"info",lang:t,children:c.mcNone}),renderMobileRow:f=>e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-v2-14 font-semibold text-v2-text",children:c.checkTypes[f.type]??f.type}),e.jsx(D,{tone:dt[f.verdict],children:c.mcVerdict[f.verdict]})]}),(f.site||f.merchant)&&e.jsx("span",{className:"text-v2-12 font-medium text-v2-text-2",children:g(c.mcMobileValues,{site:f.site??Ie(t).notMeasured,merchant:f.merchant??Ie(t).notMeasured})}),e.jsx(ut,{r:f,c})]})})]}):!r&&e.jsx(T,{variant:"info",lang:t,title:c.mcNone,action:e.jsx(ne,{to:p,className:"shrink-0",children:c.mcOpenAudit}),children:c.mcNoneHint}),h.length>0&&e.jsx(jn,{rows:h,lang:t})]})}function Nn({lang:t,isFree:s,unlock:n,readiness:r,beforeAfterNode:i,appealNode:a,reverifyNode:p,relaunchHref:u}){const l=C(t);return s?e.jsx(Tt,{unlock:n,lang:t}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(B,{title:l.reviewReadinessTitle,children:r?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(_t,{level:r.level,lang:t,showTitle:!1,className:"md:w-full md:max-w-[560px]"}),(r.factors??[]).length>0&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("h3",{className:"m-0 text-v2-12 font-semibold text-v2-text-2",children:l.factorsTitle}),e.jsx("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:r.factors.map((c,o)=>e.jsxs("li",{className:"flex items-baseline gap-2 text-v2-14 font-medium text-v2-text",children:[e.jsx("span",{className:v(q,"w-8 shrink-0 text-right text-v2-12 font-semibold",c.type==="bonus"?"text-v2-primary":"text-v2-text-2"),children:c.impact>0?`+${c.impact}
2`:String(c.impact).replace("-","â")}),c.label]},`${c.label}-${o}`))})]}),(r.recommendations??[]).length>0&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("h3",{className:"m-0 text-v2-12 font-semibold text-v2-text-2",children:l.recommendationsTitle}),e.jsx("ul",{className:"m-0 flex list-disc flex-col gap-1 pl-5",children:r.recommendations.map((c,o)=>e.jsx("li",{className:"text-v2-14 font-medium text-v2-text",children:c},o))})]})]}):e.jsx(T,{variant:"info",lang:t,children:l.reviewReadinessNone})}),i&&e.jsx(B,{title:l.beforeAfterTitle,subtitle:l.beforeAfterSub,children:i}),e.jsxs(B,{title:l.appealTitle,subtitle:l.appealSub,children:[a,e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p,e.jsx(Ue,{to:u,variant:"secondary",icon:e.jsx(Yt,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:l.relaunch})]})]})]})}function Cn({gravity:t,lang:s}){const n=C(s);return t?t==="critical"?e.jsx(D,{tone:"danger",children:n.gravity.critical}):t==="important"?e.jsx(D,{tone:"warn",children:n.gravity.important}):e.jsx(D,{tone:"neutral",children:n.gravity.suggestion}):null}function _n(t){return t.confidence==="probable"||t.confidence==="investigate"||t.machineVerified===!1}function ee({id:t,title:s,children:n}){return e.jsxs("section",{"aria-labelledby":t,className:"flex flex-col gap-1",children:[e.jsx("h3",{id:t,className:"m-0 text-v2-12 font-semibold text-v2-text-2",children:s}),n]})}const te="m-0 text-v2-14 font-medium text-v2-text";function Tn({item:t,actions:s,lang:n}){const r=C(n),i=y.useId().replace(/:/g,""),[a,p]=y.useState(!1),[u,l]=y.useState(""),[c,o]=y.useState(!1),h=s.isReported(t);if(y.useEffect(()=>{p(!1),l("")},[t.key]),h)return e.jsxs("p",{className:"m-0 inline-flex items-center gap-1.5 text-v2-13 font-medium text-v2-text-2",children:[e.jsx(X,{size:14,strokeWidth:2,"aria-hidden":"true",className:"text-v2-ok"}),r.reportFpDone]});if(!a)return e.jsx(ie,{onClick:()=>p(!0),children:r.reportFp});const m=async()=>{if(!c){o(!0);try{await s.onReportFp(t,u)&&p(!1)}finally{o(!1)}}};return e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx("label",{htmlFor:`${i}-reason`,className:"text-v2-12 font-semibold text-v2-text-2",children:r.reportFpPrompt}),e.jsx("textarea",{id:`${i}-reason`,value:u,onChange:k=>l(k.target.value.slice(0,2e3)),placeholder:r.reportFpPlaceholder,rows:3,className:v("w-full resize-none rounded-v2-control border border-v2-border-control bg-v2-surface px-3 py-2 font-sans text-v2-14 font-medium text-v2-text placeholder:text-v2-text-3",E)}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{variant:"primary",size:"sm",onClick:m,disabled:c,"aria-busy":c||void 0,children:r.reportFpSend}),e.jsx(O,{variant:"secondary",size:"sm",onClick:()=>{p(!1),l("")},disabled:c,children:r.reportFpCancel})]})]})}function be({item:t,lang:s,actions:n,nav:r,variant:i="panel",locked:a=!1,headingLevel:p=2,footer:u}){const l=C(s),c=y.useId().replace(/:/g,""),o=p===2?"h2":"h3",h=n.updatingKeys.has(t.key),m=[t.googleCodes.length>0?g(l.codes,{codes:t.googleCodes.join(", ")}):null,t.regions.length>0?g(l.regions,{regions:t.regions.join(", ")}):null].filter(Boolean).join(" · "),k=!a&&n.feedbackEnabled&&t.kind==="recommendation",M=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(o,{className:"m-0 text-v2-18 font-bold tracking-[-0.005em] text-v2-text",children:t.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.done?e.jsx(D,{tone:"ok",children:l.fixedBadge}):e.jsx(Cn,{gravity:t.gravity,lang:s}),t.certified&&e.jsx(D,{tone:"primary",children:l.certified}),!a&&n.confidenceFlag&&_n(t)&&e.jsx(D,{tone:"warn",children:l.toCheck})]}),m&&e.jsx("p",{className:"m-0 text-v2-12 font-medium text-v2-text-2",children:m})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[t.description&&e.jsx(ee,{id:`${c}-finding`,title:l.sections.finding,children:e.jsx("p",{className:te,children:ce(t.description)})}),!a&&t.why&&e.jsx(ee,{id:`${c}-why`,title:l.sections.why,children:e.jsx("p",{className:te,children:ce(t.why)})}),!a&&t.evidence&&e.jsxs(ee,{id:`${c}-evidence`,title:l.sections.evidence,children:[e.jsx("p",{className:te,children:ce(t.evidence)}),t.quote&&e.jsxs("blockquote",{className:"m-0 border-0 border-l-2 border-solid border-v2-border-strong pl-3 text-v2-14 font-medium italic text-v2-text-2",children:["« ",t.quote," »"]})]}
2),!a&&t.foundAt&&e.jsx(ee,{id:`${c}-found`,title:l.sections.foundAt,children:Nt(t.foundAt)?e.jsxs("a",{href:t.foundAt,target:"_blank",rel:"noopener noreferrer",className:v("inline-flex max-w-full items-center gap-1 break-all rounded-v2-control text-v2-14 font-medium text-v2-primary hover:text-v2-primary-hover",E),children:[ce(t.foundAt),e.jsx(ue,{size:14,strokeWidth:1.75,"aria-hidden":"true",className:"shrink-0"})]}):e.jsx("p",{className:te,children:ce(t.foundAt)})}),!a&&t.howToFix&&e.jsx(ee,{id:`${c}-fix`,title:l.sections.fix,children:e.jsx("p",{className:v(te,"whitespace-pre-line"),children:t.howToFix})}),!a&&t.howToProve&&e.jsx(ee,{id:`${c}-prove`,title:l.sections.prove,children:e.jsx("p",{className:v(te,"whitespace-pre-line"),children:t.howToProve})})]}),!a&&(t.estimatedTime||t.documentationUri||t.policyUrl||n.guideKeys.has(t.key))&&e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.estimatedTime?e.jsx("span",{className:"text-v2-13 font-semibold text-v2-text",children:g(l.estimatedTime,{time:t.estimatedTime})}):e.jsx("span",{}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[n.guideKeys.has(t.key)&&e.jsx(ie,{onClick:()=>n.onShowGuide(t),icon:e.jsx(Zt,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:l.shopifyGuide}),t.documentationUri&&e.jsxs("a",{href:t.documentationUri,target:"_blank",rel:"noopener noreferrer",className:v("inline-flex items-center gap-1 rounded-v2-control text-v2-14 font-semibold text-v2-primary no-underline hover:text-v2-primary-hover",E),children:[l.googleDoc,e.jsx(ue,{size:16,strokeWidth:1.75,"aria-hidden":"true"})]}),t.policyUrl&&e.jsxs("a",{href:t.policyUrl,target:"_blank",rel:"noopener noreferrer",className:v("inline-flex items-center gap-1 rounded-v2-control text-v2-14 font-semibold text-v2-primary no-underline hover:text-v2-primary-hover",E),children:[l.policy,e.jsx(ue,{size:16,strokeWidth:1.75,"aria-hidden":"true"})]})]})]})]}),f=!a&&e.jsx("div",{className:"flex flex-col gap-3",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.done?e.jsx(O,{variant:"secondary",onClick:()=>n.onToggle(t),disabled:h,"aria-busy":h||void 0,children:l.markPending}):e.jsx(O,{variant:"primary",onClick:()=>n.onToggle(t),disabled:h,"aria-busy":h||void 0,icon:e.jsx(X,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:l.markFixed}),k&&!t.done&&e.jsx(Tn,{item:t,actions:n,lang:s})]}),r&&e.jsxs("nav",{"aria-label":l.pointsNav,className:"flex items-center gap-3",children:[e.jsx(ie,{onClick:r.onPrev,disabled:!r.hasPrev,icon:e.jsx(Xt,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:l.previous}),e.jsx(ie,{onClick:r.onNext,disabled:!r.hasNext,trailingIcon:e.jsx(me,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:l.next})]})]})});return i==="inline"?e.jsxs("article",{"aria-label":t.title,className:"flex flex-col gap-4 border-b border-v2-sunken py-5 last:border-b-0",children:[M,!a&&e.jsx("div",{className:"flex flex-wrap items-center gap-3",children:t.done?e.jsx(O,{variant:"secondary",size:"sm",onClick:()=>n.onToggle(t),disabled:h,children:l.markPending}):e.jsx(O,{variant:"secondary",size:"sm",onClick:()=>n.onToggle(t),disabled:h,icon:e.jsx(X,{size:14,strokeWidth:1.75,"aria-hidden":"true"}),children:l.markFixed})})]}):e.jsxs("aside",{id:"v2-report-detail","aria-label":l.detailAria,className:v(H,"flex min-w-0 flex-col justify-between gap-4 p-5 shadow-none"),children:[e.jsx("div",{className:"flex flex-col gap-4",children:M}),a?u:e.jsxs("div",{className:"flex flex-col gap-3 border-t border-v2-sunken pt-4",children:[f,u]})]})}function pt({lang:t,locked:s,children:n}){const r=C(t);return e.jsxs("aside",{id:"v2-report-detail","aria-label":r.detailAria,className:v(H,"flex min-w-0 flex-col gap-4 p-5 shadow-none"),children:[s?e.jsxs("div",{className:"flex items-center gap-2 text-v2-14 font-semibold text-v2-text",children:[e.jsx(pe,{size:16,strokeWidth:1.75,"aria-hidden":"true",className:"text-v2-primary"}),r.unlockTitle]}):e.jsx(T,{variant:"info",lang:t,children:r.selectHint}),n]})}const Sn=["all","critical","important","suggestion","fixed"],mt=["suggestion","positive"];function St(t,s){return s.groups[t]}function An(t,s,n){const r=Ys(t.foundAt,s),i=[r?g(n.foundOn,{page:r}):null,t.estimatedTime?g(n.about,{time:t.estimatedTime}
2):null].filter(Boolean);return i.length>0?i.join(" · "):t.description?t.description:null}function ft({fixed:t,total:s,lang:n}){const r=C(n),i=s>0?Math.round(t/s*100):0;return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"whitespace-nowrap text-v2-13 font-semibold text-v2-text",children:g(r.progress,{fixed:t,total:s})}),e.jsx("span",{role:"img","aria-label":g(r.progressAria,{fixed:t,total:s}),className:"relative block h-2 w-40 shrink-0 overflow-hidden rounded-full bg-v2-sunken",children:e.jsx("span",{className:"absolute inset-y-0 left-0 rounded-full bg-v2-ok",style:{width:`${i}%`}})})]})}function xt({item:t,selected:s,onSelect:n,actions:r,siteUrl:i,lang:a,locked:p}){const u=C(a),l=r.updatingKeys.has(t.key),c=An(t,i,u),o=t.group==="positive";return e.jsxs("li",{className:v("grid min-h-14 grid-cols-[24px_minmax(0,1fr)_auto] items-center gap-x-3 border-b border-v2-sunken px-4 py-2",s?"bg-v2-selected":"bg-v2-surface"),children:[e.jsx("span",{className:"flex items-center justify-center",children:t.done||o?e.jsx("span",{role:"img","aria-label":u.fixedAria,className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-v2-ok-bg text-v2-ok",children:e.jsx(X,{size:12,strokeWidth:2,"aria-hidden":"true"})}):p?e.jsx(pe,{size:14,strokeWidth:1.75,"aria-hidden":"true",className:"text-v2-text-3"}):e.jsx("input",{type:"checkbox",checked:!1,disabled:l,onChange:()=>r.onToggle(t),"aria-label":g(u.markFixedAria,{title:t.title}),className:v("m-0 h-4 w-4 cursor-pointer accent-v2-primary",E)})}),o?e.jsx("span",{className:"min-w-0 truncate text-v2-14 font-medium text-v2-text-2",children:t.title}):e.jsxs("button",{type:"button",onClick:n,"aria-current":s?"true":void 0,"aria-controls":"v2-report-detail",className:v("flex min-w-0 flex-col items-start gap-0.5 rounded-v2-control border-0 bg-transparent p-0 text-left font-sans",E),children:[e.jsx("span",{className:v("block max-w-full truncate text-v2-14",t.done?"font-medium text-v2-text-2":"font-semibold",!t.done&&(s?"text-v2-primary-hover":"text-v2-text")),children:t.title}),c&&e.jsx("span",{className:"block max-w-full truncate text-v2-12 font-medium text-v2-text-2",children:c})]}),e.jsxs("span",{className:"flex items-center gap-2",children:[t.certified&&!t.done&&e.jsx(D,{tone:"primary",children:u.certified}),t.done&&!p&&e.jsx(ie,{onClick:()=>r.onToggle(t),disabled:l,"aria-label":g(u.undoAria,{title:t.title}),className:"text-v2-13",children:u.undo})]})]})}function Rn({group:t,c:s,collapsed:n,onToggleCollapse:r,children:i}){const a=`v2-plan-group-${t.key}`,p=t.key==="fixed";return e.jsxs("div",{role:"group","aria-labelledby":a,className:"flex flex-col",children:[e.jsxs("div",{className:"flex h-10 items-center justify-between gap-3 border-b border-v2-border bg-v2-surface-2 px-4",children:[e.jsxs("h3",{id:a,className:v("m-0 inline-flex items-center gap-1.5 whitespace-nowrap text-v2-13 font-bold",p?"text-v2-ok":"text-v2-text"),children:[p&&e.jsx(X,{size:14,strokeWidth:2,"aria-hidden":"true"}),St(t.key,s)," · ",e.jsx("span",{className:v(q,"text-v2-text-2"),children:t.items.length})]}),r&&e.jsx(ie,{onClick:r,"aria-expanded":!n,"aria-controls":`${a}-list`,className:"text-v2-13",trailingIcon:e.jsx(yt,{size:14,strokeWidth:1.75,"aria-hidden":"true",className:v("transition-transform",!n&&"rotate-180")}),children:n?s.show:s.hide})]}),e.jsx("div",{id:`${a}-list`,hidden:n,children:!n&&i})]})}function ht({locked:t,lang:s}){const n=C(s),r=[];return t.critical>0&&r.push({key:"critical",label:t.critical===1?n.lockedCriticalOne:g(n.lockedCritical,{n:t.critical})}),t.important>0&&r.push({key:"important",label:t.important===1?n.lockedImportantOne:g(n.lockedImportant,{n:t.important})}),t.suggestion>0&&r.push({key:"suggestion",label:t.suggestion===1?n.lockedSuggestionOne:g(n.lockedSuggestion,{n:t.suggestion})}),r.length===0?null:e.jsx("ul",{"aria-label":n.lockedAria,className:"m-0 flex list-none flex-col p-0",children:r.map(i=>e.jsxs("li",{className:"grid min-h-12 grid-cols-[24px_minmax(0,1fr)] items-center gap-x-3 border-b border-v2-sunken px-4 py-2",children:[e.jsx(pe,{size:14,strokeWidth:1.75,"aria-hidden":"true",className:"justify-self-center text-v2-text-3"}),e.jsx("span",{className:"text-v2-14 font-semibold text-v2-text-2",children:i.label})]},i.key))})}function Pe({unlock:t,lang:s}){const n=C(s);return e.jsxs("div",{className:"flex flex-col gap-3 rounded-v2-card border border-v2-primary-soft-border bg-v2-primary-soft p-4",children:[e.jsx("p",{className:"m-0 text-v2-14 font-semibold text-v2-text",children:n.unlockTitle}),e.jsx("p",{className:"m-0 text-v2-13l font-medium text-v2-text-2",children:n.unlockBody}),e.jsx("div",{children:e.jsx(O,{variant:"primary",onClick:t.onUnlock,disabled:t.unlocking,"aria-busy":t.unlocking||void 0,icon:e.jsx(pe,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:t.label})})]})}function Fn(t){var K,ae;const{lang:s,items:n,isFree:r,actions:i}=t,a=C(s),[p,u]=y.useState("all"),[l,c]=y.useState(()=>new Set(mt)),o=y.useMemo(()=>$s(n),[n]),h=wt(n),m=r?Vs(n,t.kind):null,k={all:n.filter(d=>d.group!=="positive").length,critical:n.filter(d=>d.group==="critical").length,important:n.filter(d=>d.group==="important").length,suggestion:n.filter(d=>d.group==="suggestion").length,fixed:n.filter(d=>d.group==="fixed").length},M=r?[]:Gs(o,p),f=M.filter(d=>d.key!=="positive"&&!l.has(d.key)).flatMap(d=>d.items),P=M.filter(d=>d.key!=="positive").flatMap(d=>d.items)[0],V=(r?(K=m==null?void 0:m.visible[0])==null?void 0:K.key:(ae=f[0]??P)==null?void 0:ae.key)??null,[I,x]=y.useState(V);
2y.useEffect(()=>{(!I||![...f,...(m==null?void 0:m.visible)??[]].some(d=>d.key===I))&&x(V)},[p,n]);const N=[...f,...(m==null?void 0:m.visible)??[],...n].find(d=>d.key===I)??null,w=N?f.findIndex(d=>d.key===N.key):-1;if(n.length===0)return e.jsxs("div",{className:"flex flex-col gap-4",children:[t.suspensionTimeout&&e.jsx(T,{variant:"warn",lang:s,children:a.suspensionTimeout}),e.jsx(T,{variant:"empty",lang:s,children:t.kind==="action"?a.planNotReady:a.planEmpty})]});const A=kt(t.readAt,s),L=Cs(t.readAt,s),R=n.some(d=>d.certified);if(t.continuous)return e.jsxs("div",{className:"flex flex-col gap-4",children:[t.suspensionTimeout&&e.jsx(T,{variant:"warn",lang:s,children:a.suspensionTimeout}),e.jsx(ft,{fixed:h.fixed,total:h.total,lang:s}),r&&m?e.jsxs("div",{className:v(H,"flex flex-col gap-4 p-5"),children:[m.visible.map(d=>e.jsx(be,{item:d,lang:s,actions:i,variant:"inline",locked:!0,headingLevel:3},d.key)),e.jsx(ht,{locked:m.locked,lang:s}),e.jsx(Pe,{unlock:t.unlock,lang:s})]}):o.map(d=>e.jsxs("section",{"aria-labelledby":`v2-all-${d.key}`,className:v(H,"flex flex-col px-5 pt-4"),children:[e.jsxs("h3",{id:`v2-all-${d.key}`,className:v("m-0 text-v2-16 font-bold",d.key==="fixed"?"text-v2-ok":"text-v2-text"),children:[St(d.key,a)," · ",e.jsx("span",{className:v(q,"text-v2-text-2"),children:d.items.length})]}),d.key==="positive"?e.jsx("ul",{className:"m-0 flex list-none flex-col gap-2 p-0 py-4",children:d.items.map(G=>e.jsxs("li",{className:"flex items-center gap-2 text-v2-14 font-medium text-v2-text",children:[e.jsx(X,{size:14,strokeWidth:2,"aria-hidden":"true",className:"shrink-0 text-v2-ok"}),G.title]},G.key))}):d.items.map(G=>e.jsx(be,{item:G,lang:s,actions:i,variant:"inline",headingLevel:3},G.key))]},d.key))]});const j=Sn.map(d=>({key:d,pressed:p===d,label:d==="fixed"?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-v2-ok",children:[e.jsx(X,{size:14,strokeWidth:2,"aria-hidden":"true"}),a.filters.fixed," ",e.jsx("span",{className:v(q,"text-v2-text-3"),children:k.fixed})]}):d==="all"?a.filters.all:e.jsxs("span",{children:[a.filters[d]," ",e.jsx("span",{className:v(q,"text-v2-text-3"),children:k[d]})]})})),W=d=>c(G=>{const U=new Set(G);return U.has(d)?U.delete(d):U.add(d),U}),we=e.jsxs("section",{"aria-label":a.listAria,className:v(H,"flex min-w-0 flex-col justify-between overflow-hidden"),children:[e.jsx("div",{className:"flex flex-col",children:r&&m?e.jsxs(e.Fragment,{children:[m.visible.length>0&&e.jsx("ul",{className:"m-0 flex list-none flex-col p-0",children:m.visible.map(d=>e.jsx(xt,{item:d,selected:I===d.key,onSelect:()=>x(d.key),actions:i,siteUrl:t.siteUrl,lang:s,locked:!0},d.key))}),e.jsx(ht,{locked:m.locked,lang:s})]}):M.length===0?e.jsx("div",{className:"p-4",children:e.jsx(T,{variant:"empty",lang:s,children:a.filterEmpty})}):M.map(d=>{const G=mt.includes(d.key);return e.jsx(Rn,{group:d,c:a,collapsed:l.has(d.key),onToggleCollapse:G?()=>W(d.key):void 0,children:e.jsx("ul",{className:"m-0 flex list-none flex-col p-0",children:d.items.map(U=>e.jsx(xt,{item:U,selected:I===U.key,onSelect:()=>x(U.key),actions:i,siteUrl:t.siteUrl,lang:s,locked:!1},U.key))})},d.key)})}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3",children:[A?e.jsx("span",{className:"text-v2-12 font-medium text-v2-text-3",children:g(a.siteReadOn,{date:A,time:L??""})}):e.jsx("span",{}),R&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-v2-12 font-medium text-v2-text-2",children:[e.jsx(D,{tone:"primary",children:a.certified}),a.certifiedLegend]})]})]}),re=r?N&&(m!=null&&m.visible.some(d=>d.key===N.key))?e.jsx(be,{item:N,lang:s,actions:i,locked:!0,footer:e.jsx(Pe,{unlock:t.unlock,lang:s})}):e.jsx(pt,{lang:s,locked:!0,children:e.jsx(Pe,{unlock:t.unlock,lang:s})}):N&&N.group!=="positive"?e.jsx(be,{item:N,lang:s,actions:i,nav:{hasPrev:w>0,hasNext:w>=0&&w<f.length-1,onPrev:()=>{w>0&&x(f[w-1].key)},onNext:()=>{w>=0&&w<f.length-1&&x(f[w+1].key)}}}):e.jsx(pt,{lang:s});return e.jsxs("div",{className:"flex flex-col gap-4",children:[t.suspensionTimeout&&e.jsx(T,{variant:"warn",lang:s,children:a.suspensionTimeout}),!r&&e.jsx(Is,{lang:s,ariaLabel:a.filterAria,chips:j,onToggle:d=>u(d===p?"all":d),trailing:e.jsx(ft,{fixed:h.fixed,total:h.total,lang:s})}),e.jsxs("div",{className:"grid grid-cols-1 items-start gap-4 xl:grid-cols-[minmax(0,1fr)_520px]",children:[we,re]})]})}const gt=e.jsx(me,{size:16,strokeWidth:1.75,"aria-hidden":"true",className:"shrink-0 text-v2-text-3"});function Pn({lang:t,header:s,hrefs:n,showActions:r}){const i=C(t);return e.jsxs("header",{className:"flex min-h-12 flex-wrap items-center justify-between gap-4",children:[e.jsx("h1",{className:"sr-only",children:s.domain?g(i.pageHeading,{domain:s.domain}):i.pageHeadingNoDomain}),e.jsxs("nav",{"aria-label":i.breadcrumbAria,className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.jsx(je,{to:n.root,className:v("whitespace-nowrap rounded-v2-control no-underline",ze.pageTitle,E),children:i.crumbRoot}),gt,e.jsx(je,{to:n.audits,className:v("whitespace-nowrap rounded-v2-control text-v2-14 font-semibold text-v2-primary no-underline hover:text-v2-primary-hover",E),children:i.crumbAudits}),s.domain&&e.jsxs(e.Fragment,{children:[gt,e.jsx("span",{"aria-current":"page",className:"min-w-0 truncate text-v2-14 font-semibold text-v2-text",children:s.dateLabel?g(i.crumbCurrent,{domain:s.domain,date:s.dateLabel}):s.domain})]})]}),r&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.pdf.visible&&e.jsx(O,{variant:"secondary",onClick:s.pdf.onDownload,disabled:s.pdf.loading,"aria-busy":s.pdf.loading||void 0,icon:e.jsx(Jt,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:s.pdf.loading?i.pdfLoading:i.downloadPdf}),s.reverify&&e.jsx(At,{reverify:s.reverify,lang:t})]})]})}function At({reverify:t,lang:s}){const n=C(s),r=e.jsx(bt,{size:16,strokeWidth:1.75,"aria-hidden":"true",className:t.
2state.kind!=="idle"?"animate-spin":void 0});if(t.state.kind==="running")return e.jsxs("span",{className:"inline-flex flex-wrap items-center gap-3",children:[e.jsx(O,{variant:"primary",disabled:!0,icon:r,children:n.reverifyRunning}),t.followHref&&e.jsx(ne,{to:t.followHref,trailingIcon:e.jsx(me,{size:16,strokeWidth:1.75,"aria-hidden":"true"}),children:n.reverifyFollow})]});const i=t.state.kind==="submitting";return e.jsx(O,{variant:"primary",onClick:t.onStart,disabled:i,"aria-busy":i||void 0,icon:r,children:i?n.reverifyStarting:n.reverify})}function In({partial:t,degraded:s,lang:n}){const r=C(n);return!t&&!s?null:e.jsxs("div",{className:"flex flex-col gap-2","data-testid":"v2-report-state",children:[t&&e.jsxs(T,{variant:"warn",lang:n,title:r.partialTitle,children:[r.partialCause[t.reason],t.skipped.length>0&&e.jsx("span",{className:"mt-1 block",children:t.skipped.length===1?g(r.partialSkippedOne,{list:t.skippedList}):g(r.partialSkipped,{n:t.skipped.length,list:t.skippedList})})]}),s&&e.jsx(T,{variant:"warn",lang:n,title:r.degradedTitle,children:s.message||r.degradedDefault})]})}function Mn({id:t,children:s}){return e.jsx("h2",{id:t,className:v("m-0 border-b border-v2-border pb-2",ze.panelTitle),children:s})}function Ln({lang:t,tab:s,hrefs:n,header:r,report:i}){var h;const a=C(t),p=qs(i.work.items),u=r.reverify?e.jsx(At,{reverify:r.reverify,lang:t}):null,l={verdict:()=>e.jsx(yn,{lang:t,brief:i.brief,items:i.work.items,checks:i.checks,store:i.store,languageNotice:i.languageNotice,planHref:n.tabs.plan,checksHref:n.tabs.checks}),plan:m=>e.jsx(Fn,{lang:t,items:i.work.items,kind:i.work.kind,siteUrl:i.siteUrl,readAt:i.readAt,isFree:i.isFree,unlock:i.unlock,actions:i.actions,suspensionTimeout:i.suspensionTimeout,continuous:m}),checks:()=>e.jsx(bn,{lang:t,checks:i.checks,checksNode:i.slots.checks,scanNode:i.slots.scan,scanCount:i.slots.scanCount,offsiteNode:i.slots.offsite}),merchant:()=>e.jsx(wn,{lang:t,isFree:i.isFree,unlock:i.unlock,notRead:i.merchant.notRead,crossCheck:i.merchant.crossCheck,issues:i.merchant.issues,auditHref:n.root,planHref:n.tabs.plan,refresh:i.merchant.refresh}),review:()=>e.jsx(Nn,{lang:t,isFree:i.isFree,unlock:i.unlock,readiness:i.readiness,beforeAfterNode:i.slots.beforeAfter,appealNode:i.slots.appeal,reverifyNode:u,relaunchHref:n.relaunch})},c=["verdict","plan","checks","merchant","review"],o=s==="all";return e.jsxs(e.Fragment,{children:[e.jsx(vn,{score:i.score,counts:i.counts,checks:i.checks,readiness:((h=i.readiness)==null?void 0:h.level)??null,lang:t}),e.jsx(In,{partial:i.partial,degraded:i.degraded,lang:t}),e.jsx(_s,{ariaLabel:a.tabsAria,value:s,items:c.map(m=>({value:m,label:a.tabs[m],href:n.tabs[m],count:m==="plan"?p:m==="checks"&&i.checks?i.checks.total:void 0})),trailing:e.jsx(je,{to:n.tabs.all,"aria-current":o?"page":void 0,className:v("mb-2 hidden shrink-0 items-center rounded-v2-control text-v2-14 font-semibold no-underline lg:inline-flex",o?"text-v2-text underline decoration-v2-primary decoration-2 underline-offset-8":"text-v2-primary hover:text-v2-primary-hover",E),children:a.readAll})}),e.jsx(je,{to:n.tabs.all,"aria-current":o?"page":void 0,className:v("inline-flex w-fit items-center gap-1 rounded-v2-control text-v2-14 font-semibold text-v2-primary no-underline hover:text-v2-primary-hover lg:hidden",E),children:a.readAll}),o?e.jsx("div",{className:"flex flex-col gap-8",children:c.map(m=>e.jsxs("section",{"aria-labelledby":`v2-report-all-${m}`,className:"flex flex-col gap-4",children:[e.jsx(Mn,{id:`v2-report-all-${m}`,children:a.tabs[m]}),l[m](!0)]},m))}):e.jsx("div",{children:l[s](!1)}),i.slots.modal]})}function On({lang:t,tab:s,hrefs:n,header:r,state:i}){const a=C(t);return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Pn,{lang:t,header:r,hrefs:n,showActions:i.kind==="completed"}),i.kind==="loading"&&e.jsx(T,{variant:"loading",lang:t,rows:4,children:a.loading}),i.kind==="not_found"&&e.jsx(T,{variant:"info",lang:t,title:a.notFound,action:e.jsx(ne,{to:n.audits,className:"shrink-0",children:a.backToAudits})}),i.kind==="processing"&&e.jsxs("section",{"aria-labelledby":"v2-report-processing","aria-live":"polite",className:v(H,"flex flex-col gap-3 p-4"),children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[e.jsxs("h2",{id:"v2-report-processing",className:"m-0 min-w-0 truncate text-v2-16 font-bold text-v2-text",children:[a.processingTitle,i.domain&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("span",{className:"text-v2-text-2",children:i.domain})]})]}),e.jsx(O,{variant:"secondary",onClick:i.onCancel,disabled:i.cancelling,children:i.cancelling?a.cancelling:a.cancel})]}),i.connectionIssue&&e.jsx(T,{variant:"warn",lang:t,title:a.connectionTitle,action:e.jsx(O,{variant:"text",onClick:i.onRefresh,className:"shrink-0 text-v2-warn",children:a.refresh}),children:a.connectionBody}),e.jsx(Ts,{states:i.states,lang:t}),e.jsx("p",{className:"m-0 text-v2-12 font-medium text-v2-text-2",children:a.processingBody})]}),i.kind==="error"&&e.jsxs("section",{className:v(H,"flex flex-col gap-3 p-5"),"aria-labelledby":"v2-report-error",children:[e.jsx("h2",{id:"v2-report-error",className:"sr-only",children:a.errorTitle}),e.jsx(T,{variant:"error",lang:t,title:a.errorTitle,children:a.errorBody}),i.details&&e.jsx("p",{className:"m-0 rounded-v2-control bg-v2-sunken p-3 font-mono text-v2-12 font-medium text-v2-text",children:i.details}),i.troubleshooting.length>0&&e.jsx("ul",{className:"m-0 flex list-disc flex-col gap-1 pl-5 text-v2-13l font-medium text-v2-text-2",children:i.troubleshooting.map((p,u)=>e.jsx("li",{children:p},u))}),e.jsx("div",{children:e.jsx(Ue,{to:i.retryHref,variant:"primary",children:a.retry})})]}),i.kind==="unknown"&&e.jsx(T,{variant:"warn",lang:t,title:g(a.unknownTitle,{status:i.status}),action:e.jsx(O,{variant:"secondary",size:"sm",onClick:i.onRefresh,children:a.refresh})}),i.kind==="completed"&&e.jsx(Ln,{lang:t,tab:s,hrefs:n,header:r,report:i.report})]})}function di(){var qe,Be,Ve,He,We,Ke,Ye,Ze,Xe,Je;const{id:t}=Qt(),s=es(),{language:n,t:r}=vt(),i=n==="en"?"en":"fr",[a]=ts(),p=Xs(a.get("tab")),{credits:u,refreshCredits:l}=Gt(),c=b=>Ee(b,i),{analysis:o,loading:h,connectionIssue:m,progress:k,verificationScore:M,fetchAnalysis:f}=rn(t,i),P=()=>{f()},V=an(o==null?void 0:o.id,o==null?void 0:o.url,P),I=ln(o,P,i),[x,N]=y.useState(!1),[w,A]=y.useState(!1),[L,R]=y.useState(!1),[j,W]=y.useState(!1),[we,re]=y.useState(!1),[K,ae]=y.useState(null),d=le(`/dashboard/report/${t??""}`,i),U={tabs:{verdict:`${d}?tab=verdict`,plan:d,checks:`${d}?tab=checks`,merchant:`${d}?tab=merchant`,review:`${d}?tab=review`,all:`${d}?tab=all`},root:le("/dashboard/deban-gmc",i),audits:le("/dashboard/results",i),relaunch:rt(i,(o==null?void 0:o.url)||null)},fe=o==null?void 0:o.action_plan,xe=!!(fe&&fe.length>0),Ne=y.useMemo(()=>o?xe?jt(fe??[],I.overrides):zs(o.recommendations??[]):[],[o,fe,xe,I.overrides]),Rt=y.useMemo(()=>
2new Set(Ne.filter(b=>b.kind==="action"?!!Ae(b.title,b.why):!!!(b.evidence||b.quote||b.why||b.howToFix)&&!!Ae(b.title,b.description)).map(b=>b.key)),[Ne]),J=o?gs(o.metadata):!1,Ft=async()=>{var b,Z;if(!(!o||x)){if(J){_.error(c("Achetez des crédits pour télécharger le PDF"));return}N(!0);try{const{downloadDebanGmcPDF:Q}=await Kt(async()=>{const{downloadDebanGmcPDF:oe}=await import("./pdf-export-DY6PY77w.js");return{downloadDebanGmcPDF:oe}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),ve=(Z=(b=o.metadata)==null?void 0:b.locale)==null?void 0:Z.language;await Q(o,ve==="en"?"en":ve==="fr"?"fr":i),_.success(r.dashboard.report.pdfDownloaded)}catch(Q){console.error("PDF generation error:",Q),_.error(r.dashboard.report.pdfError)}finally{N(!1)}}},he=qt({serviceType:"report_unlock"}),Pt=u===null||u>=he,$e=(Be=(qe=o==null?void 0:o.metadata)==null?void 0:qe.locale)==null?void 0:Be.currency,It=Bt($e);o&&Vt($e);const ge=Ht(Wt.deban_promo3,It),Mt=Pt?i==="en"?`Unlock (${he} credit)`:`Débloquer (${he} crédit)`:i==="en"?`Unlock the report â ${et(ge.amount,ge.currency,"en")} (2 free audits)`:`Débloquer le rapport â ${et(ge.amount,ge.currency,"fr")} (2 audits offerts)`,Ge=b=>{Te(Se.reportUnlockNoCredits,{checked:b}),o&&js(o.id),_.info(c("Ce rapport coûte 1 crédit. Choisissez un pack â on revient ici et il se débloque tout seul.")),s(le("/dashboard/subscription",i))},Lt=async()=>{if(!(!o||w)){if(Te(Se.reportUnlockClick,{credits_held:u??-1}),u!==null&&u<he){Ge("client");return}A(!0);try{const b=await bs(o.id);b.status==="unlocked"?(Te(Se.reportUnlocked),ks(),_.success(c("Rapport débloqué !")),await l(),await f()):b.status==="insufficient_credits"?Ge("server"):b.status==="network_error"?_.error(c("Connexion interrompue. Réessayez, aucun crédit n'a été débité.")):_.error(b.message||c("Impossible de débloquer le rapport."))}catch(b){console.error("handleUnlock error:",b),_.error(c("Une erreur est survenue. Veuillez réessayer."))}finally{A(!1)}}},Ot=async()=>{if(!o||L)return;R(!0);const b=await ys(o.id);b.success?(_.success(r.dashboard.report.analysisCancelled),f()):_.error(b.error||c("Erreur lors de l'annulation")),R(!1)},Dt=async()=>{W(!0),re(!1);const b=await Ns(!0);W(!1),b.success?setTimeout(()=>window.location.reload(),800):(re(!0),setTimeout(()=>re(!1),3e3))};let Y;if(h)Y={kind:"loading"};else if(!o)Y={kind:"not_found"};else if(o.status==="processing")Y={kind:"processing",domain:o.url?at(o.url):"",states:Ss(k,o.status),connectionIssue:m,cancelling:L,onCancel:()=>{Ot()},onRefresh:()=>window.location.reload()};else if(o.status==="error")Y={kind:"error",details:o.error_details??null,troubleshooting:o.troubleshooting??[],retryHref:rt(i,o.url||null)};else if(o.status!=="completed")Y={kind:"unknown",status:o.status||c("inconnu"),onRefresh:P};else{const b=Ls(o.recommendations),Z=vs(o),Q=o.store_checks||((Ve=o.metadata)==null?void 0:Ve.store_checks)||null,ve=o.store_intelligence||((He=o.metadata)==null?void 0:He.store_intelligence)||null,_e=o.issue_groups||((We=o.metadata)==null?void 0:We.issue_groups)||[],oe=Array.isArray(_e)?_e:[],Et=Array.isArray((Ke=o.metadata)==null?void 0:Ke.gmc_account_issues)?o.metadata.gmc_account_issues:[],Qe=Zs(o,i),Ut=!!o.verification_analysis_id;Y={kind:"completed",report:{score:o.score,counts:b,brief:nn(rs(b.critical,b.important,b.suggestion,b.blocking,i)),checks:Z,readiness:Hs(o)?o.readiness_data??null:null,work:{kind:xe?"action":"recommendation",items:Ne},isFree:J,suspensionTimeout:!!o.suspension_context&&!xe,languageNotice:Qe?r.dashboard.report.producedIn[Qe]:null,partial:Ks(o,i),degraded:o.analysis_degraded?{message:o.degradation_message||null}:null,store:ve,merchant:{notRead:ws(o.metadata),crossCheck:((Ye=o.metadata)==null?void 0:Ye.gmc_cross_check)||null,issues:Et,refresh:{refreshing:j,failed:we,onRefresh:()=>{Dt()}}},siteUrl:o.url,readAt:o.created_at,unlock:{label:Mt,unlocking:w,onUnlock:()=>{Lt()}},actions:{onToggle:F=>{J||I.toggle(F)},updatingKeys:I.updating,feedbackEnabled:I.feedbackEnabled,isReported:I.isReported,onReportFp:I.reportFalsePositive,confidenceFlag:us("FF_CONFIDENCE_LEVEL"),guideKeys:Rt,onShowGuide:F=>{const ye=Ae(F.title,F.kind==="action"?F.why:F.description);ye&&ae({guide:ye,title:F.title})}},slots:{checks:Q&&Z?e.jsx(as,{checks:Q,summary:Z}
2):null,scan:oe.length>0?e.jsx(hn,{groups:oe,locked:J,lang:i}):null,scanCount:oe.reduce((F,ye)=>F+ye.count,0),offsite:J?null:e.jsx(os,{analysisId:o.id}),beforeAfter:Ut?e.jsx(ls,{data:{initialScore:o.score,verificationScore:M??o.score,initialIssues:o.total_recommendations||0,verificationIssues:((Ze=o.recommendations)==null?void 0:Ze.filter(F=>!F.fixed).length)||0,resolvedIssues:((Xe=o.recommendations)==null?void 0:Xe.filter(F=>F.fixed).length)||0,remainingIssues:((Je=o.recommendations)==null?void 0:Je.filter(F=>!F.fixed).length)||0}}):null,appeal:e.jsx(cs,{analysis:o}),modal:K?e.jsx(ds,{open:!!K,onOpenChange:F=>{F||ae(null)},guide:K.guide,problemTitle:K.title}):null}}}}const Ce=V.state;return e.jsx(On,{lang:i,tab:p,hrefs:U,header:{domain:o!=null&&o.url?at(o.url):null,dateLabel:o?kt(o.created_at,i):null,pdf:{visible:(o==null?void 0:o.status)==="completed",loading:x,onDownload:()=>{Ft()}},reverify:(o==null?void 0:o.status)==="completed"&&o.suspension_context&&!J?{state:Ce,onStart:()=>{V.start()},followHref:Ce.kind==="running"?le(`/dashboard/report/${Ce.analysisId}`,i):null}:null},state:Y})}export{di as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.