PageSourceSearch

https://www.trademe.co.nz/a/static/upgrade-membership-modal.module-QGXLLiwp.js

js trademe.co.nz collected 2026-10-01 09:02:47 UTC 21,931 bytes, 7 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d2a720d3-17bb-5ab7-b3e0-4df662bade5a")}catch(e){}}();
3import {c as ci,j as jt$1,i as ii}from'./chunk-CwfwF2qP.js';import {X as Xe,W as We}from'./chunk-htu_Ji74.js';import {L as Le}from'./chunk-DpWqbbyG.js';import {j}from'./chunk-3jXqoJSn.js';import {W as Wt$1}from'./chunk-RsdCHF1J.js';import {f,A as A$1}from'./chunk-Bpp08yWl.js';import {S as Se}from'./chunk-C0PRzcma.js';import {l}from'./chunk-BV_-mNOs.js';import {b,y,h as h$1,B,x,A,_,R}from'./chunk-CQ7o25iW.js';import {v}from'./chunk-BGdC6nvN.js';import {a0 as Bv,a1 as Oc,a2 as ti,ar as Hb,c as ze,a4 as qc,I as Ie,az as vr,aA as Bg,a3 as eu,aB as ee,aC as Cb,aD as Ve,aE as Ib,a5 as Lo,aF as d,aG as E,aH as k,aI as h,aJ as G,z as z_,a as zr,j as jb,aK as Bb,L as Lb,ac as $c,aL as Gm,R as Ri,aM as Bm,aN as Qn,E as Eo,aO as Oi,aP as K_,V as Vc,k as kr,ad as Un,l as lM,ae as NN,d as uM,af as AN,at as xr,ag as q,aj as nn,ah as be,ak as Vf,aQ as Nt$1,i as z,y as y$1,aR as De,aS as CW,aT as he,aU as Wv,aV as On,aW as Ei,r as rn,aX as ce,aY as Eh,aZ as Fh,a_ as Bh,a$ as Hh,T as TM,b0 as xd,n as Bs,an as tE,o as _y,q as _d,A as i_,b1 as Qv,b2 as ma,b3 as FM,D as aC,G as my,ap as eE,b4 as CN,H as a_,b5 as DN,b6 as Ce,b7 as De$1,b8 as Z,b9 as ki,al as vh,am as Yp,s as gy,p as cN,N as NM,ba as mN,O as Od,bb as kb,F as Fp,ao as fN,t as jp,bc as Ky}from'./main-BUIS7oZx.js';import'./chunk-CQt_xlFv.js';var Tt=i=>({message:"",validator:i}),Dt=i=>({phoneNumber:i});function Bt(i,e){i&1&&(Bs(0,"p"),cN(1,"Must enter a valid NZ phone number"),_d());}function Nt(i,e){if(i&1&&(Bs(0,"tg-info-box",5),gy(1,"tg-icon",6),Qv(2,Bt,2,0,"p",7),_d()),i&2){NM();let s=FM(3);aC(2),my("ngIf",s?.errors?.notValidPhoneNumber);}}var _t=(()=>{let e=class e extends kb{constructor(t,n,a){super(void 0,n,a),this._analyticsService=t,this.label="Phone",this.homePhoneNumberCatchAllRegex=new RegExp(f),this.mobileNumberCatchAllRegex=new RegExp(A$1),this.phoneNumberValidator=g=>{let D=g.value;return this.homePhoneNumberCatchAllRegex.test(D)||this.mobileNumberCatchAllRegex.test(D)?null:{notValidPhoneNumber:true}},this.MOBILE_PHONE_NUMBER_CATCH_ALL_REGEX=A$1;}tgOnWrite(t){this.enteredPhone=t;}tgOnFormChange(t){this.tgPublishValue(this.enteredPhone);}onChange(){this.form.invalid&&this._analyticsService.addEvent("registration",{action:"invalid phone entered"});}};e.\u0275fac=function(n){return new(n||e)(Lo(De),Lo(CW),Lo(he))},e.\u0275cmp=z_({type:e,selectors:[["tm-phone"]],inputs:{label:"label"},standalone:false,features:[DN([{provide:Ce,useExisting:ki(()=>e)},{provide:De$1,useExisting:ki(()=>e),multi:true},{provide:Z,useExisting:ki(()=>e),multi:true}]),Wv],decls:5,vars:8,consts:[["phoneNumberInput","ngModel"],["ngForm",""],[3,"label"],["placeholder","0211234567","autocorrect","off","autofocus","","name","phone","required","","tgTextInput","","type","tel",3,"ngModelChange","change","ngModel","validation"],["tgStyle","danger",4,"ngIf"],["tgStyle","danger"],["name","basic-warning-framed","role","presentation"],[4,"ngIf"]],template:function(n,a){if(n&1){let g=TM();xd(0,1),Bs(1,"tg-input-container",2)(2,"input",3,0),tE("ngModelChange",function(V){return Fp(g),fN(a.enteredPhone,V)||(a.enteredPhone=V),jp(V)}),_y("change",function(){return a.onChange()}),_d(),i_(),_d(),Qv(4,Nt,3,1,"tg-info-box",4),ma();}if(n&2){let g=FM(3);aC(),my("label",a.label),aC(),eE("ngModel",a.enteredPhone),my("validation",CN(6,Dt,CN(4,Tt,a.phoneNumberValidator))),a_(),aC(2),my("ngIf",a.isValidationVisible&&g?.errors?.notValidPhoneNumber);}},dependencies:[On,Ei,Ri,Bm,Qn,Eo,Oi,K_,rn,ce,Eh,Fh,Bh,Ie,Vc,kr,Hh],styles:[`tm-phone{display:inline}
4`],encapsulation:2});let i=e;return i})();var Ct=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Bv({type:e}),e.\u0275inj=Oc({imports:[ti,ee,ze,Cb,Ie,Ie,Bg,Ve,Ib,Ie]});let i=e;return i})();var bt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=z_({type:e,selectors:[["tm-add-date-of-birth-illustration"]],standalone:false,decls:6,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 129 126"],["fill","#D57800","d","m21 40 17 78h87l-17-78H21Z"],["fill","#F9AF2C","d","m21 40-9 78h87l9-78H21Z"],["fill","#EB9600","d","M96 36h-3v6h3v-6ZM66 36h-3v6h3v-6ZM37 36h-4v6h4v-6Z"],["fill","#FFF4D1","d","M41 69H27l1-12h14l-1 12ZM58 69H44l2-12h14l-2 12ZM76 70H62l1-13h14l-1 13ZM93 70H80l1-13h14l-2 13ZM39 85H25l1-12h14l-1 12ZM57 84H43l1-12h14l-1 12ZM74 84H60l2-12h13l-1 12ZM92 84H78l1-12h14l-1 12ZM37 100H23l2-12h14l-2 12ZM55 100H41l1-12h14l-1 12ZM73 100H59l1-12h14l-1 12ZM90 100H76l2-12h14l-2 12Z"],["fill","#943800","d","m29 73-2 2 3 4-3 3 2 2 3-3 3 3 3-2-3-3 3-3-2-2-3 3-4-4Z"]],template:function(n,a){n&1&&(Yp(),Bs(0,"svg",0),gy(1,"path",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5),_d());},dependencies:[vh],encapsulation:2});let i=e;return i})();var vt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=z_({type:e,selectors:[["tm-add-phone-number-illustration"]],standalone:false,decls:12,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 115 126"],["clip-path","url(#a)"],["fill","#F9AF2C","d","m78 126-46-8a2 2 0 0 1-2-2l15-93a2 2 0 0 1 2-2l46 8a2 2 0 0 1 2 2l-14 93a2 2 0 0 1-3 2"],["fill","#D57800","d","m73 31-7-1a1 1 0 1 1 0-2l8 1a1 1 0 0 1-1 2ZM59 117a3 3 0 1 1-3-3 3 3 0 0 1 3 3"],["fill","#FFE8AC","d","m89 37-4
40-6-12 76 40 7 12-77Z"],["fill","#8DCEFC","d","M3 53c-1 9 5 18 14 19l34 6 2-10c2-13-7-26-20-28l-10-1C13 37 5 43 3 53Z"],["cx","2.7","cy","2.7","r","2.7","fill","#0061AF","transform","matrix(-1 0 0 1 42 57)"],["cx","2.7","cy","2.7","r","2.7","fill","#0061AF","transform","matrix(-1 0 0 1 32 55)"],["cx","2.7","cy","2.7","r","2.7","fill","#0061AF","transform","matrix(-1 0 0 1 21 53)"],["id","a"],["fill","#fff","d","M1 0h114v126H1z"]],template:function(n,a){n&1&&(Yp(),Bs(0,"svg",0)(1,"g",1),gy(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"circle",6)(7,"circle",7)(8,"circle",8),_d(),Bs(9,"defs")(10,"clipPath",9),gy(11,"path",10),_d()()());},dependencies:[vh],encapsulation:2});let i=e;return i})();var Mt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=z_({type:e,selectors:[["tm-confirm-address-illustration"]],standalone:false,decls:10,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 82 126"],["fill","#006EBD","d","M53 71H37v71h16V71Z"],["fill","#52B0F0","d","M61 19H21A21 21 0 0 0 0 40v28h82V40a21 21 0 0 0-21-21Z"],["fill","#279BE9","d","M30 68H0V34a15 15 0 0 1 30 0v34Z"],["fill","#006EBD","d","M27 43H4v3h23v-3ZM82 68H0v3h82v-3Z"],["fill","#FFC041","d","M37 0v45h6V11h16l-4-6 4-5H37Z"],["fill","#F9AF2C","d","m52 130 4-2-4-9c-1-4-5-5-6-6-1-3 1-4-1-7l-5-5c-2-2 0-3-2-6s-3-1-5-4c-1-3-3-3-4-3-2 1-3 2-2 5v7c0 3 2 2 3 6l-1 6c1 4 3 3 4 6 0 2-2 5 0 9l1 3h18Z"],["fill","#EB9600","d","m31 95 2 5-3-1-1 1 4 1 4 10-2-1-1 1 4 2 4 10-3-1v1l4 1 2 6h1l-2-6 1-4h-1l-1 2-4-10 2-4h-1l-2 3-4-10 2-4h-1l-1 2-2-5-1 1Z"],["fill","#FFD35F","d","M64 89c1-4 0-5-2-6-2 0-3 0-5 3-1 4-3 2-5 6-1 3 1 3-1 7l-5 5c-2 4 1 5-1 8-1 2-4 3-6 8l-3 10h24l1-4c2-5-1-8-1-9 1-4 3-4 4-7 0-4-2-4-1-8 0-3 2-3 3-6 0-4-2-4-2-7"],["fill","#F9AF2C","d","m58 96-2-3h-1l2 5-3 11-2-3-1 1 2 4-3 11-2-3-1 1 2 4-2 6h2l1-6 4-2v-1l-3 2 3-12 4-2v-1l-3 1 3-11 4-2v-1l-3 1 2-6h-2l-1 6Z"]],template:function(n,a){n&1&&(Yp(),Bs(0,"svg",0),gy(1,"path",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9),_d());},dependencies:[vh],encapsulation:2});let i=e;return i})();var xt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=z_({type:e,selectors:[["tm-create-username-illustration"]],standalone:false,decls:15,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 209 126"],["fill","#FFC041","d","M130 37 36 49c-2 0-3 2-3 4l8 59c0 3 2 4 4 4l94-13c2 0 4-2 3-4l-8-59c0-2-2-4-4-3Z"],["fill","#EB9600","d","m123 49-47 6 1 7 47-6-1-7ZM116 62l-38 5 1 7 38-5-1-7Z"],["fill","#FFE18D","d","m124 83-43 6 1 8 43-6-1-8Z"],["fill","#D57800","d","m68 55-24 3 3 24 24-3-3-24Z"],["fill","#FFE18D","d","M58 71a10 10 0 0 0-9 11l20-3a10 10 0 0 0-11-8Z"],["fill","#FFE18D","d","M60 68h-5l1 6 4-1v-5Z"],["fill","#FFE18D","d","M57 59h-2c-2 0-3 2-3 4v4c1 3 3 4 5 4h2c2-1 3-3 3-5v-4c-1-2-3-4-5-3Z"],["fill","#F9AF2C","d","m85 93 4-4-1-1v11a1 1 0 0 0 2 0l7-9c0-1-1-2-2-1l-7 9 2 1-1-11a1 1 0 0 0-1-1l-4 6a1 1 0 0 0 1 0Z"],["fill","#FFE18D","d","m68 90-3-2-6 9-3-2-2 3 5 4 9-12Z"],["fill","#CBEAFF","d","M178 54a2 2 0 0 1-3-1l-1-2a2 2 0 0 1 1-3l3-2a2 2 0 0 1 3 1l1 2a2 2 0 0 1-1 3l-3 2Z"],["fill","#148FE2","d","m108 84-6 6 9-1 67-36-2-5-68 36Z"],["fill","#D57800","d","M102 90h5l-2-3-3 3Z"],["fill","#FFE8AC","d","m111 89-4 1-2-3 3-3 3 5Z"],["fill","#FFCB4F","d","M192 47a2 2 0 1 0-1 3l6 1a2 2 0 1 0 1-3l-6-1ZM190 41a2 2 0 1 0 2 3l5-4a2 2 0 1 0-2-2l-5 3ZM184 39a2 2 0 1 0 3 1l1-6a2 2 0 0 0 0-2 2 2 0 0 0-2 0 2 2 0 0 0-1 1l-1 6Z"]],template:function(n,a){n&1&&(Yp(),Bs(0,"svg",0),gy(1,"path",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9)(10,"path",10)(11,"path",11)(12,"path",12)(13,"path",13)(14,"path",14),_d());},dependencies:[vh],encapsulation:2});let i=e;return i})();var yt=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=z_({type:e,selectors:[["tm-verify-details-illustration"]],standalone:false,decls:17,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 120 89"],["fill","#FAD255","d","M74 9H33v79h57l1-62L74 9Z"],["fill","#F3AE0F","d","m69 35-25-1v-3h25v4Zm10 0h-8v-4h8v4Zm-24 5h24v4H55v-4Zm-11 9h24v4H44v-4Zm35 0h-4v4h4v-4ZM44 39v2h9v-2h-9ZM74 9v17h17L74 9Z"],["fill","#FEFAF7","d","M60 18H28v38h32V18Z"],["clip-path","url(#a)"],["fill","#6BBCF4","d","M32 22h24v24H32z"],["fill","#CBEAFF","d","M35 44a9 9 0 0 1 18 0v2H35v-2Z"],["cx","43.7","cy","31.4","r","5","fill","#CBEAFF"],["fill","#F3AE0F","d","M41 6a7 7 0 0 0-7-6 7 7 0 0 0-7 6v22c0 3 2 5 5 5s6-2 6-5V15a4 4 0 0 0-8 0v10h2v-9a2 2 0 0 1 4 0v11a4 4 0 0 1-1 3 3 3 0 0 1-3 1c-1 0-3-1-3-4V7a4 4 0 0 1 2-3 5 5 0 0 1 6 0 4 4 0 0 1 1 3v2h3V6Z"],["fill","#3790E5","d","M104 30a1 1 0 0 1-1 1 1 1 0 0 1-1 0l-2-1a2 2 0 0 1 0-2l1-3a1 1 0 0 1 2-1v1l2 1a2 2 0 0 1 0 2l-1 2Z"],["fill","#77BDF6","d","M104 30 81 68l-5 4 1-7 23-38 4 3Z"],["fill","#3790E5","d","m79 70-3 2 1-3 2 1Z"],["fill","#FEFAF7","d","m81 68-2 2-2-1v-4l4 3Z"],["fill","#FFCB4F","d","M111 23a2 2 0 0 0-1 1 2 2 0 0 0 0 2l1 1h6a2 2 0 1 0 0-4h-6Zm-3-5a2 2 0 0 0 0 3 2 2 0 0 0 2 0 2 2 0 0 0 1-1l4-4a2 2 0 0 0 1-1 2 2 0 0 0-1-1 2 2 0 0 0-2 0l-5 4Zm-6 0a2 2 0 1 0 4 0v-7a2 2 0 0 0-3-1v1l-1 7Z"],["id","a"],["fill","#fff","d","M32 22h24v24H32z"]],template:function(n,a){n&1&&(Yp(),Bs(0,"svg",0),gy(1,"path",1)(2,"path",2)(3,"path",3),Bs(4,"g",4),gy(5,"path",5)(6,"path",6)(7,"circle",7),_d(),gy(8,"path",8)(9,"path",9)(10,"path",10)(11,"path",11)(12,"path",12)(13,"path",13),Bs(14,"defs")(15,"clipPath",14),gy(16,"path",15),_d()()());},dependencies:[vh],encapsulation:2});let i=e;return i})();function Ut(i,e){if(i&1){let s=TM();Bs(0,"button",15),_y("click",function(){Fp(s);let n=NM(2);return jp(n.previousStep())}),gy(1,"tg-icon-left",16),cN(2," Previous "),_d();}}function Rt(i,e){if(i&1&&(Bs(0,"p"),cN(1),_d()),i&2){let s=NM(2);aC(),Ky("Step ",s.step," of ",s.maxSteps-1);}}function Lt(i,e){i&1&&(Bs(0,"div",11)(1,"tg-svg",17),gy(2,"tm-verify-details-illustration"),_d(),Bs(3,"h2"),cN(4,"Update your details"),_d(),Bs(5,"p"),
4cN(6," Help keep yourself and others safe and secure while using Trade Me. This will just take a sec, and then we can get you right back to what you were doing. "),_d()());}function jt(i,e){if(i&1){let s=TM();Bs(0,"div",11)(1,"tg-svg",18),gy(2,"tm-confirm-address-illustration"),_d(),Bs(3,"h2"),cN(4,"What's your address?"),_d(),Bs(5,"p"),cN(6,"Your address helps tailor a personalised experience with more accurate shipping info."),_d()(),Bs(7,"tm-add-new-address",19),tE("ngModelChange",function(n){Fp(s);let a=NM(2);return fN(a.selectedAddress,n)||(a.selectedAddress=n),jp(n)}),_d(),i_();}if(i&2){let s=NM(),t=NM();aC(7),eE("ngModel",t.selectedAddress),my("disabled",s.isLoading),a_();}}function Wt(i,e){if(i&1){let s=TM();Bs(0,"div",11)(1,"tg-svg",20),gy(2,"tm-create-username-illustration"),_d(),Bs(3,"h2"),cN(4,"Create a username"),_d(),Bs(5,"p"),cN(6," Add a new username or use our suggestion. This is how you\u2019ll be known to other users, and once created it can\u2019t be changed. "),_d()(),Bs(7,"tm-user-name",21),tE("ngModelChange",function(n){Fp(s);let a=NM(2);return fN(a.userName,n)||(a.userName=n),jp(n)}),_d(),i_();}if(i&2){let s=NM(),t=NM();aC(7),eE("ngModel",t.userName),my("disabled",s.isLoading)("validateUserName",t.currentMember?.nickname?.toLowerCase()!==t.userName?.toLowerCase()),a_();}}function kt(i,e){if(i&1){let s=TM();Bs(0,"div",11)(1,"tg-svg",22),gy(2,"tm-add-date-of-birth-illustration"),_d(),Bs(3,"h2"),cN(4,"What's your date of birth?"),_d(),Bs(5,"p"),cN(6," This information is private to you, and used to verify your account with our support team. "),_d()(),Bs(7,"tm-date-of-birth",23),tE("ngModelChange",function(n){Fp(s);let a=NM(2);return fN(a.dateOfBirth,n)||(a.dateOfBirth=n),jp(n)}),_d(),i_();}if(i&2){let s=NM(),t=NM();aC(7),eE("ngModel",t.dateOfBirth),my("disabled",s.isLoading),a_();}}function Gt(i,e){if(i&1){let s=TM();Bs(0,"div",11)(1,"tg-svg",24),gy(2,"tm-add-phone-number-illustration"),_d(),Bs(3,"h2"),cN(4,"What's your phone number?"),_d(),Bs(5,"p"),cN(6," We can use this number to get in touch with you, if there are any issues with a trade. This won\u2019t be visible on your profile. "),_d()(),Bs(7,"tm-phone",25),tE("ngModelChange",function(n){Fp(s);let a=NM(2);return fN(a.phoneNumber,n)||(a.phoneNumber=n),jp(n)}),_d(),i_();}if(i&2){let s=NM(),t=NM();aC(7),eE("ngModel",t.phoneNumber),my("disabled",s.isLoading),a_();}}function qt(i,e){if(i&1&&(Bs(0,"tg-info-box",12),cN(1),_d()),i&2){let s=NM();aC(),Od(" ",s.error.errorMessage," ");}}function zt(i,e){if(i&1){let s=TM();Bs(0,"tg-modal",1),NN(1,"async"),Bs(2,"tg-modal-header",2)(3,"div",3),lM(4,Ut,3,0,"button",4),_d(),Bs(5,"div",5),lM(6,Rt,2,2,"p"),_d(),Bs(7,"div",6)(8,"button",7),_y("click",function(){Fp(s);let n=NM();return jp(n.onClose())}),gy(9,"tg-icon",8),_d()()(),Bs(10,"tg-modal-body",9)(11,"form",10,0),_y("ngSubmit",function(){let n=Fp(s),a=FM(12),g=NM();return jp(!n.isLoading&&g.submitData(a.valid))}),lM(13,Lt,7,0,"div",11),lM(14,jt,8,2),lM(15,Wt,8,3),lM(16,kt,8,2),lM(17,Gt,8,2),lM(18,qt,2,1,"tg-info-box",12),_d()(),Bs(19,"tg-modal-footer",13)(20,"button",14),cN(21),_d()()();}if(i&2){let s=e,t=NM();my("fullScreen",mN(AN(1,12,t.mediaSize.is.sm$)&&t.step!==0)),aC(4),uM(t.step>=2?4:-1),aC(2),uM(t.step!==0?6:-1),aC(7),uM(t.step===0?13:-1),aC(),uM(t.step===1?14:-1),aC(),uM(t.step===2?15:-1),aC(),uM(t.step===3?16:-1),aC(),uM(t.step===4?17:-1),aC(),uM(s.error?18:-1),aC(2),my("loading",s.isLoading),aC(),Od(" ",t.step===0?"Update details":t.step===t.maxSteps-1?"Confirm details":"Next"," ");}}var Xt={title:"Update Details | Trade Me",description:"Update your account details."},St=(()=>{let e=class e{constructor(t,n,a,g,D,V,Ft,wt){this._basicMembershipService=t,this._basicRegistratonAnalyticsService=n,this._membershipFacade=a,this._metaDataFacade=g,this._currentMemberFacade=D,this._tokenRefreshFacade=V,this._platformService=Ft,this.mediaSize=wt,this.step=0,this.maxSteps=5,this.isBrowser=false,this._previousMetaData=new xr(1),this._destroyed$=new q,this.COUNTRY="New Zealand",this._analyticsActionsPerStep={0:A,1:x,2:B,3:h$1,4:y},this.getFullAddress=H=>`${H.address1}, ${H.suburb?H.suburb+",":""} ${H.city}`;}ngOnInit(){this.isBrowser=this._platformService.isBrowser,this.sendAnalyticsStepEvent(0),this.membershipEditing$=this._membershipFacade.getMembershipEditing(),this._currentMemberFacade.getCurrentMember().pipe(nn(1),be(t=>this.setMemberDetails(t)),Vf(this._destroyed$)).subscribe(),this._metaDataFacade.getMetaData().pipe(nn(1),Vf(this._destroyed$)).subscribe(t=>{this._previousMetaData.next(t),this._metaDataFacade.updateMetaData(Xt);});}onClose(){this._previousMetaData.pipe(nn(1),Vf(this._destroyed$)).subscribe(t=>{this._metaDataFacade.updateMetaData(t),this._basicMembershipService.closeUpgradeMembershipModal();});}
4ngOnDestroy(){this._destroyed$.next();}submitData(t){if(this.step===0){this.nextStep();return}if(!t)return;this.selectedAddress&&(this.selectedAddress.addressSuggestion={addressId:"0",fullAddress:this.getFullAddress(this.selectedAddress.address)});let n=this.membershipByStep[this.step];this._membershipFacade.editMembership(n),this._membershipFacade.getMembershipEditing().pipe(Nt$1(a=>!a.error&&!a.isLoading&&!!a.item),nn(1),Vf(this._destroyed$)).subscribe(a=>{a.item?.success&&(a.item.membershipHasBeenUpgraded&&(this._basicRegistratonAnalyticsService.addEvent(_,R),this._tokenRefreshFacade.silentLogin(),this._currentMemberFacade.refreshCurrentMember()),this.nextStep());});}nextStep(){this.step+1===this.maxSteps&&this.onClose(),this.step=(this.step+1)%this.maxSteps,this.sendAnalyticsStepEvent(this.step);}previousStep(){this.step>=1&&(this.step-=1),this.sendAnalyticsStepEvent(this.step);}setMemberDetails(t){this.currentMember=t,this.userName=t.nickname;let n=t.membershipAddress?z(y$1({},t.membershipAddress),{id:void 0,isMembershipAddress:false}):void 0;n?.address1&&(this.selectedAddress={address:n,addressSuggestion:{fullAddress:this.getFullAddress(n)}});}get membershipByStep(){let t=this.selectedAddress?.address;return {1:{city:t?.city,country:t?.country??this.COUNTRY,postcode:t?.postcode,streetAddress:t?.address1,streetAddress2:t?.address2,suburb:t?.suburb},2:{userName:this.userName?.trim()},3:{dateOfBirth:this.dateOfBirth},4:y$1({},this.phoneNumber&&{phoneNumbers:[this.phoneNumber]})}}sendAnalyticsStepEvent(t){this._analyticsActionsPerStep[t]&&this._basicRegistratonAnalyticsService.addEvent(_,this._analyticsActionsPerStep[t]);}};e.\u0275fac=function(n){return new(n||e)(Lo(d),Lo(b),Lo(v),Lo(l),Lo(E),Lo(k),Lo(h),Lo(G))},e.\u0275cmp=z_({type:e,selectors:[["tm-upgrade-membership-modal"]],hostAttrs:["ngSkipHydration","true"],standalone:false,decls:2,vars:3,consts:[["upgradeForm","ngForm"],["required","",1,"tm-upgrade-membership-modal",3,"fullScreen"],[1,"tm-upgrade-membership-modal__header-content"],[1,"tm-upgrade-membership-modal__header-start"],["tgButton2","","transparent","",1,"tm-upgrade-membership-modal__header-previous-button"],[1,"tm-upgrade-membership-modal__header-center"],[1,"tm-upgrade-membership-modal__header-end"],["tgButton2","","transparent","",1,"tm-upgrade-membership-modal__header-close-button",3,"click"],["name","basic-cross","alt","Close this dialog"],[1,"tm-upgrade-membership-modal__body"],["id","upgradeForm",3,"ngSubmit"],[1,"tm-upgrade-membership-modal__body-header"],["tgStyle","danger"],[1,"tm-upgrade-membership-modal__footer"],["fullWidth","","tgButton2","","tgStyle","primary","form","upgradeForm","type","submit",3,"loading"],["tgButton2","","transparent","",1,"tm-upgrade-membership-modal__header-previous-button",3,"click"],["name","basic-arrow-left","alt","Go to previous step","size","small"],["alt","Verify details illustration"],["alt","Confirm address illustration"],["required","","name","address","addressLabel","","hasCountry","","requiredCountry","",3,"ngModelChange","ngModel","disabled"],["alt","Create Username illustration"],["required","","name","userName","footerLabel","","label","",3,"ngModelChange","ngModel","disabled","validateUserName"],["alt","Add date of birth illustration"],["required","","name","dateOfBirth","label","",3,"ngModelChange","ngModel","disabled"],["alt","Add phone number illustration"],["label","","name","phoneNumber",3,"ngModelChange","ngModel","disabled"]],template:function(n,a){if(n&1&&(lM(0,zt,22,14,"tg-modal",1),NN(1,"async")),n&2){let g;uM((g=a.isBrowser&&AN(1,1,a.membershipEditing$))?0:-1,g);}},dependencies:[zr,jb,Bb,Lb,ze,$c,Ie,Wt$1,Gm,Ri,Bm,Qn,Eo,Oi,K_,We,Vc,kr,ii,_t,yt,Mt,xt,bt,vt,Un],styles:[".tm-upgrade-membership-modal__body[_ngcontent-%COMP%]{padding-bottom:16px}.tm-upgrade-membership-modal__header-content[_ngcontent-%COMP%]{color:#007acd;text-align:center;padding:16px;display:flex;justify-content:space-between;align-items:baseline}.tm-upgrade-membership-modal__header-content[_ngcontent-%COMP%]   .tm-upgrade-membership-modal__header-start[_ngcontent-%COMP%]{display:flex;width:33%;justify-content:flex-start}.tm-upgrade-membership-modal__header-content[_ngcontent-%COMP%]   .tm-upgrade-membership-modal__header-center[_ngcontent-%COMP%]{width:33%}.tm-upgrade-membership-modal__header-content[_ngcontent-%COMP%]   .tm-upgrade-membership-modal__header-end[_ngcontent-%COMP%]{display:flex;width:33%;justify-content:flex-end}.tm-upgrade-membership-modal__header-content[_ngcontent-%COMP%]   .tm-upgrade-membership-modal__header-previous-button[_ngcontent-%COMP%], .tm-upgrade-membership-modal__header-content[_ngcontent-%COMP%]   .tm-upgrade-membership-modal__header-close-button[_ngcontent-%COMP%]{padding:0}.tm-upgrade-membership-modal__body-header[_ngcontent-%COMP%]{text-align:center}.tm-upgrade-membership-modal__body-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:8px}.tm-upgrade-membership-modal__footer[_ngcontent-%COMP%]{padding-bottom:32px}@media(min-width:768px){  .tm-upgrade-membership-modal.o-modal__dialog{overflow:visible}}"]});let i=e;return i})();var Xi=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Bv({type:e}),e.\u0275inj=Oc({providers:[v],imports:[eu.forChild([{path:"",component:St}]),ti,Hb,ze,qc,Ie,Ie,j,vr,Xe,Bg,ci,jt$1,Le,Ct,Se]});let i=e;return i})();
5export{Xi as UpgradeMembershipModalModule};//# sourceMappingURL=upgrade-membership-modal.module-QGXLLiwp.js.map
6
7//# debugId=d2a720d3-17bb-5ab7-b3e0-4df662bade5a

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.