1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3067,9032],{55337:function(e,t,n){n.d(t,{u:function(){return h}});var o=n(63050),r=n(66801),s=n(75193);let i={tagId:"$tagId: String!",tagSlug:"$tagSlug: String!",before:"$before: String!",after:"$after: String!",first:"$first: Int!",search:"$search: String!",language:"$language: LanguageCodeFilterEnum!",offsetPagination:"$offset: Int, $size: Int"},a={tagId:"tagId: $tagId",tagSlug:"tagSlugIn: [$tagSlug]",before:"before: $before",after:"after: $after",first:"first: $first",search:"search: $search",language:"language: $language",offsetPagination:"offsetPagination: { size: $size, offset: $offset }"},l=(e,t)=>{let n=Array.from(e.keys()).map(e=>"".concat(i["".concat(e)])).join(", ");return"".concat(n).concat(t?"".concat(n.length>0?",":"").concat(i.offsetPagination):"")},c=(e,t)=>{let n=Array.from(e.keys()).map(e=>"".concat(a["".concat(e)])).join(", ");return"".concat(n).concat(t?"".concat(n.length>0?",":"").concat(a.offsetPagination):"")},u=async(e,t,n)=>{let i=0===e.size?"":"where: { ".concat(c(e,n)," }"),a=0===t.size?"":"".concat(c(t)),u="".concat(a," ").concat(0===i.length?"":", ".concat(i)),h="\n query GetQuickNews(".concat(l(new Map([...e,...t]),n),") {\n quickNews(").concat(u,") {\n ").concat(e.has("offsetPagination")?r.G:r.r,"\n ").concat("\nnodes {\n databaseId\n dateGmt\n title\n content\n slug\n quicknewstype {\n type\n }\n quickNewsItemFields {\n title\n content: obsahRychlejSpravy\n hasvideo\n embed: embedZoSocialnychSieti\n image {\n mediaItemUrl\n mediaDetails {\n height\n width\n }\n }\n }\n}\n","\n }\n }\n"),p={...Object.fromEntries([...e]),...Object.fromEntries([...t]),offset:n&&n.offset?n.offset:0,...t.get("first")&&{size:t.get("first")}},d=await fetch("".concat(s.oe,"?query=").concat((0,o.s)(h),"&variables=").concat(JSON.stringify(p))).then(e=>e.json()).catch(e=>null);if(d){var f;return{posts:d.data.quickNews.nodes,pageInfo:null!==(f=d.data.quickNews.pageInfo)&&void 0!==f?f:null}}return null},h=async e=>{let{first:t=24,language:n="SK",tagId:o,tagSlug:r,search:s,before:i,after:a,page:l}=e,c=new Map,h=new Map,p=l?{offset:(l-1)*t,size:t}:null;return n&&c.set("language",n),s&&c.set("search",s),o&&c.set("tagId","".concat(o)),r&&c.set("tagSlug",r),t&&h.set("first",t),i&&h.set("before",i),a&&h.set("after",a),await u(c,h,p)||null}},82490:function(e,t,n){n.r(t),n.d(t,{default:function(){return T}});var o=n(85893),r=n(5152),s=n.n(r),i=n(58533),a=n(86119),l=n(11163),c=n(77476),u=n(41686);let h=u.ZP.div.withConfig({componentId:"sc-2898a3fa-0"})(["margin-bottom:25px;@media only screen and (max-width:1023px){display:none;}"]),p=u.ZP.div.withConfig({componentId:"sc-2898a3fa-1"})(["background-color:",';overflow:hidden;position:relative;margin:10px 0;height:82px;width:100%;@keyframes slide{0%{transform:translateX(-100%);}100%{transform:translateX(100%);}}:after{content:"";top:0;transform:translateX(100%);width:100%;height:100%;position:absolute;z-index:1;animation:slide 1s infinite;animation-delay:',";background:",";}"],e=>e.theme.COLORS.FILLER.BACKGROUND,e=>e.delay,e=>e.theme.COLORS.FILLER.GRADIENT),d=u.ZP.div.withConfig({componentId:"sc-2898a3fa-2"})(["width:93%;margin:auto;"]);var f=n(28612),g=n(8017),m=n(39032),v=n(67294),w=n(99763),y=n(55337),b=n(71636);let S=s()(()=>n.e(129).then(n.bind(n,129)),{loadableGenerated:{webpack:()=>[129]}});var T=function(e){var t;let{posts:n,pageInfo:r}=e,s=(0,l.useRouter)(),u=(0,w.K)(s),{t:T}=(0,a.$G)(["common"]),[E,x]=(0,v.useState)(null!=n?n:[]),[L,k]=(0,v.useState)(null!=r?r:{startCursor:null,endCursor:null,hasNextPage:!1,hasPreviousPage:!1}),P=async()=>{var e;let t=await (0,y.u)({first:15,language:(0,b.Xy)(s),after:null!==(e=null==L?void 0:L.endCursor)&&void 0!==e?e:void 0});if(t){x(e=>[...e,...t.posts]);let e=t.pageInfo;e&&k({hasNextPage:e.hasNextPage,hasPreviousPage:e.hasPreviousPage,startCursor:e.startCursor,endCursor:e.endCursor})}};return null===E?(0,o.jsx)(o.Fragment,{}):(0,o.jsxs)(h,{children:[(0,o.jsx)(m.default,{title:T("common:quickNews")}),(0,o.jsx)(i.Z,{dataLength:E.length,next:()=>P(),hasMore:null!==(t=L&&L.hasNextPage)&&void 0!==t&&t,loader:(0,o.jsxs)(d,{children:[(0,o.jsx)(p,{delay:"0",className:"shine"}),(0,o.jsx)(p,{delay:"0.1s",className:"shine"}),(0,o.jsx)(p,{delay:"0.2s",className:"shine"}),(0,o.jsx)(p,{delay:"0.3s",className:"shine"}),(0,o.jsx)(p,{delay:"0.4s",className:"shine"})]}),height:780,endMessage:(0,o.jsx)("p",{style:{fontFamily:"HK Grotesk",textAlign:"center"}
1,children:(0,o.jsx)("b",{children:T("common:noMoreQuickNews")})}),children:E.map(e=>(0,o.jsx)(S,{date:(0,f.ZP)(e.dateGmt,u),content:e.content?(0,c.r)(e.content):e.quickNewsItemFields.content,hasVideo:null!==e.quicknewstype.type&&e.quicknewstype.type.includes("video")||null!==e.quickNewsItemFields.hasvideo&&"\xc1no"===e.quickNewsItemFields.hasvideo,hasAttachment:null!==e.quicknewstype.type&&e.quicknewstype.type.includes("embed")||null!==e.quickNewsItemFields.embed&&e.quickNewsItemFields.embed.length>0||null!==e.quickNewsItemFields.image,href:"/".concat(T("common:urls.quickNews"),"/[id]/[slug]"),as:"/".concat(T("common:urls.quickNews"),"/").concat(e.databaseId,"/").concat(e.slug)},e.databaseId))}),(0,o.jsx)("div",{style:{margin:"15px"},children:(0,o.jsx)(g.Z,{title:T("common:buttons.allQuickNews"),href:"/".concat(T("common:urls.quickNews")),as:"/".concat(T("common:urls.quickNews"))})})]})}},77476:function(e,t,n){n.d(t,{r:function(){return s},w:function(){return i}});let o=/(<p>)?<blockquote[\s\S]*?<\/blockquote>(<\/p>)?\n?|(<p>)?<iframe[\s\S]*?<\/iframe>(<\/p>)?\n?|(<p>)?<script[\s\S]*?<\/script>( )?(<\/p>)?\n?|(<p>)?<div[^>]*><iframe[\s\S]*?<\/iframe><\/div>(<\/p>)?|(<p> <\/p>)|(<p><img[\s\S]*?\/><\/p>)|(<img[\s\S]*?\/>)\n?/g,r=/<a\b[^>]*>(.*?)<\/a>/gi,s=e=>e.replace(o,"").replace(r,'<i class="link">$1</i>'),i=e=>e.replace(o,"").replace(/<\/?[^>]+(>|$)|&[^;]+;/g,"").replaceAll("\n","")},39032:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var o=n(85893);let r=n(41686).ZP.h2.withConfig({componentId:"sc-f06d0396-0"})(['margin:15px 0 5px 0;padding:7px;padding-left:12px;font-weight:600;font-size:16px;font-family:"HK Grotesk","Source Sans Pro";text-transform:uppercase;background-color:',";color:",";border-left:5px solid #e10600;border-radius:0 20px 20px 0;display:block;"],e=>e.theme.COLORS.SIDESECTION_TITLE_BACK,e=>e.theme.COLORS.TEXT);function s(e){let{title:t}=e;return(0,o.jsx)(r,{children:t})}},58533:function(e,t,n){var o=n(67294),r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},s=function(){return(s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},i={Pixel:"Pixel",Percent:"Percent"},a={unit:i.Percent,value:.8};function l(e){return"number"==typeof e?{unit:i.Percent,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:i.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:i.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),a):(console.warn("scrollThreshold should be string or number"),a)}var c=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){!n.lastScrollTop&&(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>
11.5*n.maxPullDownDistance||!n._infScroll||(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=(function(e,t,n,o){var r,s=!1,i=0;function a(){r&&clearTimeout(r)}function l(){var l=this,c=Date.now()-i,u=arguments;function h(){i=Date.now(),n.apply(l,u)}s||(o&&!r&&h(),a(),void 0===o&&c>e?h():!0!==t&&(r=setTimeout(o?function(){r=void 0}:h,void 0===o?e-c:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),l.cancel=function(){a(),s=!0},l})(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return!function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?s(s({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=l(t);return o.unit===i.Pixel?e.scrollTop<=o.value+n-e.scrollHeight+1:e.scrollTop<=o.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=l(t);return o.unit===i.Pixel?e.scrollTop+n>=e.scrollHeight-o.value:e.scrollTop+n>=o.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=s({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return o.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},o.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&o.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},o.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(o.Component);t.Z=c}}]);
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.