@everymatrix/blog-articles-grid 1.99.45 → 1.99.46

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.
@@ -1 +1 @@
1
- import{p as e,b as t}from"./index-6b3cf3ac.js";export{s as setNonce}from"./index-6b3cf3ac.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t([["blog-articles-grid_2",[[1,"blog-articles-grid",{cmsEndpoint:[513,"cms-endpoint"],language:[513],translationUrl:[513,"translation-url"],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],showPublishingDate:[516,"show-publishing-date"],showBlogSubcategories:[516,"show-blog-subcategories"],hideCategory:[513,"hide-category"],showImage:[516,"show-image"],showTitle:[516,"show-title"],showPageTitle:[516,"show-page-title"],useCategoryMetadataTitle:[516,"use-category-metadata-title"],hideEmptyCategories:[516,"hide-empty-categories"],showBreadcrumb:[516,"show-breadcrumb"],showContent:[516,"show-content"],showButton:[516,"show-button"],hideError:[516,"hide-error"],usePostmessage:[516,"use-postmessage"],postMessageEvent:[513,"post-message-event"],blogsLimit:[513,"blogs-limit"],paginationActive:[516,"pagination-active"],arrowsActive:[516,"arrows-active"],secondaryArrowsActive:[516,"secondary-arrows-active"],numberedNavActive:[516,"numbered-nav-active"],intlDateTimeFormat:[513,"intl-date-time-format"],page:[1537],category:[513],pageQueryParam:[1,"page-query-param"],eventId:[513,"event-id"],paginationBlogList:[32],currentPage:[32],hasErrors:[32],isLoading:[32],bannerMatrixReady:[32],nextPage:[32],previousPage:[32],device:[32],displayedBlogResponse:[32],paginationBlogResponse:[32],allBlogResponse:[32],totalBlogs:[32],customTranslations:[32],selectedCategory:[32],categories:[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{hasErrors:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],blogsLimit:["watchEndpoint"],eventId:["watchEndpoint"],page:["handlePageChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["loadTranslations"]}],[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],mbSource:[1,"mb-source"],clientStyling:[1537,"client-styling"],clientStylingUrl:[1537,"client-styling-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],pageQueryParam:[1,"page-query-param"],page:[2],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],e))));
1
+ import{p as e,b as t}from"./index-6b3cf3ac.js";export{s as setNonce}from"./index-6b3cf3ac.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t([["blog-articles-grid_2",[[1,"blog-articles-grid",{cmsEndpoint:[513,"cms-endpoint"],language:[513],translationUrl:[513,"translation-url"],userRoles:[513,"user-roles"],cmsEnv:[513,"cms-env"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],showPublishingDate:[516,"show-publishing-date"],showBlogSubcategories:[516,"show-blog-subcategories"],hideCategory:[513,"hide-category"],showImage:[516,"show-image"],showTitle:[516,"show-title"],showPageTitle:[516,"show-page-title"],useCategoryMetadataTitle:[516,"use-category-metadata-title"],hideEmptyCategories:[516,"hide-empty-categories"],showBreadcrumb:[516,"show-breadcrumb"],showContent:[516,"show-content"],showButton:[516,"show-button"],hideError:[516,"hide-error"],usePostmessage:[516,"use-postmessage"],postMessageEvent:[513,"post-message-event"],blogsLimit:[513,"blogs-limit"],paginationActive:[516,"pagination-active"],arrowsActive:[516,"arrows-active"],secondaryArrowsActive:[516,"secondary-arrows-active"],numberedNavActive:[516,"numbered-nav-active"],paginationPosition:[513,"pagination-position"],intlDateTimeFormat:[513,"intl-date-time-format"],page:[1537],category:[513],pageQueryParam:[1,"page-query-param"],eventId:[513,"event-id"],paginationBlogList:[32],currentPage:[32],hasErrors:[32],isLoading:[32],bannerMatrixReady:[32],nextPage:[32],previousPage:[32],device:[32],displayedBlogResponse:[32],paginationBlogResponse:[32],allBlogResponse:[32],totalBlogs:[32],customTranslations:[32],selectedCategory:[32],categories:[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{hasErrors:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],blogsLimit:["watchEndpoint"],eventId:["watchEndpoint"],page:["handlePageChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["loadTranslations"]}],[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],mbSource:[1,"mb-source"],clientStyling:[1537,"client-styling"],clientStylingUrl:[1537,"client-styling-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],pageQueryParam:[1,"page-query-param"],page:[2],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],e))));
@@ -1 +1 @@
1
- import{r as t,c as i,h as n}from"./index-6b3cf3ac.js";const e={en:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},ro:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},fr:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},ar:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},hu:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},hr:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},"pt-br":{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},"es-mx":{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."}},o=(t,i,n)=>{var o;const s=null!=i?i:"en",a=null===(o=null==n?void 0:n[s])||void 0===o?void 0:o[t];return"string"==typeof a?a:e[s in e?s:"en"][t]},s=t=>t.toLowerCase().replace(/[\s\/`~@\$%\^&\*\(\)_\+\[\]\\\{\}\|;':",\.<>\?#–]/g,"-").replace(/-{2,}/g,"-").replace(/^-|-$/g,""),a="__WIDGET_GLOBAL_STYLE_CACHE__";function r(t,i){if(t){const n=document.createElement("style");n.innerHTML=i,t.appendChild(n)}}function h(t,i){if(!t||!i)return;const n=new URL(i);fetch(n.href).then((t=>t.text())).then((i=>{const n=document.createElement("style");n.innerHTML=i,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function l(t,i,n,e=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!e)return n=function(t,i){const n=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(n.innerHTML=i,t.appendChild(n))}))}(t,i),n;window[a]||(window[a]={}),n=function(t,i){return window.emMessageBus.subscribe(i,(n=>{if(!t)return;const e=t.getRootNode(),o=window[a];let s=o[i]&&o[i].sheet;s?o[i].refCount=o[i].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),o[i]={sheet:s,refCount:1});const r=e.adoptedStyleSheets||[];r.includes(s)||(e.adoptedStyleSheets=[...r,s])}))}(t,i);const o=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[a][i]){const t=window[a][i];t.refCount>1?t.refCount=t.refCount-1:delete window[a][i]}o()},n}function d(t){return t.includes("android")}const g="all",c=class{constructor(e){t(this,e),this.articleActionButton=i(this,"articleActionButton",7),this.lastPage=1,this.isInitialized=!1,this.paginationDefaultStyling="\n nav#PaginationContainer {\n justify-content: right;\n }\n .LeftItems .PaginationControl .NavigationButton {\n display: none;\n }\n .LeftItems .PaginationControl:after, .RightItems .PaginationControl:after {\n padding: 7px 12px;\n font-size: 18px;\n font-weight: 700;\n line-height: 46px;\n }\n .LeftItems .PaginationControl:after {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E\");\n }\n .RightItems .PaginationControl:after {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E\");\n display: block;\n height: 38px;\n }\n div.LeftItems .PaginationControl, div.RightItems .PaginationControl {\n width: unset;\n height: 40px;\n background-color: #fff;\n color: #000;\n border: 1px solid #000;\n overflow: hidden;\n &[aria-disabled=\"true\"] {\n background-color: #989898;\n }\n }\n div.LeftItems .PaginationControl {\n min-width: 60px;\n border-radius: 20px 0 0 20px;\n border-right: 0;\n }\n div.RightItems .PaginationControl {\n display: flex;\n min-width: 100px;\n justify-content: space-evenly;\n align-items: center;\n border-radius: 0 20px 20px 0;\n text-transform: none;\n }\n .RightItems .PaginationControl .NavigationButton {\n padding: 12px 0 12px 12px;\n font-weight: 700;\n }",this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?n("p",{class:"BlogContent",innerHTML:t}):null,this.cmsEndpoint=void 0,this.language="en",this.translationUrl="",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showBlogSubcategories=!1,this.hideCategory="",this.showImage=!0,this.showTitle=!0,this.showPageTitle=!1,this.useCategoryMetadataTitle=!1,this.hideEmptyCategories=!1,this.showBreadcrumb=!1,this.showContent=!0,this.showButton=!0,this.hideError=!1,this.usePostmessage=void 0,this.postMessageEvent="",this.blogsLimit="0",this.paginationActive=void 0,this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.intlDateTimeFormat="",this.page="1",this.category=void 0,this.pageQueryParam=void 0,this.eventId=void 0,this.paginationBlogList={offset:0},this.currentPage=0,this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.nextPage="",this.previousPage="",this.device="mobile",this.displayedBlogResponse=void 0,this.paginationBlogResponse=void 0,this.allBlogResponse=void 0,this.totalBlogs=0,this.customTranslations={},this.selectedCategory=g,this.categories=[]}getArticleId(t,i){var n;if(0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e={postId:i.postID.toString(),slug:i.slug,customPath:i.customPath};this.usePostmessage?(t.preventDefault(),window.postMessage(Object.assign({type:this.postMessageEvent},e))):null===(n=this.articleActionButton)||void 0===n||n.emit(e)}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,i){this.isInitialized&&(this.setCurrentPage(this.toPageNumber(this.page)),(t||""===t)&&t!=i&&this.cmsEndpoint&&this.language&&this.getBlogArticleGrid())}handlePageChange(t){if(!this.isInitialized)return;const i=this.toPageNumber(t);String(i)===t?i!==this.currentPage+1&&(this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.getBlogArticleGrid(!0)):this.page=String(i)}handlePopState(){this.pageQueryParam&&(this.page=String(this.toPageNumber(this.getPageFromUrl())))}toPageNumber(t){const i=parseInt(null!=t?t:"",10);return i>0?i:1}setCurrentPage(t){this.currentPage=t-1,this.paginationBlogList=Object.assign(Object.assign({},this.paginationBlogList),{offset:this.currentPage*(parseInt(this.blogsLimit,10)||0)})}getPageFromUrl(){return this.pageQueryParam?new URL(window.location.href).searchParams.get(this.pageQueryParam):null}pushPageToUrl(t){if(!this.pageQueryParam)return;const i=new URL(window.location.href);1===t?i.searchParams.delete(this.pageQueryParam):i.searchParams.set(this.pageQueryParam,String(t)),window.history.pushState(null,"",`${i.pathname}${i.search}${i.hash}`)}handleClientStylingChange(t,i){t!==i&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}async loadTranslations(){if(this.translationUrl)try{const t=await fetch(this.translationUrl);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);this.customTranslations=await t.json()}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}else this.customTranslations={}}hpPageChange(t){const{offset:i,limit:n}=t.detail,e=Math.floor(i/n)+1;e>=1&&e<=this.lastPage&&e!==this.currentPage+1&&(this.announcePage(e),this.page=String(e))}announcePage(t){window.postMessage({type:"BlogArticlesGridActivePagination",currentPage:t-1},window.location.href),this.pushPageToUrl(t)}getCategoryHeading(t){var i,n;return(this.useCategoryMetadataTitle?null===(n=null===(i=null==t?void 0:t.metadata)||void 0===i?void 0:i.title)||void 0===n?void 0:n.replace(/\s*\|[^|]*$/,"").trim():"")||(null==t?void 0:t.name)}getActiveCategory(){return this.categories.find((t=>t.id===this.selectedCategory))}getCategorySlug(t){return s(t.name)}getCategoryFetchSlug(t){return t.slug||s(t.name)}getCategoryHref(t){const i=`/${encodeURIComponent(this.language)}/blog`;return t.id===g?i:`${i}/category/${encodeURIComponent(this.getCategorySlug(t))}`}sortArticlesByDate(t){return t.sort(((t,i)=>t.publishingDate>i.publishingDate?-1:t.publishingDate<i.publishingDate?1:0)),t}findLatestFeatured(t){let i=t.filter((t=>t.isFeaturedPost));return 0===i.length?null:(i=this.sortArticlesByDate(i),i[0])}moveLatestFeatureToStart(t,i){if(!i)return t;const n=t.indexOf(i);return-1!==n&&(t.splice(n,1),t.unshift(i)),t}async fetchBlogPosts(t,i=!1){const n=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);if(this.selectedCategory&&this.selectedCategory!==g){const t=this.categories.find((t=>t.id==this.selectedCategory));t&&n.searchParams.append("category",this.getCategoryFetchSlug(t))}return n.searchParams.append("per_page",i?"300":this.blogsLimit),n.searchParams.append("page",`${t||this.currentPage+1}`),n.searchParams.append("env",this.cmsEnv),n.searchParams.append("userRoles",this.userRoles),n.searchParams.append("device",(()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t){if("PC"===t)return"dk";if("iPad"===t||"iPhone"===t)return"mtWeb"}return"mtWeb"})()),fetch(n.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{let n=t.items;const e=this.findLatestFeatured(n);return n=this.sortArticlesByDate(n),n=this.moveLatestFeatureToStart(n,e),t=Object.assign(Object.assign({},t),{items:n}),i?this.allBlogResponse=t:this.paginationBlogResponse=t,t})).catch((t=>(this.hasErrors=!0,console.log("Error",t),{})))}async fetchCategories(){try{const t=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/category`),i=await fetch(t.href);if(!i.ok)throw new Error("Failed to fetch categories");const n=await i.json(),e=this.hideCategory.split(",").map((t=>t.trim().toLowerCase())).filter(Boolean),o=n.filter((t=>{var i;return!e.includes(null===(i=t.name)||void 0===i?void 0:i.toLowerCase())}));this.categories=[{id:g,name:"All"},...o]}catch(t){console.error("Error fetching categories",t)}}async getBlogArticleGrid(t=!1,i){var n,e,o,s,a,r,h;this.isLoading=!0;try{let l;if(this.eventId&&this.eventId.length>0){const s=(null===(n=this.allBlogResponse)||void 0===n?void 0:n.items)?this.allBlogResponse:await this.fetchBlogPosts(1,!0),a=s.items.filter((({eventIds:t})=>{var i;return t.includes(null!==(i=this.eventId)&&void 0!==i?i:"-")}));a.length?(l=Object.assign(Object.assign({},s),{items:a,total:Math.min(parseInt(this.blogsLimit),a.length)}),window.postMessage({type:"OP:blogReady",payload:{hasBlog:!0}},"*")):(window.postMessage({type:"OP:blogReady",payload:{hasBlog:!1}},"*"),l=(null===(o=null===(e=this.paginationBlogResponse)||void 0===e?void 0:e.items)||void 0===o?void 0:o.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i))}else l=(null===(a=null===(s=this.paginationBlogResponse)||void 0===s?void 0:s.items)||void 0===a?void 0:a.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i);this.displayedBlogResponse=l,this.totalBlogs=l.total,this.lastPage=+((null===(h=null===(r=l.pages.last)||void 0===r?void 0:r.match(/&page=(\d+)/))||void 0===h?void 0:h[1])||1),this.nextPage=l.pages.next,this.previousPage=l.pages.previous,this.isLoading=!1,this.hasErrors=!1,this.emitContent(l.items)}catch(t){this.hasErrors=!0,console.log("Error",t)}}async componentWillLoad(){var t;if(this.cmsEndpoint&&this.language&&(await this.fetchCategories(),this.category)){const t=this.categories.find((t=>t.id!==g&&this.getCategorySlug(t)===this.category));t?(this.selectedCategory=t.id,this.emitActiveCategory()):window.postMessage({type:"BlogCategoryNotFound"},window.location.href)}const i=this.toPageNumber(null!==(t=this.getPageFromUrl())&&void 0!==t?t:this.page);return this.page=String(i),this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.blogsLimit&&this.getBlogArticleGrid(),this.loadTranslations()}emitActiveCategory(){var t;const i=this.categories.find((t=>t.id===this.selectedCategory));window.postMessage({type:"BlogArticlesActiveCategory",category:this.selectedCategory===g?null:null==i?void 0:i.name,categorySlug:i&&this.selectedCategory!==g?this.getCategorySlug(i):null,metadata:this.selectedCategory===g?null:null!==(t=null==i?void 0:i.metadata)&&void 0!==t?t:null},window.location.href)}emitContent(t){const i=this.getActiveCategory();window.postMessage({type:"BlogArticlesGridContent",page:this.currentPage+1,categorySlug:i&&i.id!==g?this.getCategorySlug(i):null,items:t.map((({title:t,slug:i,customPath:n,publishingDate:e,image:o})=>({title:t,slug:i,customPath:n,publishingDate:e,imageSrc:null==o?void 0:o.src})))},window.location.href)}handleCategoryClick(t,i){!this.usePostmessage||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),this.handleCategoryChange(i))}async handleCategoryChange(t){this.isLoading||this.selectedCategory===t||(this.selectedCategory=t,this.emitActiveCategory(),0!==this.currentPage&&(this.setCurrentPage(1),this.page="1"),await this.getBlogArticleGrid(!0,1))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isInitialized=!0,window.postMessage({type:"BlogArticlesGridLoaded"},window.location.href),this.device=((t=!1)=>{if("undefined"==typeof window||"undefined"==typeof navigator)return"desktop";const i=navigator.userAgent.toLowerCase(),n=window.innerWidth;if(function(t){return!!t.includes("ipad")||t.includes("macintosh")&&navigator.maxTouchPoints>0}(i))return"tablet";if(function(t){return t.includes("iphone")||t.includes("ipod")}(i))return"mobile";if(function(t,i){return d(t)&&(t.includes("mobile")||t.includes("mobi")||i<=599)}(i,n))return"mobile";if(function(t,i){return d(t)&&!t.includes("mobile")&&!t.includes("mobi")&&i>599}(i,n))return"tablet";if(t){if(n<=599)return"mobile";if(n<=1099)return"tablet"}return"desktop"})()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}setImage(t){var i,n;return(null===(n=null===(i=t.sources)||void 0===i?void 0:i["mobile"===this.device?0:"tablet"===this.device?1:2])||void 0===n?void 0:n.pictureSource)||t.src}parseDate(t){const i=new Date(t);if(i instanceof Date&&!Number.isNaN(i.getTime()))return i;const[n,e,o]=t.trim().split("/").map(Number);return new Date(o,e-1,n)}formatDate(t){const i=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat||"en-GB",{day:"numeric",month:"short",year:"numeric"}).format(i)}render(){var t;if(this.hasErrors)return n("div",{class:"BlogsContainer"},!this.hideError&&n("div",{class:"ErrorMessage"},o("error",this.language,this.customTranslations)));const i=[];for(let t=0;t<parseInt(this.blogsLimit);t++)i.push(n("div",{class:"GridContainer FeaturedPost Skeleton"},n("div",{class:"GridWrapper"},n("div",{class:"GridSector"},n("div",{class:"VisualContent LoadingImage"})),n("div",{class:"GridSector"},n("div",{class:"BlogTitle LoadingStripe LoadingSmallStripe"}),n("div",{class:"BlogDetails LoadingStripe LoadingMediumStripe"}),n("div",{class:"BlogLink LoadingStripe LoadingLongStripe"})))));const e=Boolean(this.paginationActive)&&this.totalBlogs>+this.blogsLimit,s=this.mbSource?void 0:this.clientStyling||this.paginationDefaultStyling,a=this.getActiveCategory();return n("div",{ref:t=>this.stylingContainer=t},this.showBreadcrumb&&n("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},n("a",{href:`/${encodeURIComponent(this.language)}`},o("home",this.language,this.customTranslations)),n("span",{"aria-hidden":"true"},"›"),a&&this.selectedCategory!==g?[n("a",{href:`/${encodeURIComponent(this.language)}/blog`},o("blog",this.language,this.customTranslations)),n("span",{"aria-hidden":"true"},"›"),n("span",{"aria-current":"page"},a.name)]:n("span",{"aria-current":"page"},o("blog",this.language,this.customTranslations))),this.showPageTitle&&n("h1",{class:"BlogPageTitle"}," ",this.selectedCategory!==g?this.getCategoryHeading(a):o("blogPageTitle",this.language,this.customTranslations)," "),this.selectedCategory!==g&&(null==a?void 0:a.description)&&n("div",{class:"BlogPageDescription",innerHTML:a.description}),n("div",{class:"BlogPageContainer"},this.showBlogSubcategories&&n("div",{class:"BlogCategoriesSliderWrapper"},n("div",{class:"CarouselWrapper"},n("div",{class:"CarouselContainer"},n("div",{class:"BlogCategoriesWrapper"},n("div",{class:"CategoryButtons"},this.categories.filter((t=>!this.hideEmptyCategories||t.id===this.selectedCategory||0!==Number(t.postsCount))).map((t=>n("a",{href:this.getCategoryHref(t),"aria-current":this.selectedCategory===t.id?"page":void 0,key:t.id,class:{CategoryButton:!0,active:this.selectedCategory===t.id},onClick:i=>this.handleCategoryClick(i,t.id)},t.name)))))))),n("div",{class:"BlogGridPaginationWrapper"},e&&n("helper-pagination",{"next-page":this.nextPage,"prev-page":this.previousPage,offset:this.paginationBlogList.offset,limit:parseInt(this.blogsLimit,10),total:this.totalBlogs,language:this.language,"mb-source":this.mbSource,"client-styling":s,"client-styling-url":this.clientStylingUrl,"arrows-active":this.arrowsActive,"secondary-arrows-active":this.secondaryArrowsActive,"numbered-nav-active":this.numberedNavActive,"page-query-param":this.pageQueryParam})),!this.isLoading&&0===(null===(t=this.displayedBlogResponse)||void 0===t?void 0:t.items.length)&&n("p",{class:"EmptyState",role:"status"},o(this.selectedCategory===g?"emptyState":"emptyCategoryState",this.language,this.customTranslations)),!this.isLoading&&n("div",{class:`GridContainerWrapper BlogPage-${this.currentPage} ${this.device}`},this.displayedBlogResponse&&this.displayedBlogResponse.items.map((t=>{var i,e;const s=this.categories.filter((i=>{var n;return i.id!==g&&(null===(n=t.blogCategory)||void 0===n?void 0:n.includes(this.getCategoryFetchSlug(i)))}));return n("div",{key:t.postID,class:t.isFeaturedPost?"GridContainer FeaturedPost":"GridContainer"},n("div",{class:"GridWrapper"},n("div",{class:"GridSector"},this.showPublishingDate&&n("div",{class:"BlogDate"},n("time",{dateTime:t.publishingDate},this.formatDate(t.publishingDate))),this.showImage&&(null===(i=t.image)||void 0===i?void 0:i.src)?n("img",{class:"VisualContent",src:this.setImage(t.image),alt:t.image.alt||t.title,width:"400",height:"225",loading:"lazy"}):(null===(e=t.video)||void 0===e?void 0:e.sources[this.device])?n("video",{class:"VisualContent",src:t.video.sources[this.device]}):n("span",{class:"VisualContent",style:{color:"#fff"}},"No Image")),n("div",{class:"GridSector"},s.length>0&&n("div",{class:"CategoryButtons BlogCardCategories"},s.map((t=>n("a",{class:"CategoryButton",href:this.getCategoryHref(t),onClick:i=>this.handleCategoryClick(i,t.id)},t.name)))),this.showTitle&&n("h2",{class:"BlogTitle"},n("a",{class:"BlogCardLink",href:`/${encodeURIComponent(this.language)}/blog/${encodeURIComponent(t.customPath||t.slug)}`,onClick:i=>this.getArticleId(i,t)},t.title)),this.showContent&&this.renderContentConditionally(t.descriptionPreview),this.showButton&&n("span",{class:"BlogLink"},o("readmore",this.language,this.customTranslations)))))}))),this.isLoading&&n("div",{class:"GridContainerWrapper LoadingGrid"},i)))}static get watchers(){return{hasErrors:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],blogsLimit:["watchEndpoint"],eventId:["watchEndpoint"],page:["handlePageChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["loadTranslations"]}}};c.style=':host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-typography);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.EmptyState {\n color: var(--emw--color-typography);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 325px;\n margin: 0;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer:not(.Skeleton):hover .GridWrapper {\n background: color-mix(in srgb, var(--emw--color-white, #FFFFFF) 90%, #000);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink:focus-visible {\n outline: none;\n}\n.GridContainer .BlogTitle .BlogCardLink:focus-visible::after {\n border-radius: 15px;\n outline: 3px solid var(--emw--color-primary, #CD0B5E);\n outline-offset: -3px;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: "";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n text-decoration: none;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}\n\n.BlogCardCategories {\n margin-bottom: 10px;\n}\n.BlogCardCategories .CategoryButton {\n position: relative;\n z-index: 3;\n padding: 4px 10px;\n color: inherit;\n font-size: 12px;\n}';const p={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"}},u=class{constructor(n){t(this,n),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{var i;switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,null===(i=this.hpPageChange)||void 0===i||i.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{var n;this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,null===(n=this.hpPageChange)||void 0===n||n.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.pageQueryParam=void 0,this.page=1,this.offsetInt=0,this.lastPage=!1,this.previousPage=!1,this.limitInt=0,this.totalInt=0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!==i&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),this.endInt<4?this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)):1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}pageHref(t){if(!this.pageQueryParam)return"#";const i=new URL(window.location.href),n=t+this.page-1;return 1===n?i.searchParams.delete(this.pageQueryParam):i.searchParams.set(this.pageQueryParam,String(n)),`${i.pathname}${i.search}${i.hash}`}renderNavigationButton(t,i,e,o){const s=p[void 0!==(a=this.language)&&a in p?a:"en"][i];var a;return n(e?"a":"span",{class:"PaginationControl",href:e?this.pageHref(t):void 0,rel:e?o:void 0,"aria-label":s,"aria-disabled":e?void 0:"true",onClick:e?t=>{0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),this.navigateTo(i))}:void 0},n("span",{class:"NavigationButton"},s),n("span",{class:"NavigationIcon"}))}render(){let t=n("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>{const e="number"==typeof t?t:0===i?Math.max(1,this.currentPage-5):Math.min(this.endInt+1,this.currentPage+5);return n("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(o=this.userAgent,o.toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)?"MobileButtons":"")},n("a",{href:this.pageHref(e),"aria-current":t===this.currentPage?"page":void 0,"aria-disabled":t===this.currentPage?"true":void 0,tabIndex:t===this.currentPage?-1:void 0,onClick:n=>{0!==n.button||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||(n.preventDefault(),t!==this.currentPage&&this.paginationNavigation(t,i))}},n("span",null,t)));var o})));const i=n("div",{class:"LeftItems"},this.secondaryArrowsActive&&this.renderNavigationButton(1,"firstPage",Boolean(this.prevPage)),this.renderNavigationButton(this.currentPage-1,"previousPage",Boolean(this.prevPage),"prev")),e=n("div",{class:"RightItems"},this.renderNavigationButton(this.currentPage+1,"nextPage",Boolean(this.nextPage),"next"),this.secondaryArrowsActive&&this.renderNavigationButton(this.endInt+1,"lastPage",Boolean(this.nextPage)));return n("nav",{id:"PaginationContainer",class:"PaginationContainer","aria-label":"Blog pagination",ref:t=>this.stylingContainer=t},this.arrowsActive&&i,this.numberedNavActive&&t,this.arrowsActive&&e)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};u.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems .PaginationControl:not(:first-child),.RightItems .PaginationControl:not(:last-child){margin:0 10px}.LeftItems .PaginationControl,.RightItems .PaginationControl{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){#PaginationContainer{flex-wrap:wrap;row-gap:10px}#PaginationContainer .LeftItems,#PaginationContainer .RightItems{display:flex;flex-direction:column;gap:10px}#PaginationContainer .RightItems{flex-direction:column-reverse}#PaginationContainer .PaginationControl{margin:0}#PaginationContainer .PaginationArea{order:1;flex-basis:100%;justify-content:center;margin:0;padding:0}a,.PaginationControl{width:90px;font-size:14px}}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}';export{c as blog_articles_grid,u as helper_pagination}
1
+ import{r as t,c as i,h as n}from"./index-6b3cf3ac.js";const e={en:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},ro:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},fr:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},ar:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},hu:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},hr:{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},"pt-br":{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."},"es-mx":{error:"Error",readmore:"Read more",home:"Home",blog:"Blog",blogPageTitle:"Blog",emptyState:"We haven’t published any posts yet. Check back soon.",emptyCategoryState:"We haven’t published any posts in this category. Check back soon, or browse all our articles."}},o=(t,i,n)=>{var o;const a=null!=i?i:"en",r=null===(o=null==n?void 0:n[a])||void 0===o?void 0:o[t];return"string"==typeof r?r:e[a in e?a:"en"][t]},a=t=>t.toLowerCase().replace(/[\s\/`~@\$%\^&\*\(\)_\+\[\]\\\{\}\|;':",\.<>\?#–]/g,"-").replace(/-{2,}/g,"-").replace(/^-|-$/g,""),r="__WIDGET_GLOBAL_STYLE_CACHE__";function s(t,i){if(t){const n=document.createElement("style");n.innerHTML=i,t.appendChild(n)}}function h(t,i){if(!t||!i)return;const n=new URL(i);fetch(n.href).then((t=>t.text())).then((i=>{const n=document.createElement("style");n.innerHTML=i,t&&t.appendChild(n)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function l(t,i,n,e=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!e)return n=function(t,i){const n=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(n.innerHTML=i,t.appendChild(n))}))}(t,i),n;window[r]||(window[r]={}),n=function(t,i){return window.emMessageBus.subscribe(i,(n=>{if(!t)return;const e=t.getRootNode(),o=window[r];let a=o[i]&&o[i].sheet;a?o[i].refCount=o[i].refCount+1:(a=new CSSStyleSheet,a.replaceSync(n),o[i]={sheet:a,refCount:1});const s=e.adoptedStyleSheets||[];s.includes(a)||(e.adoptedStyleSheets=[...s,a])}))}(t,i);const o=n.unsubscribe.bind(n);return n.unsubscribe=()=>{if(window[r][i]){const t=window[r][i];t.refCount>1?t.refCount=t.refCount-1:delete window[r][i]}o()},n}function d(t){return t.includes("android")}const g="all",c=class{constructor(e){t(this,e),this.articleActionButton=i(this,"articleActionButton",7),this.lastPage=1,this.isInitialized=!1,this.renderContentConditionally=t=>t&&(!t.includes("<bannermatrix-banner")||this.bannerMatrixReady)?n("p",{class:"BlogContent",innerHTML:t}):null,this.cmsEndpoint=void 0,this.language="en",this.translationUrl="",this.userRoles="everyone",this.cmsEnv="stage",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.showPublishingDate=!0,this.showBlogSubcategories=!1,this.hideCategory="",this.showImage=!0,this.showTitle=!0,this.showPageTitle=!1,this.useCategoryMetadataTitle=!1,this.hideEmptyCategories=!1,this.showBreadcrumb=!1,this.showContent=!0,this.showButton=!0,this.hideError=!1,this.usePostmessage=void 0,this.postMessageEvent="",this.blogsLimit="0",this.paginationActive=void 0,this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.paginationPosition="top",this.intlDateTimeFormat="",this.page="1",this.category=void 0,this.pageQueryParam=void 0,this.eventId=void 0,this.paginationBlogList={offset:0},this.currentPage=0,this.hasErrors=!1,this.isLoading=!0,this.bannerMatrixReady=!1,this.nextPage="",this.previousPage="",this.device="mobile",this.displayedBlogResponse=void 0,this.paginationBlogResponse=void 0,this.allBlogResponse=void 0,this.totalBlogs=0,this.customTranslations={},this.selectedCategory=g,this.categories=[]}getArticleId(t,i){var n;if(0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e={postId:i.postID.toString(),slug:i.slug,customPath:i.customPath};this.usePostmessage?(t.preventDefault(),window.postMessage(Object.assign({type:this.postMessageEvent},e))):null===(n=this.articleActionButton)||void 0===n||n.emit(e)}handleBannerReady(){this.bannerMatrixReady=!0}watchEndpoint(t,i){this.isInitialized&&(this.setCurrentPage(this.toPageNumber(this.page)),(t||""===t)&&t!=i&&this.cmsEndpoint&&this.language&&this.getBlogArticleGrid())}handlePageChange(t){if(!this.isInitialized)return;const i=this.toPageNumber(t);String(i)===t?i!==this.currentPage+1&&(this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.getBlogArticleGrid(!0)):this.page=String(i)}handlePopState(){this.pageQueryParam&&(this.page=String(this.toPageNumber(this.getPageFromUrl())))}toPageNumber(t){const i=parseInt(null!=t?t:"",10);return i>0?i:1}setCurrentPage(t){this.currentPage=t-1,this.paginationBlogList=Object.assign(Object.assign({},this.paginationBlogList),{offset:this.currentPage*(parseInt(this.blogsLimit,10)||0)})}getPageFromUrl(){return this.pageQueryParam?new URL(window.location.href).searchParams.get(this.pageQueryParam):null}pushPageToUrl(t){if(!this.pageQueryParam)return;const i=new URL(window.location.href);1===t?i.searchParams.delete(this.pageQueryParam):i.searchParams.set(this.pageQueryParam,String(t)),window.history.pushState(null,"",`${i.pathname}${i.search}${i.hash}`)}handleClientStylingChange(t,i){t!==i&&s(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}async loadTranslations(){if(this.translationUrl)try{const t=await fetch(this.translationUrl);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);this.customTranslations=await t.json()}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}else this.customTranslations={}}hpPageChange(t){const{offset:i,limit:n}=t.detail,e=Math.floor(i/n)+1;e>=1&&e<=this.lastPage&&e!==this.currentPage+1&&(this.announcePage(e),this.page=String(e))}announcePage(t){window.postMessage({type:"BlogArticlesGridActivePagination",currentPage:t-1},window.location.href),this.pushPageToUrl(t)}getCategoryHeading(t){var i,n;return(this.useCategoryMetadataTitle?null===(n=null===(i=null==t?void 0:t.metadata)||void 0===i?void 0:i.title)||void 0===n?void 0:n.replace(/\s*\|[^|]*$/,"").trim():"")||(null==t?void 0:t.name)}getActiveCategory(){return this.categories.find((t=>t.id===this.selectedCategory))}getCategorySlug(t){return a(t.name)}getCategoryFetchSlug(t){return t.slug||a(t.name)}getCategoryHref(t){const i=`/${encodeURIComponent(this.language)}/blog`;return t.id===g?i:`${i}/category/${encodeURIComponent(this.getCategorySlug(t))}`}sortArticlesByDate(t){return t.sort(((t,i)=>t.publishingDate>i.publishingDate?-1:t.publishingDate<i.publishingDate?1:0)),t}findLatestFeatured(t){let i=t.filter((t=>t.isFeaturedPost));return 0===i.length?null:(i=this.sortArticlesByDate(i),i[0])}moveLatestFeatureToStart(t,i){if(!i)return t;const n=t.indexOf(i);return-1!==n&&(t.splice(n,1),t.unshift(i)),t}async fetchBlogPosts(t,i=!1){const n=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts`);if(this.selectedCategory&&this.selectedCategory!==g){const t=this.categories.find((t=>t.id==this.selectedCategory));t&&n.searchParams.append("category",this.getCategoryFetchSlug(t))}return n.searchParams.append("per_page",i?"300":this.blogsLimit),n.searchParams.append("page",`${t||this.currentPage+1}`),n.searchParams.append("env",this.cmsEnv),n.searchParams.append("userRoles",this.userRoles),n.searchParams.append("device",(()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t){if("PC"===t)return"dk";if("iPad"===t||"iPhone"===t)return"mtWeb"}return"mtWeb"})()),fetch(n.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{let n=t.items;const e=this.findLatestFeatured(n);return n=this.sortArticlesByDate(n),n=this.moveLatestFeatureToStart(n,e),t=Object.assign(Object.assign({},t),{items:n}),i?this.allBlogResponse=t:this.paginationBlogResponse=t,t})).catch((t=>(this.hasErrors=!0,console.log("Error",t),{})))}async fetchCategories(){try{const t=new URL(`${this.cmsEndpoint}/${this.language}/blog-posts/category`),i=await fetch(t.href);if(!i.ok)throw new Error("Failed to fetch categories");const n=await i.json(),e=this.hideCategory.split(",").map((t=>t.trim().toLowerCase())).filter(Boolean),o=n.filter((t=>{var i;return!e.includes(null===(i=t.name)||void 0===i?void 0:i.toLowerCase())}));this.categories=[{id:g,name:"All"},...o]}catch(t){console.error("Error fetching categories",t)}}async getBlogArticleGrid(t=!1,i){var n,e,o,a,r,s,h;this.isLoading=!0;try{let l;if(this.eventId&&this.eventId.length>0){const a=(null===(n=this.allBlogResponse)||void 0===n?void 0:n.items)?this.allBlogResponse:await this.fetchBlogPosts(1,!0),r=a.items.filter((({eventIds:t})=>{var i;return t.includes(null!==(i=this.eventId)&&void 0!==i?i:"-")}));r.length?(l=Object.assign(Object.assign({},a),{items:r,total:Math.min(parseInt(this.blogsLimit),r.length)}),window.postMessage({type:"OP:blogReady",payload:{hasBlog:!0}},"*")):(window.postMessage({type:"OP:blogReady",payload:{hasBlog:!1}},"*"),l=(null===(o=null===(e=this.paginationBlogResponse)||void 0===e?void 0:e.items)||void 0===o?void 0:o.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i))}else l=(null===(r=null===(a=this.paginationBlogResponse)||void 0===a?void 0:a.items)||void 0===r?void 0:r.length)&&!t?this.paginationBlogResponse:await this.fetchBlogPosts(i);this.displayedBlogResponse=l,this.totalBlogs=l.total,this.lastPage=+((null===(h=null===(s=l.pages.last)||void 0===s?void 0:s.match(/&page=(\d+)/))||void 0===h?void 0:h[1])||1),this.nextPage=l.pages.next,this.previousPage=l.pages.previous,this.isLoading=!1,this.hasErrors=!1,this.emitContent(l.items)}catch(t){this.hasErrors=!0,console.log("Error",t)}}async componentWillLoad(){var t;if(this.cmsEndpoint&&this.language&&(await this.fetchCategories(),this.category)){const t=this.categories.find((t=>t.id!==g&&this.getCategorySlug(t)===this.category));t?(this.selectedCategory=t.id,this.emitActiveCategory()):window.postMessage({type:"BlogCategoryNotFound"},window.location.href)}const i=this.toPageNumber(null!==(t=this.getPageFromUrl())&&void 0!==t?t:this.page);return this.page=String(i),this.setCurrentPage(i),this.cmsEndpoint&&this.language&&this.blogsLimit&&this.getBlogArticleGrid(),this.loadTranslations()}emitActiveCategory(){var t;const i=this.categories.find((t=>t.id===this.selectedCategory));window.postMessage({type:"BlogArticlesActiveCategory",category:this.selectedCategory===g?null:null==i?void 0:i.name,categorySlug:i&&this.selectedCategory!==g?this.getCategorySlug(i):null,metadata:this.selectedCategory===g?null:null!==(t=null==i?void 0:i.metadata)&&void 0!==t?t:null},window.location.href)}emitContent(t){const i=this.getActiveCategory();window.postMessage({type:"BlogArticlesGridContent",page:this.currentPage+1,categorySlug:i&&i.id!==g?this.getCategorySlug(i):null,items:t.map((({title:t,slug:i,customPath:n,publishingDate:e,image:o})=>({title:t,slug:i,customPath:n,publishingDate:e,imageSrc:null==o?void 0:o.src})))},window.location.href)}handleCategoryClick(t,i){!this.usePostmessage||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),this.handleCategoryChange(i))}async handleCategoryChange(t){this.isLoading||this.selectedCategory===t||(this.selectedCategory=t,this.emitActiveCategory(),0!==this.currentPage&&(this.setCurrentPage(1),this.page="1"),await this.getBlogArticleGrid(!0,1))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling(),this.isInitialized=!0,window.postMessage({type:"BlogArticlesGridLoaded"},window.location.href),this.device=((t=!1)=>{if("undefined"==typeof window||"undefined"==typeof navigator)return"desktop";const i=navigator.userAgent.toLowerCase(),n=window.innerWidth;if(function(t){return!!t.includes("ipad")||t.includes("macintosh")&&navigator.maxTouchPoints>0}(i))return"tablet";if(function(t){return t.includes("iphone")||t.includes("ipod")}(i))return"mobile";if(function(t,i){return d(t)&&(t.includes("mobile")||t.includes("mobi")||i<=599)}(i,n))return"mobile";if(function(t,i){return d(t)&&!t.includes("mobile")&&!t.includes("mobi")&&i>599}(i,n))return"tablet";if(t){if(n<=599)return"mobile";if(n<=1099)return"tablet"}return"desktop"})()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}setImage(t){var i,n;return(null===(n=null===(i=t.sources)||void 0===i?void 0:i["mobile"===this.device?0:"tablet"===this.device?1:2])||void 0===n?void 0:n.pictureSource)||t.src}parseDate(t){const i=new Date(t);if(i instanceof Date&&!Number.isNaN(i.getTime()))return i;const[n,e,o]=t.trim().split("/").map(Number);return new Date(o,e-1,n)}formatDate(t){const i=this.parseDate(t);return new Intl.DateTimeFormat(this.intlDateTimeFormat||"en-GB",{day:"numeric",month:"short",year:"numeric"}).format(i)}render(){var t,i;if(this.hasErrors)return n("div",{class:"BlogsContainer"},!this.hideError&&n("div",{class:"ErrorMessage"},o("error",this.language,this.customTranslations)));const e=[];for(let t=0;t<parseInt(this.blogsLimit);t++)e.push(n("div",{class:"GridContainer FeaturedPost Skeleton"},n("div",{class:"GridWrapper"},n("div",{class:"GridSector"},n("div",{class:"VisualContent LoadingImage"})),n("div",{class:"GridSector"},n("div",{class:"BlogTitle LoadingStripe LoadingSmallStripe"}),n("div",{class:"BlogDetails LoadingStripe LoadingMediumStripe"}),n("div",{class:"BlogLink LoadingStripe LoadingLongStripe"})))));const a=this.totalBlogs<=+this.blogsLimit,r=Boolean(this.paginationActive)&&this.totalBlogs>0&&!(a&&this.eventId),s=this.mbSource?void 0:this.clientStyling||void 0,h=this.getActiveCategory(),l=n("div",{class:"BlogGridPaginationWrapper"},r&&n("helper-pagination",{"next-page":this.nextPage,"prev-page":this.previousPage,offset:this.paginationBlogList.offset,limit:parseInt(this.blogsLimit,10),total:this.totalBlogs,language:this.language,"mb-source":this.mbSource,"client-styling":s,"client-styling-url":this.clientStylingUrl,"arrows-active":this.arrowsActive,"secondary-arrows-active":this.secondaryArrowsActive,"numbered-nav-active":this.numberedNavActive||a,"page-query-param":this.pageQueryParam})),d="bottom"!==String(null!==(t=this.paginationPosition)&&void 0!==t?t:"").trim().toLowerCase();return n("div",{ref:t=>this.stylingContainer=t},this.showBreadcrumb&&n("nav",{class:"breadcrumb","aria-label":"Breadcrumb"},n("a",{href:`/${encodeURIComponent(this.language)}`},o("home",this.language,this.customTranslations)),n("span",{"aria-hidden":"true"},"›"),h&&this.selectedCategory!==g?[n("a",{href:`/${encodeURIComponent(this.language)}/blog`},o("blog",this.language,this.customTranslations)),n("span",{"aria-hidden":"true"},"›"),n("span",{"aria-current":"page"},h.name)]:n("span",{"aria-current":"page"},o("blog",this.language,this.customTranslations))),this.showPageTitle&&n("h1",{class:"BlogPageTitle"}," ",this.selectedCategory!==g?this.getCategoryHeading(h):o("blogPageTitle",this.language,this.customTranslations)," "),this.selectedCategory!==g&&(null==h?void 0:h.description)&&n("div",{class:"BlogPageDescription",innerHTML:h.description}),n("div",{class:"BlogPageContainer"},this.showBlogSubcategories&&n("div",{class:"BlogCategoriesSliderWrapper"},n("div",{class:"CarouselWrapper"},n("div",{class:"CarouselContainer"},n("div",{class:"BlogCategoriesWrapper"},n("div",{class:"CategoryButtons"},this.categories.filter((t=>!this.hideEmptyCategories||t.id===this.selectedCategory||0!==Number(t.postsCount))).map((t=>n("a",{href:this.getCategoryHref(t),"aria-current":this.selectedCategory===t.id?"page":void 0,key:t.id,class:{CategoryButton:!0,active:this.selectedCategory===t.id},onClick:i=>this.handleCategoryClick(i,t.id)},t.name)))))))),d&&l,!this.isLoading&&0===(null===(i=this.displayedBlogResponse)||void 0===i?void 0:i.items.length)&&n("p",{class:"EmptyState",role:"status"},o(this.selectedCategory===g?"emptyState":"emptyCategoryState",this.language,this.customTranslations)),!this.isLoading&&n("div",{class:`GridContainerWrapper BlogPage-${this.currentPage} ${this.device}`},this.displayedBlogResponse&&this.displayedBlogResponse.items.map((t=>{var i,e;const a=this.categories.filter((i=>{var n;return i.id!==g&&(null===(n=t.blogCategory)||void 0===n?void 0:n.includes(this.getCategoryFetchSlug(i)))}));return n("div",{key:t.postID,class:t.isFeaturedPost?"GridContainer FeaturedPost":"GridContainer"},n("div",{class:"GridWrapper"},n("div",{class:"GridSector"},this.showPublishingDate&&n("div",{class:"BlogDate"},n("time",{dateTime:t.publishingDate},this.formatDate(t.publishingDate))),this.showImage&&(null===(i=t.image)||void 0===i?void 0:i.src)?n("img",{class:"VisualContent",src:this.setImage(t.image),alt:t.image.alt||t.title,width:"400",height:"225",loading:"lazy"}):(null===(e=t.video)||void 0===e?void 0:e.sources[this.device])?n("video",{class:"VisualContent",src:t.video.sources[this.device]}):n("span",{class:"VisualContent",style:{color:"#fff"}},"No Image")),n("div",{class:"GridSector"},a.length>0&&n("div",{class:"CategoryButtons BlogCardCategories"},a.map((t=>n("a",{class:"CategoryButton",href:this.getCategoryHref(t),onClick:i=>this.handleCategoryClick(i,t.id)},t.name)))),this.showTitle&&n("h2",{class:"BlogTitle"},n("a",{class:"BlogCardLink",href:`/${encodeURIComponent(this.language)}/blog/${encodeURIComponent(t.customPath||t.slug)}`,onClick:i=>this.getArticleId(i,t)},t.title)),this.showContent&&this.renderContentConditionally(t.descriptionPreview),this.showButton&&n("span",{class:"BlogLink"},o("readmore",this.language,this.customTranslations)))))}))),this.isLoading&&n("div",{class:"GridContainerWrapper LoadingGrid"},e),!d&&l))}static get watchers(){return{hasErrors:["watchEndpoint"],cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],cmsEnv:["watchEndpoint"],userRoles:["watchEndpoint"],blogsLimit:["watchEndpoint"],eventId:["watchEndpoint"],page:["handlePageChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"],translationUrl:["loadTranslations"]}}};c.style=':host {\n display: block;\n}\n\n.breadcrumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n max-width: 1300px;\n padding: 0 20px;\n margin: 40px auto 20px;\n color: var(--emw--color-typography);\n}\n.breadcrumb a {\n color: inherit;\n}\n\n.BlogPageTitle {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-primary);\n font-size: 22px;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.BlogPageDescription {\n max-width: 1300px;\n padding: 0 20px;\n margin: 0 auto;\n color: var(--emw--color-typography);\n line-height: 1.2;\n}\n\n.BlogPageContainer {\n background: #0A0A17;\n padding: 20px;\n}\n\n.EmptyState {\n color: var(--emw--color-typography);\n display: flex;\n align-items: center;\n justify-content: center;\n height: 325px;\n margin: 0;\n}\n\n.GridContainerWrapper {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 20px;\n}\n\n.BlogPage-0 .GridContainer.FeaturedPost:first-child {\n width: 100%;\n flex-basis: auto;\n}\n\n.GridContainer {\n position: relative;\n container-type: inline-size;\n container-name: article;\n border-radius: 15px;\n color: #000;\n overflow: hidden;\n}\n.GridContainer.FeaturedPost:first-child {\n grid-column: 1/-1;\n width: 100%;\n}\n.GridContainer .GridWrapper {\n display: flex;\n flex-direction: row;\n height: 280px;\n background: var(--emw--color-white, #FFFFFF);\n}\n.GridContainer:not(.Skeleton):hover .GridWrapper {\n background: color-mix(in srgb, var(--emw--color-white, #FFFFFF) 90%, #000);\n}\n.GridContainer .GridSector {\n flex-basis: 50%;\n position: relative;\n}\n.GridContainer .GridSector:first-of-type {\n height: 280px;\n display: flex;\n}\n.GridContainer .GridSector:last-of-type {\n position: static;\n padding: 20px 40px;\n display: flex;\n flex-direction: column;\n}\n.GridContainer .VisualContent {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.GridContainer .BlogDate {\n position: absolute;\n bottom: 0px;\n left: 30px;\n font-size: 12px;\n border-radius: 5px 5px 0 0;\n padding: 10px;\n width: fit-content;\n text-align: center;\n color: var(--emw--color-white, #FFFFFF);\n background-color: #CD0B5E;\n z-index: 1;\n pointer-events: none;\n}\n.GridContainer .BlogTitle {\n margin: 0;\n font-size: 24px;\n font-weight: 400;\n color: #000;\n padding-bottom: 10px;\n}\n.GridContainer .BlogTitle .BlogCardLink {\n display: block;\n color: inherit;\n text-decoration: none;\n cursor: pointer;\n}\n.GridContainer .BlogTitle .BlogCardLink:focus-visible {\n outline: none;\n}\n.GridContainer .BlogTitle .BlogCardLink:focus-visible::after {\n border-radius: 15px;\n outline: 3px solid var(--emw--color-primary, #CD0B5E);\n outline-offset: -3px;\n}\n.GridContainer .BlogTitle .BlogCardLink::after {\n content: "";\n position: absolute;\n inset: 0;\n z-index: 2;\n}\n.GridContainer .BlogContent {\n margin: 0;\n display: -webkit-box;\n font-size: 14px;\n line-height: 1.2em;\n -webkit-line-clamp: 6;\n color: #000;\n -webkit-box-orient: vertical;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.GridContainer .BlogLink {\n color: #22B04E;\n font-size: 14px;\n position: absolute;\n bottom: 16px;\n padding-top: 2.5px;\n}\n\n@container article (max-width: 550px) {\n .GridContainer .GridWrapper {\n height: 380px;\n flex-direction: column;\n }\n .GridContainer .GridWrapper .GridSector:first-of-type {\n height: 120px;\n flex-shrink: 0;\n flex-basis: 150px;\n }\n .GridContainer .GridWrapper .GridSector:last-of-type {\n padding: 20px 20px 40px;\n }\n}\n.LoadingImage {\n width: 100%;\n height: 100%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n}\n\n.LoadingStripe {\n border: 1px solid var(--emw--color-white, #FFFFFF);\n height: 20%;\n background-color: var(--emw--color-gray-100, #E6E6E6);\n margin-bottom: 5px;\n}\n\n.LoadingSmallStripe {\n width: 40%;\n}\n\n.LoadingMediumStripe {\n width: 70%;\n}\n\n.BlogLink.LoadingLongStripe {\n position: static;\n width: 100%;\n}\n\n.GridContainerWrapper.LoadingGrid .GridSector {\n justify-content: space-around;\n}\n\n.GridContainerWrapper.LoadingGrid .LoadingImage, .GridContainerWrapper.LoadingGrid .LoadingStripe {\n animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n -webkit-animation: pulsatingLoader 2s ease-in-out 0s infinite reverse;\n}\n\n@keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@-webkit-keyframes pulsatingLoader {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n.BlogCategoriesWrapper {\n margin-bottom: 24px;\n}\n\n.FilterLabel {\n margin-bottom: 12px;\n color: var(--emw--color-white, #fff);\n font-weight: 600;\n}\n\n.CategoryButtons {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n\n.CategoryButton {\n padding: 10px 20px;\n border-radius: 999px;\n border: 1px solid currentColor;\n text-decoration: none;\n background: transparent;\n color: var(--emw--color-white, #fff);\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.CategoryButton.active {\n background: var(--emw--casino-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--color-background, #fff);\n}\n\n.BlogCardCategories {\n margin-bottom: 10px;\n}\n.BlogCardCategories .CategoryButton {\n position: relative;\n z-index: 3;\n padding: 4px 10px;\n color: inherit;\n font-size: 12px;\n}';const p={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"}},u=class{constructor(n){t(this,n),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{var i;switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,null===(i=this.hpPageChange)||void 0===i||i.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{var n;this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,null===(n=this.hpPageChange)||void 0===n||n.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.pageQueryParam=void 0,this.page=1,this.offsetInt=0,this.lastPage=!1,this.previousPage=!1,this.limitInt=0,this.totalInt=0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!==i&&s(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),this.endInt<4?this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)):1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}pageHref(t){if(!this.pageQueryParam)return"#";const i=new URL(window.location.href),n=t+this.page-1;return 1===n?i.searchParams.delete(this.pageQueryParam):i.searchParams.set(this.pageQueryParam,String(n)),`${i.pathname}${i.search}${i.hash}`}renderNavigationButton(t,i,e,o){const a=p[void 0!==(r=this.language)&&r in p?r:"en"][i];var r;return n(e?"a":"span",{class:"PaginationControl","data-nav":i,href:e?this.pageHref(t):void 0,rel:e?o:void 0,"aria-label":a,"aria-disabled":e?void 0:"true",onClick:e?t=>{0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),this.navigateTo(i))}:void 0},n("span",{class:"NavigationButton"},a),n("span",{class:"NavigationIcon"}))}render(){let t=n("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>{const e="number"==typeof t?t:0===i?Math.max(1,this.currentPage-5):Math.min(this.endInt+1,this.currentPage+5);return n("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(o=this.userAgent,o.toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)?"MobileButtons":"")},n("a",{href:this.pageHref(e),"aria-current":t===this.currentPage?"page":void 0,"aria-disabled":t===this.currentPage?"true":void 0,tabIndex:t===this.currentPage?-1:void 0,onClick:n=>{0!==n.button||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||(n.preventDefault(),t!==this.currentPage&&this.paginationNavigation(t,i))}},n("span",null,t)));var o})));const i=n("div",{class:"LeftItems"},this.secondaryArrowsActive&&this.renderNavigationButton(1,"firstPage",Boolean(this.prevPage)),this.renderNavigationButton(this.currentPage-1,"previousPage",Boolean(this.prevPage),"prev")),e=n("div",{class:"RightItems"},this.renderNavigationButton(this.currentPage+1,"nextPage",Boolean(this.nextPage),"next"),this.secondaryArrowsActive&&this.renderNavigationButton(this.endInt+1,"lastPage",Boolean(this.nextPage)));return n("nav",{id:"PaginationContainer",class:"PaginationContainer","aria-label":"Blog pagination",ref:t=>this.stylingContainer=t},this.arrowsActive&&i,this.numberedNavActive&&t,this.arrowsActive&&e)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};u.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:center;align-items:center;gap:4px}.LeftItems .PaginationControl,.RightItems .PaginationControl{position:relative;width:24px;height:28px;padding:0;border:0;border-radius:0;background:transparent;color:#009993;}.LeftItems .PaginationControl[aria-disabled=true],.RightItems .PaginationControl[aria-disabled=true]{background:transparent;color:#009993;opacity:0.35}.LeftItems .PaginationControl .NavigationButton,.RightItems .PaginationControl .NavigationButton{display:none}.LeftItems .PaginationControl .NavigationIcon::before,.LeftItems .PaginationControl .NavigationIcon::after,.RightItems .PaginationControl .NavigationIcon::before,.RightItems .PaginationControl .NavigationIcon::after{content:"";position:absolute;top:50%;left:50%;box-sizing:border-box;width:8px;height:8px;border:solid currentColor;border-width:2px 2px 0 0}.LeftItems .PaginationControl .NavigationIcon::after,.RightItems .PaginationControl .NavigationIcon::after{display:none}.LeftItems .PaginationControl[data-nav=nextPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=nextPage] .NavigationIcon::before{transform:translate(-70%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=previousPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=previousPage] .NavigationIcon::before{transform:translate(-30%, -50%) rotate(-135deg)}.LeftItems .PaginationControl[data-nav=lastPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=lastPage] .NavigationIcon::before{transform:translate(-110%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=lastPage] .NavigationIcon::after,.RightItems .PaginationControl[data-nav=lastPage] .NavigationIcon::after{display:block;transform:translate(-30%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=firstPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=firstPage] .NavigationIcon::before{transform:translate(-70%, -50%) rotate(-135deg)}.LeftItems .PaginationControl[data-nav=firstPage] .NavigationIcon::after,.RightItems .PaginationControl[data-nav=firstPage] .NavigationIcon::after{display:block;transform:translate(10%, -50%) rotate(-135deg)}.PaginationArea{display:inline-flex;gap:10px;list-style:none;margin:0;padding:0}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}';export{c as blog_articles_grid,u as helper_pagination}
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["blog-articles-grid_2.cjs",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
22
+ return index.bootstrapLazy([["blog-articles-grid_2.cjs",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"paginationPosition":[513,"pagination-position"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -307,55 +307,6 @@ const BlogArticlesGrid = class {
307
307
  this.articleActionButton = index.createEvent(this, "articleActionButton", 7);
308
308
  this.lastPage = 1;
309
309
  this.isInitialized = false;
310
- this.paginationDefaultStyling = `
311
- nav#PaginationContainer {
312
- justify-content: right;
313
- }
314
- .LeftItems .PaginationControl .NavigationButton {
315
- display: none;
316
- }
317
- .LeftItems .PaginationControl:after, .RightItems .PaginationControl:after {
318
- padding: 7px 12px;
319
- font-size: 18px;
320
- font-weight: 700;
321
- line-height: 46px;
322
- }
323
- .LeftItems .PaginationControl:after {
324
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E");
325
- }
326
- .RightItems .PaginationControl:after {
327
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E");
328
- display: block;
329
- height: 38px;
330
- }
331
- div.LeftItems .PaginationControl, div.RightItems .PaginationControl {
332
- width: unset;
333
- height: 40px;
334
- background-color: #fff;
335
- color: #000;
336
- border: 1px solid #000;
337
- overflow: hidden;
338
- &[aria-disabled="true"] {
339
- background-color: #989898;
340
- }
341
- }
342
- div.LeftItems .PaginationControl {
343
- min-width: 60px;
344
- border-radius: 20px 0 0 20px;
345
- border-right: 0;
346
- }
347
- div.RightItems .PaginationControl {
348
- display: flex;
349
- min-width: 100px;
350
- justify-content: space-evenly;
351
- align-items: center;
352
- border-radius: 0 20px 20px 0;
353
- text-transform: none;
354
- }
355
- .RightItems .PaginationControl .NavigationButton {
356
- padding: 12px 0 12px 12px;
357
- font-weight: 700;
358
- }`;
359
310
  this.renderContentConditionally = (content) => {
360
311
  if (!content)
361
312
  return null;
@@ -392,6 +343,7 @@ const BlogArticlesGrid = class {
392
343
  this.arrowsActive = true;
393
344
  this.secondaryArrowsActive = false;
394
345
  this.numberedNavActive = false;
346
+ this.paginationPosition = 'top';
395
347
  this.intlDateTimeFormat = '';
396
348
  this.page = '1';
397
349
  this.category = undefined;
@@ -801,7 +753,7 @@ const BlogArticlesGrid = class {
801
753
  return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB', { day: 'numeric', month: 'short', year: 'numeric' }).format(date);
802
754
  }
803
755
  render() {
804
- var _a;
756
+ var _a, _b;
805
757
  if (this.hasErrors) {
806
758
  return (index.h("div", { class: "BlogsContainer" }, !this.hideError && (index.h("div", { class: "ErrorMessage" }, translate$1('error', this.language, this.customTranslations)))));
807
759
  }
@@ -811,9 +763,13 @@ const BlogArticlesGrid = class {
811
763
  for (let i = 0; i < parseInt(this.blogsLimit); i++) {
812
764
  placeholderCards.push(index.h("div", { class: "GridContainer FeaturedPost Skeleton" }, index.h("div", { class: "GridWrapper" }, index.h("div", { class: "GridSector" }, index.h("div", { class: "VisualContent LoadingImage" })), index.h("div", { class: "GridSector" }, index.h("div", { class: "BlogTitle LoadingStripe LoadingSmallStripe" }), index.h("div", { class: "BlogDetails LoadingStripe LoadingMediumStripe" }), index.h("div", { class: "BlogLink LoadingStripe LoadingLongStripe" })))));
813
765
  }
814
- const showPagination = Boolean(this.paginationActive) && this.totalBlogs > +this.blogsLimit;
815
- const paginationClientStyling = !this.mbSource ? (this.clientStyling || this.paginationDefaultStyling) : undefined;
766
+ // A single page still renders "< 1 >" (not for the eventId-filtered list, which is never paginated)
767
+ const isSinglePage = this.totalBlogs <= +this.blogsLimit;
768
+ const showPagination = Boolean(this.paginationActive) && this.totalBlogs > 0 && !(isSinglePage && this.eventId);
769
+ const paginationClientStyling = !this.mbSource ? (this.clientStyling || undefined) : undefined;
816
770
  const activeCategory = this.getActiveCategory();
771
+ const pagination = (index.h("div", { class: "BlogGridPaginationWrapper" }, showPagination && index.h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive || isSinglePage, "page-query-param": this.pageQueryParam })));
772
+ const paginationOnTop = String((_a = this.paginationPosition) !== null && _a !== void 0 ? _a : '').trim().toLowerCase() !== 'bottom';
817
773
  return (index.h("div", { ref: el => this.stylingContainer = el }, this.showBreadcrumb && (index.h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, index.h("a", { href: `/${encodeURIComponent(this.language)}` }, translate$1('home', this.language, this.customTranslations)), index.h("span", { "aria-hidden": "true" }, "\u203A"), activeCategory && this.selectedCategory !== ALL_CATEGORY_ID ? [
818
774
  index.h("a", { href: `/${encodeURIComponent(this.language)}/blog` }, translate$1('blog', this.language, this.customTranslations)),
819
775
  index.h("span", { "aria-hidden": "true" }, "\u203A"),
@@ -823,7 +779,7 @@ const BlogArticlesGrid = class {
823
779
  index.h("div", { class: "BlogCategoriesSliderWrapper" }, index.h("div", { class: "CarouselWrapper" }, index.h("div", { class: "CarouselContainer" }, index.h("div", { class: "BlogCategoriesWrapper" }, index.h("div", { class: "CategoryButtons" }, this.categories.filter(category => !this.hideEmptyCategories || category.id === this.selectedCategory || Number(category.postsCount) !== 0).map(category => (index.h("a", { href: this.getCategoryHref(category), "aria-current": this.selectedCategory === category.id ? 'page' : undefined, key: category.id, class: {
824
780
  CategoryButton: true,
825
781
  active: this.selectedCategory === category.id,
826
- }, onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))))))), index.h("div", { class: "BlogGridPaginationWrapper" }, showPagination && index.h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (index.h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === ALL_CATEGORY_ID ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
782
+ }, onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))))))), paginationOnTop && pagination, !this.isLoading && ((_b = this.displayedBlogResponse) === null || _b === void 0 ? void 0 : _b.items.length) === 0 && (index.h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === ALL_CATEGORY_ID ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
827
783
  index.h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage} ${this.device}` }, this.displayedBlogResponse && this.displayedBlogResponse.items.map((data) => {
828
784
  var _a, _b;
829
785
  const cardCategories = this.categories.filter(category => {
@@ -837,7 +793,7 @@ const BlogArticlesGrid = class {
837
793
  this.renderContentConditionally(data.descriptionPreview), this.showButton &&
838
794
  index.h("span", { class: "BlogLink" }, translate$1('readmore', this.language, this.customTranslations))))));
839
795
  })), (this.isLoading) &&
840
- index.h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards))));
796
+ index.h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards), !paginationOnTop && pagination)));
841
797
  }
842
798
  static get watchers() { return {
843
799
  "hasErrors": ["watchEndpoint"],
@@ -912,7 +868,7 @@ const translate = (key, customLang) => {
912
868
  return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
913
869
  };
914
870
 
915
- const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems .PaginationControl:not(:first-child),.RightItems .PaginationControl:not(:last-child){margin:0 10px}.LeftItems .PaginationControl,.RightItems .PaginationControl{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){#PaginationContainer{flex-wrap:wrap;row-gap:10px}#PaginationContainer .LeftItems,#PaginationContainer .RightItems{display:flex;flex-direction:column;gap:10px}#PaginationContainer .RightItems{flex-direction:column-reverse}#PaginationContainer .PaginationControl{margin:0}#PaginationContainer .PaginationArea{order:1;flex-basis:100%;justify-content:center;margin:0;padding:0}a,.PaginationControl{width:90px;font-size:14px}}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}";
871
+ const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:center;align-items:center;gap:4px}.LeftItems .PaginationControl,.RightItems .PaginationControl{position:relative;width:24px;height:28px;padding:0;border:0;border-radius:0;background:transparent;color:#009993;}.LeftItems .PaginationControl[aria-disabled=true],.RightItems .PaginationControl[aria-disabled=true]{background:transparent;color:#009993;opacity:0.35}.LeftItems .PaginationControl .NavigationButton,.RightItems .PaginationControl .NavigationButton{display:none}.LeftItems .PaginationControl .NavigationIcon::before,.LeftItems .PaginationControl .NavigationIcon::after,.RightItems .PaginationControl .NavigationIcon::before,.RightItems .PaginationControl .NavigationIcon::after{content:\"\";position:absolute;top:50%;left:50%;box-sizing:border-box;width:8px;height:8px;border:solid currentColor;border-width:2px 2px 0 0}.LeftItems .PaginationControl .NavigationIcon::after,.RightItems .PaginationControl .NavigationIcon::after{display:none}.LeftItems .PaginationControl[data-nav=nextPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=nextPage] .NavigationIcon::before{transform:translate(-70%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=previousPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=previousPage] .NavigationIcon::before{transform:translate(-30%, -50%) rotate(-135deg)}.LeftItems .PaginationControl[data-nav=lastPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=lastPage] .NavigationIcon::before{transform:translate(-110%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=lastPage] .NavigationIcon::after,.RightItems .PaginationControl[data-nav=lastPage] .NavigationIcon::after{display:block;transform:translate(-30%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=firstPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=firstPage] .NavigationIcon::before{transform:translate(-70%, -50%) rotate(-135deg)}.LeftItems .PaginationControl[data-nav=firstPage] .NavigationIcon::after,.RightItems .PaginationControl[data-nav=firstPage] .NavigationIcon::after{display:block;transform:translate(10%, -50%) rotate(-135deg)}.PaginationArea{display:inline-flex;gap:10px;list-style:none;margin:0;padding:0}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}";
916
872
  const HelperPaginationStyle0 = helperPaginationCss;
917
873
 
918
874
  const HelperPagination = class {
@@ -1072,7 +1028,7 @@ const HelperPagination = class {
1072
1028
  renderNavigationButton(page, navigation, enabled, rel) {
1073
1029
  const Tag = enabled ? 'a' : 'span';
1074
1030
  const label = translate(navigation, this.language);
1075
- return (index.h(Tag, { class: "PaginationControl", href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
1031
+ return (index.h(Tag, { class: "PaginationControl", "data-nav": navigation, href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
1076
1032
  if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
1077
1033
  return;
1078
1034
  event.preventDefault();
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["blog-articles-grid_2.cjs",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
11
+ return index.bootstrapLazy([["blog-articles-grid_2.cjs",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"paginationPosition":[513,"pagination-position"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -9,55 +9,6 @@ export class BlogArticlesGrid {
9
9
  constructor() {
10
10
  this.lastPage = 1;
11
11
  this.isInitialized = false;
12
- this.paginationDefaultStyling = `
13
- nav#PaginationContainer {
14
- justify-content: right;
15
- }
16
- .LeftItems .PaginationControl .NavigationButton {
17
- display: none;
18
- }
19
- .LeftItems .PaginationControl:after, .RightItems .PaginationControl:after {
20
- padding: 7px 12px;
21
- font-size: 18px;
22
- font-weight: 700;
23
- line-height: 46px;
24
- }
25
- .LeftItems .PaginationControl:after {
26
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E");
27
- }
28
- .RightItems .PaginationControl:after {
29
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E");
30
- display: block;
31
- height: 38px;
32
- }
33
- div.LeftItems .PaginationControl, div.RightItems .PaginationControl {
34
- width: unset;
35
- height: 40px;
36
- background-color: #fff;
37
- color: #000;
38
- border: 1px solid #000;
39
- overflow: hidden;
40
- &[aria-disabled="true"] {
41
- background-color: #989898;
42
- }
43
- }
44
- div.LeftItems .PaginationControl {
45
- min-width: 60px;
46
- border-radius: 20px 0 0 20px;
47
- border-right: 0;
48
- }
49
- div.RightItems .PaginationControl {
50
- display: flex;
51
- min-width: 100px;
52
- justify-content: space-evenly;
53
- align-items: center;
54
- border-radius: 0 20px 20px 0;
55
- text-transform: none;
56
- }
57
- .RightItems .PaginationControl .NavigationButton {
58
- padding: 12px 0 12px 12px;
59
- font-weight: 700;
60
- }`;
61
12
  this.renderContentConditionally = (content) => {
62
13
  if (!content)
63
14
  return null;
@@ -94,6 +45,7 @@ export class BlogArticlesGrid {
94
45
  this.arrowsActive = true;
95
46
  this.secondaryArrowsActive = false;
96
47
  this.numberedNavActive = false;
48
+ this.paginationPosition = 'top';
97
49
  this.intlDateTimeFormat = '';
98
50
  this.page = '1';
99
51
  this.category = undefined;
@@ -503,7 +455,7 @@ export class BlogArticlesGrid {
503
455
  return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB', { day: 'numeric', month: 'short', year: 'numeric' }).format(date);
504
456
  }
505
457
  render() {
506
- var _a;
458
+ var _a, _b;
507
459
  if (this.hasErrors) {
508
460
  return (h("div", { class: "BlogsContainer" }, !this.hideError && (h("div", { class: "ErrorMessage" }, translate('error', this.language, this.customTranslations)))));
509
461
  }
@@ -513,9 +465,13 @@ export class BlogArticlesGrid {
513
465
  for (let i = 0; i < parseInt(this.blogsLimit); i++) {
514
466
  placeholderCards.push(h("div", { class: "GridContainer FeaturedPost Skeleton" }, h("div", { class: "GridWrapper" }, h("div", { class: "GridSector" }, h("div", { class: "VisualContent LoadingImage" })), h("div", { class: "GridSector" }, h("div", { class: "BlogTitle LoadingStripe LoadingSmallStripe" }), h("div", { class: "BlogDetails LoadingStripe LoadingMediumStripe" }), h("div", { class: "BlogLink LoadingStripe LoadingLongStripe" })))));
515
467
  }
516
- const showPagination = Boolean(this.paginationActive) && this.totalBlogs > +this.blogsLimit;
517
- const paginationClientStyling = !this.mbSource ? (this.clientStyling || this.paginationDefaultStyling) : undefined;
468
+ // A single page still renders "< 1 >" (not for the eventId-filtered list, which is never paginated)
469
+ const isSinglePage = this.totalBlogs <= +this.blogsLimit;
470
+ const showPagination = Boolean(this.paginationActive) && this.totalBlogs > 0 && !(isSinglePage && this.eventId);
471
+ const paginationClientStyling = !this.mbSource ? (this.clientStyling || undefined) : undefined;
518
472
  const activeCategory = this.getActiveCategory();
473
+ const pagination = (h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive || isSinglePage, "page-query-param": this.pageQueryParam })));
474
+ const paginationOnTop = String((_a = this.paginationPosition) !== null && _a !== void 0 ? _a : '').trim().toLowerCase() !== 'bottom';
519
475
  return (h("div", { ref: el => this.stylingContainer = el }, this.showBreadcrumb && (h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, h("a", { href: `/${encodeURIComponent(this.language)}` }, translate('home', this.language, this.customTranslations)), h("span", { "aria-hidden": "true" }, "\u203A"), activeCategory && this.selectedCategory !== ALL_CATEGORY_ID ? [
520
476
  h("a", { href: `/${encodeURIComponent(this.language)}/blog` }, translate('blog', this.language, this.customTranslations)),
521
477
  h("span", { "aria-hidden": "true" }, "\u203A"),
@@ -525,7 +481,7 @@ export class BlogArticlesGrid {
525
481
  h("div", { class: "BlogCategoriesSliderWrapper" }, h("div", { class: "CarouselWrapper" }, h("div", { class: "CarouselContainer" }, h("div", { class: "BlogCategoriesWrapper" }, h("div", { class: "CategoryButtons" }, this.categories.filter(category => !this.hideEmptyCategories || category.id === this.selectedCategory || Number(category.postsCount) !== 0).map(category => (h("a", { href: this.getCategoryHref(category), "aria-current": this.selectedCategory === category.id ? 'page' : undefined, key: category.id, class: {
526
482
  CategoryButton: true,
527
483
  active: this.selectedCategory === category.id,
528
- }, onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate(this.selectedCategory === ALL_CATEGORY_ID ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
484
+ }, onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))))))), paginationOnTop && pagination, !this.isLoading && ((_b = this.displayedBlogResponse) === null || _b === void 0 ? void 0 : _b.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate(this.selectedCategory === ALL_CATEGORY_ID ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
529
485
  h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage} ${this.device}` }, this.displayedBlogResponse && this.displayedBlogResponse.items.map((data) => {
530
486
  var _a, _b;
531
487
  const cardCategories = this.categories.filter(category => {
@@ -539,7 +495,7 @@ export class BlogArticlesGrid {
539
495
  this.renderContentConditionally(data.descriptionPreview), this.showButton &&
540
496
  h("span", { class: "BlogLink" }, translate('readmore', this.language, this.customTranslations))))));
541
497
  })), (this.isLoading) &&
542
- h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards))));
498
+ h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards), !paginationOnTop && pagination)));
543
499
  }
