1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[887],{57612:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/latest",function(){return r(38539)}])},38539:function(e,t,r){"use strict";r.r(t);var n=r(94776),a=r.n(n),i=r(52322),s=r(2784),c=r(21172),o=r(30353),u=r(3192),l=r(46471),p=r(82986),d=r(68618),f=r(924),m=r(72289),h=r(25121),_=r.n(h);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t,r,n,a,i,s){try{var c=e[i](s),o=c.value}catch(u){return void r(u)}c.done?t(o):Promise.resolve(o).then(n,a)}function b(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){v(i,n,a,s,c,"next",e)}function c(e){v(i,n,a,s,c,"throw",e)}s(void 0)}))}}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){y(e,t,r[t])}))}return e}function j(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var w=function(e){var t=e.content,r=t.count,n=t.seo,c=t.hasSponsorship,o=t.recipesData,h=t.brandData,g=t.heroImage,v=t.title,y=(0,s.useRef)(null),x=(0,s.useState)(!1),w=x[0],N=x[1],k=(0,s.use
1State)(e.content.items),O=k[0],S=k[1],P=(0,s.useState)(1),A=P[0],E=P[1],I={item_name:"latest_recipes",item_type:"text",position_in_subunit:0,position_in_unit:0,subunit_name:"branded_latest_recipes",subunit_type:"feed",unit_name:"latest_recipes",unit_type:"feed",target_content_url:h.url},F=function(){var e=b(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.Z.fetchRecentFoodFeed({from:O.length,size:20,featured:!1});case 3:t=e.sent,S(j(O).concat(j(t.items))),E(A+1),Z(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:return e.prev=12,N(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,9,12,15]])})));return function(){return e.apply(this,arguments)}}(),Z=function(){y&&y.current&&y.current.firstChild.querySelector("a").focus()};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Z,{content:{description:n.description,items:O,name:n.title}}),(0,i.jsxs)("main",{id:"content",children:[(0,i.jsx)("div",{className:"recent-page__hero-image-ratio-wrapper",children:(0,i.jsxs)("div",{className:"recent-page__hero-image-wrapper",children:[(0,i.jsx)("div",{className:"xs-hide md-block",children:(0,i.jsx)("img",{className:"recent-page__hero-image",src:"".concat(g.desktop.src,"?output-quality=auto&output-format=auto"),alt:g.desktop.alt})}),(0,i.jsx)("div",{className:"md-hide",children:(0,i.jsx)("img",{className:"recent-page__hero-image",src:"".concat(g.mobile.src,"?output-quality=auto&output-format=auto&resize=*:170"),alt:g.mobile.alt})})]})}),(0,i.jsxs)("div",{className:"recent-page__container",children:[(0,i.jsxs)("div",{className:"recent-page__title-wrapper",children:[(0,i.jsx)("h1",{className:"recent-page__title",children:"Latest Recipes"}),c&&(0,i.jsxs)("div",{className:"recent-page__disclaimer",children:[(0,i.jsx)("div",{className:"recent-page__disclaimer__image-wrapper",children:(0,i.jsx)("img",{src:h.image_url,alt:h.name})}),(0,i.jsxs)("div",{className:"recent-page__disclaimer__name",children:["Presented by ",(0,i.jsx)(p.Z,{url:h.url,linkTracking:I,children:h.name})]})]})]}),(0,i.jsx)(d.Z,{items:O,ref:y,page:A,pageSize:20,children:c&&function(e){var t=e.index;return 2===t&&(0,i.jsx)(f.Z,{items:Object.values(o.body),brand:h,title:v,positionInUnit:t,eventInfo:I},t)}})]}),w&&(0,i.jsx)("div",{className:"feed-loading loading-donut",children:(0,i.jsx)("img",{alt:"loading...",src:_()})}),!w&&O.length<r&&(0,i.jsx)("div",{className:"show-more",children:(0,i.jsx)(m.Z,{action:function(){N(!0),F()}})})]})]})};w.getInitialProps=function(){var e=b(a().mark((function e(t){var r,n,i,s,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.sponsored,i={},e.prev=3,e.next=6,u.Z.fetchRecentFoodFeed({from:0,size:20,includeFeatured:!1,sponsoredPreview:n});case 6:i=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),s=e.t0.status?e.t0.status:500,e.abrupt("return",{error:"Error Fetching Recent Page",statusCode:s});case 13:return l=(0,c.d)("latest",{context_page_id:"latest"}),e.abrupt("return",{pageType:"latest",maxAge:o.HY.short,analyticsInfo:l,content:x({},i)});case 15:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}(),t.default=w}},function(e){e.O(0,[858,793,914,677,774,888,179],(function(){return t=57612,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=latest-6f117b8edcb6a146.js.map
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.