PageSourceSearch

https://app.sundancetv.com/code/js/74644.e9cc654cf0864301f242.js

js sundancetv.com collected 2026-09-24 20:30:50 UTC 36,699 bytes, 3 lines download raw bytes

1(()=>{(function(){try{var X=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},U=new X.Error().stack;U&&(X._sentryDebugIds=X._sentryDebugIds||{},X._sentryDebugIds[U]="b66cbe35-1dc9-487d-9483-d9be8a548bbe",X._sentryDebugIdIdentifier="sentry-dbid-b66cbe35-1dc9-487d-9483-d9be8a548bbe")}catch(t){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[58146,74644],{5547:((X,U,t)=>{t.d(U,{Ih:()=>Ye,_y:()=>w,qs:()=>Se});var e=t(96540),W=t(23154),a=t(47804),j=t(13516),ie=t(97966),R=t(59530),H=t(47101);if(t.j==25453)var B=t(21649);var q=t(26969),Z=t(3248),ee=t(21975),Oe=t(97963),te=t(55194),$=t(2275),C=t(96763),V=Object.defineProperty,Ie=Object.defineProperties,J=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,ce=(I,_,F)=>_ in I?V(I,_,{enumerable:!0,configurable:!0,writable:!0,value:F}):I[_]=F,de=(I,_)=>{for(var F in _||(_={}))N.call(_,F)&&ce(I,F,_[F]);if(L)for(var F of L(_))G.call(_,F)&&ce(I,F,_[F]);return I},ue=(I,_)=>Ie(I,J(_));const Le={preferredLanguage:""},i=e.createContext(Le),w=e.createContext({http:null}),Se=()=>{const{http:I}=e.useContext(w);return I},Ne=()=>React.useContext(SettingsContext),we=()=>{const I=Ne(),_=React.useContext(i);return C.log(_,I),_},$e=I=>{var _;const[F,Te]=e.useState(null),[fe,ne]=e.useState({}),[k,ye]=e.useState(null),[Ke,Me]=e.useState(!1),{setIsGuest:Fe,isGuest:Re,setUserId:_e,setCountry:Ve}=e.useContext(ie.E),{activeLocale:xe}=e.useContext(W.LabelsContext),Ae=xe.split("_")[1],oe=Se();e.useEffect(()=>{oe&&he()},[oe]);const he=async()=>{var re;const se=await(0,q.QF)(oe),We=((re=se==null?void 0:se.loc)==null?void 0:re.split(",")[0])||Ae;Ve(We==="ZZ"?Ae:We),Fe(se.isGuest),_e(se.sub)},He=async()=>{const re=I.realm?`/realm-settings/realm/${I.realm}`:`/realm-settings/domain/${I.url}`,{parsedData:se}=await oe.get(re);window.AUTH_PROVIDERS=(0,Oe.eC)(se.authenticationProviders),window.APPS=se,window.APP_CONF=de(ue(
1de({},se),{authenticationProviders:window.AUTH_PROVIDERS}),se.settings),Te(se)},ke=async()=>{const{parsedData:re}=await oe.get("/user/preferences");ne(re)},Ue=async()=>{const{parsedData:re}=await oe.get("/label");ye(re)};return e.useEffect(()=>{Re===!1&&ke()},[Re]),e.useEffect(()=>{He(),Ue(),(0,te.V3)({ALGOLIA_APP_ID:"H99XLDR8MJ",ALGOLIA_APP_KEY:"e55ccb3db0399eabe2bfc37a0314c346",LANDING_BG:"",MAIN_TITLE:"",MAIN_INTRO:"",LOGO:"https://imggaming.s3.amazonaws.com/dice-web/assets/dce.sport/logo.png",PRIMARY_FONT_URL:"/assets/fonts/poppins-bold-webfont",SECONDARY_FONT_URL:"/assets/fonts/Roboto-Regular",TERTIARY_FONT_URL:"/assets/fonts/robotocondensed-bold-webfont",PRIMARY_COLOR:"#0076C0",SECONDARY_COLOR:"#FFFFFF",TERTIARY_COLOR:"#272727",BG_COLOR:"#000000",EPG_COLOR:"#000000",LOGO_SCALE:"1"})},[]),e.useEffect(()=>{F&&fe&&k&&Me(!0),I.onConfigurationChange({realmSettings:F,preferences:fe,labels:k})},[F,fe,k]),e.createElement(a.SettingsContext.Provider,{value:F},e.createElement(i.Provider,{value:fe},e.createElement(j.xK.Provider,{value:{imageType:window.ENV_CONF.IMAGE_RESIZER_FORMAT}},e.createElement(R.P.Provider,{value:{routes:(0,ee.X5)((_=window==null?void 0:window.APP_CONF)==null?void 0:_.URL_LANGUAGE)}},e.createElement(W.LabelsContext.Provider,{value:{activeLocale:k==null?void 0:k.selected_locale,labels:k==null?void 0:k.translations[k==null?void 0:k.selected_locale]}},Ke?I.children:null)))))},Ye=I=>{var _,F;const Te=(F=(0,B.OE)((_=localStorage.getItem(H.Zt))!=null?_:"").split("_"))==null?void 0:F[0],[fe,ne]=e.useState(Te||(0,$.xd)()),{ENV_CONF:{API_KEY:k,httpapi:ye,VERSION:Ke},APP_CONF:{PRIMARY_COLOR:Me,BG_COLOR:Fe,LOGO_SCALE:Re}}={ENV_CONF:{env:"PROD",httpapi:"https://dce-frontoffice.imggaming.com",beaconapi:"https://guide.imggaming.com/prod",multibeaconapi:"https://guide.imggaming.com",matcheventsapi:"https://plugins.onvesper.com/match-events",vespersearchapi:"https://search.dce-prod.dicelaboratory.com/search",MUXKEY:"c603cae0cab019beb85f1c4c3",SENTRY_DSN:"https://[email protected]/1321936",API_KEY:"857a1e5d-e35e-4fdf-805b-a87b6f8364bf",PUBNUB_SUB_KEY:"sub-c-2e73f4e0-1dd7-11e7-894d-0619f8945a4f",PUBNUB_SUB_KEY_DCE_PAYMENT:"sub-c-4ac0444a-b4b5-11eb-bcfa-02017f28bfc9",PUBNUB_SUB_KEY_VCID:"sub-c-eeba4cba-608a-11ea-aaa3-eab2515ceb0d",PUBNUB_SUB_KEY_PAYMENT:"sub-c-4ac0444a-b4b5-11eb-bcfa-02017f28bfc9",PUBNUB_SUB_KEY_MATCH_EVENTS:"sub-c-2e73f4e0-1dd7-11e7-894d-0619f8945a4f",turkcellRestUrl:"https://epayment.turkcell.com.tr/paymentmanagement/rest",gtaId:"UA-123989647-1",ADOBE_AUTH:"https://api.auth.adobe.com",IMAGE_RESIZER_FORMAT:"webp",GYGIA_AUTH:"https://idpassets.uefa.com/idp.js",VERSION:"6.60.0"},APP_CONF:{ALGOLIA_APP_ID:"H99XLDR8MJ",ALGOLIA_APP_KEY:"e55ccb3db0399eabe2bfc37a0314c346",LANDING_BG:"",MAIN_TITLE:"",MAIN_INTRO:"",LOGO:"https://imggaming.s3.amazonaws.com/dice-web/assets/dce.sport/logo.png",PRIMARY_FONT_URL:"/assets/fonts/poppins-bold-webfont",SECONDARY_FONT_URL:"/assets/fonts/Roboto-Regular",TERTIARY_FONT_URL:"/assets/fonts/robotocondensed-bold-webfont",PRIMARY_COLOR:"#0076C0",SECONDARY_COLOR:"#FFFFFF",TERTIARY_COLOR:"#272727",BG_COLOR:"#000000",EPG_COLOR:"#000000",LOGO_SCALE:"1"}};window.ENV_CONF={env:"PROD",httpapi:"https://dce-frontoffice.imggaming.com",beaconapi:"https://guide.imggaming.com/prod",multibeaconapi:"https://guide.imggaming.com",matcheventsapi:"https://plugins.onvesper.com/match-events",vespersearchapi:"https://search.dce-prod.dicelaboratory.com/search",MUXKEY:"c603cae0cab019beb85f1c4c3",SENTRY_DSN:"https://[email protected]/1321936",API_KEY:"857a1e5d-e35e-4fdf-805b-a87b6f8364bf",PUBNUB_SUB_KEY:"sub-c-2e73f4e0-1dd7-11e7-894d-0619f8945a4f",PUBNUB_SUB_KEY_DCE_PAYMENT:"sub-c-4ac0444a-b4b5-11eb-bcfa-02017f28bfc9",PUBNUB_SUB_KEY_VCID:"sub-c-eeba4cba-608a-11ea-aaa3-eab2515ceb0d",PUBNUB_SUB_KEY_PAYMENT:"sub-c-4ac0444a-b4b5-11eb-bcfa-02017f28bfc9",PUBNUB_SUB_KEY_MATCH_EVENTS:"sub-c-2e73f4e0-1dd7-11e7-894d-0619f8945a4f",turkcellRestUrl:"https://epayment.turkcell.com.tr/paymentmanagement/rest",gtaId:"UA-123989647-1",ADOBE_AUTH:"https://api.auth.adobe.com",IMAGE_RESIZER_FORMAT:"webp",GYGIA_AUTH:"https://idpassets.uefa.com/idp.js",VERSION:"6.60.0"},e.useEffect(()=>{document.documentElement.style.setProperty("--color-primary",(0,te.Tj)(Me)),document.documentElement.style.setProperty("--color-bg",(0,te.Tj)(Fe)),document.documentElement.style.setProperty("--color-bg-hex",Fe),document.documentElement.style.setProperty("--logo-multiplier",Re)},[]);const _e=e.useCallback(()=>fe,[]),Ve=e.useCallback(Ae=>{var oe;const he=(oe=Ae.labels)==null?void 0:oe.selected_locale;ne(he),he&&localStorage.setItem(H.Zt,(0,B.OE)(he))}
1,[]),xe=e.useRef((0,Z.P)(ye,Ke,_e,k,I.realm));return e.createElement(e.Fragment,null,e.createElement(w.Provider,{value:{http:xe.current}},e.createElement($e,{realm:I.realm,url:I.url,onConfigurationChange:Ve},I.children)))}}),25278:((X,U,t)=>{t.d(U,{LX:()=>a,qS:()=>ie});var e=t(68407),W=t(21904),a;(function(R){R.MANAGE="MANAGE",R.UPGRADE="UPGRADE",R.DOWNGRADE="DOWNGRADE"})(a||(a={}));const j=R=>R.type===SubEventDetailsType.PARTICIPANTS,ie=(R,H=a.MANAGE)=>{if(R&&W.QN[R]){const q=W.QN[R];switch(H){case a.UPGRADE:return{label:"upgradeSubscriptionStore",data:{store:q}};case a.DOWNGRADE:return{label:"downgradeSubscriptionStore",data:{store:q}};default:return{label:"manageSubscriptionStore",data:{store:q}}}}switch(H){case a.UPGRADE:return{label:"upgradeSubscriptionWeb"};case a.DOWNGRADE:return{label:"downgradeSubscriptionWeb"};default:return{label:"manageSubscriptionWeb"}}}}),47078:((X,U,t)=>{t.d(U,{M:()=>B});var e=t(87719),W=t(70279),a=t(32248),j=t(82705),ie=t(79716),R=t(74528),H=t(97963);class B{static async createGooglePalNonces(Z){var ee,Oe;const $=this.getService().getContext(Z);if(!$)return;const C={iconsSupported:((ee=window.APP_CONF.palSdkConfiguration)==null?void 0:ee.whyThisAdIcon)===j.q.SHOW,playerType:"Website",playerVersion:window.VERSION,ppid:(Oe=(0,H.MU)())!=null?Oe:"fallback-ads-id",videoHeight:window.devicePixelRatio*window.screen.height,videoWidth:window.devicePixelRatio*window.screen.width,continuousPlayback:!1,descriptionUrl:document.location.origin,url:document.location.href};try{const V=new Map,Ie=this.getGooglePalSdkConfigurationAllows();if(Ie.includes(e.I.MEDIATAILOR)){if(window.APP_CONF.omSdkEnableMode===a.AvailabilityState.ENABLED){const{getOmidParameters:L}=await Promise.all([t.e(34016),t.e(11743),t.e(73062),t.e(12071)]).then(t.bind(t,73062)),N=L();C.omidPartnerName=N.omidPartnerName,C.omidPartnerVersion=N.omidPartnerVersion,C.supportedApiFrameworks=N.supportedApiFrameworks}let J=$.getNonceManager(e.I.MEDIATAILOR);J||(J=await $.createNonceManager(e.I.MEDIATAILOR,C)),V.set("CM-DVC-GIVN-MEDIATAILOR",J.getNonce())}if(Ie.includes(e.I.YOSPACE)){if(window.APP_CONF.omSdkEnableMode===a.AvailabilityState.ENABLED){const L=(0,R.m)();C.omidPartnerName=L.omidPartnerName,C.omidPartnerVersion=L.omidPartnerVersion,C.supportedApiFrameworks=L.supportedApiFrameworks}let J=$.getNonceManager(e.I.YOSPACE);J||(J=await $.createNonceManager(e.I.YOSPACE,C)),V.set("CM-DVC-GIVN-YOSPACE",J.getNonce())}return V}catch(V){return}}static async generateGooglePalContextId(){if(this.getIsGoogleSdkEnabled())return await(0,W.n)({adProvi
1ders:this.getGooglePalSdkConfigurationAllows(),googlePalService:this.getService()})}static getGooglePalSdkConfigurationAllows(){return this.getIsGoogleSdkEnabled()?window.APP_CONF.palSdkConfiguration.allows:[]}static getIsGoogleSdkEnabled(){var Z,ee;return((ee=(Z=window.APP_CONF)==null?void 0:Z.palSdkConfiguration)==null?void 0:ee.enableMode)===a.AvailabilityState.ENABLED&&!!window.APP_CONF.palSdkConfiguration.allows.length}static getService(){if(this.getIsGoogleSdkEnabled())return this._googlePalService||(this._googlePalService=new ie.O),this._googlePalService}}}),51314:((X,U,t)=>{t.d(U,{q:()=>e});const e=(W,a)=>{if(!W)return a;try{return JSON.parse(W)}catch(j){return a}}}),58146:((X,U,t)=>{t.r(U),t.d(U,{SignupWrapper:()=>J});var e=t(96540),W=t(86364),a=t(56347),j=t(82511),ie=t(58562),R=t(70077),H=t(59530),B=t(97963),q=t(85401),Z=Object.defineProperty,ee=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,$=(L,N,G)=>N in L?Z(L,N,{enumerable:!0,configurable:!0,writable:!0,value:G}):L[N]=G,C=(L,N)=>{for(var G in N||(N={}))Oe.call(N,G)&&$(L,G,N[G]);if(ee)for(var G of ee(N))te.call(N,G)&&$(L,G,N[G]);return L};const V=e.lazy(()=>Promise.all([t.e(27846),t.e(52118),t.e(85128),t.e(47056),t.e(48467),t.e(96746),t.e(43913),t.e(31865),t.e(90137),t.e(19267),t.e(99414),t.e(11543),t.e(93262),t.e(5029),t.e(39088),t.e(92516),t.e(59906),t.e(40967)]).then(t.bind(t,9087))),Ie=L=>{const{outsideAllowedTerritories:N}=window.APP_CONF,{isChild:G}=L,ce=G?"kidPurchasePermissionDenied":N?"signupGeoRestriction":"vpnErrorMessage",de=(0,ie.b0)([ce]),ue=(0,W.d4)(Ne=>Ne.services.app.isRtL),{routes:Le,defaultMenuParams:i}=e.useContext(H.P),w=(0,a.W6)(),Se=()=>(0,q.OS)(i,Le,w);return e.createElement(R.Modal,{isRtL:ue,handleClose:Se},e.createElement(e.Fragment,null,de[ce].value))},J=L=>{const{outsideAllowedTerritories:N,usingVpnOnDisallowingRealm:G}=window.APP_CONF,{type:ce}=(0,B.sh)()||{},de=ce===j.XE.CHILD;return N||G||de?e.createElement(Ie,{isChild:de}):e.createElement(V,C({},L))}}),59711:((X,U,t)=>{t.r(U),t.d(U,{GiftRoot:()=>ct,GiftingApp:()=>dt,GiftingAppWrapper:()=>it,default:()=>xt});var e=t(96540),W=t(86364),a=t(56347),j=t(23154),ie=t(47804),R=t(58562),H=t(57961),B=t(97966),q=t(74176),Z=t(52360);const ee={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"},Oe=({goToMessage:n})=>{var o,s,c,l,r,m;const d=(0,R.b0)(["selectGiftDuration","continue"]),{selectedGift:u,giftMessage:{recipient:P,message:v,duration:E},setGiftMessage:p}=(0,e.useContext)(B.E),f=b=>{let Y=b;const{numberOfPeriods:g}=u.options;return b>g.end?Y=g.end:b<g.start&&(Y=g.start),p({duration:Y,recipient:P,message:v})},O=(0,Z.IR)((s=(o=u.options)==null?void 0:o.period)==null?void 0:s.value)+(E>1?"s":""),y=()=>{setTimeout(()=>{n()},100)},A=d.selectGiftDuration.value;return e.createElement("div",{className:"gift-duration"},e.createElement("h2",null,A.toUpperCase()),e.createElement(q.E,{id:"gift-duration--in
1put",label:O,onChange:f,type:"number",value:E,maxValue:(l=(c=u.options)==null?void 0:c.numberOfPeriods)==null?void 0:l.end,minValue:(m=(r=u.options)==null?void 0:r.numberOfPeriods)==null?void 0:m.start,isValueFixed:!0,inputAriaLabel:`${O}, ${A}`}),e.createElement(H.$,{label:d.continue.value,style:{fill:!0},onClick:y}))};var te=t(92675),$=t(44421),C=t(26969),V=t(5547);const Ie={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"},J=({goToLoginOrPay:n})=>{const o=(0,R.b0)(["emailIsInvalid","continue","recipientEmail","noteOptional",$.Rb]),[s,c]=e.useState(!1),[l,r]=e.useState(!1),m=(0,V.qs)(),{selectedGift:d,giftMessage:u,setGiftMessage:P,setError:v,country:E}=(0,e.useContext)(B.E),{message:p,recipient:f,duration:O}=u;e.useEffect(()=>{var S,D;const T=(D=(S=d==null?void 0:d.options)==null?void 0:S.numberOfPeriods)==null?void 0:D.start;!O&&T&&P({recipient:f,message:p,duration:T})},[O,f,p,d]);const y=S=>{v(null),c(!1),P({recipient:S,message:p,duration:O})},A=({target:{value:S}})=>{P({recipient:f,message:S,duration:O})},b=async()=>{var S;try{r(!0),v(null),await(0,C.J9)(d.externalId,u,E,m),r(!1),n()}catch(D){r(!1),(S=D.messages)!=null&&S.includes("emailIsInvalid")?c(!0):v(o[$.Rb].value)}},Y=e.useCallback(()=>{f?b():c(!0)},[b,f,p]),g="noteOptional";return e.createElement("div",{className:"gift-recipient"},e.createElement(q.E,{label:o.recipientEmail.value,onChange:y,error:s&&o.emailIsInvalid.value,value:f,isValueFixed:!0,autofocus:!0}),e.createElement("div",{className:"form-textarea"},e.createElement("label",{id:g},o.noteOptional.value),e.createElement("textarea",{"aria-labelledby":g,rows:6,onChange:A,value:p})),e.createElement(te.$n,{className:te.k9.SECONDARY,onClick:Y,isLoading:l},l?null:e.createElement("span",{className:"btn__label"},o.continue.value)))};var L=t(11456),N=t(70423),G=t(59530),ce=t(21678),de=t(41078),ue=t(63492),Le=t(16231),i=t(21975),w=t(49280),Se=t(60031),Ne=t(32248),we=t(90953),$e=t(80636),Ye=t(19125),I=t(59906),_=t(43482),F=t(99208),Te=t(90634),fe=t(31065),ne=t(13516),k=t(20194),ye=t(85401);const Ke={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"},Me=n=>{const{imageType:o}=e.useContext(ne.xK),{giftPageTitle:s}=(0,R.b0)(["giftPageTitle"]),{settings:{GIFT_BACKGROUND_IMAGE:c}}=(0,we.U)(),l=(0,ne.vy)(c,window.innerWidth*2,"AUTO",o);return e.createElement("div",{className:"gift-hero"},e.createElement("div",{className:"gift-hero__image",style:{backgroundImage:`url(${l})`}}),e.createElement("div",{className:"gift-hero__meta-container"},e.createElement("div",{className:"gift-hero__meta"},e.createElement("h1",{"aria-level":2},s.value),n.onClick?e.createElement(H.$,{label:n.ctaText,onClick:n.onClick}):null)))},Fe={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"},Re=n=>{const{giftHeroCta:o}=(0,R.b0)(["giftHeroCta"]),s=(0,a.W6)(),c=(0,a.zy)(),{defaultMenuParams:l,routes:r}=e.useContext(G.P),m=()=>{const v=(0,a.tW)(r[i.xW.LOGOUT]);s.push(v)},d=()=>(0,ye.OS)(l,r,s),u=()=>{var v;!!(0,fe.YW)(r[i.xW.GIFTS],c.pathname)?(v=n.scrollToGifts)==null||v.call(n,"smooth"):P()},P=()=>s.push(r[i.xW.GIFTS]);return e.createElement("div",{className:"gift-home"},e.createElement(_e,{handleLogoutClick:m,handleLogoClick:d}),e.createElement(Me,{onClick:u,ctaText:o.value}),n.children)},_e=({handleLogoutClick:n,handleLogoClick:o})=>{const{isGuest:s}=(0,e.useContext)(B.E),{imageType:c}=e.useContext(ne.xK),{logout:l,gifts:r}=(0,R.b0)(["logout","gifts"]),{settings:{LOGO_WEB:m}}=(0,we.U)(),{APPS:{WEB:d}}=window,u=d==null?void 0:d.languageBadgeStyle;return e.createElement("div",{className:(0,ne.AH)("gift-topbar",u&&"gift-topbar--with-language-toggle")},e.createElement("div",{className:"gift-topbar--logo",onClick:o},e.createElement("img",{alt:r.value,src:(0,ne.vy)(m,"AUTO",110,c)})),e.createElement("div",{className:"gift-topbar--actions"},s===!1&&n?e.createElement(te.$n,{className:(0,ne.AH)(te.k9.SECONDARY,"gift-topbar--login"),onClick:n,smallMode:!0},e.createElement("span",{className:"btn__label"},l.value)):null,u?e.createElement(k.J,{shouldReload:!0}):null))}
1,Ve={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"};var xe=Object.defineProperty,Ae=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,He=(n,o,s)=>o in n?xe(n,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[o]=s,ke=(n,o)=>{for(var s in o||(o={}))oe.call(o,s)&&He(n,s,o[s]);if(Ae)for(var s of Ae(o))he.call(o,s)&&He(n,s,o[s]);return n};const Ue=(n,o,s=!0,c=1)=>{var l,r,m;if(!n.itemPrice.amount)return null;const d=(n.itemPrice.amount*c/Math.pow(10,n.itemPrice.scale)).toFixed(n.itemPrice.scale),u=(0,Se.bT)(d,n.itemPrice.currency);if(!s)return{price:u};const P=o[(0,Z.IR)((r=(l=n.options)==null?void 0:l.period)==null?void 0:r.value,"/")],v=(m=n.options.period)!=null&&m.value?`${P?P.value:n.options.period.value}`:"";return{price:u,period:v}},re=n=>{const o=(0,R.b0)(["giftPickerTitle","giftPickerDescription","/day","/week","/month","/sixmonth","/year","freeTrialDuration","giftLicenceCta","selectCountryGift"]),{setSelectedGift:s,setGiftMessage:c,availableGifts:l,giftMessage:r,loading:m,error:d,setError:u,countries:P,country:v,setCountry:E}=(0,e.useContext)(B.E),{routes:p}=e.useContext(G.P),{APP_CONF:{PRIMARY_COLOR:f}}={APP_CONF:{ALGOLIA_APP_ID:"H99XLDR8MJ",ALGOLIA_APP_KEY:"e55ccb3db0399eabe2bfc37a0314c346",LANDING_BG:"",MAIN_TITLE:"",MAIN_INTRO:"",LOGO:"https://imggaming.s3.amazonaws.com/dice-web/assets/dce.sport/logo.png",PRIMARY_FONT_URL:"/assets/fonts/poppins-bold-webfont",SECONDARY_FONT_URL:"/assets/fonts/Roboto-Regular",TERTIARY_FONT_URL:"/assets/fonts/robotocondensed-bold-webfont",PRIMARY_COLOR:"#0076C0",SECONDARY_COLOR:"#FFFFFF",TERTIARY_COLOR:"#272727",BG_COLOR:"#000000",EPG_COLOR:"#000000",LOGO_SCALE:"1"}},{giftPurchaseInAnotherRegion:O}=(0,we.U)(),y=O===Ne.AvailabilityState.ENABLED,A=e.useRef(null),b=e.useRef(null),Y=T=>({action:()=>{s(T);const K=(0,a.tW)(p[i.xW.GIFT],{giftId:T.externalId});n.history.push(K)},title:o.giftLicenceCta.value}),g=(0,W.d4)(T=>T.services.app.previousLocation),S=(T="auto")=>{var K;(K=A==null?void 0:A.current)==null||K.scrollIntoView({behavior:T}),setTimeout(()=>{var M;(M=b==null?void 0:b.current)==null||M.focus()},500)};e.useEffect(()=>(c(ke({},r)),(0,fe.YW)(p[i.xW.GIFT],g)&&S(),()=>u(null)),[]);const D=()=>e.createElement($e.wP,{inputRef:b,countries:P,countryCode:v,onChange:E,label:o.selectCountryGift.value});return e.createElement(Re,{scrollToGifts:S},e.createElement("div",{ref:A,className:"gift-picker"},e.createElement(F.n,{title:o.giftPickerTitle.value,description:o.giftPickerDescription.value,extraComponent:y&&D()},m?e.createElement(ue.A,{color:f}):e.createElement(e.Fragment,null,d?e.createElement("p",{className:"gift-error"},d):null,e.createElement(_.M,null,l==null?void 0:l.map(T=>e.createElement(I.I,{title:T.name,key:T.externalId,button:Y(T),displayStyle:T.displayStyle,licencePriceDetails:Ue(T,o)},e.createElement(Ye.A,{source:T.description,customRenderers:(0,Te.w)()}))))))))},se={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"},We=({title:n,handleLogin:o,secondaryButton:s})=>{const c=e.useRef(null),{signIn:l,alternativeAuthenticationSeparator:r}=(0,R.b0)(["signIn","alternativeAuthenticationSeparator"]);return(0,e.useEffect)(()=>{c.current&&c.current.focus()},[]),e.createElement("div",{className:"gift-registration"},e.createElement("h2",{ref:c,role:"alert",tabIndex:0},n),e.createElement(H.$,{label:l.value,onClick:o}),e.createElement("div",{className:"sign-up__label"},e.createElement("div",{className:"sign-up__text"},r.value)),s)},Ut={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"};var ut=Object.defineProperty,Qe=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,qe=(n,o,s)=>o in n?ut(n,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[o]=s,gt=(n,o)=>{for(var s in o||(o={}))ft.call(o,s)&&qe(n,s,o[s]);if(Qe)for(var s of Qe(o))mt.call(o,s)&&qe(n,s,o[s]);return n},Et=(n=>(n.GIFT_DURATION="GIFT_DURATION",n.GIFT_MESSAGE="GIFT_MESSAGE",n.GIFT_LOGIN="GIFT_LOGIN",n))(Et||{});const pt=({match:n}
1)=>{var o,s;const c=(0,a.zy)(),l=(0,a.W6)(),{selectedGift:r,availableGifts:m,setSelectedGift:d,isGuest:u,giftMessage:{recipient:P,message:v,duration:E},setGiftMessage:p,error:f,setError:O}=(0,e.useContext)(B.E),y=e.useRef(null),{alreadyHaveAnAccount:A,continueAsGuest:b,back:Y}=(0,R.b0)(["alreadyHaveAnAccount","continueAsGuest","back"]),g=["GIFT_DURATION","GIFT_MESSAGE","GIFT_LOGIN"],S=r&&!((o=Object.keys(r.options||{}))!=null&&o.length),D=(s=r==null?void 0:r.options)==null?void 0:s.numberOfPeriods,T=Number(D==null?void 0:D.start)===Number(D==null?void 0:D.end),K=(0,W.d4)(x=>x.services.app.previousLocation);(S||T)&&g.shift();const[M,me]=e.useState(g[0]),be=(0,ce.Z)(M),{routes:h}=e.useContext(G.P),{APP_CONF:{PRIMARY_COLOR:ge}}={APP_CONF:{ALGOLIA_APP_ID:"H99XLDR8MJ",ALGOLIA_APP_KEY:"e55ccb3db0399eabe2bfc37a0314c346",LANDING_BG:"",MAIN_TITLE:"",MAIN_INTRO:"",LOGO:"https://imggaming.s3.amazonaws.com/dice-web/assets/dce.sport/logo.png",PRIMARY_FONT_URL:"/assets/fonts/poppins-bold-webfont",SECONDARY_FONT_URL:"/assets/fonts/Roboto-Regular",TERTIARY_FONT_URL:"/assets/fonts/robotocondensed-bold-webfont",PRIMARY_COLOR:"#0076C0",SECONDARY_COLOR:"#FFFFFF",TERTIARY_COLOR:"#272727",BG_COLOR:"#000000",EPG_COLOR:"#000000",LOGO_SCALE:"1"}},z=(0,de.l)();e.useEffect(()=>{const x=localStorage.getItem(w.Gx);u&&x==="GIFT_LOGIN"&&E&&P&&me("GIFT_LOGIN")},[u]),e.useEffect(()=>{localStorage.setItem(w.Gx,M)},[M]),e.useEffect(()=>{const x=y==null?void 0:y.current,ve=K===h[i.xW.LOGOUT];if(!x||ve||!r||f)return;const{bottom:Ge,top:De}=x.getBoundingClientRect();if(Ge>window.innerHeight||De<0){const Xe=be?"smooth":"auto",Ze=z>=Le.R8?"center":"start";x.scrollIntoView({behavior:Xe,block:Ze})}},[r,f]),e.useEffect(()=>{(S||T)&&M==="GIFT_DURATION"&&(p({duration:1}),me("GIFT_MESSAGE"))},[r]);const ae=()=>{const{price:x,period:ve}=Ue(r,null,!1,E),{price:Ge,period:De}=Ue(r,null,!1),Be=`${x}${ve||""}`;return{licenceName:r.name,licenceValue:`${Ge}${De||""}`,licenceDescription:r.description,purchaseSubtotal:Be,purchaseTotal:Be,isGifting:!0,currency:r==null?void 0:r.itemPrice.currency,hideBackBtn:!0}},le=()=>{if(O(null),M===g[0])l.push(h[i.xW.GIFTS]);else{const x=g.indexOf(M);me(g[x-1])}};e.useEffect(()=>{if(p({duration:1,message:v,recipient:P}),!r&&m){const x=n.params.giftId,ve=m.find(Ge=>Ge.externalId===x);ve?d(ve):le()}},[r,m]);const Ee=()=>{if(u)me("GIFT_LOGIN");else{const x=(0,a.tW)(h[i.xW.GIFT_PAY],{giftId:r.externalId});return l.push(x)}},Q=()=>e.createElement(H.$,{label:b.value,onClick:Pe,className:"secondary-button"}),pe=(x,ve)=>{const Ge=(0,a.tW)(h[x],{giftId:r.externalId}),De=new URLSearchParams(c.search),Be=new URLSearchParams(ve);return ve&&Be.forEach((Xe,Ze)=>De.set(Ze,Xe)),l.push({pathname:Ge,search:De.toString()})},Ce=()=>{const x=(0,a.tW)(h[i.xW.GIFT_LOGIN_REDIRECT],{giftId:(r==null?void 0:r.externalId)||n.params.giftId});pe(i.xW.GIFT_LOGIN,{entryPage:x})},Pe=()=>pe(i.xW.GIFT_PAY),Je=()=>{switch(M){case"GIFT_DURATION":return e.createElement(Oe,{goToMessage:()=>me("GIFT_MESSAGE")});case"GIFT_MESSAGE":return e.createElement(J,{goToLoginOrPay:Ee});case"GIFT_LOGIN":return e.createElement(We,{title:A.value,handleLogin:Ce,secondaryButton:Q()})}};return e.createElement(Re,null,e.createElement("div",{className:"gift-config",ref:y},r?e.createElement("div",{className:"gift-config__data"},e.createElement("button",{"aria-label":Y.value,onClick:le,className:"gift-config__topbar"},e.createElement(L.A,{height:15,width:15})),e.createElement("div",{className:"gift-config__content"},Je(),M!=="GIFT_LOGIN"&&e.createElement(N.$,gt({},ae()))),f&&e.createElement("p",{className:"gift-config__error"},f)):f?e.createElement("p",{className:"gift-error"},f):e.createElement(ue.A,{color:ge})))},vt=(0,a.y)(pt);var Ot=t(84045),Pt=Object.defineProperty,It=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,tt=(n,o,s)=>o in n?Pt(n,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[o]=s,Ct=(n,o)=>{for(var s in o||(o={}))At.call(o,s)&&tt(n,s,o[s]);if(et)for(var s of et(o))ht.call(o,s)&&tt(n,s,o[s]);return n},Gt=(n,o)=>It(n,Rt(o));const nt="redeemCode",ze="shouldRedeemGift";var St=(n=>(n.USER_ALREADY_ENTITLED="USER_ALREADY_ENTITLED",n.REDEEM_CODE_ALREADY_USED="REDEEM_CODE_ALREADY_USED",n.PRODUCT_NOT_AVAILABLE="PRODUCT_NOT_AVAILABLE",n))(St||{});const je=n=>n==="USER_ALREADY_ENTITLED"?"conflictingGift":n==="REDEEM_CODE_ALREADY_USED"?"giftRedeemCodeAlreadyUsed":n==="PRODUCT_NOT_AVAILABLE"?"giftNotAvailable":"errorOccurredPleaseTryAgain",Tt=({location:n})=>{var o,s;const{setGiftToRedeem:c,giftToRedeem:l,isGuest:r}=(0,e.useContext)(B.E),[m,d]=e.useState(null),u=(0,R.b0)(["giftDuration","giftRedeem","haveAnAccount","signUp","youGotAGift","noteFromSender","giftRedeemCodeAlreadyUsed","errorOccurredPleaseTryAgain","giftRedemptionSuccessful","conflictingGift","giftNotAvailable"],{giftRedemptionSuccessful:{licenceName:(o=l==null?void 0:l.summary)==null?void 0:o.name}}),[P,v]=e.useState(!1),[E,p]=e.useState(null),f=(0,V.qs)(),O=(0,a.W6)(),{routes:y}=(0,e.useContext)(G.P),A=(s=n==null?void 0:n.state)==null?void 0:s.errorOnRedeeming;e.useEffect(()=>{A&&(p(A),O.replace(Gt(Ct({},O.location),{state:{}})))},[A]),e.useEffect(()=>{const h=new URLSearchParams(n.search).get(nt)||"";
1h||O.push(y[i.xW.GIFTS]),d(h)},[]),e.useEffect(()=>(window.sessionStorage.getItem(ze)&&Y(),()=>b()),[]);const b=()=>window.sessionStorage.removeItem(ze),Y=async()=>{const h=m||new URLSearchParams(window.location.search).get(nt);try{await(0,C.tV)(f,h),v(!0)}catch(ge){const z=je(ge.code);p(z)}b()};e.useEffect(()=>{m&&g()},[m]);const g=async()=>{try{const h=await(0,C.fI)(f,m);c(h)}catch(h){O.push(y[i.xW.GIFTS])}},S=()=>{const h=(0,a.tW)(y[i.xW.GIFT_REDEMPTION_LOGIN],{redeemCode:m});O.push(h)},D=()=>O.push(y[i.xW.GIFTS]),T=()=>{const h=(0,a.tW)(y[i.xW.GIFT_REDEMPTION_REGISTER],{redeemCode:m});O.push(h)},K=()=>({action:async()=>{if(r)v(!0);else try{p(null),await(0,C.tV)(f,m),v(!0)}catch({code:h,messages:ge}){const z=je(h);p(u[z].value)}},title:u.giftRedeem.value}),M=()=>{var h,ge,z,ae,le,Ee,Q,pe;if(((ge=(h=l.options)==null?void 0:h.numberOfPeriods)==null?void 0:ge.type)!=="INT_RANGE")return null;const Ce=(0,Z.IR)((ae=(z=l.options)==null?void 0:z.period)==null?void 0:ae.value)+(((Ee=(le=l.options)==null?void 0:le.numberOfPeriods)==null?void 0:Ee.value)>1?"s":"");return e.createElement(e.Fragment,null,e.createElement("p",null,u.giftDuration.value),e.createElement("p",null,`${(pe=(Q=l.options)==null?void 0:Q.numberOfPeriods)==null?void 0:pe.value} ${Ce}`))},me=()=>e.createElement(H.$,{label:u.signUp.value,onClick:T,className:"secondary-button"}),be=()=>v(!1);return e.createElement("div",{className:"gift-redemption"},e.createElement(_e,{handleLogoClick:D}),l?e.createElement("div",{className:"gift-config"},e.createElement("div",{className:"gift-config__data"},P&&r?e.createElement(e.Fragment,null,e.createElement("div",{className:"gift-config__topbar"},e.createElement(L.A,{height:15,width:15,onClick:be})),e.createElement(We,{title:u.haveAnAccount.value,handleLogin:S,secondaryButton:me()})):e.createElement(e.Fragment,null,e.createElement("h2",{className:"gift-config__title"},u.youGotAGift.value),e.createElement("div",{className:(0,ne.AH)("gift-config__redeem",!l.note&&"gift-config__redeem--no-note")},l.note&&e.createElement("div",{className:"gift-note"},e.createElement("h2",null,u.noteFromSender.value),e.createElement("p",{className:"note-from-sender"},l.note)),e.createElement(I.I,{title:l.summary.name,key:l.summary.externalId,button:K(),getGiftDuration:M},e.createElement(Ye.A,{source:l.summary.description,customRenderers:(0,Te.w)()}))),E?e.createElement("p",{className:"gift-config__error"},E):null)),P&&!r&&!E?e.createElement(Ot.L,{isGifting:!0,label:u.giftRedemptionSuccessful.value}):null):null)};var _t=t(84454),ot=t(81056),bt=t(97407),st=t(51314);const Bt={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"},Dt=({location:n,match:o})=>{const{setIsGuest:s,setUserId:c,selectedGift:l,giftMessage:r,country:m}=e.useContext(B.E),{routes:d}=(0,e.useContext)(G.P),{activeLocale:u}=e.useContext(j.LabelsContext),P=(0,ot.ru)(u),v=(0,V.qs)(),E=(0,a.W6)(),p=o.params.giftId,f=o.params.redeemCode,{APPS:{WEB:O}}=window,y=async g=>{s(!1),g&&c(g);const S=f||new URLSearchParams(window.location.search).get("redeemCode");if(p&&r.recipient){await(0,C.J9)((l==null?void 0:l.externalId)||p,r,m,v);const D=(0,a.tW)(d[i.xW.GIFT_PAY],{giftId:p});return E.push(D)}else if(p&&!r.recipient){const D=(0,a.tW)(d[i.xW.GIFT],{giftId:p});E.push(D)}else if(S){window.sessionStorage.setItem(ze,"true");const D=`${d[i.xW.GIFT_REDEMPTION]}?redeemCode=${S}`;return E.push(D)}else return E.push(d[i.xW.GIFTS])},A=()=>{const g={giftId:(l==null?void 0:l.externalId)||p,recipient:r.recipient,duration:r.duration,message:r.message,country:m,redeemCode:f};return localStorage.setItem(w.G0,JSON.stringify(g)),(0,a.tW)(d[i.xW.GIFT_LOGIN_REDIRECT],{giftId:(l==null?void 0:l.externalId)||p})},b=()=>{let g;return f?g=(0,a.tW)(d[i.xW.GIFT_REDEMPTION_REGISTER],{redeemCode:f}):g=(0,a.tW)(d[i.xW.GIFT_PAY],{giftId:p}),E.push(g,{willSignUpForGifting:!0})},Y=()=>e.createElement(bt.default,{onSigninComplete:y,handleSignup:b,from:A()});return e.createElement("div",{className:"gift-login fullscreen-login-wrapper fullscreen-authentication"},O!=null&&O.languageBadgeStyle?e.createElement(k.J,{shouldReload:!0}):null,e.createElement(_t.y,{isRtL:P},e.createElement(a.dO,null,e.createElement(a.qh,{path:d[i.xW.GIFT_LOGIN_REDIRECT],component:Lt}
1),e.createElement(a.qh,{path:d[i.xW.GIFT_LOGIN],render:Y}),e.createElement(a.qh,{path:d[i.xW.GIFT_REDEMPTION_LOGIN],render:Y}))))},Lt=()=>{const n=(0,V.qs)(),{routes:o}=(0,e.useContext)(G.P),s=(0,a.W6)(),c=localStorage.getItem(w.G0),{giftId:l,recipient:r,duration:m,message:d,country:u,redeemCode:P}=(0,st.q)(c,{}),v=async()=>{if(l&&r){await(0,C.J9)(l,{duration:parseInt(m,10),message:d,recipient:r},u,n);const E=(0,a.tW)(o[i.xW.GIFT_PAY],{giftId:l});return s.push(E)}else if(l&&!r){const E=(0,a.tW)(o[i.xW.GIFT],{giftId:l});s.push(E)}else if(P){const E=`${o[i.xW.GIFT_REDEMPTION]}?redeemCode=${P}`;return s.push(E)}else return s.push(o[i.xW.GIFTS])};return e.useEffect(()=>(v(),()=>localStorage.removeItem(w.G0)),[]),e.createElement(ue.A,null)},at=(0,a.y)(Dt);var Nt=t(58146);const wt={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"},yt=({location:n,match:o})=>{const s=(0,V.qs)(),c=(0,a.W6)(),[l,r]=e.useState(!1),[m,d]=e.useState(!1),[u,P]=e.useState(null),[v,E]=e.useState(null),{isGuest:p,selectedGift:f,setIsGuest:O,setUserId:y,giftMessage:{recipient:A},error:b,setError:Y}=(0,e.useContext)(B.E),{routes:g}=e.useContext(G.P),S=(0,R.b0)(["conflictingGift","giftRedeemCodeAlreadyUsed","errorOccurredPleaseTryAgain","giftNotAvailable"]),{APP_CONF:{PRIMARY_COLOR:D}}={APP_CONF:{ALGOLIA_APP_ID:"H99XLDR8MJ",ALGOLIA_APP_KEY:"e55ccb3db0399eabe2bfc37a0314c346",LANDING_BG:"",MAIN_TITLE:"",MAIN_INTRO:"",LOGO:"https://imggaming.s3.amazonaws.com/dice-web/assets/dce.sport/logo.png",PRIMARY_FONT_URL:"/assets/fonts/poppins-bold-webfont",SECONDARY_FONT_URL:"/assets/fonts/Roboto-Regular",TERTIARY_FONT_URL:"/assets/fonts/robotocondensed-bold-webfont",PRIMARY_COLOR:"#0076C0",SECONDARY_COLOR:"#FFFFFF",TERTIARY_COLOR:"#272727",BG_COLOR:"#000000",EPG_COLOR:"#000000",LOGO_SCALE:"1"}},{APPS:{WEB:T}}=window,K=o.params.giftId,M=o.params.redeemCode,me=window.PAYMENT_PROVIDERS&&v&&u,be=JSON.parse(localStorage.getItem(w.Nf));e.useEffect(()=>(p||h(),()=>{p||localStorage.removeItem(w.Nf)}),[]),e.useEffect(()=>{M?d(!0):ge()},[M]);const h=async z=>{if(O(!1),z&&y(z),!K&&!M)c.push(g[i.xW.GIFTS]);else if(K&&!A&&!(be!=null&&be.recipient)){const ae=(0,a.tW)(g[i.xW.GIFT],{giftId:K});c.push(ae)}else if(M)try{await(0,C.tV)(s,M)}catch({code:ae}){const le=`${g[i.xW.GIFT_REDEMPTION]}?redeemCode=${M}`,Ee=je(ae);return c.push(le,{errorOnRedeeming:S[Ee].value})}},ge=async()=>{var z,ae,le;const Ee=(z=n==null?void 0:n.state)==null?void 0:z.willSignUpForGifting;d(!1),r(!0);const Q=await(0,C.Bm)(s);if((Q==null?void 0:Q.availablePaymentProviders.length)===0){r(!1),Y(S.errorOccurredPleaseTryAgain.value);const Pe=(0,a.tW)(g[i.xW.GIFTS]);return c.push(Pe)}const pe=(0,C.l2)(Q);let Ce;if(!((ae=Q==null?void 0:Q.basketItems)!=null&&ae.length)&&!Ee){const Pe=K?(0,a.tW)(g[i.xW.GIFT],{giftId:K}):g[i.xW.GIFTS];c.push(Pe)}else{if((!K||!A)&&Ee)return r(!1),d(!0);if(f)Ce=(0,C.Hk)(f);else{const Pe=(le=Q==null?void 0:Q.basketItems)==null?void 0:le.find(Je=>K===Je.externalId);if(!Pe)return c.push(g[i.xW.GIFTS]);Ce=(0,C.YI)(Pe)}}E(Ce),window.PAYMENT_PROVIDERS=pe==null?void 0:pe.paymentProvidersList,P(pe),r(!1)};return e.createElement("div",{className:"gift-pay"},T!=null&&T.languageBadgeStyle?e.createElement(k.J,{shouldReload:!0}):null,l?e.createElement(ue.A,{color:D}):null,me||m?e.createElement(Nt.SignupWrapper,{didError:!!b,externalLicence:v,giftBasket:u,specificHttp:s,signUpComplete:h,giftId:K,redeemCode:M}):null)},rt=(0,a.y)(yt);var Mt=t(21738),Ft=t(16505),lt=t(2275);const it=n=>{const[o,s]=e.useState(null),[c,l]=e.useState(null),[r,m]=e.useState(null),[d,u]=e.useState(!1),[P,v]=e.useState(n.isGuest),[E,p]=e.useState(n.userId),[f,O]=e.useState({}),[y,A]=e.useState(null),[b,Y]=e.useState([]),[g,S]=e.useState(null),D=JSON.parse(localStorage.getItem(w.Nf));return e.useEffect(()=>{(0,lt.Im)(D)||O(D)},[]),e.useEffect(()=>{f&&localStorage.setItem(w.Nf,JSON.stringify(f))},[f]),e.createElement(B.E.Provider,{value:{setSelectedGift:s,selectedGift:o,availableGifts:c,setAvailableGifts:l,error:r,setError:m,loading:d,setLoading:u,isGuest:P,setIsGuest:v,userId:E,setUserId:p,giftMessage:f,setGiftMe
1ssage:O,country:y,setCountry:A,giftToRedeem:g,setGiftToRedeem:S,countries:b,setCountries:Y}},n.children)},ct=()=>{const{isGuest:n,id:o}=(0,W.d4)(s=>s.services.session.user);return e.createElement(V._y.Provider,{value:{http:Ft.LV}},e.createElement(ie.SettingsContext.Provider,{value:window.RAW_REALM_SETTINGS},e.createElement(it,{isGuest:n,userId:o},e.createElement(dt,null))))},xt=ct,dt=()=>{const n=(0,V.qs)(),{activeLocale:o}=e.useContext(j.LabelsContext),s=(0,ot.ru)(o),{routes:c}=e.useContext(G.P),l=(0,R.b0)([$.Rb]),{setAvailableGifts:r,setError:m,setLoading:d,country:u,setCountry:P,setCountries:v,giftToRedeem:E,setGiftToRedeem:p}=e.useContext(B.E),{countries:f,defaultCountry:O}=(0,Mt.o)();e.useEffect(()=>{const A=(0,st.q)(localStorage.getItem(w.eZ),null);!E&&A&&p(A)},[]),e.useEffect(()=>{E&&localStorage.setItem(w.eZ,JSON.stringify(E))},[E]),e.useEffect(()=>()=>localStorage.removeItem(w.Gx),[]),e.useEffect(()=>{f&&v(f)},[f]),e.useEffect(()=>{O&&P(O)},[O]),e.useEffect(()=>{u&&y(u)},[u]);const y=async A=>{try{m(null),d(!0);const{parsedData:b}=await(0,C.fP)(n,A);r(b),d(!1)}catch(b){m(l[$.Rb].value),d(!1)}};return e.createElement("div",{className:(0,lt.AH)("app-container",s?"app-container--right-left":"")},e.createElement(a.dO,null,e.createElement(a.qh,{path:c[i.xW.GIFT_REDEMPTION_REGISTER],component:rt}),e.createElement(a.qh,{path:c[i.xW.GIFT_REDEMPTION_LOGIN],component:at}),e.createElement(a.qh,{path:c[i.xW.GIFT_REDEMPTION],component:Tt}),e.createElement(a.qh,{path:c[i.xW.GIFT_LOGIN],component:at}),e.createElement(a.qh,{path:c[i.xW.GIFT_PAY],component:rt}),e.createElement(a.qh,{path:c[i.xW.GIFT],component:vt}),e.createElement(a.qh,{path:c[i.xW.GIFTS],component:re}),e.createElement(a.rd,{to:c[i.xW.GIFTS]})))}}),63792:((X,U,t)=>{t.d(U,{Lv:()=>a,jC:()=>W});var e={ERROR_IOS_RESTORE_FAILED:"restore_failed",ERROR_IOS_USER_CANCELED:"user_cancelled",ERROR_RESTORE_EMPTY:"restore_empty"};const W="freePrice";var a;(function(j){j.IOS="FREETRIAL",j.ANDROID="Free"})(a||(a={}))})}]);})();
2
3//# sourceMappingURL=74644.e9cc654cf0864301f242.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.