544
500
  static get is() { return "blog-articles-grid"; }
545
501
  static get encapsulation() { return "shadow"; }
@@ -1037,6 +993,24 @@ export class BlogArticlesGrid {
1037
993
  "reflect": true,
1038
994
  "defaultValue": "false"
1039
995
  },
996
+ "paginationPosition": {
997
+ "type": "string",
998
+ "mutable": false,
999
+ "complexType": {
1000
+ "original": "string",
1001
+ "resolved": "string",
1002
+ "references": {}
1003
+ },
1004
+ "required": false,
1005
+ "optional": false,
1006
+ "docs": {
1007
+ "tags": [],
1008
+ "text": "Customize pagination: where the pagination is placed relative to the articles ('top' or 'bottom')"
1009
+ },
1010
+ "attribute": "pagination-position",
1011
+ "reflect": true,
1012
+ "defaultValue": "'top'"
1013
+ },
1040
1014
  "intlDateTimeFormat": {
1041
1015
  "type": "string",
1042
1016
  "mutable": false,
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["blog-articles-grid_2",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
19
+ return bootstrapLazy([["blog-articles-grid_2",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"paginationPosition":[513,"pagination-position"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
20
20
  });
@@ -303,55 +303,6 @@ const BlogArticlesGrid = class {
303
303
  this.articleActionButton = createEvent(this, "articleActionButton", 7);
304
304
  this.lastPage = 1;
305
305
  this.isInitialized = false;
306
- this.paginationDefaultStyling = `
307
- nav#PaginationContainer {
308
- justify-content: right;
309
- }
310
- .LeftItems .PaginationControl .NavigationButton {
311
- display: none;
312
- }
313
- .LeftItems .PaginationControl:after, .RightItems .PaginationControl:after {
314
- padding: 7px 12px;
315
- font-size: 18px;
316
- font-weight: 700;
317
- line-height: 46px;
318
- }
319
- .LeftItems .PaginationControl:after {
320
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z'/%3E%3C/svg%3E");
321
- }
322
- .RightItems .PaginationControl:after {
323
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1.2em' viewBox='0 0 320 512'%3E%3C!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --%3E%3Cpath d='M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z'/%3E%3C/svg%3E");
324
- display: block;
325
- height: 38px;
326
- }
327
- div.LeftItems .PaginationControl, div.RightItems .PaginationControl {
328
- width: unset;
329
- height: 40px;
330
- background-color: #fff;
331
- color: #000;
332
- border: 1px solid #000;
333
- overflow: hidden;
334
- &[aria-disabled="true"] {
335
- background-color: #989898;
336
- }
337
- }
338
- div.LeftItems .PaginationControl {
339
- min-width: 60px;
340
- border-radius: 20px 0 0 20px;
341
- border-right: 0;
342
- }
343
- div.RightItems .PaginationControl {
344
- display: flex;
345
- min-width: 100px;
346
- justify-content: space-evenly;
347
- align-items: center;
348
- border-radius: 0 20px 20px 0;
349
- text-transform: none;
350
- }
351
- .RightItems .PaginationControl .NavigationButton {
352
- padding: 12px 0 12px 12px;
353
- font-weight: 700;
354
- }`;
355
306
  this.renderContentConditionally = (content) => {
356
307
  if (!content)
357
308
  return null;
@@ -388,6 +339,7 @@ const BlogArticlesGrid = class {
388
339
  this.arrowsActive = true;
389
340
  this.secondaryArrowsActive = false;
390
341
  this.numberedNavActive = false;
342
+ this.paginationPosition = 'top';
391
343
  this.intlDateTimeFormat = '';
392
344
  this.page = '1';
393
345
  this.category = undefined;
@@ -797,7 +749,7 @@ const BlogArticlesGrid = class {
797
749
  return new Intl.DateTimeFormat(this.intlDateTimeFormat || 'en-GB', { day: 'numeric', month: 'short', year: 'numeric' }).format(date);
798
750
  }
799
751
  render() {
800
- var _a;
752
+ var _a, _b;
801
753
  if (this.hasErrors) {
802
754
  return (h("div", { class: "BlogsContainer" }, !this.hideError && (h("div", { class: "ErrorMessage" }, translate$1('error', this.language, this.customTranslations)))));
803
755
  }
@@ -807,9 +759,13 @@ const BlogArticlesGrid = class {
807
759
  for (let i = 0; i < parseInt(this.blogsLimit); i++) {
808
760
  placeholderCards.push(h("div", { class: "GridContainer FeaturedPost Skeleton" }, h("div", { class: "GridWrapper" }, h("div", { class: "GridSector" }, h("div", { class: "VisualContent LoadingImage" })), h("div", { class: "GridSector" }, h("div", { class: "BlogTitle LoadingStripe LoadingSmallStripe" }), h("div", { class: "BlogDetails LoadingStripe LoadingMediumStripe" }), h("div", { class: "BlogLink LoadingStripe LoadingLongStripe" })))));
809
761
  }
810
- const showPagination = Boolean(this.paginationActive) && this.totalBlogs > +this.blogsLimit;
811
- const paginationClientStyling = !this.mbSource ? (this.clientStyling || this.paginationDefaultStyling) : undefined;
762
+ // A single page still renders "< 1 >" (not for the eventId-filtered list, which is never paginated)
763
+ const isSinglePage = this.totalBlogs <= +this.blogsLimit;
764
+ const showPagination = Boolean(this.paginationActive) && this.totalBlogs > 0 && !(isSinglePage && this.eventId);
765
+ const paginationClientStyling = !this.mbSource ? (this.clientStyling || undefined) : undefined;
812
766
  const activeCategory = this.getActiveCategory();
767
+ const pagination = (h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive || isSinglePage, "page-query-param": this.pageQueryParam })));
768
+ const paginationOnTop = String((_a = this.paginationPosition) !== null && _a !== void 0 ? _a : '').trim().toLowerCase() !== 'bottom';
813
769
  return (h("div", { ref: el => this.stylingContainer = el }, this.showBreadcrumb && (h("nav", { class: "breadcrumb", "aria-label": "Breadcrumb" }, h("a", { href: `/${encodeURIComponent(this.language)}` }, translate$1('home', this.language, this.customTranslations)), h("span", { "aria-hidden": "true" }, "\u203A"), activeCategory && this.selectedCategory !== ALL_CATEGORY_ID ? [
814
770
  h("a", { href: `/${encodeURIComponent(this.language)}/blog` }, translate$1('blog', this.language, this.customTranslations)),
815
771
  h("span", { "aria-hidden": "true" }, "\u203A"),
@@ -819,7 +775,7 @@ const BlogArticlesGrid = class {
819
775
  h("div", { class: "BlogCategoriesSliderWrapper" }, h("div", { class: "CarouselWrapper" }, h("div", { class: "CarouselContainer" }, h("div", { class: "BlogCategoriesWrapper" }, h("div", { class: "CategoryButtons" }, this.categories.filter(category => !this.hideEmptyCategories || category.id === this.selectedCategory || Number(category.postsCount) !== 0).map(category => (h("a", { href: this.getCategoryHref(category), "aria-current": this.selectedCategory === category.id ? 'page' : undefined, key: category.id, class: {
820
776
  CategoryButton: true,
821
777
  active: this.selectedCategory === category.id,
822
- }, onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))))))), h("div", { class: "BlogGridPaginationWrapper" }, showPagination && h("helper-pagination", { "next-page": this.nextPage, "prev-page": this.previousPage, offset: this.paginationBlogList.offset, limit: parseInt(this.blogsLimit, 10), total: this.totalBlogs, language: this.language, "mb-source": this.mbSource, "client-styling": paginationClientStyling, "client-styling-url": this.clientStylingUrl, "arrows-active": this.arrowsActive, "secondary-arrows-active": this.secondaryArrowsActive, "numbered-nav-active": this.numberedNavActive, "page-query-param": this.pageQueryParam })), !this.isLoading && ((_a = this.displayedBlogResponse) === null || _a === void 0 ? void 0 : _a.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === ALL_CATEGORY_ID ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
778
+ }, onClick: event => this.handleCategoryClick(event, category.id) }, category.name)))))))), paginationOnTop && pagination, !this.isLoading && ((_b = this.displayedBlogResponse) === null || _b === void 0 ? void 0 : _b.items.length) === 0 && (h("p", { class: "EmptyState", role: "status" }, translate$1(this.selectedCategory === ALL_CATEGORY_ID ? 'emptyState' : 'emptyCategoryState', this.language, this.customTranslations))), (!this.isLoading) &&
823
779
  h("div", { class: `GridContainerWrapper BlogPage-${this.currentPage} ${this.device}` }, this.displayedBlogResponse && this.displayedBlogResponse.items.map((data) => {
824
780
  var _a, _b;
825
781
  const cardCategories = this.categories.filter(category => {
@@ -833,7 +789,7 @@ const BlogArticlesGrid = class {
833
789
  this.renderContentConditionally(data.descriptionPreview), this.showButton &&
834
790
  h("span", { class: "BlogLink" }, translate$1('readmore', this.language, this.customTranslations))))));
835
791
  })), (this.isLoading) &&
836
- h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards))));
792
+ h("div", { class: "GridContainerWrapper LoadingGrid" }, placeholderCards), !paginationOnTop && pagination)));
837
793
  }
