PageSourceSearch

https://www.rctiplus.com/web-profile-assets/_next/static/chunks/4001.743fe73f941e62ef.js

js rctiplus.com collected 2026-10-02 09:53:07 UTC 9,730 bytes, 1 lines download raw bytes

1(self.webpackChunkshort=self.webpackChunkshort||[]).push([[4001],{3696:function(e,t,l){"use strict";var s=l(8775),a=l(8068),n=l(2750),o=l.n(n);l(3884),t.A=e=>{let{className:t,onClicked:l}=e;return(0,s.jsx)(o(),{width:40,height:40,src:"".concat(a.S2,"/assets/icons/arrow-left-rounded.svg"),alt:"icon-left-arrow",className:t,onClick:e=>{l&&l(e)}})}},4532:function(e,t,l){"use strict";var s=l(8775);t.A=e=>{let{children:t}=e;return(0,s.jsx)("div",{className:"fixed top-0 left-0 w-full h-full bg-[#000000] bg-opacity-50 flex items-center justify-center",children:t})}},2066:function(e,t,l){"use strict";var s=l(8775);t.A=e=>{let{children:t,className:l,messageError:a}=e;return(0,s.jsx)(s.Fragment,{children:null==a?void 0:a.map((e,t)=>(0,s.jsx)("span",{className:l,children:e.message},t))})}},9966:function(e,t,l){"use strict";var s=l(8775),a=l(2242),n=l.n(a),o=l(3271);t.A=e=>{let{children:t,containScroll:l=!1}=e;return(0,s.jsx)("div",{className:(0,o.A)("py-[20px]",l&&"flex flex-col",l?n().contained:n().scrolled),children:t})}},6275:function(e,t,l){"use strict";var s=l(8775),a=l(2604),n=l(8068),o=l(3884);t.A=e=>{let{onChanged:t,active:l,typeOtp:i,otpFor:r,nameModal:d}=e,[c,u]=(0,o.useState)(60),[v,m]=(0,o.useState)(["","","","","",""]),x=(0,o.useRef)(Array(6).fill(null));(0,o.useEffect)(()=>{let e=setInterval(()=>{c>0?u(c-1):clearInterval(e)},1e3);return()=>clearInterval(e)},[c]);let h=e=>{e.preventDefault(),(0,n.om)("submit").then(e=>{p({username:"",type:i,signature_code:"web",captcha_response:e})}).catch(e=>{console.error("Error executing reCAPTCHA:",e)})},p=async e=>{var t,l,s,o;let i=(0,n.G_)("email"),r=(0,n.G_)("phone_code")+(0,n.G_)("phone_number");e.username=null!=i?i:r;let d=await (0,a.xq)(e);(null==d?void 0:null===(l=d.data)||void 0===l?void 0:null===(t=l.status)||void 0===t?void 0:t.code)===0?u(60):alert(null==d?void 0:null===(o=d.data)||void 0===o?void 0:null===(s=o.status)||void 0===s?void 0:s.message_server)},f=(e,l)=>{var s,a,n;let o=e.target.value;if(!/^\d*$/.test(o)||o.length>1)return;let i=[...v];i[l]=o,m(i),""!==o&&l<v.length-1&&(null===(s=x.current[l+1])||void 0===s||s.focus()),i.every(e=>""!==e)&&(null==t||t(i.join(""))),""!==o?l<v.length-1&&(null===(a=x.current[l+1])||void 0===a||a.focus()):l>0&&(null===(n=x.current[l-1])||void 0===n||n.focus())},g=(e,t)=>{var l,s;switch(e.key){case"ArrowLeft":t>0&&(null===(l=x.current[t-1])||void 0===l||l.focus());break;case"ArrowRight":t<v.length-1&&(null===(s=x.current[t+1])||void 0===s||s.focus());break;case"v":(e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.preventDefault(),F(t))}},F=e=>{navigator.clipboard.readText().then(e=>{let t=e.trim().slice(0,v.length),l=[...v];for(let e=0;e<Math.min(t.length,v.length);e++)l[e]=t[e];m(l),x.current[e.length-1].focus()}).catch(e=>console.error("Gagal membaca teks dari clipboard: ",e))},y=c%60;return l?(0,s.jsxs)("div",{className:"bg-[#2F2D2D] p-8 rounded shadow-lg",children:[(0,s.jsx)("div",{className:"mb-4 text-gray-600",children:(0,s.jsxs)("div",{className:"flex flex-col justify-center items-center",children:["email"===r?(0,s.jsxs)("div",{className:"text-center mb-4 w-[70%]",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-[#FFFFFF]",children:"Verify Email"}),(0,s.jsxs)("span",{className:"text-[#FFFFFF] text-center",children:["Email verification has been sent to email"," ",d]})]}):"phone"===r?(0,s.jsxs)("div",{className:"text-center mb-4 w-[70%]",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-[#FFFFFF]",children:"Verify Phone Number"}),(0,s.jsxs)("span",{className:"text-[#FFFFFF] text-center",children:["Phone Number verification has been sent to "," ",d]})]}):null,(0,s.jsx)("div",{className:"flex justify-center space-x-2",children:v.map((e,t)=>(0,s.jsx)("input",{type:"text",className:"w-12 h-12 bg-opacity-0 bg-inherit border-b text-[#FFFFFF] px-[16px]",value:e,onChange:e=>f(e,t),onKeyDown:e=>g(e,t),ref:e=>{x.current[t]=e}},t))})]})}),(0,s.jsx)("div",{className:"text-center mb-4",children:c>1?(0,s.jsxs)("span",{className:"text-[#FFFFFF] text-center",children:["Resend code in: \xa0",(0,s.jsxs)("span",{className:"text-[#05B5F5]",children:[Math.floor(c/60),":",y<10?"0":"",y]})]}):(0,s.jsxs)("span",{className:"text-[#FFFFFF] text-center flex flex-col",children:[(0,s.jsx)("span",{children:"did not receive any code"}),(0,s.jsx)("span",{className:"text-[#FA262F]",onClick:e=>h(e),children:"send me code"})]})})]}):null}},4001:function(e,t,l){"use strict";l.r(t);var s=l(8775),a=l(2087),n=l(3696),o=l(4532),i=l(2066),r=l(8821),d=l(9966),c=l(6275),u=l(2604),v=l(8068),m=l(3271),x=l(3884),h=l(4811),p=l(8901);t.default=(0,h.A)(()=>{let{data_user:e}=(0,p.G)(e=>e.user),[t,l]=(0,x.useState)({status:!1,message:"",statusCode:""}),[h,f]=(0,x.useState)(!1),g="edit-profile",[F,y]=(0,x.useState)({email:""}),[b,j]=(0,x.useState)([]);(0,x.useEffect)(()=>{e.email&&""!==e.email&&(0,v.UZ)("/settings")},[]);let N=e=>{j([]),y({...F,[e.target.name]:e.target.value})},A=e=>{if(!_())return!1;(0,v.om)("contact").then(e=>{C({username:"",type:g,signature_code:"web",captcha_response:e})}).catch(e=>{console.error("Error executing reCAPTCHA:",e)})},C=async e=>{var t,s,a,n,o,i,r,d;e.username=F.email;let c=await (0,u.xq)(e);(null==c?void 0:null===(s=c.data)||void 0===s?void 0:null===(t=s.status)||void 0===t?void 0:t.code)===0?f(!h):l({status:!0,message:null!==(r=null==c?void 0:null===(n=c.data)||void 0===n?void 0:null===(a=n.status)||void 0===a?void 0:a.message_server)&&void 0!==r?r:"Please Contact Admin",
1statusCode:null!==(d=null==c?void 0:null===(i=c.data)||void 0===i?void 0:null===(o=i.status)||void 0===o?void 0:o.code)&&void 0!==d?d:1})},_=()=>""===F.email||null===F.email||void 0===F.email?(j([{message:"Oops Email Cannot be empty",code:"1"}]),!1):!!(0,v.DT)(F.email)||(j([{message:"Oops type Email worng",code:"1"}]),!1),w=async e=>{try{var t,s,a,n,o,i,r,d;let c=F.email,v=await (0,u.P4)({username:c,otp:e});(null==v?void 0:null===(s=v.data)||void 0===s?void 0:null===(t=s.status)||void 0===t?void 0:t.code)===0?(P(e,F),f(!h)):l({status:!0,message:null!==(r=null==v?void 0:null===(n=v.data)||void 0===n?void 0:null===(a=n.status)||void 0===a?void 0:a.message_server)&&void 0!==r?r:"Please Contact Admin",statusCode:null!==(d=null==v?void 0:null===(i=v.data)||void 0===i?void 0:null===(o=i.status)||void 0===o?void 0:o.code)&&void 0!==d?d:1})}catch(e){alert(e)}},P=async(e,t)=>{try{var s,a,n,o,i,r,d,c,v,m,x,h,p,f,g,F;let y={country_code:"",phone_code:"",new_phone_number:"",new_email:t.email,otp:e};console.log("body",y);let b=await (0,u.Tg)(y);(null==b?void 0:null===(a=b.data)||void 0===a?void 0:null===(s=a.status)||void 0===s?void 0:s.code)===0?l({status:!0,message:null!==(d=null==b?void 0:null===(o=b.data)||void 0===o?void 0:null===(n=o.status)||void 0===n?void 0:n.message_server)&&void 0!==d?d:"Please Contact Admin",statusCode:null!==(c=null==b?void 0:null===(r=b.data)||void 0===r?void 0:null===(i=r.status)||void 0===i?void 0:i.code)&&void 0!==c?c:1}):(l({status:!0,message:null!==(g=null==b?void 0:null===(m=b.data)||void 0===m?void 0:null===(v=m.status)||void 0===v?void 0:v.message_server)&&void 0!==g?g:"Please Contact Admin",statusCode:null!==(F=null==b?void 0:null===(h=b.data)||void 0===h?void 0:null===(x=h.status)||void 0===x?void 0:x.code)&&void 0!==F?F:1}),console.log(null==b?void 0:null===(f=b.data)||void 0===f?void 0:null===(p=f.status)||void 0===p?void 0:p.message_server))}catch(e){console.log("handleEditProfile",e)}};return(0,s.jsxs)(d.A,{children:[h?(0,s.jsx)(o.A,{children:(0,s.jsx)(c.A,{active:h,typeOtp:g,onChanged:w,otpFor:"email",nameModal:null==F?void 0:F.email})}):null,(0,s.jsx)(r.zD,{status_code:Number(t.statusCode),title:t.message,openModal:t.status,onCloseModal:()=>l({...t,status:!t.status})}),(0,s.jsx)("div",{className:"flex flex-col"}),(0,s.jsx)(n.A,{className:(0,m.A)("cursor-pointer inline"),onClicked:e=>(0,v.UZ)("/settings")}),(0,s.jsxs)("div",{className:"flex flex-col ml-[47px] ",children:[(0,s.jsxs)("div",{className:"pb-[13px] flex flex-col border-b",children:[(0,s.jsx)("span",{children:"Change Email"}),(0,s.jsx)("span",{children:"Fill in text box to verify your email. Verification code is needed to secure account"})]}),(0,s.jsxs)("div",{className:"w-[508px] mt-10",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"mb-[8px]",children:"Email"}),(0,s.jsx)(a.pd,{className:(0,m.A)("bg-opacity-0 bg-inherit border rounded-[4px] h-[35px] px-[16px]",b.length>0?"border-[#f73434]":"border-[#FFFFFF]"),name:"email",type:"email",onChange:e=>N(e),value:null==F?void 0:F.email,required:!0,placeholder:"Please insert your email."}),(0,s.jsx)(i.A,{className:"text-red-600 text-sm",messageError:b})]}),(0,s.jsx)("div",{className:"mt-[18px]",children:(0,s.jsx)(a.$n,{className:(0,m.A)("bg-[#0079FF]  py-[12px] px-[24px] rounded-[4px]"),onClick:e=>A(e),children:"Verify Email"})})]})]})]})})},2604:function(e,t,l){"use strict";l.d(t,{P4:function(){return o},Tg:function(){return c},Y6:function(){return r},oK:function(){return i},wP:function(){return d},xq:function(){return n}});var s=l(8068),a=l(7119);let n=e=>(0,a.AT)({url:"".concat(s.ms),method:"POST",data:e,path:"/otp",apiVersion:"v3"}),o=e=>(0,a.AT)({url:"".concat(s.ms),method:"POST",data:e,path:"/verify-otp",apiVersion:"v3"}),i=e=>(0,a.AT)({url:"".concat(s.ms),method:"POST",data:e,path:"/change-password",apiVersion:"v3"}),r=e=>(0,a.AT)({url:"".concat(s.ms),method:"POST",data:e,path:"/verify",apiVersion:"v2"}),d=()=>(0,a.AT)({url:"".concat(s.ms),method:"GET",path:"/country_code"}),c=e=>(0,a.AT)({url:"".concat(s.f4),method:"POST",path:"/user/phone-email",headers:{apikey:s.is},data:e})},2242:function(e){e.exports={scrolled:"BodyContent_scrolled__sEwg0",contained:"BodyContent_contained__WbNHe"}}}]);

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.