1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6877],{8294:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/games/play/[...slugsIds]",function(){return n(53148)}])},11978:e=>{e.exports={animatedButtonWrapper:"AnimatedToggleSettingButton_animatedButtonWrapper__uSuzA",animatedIconWrapper:"AnimatedToggleSettingButton_animatedIconWrapper__tpmZa",animatedIcon:"AnimatedToggleSettingButton_animatedIcon__Fc8kK"}},19671:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var s,a=n(37876),i=n(14232),l=n(16925);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(null,arguments)}let r=e=>{let{title:t,titleId:n,...a}=e;return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 475 115.5","aria-labelledby":n},a),t?i.createElement("title",{id:n},t):null,s||(s=i.createElement("path",{d:"m68.4 115.4 83-.1V71.8l-83 18.7zM259.3 47.5l-82.9 18.7v49.1l82.9-.1zM43.4 96.1l-39.2 8.8c-6.3 1.4-5.2 10.6 1.2 10.6h38zM470.2 0l-77.6 17.5v97.4h78.5c2.2-.1 4-1.9 4-4.1V4c0-2.6-2.4-4.5-4.9-3.9ZM367.5 23.2l-83.2 18.7v73.2l83.2-.1z",className:"st0"})))};var u=n(28079),d=n(65966),c=n.n(d);let g=(e,t)=>{if(!(0,l.zG)()&&!(0,l.un)())return;e.preventDefault();let n=e.target,s=parseInt(n.getAttribute("max")||"0");if(0===s||isNaN(s))return;let a=(e.changedTouches[0].pageX-n.getBoundingClientRect().left)/(n.getBoundingClientRect().right-n.getBoundingClientRect().left);n.value=(a*s).toString(),t&&t(e)};function h(e){let{ariaLabel:t,ariaValueText:n,className:s,defaultValue:l,disabled:o,max:d=1,min:h=0,name:m,onChange:p,onPointerDown:b,onPointerMove:f,onPointerUp:v,step:_=.25,value:S,width:y}=e,x=void 0!==S,w=void 0!==l,P=l??S??d,M=d+d/_,[A,T]=(0,i.useState)(-1),B=(0,i.useRef)(null),E=(0,i.useRef)(null);if((0,i.useEffect)(()=>{(-1===A||p&&A!==P)&&T(P);let e=e=>{if(B?.current?.contains(document.activeElement)&&document.activeElement?.hasAttribute("data-volume-button")&&("ArrowLeft"===e.key||"ArrowRight"===e.key)){e.preventDefault();let t=document.activeElement;"ArrowLeft"===e.key?t=document.activeElement.previousSibling:"ArrowRight"===e.key&&(t=document.activeElement.nextSibling),t&&document.activeElement!==t&&(t.focus(),t.click())}};return document.addEventListener("keyup",e),()=>{document.removeEventListener("keyup",e)}},[A,p,P]),x&&w)throw Error('HorizontalVolumeSlider: Both "value" and "defaultValue" props were provided. Pick only one.');let N=void 0!==A?`${Math.round(100*A)}%`:void 0,C=e=>{!x&&(T(e.target.valueAsNumber),p&&p(e))};return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:c().componentWrapper+" "+(s||""),ref:B,"data-disabled":o,"data-internal-value":A,style:{"--component-private-horiz-vol-slider-current-value":`${A}`},children:[(0,a.jsx)("input",{type:"range",name:m,"data-cy":`horizontal-volume-slider:${m}`,min:h,max:d,step:_,value:A,onChange:C,onPointerDown:b,onPointerUp:v,onPointerMove:f,disabled:o,"aria-disabled":o,"aria-label":t,"aria-valuetext":n,style:{width:y},ref:E,tabIndex:-1,onTouchEnd:e=>g(e,e=>C(e)),onTouchMove:e=>g(e,e=>C(e))}),(0,a.jsx)("div",{className:c().buttonsWrapper,children:Array(M).fill(0).map((e,n)=>{let s=_/d*n,i=s===A;return(0,a.jsx)("button",{"data-volume-button":s,"aria-label":`${t??""} ${Math.round(100*s)}%`,onClick:()=>{E.current&&(E.current.value=s.toString(),C({target:E.current}))},children:(0,a.jsx)("span",{children:i?N:""})},n)})}),(0,a.jsx)("div",{className:c().backgroundImageActive,style:{width:`${(e=>{if((d-h)%.25==0){if(e<=0)return 0;else if(.25===e)return 35;else if(.5===e)return 55;else if(.75===e)return 77}return 100*e})(A)}%`},children:(0,a.jsx)(u.A,{icon:r,withStandardIconClasses:c().backgroundImageActive})}),(0,a.jsx)(u.A,{icon:r,withStandardIconClasses:c().backgroundImageShadow})]})})}},20979:e=>{e.exports={gamePlayer:"GamePlayer_gamePlayer__npu4o",gamePlayerPaused:"GamePlayer_gamePlayerPaused__MMxgE",fullScreen:"GamePlayer_fullScreen__7lk72",frame:"GamePlayer_frame__A3pfV"}},32242:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var s=n(37876);n(14232);var a=n(66184),i=n(14779),l=n(77079),o=n.n(l);let r=e=>{let{pageLang:t=a.hT.EnUs,link:n}=e,l=e=>{let{itemLang:l}
1=e,o=l===a.hT.EnUs?"English":"Espa\xf1ol";return l===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"sr-only",children:"Current: "}),o]}):(0,s.jsx)("a",{href:(0,i.Y2)(n),children:o})};return(0,s.jsx)("div",{"data-component-language-switcher":t,className:o().languageSwitcherWrap,children:(0,s.jsxs)("div",{className:o().languageSwitcher,children:[l({itemLang:a.hT.EnUs}),(0,s.jsx)("div",{className:o().track}),l({itemLang:a.hT.Es})]})})}},34031:e=>{e.exports={pauseMenu:"PauseMenu_pauseMenu__UWbkL",pauseMenuActive:"PauseMenu_pauseMenuActive__MGRC8",topRow:"PauseMenu_topRow__IwBT6",backButtonWrapper:"PauseMenu_backButtonWrapper__Xw39F",centerRow:"PauseMenu_centerRow__g7pFL",playButton:"PauseMenu_playButton__7rtMQ",playIcon:"PauseMenu_playIcon__nan9B",bottomRow:"PauseMenu_bottomRow__BgcHc",isFullScreen:"PauseMenu_isFullScreen__2D_6R"}},34549:e=>{e.exports={settingsMenuContent:"SettingsMenu_settingsMenuContent__5DdBk",controls:"SettingsMenu_controls__SL1LK",helpExplanation:"SettingsMenu_helpExplanation__sutFP",visible:"SettingsMenu_visible__Wg0GG",helpExplanationIconWrapper:"SettingsMenu_helpExplanationIconWrapper__cOy6c",helpExplanationIcon:"SettingsMenu_helpExplanationIcon__alVtY",helpExplanationContent:"SettingsMenu_helpExplanationContent__nsgRw",footerWidget:"SettingsMenu_footerWidget__kRaDG",resetSettingsButtonWrapper:"SettingsMenu_resetSettingsButtonWrapper__m18GW",resetSettingsButton:"SettingsMenu_resetSettingsButton__hewGg",resetSettingsButtonIcon:"SettingsMenu_resetSettingsButtonIcon__urw_E",backButtonWrapper:"SettingsMenu_backButtonWrapper__kdC5L",settingsMenuSettingVolumeSlider:"SettingsMenu_settingsMenuSettingVolumeSlider__EfSDd",settingsTabContentOuter:"SettingsMenu_settingsTabContentOuter__yYhyG",settingsMenuAnimatedTabIcon:"SettingsMenu_settingsMenuAnimatedTabIcon__reDxk",settingsMenuModalOverlayOverride:"SettingsMenu_settingsMenuModalOverlayOverride__B3h_g",settingsMenuModalBodyOverride:"SettingsMenu_settingsMenuModalBodyOverride__eto31",modalCloseButton:"SettingsMenu_modalCloseButton__zNmB3"}},36630:e=>{e.exports={accessibilityMenuBar:"AccessibilityMenuBar_accessibilityMenuBar__BT26R",toggleButtons:"AccessibilityMenuBar_toggleButtons__Q4SZx",spacer:"AccessibilityMenuBar_spacer__9Zxoh"}},37769:e=>{e.exports={pauseButtonWrapper:"PauseButton_pauseButtonWrapper__toJj3",pauseButton:"PauseButton_pauseButton__uqAZf",toGray:"PauseButton_toGray__QTqfr",pauseIconWrapper:"PauseButton_pauseIconWrapper__dx0a_",label:"PauseButton_label__53Gkf",labelHideAfterDelay:"PauseButton_labelHideAfterDelay__LszId",rollLetters:"PauseButton_rollLetters__afLc0"}},37959:(e,t,n)=>{"use strict";n.d(t,{Q:()=>a,l:()=>i});let s=new(n(12191)).A({caller:"managers.Analytics"}),a=e=>{s.debug("sendEventToGA",JSON.stringify(e,null,2)),(window.dataLayer=window.dataLayer||[]).push(e)},i=()=>{(window.dataLayer=window.dataLayer||[]).push({ecommerce:null})}},53148:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>tc,default:()=>tg});var s,a,i,l=n(37876),o=n(14232),r=n(32242),u=n(66184);let d={error:{hasError:!1,message:""},frame:{id:"game-player"},game:{guid:"",id:"",title:"",debug:!1,status:u.dW.Live},lang:"en"},c=(e,t)=>{switch(t.type){case"clear_error":return{...e,error:{hasError:!1,message:""}};case"set_game":return{...e,game:t.payload};case"set_lang":return{...e,lang:"es"===t.payload?"es":"en"};default:return e}};var g=n(90995),h=n(76541),m=n(27742);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(null,arguments)}let b=e=>{let{title:t,titleId:n,...a}=e;return o.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:108,height:17,fill:"none",viewBox:"0 0 108 17","aria-labelledby":n},a),t?o.createElement("title",{id:n},t):null,s||(s=o.createElement("g",{fill:"#fff",className:"letters-group-settings-text",transform:"translate(6)"},o.createElement("path",{d:"M11.484 11.33q0 1.231-.572 2.068a4.26 4.26 0 0 1-1.43 1.32 6.5 6.5 0 0 1-1.936.726q-1.035.22-2.024.22-.594 0-1.298-.022a16 16 0 0 1-1.408-.11q-.726-.066-1.452-.198A9 9 0 0 1 0 14.938l.528-4.664 1.056.352 1.056.308q.528.154.99.264.462.088.726.088h.33q.198-.023.374-.066a1 1 0 0 0 .33-.132.3.3 0 0 0 .132-.264q0-.396-.726-.836a9 9 0 0 0-.858-.484 14 14 0 0 1-.99-.55 10 10 0 0 1-1.012-.66 5.7 5.7 0 0 1-.902-.88 4.9 4.9 0 0 1-.66-1.144Q.132 5.632.132 4.796q0-1.342.528-2.266a4.2 4.2 0 0 1 1.386-1.474A5.7 5.7 0 0 1 4.004.242 10.4 10.4 0 0 1 6.248 0q1.254 0 2.574.242a11.3 11.3 0 0 1 2.618.814l-.792 4.422a19 19 0 0 0-2.024-.77A5.8 5.8 0 0 0 6.776 4.4q-.176 0-.396.022-.22 0-.44.044a.8.8 0 0 0-.352.176q-.132.11-.132.33 0 .176.22.308.242.132.594.33.44.242.968.506.55.264 1.122.616.572.353 1.122.792.572.44 1.012 1.012.44.55.704 1.254.285.682.286 1.54",className:"settings-text-letter-1 settings-text-letter"}),o.createElement("path",{d:"M23.869 15.4H20.48q-.484 0-.946.022h-.858q-.375.022-.638.022-.506.022-1.298 0h-1.518a76 76 0 0 1-1.804-.022v-2.86a89 89 0 0 0-.022-1.892q-.023-1.035-.066-2.266-.023-1.232-.066-2.552L13.177.308q1.166 0 2.222-.022a77 77 0 0 1 1.826-.022q.924-.023 1.452-.044a19 19 0 0 1 1.32 0h1.738q1.011.022 2.134.022v3.96q-1.695-.198-3.234-.132-1.518.044-3.124.132l.022 1.408q.132-.022.44-.022h1.254q.308-.022.44-.022h.616q.417-.022.836-.022.483 0 1.034-.022.043.132.088.638.066.505.066 1.21 0 .77-.022 1.364-.022.572-.066.572-.243 0-.858.022-.617 0-1.32.022-.682 0-1.342.022-.639 0-.924.022v1.342q.483.044 1.188.066.704.022 1.518.022h1.716a29 29 0 0 0 1.672-.088z",className:"settings-text-letter-2 settings-text-letter"}),o.createElement("path",{d:"M29.195 15.422q0-1.672-.022-3.102 0-.615-.022-1.232 0-.615-.022-1.144V8.316l-.044-3.52q-.77 0-1.474.022-.683 0-1.232.022-.529 0-.88.022h-.44V.22l12.804.022v4.554H35.42q-.704 0-1.474-.022-.022.571-.022 1.078v.902q0 2.134-.022 4.246 0 2.112.066 4.422z",className:"settings-text-letter-3 settings-text-letter"}),o.createElement("path",{d:"M42.236 15.422q0-1.672-.022-3.102 0-.615-.022-1.232 0-.615-.022-1.144V8.316l-.044-3.52q-.77 0-1.474.022-.683 0-1.232.022-.528 0-.88.022h-.44V.22l12.804.022v4.554h-2.442q-.704 0-1.474-.022-.022.571-.022 1.078v.902q0 2.134-.022 4.246 0 2.112.066 4.422z",className:"settings-text-letter-4 settings-text-letter"}),o.createElement("path",{d:"m57.059 3.41-.088 4.818q-.044 2.399-.044 4.818v.616q0 .375.022.77.023.462.044.99h-4.664l-.044-3.102q0-.615-.022-1.232 0-.615-.022-1.144-.023-.55-.044-.968v-.66q-.023-.286-.044-.792 0-.506-.022-1.1l-.044-1.254-.044-1.188q0-.572-.022-1.012a14 14 0 0 1-.022-.638 9 9 0 0 1-.022-.66V.242L56.97.22q.044.506.066 1.364.045.858.022 1.826",className:"settings-text-letter-5 settings-text-letter"}),o.createElement("path",{d:"M73.497.022q-.066.462-.088.836 0 .375-.022.616-.023.154-.044.704 0 .528-.044 1.32-.023.77-.044 1.716a78 78 0 0 1-.066 1.848l-.044 1.716q-.022.792-.022 1.342-.023.638-.044 1.364 0 .705-.022 1.408v2.354q-.375.11-.814.198a8 8 0 0 1-.88.132q-.44.066-.88.11a33 33 0 0 0-.792.088l-1.166-1.628-.616-.836q-.44-.616-1.034-1.408a56 56 0 0 0-1.276-1.738 199 199 0 0 0-1.364-1.826l.154 2.948q0 .241.022.66l.044.858q.022.44.022.858.022.396.022.594v.99q-.573.045-1.254.088-.66.023-1.386.066-.705.044-1.386.066-.682.044-1.254.066.021-.506.044-1.232a1074 1074 0 0 0 .088-3.19q.021-.835.044-1.54.022-.726.022-1.276v-.792l-.11-6.798q.528-.088.946-.154.44-.066.902-.132.483-.066 1.034-.132Q62.76.22 63.53.154q.22.308.55.748.352.44.682.88.352.418.616.77.285.33.374.462.11.176.374.528l.638.792q.351.418.726.88.395.462.704.836l.044-1.034q.043-.506.066-.946.021-.462.044-.814t.022-.55v-.484q0-.285-.022-.616 0-.353-.022-.704l-.044-.66z",className:"settings-text-letter-6 settings-text-letter"}),o.createElement("path",{d:"M87.93 14.146q-.417.33-.945.594t-1.1.462a7 7 0 0 1-1.144.308q-.573.11-1.1.11-2.178 0-3.762-.44-1.563-.44-2.574-1.408-1.013-.968-1.496-2.53-.484-1.584-.484-3.872 0-1.673.616-3.014.638-1.365 1.694-2.31A7.7 7.7 0 0 1 80.12.594a8.4 8.4
10 0 1 2.97-.528q1.188 0 2.376.176 1.209.176 2.244.462a38 38 0 0 1-.44 2.42 21 21 0 0 1-.66 2.354q-.704-.352-1.43-.616a4.2 4.2 0 0 0-1.474-.264q-1.43 0-2.354.77T80.429 7.7q0 .858.132 1.518.154.638.484 1.078.351.418.924.638.594.197 1.474.176h.242V9.504a5 5 0 0 0-.682 0q-.33 0-.704.044l.044-3.124q.374-.045.814-.044.462-.022.836-.022.967 0 1.87.022.901.022 1.87.11z",className:"settings-text-letter-7 settings-text-letter"}),o.createElement("path",{d:"M101.138 11.33q0 1.231-.572 2.068a4.25 4.25 0 0 1-1.43 1.32 6.5 6.5 0 0 1-1.936.726q-1.034.22-2.024.22-.594 0-1.298-.022a16 16 0 0 1-1.408-.11q-.726-.066-1.452-.198a9 9 0 0 1-1.364-.396l.528-4.664 1.056.352 1.056.308q.528.154.99.264.462.088.726.088h.33q.198-.023.374-.066a1 1 0 0 0 .33-.132.3.3 0 0 0 .132-.264q0-.396-.726-.836a9 9 0 0 0-.858-.484 14 14 0 0 1-.99-.55 10 10 0 0 1-1.012-.66 5.7 5.7 0 0 1-.902-.88 4.9 4.9 0 0 1-.66-1.144q-.242-.638-.242-1.474 0-1.342.528-2.266A4.2 4.2 0 0 1 91.7 1.056a5.7 5.7 0 0 1 1.958-.814A10.4 10.4 0 0 1 95.902 0q1.254 0 2.574.242 1.343.242 2.618.814l-.792 4.422a19 19 0 0 0-2.024-.77A5.8 5.8 0 0 0 96.43 4.4q-.176 0-.396.022-.22 0-.44.044a.8.8 0 0 0-.352.176q-.132.11-.132.33 0 .176.22.308.243.132.594.33.44.242.968.506.55.264 1.122.616.573.353 1.122.792.573.44 1.012 1.012.44.55.704 1.254.286.682.286 1.54",className:"settings-text-letter-8 settings-text-letter"}))))};var f=n(37769),v=n.n(f);function _(e){let{disabled:t,handleButtonClick:s,lang:a,showLabel:i}=e,r=(0,o.useRef)(null),{__t:u}=new m.A(a,"components/GamePlayer");return(0,l.jsx)("div",{className:v().pauseButtonWrapper,children:(0,l.jsxs)("button",{"data-component-game-player
1-pause-button":!0,"data-component-game-player-pause-button-show-label":i,"data-cy":"game-player-pause-button","aria-label":u("settingsMenu_openSettingsMenu"),className:v().pauseButton,disabled:t,onClick:s,ref:r,children:[(0,l.jsx)(h.A,{interactionProxyElementRef:r,wrapperClassName:v().pauseIconWrapper,images:{defaultState:{notToggled:n.e(9839).then(n.bind(n,69839))},focus:{notToggled:n.e(2293).then(n.bind(n,62293))},blur:{notToggled:n.e(1430).then(n.bind(n,11430))}}}),(0,l.jsx)(b,{className:v().label,role:"img",title:u("settingsMenu_settingsMenuToggleButton")})]})})}var S=n(20979),y=n.n(S);let x=(0,o.forwardRef)((e,t)=>{let{frame:n,game:s,lang:a}=e.model,{__t:i}=new m.A(a,"components/GamePlayer"),o=e.isFullScreen?y().fullScreen:"",r=e.gameData?.settingsUiPosition??"default";return(0,l.jsx)("div",{"data-component-game-player-container":!0,"data-pause-button-position":r,className:`${y().gamePlayer} ${o} ${e.paused?y().gamePlayerPaused:""}`,children:(0,l.jsxs)(g.A,{inputEvents:[{inputEventName:"click",handler:t=>{e.handleClickOutside(t)}}],children:[(0,l.jsx)("iframe",{ref:t,className:`${y().frame} aspect-game`,id:n?.id,scrolling:"no",title:(s?.title||"")+(e.paused?`. ${i("gamePaused")}.`:""),tabIndex:-1}),(0,l.jsx)(_,{disabled:!e.loaded,handleButtonClick:()=>setTimeout(e.focusPauseMenu,50),lang:a,showLabel:e.showPauseButtonLabel}),e.children]})})});x.displayName="GamePlayerView";let w=(0,o.forwardRef)((e,t)=>(0,l.jsx)("div",{ref:t,children:e.children}));w.displayName="FullScreenContainer";var P=n(77781),M=n.n(P);let A=e=>{let{isFullScreen:t,lang:s,toggleFullScreen:a}=e,{__t:i}=new m.A(s,"components/GamePlayer"),r=(0,o.useRef)(null),u=t?M().fullScreen:"",d=i(t?"exitFullScreenBtn
1Descriptive":"enterFullScreenBtnDescriptive"),c=i(t?"exitFullScreen":"enterFullScreen");return(0,l.jsxs)("button",{className:`${M().fullScreenButton} ${u}`,"aria-label":d,onClick:a,ref:r,children:[(0,l.jsx)(h.A,{wrapperClassName:M().fullScreenIcon,interactionProxyElementRef:r,toggleState:t,images:{defaultState:{notToggled:n.e(7704).then(n.bind(n,47704)),toggledOn:n.e(7703).then(n.bind(n,7703))},focus:{notToggled:n.e(9864).then(n.bind(n,79864)),toggledOn:n.e(8205).then(n.bind(n,18205))},blur:{notToggled:n.e(1445).then(n.bind(n,21445)),toggledOn:n.e(158).then(n.bind(n,60158))}}}),(0,l.jsx)("span",{className:M().fullScreenLabel,children:c})]})};var T=n(34031),B=n.n(T),E=n(36630),N=n.n(E),C=n(94770);function j(){return(j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(null,arguments)}let L=e=>{let{title:t,titleId:n,...s}=e;return o.createElement("svg",j({xmlns:"http://www.w3.org/2000/svg",width:92,height:92,fill:"none",viewBox:"0 0 92 92","aria-labelledby":n},s),t?o.createElement("title",{id:n},t):null,a||(a=o.createElement("path",{d:"M91.758 45.704c0 25.163-20.4 45.562-45.563 45.562S.633 70.867.633 45.704 21.032.142 46.195.142c25.164 0 45.563 20.399 45.563 45.562M46.195 84.008c21.155 0 38.305-17.15 38.305-38.304S67.35 7.4 46.195 7.4 7.891 24.55 7.891 45.704s17.15 38.304 38.304 38.304",clipRule:"evenodd"})),i||(i=o.createElement("path",{d:"M71.236 81.959 11.852 16.636l6.347-5.77L77.583 76.19z",clipRule:"evenodd"})))};var O=n(12191),V=n(28079),k=n(77931),I=n.n(k),R=n(11978),D=n.n(R);let F=new O.A({caller:"components.GamePlayer.SettingsMenu.view.SettingsMenuContent.AnimatedToggleSettingButton"}),q=[{srPropName:"soundMuted",icons:{defaultState:{notToggled:n.e(4700).then(n.bind(n,64700)),toggledOn:n.e(1104).then(n.bind(n,1104))},click:{notToggled:n.e(2918).then(n.bind(n,32918)),toggledOn:n.e(2098).then(n.bind(n,62098))},focus:{notToggled:n.e(2112).then(n.bind(n,52112)),toggledOn:n.e(7316).then(n.bind(n,17316))},blur:{notToggled:n.e(4317).then(n.bind(n,34317)),toggledOn:n.e(8979).then(n.bind(n,78979))}}},{srPropName:"musicMuted",icons:{defaultState:{notToggled:n.e(9656).then(n.bind(n,29656)),toggledOn:n.e(2588).then(n.bind(n,12588))},click:{notToggled:n.e(5210).then(n.bind(n,85210)),toggledOn:n.e(6710).then(n.bind(n,66710))},focus:{notToggled:n.e(4308).then(n.bind(n,94308)),toggledOn:n.e(9240).then(n.bind(n,29240))},blur:{notToggled:n.e(5649).then(n.bind(n,5649)),toggledOn:n.e(2039).then(n.bind(n,22039))}}},{srPropName:"sfxMuted",icons:{defaultState:{notToggled:n.e(6144).then(n.bind(n,16144)),toggledOn:n.e(4100).then(n.bind(n,24100))},click:{notToggled:n.e(6690).then(n.bind(n,6690)),toggledOn:n.e(3790).then(n.bind(n,13790))},focus:{notToggled:n.e(3020).then(n.bind(n,53020)),toggledOn:n.e(5856).then(n.bind(n,35856))},blur:{notToggled:n.e(3177).then(n.bind(n,13177)),toggledOn:n.e(3727).then(n.bind(n,13727))}}},{srPropName:"voMuted",icons:{defaultState:{notToggled:n.e(5207).then(n.bind(n,95207)),toggledOn:n.e(3885).then(n.bind(n,63885))},click:{notToggled:n.e(8773).then(n.bind(n,58773)),toggledOn:n.e(9547).then(n.bind(n,9547))},focus:{notToggled:n.e(73).then(n.bind(n,90073)),toggledOn:n.e(927).then(n.bind(n,40927))},blur:{notToggled:n.e(6810).then(n.bind(n,16810)),toggledOn:n.e(3030).then(n.bind(n,33030))}}},{srPropName:"captionsMuted",icons:{defaultState:{notToggled:n.e(6671).then(n.bind(n,26671)),toggledOn:n.e(5477).then(n.bind(n,15477))},click:{notToggled:n.e(4157).then(n.bind(n,14157)),toggledOn:n.e(1075).then(n.bind(n,51075))},blur:{notToggled:n.e(1122).then(n.bind(n,41122)),toggledOn:n.e(8382).then(n.bind(n,48382))},focus:{notToggled:n.e(8561).then(n.bind(n,78561)),toggledOn:n.e(5271).then(n.bind(n,95271))}}}];function $(e){let{buttonShapeClass:t,disableIconClass:n,currentState:s,iconName:a,interactionProxyElementRef:i}=e,r=(0,o.useRef)(s),[u,d]=(0,o.useState)(s),c=q.find(e=>e.srPropName===a)?.icons;return((0,o.useEffect)(()=>{r.current!==s&&(r.current=s,setTimeout(()=>d(s),600))},[s,r]),c)?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(C.A,{animationName:"squish",children:(0,l.jsxs)("div",{className:t+" "+D().animatedButtonWrapper,"data-toggle-setting-name":a,children:[(0,l.jsx)(h.A,{interactionProxyElementRef:i,toggleState:u,images:c,tabIndex:-1,imageClassName:D().animatedIcon,wrapperClassName:I().gameSettingToggleIcon+" "+D().animatedIconWrapper}),!s&&(0,l.jsx)(V.A,{withStandardIconClasses:n,icon:L})]})})}
1):(F.warn(`Animated icons not found for icon name: ${a}`),null)}var G=n(85442),W=n.n(G);let U=e=>{let{animatedIconName:t,buttonClass:n,buttonText:s,isMuted:a,onText:i,offText:r,isVisible:u,onClick:d}=e,c=a?"muted":"unmuted",g=u?"":W().hidden,h=n?W()[n]:"",m=(0,o.useRef)(null),[p,b]=(0,o.useState)("");return(0,o.useEffect)(()=>{b(a?r:i)},[a,r,i]),(0,l.jsxs)("button",{"aria-label":p,className:`${W().toggleButton} ${h||""} ${g||""} ${c}`,ref:m,onClick:e=>{m.current?.classList.contains("muted")?b(r):b(i),d&&d(e)},children:[(0,l.jsx)($,{buttonShapeClass:W().buttonImage,currentState:!a,disableIconClass:W().disabledIcon,iconName:t,interactionProxyElementRef:m}),(0,l.jsx)("span",{className:W().buttonLabel,children:s})]})};var z=n(73104);let H=["captionsMuted"],K={captionsMuted:!0},J=["soundMuted","musicMuted","sfxMuted","voMuted"],Y=["soundVolume","musicVolume","sfxVolume","voVolume"],Q={soundMuted:!1,musicMuted:!1,sfxMuted:!1,voMuted:!1},X={soundVolume:1,musicVolume:1,sfxVolume:1,voVolume:1},Z={captions:"captionsMuted",sound:"soundMuted",music:"musicMuted",sfx:"sfxMuted",vo:"voMuted",soundVolume:"soundVolume",musicVolume:"musicVolume",sfxVolume:"sfxVolume",voVolume:"voVolume"},ee={...K,...Q,...X},et=(e,t)=>{if("set_game_setting_value"===t.type){let n=Object.assign({},e);return n[t.name]=t.payload,n}if("clear_game_settings"===t.type)return{};throw Error(`Invalid action type: ${t.type}`)};var en=n(64435);let es=(0,o.createContext)({}),ea=e=>{let{accessibilityOptions:t,children:n,containerRef:s,gameFeatures:a,lang:i,paused:r,pluginsRef:u,togglePause:d}=e,[c,g]=(0,o.useState)(!1),[h,m]=(0,o.useReducer)(et,ee),{anySettingsAvailable:p,settingsMenuAvailable:b}=(0,z.AC)(t),{logGameDebugMessage:f,pageInfoEnabled:v}=(0,o.useContext)(en.Ay),_=(0,o.useRef)(null),[S,y]=(0,o.useState)(!1),x=(e,t)=>{m({type:"set_game_setting_value",name:e,payload:t})};(0,o.useEffect)(()=>{if(!S&&u.current&&s.current&&a?.data){let e=u.current;e.captionSettings.setModelUpdater(x),e.soundSettings.setModelUpdater(x),v&&(e.captionSettings.addDebugLogger(f),e.soundSettings.addDebugLogger(f)),y(!0)}},[S,s,a,u,m,f,v]);let w=(0,o.useCallback)(()=>(0,z.Pn)(t,i),[t,i]);return(0,o.useEffect)(()=>{let e=e=>{r&&!c&&"Escape"===e.key&&(e.preventDefault(),d())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[r,c,d]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(es.Provider,{value:{accessibilityOptions:t,anySettingsAvailable:p,containerRef:s,gameFeatures:a,gameSettingsDispatch:m,gameSettingsModel:h,getAllSettings:w,modelInited:S,lang:i,pluginsRef:u,setSettingsMenuOpen:g,settingsMenuAvailable:b,settingsMenuOpen:c,settingsToggleButtonRef:_,toggleSettingsMenu:()=>{_.current?.click()}},children:n})})};var ei=n(91633),el=n(92071),eo=n.n(el);function er(e){let{buttonText:t,dataId:s,onClick:a}=e,i=(0,o.useRef)(null);return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("button",{"data-component-game-player
1-back-button":s,className:eo().backButton,onClick:a,ref:i,children:[(0,l.jsx)(h.A,{wrapperClassName:eo().svgIcon,interactionProxyElementRef:i,images:{defaultState:{notToggled:n.e(1241).then(n.bind(n,41241))},focus:{notToggled:n.e(8619).then(n.bind(n,88619))},blur:{notToggled:n.e(3544).then(n.bind(n,23544))}}}),(0,l.jsx)("span",{className:"sr-only",children:t})]})})}var eu=n(83408),ed=n(34549),ec=n.n(ed);function eg(e){let{visible:t,setting:n}=e;return n.translations?.helpExplanation&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:ec().helpExplanation+(t?" "+ec().visible:""),children:[(0,l.jsx)("span",{className:ec().helpExplanationIconWrapper,children:(0,l.jsx)(V.A,{icon:eu.A,withStandardIconClasses:ec().helpExplanationIcon})}),(0,l.jsx)("div",{className:ec().helpExplanationContent,children:n.translations?.helpExplanation})]})})}var eh=n(19671);function em(e){let{ariaLabel:t,onClick:n,setting:s,stateValue:a}=e,i=!s.isAvailable,r=(0,o.useRef)(null);return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("button",{"aria-label":t,"data-cy":`toggle-setting-name:${s.srPropName}`,"data-button-state-on":a,disabled:i,onClick:n,className:I().gameSettingToggleButton,ref:r,children:[(0,l.jsx)($,{buttonShapeClass:I().buttonShape,currentState:a,disableIconClass:I().disabledIcon,iconName:s.srPropName,interactionProxyElementRef:r}),(0,l.jsx)("label",{children:s.translations.mainLabel})]})})}function ep(e){let{helpTextState:t,model:n,settings:s}=e,{pluginsRef:a}=(0,o.useContext)(es),i=(0,z.L1)(s),r=(0,o.useRef)(!1);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:ec().settingsTabContentOuter,children:i.map((e,i)=>{let[o,u]=e;if("toggle"!==o.valueType||"range"!==u.valueType)throw Error(`Invalid settings: ${JSON.stringify({toggleSetting:o,rangeSetting:u})}`);let d=!!n[o.srPropName],c=n[u.srPropName],g=d||0===c||(0,z.Yc)(n,s),h=g?0:c,m=e_(o,d,c),p=eS(u,c);return(0,l.jsxs)("fieldset",{hidden:!o.isAvailable&&!u.isAvailable,children:[(0,l.jsxs)("div",{className:ec().controls,children:[(0,l.jsx)(em,{setting:o,stateValue:!g,ariaLabel:m||void 0,onClick:e=>(0,z.TW)(e,u.srPropName,o.srPropName,r,a.current?.soundSettings)}),(0,l.jsx)(eh.A,{name:u.srPropName,defaultValue:h,className:ec().settingsMenuSettingVolumeSlider,ariaLabel:o.translations.mainLabel||void 0,ariaValueText:p,onChange:e=>(0,z.TW)(e,u.srPropName,o.srPropName,r,a.current?.soundSettings),onPointerDown:e=>{r.current=!0,(0,z.TW)(e,u.srPropName,o.srPropName,r,a.current?.soundSettings)},onPointerUp:e=>{r.current=!1,(0,z.TW)(e,u.srPropName,o.srPropName,r,a.current?.soundSettings)}})]}),(0,l.jsx)(eg,{setting:o,visible:t})]},i)})})})}var eb=n(47462),ef=n(37981);let ev=new O.A({caller:"components.GamePlayer.SettingsMenu.view.SettingsMenuContent"}),e_=(e,t,n)=>t?e.translations?.aria?.stateOff:"function"==typeof e.translations?.aria?.stateOn?e.translations?.aria?.stateOn(n):e.translations?.aria?.stateOn,eS=(e,t)=>{if("function"==typeof e.translations?.aria?.rangeValue)return e.translations?.aria?.rangeValue(t)},ey=e=>{let{helpTextState:t,lang:n,model:s,settings:a}=e,{__tSettings:i}=(0,z.kh)(n),{pluginsRef:r}=(0,o.useContext)(es);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:ec().settingsTabContentOuter,children:a.map((e,n)=>{let a=!!s[e.srPropName],o=e_(e,a,0),u=()=>{r.current?.captionSettings?.toggleMuted(e.srPropName)};return(0,l.jsxs)("fieldset",{children:[(0,l.jsxs)("div",{className:ec().controls,children:[(0,l.jsx)(em,{setting:e,stateValue:!a,ariaLabel:o||void 0,onClick:u}),(0,l.jsx)(ef.A,{checked:!a,labelOn:i("captionsOn"),labelOff:i("captionsOff"),ariaLabelOn:i("captionsAreOn"),ariaLabelOff:i("captionsAreOff"),name:e.srPropName,onClick:u,disabled:!e.isAvailable})]}),(0,l.jsx)(eg,{setting:e,visible:t})]},n)})})})},ex=e=>{let{settingsCategory:t,ariaLabel:s,onClick:a,text:i}=e,r=(0,o.useRef)(null);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(C.A,{animationName:"jellySubtleSquishClick",className:ec().resetSettingsButtonWrapper,children:(0,l.jsxs)("button",{className:ec().resetSettingsButton,"aria-label":s,onClick:()=>{a(),ev.debug(`Reset ${t} settings!`)},ref:r,children:[(0,l.jsx)(h.A,{wrapperClassName:ec().resetSettingsButtonIcon,interactionProxyElementRef:r,images:{defaultState:{notToggled:n.e(8990).then(n.bind(n,48990))},click:{notToggled:n.e(1056).then(n.bind(n,31056))},blur:{notToggled:n.e(955).then(n.bind(n,80955))},focus:{notToggled:n.e(5858).then(n.bind(n,75858))}}}),i]})})})};function ew(e){let{__tSettings:t,helpTextState:n,resetAction:s,helpTextStateChange:a}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:ec().footerWi
1dget,children:[(0,l.jsx)(ef.A,{checked:n,externalLabel:t("helpLabel"),labelLocation:"inside",labelOn:t("helpOn"),labelOff:t("helpOff"),ariaLabelOn:t("helpIsOn"),ariaLabelOff:t("helpIsOff"),switchIcon:eu.A,onChange:e=>{ev.debug(`turn ${e.target.checked?"on":"off"} caption settings help!`),a(e),window.dispatchEvent(new Event("resize")),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},ei.Y)}}),(0,l.jsx)(ex,{settingsCategory:"captions",text:t("reset"),ariaLabel:t("resetSettings"),onClick:s})]})})}function eP(e){let{accessibilityOptions:t,allGameSettings:s,lang:a,model:i}=e,{__tSettings:r,__tSettings:u}=(0,z.kh)(a),d=(0,o.useRef)(null),[c,g]=(0,o.useState)(!1),{captionOptionsAvailable:h,settingsMenuAvailable:m,volumeOptionsAvailable:p}=(0,z.AC)(t),b={up:u("soundSettingsScrollUp"),down:u("soundSettingsScrollDown")},{pluginsRef:f}=(0,o.useContext)(es);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{"data-component-game-player-settings-menu-content":!0,hidden:!m,children:(0,l.jsxs)("div",{className:ec().settingsMenuContent,ref:d,"data-tabbed-panels-any-scrollbars-needed":"false",children:[(0,l.jsx)("div",{className:ec().backButtonWrapper,"data-tabbed-panels-any-scrollbars-needed":"false",children:(0,l.jsx)(er,{buttonText:u("backButton"),dataId:"settings-menu"})}),(0,l.jsx)(eb.A,{lang:a,allowScrollBar:()=>!0,tabs:[{contentId:"sounds",available:p,title:r("soundsTabTitle"),animatedIcon:{defaultState:{notToggled:n.e(9546).then(n.bind(n,99546))},click:{notToggled:n.e(9972).then(n.bind(n,29972))},blur:{notToggled:n.e(3439).then(n.bind(n,13439))},focus:{notToggled:n.e(406).then(n.bind(n,30406))}},animatedIconClass:ec().settingsMenuAnimatedTabIcon,scrollBtnLabelLabels:b,content:(0,l.jsx)(ep,{model:i,helpTextState:c,settings:s.filter(e=>"sound"===e.type)}),footerWidget:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{resetAction:()=>{f.current?.soundSettings?.resetToDefaults(!0)},__tSettings:u,helpTextState:c,helpTextStateChange:()=>{g(e=>!e)}})})},{contentId:"captions",available:h,title:r("captionsTabTitle"),animatedIcon:{defaultState:{notToggled:n.e(3360).then(n.bind(n,93360))},click:{notToggled:n.e(842).then(n.bind(n,20842))},blur:{notToggled:n.e(2861).then(n.bind(n,22861))},focus:{notToggled:n.e(9728).then(n.bind(n,79728))}},animatedIconClass:ec().settingsMenuAnimatedTabIcon,content:(0,l.jsx)(ey,{lang:a,model:i,helpTextState:c,settings:s.filter(e=>"caption"===e.type)}),footerWidget:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(ew,{resetAction:()=>{f.current?.captionSettings?.resetToDefaults(!0)},__tSettings:u,helpTextState:c,helpTextStateChange:()=>{g(e=>!e)}})})}]})]})})})}var eM=n(79093),eA=n.n(eM);function eT(e){let{lang:t,settingsToggleButtonRef:s,hidden:a}=e,{__tSettings:i,__tSettings:o}=(0,z.kh)(t);return(0,l.jsx)("div",{className:eA().settingsMenuToggleButtonWrapper,children:(0,l.jsxs)("button",{"aria-label":o("settingsMoreToggleButtonDescriptive"),"data-cy":"game-player-settings-open-button",ref:s,hidden:!!a,children:[(0,l.jsx)(h.A,{interactionProxyElementRef:s,images:{defaultState:{notToggled:n.e(9839).then(n.bind(n,69839))},focus:{notToggled:n.e(2293).then(n.bind(n,62293))},blur:{notToggled:n.e(1430).then(n.bind(n,11430))}}}),(0,l.jsx)("span",{children:i("settingsMoreToggleButton")})]})})}var eB=n(12066),eE=n(79009);function eN(e){let{accessibilityOptions:t,allGameSettings:n,gameSettingsModel:s,lang:a}=e,{settingsToggleButtonRef:i,setSettingsMenuOpen:r}=(0,o.useContext)(es),[u,d]=(0,o.useState)(!0);return(0,o.useEffect)(()=>{let e=()=>{let e=CSS.supports("padding: 1cqw")||CSS.supports("(container-type: inline-size)"),t=document.querySelector("[data-component-game-player
1-container]"),n=window.innerWidth,s=831;e&&t&&(s=768,n=t.getBoundingClientRect().width||n),d(n<s)};return setTimeout(e,1),eE.g.addCallback(e),()=>{eE.g.removeCallback(e)}},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eT,{lang:a,settingsToggleButtonRef:i}),(0,l.jsx)(eB.A,{closeButtonOverrideClass:ec().modalCloseButton,modalOverrideClass:ec().settingsMenuModalBodyOverride,overlayOverrideClass:ec().settingsMenuModalOverlayOverride,onClose:()=>r(!1),onOpen:()=>r(!0),portalDestinationSelector:u?"main":"[data-component-game-player-container]",toggleButtonRef:i,useAnimation:!1,children:(0,l.jsx)(eP,{accessibilityOptions:t,allGameSettings:n,lang:a,model:s})})]})}var eC=n(98477);function ej(e){let{gameSettingsModel:t}=e,[n,s]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{s("true"===new URLSearchParams(window.location.search).get("debugModel"))},[]),(0,l.jsx)(l.Fragment,{children:n&&(0,eC.createPortal)((0,l.jsxs)("pre",{style:{fontSize:9,lineHeight:1.7,background:"#000",color:"#fff",padding:16,position:"fixed",bottom:0,left:64,zIndex:99999,maxWidth:240,opacity:.8,pointerEvents:"none"},children:["The current model contents:\xa0",JSON.stringify(t,null,2)]}),document.body)})}let eL=()=>{let{accessibilityOptions:e,gameSettingsModel:t,getAllSettings:n,lang:s,modelInited:a,settingsMenuAvailable:i}=(0,o.useContext)(es),r=n();return a&&i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eN,{accessibilityOptions:e,allGameSettings:r,gameSettingsModel:t,lang:s}),(0,l.jsx)(ej,{gameSettingsModel:t})]}):(0,l.jsx)("div",{className:N().spacer})};eL.displayName="GameSettingsMenu";let eO=e=>{let{accessibilityOptions:t,lang:n}=e,{__t:s}=new m.A(n,"components/GamePlayer"),{getAllSettings:a,anySettingsAvailable:i,gameSettingsModel:r,pluginsRef:u}=(0,o.useContext)(es),d=(0,z.Yc)(r,a()),c=(e,t)=>n=>{"caption"===e?u.current?.captionSettings?.toggleMuted?.(t):u.current?.soundSettings?.toggleMuted?.(t)};
1return(0,l.jsx)("div",{"data-component-game-player-accessibility-menu":!0,className:N().accessibilityMenuBar,style:{display:i?"":"none"},children:(0,l.jsxs)("div",{className:N().toggleButtons,"data-component-game-player-accessibility-menu-bar":!0,"data-cy":"game-player-accessibility-menu-bar",children:[(0,l.jsx)(U,{animatedIconName:"soundMuted",buttonClass:"soundButton",onClick:c("sound","soundMuted"),buttonText:s("mainSound"),isVisible:t.sound.mainSound.available,isMuted:!!r.soundMuted||d,onText:s("mainSoundIsOn"),offText:s("mainSoundIsOff")}),(0,l.jsx)(U,{animatedIconName:"captionsMuted",buttonClass:"captionsButton",onClick:c("caption","captionsMuted"),buttonText:s("closedCaptions"),isVisible:t.captions.available,isMuted:!!r.captionsMuted,onText:s("closedCaptionsAreOn"),offText:s("closedCaptionsAreOff")}),(0,l.jsx)(U,{animatedIconName:"musicMuted",buttonClass:"musicButton",onClick:c("sound","musicMuted"),buttonText:s("music"),onText:s("musicIsOn"),offText:s("musicIsOff"),isVisible:t.sound.music.available,isMuted:!!r.musicMuted||0===r.musicVolume||d}),(0,l.jsx)(U,{buttonClass:"sfxButton",animatedIconName:"sfxMuted",onClick:c("sound","sfxMuted"),buttonText:s("soundEffects"),isMuted:!!r.sfxMuted||0===r.sfxVolume||d,isVisible:t.sound.soundEffects.available,onText:s("soundEffectsAreOn"),offText:s("soundEffectsAreOff")}),(0,l.jsx)(U,{buttonClass:"voButton",animatedIconName:"voMuted",onClick:c("sound","voMuted"),buttonText:s("dialog"),isMuted:!!r.voMuted||0===r.voVolume||d,isVisible:t.sound.voiceOver.available,onText:s("dialogIsOn"),offText:s("dialogIsOff")}),(0,l.jsx)(eL,{})]})})},eV=(0,o.forwardRef)((e,t)=>{let s=(0,o.useRef)(null),{accessibilityOptions:a,active:i,focusGame:r,isFullScreen:u,isIOSDevice:d,lang:c,togglePause:g,toggleFullScreen:p}=e,{modelInited:b,settingsMenuOpen:f,toggleSettingsMenu:v}=(0,o.useContext)(es),{__t:_}=new m.A(c,"components/GamePlayer"),S=e=>["BUTTON","INPUT","SELECT","TEXTAREA","A","LABEL"].includes(e.tagName)||"button"===e.getAttribute("role")||e.hasAttribute("data-component-game-player
1-accessibility-menu")||e.closest("[data-component-game-player-accessibility-menu");return(0,l.jsxs)("div",{className:`${B().pauseMenu} ${i?B().pauseMenuActive:""} ${u?B().isFullScreen:""}`,"data-component-game-player-pause-menu":!0,"data-component-game-settings-menu-open":f.toString(),"data-cy":"component-game-player-pause-menu",onClick:e=>{if(f){var t;let n,s;S(e.target)||e.preventDefault(),n=(t=e.target).closest("[data-component-modal-wrapper]"),s=t.closest("[data-component-game-player-settings-menu-content]"),t.closest('[data-component-game-player-back-button="settings-menu"]')&&s&&n&&v()}else i&&!S(e.target)&&(g(e),r(),e.preventDefault())},ref:t,children:[(0,l.jsxs)("div",{className:B().topRow,children:[!d&&(0,l.jsx)(A,{isFullScreen:u,lang:c,toggleFullScreen:p}),(0,l.jsx)("div",{className:B().backButtonWrapper,children:(0,l.jsx)(er,{onClick:r,buttonText:_("backBtnDescriptive"),dataId:"pause-menu"})})]}),(0,l.jsx)("div",{className:B().centerRow,children:(0,l.jsxs)("button",{"data-component-game-player-play-button":!0,className:B().playButton,onClick:r,ref:s,children:[(0,l.jsx)(h.A,{wrapperClassName:B().playIcon,interactionProxyElementRef:s,images:{defaultState:{notToggled:n.e(4838).then(n.bind(n,4838))},click:{notToggled:n.e(4152).then(n.bind(n,74152))},focus:{notToggled:n.e(9098).then(n.bind(n,19098))},blur:{notToggled:n.e(8323).then(n.bind(n,78323))}}}),_("playGame")]})}),(0,l.jsx)("div",{className:B().bottomRow,children:b&&(0,l.jsx)(eO,{accessibilityOptions:a,lang:c})})]})});eV.displayName="GamePlayerPauseMenu";let ek=["25676","25678","6891"],eI=[/\.pause is not a function/];class eR{static get webgl(){let e=document.createElement("canvas");return!!(e&&(e.getContext("webgl")||e.getContext("experimental-webgl")))}static get canvas(){let e=document.createElement("canvas");return!!(null!==e&&e.getContext&&e.getContext("2d"))}static get webaudio(){return"webkitAudioContext"in window||"AudioContext"in window}static get htmlAudio(){return"HTMLAudioElement"in window}static get websockets(){return"WebSocket"in window||"MozWebSocket"in window}static get geolocation(){return"geolocation"in navigator}static get webworkers(){return"function"==typeof Worker}static get touch(){return!!("ontouchstart"in window||window.navigator.maxTouchPoints>0)}static basic(){return eR.canvas?eR.webaudio||eR.htmlAudio?null:"Browser does not support WebAudio or HTMLAudio":"Browser does not support canvas"}static test(e){let t=this.basic();if(t)return t;let n=e.features,s=e.ui,a=e.sizes;for(let e in n)if(Object.hasOwn(n,e)&&!0===n[e]&&!eR[e])return"Browser does not support "+e;if((!s||!s.touch)&&eR.touch)return"Game does not support touch input";let i=Math.max(window.screen.width,window.screen.height);return a?!a.xsmall&&i<480?"Game doesn't support extra small screens":!a.small&&i<768?"Game doesn't support small screens":!a.medium&&i<992?"Game doesn't support medium screens":!a.large&&i<1200?"Game doesn't support large screens":!a.xlarge&&i>=1200?"Game doesn't support extra large screens":null:"Game doesn't support screen sizes"}static get info(){return`Browser Feature Detection 2 Canvas support ${eR.canvas?"â":"\xd7"} 3 WebGL support ${eR.webgl?"â":"\xd7"} 4 WebAudio support ${eR.webaudio?"â":"\xd7"}`}}var eD=n(16996);class eF{constructor({plugins:e=[]}){this.client=new eD.f,this.logger=new O.A({caller:"managers.SpringRollContainerPlugins.Container"}),this.preloading=!0,this.client.hidden=this.client.receive.bind(this.client),this.client.hiddenSend=this.client.send.bind(this.client),this.client.receive=e=>{this.client.hidden(e)},this.client.send=(e,t)=>{this.client.hiddenSend(e,t)},this.plugins=e}async setupPlugins(){let e=[];for(let t=0,n=this.plugins.length;t<n;t++)this.plugins[t].preload&&e.push(this.plugins[t].preload(this).catch(e=>{this.plugins[t].preloadFailed=!0,this.logger.warn(this.plugins[t].name,"Preload Failed:",e)}));return Promise.all(e).then(()=>{this.plugins=this.plugins.filter(e=>!0!==e.preloadFailed),this.preloading=!1,this.client.trigger("preloadsFinished"),this.plugins.forEach(e=>{e.init&&e.init(this)}
4),this.plugins.forEach(e=>{e.start&&e.start(this)})})}uses(e){this.plugins.push(e)}getPlugin(e){return this.plugins.find(t=>t.name===e)}}class eq extends eF{constructor(e,{plugins:t=[],context:n={}}={}){super({plugins:t});const s=e instanceof HTMLIFrameElement?e:document.querySelector(e);if(null===s||!(s instanceof HTMLIFrameElement))throw Error("No iframe was found with the provided selector");this.iframe=s,this.iframe.style.backgroundColor="black",this.loaded=!1,this.loading=!1,this.release=null,this._context=n,this.onLoading=this.onLoading.bind(this),this.onLoadDone=this.onLoadDone.bind(this),this.onLoadDone=this.onLoadDone.bind(this),this.onEndGame=this.onEndGame.bind(this),this.initClient(),this.setupPlugins()}onLoading(){this.client.trigger("opening")}onLoadDone(){this.loading=!1,this.loaded=!0,this.iframe?.classList.remove("loading"),this.iframe?.classList.add("loaded"),this.client.trigger("opened")}onEndGame(){this.reset()}reset(){(this.loaded||this.loading)&&this.client.trigger("closed"),this.loaded=!1,this.loading=!1,this.iframe?.setAttribute("src",""),this.iframe?.classList.remove("loading"),this.iframe?.classList.remove("loaded")}initClient(){this.iframe&&(this.client.on("loading",this.onLoading),this.client.on("loaded",this.onLoadDone),this.client.on("loadDone",this.onLoadDone),this.client.on("endGame",this.onEndGame),this.client.connect(this.iframe))}_onCloseFailed(){this.reset()}_internalOpen(e){let{singlePlay:t=!1,playOptions:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.preloading)return void this.client.on("preloadsFinished",()=>{this._internalOpen(e,{singlePlay:t,playOptions:n})});this.loading=!0,this.initClient();let s=eR.basic();s&&(this.logger.error("ERROR:",s),this.client.trigger("unsupported"));let a=e;if(null!==n){let t="playOptions="+encodeURIComponent(JSON.stringify(n));a=-1===e.indexOf("?")?`${e}?${t}`:`${e}&${t}`}this.iframe?.classList.add("loading"),this.iframe?.setAttribute("src",a),this.client.respond("singlePlay",t),null!==n&&this.client.respond("playOptions",n),this.client.trigger("open")}openPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"!=typeof t&&(this.logger.warn("SpringRoll Container.openPath was passed a invalid options parameter. Using default parameters instead"),t={}),this._internalOpen(e,Object.assign({singlePlay:!1,playOptions:{}},t))}async openRemote(e){let{query:t="",singlePlay:n=!1,playOptions:s=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.release=null;let a=await fetch(e,{headers:{"Content-Type":"application/json"}}),i=await a.json();if(!i.success)throw Error(i.error);let l=i.data,o=eR.test(l.capabilities);if(o)throw this.client.trigger("unsupported",{error:o}),Error(o);this.release=l,this._internalOpen(l.url+t,{singlePlay:n,playOptions:s})}destroy(){this.reset(),this.iframe=null,this.release=null}close(){this.loading||this.loaded?(this.client.trigger("close"),this.client.send("close")):this.reset()}get context(){return this._context}set context(e){"object"!=typeof e?this.logger.error("[SpringRollContainer] Context: new context provided is not an object"):this._context=e}}var e$=n(82506),eG=n(50999);let eW=new O.A({caller:"managers.SpringRollContainerPlugins.SavedData"});class eU{static #e=this.idbStore=e$.BN.gameStates.name;static remove(e){localStorage.removeItem(e),eG.HI.remove(e),e$.jc.remove(e,this.idbStore)}static async write(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s="function"==typeof t?t():t;return n?eG.HI.set(e,s):await e$.jc.setWithLocalStorageBackup(e,s,e,this.idbStore)}static async read(e){return eG.HI.get(e)||await e$.jc.get(e,this.idbStore)}static getAndRemoveLocalStorageValue(e){let t=eG.UR.get(e);return null!=t?(e$.z$.set(e,t,this.idbStore).then(()=>{eG.UR.remove(e)}).catch(()=>eW.log(`getAndRemoveLocalStorageValue conversion failed for key ${e}. Keeping data in localStorage as a backup until it can be successfully saved to indexedDB.`)),t):null}static async readAndConvert(e){let t=this.getAndRemoveLocalStorageValue(e);if(null!==t)return t;let n=eG.HI.get(e);return null!=n?n:await e$.jc.get(e,this.idbStore)}}class ez{constructor(e){this.debugLoggers=[],this.name=e,this.client=null,this.preloadFailed=!1,this.logger=this.createLogger()}addDebugLogger(e){this.debugLoggers.push(e)}debugLogger(e){var t=this;return function(){for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];
4return t.debugLoggers.forEach(n=>{n(`${t.name} ${s.map(e=>{if(null===e)return"null";if("object"==typeof e){let t="Unserializable object logged. See browser console.";try{t=JSON.stringify(e,null,2)}catch(e){}return t}return"string"==typeof e?e:(e||"undefined").toString()}).join(" ")}`,e)})}}createLogger(){var e=this;let t=new O.A({caller:`SpringRollContainerPlugins.${this.name}`});return Object.assign({},t,{info:function(){for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];t.info(...s),e.debugLogger("info")(...s)},log:function(){for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];t.log(...s),e.debugLogger("log")(...s)},debug:function(){for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];t.debug(...s),e.debugLogger("debug")(...s)},warn:function(){for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];t.warn(...s),e.debugLogger("warn")(...s)},error:function(){for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];t.error(...s),e.debugLogger("error")(...s)}})}async preload(e){let{client:t}=e;this.client=t}start(e){this.client?.on("loaded",this.sendAllProperties),this.client?.on("loadDone",this.sendAllProperties)}init(e){}sendProperty(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];eU.write(e,t),n||this.client?.send(e,t)}sendAllProperties(e){}warn(e){this.logger.warn(e)}}class eH extends ez{constructor(e){super(e),this.sendMutes=!1}init(e){this.sendMutes=!0}_disableButton(e){e instanceof HTMLButtonElement&&(e.classList.remove("enabled"),e.classList.add("disabled"))}reset(){this.sendMutes=!1}_setMuteProp(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.logger.log("_setmuteprop()",{prop:e,button:t,muted:n,disableSend:s}),Array.isArray(t)?t.forEach(e=>this.changeMutedState(e,n)):this.changeMutedState(t,n),this.sendProperty(e,n,s)}changeMutedState(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e instanceof HTMLButtonElement&&(e.classList.remove("unmuted"),e.classList.remove("muted"),e.classList.add(t?"muted":"unmuted"))}}class eK{constructor(e,t){this.onBlur=e=>{this.enabled&&this._onBlur(e)},this.onFocus=e=>{this.enabled&&this._onFocus(e)},this.onToggle=e=>{this.enabled&&(document.hidden?this.onBlur(e):this.onFocus(e))},this._enabled=!1,this._onBlur=t,this._onFocus=e,this.enabled=!0}destroy(){this.removeListeners(),this.enabled=!1}removeListeners(){window.removeEventListener("visibilitychange",this.onToggle,!1),window.removeEventListener("blur",this.onBlur,!1),window.removeEventListener("focus",this.onFocus,!1),window.removeEventListener("pagehide",this.onBlur,!1),window.removeEventListener("pageshow",this.onFocus,!1),document.removeEventListener("visibilitychange",this.onToggle,!1)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.removeListeners(),this._enabled&&(window.addEventListener("visibilitychange",this.onToggle,!1),window.addEventListener("blur",this.onBlur,!1),window.addEventListener("focus",this.onFocus,!1),window.addEventListener("pagehide",this.onBlur,!1),window.addEventListener("pageshow",this.onFocus,!1),document.addEventListener("visibilitychange",this.onToggle,!1))}}class eJ{constructor({button:e,onClick:t,channel:n}){this.button=e instanceof HTMLElement?e:document.querySelector(e),this.onClick=t,this.channel=n,this.button&&this.button.addEventListener("click",t)}displayButton(e){if(!(this.button instanceof HTMLElement))return;let t=this.channel;this.button.style.display=e[t]||"pause"===this.channel||"hints"===this.channel?"":"none"}enableButton(){this.button&&this.button.classList.remove("disabled")}addClass(e){this.button&&(this.button.className=this.button.className?this.button.className+` ${e}`:` ${e}`)}}class eY extends eH{constructor(e,t=!0){super("Pause-Button-plugin"),this._appBlurred=!1,this._containerBlurred=!1,this._focusTimer=null,this._isManualPause=!1,this._keepFocus=!1,this._manageOwnVisibility=t,this._paused=!1,this.iframe=null,this.focusApp=this.focusApp.bind(this),this.manageFocus=this.manageFocus.bind(this),this.onFeatures=this.onFeatures.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeepFocus=this.onKeepFocus.bind(this),this.onPauseToggle=this.onPauseToggle.bind(this),this.pauseDisabled=!1,this._pauseButton=[],this.pageVisibility=new eK(this.onContainerFocus.bind(this),this.onContainerBlur.bind(this)),this.pageVisibility.enabled=this.manageOwnVisibility,e&&(e instanceof HTMLElement?this._pauseButton[0]=new eJ({button:e,onClick:this.onPauseToggle,channel:eY.pauseKey}
4):"string"==typeof e&&document.querySelectorAll(e).forEach(e=>{this._pauseButton.push(new eJ({button:e,onClick:this.onPauseToggle,channel:eY.pauseKey}))}))}set pause(e){if(!this.pauseDisabled&&(this._paused=e,this.hasDom)){this.client?.send(eY.pauseKey,e),this.client?.trigger(e?"paused":"resumed",{paused:e});for(let t=0,n=this._pauseButton.length;t<n;t++){let n=this._pauseButton[t].button;n.classList.remove("unpaused"),n.classList.remove("paused"),n.classList.add(e?"paused":"unpaused")}}}get pause(){return this._paused}set manageOwnVisibility(e){this._manageOwnVisibility=e,this.pageVisibility.enabled=this._manageOwnVisibility}get manageOwnVisibility(){return this._manageOwnVisibility}focusApp(){this.hasDom&&this.iframe?.contentWindow?.focus()}blurApp(){this.hasDom&&this.iframe?.contentWindow?.blur()}manageFocus(){this.manageOwnVisibility&&(this._focusTimer&&clearTimeout(this._focusTimer),this._focusTimer=window.setTimeout(()=>{this._focusTimer=null,this._appBlurred&&this._containerBlurred&&(this.pause=!0),this._keepFocus&&!this._containerBlurred&&this._appBlurred&&this.focusApp()},100))}onKeepFocus(e){this._keepFocus=!!e.data,this.manageFocus()}onFocus(e){this._appBlurred=!e.data,this.manageFocus()}onContainerFocus(){this._containerBlurred=!1,this.manageFocus()}onContainerBlur(){this._containerBlurred=this._appBlurred=!0,this.manageFocus()}onFeatures(e){e.disablePause&&(this.pauseDisabled=!0);for(let t=0,n=this._pauseButton.length;t<n;t++)this._pauseButton[t].displayButton(e.data)}onPauseToggle(){this._isManualPause=!this._isManualPause,this.pause=!this.pause}init(e){let{iframe:t}=e;this.iframe=t,this.client?.on("features",this.onFeatures),this.client?.on("focus",this.onFocus),this.client?.on("keepFocus",this.onKeepFocus),this.pause=this._paused}get hasDom(){return!!(null!==this.iframe&&this.iframe.contentWindow)}get pauseButton(){let e=[];for(let t=0,n=this._pauseButton.length;t<n;t++)this._pauseButton[t].button instanceof HTMLElement&&e.push(this._pauseButton[t].button);return e}static get pauseKey(){return"pause"}}let eQ=new O.A({caller:"managers.SpringRollContainerPlugins.savedData.savedDataHandler"});class eX{static read(e,t){eU.read(e).then(e=>{t(e??null)})}static async readAndConvert(e,t){eU.readAndConvert(e).then(e=>t?.(e??null)).catch(e=>{eQ.warn("Error reading and converting saved data:",e)})}static remove(e,t){eU.remove(e),t?.()}static async write(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];await eU.write(e,t,s),n?.()}}let eZ=new O.A({caller:"managers.SpringRollContainerPlugins.UserDataPlugin"});class e0{constructor(e){this.name="UserData-Plugin",this.client=null,this.gameGuid=e||"",this.onUserDataRemove=this.onUserDataRemove.bind(this),this.onUserDataRead=this.onUserDataRead.bind(this),this.onUserDataWrite=this.onUserDataWrite.bind(this)}async preload(e){let{client:t}=e;this.client=t}init(){this.client&&(this.client.on("userDataRemove",this.onUserDataRemove),this.client.on("userDataRead",this.onUserDataRead),this.client.on("userDataWrite",this.onUserDataWrite))}namespace(e){return this.gameGuid+(e?"_"+e:"")}sendProperty(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];eX.write(this.namespace(e),t),this.client&&!n&&this.client.send(e,t)}warn(e){eZ.warn(`[SpringRollContainer] ${this.name}: ${e}`)}onUserDataRemove(e){let{type:t}=e;eX.remove(this.namespace(),()=>{this.client?.send(t)})}async onUserDataRead(e){let{type:t}=e,n=this.namespace();await eX.readAndConvert(n,e=>{this.client?.send(t,e)})}onUserDataWrite(e){let{data:t,type:n}=e;eX.write(this.namespace(),t.value,()=>this.client?.send(n))}}var e1=n(16925),e2=n(92771);class e4 extends ez{constructor(e){super(e??"GameSettingsBaseControl-Plugin"),this._internalState={},this.updateModel=null,this.accessibilityDefaultsLoaded=!1,this.client=null,this.restoreGameSettings=this.restoreGameSettings.bind(this),this.sendAllProperties=this.sendAllProperties.bind(this)}async preload(e){let{client:t}=e;this.client=t,this.listenForAccessibilityDefaults()}start(){this.client?(this.client.on("loaded",()=>this.onLoaded("loaded",this)),this.client.on("loadDone",()=>this.onLoaded("loadDone",this))):this.logger.warn("Client is not initialized")}async init(e){e.client.on("features",e=>{this.logger.debug("features event fired",e.data),setTimeout(()=>this.restoreGameSettings(e.data),250)})}namespace(e){return`${this.name}.${e}`}isNullish(e){return null==e}sendAllProperties(){this.logger.debug("sendAllProperties",this._internalState),this.getAllPropNames().forEac
4h(e=>{let t=this._internalState[e];this.isNullish(t)||this.setPropValue(e,t,!1)})}onLoaded(e,t){this.logger.debug(`onLoaded event fired: ${e}`,t),(0,e1.e8)().IS_SAFARI||(0,e1.un)()?setTimeout(()=>{t.resetSavedGameSettings(!0)},1500):t.resetSavedGameSettings(!0)}listenForAccessibilityDefaults(){this?.client?.on("AccessibilityDefaults",e=>{this.logger.debug("AccessibilityDefaults event fired",e.data),this.accessibilityDefaultsLoaded=!0,this.setAccessibilityDefaults(e.data),this.resetSavedGameSettings()})}async restoreGameSettings(e){let t=await this.getSavedGameSettings(e);this.resetToDefaults(!1),this.getAllPropNames().forEach(e=>{let n=t[e];this.isNullish(n)||this.setPropValue(e,n,!1)}),this.logger.debug("restoreGameSettings()",t)}resetSavedGameSettings(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&this.accessibilityDefaultsLoaded||(this.resetToDefaults(!1),this.getAllPropNames().forEach(e=>{this.getPreferenceStorage(e).get().then(t=>{this.isNullish(t)||this.setPropValue(e,t,!1)})}))}async getSavedGameSettings(e){let t={};for(let n of Object.keys(e)){let e=Z[n];if(e&&this.getAllPropNames().includes(e)){let n=await this.getPreferenceStorage(e).get();this.isNullish(n)||(t[e]=n)}}return t}getBoolPropNames(){return this?.booleanPropNames??[]}getNumPropNames(){return this?.numberPropNames??[]}getDefaultValue(e){return this?._internalDefaults?.[e]}setModelUpdater(e){this.updateModel=e,this.getAllPropNames().forEach(t=>{e(t,this.getDefaultValue(t))})}setAccessibilityDefaults(e){let t=this._internalDefaults,n={captionsMuted:!1===e.CAPTIONS,soundVolume:e.ALL_SOUND,musicVolume:e.MUSIC,sfxVolume:e.SOUND_FX,voVolume:e.VOICE};Object.keys(n).forEach(e=>{let s=n[e];void 0!==s&&this.getAllPropNames().includes(e)&&(t[e]=s)}),this.logger.debug("Successfully set AccessibilityDefaults",t)}resetToDefaults(e){let t=this._internalDefaults;this.getAllPropNames().forEach(n=>{let s=t[n];this.setPropValue(n,s,e),e&&this.getPreferenceStorage(n).delete()})}getAllPropNames(){return[...this.getBoolPropNames(),...this.getNumPropNames()]}getPropValue(e){return this._internalState[e]??this.getDefaultValue(e)}getPreferenceStorage(e){return new e2.A(this.namespace(e),"localStorage")}sendProperty(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n||(this.client?(this.client.send(e,t),this.logger.debug(`sendProperty: ${e} -> ${t}`)):this.logger.error(`sendProperty attempted: ${e} -> ${t}; but client is not initialized`))}setPropValue(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=this.getPreferenceStorage(e);if(this.sendProperty(e,t),this._internalState[e]=t,this.updateModel)n&&s.set(t),this.updateModel(e,t);else if(n)throw Error(`updateModel is not set while user trying to set prop value ${e} -> ${t}`);else this.logger.debug(`updateModel is not set while trying to set prop value ${e} -> ${t}`);return t}}class e6 extends e4{constructor(){super("GameCaptionSettingControl-Plugin"),this.booleanPropNames=H,this._internalDefaults={...K},this._internalState={...K}}setMuted(e,t){let n=t??!this.getPropValue(e);return this.logger.debug(`setMuted for ${e} -> ${n}`),this.setPropValue(e,n,!0),n}getMuted(e){return this.getPropValue(e)}toggleMuted(e,t){return this.setMuted(e,t)}}class e3 extends e4{constructor(){super("GameSoundSettingControl-Plugin"),this.booleanPropNames=J,this.numberPropNames=Y,this._internalDefaults={...Q,...X},this._internalState={...Q,...X},this.previousVolumes=Object.assign({},this._internalDefaults)}async init(e){super.init(e),this.handleSoundRaceCondition(e)}handleSoundRaceCondition(e){this.setPropValue("soundMuted",!0),e.client.on("features",e=>{this.setPropValue("soundMuted",!0),setTimeout(()=>this.restoreGameSettings(e.data),50)})}setPropValue(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t=super.setPropValue(e,t,n),n){let{numberPropName:s,isPropNumeric:a}=this.getCorrespondingPropNames(e);a||super.setPropValue(s,t?0:this.getPreviousVolume(s),n),"soundMuted"===e&&Y.forEach(e=>{"soundVolume"!==e&&this.setPropValue(e,t?0:this.getPreviousVolume(e),n)}),a&&t>0&&this.setPreviousVolume(s,t)}return t}setMuted(e,t){let n=t??!this.getPropValue(e);return this.logger.debug(`setMuted for ${e} -> ${n}`),this.setPropValue(e,n,!0),n}getMuted(e){return this.getPropValue(e)}toggleMuted(e,t){let{subChannelsEffectivelyMuted:n}=this.getChannelStates();return void 0===t&&(t=("soundMuted"!==e||!n)&&!this.isEffectivelyMuted(e,!1)&&!this.getMuted(e)),this.setMuted(e,t),!1===t&&this.restorePreviousVolume(e),"soundMuted"===e&&!1===t&&this.booleanPropNames.forEac
4h(e=>{"soundMuted"!==e&&n&&this.setPropValue(e,!1,!0)}),this.logger.debug("Mute preferences saved:",Object.keys(localStorage).filter(e=>e.startsWith(`PbsKidsPuma.UserPref.${this.name}`)).map(e=>`${e.split(".").pop()} = ${localStorage[e]}`).join(", ")),t}getVolume(e){return this.getPropValue(e)}setVolume(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{booleanPropName:s}=this.getCorrespondingPropNames(e),{mainChannelEffectivelyMuted:a,subChannelsEffectivelyMuted:i}=this.getChannelStates(),l="soundVolume"===e,o=this.numberPropNames.filter(t=>t!==e&&"soundVolume"!==t),r=this.getPropValue(e);return!n&&r>0&&this.setPreviousVolume(e,r),this.logger.debug(`setVolume for ${e} -> ${t}`),this.setPropValue(e,t,!n),t>0&&(!l&&a&&(this.setPropValue("soundMuted",!1),this.setPropValue("soundVolume",this.getPreviousVolume("soundVolume"))),this.setPropValue(s,!1),i&&o.forEach(e=>{if(l)this.restorePreviousVolume(e,!1);else{let{booleanPropName:t}=this.getCorrespondingPropNames(e);this.setPropValue(t,!0)}})),t}resetSavedGameSettings(){super.resetSavedGameSettings(),this.numberPropNames.forEach(e=>{let t=this.getPropValue(e);this.setPreviousVolume(e,t>0?t:1)})}getPreviousVolume(e){let t=this.getPreferenceStorage(e).get();return this.previousVolumes[e]??t??1}setPreviousVolume(e,t){return this.previousVolumes[e]=t}restorePreviousVolume(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{booleanPropName:n,numberPropName:s}=this.getCorrespondingPropNames(e);this.setPropValue(s,this.getPreviousVolume(s),!0),this.setPropValue(n,!1,!0),t&&"soundVolume"!==e&&"soundMuted"!==e&&(this.setPropValue("soundMuted",!1,!0),this.setPropValue("soundVolume",this.getPreviousVolume("soundVolume"),!0))}isEffectivelyMuted(e,t){if(!t&&(this.getPropValue("soundMuted")||0===this.getPropValue("soundVolume")))return!0;let{booleanPropName:n,numberPropName:s}=this.getCorrespondingPropNames(e);return this.getPropValue(n)||0===this.getPropValue(s)}getCorrespondingPropNames(e){let t=this.booleanPropNames.indexOf(e),n=this.numberPropNames.indexOf(e);return -1===t&&(t=this.numberPropNames.indexOf(e)),-1===n&&(n=this.booleanPropNames.indexOf(e)),{booleanPropName:this.booleanPropNames[t],numberPropName:this.numberPropNames[n],isPropNumeric:-1!==this.numberPropNames.indexOf(e)}}getChannelStates(){let e=this.isEffectivelyMuted("soundMuted",!0),t=this.booleanPropNames.filter(e=>"soundMuted"!==e).every(e=>this.isEffectivelyMuted(e,!0));return{mainChannelEffectivelyMuted:e,subChannelsEffectivelyMuted:t,subChannelsMuted:this.booleanPropNames.filter(e=>"soundMuted"!==e).every(e=>this.getPropValue(e)),subChannelsVolumeDown:this.booleanPropNames.filter(e=>"soundMuted"!==e).every(e=>{let{numberPropName:t}=this.getCorrespondingPropNames(e);return 0===this.getPropValue(t)})}}}let e8=new O.A({caller:"managers.GamePlayer"}),e5="No data available",e7=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return"";let n=t?e.debugUrl||e.url||"":e.url||"";return e8.debug(`releaseUrl : ${n}`),n},e9=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"es",t={};return t.language=e,e8.debug("Springroll playOptions:",t),t},te={},tt=new O.A({caller:"components.GamePlayer.index"}),tn={key:"PbsKidsPuma.GamePlayer.showPauseButtonLabel",get:()=>eG.HI.get(tn.key),set:e=>eG.HI.set(tn.key,e)};function ts(e){let{gameData:t,language:n,isIOSDevice:s}=e,[a,i]=(0,o.useReducer)(c,d),[r,u]=(0,o.useState)(null),[g,h]=(0,o.useState)(!1),[m,p]=(0,o.useState)(!1),[b,f]=(0,o.useState)(!1),[v,_]=(0,o.useState)(!0),S=(0,o.useRef)(null),y=(0,o.useRef)(null),P=(0,o.useRef)(null),M=(0,o.useRef)(null),A=(0,o.useRef)(null),T=(0,o.useRef)(null),{logGameDebugMessage:B}=(0,o.useContext)(en.Ay),[E,N]=(0,o.useState)({captions:{available:!1,volumeAvailable:!1},sound:{mainSound:{available:!1,volumeAvailable:!1},soundEffects:{available:!1,volumeAvailable:!1},voiceOver:{available:!1,volumeAvailable:!1},music:{available:!1,volumeAvailable:!1}}}),C=()=>{M.current?.onPauseToggle()};return(0,o.useEffect)(()=>(n&&i({type:"set_lang",payload:n}),()=>i({type:"set_lang",payload:d.lang})),[n]),(0,o.useEffect)(()=>(t&&i({type:"set_game",payload:t}),()=>{i({type:"clear_error",payload:""}),i({type:"set_game",payload:d.game})}),[t]),(0,o.useEffect)(()=>{var e,t,n,s,i;let l,o,r,d,c;if(!a.game?.id||S.current)return;let g=e9(a.lang),m=e7(a.game.build,a.game.debug),b=function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];B?.(t??e,"error"),n?tt.error(e):tt.debug("[Error not sent to Sentry]",t??e)};if(!m)return void b(`Release URL not found for ${a.game.title||"this game"}.`);let f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t&&ek.includes(t))return!1;for(let t of eI)if(t.test(e))return!1;return!0},v=(e=a.game,t=a.frame.id,n=g?.language,l=e.properties?.[0],o={build_info:{springroll_app_build:{commit:e.springrollExperience?.[0]?.springrollExperienceProductionRelease?.[0]?.hash||e5}},game_name:e.title||e5,show_name:l?.title||e5,game_guid:e.guid||e5,show_guid:l?.guid||e5,language:"es"===n?n:"en"},e8.debug("Springroll context:",o),r=o,d=te[s=e.guid||""]||new e0(s),{container:new eq(`#${t}`,{plugins:Object.values(c={pause:new eY('[data-component-game-player
4-back-button="pause-menu"], [data-component-game-player-pause-button], [data-component-game-player-play-button]'),userData:d,captionSettings:new e6,soundSettings:new e3}),context:r}),plugins:c});return S.current=v.container,A.current=v.plugins,M.current=v.plugins.pause,S.current.client.on("features",e=>{tt.debug("Game features:",e),u(e)}),S.current.client.on("localError",e=>{let t=`SpringRoll Local Error for ${a.game?.title||"unknown"} (${a.game?.id||"unknown"}): `,n=`${t}${JSON.stringify(e)}`,s=`${t}${JSON.stringify(e,null,2)}`,i=f(n,a.game?.id);b(n,s,i)}),S.current.client.on("opened",()=>h(!0)),S.current.client.on("paused",()=>p(!0)),S.current.client.on("resumed",()=>p(!1)),i=S.current,i.openPath(m,{playOptions:g}),()=>{S.current&&p(!1)}}),(0,o.useEffect)(()=>{if(!r||!S.current)return;let e=r?.data;N({captions:{available:e?.captions||!1,volumeAvailable:!1},sound:{mainSound:{available:e?.sound||!1,volumeAvailable:e?.soundVolume||!1},soundEffects:{available:e?.sfx||!1,volumeAvailable:e?.sfxVolume||!1},voiceOver:{available:e?.vo||!1,volumeAvailable:e?.voVolume||!1},music:{available:e?.music||!1,volumeAvailable:e?.musicVolume||!1}}})},[r]),(0,o.useEffect)(()=>{!1===tn.get()?_(!1):setTimeout(()=>{_(!1),tn.set(!1)},6500)},[]),(0,o.useEffect)(()=>{let e=()=>{f(!b)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[b]),(0,o.useEffect)(()=>()=>{u(null),h(!1),S.current?.client.destroy(),S.current?.reset(),S.current=null},[]),(0,l.jsx)(w,{ref:T,children:(0,l.jsx)(x,{focusPauseMenu:()=>{let e=y.current?.querySelector("button:first-of-type");e?.focus()},gameData:t,handleClickOutside:e=>{M.current&&e?.target!==P.current&&!1===M.current._paused&&C()},model:a,loaded:g,paused:m,ref:P,isFullScreen:b,showPauseButtonLabel:v,children:(0,l.jsx)(ea,{accessibilityOptions:E,containerRef:S,gameFeatures:r,lang:a.lang,paused:m,pluginsRef:A,togglePause:C,children:(0,l.jsx)(eV,{accessibilityOptions:E,active:m,focusGame:()=>P.current?.focus(),lang:a.lang,isIOSDevice:s,isFullScreen:b,ref:y,toggleFullScreen:()=>{s||(b?document.exitFullscreen():T.current&&T.current.requestFullscreen(),setTimeout(()=>{M.current?._paused===!1&&C()},1))},togglePause:C})})})})}var ta=n(60329),ti=n(95462),tl=n(72858),to=n(75129),tr=n(44745),tu=n(57094),td=n.n(tu),tc=!0;function tg(e){let{hasProducerHeaderFooter:t,gameData:n,contentLanguage:s,altLanguageGame:a,pageProperty:i,queriedGameSlug:d,resolvedPageThemes:c,seriesNavButtons:g}=e,[h,m]=(0,o.useState)("auto"),[p,b]=(0,o.useState)(!1),[f,v]=(0,o.useState)(!1),_=(0,o.useRef)(null),S=(0,o.useRef)(null),y=(i?.title?i.title+" - ":"")+n.title+" Game";return(0,o.useEffect)(()=>{(0,e1.e8)().IS_IOS&&v(!0)},[]),(0,o.useEffect)(()=>{(0,tr.Bk)(n,d,s)},[n,s,d]),(0,to.S)(n.id,i,n,s),(0,o.useEffect)(()=>{let e=()=>{if(!S.current||!_.current)return;let{areaHeight:e,isWide:t,getPlayerContainer:n}=(0,tr.Uv)(S.current,_.current);m(e),b(t),window.setTimeout(()=>{let e=n();e.setComputedDimensions(e.width,e.height)},150)};if(_?.current&&S.current){let{getPlayerContainer:t}=(0,tr.Uv)(S.current,_.current);t().hasComputedWidth||e()}return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ta.A,{pageTitle:`${i?.title?i.title+" - ":""}${n.title||""}`,pageDescription:n.shortDescriptionPlainText||"",pageImageUrl:n.mezzanine?.[0]?.url||""}),(0,l.jsx)(tl.A,{resolvedPageThemes:c}),(0,l.jsx)("div",{ref:S,children:(0,l.jsx)(ti.A,{hasProducerHeaderFooter:t,displayBackButton:!0,pageTitle:y,propertyId:i?.id,resolvedPageThemes:c,seriesNavButtons:g})}),(0,l.jsxs)("main",{children:[(0,l.jsx)("div",{ref:_,className:`${td().gameArea} ${p?td().wide:""}`,style:{height:h},children:(0,l.jsx)("div",{className:`${td().gameAreaInner} aspect-game`,children:(0,l.jsx)(ts,{gameData:n,language:s,isIOSDevice:f})})}),(0,l.jsx)("div",{className:td().gamePlayerPageFooter,children:a&&(0,l.jsx)(r.A,{pageLang:n.contentLanguage,link:`/games/play/${a.slug}/${a.id}${a.contentLanguage===u.hT.Es?"/es":""}`})})]})]})}},57094:e=>{e.exports={gameArea:"GamePlayPage_gameArea__aNnsf",gameAreaInner:"GamePlayPage_gameAreaInner__9k11Y",wide:"GamePlayPage_wide__wl_nu",gamePlayerPageFooter:"GamePlayPage_gamePlayerPageFooter__ijbCH"}},65966:e=>{e.exports={componentWrapper:"HorizontalVolumeSlider_componentWrapper__IN_1u",buttonsWrapper:"HorizontalVolumeSlider_buttonsWrapper__RFtLw",backgroundImage:"HorizontalVolumeSlider_backgroundImage__JJ3TK",backgroundImageActive:"HorizontalVolumeSlider_backgroundImageActive__AMhTc",backgroundImageShadow:"HorizontalVolumeSlider_backgroundImageShadow__V_0z9"}}
4,75129:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var s=n(14232),a=n(37959);function i(e,t,n,i){let[l,o]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(l){let e,s,l=t?.googleAnalyticsId||"",r=(e={},n?.title&&(e.game_title=n.title),n?.guid&&(e.game_guid=n.guid),i&&(e.game_language="es"===i?"es":"en"),t?.title&&(e.show_title=t.title),t?.guid&&(e.show_guid=t.guid),e);(0,a.Q)({event:"pageProducerId",googleAnalyticsId:l}),s={event:"enriched_page_data",...r},(0,a.Q)(s),o(!1)}},[n,i,t,l]),(0,s.useEffect)(()=>{e&&o(!0)},[e])}},77079:e=>{e.exports={languageSwitcherWrap:"LanguageSwitcher_languageSwitcherWrap__2uXR3",languageSwitcher:"LanguageSwitcher_languageSwitcher__6hHYJ",track:"LanguageSwitcher_track__mBoPD"}},77781:e=>{e.exports={fullScreenButton:"FullScreenButton_fullScreenButton__lh_96",fullScreenIcon:"FullScreenButton_fullScreenIcon__zAl2k",fullScreenLabel:"FullScreenButton_fullScreenLabel__R52O7",fullScreen:"FullScreenButton_fullScreen__3sHHK"}},77931:e=>{e.exports={gameSettingToggleButton:"ToggleSettingButton_gameSettingToggleButton__1EpUb",buttonShape:"ToggleSettingButton_buttonShape__CDmI4",gameSettingToggleIcon:"ToggleSettingButton_gameSettingToggleIcon__cHkSH",disabledIcon:"ToggleSettingButton_disabledIcon__fycRg",settingDisabled:"ToggleSettingButton_settingDisabled__Lpzu3"}},79009:(e,t,n)=>{"use strict";n.d(t,{g:()=>a});class s{constructor(){if(this.callbacks=[],"u"<typeof document)return;const e=document.querySelector("body"),t=new ResizeObserver(e=>{for(let t=0;t<e.length;t++)requestAnimationFrame(()=>{for(let e of this.callbacks)e()})});e&&t.observe(e)}addCallback(e){this.callbacks.push(e)}removeCallback(e){this.callbacks=this.callbacks.filter(t=>t!==e)}}let a=new s},79093:e=>{e.exports={settingsMenuToggleButtonWrapper:"SettingsMenuOpenButton_settingsMenuToggleButtonWrapper__8GZPg"}},83408:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var s,a=n(14232);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(null,arguments)}let l=e=>{let{title:t,titleId:n,...l}=e;return a.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:64,height:63,viewBox:"0 0 64 63","aria-labelledby":n},l),t?a.createElement("title",{id:n},t):null,s||(s=a.createElement("path",{fill:"var(--svg-icon-fill-color, white)",d:"M46.378 24.182c0 9.215-9.741 9.77-11.668 13.656-.803 1.666-.482 2.998-.482 2.998l-8.992.944s-.91-5.885.428-8.216c1.874-3.275 8.243-4.219 8.243-8.438 0-2.22-1.766-2.498-4.068-2.498-2.676 0-6.637 1.11-10.009 3.109l-1.98-11.27s9.366-1.498 13.863-1.498S46.378 14.3 46.378 24.182m-10.49 24.814c0 2.61-2.463 4.552-5.46 4.552s-5.406-1.943-5.406-4.552 2.409-4.885 5.406-4.885 5.46 2.276 5.46 4.885"})))}},85442:e=>{e.exports={toggleButton:"AccessibilityMenuBarButton_toggleButton__7wrvV",hidden:"AccessibilityMenuBarButton_hidden__0qY3U",buttonImage:"AccessibilityMenuBarButton_buttonImage__jmeaR",disabledIcon:"AccessibilityMenuBarButton_disabledIcon___MV1M",buttonLabel:"AccessibilityMenuBarButton_buttonLabel__VO4uE"}},92071:e=>{e.exports={backButton:"BackButton_backButton__OxfCI",svgIcon:"BackButton_svgIcon__1P4l_"}}},e=>{e.O(0,[6593,6996,6614,5462,6670,5038,636,8792],()=>e(e.s=8294)),_N_E=e.O()}]); 5//# sourceMappingURL=[...slugsIds]-1058603232165cf4.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.