838
794
  static get watchers() { return {
839
795
  "hasErrors": ["watchEndpoint"],
@@ -908,7 +864,7 @@ const translate = (key, customLang) => {
908
864
  return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
909
865
  };
910
866
 
911
- const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems .PaginationControl:not(:first-child),.RightItems .PaginationControl:not(:last-child){margin:0 10px}.LeftItems .PaginationControl,.RightItems .PaginationControl{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){#PaginationContainer{flex-wrap:wrap;row-gap:10px}#PaginationContainer .LeftItems,#PaginationContainer .RightItems{display:flex;flex-direction:column;gap:10px}#PaginationContainer .RightItems{flex-direction:column-reverse}#PaginationContainer .PaginationControl{margin:0}#PaginationContainer .PaginationArea{order:1;flex-basis:100%;justify-content:center;margin:0;padding:0}a,.PaginationControl{width:90px;font-size:14px}}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}";
867
+ const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:center;align-items:center;gap:4px}.LeftItems .PaginationControl,.RightItems .PaginationControl{position:relative;width:24px;height:28px;padding:0;border:0;border-radius:0;background:transparent;color:#009993;}.LeftItems .PaginationControl[aria-disabled=true],.RightItems .PaginationControl[aria-disabled=true]{background:transparent;color:#009993;opacity:0.35}.LeftItems .PaginationControl .NavigationButton,.RightItems .PaginationControl .NavigationButton{display:none}.LeftItems .PaginationControl .NavigationIcon::before,.LeftItems .PaginationControl .NavigationIcon::after,.RightItems .PaginationControl .NavigationIcon::before,.RightItems .PaginationControl .NavigationIcon::after{content:\"\";position:absolute;top:50%;left:50%;box-sizing:border-box;width:8px;height:8px;border:solid currentColor;border-width:2px 2px 0 0}.LeftItems .PaginationControl .NavigationIcon::after,.RightItems .PaginationControl .NavigationIcon::after{display:none}.LeftItems .PaginationControl[data-nav=nextPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=nextPage] .NavigationIcon::before{transform:translate(-70%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=previousPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=previousPage] .NavigationIcon::before{transform:translate(-30%, -50%) rotate(-135deg)}.LeftItems .PaginationControl[data-nav=lastPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=lastPage] .NavigationIcon::before{transform:translate(-110%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=lastPage] .NavigationIcon::after,.RightItems .PaginationControl[data-nav=lastPage] .NavigationIcon::after{display:block;transform:translate(-30%, -50%) rotate(45deg)}.LeftItems .PaginationControl[data-nav=firstPage] .NavigationIcon::before,.RightItems .PaginationControl[data-nav=firstPage] .NavigationIcon::before{transform:translate(-70%, -50%) rotate(-135deg)}.LeftItems .PaginationControl[data-nav=firstPage] .NavigationIcon::after,.RightItems .PaginationControl[data-nav=firstPage] .NavigationIcon::after{display:block;transform:translate(10%, -50%) rotate(-135deg)}.PaginationArea{display:inline-flex;gap:10px;list-style:none;margin:0;padding:0}.PaginationArea li{margin:0;padding:0}.PaginationArea li a{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}";
912
868
  const HelperPaginationStyle0 = helperPaginationCss;
913
869
 
914
870
  const HelperPagination = class {
@@ -1068,7 +1024,7 @@ const HelperPagination = class {
1068
1024
  renderNavigationButton(page, navigation, enabled, rel) {
1069
1025
  const Tag = enabled ? 'a' : 'span';
1070
1026
  const label = translate(navigation, this.language);
1071
- return (h(Tag, { class: "PaginationControl", href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
1027
+ return (h(Tag, { class: "PaginationControl", "data-nav": navigation, href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
1072
1028
  if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
1073
1029
  return;
1074
1030
  event.preventDefault();
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["blog-articles-grid_2",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
8
+ return bootstrapLazy([["blog-articles-grid_2",[[1,"blog-articles-grid",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"translationUrl":[513,"translation-url"],"userRoles":[513,"user-roles"],"cmsEnv":[513,"cms-env"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showPublishingDate":[516,"show-publishing-date"],"showBlogSubcategories":[516,"show-blog-subcategories"],"hideCategory":[513,"hide-category"],"showImage":[516,"show-image"],"showTitle":[516,"show-title"],"showPageTitle":[516,"show-page-title"],"useCategoryMetadataTitle":[516,"use-category-metadata-title"],"hideEmptyCategories":[516,"hide-empty-categories"],"showBreadcrumb":[516,"show-breadcrumb"],"showContent":[516,"show-content"],"showButton":[516,"show-button"],"hideError":[516,"hide-error"],"usePostmessage":[516,"use-postmessage"],"postMessageEvent":[513,"post-message-event"],"blogsLimit":[513,"blogs-limit"],"paginationActive":[516,"pagination-active"],"arrowsActive":[516,"arrows-active"],"secondaryArrowsActive":[516,"secondary-arrows-active"],"numberedNavActive":[516,"numbered-nav-active"],"paginationPosition":[513,"pagination-position"],"intlDateTimeFormat":[513,"intl-date-time-format"],"page":[1537],"category":[513],"pageQueryParam":[1,"page-query-param"],"eventId":[513,"event-id"],"paginationBlogList":[32],"currentPage":[32],"hasErrors":[32],"isLoading":[32],"bannerMatrixReady":[32],"nextPage":[32],"previousPage":[32],"device":[32],"displayedBlogResponse":[32],"paginationBlogResponse":[32],"allBlogResponse":[32],"totalBlogs":[32],"customTranslations":[32],"selectedCategory":[32],"categories":[32]},[[8,"BannerMatrixReady","handleBannerReady"],[8,"popstate","handlePopState"],[0,"hpPageChange","hpPageChange"]],{"hasErrors":["watchEndpoint"],"cmsEndpoint":["watchEndpoint"],"language":["watchEndpoint"],"cmsEnv":["watchEndpoint"],"userRoles":["watchEndpoint"],"blogsLimit":["watchEndpoint"],"eventId":["watchEndpoint"],"page":["handlePageChange"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"],"translationUrl":["loadTranslations"]}],[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"mbSource":[1,"mb-source"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[1537,"client-styling-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"pageQueryParam":[1,"page-query-param"],"page":[2],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -111,6 +111,10 @@ export declare class BlogArticlesGrid {
111
111
  * Customize pagination: Activate pagination numbered navigation
112
112
  */
113
113
  numberedNavActive: boolean;
114
+ /**
115
+ * Customize pagination: where the pagination is placed relative to the articles ('top' or 'bottom')
116
+ */
117
+ paginationPosition: string;
114
118
  /**
115
119
  * Intl date format
116
120
  */
@@ -160,7 +164,6 @@ export declare class BlogArticlesGrid {
160
164
  loadTranslations(): Promise<void>;
161
165
  private stylingContainer?;
162
166
  private stylingSubscription;
163
- private paginationDefaultStyling;
164
167
  hpPageChange(event: CustomEvent<{
165
168
  offset: number;
166
169
  limit: number;
@@ -76,6 +76,10 @@ export namespace Components {
76
76
  * Customize pagination: Activate pagination
77
77
  */
78
78
  "paginationActive"?: boolean;
79
+ /**
80
+ * Customize pagination: where the pagination is placed relative to the articles ('top' or 'bottom')
81
+ */
82
+ "paginationPosition": string;
79
83
  /**
80
84
  * Event name sent to the host app on card activation
81
85
  */
@@ -232,6 +236,10 @@ declare namespace LocalJSX {
232
236
  * Customize pagination: Activate pagination
233
237
  */
234
238
  "paginationActive"?: boolean;
239
+ /**
240
+ * Customize pagination: where the pagination is placed relative to the articles ('top' or 'bottom')
241
+ */
242
+ "paginationPosition"?: string;
235
243
  /**
236
244
  * Event name sent to the host app on card activation
237
245
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/blog-articles-grid",
3
- "version": "1.99.45",
3
+ "version": "1.99.46",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",