1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[890],{63646:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/coupons",function(){return c(35630)}])},35630:function(d,b,a){"use strict";a.r(b),a.d(b,{"__N_SSP":function(){return G},"default":function(){return H}});var e=a(85893),f=a(67294),c=a(34051),g=a.n(c),h=a(11163),i=a(16573),j=a(1020),k=a(46616),l=a(87385),m=a(53597),n=a(37332),o=a(12834),p=a(69275),q=a(48137),r=a(66339),s=a(96652),t=a(11250),u=a(27044),v=a(15254),w=a(73984),x=a(6666);function y(a){var o=a.id,i=a.name,j=a.description,k=a.tenantLogoUrl,l=a.bgColor,m=a.iconUrl,n=a.isCampaignActive,p=a.onVote,q=a.onShowMore,c=(0,v.$G)("common").t,d=(0,f.useState)(!1),b=d[0],r=d[1],g=(0,f.useState)(!1),h=g[0],s=g[1];return(0,e.jsxs)("div",{className:"relative h-56 md:h-64 w-full flex",children:[(0,e.jsx)(x.Z,{url:k,className:"absolute translate-y-[-3rem] md:translate-y-[-4rem] transform transition-all right-1/2 translate-x-[50%] z-10 bg-white shadow-tenantLogoShadow w-[90px] h-[90px] md:w-[120px] md:h-[120px]"}),(0,e.jsx)("div",{className:"h-56 md:h-64 translate-y-[0rem] transform transition-height flex flex-col text-light-black w-full",children:(0,e.jsxs)("div",{className:"relative flex flex-col h-full justify-end items-center",style:{background:l},children:[b?(0,e.jsx)("div",{className:"flex justify-center items-center h-screen pt-[4rem]",children:(0,e.jsx)("div",{className:"overflow-y-scroll h-[5rem] w-[90%] md:h-[7rem] text-sm pt-[1rem]",style:{overflow:"auto"},children:j})}):(0,e.jsx)("div",{className:"relative flex items-center text-5 font-normal",children:(0,e.jsx)("div",{className:"w-[2.9rem] mb-10 md:mb-14",children:(0,e.jsx)("img",{alt:"icon",className:"w-full object-cover",src:"".concat(w.API_URL).concat(m)})})}),n?(0,e.jsx)("div",{className:"px-2 py-4 w-full h-fit md:py-3 font-bold ".concat(b?"text-black text-[1.6rem] md:text-[1.5rem] md:font-bold pb-6 md:pb-4":"bg-black text-white md:text-lg md:font-semibold cursor-pointer"," flex justify-center items-center"),onClick:function(){b||(r(!0),q(o))},children:(0,e.jsx)("span",{className:"line-clamp-1 md:line-clamp-none",children:b?i:c("coupons.showMore")})}):(0,e.jsx)("div",{className:"px-2 py-4 w-full h-fit md:py-3 font-bold md:text-lg ".concat(h?"cursor-auto text-black":"cursor-pointer bg-black text-white md:font-semibold"," flex justify-center items-center"),onClick:function(){h||(s(!0),p(o))},children:(0,e.jsx)("span",{className:"line-clamp-1 md:line-clamp-none",children:c(h?"coupons.voted":"coupons.vote")})})]})})]})}var z=a(76547);function A(c,a){(null==a||a>c.length)&&(a=c.length);for(var b=0,d=new Array(a);b<a;b++)d[b]=c[b];return d}function B(c,d,e,f,g,h,i){try{var a=c[h](i),b=a.value}catch(j){e(j);return}a.done?d(b):Promise.resolve(b).then(f,g)}function C(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function D(a){return function(a){if(Array.isArray(a))return A(a)}(a)||function(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}(a)||E(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(a,c){if(a){if("string"==typeof a)return A(a,c);var b=Object.prototype.toString.call(a).slice(8,-1);if("Object"===b&&a.constructor&&(b=a.constructor.name),"Map"===b||"Set"===b)return Array.from(b);if("Arguments"===b||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return A(a,c)}}var F=function(M){var E,F,G,v=M.props,N=v.t,I=(0,f.useState)(),b=I[0],O=I[1],J=(0,f.useState)([]),K=J[0],P=J[1],L=(0,f.useState)({page:1,pageCount:1,pageSize:25,total:1}),H=L[0],Q=L[1],a=null==v?void 0:null===(E=v.couponsPage)|| void 0===E?void 0:E.data,w=null==a?void 0:a.mainBanner,x=null==a?void 0:a.secondaryBanner,A=null==a?void 0:a.pdf,c=null==v?void 0:null===(F=v.staticData)|| void 0===F?void 0:null===(G=F.seoData)|| void 0===G?void 0:G.seo,d=null==a?void 0:a.seo,R=(0,h.useRouter)().locale;(0,f.useEffect)(function(){var a,b;(b=(a=g().mark(function a(){var b,c;return g().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=3,s.d.getAllCoupons(R,H);case 3:(null==(c=a.sent)?void 0:null===(b=c.meta)|| void 0===b?void 0:b.pagination)&&Q(c.meta.pagination),P(D(K).concat(D(null==c?void 0:c.data)));case 6:case"end":return a.stop()}},a)}),function(){var b=this,c=arguments;return new Promise(function(e,f){var g=a.apply(b,c);function d(a){B(g,e,f,d,h,"next",a)}function h(a){B(g,e,f,d,h,"throw",a)}d(void 0)})}),function(){return b.apply(this,arguments)})()},[H.page]),(0,f.useEffect)(function(){O(window.location.href)},[]);var S=function(h){var b,c,d,e,f,g;return"Fixed Amount"===h?null==a?void 0:null===(d=a.amountIcon)|| void 0===d?void 0:null===(e=d[0])|| void 0===e?void 0:e.url:"Gift"===h?null==a?void 0:null===(f=a.giftIcon)|| void 0===f?void 0:null===(g=f[0])|| void 0===g?void 0:g.url:null==a?void 0:null===(b=a.percentageIcon)|| void 0===b?void 0:null===(c=b[0])|| void 0===c?void 0:c.url};return(0,e.jsxs)("section",{className:"flex flex-col items-center justify-center h-fit pb-8 ",children:[(0,e.jsx)(t.Z,{title:((null==d?void 0:d.metaTitle)||(null==a?void 0:a.title))+" | "+(null==c?void 0:c.metaTitle),description:(null==d?void 0:d.metaDescription)||(null==c?void 0:c.metaDescription),keywords:(null==d?void 0:d.keywords)||(null==c?void 0:c.keywords)}),(0,e.jsx)("div",{className:"relative w-full",children:(0,e.jsx)(u.Z,{url:null==w?void 0:w.hash,ext:null==w?void 0:w.ext,className:"w-full h-full min-h-[200px] object-cover",native:!0})}),(0,e.jsxs)("div",{className:"flex flex-col w-full max-w-7xl px-4 md:px-12",children:[(null==a?void 0:a.description)&&(0,e.jsx)("div",{className:"flex justify-center w-full pt-12 md:pt-18",children:(0,e.jsx)("div",{id:"strapi-editor",className:"md:w-[75%]",dangerouslySetInnerHTML:{__html:null==a?void 0:a.description}})}),(null==a?void 0:a.isActive)&&(null==A?void 0:A.url)&&(0,e.jsx)("div",{className:"flex justify-center mt-8",children:(0,e.jsx)("a",{className:"w-fit my-4 hover:bg-black hover:text-white transform ease-in duration-300 py-3 px-16 border border-gray-500",target:"_blank",href:null==A?void 0:A.url,rel:"noreferrer",onClick:function(){return s.d.markDownloadCoupons(R)},children:null==a?void 0:a.buttonLabel})}),(0,e.jsx)("h1",{className:"w-full text-center font-semibold text-3xl my-7 md:my-14","aria-label":"Offers",children:null==a?void 0:a.title}),(0,e.jsx)("div",{className:"mt-2 grid md:grid-cols-2 lg:grid-cols-4 gap-6 gap-y-24 w-full py-16 place-items-center",children:null==K?void 0:K.map(function(c){var d,f,g,b=c;return(0,e.jsx)("div",{className:"flex flex-col w-full text-center",children:(0,e.jsx)("div",{className:"h-full mt-auto",children:(0,e.jsx)(y,{id:null==c?void 0:c.id,name:null==b?void 0:b.value,description:null==b?void 0:b.description,tenantLogoUrl:null==b?void 0:null===(d=b.tenant)|| void 0===d?void 0:null===(f=d.logo)|| void 0===f?void 0:f.url,bgColor:"Fixed Amount"===(g=null==b?void 0:b.type)?null==a?void 0:a.amountColor:"Gift"===g?null==a?void 0:a.giftColor:null==a?void 0:a.percentageColor,iconUrl:S(null==b?void 0:b.type),isCampaignActive:null==a?void 0:a.isActive,onVote:function(a){return s.d.markVoteCoupon(a,R)},onShowMore:function(a){return s.d.markShowCoupon(a,R)}})})},null==c?void 0:c.id)})}),H.page<H.pageCount&&(0,e.jsx)("div",{className:"mt-2 flex justify-center",children:(0,e.jsx)(z.Z,{onClick:function(){Q(function(a){return function(d){for(var a=1;a<arguments.length;a++){var c=null!=arguments[a]?arguments[a]:{},b=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(b=b.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))),b.forEach(function(a){C(d,a,c[a])})}return d}({},a,{page:a.page+1})})},children:N("common:seeMoreArticles")})}),(0,e.jsx)("div",{className:"relative w-full",children:(0,e.jsx)(u.Z,{url:null==x?void 0:x.hash,ext:null==x?void 0:x.ext,className:"w-full h-full min-h-[200px] object-cover",native:!0})}),(null==a?void 0:a.embedVideo)&&(0,e.jsx)("div",{className:"flex justify-center mt-20 w-full md:w-[75%] mx-auto",dangerouslySetInnerHTML:{__html:null==a?void 0:a.embedVideo}}),(null==a?void 0:a.shareTitle)&&(0,e.jsx)("div",{className:"w-full mt-16 text-3xl font-thin leading-[48px] text-center",children:null==a?void 0:a.shareTitle}),b&&(0,e.jsxs)("div",{className:"flex gap-2 justify-center mt-8",children:[(0,e.jsx)(i.Z,{url:(null==a?void 0:a.shareUrl)||b,quote:null==a?void 0:a.shareText,children:(0,e.jsx)(j.Z,{size:42,round:!0})}),(0,e.jsx)(k.Z,{url:(null==a?void 0:a.shareUrl)||b,title:null==a?void 0:a.shareText,children:(0,e.jsx)(l.Z,{size:42,round:!0})}),(0,e.jsx)(m.Z,{url:(null==a?void 0:a.shareUrl)||b,summary:null==a?void 0:a.shareText,children:(0,e.jsx)(n.Z,{size:42,round:!0})}),(0,e.jsx)("div",{className:"whatsapp-icon-wrapper",children:(0,e.jsx)(o.Z,{url:(null==a?void 0:a.shareUrl)||b,title:null==a?void 0:a.shareText,children:(0,e.jsx)(p.Z,{size:42,round:!0})})}),(0,e.jsx)(q.Z,{url:(null==a?void 0:a.shareUrl)||b,body:null==a?void 0:a.shareText,children:(0,e.jsx)(r.Z,{size:42,round:!0})})]})]})]})},G=!0,H=function(a){return(0,e.jsx)(F,{props:a})}},11250:function(c,b,a){"use strict";var d=a(85893),e=a(2962),f=a(7371);b.Z=function(a){var b=a.title,c=a.description,g=a.keywords,h=a.frontEndUrl;return b&&(0,d.jsx)(e.PB,{title:(0,f.zb)(b),description:(0,f.zb)(c),openGraph:{title:"".concat((0,f.zb)(b)),description:"".concat((0,f.zb)(c)),url:"".concat((0,f.zb)(h)),type:"website",locale:(0,f.zb)("sk-SK"),images:[]},additionalMetaTags:[{name:"keywords",content:g},]})}}},function(a){a.O(0,[2962,188,9774,2888,179],function(){return a(a.s=63646)}),_N_E=a.O()}])
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.