import{d as o,e as r}from"./chunk-UFQSDOZD.js";import{La as l,Qa as a}from"./chunk-HC2G7LSI.js";var f=(()=>{let i=class i{constructor(t,e){this.metaService=t,this.titleService=e,this.canonicalElement=document.querySelector("link[rel=canonical]"),this.canonicalElement||(this.canonicalElement=document.createElement("link"),this.canonicalElement.setAttribute("rel","canonical"),document.head.appendChild(this.canonicalElement),this.setCanonicalUrl(document.URL))}removeCanonicalUrls(){let t=document.querySelectorAll("link[rel='canonical']");for(let e=0,n=t.length;e<n;e++)t[e].remove()}setSeoTags({title:t,metas:e}){this.titleService.setTitle(t),this.setMetas(e)}setMetas(t){Object.keys(t).map(e=>t[e]).forEach(e=>{if(e.content)this.metaService.updateTag(e);else{let n=Object.keys(e)[0];n&&this.metaService.removeTag(`${n}='${e[n]}'`)}})}setCanonicalUrl(t){this.canonicalElement&&this.canonicalElement.setAttribute("href",t)}};i.\u0275fac=function(e){return new(e||i)(a(o),a(r))},i.\u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"});let c=i;return c})();export{f as a};