PageSourceSearch

https://www.rugby.com.au/_next/static/chunks/6672.aaf36372c309cff0.js

js rugby.com.au collected 2026-09-24 09:37:41 UTC 5,262 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6672],{96672:function(e,t,n){n.r(t),n.d(t,{MediaSubscriptionsForm:function(){return h}});var i=n(2784),l=n(5752),a=n(1804),o=n(17473),r=n(32021),s=n(97151),d=n(34365),m=n(3029),c=n(75604),u=n(44591),g=n(67502),f=n(24404),p=n(87727),v=n(3557);let h=(0,i.forwardRef)((e,t)=>{var n,h,y,b,x,S,T;let{appearance:Z="hero"}=e,[_,C]=(0,i.useState)({Receive_HTML_Emails__c:!0,Receive_SMS__c:!0,Receive_Text_Emails__c:!0}),[k,F]=(0,i.useState)({}),A=(0,i.useRef)(null),[z,E]=(0,i.useState)({}),[I,N]=(0,i.useState)(!1),{colors:R,spacing:M,headings:D,mq:O,typography:W}=(0,c.useTheme)(),{siteMeta:{siteTag:j}}=(0,m.ND)(),{executeRecaptcha:w}=(0,o.xX)(),[B,{data:H,loading:L}]=(0,a.D)(p.WW),G=null==H?void 0:null===(n=H.submitForm)||void 0===n?void 0:n.success;G&&setTimeout(()=>{(0,u.tx)(A)},500);let verifyAllInputFields=()=>{let e=f.g.map(e=>{let{isVerified:t,message:{messageText:n,messageId:i,messageGeneric:l}}=(0,p.JW)(e,_[e.name],_,j);return F(i=>({...i,[e.name]:{isError:!t,message:n}})),t||E(e=>({...e,[i]:l})),t});return!(e.indexOf(!1)>-1)},handleOnSubmit=async e=>{if(null==e||e.preventDefault(),E({}),N(!0),verifyAllInputFields()&&!G){if(!w){E({recaptcha:"Recaptcha Failed"}),console.error("Recaptcha Failed"),N(!1);return}let e=_.Mailing_Country__c;_.Mailing_Country__c=e.country,_.State__c=e.state;let t=await w("formSubmit");(0,m.h4)("Button","Submit","Forms","Subscription",""),B({variables:{formData:JSON.stringify({..._,recaptcha:t}),type:"media-subscription",siteSlug:j}})}else N(!1)},J=(0,i.useMemo)(()=>f.g.filter(e=>(0,v.S)(e,_,j)),[_,j]);return(0,l.tZ)(i.Fragment,null,G?(0,l.tZ)(s.Container,null,(0,l.tZ)("div",{css:{maxWidth:"100%",[O.md]:{marginTop:"-".concat(M["9xl"])},marginTop:"-".concat(M["9xl"]),marginLeft:"auto",marginRight:"auto",textAlign:"center",color:R.neutralDark},ref:A},(0,l.tZ)("h3",{css:{marginBottom:M["3xl"],[O.md]:{paddingTop:M["9xl"],fontSize:W.fontSize["4xl"]},paddingTop:M["9xl"],fontSize:W.fontSize["2xl"],fontFamily:D[3].fontFamily,fontWeight:D[3].fontWeight,color:D[3].color}},"Thank you for subscribing!")),(0,l.tZ)("div",{css:{marginBottom:M.xl,textAlign:"center"}},(0,l.tZ)(d.g,{href:"/"},(0,l.tZ)(r.ButtonThemed,{appearance:Z},(0,l.tZ)("span",null,"Home"))))):(0,l.tZ)("div",{css:{maxWidth:"100%",marginLeft:"auto",marginRight:"auto",a:{textDecoration:"underline",cursor:"pointer"}}},(0,l.tZ)("div",{css:{display:"grid",gridTemplateColumns:"1fr ",[O.md]:{gridTemplateColumns:"1fr 1fr"},gridGap:"1em",'[data-comp="checkbox-label"]':{justifyContent:"flex-start",alignContent:"center",alignItems:"center"}}},J.map((e,t)=>{var n,i,a,o;return(0,l.tZ)("div",{key:"".concat(null!==(a=null==e?void 0:e.id)&&void 0!==a?a:"","-").concat(t)},(0,p.tm)({type:e.type,fieldData:e,isError:null!=k&&null!==(n=k[e.name])&&void 0!==n&&!!n.isError,error:null!==(o=null==k?void 0:null===(i=k[e.name])||void 0===i?void 0:i.message)&&void 0!==o?o:"",value:_[e.name],onChange:t=>{C(n=>({...n,[e.name]:t}))},labelStyles:{fontFamily:W.fontFamily.sans,alignItems:"flex-end",fontSize:W.fontSize.md,[O.md]:{fontSize:W.fontSize.lg}},inputValues:_,siteTag:j}))})),(0,l.tZ)("div",{css:{margin:"".concat(M["2xl"]," 0")}},(0,l.tZ)("div",{css:{display:"grid",gridTemplateColumns:"1fr ",[O.md]:{gridTemplateColumns:"1fr"},gridGap:"1em",alignItems:"flex-start",'[data-comp="checkbox-label"]':{justifyContent:"flex-start",alignContent:"center",alignItems:"center"}}},(0,l.tZ)(g.j,{label:"I agree to the <a href='https://australia.rugby/terms-and-conditions' target='_blank'>terms and conditions</a>.",name:"TermsAndConditions",id:"TermsAndConditions",disabled:!1,isError:null!=k&&null!==(h=k.TermsAndConditions)&&void 0!==h&&!!h.isError,error:null!==(S=null==k?void 0:null===(y=k.TermsAndConditions)||void 0===y?void 0:y.message)&&void 0!==S?S:"",value:_.TermsAndConditions,placeholder:"",status:_.TermsAndConditions,onChange:e=>{C(t=>({...t,TermsAndConditions:e.target.checked}))},type:"checkbox",labelStyles:{fontFamily:W.fontFamily.sans,alignItems:"flex-end",fontSize:W.fontSize.md,[O.md]:{fontSize:W.fontSize.lg}}}))),z&&Object.keys(z).length>0&&"{}"!==JSON.stringify(z)?(0,l.tZ)("div",{className:"py-5 text-red text-md"},(0,l.tZ)("div",{className:"pb-2"},(0,l.tZ)("strong",null,"The form you submitted contained the following errors")),(0,l.tZ)("ul",null,Object.keys(z).map(e=>z[e]&&""!==z[e]?(0,l.tZ)("li",{key:e,className:"pb-1"},z[e]):null))):null,!G&&(null==H?void 0:null===(b=H.submitForm)||void 0===b?void 0:b.message)&&(0,l.tZ)("div",{className:"py-5 text-red text-center col-span-2",dangerouslySetInnerHTML:{__html:null!==(T=null==H?void 0:null===(x=H.submitForm)||void 0===x?void 0:x.message)&&void 0!==T?T:""}}),(0,l.tZ)("div",{css:{padding:"".concat(M.xl," 0")}},(0,l.tZ)("div",{css:{padding:"".concat(M.xl," 0"),textAlign:"center"}},(0,l.tZ)(r.ButtonThemed,{appearance:Z,disabled:G||L||I,onClick:e=>{handleOnSubmit(e)}},(0,l.tZ)("span",null,"Submit"))),(0,l.tZ)("div",{css:{textAlign:"center",color:R.neutral}},(0,l.tZ)("span",null,"This site is protected by reCAPTCHA and the Google ",(0,l.tZ)(d.g,{href:"https://policies.google.com/privacy"},"Privacy Policy")," and ",(0,l.tZ)(d.g,{href:"https://policies.google.com/terms"},"Terms of Service")," apply. ")))))})}}]);

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.