(self.webpackChunknisje=self.webpackChunknisje||[]).push([[5261],{40099:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return j}});var n=r(22122),a=r(6610),i=r(5991),c=r(10379),s=r(46070),o=r(77608),l=r(63027),u=r(5446),d=r(29309),f=r(63804),m=r(33163),h=r(97011),p=r(45876),v=r(66168),g=function(){return(0,l.createElement)("div",{className:"grid-item"},(0,l.createElement)("div",{className:"grid-item-inner grid-item-padding grid-item-loader"},(0,l.createElement)("div",{className:"box-loader animated-background-light"}),(0,l.createElement)("div",{className:"box-loader animated-background-light"})),(0,l.createElement)("span",{className:"grid-item-shadow"}))},E=function(e){var t=e.size,r=void 0===t?6:t,n=e.className;return(0,l.createElement)("div",{className:(0,v.classnames)("grid",n)},new Array(r).fill(0).map((function(e,t){return(0,l.createElement)(g,{key:"loader-box-".concat(t)})})))},y=r(17122),N=r(37035),Z=r(12470),k=r.n(Z),R=r(9974),w=r(58052),_=r.n(w);var P=function(e){(0,c.Z)(u,e);var t,r,n=(t=u,r=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}}(),function(){var e,n=(0,o.Z)(t);if(r){var a=(0,o.Z)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,s.Z)(this,e)});function u(){return(0,a.Z)(this,u),n.apply(this,arguments)}return(0,i.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.title,r=e.content,n=e.retriever,a=e.date,i=e.className;return e.author,(0,l.createElement)("div",{className:i},(0,l.createElement)("div",{className:"grid-item-inner"},(0,l.createElement)("div",{className:"grid-item-padding"},(0,l.createElement)("h2",{className:"listing-title"},(0,v.decodeEntities)(t.rendered)),(0,l.createElement)("div",{style:{fontSize:14,marginTop:8}},k()(a).format("LL")),(0,l.createElement)("span",null,(0,l.createElement)(_(),{convertNewline:!0},r.rendered))),(0,l.createElement)("a",{className:"grid-item-link",href:(0,v.decodeEntities)(n.link),rel:"noopener noreferrer",target:"_blank"},(0,l.createElement)(R.VisuallyHidden,{as:"span"},(0,m.__)("Read article")))))}}]),u}(f.Component);P.defaultProps={className:"grid-item retriever",showAuthor:!1,author:{id:"retriever",name:"Retriever"}};var b=P;var x=function(e){(0,c.Z)(d,e);var t,r,u=(t=d,r=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}}(),function(){var e,n=(0,o.Z)(t);if(r){var a=(0,o.Z)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,s.Z)(this,e)});function d(){var e;(0,a.Z)(this,d);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=u.call.apply(u,[this].concat(r))).state={search:""},e.renderPosts=function(e){return e.map((function(e){return(0,l.createElement)(b,(0,n.Z)({key:"retriever-archive-".concat(e.id)},e))}))},e.renderSearch=function(t){e.setState({search:t})},e}return(0,i.Z)(d,[{key:"noPostsFound",value:function(){var e=this.state.search,t=e?(0,m.sprintf)((0,m.__)('No articles found when searching for "%s"'),e.trim()):(0,m.__)("No articles found.");return(0,l.createElement)(y.Z,{title:t})}},{key:"render",value:function(){var e=this.state.search,t={per_page:18,context:"view"},r=this.props.page;return r&&(t.page=r),e&&(t.search=e),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(h.Header,{title:(0,m.__)("Retriever"),onSearch:this.renderSearch}),(0,l.createElement)(N.Z,{className:"grid",dispatch:this.props.receiveArticles,loader:(0,l.createElement)(E,null),meta:this.responseMeta,noPosts:this.noPostsFound(),paginationPath:"/retriever",path:"/wp-json/wp/v2/nisje-retriever",query:t,render:this.renderPosts}))}}]),d}(f.Component),j=(0,d.$j)((function(e,t){return{page:t.match.params.page}}),(function(e){return(0,u.DE)({receiveArticles:p.lh},e)}))(x)}}]);