(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[15],{"+Qka":function(t,e,n){var r=n("fmRc"),o=n("t2Dn"),a=n("cq/+"),i=n("T1AV"),s=n("GoyQ"),l=n("mTTR"),c=n("itsj");t.exports=function t(e,n,u,p,f){e!==n&&a(n,(function(a,l){if(f||(f=new r),s(a))i(e,n,l,u,t,p,f);else{var d=p?p(c(e,l),a,l+"",e,n,f):void 0;void 0===d&&(d=a),o(e,l,d)}}),l)}},"3du8":function(t,e,n){"use strict";var r=n("q1tI"),o=n.n(r),a=n("KJde"),i=n.n(a),s=n("mwIZ"),l=n.n(s),c=n("E+oP"),u=n.n(c),p=n("Wgwc"),f=n.n(p),d=n("lVqX"),m=n("u2yT"),g=n("gLav"),h=n.n(g),y=n("cZi2"),x=h.a.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-13f21bx-0"})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:0px 16px 0px 0px;position:relative;height:220px;left:0px;top:0px;margin-bottom:23px;border-left:6px solid transparent;:hover{background:#ffffff;position:static;box-shadow:0px 5px 20px rgba(0,0,0,0.15);border-radius:6px;flex:none;order:0;flex-grow:0;border-left:6px solid ",";}"],y.o.primary),v=h.a.div.withConfig({displayName:"styles__ImageContainer",componentId:"sc-13f21bx-1"})(["position:static;min-width:222px;height:188px;left:521px;top:16px;border-radius:6px;background-image:url(",");background-repeat:no-repeat;background-size:cover;background-position:center;","{min-width:150px;}"],(function(t){var e=t.background;return e||"/public/icons/article.png"}),m.a.MOBILE),b=h.a.div.withConfig({displayName:"styles__WrapperDetail",componentId:"sc-13f21bx-2"})(["display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:0px;height:192.92px;background:#ffffff;margin:0px 18px;"]),w=h.a.div.withConfig({displayName:"styles__TagTextWrapper",componentId:"sc-13f21bx-3"})(["display:flex;flex-direction:row;align-items:center;padding:4px 8px;justify-content:flex-start;border-radius:50px;flex:none;height:32px;margin-right:9px;position:static;left:0px;top:0px;"," ",""],(function(t){return!t.isContentType&&Object(g.css)(["background:",";"],y.o.blue20)}),(function(t){return t.isContentType&&Object(g.css)(["border:1px solid ",";"],y.o.gray900)})),_=h.a.p.withConfig({displayName:"styles__TagText",componentId:"sc-13f21bx-4"})(["color:",";font-family:",";font-size:",";line-height:18px;padding:3px 2px;text-align:center;letter-spacing:0.01em;"],y.o.gray900,y.q.openSans,y.q.size.small),C=h.a.p.withConfig({displayName:"styles__Title",componentId:"sc-13f21bx-5"})(["color:",";font-family:",";font-weight:600;font-size:",";position:static;height:49px;left:0px;top:0px;font-style:normal;font-weight:600;line-height:26px;color:#283237;flex:none;order:0;flex-grow:0;"],y.o.gray900,y.q.montserrat,y.q.size.large),q=h.a.div.withConfig({displayName:"styles__BodyText",componentId:"sc-13f21bx-6"})(["font-family:",";font-size:",";color:",";font-style:normal;font-weight:normal;line-height:24px;letter-spacing:0.011em;flex:auto;order:0;flex-grow:0;margin-top:12px;"],y.q.openSans,y.q.size.normal,y.o.gray900),j=h.a.div.withConfig({displayName:"styles__ContainerBody",componentId:"sc-13f21bx-7"})(["display:flex;flex-direction:column;align-items:flex-start;padding:0px;position:static;height:108px;left:0px;top:34px;flex:none;align-self:stretch;flex-grow:0;margin:12px 0px;"]),O=h.a.p.withConfig({displayName:"styles__Content",componentId:"sc-13f21bx-8"})(["display:flex;","{display:none;}"],m.a.MOBILE),S=(h.a.div.withConfig({displayName:"styles__Text",componentId:"sc-13f21bx-9"})(["color:",";font-family:",";font-size:",";line-height:24px;margin-bottom:10px;"],y.o.gray900,y.q.openSans,y.q.size.normal),h.a.p.withConfig({displayName:"styles__Location",componentId:"sc-13f21bx-10"})(["color:",";font-family:",";font-size:",";line-height:17px;margin:4px 25px 4px 0;display:flex;"],y.o.gray600,y.q.openSans,y.q.size.small),n("00x5")),k=(h.a.div.withConfig({displayName:"styles__CheckboxWrapper",componentId:"ydtkzs-0"})(["width:50px;min-width:50px;"]),h.a.p.withConfig({displayName:"styles__Title",componentId:"ydtkzs-1"})(["color:",";font-family:",";font-style:normal;font-weight:600;font-size:16px;line-height:26px;"],y.o.blue900,y.q.montserrat),h.a.p.withConfig({displayName:"styles__UpdatedText",componentId:"ydtkzs-2"})(["color:",";font-family:",";font-style:normal;font-weight:normal;font-size:12px;line-height:21px;padding-right:16px;"],y.o.gray900,y.q.openSans)),I=o.a.createElement;e.a=function(t){var e=t.main_image,n=t.updated_at,r=t.contenttype,a=t.title,s=t.summary,c=t.locations,p=!!t.curatedBy,m=l()(e,"url",""),g=Object(S.a)(s||""),h=g.length<70?g:g.slice(0,70)+"...";return I(x,null,I(b,null,I(y.c,null,p&&I(d.a,{hasRightPadding:!1}),p&&I(o.a.Fragment,null,"・"),I(k,null,"Last Updated ",f()(n).format("MMMM D, YYYY"))),I(j,null,I(i.a,{text:Object(S.a)(a||""),maxLine:"2",ellipsis:"...",trimRight:!0,basedOn:"letters",component:C}),I(O,null,I(i.a,{text:h,maxLine:"1",ellipsis:"...",trimRight:!0,basedOn:"letters",component:q}))),I(y.c,{width:"479px",height:"34px",alignItems:"flex-start",flexDirection:"row"},r&&I(w,{isContentType:!0},I(_,null,l()(r,"name",""))),!u()(c)&&I(y.c,{flexWrap:"wrap"},I(w,null,I(_,null,"".concat(l()(c[0],"name","")," ")," ",c.length>2&&", ".concat(c.length-1+"+ More")," "))))),I(v,{background:m}))}},KyW7:function(t,e,n){"use strict";var r=n("wx14"),o=n("q1tI"),a=n.n(o),i=n("3+eA"),s=n("/1yb"),l=n("MxrN"),c=n("cZi2"),u=a.a.createElement,p=function(t){var e=t.showSortBySelect,n=t.defaultSortByOptionId,r=t.handleChangeSortBy,o=t.count,a=t.removeAll;return u(c.c,{flexWrap:"wrap",justifyContent:"left"},e&&u(s.a,{defaultSortByOptionId:n,handleChangeSortBy:r}),u(l.a,{count:o,removeAll:a}))},f=a.a.createElement,d=function(t){var e=t.showSortBySelect;return f(i.a,null,(function(t){return f(p,Object(r.a)({showSortBySelect:e},t))}))};d.defaultProps={showSortBySelect:!0};e.a=d},LsHQ:function(t,e,n){var r=n("EA7m"),o=n("mv/X");t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,i=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(i=t.length>3&&"function"==typeof i?(a--,i):void 0,s&&o(n[0],n[1],s)&&(i=a<3?void 0:i,a=1),e=Object(e);++r<a;){var l=n[r];l&&t(e,l,r,i)}return e}))}},QkVN:function(t,e,n){var r=n("+Qka"),o=n("LsHQ")((function(t,e,n){r(t,e,n)}));t.exports=o},T1AV:function(t,e,n){var r=n("t2Dn"),o=n("5Tg0"),a=n("yP5f"),i=n("Q1l4"),s=n("+iFO"),l=n("03A+"),c=n("Z0cm"),u=n("3L66"),p=n("DSRE"),f=n("lSCD"),d=n("GoyQ"),m=n("YO3V"),g=n("c6wG"),h=n("itsj"),y=n("jeLo");t.exports=function(t,e,n,x,v,b,w){var _=h(t,n),C=h(e,n),q=w.get(C);if(q)r(t,n,q);else{var j=b?b(_,C,n+"",t,e,w):void 0,O=void 0===j;if(O){var S=c(C),k=!S&&p(C),I=!S&&!k&&g(C);j=C,S||k||I?c(_)?j=_:u(_)?j=i(_):k?(O=!1,j=o(C,!0)):I?(O=!1,j=a(C,!0)):j=[]:m(C)||l(C)?(j=_,l(_)?j=y(_):d(_)&&!f(_)||(j=s(C))):O=!1}O&&(w.set(C,j),v(j,C,x,b,w),w.delete(C)),r(t,n,j)}}},fHvF:function(t,e,n){"use strict";n.d(e,"e",(function(){return _})),n.d(e,"b",(function(){return C})),n.d(e,"a",(function(){return j})),n.d(e,"d",(function(){return O})),n.d(e,"c",(function(){return S}));var r,o=n("ODXe"),a=n("o0o1"),i=n.n(a),s=n("HaE+"),l=n("Puqe"),c=n.n(l),u=n("Z0cm"),p=n.n(u),f=n("tLB3"),d=n.n(f),m=n("4qC0"),g=n.n(m),h=n("vDqi"),y=n.n(h);function x(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){s=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}!function(t){t.ARTICLES="articles",t.BOOKMARKS="bookmarks"}(r||(r={}));var b=["additional_info","collections.name","framework_elements.name","frameworks.name","locations.name","organizations.name","outcome","problem","solution","summary","title","tags.tag"],w={0:{_score:{order:"desc"}},1:{created_at:{order:"desc"}},2:{updated_at:{order:"desc"}},3:{_script:{type:"number",script:{lang:"painless",source:"doc['votes.id'].length"},order:"desc"}}},_=function(){var t=Object(s.a)(i.a.mark((function t(e){var n,r,o,a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/articles",t.next=3,y()({method:"POST",baseURL:"https://es.circle-lab.com/prod",url:"/articles",data:q(e)});case 3:return n=t.sent,r=n.data,o=r.hits.hits,a=o.map((function(t){return t._source})),t.abrupt("return",{totalCount:r.hits.total.value,data:a});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(){var t=Object(s.a)(i.a.mark((function t(e){var n,r,o;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.search,r=void 0===n?"":n,o=e.filtered,t.abrupt("return",_({search:r,filtered:o}).then((function(t){return t.totalCount})));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),q=function(t){var e=t.search,n=void 0===e?"":e,r=t.sort,o=void 0===r?0:r,a=t.filtered,i={query:{bool:{must:[{exists:{field:"title"}}],must_not:[]}},from:t.start,size:10};if(a.is_draft||i.query.bool.must.push({bool:{should:[{match:{status:"Approved"}},{match:{status:"Legacy"}}]}}),o>=0&&(i.sort=w[o]),n.length>0){var s={bool:{must:{multi_match:{query:n,fields:b,type:"best_fields",operator:"and"}}}};i.query.bool.must.push(s)}for(var l in a)if(Array.isArray(a[l])){var c=a[l];if("collections"==l){var u,p=x(c);try{for(p.s();!(u=p.n()).done;){var f=u.value;if(10==f.value){var d={terms:{"tags.tag":["__".concat(f.id)]}};i.query.bool.must.push(d)}else{var m=f.value?"must_not":"must";i.query.bool[m].push({terms:{"collections.id":[f.id]}})}}}catch(t){p.e(t)}finally{p.f()}}else if(c.length>0){var g={};g[(l.includes("framework_elements")?"framework_elements":l)+".id"]=c;var h={terms:g};i.query.bool.must.push(h)}}else if("curator"==l){var y=a[l];if("boolean"==typeof y){var v=y?"must":"must_not";i.query.bool[v].push({exists:{field:"curatedBy"}})}else"number"==typeof y&&i.query.bool.must.push({term:{"curatedBy.id":y}})}else if("reports"==l){var _=a[l];if(null!=_){var C=_?"must":"must_not";i.query.bool[C].push({exists:{field:"reports"}})}}else{var q=a[l],j=l.includes("_ne")?"must_not":"must",O={};O[l.replace("_ne","")]=q,i.query.bool[j].push({match:O})}return i},j=function(t){return Object.fromEntries(Object.entries(t).map((function(t){var e=Object(o.a)(t,2),n=e[0],r=e[1];return"string"==typeof r?[n,[r]]:[n,r]})))},O=function(t){var e=c()(t,"curator"),n=j(e);return g()(t.curator)&&("Approved"===t.curator&&(n.curator=!0),"Not approved"===t.curator&&(n.curator=!1),isNaN(d()(t.curator))||(n.curator=d()(t.curator))),n},S=function(t){var e=c()(t,["n","token","openid","id","slug","step","search","_sort","_start","collection","collections","framework_id","framework_element_id"]);if(t.collections)if(p()(t.collections)){var n=t.collections.map((function(t){var e=t.split("="),n=Object(o.a)(e,2),r=n[0],a=n[1];return{id:r,value:d()(a)}}));e.collections=n.filter((function(t){return!n.some((function(e){return t.id===e.id&&t.value!==e.value}))}))}else{var r=t.collections.split("="),a=Object(o.a)(r,2),i=a[0],s=a[1];e.collections=[{id:i,value:d()(s)}]}return e}},itsj:function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},jeLo:function(t,e,n){var r=n("juv8"),o=n("mTTR");t.exports=function(t){return r(t,o(t))}},"l7C+":function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return l}));var r=n("gLav"),o=n.n(r),a=n("cZi2"),i=n("u2yT"),s=o.a.p.withConfig({displayName:"styles__SearchResults",componentId:"sc-1squdwr-0"})(["color:",";font-family:",";font-size:",";line-height:24px;"],a.o.gray800,a.q.openSans,a.q.size.normal),l=o.a.div.withConfig({displayName:"styles__SelectedFiltersWrapper",componentId:"sc-1squdwr-1"})(["width:100%;","{display:none;}","{display:none;}","{display:none;}"],i.a.MOBILE,i.a.TABLET,i.a.LAPTOP)},lVqX:function(t,e,n){"use strict";var r=n("q1tI"),o=n.n(r),a=n("gLav"),i=n.n(a),s=n("cZi2"),l=o.a.createElement,c=function(t){return l("svg",t,l("path",{d:"M6.5 0c-.93 0-1.691.512-2.188 1.219-.847-.149-1.753.027-2.406.683v.004h-.004c-.656.653-.832 1.559-.683 2.407C.512 4.809 0 5.57 0 6.5c0 .93.512 1.691 1.219 2.188-.149.847.027 1.75.687 2.406.653.656 1.555.836 2.407.687C4.809 12.488 5.57 13 6.5 13c.93 0 1.691-.512 2.188-1.219.847.149 1.75-.027 2.406-.687.656-.653.836-1.555.687-2.406C12.488 8.19 13 7.43 13 6.5c0-.93-.512-1.691-1.219-2.188.149-.847-.027-1.75-.687-2.406v-.004c-.653-.656-1.559-.832-2.406-.683C8.19.512 7.43 0 6.5 0zm0 1c.676 0 1.246.383 1.54.945l.194.367.399-.124a1.749 1.749 0 0 1 1.758.421c.476.48.609 1.153.421 1.758l-.124.399.37.195c.56.293.942.863.942 1.539a1.73 1.73 0 0 1-.941 1.54l-.371.194.124.399a1.74 1.74 0 0 1-.421 1.758 1.74 1.74 0 0 1-1.758.421l-.399-.124-.195.37A1.73 1.73 0 0 1 6.5 12a1.73 1.73 0 0 1-1.54-.941l-.194-.371-.399.124a1.74 1.74 0 0 1-1.758-.421 1.74 1.74 0 0 1-.421-1.758l.124-.399-.367-.195A1.727 1.727 0 0 1 1 6.5c0-.676.383-1.246.945-1.54l.367-.194-.124-.399a1.738 1.738 0 0 1 .421-1.758 1.74 1.74 0 0 1 1.758-.421l.399.124.195-.367A1.727 1.727 0 0 1 6.5 1zm2.645 3.148L5.5 7.793 3.852 6.148l-.704.704L5.5 9.207l4.355-4.355-.71-.704z",fill:"#53B9B0"}))};c.defaultProps={width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var u=i.a.div.withConfig({displayName:"ApprovedByCurator__Wrapper",componentId:"sc-1lebsld-0"})(["display:flex;align-items:center;padding-right:",";"],(function(t){return t.hasRightPadding?"16px":"0"})),p=i.a.p.withConfig({displayName:"ApprovedByCurator__Text",componentId:"sc-1lebsld-1"})(["color:",";margin-left:4px;font-family:",";font-size:",";line-height:18px;letter-spacing:0.01em;"],s.o.blue900,s.q.openSans,s.q.size.small);e.a=function(t){var e=t.hasRightPadding;return l(u,{hasRightPadding:void 0===e||e},l(c,{width:17.06,height:17.06}),l(p,null,"Approved by curator"))}},qgVr:function(t,e,n){"use strict";var r=n("o0o1"),o=n.n(r),a=n("HaE+"),i=n("q1tI"),s=n.n(i),l=n("lSCD"),c=n.n(l),u=n("QkVN"),p=n.n(u),f=n("Y+p1"),d=n.n(f),m=n("wx14"),g=n("sEfC"),h=n.n(g),y=n("E+oP"),x=n.n(y),v=n("tLB3"),b=n.n(v),w=n("7YD7"),_=n("KyW7"),C=n("3du8"),q=n("pKld"),j=n("gWjb"),O=n("nOHt"),S=n("6AvA"),k=n("cZi2"),I=n("gLav"),T=n.n(I),A=n("u2yT"),N=T.a.div.withConfig({displayName:"styles__MarginLeft",componentId:"bk2y0n-0"})(["margin-left:-24px;"]),L=T.a.div.withConfig({displayName:"styles__GridWrapper",componentId:"bk2y0n-1"})(["","{display:grid;grid-template-columns:1fr minmax(300px,",");grid-column-gap:40px;}","{display:grid;grid-template-columns:1fr minmax(300px,",");grid-column-gap:40px;}"],A.a.DESKTOP,k.s.large,A.a.LARGE,k.s.large),E=n("l7C+"),z=n("TLC/"),B=n("fHvF"),P=s.a.createElement,R="",D=function(t){var e=t.searchViaElacticsearch,n=t.getCaseUrlFn,r=t.filterComponentProps,l=t.loading,u=void 0!==l&&l,p=Object(O.useRouter)(),f=Object(S.q)().urlToViewCase,d=Object(i.useState)(!0),g=d[0],y=d[1],v=Object(i.useState)(0),I=v[0],T=v[1],A=Object(i.useState)([]),D=A[0],M=A[1],V=Object(i.useCallback)(h()(function(){var t=Object(a.a)(o.a.mark((function t(n){var r,a,i,s,l,c,u;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.search,a=n.sort,i=n.start,s=n.filtered,t.next=3,e({search:r,sort:a,start:i,filtered:s});case 3:l=t.sent,c=l.data,u=l.totalCount,M(c),T(u),g&&y(!1);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),300),[e]),W=h()((function(t){var e=t.search,n=t.sort,r=p.query._start?b()(p.query._start):0,o=Object(B.c)(p.query),a=Object(B.d)(o);V({search:e,sort:n,start:r,filtered:x()(a)?void 0:a})}),300);Object(i.useEffect)((function(){if(!u){var t=p.query._sort?b()(p.query._sort):0,e=p.query.search;W({search:e,sort:t})}}),[]),Object(i.useEffect)((function(){if(!u){var t=p.query.search;R===p.query.search?W({search:t,sort:p.query._sort?b()(p.query._sort):0}):(W({search:t,sort:2}),R=p.query.search)}}),[p.query,u]);var F=window.screen.width<768;return P("div",null,F&&P(w.a,Object(m.a)({showMobileVersion:!0},r)),!g&&I>0&&P(s.a.Fragment,null,P(E.a,null,P("b",null,I)," result",I>1&&"s"),!F&&P(k.m,{height:"50px"})),P(E.b,null,P(_.a,null)),P(L,null,P(N,null,P(k.j,null,g&&P(k.c,{width:"100%",justifyContent:"center",height:"200px"},P(z.a,null,"Loading...")),!g&&x()(D)&&P(k.c,{width:"100%",justifyContent:"center",height:"200px"},P(z.a,null,"No results")),!g&&D.map((function(t){return P(i.Fragment,{key:t.id},P(j.a,function(t){return c()(n)?n(t):f(t)}(t.id.toString()),P(C.a,t)))})),P(k.c,{justifyContent:"center",margin:"20px 0 0 0"},P(q.a,{totalCount:I,marginPagesDisplayed:1,pageRangeDisplayed:3})))),!F&&P(w.a,Object(m.a)({showDefaultVersion:!0},r))))};D.defaultProps={filterComponentProps:{}};var M=Object(i.memo)(D),V=s.a.createElement;e.a=Object(i.memo)((function(t){var e=t.elasticsearchObj,n=t.handleSearchCount,r=t.getCaseUrlFn,i=t.loading;return V(M,{loading:void 0!==i&&i,searchViaElacticsearch:function(){var t=Object(a.a)(o.a.mark((function t(r){var a;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c()(n)&&n(r),a=p()({},r,e),t.next=4,Object(B.e)(a);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),getCaseUrlFn:r})}),d.a)},t2Dn:function(t,e,n){var r=n("hypo"),o=n("ljhN");t.exports=function(t,e,n){(void 0!==n&&!o(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}}}]);