(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[1],{"0srb":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ArticleFeaturedImage",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ArticleImage",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ArticleMeta",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"Articles",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"HomePageMeta",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"SectionMeta",{enumerable:!0,get:function(){return c.default}});var o=p(r("uwHi")),i=p(r("oWNA")),a=p(r("IkkQ")),n=p(r("G8R9")),s=p(r("7eNN")),c=p(r("TcC0"));function p(e){return e&&e.__esModule?e:{default:e}}},1:function(e,t){},"7eNN":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r("q1tI")),i=a(r("qhky"));function a(e){return e&&e.__esModule?e:{default:e}}var n=function(e){return o.default.createElement(i.default,null,o.default.createElement("script",{type:"application/ld+json"},"".concat(JSON.stringify({"@context":"https://schema.org","@graph":[{"@type":"WebPage",name:"The Daily Voice - Ons Skrik Vir Niks!",alternateName:"dvd",url:"https://www.dailyvoice.co.za",description:"The latest Western Cape, National, International, Sport, Entertainment alternative news and opinions. The Daily Voice - Ons Skrik Vir Niks!"},{"@type":"NewsMediaOrganization",name:"The Daily Voice - Ons Skrik Vir Niks!",alternateName:"dvd",url:"https://www.dailyvoice.co.za",logo:"https://www.dailyvoice.co.za/logo.jpg",sameAs:["https://www.facebook.com/DailyVoiceSA/","https://twitter.com/dailyvoicesa","https://www.instagram.com/dailyvoicesa/"]}]}))))};t.default=n},G8R9:function(e,t,r){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Articles=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var r=h(t);if(r&&r.has(e))return r.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var s=a?Object.getOwnPropertyDescriptor(e,n):null;s&&(s.get||s.set)?Object.defineProperty(i,n,s):i[n]=e[n]}i.default=e,r&&r.set(e,i);return i}(r("q1tI")),a=u(r("17x9")),n=r("L80f"),s=u(r("Qyje")),c=u(r("qhky")),p=u(r("4I37")),l=r("nZn3");function u(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(h=function(e){return e?r:t})(e)}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function d(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function m(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=w(e);if(t){var i=w(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return y(this,r)}}function y(e,t){if(t&&("object"===o(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(u,e);var t,r,o,a=A(u);function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this)).page=0,t.windowWidth=0,t.handleViewMore=t.handleViewMore.bind(b(t));var r=!(!e.articles||!(e.section in e.articles))&&e.articles[e.section],o=new Date(r&&r.lastFetch||0),i=new Date,n=e.location?s.default.parse(e.location.search,{ignoreQueryPrefix:!0}):{page:0},c=Math.max((e.index||0)-1,0);t.page=n.page||1;var p=Math.max(t.page-1,1);if(e.withMore&&t.page>1){var l=e.page0Limit||e.pageSize;e.fetchArticles(e.section,l+(p-1)*e.pageSize,e.pageSize,e.filter)}else if(!r||!r.articles||r.lastFetch&&i-o>9e5||r.articles.length<e.pageSize){var h=Math.max(e.pageSize||0,e.count||0);e.fetchArticles(e.section,0,c+h,e.filter)}return t}return t=u,(r=[{key:"componentDidUpdate",value:function(e){var t=!(!this.props.articles||!(this.props.section in this.props.articles))&&this.props.articles[this.props.section],r=Math.max((this.props.index||0)-1,0);if(e.section!==this.props.section){var o=Math.max(this.props.pageSize||0,this.props.count||0);(!t||t.articles.length<this.props.pageSize)&&(console.log("componentDidUpdate(1)",this.props.section,r,o),this.props.fetchArticles(this.props.section,0,r+o,this.props.filter))}}},{key:"shouldComponentUpdate",value:function(e,t){if(e.section===this.props.section&&e.withReadCount===this.props.withReadCount&&e.extraState===this.props.extraState){var r=e.section,o=!(!this.props.articles||!(r in this.props.articles))&&this.props.articles[r],i=!(!e.articles||!(r in e.articles))&&e.articles[r];if(JSON.stringify(o)===JSON.stringify(i))return!1}return!0}},{key:"handleViewMore",value:function(){var e=Math.max(this.props.index-1,0)+this.props.count,t=Math.max(this.page-1,0)*this.props.pageSize;this.props.fetchMoreArticles(this.props.section,e+t,this.props.pageSize),this.page++}},{key:"render",value:function(){var e={hasError:!1},t=this.props.moreButtonColour?" "+this.props.moreButtonColour:"";if(this.props.articles&&this.props.articles[this.props.section]&&(e=this.props.articles[this.props.section]),e.hasError)return this.props.isConnected?e.is404?this.props.notFound?i.default.createElement(this.props.notFound,this.props):i.default.createElement("div",null,"No articles found and no ",i.default.createElement("i",null,"notFound")," property specified"):i.default.createElement("div",null,i.default.createElement("h1",null,"ERROR"),i.default.createElement("pre",null,e.error)):i.default.createElement("div",null,i.default.createElement("h2",null,"Offline"),i.default.createElement("div",null,"This section is not currently available in your cache. Please go back online and we'll fetch the latest in this section"));var r=this.props.loading||function(e){var t=e.section;return i.default.createElement("div",null,"Loading ",t,"...")};if(!this.props.withMore&&e.isFetching)return i.default.createElement(r,{section:(0,n.getSectionLabel)(this.props.section)});if(e.hasFetched||e.isFetching){if(e.articles&&e.articles.length<this.props.pageSize&&this.props.withMore&&this.props.hasMore)return i.default.createElement(r,{section:(0,n.getSectionLabel)(this.props.section)});var o=e;if(o&&o.articles&&o.articles.length){var a=parseInt(this.page,10),s=this.props.match?this.props.match.url+"?page="+(a+1):"",u=this.props.match?this.props.match.url+"?page="+(a-1):"",h=Math.max((this.props.index||1)-1,0),d=this.props.count||this.props.pageSize,m=this.props.withMore?o.articles.map((function(e){return new p.default(e)})):o.articles.slice(0,this.props.pageSize).map((function(e){return new p.default(e)})),g=!1;this.props.withMore&&o.hasMore&&(g=this.props.isConnected?this.props.moreButton?i.default.createElement(this.props.moreButton,{loading:e.isFetching,onClick:this.handleViewMore,sectionProps:e,nextHref:s,pageNumber:a,prevHref:a>1&&u,canonical:"https://www.dailyvoice.co.za"+this.props.location.pathname,moreButtonColour:t}):i.default.createElement("div",{id:"buttonContainer",className:"more-from-btn noScript small-12 medium-12"},"undefined"!==typeof window&&i.default.createElement(i.default.Fragment,null,i.default.createElement("button",{className:"btn"+t,id:"viewMoreButton",onClick:this.handleViewMore}," View More")),"undefined"===typeof window&&i.default.createElement("a",{id:"viewMoreButtonNoScript",href:s},i.default.createElement("button",null,"View More")),i.default.createElement(c.default,null,i.default.createElement("link",{rel:"canonical",itemprop:"url",href:"https://www.dailyvoice.co.za"+this.props.location.pathname}),i.default.createElement("link",{rel:"next",href:s}),a>1&&i.default.createElement("link",{rel:"prev",href:u}))):i.default.createElement("div",{id:"buttonContainer",className:"offline"},i.default.createElement("p",null,i.default.createElement(l.Warn,{width:"24",height:"24"}),"You are currently offline. To see more articles, please re-establish your internet connection.")));var A=this.props.component||function(e){var t=e.articles;return i.default.createElement("ul",null,t.map((function(e){return i.default.createElement("li",{key:e.contentKey},e.headline)})))},y=this.props.sectionLabel;return y||(o.sectionLabel?y=o.sectionLabel:o.sectionsLabels&&o.sectionsLabels.length&&(y=o.sectionsLabels[0].label)),this.props.noDiv?i.default.createElement(i.default.Fragment,null,i.default.createElement(A,f({},this.props,{articles:m.slice(h,this.props.withMore?m.length:h+d),section:this.props.section,noImage:this.props.noImage,authorName:o.authorName,sectionLabel:y,sectionsLabels:o.sectionsLabels,moreButton:g,relatedSections:this.props.relatedSections})),this.props.children):i.default.createElement("div",{className:this.props.className},i.default.createElement(A,f({},this.props,{articles:m.slice(h,this.props.withMore?m.length:h+d),section:this.props.section,noImage:this.props.noImage,authorName:o.authorName,sectionLabel:y,sectionsLabels:o.sectionsLabels,moreButton:g,relatedSections:this.props.relatedSections})),this.props.children)}if(!e.isFetching)return this.props.notFound?i.default.createElement(this.props.notFound,this.props):i.default.createElement("div",null,"No articles found and no ",i.default.createElement("i",null,"notFound")," property specified");var b=this.props.loading||function(e){var t=e.section;return i.default.createElement("div",{className:"wrapper"},"Loading ",t,"...")};return i.default.createElement(b,{section:(0,n.getSectionLabel)(this.props.section)})}var w=this.props.loading||function(e){var t=e.section;return i.default.createElement("div",{className:"wrapper"},"Loading ",t,"...")};return i.default.createElement(w,{section:(0,n.getSectionLabel)(this.props.section)})}}])&&d(t.prototype,r),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.Component);t.Articles=v,v.propTypes={fetchArticles:a.default.func.isRequired,fetchMoreArticles:a.default.func.isRequired,pageSize:a.default.number,withMore:a.default.bool.isRequired,noImage:a.default.string.isRequired,section:a.default.string.isRequired,articles:a.default.object.isRequired},v.defaultProps={index:0,skip:0,pageSize:16,withMore:!1,section:"news",className:"article-list"};var x=v;t.default=x},IkkQ:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r("q1tI")),i=a(r("qhky"));function a(e){return e&&e.__esModule?e:{default:e}}var n=function(e){var t,r=e.article,a=e.canonical,n=e.logo,s=[];r.images&&r.images.map((function(e){return s.push({"@type":"ImageObject",url:e.url,width:e.width,height:e.height})})),r.inArticleSchema&&r.inArticleSchema.images&&r.inArticleSchema.images.map((function(e){return s.push({"@type":"ImageObject",url:e.url,width:e.width,height:e.height})})),s.length>1?(t=[]).push({"@list":s}):t=s;var c={"@context":"http://schema.org","@type":"NewsArticle",mainEntityOfPage:{"@type":"WebPage","@id":"https://www.dailyvoice.co.za"+(a||"/"+r.getCanonicalUri())},headline:r.headline,description:r.abstract,image:t,author:{"@type":"Person",name:r.author,url:"https://www.dailyvoice.co.za"+(a||"/"+r.getCanonicalUri())},publisher:{"@type":"Organization",name:"The Daily Voice - Ons Skrik Vir Niks!",logo:{"@type":"ImageObject",url:"https://www.dailyvoice.co.za"+(n||"/logo.jpg"),width:"60",height:"60"}},datePublished:r.published,dateModified:r.modified||r.published};if(r.videos){var p=r.videos[0];p&&p.url&&p.script&&/\.mp4$/.test(p.url)&&(c.video={"@type":"VideoObject",name:"The Daily Voice - Ons Skrik Vir Niks!",description:p.caption||"",thumbnailUrl:p.thumbnailURL||"",uploadDate:r.published,duration:p.duration||"",contentUrl:p.url})}return o.default.createElement(i.default,null,o.default.createElement("script",{type:"application/ld+json"},"".concat(JSON.stringify(c))))};t.default=n},TcC0:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r("q1tI")),i=a(r("qhky"));function a(e){return e&&e.__esModule?e:{default:e}}var n=function(e){var t={"@context":"http://schema.org","@type":"WebPage",name:"The Daily Voice - Ons Skrik Vir Niks!",alternateName:"dvd",url:"https://www.dailyvoice.co.za"+e.location.pathname,description:e.description};return o.default.createElement(i.default,null,o.default.createElement("script",{type:"application/ld+json"},"".concat(JSON.stringify(t))))};t.default=n},azCW:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQCAMAAABF6+6qAAAAM1BMVEXz9Pa5vsrp6+/Q09vBxdDl5+vw8fS+ws66wMvi5enS1t3HzNXa3ePt7vHe4ebLz9jV2N8T7rePAAAEfklEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD27m7HTRgIoLCHAHGG3/d/2q7SrSZtTRZs7ZJ4zncLEhcc2WAZAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4R924Xn6ejl0fUK1+bOUsV50C6tS1cqY4B9RolrNpQH3O70pkDajNFOUF3AIqs8graAPq0shr4AG+Mqu8hiGgKoPNRpefZ1ePAVWJ8mkJZ7ABswmoifzRhTP0D9dHRfrjI0ZVYeMTYeEtEBbuCAtvgbBwR1h4C8/D6rvbrZvC3wgLRWE1ayt3rT4eIyyUhDUt8mCZ7AhhIT+sOW5uHyYsZIc1PtnkSVjIDWuUhDH8RljIDKuL8i+79YSF3LBaSWr78IGwkBnWLCYxGRIW8sIann/xQFjICquRBDuHsJAX1ijydC4kLGSFpbLpEnbrVsLyLBHWIpuW/V1FUcJy7FhYw4GuRJSw/PqGEctWWJWw3Dr2jKX7u7pTwvIqEdZc+lZ4i1YiYTmVCGuSTdPOrowSlk+HVt6H3V0ZJSyXUmHdZMO8vyujhOVRIqzNIWs40pVRwnIoGVYTJSE2h7oySlj+JMNKT4bzwa6MEpY76bDCHDO7SlPC8iYRVvKfAm2X0ZVRwnJmK6zQrw+ZxLXP6sooYfnyX1imn5erfLguYx8yuzJKWK4kwzL91EzBHO/KKGF5shWWKezKKGE5UhqWdfU1JSw/CsOyrvZQwnKjLCzrah8lLC+KwrKu9lLCciIjrIyujBKWDxlh5XRllLBcyAgrqyujhOXB7rCasawro4TlwN6wmquMZV0ZJaz6fRWWdSUylnVllLCq94u9e8tNGIaiKBqXFCg4lPmPtjItMlLvV6zm4a41hq2rI/84CCvuqshtXVUXYfUuCivuqshtXVUXYXUuDCvuqshNXVUnYXUuCCvoqsqvXQmLWWHVrqpcuxIWM8OqXVX52ZWwmB1W7arK310Ji1lhxV0VuXQlLGaEVbuKHM5JWMwJq3YVExbzw6pdCYvGsOKuhEVjWHFXwqIxrLgrYdEYVtyVsGgMK+5KWDSGFXclLBrDirsSFo1hxV0Ji8aw4q6ERXtY1/SLsBAWWyAsCmGxD8KiEBb7ICwKYbEPwqIQFvsgLAphsQ/ColgirMO4AGF17jWsP+IX+/9IWDwIi10QFg/CYheExYOw2If0dBvW8PYSNj0Z04/Tx3FY3PuYnqaBnnymbRgHunJL23AZ6MrxlDbBxOpNTltwGOjNNa3vZLr3ZxrT2s4esXo0rX2zRgOrU/dzWtHhONCpY76u1NZ4d646N70tb3KsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOCrPTgkAAAAABD0/7UrbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvwBQ1zWzb+cicAAAAABJRU5ErkJggg=="},oWNA:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,i=(o=r("q1tI"))&&o.__esModule?o:{default:o};var a=function(e){var t=e.image,r=e.href,o=e.altText,a=e.imageCaption,n=e.imageCredit,s=e.imageClass;return i.default.createElement("figure",{itemProp:"image",itemScope:!0,itemType:"https://schema.org/ImageObject"},i.default.createElement("meta",{itemProp:"url",content:t.url}),i.default.createElement("meta",{itemProp:"width",content:t.width}),i.default.createElement("meta",{itemProp:"height",content:t.height}),i.default.createElement("img",{className:s,src:r,alt:o||a,title:a}),a&&i.default.createElement("figcaption",null,i.default.createElement("span",{className:"imageCaption"},a),n&&i.default.createElement("span",{className:"imageCredit"},"Credit: ",n)))};t.default=a},rQwP:function(e,t,r){"use strict";var o=r("1OyB"),i=r("vuIU"),a=r("Ji7U"),n=r("LK+K"),s=r("q1tI"),c=r.n(s),p=r("55Ip"),l=r("nZn3"),u=r("yCm8"),h=c.a.createElement;var f=function(e){Object(a.a)(r,e);var t=Object(n.a)(r);function r(){return Object(o.a)(this,r),t.apply(this,arguments)}return Object(i.a)(r,[{key:"render",value:function(){var e,t=this.props.article,r=this.props.showAbstract,o=this.props.showPlayBtn,i=this.props.noImage,a=this.props.width,n=this.props.withMinRead?" | "+(t.wordCount/150).toFixed(0)+" min read":"";return h("article",{key:t.contentKey,"aria-label":"article"},h(p.Link,{to:"/"+t.getCanonicalUri()},o&&h("div",{className:"play-btn"},h(l.PlayBtn,{width:"48",height:"48"})),h(u.ImageOrNoImage,{image:t.image,width:a,alt:t.headline,shape:"16x9",noImage:i})),h("div",{className:"content"},h("small",{className:"meta"},h(l.TimeClock,{width:"12",height:"12"})," ",t.formatAgo(!1)," | ",h(p.Link,{className:"category",to:"/"+t.getSectionId()},t.sectionLabel)," ",n,this.props.withReadCount&&t.readCount>200?h("span",{className:"views"},h(l.View,{width:"12",height:"12"}),(e=t.readCount,Math.abs(e)>999?Math.sign(e)*(Math.abs(e)/1e3).toFixed(1)+"k":Math.sign(e)*Math.abs(e))):""),h(p.Link,{to:"/"+t.getCanonicalUri()},h("h3",null,t.headline),r&&h("p",null,t.getAbstract())),("SPONSORED"===t.sponsoredIndicator||"SPONSORED_EXPIRED"===t.sponsoredIndicator)&&h("small",{className:"sponsored"},"Sponsored"),("NATIVE"===t.sponsoredIndicator||"NATIVE_EXPIRED"===t.sponsoredIndicator)&&h("small",{className:"native"},"Partnered")))}}]),r}(s.Component);t.a=f},uwHi:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,i=(o=r("q1tI"))&&o.__esModule?o:{default:o},a=r("yCm8"),n=r("8UsC");var s=function(e){var t=e.article,r=e.imageWidth,o=(e.metaImageObjectUrl,e.noImage);if(!(0,n.isEmpty)(t.videos)&&!(0,n.isEmpty)(t.youtubes))return i.default.createElement("div",{className:"article-carousel"},t.videos.map((function(e,t){return i.default.createElement("div",{key:t},i.default.createElement("div",{dangerouslySetInnerHTML:{__html:e.script}}))})),t.youtubes.map((function(e,t){return i.default.createElement("a",{href:"https://www.youtube.com/embed/"+e.id,"data-video":"true","data-caption":e.caption,"data-img":e.url,key:e.id},i.default.createElement("img",{alt:e.caption,src:e.url}))})));if(!(0,n.isEmpty)(t.videos)){var s=t.videos[0];if(s&&s.url&&s.script&&/\.mp4$/.test(s.url))return i.default.createElement("div",null,i.default.createElement("div",{id:"featuredVideoContainer",dangerouslySetInnerHTML:{__html:s.script}}));console.warn("ArticleFeaturedImage tried to render an unsupported Video format",t.contentKey,t.videos)}return!!t.images&&i.default.createElement(a.ImageOrNoImage,{key:t.contentKey,image:t.images[0],width:r,alt:t.headline,shape:"16x9",noImage:o})};t.default=s},yCm8:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.calcNodeSrcUrl=t.calcImageSrcUrl=t.ImageOrNoImage=t.ImageCalculator=t.AmpImageOrNoImage=t.AmpImage=void 0;var o,i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!==typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var c=i?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(r("q1tI")),a=(o=r("17x9"))&&o.__esModule?o:{default:o};function n(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=h(e);if(t){var i=h(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return u(this,r)}}function u(e,t){if(t&&("object"===s(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,g(o.key),o)}}function m(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===s(t)?t:String(t)}var A=r("fcqR").create({addEToUmlauts:!0,szToSs:!0,spaces:"-",nonPrintable:"-",trim:!0}),y=function(e,t){return"16x9"===e?Math.ceil(9*t/16):"Cinema2K"===e?Math.ceil(1*t/2.39):"square"===e?t:void 0};function b(){if("undefined"!==typeof window){var e=document.createElement("canvas");if(e.getContext&&e.getContext("2d"))return 0==e.toDataURL("image/webp").indexOf("data:image/webp")}return!1}t.calcImageSrcUrl=function(e,t,r,o){if(e&&e.url){var i=new v,a=i.calcHeight(r,t)||100*t;void 0===o&&(o=b());var n=i.getCropCoordsForShape(r,t,a,e.width,e.height,e.crop?e.crop.x:0,e.crop?e.crop.y:0,e.crop?e.crop.w:0,e.crop?e.crop.h:0,e.focalPoint?e.focalPoint.x:0,e.focalPoint?e.focalPoint.y:0),s=n.offsetx,c=n.offsety,p=n.cropWidth,l=n.cropHeight;return i.buildImageUrl("",e.caption?A(e.caption):"",t,a,e.url,s,c,p,l,o)}return null};function w(e,t){return"16x9"===t&&e.crops&&e.crops["16:9"]?e.crops["16:9"]:"square"===t&&e.crops&&e.crops["1:1"]?e.crops["1:1"]:e.crop?e.crop:{x:e.offsetx,y:e.offsety,w:e.cropwidth,h:e.cropheight}}t.calcNodeSrcUrl=function(e,t,r){if("Element"!==typeof e){if(e&&e.url){var o=new v,i=o.calcHeight(r,t)||100*t,a=o.getCropCoordsForShape(r,t,i,e.width,e.height,e.crop?e.crop.x:0,e.crop?e.crop.y:0,e.crop?e.crop.w:0,e.crop?e.crop.h:0,e.focalPoint?e.focalPoint.x:0,e.focalPoint?e.focalPoint.y:0),n=a.offsetx,s=a.offsety,c=a.cropWidth,p=a.cropHeight;return o.buildImageUrl("",e.caption?A(e.caption):"",e.width,i,e.url,n,s,c,p,b())}return null}};t.ImageOrNoImage=function(e){var t=e.image,r=e.width,o=e.alt,a=e.shape,n=e.noImage,s=e.lazy,c=e.className;if(t&&t.url){var p=w(t,a),l=p.x,u=p.y,h=p.w,f=p.h;return i.default.createElement(x,{className:c,shape:a,width:parseInt(r),src:t.url,lazy:s,offsetx:l,offsety:u,cropWidth:h,cropHeight:f,focalpointx:t.focalpointx||t.focalPoint&&t.focalPoint.x,focalpointy:t.focalpointy||t.focalPoint&&t.focalPoint.y,imageWidth:parseInt(t.width),imageHeight:parseInt(t.height),alt:o})}return i.default.createElement("img",{className:c,src:n,width:r,loading:s?"lazy":"auto",height:y(a,r),alt:o})};t.AmpImageOrNoImage=function(e){var t=e.image,r=e.width,o=e.alt,a=e.shape,n=e.noImage,s=e.layout,c=e.className;if(t&&t.url){var p=w(t,a),l=p.offsetx,u=p.offsety,h=p.cropwidth,f=p.cropheight;return i.default.createElement(O,{className:c,shape:a,width:r,src:t.url,layout:s,offsetx:l,offsety:u,cropWidth:h,cropHeight:f,focalpointx:t.focalpointx||t.focalPoint&&t.focalPoint.x,focalpointy:t.focalpointy||t.focalPoint&&t.focalPoint.y,imageWidth:t.width,imageHeight:t.height,alt:o})}return i.default.createElement("amp-img",{className:c,src:n,width:r,height:y(a,r),alt:o})};var v=function(){function e(){f(this,e)}return m(e,[{key:"calcHeight",value:function(e,t){return y(e,t)||100*t}},{key:"buildImageUrl",value:function(e,t,r,o,i,a,n,s,c,p){return a||n||s||c?"".concat(e,"/").concat(r,"x").concat(o,"/").concat(t,"?source=").concat(i,"&operation=CROP&offset=").concat(a,"x").concat(n,"&resize=").concat(s,"x").concat(c)+(p?"&webp=true":""):"".concat(e,"/").concat(r,"x").concat(o,"/").concat(t,"?source=").concat(i)+(p?"&webp=true":"")}},{key:"getFocalCoordinate",value:function(e,t,r){var o=e-r/2;o=o<0?0:o;var i=e+r/2;return(i=i>t?t-r:i)<e?Math.abs(o+r/2-e)<=Math.abs(i+r/2-e)?Math.floor(o):Math.floor(i):Math.floor(o)}},{key:"getCropCoordsForShape",value:function(e,t,r,o,i,a,n,s,c,p,l){var u=c,h=s;if(o&&i){if(0===p&&0===l&&(s&&c?(p=a+Math.round(s/2),l=n+Math.round(c/2)):(p=Math.round(o/2),l=Math.round(i/2))),"square"===e&&(u=h=0===s&&0===c?Math.min(o,i):Math.min(s,c)),"16x9"===e)if(0===s&&0===c)i*(16/9)<o?(h=Math.round(16*i/9),u=i):(h=o,u=Math.round(9*o/16));else c*(16/9)<s?(h=Math.round(16*c/9),u=c):(h=s,u=Math.round(9*s/16));if("Cinema2K"===e)if(0===s&&0===c)2.39*i<o?(h=Math.round(2.39*i),u=i):(h=o,u=Math.round(1*o/2.39));else 2.39*c<s?(h=Math.round(2.39*c),u=c):(h=s,u=Math.round(1*s/2.39));return p=Math.max(Math.min(p,o-Math.round(h/2)),a+Math.round(h/2)),l=Math.max(Math.min(l,i-Math.round(u/2)),n+Math.round(u/2)),s&&c?{offsetx:p-Math.round(s/2),offsety:l-Math.round(c/2),cropWidth:h,cropHeight:u}:(h||(h=o),u||(u=i),{offsetx:p-Math.round(h/2),offsety:l-Math.round(u/2),cropWidth:h,cropHeight:u})}return{offsetx:0,offsety:0,cropWidth:0,cropHeight:0}}}]),e}();t.ImageCalculator=v;var x=function(e){c(r,e);var t=l(r);function r(){return f(this,r),t.apply(this,arguments)}return m(r,[{key:"render",value:function(){var e,t,r,o,a=this,n=this.props.alt?A(this.props.alt):"",s=void 0;if("square"===this.props.shape)e="".concat(this.props.resizeUrlSquare,"/").concat(this.props.width,"/").concat(n,"?source=").concat(this.props.src),t="".concat(this.props.resizeUrlSquare,"/").concat(2*this.props.width,"/").concat(n,"?source=").concat(this.props.src),r="".concat(this.props.resizeUrlSquare,"/").concat(this.props.width,"/").concat(n,"?source=").concat(this.props.src),o=this.props.width,(this.props.cropWidth||this.props.cropHeight)&&(e+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight),t+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight),r+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight,"&webp=true"));else if("16x9"===this.props.shape)e="".concat(this.props.resizeUrl16x9,"/").concat(this.props.width,"/").concat(n,"?source=").concat(this.props.src),t="".concat(this.props.resizeUrl16x9,"/").concat(2*this.props.width,"/").concat(n,"?source=").concat(this.props.src),r="".concat(this.props.resizeUrl16x9,"/").concat(this.props.width,"/").concat(n,"?source=").concat(this.props.src),o=Math.ceil(9*this.props.width/16),(this.props.cropWidth||this.props.cropHeight)&&(e+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight),t+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight),r+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight,"&webp=true"));else{var c=new v;o=this.props.height||c.calcHeight(this.props.shape,this.props.width)||100*width;var p=c.getCropCoordsForShape(this.props.shape,this.props.width,o,this.props.imageWidth,this.props.imageHeight,Math.max(0,this.props.offsetx),Math.max(0,this.props.offsety),Math.min(this.props.cropWidth,this.props.imageWidth),Math.min(this.props.cropHeight,this.props.imageHeight),this.props.focalpointx,this.props.focalpointy),l=p.offsetx,u=p.offsety,h=p.cropWidth,f=p.cropHeight;e=c.buildImageUrl(this.props.resizeUrl,n,this.props.width,o,this.props.src,l,u,h,f,!1),t=c.buildImageUrl(this.props.resizeUrl,n,2*this.props.width,2*o,this.props.src,l,u,h,f,!1),r=c.buildImageUrl(this.props.resizeUrl,n,this.props.width,o,this.props.src,l,u,h,f,!0),this.props.sizes&&this.props.sizes.length&&(s=this.props.sizes.reduce((function(e,t,r){return r>1?e+", "+c.buildImageUrl(a.props.resizeUrl,n,t,c.calcHeight(a.props.shape,t),a.props.src)+" "+t+"px":c.buildImageUrl(a.props.resizeUrl,n,e,c.calcHeight(a.props.shape,e),a.props.src)+" "+e+"px, "+c.buildImageUrl(a.props.resizeUrl,n,t,c.calcHeight(a.props.shape,t),a.props.src)+" "+t+"px"})))}return i.default.createElement("picture",null,i.default.createElement("source",{type:"image/webp",srcSet:r}),i.default.createElement("source",{type:"image/jpeg",srcSet:t+" 1.5x"}),i.default.createElement("img",{className:this.props.className,loading:this.props.lazy?"lazy":"auto",src:e,width:this.props.width,height:o,srcSet:s,alt:this.props.alt}))}}]),r}(i.Component);t.default=x;var O=function(e){c(r,e);var t=l(r);function r(){return f(this,r),t.apply(this,arguments)}return m(r,[{key:"render",value:function(){var e,t,r=this,o=this.props.alt?A(this.props.alt):"",a=void 0;if("square"===this.props.shape)e=this.props.resizeUrlSquare+"/"+this.props.width+"?source="+this.props.src,t=this.props.width,(this.props.cropWidth||this.props.cropHeight)&&(e+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight)),e+=b()?"&webp=true":"";else if("16x9"===this.props.shape)e=this.props.resizeUrl16x9+"/"+this.props.width+"?source="+this.props.src,t=Math.ceil(9*this.props.width/16),(this.props.cropWidth||this.props.cropHeight)&&(e+="&operation=CROP&offset=".concat(this.props.offsetx,"x").concat(this.props.offsety,"&resize=").concat(this.props.cropWidth,"x").concat(this.props.cropHeight)),e+=b()?"&webp=true":"";else{var n=new v;t=this.props.height||n.calcHeight(this.props.shape,this.props.width)||100*this.props.width;var s=n.getCropCoordsForShape(this.props.shape,this.props.width,t,this.props.imageWidth,this.props.imageHeight,Math.max(0,this.props.offsetx),Math.max(0,this.props.offsety),Math.min(this.props.cropWidth,this.props.imageWidth),Math.min(this.props.cropHeight,this.props.imageHeight),this.props.focalpointx,this.props.focalpointy),c=s.offsetx,p=s.offsety,l=s.cropWidth,u=s.cropHeight;e=n.buildImageUrl(this.props.resizeUrl,o,this.props.width,t,this.props.src,c,p,l,u,b()),this.props.sizes&&this.props.sizes.length&&(a=this.props.sizes.reduce((function(e,t,i){return i>1?e+", "+n.buildImageUrl(r.props.resizeUrl,o,t,n.calcHeight(r.props.shape,t),r.props.src)+" "+t+"px":n.buildImageUrl(r.props.resizeUrl,o,e,n.calcHeight(r.props.shape,e),r.props.src)+" "+e+"px, "+n.buildImageUrl(r.props.resizeUrl,t,n.calcHeight(r.props.shape,t),r.props.src)+" "+t+"px"})))}return i.default.createElement("amp-img",{layout:this.props.layout?this.props.layout:"responsive",className:this.props.className,src:e,width:this.props.width,height:t,srcSet:a,alt:this.props.alt})}}]),r}(i.Component);t.AmpImage=O,x.propTypes={src:a.default.string.isRequired,width:a.default.number.isRequired,height:a.default.number,offsetx:a.default.number,offsety:a.default.number,cropWidth:a.default.number,cropHeight:a.default.number,focalpointx:a.default.number,focalpointy:a.default.number,imageWidth:a.default.number,imageHeight:a.default.number,sizes:a.default.array,shape:a.default.string,resizeUrl:a.default.string,resizeUrlSquare:a.default.string,resizeUrl16x9:a.default.string},x.defaultProps={height:0,offsetx:0,offsety:0,cropWidth:0,cropHeight:0,focalpointx:0,focalpointy:0,sizes:[],shape:"original",resizeUrl:"https://image-prod.iol.co.za/resize",resizeUrlSquare:"https://image-prod.iol.co.za/square",resizeUrl16x9:"https://image-prod.iol.co.za/16x9"},O.propTypes={src:a.default.string.isRequired,width:a.default.number.isRequired,height:a.default.number,offsetx:a.default.number,offsety:a.default.number,cropWidth:a.default.number,cropHeight:a.default.number,focalpointx:a.default.number,focalpointy:a.default.number,imageWidth:a.default.number,imageHeight:a.default.number,sizes:a.default.array,shape:a.default.string,resizeUrl:a.default.string,resizeUrlSquare:a.default.string,resizeUrl16x9:a.default.string},O.defaultProps={height:0,offsetx:0,offsety:0,cropWidth:0,cropHeight:0,focalpointx:0,focalpointy:0,sizes:[],shape:"original",resizeUrl:"https://image-prod.iol.co.za/resize",resizeUrlSquare:"https://image-prod.iol.co.za/square",resizeUrl16x9:"https://image-prod.iol.co.za/16x9"}}}]);
//# sourceMappingURL=1.e8234536.chunk.js.map