1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89240],{35913:function(e,t,n){n.d(t,{Md:function(){return U},BN:function(){return O},Ld:function(){return A},j:function(){return E},Qt:function(){return w},GF:function(){return N},bj:function(){return C},OC:function(){return R},cF:function(){return I},wl:function(){return B},Nn:function(){return L},Mp:function(){return x},kZ:function(){return k},p2:function(){return P},NI:function(){return H},uv:function(){return Z},u7:function(){return z},qi:function(){return Q},to:function(){return W},BW:function(){return b},zN:function(){return h},K1:function(){return q},Cx:function(){return M},mr:function(){return D},bD:function(){return F},Qc:function(){return j}});var r=n(72e3),o=n(4867),a=n(44002),s=n.n(a);let u=n(81867).experiments||{},i=e=>{let t=(u[e]||{}).variants;if(s()(t))return null;let n=0,r=null,o=Math.random();return Object.keys(t).forEach(e=>{n<=o&&n+t[e]>o&&(r=e),n+=t[e]}),r},c=()=>{let e=Date.now();return Object.keys(u).filter(t=>u[t].startTimestamp<=e&&u[t].endTimestamp>=e)},l=e=>{if(!c().includes(e))return null;let t=(0,o.CB)()[e];if(void 0!==t)return t;{let t=i(e);return(0,o.TW)(e,t),t}},_=()=>({experimentVariants:c().map(e=>"".concat(e,"::").concat(l(e)))}),p="newsletter_subscribed",d="gm_podcast",g="course",y="sponsor",{ga4MeasurementID:f}=n(81867),m=()=>({environment:"production"}),v=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]},S=!1,T=()=>(S||(v("init"),f&&r.ZP.initialize(f,{gtagOptions:{send_page_view:!1}}),S=!0),!0),E=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"string"==typeof e&&(null==t?void 0:t.event_category)&&(n=!0);let o=e.join?e.join(" "):e,a=_(),s={...m(),...a,...t};if(!T()||(v("track",{eventKey:o,...s}),!f||["Pageview"].includes(o)))return;if(n){r.ZP.event(e,s);return}let u=Array.isArray(e)&&e.length>1,i=u?e[0]:e,c=u?e.slice(1).join(" "):"Not Set",l=JSON.stringify(t,Object.keys(s).sort()).slice(1,-1);r.ZP.event({category:i,action:c,label:l,nonInteraction:!0})},U=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]&&arguments[4],E("Pageview",{...n,category:e,name:t})},A=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3],E(["Subscribe Button","Clicked"],{...t,unitName:e})},h=e=>{E([p,"subscribed"],e)},b=e=>{E([p,"Impression"],e)},w=e=>{E(["adunit_app","clicked"],e)},D=e=>{E(["adunit_social","clicked"],e)},P=()=>{E([d,"Impression"])},k=e=>{E([d,"clicked"],e)},I=e=>E("course_start",{course_id:e,event_category:g}),R=e=>E("course_quiz_start",{course_id:e,event_category:g}),C=e=>E("course_quiz_complete",{course_id:e,event_category:g}),N=e=>E("course_claim_click",{course_id:e,event_category:g}),O=e=>{E(["Social","Shared"],e)},j=e=>E("sponsor_impression",{sponsor_slug:e,event_category:y}),F=(e,t,n)=>E("sponsor_click",{sponsor_slug:e,unit_name:t,url:n,event_category:y}),L=(e,t)=>E("event_calendar_impression",{url:e,name:t,event_category:"event_calendar"}),B=(e,t)=>E("event_calendar_click",{url:e,name:t,event_category:"event_calendar"}),x=(e,t)=>E("event_calendar_link_click",{url:e,name:t,event_category:"event_calendar"}),G="sitroom",M=e=>{let{room:t,element:n,horizon:r,headline:o,direction:a,chancePercent:s}=e;return E("sitroom_projection_expand",{room:t,element:n,horizon:r,headline:o,direction:a,chance_percent:s,event_category:G})},q=e=>{let{room:t,element:n,surface:r,marketSlug:o,eventSlug:a,outcomeId:s,outcomeTitle:u,horizon:i,question:c,chancePercent:l,href:_}=e;return E("sitroom_market_open",{room:t,element:n,surface:r,market_slug:o,event_slug:a,outcome_id:s,outcome_title:u,horizon:i,question:c,chance_percent:l,href:_,event_category:G})},z=e=>{let{room:t,element:n,surface:r,inputSymbol:o,outputSymbol:a,amount:s}=e;return E("sitroom_swap_open",{room:t,element:n,surface:r,input_symbol:o,output_symbol:a,amount:s,event_category:G})},Z=e=>
1{let{room:t,element:n,surface:r,inputSymbol:o,outputSymbol:a}=e;return E("sitroom_swap_impression",{room:t,element:n,surface:r,input_symbol:o,output_symbol:a,event_category:G})},Q=e=>{let{room:t,element:n,surface:r,inputSymbol:o,outputSymbol:a,amount:s,screen:u}=e;return E("sitroom_swap_step",{room:t,element:n,surface:r,input_symbol:o,output_symbol:a,amount:s,screen:u,event_category:G})},W=e=>{let{room:t,element:n,surface:r,inputSymbol:o,outputSymbol:a,amount:s,txid:u}=e;return E("sitroom_swap_success",{room:t,element:n,surface:r,input_symbol:o,output_symbol:a,amount:s,txid:u,event_category:G})},H=e=>{let{room:t,element:n,surface:r,inputSymbol:o,outputSymbol:a,amount:s,reason:u,rejected:i}=e;return E("sitroom_swap_error",{room:t,element:n,surface:r,input_symbol:o,output_symbol:a,amount:s,reason:u,rejected:i,event_category:G})}},89240:function(e,t,n){n.d(t,{PZ:function(){return v},V_:function(){return m},gI:function(){return U},q5:function(){return y}});var r=n(44002),o=n.n(r),a=n(47163),s=n.n(a),u=n(81867),i=n(12043),c=n.n(i),l=n(20814),_=n(44194),p=n(37075),d=n(4867),g=n(35913);let y=[{id:u.newsletters.groupIds.dailyTop5,frequency:"daily"}],f={[u.newsletters.groupIds.dailyTop5]:!0,[u.newsletters.groupIds.gaming]:!0,[u.newsletters.groupIds.ai]:!0},m={UPDATE_STATUS:"UPDATE_STATUS",UPDATE_FIELDS:"UPDATE_FIELDS",UPDATE_GROUPS:"UPDATE_GROUPS"},v={INITIAL:"initial",READY:"ready",ERROR:"error",SUBMIT:"submit",SUCCESS:"success"},S=e=>({status:v.INITIAL,message:"",isSubscribed:!1,data:e,isConfirmed:!1}),T=(e,t)=>{switch(t.type){case m.UPDATE_STATUS:return{...e,...t.payload};case m.UPDATE_FIELDS:return{...e,data:{...e.data,...t.payload}};case m.UPDATE_GROUPS:return{...e,data:{...e.data,groups:{...e.data.groups,...t.payload}}};default:throw Error("Unknown action type.")}},E=async e=>{let{unitName:t="default",groups:n=f,...r}=e,o=new URLSearchParams({...r,groups:JSON.stringify(n)}),a=await c()("".concat(u.decryptApiHostname,"/newsletter/register?").concat(o.toString()));if(!a.ok)throw Error(a.statusText);let s=await a.json();if("error"===s.status)throw Error(s.message);return(0,g.zN)(t),(0,d.QP)({signedUp:!0}),s},U=function(e){let{withImmediateImpression:t=!0,initialSelections:n=f,newsletterGroups:r=y,fetchNewsletterData:a=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fetchNewsletterData:!0},{t:i}=(0,l.$G)(),[U]=(0,p.v3)(),A=s()(U,"context.userData.email",null),[h,b]=(0,_.useReducer)(T,{email:A,groups:n},S);(0,_.useEffect)(()=>{b({type:m.UPDATE_STATUS,payload:{isSubscribed:(0,d.RE)().signedUp,status:v.READY}}),b({type:m.UPDATE_FIELDS,payload:{email:A}}),A&&a&&c()("".concat(u.decryptApiHostname,"/newsletter/members/").concat(A)).then(e=>{if(!e.ok)throw Error(e.statusText);return e.json()}).then(e=>{if(!Array.isArray(e))throw Error("Unable to load newsletter settings. Please try again later.");let t={};r.forEach(n=>{let{id:r}=n;t[r]=!o()(e.filter(e=>e==r))}),b({type:m.UPDATE_FIELDS,payload:{groups:t}}),b({type:m.UPDATE_STATUS,payload:{isSubscribed:!0}})}).catch(e=>{b({type:m.UPDATE_STATUS,payload:{status:v.ERROR,message:e.message}})})},[A]);let w=async t=>{if(t.preventDefault(),h.status!==v.SUBMIT){b({type:m.UPDATE_STATUS,payload:{status:v.SUBMIT,message:""}});try{let t=await E({...h.data,groups:h.data.groups,unitName:e});b({type:m.UPDATE_STATUS,payload:{status:v.SUCCESS,message:i(t.message||"components.newsletterForm.alert.successful"),isConfirmed:"active"===t.status}})}catch(e){b({type:m.UPDATE_STATUS,payload:{status:v.ERROR,message:e.message}})}}},D=(0,_.useCallback)(()=>{(0,g.BW)(e)},[e]);return(0,_.useEffect)(()=>{t&&D()},[]),{formState:h,dispatchFormState:b,onFieldChange:e=>{b({type:m.UPDATE_FIELDS,payload:{[e.target.getAttribute("name")]:e.target.value}})},onGroupChange:e=>{b({type:m.UPDATE_GROUPS,payload:{[e.target.value]:e.target.checked}})},onSubmit:w,onImpression:D}}},47163:function(e){e.exports=(e,t,n)=>{let r=n=>String.prototype.split.call(t,n).filter(Boolean).reduce((e,t)=>null!=e?e[t]:e,e),o=r(/[,[\]]+?/)||r(/[,[\].]+?/);return void 0===o||o===e?n:o}}}]);
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.