sass-template-common 0.3.25 → 0.3.26

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.
@@ -11398,9 +11398,7 @@ const Og = (e) => {
11398
11398
  }
11399
11399
  );
11400
11400
  }, jg = (e) => {
11401
- const { news: t, hasLines: n = !1, API_ENV: s } = e;
11402
- console.log("API_ENV from BlockNews1", s, s.SHOW_TAG_BY_SECTION);
11403
- const r = (o) => n && (o + 1) % 3 !== 0 ? da.contentSeparator : "";
11401
+ const { news: t, hasLines: n = !1, API_ENV: s } = e, r = (o) => n && (o + 1) % 3 !== 0 ? da.contentSeparator : "";
11404
11402
  return /* @__PURE__ */ a(
11405
11403
  "div",
11406
11404
  {
@@ -11419,7 +11417,8 @@ const Og = (e) => {
11419
11417
  config: h,
11420
11418
  overImage: p = "default",
11421
11419
  isTitle: g = !1,
11422
- isLarge: A = !1
11420
+ isLarge: A = !1,
11421
+ keywords: w
11423
11422
  } = o;
11424
11423
  return /* @__PURE__ */ a(
11425
11424
  "div",
@@ -11462,7 +11461,8 @@ const Og = (e) => {
11462
11461
  isTitle: g,
11463
11462
  paths: e.paths,
11464
11463
  isVisible: e.isVisible,
11465
- DATE_CONFIG: e.API_ENV
11464
+ DATE_CONFIG: e.API_ENV,
11465
+ keywords: w
11466
11466
  }
11467
11467
  ) })
11468
11468
  ] })
@@ -155,5 +155,5 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
155
155
  ${E}
156
156
  <figcaption>${q}</figcaption>
157
157
  </figure>
