PageSourceSearch

https://j2proxy.vn/_next/static/chunks/1422.44b9689c7a1c4d29.js

js j2proxy.vn collected 2026-10-02 02:14:10 UTC 16,584 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1422],{861:(e,t,s)=>{s.d(t,{Qg:()=>n,bL:()=>o});var r=s(12115),a=s(97602),l=s(95155),n=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),i=r.forwardRef((e,t)=>(0,l.jsx)(a.sG.span,{...e,ref:t,style:{...n,...e.style}}));i.displayName="VisuallyHidden";var o=i},6554:(e,t,s)=>{s.d(t,{S:()=>r});let r=(0,s(25959).v)(e=>({pathname:"",isAdminPath:!1,setPathname:t=>e({pathname:t,isAdminPath:t.startsWith("/admin")})}))},12774:(e,t,s)=>{s.d(t,{v:()=>f});var r=s(95155),a=s(13744),l=s(20865),n=s(15653);let i=n.z.object({firstName:n.z.string().min(1,"Họ l\xe0 bắt buộc"),lastName:n.z.string().min(1,"T\xean l\xe0 bắt buộc"),email:n.z.string().optional(),phone:n.z.string().optional(),userName:n.z.string().optional(),password:n.z.string().optional(),oldPassword:n.z.string().optional(),confirmPassword:n.z.string().optional()}).refine(e=>!e.password||!(e.password.trim().length>0)||e.oldPassword&&e.oldPassword.trim().length>0,{message:"Vui l\xf2ng nhập mật khẩu cũ khi thay đổi mật khẩu",path:["oldPassword"]}).refine(e=>{if(e.password&&e.password.trim().length>0){var t;return 0===(null!=(t=e.confirmPassword)?t:"").length||e.password===e.confirmPassword}return!0},{message:"X\xe1c nhận mật khẩu kh\xf4ng khớp",path:["confirmPassword"]}),o={incorrectOldPassword:"Mật khẩu cũ kh\xf4ng ch\xednh x\xe1c",duplicateUserName:"T\xean đăng nhập đ\xe3 tồn tại",duplicateEmail:"Email đ\xe3 được sử dụng",duplicatePhone:"Số điện thoại đ\xe3 được sử dụng"};var d=s(66942),c=s(60919),u=s(61362),m=s(52056),h=s(96199),p=s(12115),x=s(22544),g=s(18720);function f(e){let{initialData:t,onSuccess:s}=e,{data:n}=(0,h.wV)(),[f,v]=(0,p.useState)("info"),[j,N]=(0,p.useState)(!1),w=(0,p.useMemo)(()=>{var e,s,r,a,l;return{firstName:null!=(e=null==t?void 0:t.firstName)?e:"",lastName:null!=(s=null==t?void 0:t.lastName)?s:"",email:null!=(r=null==t?void 0:t.email)?r:"",phone:null!=(a=null==t?void 0:t.phone)?a:"",userName:null!=(l=null==t?void 0:t.userName)?l:"",password:"",oldPassword:"",confirmPassword:""}},[null==t?void 0:t.firstName,null==t?void 0:t.lastName,null==t?void 0:t.email,null==t?void 0:t.phone,null==t?void 0:t.userName]),b=(0,x.mN)({resolver:(0,d.u)(i),values:w}),{formState:{isSubmitting:y}}=b;async function k(e){var t,i,d,h,p;let x=!!((null==(t=e.password)?void 0:t.trim())&&(null==(i=e.oldPassword)?void 0:i.trim()));try{let t={firstName:e.firstName,lastName:e.lastName};if(x&&(t.password=e.password,t.oldPassword=e.oldPassword),await a.A.patchApi("/api/v1/auth/me",t,null==n||null==(d=n.user)?void 0:d.accessToken),x){g.toast.success("Đổi mật khẩu th\xe0nh c\xf4ng. Vui l\xf2ng đăng nhập lại.",{duration:3e3,icon:(0,r.jsx)(u.A,{className:"h-4 w-4 text-green-600"})}),setTimeout(()=>(0,l.CI)({callbackUrl:"/"}),2e3);return}g.toast.success("Cập nhật th\xf4ng tin th\xe0nh c\xf4ng",{duration:5e3,icon:(0,r.jsx)(u.A,{className:"h-4 w-4 text-green-600"})}),null==s||s(e)}catch(e){if(e instanceof c.pe){let t=null==(h=e.response)?void 0:h.data;(null==t?void 0:t.message)?g.toast.error("Cập nhật th\xf4ng tin lỗi",{description:null!=(p=null==o?void 0:o[t.message])?p:t.message,duration:5e3,icon:(0,r.jsx)(m.A,{className:"h-4 w-4 text-red-500"})}):(null==t?void 0:t.errors)&&a.A.handleFormErrorFromResponse(b,t.errors,o)}else g.toast.error("Cập nhật th\xf4ng tin lỗi",{description:"Lỗi kết nối đến m\xe1y chủ.",duration:5e3,icon:(0,r.jsx)(m.A,{className:"h-4 w-4 text-red-500"})})}}return{form:b,onSubmit:k,isSubmitting:y,activeTab:f,setActiveTab:v,openChangePassword:j,setOpenChangePassword:N}}},15239:(e,t,s)=>{s.d(t,{default:()=>a.a});var r=s(54652),a=s.n(r)},18794:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(95155);s(12115);var a=s(86948),l=s(20243);function n(){return(0,r.jsxs)(a.Zp,{className:"mx-auto w-full",children:[(0,r.jsxs)(a.aR,{children:[(0,r.jsx)(l.E,{className:"h-8 w-48"})," "]}),(0,r.jsx)(a.Wu,{children:(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(l.E,{className:"h-4 w-16"})," ",(0,r.jsx)(l.E,{className:"h-32 w-full rounded-lg"})," "]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.E,{className:"h-4 w-24"})," ",(0,r.jsx)(l.E,{className:"h-10 w-full"})," "]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.E,{className:"h-4 w-20"})," ",(0,r.jsx)(l.E,{className:"h-10 w-full"})," "]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.E,{className:"h-4 w-16"})," ",(0,r.jsx)(l.E,{className:"h-10 w-full"})," "]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.E,{className:"h-4 w-24"})," ",(0,r.jsx)(l.E,{className:"h-32 w-full"})," "]}),(0,r.jsx)(l.E,{className:"h-10 w-28"})]})})]})}},20508:(e,t,s)=>{s.d(t,{A:()=>r});let r=(0,s(71847).A)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},20865:(e,t,s)=>{s.d(t,{CI:()=>c,IL:()=>o,Jv:()=>d,LN:()=>i,mD:()=>n});var r=s(96199),a=s(75746),l=s(69715);function n(){return window.location.host}function i(){let e="true"===sessionStorage.getItem("preview_mode")?new URLSearchParams(window.location.search).get("previewTemplate"):null;return e?"/?previewTemplate=".concat(e):"/"}function o(){return"true"===sessionStorage.getItem("preview_mode")}function d(e,t){return o()?(a.k.getState().setUser(l._o),Promise.resolve({code:null,error:null})):(0,r.Jv)(e,t)}function c(e){return o()?(a.k.getState().clearUser(),Promise.resolve(void 0)):(0,r.CI)(e)}},24316:(e,t,s)=>{s.d(t,{s:()=>n});var r=s(13744),a=s(96199),l=s(85400);function n(){let{data:e,status:t}=(0,a.wV)(),{data:s,mutate:n}=(0,l.Ay)("authenticated"===t?"/api/v1/auth/me":null,t=>r.A.fetchApi(t,null==e?void 0:e.accessToken).then(e=>
1null!=e?e:null).catch(()=>null),{revalidateOnFocus:!1});return{user:null!=s?s:null,mutate:n}}},39180:(e,t,s)=>{s.d(t,{r:()=>a});var r=s(68019);let a=(0,s(25959).v)((e,t)=>({config:null,affiliateProgram:null,setConfig:t=>{var s,a;return e({config:{...t,theme:(null==t?void 0:t.theme)?{...t.theme,textmarquee:null!=(a=null!=(s=t.theme.textmarquee)?s:t.theme.textMarquee)?a:"",...t.theme.logo&&{logo:(0,r.V)(t.theme.logo,t.hostName)},...t.theme["logo-l"]&&{"logo-l":(0,r.V)(t.theme["logo-l"],t.hostName)}}:t.theme}})},setAffiliateProgram:t=>e({affiliateProgram:t}),getRotateUrl:()=>{var e,s;return null==(s=t().config)||null==(e=s.theme)?void 0:e.rotateUrl}}))},41052:(e,t,s)=>{s.d(t,{C5:()=>v,MJ:()=>g,Rr:()=>f,eI:()=>p,lR:()=>x,lV:()=>d,zB:()=>u});var r=s(95155),a=s(12115),l=s(32467),n=s(22544),i=s(64269),o=s(76444);let d=n.Op,c=a.createContext({}),u=e=>{let{...t}=e;return(0,r.jsx)(c.Provider,{value:{name:t.name},children:(0,r.jsx)(n.xI,{...t})})},m=()=>{let e=a.useContext(c),t=a.useContext(h),{getFieldState:s}=(0,n.xW)(),r=(0,n.lN)({name:e.name}),l=s(e.name,r);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...l}},h=a.createContext({});function p(e){let{className:t,...s}=e,l=a.useId();return(0,r.jsx)(h.Provider,{value:{id:l},children:(0,r.jsx)("div",{"data-slot":"form-item",className:(0,i.cn)("grid gap-2",t),...s})})}function x(e){let{className:t,...s}=e,{error:a,formItemId:l}=m();return(0,r.jsx)(o.J,{"data-slot":"form-label","data-error":!!a,className:(0,i.cn)("data-[error=true]:text-destructive",t),htmlFor:l,...s})}function g(e){let{...t}=e,{error:s,formItemId:a,formDescriptionId:n,formMessageId:i}=m();return(0,r.jsx)(l.DX,{"data-slot":"form-control",id:a,"aria-describedby":s?"".concat(n," ").concat(i):"".concat(n),"aria-invalid":!!s,...t})}function f(e){let{className:t,...s}=e,{formDescriptionId:a}=m();return(0,r.jsx)("p",{"data-slot":"form-description",id:a,className:(0,i.cn)("text-muted-foreground text-sm",t),...s})}function v(e){var t;let{className:s,...a}=e,{error:l,formMessageId:n}=m(),o=l?String(null!=(t=null==l?void 0:l.message)?t:""):a.children;return o?(0,r.jsx)("p",{"data-slot":"form-message",id:n,className:(0,i.cn)("text-destructive text-sm",s),...a,children:o}):null}},47776:(e,t,s)=>{s.r(t),s.d(t,{default:()=>g});var r=s(95155),a=s(12115),l=s(3998),n=s(86948),i=s(41052),o=s(65142),d=s(80389),c=s(12774),u=s(20508);function m(e){let{initialData:t,pageTitle:s,onSuccess:a}=e,{form:m,onSubmit:h,isSubmitting:p}=(0,c.v)({initialData:t,onSuccess:a});return(0,r.jsxs)(n.Zp,{className:"mx-auto w-full",children:[(0,r.jsx)(n.aR,{children:(0,r.jsxs)(n.ZB,{className:"flex items-center text-left text-2xl font-bold",children:[(0,r.jsx)(u.A,{className:"text-primary mr-2 h-5 w-5"}),s]})}),(0,r.jsx)(n.Wu,{children:(0,r.jsx)(i.lV,{...m,children:(0,r.jsxs)("form",{onSubmit:m.handleSubmit(h),className:"space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Th\xf4ng tin c\xe1 nh\xe2n"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,r.jsx)(i.zB,{control:m.control,name:"firstName",render:e=>{let{field:t}=e;return(0,r.jsxs)(i.eI,{children:[(0,r.jsx)(i.lR,{children:"Họ"}),(0,r.jsx)(i.MJ,{children:(0,r.jsx)(o.p,{placeholder:"Nhập họ",...t})}),(0,r.jsx)(i.C5,{})]})}}),(0,r.jsx)(i.zB,{control:m.control,name:"lastName",render:e=>{let{field:t}=e;return(0,r.jsxs)(i.eI,{children:[(0,r.jsx)(i.lR,{children:"T\xean"}),(0,r.jsx)(i.MJ,{children:(0,r.jsx)(o.p,{placeholder:"Nhập t\xean",...t})}),(0,r.jsx)(i.C5,{})]})}})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Th\xf4ng tin li\xean hệ"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,r.jsx)(i.zB,{control:m.control,name:"phone",render:e=>{let{field:t}=e;return(0,r.jsxs)(i.eI,{children:[(0,r.jsx)(i.lR,{children:"Số điện thoại"}),(0,r.jsx)(i.MJ,{children:(0,r.jsx)(o.p,{disabled:!0,placeholder:"Nhập số điện thoại",...t})}),(0,r.jsx)(i.C5,{})]})}}),(0,r.jsx)(i.zB,{control:m.control,name:"email",render:e=>{let{field:t}=e;return(0,r.jsxs)(i.eI,{children:[(0,r.jsx)(i.lR,{children:"Email"}),(0,r.jsx)(i.MJ,{children:(0,r.jsx)(o.p,{disabled:!0,placeholder:"Nhập email",type:"email",...t})}),(0,r.jsx)(i.C5,{})]})}})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Th\xf4ng tin t\xe0i khoản"}),(0,r.jsx)(i.zB,{control:m.control,name:"userName",render:e=>{let{field:t}=e;return(0,r.jsxs)(i.eI,{children:[(0,r.jsx)(i.lR,{children:"T\xean đăng nhập"}),(0,r.jsx)(i.MJ,{children:(0,r.jsx)(o.p,{disabled:!0,placeholder:"Nhập t\xean đăng nhập",...t})}),(0,r.jsx)(i.C5,{})]})}})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Đổi mật khẩu (t\xf9y chọn)"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[(0,r.jsx)(i.zB,{control:m.control,name:"oldPassword",render:e=>{let{field:t}=e;return(0,r.jsxs)(i.eI,{children:[(0,r.jsx)(i.lR,{children:"Mật khẩu cũ"}),(0,r.jsx)(i.MJ,{children:(0,r.jsx)(d.c,{placeholder:"Nhập mật khẩu cũ",...t})}),(0,r.jsx)(i.C5,{})]})}}),(0,r.jsx)(i.zB,{control:m.control,name:"password",render:e=>{let{field:t}=e;return(0,r.jsxs)(i.eI,{children:[(0,r.jsx)(i.lR,{children:"Mật khẩu mới"}),(0,r.jsx)(i.MJ,{children:(0,r.jsx)(d.c,{placeholder:"Nhập mật khẩu mới",...t})}),(0,r.jsx)(i.C5,{})]})}})]}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Để trống nếu kh\xf4ng muốn thay đổi mật khẩu"})]}),(0,r.jsx)("div",{className:"flex justify-end pt-4",children:(0,r.jsx)(l.$,{type:"submit",size:"lg",disabled:p,children:p?"Đang cập nhật...":"Cập nhật th\xf4ng tin"})})]})})})]})}var h=s(60183),p=s(18794),x=s(24316);function g(){let{user:e,mutate:t}=(0,x.s)();return(0,r.jsx)(h.default,{scrollable:!0,children:(0,r.jsx)("div",{className:"flex-1 space-y-4",children:(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)(p.A,{}),children:(0,r.jsx)(m,{initialData:e,pageTitle:"Th\xf4ng tin t\xe0i khoản",onSuccess:function(s){e&&t({...e,firstName:s.firstName,lastName:s.lastName},{revalidate:!0})}})})})})}},54652:(e,t,s)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{default:function(){return o},getImageProps:function(){return i}});let r=s(28140),a=s(75040),l=s(81356),n=r._(s(71124));function i(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,s]of Object.entries(t))void 0===s&&delete t[e];return{props:t}}let o=l.Image},68019:(e,t,s)=>{s.d(t,{V:()=>r});let r=(e,t)=>{if(!e||"string"!=typeof e)return"";let s=e.trim();if(s.startsWith("https://")||s.startsWith("http://"))return s.replace("/api/v1","");if((e=>e.startsWith("/api/v1/files")||e.startsWith("/files/")||e.includes("/files/"))(s)){let e="https://api.homeproxy.vn".replace(/\/$/,"");if(e){let t=s.startsWith("/")?s:"/".concat(s);return"".concat(e).concat(t).replace("/api/v1","")}}let r=(t||"https://app.homeproxy.vn").trim().replace(/^https?:\/\//,"").replace(/\/$/,"");return r?s.startsWith("/")?"https://".concat(r).concat(s).replace("/api/v1",""):"https://".concat(r,"/").concat(s).replace("/api/v1",""):s}},75746:(e,t,s)=>{s.d(t,{k:()=>r});let r=(0,s(25959).v)()(e=>({user:null,setUser:t=>e({user:t}),updateCoin:t=>e(e=>({user:e.user?{...e.user,coin:Number(e.user.coin)+t}:null})),clearUser:()=>e({user:null})}))},76444:(e,t,s)=>{s.d(t,{J:()=>n});var r=s(95155);s(12115);var a=s(10489),l=s(64269);function n(e){let{className:t,...s}=e;return(0,r.jsx)(a.b,{"data-slot":"label",className:(0,l.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}},80389:(e,t,s)=>{s.d(t,{c:()=>i});var r=s(95155);s(12115);var a=s(55817),l=s(31719),n=s(64269);function i(e){let{className:t,...s}=e;return(0,r.jsx)(a.bL,{children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(a.pd,{className:(0,n.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-primary focus-visible:ring-primary/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...s}),(0,r.jsx)(a.lM,{id:s.id+"btn-toggle",className:"absolute top-1/2 right-2 -translate-y-1/2 text-gray-500 hover:text-gray-700",children:(0,r.jsx)(a.In,{visible:(0,r.jsx)(l.N5q,{}),hidden:(0,r.jsx)(l.V$C,{})})})]})})}},86948:(e,t,s)=>{s.d(t,{BT:()=>o,Wu:()=>d,ZB:()=>i,Zp:()=>l,aR:()=>n,wL:()=>c});var r=s(95155);s(12115);var a=s(64269);function l(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card",className:(0,a.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...s})}function n(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...s})}function i(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",t),...s})}function o(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-muted-foreground text-sm",t),...s})}function d(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-4",t),...s})}function c(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center px-4 [.border-t]:pt-6",t),...s})}}}]);

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.