1"use strict";(globalThis.webpackChunkfifaplus||=[]).push([[2361],{82361(e,t,a){a.r(t);var i=a(9950),d=a(55278),s=a(48115),o=a(48578),l=a(44261),r=a(72773),n=a(92604),c=a(63443),u=a(71765),h=a(97136),m=a(44414);const g=({maxNumberItems:e=20,entryEndpoint:t="",continueWatchingLabel:a})=>{var g;const{locale:f}=(0,d.Ay)(),{getFPWatchedVideos:v}=s.A,[p,y]=(0,i.useState)(!0),[I,N]=(0,i.useState)([]),[S,b]=(0,i.useState)();(0,i.useEffect)(()=>{c.A.getSectionByEntryPoint(t).then(b).catch(u.V.error),x()},[t]);const x=async()=>{const t=v();if(t){const a=JSON.parse(t),i={},d=a.filter(({videoId:e,videoLength:t,videoPlaybackMarker:a,endpointUrl:d=`/${f}/watch/${e}`})=>{const[s,l]=[t,a].map(o.IX);return!(!s||!l)&&(i[e]={totalVideoLengthMinutes:s,alreadyWatchedLengthMinutes:l,episodeDetailUrl:d},!0)}),s=(await Promise.allSettled(d.slice(0,e).map(async({videoId:e})=>await l.FH.get(`/sections/videoDetails/${e}?locale=${f}`))).then(e=>e.filter(({status:e})=>"fulfilled"===e))).map(({value:e})=>e.data).reduce((e,t)=>{const{alreadyWatchedLengthMinutes:a,totalVideoLengthMinutes:d,episodeDetailUrl:s}=i[t.videoEntryId]||{};return[...e,{title:t.title,seriesTitle:"",image:t.backgroundImage,readMorePageUrl:s,duration:d,previouslyWatched:a,autoPlay:!0}]},[]);N(s.reverse())}y(!1)};return(0,m.jsx)("div",{className:"row ff-py-32",children:(0,m.jsx)("div",{className:"container",children:p?(0,m.jsx)(h.Z,{}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"row",children:(0,m.jsx)("div",{className:"col-12",children:(0,m.jsx)(r.D,{mobile:"3",desktop:"3",size:r.l.H1,className:"display text-regular ff-mb-24 ff-mb-md-32 ff-mb-lg-56",text:null!==(g=null===S||void 0===S?void 0:S.continueWatchingLabel)&&void 0!==g?g:a})})}),(0,m.jsx)("div",{className:"row",children:(0,m.jsx)("div",{className:"d-flex flex-wrap",children:I.map(({readMorePageUrl:e,image:t,title:a,duration:i,previouslyWatched:d},s)=>(0,m.jsx)(n.q,{src:e,image:t.src,title:a,longevity:i,previouslyWatched:d,className:"ff-mb-8 ff-mb-md-16 ff-mb-lg-32",onClickTracker:()=>{},autoPlay:!0},s+e))})})]})})})};a.d(t,["default",0,g])},48115(e,t,a){var i=a(48578);const d=()=>window.localStorage.getItem("FPWatchedVideos"),s=(e,t)=>window.localStorage.setItem(e,JSON.stringify(t)),o={DEFAULT_MINUTES_VIDEO_TRACKING_START:5,DEFAULT_WAITING_SECONDS:5,getFPWatchedVideos:d,updateVideoDuration:e=>{const t=d(),a=[...(t?JSON.parse(t):[]).filter(t=>t.videoId!==e.videoId),{...e}];s("FPWatchedVideos",a)},getVideoDurationOnEntryId:e=>{const t=d(),a=(t?JSON.parse(t):[]).find(t=>t.videoId===e);if(!a)return null;const{videoLength:s,videoPlaybackMarker:o}=a;
1return{totalVideoLength:(0,i.IX)(s),alreadyWatchedLength:(0,i.IX)(o)}},removeVideoFromWatchedVideos:e=>{const t=d(),a=[...t?JSON.parse(t):[]].filter(t=>t.videoId!==e);s("FPWatchedVideos",a)}};a.d(t,["A",0,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.