"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6741],{79091:function(n,t,e){e.d(t,{G:function(){return g}});var i=e(92228),r=e(52322),o=e(72779),a=e.n(o),d=(e(2784),e(19596)),l=e(45103),c=e(91842);function s(){var n=(0,i.Z)(["\n margin-top: ",";\n"]);return s=function(){return n},n}function u(){var n=(0,i.Z)(["\n margin-top: ",";\n"]);return u=function(){return n},n}function p(){var n=(0,i.Z)(["\n .inner {\n max-width: 480px;\n margin: 0 auto;\n text-align: center;\n }\n\n .title {\n ",";\n }\n\n .message {\n ",";\n margin-top: ",";\n }\n"]);return p=function(){return n},n}var g=function(n){var t=n.title,e=n.message,i=n.className,o=n.action,d="compact"===n.displayType?f:v;return(0,r.jsx)(m,{className:a()(i),baseColor:"none",children:(0,r.jsxs)("div",{className:"inner",children:[(0,r.jsx)("div",{className:"title",role:"alert",children:t}),n.message&&(0,r.jsx)("div",{className:"message",role:"alert",children:e}),!!o&&(0,r.jsx)(d,{children:o})]})})},f=d.default.div.withConfig({componentId:"sc-7d0540f7-0"})(s(),c.spacing.s),v=d.default.div.withConfig({componentId:"sc-7d0540f7-1"})(u(),c.spacing.l),m=(0,d.default)(l.PageSection).withConfig({componentId:"sc-7d0540f7-2"})(p(),(0,c.setPropertyToColorVar)("color","ipt-on-baseAlt-textPrimary-color"),(0,c.setPropertyToColorVar)("color","ipt-on-baseAlt-textSecondary-color"),c.spacing.m)},6741:function(n,t,e){e.d(t,{Pz:function(){return zn},Gg:function(){return An},tN:function(){return Wn}});var i=e(70865),r=e(96670),o=e(66383),a=e(92228),d=e(52322),l=e(30382),c=e.n(l),s=(e(2784),e(73857)),u=e(19596),p=e(15907),g=e(45103),f=e(91842),v=e(79091),m=e(57531),h=e(85603);function x(){var n=(0,a.Z)(["\n fragment WatchOptionCategories on CategorizedWatchOptions {\n categoryName {\n value\n language\n }\n watchOptions {\n title {\n value\n language\n }\n link(platform: WEB)\n shortTitle {\n value\n language\n }\n description {\n value\n language\n }\n provider {\n name {\n value\n language\n }\n logos {\n icon {\n url\n height\n width\n }\n }\n refTagFragment\n }\n }\n }\n"]);return x=function(){return n},n}function b(){var n=(0,a.Z)(["\n align-items: flex-start;\n display: flex;\n height: 100%;\n margin: 3rem 0;\n justify-content: center;\n"]);return b=function(){return n},n}function y(){var n=(0,a.Z)(["\n ","\n"]);return y=function(){return n},n}function T(){var n=(0,a.Z)(["\n ","\n ","\n text-transform: none;\n font-size: 13px;\n margin: 0;\n padding: 13px 0 7px 15px;\n\n "," {\n padding: 13px 0 7px;\n }\n"]);return T=function(){return n},n}function C(){var n=(0,a.Z)(["\n &:first-of-type {\n border-top: 1px solid rgba(",", 0.1);\n }\n\n border-bottom: 1px solid rgba(",", 0.1);\n height: 4rem;\n\n "," {\n padding: 0;\n }\n"]);return C=function(){return n},n}function I(){var n=(0,a.Z)(["\n display: flex;\n"]);return I=function(){return n},n}function w(){var n=(0,a.Z)(["\n min-width: ","px;\n margin-top: auto;\n margin-bottom: auto;\n margin-right: 0.5rem;\n border-radius: 0.25rem;\n"]);return w=function(){return n},n}function j(){var n=(0,a.Z)(["\n margin-top: auto;\n margin-bottom: auto;\n"]);return j=function(){return n},n}function _(){var n=(0,a.Z)(["\n ","\n"]);return _=function(){return n},n}function Z(){var n=(0,a.Z)(["\n ","\n ","\n\n "," {\n max-width: 260px;\n }\n"]);return Z=function(){return n},n}function k(){var n=(0,a.Z)(["\n ","\n background: initial;\n"]);return k=function(){return n},n}var P=function(n){var t=n.titleId,e=n.category,o=n.watchOptions,a=n.refMarker,l=e.toUpperCase().replace("IMDB","IMDb"),c=(0,m.Ok)().adSlotsInfo;return(0,d.jsxs)(S,{children:[(0,d.jsx)(R,{children:l}),(0,d.jsx)(g.List,{children:t&&o.map((function(n){var o,l,s,u=(0,h.i)(t,n,a,c),p="shw"===n.provider.refTagFragment?n.title.value:n.provider.name.value,g=null===(o=n.provider)||void 0===o||null===(l=o.logos)||void 0===l?void 0:l.icon;return(0,d.jsx)(N,(0,r.Z)((0,i.Z)({},u),{children:(0,d.jsxs)(A,{children:[(null===g||void 0===g?void 0:g.url)&&(null===g||void 0===g?void 0:g.width)&&(null===g||void 0===g?void 0:g.height)&&(0,d.jsx)(B,{imageModel:{caption:p,url:g.url,maxWidth:g.width,maxHeight:g.height},size:50}),(0,d.jsxs)(W,{children:[(0,d.jsx)(z,{children:p}),(0,d.jsx)(V,{children:null===(s=n.description)||void 0===s?void 0:s.value})]})]})}),"".concat(e,"-").concat(n.link))}))})]})},M=function(n){var t=n.titleId,e=n.watchOptionsCategories,i=n.isLoading,r=n.refMarker,o=(0,s.Z)();return i?(0,d.jsx)(L,{"data-testid":"loader-container",children:(0,d.jsx)(g.Loader,{})}):e&&0!==e.length?(0,d.jsx)(d.Fragment,{children:e.map((function(n){return(0,d.jsx)(P,{titleId:t,category:n.categoryName.value,watchOptions:n.watchOptions,refMarker:r},n.categoryName.value)}))}):(0,d.jsx)(D,{title:o.formatMessage({id:"error_emptyStates_watchOptions_title",defaultMessage:"Watch Options are currently unavailable"}),message:o.formatMessage({id:"error_common_refreshOrTryAgain",defaultMessage:"Please refresh the page or try again later."})})},O=c()(x());M.fragments={watchOptionsCategories:O};var L=u.default.div.withConfig({componentId:"sc-b2d8b824-0"})(b()),S=u.default.div.withConfig({componentId:"sc-b2d8b824-1"})(y(),(0,f.setTypographyType)("body")),R=u.default.div.withConfig({componentId:"sc-b2d8b824-2"})(T(),(0,f.setTypographyType)("overline"),(0,f.setPropertyToColorVar)("color","ipt-on-baseAlt-accent1-color"),f.mediaQueries.breakpoints.above.m),N=(0,u.default)(g.ListItem).withConfig({componentId:"sc-b2d8b824-3"})(C(),(0,f.getColorVarValue)("ipt-base-rgb"),(0,f.getColorVarValue)("ipt-base-rgb"),f.mediaQueries.breakpoints.above.m),A=u.default.div.withConfig({componentId:"sc-b2d8b824-4"})(I()),B=(0,u.default)(g.PhotoImage).withConfig({componentId:"sc-b2d8b824-5"})(w(),50),W=u.default.div.withConfig({componentId:"sc-b2d8b824-6"})(j()),z=u.default.div.withConfig({componentId:"sc-b2d8b824-7"})(_(),(0,f.setTypographyType)("subtitle")),V=u.default.div.withConfig({componentId:"sc-b2d8b824-8"})(Z(),(0,f.setPropertyToColorVar)("color","ipt-on-baseAlt-textHint-color"),(0,f.setTypographyType)("bodySmall"),f.mediaQueries.breakpoints.above.m),D=(0,u.default)(v.G).withConfig({componentId:"sc-b2d8b824-9"})(k(),(0,f.setTypographyType)("body")),F=e(22414),Q=e(58267),U=e(81303),E=e(13813),$=e(64023),q=e(3499),G=e(91793),H=e(77637),Y=e(76510),K="tp",X="btp_trlr",J="btp_ta",nn="btp_rt",tn="btp_rt_ds",en="btp_ml",rn="btp_gl",on="btp_ps",an=(0,Y.vU)({ratingButtonRatedAriaLabel:{id:"common_ariaLabels_ratingButtonRated",defaultMessage:"Your rating: {rating}"},ratingButtonUnratedAriaLabel:{id:"common_ariaLabels_ratingButtonUnrated",defaultMessage:"Rate {titleName}"},ratingPromptRateLabel:{id:"common_ratingPrompt_rate",defaultMessage:"Rate"},closePrompt:{id:"common_ariaLabel_closePrompt",defaultMessage:"Close Prompt"}}),dn=e(25699),ln=e(61436),cn=e(31619),sn=e(97026),un=e(35635),pn=e(89254),gn=e(96485);function fn(){var n=(0,a.Z)(["\n width: 4.5rem;\n"]);return fn=function(){return n},n}function vn(){var n=(0,a.Z)(["\n display: flex;\n ","\n ","\n margin-bottom: ",";\n margin-top: ",";\n max-width: 100%;\n padding-left: ",";\n padding-right: ",";\n\n "," {\n padding-left: 0;\n padding-right: 0;\n margin-top: 0;\n }\n"]);return vn=function(){return n},n}function mn(){var n=(0,a.Z)(["\n display: flex;\n flex-direction: column;\n padding-left: ",";\n overflow: hidden;\n"]);return mn=function(){return n},n}function hn(){var n=(0,a.Z)(["\n ","\n "]);return hn=function(){return n},n}function xn(){var n=(0,a.Z)(["\n margin-bottom: ",";\n padding: 0;\n\n ","\n\n .prompt-title-text {\n max-height: 7.4rem;\n }\n"]);return xn=function(){return n},n}function bn(){var n=(0,a.Z)(["\n ","\n\n .standalone-star {\n padding: 0;\n min-width: 0;\n }\n"]);return bn=function(){return n},n}function yn(){var n=(0,a.Z)(["\n height: fit-content;\n"]);return yn=function(){return n},n}function Tn(n,t,e){var i="/title/".concat(n,"/");return e?"".concat(i,"?").concat((0,H.I)(t,e)):i}var Cn=function(n){var t,e,i,r,o=n.titleData,a=o.originalTitleText,l=o.titleText,c=o.id,s=o.primaryImage,u=o.titleType,p=o.titleGenres,v=o.ratingsSummary,m=o.canRate,h=(0,g.useRatingsContext)(c).rating,x=(0,ln.P)(h,"user"),b=(0,ln.P)(null===v||void 0===v?void 0:v.aggregateRating,"imdb"),y=(0,pn.K)({originalTitleText:a,titleText:l}),T=(0,cn.N)(an.ratingButtonRatedAriaLabel,{rating:x||""}),C=(0,cn.N)(an.ratingButtonUnratedAriaLabel,{titleName:y}),I=(0,cn.N)(an.ratingPromptRateLabel),w=Tn(c,"".concat(K,"_t"),n.refMarker),j=Tn(c,"".concat(K,"_i"),n.refMarker),_=function(n){var t=[],e=n.releaseYear,i=n.runtime,r=n.certificate,o=n.canHaveEpisodes,a=(0,un.y)(e,o);return a&&t.push(a),(null===i||void 0===i?void 0:i.seconds)&&t.push((0,sn.L)(i.seconds,sn.A.HOURS_MINUTES_EXPLICIT)),(null===r||void 0===r?void 0:r.rating)&&t.push(r.rating),t}(n.titleData);return(0,d.jsxs)(wn,{children:[(0,d.jsx)(In,{children:(0,d.jsx)(g.Poster,{imageProps:{imageModel:(0,gn.Gs)(s,y),imageType:null===u||void 0===u?void 0:u.id,size:"xs"},ariaLabel:y,href:j})}),(0,d.jsxs)(jn,{children:[(0,d.jsx)(_n,{href:w,titleTextClass:"prompt-title-text",typographyType:(null!==(r=null===y||void 0===y?void 0:y.length)&&void 0!==r?r:0)>65?"".concat((0,f.setTypographyType)("subtitle")):"",children:y}),_.length>0&&(0,d.jsx)(g.InlineList,{showDividers:!0,inline:!0,noWrap:!0,"data-testid":en,children:_.map((function(n){return(0,d.jsx)(g.InlineListItem,{children:n},n)}))}),p&&p.genres.length>0&&(0,d.jsx)(g.InlineList,{showDividers:!0,inline:!0,noWrap:!0,"data-testid":rn,children:p.genres.map((function(n){return(0,d.jsx)(g.InlineListItem,{children:n.genre.text},"".concat(n.genre.text))}))}),(b||(null===m||void 0===m?void 0:m.isRatable))&&(0,d.jsxs)(Zn,{"data-testid":nn,children:[b&&(0,d.jsx)(g.RatingStar,{className:tn,formattedRating:b,maxRating:10}),(null===m||void 0===m?void 0:m.isRatable)&&y&&(0,d.jsx)(dn.T,{title:{id:c,titleText:y,canRate:m.isRatable},refPrefix:(null===(t=n.refMarker)||void 0===t?void 0:t.prefix)?"".concat(null===(e=n.refMarker)||void 0===e?void 0:e.prefix,"_").concat(K):K,refSuffix:(null===(i=n.refMarker)||void 0===i?void 0:i.suffix)||"",ratingTriggerComponent:function(n){var t=n.onUserRatingClick;return(0,d.jsx)(kn,{ariaLabelRated:T,ariaLabelUnrated:C,formattedRating:x,className:b?void 0:"standalone-star",onClick:t,rateLabel:I})}})]})]})]})},In=u.default.div.withConfig({componentId:"sc-a78ec4e3-0"})(fn()),wn=u.default.div.withConfig({componentId:"sc-a78ec4e3-1"})(vn(),(0,f.setTypographyType)("bodySmall"),(0,f.setPropertyToColorVar)("color","ipt-on-baseAlt-textSecondary-color"),f.spacing.s,f.spacing.xxs,f.spacing.s,f.spacing.s,f.mediaQueries.breakpoints.above.m),jn=u.default.div.withConfig({componentId:"sc-a78ec4e3-2"})(mn(),f.spacing.s),_n=(0,u.default)(g.Title).withConfig({componentId:"sc-a78ec4e3-3"})(xn(),f.spacing.xxs,(function(n){return(0,u.css)(hn(),n.typographyType)})),Zn=u.default.div.withConfig({componentId:"sc-a78ec4e3-4"})(bn(),(0,f.setTypographyType)("body")),kn=(0,u.default)(g.RateButton).withConfig({componentId:"sc-a78ec4e3-5"})(yn());function Pn(){var n=(0,a.Z)(["\n fragment baseTitlePromptQuery on Title {\n id\n watchOptionsByCategory(\n promotedProvider: $providerId\n location: $location\n ) {\n categorizedWatchOptionsList {\n ...WatchOptionCategories\n }\n }\n plot {\n plotText {\n plainText\n }\n }\n latestTrailer {\n id\n }\n productionStatus {\n currentProductionStage {\n id\n text\n }\n }\n }\n ","\n"]);return Pn=function(){return n},n}function Mn(){var n=(0,a.Z)(["\n query Base_Title_Prompt(\n $id: ID!\n $providerId: String\n $location: WatchOptionsLocation\n ) {\n title(id: $id) {\n ...baseTitlePromptQuery\n }\n }\n ","\n"]);return Mn=function(){return n},n}function On(){var n=(0,a.Z)(["\n padding-bottom: ",";\n"]);return On=function(){return n},n}function Ln(){var n=(0,a.Z)(["\n display: flex;\n margin-bottom: ",";\n padding-left: ",";\n padding-right: ",";\n\n "," {\n padding-left: 0;\n padding-right: 0;\n }\n\n & > :nth-child(1):not(:last-child) {\n margin-right: ",";\n }\n"]);return Ln=function(){return n},n}function Sn(){var n=(0,a.Z)(["\n ","\n ","\n margin-bottom: ",";\n padding-left: ",";\n padding-right: ",";\n\n "," {\n padding-left: 0;\n padding-right: 0;\n }\n"]);return Sn=function(){return n},n}function Rn(){var n=(0,a.Z)(["\n ","\n"]);return Rn=function(){return n},n}function Nn(){var n=(0,a.Z)(["\n margin: ",";\n\n "," {\n margin-left: 0;\n margin-right: 0;\n }\n"]);return Nn=function(){return n},n}var An=c()(Pn(),O),Bn=c()(Mn(),An),Wn=function(n){var t=n.titleId,e=n.pause,r=void 0!==e&&e,a=n.queryOverride,d=(0,m.Ok)().adSlotsInfo,l=(0,p.getProviderId)(d),c=(0,q.ic)(),s=(0,o.Z)((0,$.E)((0,i.Z)({query:Bn,variables:{id:t,promotedProvider:l,providerId:l,location:c},context:{serverSideCacheable:!1,personalized:!1},pause:r},a)),2);return[s[0],s[1]]},zn=function(n){var t,e,a,l,c,u,p,f,m=n.title,h=n.baseTitlePromptData,x=n.refMarker,b=n.onClose,y=n.isOpen,T=n.queryOverride,C=n.contentOverride,I=n.actionOverride,w=(0,s.Z)(),j=(0,E.y)(),_=(0,r.Z)((0,i.Z)({},j),{refTag:(0,H.z)(K,x)}),Z=(0,o.Z)(Wn({titleId:(null===m||void 0===m?void 0:m.id)||"",pause:!!h||!m||!y,queryOverride:T}),2),k=Z[0],P=Z[1];if(!m||!(null===(t=m.titleText)||void 0===t?void 0:t.text))return null;var O=null!==h&&void 0!==h?h:null===(e=k.data)||void 0===e?void 0:e.title,L=k.fetching,S=k.error,R=null===O||void 0===O||null===(a=O.watchOptionsByCategory)||void 0===a?void 0:a.categorizedWatchOptionsList,N=R&&R.length>0,A=null===O||void 0===O||null===(l=O.latestTrailer)||void 0===l?void 0:l.id,B=A?"/video/".concat(A,"/?ref_=").concat((0,H.z)("".concat(K,"_vp"),x)):void 0,W=!I,z=null===O||void 0===O||null===(c=O.productionStatus)||void 0===c?void 0:c.currentProductionStage.id,V=null===O||void 0===O||null===(u=O.productionStatus)||void 0===u?void 0:u.currentProductionStage.text,D=z&&V&&"released"!==z;return(0,d.jsx)(Qn,{onCloseClicked:b,isOpen:y,closePromptLabel:w.formatMessage(an.closePrompt),children:(0,d.jsxs)(Vn,{children:[(0,d.jsx)(Cn,{titleData:m,refMarker:x}),L&&(0,d.jsx)(F.lI,{height:"feature"}),!L&&(0,d.jsxs)(d.Fragment,{children:[(null===O||void 0===O||null===(p=O.plot)||void 0===p||null===(f=p.plotText)||void 0===f?void 0:f.plainText)&&(0,d.jsx)(Fn,{children:O.plot.plotText.plainText}),D&&(0,d.jsx)(Un,{"data-testid":on,children:V}),C&&C((null===k||void 0===k?void 0:k.data)||{}),(0,d.jsxs)(Dn,{children:[B&&W&&(0,d.jsx)(g.SecondaryButton,{width:"full-width",preIcon:"play-arrow",href:B,"data-testid":X,children:(0,d.jsx)(U.q,{id:"common_buttons_trailer"})}),(0,d.jsx)(Q.f,{titleId:m.id,watchlistMetricsContext:_}),I&&I((null===k||void 0===k?void 0:k.data)||{})]}),N&&(0,d.jsx)(M,{titleId:m.id,watchOptionsCategories:R,refMarker:(0,r.Z)((0,i.Z)({},x),{prefix:"".concat(x.prefix,"_").concat(K)})})]}),!L&&S&&(0,d.jsx)(v.G,{title:w.formatMessage({id:"error_common_sorryTryAgain",defaultMessage:"Sorry, there was an error. Please try again."}),displayType:"compact",action:(0,d.jsx)(g.TextLink,{onClick:function(){return P()},text:w.formatMessage({id:"common_buttons_retry",defaultMessage:"Try again"}),"data-testid":J})})]})})},Vn=u.default.div.withConfig({componentId:"sc-d3701649-0"})(On(),f.spacing.l),Dn=u.default.div.withConfig({componentId:"sc-d3701649-1"})(Ln(),f.spacing.xs,f.spacing.s,f.spacing.s,f.mediaQueries.breakpoints.above.m,f.spacing.xs),Fn=u.default.div.withConfig({componentId:"sc-d3701649-2"})(Sn(),(0,f.setPropertyToColorVar)("color","ipt-on-baseAlt-textPrimary-color"),(0,G.S)(4),f.spacing.s,f.spacing.s,f.spacing.s,f.mediaQueries.breakpoints.above.m),Qn=(0,u.default)(g.Prompt).withConfig({componentId:"sc-d3701649-3"})(Rn(),(0,f.setTypographyType)("bodySmall")),Un=u.default.div.withConfig({componentId:"sc-d3701649-4"})(Nn(),f.spacing.s,f.mediaQueries.breakpoints.above.m)},85603:function(n,t,e){e.d(t,{i:function(){return d}});var i=e(95460),r=e(15907),o=/[^a-zA-Z0-9]/g,a=function(n,t,e,a,d){return function(){var l,c,s=null===(l=a.provider)||void 0===l||null===(c=l.refTagFragment)||void 0===c?void 0:c.replace(o,"").substr(0,12),u="watch-".concat(n,"-").concat(s);(0,i.c$)(t,u,e),a.promoted&&d&&(0,r.handleWatchClick)(d,a.promoted)}},d=function(n,t,e,r){var o,d,l=(null===e||void 0===e?void 0:e.prefix)?"".concat(e.prefix,"_"):"",c=(null===e||void 0===e?void 0:e.suffix)?"_".concat(e.suffix):"",s=(null===e||void 0===e?void 0:e.id)?e.id:"",u=(null===(o=t.provider)||void 0===o?void 0:o.refTagFragment)?"".concat(l).concat(t.provider.refTagFragment).concat(c):"",p=(null===(d=t.provider)||void 0===d?void 0:d.refTagFragment)?"".concat(l).concat(t.provider.refTagFragment):"",g=t.link.startsWith("/"),f=-1!==t.link.indexOf("imdb.com"),v=!g&&!f;return{href:(0,i.jo)(t.link,p),onClick:a(n,u,s,t,r),postIcon:v?"launch":void 0,postIconName:v?"launch":void 0,target:"_blank"}}}}]);