1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[27127],{27127:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>Q});var n=t(6029),o=t(29087),l=t(18571),i=t(35335),m=t(71024),s=t.n(m),c=t(8588),d=t.n(c),r=t(55729),u=t(46735),g=t(47434),_=t(32891),v=t(11705),h=t(11811),C=t(63742),p=t(28542),f=t(79780),b=t(51530),x=t(82978),j=t(55743),N=t(87896),w=t(56758),G=t(69439),k=t(91744),S=t(33186),y=t(23848),T=t(70129);let A=e=>{let{onSwipeLeft:a,onSwipeRight:t,minSwipeDistance:n=50}=e,[o,l]=(0,r.useState)(null),[i,m]=(0,r.useState)(null);return{onTouchStart:e=>{var a,t;m(null),l(null!==(t=null===(a=e.targetTouches[0])||void 0===a?void 0:a.clientX)&&void 0!==t?t:null)},onTouchMove:e=>{var a,t;m(null!==(t=null===(a=e.targetTouches[0])||void 0===a?void 0:a.clientX)&&void 0!==t?t:null)},onTouchEnd:()=>{if(!o||!i)return;let e=o-i;e>n&&a&&a(),e<-n&&t&&t(),l(null),m(null)}}};var E=t(86721),P=t(79633),I=t(3032),z=t(99563),F=t(64023),L=t(78945),W=t(30346),R=t(44760),X=t(21012),J=t(6389),K=t(36537),Z=t.n(K);let B=(0,I.M)(Z()),M=s()(()=>Promise.resolve().then(t.bind(t,98648)),{loadableGenerated:{webpack:()=>[98648]}}),O=s()(()=>Promise.all([t.e(6597),t.e(94231)]).then(t.bind(t,94231)),{loadableGenerated:{webpack:()=>[94231]}}),Q=e=>{var a,t;let{game:m,handleClose:s,gameCollection:c,handleWhatAreSweepstakesClick:I,isDiscoveryGame:K,searchedFilters:Z=[],launchSource:Q}=e,[V,q]=(0,r.useState)(!1),[D,H]=(0,r.useState)(!1),[Y,U]=(0,r.useState)(!!(null===(a=m.modalVideo)||void 0===a?void 0:a.id)),[$,ee]=(0,r.useState)(()=>(0,F.cF)(c,m.id)),[ea,et]=(0,r.useState)(null),[en,eo]=(0,r.useState)(!1),[el,ei]=(0,r.useState)("left"),{shouldOpenOptinPopup:em,shouldOpenOptoutPopup:es}=(0,T.e)(),{isLoggedInClient:ec}=(0,j.A)(),ed=(0,r.useCallback)(()=>{et(em||es?"v2":"legacy")},[em,es]),{lazyAllowedGames:er}=(0,P.M)(),eu=(0,r.useRef)(null),eg=(0,r.useRef)(null),[e_]=(0,y.Z)(e=>[e.user.accountInfo]),{lobby:ev}=(0,S.e)({articleSlug:"catalogue"}),{t:eh}=(0,E.A)(),{enabled:eC}=(0,w.u)(o.FeatureFlagsKeys.Spree1751SpreepotzGamePreviewEnabledTemporary),{enabled:ep}=(0,w.u)(o.FeatureFlagsKeys.CommunityJackpotsEnablePermanent),{enabled:ef}=(0,w.u)(o.FeatureFlagsKeys.Spree3718AnimationTransitionConstantsEnableTemporary),[eb,ex]=(0,r.useState)(m),{gameCollectionIndex:ej,handlePlayClick:eN}=(0,G.A)({launchSource:Q,accountInfo:e_,visibleGame:eb,isDiscoveryGame:K,searchedFilters:Z,selectedGameCollection:$,setVisibleGame:ex}),{isFavourite:ew,toggleFavourite:eG}=(0,N.A)({game:eb}),{thumbnail:ek={id:void 0},modalImage:eS={id:void 0},modalVideo:ey,name:eT="",provider:eA,hideJackpot:eE,type:eP}=eb||{},eI=(null==ey?void 0:ey.id)?(0,L.s)(ey.id):"",ez=null!==(t=null==eA?void 0:eA.name)&&void 0!==t?t:"",eF=eS.id||ek.id||"",eL=(0,x.I)(eP),eW=(0,k.w)(),eR=(e,a)=>{let t=(0,F.pv)(e,er);if(null==t?void 0:t.slug){let e=a?(0,F.eZ)(a,er):null;e&&ee(e),ex(t),window.scrollTo({top:0,behavior:"smooth"})}};(0,r.useEffect)(()=>{ex(m)},[m]);let eX=(0,r.useCallback)(()=>{let e=eg.current;e&&(e.pause(),e.currentTime=0,e.src="",e.load())},[]),eJ=(0,r.useRef)(null==eb?void 0:eb.id),eK=(0,r.useRef)(!!ey);(0,r.useEffect)(()=>{let e=null==eb?void 0:eb.id,a=!!ey,t=eK.current&&!a;q(!1),H(!1),t&&eX(),U(a),eJ.current=e,eK.current=a;let n=eu.current;(null==n?void 0:n.complete)&&n.naturalWidth>0&&H(!0)},[null==eb?void 0:eb.id,ey,eX]),(0,r.useEffect)(()=>{if(!Y){eX();let e=eu.current;(null==e?void 0:e.complete)&&e.naturalWidth>0&&H(!0)}},[Y,eX]),(0,r.useEffect)(()=>{$.length&&!(ej<0)&&[-2,-1,1,2].map(e=>ej+e).forEach(e=>{if(e>=0&&e<$.length){var a,t;let n=$[e],o=(null==n?void 0:null===(a=n.modalImage)||void 0===a?void 0:a.id)||(null==n?void 0:null===(t=n.thumbnail)||void 0===t?void 0:t.id);o&&(new window.Image().src=(0,L.s)(o))}})},[ej,$]);let eZ=(0,r.useCallback)(()=>{ex(e=>{if(!e)return e;let a=$.findIndex(a=>a.id===e.id);if(a>0){var t;return ei("right"),null!==(t=$[a-1])&&void 0!==t?t:e}return e})},[$]),eB=(0,r.useCallback)(()=>{ex(e=>{if(!e)return e;let a=$.findIndex(a=>a.id===e.id);if(a>=0&&a<$.length-1){var t;return ei("left"),null!==(t=$[a+1])&&void 0!==t?t:e}return e})},[$]),eM=A({onSwipeLeft:eB,onSwipeRight:eZ}),eO=ec&&!eL&&!eW&&(0,n.jsx)(u.default,{className:"mt-md justify-self-center text-sm",color:"link",size:"sm",handleClick:()=>null==I?void 0:I(),children:eh("common.what_are_sweepstakes",{defaultValue:"What are Sweepstakes?"})});return(0,n.jsxs)(n.Fragment,{children:[eC&&"v2"===ea&&(0,n.jsx)(J.default,{className:B("jackpot-notification","--full-page"),handleClose:()=>et(null)}),eC&&"legacy"===ea&&(0,n.jsx)(X.default,{className:B("jackpot-notification"),handleClose:()=>et(null)}),ep&&en&&(0,n.jsx)(R.default,{className:B("jackpot-notification","--full-page"),handleClose:()=>eo(!1)}),(0,n.jsxs)("div",{className:B("game-modal-content",{"--spreepotz":eC,"--jackpot-notification-visible":!!ea||en}),children:[(0,n.jsxs)("div",{className:B("game-modal-content-container"),children:[(0,n.jsxs)("div",{className:B("game-modal-content-game-info"),style:{"--tile-bg-image":"url(".concat((0,L.s)(eF),")")},...eM,children:[(0,n.jsxs)("div",{className:B("game-modal-content-header"),children:[(0,n.jsx)(g.default,{iconName:"
1close",className:B("game-modal-content-close"),iconClassName:B("close-icon"),handleClick:s}),(0,n.jsx)("div",{className:B("game-modal-content-header__thumbnail",{"--show":V}),children:(0,n.jsx)(d(),{onLoad:()=>q(!0),alt:null!=eT?eT:eh("common.play_now"),src:ek.id||"",width:"320",height:"400"},"".concat(null==eb?void 0:eb.id,"-").concat(ek.id))}),(0,n.jsxs)("div",{className:B("game-modal-content-header__content"),children:[(0,n.jsx)(_.A,{className:B("game-modal-content-header__content-logo")}),(0,n.jsx)("h2",{className:B("game-modal-content-header__content-title",{"--long-name":eT.length>20}),children:eT}),(0,n.jsx)("h3",{className:B("game-modal-content-header__content-provider"),children:ez})]})]}),(0,n.jsxs)("div",{className:B("game-modal-content-game-info__game-image"),children:[ej>0&&$.length>0&&(0,n.jsx)("div",{className:B("game-modal-content-arrow-container previous"),onClick:()=>eZ(),children:(0,n.jsx)(g.default,{iconName:"chevron-thin-left",className:B("game-modal-content-arrow"),iconClassName:B("previous-icon")})}),ej<$.length-1&&$.length>0&&(0,n.jsx)("div",{className:B("game-modal-content-arrow-container next"),onClick:eB,children:(0,n.jsx)(g.default,{iconName:"chevron-thin-right",className:B("game-modal-content-arrow"),iconClassName:B("next-icon")})}),(0,n.jsx)(l.N,{initial:!1,custom:el,mode:"wait",children:(0,n.jsx)(i.P.div,{custom:el,variants:{enter:e=>({x:"left"===e?100:-100,opacity:0}),center:{x:0,opacity:1},exit:e=>({x:"left"===e?-100:100,opacity:0})},initial:"enter",animate:"center",exit:"exit",transition:ef?z.nX:{duration:.1,ease:"easeOut"},style:{position:"absolute",width:"100%",height:"100%"},className:B("game-modal-content-game-info__game-image-image"),children:(0,n.jsxs)("div",{className:B("preview-image",{"--loading":!D}),children:[!D&&!Y&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:B("shimmer")}),(0,n.jsx)(f.default,{className:B("preview-image-loader")})]}),(0,n.jsxs)("div",{className:B("preview-image-content"),children:[(0,n.jsx)(v.A,{className:B("favourite-button"),isActive:ew,handleClick:eG}),Y&&eI?(0,n.jsx)("video",{ref:eg,className:B("preview"),src:eI,autoPlay:!0,playsInline:!0,muted:!0,preload:"auto",controls:!1,loop:!0,onLoadedData:()=>H(!0),onPlay:()=>{H(!0),(0,W.pz)({event:b.o.GameCatalogueWithVideo,customerId:null==e_?void 0:e_.id,parameters:{game_slug:null==eb?void 0:eb.slug}})},onError:()=>{U(!1),H(!1)}},"".concat(null==eb?void 0:eb.id,"-").concat(eI)):(0,n.jsx)(d(),{ref:eu,className:B("preview"),onLoad:()=>H(!0),alt:null!=eT?eT:eh("common.play_now"),src:eF,width:"320",height:"400"},"".concat(null==eb?void 0:eb.id,"-").concat(eF))]})]})},null==eb?void 0:eb.id)})]})]}),(0,n.jsxs)("div",{className:B("game-modal-content-bottom"),children:[(0,n.jsx)(C.A,{className:B("game-modal-content-buttons",{"--spreepotz":eC},"--game-modal"),onPlayClick:eN,hideText:!0,btnSize:"lg",hideScButton:eL}),ep&&eO,eC&&!eE&&ec&&(ep?(0,n.jsx)(O,{className:"mt-md",onSpreepotzActivate:ed,onCommunityJackpotActivate:()=>eo(!0)}):(0,n.jsx)(M,{hasLogo:!0,className:"mt-md --game-modal",handleToggleClick:ed})),!ep&&eO]})]}),(0,n.jsx)(p.A,{className:B("attributes"),game:eb,labelClassName:B("attributes-label"),valueClassName:B("attributes-value"),showMaxWin:!0}),ev.length>0&&(0,n.jsx)("div",{className:B("game-group-container"),children:ev.map(e=>{var a;return(0,n.jsx)(h.default,{...e,isLoggedIn:ec,className:B("game-group"),items:null===(a=e.items)||void 0===a?void 0:a.filter(e=>e.id!==(null==eb?void 0:eb.id)),previousPath:e.previousPath,setSelectedSlug:eR},e.id)})})]})]})}},36537:e=>{e.exports={"jackpot-notification":"GameCatalogueContent_jackpot-notification__SdtWK","--full-page":"GameCatalogueContent_--full-page__8HbPA","game-modal-content":"GameCatalogueContent_game-modal-content__4fhtL","--jackpot-notification-visible":"GameCatalogueContent_--jackpot-notification-visible__c8vQT","game-modal-content-close":"GameCatalogueContent_game-modal-content-close__lz0oG","close-icon":"GameCatalogueContent_close-icon__jf5g0","game-modal-content-container":"GameCatalogueContent_game-modal-content-container__v2R5W","game-modal-content-header":"GameCatalogueContent_game-modal-content-header__aPGqW","game-modal-content-header__thumbnail":"GameCatalogueContent_game-modal-content-header__thumbnail__aSoXf","game-modal-content-header__content":"GameCatalogueContent_game-modal-content-header__content__D74jB","game-modal-content-header__content-logo":"GameCatalogueContent_game-modal-content-header__content-logo__Ty1Rk","game-modal-content-header__content-title":"GameCatalogueContent_game-modal-content-header__content-title__iidZJ","--long-name":"GameCatalogueContent_--long-name__0n_OB","game-modal-content-header__content-provider":"GameCatalogueContent_game-modal-content-header__content-provider__ugslz","game-modal-content-game-info":"GameCatalogueContent_game-modal-content-game-info__72LQd","game-modal-content-game-info__game-image":"GameCatalogueContent_game-modal-content-game-info__game-image__Qno9q","game-modal-content-game-info__game-image-image":"GameCatalogueContent_game-modal-content-game-info__game-image-image__fj6Hc","preview-image":"GameCatalogueContent_preview-image__9Ned8","game-modal-content-bottom":"GameCatalogueContent_game-modal-content-bottom__11l2b","game-modal-content-buttons":"GameCatalogueContent_game-modal-content-buttons__vpi0u",attributes:"GameCatalogueContent_attributes__g2aki","attributes-label":"GameCatalogueContent_attributes-label__ls6ab","attributes-value":"GameCatalogueContent_attributes-value__diL7b","preview-image-content":"GameCatalogueContent_preview-image-content__eSv4l","--loading":"GameCatalogueContent_--loading__mfsOc",shimmer:"GameCatalogueContent_shimmer___AtIJ",preview:"GameCatalogueContent_preview__YajXi","preview-image-loader":"GameCatalogueContent_preview-image-loader__FK59J","favourite-button":"GameCatalogueContent_favourite-button__2tfZz","game-modal-content-arrow-container":"GameCatalogueContent_game-modal-content-arrow-container__kmJrB",previous:"GameCatalogueContent_previous__sbTIN",next:"GameCatalogueContent_next__fXcTA","game-group-container":"GameCatalogueContent_game-group-container__0lZ0X"}}}]);
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.