1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="0da4dd2d-6c56-4acf-8b5a-2fce5e426bd9",e._sentryDebugIdIdentifier="sentry-dbid-0da4dd2d-6c56-4acf-8b5a-2fce5e426bd9")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5672],{78321:function(e,a,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/verify-phone-number",function(){return i(7719)}])},7719:function(e,a,i){"use strict";i.r(a),i.d(a,{default:function(){return K}});var n=i(85893),t=i(9008),r=i.n(t),o=i(32027),l=i(67294),s=i(70531),d=i(16614),c=i(20315),u=i(7782),m=i(5767),p=i(9291),h=i(45007),_=i(71571),b=i(2353),f=i(4186),g=i(50902),I=i(60592),E=i(3685),y=i(37101),k=i(64414),v=i(90628),A=i(72997),x=i(5401),R=i(40355),N=i(50261),D=i(23328),C=i(30629),w=i(47787);let T=["Tekan tombol di bawah. WhatsApp kebuka otomatis.","Kirim pesannya tanpa diubah.","Ketuk link di dalam pesan itu untuk balik ke sini."],j=p.Z.create({sectionContainer:{padding:16,gap:12},headerImage:{width:128,height:128,alignSelf:"center"},headerTextBlock:{gap:6},centerText:{textAlign:"center"},fieldBlock:{gap:4},changeNumberButton:{paddingVertical:6,paddingHorizontal:8},stepsContainer:{backgroundColor:y.$_.base.blue[100],padding:16,borderRadius:12,gap:12},stepItem:{flexDirection:"row",alignItems:"flex-start",gap:12},stepCircle:{width:20,height:20,borderRadius:10,backgroundColor:y.$_.base.blue[500],alignItems:"center",justifyContent:"center"},stepText:{flex:1}});var P=e=>{let{cleanMobile:a,onChangeNumber:i}=e;return(0,n.jsxs)(c.Z,{style:j.sectionContainer,children:[(0,n.jsx)(w.Z,{source:{uri:"https://cdn.pintarnya.com/images/profile/phone-whatsapp.webp"},style:j.headerImage,resizeMode:"contain"}),(0,n.jsx)(c.Z,{style:j.headerTextBlock,children:(0,n.jsx)(C.Z,{variant:"title3",color:y.$_.text.default,style:j.centerText,children:"Verifikasi nomor WhatsApp\nterlebih dahulu."})}),(0,n.jsx)(c.Z,{style:j.fieldBlock,children:(0,n.jsx)(D.Z,{value:a,size:"large",prefix:(0,n.jsx)(C.Z,{variant:"body2",color:y.$_.text.subtle,children:"+62"}),suffix:(0,n.jsx)(N.Z,{size:"xs",onPress:i,style:j.changeNumberButton,children:(0,n.jsx)(C.Z,{variant:"caption1",bold:!0,color:"white",children:"Ubah"})}),disabled:!0})}),(0,n.jsx)(c.Z,{style:j.stepsContainer,children:T.map((e,a)=>(0,n.jsxs)(c.Z,{style:j.stepItem,children:[(0,n.jsx)(c.Z,{style:j.stepCircle,children:(0,n.jsx)(C.Z,{variant:"caption1",color:y.$_.base.white,children:a+1})}),(0,n.jsx)(C.Z,{variant:"body2",color:y.$_.text.subtle,style:j.stepText,children:e})]},a))}),(0,n.jsx)(R.Z,{type:"warning",message:"Jangan kirim dari nomor lain, verifikasi hanya berlaku untuk nomor di atas."})]})},L=i(40476);let Z={HOURGLASS_LOADING:"https://cdn.pintarnya.com/images/profile/hourglass-loading.webp",HOURGLASS_ERROR:"https://cdn.pintarnya.com/images/profile/hourglass-error.webp",PHONE_NUMBER_ERROR:"https://cdn.pintarnya.com/images/profile/phone-number-error.webp",CLIPBOARD_CHECK:"https://cdn.pintarnya.com/images/profile/clipboard-check.webp"},H=[{title:"Pakai WhatsApp personal",description:"Karena nomor tidak akan terdeteksi jika menggunakan Nomor WhatsApp Business"},{title:"Nomor tidak disembunyikan username",description:"Matikan link username di Pengaturan WhatsApp, biar nomornya kelihatan."}],O=e=>"".concat(String(Math.floor(e/60)).padStart(2,"0"),":").concat(String(e%60).padStart(2,"0")),B=p.Z.create({statusContainer:{alignItems:"center",justifyContent:"center",paddingHorizontal:16,paddingVertical:48,gap:16},statusContainerDense:{paddingVertical:24},headerImage:{width:128,height:128,alignSelf:"center"},statusTextContainer:{alignItems:"center",gap:8,maxWidth:320},centerText:{textAlign:"center"},stepsContainer:{width:"100%",backgroundColor:y.$_.base.blue[100],padding:16,borderRadius:12,gap:12},stepItem:{flexDirection:"row",alignItems:"flex-start",gap:12},stepCircle:{width:20,height:20,borderRadius:10,backgroundColor:y.$_.base.blue[500],alignItems:"center",justifyContent:"center",marginTop:2},stepContent:{flex:1,gap:2}});var M=e=>{let{screenState:a,remainingSeconds:i,nextAvailableAt:t}=e,{imageUri:r,title:o,body1:l,body2:s}=(()=>{switch(a){case"PENDING":return{imageUri:Z.HOURGLASS_LOADING,title:"Lagi mengecek pesan kamu",body1:"Biasanya cuma beberapa detik. Jangan tutup halaman ini dulu.",body2:"Kode berlaku ".concat(O(i)," lagi")};case"VERIFIED":return{imageUri:Z.CLIPBOARD_CHECK,title:"Nomor kamu terverifikasi",body1:"Beres. Nomor ini nggak akan diminta verifikasi lagi ke depannya.",body2:void 0};case"EXPIRED":return{imageUri:Z.HOURGLASS_ERROR,title:"Waktu verifikasi habis",body1:"Pesan verifikasi kamu belum sampai ke kami. Kuota misi belum kepakai, jadi aman diulang.",body2:void 0};case"PHONE_MISMATCH":return{imageUri:Z.PHONE_NUMBER_ERROR,title:"Pesannya dikirim dari nomor lain",body1:"Kami menerima pesan, tapi dari nomor yang berbeda dengan yang terdaftar di akun kamu.",body2:"Kirim ulang dari nomor yang terdaftar, atau ganti nomor di halaman Data Diri."};case"WA_ID_NOT_AVAILABLE":return{imageUri:Z.PHONE_NUMBER_ERROR,title:"Nomornya belum terbaca",body1:"WhatsApp yang kamu pakai tidak mengirim nomor teleponnya. Cek dua hal ini sebelum kirim ulang:",body2:void 0};default:return{imageUri:Z.PHONE_NUMBER_ERROR,title:"Batas verifikasi tercapai",body1:"Nomor ini sudah mencapai batas verifikasi ulang (maksimal 2 kali per 30 hari).",body2:t?"Kamu dapat mencoba lagi pada ".concat((0,L.Z)(t).format("D MMMM YYYY, HH:mm"),"."):"Silakan coba lagi nanti."}}})();return(0,n.jsxs)(c.Z,{style:[B.statusContainer,"WA_ID_NOT_AVAILABLE"===a&&B.statusContainerDense],children:[(0,n.jsx)(w.Z,{source:{uri:r},style:B.headerImage,resizeMode:"contain"}),(0,n.jsxs)(c.Z,{style:B.statusTextContainer,children:[(0,n.jsx)(C.Z,{variant:"title3",bold:!0,color:y.$_.text.default,style:B.centerText,children:o}),(0,n.jsx)(C.Z,{variant:"body3",color:y.$_.text.subtle,style:B.centerText,children:l}),s?(0,n.jsx)(C.Z,{variant:"body3",bold:!0,color:y.$_.text.subtle,style:B.centerText,children:s}):null]}),"WA_ID_NOT_AVAILABLE"===a&&(0,n.jsx)(c.Z,{style:B.stepsContainer,children:H.map((e,a)=>(0,n.jsxs)(c.Z,{style:B.stepItem,children:[(0,n.jsx)(c.Z,{style:B.stepCircle,children:(0,n.jsx)(C.Z,{variant:"caption1",color:y.$_.base.white,children:a+1})}),(0,n.jsxs)(c.Z,{style:B.stepContent,children:[(0,n.jsx)(C.Z,{variant:"body2",bold:!0,color:y.$_.text.default,children:e.title}),(0,n.jsx)(C.Z,{variant:"body3",color:y.$_.text.subtle,children:e.description})]})]},a))})]})};let S=p.Z.create({stickyFooter:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:y.$_.bg.base,paddingHorizontal:16,paddingVertical:12,borderTopWidth:1,borderTopColor:y.$_.border.subtle},footerButtons:{gap:8}});var V=e=>{let{screenState:a,isLoading:i,hasCleanMobile:t,missionId:r,onStartVerification:o,onSuccessCTA:l,onCh
1angeNumber:s,onBack:d}=e,u=(()=>{switch(a){case"PENDING":return null;case"VERIFIED":return(0,n.jsx)(N.Z,{type:"primary",color:y.$_.silo.orange[300],size:"md",fullWidth:!0,onPress:l,children:r?"Ambil Misi":"Kembali ke Profil"});case"EXPIRED":return(0,n.jsx)(N.Z,{type:"primary",color:y.$_.silo.orange[300],size:"md",fullWidth:!0,loading:i,disabled:i,onPress:o,children:"Kirim Ulang Kode"});case"PHONE_MISMATCH":case"REBIND_LIMIT_REACHED":return(0,n.jsx)(N.Z,{type:"primary",color:y.$_.silo.orange[300],size:"md",fullWidth:!0,onPress:s,children:"Ganti Nomor"});case"WA_ID_NOT_AVAILABLE":return(0,n.jsxs)(c.Z,{style:S.footerButtons,children:[(0,n.jsx)(N.Z,{type:"primary",color:y.$_.silo.orange[300],size:"md",fullWidth:!0,loading:i,disabled:i,onPress:o,children:"Verifikasi Ulang"}),(0,n.jsx)(N.Z,{type:"primary",variant:"outline",size:"md",fullWidth:!0,disabled:i,onPress:d,children:"Kembali"})]});default:return(0,n.jsx)(N.Z,{type:"primary",color:y.$_.silo.orange[300],size:"md",fullWidth:!0,loading:i,disabled:i||!t,onPress:o,children:"Verifikasi"})}})();return u?(0,n.jsx)(c.Z,{style:S.stickyFooter,children:u}):null};let{useParams:W}=(0,_.X)(),$=[2e3,4e3,6e3],U=p.Z.create({screen:{flex:1,backgroundColor:y.$_.bg.base},scrollContent:{flexGrow:1,paddingBottom:100},scrollContentWithDoubleCta:{paddingBottom:140}});var G=()=>{let e=(0,v.tv)(),a=(0,o.r)(),{params:i}=W(),{mobile:t,is_whatsapp_verified:r}=(0,h.v9)(e=>{var a;return null!==(a=e.user.data)&&void 0!==a?a:{}}),[p,_]=(0,l.useState)("INITIAL"),[R,N]=(0,l.useState)(null),[D,C]=(0,l.useState)(0),[w,T]=(0,l.useState)(!1),[j,L]=(0,l.useState)(!1),[Z,H]=(0,l.useState)(null),O=(0,l.useRef)(null),B=(0,l.useRef)(0),S=(0,l.useRef)(null),G=(0,l.useRef)(!1),K=(0,l.useRef)(!1),F=(0,l.useRef)(0),z=(t||"").replace(/^\+62|^62|^0/,"");(0,l.useEffect)(()=>{K.current||(K.current=!0,(0,x.HH)({missionId:(null==i?void 0:i.mission_id)||null,entry:(0,x.$e)(null==i?void 0:i.from,null==i?void 0:i.mission_id),isNumberVerified:!!r}))},[null==i?void 0:i.mission_id,null==i?void 0:i.from,r]);let X=(0,l.useCallback)(()=>{O.current&&(clearTimeout(O.current),O.current=null),S.current&&(clearInterval(S.current),S.current=null),B.current=0,G.current=!1},[]);(0,l.useEffect)(()=>()=>{X()},[X]),(0,l.useEffect)(()=>{a&&r&&"INITIAL"===p&&_("VERIFIED")},[a,r,p]);let Y=(0,l.useCallback)(async e=>{if(e&&!G.current){G.current=!0;try{var a,i;let n=await (0,I.d5)(e),t=null==n?void 0:null===(a=n.data)||void 0===a?void 0:a.status;"VERIFIED"===t?(X(),_("VERIFIED"),await (0,I.PR)(),A.A.show("Nomor WhatsApp berhasil diverifikasi!",{type:"success"})):"EXPIRED"===t?(X(),_("EXPIRED"),(0,x.Ol)({code:"EXPIRED",surface:"banner",screen:"verify_phone_number"})):"PHONE_MISMATCH"===t?(X(),_("PHONE_MISMATCH"),(0,x.Ol)({code:"PHONE_MISMATCH",surface:"banner",screen:"verify_phone_number"})):"WA_ID_NOT_AVAILABLE"===t?(X(),_("WA_ID_NOT_AVAILABLE"),(0,x.Ol)({code:"WA_ID_NOT_AVAILABLE",surface:"banner",screen:"verify_phone_number"})):"REBIND_LIMIT_REACHED"===t&&(X(),_("REBIND_LIMIT_REACHED"),(0,x.Ol)({code:"REBIND_LIMIT_REACHED",surface:"banner",screen:"verify_phone_number"}),(null==n?void 0:null===(i=n.data)||void 0===i?void 0:i.next_available_at)&&H({limit:2,remaining:0,window_days:30,next_available_at:n.data.next_available_at}))}catch(e){if((null==e?void 0:e.code)==="ALREADY_VERIFIED"){X(),_("VERIFIED"),await (0,I.PR)(),A.A.show("Nomor WhatsApp berhasil diverifikasi!",{type:"success"});return}(null==e?void 0:e.code)==="PHONE_REBIND_LIMIT_REACHED"&&(X(),_("REBIND_LIMIT_REACHED"),(0,x.Ol)({code:"PHONE_REBIND_LIMIT_REACHED",surface:"banner",screen:"verify_phone_number"}),e.errors&&H(e.errors))}finally{G.current=!1}}},[X]),q=(0,l.useCallback)(e=>{S.current&&clearInterval(S.current);let a=()=>{let a=Math.max(0,Math.floor((new Date(e).getTime()-Date.now())/1e3));C(a),a<=0&&(X(),_("EXPIRED"))};a(),S.current=setInterval(a,1e3)},[X]),J=(0,l.useCallback)(e=>{O.current&&clearTimeout(O.current);let a=$[Math.min(B.current,$.length-1)];B.current+=1,O.current=setTimeout(async()=>{await Y(e),null!==O.current&&J(e)},a)},[Y]),Q=(0,l.useCallback)(e=>{B.current=0,J(e)},[J]);(0,l.useEffect)(()=>
1{if((null==i?void 0:i.verification_id)&&"INITIAL"===p){let e=Number(i.verification_id);!isNaN(e)&&e>0&&(N(e),_("PENDING"),Y(e),Q(e))}},[null==i?void 0:i.verification_id,p,Y,Q]);let ee=(0,l.useCallback)(async()=>{if(R&&"PENDING"===p){L(!0),O.current&&(clearTimeout(O.current),O.current=null);try{await Y(R),"PENDING"===p&&J(R)}finally{L(!1)}}},[R,p,Y,J]),ea=async()=>{T(!0),X(),F.current+=1;try{let e=await (0,I.P)(),a=null==e?void 0:e.data;if((null==a?void 0:a.status)==="ALREADY_VERIFIED"){_("VERIFIED"),await (0,I.PR)();return}if((null==a?void 0:a.verification_id)&&(null==a?void 0:a.challenge)&&(null==a?void 0:a.expires_at)){N(a.verification_id),_("PENDING"),(0,x.pL)({missionId:(null==i?void 0:i.mission_id)||null,sessionId:String(a.verification_id),attemptNumber:F.current,entry:(0,x.$e)(null==i?void 0:i.from,null==i?void 0:i.mission_id)}),q(a.expires_at),Q(a.verification_id);let e=null==i?void 0:i.mission_id,n=e?"&mission_id=".concat(encodeURIComponent(e)):"",t="".concat(f.I_,"/");k.$L&&(t="".concat(window.location.origin,"/"));let r="".concat(t,"verify-phone-number?verification_id=").concat(a.verification_id,"&challenge=").concat(encodeURIComponent(a.challenge)).concat(n),o="Mohon tidak mengubah isi teks.\n\nKirim pesan ini untuk VERIFIKASI nomor kamu.\nHATI-HATI penipuan: jangan kirim pesan ini kalau kamu menerimanya dari orang lain.\nID: ".concat(a.challenge,"\nSetelah terkirim, ketuk link ini untuk balik ke Pintarnya:\n").concat(r),l=a.whatsapp_number||E.Q2,d="https://api.whatsapp.com/send?phone=".concat(l,"&text=").concat(encodeURIComponent(o));k.$L?window.location.href=d:s.Z.openURL(d).catch(()=>{A.A.show("Gagal membuka WhatsApp. Pastikan aplikasi WhatsApp terpasang di perangkat kamu.",{type:"danger"})})}}catch(e){if((null==e?void 0:e.code)==="ALREADY_VERIFIED"){_("VERIFIED"),await (0,I.PR)(),A.A.show("Nomor WhatsApp berhasil diverifikasi!",{type:"success"});return}(null==e?void 0:e.code)==="PHONE_REBIND_LIMIT_REACHED"?(_("REBIND_LIMIT_REACHED"),(0,x.Ol)({code:"PHONE_REBIND_LIMIT_REACHED",surface:"banner",screen:"verify_phone_number"}),e.errors&&H(e.errors)):A.A.show((null==e?void 0:e.message)||"Gagal memulai verifikasi",{type:"danger"})}finally{T(!1)}};(0,l.useEffect)(()=>{let e=d.Z.addEventListener("change",e=>{"active"===e&&"PENDING"===p&&R&&Y(R)});return()=>{e.remove()}},[p,R,Y]);let ei=()=>(X(),e.back(),!0);(0,g.Z)({onBack:ei});let en=()=>{e.push({pathname:"/change-phone-number",query:{...(null==i?void 0:i.mission_id)?{mission_id:i.mission_id}:{},...R?{verification_id:String(R)}:{},from:"ubah_nomor"}})};return(0,n.jsxs)(c.Z,{style:U.screen,children:[(0,n.jsx)(b.Z,{title:"Verifikasi Nomor",alignTitle:"left",onLeftPress:ei}),(0,n.jsx)(u.Z,{contentContainerStyle:[U.scrollContent,"WA_ID_NOT_AVAILABLE"===p&&U.scrollContentWithDoubleCta],refreshControl:"PENDING"===p?(0,n.jsx)(m.Z,{refreshing:j,onRefresh:ee,colors:[y.$_.silo.orange[300]],tintColor:y.$_.silo.orange[300]}):void 0,children:"INITIAL"===p?(0,n.jsx)(P,{cleanMobile:z,onChangeNumber:en}):(0,n.jsx)(M,{screenState:p,remainingSeconds:D,nextAvailableAt:null==Z?void 0:Z.next_available_at})}),(0,n.jsx)(V,{screenState:p,isLoading:w,hasCleanMobile:!!z,missionId:null==i?void 0:i.mission_id,onStartVerification:ea,onSuccessCTA:()=>{(null==i?void 0:i.mission_id)?e.replace({pathname:"/cc/".concat(i.mission_id),query:{from:"verif-otp"}}):e.replace("/personal-details")},onChangeNumber:en,onBack:ei})]})};function K(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r(),{children:(0,n.jsx)("title",{children:"Verifikasi Nomor WhatsApp"})}),(0,n.jsx)(G,{})]})}}},function(e){e.O(0,[4144,4885,8764,1440,8660,5675,2729,1757,3859,1398,4895,5326,2888,9774,179],function(){return e(e.s=78321)}),_N_E=e.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.