1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{8312:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(9242)}])},8489:function(e,l,t){"use strict";t.d(l,{Z:function(){return Z}});var i=t(5944),n=t(7294),r=t(1163),a=t(6829),o=t(5148),d=t(6652);let u=(0,a.Z)("div",{target:"eahl1ho0",label:"Wrapper"})(),g=(0,a.Z)("form",{target:"eahl1ho1",label:"SearchForm"})("display:flex;align-items:stretch;justify-content:space-between;width:100%;height:4rem;padding:0.8rem 0;border:0.2rem solid #393427;border-radius:0.2rem;background:",d.O.N19,";",o.A.ltsm,"{width:24rem;}"),m=(0,a.Z)("input",{target:"eahl1ho2",label:"StyledInput"})("display:flex;flex:1 1 auto;padding:0 1.2rem 0;color:",d.O.N11,";font-size:1.6rem;line-height:2.4rem;border:0;outline:0;&::placeholder{color:",d.O.N15,";font-size:1.6rem;line-height:2.4rem;}&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px white inset !important;}"),c=(0,a.Z)("button",{target:"eahl1ho3",label:"StyledButton"})("display:flex;align-items:center;justify-content:center;padding:0 1.2rem 0 0.8rem;color:",d.O.P14,";background:",d.O.N19,";border:none;outline:0;cursor:pointer;"),h=(0,a.Z)("div",{target:"eahl1ho4",label:"IconWrapper"})("width:2.4rem;height:2.4rem;color:#393427;"),s=(0,a.Z)("span",{target:"eahl1ho5",label:"SearchResults"})("display:block;margin-top:0.4rem;color:",d.O.N13,";font-size:1.2rem;line-height:1.8rem;"),p=e=>{let{color:l}=e;return(0,i.tZ)("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.tZ)("g",{fill:"none",fillRule:"evenodd",children:(0,i.tZ)("path",{d:"M14.71 14l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28c0 .436.313 1.102.706 1.494l3.588 3.582a1 1 0 0 0 1.416-.006l.07-.07a.999.999 0 0 0 .006-1.416l-3.582-3.588c-.389-.39-1.154-.706-1.494-.706zM9.5 14C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z",fill:null!=l?l:"currentColor"})})})};var v=t(3918),f=t(4736);let b=e=>{var l;let{pagination:t,resetPagination:a}=e,[o,d]=(0,n.useState)(""),b=(0,r.useRouter)(),{prismic:Z}=(0,v.Z)(),y=e=>{let l=(0,f.Mp)(e.target.value);d(l)},k=()=>{let{pathname:e}=b,{category:l}=b.query,t=e.replace("[category]",l);a(),b.push({pathname:t,...!!(null==o?void 0:o.length)&&{query:{q:o}}})},w=e=>{"Enter"===e.key&&k()},x=e=>{e.preventDefault(),k()};return(0,i.BX)(u,{children:[(0,i.BX)(g,{children:[(0,i.tZ)(m,{type:"text",id:"blogSearch",name:"blogSearch",value:o,onChange:y,onKeyDown:w,placeholder:null==Z?void 0:null===(l=Z.blog)||void 0===l?void 0:l.searchInputPlaceholder}),(0,i.tZ)(c,{type:"submit",onClick:x,children:(0,i.tZ)(h,{children:(0,i.tZ)(p,{})})})]}),(()=>{var e;let{q:l}=b.query,{xWpTotal:n}=null!=t?t:{},{searchManyResultsFound:r,searchNoResultsFound:a,searchOneResultFound:o}=null!==(e=null==Z?void 0:Z.blog)&&void 0!==e?e:{};if(!l||void 0===n)return null;let d=(0,f.Mp)(String(l));return n?1===n?(0,i.BX)(s,{children:[n," ",o,' "',d,'"']}):(0,i.BX)(s,{children:[n," ",r,' "',d,'"']}):(0,i.BX)(s,{children:[a,' "',d,'"']})})()]})};var Z=b},6567:function(e,l,t){"use strict";var i=t(6278),n=t(618),r=t(2166),a=t(7113);l.Z=function(e){var l;let{category:t,limit:o,page:d,search:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{isoCodeCategories:g}=(0,i.Z)(),m=null===(l=null==g?void 0:g.find(e=>{let{slug:l}=e;return l===t}))||void 0===l?void 0:l.id,c=new URLSearchParams;c.append("encode","false"),c.append("indices","false"),c.append("arrayFormat","comma"),c.append("per_page",null!=o?o:r.jq),c.append("categories",null!=m?m:(g||[]).map(e=>{let{id:l}=e;return l}).join(",")),u&&c.append("search",u),d&&c.append("page",d);let h="".concat(r.cU,"?_embed&").concat(c),{data:s,error:p}=(0,n.Z)((null==g?void 0:g.length)?h:null,a.Z.API.blog.request,null!=e?e:{});return{posts:null==s?void 0:s.data,pagination:null==s?void 0:s.pagination,loading:!s&&!p,error:p}}},9242:function(e,l,t){"use strict";t.r(l),t.d(l,{__N_SSP:function(){return J},default:function(){return U}});var i=t(5944),n=t(9008),r=t.n(n),a=t(7294),o=t(1163),d=t(6829),u=t(5148),g=t(7535),m=t(6652);let c=(0,d.Z)("div",{target:"e197lk9x0",label:"Wrapper"})("margin-top:17.7rem;padding:2.4rem 1.6rem 0;",u.A.ltsm,"{padding-top:6.4rem;}",u.A.md,"{margin-top:19.4rem;padding-right:3.2rem;padding-left:3.2rem;}",u.A.lg,"{padding-right:6.4rem;padding-left:6.4rem;}"),h=(0,d.Z)("div",{target:"e197lk9x1",label:"InnerWrapper"})("width:100%;max-width:144rem;margin:0 auto;"),s=(0,d.Z)("section",{target:"e197lk9x2",label:"CategoryHeader"})("display:flex;flex-direction:column;margin-bottom:2.4rem;",u.A.ltsm,"{flex-direction:row;justify-content:space-between;margin-bottom:4rem;}"),p=(0,d.Z)("header",{target:"e197lk9x3",label:"CategoryTitleWrapper"})("margin-bottom:1.6rem;",u.A.ltsm,"{margin-bottom:0;}"),v=(0,d.Z)("h1",{target:"e197lk9x4",label:"Title"})("margin-bottom:0.8rem;color:",m.O.N12,";font-size:2.4rem;font-family:",g.I.bold,";line-height:2.8rem;",u.A.ltsm,"{margin-bottom:0.4rem;font-size:3.8rem;line-height:5.1rem;}"),f=(0,d.Z)("h2",{target:"e197lk9x5",label:"Description"})("color:",m.O.N12,";font-size:1.6rem;font-family:",g.I.regular,";line-height:2.4rem;",u.A.ltsm,"{font-size:2rem;line-height:3rem;}"),b=(0,d.Z)("div",{target:"e197lk9x6",label:"LoadingWrapper"})("margin:4rem 0;",u.A.ltsm,"{margin:6.4rem 0;}");var Z=t(3818),y=t(8489),k=t(6131),w=t(6672),x=t(5064),B=t(9755),S=t.n(B),A=t(9484),C=t(6629);let _=(0,d.Z)("div",{target:"e1g2smj80",label:"Wrapper"})("display:flex;align-items:center;justify-content:center;width:100%;margin:4rem 0;text-align:center;",u.A.ltsm,"{min-height:2.57rem;margin:6.4rem 0;text-align:left;}"),X=(0,d.Z)("div",{target:"e1g2smj81",label:"Container"})("display:flex;flex-direction:column;width:100%;height:100%;padding:0;overflow:hidden;border-radius:0;",u.A.ltsm,"{flex-direction:row;min-height:27rem;}"),j=(0,d.Z)("h3",{target:"e1g2smj82",label:"Title"})("margin-bottom:0.8rem;color:",m.O.P20,";font-size:1.8rem;font-family:",g.I.medium,";line-height:2.3rem;text-decoration:none;",u.A.ltsm,"{margin-bottom:1.6rem;font-size:2.8rem;font-family:",g.I.bold,";line-height:3.3rem;}"),q=(0,d.Z)("p",{target:"e1g2smj83",label:"Subtitle"})("font-size:1.2rem;line-height:2rem;",u.A.ltsm,"{font-size:2rem;line-height:2.8rem;}"),z=(0,d.Z)(C.Z,{target:"e1g2smj84",label:"StyledButton"})("margin-top:1.6rem;",u.A.ltsm,"{margin-top:2.4rem;}"),N=(0,d.Z)("div",{target:"e1g2smj85",label:"ContentWrapper"})("display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;padding:2.4rem 1.6rem;background-color:",(0,A.rgba)(m.O.U20,.35),";
1",u.A.ltsm,"{align-items:flex-start;padding:4rem 5.6rem;}"),O=(0,d.Z)("div",{target:"e1g2smj86",label:"ImageWrapper"})("position:relative;width:100%;height:20rem;",u.A.ltsm,"{width:40rem;height:auto;}");var P=t(2166),I=t(3918);let M=()=>{let{prismic:{commonData:e}}=(0,I.Z)(),{bannerEbookButton:l,bannerEbookText:t,bannerEbookTitle:n}=null!=e?e:{};return(0,i.tZ)(_,{"data-testid":"blogRecipesBanner",children:(0,i.BX)(X,{children:[(0,i.tZ)(O,{children:(0,i.tZ)(S(),{alt:n,layout:"fill",objectFit:"cover",quality:60,src:"/static/images/banner_cookbook.jpg"})}),(0,i.BX)(N,{children:[(0,i.tZ)(j,{children:n}),(0,i.tZ)(q,{children:t}),(0,i.tZ)(z,{href:P.oQ,children:l})]})]})})};var W=t(6288),D=t(216),T=t(6278),E=t(4316),L=t(6567),H=t(4736);let R=e=>{var l,t,n,r,d,u,g,m,B,S,A,C,_;let{pageData:X}=e,j=null===(l=X.fallbackKeyMapping)||void 0===l?void 0:l.blogPosts,q=j&&(null===(t=X.fallback)||void 0===t?void 0:t[j]),z=null===(n=X.fallbackKeyMapping)||void 0===n?void 0:n.blogCategories,N=z&&(null===(r=X.fallback)||void 0===r?void 0:r[z]),O=null===(d=X.fallbackKeyMapping)||void 0===d?void 0:d.blogBreeds,R=O&&(null===(u=X.fallback)||void 0===u?void 0:u[O]),[K,Y]=(0,a.useState)(1),[F,J]=(0,a.useState)(!1),[U,Q]=(0,a.useState)((null==q?void 0:q.data)||[]),G=(0,o.useRouter)(),{prismic:V}=(0,I.Z)(),{allCategories:$}=(0,T.Z)({fallbackData:N}),{loading:ee,pagination:el,posts:et}=(0,L.Z)({...q&&{fallbackData:q}},{page:String(K),limit:P.Jp,search:(null===(g=G.query)||void 0===g?void 0:g.q)&&(0,H.Mp)(null===(m=G.query)||void 0===m?void 0:m.q)}),{breeds:ei,loading:en}=(0,E.Z)({fallbackData:R},{limit:P.zL});return(0,a.useEffect)(()=>{let e=e=>{var l;J(!0);let[t]=(null==e?void 0:e.split("?"))||[],i=null==t?void 0:t.split("/"),n=(null==i?void 0:i[1])==="blog",r=null==$?void 0:null===(l=$.some)||void 0===l?void 0:l.call($,e=>(null==e?void 0:e.slug)===(null==i?void 0:i[2])),a=!!(null==i?void 0:i[3]);(n||r)&&!a&&(Q([]),Y(1))},l=()=>{J(!1)};return G.events.on("routeChangeStart",e),G.events.on("routeChangeComplete",l),()=>{G.events.off("routeChangeStart",e),G.events.off("routeChangeComplete",l)}},[]),(0,a.useEffect)(()=>{if(!et)return;if(1===K&&G.query.q)return Q(et);let e=null==U?void 0:U.map(e=>null==e?void 0:e.id),l=null==et?void 0:et.filter(l=>!(null==e?void 0:e.includes(null==l?void 0:l.id)));!(null==l?void 0:l.length)||(null==U?void 0:U.length)>=K*Number(P.Jp)||Q(e=>[...e,...l])},[K,et]),(0,i.BX)(i.HY,{children:[(0,i.tZ)(c,{children:(0,i.BX)(h,{children:[(0,i.BX)(s,{children:[(0,i.BX)(p,{children:[(0,i.tZ)(v,{children:null==V?void 0:null===(B=V.blog)||void 0===B?void 0:B.homePageTitle}),(0,i.tZ)(f,{children:null==V?void 0:null===(S=V.blog)||void 0===S?void 0:S.homePageDescription})]}),(0,i.tZ)(y.Z,{pagination:el,resetPagination:()=>{Y(1)}})]}),(ee||F)&&(0,i.tZ)(b,{children:(0,i.tZ)(Z.Z,{size:"4.8rem"})}),!ee&&!F&&(0,i.BX)(i.HY,{children:[!(null===(A=G.query)||void 0===A?void 0:null===(C=A.q)||void 0===C?void 0:C.length)&&(0,i.BX)(i.HY,{children:[(0,i.tZ)(k.Z,{variant:"default"}),(0,i.tZ)(w.Z,{showTitle:!1})]}),(0,i.tZ)(x.Z,{posts:U,hideLoadMoreButton:K>=(null!==(_=null==el?void 0:el.xWpTotalpages)&&void 0!==_?_:0),isLoadingInitial:ee,isLoadingMore:(null==U?void 0:U.length)<K*Number(P.Jp)&&(null==U?void 0:U.length)!==(null==el?void 0:el.xWpTotal),handleLoadMore:()=>Y(e=>e+1)}),(0,i.tZ)(M,{})]})]})}),!ee&&(0,i.BX)(i.HY,{children:[(0,i.tZ)(W.Z,{breeds:ei,loading:en}),(0,i.tZ)(c,{style:{margin:0},children:(0,i.tZ)(h,{children:(0,i.tZ)(D.Z,{})})})]})]})};var K=t(4833),Y=t(4077);let F=e=>{var l;let{pageData:{fallback:t,fallbackKeyMapping:n}={}}=e,a=null==n?void 0:n.blogCategories,o=a&&(null==t?void 0:t[a])||null,d=null==e?void 0:null===(l=e.appData)||void 0===l?void 0:l.lang,u="https://blog.barkyn.com";return"es-es"===d?u="https://blog.barkyn.es":"pt-pt"===d&&(u="https://blog.barkyn.it"),(0,i.BX)(K.Z,{customHeader:(0,i.tZ)(Y.Z,{categories:o}),children:[(0,i.tZ)(r(),{children:u&&(0,i.tZ)("link",{rel:"canonical",href:"".concat(u,"/")})}),(0,i.tZ)(R,{...e})]})};var J=!0,U=F}},function(e){e.O(0,[823,709,67,774,888,179],function(){return e(e.s=8312)}),_N_E=e.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.