sass-template-common 0.10.34 → 0.10.35
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.
|
@@ -4204,8 +4204,8 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
|
4204
4204
|
// CMS schemas/news-list-summary filtra autores por internalUser, no por autor
|
|
4205
4205
|
autor: "internalUser",
|
|
4206
4206
|
seccion: "seccion",
|
|
4207
|
-
tema: "claves"
|
|
4208
|
-
|
|
4207
|
+
tema: "claves"
|
|
4208
|
+
// ultimas-noticias: sin query (listado general por publication/newstype)
|
|
4209
4209
|
}, hc = async ({
|
|
4210
4210
|
config: e,
|
|
4211
4211
|
axiosApi: t,
|
|
@@ -19,7 +19,7 @@ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
|
19
19
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
20
20
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
21
21
|
})(window,document,'script','dataLayer','${e}');
|
|
22
|
-
`}}),s.jsx("noscript",{children:s.jsx("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${e}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})})]})},Er=()=>{const{ANALYTICS_marfeel:e}=U();return e&&s.jsx("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`!function(){"use strict";function e(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=document.createElement("script");c.src=e,t?c.type="module":(c.defer=!0,c.type="text/javascript",c.setAttribute("nomodule",""));var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(c,n)}!function(t,c){!function(t,c,n){var a,o,r;n.accountId=c,null!==(a=t.marfeel)&&void 0!==a||(t.marfeel={}),null!==(o=(r=t.marfeel).cmd)&&void 0!==o||(r.cmd=[]),t.marfeel.config=n;var i="https://sdk.mrf.io/statics";e("".concat(i,"/marfeel-sdk.js?id=").concat(c),!0),e("".concat(i,"/marfeel-sdk.es5.js?id=").concat(c),!1)}(t,c,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(window,${e},{})}();`}})},od=({defaultRouteName:e})=>{const{CAPTCHA_KEY:t,CONFIG_comments:a=!1,CONFIG_commentsV2:n=!1}=U();return t&&t!==""&&(e==="video"&&a&&!n||e==="news"&&a&&!n||e==="auth"||e==="anuncia"||e==="contacto")&&s.jsx("script",{src:`https://www.google.com/recaptcha/enterprise.js?render=${t}`,async:!0,defer:!0})},Tr={prefetch:[{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},kr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},Ir={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#content-news-section a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},Ur={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#block-notes-list a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},id={Home:Tr,Common:kr,Nota:Ir,NotaLista:Ur},Lr=({active:e,type:t,customSpeculation:a})=>{const n=a||id[t];return e&&s.jsx("script",{type:"speculationrules",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}})},bs=async(e,t,a)=>{if(a)return a.get(`/schemas${t}`,{params:e}).catch(n=>{console.log(`[/schemas${t}] Error: ${n.message}`)})},ld=(e,t)=>{if(typeof e=="string")return mt(e,t);if(e&&typeof e=="object"){const a={...e};return typeof a.url=="string"&&(a.url=mt(a.url,t)),typeof a["@id"]=="string"&&(a["@id"]=mt(a["@id"],t)),a}return e},As=(e,t)=>{if(Array.isArray(e))return e.map(a=>As(a,t));if(e&&typeof e=="object"){const a=e,n=a["@type"];if((n==="BreadcrumbList"||n==="ItemList")&&Array.isArray(a.itemListElement)){const o=a.itemListElement,i=n==="BreadcrumbList"&&o.some((l,c)=>l?.position!==c+1);return{...a,itemListElement:o.map((l,c)=>{if(!l||typeof l!="object")return l;const d={...l};return"item"in d&&(d.item=ld(d.item,t)),typeof d.url=="string"&&(d.url=mt(d.url,t)),i&&(d.position=c+1),d})}}const r={};for(const[o,i]of Object.entries(a))r[o]=As(i,t);return r}return e},cd={autor:"internalUser",seccion:"seccion",tema:"claves"
|
|
22
|
+
`}}),s.jsx("noscript",{children:s.jsx("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${e}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})})]})},Er=()=>{const{ANALYTICS_marfeel:e}=U();return e&&s.jsx("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:`!function(){"use strict";function e(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=document.createElement("script");c.src=e,t?c.type="module":(c.defer=!0,c.type="text/javascript",c.setAttribute("nomodule",""));var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(c,n)}!function(t,c){!function(t,c,n){var a,o,r;n.accountId=c,null!==(a=t.marfeel)&&void 0!==a||(t.marfeel={}),null!==(o=(r=t.marfeel).cmd)&&void 0!==o||(r.cmd=[]),t.marfeel.config=n;var i="https://sdk.mrf.io/statics";e("".concat(i,"/marfeel-sdk.js?id=").concat(c),!0),e("".concat(i,"/marfeel-sdk.es5.js?id=").concat(c),!1)}(t,c,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(window,${e},{})}();`}})},od=({defaultRouteName:e})=>{const{CAPTCHA_KEY:t,CONFIG_comments:a=!1,CONFIG_commentsV2:n=!1}=U();return t&&t!==""&&(e==="video"&&a&&!n||e==="news"&&a&&!n||e==="auth"||e==="anuncia"||e==="contacto")&&s.jsx("script",{src:`https://www.google.com/recaptcha/enterprise.js?render=${t}`,async:!0,defer:!0})},Tr={prefetch:[{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},kr={prefetch:[{urls:["/"],eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:".nota-prerender"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"}]},eagerness:"eager"},{where:{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},eagerness:"moderate"}]},Ir={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#content-news-section a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},Ur={prefetch:[{urls:["/"],eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}],prerender:[{where:{and:[{selector_matches:"#block-notes-list a"},{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"eager"},{where:{and:[{href_matches:"/*(-[0-9]{8}-[0-9]{4,6}|lb[0-9]{12,14}|t[0-9]{12,14}).html"},{not:{selector_matches:"[rel~=nofollow]"}}]},eagerness:"moderate"}]},id={Home:Tr,Common:kr,Nota:Ir,NotaLista:Ur},Lr=({active:e,type:t,customSpeculation:a})=>{const n=a||id[t];return e&&s.jsx("script",{type:"speculationrules",dangerouslySetInnerHTML:{__html:JSON.stringify(n)}})},bs=async(e,t,a)=>{if(a)return a.get(`/schemas${t}`,{params:e}).catch(n=>{console.log(`[/schemas${t}] Error: ${n.message}`)})},ld=(e,t)=>{if(typeof e=="string")return mt(e,t);if(e&&typeof e=="object"){const a={...e};return typeof a.url=="string"&&(a.url=mt(a.url,t)),typeof a["@id"]=="string"&&(a["@id"]=mt(a["@id"],t)),a}return e},As=(e,t)=>{if(Array.isArray(e))return e.map(a=>As(a,t));if(e&&typeof e=="object"){const a=e,n=a["@type"];if((n==="BreadcrumbList"||n==="ItemList")&&Array.isArray(a.itemListElement)){const o=a.itemListElement,i=n==="BreadcrumbList"&&o.some((l,c)=>l?.position!==c+1);return{...a,itemListElement:o.map((l,c)=>{if(!l||typeof l!="object")return l;const d={...l};return"item"in d&&(d.item=ld(d.item,t)),typeof d.url=="string"&&(d.url=mt(d.url,t)),i&&(d.position=c+1),d})}}const r={};for(const[o,i]of Object.entries(a))r[o]=As(i,t);return r}return e},cd={autor:"internalUser",seccion:"seccion",tema:"claves"},Pr=async({config:e,axiosApi:t,pathname:a,ROUTE:n})=>{const{PUBLIC_PUBLICATION_ID:r=""}=U();let o=[];const i=a==="/"||a==="/index.html"?void 0:jr(Fr[n]({pathname:a,config:e})),l=cd[n]??void 0,c={newstype:e.newsType,publication:Number(r),...i&&l?{query:`${l}:('${i}')`}:{}};try{const u=await bs(c,"/news-list-summary",t);u?.data?.data?o=u.data.data:console.warn("getSchemas responded but did not contain expected data:",u)}catch(u){console.log("Error fetching schemas:",u)}const d=(()=>{try{return new URL(e.siteUrl??"").origin}catch{return e.siteUrl??""}})();return Object.keys(o).length>0&&s.jsx("script",{id:"webSiteItemListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(As(Pe(o),d))}})},dd=(e,t)=>{const a={"@context":"https://schema.org","@type":"SoftwareApplication",name:t.name??e.name,url:t.url,operatingSystem:t.operatingSystem,applicationCategory:t.applicationCategory,publisher:{"@id":`${e.siteUrl}/#organization`},offers:{"@type":"Offer",price:t.offers.price,priceCurrency:t.offers.priceCurrency},description:t.description??e.description,downloadUrl:t.downloadUrl??t.url};return t.applicationSubCategory&&(a.applicationSubCategory=t.applicationSubCategory),t.aggregateRating&&(a.aggregateRating={"@type":"AggregateRating",ratingValue:t.aggregateRating.ratingValue,ratingCount:t.aggregateRating.ratingCount,...t.aggregateRating.bestRating&&{bestRating:t.aggregateRating.bestRating}}),t.softwareVersion&&(a.softwareVersion=t.softwareVersion),t.contentRating&&(a.contentRating=t.contentRating),Pe(a)},Or=({config:e})=>{if(!e.orgSoftware)return null;const t=Array.isArray(e.orgSoftware)?e.orgSoftware:[e.orgSoftware];return s.jsx(s.Fragment,{children:t.map((a,n)=>s.jsx("script",{id:`SoftwareApplicationSchema-${n}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(dd(e,a))}},n))})};function ys(e){const{PUBLIC_ASSETS_URL:t}=U();if(!t||t==="false")return e;const a=t.replace(/\/+$/,""),n=/https?:\/\/[^/\s]+\/(arte|__export)\//g;return e.replace(n,(r,o)=>`${a}/${o}/`)}const ud=e=>Array.isArray(e)?e.length>0:e&&typeof e=="object"?Object.keys(e).length>0:!!e,Br=async({realPath:e,config:t,BASE_URL:a,axiosApi:n,schemasCustomEndpoints:r})=>{const o=de();let i=[];try{const c=t.socialBlockLogo?.url?new URL(t.socialBlockLogo.url).pathname:void 0,d=t.landscapeLogo?.url?new URL(t.landscapeLogo.url).pathname:void 0,u={path:e,image:d,logo:c,url:t.language?`${t.siteUrl}/${t.language}`:t.siteUrl,name:t.name,logow:t.socialBlockLogo?.width,logoh:t.socialBlockLogo?.height,authorurl:a+o+(t.paths.autor?`/${t.paths.autor}/`:"/autor/"),lang:t.lang},f=e.split("/").find(w=>["liveblogs","liveblog"].includes(w)),h=r&&r.length>0?r:f=="liveblogs"||f=="liveblog"?["/news","/news-breadcrumb","/news-liveblog"]:["/news","/news-breadcrumb"],p=t.paths.tema!==""?"/"+t.paths.tema:t.paths.tema,m=o?o+p:p;i=(await Promise.all(h.map(async w=>{const A=w==="/news-breadcrumb"?{...u,prefixtag:m}:w==="/news"&&t.schemasNewsParams?{...u,...t.schemasNewsParams}:u;return await bs(A,w,n)}))).map(w=>w?.data?.data??[])}catch(c){console.log("Error fetching schemas:",c)}const l=(()=>{try{return new URL(a??"").origin}catch{return a??""}})();return i.map(c=>Pe(c)).filter(ud).map((c,d)=>s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ys(JSON.stringify(As(c,l)))}},d))},Mr=({config:e,socials:t})=>{const a={"@context":"https://schema.org","@type":"NewsMediaOrganization","@id":`${e.siteUrl}/#organization`,name:e.name,description:e.description,email:e.email,url:e.siteUrl,logo:e.squareLogo.url,address:e.address&&Object.keys(e.address).length>0?{"@type":"PostalAddress",...e.address}:void 0,sameAs:Object.keys(t).filter(n=>t[n]?.showInSchema===void 0?t[n]?.show:t[n]?.showInSchema).map(n=>t[n]?.url)};return s.jsx("script",{id:"WebsiteOrgListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Pe(a))}})},_r=({config:e})=>{const t={"@context":"https://schema.org","@type":"WebSite",name:e.name,url:e.siteUrl,potentialAction:{"@type":"SearchAction",target:e.siteUrl+de()+"/"+e.paths.buscar+"?query={search_term_string}","query-input":"required name=search_term_string"}};return s.jsx("script",{id:"WebsiteListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Pe(t))}})},Dr=async({realPath:e,config:t,axiosApi:a})=>{try{const n={path:e,image:t.landscapeLogo?.url?new URL(t.landscapeLogo.url).pathname:void 0,logo:t.socialBlockLogo?.url?new URL(t.socialBlockLogo.url).pathname:void 0,url:t.siteUrl,name:t.name,logow:t.socialBlockLogo?.width,logoh:t.socialBlockLogo?.height,authorurl:`${t.siteUrl}${de()}${t.paths.autor?`/${t.paths.autor}/`:"/autor/"}`},o=(await bs(n,"/videos",a))?.data.data;return o?s.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ys(JSON.stringify(Pe(o)))}}):void 0}catch(n){return console.error("Error fetching video schemas:",n),null}},hd="U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",qr=e=>e?.startsWith("family=")??!1,fd=e=>e.fontS3Url&&e.useS3Font?{url:e.fontS3Url,isS3:!0}:e.googleFontFamily&&!qr(e.googleFontFamily)?{url:e.googleFontFamily,isS3:!1}:{url:"",isS3:!0},md=(e,t,a,n)=>`@font-face {
|
|
23
23
|
font-family: '${e.fontName}';
|
|
24
24
|
font-style: normal;
|
|
25
25
|
font-weight: ${e.fontWeight};
|