import{logger as e}from"../../../logger/index.mjs";const t=(e,t)=>t.status===`success`?e:t.status===`warning`?e/2:t.status===`error`?0:e,n={robots_robotsPresent:10,robots_noLocalizedUrlsForgotten:8,sitemap_sitemapPresent:10,sitemap_noLocalizedUrlsForgotten:9,sitemap_hasAlternates:8,sitemap_hasXDefault:7,url_htmlLang:9,url_htmlDir:3,url_hasCanonical:10,url_hreflang:9,url_hasLocalizedLinks:8,url_hasXDefault:7,url_allAnchorsLocalized:6,url_currentLocale:3},r=(r,i)=>{let a={...r},o=i.type?.split(`\\`)[0];if(!o)return a;let s=n[o];return typeof s==`number`&&(a.score+=t(s,i),a.totalScore+=s),e.info(`Score mutation`,{type:i.type,typeWithoutUrl:o,scoreValue:s,newScore:a}),a};export{r as mutateScore};
//# sourceMappingURL=calculateScore.mjs.map