_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[93],{"31HF":function(e,t,n){"use strict";var r;!function(e){e.CreditStartsAt="CreditStartsAt",e.Subtitles="Subtitles",e.RestrictDownloadRent="RestrictDownloadRent",e.RestrictDownloadSVOD="RestrictDownloadSVOD",e.RestrictDownloadBrazil="RestrictDownloadBrazil",e.DubbedInfo="DubbedInfo",e.Audios="Audios",e.RestrictDownloadBuy="RestrictDownloadBuy",e.Duration="Duration",e.Definition="Definition"}(r||(r={})),t.a=r},"6FTQ":function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},"8rE2":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("6FTQ");function a(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},DKbs:function(e,t,n){e.exports={container:"styles_container__Un2-P"}},"PKM/":function(e,t,n){"use strict";var r;!function(e){e.SerieName="SerieName",e.SeasonName="SeasonName",e.EpisodeName="EpisodeName",e.Position="Position"}(r||(r={})),t.a=r},QzAA:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/favorites",function(){return n("edzJ")}])},ZQyr:function(e,t,n){"use strict";var r=n("z7pX"),a=n("vJKn"),i=n.n(a),o=n("rg98"),c=n("q1tI"),s=n.n(c),u=n("nbPw"),l=n("TQwL"),f=n("LeJ0"),d=n("HE+r"),p=n("RC5v"),m=n("I009"),b=n("voTe"),v=n("31HF"),g=n("2FwC"),O=n("Ef3g"),h=n("t2g+"),w=n("PKM/"),y=n("KyXm"),j=n("zuMC"),P=n("HcUL");function S(){return E.apply(this,arguments)}function E(){return(E=Object(o.a)(i.a.mark((function e(){var t,n,r,a,o,c,s=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:0,n={Criteria:{MediaType:l.a.Box|l.a.Content|l.a.Episode|l.a.Movie|l.a.Clip},Groups:[{GroupName:b.a.SerieInfo,GroupProperties:[w.a.EpisodeName].join("|")},{GroupName:b.a.Price,GroupProperties:[h.a.PurchasePrice,h.a.SVODPrice,h.a.FreePrice,h.a.RentPrice].join("|")},{GroupName:b.a.Metadata,GroupProperties:[O.a.UniqueUrl,O.a.Description,O.a.Synopsis].join("|")},{GroupName:b.a.FileInfo,GroupProperties:[v.a.Duration].join("|")},{GroupName:b.a.Images,GroupProperties:[g.a.TypeId,g.a.Url].join("|")}],Options:{IncludeBadges:!0,BoxBehavior:m.a.Group,FillSiblings:!1,FillSiblingsChilds:!1,ImageTypeIds:[d.a.Thumb335,d.a.FeaturedBanner],OnlyEnabledItens:!0,OnlySVODItens:!1,PageNumber:t,RecordsPerPage:20,SortCriteria:y.a.Custom,SortOrder:j.a.Desc,UseApplePrice:!0},AuthenticationTicket:f.a.api.secret},e.next=4,p.a.post("/FindMediaBest",n);case 4:if(r=e.sent,a=r.data,(o=a.FindMediaBestResult)&&0===o.Result){e.next=9;break}throw new Error("Ocorreu um erro ao carregar o conte\xfado ".concat(null===o||void 0===o?void 0:o.Message));case 9:return c=Object(P.a)(o),e.abrupt("return",c);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var D=n("dktV"),_=n("fGnp"),N=n("Txnz"),F=s.a.createElement;t.a=function(){var e=Object(c.useState)(!1),t=e[0],n=e[1],a=Object(c.useState)(1),l=a[0],f=a[1],d=Object(c.useState)(null),p=d[0],m=d[1],b=Object(u.a)().t;Object(c.useEffect)((function(){n(!0),function(){var e=Object(o.a)(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S();case 2:t=e.sent,v(t),n(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[]);var v=function(e){var t=null===p||void 0===p?void 0:p.medias;t?e.medias.forEach((function(e){t=[].concat(Object(r.a)(p.medias),[e])})):t=e.medias,m({totalPages:e.totalPages,totalRecords:e.totalRecords,medias:t})},g=function(){var e=Object(o.a)(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(l<p.totalPages)){e.next=14;break}return n(!0),f(l+1),e.prev=3,e.next=6,S(l);case 6:t=e.sent,v(t),n(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),n(!1);case 14:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(){return e.apply(this,arguments)}}();return F(s.a.Fragment,null,F(_.a,{title:b("account:favorites.title")}),F(N.a,{sectionMedias:p,handleLoadMore:g}),t&&F(D.a,{message:"".concat(b("account:favorites.loadingMessage")),align:"left"}))}},edzJ:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),a=n.n(r),i=n("e/F1"),o=n("ZQyr"),c=n("tumb"),s=n.n(c),u=n("iW6H"),l=a.a.createElement,f=function(){return l(i.a,null,l(u.a,null,l("div",{id:s.a.favorites},l("div",{className:s.a.content},l(o.a,null)))))},d=a.a.createElement;t.default=function(){return d(f,null)}},fGnp:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r),i=n("DKbs"),o=n.n(i),c=n("YFqc"),s=n.n(c),u=a.a.createElement,l=function(e){var t=e.children,n=e.title,r=e.link;return u(a.a.Fragment,null,u(a.a.Fragment,null,r?u(s.a,{href:r},u("a",{title:n},t)):t))};t.a=function(e){var t=e.title,n=e.image,r=e.link,a=e.isMainTitle,i=void 0!==a&&a;return u(l,{link:r,title:t},u("header",{className:o.a.container},n&&u("img",{src:n,alt:t}),u(i?"h1":"h2",null,t)))}},iW6H:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r),i=n("OgpL"),o=n("nOHt"),c=a.a.createElement;t.a=function(e){var t=e.children,n=Object(i.c)().user,s=Object(o.useRouter)(),u=s.asPath,l=Object(r.useState)(!1),f=l[0],d=l[1];return Object(r.useEffect)((function(){n||s.push("/session/login/?redirect_url=".concat(u)),d(!0)}),[n]),n&&f?t:c(a.a.Fragment,null)}},tumb:function(e,t,n){e.exports={favorites:"styles_favorites__214fA",content:"styles_content__2OWkB"}},z7pX:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("6FTQ");var a=n("8rE2");function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(a.a)(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.")}()}}},[["QzAA",1,2,9,0,3,4,5,6,7,8]]]);