158
- `}}catch(w){console.error("insertVideos error for",g,w),A=""}else A=f;o=u,a+=A,s.lastIndex=u}return a+=e.slice(o),a=gd(a),a}async function bd(e){const{news:n,banners:a,newsRelatedResponses:o,newsRelatedListResponses:s,slug:r,itemList:i,socials:c,getVideos:h,commonServices:l}=e;let d=n?.body?.rendered??"";d=d.replace(/&nbsp;/g,""),d=Ad(d,a),d=yd(d),d=await pd(d),d=await wd(d,e.texts,o),d=await Cd(d,h),d=fd(d),d=md(d);const u=n.main.sources??[],f=n.config.articlepreview===dt.fotoGaleria&&n.hascontent?.hasgalleryimages;return t.jsxs("div",{className:kn.content,children:[r!=="liveblogs"&&e.showHeaderImage?f?t.jsx(Js,{commonServices:l,newsformated:n,internal:n.info.link.internal}):t.jsx(bs,{preview:n.preview}):null,t.jsx(ge,{banners:a,name:"block_1"}),t.jsx("div",{className:kn.journalistArticleContent,children:t.jsx(od,{autorIcon:e.autorIcon,socials:c,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths})}),t.jsx(rd,{summary:n.main.summary}),t.jsx("div",{className:kn.contentNews,suppressHydrationWarning:!0,id:"content-news-section",dangerouslySetInnerHTML:{__html:d}}),t.jsx(td,{texts:e.texts,itemList:i,banners:a,slug:r,getVideos:h,newsRelatedListResponses:s??[]}),u.length>0&&t.jsxs("div",{className:kn.noteSource,children:[t.jsx(cd,{}),t.jsx("p",{children:e.texts.noteSource+(u.length===1?"":"s")+": "+u.map(g=>g.name).join(", ")})]})]})}const vd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(me,{title:a,titleUrl:e.titleUrl,children:t.jsx(it,{slot_id:o,cardWidth:200,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(jt,{...c,titleGradient:!0,paths:e.paths},i)})})})},_d=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(me,{title:a,titleUrl:e.titleUrl,children:t.jsx(it,{slot_id:o,cardWidth:343,cardGap:32,visibleItems:3,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(jt,{...c,titleGradient:!0,paths:e.paths},i)})})})},Sd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(me,{title:a,titleUrl:e.titleUrl,children:t.jsx(it,{slot_id:o,fullPageWidth:!0,visibleItems:1,pagination:!0,cardGap:0,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return I.createElement(jt,{...c,key:i,titleGradient:!0,paths:e.paths})})})})},xn=e=>{const n={};for(const a in e)a.startsWith("--")&&(n[a]=e[a]);return n},ht={headerSection:"_headerSection_1c69w_1",title:"_title_1c69w_11",subtitle:"_subtitle_1c69w_23",newsContent:"_newsContent_1c69w_36",containerCards:"_containerCards_1c69w_44",image:"_image_1c69w_50",blockHeadContainer:"_blockHeadContainer_1c69w_56"},Nd=e=>{const{content:n,title:a,isVideo:o}=e;if(!n||n.length===0)return;const s=n[0],r=n.slice(1),i=e.slot_id&&e.slot_id!=="Nota_1";return s&&r&&t.jsxs(me,{title:a,titleUrl:e.titleUrl,children:[t.jsx("div",{className:ht.headerSection,children:t.jsxs("a",{style:{"--heightImageOverwriteMobile":"200%"},className:ht.image,href:s?.info?.link?.url,target:s?.info?.link?.target,children:[t.jsxs("div",{className:ht.blockHeadContainer,children:[t.jsx("p",{className:ht.title,children:s?.main?.title.home}),s?.main?.subtitle?.rendered&&t.jsx("p",{className:ht.subtitle,children:s?.main?.subtitle?.striped})]}),t.jsx(Se,{preview:s.preview})]})}),t.jsxs("div",{className:ht.containerCards,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),t.jsx("div",{className:ht.newsContent,children:Array.isArray(r)&&r.map((c,h)=>{const l={...c,main:{...c.main,title:{...c.main.title,section:i?c.main.title.home:c.main.title.section}}};return t.jsx("div",{style:{order:h},children:t.jsx(De,{...l,isVideo:o,paths:e.paths})},h)})})]})]})},tr={banner:e=>t.jsx(ge,{...e,name:e.slot_id.replace("Home","block")}),readest:e=>t.jsx(gn,{...e}),"Modulo 1x3":e=>t.jsx(Aa,{...e}),"Modulo 1x4":e=>t.jsx($s,{...e}),"Modulo 1x5":e=>t.jsx(Qs,{...e}),"Destacado noticias":e=>t.jsx(Os,{...e}),"Destacado full width":e=>t.jsx(Nd,{...e}),"Destacado videos":e=>t.jsx(Gs,{...e}),"Carrusel card":e=>t.jsx(Fs,{...e}),"Carrusel story":e=>t.jsx(vd,{...e}),"Carrusel owl":e=>t.jsx(_d,{...e}),"Modulo fotogaleria":e=>t.jsx(Sd,{...e}),"Carrusel opinion":e=>t.jsx(Vs,{...e}),"Modulo 1x3 card":e=>t.jsx(zs,{...e})};function Un({component:e,slot_id:n,data:a,banners:o}){if(o)return tr[e]&&t.jsx("div",{className:"home-slot",style:xn(a),children:tr[e]({...a,banners:o,slot_id:n})})}function Ed({children:e,stylesConfigEntry:n}){return t.jsx("div",{className:"home-slot",style:xn(n),children:e})}const nr={Diario:e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(qs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,block:n,banners:e.banners,showSuper:e.showSuper,rightOnlyBanner:e.rightOnlyBanner,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},"Diario con imagen":e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(qs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,showSuper:e.showSuper,block:n,banners:e.banners,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},Super:e=>t.jsx(Nt,{...e.data[0],paths:e.paths}),"3 notas verticales":e=>t.jsx(ql,{content:e.data,customLargeSection:e.customLargeSection,customSlimSection:e.customSlimSection,paths:e.paths}),"3 notas horizontales":e=>t.jsx(Ll,{content:e.data,customLargeSection:e.customLargeSection,customSmallSection:e.customSmallSection,paths:e.paths})},Ln=({component:e,data:n,banners:a,rightOnlyBanner:o})=>t.jsx("div",{style:xn(n),children:nr[e]&&nr[e]({...n,rightOnlyBanner:o,banners:a})}),Id=({slots:e,DYNAMIC_SLOT_SUBINDEXES:n,stylesConfig:a,AutorIcon:o,config:s,banners:r,showTagBySection:i})=>{const c=[],l=n,d=Object.keys(e).length/l;for(let u=1;u<=d;u++)for(let f=1;f<=l;f++){const g="Home_"+u+"_"+f;!e[g]||!e[g].blockSass||!e[g].blockSass[0]||!e[g].blockSass[0].value||!e[g].blockSass[0].block||e[g].blockSass[0].block==="No Mostrar"||c.push(t.jsxs(rs,{show:!!e[g].content?.data,order:(u-1)*l+(f-1),children:[t.jsx(Un,{component:e[g].blockSass[0].block,banners:r,slot_id:g,data:{...e[g].blockSass[0].block?a[e[g].blockSass[0].block]:[],content:e[g].content?.data??[],title:e[g].blockSass[0].title??void 0,titleUrl:e[g].blockSass[0].link??void 0,autorIcon:t.jsx(o,{}),paths:s.paths,showTagBySection:i}}),t.jsx(Re,{children:t.jsx($e,{banners:r,index:"dynamic_"+u+"_"+f})})]},u+"_"+f))}return c},Td=({mainBlock:e,StylesConfigMain:n,config:a,banners:o})=>{const{PUBLIC_ENV:s}=K();if(s!=="local")return null;const r=e?.news?.data||[],i=(c,h)=>({...e?.news,...n[c],data:r.slice(0,h),paths:a.paths});return t.jsxs(t.Fragment,{children:[t.jsx(Ln,{component:"Super",data:i("Super",1),banners:o}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:1})}),t.jsx(Ln,{component:"3 notas verticales",data:i("3 notas verticales",3),banners:o}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:1})}),t.jsx(Ln,{component:"3 notas horizontales",data:i("3 notas horizontales",3),banners:o}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:1})})]})},kd=e=>{const{config:n}=e,a=n.articlepreview;return!![dt.videoEmbedded,dt.videoYouTube,dt.iframe].includes(a)},xd=async e=>{const{custom_complement:n,ranking:a=[],banners:o,autor:s=[],news:r=[],newsRelatedResponses:i=[],newsRelatedListResponses:c=[],itemList:h=[],socials:l,getVideos:d}=e,u=e.slug==="liveblogs",{SHOW_NEWS_MORE_NEWS:f,SHOW_NEWS_RELATED_NEWS:g,MORE_NEWS_SSR:m}=K();if(!(!r||!r[0]))return t.jsx(t.Fragment,{children:t.jsxs(zl,{className:ba.contentLayout2,children:[t.jsx(Vl,{option:e.slug,news:r,paths:e.paths,headerSectionStyles:e.headerSectionStyles}),t.jsx($e,{banners:o,index:1}),!u&&e.commonServices&&t.jsx(ud,{news:r[0],commonServices:e.commonServices}),t.jsx(Fl,{texts:e.texts,paths:e.paths,slug:e.slug,itemList:h,ranking:a,readestCustomStyles:e.readestCustomStyles,bannerTop:t.jsx(ge,{banners:o??[],name:"right_1"}),banner:t.jsx(ge,{banners:o??[],name:"right_2"}),complement:t.jsxs("div",{id:"comentarios",suppressHydrationWarning:!0,children:[s.length>0&&t.jsx(Us,{texts:e.texts,autorIcon:e.autorIcon,autor:s[0],paths:e.paths}),r[0].authors.length>1&&t.jsx(Ls,{news:r[0],autorIcon:e.autorIcon,paths:e.paths,texts:e.texts}),t.jsx("div",{className:ba.tagContent,children:t.jsx(xs,{tags:r[0]?.keywords?.tags,paths:e.paths})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2rem"},suppressHydrationWarning:!0,children:[e.showComments&&t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"comment",internalPath:e.internalPath,COMMENTS_VARS:e.COMMENTS_VARS,DATE_CONFIG:e.DATE_CONFIG}))}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:2})}),g&&t.jsxs(t.Fragment,{children:[t.jsx(Un,{component:"Carrusel card",banners:[],slot_id:"Nota_1",data:{...e.stylesConfig["Carrusel card"],content:e.relatedNewsList??[],title:e.texts.relatedNewsTitle,titleUrl:void 0,paths:e.paths}}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:3})})]}),f&&t.jsxs(t.Fragment,{children:[m?t.jsx(Un,{component:"Modulo 1x3",banners:[],slot_id:"Nota_2",data:{...e.stylesConfig?e.stylesConfig["Modulo 1x3 Client"]?e.stylesConfig["Modulo 1x3 Client"]:e.stylesConfig["Modulo 1x3"]:{},content:e.moreNewsSSR??[],title:e.texts.moreNewsTitle,paths:e.paths,titleUrl:void 0}}):t.jsx(me,{title:e.texts.moreNewsTitle,children:t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"more",stylesConfig:e.stylesConfig,section:r[0].info.section?.slug??"",currentNews:r[0],paths:e.paths,API_ENV:e.API_ENV}))})}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:4})})]}),n&&n()]})]}),children:t.jsxs("section",{style:{"--avatar-content-align-items-desk":e.slug==="liveblogs"?"flex-start":"center"},children:[t.jsx(bd,{texts:e.texts,autorIcon:e.autorIcon,socials:l,news:r[0],banners:o,newsRelatedResponses:i,newsRelatedListResponses:c,itemList:h,slug:e.slug,getVideos:d,noteShare:e.noteShare,paths:e.paths,showHeaderImage:!kd(r[0]),commonServices:e.commonServices}),t.jsx(ge,{banners:o??[],name:"block_3"})]})})]})})},Ft={content:"_content_1046n_1",buttonStyled:"_buttonStyled_1046n_9",searchStyled:"_searchStyled_1046n_20",inputStyled:"_inputStyled_1046n_36",inputStyledTest:"_inputStyledTest_1046n_55"},Ud=e=>t.jsx("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("g",{children:t.jsx("path",{d:"M47.8043 46.6003L47.6635 46.7758L47.8232 46.9342L56.4762 55.5171C56.4768 55.5177 56.4774 55.5184 56.478 55.519C56.8524 55.9072 57.0616 56.4256 57.0616 56.965C57.0616 57.5048 56.8521 58.0234 56.4774 58.4117C56.2839 58.6065 56.0539 58.7611 55.8005 58.8667C55.5466 58.9724 55.2743 59.0269 54.9993 59.0269C54.7243 59.0269 54.452 58.9724 54.1981 58.8667C53.9442 58.7609 53.7138 58.6059 53.5201 58.4106L53.5194 58.4099L44.9327 49.8232L44.7743 49.6648L44.5995 49.805C40.4597 53.1252 35.2051 54.7331 29.9162 54.2981C24.6272 53.863 19.706 51.4181 16.1643 47.4661C12.6227 43.514 10.7298 38.3552 10.875 33.0503C11.0201 27.7455 13.1923 22.6979 16.9447 18.9455C20.6972 15.193 25.7448 13.0209 31.0496 12.8757C36.3544 12.7305 41.5133 14.6234 45.4653 18.165C49.4174 21.7067 51.8623 26.6279 52.2974 31.9169C52.7324 37.2058 51.1245 42.4604 47.8043 46.6003ZM22.4528 47.4552C25.1799 49.2774 28.3861 50.25 31.666 50.25C36.0641 50.25 40.2822 48.5029 43.3921 45.3929C46.5021 42.2829 48.2493 38.0649 48.2493 33.6667C48.2493 30.3868 47.2767 27.1806 45.4545 24.4535C43.6323 21.7264 41.0423 19.6008 38.0121 18.3457C34.9819 17.0905 31.6476 16.7621 28.4307 17.402C25.2139 18.0419 22.259 19.6213 19.9398 21.9405C17.6205 24.2597 16.0411 27.2146 15.4013 30.4314C14.7614 33.6483 15.0898 36.9827 16.345 40.0129C17.6001 43.0431 19.7256 45.633 22.4528 47.4552Z",fill:"white",stroke:"white",strokeWidth:"0.5"})})}),Ld=e=>t.jsx("form",{className:Ft.content,children:t.jsxs("div",{className:`${Ft.inputStyled} sass-buscar-form`,children:[t.jsx("input",{className:Ft.inputStyledTest,defaultValue:e.query,name:"query",placeholder:e.texts.searchKeyWord+"..."}),t.jsx("button",{className:Ft.buttonStyled,type:"submit",children:t.jsx(Ud,{className:Ft.searchStyled})})]})}),_a={content:"_content_io3tv_1",newsContentSection:"_newsContentSection_io3tv_5",itemContent:"_itemContent_io3tv_10"},qd=e=>{const{data:n,option:a,autor:o,page:s,banners:r,pathname:i,ranking:c,currentPage:h,slug:l,texts:d={}}=e,u=[5,10,15],f={5:1,10:2,15:3};switch(a){case"op1":return t.jsx(t.Fragment,{children:t.jsxs(la,{children:[t.jsx(Ss,{autor:o[0],autorIcon:e.autorIcon}),t.jsx(ha,{paths:e.paths,ranking:c,readestTitle:d.readestTitle??"",bannerTop:t.jsx(ge,{banners:r??[],name:"right_1"}),banner:t.jsx(ge,{banners:r??[],name:"right_2"}),children:t.jsx("section",{className:_a.content,children:n.length>0?t.jsx(Cn,{className:[_a.newsContentSection,"padding-0"].join(" "),paginatorComponent:t.jsx(Dt,{texts:d,pathname:i,query:"",currentPage:h,maxPages:e.paginationLimit,showNext:!(n.length<e.newsListLimit)}),children:Array.isArray(n)&&n?.map((g,m)=>t.jsxs(I.Fragment,{children:[u.includes(m+1)&&t.jsx("div",{className:_a.itemContent+" banner-context",children:t.jsx(ge,{banners:r??[],name:`block_2_${f[m+1]}`})}),t.jsx(Tn,{autorIcon:e.autorIcon,item:g,option:l,paths:e.paths},m)]},m))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})})})]})});case"op2":return t.jsx(t.Fragment,{children:t.jsxs(la,{children:[t.jsx(Ns,{autor:o[0],autorIcon:e.autorIcon}),Array.isArray(n)?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{content:n,title:"",hasLines:!0,banners:e.banners,bannerPositionIndex:[1,6,12],paths:e.paths,slot_id:"block_2"}),t.jsx(Dt,{texts:d,query:"",pathname:i,maxPages:Number(e.paginationLimit),currentPage:Number(s),showNext:!((n.length??0)<Number(e.newsListLimit))})]}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})]})});default:return t.jsx(t.Fragment,{})}},ar={content:"_content_pq89v_1",videoContent:"_videoContent_pq89v_9"},Vt={container:"_container_1xr2t_1",playStyled:"_playStyled_1xr2t_6",imageStyled:"_imageStyled_1xr2t_13",longer:"_longer_1xr2t_26",contentNews:"_contentNews_1xr2t_31",tagContent:"_tagContent_1xr2t_51",tag:"_tag_1xr2t_51",titular:"_titular_1xr2t_68",small:"_small_1xr2t_81",figure:"_figure_1xr2t_87",backDrop:"_backDrop_1xr2t_92",backDropAux:"_backDropAux_1xr2t_100"},or=async e=>{const{size:n="longer",video:a}=e,o=a.main.image.sizes[0]?.url??"";return t.jsx("figure",{className:Vt.figure,children:t.jsxs("span",{className:Vt.backdrop,children:[t.jsx("span",{className:Vt.backDropAux}),t.jsx(O,{href:a.info.link.url,target:a.info.link.target,children:t.jsxs("div",{children:[a.main.image.sizes.map(async(s,r)=>s.width>=580?t.jsx("source",{media:"(width >=900px)",srcSet:await de(s.url)},r):t.jsx("source",{media:"(width <900px)",srcSet:await de(s.url)},r)),t.jsx("img",{fetchPriority:"low",loading:"lazy",className:[Vt.imageStyled,Vt[n]].join(" "),alt:"",src:o?await de(o):""})]})})]})})},Bd=e=>{const{videos:n}=e;return t.jsx("div",{className:ar.content,children:t.jsx(Ct,{children:t.jsx(me,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:ar.videoContent,children:[t.jsx(or,{video:n[0]}),t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:n.slice(1).map((a,o)=>t.jsx(or,{size:"small",video:a},`video-small-${o}`))})]})})})})},ut={content:"_content_ruy5q_1",videoContent:"_videoContent_ruy5q_9",articleSection:"_articleSection_ruy5q_21",contentLatout:"_contentLatout_ruy5q_31",title:"_title_ruy5q_36",article:"_article_ruy5q_21",correspondent:"_correspondent_ruy5q_64"},sr={container:"_container_1rq2h_1",playStyled:"_playStyled_1rq2h_9"},Pd=e=>{const{video:n}=e,a=mn();return t.jsx(O,{href:n.info.link.url?n.info.link.url:void 0,target:n.info.link.target,children:t.jsxs("section",{className:sr.container,children:[t.jsx(Se,{isLarge:!0,preview:{sizes:n.main.image.sizes,description:n.main.description}}),t.jsx(a,{className:sr.playStyled})]})})},Od=e=>{const n=()=>e?.video.main.author?`${e?.video.main.author} - ${xe(e.video.info.date.created)}`:e?.video.main.author;return t.jsx("div",{className:ut.content,children:t.jsx(Ct,{className:ut.contentLatout,children:t.jsx(me,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:ut.videoContent,children:[t.jsx(Pd,{video:e.video}),t.jsxs("div",{className:ut.articleSection,children:[t.jsx(O,{className:ut.title,href:e.video.info.link.url,target:e.video.info.link.target,children:e.video.main.title}),t.jsx("p",{className:ut.article,children:Ue(e.video.main.description)}),t.jsx("p",{className:ut.correspondent,children:n()})]})]})})})})},Dd=e=>{switch(e.option){case"op1":return t.jsx(Bd,{videos:e.data});case"op2":return t.jsx(Od,{video:e.data[0]});default:return t.jsx(t.Fragment,{})}};function Md({containerId:e,containerId2:n}){return I.useEffect(()=>{try{let a=function(){const d=window.twttr;d?.widgets?d.widgets.load(o):l<10?(l++,requestAnimationFrame(a)):console.warn("No se pudo cargar widgets de Twitter")};const o=document.getElementById(e),s=document.getElementById(n);if(!o&&!s)return;const r=o?.querySelectorAll("script[src]")??[],i=s?.querySelectorAll("script[src]")??[];[...r,...i].forEach(d=>{const u=document.createElement("script");Array.from(d.attributes).forEach(f=>{u.setAttribute(f.name,f.value)}),d.replaceWith(u)});const h=document.querySelectorAll('script[src*="platform.twitter.com/widgets.js"]');if(h)for(let d=0;d<h.length;d++)h[d]?.remove();let l=0;if(document.querySelector('script[src*="platform.twitter.com/widgets.js"]'))a();else{const d=document.createElement("script");d.src="https://platform.twitter.com/widgets.js",d.async=!0,d.onload=a,document.body.appendChild(d)}}catch(a){console.warn("Error al procesar embeds de Twitter",a)}},[e]),null}const jd=e=>{const{isVideo:n=!1,isLarge:a=!1,hasShadow:o=!1,BackDropAuxHeigthMobile:s}=e,r=ra(),i=I.useMemo(()=>e?.preview?.sizes||[],[e?.preview?.sizes]);if(!i.length||!i[0]?.url||i[0]?.url==="")return t.jsx("div",{className:se.imagePlaceholder});const{PUBLIC_API_HOST:c,PUBLIC_ASSETS_URL:h}=e.API_ENV;return t.jsx("figure",{className:se.figure,children:t.jsxs("span",{className:se.backdrop,children:[t.jsx("span",{className:se.backdropAux,style:{height:s||"56.25%"}}),t.jsxs("picture",{children:[t.jsx("img",{fetchPriority:"low",loading:"lazy",className:se.imageStyled,alt:e.preview?.description||"",src:(h&&h!=="false"?h:c)+i[0]?.url,style:{boxShadow:o?"0px 4px 8px 0px #00000033":"0px"}}),n&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:se.boxPlayIcon,style:{height:a?"40%":"72px"}}),t.jsx(r,{className:se.playStyled,style:{width:a?"3rem":"27px",height:a?"3rem":"27px",marginBottom:a?"18px":".5rem",marginLeft:a?"30px":".5rem"}})]})]})]})})},$d=e=>t.jsx("svg",{width:"41",height:"33",viewBox:"0 0 41 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M17.9576 21.2985C16.8233 21.2985 15.9277 22.194 15.9277 23.3283C15.9277 24.4627 16.8233 25.3582 17.9576 25.3582C19.0919 25.3582 19.9874 24.4627 19.9874 23.3283C19.9874 22.194 19.0919 21.2985 17.9576 21.2985ZM17.9576 19.2686C19.0919 19.2686 19.9874 18.3731 19.9874 17.2388C19.9874 16.1045 19.0919 15.2089 17.9576 15.2089C16.8233 15.2089 15.9277 16.1045 15.9277 17.2388C15.9277 18.3731 16.8233 19.2686 17.9576 19.2686ZM17.9576 13.1791C19.0919 13.1791 19.9874 12.2836 19.9874 11.1492C19.9874 10.0149 19.0919 9.11938 17.9576 9.11938C16.8233 9.11938 15.9277 10.0149 15.9277 11.1492C15.9277 12.2836 16.8233 13.1791 17.9576 13.1791Z",fill:"#7B888A"})}),rr={info:{section:{name:"",slug:"",url:""},link:{url:"/",target:"",canonical:!1,internal:""},date:{date:"",created:0,modified:0,firstpublish:0,lastpublish:0}},config:{zonehome:void 0,priorityhome:"",zonesection:"",prioritysection:"",homepreview:"",showcomments:!0,showtime:!0,showauthor:!0,showuppertitle:!0,showsubtitle:!0,showads:!0},main:{title:{home:"",section:"",article:""},subtitle:{rendered:"",striped:""},tags:[]},authors:[{firstname:"",lastname:"",fullname:"",image:void 0,name:"",internaluser:!1}],preview:void 0},ir=6,Qd=({section:e,currentNews:n,banner:a,isVisible:o=!1,stylesConfig:s,API_ENV:r,paths:i})=>{const[c,h]=I.useState({data:Array.from({length:ir},()=>rr)}),[l,d]=I.useState(!1),u=I.useCallback(async()=>{if(!n.info.link.internal)return;const m=new URLSearchParams({section:e,currentNewsLink:n.info.link.internal}),p=await fetch(`/api/get-more-news?${m}`);if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);return await p.json()},[e,n.info.link.internal]),f=I.useCallback(async()=>{const{PUBLIC_API_FRONT:m,PUBLIC_X_SECURITY_TOKEN:p,PUBLIC_API_PATH_VERSION:A,PUBLIC_PUBLICATION_ID:w,newsType:S,imgSizes:_}=r;if(!m||!p||!w||!A)throw new Error("Missing required environment variables");const E=await oe.get(`${m}${A}/news-list-section`,{params:{size:7,newstype:S,section:e,imagesizes:_,publication:parseInt(w)},headers:{"x-api-token":p,"Content-Type":"application/json"}});return{...E.data,data:E.data.data.filter(b=>b.info.link.internal!==n.info.link.internal)}},[e,n.info.link.internal,r]),g=I.useCallback(async()=>{if(!(l||!n?.info?.link?.internal)){d(!0);try{let m;r.PUBLIC_ENV!=="prod"?m=await u():m=await f(),h({...m,data:m.data.slice(0,ir)})}catch(m){console.error("[/api/get-more-news] Error:",m.message),h(void 0)}}},[l,n?.info?.link?.internal,r.PUBLIC_ENV,u,f]);return I.useEffect(()=>{o&&g()},[o,g]),!c?.data||c.data.length===0?null:t.jsx(Gd,{news:c.data,title:"Más Noticias",...s["Modulo 1x3 Client"]??s["Modulo 1x3"],hasLines:!0,showSubtitle:!0,rounded:!0,banner:a,API_ENV:r,paths:i,isVisible:o})},Gd=e=>{const{news:n,hasLines:a=!1,API_ENV:o}=e;console.log("API_ENV from BlockNews1",o,o.SHOW_TAG_BY_SECTION);const s=r=>a&&(r+1)%3!==0?Ca.contentSeparator:"";return t.jsx("div",{className:Ca.newsContent,style:{gap:a?"30px":"20px","--gridTemplateModlule":a?"repeat(auto-fit, 343px);":"repeat(auto-fit, 380px);"},children:n.map((r,i)=>{const{main:c,authors:h,info:l,preview:d,isVideo:u=!1,config:f,overImage:g="default",isTitle:m=!1,isLarge:p=!1}=r;return t.jsx("div",{className:s(i),style:{order:i},children:t.jsxs("section",{className:Mt.content,children:[t.jsx(O,{title:c?.title?.section,href:l?.link?.url??"invalidUrl","aria-label":c?.title?.section??"nota",target:l?.link?.target,children:t.jsx(jd,{isVisible:e.isVisible,preview:d,rounded:e.rounded,isVideo:u,isLarge:p,API_ENV:e.API_ENV,getImageUrl:e.getImageUrl})}),t.jsx("div",{className:Mt.newsDescription,children:t.jsx(Hd,{main:c,SHOW_TAG_BY_SECTION:o.SHOW_TAG_BY_SECTION,authors:h,info:l,preview:d,share:e.share,config:f,overImage:g,isTitle:m,paths:e.paths,isVisible:e.isVisible,DATE_CONFIG:e.API_ENV})})]})},i)})})},Hd=e=>{const{share:n=!1,cutSubtitle:a=!0,SHOW_TAG_BY_SECTION:o,keywords:s,info:r}=e,c=(()=>{if(!e?.authors||e.authors.length===0)return"";const d=e.authors[0],u=xe(e.info?.date?.modified,e.DATE_CONFIG);return d&&e?.config?.showtime&&e.config?.showauthor?`${d.fullname} - ${u}`:d&&e.config?.showauthor?d.fullname:e?.config?.showtime?u:""})(),h=()=>e.main.uppertitle?t.jsx("p",{className:te.uppertitle,title:e.main.uppertitle,children:e.main.uppertitle}):null,l=()=>{if(o&&s?.tags?.length&&s.tags.length>0){const d=s.tags[0],u=d.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[d.approved?t.jsx(O,{"aria-label":u,className:te.sectionDescription,href:Ze(d,e.paths),children:u}):t.jsx("div",{className:te.sectionDescription,children:u}),h()]})}else if(r?.section?.url){const d=r.section.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[t.jsx(O,{"aria-label":d,className:te.sectionDescription,href:r.section.url,children:d}),h()]})}return null};return t.jsxs("div",{className:te.boxInformation,children:[n&&t.jsx($d,{className:te.dotStyles}),t.jsx(l,{}),t.jsx("h2",{className:te.articule,children:t.jsx(O,{className:te.linkStyled,style:{"--isLink":e?.info?.link?.url?"underline":"none"},"aria-label":e.main?.title?.section??"nota",href:e?.info?.link?.url,target:e?.info?.link?.target,children:e.main?.title?.section})}),e.config?.showsubtitle&&e.main?.subtitle?.striped&&t.jsx("p",{className:te.description,style:{"--fontSizeSubTitle":e.fontSizeSubTitle,"--lineHeightSubTitle":e.lineHeightSubTitle,"--colorSubTitle":e.colorSubTitle},children:a?Ue(e.main.subtitle.striped):e.main.subtitle.striped}),(e?.config?.showtime||e.config?.showauthor)&&c&&t.jsx(t.Fragment,{children:e.authors?.[0]?.internaluser?t.jsx(O,{className:te.correspondentLink,href:`/${e.paths.autor}/${e.authors[0].name}`,children:c}):t.jsx("div",{className:te.correspondent,children:c})})]})},zd=({user:e,handleLogout:n,message:a})=>{const o=()=>{const r=document.querySelector(".user-actions-options");r&&r.classList.toggle("show")},s=e.firstname??"Usuario";return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{style:{display:"flex",gap:"14px"},children:[e&&e.picture&&e.picture!==""?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):t.jsx("div",{className:"comment-avatar",children:s.charAt(0).toUpperCase()}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{className:"comment-header",children:[t.jsxs("span",{className:"comment-username user-welcome",children:["Hola ",s,"!"]}),t.jsx("div",{className:"user-actions-options",children:t.jsx("button",{onClick:()=>{n()},children:"Cerrar Sesion"})}),t.jsx("button",{className:"user-actions-span",onClick:o,children:t.jsx(Sn,{width:13,height:13,fill:"black"})})]}),t.jsx("p",{className:"comment-text",children:a})]})]})})},fe={overlay:"_overlay_qj491_3",popup:"_popup_qj491_17",title:"_title_qj491_40",optionsContainer:"_optionsContainer_qj491_52",option:"_option_qj491_52",radioInput:"_radioInput_qj491_66",radioCustom:"_radioCustom_qj491_70",optionLabel:"_optionLabel_qj491_97",buttons:"_buttons_qj491_110",cancelButton:"_cancelButton_qj491_117",closeButton:"_closeButton_qj491_118",buttonAlone:"_buttonAlone_qj491_137",reportButton:"_reportButton_qj491_143",successContainer:"_successContainer_qj491_163",thumbsUp:"_thumbsUp_qj491_171",successMessage:"_successMessage_qj491_177",errorMessage:"_errorMessage_qj491_218",loadingContainer:"_loadingContainer_qj491_231"},cr=async(e,n)=>{if(!e)return!1;const{CAPTCHA_PROJECT:a,CAPTCHA_KEY_V2:o,COMMENTS_CAPTCHA_API_KEY:s}=n;try{const r=a,i=o,l=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${r}/assessments?key=${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:i}})})).json();return console.log("reCAPTCHA Enterprise verification result:",l),l.tokenProperties?.valid===!0}catch(r){return console.error("Error verificando reCAPTCHA Enterprise:",r),!1}};async function Fd({publication:e,username:n,id:a,type:o,baseUrl:s,captchaToken:r,apiToken:i,COMMENTS_VARS:c}){if(!e||!n||!a||!o||!r)throw new Error("Faltan parámetros requeridos: publication, username, id, type, captchaToken");if(typeof e!="string"||typeof n!="string"||typeof a!="string"||typeof o!="string"||typeof r!="string")throw new Error("Todos los parámetros deben ser strings");if(!await cr(r,c))throw new Error("Token de captcha inválido");if(!i)throw new Error("Falta el token de API del CMS");const h=`${s}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/report`,l=encodeURIComponent(o),d=new URLSearchParams({publication:e,username:n,id:a,type:l}),u=`${h}?${d.toString()}`;try{console.log("Reporting comment:",{publication:e,username:n,id:a,type:o,encodedType:l,url:u});const f=await oe.post(u,null,{headers:{"User-Agent":"Bluestack","x-api-token":i,"Content-Type":"application/json"}});if(console.log("Report response:",f.data),f.status===200||f.status===201)return{type:"success",message:"Comentario reportado exitosamente",status:f.status,data:f.data};throw new Error(`Respuesta inesperada del servidor: ${f.status}`)}catch(f){if(console.error("Error reporting comment:",f),oe.isAxiosError(f)){const g=f.response?.status,m=f.response?.data;throw g===400?new Error("Datos inválidos para el reporte"):g===401?new Error("Token de API inválido"):g===403?new Error("Acceso denegado para reportar comentario"):g===404?new Error("Comentario no encontrado"):g===409?new Error("El comentario ya fue reportado por este usuario"):g===500?new Error("Error interno del servidor CMS"):new Error(m?.error||m?.message||`Error HTTP ${g}: No se pudo reportar el comentario`)}throw f}}const je={spam:"Es spam o contenido comercial no deseado",inappropriate:"Lenguaje inadecuado",hate:"Discurso o símbolos de odio",misinformation:"Información falsa o fraude",terrorism:"Promueve el terrorismo",intellectual:"Violación de propiedad intelectual",bullying:"Bullying o acoso"};function Vd(e){return je[e]}const ft=300,Ke={username:"anonimo",firstname:"Usuario",lastname:"Anonimo"};function Wd(e){const n=e.split(" ");if(n.length!==3)return e;const[a,o,s]=n,r=o.charAt(0).toUpperCase()+o.slice(1).toLowerCase();return`${a} ${r} ${s}`}const Sa=(e,n)=>{if(!e||!e.current)return{boolean:!1,text:""};const a=e.current?.value||"",o=a.length>ft,{PUBLIC_ENV:s}=K(),r=s==="local",i=a.trim()!==""&&(r||n!=="")&&!o,c=o?`No debes exceder el limite de ${ft} caracteres.`:"Debes completar todos los campos para comentar.";return{boolean:i,text:c}},lr=e=>{const n=e.cookie.split("; ").find(a=>a.startsWith("reported="));if(!n)return[];try{return JSON.parse(decodeURIComponent(n.split("=")[1]??""))}catch{return[]}},Yd=(e,n)=>{const a=lr(e);a.includes(n)||(a.push(n),e.cookie=`reported=${encodeURIComponent(JSON.stringify(a))}; path=/; max-age=${3600*24*1}`)};function Kd(e){const[n,a]=e.split("@");if(!n||!a)return e;let o="";n.length<=2?o=n[0]+"*":o=n[0]+"*".repeat(n.length-2)+n[n.length-1];const s=a.lastIndexOf(".");if(s===-1)return`${o}@${a}`;const r=a.slice(0,s),i=a.slice(s);let c="";return r.length<=2?c=r[0]+"*":c=r[0]+"*".repeat(r.length-2)+r[r.length-1],`${o}@${c}${i}`}var qn={exports:{}},Bn={exports:{}},ne={};var dr;function Jd(){if(dr)return ne;dr=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case n:switch(b=b.type,b){case h:case l:case o:case r:case s:case u:return b;default:switch(b=b&&b.$$typeof,b){case c:case d:case m:case g:case i:return b;default:return k}}case a:return k}}}function E(b){return _(b)===l}return ne.AsyncMode=h,ne.ConcurrentMode=l,ne.ContextConsumer=c,ne.ContextProvider=i,ne.Element=n,ne.ForwardRef=d,ne.Fragment=o,ne.Lazy=m,ne.Memo=g,ne.Portal=a,ne.Profiler=r,ne.StrictMode=s,ne.Suspense=u,ne.isAsyncMode=function(b){return E(b)||_(b)===h},ne.isConcurrentMode=E,ne.isContextConsumer=function(b){return _(b)===c},ne.isContextProvider=function(b){return _(b)===i},ne.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===n},ne.isForwardRef=function(b){return _(b)===d},ne.isFragment=function(b){return _(b)===o},ne.isLazy=function(b){return _(b)===m},ne.isMemo=function(b){return _(b)===g},ne.isPortal=function(b){return _(b)===a},ne.isProfiler=function(b){return _(b)===r},ne.isStrictMode=function(b){return _(b)===s},ne.isSuspense=function(b){return _(b)===u},ne.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===r||b===s||b===u||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===g||b.$$typeof===i||b.$$typeof===c||b.$$typeof===d||b.$$typeof===A||b.$$typeof===w||b.$$typeof===S||b.$$typeof===p)},ne.typeOf=_,ne}var ae={};var hr;function Zd(){return hr||(hr=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(P){return typeof P=="string"||typeof P=="function"||P===o||P===l||P===r||P===s||P===u||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===m||P.$$typeof===g||P.$$typeof===i||P.$$typeof===c||P.$$typeof===d||P.$$typeof===A||P.$$typeof===w||P.$$typeof===S||P.$$typeof===p)}function E(P){if(typeof P=="object"&&P!==null){var ye=P.$$typeof;switch(ye){case n:var $n=P.type;switch($n){case h:case l:case o:case r:case s:case u:return $n;default:var qr=$n&&$n.$$typeof;switch(qr){case c:case d:case m:case g:case i:return qr;default:return ye}}case a:return ye}}}var b=h,k=l,q=c,G=i,X=n,H=d,M=o,ee=m,ie=g,$=a,L=r,T=s,j=u,U=!1;function F(P){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(P)||E(P)===h}function y(P){return E(P)===l}function N(P){return E(P)===c}function B(P){return E(P)===i}function Q(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function D(P){return E(P)===d}function z(P){return E(P)===o}function V(P){return E(P)===m}function W(P){return E(P)===g}function Z(P){return E(P)===a}function R(P){return E(P)===r}function Y(P){return E(P)===s}function re(P){return E(P)===u}ae.AsyncMode=b,ae.ConcurrentMode=k,ae.ContextConsumer=q,ae.ContextProvider=G,ae.Element=X,ae.ForwardRef=H,ae.Fragment=M,ae.Lazy=ee,ae.Memo=ie,ae.Portal=$,ae.Profiler=L,ae.StrictMode=T,ae.Suspense=j,ae.isAsyncMode=F,ae.isConcurrentMode=y,ae.isContextConsumer=N,ae.isContextProvider=B,ae.isElement=Q,ae.isForwardRef=D,ae.isFragment=z,ae.isLazy=V,ae.isMemo=W,ae.isPortal=Z,ae.isProfiler=R,ae.isStrictMode=Y,ae.isSuspense=re,ae.isValidElementType=_,ae.typeOf=E})()),ae}var ur;function Na(){return ur||(ur=1,process.env.NODE_ENV==="production"?Bn.exports=Jd():Bn.exports=Zd()),Bn.exports}var Ea,fr;function Xd(){if(fr)return Ea;fr=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function s(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(h.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ea=s()?Object.assign:function(r,i){for(var c,h=o(r),l,d=1;d<arguments.length;d++){c=Object(arguments[d]);for(var u in c)n.call(c,u)&&(h[u]=c[u]);if(e){l=e(c);for(var f=0;f<l.length;f++)a.call(c,l[f])&&(h[l[f]]=c[l[f]])}}return h},Ea}var Ia,mr;function Ta(){if(mr)return Ia;mr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ia=e,Ia}var ka,gr;function pr(){return gr||(gr=1,ka=Function.call.bind(Object.prototype.hasOwnProperty)),ka}var xa,Ar;function Rd(){if(Ar)return xa;Ar=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=Ta(),a={},o=pr();e=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(r,i,c,h,l){if(process.env.NODE_ENV!=="production"){for(var d in r)if(o(r,d)){var u;try{if(typeof r[d]!="function"){var f=Error((h||"React class")+": "+c+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=r[d](i,d,h,c,null,n)}catch(m){u=m}if(u&&!(u instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in a)){a[u.message]=!0;var g=l?l():"";e("Failed "+c+" type: "+u.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},xa=s,xa}var Ua,yr;function e1(){if(yr)return Ua;yr=1;var e=Na(),n=Xd(),a=Ta(),o=pr(),s=Rd(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(c){var h="Warning: "+c;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function i(){return null}return Ua=function(c,h){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(y){var N=y&&(l&&y[l]||y[d]);if(typeof N=="function")return N}var f="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:S(),arrayOf:_,element:E(),elementType:b(),instanceOf:k,node:H(),objectOf:G,oneOf:q,oneOfType:X,shape:ee,exact:ie};function m(y,N){return y===N?y!==0||1/y===1/N:y!==y&&N!==N}function p(y,N){this.message=y,this.data=N&&typeof N=="object"?N:{},this.stack=""}p.prototype=Error.prototype;function A(y){if(process.env.NODE_ENV!=="production")var N={},B=0;function Q(z,V,W,Z,R,Y,re){if(Z=Z||f,Y=Y||W,re!==a){if(h){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=Z+":"+W;!N[ye]&&B<3&&(r("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),N[ye]=!0,B++)}}return V[W]==null?z?V[W]===null?new p("The "+R+" `"+Y+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new p("The "+R+" `"+Y+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:y(V,W,Z,R,Y)}var D=Q.bind(null,!1);return D.isRequired=Q.bind(null,!0),D}function w(y){function N(B,Q,D,z,V,W){var Z=B[Q],R=T(Z);if(R!==y){var Y=j(Z);return new p("Invalid "+z+" `"+V+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return A(N)}function S(){return A(i)}function _(y){function N(B,Q,D,z,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var W=B[Q];if(!Array.isArray(W)){var Z=T(W);return new p("Invalid "+z+" `"+V+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected an array."))}for(var R=0;R<W.length;R++){var Y=y(W,R,D,z,V+"["+R+"]",a);if(Y instanceof Error)return Y}return null}return A(N)}function E(){function y(N,B,Q,D,z){var V=N[B];if(!c(V)){var W=T(V);return new p("Invalid "+D+" `"+z+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return A(y)}function b(){function y(N,B,Q,D,z){var V=N[B];if(!e.isValidElementType(V)){var W=T(V);return new p("Invalid "+D+" `"+z+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return A(y)}function k(y){function N(B,Q,D,z,V){if(!(B[Q]instanceof y)){var W=y.name||f,Z=F(B[Q]);return new p("Invalid "+z+" `"+V+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected ")+("instance of `"+W+"`."))}return null}return A(N)}function q(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function N(B,Q,D,z,V){for(var W=B[Q],Z=0;Z<y.length;Z++)if(m(W,y[Z]))return null;var R=JSON.stringify(y,function(re,P){var ye=j(P);return ye==="symbol"?String(P):P});return new p("Invalid "+z+" `"+V+"` of value `"+String(W)+"` "+("supplied to `"+D+"`, expected one of "+R+"."))}return A(N)}function G(y){function N(B,Q,D,z,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var W=B[Q],Z=T(W);if(Z!=="object")return new p("Invalid "+z+" `"+V+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected an object."));for(var R in W)if(o(W,R)){var Y=y(W,R,D,z,V+"."+R,a);if(Y instanceof Error)return Y}return null}return A(N)}function X(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var N=0;N<y.length;N++){var B=y[N];if(typeof B!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(B)+" at index "+N+"."),i}function Q(D,z,V,W,Z){for(var R=[],Y=0;Y<y.length;Y++){var re=y[Y],P=re(D,z,V,W,Z,a);if(P==null)return null;P.data&&o(P.data,"expectedType")&&R.push(P.data.expectedType)}var ye=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new p("Invalid "+W+" `"+Z+"` supplied to "+("`"+V+"`"+ye+"."))}return A(Q)}function H(){function y(N,B,Q,D,z){return $(N[B])?null:new p("Invalid "+D+" `"+z+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return A(y)}function M(y,N,B,Q,D){return new p((y||"React class")+": "+N+" type `"+B+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function ee(y){function N(B,Q,D,z,V){var W=B[Q],Z=T(W);if(Z!=="object")return new p("Invalid "+z+" `"+V+"` of type `"+Z+"` "+("supplied to `"+D+"`, expected `object`."));for(var R in y){var Y=y[R];if(typeof Y!="function")return M(D,z,V,R,j(Y));var re=Y(W,R,D,z,V+"."+R,a);if(re)return re}return null}return A(N)}function ie(y){function N(B,Q,D,z,V){var W=B[Q],Z=T(W);if(Z!=="object")return new p("Invalid "+z+" `"+V+"` of type `"+Z+"` "+("supplied to `"+D+"`, expected `object`."));var R=n({},B[Q],y);for(var Y in R){var re=y[Y];if(o(y,Y)&&typeof re!="function")return M(D,z,V,Y,j(re));if(!re)return new p("Invalid "+z+" `"+V+"` key `"+Y+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(B[Q],null," ")+`
158
+ `}}catch(w){console.error("insertVideos error for",g,w),A=""}else A=f;o=u,a+=A,s.lastIndex=u}return a+=e.slice(o),a=gd(a),a}async function bd(e){const{news:n,banners:a,newsRelatedResponses:o,newsRelatedListResponses:s,slug:r,itemList:i,socials:c,getVideos:h,commonServices:l}=e;let d=n?.body?.rendered??"";d=d.replace(/&nbsp;/g,""),d=Ad(d,a),d=yd(d),d=await pd(d),d=await wd(d,e.texts,o),d=await Cd(d,h),d=fd(d),d=md(d);const u=n.main.sources??[],f=n.config.articlepreview===dt.fotoGaleria&&n.hascontent?.hasgalleryimages;return t.jsxs("div",{className:kn.content,children:[r!=="liveblogs"&&e.showHeaderImage?f?t.jsx(Js,{commonServices:l,newsformated:n,internal:n.info.link.internal}):t.jsx(bs,{preview:n.preview}):null,t.jsx(ge,{banners:a,name:"block_1"}),t.jsx("div",{className:kn.journalistArticleContent,children:t.jsx(od,{autorIcon:e.autorIcon,socials:c,news:n,texts:e.texts,noteShare:e.noteShare,paths:e.paths})}),t.jsx(rd,{summary:n.main.summary}),t.jsx("div",{className:kn.contentNews,suppressHydrationWarning:!0,id:"content-news-section",dangerouslySetInnerHTML:{__html:d}}),t.jsx(td,{texts:e.texts,itemList:i,banners:a,slug:r,getVideos:h,newsRelatedListResponses:s??[]}),u.length>0&&t.jsxs("div",{className:kn.noteSource,children:[t.jsx(cd,{}),t.jsx("p",{children:e.texts.noteSource+(u.length===1?"":"s")+": "+u.map(g=>g.name).join(", ")})]})]})}const vd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(me,{title:a,titleUrl:e.titleUrl,children:t.jsx(it,{slot_id:o,cardWidth:200,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(jt,{...c,titleGradient:!0,paths:e.paths},i)})})})},_d=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(me,{title:a,titleUrl:e.titleUrl,children:t.jsx(it,{slot_id:o,cardWidth:343,cardGap:32,visibleItems:3,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return t.jsx(jt,{...c,titleGradient:!0,paths:e.paths},i)})})})},Sd=e=>{const{content:n,title:a,slot_id:o}=e,s=e.slot_id&&e.slot_id!=="Nota_1";return n&&n.length!==0&&t.jsx(me,{title:a,titleUrl:e.titleUrl,children:t.jsx(it,{slot_id:o,fullPageWidth:!0,visibleItems:1,pagination:!0,cardGap:0,children:n.map((r,i)=>{const c={...r,main:{...r.main,title:{...r.main.title,section:s?r.main.title.home:r.main.title.section}}};return I.createElement(jt,{...c,key:i,titleGradient:!0,paths:e.paths})})})})},xn=e=>{const n={};for(const a in e)a.startsWith("--")&&(n[a]=e[a]);return n},ht={headerSection:"_headerSection_1c69w_1",title:"_title_1c69w_11",subtitle:"_subtitle_1c69w_23",newsContent:"_newsContent_1c69w_36",containerCards:"_containerCards_1c69w_44",image:"_image_1c69w_50",blockHeadContainer:"_blockHeadContainer_1c69w_56"},Nd=e=>{const{content:n,title:a,isVideo:o}=e;if(!n||n.length===0)return;const s=n[0],r=n.slice(1),i=e.slot_id&&e.slot_id!=="Nota_1";return s&&r&&t.jsxs(me,{title:a,titleUrl:e.titleUrl,children:[t.jsx("div",{className:ht.headerSection,children:t.jsxs("a",{style:{"--heightImageOverwriteMobile":"200%"},className:ht.image,href:s?.info?.link?.url,target:s?.info?.link?.target,children:[t.jsxs("div",{className:ht.blockHeadContainer,children:[t.jsx("p",{className:ht.title,children:s?.main?.title.home}),s?.main?.subtitle?.rendered&&t.jsx("p",{className:ht.subtitle,children:s?.main?.subtitle?.striped})]}),t.jsx(Se,{preview:s.preview})]})}),t.jsxs("div",{className:ht.containerCards,children:[t.jsx("div",{className:"banner-context",style:{order:1},children:e.banner}),t.jsx("div",{className:ht.newsContent,children:Array.isArray(r)&&r.map((c,h)=>{const l={...c,main:{...c.main,title:{...c.main.title,section:i?c.main.title.home:c.main.title.section}}};return t.jsx("div",{style:{order:h},children:t.jsx(De,{...l,isVideo:o,paths:e.paths})},h)})})]})]})},tr={banner:e=>t.jsx(ge,{...e,name:e.slot_id.replace("Home","block")}),readest:e=>t.jsx(gn,{...e}),"Modulo 1x3":e=>t.jsx(Aa,{...e}),"Modulo 1x4":e=>t.jsx($s,{...e}),"Modulo 1x5":e=>t.jsx(Qs,{...e}),"Destacado noticias":e=>t.jsx(Os,{...e}),"Destacado full width":e=>t.jsx(Nd,{...e}),"Destacado videos":e=>t.jsx(Gs,{...e}),"Carrusel card":e=>t.jsx(Fs,{...e}),"Carrusel story":e=>t.jsx(vd,{...e}),"Carrusel owl":e=>t.jsx(_d,{...e}),"Modulo fotogaleria":e=>t.jsx(Sd,{...e}),"Carrusel opinion":e=>t.jsx(Vs,{...e}),"Modulo 1x3 card":e=>t.jsx(zs,{...e})};function Un({component:e,slot_id:n,data:a,banners:o}){if(o)return tr[e]&&t.jsx("div",{className:"home-slot",style:xn(a),children:tr[e]({...a,banners:o,slot_id:n})})}function Ed({children:e,stylesConfigEntry:n}){return t.jsx("div",{className:"home-slot",style:xn(n),children:e})}const nr={Diario:e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(qs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,block:n,banners:e.banners,showSuper:e.showSuper,rightOnlyBanner:e.rightOnlyBanner,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},"Diario con imagen":e=>{if(!e?.data||e.data.length===0)return;const n=e.data.slice(1);return t.jsx(qs,{...e.data[0],itemReverseOrder:!0,isLarge:!0,showSuper:e.showSuper,block:n,banners:e.banners,customSectionCardStyles:e.customSectionCardStyles,customNewsDescriptionStyles:e.customNewsDescriptionStyles,paths:e.paths})},Super:e=>t.jsx(Nt,{...e.data[0],paths:e.paths}),"3 notas verticales":e=>t.jsx(ql,{content:e.data,customLargeSection:e.customLargeSection,customSlimSection:e.customSlimSection,paths:e.paths}),"3 notas horizontales":e=>t.jsx(Ll,{content:e.data,customLargeSection:e.customLargeSection,customSmallSection:e.customSmallSection,paths:e.paths})},Ln=({component:e,data:n,banners:a,rightOnlyBanner:o})=>t.jsx("div",{style:xn(n),children:nr[e]&&nr[e]({...n,rightOnlyBanner:o,banners:a})}),Id=({slots:e,DYNAMIC_SLOT_SUBINDEXES:n,stylesConfig:a,AutorIcon:o,config:s,banners:r,showTagBySection:i})=>{const c=[],l=n,d=Object.keys(e).length/l;for(let u=1;u<=d;u++)for(let f=1;f<=l;f++){const g="Home_"+u+"_"+f;!e[g]||!e[g].blockSass||!e[g].blockSass[0]||!e[g].blockSass[0].value||!e[g].blockSass[0].block||e[g].blockSass[0].block==="No Mostrar"||c.push(t.jsxs(rs,{show:!!e[g].content?.data,order:(u-1)*l+(f-1),children:[t.jsx(Un,{component:e[g].blockSass[0].block,banners:r,slot_id:g,data:{...e[g].blockSass[0].block?a[e[g].blockSass[0].block]:[],content:e[g].content?.data??[],title:e[g].blockSass[0].title??void 0,titleUrl:e[g].blockSass[0].link??void 0,autorIcon:t.jsx(o,{}),paths:s.paths,showTagBySection:i}}),t.jsx(Re,{children:t.jsx($e,{banners:r,index:"dynamic_"+u+"_"+f})})]},u+"_"+f))}return c},Td=({mainBlock:e,StylesConfigMain:n,config:a,banners:o})=>{const{PUBLIC_ENV:s}=K();if(s!=="local")return null;const r=e?.news?.data||[],i=(c,h)=>({...e?.news,...n[c],data:r.slice(0,h),paths:a.paths});return t.jsxs(t.Fragment,{children:[t.jsx(Ln,{component:"Super",data:i("Super",1),banners:o}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:1})}),t.jsx(Ln,{component:"3 notas verticales",data:i("3 notas verticales",3),banners:o}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:1})}),t.jsx(Ln,{component:"3 notas horizontales",data:i("3 notas horizontales",3),banners:o}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:1})})]})},kd=e=>{const{config:n}=e,a=n.articlepreview;return!![dt.videoEmbedded,dt.videoYouTube,dt.iframe].includes(a)},xd=async e=>{const{custom_complement:n,ranking:a=[],banners:o,autor:s=[],news:r=[],newsRelatedResponses:i=[],newsRelatedListResponses:c=[],itemList:h=[],socials:l,getVideos:d}=e,u=e.slug==="liveblogs",{SHOW_NEWS_MORE_NEWS:f,SHOW_NEWS_RELATED_NEWS:g,MORE_NEWS_SSR:m}=K();if(!(!r||!r[0]))return t.jsx(t.Fragment,{children:t.jsxs(zl,{className:ba.contentLayout2,children:[t.jsx(Vl,{option:e.slug,news:r,paths:e.paths,headerSectionStyles:e.headerSectionStyles}),t.jsx($e,{banners:o,index:1}),!u&&e.commonServices&&t.jsx(ud,{news:r[0],commonServices:e.commonServices}),t.jsx(Fl,{texts:e.texts,paths:e.paths,slug:e.slug,itemList:h,ranking:a,readestCustomStyles:e.readestCustomStyles,bannerTop:t.jsx(ge,{banners:o??[],name:"right_1"}),banner:t.jsx(ge,{banners:o??[],name:"right_2"}),complement:t.jsxs("div",{id:"comentarios",suppressHydrationWarning:!0,children:[s.length>0&&t.jsx(Us,{texts:e.texts,autorIcon:e.autorIcon,autor:s[0],paths:e.paths}),r[0].authors.length>1&&t.jsx(Ls,{news:r[0],autorIcon:e.autorIcon,paths:e.paths,texts:e.texts}),t.jsx("div",{className:ba.tagContent,children:t.jsx(xs,{tags:r[0]?.keywords?.tags,paths:e.paths})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2rem"},suppressHydrationWarning:!0,children:[e.showComments&&t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"comment",internalPath:e.internalPath,COMMENTS_VARS:e.COMMENTS_VARS,DATE_CONFIG:e.DATE_CONFIG}))}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:2})}),g&&t.jsxs(t.Fragment,{children:[t.jsx(Un,{component:"Carrusel card",banners:[],slot_id:"Nota_1",data:{...e.stylesConfig["Carrusel card"],content:e.relatedNewsList??[],title:e.texts.relatedNewsTitle,titleUrl:void 0,paths:e.paths}}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:3})})]}),f&&t.jsxs(t.Fragment,{children:[m?t.jsx(Un,{component:"Modulo 1x3",banners:[],slot_id:"Nota_2",data:{...e.stylesConfig?e.stylesConfig["Modulo 1x3 Client"]?e.stylesConfig["Modulo 1x3 Client"]:e.stylesConfig["Modulo 1x3"]:{},content:e.moreNewsSSR??[],title:e.texts.moreNewsTitle,paths:e.paths,titleUrl:void 0}}):t.jsx(me,{title:e.texts.moreNewsTitle,children:t.jsx("div",{suppressHydrationWarning:!0,"data-hydrate":"LazyLoader","data-props":encodeURIComponent(JSON.stringify({render:"more",stylesConfig:e.stylesConfig,section:r[0].info.section?.slug??"",currentNews:r[0],paths:e.paths,API_ENV:e.API_ENV}))})}),t.jsx(Re,{children:t.jsx($e,{banners:o,index:4})})]}),n&&n()]})]}),children:t.jsxs("section",{style:{"--avatar-content-align-items-desk":e.slug==="liveblogs"?"flex-start":"center"},children:[t.jsx(bd,{texts:e.texts,autorIcon:e.autorIcon,socials:l,news:r[0],banners:o,newsRelatedResponses:i,newsRelatedListResponses:c,itemList:h,slug:e.slug,getVideos:d,noteShare:e.noteShare,paths:e.paths,showHeaderImage:!kd(r[0]),commonServices:e.commonServices}),t.jsx(ge,{banners:o??[],name:"block_3"})]})})]})})},Ft={content:"_content_1046n_1",buttonStyled:"_buttonStyled_1046n_9",searchStyled:"_searchStyled_1046n_20",inputStyled:"_inputStyled_1046n_36",inputStyledTest:"_inputStyledTest_1046n_55"},Ud=e=>t.jsx("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("g",{children:t.jsx("path",{d:"M47.8043 46.6003L47.6635 46.7758L47.8232 46.9342L56.4762 55.5171C56.4768 55.5177 56.4774 55.5184 56.478 55.519C56.8524 55.9072 57.0616 56.4256 57.0616 56.965C57.0616 57.5048 56.8521 58.0234 56.4774 58.4117C56.2839 58.6065 56.0539 58.7611 55.8005 58.8667C55.5466 58.9724 55.2743 59.0269 54.9993 59.0269C54.7243 59.0269 54.452 58.9724 54.1981 58.8667C53.9442 58.7609 53.7138 58.6059 53.5201 58.4106L53.5194 58.4099L44.9327 49.8232L44.7743 49.6648L44.5995 49.805C40.4597 53.1252 35.2051 54.7331 29.9162 54.2981C24.6272 53.863 19.706 51.4181 16.1643 47.4661C12.6227 43.514 10.7298 38.3552 10.875 33.0503C11.0201 27.7455 13.1923 22.6979 16.9447 18.9455C20.6972 15.193 25.7448 13.0209 31.0496 12.8757C36.3544 12.7305 41.5133 14.6234 45.4653 18.165C49.4174 21.7067 51.8623 26.6279 52.2974 31.9169C52.7324 37.2058 51.1245 42.4604 47.8043 46.6003ZM22.4528 47.4552C25.1799 49.2774 28.3861 50.25 31.666 50.25C36.0641 50.25 40.2822 48.5029 43.3921 45.3929C46.5021 42.2829 48.2493 38.0649 48.2493 33.6667C48.2493 30.3868 47.2767 27.1806 45.4545 24.4535C43.6323 21.7264 41.0423 19.6008 38.0121 18.3457C34.9819 17.0905 31.6476 16.7621 28.4307 17.402C25.2139 18.0419 22.259 19.6213 19.9398 21.9405C17.6205 24.2597 16.0411 27.2146 15.4013 30.4314C14.7614 33.6483 15.0898 36.9827 16.345 40.0129C17.6001 43.0431 19.7256 45.633 22.4528 47.4552Z",fill:"white",stroke:"white",strokeWidth:"0.5"})})}),Ld=e=>t.jsx("form",{className:Ft.content,children:t.jsxs("div",{className:`${Ft.inputStyled} sass-buscar-form`,children:[t.jsx("input",{className:Ft.inputStyledTest,defaultValue:e.query,name:"query",placeholder:e.texts.searchKeyWord+"..."}),t.jsx("button",{className:Ft.buttonStyled,type:"submit",children:t.jsx(Ud,{className:Ft.searchStyled})})]})}),_a={content:"_content_io3tv_1",newsContentSection:"_newsContentSection_io3tv_5",itemContent:"_itemContent_io3tv_10"},qd=e=>{const{data:n,option:a,autor:o,page:s,banners:r,pathname:i,ranking:c,currentPage:h,slug:l,texts:d={}}=e,u=[5,10,15],f={5:1,10:2,15:3};switch(a){case"op1":return t.jsx(t.Fragment,{children:t.jsxs(la,{children:[t.jsx(Ss,{autor:o[0],autorIcon:e.autorIcon}),t.jsx(ha,{paths:e.paths,ranking:c,readestTitle:d.readestTitle??"",bannerTop:t.jsx(ge,{banners:r??[],name:"right_1"}),banner:t.jsx(ge,{banners:r??[],name:"right_2"}),children:t.jsx("section",{className:_a.content,children:n.length>0?t.jsx(Cn,{className:[_a.newsContentSection,"padding-0"].join(" "),paginatorComponent:t.jsx(Dt,{texts:d,pathname:i,query:"",currentPage:h,maxPages:e.paginationLimit,showNext:!(n.length<e.newsListLimit)}),children:Array.isArray(n)&&n?.map((g,m)=>t.jsxs(I.Fragment,{children:[u.includes(m+1)&&t.jsx("div",{className:_a.itemContent+" banner-context",children:t.jsx(ge,{banners:r??[],name:`block_2_${f[m+1]}`})}),t.jsx(Tn,{autorIcon:e.autorIcon,item:g,option:l,paths:e.paths},m)]},m))}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})})})]})});case"op2":return t.jsx(t.Fragment,{children:t.jsxs(la,{children:[t.jsx(Ns,{autor:o[0],autorIcon:e.autorIcon}),Array.isArray(n)?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{content:n,title:"",hasLines:!0,banners:e.banners,bannerPositionIndex:[1,6,12],paths:e.paths,slot_id:"block_2"}),t.jsx(Dt,{texts:d,query:"",pathname:i,maxPages:Number(e.paginationLimit),currentPage:Number(s),showNext:!((n.length??0)<Number(e.newsListLimit))})]}):t.jsx("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2rem"},children:t.jsx("p",{style:{fontWeight:"var(--fw)",width:"100%",fontSize:"18px",lineHeight:"26px",textAlign:"center"},children:d.autorNotResultMessage})})]})});default:return t.jsx(t.Fragment,{})}},ar={content:"_content_pq89v_1",videoContent:"_videoContent_pq89v_9"},Vt={container:"_container_1xr2t_1",playStyled:"_playStyled_1xr2t_6",imageStyled:"_imageStyled_1xr2t_13",longer:"_longer_1xr2t_26",contentNews:"_contentNews_1xr2t_31",tagContent:"_tagContent_1xr2t_51",tag:"_tag_1xr2t_51",titular:"_titular_1xr2t_68",small:"_small_1xr2t_81",figure:"_figure_1xr2t_87",backDrop:"_backDrop_1xr2t_92",backDropAux:"_backDropAux_1xr2t_100"},or=async e=>{const{size:n="longer",video:a}=e,o=a.main.image.sizes[0]?.url??"";return t.jsx("figure",{className:Vt.figure,children:t.jsxs("span",{className:Vt.backdrop,children:[t.jsx("span",{className:Vt.backDropAux}),t.jsx(O,{href:a.info.link.url,target:a.info.link.target,children:t.jsxs("div",{children:[a.main.image.sizes.map(async(s,r)=>s.width>=580?t.jsx("source",{media:"(width >=900px)",srcSet:await de(s.url)},r):t.jsx("source",{media:"(width <900px)",srcSet:await de(s.url)},r)),t.jsx("img",{fetchPriority:"low",loading:"lazy",className:[Vt.imageStyled,Vt[n]].join(" "),alt:"",src:o?await de(o):""})]})})]})})},Bd=e=>{const{videos:n}=e;return t.jsx("div",{className:ar.content,children:t.jsx(Ct,{children:t.jsx(me,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:ar.videoContent,children:[t.jsx(or,{video:n[0]}),t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:n.slice(1).map((a,o)=>t.jsx(or,{size:"small",video:a},`video-small-${o}`))})]})})})})},ut={content:"_content_ruy5q_1",videoContent:"_videoContent_ruy5q_9",articleSection:"_articleSection_ruy5q_21",contentLatout:"_contentLatout_ruy5q_31",title:"_title_ruy5q_36",article:"_article_ruy5q_21",correspondent:"_correspondent_ruy5q_64"},sr={container:"_container_1rq2h_1",playStyled:"_playStyled_1rq2h_9"},Pd=e=>{const{video:n}=e,a=mn();return t.jsx(O,{href:n.info.link.url?n.info.link.url:void 0,target:n.info.link.target,children:t.jsxs("section",{className:sr.container,children:[t.jsx(Se,{isLarge:!0,preview:{sizes:n.main.image.sizes,description:n.main.description}}),t.jsx(a,{className:sr.playStyled})]})})},Od=e=>{const n=()=>e?.video.main.author?`${e?.video.main.author} - ${xe(e.video.info.date.created)}`:e?.video.main.author;return t.jsx("div",{className:ut.content,children:t.jsx(Ct,{className:ut.contentLatout,children:t.jsx(me,{title:"Videos",isTitle:!0,children:t.jsxs("div",{className:ut.videoContent,children:[t.jsx(Pd,{video:e.video}),t.jsxs("div",{className:ut.articleSection,children:[t.jsx(O,{className:ut.title,href:e.video.info.link.url,target:e.video.info.link.target,children:e.video.main.title}),t.jsx("p",{className:ut.article,children:Ue(e.video.main.description)}),t.jsx("p",{className:ut.correspondent,children:n()})]})]})})})})},Dd=e=>{switch(e.option){case"op1":return t.jsx(Bd,{videos:e.data});case"op2":return t.jsx(Od,{video:e.data[0]});default:return t.jsx(t.Fragment,{})}};function Md({containerId:e,containerId2:n}){return I.useEffect(()=>{try{let a=function(){const d=window.twttr;d?.widgets?d.widgets.load(o):l<10?(l++,requestAnimationFrame(a)):console.warn("No se pudo cargar widgets de Twitter")};const o=document.getElementById(e),s=document.getElementById(n);if(!o&&!s)return;const r=o?.querySelectorAll("script[src]")??[],i=s?.querySelectorAll("script[src]")??[];[...r,...i].forEach(d=>{const u=document.createElement("script");Array.from(d.attributes).forEach(f=>{u.setAttribute(f.name,f.value)}),d.replaceWith(u)});const h=document.querySelectorAll('script[src*="platform.twitter.com/widgets.js"]');if(h)for(let d=0;d<h.length;d++)h[d]?.remove();let l=0;if(document.querySelector('script[src*="platform.twitter.com/widgets.js"]'))a();else{const d=document.createElement("script");d.src="https://platform.twitter.com/widgets.js",d.async=!0,d.onload=a,document.body.appendChild(d)}}catch(a){console.warn("Error al procesar embeds de Twitter",a)}},[e]),null}const jd=e=>{const{isVideo:n=!1,isLarge:a=!1,hasShadow:o=!1,BackDropAuxHeigthMobile:s}=e,r=ra(),i=I.useMemo(()=>e?.preview?.sizes||[],[e?.preview?.sizes]);if(!i.length||!i[0]?.url||i[0]?.url==="")return t.jsx("div",{className:se.imagePlaceholder});const{PUBLIC_API_HOST:c,PUBLIC_ASSETS_URL:h}=e.API_ENV;return t.jsx("figure",{className:se.figure,children:t.jsxs("span",{className:se.backdrop,children:[t.jsx("span",{className:se.backdropAux,style:{height:s||"56.25%"}}),t.jsxs("picture",{children:[t.jsx("img",{fetchPriority:"low",loading:"lazy",className:se.imageStyled,alt:e.preview?.description||"",src:(h&&h!=="false"?h:c)+i[0]?.url,style:{boxShadow:o?"0px 4px 8px 0px #00000033":"0px"}}),n&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:se.boxPlayIcon,style:{height:a?"40%":"72px"}}),t.jsx(r,{className:se.playStyled,style:{width:a?"3rem":"27px",height:a?"3rem":"27px",marginBottom:a?"18px":".5rem",marginLeft:a?"30px":".5rem"}})]})]})]})})},$d=e=>t.jsx("svg",{width:"41",height:"33",viewBox:"0 0 41 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:t.jsx("path",{d:"M17.9576 21.2985C16.8233 21.2985 15.9277 22.194 15.9277 23.3283C15.9277 24.4627 16.8233 25.3582 17.9576 25.3582C19.0919 25.3582 19.9874 24.4627 19.9874 23.3283C19.9874 22.194 19.0919 21.2985 17.9576 21.2985ZM17.9576 19.2686C19.0919 19.2686 19.9874 18.3731 19.9874 17.2388C19.9874 16.1045 19.0919 15.2089 17.9576 15.2089C16.8233 15.2089 15.9277 16.1045 15.9277 17.2388C15.9277 18.3731 16.8233 19.2686 17.9576 19.2686ZM17.9576 13.1791C19.0919 13.1791 19.9874 12.2836 19.9874 11.1492C19.9874 10.0149 19.0919 9.11938 17.9576 9.11938C16.8233 9.11938 15.9277 10.0149 15.9277 11.1492C15.9277 12.2836 16.8233 13.1791 17.9576 13.1791Z",fill:"#7B888A"})}),rr={info:{section:{name:"",slug:"",url:""},link:{url:"/",target:"",canonical:!1,internal:""},date:{date:"",created:0,modified:0,firstpublish:0,lastpublish:0}},config:{zonehome:void 0,priorityhome:"",zonesection:"",prioritysection:"",homepreview:"",showcomments:!0,showtime:!0,showauthor:!0,showuppertitle:!0,showsubtitle:!0,showads:!0},main:{title:{home:"",section:"",article:""},subtitle:{rendered:"",striped:""},tags:[]},authors:[{firstname:"",lastname:"",fullname:"",image:void 0,name:"",internaluser:!1}],preview:void 0},ir=6,Qd=({section:e,currentNews:n,banner:a,isVisible:o=!1,stylesConfig:s,API_ENV:r,paths:i})=>{const[c,h]=I.useState({data:Array.from({length:ir},()=>rr)}),[l,d]=I.useState(!1),u=I.useCallback(async()=>{if(!n.info.link.internal)return;const m=new URLSearchParams({section:e,currentNewsLink:n.info.link.internal}),p=await fetch(`/api/get-more-news?${m}`);if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);return await p.json()},[e,n.info.link.internal]),f=I.useCallback(async()=>{const{PUBLIC_API_FRONT:m,PUBLIC_X_SECURITY_TOKEN:p,PUBLIC_API_PATH_VERSION:A,PUBLIC_PUBLICATION_ID:w,newsType:S,imgSizes:_}=r;if(!m||!p||!w||!A)throw new Error("Missing required environment variables");const E=await oe.get(`${m}${A}/news-list-section`,{params:{size:7,newstype:S,section:e,imagesizes:_,publication:parseInt(w)},headers:{"x-api-token":p,"Content-Type":"application/json"}});return{...E.data,data:E.data.data.filter(b=>b.info.link.internal!==n.info.link.internal)}},[e,n.info.link.internal,r]),g=I.useCallback(async()=>{if(!(l||!n?.info?.link?.internal)){d(!0);try{let m;r.PUBLIC_ENV!=="prod"?m=await u():m=await f(),h({...m,data:m.data.slice(0,ir)})}catch(m){console.error("[/api/get-more-news] Error:",m.message),h(void 0)}}},[l,n?.info?.link?.internal,r.PUBLIC_ENV,u,f]);return I.useEffect(()=>{o&&g()},[o,g]),!c?.data||c.data.length===0?null:t.jsx(Gd,{news:c.data,title:"Más Noticias",...s["Modulo 1x3 Client"]??s["Modulo 1x3"],hasLines:!0,showSubtitle:!0,rounded:!0,banner:a,API_ENV:r,paths:i,isVisible:o})},Gd=e=>{const{news:n,hasLines:a=!1,API_ENV:o}=e,s=r=>a&&(r+1)%3!==0?Ca.contentSeparator:"";return t.jsx("div",{className:Ca.newsContent,style:{gap:a?"30px":"20px","--gridTemplateModlule":a?"repeat(auto-fit, 343px);":"repeat(auto-fit, 380px);"},children:n.map((r,i)=>{const{main:c,authors:h,info:l,preview:d,isVideo:u=!1,config:f,overImage:g="default",isTitle:m=!1,isLarge:p=!1,keywords:A}=r;return t.jsx("div",{className:s(i),style:{order:i},children:t.jsxs("section",{className:Mt.content,children:[t.jsx(O,{title:c?.title?.section,href:l?.link?.url??"invalidUrl","aria-label":c?.title?.section??"nota",target:l?.link?.target,children:t.jsx(jd,{isVisible:e.isVisible,preview:d,rounded:e.rounded,isVideo:u,isLarge:p,API_ENV:e.API_ENV,getImageUrl:e.getImageUrl})}),t.jsx("div",{className:Mt.newsDescription,children:t.jsx(Hd,{main:c,SHOW_TAG_BY_SECTION:o.SHOW_TAG_BY_SECTION,authors:h,info:l,preview:d,share:e.share,config:f,overImage:g,isTitle:m,paths:e.paths,isVisible:e.isVisible,DATE_CONFIG:e.API_ENV,keywords:A})})]})},i)})})},Hd=e=>{const{share:n=!1,cutSubtitle:a=!0,SHOW_TAG_BY_SECTION:o,keywords:s,info:r}=e,c=(()=>{if(!e?.authors||e.authors.length===0)return"";const d=e.authors[0],u=xe(e.info?.date?.modified,e.DATE_CONFIG);return d&&e?.config?.showtime&&e.config?.showauthor?`${d.fullname} - ${u}`:d&&e.config?.showauthor?d.fullname:e?.config?.showtime?u:""})(),h=()=>e.main.uppertitle?t.jsx("p",{className:te.uppertitle,title:e.main.uppertitle,children:e.main.uppertitle}):null,l=()=>{if(o&&s?.tags?.length&&s.tags.length>0){const d=s.tags[0],u=d.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[d.approved?t.jsx(O,{"aria-label":u,className:te.sectionDescription,href:Ze(d,e.paths),children:u}):t.jsx("div",{className:te.sectionDescription,children:u}),h()]})}else if(r?.section?.url){const d=r.section.name;return t.jsxs("h3",{className:te.sectionDescriptionContainer,children:[t.jsx(O,{"aria-label":d,className:te.sectionDescription,href:r.section.url,children:d}),h()]})}return null};return t.jsxs("div",{className:te.boxInformation,children:[n&&t.jsx($d,{className:te.dotStyles}),t.jsx(l,{}),t.jsx("h2",{className:te.articule,children:t.jsx(O,{className:te.linkStyled,style:{"--isLink":e?.info?.link?.url?"underline":"none"},"aria-label":e.main?.title?.section??"nota",href:e?.info?.link?.url,target:e?.info?.link?.target,children:e.main?.title?.section})}),e.config?.showsubtitle&&e.main?.subtitle?.striped&&t.jsx("p",{className:te.description,style:{"--fontSizeSubTitle":e.fontSizeSubTitle,"--lineHeightSubTitle":e.lineHeightSubTitle,"--colorSubTitle":e.colorSubTitle},children:a?Ue(e.main.subtitle.striped):e.main.subtitle.striped}),(e?.config?.showtime||e.config?.showauthor)&&c&&t.jsx(t.Fragment,{children:e.authors?.[0]?.internaluser?t.jsx(O,{className:te.correspondentLink,href:`/${e.paths.autor}/${e.authors[0].name}`,children:c}):t.jsx("div",{className:te.correspondent,children:c})})]})},zd=({user:e,handleLogout:n,message:a})=>{const o=()=>{const r=document.querySelector(".user-actions-options");r&&r.classList.toggle("show")},s=e.firstname??"Usuario";return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{style:{display:"flex",gap:"14px"},children:[e&&e.picture&&e.picture!==""?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):t.jsx("div",{className:"comment-avatar",children:s.charAt(0).toUpperCase()}),t.jsxs("div",{style:{flex:1},children:[t.jsxs("div",{className:"comment-header",children:[t.jsxs("span",{className:"comment-username user-welcome",children:["Hola ",s,"!"]}),t.jsx("div",{className:"user-actions-options",children:t.jsx("button",{onClick:()=>{n()},children:"Cerrar Sesion"})}),t.jsx("button",{className:"user-actions-span",onClick:o,children:t.jsx(Sn,{width:13,height:13,fill:"black"})})]}),t.jsx("p",{className:"comment-text",children:a})]})]})})},fe={overlay:"_overlay_qj491_3",popup:"_popup_qj491_17",title:"_title_qj491_40",optionsContainer:"_optionsContainer_qj491_52",option:"_option_qj491_52",radioInput:"_radioInput_qj491_66",radioCustom:"_radioCustom_qj491_70",optionLabel:"_optionLabel_qj491_97",buttons:"_buttons_qj491_110",cancelButton:"_cancelButton_qj491_117",closeButton:"_closeButton_qj491_118",buttonAlone:"_buttonAlone_qj491_137",reportButton:"_reportButton_qj491_143",successContainer:"_successContainer_qj491_163",thumbsUp:"_thumbsUp_qj491_171",successMessage:"_successMessage_qj491_177",errorMessage:"_errorMessage_qj491_218",loadingContainer:"_loadingContainer_qj491_231"},cr=async(e,n)=>{if(!e)return!1;const{CAPTCHA_PROJECT:a,CAPTCHA_KEY_V2:o,COMMENTS_CAPTCHA_API_KEY:s}=n;try{const r=a,i=o,l=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${r}/assessments?key=${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:i}})})).json();return console.log("reCAPTCHA Enterprise verification result:",l),l.tokenProperties?.valid===!0}catch(r){return console.error("Error verificando reCAPTCHA Enterprise:",r),!1}};async function Fd({publication:e,username:n,id:a,type:o,baseUrl:s,captchaToken:r,apiToken:i,COMMENTS_VARS:c}){if(!e||!n||!a||!o||!r)throw new Error("Faltan parámetros requeridos: publication, username, id, type, captchaToken");if(typeof e!="string"||typeof n!="string"||typeof a!="string"||typeof o!="string"||typeof r!="string")throw new Error("Todos los parámetros deben ser strings");if(!await cr(r,c))throw new Error("Token de captcha inválido");if(!i)throw new Error("Falta el token de API del CMS");const h=`${s}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/report`,l=encodeURIComponent(o),d=new URLSearchParams({publication:e,username:n,id:a,type:l}),u=`${h}?${d.toString()}`;try{console.log("Reporting comment:",{publication:e,username:n,id:a,type:o,encodedType:l,url:u});const f=await oe.post(u,null,{headers:{"User-Agent":"Bluestack","x-api-token":i,"Content-Type":"application/json"}});if(console.log("Report response:",f.data),f.status===200||f.status===201)return{type:"success",message:"Comentario reportado exitosamente",status:f.status,data:f.data};throw new Error(`Respuesta inesperada del servidor: ${f.status}`)}catch(f){if(console.error("Error reporting comment:",f),oe.isAxiosError(f)){const g=f.response?.status,m=f.response?.data;throw g===400?new Error("Datos inválidos para el reporte"):g===401?new Error("Token de API inválido"):g===403?new Error("Acceso denegado para reportar comentario"):g===404?new Error("Comentario no encontrado"):g===409?new Error("El comentario ya fue reportado por este usuario"):g===500?new Error("Error interno del servidor CMS"):new Error(m?.error||m?.message||`Error HTTP ${g}: No se pudo reportar el comentario`)}throw f}}const je={spam:"Es spam o contenido comercial no deseado",inappropriate:"Lenguaje inadecuado",hate:"Discurso o símbolos de odio",misinformation:"Información falsa o fraude",terrorism:"Promueve el terrorismo",intellectual:"Violación de propiedad intelectual",bullying:"Bullying o acoso"};function Vd(e){return je[e]}const ft=300,Ke={username:"anonimo",firstname:"Usuario",lastname:"Anonimo"};function Wd(e){const n=e.split(" ");if(n.length!==3)return e;const[a,o,s]=n,r=o.charAt(0).toUpperCase()+o.slice(1).toLowerCase();return`${a} ${r} ${s}`}const Sa=(e,n)=>{if(!e||!e.current)return{boolean:!1,text:""};const a=e.current?.value||"",o=a.length>ft,{PUBLIC_ENV:s}=K(),r=s==="local",i=a.trim()!==""&&(r||n!=="")&&!o,c=o?`No debes exceder el limite de ${ft} caracteres.`:"Debes completar todos los campos para comentar.";return{boolean:i,text:c}},lr=e=>{const n=e.cookie.split("; ").find(a=>a.startsWith("reported="));if(!n)return[];try{return JSON.parse(decodeURIComponent(n.split("=")[1]??""))}catch{return[]}},Yd=(e,n)=>{const a=lr(e);a.includes(n)||(a.push(n),e.cookie=`reported=${encodeURIComponent(JSON.stringify(a))}; path=/; max-age=${3600*24*1}`)};function Kd(e){const[n,a]=e.split("@");if(!n||!a)return e;let o="";n.length<=2?o=n[0]+"*":o=n[0]+"*".repeat(n.length-2)+n[n.length-1];const s=a.lastIndexOf(".");if(s===-1)return`${o}@${a}`;const r=a.slice(0,s),i=a.slice(s);let c="";return r.length<=2?c=r[0]+"*":c=r[0]+"*".repeat(r.length-2)+r[r.length-1],`${o}@${c}${i}`}var qn={exports:{}},Bn={exports:{}},ne={};var dr;function Jd(){if(dr)return ne;dr=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(b){if(typeof b=="object"&&b!==null){var k=b.$$typeof;switch(k){case n:switch(b=b.type,b){case h:case l:case o:case r:case s:case u:return b;default:switch(b=b&&b.$$typeof,b){case c:case d:case m:case g:case i:return b;default:return k}}case a:return k}}}function E(b){return _(b)===l}return ne.AsyncMode=h,ne.ConcurrentMode=l,ne.ContextConsumer=c,ne.ContextProvider=i,ne.Element=n,ne.ForwardRef=d,ne.Fragment=o,ne.Lazy=m,ne.Memo=g,ne.Portal=a,ne.Profiler=r,ne.StrictMode=s,ne.Suspense=u,ne.isAsyncMode=function(b){return E(b)||_(b)===h},ne.isConcurrentMode=E,ne.isContextConsumer=function(b){return _(b)===c},ne.isContextProvider=function(b){return _(b)===i},ne.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===n},ne.isForwardRef=function(b){return _(b)===d},ne.isFragment=function(b){return _(b)===o},ne.isLazy=function(b){return _(b)===m},ne.isMemo=function(b){return _(b)===g},ne.isPortal=function(b){return _(b)===a},ne.isProfiler=function(b){return _(b)===r},ne.isStrictMode=function(b){return _(b)===s},ne.isSuspense=function(b){return _(b)===u},ne.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===l||b===r||b===s||b===u||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===g||b.$$typeof===i||b.$$typeof===c||b.$$typeof===d||b.$$typeof===A||b.$$typeof===w||b.$$typeof===S||b.$$typeof===p)},ne.typeOf=_,ne}var ae={};var hr;function Zd(){return hr||(hr=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function _(P){return typeof P=="string"||typeof P=="function"||P===o||P===l||P===r||P===s||P===u||P===f||typeof P=="object"&&P!==null&&(P.$$typeof===m||P.$$typeof===g||P.$$typeof===i||P.$$typeof===c||P.$$typeof===d||P.$$typeof===A||P.$$typeof===w||P.$$typeof===S||P.$$typeof===p)}function E(P){if(typeof P=="object"&&P!==null){var ye=P.$$typeof;switch(ye){case n:var $n=P.type;switch($n){case h:case l:case o:case r:case s:case u:return $n;default:var qr=$n&&$n.$$typeof;switch(qr){case c:case d:case m:case g:case i:return qr;default:return ye}}case a:return ye}}}var b=h,k=l,q=c,G=i,X=n,H=d,M=o,ee=m,ie=g,$=a,L=r,T=s,j=u,U=!1;function F(P){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(P)||E(P)===h}function y(P){return E(P)===l}function N(P){return E(P)===c}function B(P){return E(P)===i}function Q(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function D(P){return E(P)===d}function z(P){return E(P)===o}function V(P){return E(P)===m}function W(P){return E(P)===g}function Z(P){return E(P)===a}function R(P){return E(P)===r}function Y(P){return E(P)===s}function re(P){return E(P)===u}ae.AsyncMode=b,ae.ConcurrentMode=k,ae.ContextConsumer=q,ae.ContextProvider=G,ae.Element=X,ae.ForwardRef=H,ae.Fragment=M,ae.Lazy=ee,ae.Memo=ie,ae.Portal=$,ae.Profiler=L,ae.StrictMode=T,ae.Suspense=j,ae.isAsyncMode=F,ae.isConcurrentMode=y,ae.isContextConsumer=N,ae.isContextProvider=B,ae.isElement=Q,ae.isForwardRef=D,ae.isFragment=z,ae.isLazy=V,ae.isMemo=W,ae.isPortal=Z,ae.isProfiler=R,ae.isStrictMode=Y,ae.isSuspense=re,ae.isValidElementType=_,ae.typeOf=E})()),ae}var ur;function Na(){return ur||(ur=1,process.env.NODE_ENV==="production"?Bn.exports=Jd():Bn.exports=Zd()),Bn.exports}var Ea,fr;function Xd(){if(fr)return Ea;fr=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function s(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(h.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ea=s()?Object.assign:function(r,i){for(var c,h=o(r),l,d=1;d<arguments.length;d++){c=Object(arguments[d]);for(var u in c)n.call(c,u)&&(h[u]=c[u]);if(e){l=e(c);for(var f=0;f<l.length;f++)a.call(c,l[f])&&(h[l[f]]=c[l[f]])}}return h},Ea}var Ia,mr;function Ta(){if(mr)return Ia;mr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ia=e,Ia}var ka,gr;function pr(){return gr||(gr=1,ka=Function.call.bind(Object.prototype.hasOwnProperty)),ka}var xa,Ar;function Rd(){if(Ar)return xa;Ar=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=Ta(),a={},o=pr();e=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(r,i,c,h,l){if(process.env.NODE_ENV!=="production"){for(var d in r)if(o(r,d)){var u;try{if(typeof r[d]!="function"){var f=Error((h||"React class")+": "+c+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}u=r[d](i,d,h,c,null,n)}catch(m){u=m}if(u&&!(u instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in a)){a[u.message]=!0;var g=l?l():"";e("Failed "+c+" type: "+u.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},xa=s,xa}var Ua,yr;function e1(){if(yr)return Ua;yr=1;var e=Na(),n=Xd(),a=Ta(),o=pr(),s=Rd(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(c){var h="Warning: "+c;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function i(){return null}return Ua=function(c,h){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function u(y){var N=y&&(l&&y[l]||y[d]);if(typeof N=="function")return N}var f="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:S(),arrayOf:_,element:E(),elementType:b(),instanceOf:k,node:H(),objectOf:G,oneOf:q,oneOfType:X,shape:ee,exact:ie};function m(y,N){return y===N?y!==0||1/y===1/N:y!==y&&N!==N}function p(y,N){this.message=y,this.data=N&&typeof N=="object"?N:{},this.stack=""}p.prototype=Error.prototype;function A(y){if(process.env.NODE_ENV!=="production")var N={},B=0;function Q(z,V,W,Z,R,Y,re){if(Z=Z||f,Y=Y||W,re!==a){if(h){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=Z+":"+W;!N[ye]&&B<3&&(r("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),N[ye]=!0,B++)}}return V[W]==null?z?V[W]===null?new p("The "+R+" `"+Y+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new p("The "+R+" `"+Y+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:y(V,W,Z,R,Y)}var D=Q.bind(null,!1);return D.isRequired=Q.bind(null,!0),D}function w(y){function N(B,Q,D,z,V,W){var Z=B[Q],R=T(Z);if(R!==y){var Y=j(Z);return new p("Invalid "+z+" `"+V+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return A(N)}function S(){return A(i)}function _(y){function N(B,Q,D,z,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var W=B[Q];if(!Array.isArray(W)){var Z=T(W);return new p("Invalid "+z+" `"+V+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected an array."))}for(var R=0;R<W.length;R++){var Y=y(W,R,D,z,V+"["+R+"]",a);if(Y instanceof Error)return Y}return null}return A(N)}function E(){function y(N,B,Q,D,z){var V=N[B];if(!c(V)){var W=T(V);return new p("Invalid "+D+" `"+z+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return A(y)}function b(){function y(N,B,Q,D,z){var V=N[B];if(!e.isValidElementType(V)){var W=T(V);return new p("Invalid "+D+" `"+z+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return A(y)}function k(y){function N(B,Q,D,z,V){if(!(B[Q]instanceof y)){var W=y.name||f,Z=F(B[Q]);return new p("Invalid "+z+" `"+V+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected ")+("instance of `"+W+"`."))}return null}return A(N)}function q(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function N(B,Q,D,z,V){for(var W=B[Q],Z=0;Z<y.length;Z++)if(m(W,y[Z]))return null;var R=JSON.stringify(y,function(re,P){var ye=j(P);return ye==="symbol"?String(P):P});return new p("Invalid "+z+" `"+V+"` of value `"+String(W)+"` "+("supplied to `"+D+"`, expected one of "+R+"."))}return A(N)}function G(y){function N(B,Q,D,z,V){if(typeof y!="function")return new p("Property `"+V+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var W=B[Q],Z=T(W);if(Z!=="object")return new p("Invalid "+z+" `"+V+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected an object."));for(var R in W)if(o(W,R)){var Y=y(W,R,D,z,V+"."+R,a);if(Y instanceof Error)return Y}return null}return A(N)}function X(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var N=0;N<y.length;N++){var B=y[N];if(typeof B!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(B)+" at index "+N+"."),i}function Q(D,z,V,W,Z){for(var R=[],Y=0;Y<y.length;Y++){var re=y[Y],P=re(D,z,V,W,Z,a);if(P==null)return null;P.data&&o(P.data,"expectedType")&&R.push(P.data.expectedType)}var ye=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new p("Invalid "+W+" `"+Z+"` supplied to "+("`"+V+"`"+ye+"."))}return A(Q)}function H(){function y(N,B,Q,D,z){return $(N[B])?null:new p("Invalid "+D+" `"+z+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return A(y)}function M(y,N,B,Q,D){return new p((y||"React class")+": "+N+" type `"+B+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function ee(y){function N(B,Q,D,z,V){var W=B[Q],Z=T(W);if(Z!=="object")return new p("Invalid "+z+" `"+V+"` of type `"+Z+"` "+("supplied to `"+D+"`, expected `object`."));for(var R in y){var Y=y[R];if(typeof Y!="function")return M(D,z,V,R,j(Y));var re=Y(W,R,D,z,V+"."+R,a);if(re)return re}return null}return A(N)}function ie(y){function N(B,Q,D,z,V){var W=B[Q],Z=T(W);if(Z!=="object")return new p("Invalid "+z+" `"+V+"` of type `"+Z+"` "+("supplied to `"+D+"`, expected `object`."));var R=n({},B[Q],y);for(var Y in R){var re=y[Y];if(o(y,Y)&&typeof re!="function")return M(D,z,V,Y,j(re));if(!re)return new p("Invalid "+z+" `"+V+"` key `"+Y+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(B[Q],null," ")+`
159
159
  Valid keys: `+JSON.stringify(Object.keys(y),null," "));var P=re(W,Y,D,z,V+"."+Y,a);if(P)return P}return null}return A(N)}function $(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every($);if(y===null||c(y))return!0;var N=u(y);if(N){var B=N.call(y),Q;if(N!==y.entries){for(;!(Q=B.next()).done;)if(!$(Q.value))return!1}else for(;!(Q=B.next()).done;){var D=Q.value;if(D&&!$(D[1]))return!1}}else return!1;return!0;default:return!1}}function L(y,N){return y==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function T(y){var N=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":L(N,y)?"symbol":N}function j(y){if(typeof y>"u"||y===null)return""+y;var N=T(y);if(N==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return N}function U(y){var N=j(y);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function F(y){return!y.constructor||!y.constructor.name?f:y.constructor.name}return g.checkPropTypes=s,g.resetWarningCache=s.resetWarningCache,g.PropTypes=g,g},Ua}var La,wr;function t1(){if(wr)return La;wr=1;var e=Ta();function n(){}function a(){}return a.resetWarningCache=n,La=function(){function o(i,c,h,l,d,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}o.isRequired=o;function s(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:s,element:o,elementType:o,instanceOf:s,node:o,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:a,resetWarningCache:n};return r.PropTypes=r,r},La}var Cr;function n1(){if(Cr)return qn.exports;if(Cr=1,process.env.NODE_ENV!=="production"){var e=Na(),n=!0;qn.exports=e1()(e.isElement,n)}else qn.exports=t1()();return qn.exports}var a1=n1();const ve=mt(a1);var o1=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},qa.apply(this,arguments)}function s1(e,n){if(e==null)return{};var a={},o=Object.keys(e),s,r;for(r=0;r<o.length;r++)s=o[r],!(n.indexOf(s)>=0)&&(a[s]=e[s]);return a}function Pn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r1(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Ba(e,n)}function Ba(e,n){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,s){return o.__proto__=s,o},Ba(e,n)}var On=(function(e){r1(n,e);function n(){var o;return o=e.call(this)||this,o.handleExpired=o.handleExpired.bind(Pn(o)),o.handleErrored=o.handleErrored.bind(Pn(o)),o.handleChange=o.handleChange.bind(Pn(o)),o.handleRecaptchaRef=o.handleRecaptchaRef.bind(Pn(o)),o}var a=n.prototype;return a.getCaptchaFunction=function(s){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[s]:this.props.grecaptcha[s]:null},a.getValue=function(){var s=this.getCaptchaFunction("getResponse");return s&&this._widgetId!==void 0?s(this._widgetId):null},a.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},a.execute=function(){var s=this.getCaptchaFunction("execute");if(s&&this._widgetId!==void 0)return s(this._widgetId);this._executeRequested=!0},a.executeAsync=function(){var s=this;return new Promise(function(r,i){s.executionResolve=r,s.executionReject=i,s.execute()})},a.reset=function(){var s=this.getCaptchaFunction("reset");s&&this._widgetId!==void 0&&s(this._widgetId)},a.forceReset=function(){var s=this.getCaptchaFunction("reset");s&&s()},a.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},a.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},a.handleChange=function(s){this.props.onChange&&this.props.onChange(s),this.executionResolve&&(this.executionResolve(s),delete this.executionReject,delete this.executionResolve)},a.explicitRender=function(){var s=this.getCaptchaFunction("render");if(s&&this._widgetId===void 0){var r=document.createElement("div");this._widgetId=s(r,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(r)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},a.componentDidMount=function(){this.explicitRender()},a.componentDidUpdate=function(){this.explicitRender()},a.handleRecaptchaRef=function(s){this.captcha=s},a.render=function(){var s=this.props;s.sitekey,s.onChange,s.theme,s.type,s.tabindex,s.onExpired,s.onErrored,s.size,s.stoken,s.grecaptcha,s.badge,s.hl,s.isolated;var r=s1(s,o1);return ja.createElement("div",qa({},r,{ref:this.handleRecaptchaRef}))},n})(ja.Component);On.displayName="ReCAPTCHA",On.propTypes={sitekey:ve.string.isRequired,onChange:ve.func,grecaptcha:ve.object,theme:ve.oneOf(["dark","light"]),type:ve.oneOf(["image","audio"]),tabindex:ve.number,onExpired:ve.func,onErrored:ve.func,size:ve.oneOf(["compact","normal","invisible"]),stoken:ve.string,hl:ve.string,badge:ve.oneOf(["bottomright","bottomleft","inline"]),isolated:ve.bool},On.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Pa,br;function i1(){if(br)return Pa;br=1;var e=Na(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},r={};r[e.ForwardRef]=o,r[e.Memo]=s;function i(m){return e.isMemo(m)?s:r[m.$$typeof]||n}var c=Object.defineProperty,h=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,f=Object.prototype;function g(m,p,A){if(typeof p!="string"){if(f){var w=u(p);w&&w!==f&&g(m,w,A)}var S=h(p);l&&(S=S.concat(l(p)));for(var _=i(m),E=i(p),b=0;b<S.length;++b){var k=S[b];if(!a[k]&&!(A&&A[k])&&!(E&&E[k])&&!(_&&_[k])){var q=d(p,k);try{c(m,k,q)}catch{}}}}return m}return Pa=g,Pa}var c1=i1();const l1=mt(c1);function Oa(){return Oa=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},Oa.apply(this,arguments)}function d1(e,n){if(e==null)return{};var a={},o=Object.keys(e),s,r;for(r=0;r<o.length;r++)s=o[r],!(n.indexOf(s)>=0)&&(a[s]=e[s]);return a}function h1(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n}var Pe={},u1=0;function f1(e,n){return n=n||{},function(o){var s=o.displayName||o.name||"Component",r=(function(c){h1(h,c);function h(d,u){var f;return f=c.call(this,d,u)||this,f.state={},f.__scriptURL="",f}var l=h.prototype;return l.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+u1++),this.__scriptLoaderID},l.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},l.asyncScriptLoaderHandleLoad=function(u){var f=this;this.setState(u,function(){return f.props.asyncScriptOnLoad&&f.props.asyncScriptOnLoad(f.state)})},l.asyncScriptLoaderTriggerOnScriptLoaded=function(){var u=Pe[this.__scriptURL];if(!u||!u.loaded)throw new Error("Script is not loaded.");for(var f in u.observers)u.observers[f](u);delete window[n.callbackName]},l.componentDidMount=function(){var u=this,f=this.setupScriptURL(),g=this.asyncScriptLoaderGetScriptLoaderID(),m=n,p=m.globalName,A=m.callbackName,w=m.scriptId;if(p&&typeof window[p]<"u"&&(Pe[f]={loaded:!0,observers:{}}),Pe[f]){var S=Pe[f];if(S&&(S.loaded||S.errored)){this.asyncScriptLoaderHandleLoad(S);return}S.observers[g]=function(q){return u.asyncScriptLoaderHandleLoad(q)};return}var _={};_[g]=function(q){return u.asyncScriptLoaderHandleLoad(q)},Pe[f]={loaded:!1,observers:_};var E=document.createElement("script");E.src=f,E.async=!0;for(var b in n.attributes)E.setAttribute(b,n.attributes[b]);w&&(E.id=w);var k=function(G){if(Pe[f]){var X=Pe[f],H=X.observers;for(var M in H)G(H[M])&&delete H[M]}};A&&typeof window<"u"&&(window[A]=function(){return u.asyncScriptLoaderTriggerOnScriptLoaded()}),E.onload=function(){var q=Pe[f];q&&(q.loaded=!0,k(function(G){return A?!1:(G(q),!0)}))},E.onerror=function(){var q=Pe[f];q&&(q.errored=!0,k(function(G){return G(q),!0}))},document.body.appendChild(E)},l.componentWillUnmount=function(){var u=this.__scriptURL;if(n.removeOnUnmount===!0)for(var f=document.getElementsByTagName("script"),g=0;g<f.length;g+=1)f[g].src.indexOf(u)>-1&&f[g].parentNode&&f[g].parentNode.removeChild(f[g]);var m=Pe[u];m&&(delete m.observers[this.asyncScriptLoaderGetScriptLoaderID()],n.removeOnUnmount===!0&&delete Pe[u])},l.render=function(){var u=n.globalName,f=this.props;f.asyncScriptOnLoad;var g=f.forwardedRef,m=d1(f,["asyncScriptOnLoad","forwardedRef"]);return u&&typeof window<"u"&&(m[u]=typeof window[u]<"u"?window[u]:void 0),m.ref=g,I.createElement(o,m)},h})(I.Component),i=I.forwardRef(function(c,h){return I.createElement(r,Oa({},c,{forwardedRef:h}))});return i.displayName="AsyncScriptLoader("+s+")",i.propTypes={asyncScriptOnLoad:ve.func},l1(i,o)}}var Da="onloadcallback",m1="grecaptcha";function Ma(){return typeof window<"u"&&window.recaptchaOptions||{}}function g1(){var e=Ma(),n=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+n+"/recaptcha/enterprise.js?onload="+Da+"&render=explicit":"https://"+n+"/recaptcha/api.js?onload="+Da+"&render=explicit"}const vr=f1(g1,{callbackName:Da,globalName:m1,attributes:Ma().nonce?{nonce:Ma().nonce}:{}})(On),x={overlay:"_overlay_18ksj_1",header:"_header_18ksj_18",logo:"_logo_18ksj_25",card:"_card_18ksj_32",close:"_close_18ksj_47",form:"_form_18ksj_71",formUl:"_formUl_18ksj_80",field:"_field_18ksj_92",label:"_label_18ksj_99",input:"_input_18ksj_108",error:"_error_18ksj_126",primary:"_primary_18ksj_132",divider:"_divider_18ksj_170",google:"_google_18ksj_196",googleIcon:"_googleIcon_18ksj_226",spin:"_spin_18ksj_259",checkboxRow:"_checkboxRow_18ksj_281",switch:"_switch_18ksj_310",terms:"_terms_18ksj_318",message:"_message_18ksj_349",passwordChecker:"_passwordChecker_18ksj_354",valid:"_valid_18ksj_373",invalid:"_invalid_18ksj_377",forgotPassword:"_forgotPassword_18ksj_381",successContainer:"_successContainer_18ksj_400",thumbsUp:"_thumbsUp_18ksj_408",successMessage:"_successMessage_18ksj_414"},Je=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",width:"24",height:"24",viewBox:"0 0 32 32",className:x.spin,children:t.jsx("path",{d:"M18,4.181v2.021c4.559,0.929,8,4.97,8,9.798c0,5.514-4.486,10-10,10S6,21.514,6,16c0-4.829,3.441-8.869,8-9.798V4.181 C8.334,5.137,4,10.066,4,16c0,6.617,5.383,12,12,12s12-5.383,12-12C28,10.066,23.666,5.137,18,4.181z"})}),p1=({isOpen:e,onClose:n,commentId:a,publication:o,username:s,CAPTCHA_KEY_V2:r})=>{const[i,c]=I.useState("form"),[h,l]=I.useState(""),[d,u]=I.useState(""),[f,g]=I.useState(""),m=[{id:"spam",label:je.spam},{id:"inappropriate",label:je.inappropriate},{id:"hate",label:je.hate},{id:"misinformation",label:je.misinformation},{id:"terrorism",label:je.terrorism},{id:"intellectual",label:je.intellectual},{id:"bullying",label:je.bullying}],p=async()=>{if(!(!h||!a)){if(lr(document).includes(a)){u("Ya has reportado este comentario.");return}c("loading"),u("");try{const S=await(await fetch("/api/comments-report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:o,username:s,id:a,captchaToken:f,type:je[h]})})).json();if(S.type==="success")Yd(document,a),c("success"),setTimeout(()=>{A()},3e3);else throw new Error(S.message||"Error al reportar comentario")}catch(w){console.error("Error reporting comment:",w),u(w.message||"Error al reportar comentario"),c("form")}}},A=()=>{c("form"),l(""),u(""),n()};return!e||!a||!s?null:t.jsx("div",{className:fe.overlay,children:t.jsxs("div",{className:fe.popup,children:[t.jsx("button",{className:"close-reply-form",onClick:A,children:t.jsx(bt,{})}),t.jsx("h2",{className:fe.title,children:"Reportar Abuso"}),i==="loading"&&t.jsx("div",{className:fe.loadingContainer,children:t.jsx(Je,{})}),i==="form"||i==="loading"?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:fe.optionsContainer,children:m.map(w=>t.jsxs("label",{className:fe.option,children:[t.jsx("input",{type:"radio",name:"reportReason",value:w.id,checked:h===w.id,onChange:S=>l(S.target.value),className:fe.radioInput}),t.jsx("span",{className:fe.radioCustom}),t.jsx("span",{className:fe.optionLabel,children:w.label})]},w.id))}),d&&t.jsx("div",{className:fe.errorMessage,children:d}),t.jsx(vr,{sitekey:r,theme:"light",size:"normal",onChange:w=>g(w??""),onExpired:()=>g("")}),t.jsxs("div",{className:fe.buttons,children:[t.jsx("button",{onClick:A,className:fe.cancelButton,children:"Cancelar"}),t.jsx("button",{onClick:p,disabled:!h,className:fe.reportButton,children:"Reportar"})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:fe.successContainer,children:[t.jsx("div",{className:fe.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsx("p",{className:fe.successMessage,children:"¡Gracias por reportar!"})]}),t.jsx("div",{className:fe.buttons,children:t.jsx("button",{onClick:A,className:[fe.closeButton,fe.buttonAlone].join(" "),children:"Cerrar"})})]})]})})};function A1(e){const n=/^\[\[([^\]]+)\]\]/,a=e.match(n);return a?{user:{username:a[1],firstname:a[1],lastname:""},text:e.replace("[["+a[1]+"]]","")}:{user:!1,text:e}}function Dn(e){const n=e.comments.map(a=>{if(a.user)return{...a,user:a.user,text:a.text,reply:a.reply?Dn({comments:a.reply}).comments:a.reply};const{user:o,text:s}=A1(a.text);return{...a,user:o||!1,text:s,reply:a.reply?Dn({comments:a.reply}).comments:a.reply}});return{...e,comments:n}}async function Mn({publication:e,path:n,size:a=5,sizereply:o=2,id:s,lastid:r,state:i="5,6",apiToken:c}){const{PUBLIC_ENV:h}=K();if(h==="prod"){const l=await _r({publication:e,path:n,size:a,sizereply:o,id:s,lastid:r,state:i,apiToken:c});return Dn(l[0])}else{const l=await fetch(`/api/comments-get?publication=${e}&path=${n}&size=${a}&sizereply=${o}&lastid=${r}`);if(!l.ok)throw new Error(`Error al obtener comentarios: ${l.status}`);const d=await l.json();return Dn(d.data[0])}}async function _r({publication:e,path:n,size:a=5,sizereply:o=2,id:s,lastid:r,state:i="5,6",apiToken:c}){if(!e||!n)throw new Error("Missing required parameters: publication and path");if(typeof e!="string"||typeof n!="string")throw new Error("Invalid input types for publication or path");if(!c)throw new Error("Missing CMS API token");const{PUBLIC_ENV:h,PUBLIC_API_HOST:l,PUBLIC_API_PATH:d,PUBLIC_API_PATH_VERSION:u}=K(),f=parseInt(String(a),10),g=parseInt(String(o),10);if(isNaN(f)||f<=0)throw new Error("Invalid size parameter");if(isNaN(g)||g<0)throw new Error("Invalid sizereply parameter");const m=h!=="prod"?`${l}${d}`:Xa(),p=new URLSearchParams({publication:e,path:n,size:f.toString(),sizereply:g.toString(),state:i});s&&p.append("id",s),r&&p.append("lastid",r);const A=`${m}${u}/newcomments/get?${p.toString()}`;try{console.log("Fetching comments from:",A);const{data:w}=await oe.get(A,{headers:{"x-api-token":c,"Cache-Control":"max-age=0, no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0"}});if(!w)throw new Error("No comments data received");return w.data||w||[]}catch(w){if(console.error("Error fetching comments:",w),oe.isAxiosError(w)){const S=w.response?.status,_=w.response?.data;throw S===404?new Error("Comments not found"):S===403?new Error("Access forbidden - check API token"):S===401?new Error("Unauthorized - invalid API token"):S===500?new Error("Internal server error from CMS"):new Error(_?.error||_?.message||`HTTP ${S}: Failed to fetch comments`)}throw w}}const{PUBLIC_PUBLICATION_ID:y1}=K(),w1=y1,C1=e=>{const[n,a]=I.useState(void 0);return I.useEffect(()=>{if(n)return;(async()=>{const{PUBLIC_X_SECURITY_TOKEN:s}=K();try{const r=await Mn({publication:w1,path:e??"",size:5,sizereply:2,id:void 0,lastid:void 0,state:"5,6",apiToken:s});a(r??[])}catch(r){console.error(r),a({comments:[],morecomment:!1})}})()},[n]),{comments:n,setComments:a}},Sr=({username:e,date:n,DATE_CONFIG:a})=>t.jsxs("div",{className:"comment-header",children:[t.jsx("span",{className:"comment-username",children:e}),t.jsx("span",{className:"comment-header-dot",children:"•"}),t.jsx("span",{className:"comment-date",children:Wd(xe(Number(n),a))})]}),Nr=({user:e})=>t.jsx("div",{className:"comment-avatar",children:e.picture?t.jsx("img",{className:"comment-avatar-img",src:e.picture,alt:e.username}):e.firstname.charAt(0).toUpperCase()}),Er=({isReply:e=!1,onReply:n,onFlag:a})=>t.jsxs("div",{className:"comment-actions",children:[!e&&n&&t.jsx("button",{onClick:n,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M9.976 9V5l-6.983 7 6.983 7v-4.1c4.988 0 8.48 1.6 10.973 5.1-.997-5-3.99-10-10.973-11Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M0 0h23.942v24H0z"})})})]})}),t.jsx("button",{onClick:a,className:"comment-action-btn",children:t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",children:[t.jsx("g",{clipPath:"url(#a)",children:t.jsx("path",{fill:"#4D4E4E",d:"M20.133 2h-16c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2Zm0 14H5.303l-1.17 1.17V4h16v12Zm-9-11h2v6h-2V5Zm0 8h2v2h-2v-2Z"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"a",children:t.jsx("path",{fill:"#fff",d:"M.133 0h24v24h-24z"})})})]})})]}),Ir=({commentRef:e,captchaToken:n="",setIsDisabled:a})=>(I.useEffect(()=>{const o=e.current;if(!o)return;const s=()=>{const i=o.value.length;o.parentElement&&(o.parentElement.dataset.text=`${i}/${ft}`),o.classList.toggle("over-limit",i>ft),a(!Sa(e,n).boolean)};return o.addEventListener("input",s),s(),()=>o.removeEventListener("input",s)},[e,n,a]),t.jsxs("div",{children:[t.jsx("label",{className:"comment-input-label",children:"Comentario"}),t.jsx("textarea",{ref:e,name:"comment",placeholder:"Ingresa un comentario",rows:2})]})),Tr=({commentRef:e,captchaToken:n="",setCaptchaToken:a,children:o,CAPTCHA_KEY_V2:s})=>{const r=Sa(e,n);return t.jsxs("div",{className:"form-actions",children:[t.jsx(vr,{sitekey:s,theme:"light",size:"normal",onChange:i=>a(i??""),onExpired:()=>a("")}),t.jsxs("div",{className:"submit-zone",children:[o,!r.boolean&&t.jsx("p",{className:"submit-warning",children:r.text})]})]})},kr=({onClick:e,isDisabled:n})=>{const[a,o]=I.useState(!1),{S3_ID_DIR:s=""}=K();return I.useEffect(()=>{let r=null;return a&&(r=setTimeout(()=>{o(!1)},2400)),()=>{r&&clearTimeout(r)}},[a]),a?t.jsx("div",{className:"success-gif-container",children:t.jsx("img",{className:"success-gif",src:pt()+"/arte/"+s+"/Success.gif"})}):t.jsxs("button",{type:"button",onClick:async r=>{await e(r)&&o(!0)},id:"comment-button",className:`submit-btn ${n?"disabled":"active"}`,children:["Enviar Comentario",t.jsx("svg",{style:{minWidth:16},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M1.39258 8.99997H12.5626L7.68258 13.88C7.29258 14.27 7.29258 14.91 7.68258 15.3C8.07258 15.69 8.70258 15.69 9.09258 15.3L15.6826 8.70997C16.0726 8.31997 16.0726 7.68997 15.6826 7.29997L9.10258 0.699971C8.71258 0.309971 8.08258 0.309971 7.69258 0.699971C7.30258 1.08997 7.30258 1.71997 7.69258 2.10997L12.5626 6.99997H1.39258C0.842578 6.99997 0.392578 7.44997 0.392578 7.99997C0.392578 8.54997 0.842578 8.99997 1.39258 8.99997Z",fill:"currentColor"})})]})},{PUBLIC_PUBLICATION_ID:b1}=K(),v1=b1,xr=async({path:e,ref:n,captchaToken:a,button:o,user:s,id:r,addComment:i})=>{const c=n.current?.value||"";if(!Sa(n,a).boolean||!s){const h=o.nextElementSibling;return h&&(h.style.display="block"),!1}try{const h=Date.now(),l=await fetch("/api/comments-add",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publication:v1,path:e,id:r,username:s.username,comment:c,recaptchaResponse:a})});let d=null;try{d=await l.json()}catch(m){console.error("Error parsing JSON response:",m)}if(!l.ok)throw new Error(`Error al enviar comentario: ${d?.message} status: ${l.status}`);const u=Date.now(),f=Math.max(0,2400+Math.abs(u-h)),g={username:s.username,firstname:s.firstname,...s.lastname&&{lastname:s.lastname},...s.picture&&{picture:s.picture}};return i({id:u.toString(),text:c,user:g,date:{time:Date.now()},reply:[]}),n.current&&(n.current.value=""),f}catch(h){return console.error("Error enviando comentario:",h),alert(h.message||"Error al enviar el comentario."),!1}},_1=({replyingTo:e,commentRef:n,user:a,path:o,addReply:s,closeForm:r,CAPTCHA_KEY_V2:i})=>{const[c,h]=I.useState(!0),[l,d]=I.useState(""),u=()=>{n.current?.parentElement&&(n.current.parentElement.dataset.text=`0/${ft}`),h(!0),r()};return t.jsxs("div",{className:"comment-form reply-form",children:[t.jsx("button",{className:"close-reply-form",onClick:u,children:t.jsx(bt,{})}),t.jsx(Ir,{commentRef:n,captchaToken:l,setIsDisabled:h}),t.jsx(Tr,{commentRef:n,captchaToken:l,setCaptchaToken:d,CAPTCHA_KEY_V2:i,children:t.jsx(kr,{onClick:async f=>{if(c)return;const g=await xr({path:o,ref:n,captchaToken:l,button:f.currentTarget,user:a,id:e,addComment:s});return g&&typeof g=="number"?(setTimeout(()=>{u()},g),!0):!1},isDisabled:c})})]})},S1=({reply:e,replyingTo:n,user:a,onFlag:o,DATE_CONFIG:s})=>{const r=e.text;let i=`${Ke.firstname} ${Ke.lastname??""}`,c=Ke.username;return e.user&&(i=`${e.user.firstname} ${e.user.lastname??""}`,c=e.user.username),t.jsx("div",{className:"comment-item reply",children:t.jsxs("div",{className:"comment-header-container",children:[t.jsx(Nr,{user:e.user?e.user:Ke}),t.jsxs("div",{style:{flex:1},children:[t.jsx(Sr,{username:i,date:e.date.time,DATE_CONFIG:s}),t.jsxs("div",{className:"comment-reply-to",children:["Respondiendo a ",t.jsx("strong",{children:n})]}),t.jsx("p",{className:"comment-text",children:r}),a?.username.toLowerCase()!==c.toLowerCase()&&t.jsx(Er,{isReply:!0,onFlag:()=>o(e.id)})]})]})})},N1=({comment:e,replyingTo:n,path:a,user:o,handleReplyingTo:s,onFlag:r,CAPTCHA_KEY_V2:i,DATE_CONFIG:c})=>{const h={morereply:e.morereply??!1,reply:e.reply?e.reply:[]},[l,d]=I.useState(h),[u,f]=I.useState(!1),{PUBLIC_PUBLICATION_ID:g,PUBLIC_X_SECURITY_TOKEN:m}=K(),p=e.text,A=I.useRef(null);let w=`${Ke.firstname} ${Ke.lastname??""}`,S=Ke.username;e.user&&(w=`${e.user.firstname} ${e.user.lastname??""}`,S=e.user.username);const _=E=>{d({morereply:l.morereply,reply:[E,...l.reply]})};return t.jsx("div",{className:"comment-item",children:t.jsxs("div",{className:"comment-header-container","data-hasreplies":l.reply.length>0?"true":"false",children:[t.jsx(Nr,{user:e.user?e.user:Ke}),t.jsxs("div",{style:{flex:1},children:[t.jsx(Sr,{username:w,date:e.date.time,DATE_CONFIG:c}),t.jsx("p",{className:"comment-text",children:p}),o?.username.toLowerCase()!==S.toLowerCase()&&t.jsx(Er,{onReply:()=>s(e.id),onFlag:()=>r(e.id)}),n===e.id&&o&&t.jsx(_1,{replyingTo:n,commentRef:A,addReply:_,user:o,path:a,CAPTCHA_KEY_V2:i,closeForm:()=>s("")}),l.reply.length>0&&t.jsxs("div",{className:"comment-replies",children:[l.reply.map(E=>t.jsx(S1,{user:o,reply:E,replyingTo:w,onFlag:r,DATE_CONFIG:c},E.id)),u?t.jsx("div",{style:{marginLeft:"4rem",position:"relative"},children:t.jsx(Je,{})}):l.morereply&&t.jsx("button",{className:"comment-replies-button reply-button",onClick:async()=>{const E=l.reply[l.reply.length-1]?.id;f(!0);try{const k=await Mn({publication:g??"",path:a??"",size:2,sizereply:2,id:e.id,lastid:E,state:"5,6",apiToken:m??""});f(!1),d({morereply:k.morecomment,reply:[...l.reply,...k.comments]})}catch(b){throw f(!1),new Error(`Error al obtener comentarios: ${b}`)}},children:"Más Respuestas"})]})]})]})})},E1=({commentRef:e,user:n,path:a,addComment:o,CAPTCHA_KEY_V2:s})=>{const[r,i]=I.useState(!0),[c,h]=I.useState("");return t.jsxs("div",{className:"comment-form",children:[t.jsx(Ir,{commentRef:e,captchaToken:c,setIsDisabled:i}),t.jsx(Tr,{CAPTCHA_KEY_V2:s,commentRef:e,captchaToken:c,setCaptchaToken:h,children:t.jsx(kr,{onClick:async l=>{if(r)return;const d=await xr({path:a,ref:e,captchaToken:c,button:l.currentTarget,user:n,addComment:o});return d&&typeof d=="number"?(e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${ft}`),i(!0),setTimeout(()=>{e.current?.parentElement&&(e.current.parentElement.dataset.text=`0/${ft}`),i(!0)},d),!0):!1},isDisabled:r})})]})},{PUBLIC_PUBLICATION_ID:I1,PUBLIC_X_SECURITY_TOKEN:T1}=K(),Ur=I1??"",k1=({isAuthenticated:e,path:n,user:a,handleLogout:o,COMMENTS_VARS:s,DATE_CONFIG:r})=>{const i=n.replaceAll("/","|"),[c,h]=I.useState(void 0),[l,d]=I.useState(""),{comments:u,setComments:f}=C1(i),[g,m]=I.useState(!1),p=I.useRef(null),A=q=>{d(l===q?"":q)},w=q=>{f(u?{...u,comments:[q,...u.comments??[]]}:void 0)},S=q=>{h(q)},_=async()=>{if(!u||!u.morecomment||u.comments.length===0)return;const q=u.comments[u.comments.length-1];if(!q)return;m(!0);const G=q.id;try{const X=await Mn({publication:Ur,path:i??"",size:5,sizereply:2,id:void 0,lastid:G,state:"5,6",apiToken:T1});f({morecomment:X.morecomment??!1,comments:[...u.comments,...X.comments]}),m(!1)}catch(X){throw m(!1),new Error(`Error al obtener comentarios: ${X}`)}},E=u?.comments&&u.comments.length>0,b=E?"Comparte tu opinión de este artículo.":"Se el primero en compartir tu opinión de este artículo.",k=t.jsx("div",{style:{display:"flex",width:"100%",justifyContent:"center"},children:t.jsx(Je,{})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"comments-container",children:t.jsx(me,{title:E||e?"COMENTARIOS":!1,children:t.jsxs(t.Fragment,{children:[e&&a&&t.jsxs("div",{className:"comments-header",children:[t.jsx(zd,{user:a,handleLogout:o,message:b}),t.jsx(E1,{commentRef:p,user:a,addComment:w,path:i,CAPTCHA_KEY_V2:s.CAPTCHA_KEY_V2})]}),u?u.comments&&u.comments.length>0?t.jsxs("div",{className:"comments-list","data-isauthenticated":`${e}`,children:[u.comments.map(q=>t.jsx(N1,{comment:q,replyingTo:l,handleReplyingTo:A,onFlag:S,user:a??Ke,path:i,DATE_CONFIG:r,CAPTCHA_KEY_V2:s.CAPTCHA_KEY_V2},q.id)),g&&k]}):null:k,u?.morecomment&&!g&&t.jsx("button",{className:"comment-replies-button",onClick:_,children:"Más"})]})})}),t.jsx(p1,{username:a?.username??void 0,publication:Ur,commentId:c,isOpen:c!==void 0,onClose:()=>h(void 0),CAPTCHA_KEY_V2:s.CAPTCHA_KEY_V2})]})},x1=async(e,n)=>{if(!e)throw new Error("No action provided");if(!n)throw new Error("No site key provided");const a=window.grecaptcha;if(!a?.enterprise)throw new Error("grecaptcha not loaded");return new Promise((o,s)=>{a.enterprise.ready(async()=>{try{const r=await a.enterprise.execute(n,{action:e});if(!r)throw new Error("Captcha token no generado");o(r)}catch(r){s(r)}})})},Lr={email:{label:"Email",required:!0},given_name:{label:"Nombre",required:!0},family_name:{label:"Apellido",required:!0},password:{label:"Contraseña",required:!0},confirmPassword:{label:"Confirmar contraseña",required:!0}},jn=[{label:"La contraseña debe tener al menos 8 caracteres",test:e=>e.length>=8},{label:"Usa un número",test:e=>/\d/.test(e)},{label:"Usa una letra minúscula",test:e=>/[a-z]/.test(e)},{label:"Usa una letra mayúscula",test:e=>/[A-Z]/.test(e)},{label:"Usa un símbolo",test:e=>/[^A-Za-z0-9]/.test(e)}];function U1({goToLogin:e,handleGoogleLogin:n,CAPTCHA_KEY:a}){const[o,s]=I.useState({}),[r,i]=I.useState(!1),[c,h]=I.useState(!1),[l,d]=I.useState(null),[u,f]=I.useState("register"),g=(w,S)=>{s(_=>({..._,[w]:S}))},m=async w=>{w.preventDefault(),d(null),h(!0);try{const S=Object.keys(Lr).filter(G=>!["username","password","confirmPassword"].includes(G)).map(G=>({Name:G,Value:o[G]}));if(S.some(G=>{if(!G.Value||G.Value.trim()==="")return!0}))return h(!1),d("Complete todos los campos");if(o.password!==o.confirmPassword){d("Las contraseñas no coinciden");return}const _=o.password||"";if(jn.some(G=>!G.test(_))){d("La contraseña no es válida");return}const b=Math.floor(Date.now()/1e3);S.push({Name:"updated_at",Value:String(b)});const k="token",q=await fetch("/api/auth/create-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:o.email,password:o.password,userAttributes:S,token:k})});if(!q.ok){const G=await q.json().catch(()=>({}));if(G.code==="UsernameExistsException"){await fetch("/api/auth/resend-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:o.email})}),f("confirm");return}throw new Error(G?.error||"Error al crear usuario")}f("confirm")}catch(S){console.log(S),d(S?.message||S?.error||"Error inesperado")}finally{h(!1)}},p=async w=>{if(w.preventDefault(),!o.confirmationCode){d("Debes ingresar el código de verificación");return}d(null),h(!0);try{const S=await fetch("/api/auth/confirm-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:o.email,code:o.confirmationCode})});if(!S.ok){const _=await S.json().catch(()=>({}));throw new Error(_?.error||"Error al confirmar usuario")}f("success")}catch(S){d(S?.message||"Error inesperado")}finally{h(!1)}},A=o.password||"";return t.jsxs(t.Fragment,{children:[u==="register"&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:n,className:x.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:x.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:x.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:m,className:x.form,"data-error":l?"true":"false",children:[t.jsx("ul",{className:x.formUl,children:Object.entries(Lr).map(([w,{label:S}])=>t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:S}),t.jsx("input",{type:w.toLowerCase().includes("password")?r?"text":"password":w==="birthdate"?"date":w==="email"?"email":w==="phone_number"?"tel":"text",name:w,value:o[w]||"",onChange:_=>g(w,_.target.value),className:x.input,placeholder:""}),w==="password"&&t.jsx("div",{className:x.passwordChecker,children:jn.map((_,E)=>{const b=_.test(A);return t.jsxs("div",{className:b?x.valid:x.invalid,children:[t.jsx("div",{children:b?"✔":"○"}),t.jsx("div",{children:_.label})]},E)})}),w==="confirmPassword"&&t.jsxs("div",{className:x.checkboxRow,children:[t.jsx("input",{id:"showPasswordRegister",type:"checkbox",checked:r,onChange:_=>i(_.target.checked)}),t.jsx("label",{htmlFor:"showPasswordRegister",className:x.checkboxLabel,children:"Mostrar contraseñas"})]})]},w))}),l&&t.jsx("p",{className:x.error,children:l}),t.jsxs("p",{className:x.terms,children:["Al continuar, confirmo que he leído y aceptado los",t.jsx("a",{href:"/pages/politicas-de-privacidad.html",target:"_blank",children:"Términos y Condiciones"}),"de nuestra comunidad"]}),t.jsx("button",{type:"submit",className:x.primary,disabled:c,children:c?t.jsx(Je,{}):"Crear cuenta"})]})]}),u==="confirm"&&t.jsxs("form",{onSubmit:p,className:x.form,"data-error":l?"true":"false",children:[t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:"Código de verificación"}),t.jsx("input",{type:"text",name:"confirmationCode",value:o.confirmationCode||"",onChange:w=>g("confirmationCode",w.target.value),className:x.input,required:!0})]}),l&&t.jsx("p",{className:x.error,children:l}),t.jsx("button",{type:"submit",className:x.primary,disabled:c,children:c?t.jsx(Je,{}):"Confirmar cuenta"}),t.jsxs("p",{className:x.switch,children:["¿Ya confirmaste antes?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]}),u==="success"&&t.jsxs("form",{className:x.form,children:[t.jsxs("div",{className:x.successContainer,children:[t.jsx("div",{className:x.thumbsUp,children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:132,height:120,fill:"none",children:t.jsx("path",{fill:"#0073BE",d:"M119.249 42.357H81.915l5.621-27.039.177-1.893a8.906 8.906 0 0 0-2.603-6.272L78.838.941 39.907 39.93c-2.19 2.13-3.491 5.089-3.491 8.343v59.167c0 6.508 5.325 11.833 11.833 11.833h53.25c4.911 0 9.112-2.958 10.887-7.218l17.868-41.713c.533-1.36.829-2.78.829-4.32V54.192c0-6.509-5.325-11.834-11.834-11.834Zm0 23.667-17.75 41.417h-53.25V48.274l25.679-25.678L67.36 54.19h51.889v11.833ZM.916 48.274h23.667v71H.916v-71Z"})})}),t.jsxs("div",{className:x.successMessage,children:[t.jsx("p",{children:"Confirmación completa."}),t.jsx("p",{children:"Ya eres parte de la comunidad!"})]})]}),t.jsx("button",{onClick:e,className:x.primary,children:"Iniciar sesión"})]}),u==="register"&&t.jsxs("p",{className:x.switch,children:["¿Ya tenés cuenta?",t.jsx("button",{type:"button",onClick:e,children:"Iniciar sesión"})]})]})}function L1({onClose:e,checkAuth:n,goToRegister:a,handleGoogleLogin:o,CAPTCHA_KEY:s}){const[r,i]=I.useState("login"),[c,h]=I.useState(""),[l,d]=I.useState(""),[u,f]=I.useState(""),[g,m]=I.useState(""),[p,A]=I.useState(""),[w,S]=I.useState(!1),[_,E]=I.useState(!1),[b,k]=I.useState(null);console.log("CAPTCHA_KEY",s);const q=async H=>{if(!_){H.preventDefault(),k(null),E(!0);try{console.log(!0,s);const M="token",ee=await fetch("/api/auth/login-password",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:c,password:l,token:M})});if(!ee.ok){const ie=await ee.json().catch(()=>({}));throw new Error(ie?.error||"Ha ocurrido un error")}e(),await n()}catch(M){k(M?.message||"Error inesperado")}finally{E(!1)}}},G=async H=>{if(!_){H.preventDefault(),k(null),E(!0);try{const M=await fetch("/api/auth/forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c})});if(!M.ok){const ee=await M.json().catch(()=>({}));throw new Error(ee?.error||"Error al enviar código")}d(""),i("changePassword")}catch(M){k(M?.message||"Error inesperado")}finally{E(!1)}}},X=async H=>{if(_)return;if(H.preventDefault(),g!==p){k("Las contraseñas no coinciden");return}if(jn.some(ee=>!ee.test(g))){k("La contraseña no cumple con los requisitos");return}k(null),E(!0);try{const ee=await fetch("/api/auth/confirm-forgot-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c,code:u,newPassword:g})});if(!ee.ok){const ie=await ee.json().catch(()=>({}));throw new Error(ie?.error||"Error al cambiar contraseña")}i("feedback")}catch(ee){k(ee?.message||"Error inesperado")}finally{E(!1)}};return t.jsxs(t.Fragment,{children:[r==="login"&&t.jsx(q1,{email:c,password:l,showPassword:w,loading:_,error:b,setEmail:h,setPassword:d,setShowPassword:S,onSubmit:q,onForgot:()=>{k(null),i("forgot")},onRegister:a,handleGoogleLogin:o}),r==="forgot"&&t.jsx(B1,{email:c,setEmail:h,loading:_,error:b,onSubmit:G,onBack:()=>{k(null),i("login")}}),r==="changePassword"&&t.jsx(P1,{email:c,confirmationCode:u,newPassword:g,confirmNewPassword:p,showPassword:w,loading:_,error:b,setConfirmationCode:f,setNewPassword:m,setConfirmNewPassword:A,setShowPassword:S,onSubmit:X,onBack:()=>{k(null),i("forgot")}}),r==="feedback"&&t.jsx(O1,{onBackToLogin:()=>{k(null),i("login")}})]})}function q1({email:e,password:n,showPassword:a,loading:o,error:s,setEmail:r,setPassword:i,setShowPassword:c,onSubmit:h,onForgot:l,onRegister:d,handleGoogleLogin:u}){return t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:u,className:x.google,children:[t.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"",className:x.googleIcon}),t.jsx("span",{children:"Continuar con Google"})]}),t.jsx("div",{className:x.divider,children:t.jsx("span",{children:"o"})}),t.jsxs("form",{onSubmit:h,className:x.form,"data-error":s?"true":"false",children:[t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:f=>r(f.target.value),className:x.input,placeholder:""})]}),t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:"Contraseña"}),t.jsx("input",{type:a?"text":"password",value:n,onChange:f=>i(f.target.value),className:x.input,placeholder:""}),t.jsxs("div",{className:x.checkboxRow,children:[t.jsx("input",{id:"showPasswordLogin",type:"checkbox",checked:a,onChange:f=>c(f.target.checked)}),t.jsx("label",{htmlFor:"showPasswordLogin",className:x.checkboxLabel,children:"Mostrar contraseña"})]})]}),s&&t.jsx("p",{className:x.error,children:s}),t.jsx("button",{type:"submit",className:x.primary,disabled:o,children:o?t.jsx(Je,{}):"Iniciar Sesión"})]}),t.jsxs("p",{className:x.switch,children:["¿No tenés cuenta?",t.jsx("button",{type:"button",onClick:d,children:"Registrate"})]}),t.jsx("button",{type:"button",className:x.forgotPassword,onClick:l,children:"Olvidé mi contraseña"})]})}function B1({email:e,setEmail:n,loading:a,error:o,onSubmit:s,onBack:r}){return t.jsxs("form",{onSubmit:s,className:x.form,"data-error":o?"true":"false",children:[t.jsx("p",{className:x.message,children:"Ingrese su dirección de correo electrónico. Le enviaremos un mensaje con un código para restablecer la contraseña."}),t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:"Email"}),t.jsx("input",{type:"email",value:e,name:"email",onChange:i=>n(i.target.value),className:x.input,placeholder:""})]}),o&&t.jsx("p",{className:x.error,children:o}),t.jsx("button",{type:"submit",className:x.primary,disabled:a,children:a?t.jsx(Je,{}):"Enviar código"}),t.jsx("p",{className:x.switch,children:t.jsx("button",{type:"button",onClick:r,children:"Volver"})})]})}function P1({email:e,confirmationCode:n,newPassword:a,confirmNewPassword:o,showPassword:s,loading:r,error:i,setConfirmationCode:c,setNewPassword:h,setConfirmNewPassword:l,setShowPassword:d,onSubmit:u,onBack:f}){return t.jsxs("form",{onSubmit:u,className:x.form,"data-error":i?"true":"false",children:[t.jsxs("p",{className:x.message,children:["Hemos enviado un código de restablecimiento de contraseña en un mensaje de Correo electrónico a ",Kd(e),". Ingrese el código y la contraseña nueva."]}),t.jsxs("ul",{className:x.formUl,children:[t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:"Código de verificación"}),t.jsx("input",{type:"text",value:n,onChange:g=>c(g.target.value),className:x.input,placeholder:""})]}),t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:"Nueva contraseña"}),t.jsx("input",{type:s?"text":"password",value:a,onChange:g=>h(g.target.value),className:x.input,placeholder:"",name:"password"}),t.jsx("div",{className:x.passwordChecker,children:jn.map((g,m)=>{const p=g.test(a);return t.jsxs("div",{className:p?x.valid:x.invalid,children:[t.jsx("div",{children:p?"✔":"○"}),t.jsx("div",{children:g.label})]},m)})})]}),t.jsxs("div",{className:x.field,children:[t.jsx("label",{className:x.label,children:"Confirmar contraseña"}),t.jsx("input",{type:s?"text":"password",value:o,onChange:g=>l(g.target.value),className:x.input,placeholder:""}),t.jsxs("div",{className:x.checkboxRow,children:[t.jsx("input",{id:"showPasswordForgot",type:"checkbox",checked:s,onChange:g=>d(g.target.checked)}),t.jsx("label",{htmlFor:"showPasswordForgot",className:x.checkboxLabel,children:"Mostrar contraseñas"})]})]})]}),i&&t.jsx("p",{className:x.error,children:i}),t.jsx("button",{type:"submit",className:x.primary,style:{maxWidth:r?"revert-layer":"fit-content"},disabled:r,children:r?t.jsx(Je,{}):"Cambiar contraseña"}),t.jsx("p",{className:x.switch,children:t.jsx("button",{type:"button",onClick:f,children:"Volver"})})]})}function O1({onBackToLogin:e}){return t.jsxs("div",{className:x.form,children:[t.jsx("p",{className:x.success,children:"La contraseña fue cambiada con éxito"}),t.jsx("button",{type:"button",className:x.primary,onClick:e,children:"Iniciar Sesión"})]})}function D1({loginUrl:e,onClose:n,checkAuth:a,icon:o,COMMENTS_VARS:s}){const[r,i]=I.useState("login"),c=async()=>{if(!e)return;const h=encodeURIComponent(window.location.pathname);window.location.href=`/api/auth/login?redirect=${h}`};return t.jsx("div",{className:x.overlay,role:"dialog","aria-modal":"true",id:"pop-overlay",onClick:h=>{const l=h.target;l&&l.id==="pop-overlay"&&n()},children:t.jsxs("div",{className:x.card,children:[t.jsxs("header",{className:x.header,children:[t.jsx("div",{className:x.logo,children:o?o():null}),t.jsx("button",{onClick:n,className:x.close,"aria-label":"Cerrar",children:t.jsx(bt,{})})]}),r==="login"&&t.jsx(L1,{onClose:n,checkAuth:a,handleGoogleLogin:c,goToRegister:()=>i("register"),CAPTCHA_KEY:s.CAPTCHA_KEY}),r==="register"&&t.jsx(U1,{handleGoogleLogin:c,goToLogin:()=>i("login"),CAPTCHA_KEY:s.CAPTCHA_KEY})]})})}function M1({isAuthenticated:e,setIsAuthenticated:n,loginUrl:a,user:o,path:s,checkAuth:r,icon:i,COMMENTS_VARS:c,DATE_CONFIG:h}){const[l,d]=I.useState(!1),u=async()=>{{const g=window.location.pathname;window.location.href=`${window.location.origin}/api/auth/logout?redirect=${encodeURIComponent(g)}`}},f=async g=>{g.preventDefault(),a&&d(!0)};return t.jsxs(t.Fragment,{children:[l&&t.jsx(D1,{loginUrl:a,icon:i,checkAuth:r,COMMENTS_VARS:c,onClose:()=>{d(!1)}}),!e&&t.jsxs("div",{className:"auth-container",children:[t.jsx("p",{children:"Sumate a la comunidad para dejar tu comentario"}),t.jsx("a",{href:a,onClick:f,className:"login-button",children:"Iniciar Sesión"})]}),t.jsx(k1,{isAuthenticated:e,handleLogout:u,path:s,user:e?o:void 0,COMMENTS_VARS:c,DATE_CONFIG:h})]})}function j1({isVisible:e,path:n,icon:a,COMMENTS_VARS:o,DATE_CONFIG:s}){const[r,i]=I.useState(null),[c,h]=I.useState(null),l=o?.COGNITO_AUTH_PREFIX??"ASTRO_",d=I.useCallback(async()=>{if(e){if(console.log(l),document.cookie.search(l+"IS_AUTH=true")===-1){i(!1),h(null),console.log("user not logged");return}try{const m=await(await fetch("/api/auth/user",{credentials:"include"})).json();i(m.isAuthenticated??!1),h(m.user??null)}catch(g){console.error("Error checking auth:",g),i(!1),h(null)}}},[e,l]);I.useEffect(()=>{d()},[d,e]),I.useEffect(()=>{if(!c||!e||typeof window>"u")return;const g=window;if(typeof g!="function"){console.warn("gtag no está disponible todavía");return}g.gtag("set",{user_id:c.username}),console.log("username setted successfully")},[c,e]);const u="/api/auth/login",f=t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:310,position:"relative"},children:t.jsx(Je,{})});return r===null?f:e?t.jsx(M1,{icon:a,isAuthenticated:r,setIsAuthenticated:i,loginUrl:u,user:c??void 0,checkAuth:d,path:n,COMMENTS_VARS:o,DATE_CONFIG:s}):f}const $1=({render:e,internalPath:n,section:a,currentNews:o,stylesConfig:s,icon:r,isVisibleDefault:i=!1,paths:c,COMMENTS_VARS:h,API_ENV:l,DATE_CONFIG:d={PUBLIC_LNG:"es",DATE_TIMEZONE:"America/Mexico_City"}})=>{const u=I.useRef(null),[f,g]=I.useState(i);I.useEffect(()=>{if(i||f)return;const p=new IntersectionObserver(([A])=>{A?.isIntersecting&&(g(!0),p.disconnect())},{rootMargin:"0px",threshold:.1});return u.current&&p.observe(u.current),()=>p.disconnect()},[]);const m={comment:t.jsx(j1,{path:n,icon:r,isVisible:f,COMMENTS_VARS:h,DATE_CONFIG:d}),more:t.jsx(Qd,{section:a,currentNews:o,stylesConfig:s,isVisible:f,paths:c,API_ENV:l})};return t.jsx("div",{ref:u,suppressHydrationWarning:!0,style:{...s?s["Modulo 1x3 Client"]?s["Modulo 1x3 Client"]:s["Modulo 1x3"]:{}},children:m[e]})};async function Q1({publication:e,path:n,username:a,comment:o,id:s,recaptchaResponse:r,baseUrl:i,apiToken:c,securityToken:h,COMMENTS_VARS:l}){if(console.log("Adding comment with data:",{publication:e,path:n,username:a,comment:o,id:s,recaptchaResponse:r}),!e||!n||!o||!a)return{type:"error",message:"Faltan campos obligatorios. Por favor, completa todos los campos.",status:400};if([e,n,o,a].some(m=>typeof m!="string"))return{type:"error",message:"Datos inválidos. Intenta de nuevo.",status:400};if(!a.trim())return{type:"error",message:"El nombre no puede estar vacío.",status:400};if(!o.trim())return{type:"error",message:"El comentario no puede estar vacío.",status:400};const d=await cr(r,l);if(console.log("Verifying captcha token...",d),!d)return{type:"error",message:"Captcha inválido. Intenta nuevamente.",status:403};const u=`${i}/system/modules/com.tfsla.diario.base/templates/hit/5.0/1/newcomments/add`,f={publication:e,path:n.replace(/\|/gi,"/"),username:a??!1,text:o.trim()};s&&(f.id=s);const g=new URLSearchParams(f);try{const{data:m}=await oe.get(`${u}?${g.toString()}`,{headers:{"Content-Type":"application/json","x-security-token":h,"x-api-token":c,"User-Agent":"amplifyapp-comments-saas"}});return!m||m.error?(console.error("CMS error response:",m),{type:"error",message:"No se pudo guardar el comentario. Intenta nuevamente en unos minutos.",status:502}):(console.log("Comentario enviado con éxito",m),{type:"success",message:"Comentario enviado con éxito.",status:200})}catch(m){if(console.error("Error enviando comentario:",m),oe.isAxiosError(m)){const p=m.response?.status??500,A=m.response?.data;return p===400?{type:"error",message:A?.message||"Solicitud inválida. Verifica que los campos sean correctos.",status:400}:p===403?{type:"error",message:"Captcha inválido o acceso prohibido.",status:403}:p===500?{type:"error",message:"Error interno del servidor del CMS.",status:500}:{type:"error",message:A?.message||"No se pudo enviar el comentario.",status:p}}return{type:"error",message:"Error inesperado. Intenta nuevamente.",status:500}}}const G1=async({token:e,projectId:n,captchaKey:a,apiKey:o,captchaAction:s})=>{if(!e)throw new Error("No token provided");if(!n||!a||!o)throw new Error("Missing project ID or site key");if(!s)throw new Error("No action provided");try{const i=await(await fetch(`https://recaptchaenterprise.googleapis.com/v1/projects/${n}/assessments?key=${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:{token:e,siteKey:a,expectedAction:s}})})).json();if(!i?.tokenProperties?.valid)throw new Error(`The token was: ${i?.tokenProperties?.invalidReason}`);if(i.tokenProperties.action!==s)throw new Error("The action attribute in your reCAPTCHA tag does not match the action you are expecting to score");return i?.riskAnalysis?.score??0}catch(r){throw console.error("Recaptcha verification failed",r),new Error(String(r))}};C.AssetsPreconnect=oo,C.AutorComponent=qd,C.AutorHeader1=Ss,C.AutorHeader2=Ns,C.BannerAdvertising=ge,C.BannerAdvertisingMiddle=$e,C.CarrouselCSR=Vc,C.CarrouselIRS=it,C.CarruselCard=Fs,C.CarruselOpinion=Vs,C.CommonServices=Xe,C.Comscore=$a,C.ContactInfoServer=Gl,C.ContactInput=Cl,C.ContactSelect=bl,C.ContactTextarea=vl,C.ContentLayout1=Ct,C.ContentLayoutTema=la,C.DEBUG_MainSlots=Td,C.DestacadoNoticias=Os,C.DestacadoVideos=Gs,C.DynamicBlockServices=as,C.DynamicComponents=Id,C.DynamicMainSlot=Ln,C.DynamicSlot=Un,C.EditorialBlock=Ol,C.ErrorComponent=wl,C.Font=go,C.Footer=hl,C.FormatAfterScripts=ao,C.FormatScripts=Fn,C.GA4=Qa,C.GTM=Ga,C.GalleryHeader=Js,C.GenerateBody=Qc,C.GenerateHead=$c,C.Header=xl,C.IframeHeader=er,C.ImageOffline=fs,C.ImageOnline=Se,C.ImageOnlineClient=us,C.IssuuServices=Oc,C.ItemListSchema=lo,C.JournalistArticule2=Us,C.JournalistGroup=Ls,C.LayoutNewsComponent=ha,C.LazyLoader=$1,C.LinkComponent=O,C.LiveBlogHeader=vs,C.Location=zc,C.MainComponentServices=ui,C.Marfeel=Ha,C.MiddleSection=Re,C.Modulo1x3=Aa,C.Modulo1x3Card=zs,C.Modulo1x4=$s,C.Modulo1x5=Qs,C.Modulo2Columnas=Dl,C.Modulo3Columnas=Ms,C.ModuloNewsletter=Ml,C.ModuloOpinion=Pl,C.NewListResponseDataPH=rr,C.NewsArticle=ho,C.NewsComponent=xd,C.NewsContent=Cn,C.NewsDescriptionComponent=ct,C.NextPrev=Dt,C.OrgList=uo,C.PreloadImages=Wn,C.REPORT_REASONS=je,C.Readest=gn,C.ScriptHydrator=Md,C.SearchSection=Ld,C.Section=me,C.SectionCard=De,C.SectionCard2=jt,C.SectionCardServerComponent=Tn,C.SectionServerComponent=Ql,C.ShowSection=rs,C.SocialNetworks=Ks,C.SpeculationRules=co,C.StaticSlotWrapper=Ed,C.SubscribeColumn=As,C.SubscribeRow=ys,C.SubscribeWhatsAppColumn=nl,C.TagHeader=Ul,C.TagSection=xs,C.TimeLine=_s,C.TrimPathname=oi,C.VideoBlock3=yl,C.VideoBlock4=Nl,C.VideoEmbeddedHeader=Xs,C.VideoSection=Dd,C.VideoYoutubeHeader=Rs,C.VideosSchemas=mo,C.WebsiteList=fo,C.addComment=Q1,C.bannersReplace=Rt,C.becomeVideoObject=gt,C.buildTagUrl=Ze,C.coloringByStrokeSVGs=dl,C.compileStyleProps=xn,C.cutString=Ue,C.extractRealtedNews=ti,C.formatDate=xe,C.formatDateEdiciones=ei,C.formatDateJournalistArticule=Gn,C.formatDateTimeline=Ja,C.formatNewsMeta=Ra,C.formatVideoData=so,C.generalGetData=jc,C.getCaptchaToken=x1,C.getComments=_r,C.getConfig=K,C.getDynamicSlots=Dc,C.getEnvironmentUrl=pt,C.getEnvironmentUrlFront=Xa,C.getHydratorPath=ci,C.getImageUrl=de,C.getNextMeta=Tt,C.getPage=xt,C.getPlayIcon=mn,C.getPreloadImages=hi,C.getPrevMeta=kt,C.getReportReasonLabel=Vd,C.getResponse=Hn,C.getResponsePromise=Za,C.getSchemas=en,C.getScriptReplaces=Yn,C.getSlugs=Ao,C.getTypeOfNews=ri,C.getVideoRealPath=ii,C.handleGetComments=Mn,C.initLibrary=Or,C.metadataToJSX=no,C.metadata_defaults=os,C.parseTags=zn,C.pathnameSplit=eo,C.processExtractedRelatedNews=ni,C.removePages=po,C.reportComment=Fd,C.shareButtons=ws,C.socialIcons=yn,C.speculationRules=io,C.speculationRulesHome=ro,C.urlReplaces=to,C.usePlayIcon=ra,C.verifyCaptchaTokenEnterprise=G1,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sass-template-common",
3
- "version": "0.3.25",
3
+ "version": "0.3.26",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"