-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2652.1fec5bc36f07e8a8.js
1 lines (1 loc) · 252 KB
/
2652.1fec5bc36f07e8a8.js
1
"use strict";(self.webpackChunkcheapflightclient=self.webpackChunkcheapflightclient||[]).push([[2652],{25614:(te,M,d)=>{d.d(M,{j:()=>s});var _=d(94650);let s=(()=>{class p{constructor(){this.regex=new RegExp(/^[a-zA-Z0-9]*$/)}onInput(C){const E=C.target,b=E.value;if(!this.regex.test(b)){const I=b.replace(/[^a-zA-Z0-9]*/g,"");E.value=I,E.dispatchEvent(new Event("input",{bubbles:!0}))}}}return p.\u0275fac=function(C){return new(C||p)},p.\u0275dir=_.lG2({type:p,selectors:[["","CfAlphanumeric",""]],hostBindings:function(C,E){1&C&&_.NdJ("input",function(I){return E.onInput(I)})},standalone:!0}),p})()},7453:(te,M,d)=>{d.d(M,{z:()=>s});var _=d(94650);let s=(()=>{class p{onInput(C){const E=C.target,b=E.value;if(!/^[0-9]*$/.test(b)){const e=b.replace(/[^0-9]*/g,"");E.value=e,E.dispatchEvent(new Event("input",{bubbles:!0}))}}}return p.\u0275fac=function(C){return new(C||p)},p.\u0275dir=_.lG2({type:p,selectors:[["","CfNumberic",""]],hostBindings:function(C,E){1&C&&_.NdJ("input",function(I){return E.onInput(I)})},standalone:!0}),p})()},52652:(te,M,d)=>{d.r(M),d.d(M,{AgentDetailPageComponent:()=>La,AgentManagePageComponent:()=>oi,CreateAgentPageComponent:()=>en,CreateTitlePageComponent:()=>xe,CreateUserPageComponent:()=>Qn,TitleManagePageComponent:()=>be,UserDetailPageComponent:()=>Wi,UserManagePageComponent:()=>nt});var _=d(36895),s=d(24006),p=d(44143),S=d(27898),C=d(83700),E=d(62331),b=d(4128),I=d(74713),e=d(94650),R=d(14580),f=d(82761),Z=d(2225);function U(n,a){1&n&&e._UZ(0,"cf-input-hint",19),2&n&&e.Q6J("hint","Nh\u1eadp t\xean ch\u1ee9c v\u1ee5")}function J(n,a){1&n&&e._UZ(0,"cf-input-hint",19),2&n&&e.Q6J("hint","Nh\u1eadp m\xe3 ch\u1ee9c v\u1ee5")}function ae(n,a){1&n&&e._UZ(0,"cf-input-hint",19),2&n&&e.Q6J("hint","Ch\u1ecdn lo\u1ea1i ch\u1ee9c v\u1ee5")}function _e(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",20)(1,"div")(2,"cf-checkbox",21),e.NdJ("checkChange",function(o){const c=e.CHM(t).$implicit,u=e.oxw();return e.KtG(u.roleChange(o,c))}),e.TgZ(3,"div",22),e._uU(4),e.qZA()()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Q6J("checked",t.actived),e.xp6(2),e.hij(" ",t.name," ")}}function pe(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",20)(1,"div")(2,"cf-checkbox",21),e.NdJ("checkChange",function(o){const c=e.CHM(t).$implicit,u=e.oxw();return e.KtG(u.roleChange(o,c))}),e.TgZ(3,"div",22),e._uU(4),e.qZA()()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Q6J("checked",t.actived),e.xp6(2),e.hij(" ",t.name," ")}}function ge(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",20)(1,"div")(2,"cf-checkbox",23),e.NdJ("checkChange",function(o){const c=e.CHM(t).$implicit,u=e.oxw(2);return e.KtG(u.titleUpChange(o,c))}),e.TgZ(3,"div",22),e._uU(4),e.qZA()()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Q6J("disabled",t.disabled)("checked",t.actived),e.xp6(2),e.hij(" ",t.name," ")}}function he(n,a){if(1&n&&(e.TgZ(0,"div",11)(1,"div",12)(2,"div",13),e._uU(3,"Ch\u1ee9c v\u1ee5 c\xf3 th\u1ec3 l\xean"),e.qZA(),e.TgZ(4,"div",14),e.YNc(5,ge,5,3,"div",15),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.Q6J("ngForOf",t.titleUps)}}function me(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",20)(1,"div")(2,"cf-checkbox",23),e.NdJ("checkChange",function(o){const c=e.CHM(t).$implicit,u=e.oxw(2);return e.KtG(u.titleDownChange(o,c))}),e.TgZ(3,"div",22),e._uU(4),e.qZA()()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Q6J("disabled",t.disabled)("checked",t.actived),e.xp6(2),e.hij(" ",t.name," ")}}function fe(n,a){if(1&n&&(e.TgZ(0,"div",11)(1,"div",12)(2,"div",13),e._uU(3,"Ch\u1ee9c v\u1ee5 c\xf3 th\u1ec3 xu\u1ed1ng"),e.qZA(),e.TgZ(4,"div",14),e.YNc(5,me,5,3,"div",15),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.Q6J("ngForOf",t.titleDowns)}}function ve(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.submit())}),e._uU(1,"T\u1ea1o m\u1edbi"),e.qZA()}}function Ce(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.submit())}),e._uU(1,"L\u01b0u"),e.qZA()}}let xe=(()=>{class n{constructor(t,i,o,r,c,u){if(this._fb=t,this._roleService=i,this._router=o,this._toastService=r,this._route=c,this._titleService=u,this.allRoles=[],this.allRoleAdvance=[],this.titleUps=[],this.titleDowns=[],this.enabledRole=[],this.enableRoleAdvance=[],this.enabledTitleUp=[],this.enabledTitleDown=[],this.optionTitleType=[],this.editMode=!1,this.titleForm=t.group({name:["",s.kI.required],code:["",s.kI.required],type:["",s.kI.required]}),c.snapshot.params.id){this.editMode=!0,this.id=c.snapshot.params.id;const h=[this._titleService.getAllTitleType(),this._roleService.getAllRole(),this._titleService.getAllTitle(),u.getTitle(this.id)];(0,b.D)(h).subscribe({next:m=>{this.initTitleType(m[0]),this.initRoles(m[1]),this.initTitle(m[2]),this.initEditTitle(m[3])}})}else{const h=[this._titleService.getAllTitleType(),this._roleService.getAllRole(),this._titleService.getAllTitle()];(0,b.D)(h).subscribe({next:m=>{this.initTitleType(m[0]),this.initRoles(m[1]),this.initTitle(m[2])}})}}initTitleType(t){this.optionTitleType=t.data}initRoles(t){this.allRoles=t.data.map(i=>({name:i.name,id:i.id,actived:!1})),this.allRoleAdvance=t.data.map(i=>({name:i.name,id:i.id,actived:!1}))}initEditTitle(t){this.titleForm.controls.name.setValue(t.data.name),this.titleForm.controls.code.setValue(t.data.code),this.titleForm.controls.type.setValue(t.data.type),this.allRoles.forEach(i=>{t.data.roleIds.includes(i.id)&&(i.actived=!0)}),this.allRoleAdvance.forEach(i=>{t.data.roleCanAdvances.includes(i.id)&&(i.actived=!0)}),this.titleUps.forEach(i=>{t.data.titleIdsCanUp.includes(i.id)&&this.titleUpChange(!0,i)}),this.titleDowns.forEach(i=>{t.data.titleIdsCanDown.includes(i.id)&&this.titleDownChange(!0,i)})}initTitle(t){this.titleUps=t.data.filter(i=>i.id!==this.id).map(i=>({id:i.id,name:i.name,actived:!1,disabled:!1})),this.titleDowns=t.data.filter(i=>i.id!==this.id).map(i=>({id:i.id,name:i.name,actived:!1,disabled:!1}))}submit(){this.enabledRole=this.allRoles.filter(t=>t.actived).map(t=>t.id),this.enableRoleAdvance=this.allRoleAdvance.filter(t=>t.actived).map(t=>t.id),this.enabledTitleUp=this.titleUps.filter(t=>t.actived).map(t=>t.id),this.enabledTitleDown=this.titleDowns.filter(t=>t.actived).map(t=>t.id),this.titleForm.valid&&(this.editMode?this.processUpdateTitle():this.processCreateTitle())}processUpdateTitle(){this._titleService.updateTitle({id:this.id,name:this.titleForm.controls.name.value,code:this.titleForm.controls.code.value,type:this.titleForm.controls.type.value,roleIds:this.enabledRole,roleCanAdvances:this.enableRoleAdvance,titleIdsCanUp:this.enabledTitleUp,titleIdsCanDown:this.enabledTitleDown}).subscribe({next:t=>{this._router.navigate(["admin/title-manage"])},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"",sticky:!0})}})}processCreateTitle(){this._titleService.createTitle({name:this.titleForm.controls.name.value,code:this.titleForm.controls.code.value,type:this.titleForm.controls.type.value,roleIds:this.enabledRole,roleCanAdvances:this.enableRoleAdvance,titleIdsCanUp:this.enabledTitleUp,titleIdsCanDown:this.enabledTitleDown}).subscribe({next:t=>{this._router.navigate(["admin/title-manage"])},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"",sticky:!0})}})}roleChange(t,i){i.actived=t}typeChange(t){this.titleForm.controls.type.setValue(t.code)}titleUpChange(t,i){if(i.actived=t,t){const o=this.titleDowns.find(r=>r.id===i.id);o&&(o.disabled=!0)}else{const o=this.titleDowns.find(r=>r.id===i.id);o&&(o.disabled=!1)}}titleDownChange(t,i){if(i.actived=t,t){const o=this.titleUps.find(r=>r.id===i.id);o&&(o.disabled=!0)}else{const o=this.titleUps.find(r=>r.id===i.id);o&&(o.disabled=!1)}}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(s.qu),e.Y36(R.Nj),e.Y36(f.F0),e.Y36(E.BX),e.Y36(f.gz),e.Y36(Z.yD))},n.\u0275cmp=e.Xpm({type:n,selectors:[["create-title-page"]],standalone:!0,features:[e.jDz],decls:39,vars:18,consts:[[1,"flex","justify-center","py-4","px-[30px]","rounded-lg"],[1,"bg-neutral-white","rounded-lg","shadow-cf-md","w-[1000px]","max-w-[1000px]"],[1,"p-4","flex","justify-between","items-center"],[1,"text-heading-sm"],[1,"p-4"],[1,"grow-[400]","!w-full",3,"status"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],["cf-input","","size","medium","placeholder","Nh\u1eadp t\xean",3,"formControl"],["cfHint","",3,"hint",4,"ngIf"],["cf-input","","size","medium","placeholder","Nh\u1eadp m\xe3 ch\u1ee9c v\u1ee5",3,"formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn lo\u1ea1i ch\u1ee9c v\u1ee5",1,"!max-w-none",3,"status","data","allowSearch","ngModel","selectedChange"],[1,"p-4","pt-0","flex","flex-col","gap-y-6"],[1,"flex","flex-col","items-start","gap-y-4"],[1,"text-espressive-md"],[1,"pl-2","flex","flex-wrap","gap-y-4","w-full"],["class","flex items-center w-1/2",4,"ngFor","ngForOf"],["class","p-4 pt-0 flex flex-col gap-y-6",4,"ngIf"],[1,"p-4","flex","justify-end"],["cf-button","","size","medium","color","primary-1",3,"click",4,"ngIf"],["cfHint","",3,"hint"],[1,"flex","items-center","w-1/2"],["size","medium",3,"checked","checkChange"],[1,"text-espressive-md","text-neutral-gray-5"],["size","medium",3,"disabled","checked","checkChange"],["cf-button","","size","medium","color","primary-1",3,"click"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e._uU(4,"Th\xeam m\u1edbi ch\u1ee9c v\u1ee5"),e.qZA()(),e.TgZ(5,"div",4)(6,"cf-input-group",5)(7,"label",6),e._uU(8," T\xean ch\u1ee9c v\u1ee5 "),e.qZA(),e._UZ(9,"input",7),e.YNc(10,U,1,1,"cf-input-hint",8),e.qZA(),e.TgZ(11,"cf-input-group",5)(12,"label",6),e._uU(13," M\xe3 ch\u1ee9c v\u1ee5 "),e.qZA(),e._UZ(14,"input",9),e.YNc(15,J,1,1,"cf-input-hint",8),e.qZA(),e.TgZ(16,"cf-select",10),e.NdJ("selectedChange",function(r){return i.typeChange(r)}),e.TgZ(17,"label",6)(18,"span"),e._uU(19,"Lo\u1ea1i ch\u1ee9c v\u1ee5"),e.qZA()(),e.YNc(20,ae,1,1,"cf-input-hint",8),e.qZA()(),e.TgZ(21,"div",11)(22,"div",12)(23,"div",13),e._uU(24,"Ch\u1ecdn quy\u1ec1n c\u01a1 b\u1ea3n"),e.qZA(),e.TgZ(25,"div",14),e.YNc(26,_e,5,2,"div",15),e.qZA()()(),e.TgZ(27,"div",11)(28,"div",12)(29,"div",13),e._uU(30,"Ch\u1ecdn quy\u1ec1n n\xe2ng cao c\xf3 th\u1ec3 c\xf3"),e.qZA(),e.TgZ(31,"div",14),e.YNc(32,pe,5,2,"div",15),e.qZA()()(),e.YNc(33,he,6,1,"div",16),e.YNc(34,fe,6,1,"div",16),e.TgZ(35,"div",17),e.YNc(36,ve,2,0,"button",18),e.YNc(37,Ce,2,0,"button",18),e.qZA()()(),e._UZ(38,"cf-toast")),2&t&&(e.xp6(6),e.Q6J("status",i.titleForm.controls.name.invalid&&(i.titleForm.controls.name.dirty||i.titleForm.controls.name.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",i.titleForm.controls.name),e.xp6(1),e.Q6J("ngIf",(null==i.titleForm.controls.name.errors?null:i.titleForm.controls.name.errors.required)&&(i.titleForm.controls.name.dirty||i.titleForm.controls.name.touched)),e.xp6(1),e.Q6J("status",i.titleForm.controls.code.invalid&&(i.titleForm.controls.code.dirty||i.titleForm.controls.code.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",i.titleForm.controls.code),e.xp6(1),e.Q6J("ngIf",(null==i.titleForm.controls.code.errors?null:i.titleForm.controls.code.errors.required)&&(i.titleForm.controls.code.dirty||i.titleForm.controls.code.touched)),e.xp6(1),e.Q6J("status",i.titleForm.controls.type.invalid&&(i.titleForm.controls.type.dirty||i.titleForm.controls.type.touched)?"error":"default")("data",i.optionTitleType)("allowSearch",!1)("ngModel",i.titleForm.controls.type.value)("allowSearch",!0),e.xp6(4),e.Q6J("ngIf",i.titleForm.controls.type.hasError("required")&&i.titleForm.controls.type.touched),e.xp6(6),e.Q6J("ngForOf",i.allRoles),e.xp6(6),e.Q6J("ngForOf",i.allRoleAdvance),e.xp6(1),e.Q6J("ngIf",i.titleUps.length>0),e.xp6(1),e.Q6J("ngIf",i.titleDowns.length>0),e.xp6(2),e.Q6J("ngIf",!i.editMode),e.xp6(1),e.Q6J("ngIf",i.editMode))},dependencies:[_.ez,_.sg,_.O5,s.u5,s.Fj,s.JJ,s.On,s.UX,s.oH,p.j$,p.ND,p.BN,p.v2,S.u,C.N8,C.Xq,E.hj,I.q],encapsulation:2}),n})();var l=d(72506),w=d(48373),D=d(67460),k=d(28746);function Ee(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr",12)(1,"td",13),e._uU(2),e.qZA(),e.TgZ(3,"td",13),e._uU(4),e.qZA(),e.TgZ(5,"td",14)(6,"button",15),e.NdJ("click",function(){const r=e.CHM(t).$implicit,c=e.oxw();return e.KtG(c.edit(r.id))}),e._uU(7,"S\u1eeda"),e.qZA()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.name),e.xp6(2),e.Oqu(t.type)}}function ye(n,a){1&n&&e._UZ(0,"cf-spinner")}const Ae=function(){return{num:25}},Te=function(){return{num:50}},De=function(){return{num:75}},Ze=function(){return{num:100}},Fe=function(n,a,t,i){return[n,a,t,i]};let be=(()=>{class n{constructor(t,i,o){this._titleService=i,this._router=o,this.listOfData=[],this.pageSize=25,this.currentPage=1,this.isLoading=!1,this.sortChange=(r,c)=>{let u=c.map(h=>h);for(let h=0;h<r.length;h++){const m=r[h];"name"===m.key&&(u=u.sort("ascend"===m.sort?(T,v)=>this.increaseAlphabetSort(T.name,v.name):(T,v)=>this.decreaseAlphabetSort(T.name,v.name)))}return u},this.searchChange=(r,c)=>c,this.increaseAlphabetSort=(r,c)=>r<c?-1:r>c?1:0,this.decreaseAlphabetSort=(r,c)=>r>c?-1:r<c?1:0,t.registerIcons([]),this.onSearch()}onSearch(){this.isLoading=!0,this._titleService.getAllTitle().pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:t=>{this.listOfData=t.data}})}checkChange(t){this.pageSize=parseInt(t)}addTitle(){this._router.navigate(["admin/create-title"])}edit(t){this._router.navigate([`admin/edit-title/${t}`])}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(l.KNP),e.Y36(Z.yD),e.Y36(f.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-title-manage-page"]],standalone:!0,features:[e.jDz],decls:19,vars:18,consts:[[1,"py-4","px-[30px]","rounded-lg","flex","justify-center"],[1,"bg-neutral-white","rounded-lg","shadow-cf-md","max-w-[1000px]","w-[1000px]"],[1,"p-4","flex","justify-between","items-center"],[1,"text-heading-sm"],["cf-button","","type","secondary",3,"click"],[1,"",3,"fnSort","fnSearch","pageSizeList","listData","pageSize"],["managerTable",""],["cf-thead",""],["cf-th","",1,"whitespace-nowrap",3,"sortName"],["cf-th","",1,"whitespace-nowrap","flex","justify-end"],["ngFor","",3,"ngForOf"],[4,"ngIf"],[1,"border-b","border-neutral-gray-1"],["cf-td","",1,"py-2","px-3","text-body-sm"],["cf-td","",1,"py-2","px-3","flex","justify-end"],["cf-button","","size","small","type","secondary",3,"click"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e._uU(4,"Qu\u1ea3n l\xfd ch\u1ee9c v\u1ee5"),e.qZA(),e.TgZ(5,"button",4),e.NdJ("click",function(){return i.addTitle()}),e._uU(6," Th\xeam ch\u1ee9c v\u1ee5 "),e.qZA()(),e.TgZ(7,"cf-table",5,6)(9,"thead",7)(10,"th",8),e._uU(11,"Ch\u1ee9c v\u1ee5"),e.qZA(),e.TgZ(12,"th",8),e._uU(13,"Lo\u1ea1i"),e.qZA(),e.TgZ(14,"th",9),e._uU(15,"Thao t\xe1c"),e.qZA()(),e.TgZ(16,"tbody"),e.YNc(17,Ee,8,2,"ng-template",10),e.qZA()()()(),e.YNc(18,ye,1,0,"cf-spinner",11)),2&t){const o=e.MAs(8);e.xp6(7),e.Q6J("fnSort",i.sortChange)("fnSearch",i.searchChange)("pageSizeList",e.l5B(13,Fe,e.DdM(9,Ae),e.DdM(10,Te),e.DdM(11,De),e.DdM(12,Ze)))("listData",i.listOfData)("pageSize",i.pageSize),e.xp6(3),e.Q6J("sortName","name"),e.xp6(2),e.Q6J("sortName","name"),e.xp6(5),e.Q6J("ngForOf",o.partOfdata),e.xp6(1),e.Q6J("ngIf",i.isLoading)}},dependencies:[_.ez,_.sg,_.O5,l.AxE,C.N8,C.Xq,w.rC,w.E_,w.zs,w.qS,D.OR],encapsulation:2}),n})();var L=d(37094),z=d(4688),Y=d(19123),g=d(40899),K=d(77296),re=d(74891),H=d(98184);function ke(n,a){1&n&&e._UZ(0,"cf-icon",11)}function Ie(n,a){1&n&&e._UZ(0,"cf-icon",12)}function Ue(n,a){1&n&&(e.TgZ(0,"div"),e._uU(1,"Ho\u1ea1t \u0111\u1ed9ng"),e.qZA())}function Ne(n,a){1&n&&(e.TgZ(0,"div"),e._uU(1,"Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng"),e.qZA())}function we(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",13)(1,"div",14)(2,"div",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.stateChange("ACTIVE"))}),e._uU(3," Ho\u1ea1t \u0111\u1ed9ng"),e.qZA(),e.TgZ(4,"div",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.stateChange("BLOCK"))}),e._uU(5," Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng"),e.qZA()()()}}function qe(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",4,5),e.NdJ("click",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.click(o))}),e.YNc(3,ke,1,0,"cf-icon",6),e.YNc(4,Ie,1,0,"cf-icon",7),e.TgZ(5,"div",8),e.YNc(6,Ue,2,0,"div",0),e.YNc(7,Ne,2,0,"div",0),e.qZA(),e._UZ(8,"cf-icon",9),e.qZA(),e.YNc(9,we,6,0,"ng-template",10),e.NdJ("overlayOutsideClick",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.outsideClick(o))}),e.qZA()}if(2&n){const t=e.MAs(2),i=e.oxw(2);e.xp6(3),e.Q6J("ngIf","ACTIVE"===i.state),e.xp6(1),e.Q6J("ngIf","BLOCK"===i.state),e.xp6(2),e.Q6J("ngIf","ACTIVE"===i.state),e.xp6(1),e.Q6J("ngIf","BLOCK"===i.state),e.xp6(2),e.Q6J("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayOpen",i.isOpen)("cdkConnectedOverlayPositions",i.bottomCenter)}}function Pe(n,a){1&n&&(e.TgZ(0,"div"),e._uU(1,"Ho\u1ea1t \u0111\u1ed9ng"),e.qZA())}function Je(n,a){1&n&&(e.TgZ(0,"div"),e._uU(1,"Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng"),e.qZA())}function Se(n,a){if(1&n&&(e.YNc(0,Pe,2,0,"div",0),e.YNc(1,Je,2,0,"div",0)),2&n){const t=e.oxw(2);e.Q6J("ngIf","ACTIVE"===t.state),e.xp6(1),e.Q6J("ngIf","BLOCK"===t.state)}}function Me(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,qe,10,7,"div",2),e.YNc(2,Se,2,2,"ng-template",null,3,e.W1O),e.qZA()),2&n){const t=e.MAs(3),i=e.oxw();e.xp6(1),e.Q6J("ngIf",i.canEditStatus)("ngIfElse",t)}}function Qe(n,a){1&n&&(e.TgZ(0,"div",16),e._UZ(1,"cf-icon",17),e._uU(2," Ch\u01b0a k\xedch ho\u1ea1t\n"),e.qZA())}let ce=(()=>{class n{constructor(){this.valueChange=new e.vpe,this.isOpen=!1,this.bottomCenter=[{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetX:0,offsetY:0}]}click(t){this.isOpen=!this.isOpen,t.stopPropagation()}outsideClick(t){this.isOpen=!1}stateChange(t){this.isOpen=!1,this.valueChange.emit(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["change-state-user"]],inputs:{state:"state",canEditStatus:"canEditStatus"},outputs:{valueChange:"valueChange"},standalone:!0,features:[e.jDz],decls:2,vars:2,consts:[[4,"ngIf"],["class","px-3 py-1.5 text-body-md-short text-neutral-gray-6 flex items-center border border-neutral-gray-3 rounded w-fit",4,"ngIf"],[4,"ngIf","ngIfElse"],["contentTpl",""],["cdkOverlayOrigin","","tabIndex","-1",1,"flex","items-center","gap-x-2","cursor-pointer","rounded","border","border-neutral-gray-2","px-[13px]","py-1",3,"click"],["originOverlay","cdkOverlayOrigin"],["cfHeadIcon","","icon","circle_check","size","small","class","text-secondary-1-4",4,"ngIf"],["cfHeadIcon","","icon","circle_remove","size","small",4,"ngIf"],[1,"text-body-md","text-neutral-black","whitespace-nowrap"],["icon","down","size","small",1,"text-neutral-gray-5"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","overlayOutsideClick"],["cfHeadIcon","","icon","circle_check","size","small",1,"text-secondary-1-4"],["cfHeadIcon","","icon","circle_remove","size","small"],[1,"shadow-cf-lg","w-[184px]","bg-neutral-white","rounded","py-2"],[1,"flex","flex-col","cursor-pointer"],[1,"py-2.5","px-3","text-body-md-short","hover:bg-red-1","hover:text-red-4",3,"click"],[1,"px-3","py-1.5","text-body-md-short","text-neutral-gray-6","flex","items-center","border","border-neutral-gray-3","rounded","w-fit"],["icon","circle_warning",1,"text-secondary-7-3","mr-2"]],template:function(t,i){1&t&&(e.YNc(0,Me,4,2,"div",0),e.YNc(1,Qe,3,0,"div",1)),2&t&&(e.Q6J("ngIf","INACTIVE"!==i.state),e.xp6(1),e.Q6J("ngIf","INACTIVE"===i.state))},dependencies:[_.ez,_.O5,re.f,H.pI,H.xu,l.AxE,l.Sm8],encapsulation:2}),n})();var j=d(97579),ne=d(9381);function Be(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"cf-select",44),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.titleId=o)}),e.TgZ(1,"label",3)(2,"span"),e._uU(3,"Ch\u1ee9c danh"),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("status","default")("data",t.titleOption)("allowSearch",!1)("ngModel",t.filterData.titleId)}}function Ye(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",45)(1,"div",46),e._UZ(2,"div",47),e.TgZ(3,"cf-input-group",5),e._UZ(4,"cf-icon",6),e.TgZ(5,"input",48,8),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.searchText=o)}),e.qZA()(),e.TgZ(7,"cf-select",49),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.state=o)}),e.TgZ(8,"label",3)(9,"span"),e._uU(10,"Tr\u1ea1ng th\xe1i"),e.qZA()()(),e.TgZ(11,"cf-select",50),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.titleId=o)}),e.TgZ(12,"label",3)(13,"span"),e._uU(14,"Vai tr\xf2"),e.qZA()()()(),e.TgZ(15,"div")(16,"button",51),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onSearch())}),e._UZ(17,"cf-icon",10),e.TgZ(18,"div"),e._uU(19,"T\xecm ki\u1ebfm"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(5),e.Q6J("ngModel",t.filterData.searchText),e.xp6(2),e.Q6J("status","default")("data",t.statusOption)("allowSearch",!1)("ngModel",t.filterData.state),e.xp6(4),e.Q6J("status","default")("data",t.titleOption)("allowSearch",!1)("ngModel",t.filterData.titleId)}}function Oe(n,a){if(1&n&&(e.TgZ(0,"cf-radio",56),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.code),e.xp6(1),e.Oqu(t.name)}}function Re(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",52)(1,"cf-radio-group",53),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.state=o)}),e.YNc(2,Oe,2,2,"cf-radio",54),e.qZA(),e.TgZ(3,"button",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onSearch())}),e._uU(4,"X\xe1c nh\u1eadn"),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.filterData.state),e.xp6(1),e.Q6J("ngForOf",t.statusOption)}}function Le(n,a){if(1&n&&(e.TgZ(0,"cf-radio",56),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.code),e.xp6(1),e.Oqu(t.name)}}function ze(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",52)(1,"cf-radio-group",53),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.titleId=o)}),e.YNc(2,Le,2,2,"cf-radio",54),e.qZA(),e.TgZ(3,"button",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onSearch())}),e._uU(4,"X\xe1c nh\u1eadn"),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.filterData.titleId),e.xp6(1),e.Q6J("ngForOf",t.titleOption)}}function Ke(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",67),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw();return e.KtG(r.onDelete(o.userId))}),e._uU(1,"X\xf3a"),e.qZA()}}function He(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr",57)(1,"td",58),e._uU(2),e.qZA(),e.TgZ(3,"td",58),e._uU(4),e.qZA(),e.TgZ(5,"td",58)(6,"cf-label",59)(7,"div",60),e._uU(8),e.qZA()()(),e.TgZ(9,"td",61),e._uU(10),e.qZA(),e.TgZ(11,"td",61),e._uU(12),e.qZA(),e.TgZ(13,"td",61),e._uU(14),e.ALo(15,"date"),e.qZA(),e.TgZ(16,"td",61)(17,"change-state-user",62),e.NdJ("valueChange",function(o){const c=e.CHM(t).$implicit,u=e.oxw();return e.KtG(u.stateChange(o,c))}),e.qZA()(),e.TgZ(18,"td",63)(19,"div",64)(20,"div",65),e.NdJ("click",function(){const r=e.CHM(t).$implicit,c=e.oxw();return e.KtG(c.onEdit(r.userId,r.color))}),e._uU(21,"Chi ti\u1ebft"),e.qZA(),e.YNc(22,Ke,2,0,"div",66),e.qZA()()()}if(2&n){const t=a.$implicit,i=e.oxw();e.xp6(2),e.Oqu(t.userName),e.xp6(2),e.Oqu(t.displayName),e.xp6(2),e.Q6J("color",t.color)("type","inverted")("size","small"),e.xp6(2),e.hij(" ",t.title.name," "),e.xp6(2),e.Oqu(t.email),e.xp6(2),e.Oqu(t.phone),e.xp6(2),e.Oqu(e.xi3(15,13,t.dateCreated,"dd/MM/yyyy")),e.xp6(3),e.Q6J("state",t.state)("canEditStatus",t.canEditStatus),e.xp6(1),e.Q6J("sticky","right"),e.xp6(4),e.Q6J("ngIf",i.canDelete)}}function je(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",69),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw();return e.KtG(r.onEdit(o.userId,o.color))}),e.TgZ(1,"div",70)(2,"div",71),e._uU(3,"M\xe3 \u0111\u1ecbnh danh"),e.qZA(),e.TgZ(4,"div",72),e._uU(5),e.qZA()(),e.TgZ(6,"div",70)(7,"div",71),e._uU(8,"Ng\xe0y t\u1ea1o"),e.qZA(),e.TgZ(9,"div",72),e._uU(10),e.ALo(11,"date"),e.qZA()(),e.TgZ(12,"div",70)(13,"div",71),e._uU(14,"Ch\u1ee9c danh"),e.qZA(),e.TgZ(15,"cf-label",73),e._uU(16),e.qZA()(),e.TgZ(17,"div",70)(18,"div",71),e._uU(19,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.TgZ(20,"change-state-user",62),e.NdJ("valueChange",function(o){e.CHM(t);const r=e.oxw().$implicit,c=e.oxw();return e.KtG(c.mobileStateChange(o,r))}),e.qZA()()()}if(2&n){const t=e.oxw().$implicit;e.xp6(5),e.Oqu(t.userName),e.xp6(5),e.Oqu(e.xi3(11,9,t.dateCreated,"dd/MM/yyyy")),e.xp6(5),e.Q6J("color",t.color)("type","inverted")("size","small")("mode","default"),e.xp6(1),e.Oqu(t.title.name),e.xp6(4),e.Q6J("state",t.state)("canEditStatus",t.canEditStatus)}}function Ge(n,a){if(1&n&&(e.ynx(0),e.YNc(1,je,21,12,"div",68),e.BQk()),2&n){const t=a.index,i=e.oxw();e.xp6(1),e.Q6J("ngIf",t<i.ticketInfiniteScrollCount)}}function Ve(n,a){1&n&&e._UZ(0,"cf-spinner")}const Xe=function(){return{num:25}},$e=function(){return{num:50}},We=function(){return{num:75}},et=function(){return{num:100}},tt=function(n,a,t,i){return[n,a,t,i]};let nt=(()=>{class n{constructor(t,i,o,r,c,u,h,m,T,v,x){this._titleService=i,this._userService=o,this._router=r,this._fb=c,this._cd=u,this._modal=h,this._permissionService=m,this._toastService=T,this._bottomSheetService=v,this._mobileDetectService=x,this.listOfData=[],this.pageSize=25,this.currentPage=1,this.statusOption=[{name:"T\u1ea5t c\u1ea3",code:""},{name:"Ho\u1ea1t \u0111\u1ed9ng",code:"ACTIVE"},{name:"Ng\u1eebng ho\u1ea1t \u0111\u1ed9ng",code:"INACTIVE"}],this.statusChangeOption=[{name:"Ho\u1ea1t \u0111\u1ed9ng",code:"ACTIVE"},{name:"Ng\u1eebng ho\u1ea1t \u0111\u1ed9ng",code:"INACTIVE"}],this.colorMap=[{key:"",color:"red"},{key:"",color:"yellow"},{key:"",color:"cyan"},{key:"",color:"blue"},{key:"",color:"purple"},{key:"",color:"orange"},{key:"",color:"green"}],this.titleOption=[],this.filterData={searchText:"",state:null,titleId:""},this.canDelete=this._permissionService.hasPermission(g.or.DeleteEmployee),this.TICKET_INFINITE_SCROLL_DEFAULT=10,this.TICKET_INFINITE_OFSET_INCREASE=10,this.ticketInfiniteScrollCount=this.TICKET_INFINITE_SCROLL_DEFAULT,this.isLoading=!1,this.sortChange=(y,A)=>{let F=A.map(N=>N);for(let N=0;N<y.length;N++){const q=y[N];"name"===q.key&&(F=F.sort("ascend"===q.sort?(B,oe)=>this.increaseAlphabetSort(B.name,oe.name):(B,oe)=>this.decreaseAlphabetSort(B.name,oe.name)))}return F},this.searchChange=(y,A)=>A,this.increaseAlphabetSort=(y,A)=>y<A?-1:y>A?1:0,this.decreaseAlphabetSort=(y,A)=>y>A?-1:y<A?1:0,t.registerIcons([l.TM4,l.PcQ,l.whL]),this.onSearch(),this.initTitleData()}initTitleData(){this._titleService.getAllEmployeeTitleForManage().subscribe({next:t=>{this.titleOption.push({code:"",name:"T\u1ea5t c\u1ea3"}),this.titleOption.push(...t.data.map(i=>({code:i.id,name:i.name}))),this._cd.detectChanges()}})}onSearch(){this._mobileDetectService.isMobile()&&this._bottomSheetService.dismiss();const t={searchText:this.filterData.searchText,status:this.filterData.state||null,titleId:this.filterData.titleId};this.isLoading=!0,this._userService.getAllEmployeeUser(t).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:i=>{this.listOfData=i.data.filter(o=>"DELETED"!==o.state).map(o=>{const r=this.colorMap.find(c=>c.key===o.title.id);if(r)return Object.assign(Object.assign({},o),{dateCreated:new Date(1e3*o.dateCreated),color:r.color,canEditStatus:this._permissionService.hasPermission(g.or.CanEditEmployeeStatus+"_"+o.title.code)&&this._permissionService.hasPermission(g.or.CanEditEmployeeStatus)});{const c=this.colorMap.find(u=>""===u.key);return c?(c.key=o.title.id,Object.assign(Object.assign({},o),{dateCreated:new Date(1e3*o.dateCreated),color:c.color,canEditStatus:this._permissionService.hasPermission(g.or.CanEditEmployeeStatus+"_"+o.title.code)&&this._permissionService.hasPermission(g.or.CanEditEmployeeStatus)})):Object.assign(Object.assign({},o),{dateCreated:new Date(1e3*o.dateCreated),color:"green",canEditStatus:this._permissionService.hasPermission(g.or.CanEditEmployeeStatus+"_"+o.title.code)&&this._permissionService.hasPermission(g.or.CanEditEmployeeStatus)})}})}})}checkChange(t){this.pageSize=parseInt(t)}addUser(){this._router.navigate(["admin/create-employee"])}onEdit(t,i){this._router.navigate([`admin/employee-detail/${t}`],{state:{titleColor:i}})}onDelete(t){this._modal.open(D.V0,{title:"X\xf3a t\xe0i kho\u1ea3n",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a t\xe0i kho\u1ea3n n\xe0y? Vi\u1ec7c n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c, vui l\xf2ng ki\u1ec3m tra k\u0129 tr\u01b0\u1edbc khi thao t\xe1c."}).afterClosed$.subscribe({next:o=>{o.data&&this._userService.deleteEmployeeAccount(t).subscribe({next:r=>{r.success?(this.onSearch(),this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"X\xf3a t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",sticky:!1})):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"X\xf3a t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})}})}})}stateChange(t,i){t!==i.state&&this._modal.open(D.V0,{title:"ACTIVE"===t?"M\u1edf l\u1ea1i t\xe0i kho\u1ea3n n\xe0y?":"V\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",body:"ACTIVE"===t?"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n cho ph\xe9p t\xe0i kho\u1ea3n n\xe0y ho\u1ea1t \u0111\u1ed9ng l\u1ea1i?":"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n v\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",hasIcon:!1,okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf",isSecondary:!0}).afterClosed$.subscribe({next:r=>{r.data&&(this.isLoading=!0,this._userService.updateAccountStatus({userId:i.userId,status:t}).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:c=>{"OK"===c.status&&c.data?(i.state=t,this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",sticky:!1})):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})},error:c=>{this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})}}))}})}revertStatus(t,i){i.state="ACTIVE"===t.code?"BLOCK":"ACTIVE"}isUpdateStatus(t){return this._permissionService.hasPermission(g.or.CanEditAccountStatus+"_"+t)}openSearchBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"T\xecm ki\u1ebfm",containerFullHeigh:!0,rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}openStatusBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"Tr\u1ea1ng th\xe1i",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:"",restoreFocus:!1});i.containerInstance._rightButtonClick.subscribe(()=>i.dismiss())}openTitleBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"Vai tr\xf2",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:"",restoreFocus:!1});i.containerInstance._rightButtonClick.subscribe(()=>i.dismiss())}onScrollDown(){this.ticketInfiniteScrollCount+=this.TICKET_INFINITE_OFSET_INCREASE}userTrackByFn(t,i){return i.userId}mobileSelectClick(t){t.stopPropagation()}mobileStateChange(t,i){if(t===i.state)return;const o=this._bottomSheetService.open(D.Q4,{headerTitle:"ACTIVE"===t?"M\u1edf l\u1ea1i t\xe0i kho\u1ea3n n\xe0y?":"V\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",data:{body:"ACTIVE"===t?"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n cho ph\xe9p t\xe0i kho\u1ea3n n\xe0y ho\u1ea1t \u0111\u1ed9ng l\u1ea1i?":"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n v\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf",isSecondary:!0},rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});o.containerInstance._rightButtonClick.subscribe(()=>o.dismiss()),o.afterDismissed().subscribe({next:r=>{r&&(this.isLoading=!0,this._userService.updateAccountStatus({userId:i.userId,status:t}).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:c=>{"OK"===c.status&&c.data?(i.state=t,this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",sticky:!1})):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})},error:c=>{this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})}}))}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(l.KNP),e.Y36(Z.yD),e.Y36(Z.KD),e.Y36(f.F0),e.Y36(s.qu),e.Y36(e.sBO),e.Y36(j.oE),e.Y36(g.$A),e.Y36(E.BX),e.Y36(L.a2),e.Y36(ne.L))},n.\u0275cmp=e.Xpm({type:n,selectors:[["user-manage-page"]],standalone:!0,features:[e.jDz],decls:80,vars:34,consts:[[1,"flex","flex-col","px-[30px]","py-4","gap-y-4","bg-neutral-white","md:pt-3","md:pb-0","md:px-4","md:gap-y-3","md:shadow-cf-sm","md:sticky","md:top-0"],[1,"flex","gap-x-4","md:hidden"],["textField","name","valueField","code","size","small","placeholder","Ch\u1ecdn tr\u1ea1ng th\xe1i",1,"!max-w-none","!w-[252px]",3,"status","data","allowSearch","ngModel","ngModelChange"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],["class","!max-w-none !w-[172px]","textField","name","valueField","code","size","small","placeholder","Ch\u1ecdn ch\u1ee9c danh",3,"status","data","allowSearch","ngModel","ngModelChange",4,"ngIf"],[1,"!w-full"],["cfHeadIcon","","icon","search","size","small"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm trong danh s\xe1ch k\u1ebft qu\u1ea3...",3,"ngModel","ngModelChange"],["tableSearchInput",""],["cf-button","","type","secondary",1,"whitespace-nowrap","w-[168px]","flex","justify-center","gap-x-2",3,"click"],["icon","search","size","small"],[1,"hidden","text-heading-sm","text-neutral-gray-6","md:block"],[1,"hidden","md:block"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm t\xe0i kho\u1ea3n",3,"ngModel","ngModelChange","focus"],[1,"gap-x-2","hidden","md:flex"],[1,"pb-3",3,"click"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex"],[1,"text-body-md","whitespace-nowrap"],["icon","down","size","small",1,"text-neutral-gray-5"],["searchBts",""],["statusBts",""],["titleBts",""],[1,"py-4","px-[30px]","rounded-lg","flex","justify-center","md:hidden"],[1,"bg-neutral-white","rounded-lg","shadow-cf-md","w-full"],[1,"p-4","flex","justify-between","items-center"],[1,"text-heading-sm"],["cf-button","",1,"flex","gap-x-2",3,"click"],["icon","plus"],[1,"",3,"fnSort","fnSearch","pageSizeList","listData","pageSize"],["managerTable",""],["cf-thead",""],["cf-th","",1,"whitespace-nowrap",3,"sortName"],["cf-th","",1,"whitespace-nowrap"],["cf-th","",1,"whitespace-nowrap",3,"sticky"],["ngFor","",3,"ngForOf"],[1,"hidden","md:flex","p-4","flex-col"],[1,"w-full","flex","items-center","justify-between"],[1,"text-body-md","text-neutral-gray-6"],[1,"flex","gap-x-1.5","text-neutral-gray-6","items-center"],["cf-button","",1,"gap-x-2",3,"click"],["icon","plus","size","small"],["infinite-scroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","infiniteScrollContainer","scrollWindow","fromRoot","alwaysCallback","scrolled"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["textField","name","valueField","code","size","small","placeholder","Ch\u1ecdn ch\u1ee9c danh",1,"!max-w-none","!w-[172px]",3,"status","data","allowSearch","ngModel","ngModelChange"],[1,"p-4","w-full","flex","flex-col","justify-between"],[1,"flex","flex-col","gap-y-4"],[1,"w-full","border-b","border-b-neutral-gray-3"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm t\xe0i kho\u1ea3n",3,"ngModel","ngModelChange"],["textField","name","valueField","code","size","medium","placeholder","Ch\u1ecdn tr\u1ea1ng th\xe1i",1,"!max-w-none","w-full",3,"status","data","allowSearch","ngModel","ngModelChange"],["textField","name","valueField","id","size","medium","placeholder","Ch\u1ecdn ch\u1ee9c danh",1,"!max-w-none","w-full",3,"status","data","allowSearch","ngModel","ngModelChange"],["cf-button","",1,"w-full","justify-center","gap-x-2",3,"click"],[1,"flex","flex-col","w-full","p-4","gap-y-6"],[1,"flex","flex-col","gap-y-4",3,"ngModel","ngModelChange"],["size","medium",3,"value",4,"ngFor","ngForOf"],["cf-button","",1,"w-full","justify-center",3,"click"],["size","medium",3,"value"],[1,"border-b","border-neutral-gray-1"],["cf-td","",1,"py-2","px-3","text-body-md","whitespace-nowrap"],[3,"color","type","size"],[1,"w-max"],["cf-td","",1,"py-2","px-3","text-body-md"],[3,"state","canEditStatus","valueChange"],["cf-td","",1,"flex","py-3","px-3","gap-x-4","items-center","whitespace-nowrap",3,"sticky"],[1,"flex","gap-x-4","items-center"],[1,"text-body-md","text-secondary-3-4","cursor-pointer","whitespace-nowrap",3,"click"],["class","text-body-md text-secondary-6-4 cursor-pointer",3,"click",4,"ngIf"],[1,"text-body-md","text-secondary-6-4","cursor-pointer",3,"click"],["class","flex flex-col rounded-lg bg-white p-3 mt-3 gap-y-2",3,"click",4,"ngIf"],[1,"flex","flex-col","rounded-lg","bg-white","p-3","mt-3","gap-y-2",3,"click"],[1,"flex","justify-start","items-center"],[1,"text-body-sm","text-neutral-gray-4","w-[104px]"],[1,"text-express-md","text-neutral-gray-6"],[3,"color","type","size","mode"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"cf-select",2),e.NdJ("ngModelChange",function(c){return i.filterData.state=c}),e.TgZ(3,"label",3)(4,"span"),e._uU(5,"Tr\u1ea1ng th\xe1i"),e.qZA()()(),e.YNc(6,Be,4,4,"cf-select",4),e.qZA(),e.TgZ(7,"div",1)(8,"cf-input-group",5),e._UZ(9,"cf-icon",6),e.TgZ(10,"input",7,8),e.NdJ("ngModelChange",function(c){return i.filterData.searchText=c}),e.qZA()(),e.TgZ(12,"button",9),e.NdJ("click",function(){return i.onSearch()}),e._UZ(13,"cf-icon",10),e._uU(14," T\xecm ki\u1ebfm "),e.qZA()(),e.TgZ(15,"div",11),e._uU(16,"Qu\u1ea3n l\xfd t\xe0i kho\u1ea3n nh\xe2n vi\xean"),e.qZA(),e.TgZ(17,"div",12)(18,"cf-input-group",5),e._UZ(19,"cf-icon",6),e.TgZ(20,"input",13,8),e.NdJ("ngModelChange",function(c){return i.filterData.searchText=c})("focus",function(){e.CHM(o);const c=e.MAs(34);return e.KtG(i.openSearchBts(c))}),e.qZA()()(),e.TgZ(22,"div",14)(23,"div",15),e.NdJ("click",function(){e.CHM(o);const c=e.MAs(36);return e.KtG(i.openStatusBts(c))}),e.TgZ(24,"div",16)(25,"div",17),e._uU(26,"Tr\u1ea1ng th\xe1i"),e.qZA(),e._UZ(27,"cf-icon",18),e.qZA()(),e.TgZ(28,"div",15),e.NdJ("click",function(){e.CHM(o);const c=e.MAs(38);return e.KtG(i.openTitleBts(c))}),e.TgZ(29,"div",16)(30,"div",17),e._uU(31,"Vai tr\xf2"),e.qZA(),e._UZ(32,"cf-icon",18),e.qZA()()(),e.YNc(33,Ye,20,9,"ng-template",null,19,e.W1O),e.YNc(35,Re,5,2,"ng-template",null,20,e.W1O),e.YNc(37,ze,5,2,"ng-template",null,21,e.W1O),e.qZA(),e.TgZ(39,"div",22)(40,"div",23)(41,"div",24)(42,"div",25),e._uU(43,"Danh s\xe1ch nh\xe2n vi\xean"),e.qZA(),e.TgZ(44,"button",26),e.NdJ("click",function(){return i.addUser()}),e._UZ(45,"cf-icon",27),e._uU(46," T\u1ea1o t\xe0i kho\u1ea3n "),e.qZA()(),e.TgZ(47,"cf-table",28,29)(49,"thead",30)(50,"th",31),e._uU(51,"T\xean \u0111\u0103ng nh\u1eadp"),e.qZA(),e.TgZ(52,"th",32),e._uU(53,"H\u1ecd v\xe0 t\xean"),e.qZA(),e.TgZ(54,"th",32),e._uU(55,"Ch\u1ee9c danh"),e.qZA(),e.TgZ(56,"th",32),e._uU(57,"Email"),e.qZA(),e.TgZ(58,"th",32),e._uU(59,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i"),e.qZA(),e.TgZ(60,"th",32),e._uU(61,"Ng\xe0y t\u1ea1o"),e.qZA(),e.TgZ(62,"th",32),e._uU(63,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.TgZ(64,"th",33),e._uU(65,"Ch\u1ee9c n\u0103ng"),e.qZA()(),e.TgZ(66,"tbody"),e.YNc(67,He,23,16,"ng-template",34),e.qZA()()()(),e._UZ(68,"cf-toast"),e.TgZ(69,"div",35)(70,"div",36)(71,"div",37),e._uU(72),e.qZA(),e.TgZ(73,"div",38)(74,"button",39),e.NdJ("click",function(){return i.addUser()}),e._UZ(75,"cf-icon",40),e._uU(76," T\u1ea1o t\xe0i kho\u1ea3n "),e.qZA()()(),e.TgZ(77,"div",41),e.NdJ("scrolled",function(){return i.onScrollDown()}),e.YNc(78,Ge,2,1,"ng-container",42),e.qZA()(),e.YNc(79,Ve,1,0,"cf-spinner",43)}if(2&t){const o=e.MAs(48);e.xp6(2),e.Q6J("status","default")("data",i.statusOption)("allowSearch",!1)("ngModel",i.filterData.state),e.xp6(4),e.Q6J("ngIf",i.titleOption.length>0),e.xp6(4),e.Q6J("ngModel",i.filterData.searchText),e.xp6(10),e.Q6J("ngModel",i.filterData.searchText),e.xp6(27),e.Q6J("fnSort",i.sortChange)("fnSearch",i.searchChange)("pageSizeList",e.l5B(29,tt,e.DdM(25,Xe),e.DdM(26,$e),e.DdM(27,We),e.DdM(28,et)))("listData",i.listOfData)("pageSize",i.pageSize),e.xp6(3),e.Q6J("sortName","name"),e.xp6(14),e.Q6J("sticky","right"),e.xp6(3),e.Q6J("ngForOf",o.partOfdata),e.xp6(5),e.hij("",i.listOfData.length," k\u1ebft qu\u1ea3"),e.xp6(5),e.Q6J("infiniteScrollDistance",1)("infiniteScrollThrottle",300)("infiniteScrollContainer",".main-scroll-bar")("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0),e.xp6(1),e.Q6J("ngForOf",i.listOfData)("ngForTrackBy",i.userTrackByFn),e.xp6(1),e.Q6J("ngIf",i.isLoading)}},dependencies:[_.ez,_.sg,_.O5,_.uU,l.AxE,l.Sm8,C.N8,C.Xq,w.rC,w.E_,w.zs,w.qS,I.q,s.u5,s.Fj,s.JJ,s.On,s.UX,p.j$,p.ND,p.BN,z.b,E.hj,L.DW,Y.T,Y.o,K.Rq,K.Ry,D.OR,ce],encapsulation:2}),n})();var Q=d(88516),G=d(76331),V=d(34541),X=d(7453),se=d(82805),O=d(63900),le=d(54004),P=d(15439),$=d(85522),ie=d(92347);function it(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","M\xe3 \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function ot(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","M\xe3 \u0111\u1ea1i l\xfd \u0111\xe3 t\u1ed3n t\u1ea1i")}function at(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 6 k\xed t\u1ef1")}function rt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Ch\u1ec9 cho ph\xe9p ch\u1eef c\xe1i, ch\u1eef s\u1ed1 v\xe0 d\u1ea5u \u201c-\u201d")}function ct(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\xean \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function st(n,a){1&n&&(e.TgZ(0,"div",58),e._UZ(1,"cf-icon",59),e._uU(2," Upload \u1ea3nh \u0111\u1ea1i di\u1ec7n "),e.qZA())}function lt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","H\u1ecd v\xe0 t\xean ng\u01b0\u1eddi \u0111\u1ea1i di\u1ec7n kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function ut(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Email kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function dt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","\u0110\u1ecbnh d\u1ea1ng kh\xf4ng h\u1ee3p l\u1ec7")}function _t(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","S\u1ed1 \u0111i\u1ec7n tho\u1ea1i kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function pt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 7 ch\u1eef s\u1ed1")}function gt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 11 ch\u1eef s\u1ed1")}function ht(n,a){1&n&&e._UZ(0,"cf-icon",60)}function mt(n,a){1&n&&e._UZ(0,"cf-icon",61)}function ft(n,a){if(1&n&&(e.TgZ(0,"div",62)(1,"div")(2,"cf-input-group",16)(3,"label",35),e._uU(4," Facebook "),e.qZA(),e._UZ(5,"input",63),e.qZA()(),e.TgZ(6,"div",64)(7,"cf-select",65)(8,"label",35)(9,"span"),e._uU(10,"K\xeanh gi\u1edbi thi\u1ec7u"),e.qZA()()()()()),2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("status","default"),e.xp6(3),e.Q6J("formControl",t.userForm.controls.facebookContact),e.xp6(2),e.Q6J("status",t.userForm.controls.referralChannel.invalid&&(t.userForm.controls.referralChannel.dirty||t.userForm.controls.referralChannel.touched)?"error":"default")("data",t.referralChannelData)("allowSearch",!1)("formControl",t.userForm.controls.referralChannel)("allowSearch",!0)}}function vt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","S\u1ed1 t\xe0i kho\u1ea3n ng\xe2n h\xe0ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Ct(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","H\u1ecd t\xean ch\u1ee7 t\xe0i kho\u1ea3n kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function xt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Ng\xe2n h\xe0ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Et(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\xean chi nh\xe1nh ng\xe2n h\xe0ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function yt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Lo\u1ea1i chi\u1ebft kh\u1ea5u nh\u1eadn kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function At(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","M\u1ee9c \xe2m qu\u1ef9 kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Tt(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div",10),e._UZ(2,"div",11),e.TgZ(3,"div",12),e._uU(4,"Th\xf4ng tin c\xf4ng n\u1ee3"),e.qZA()(),e.TgZ(5,"div",66)(6,"div",47)(7,"cf-select",67)(8,"label",17),e._uU(9," Lo\u1ea1i chi\u1ebft kh\u1ea5u nh\u1eadn "),e.qZA(),e.YNc(10,yt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(11,"cf-input-group",68)(12,"label",69),e._uU(13," M\u1ee9c \xe2m qu\u1ef9 t\u1ed1i \u0111a "),e.qZA(),e._UZ(14,"cf-input-number",70),e.YNc(15,At,1,1,"cf-input-hint",19),e.qZA()()()()),2&n){const t=e.oxw(2);e.xp6(7),e.Q6J("status",t.userForm.controls.discountPaymentType.invalid&&(t.userForm.controls.discountPaymentType.dirty||t.userForm.controls.discountPaymentType.touched)?"error":"default")("data",t.paymentTypeOption)("allowSearch",!1)("formControl",t.userForm.controls.discountPaymentType),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("ngIf",t.userForm.controls.discountPaymentType.hasError("required")&&t.userForm.controls.discountPaymentType.touched),e.xp6(1),e.Q6J("status",t.userForm.controls.maxNegative.invalid&&(t.userForm.controls.maxNegative.dirty||t.userForm.controls.maxNegative.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c \xe2m qu\u1ef9 t\u1ed1i \u0111a")("negative",!1)("formControl",t.userForm.controls.maxNegative),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.maxNegative.hasError("required")&&(t.userForm.controls.maxNegative.touched||t.userForm.controls.maxNegative.dirty))}}function Dt(n,a){1&n&&(e.TgZ(0,"button",71),e._UZ(1,"cf-icon",72),e._uU(2," Quay l\u1ea1i "),e.qZA())}const Zt=function(n){return{"!border-none":n}};function Ft(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10),e._UZ(4,"div",11),e.TgZ(5,"div",12),e._uU(6,"Th\xf4ng tin c\u01a1 b\u1ea3n"),e.qZA()(),e.TgZ(7,"div",13)(8,"div",14)(9,"div",15)(10,"cf-input-group",16)(11,"label",17),e._uU(12," M\xe3 \u0111\u1ea1i l\xfd "),e.qZA(),e._UZ(13,"input",18),e.YNc(14,it,1,1,"cf-input-hint",19),e.YNc(15,ot,1,1,"cf-input-hint",19),e.YNc(16,at,1,1,"cf-input-hint",19),e.YNc(17,rt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(18,"cf-input-group",16)(19,"label",17),e._uU(20," T\xean \u0111\u1ea1i l\xfd "),e.qZA(),e._UZ(21,"input",20),e.YNc(22,ct,1,1,"cf-input-hint",19),e.qZA()(),e.TgZ(23,"div",21)(24,"div",22),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(27);return e.KtG(o.click())}),e.YNc(25,st,3,0,"div",23),e.qZA(),e.TgZ(26,"input",24,25),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.uploadAvatar(o))}),e.qZA()()(),e.TgZ(28,"div")(29,"cf-input-group",16)(30,"label",17),e._uU(31," H\u1ecd v\xe0 t\xean ng\u01b0\u1eddi \u0111\u1ea1i di\u1ec7n "),e.qZA(),e._UZ(32,"input",26),e.YNc(33,lt,1,1,"cf-input-hint",19),e.qZA()(),e.TgZ(34,"div",27)(35,"cf-input-group",28)(36,"label",17),e._uU(37," Email "),e.qZA(),e._UZ(38,"input",29),e.YNc(39,ut,1,1,"cf-input-hint",19),e.YNc(40,dt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(41,"div")(42,"div",30)(43,"label",17),e._uU(44," S\u1ed1 \u0111i\u1ec7n tho\u1ea1i "),e.qZA()(),e.TgZ(45,"cf-select",31)(46,"div",32),e._UZ(47,"input",33),e.qZA(),e.YNc(48,_t,1,1,"cf-input-hint",19),e.YNc(49,pt,1,1,"cf-input-hint",19),e.YNc(50,gt,1,1,"cf-input-hint",19),e.qZA()()(),e.TgZ(51,"div")(52,"cf-select",34)(53,"label",35)(54,"span"),e._uU(55,"Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u"),e.qZA()()()(),e.TgZ(56,"div")(57,"cf-input-group",36)(58,"label",35),e._uU(59," Ghi ch\xfa b\u1ed5 sung "),e.qZA(),e._UZ(60,"textarea",37),e.qZA()(),e.TgZ(61,"div",38)(62,"div",39)(63,"div",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.isExpand=!o.isExpand)}),e.TgZ(64,"div",41),e._UZ(65,"cf-icon",42),e.TgZ(66,"span"),e._uU(67,"Th\xf4ng tin b\u1ed5 sung"),e.qZA()(),e.TgZ(68,"div",43),e.YNc(69,ht,1,0,"cf-icon",44),e.YNc(70,mt,1,0,"cf-icon",45),e.qZA()(),e.YNc(71,ft,11,7,"div",46),e.qZA()()()(),e.TgZ(72,"div",9)(73,"div",10),e._UZ(74,"div",11),e.TgZ(75,"div",12),e._uU(76,"Th\xf4ng tin chuy\u1ec3n kho\u1ea3n"),e.qZA()(),e.TgZ(77,"div",13)(78,"div",47)(79,"cf-input-group",48)(80,"label",17),e._uU(81," S\u1ed1 t\xe0i kho\u1ea3n ng\xe2n h\xe0ng "),e.qZA(),e._UZ(82,"input",49),e.YNc(83,vt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(84,"cf-input-group",48)(85,"label",17),e._uU(86," H\u1ecd t\xean ch\u1ee7 t\xe0i kho\u1ea3n "),e.qZA(),e._UZ(87,"input",50),e.YNc(88,Ct,1,1,"cf-input-hint",19),e.qZA()(),e.TgZ(89,"div",47)(90,"cf-select",51)(91,"label",17)(92,"span"),e._uU(93,"Thu\u1ed9c ng\xe2n h\xe0ng"),e.qZA()(),e.YNc(94,xt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(95,"cf-input-group",48)(96,"label",17),e._uU(97," T\xean chi nh\xe1nh ng\xe2n h\xe0ng "),e.qZA(),e._UZ(98,"input",52),e.YNc(99,Et,1,1,"cf-input-hint",19),e.qZA()()()(),e.YNc(100,Tt,16,12,"div",6),e.TgZ(101,"div",53)(102,"div"),e.YNc(103,Dt,3,0,"button",54),e.qZA(),e.TgZ(104,"button",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setStep("IDENTITY"))}),e._uU(105," Ti\u1ebfp t\u1ee5c "),e._UZ(106,"cf-icon",56),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(10),e.Q6J("status",t.userForm.controls.userName.invalid&&(t.userForm.controls.userName.dirty||t.userForm.controls.userName.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.userForm.controls.userName),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.userName.errors?null:t.userForm.controls.userName.errors.required)&&(t.userForm.controls.userName.dirty||t.userForm.controls.userName.touched)),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.userName.errors?null:t.userForm.controls.userName.errors.usernameDuplicated)&&(t.userForm.controls.userName.dirty||t.userForm.controls.userName.touched)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.userName.hasError("maxlength")&&(t.userForm.controls.userName.touched||t.userForm.controls.userName.dirty)),e.xp6(1),e.Q6J("ngIf",!t.userForm.controls.userName.hasError("maxlength")&&t.userForm.controls.userName.hasError("pattern")&&(t.userForm.controls.userName.touched||t.userForm.controls.userName.dirty)),e.xp6(1),e.Q6J("status",t.userForm.controls.agentName.invalid&&(t.userForm.controls.agentName.dirty||t.userForm.controls.agentName.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.userForm.controls.agentName),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.agentName.errors?null:t.userForm.controls.agentName.errors.required)&&(t.userForm.controls.agentName.dirty||t.userForm.controls.agentName.touched)),e.xp6(2),e.Jzz("background-image: url(",t.previewAvatar,");"),e.Q6J("ngClass",e.VKq(65,Zt,t.previewAvatar)),e.xp6(1),e.Q6J("ngIf",!t.previewAvatar),e.xp6(4),e.Q6J("status",t.userForm.controls.representative.invalid&&(t.userForm.controls.representative.dirty||t.userForm.controls.representative.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.userForm.controls.representative),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.representative.errors?null:t.userForm.controls.representative.errors.required)&&(t.userForm.controls.representative.dirty||t.userForm.controls.representative.touched)),e.xp6(2),e.Q6J("status",t.userForm.controls.email.invalid&&(t.userForm.controls.email.dirty||t.userForm.controls.email.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.userForm.controls.email),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.email.errors?null:t.userForm.controls.email.errors.required)&&(t.userForm.controls.email.dirty||t.userForm.controls.email.touched)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.email.hasError("email")&&(t.userForm.controls.email.touched||t.userForm.controls.email.dirty)),e.xp6(3),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.userForm.controls.phone.invalid&&(t.userForm.controls.phone.dirty||t.userForm.controls.phone.touched)?"error":"default")("data",t.optionsAreaCode)("formControl",t.userForm.controls.areaCode),e.xp6(2),e.Q6J("formControl",t.userForm.controls.phone),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.phone.errors?null:t.userForm.controls.phone.errors.required)&&(t.userForm.controls.phone.dirty||t.userForm.controls.phone.touched)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.phone.hasError("minlength")&&(t.userForm.controls.phone.touched||t.userForm.controls.phone.dirty)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.phone.hasError("maxlength")&&(t.userForm.controls.phone.touched||t.userForm.controls.phone.dirty)),e.xp6(2),e.Q6J("status",t.userForm.controls.belongSale.invalid&&(t.userForm.controls.belongSale.dirty||t.userForm.controls.belongSale.touched)?"error":"default")("data",t.belongSaleOption)("allowSearch",!1)("formControl",t.userForm.controls.belongSale)("allowSearch",!0),e.xp6(5),e.Q6J("status",t.userForm.controls.note.invalid&&(t.userForm.controls.note.dirty||t.userForm.controls.note.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",t.userForm.controls.note),e.xp6(9),e.Q6J("ngIf",t.isExpand),e.xp6(1),e.Q6J("ngIf",!t.isExpand),e.xp6(1),e.Q6J("ngIf",t.isExpand),e.xp6(8),e.Q6J("status",t.userForm.controls.bankAccount.invalid&&(t.userForm.controls.bankAccount.dirty||t.userForm.controls.bankAccount.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.userForm.controls.bankAccount),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.bankAccount.errors?null:t.userForm.controls.bankAccount.errors.required)&&(t.userForm.controls.bankAccount.dirty||t.userForm.controls.bankAccount.touched)),e.xp6(1),e.Q6J("status",t.userForm.controls.nameOwnAccount.invalid&&(t.userForm.controls.nameOwnAccount.dirty||t.userForm.controls.nameOwnAccount.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.userForm.controls.nameOwnAccount),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.nameOwnAccount.errors?null:t.userForm.controls.nameOwnAccount.errors.required)&&(t.userForm.controls.nameOwnAccount.dirty||t.userForm.controls.nameOwnAccount.touched)),e.xp6(2),e.Q6J("customSearch",t.bankCustomSearch)("status",t.userForm.controls.bankName.invalid&&(t.userForm.controls.bankName.dirty||t.userForm.controls.bankName.touched)?"error":"default")("data",t.bankData)("formControl",t.userForm.controls.bankName)("allowSearch",!0),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(3),e.Q6J("ngIf",t.userForm.controls.bankName.hasError("required")&&t.userForm.controls.bankName.touched),e.xp6(1),e.Q6J("status",t.userForm.controls.bankBranchName.invalid&&(t.userForm.controls.bankBranchName.dirty||t.userForm.controls.bankBranchName.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",t.userForm.controls.bankBranchName),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.bankBranchName.errors?null:t.userForm.controls.bankBranchName.errors.required)&&(t.userForm.controls.bankBranchName.dirty||t.userForm.controls.bankBranchName.touched)),e.xp6(1),e.Q6J("ngIf",t.canCreateAgentUser_AGENT2),e.xp6(3),e.Q6J("ngIf","BASIC_INFO"!==t.step),e.xp6(1),e.Q6J("disabled",t.userForm.invalid)}}function bt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","S\u1ed1 CCCD/CMND kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function kt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 6 ch\u1eef s\u1ed1")}function It(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 12 ch\u1eef s\u1ed1")}function Ut(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y c\u1ea5p CCCD/CMND")}function Nt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function wt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Nh\u1eadp n\u01a1i c\u1ea5p CCCD/CMND")}function qt(n,a){1&n&&(e.TgZ(0,"div",58),e._UZ(1,"cf-icon",59),e._uU(2," M\u1eb7t tr\u01b0\u1edbc "),e.qZA())}function Pt(n,a){1&n&&(e.TgZ(0,"div",58),e._UZ(1,"cf-icon",59),e._uU(2," M\u1eb7t sau "),e.qZA())}function Jt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",82)(1,"cf-input-group",16)(2,"label",35),e._uU(3," S\u1ed1 CCCD/CMND "),e.qZA(),e._UZ(4,"input",83),e.YNc(5,bt,1,1,"cf-input-hint",19),e.YNc(6,kt,1,1,"cf-input-hint",19),e.YNc(7,It,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(8,"cf-input-group",16)(9,"label",84),e._uU(10,"Ng\xe0y c\u1ea5p CCCD/CMND"),e.qZA(),e.TgZ(11,"input",85,86),e.NdJ("input",function(){e.CHM(t);const o=e.MAs(12);return e.KtG(o.close())})("dateSelect",function(){e.CHM(t);const o=e.MAs(12);return e.KtG(o.close())}),e.qZA(),e.YNc(13,Ut,1,1,"cf-input-hint",19),e.YNc(14,Nt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(15,"cf-input-group",16)(16,"label",35),e._uU(17," N\u01a1i c\u1ea5p CCCD/CMND "),e.qZA(),e._UZ(18,"input",87),e.YNc(19,wt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(20,"div",88),e._uU(21,"Upload \u1ea3nh ch\u1ee5p CCCD/CMND"),e.qZA(),e.TgZ(22,"div",89)(23,"div",90),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(26);return e.KtG(o.click())}),e.YNc(24,qt,3,0,"div",23),e.qZA(),e.TgZ(25,"input",24,91),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.uploadCCCDFont(o))}),e.qZA(),e.TgZ(27,"div",90),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(30);return e.KtG(o.click())}),e.YNc(28,Pt,3,0,"div",23),e.qZA(),e.TgZ(29,"input",24,92),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.uploadCCCDBack(o))}),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("status",t.personalForm.controls.identifyId.invalid&&(t.personalForm.controls.identifyId.dirty||t.personalForm.controls.identifyId.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",t.personalForm.controls.identifyId),e.xp6(1),e.Q6J("ngIf",(null==t.personalForm.controls.identifyId.errors?null:t.personalForm.controls.identifyId.errors.required)&&(t.personalForm.controls.identifyId.dirty||t.personalForm.controls.identifyId.touched)),e.xp6(1),e.Q6J("ngIf",t.personalForm.controls.identifyId.hasError("minlength")&&(t.personalForm.controls.identifyId.touched||t.personalForm.controls.identifyId.dirty)),e.xp6(1),e.Q6J("ngIf",t.personalForm.controls.identifyId.hasError("maxlength")&&(t.personalForm.controls.identifyId.touched||t.personalForm.controls.identifyId.dirty)),e.xp6(1),e.Q6J("status",t.personalForm.controls.identifyDateProvide.invalid&&(t.personalForm.controls.identifyDateProvide.dirty||t.personalForm.controls.identifyDateProvide.touched)?"error":"default"),e.xp6(3),e.Q6J("displayMonths",1)("maxDate",t.currentDate)("formControl",t.personalForm.controls.identifyDateProvide),e.xp6(2),e.Q6J("ngIf",(null==t.personalForm.controls.identifyDateProvide.errors?null:t.personalForm.controls.identifyDateProvide.errors.required)&&(t.personalForm.controls.identifyDateProvide.dirty||t.personalForm.controls.identifyDateProvide.touched)),e.xp6(1),e.Q6J("ngIf",(null==t.personalForm.controls.identifyDateProvide.errors||null==t.personalForm.controls.identifyDateProvide.errors.ngbDate?null:t.personalForm.controls.identifyDateProvide.errors.ngbDate.invalid)&&(t.personalForm.controls.identifyDateProvide.dirty||t.personalForm.controls.identifyDateProvide.touched)),e.xp6(1),e.Q6J("status",t.personalForm.controls.identifyPlaceProvide.invalid&&(t.personalForm.controls.identifyPlaceProvide.dirty||t.personalForm.controls.identifyPlaceProvide.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",t.personalForm.controls.identifyPlaceProvide),e.xp6(1),e.Q6J("ngIf",(null==t.personalForm.controls.identifyPlaceProvide.errors?null:t.personalForm.controls.identifyPlaceProvide.errors.required)&&(t.personalForm.controls.identifyPlaceProvide.dirty||t.personalForm.controls.identifyPlaceProvide.touched)),e.xp6(4),e.Jzz("background-image: url(",t.previewCCCDFont,");"),e.xp6(1),e.Q6J("ngIf",!t.previewCCCDFont),e.xp6(3),e.Jzz("background-image: url(",t.previewCCCDBack,");"),e.xp6(1),e.Q6J("ngIf",!t.previewCCCDBack)}}function St(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","M\xe3 s\u1ed1 doanh nghi\u1ec7p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Mt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","T\xean doanh nghi\u1ec7p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Qt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","\u0110\u1ecba ch\u1ec9 doanh nghi\u1ec7p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Bt(n,a){if(1&n&&(e.TgZ(0,"div",82)(1,"cf-input-group",16)(2,"label",35),e._uU(3," M\xe3 s\u1ed1 doanh nghi\u1ec7p "),e.qZA(),e._UZ(4,"input",93),e.YNc(5,St,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(6,"cf-input-group",16)(7,"label",35),e._uU(8," T\xean doanh nghi\u1ec7p "),e.qZA(),e._UZ(9,"input",94),e.YNc(10,Mt,1,1,"cf-input-hint",19),e.qZA(),e.TgZ(11,"cf-input-group",16)(12,"label",35),e._uU(13," \u0110\u1ecba ch\u1ec9 doanh nghi\u1ec7p "),e.qZA(),e._UZ(14,"input",95),e.YNc(15,Qt,1,1,"cf-input-hint",19),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("status",t.businessForm.controls.companyCode.invalid&&(t.businessForm.controls.companyCode.dirty||t.businessForm.controls.companyCode.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",t.businessForm.controls.companyCode),e.xp6(1),e.Q6J("ngIf",(null==t.businessForm.controls.companyCode.errors?null:t.businessForm.controls.companyCode.errors.required)&&(t.businessForm.controls.companyCode.dirty||t.businessForm.controls.companyCode.touched)),e.xp6(1),e.Q6J("status",t.businessForm.controls.companyName.invalid&&(t.businessForm.controls.companyName.dirty||t.businessForm.controls.companyName.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",t.businessForm.controls.companyName),e.xp6(1),e.Q6J("ngIf",(null==t.businessForm.controls.companyName.errors?null:t.businessForm.controls.companyName.errors.required)&&(t.businessForm.controls.companyName.dirty||t.businessForm.controls.companyName.touched)),e.xp6(1),e.Q6J("status",t.businessForm.controls.companyAddress.invalid&&(t.businessForm.controls.companyAddress.dirty||t.businessForm.controls.companyAddress.touched)?"error":"default"),e.xp6(3),e.Q6J("formControl",t.businessForm.controls.companyAddress),e.xp6(1),e.Q6J("ngIf",(null==t.businessForm.controls.companyAddress.errors?null:t.businessForm.controls.companyAddress.errors.required)&&(t.businessForm.controls.companyAddress.dirty||t.businessForm.controls.companyAddress.touched))}}function Yt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.setStep("TITLE_ROLE"))}),e._uU(1," Ti\u1ebfp t\u1ee5c "),e._UZ(2,"cf-icon",56),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("disabled",t.personalForm.invalid)}}function Ot(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.setStep("TITLE_ROLE"))}),e._uU(1," Ti\u1ebfp t\u1ee5c "),e._UZ(2,"cf-icon",56),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("disabled",t.businessForm.invalid)}}function Rt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",73)(2,"div",74),e._UZ(3,"div",11),e.TgZ(4,"div",12),e._uU(5,"X\xe1c th\u1ef1c danh t\xednh"),e.qZA()(),e.TgZ(6,"div",75)(7,"cf-radio-group",76),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.userType=o)})("checkChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.userTypeChange(o))}),e.TgZ(8,"cf-radio",77),e._uU(9,"C\xe1 nh\xe2n"),e.qZA(),e.TgZ(10,"cf-radio",77),e._uU(11,"Doanh nghi\u1ec7p"),e.qZA()(),e.YNc(12,Jt,31,22,"div",78),e.YNc(13,Bt,16,9,"div",78),e.qZA(),e.TgZ(14,"div",79)(15,"button",80),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setStep("BASIC_INFO"))}),e._UZ(16,"cf-icon",72),e._uU(17," Quay l\u1ea1i "),e.qZA(),e.YNc(18,Yt,3,1,"button",81),e.YNc(19,Ot,3,1,"button",81),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(7),e.Q6J("ngModel",t.userType),e.xp6(1),e.Q6J("value","PERSONAL"),e.xp6(2),e.Q6J("value","BUSINESS"),e.xp6(2),e.Q6J("ngIf","PERSONAL"===t.userType),e.xp6(1),e.Q6J("ngIf","BUSINESS"===t.userType),e.xp6(2),e.Q6J("type","secondary"),e.xp6(3),e.Q6J("ngIf","PERSONAL"===t.userType),e.xp6(1),e.Q6J("ngIf","BUSINESS"===t.userType)}}function Lt(n,a){1&n&&e._UZ(0,"cf-input-hint",57),2&n&&e.Q6J("hint","Ch\u1ecdn ch\u1ee9c danh")}function zt(n,a){1&n&&e._UZ(0,"div",102)}function Kt(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",109),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("disabled",!0)("checked",!0),e.xp6(1),e.Oqu(t)}}function Ht(n,a){if(1&n&&(e.TgZ(0,"div",103)(1,"div",104)(2,"div",105),e._uU(3," Quy\u1ec1n h\u1ea1n m\u1eb7c \u0111\u1ecbnh "),e.qZA(),e.TgZ(4,"div",106),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c c\u1ea5p cho role \u0111\xf3, kh\xf4ng \u0111\u01b0\u1ee3c ph\xe9p thay \u0111\u1ed5i. "),e.qZA()(),e.TgZ(6,"div",107),e.YNc(7,Kt,3,3,"ng-container",108),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(7),e.Q6J("ngForOf",t.listDefaultRole)}}function jt(n,a){1&n&&e._UZ(0,"div",102)}function Gt(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"cf-switch",110),e.NdJ("checkedChange",function(){const r=e.CHM(t).$implicit,c=e.oxw(3);return e.KtG(c.onToggleRole(r.id))}),e._uU(2),e.qZA(),e.BQk()}if(2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.name)}}function Vt(n,a){if(1&n&&(e.TgZ(0,"div",103)(1,"div",104)(2,"div",105),e._uU(3," Quy\u1ec1n h\u1ea1n n\xe2ng cao "),e.qZA(),e.TgZ(4,"div",106),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c ch\u1ec9 \u0111\u1ecbnh c\u1ea5p th\xeam cho \u0111\u1ea1i l\xfd n\u1ebfu mu\u1ed1n. "),e.qZA()(),e.TgZ(6,"div",107),e.YNc(7,Gt,3,1,"ng-container",108),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(7),e.Q6J("ngForOf",t.listAdvanceRole)}}function Xt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",73)(2,"div",74),e._UZ(3,"div",11),e.TgZ(4,"div",12),e._uU(5,"Ch\u1ee9c danh"),e.qZA()(),e.TgZ(6,"div",96)(7,"cf-select",97),e.NdJ("selectedChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.loadRoleAdvance(o))}),e.TgZ(8,"label",35),e._uU(9," Ch\u1ee9c danh "),e.qZA(),e.YNc(10,Lt,1,1,"cf-input-hint",19),e.qZA(),e.YNc(11,zt,1,0,"div",98),e.YNc(12,Ht,8,1,"div",99),e.YNc(13,jt,1,0,"div",98),e.YNc(14,Vt,8,1,"div",99),e.qZA(),e.TgZ(15,"div",79)(16,"button",100),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setStep("IDENTITY"))}),e._UZ(17,"cf-icon",72),e._uU(18," Quay l\u1ea1i "),e.qZA(),e.TgZ(19,"button",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.createAccount())}),e._UZ(20,"cf-icon",101),e._uU(21," T\u1ea1o t\xe0i kho\u1ea3n "),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(7),e.Q6J("status",t.roleForm.controls.titleId.invalid&&(t.roleForm.controls.titleId.dirty||t.roleForm.controls.titleId.touched)?"error":"default")("data",t.roleOptions)("allowSearch",!1)("formControl",t.roleForm.controls.titleId),e.xp6(3),e.Q6J("ngIf",t.roleForm.controls.titleId.hasError("required")&&t.roleForm.controls.titleId.touched),e.xp6(1),e.Q6J("ngIf",t.listDefaultRole.length),e.xp6(1),e.Q6J("ngIf",t.listDefaultRole.length),e.xp6(1),e.Q6J("ngIf",t.listAdvanceRole.length),e.xp6(1),e.Q6J("ngIf",t.listAdvanceRole.length),e.xp6(2),e.Q6J("type","secondary"),e.xp6(3),e.Q6J("disabled",t.roleForm.invalid)}}function $t(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",73)(2,"div",111),e._UZ(3,"img",112),e.TgZ(4,"div",113)(5,"div",114),e._uU(6,"T\u1ea1o t\xe0i kho\u1ea3n \u0111\u1ea1i l\xfd th\xe0nh c\xf4ng"),e.qZA(),e.TgZ(7,"div",115)(8,"div"),e._uU(9," \u0110\u1ea1i l\xfd "),e.TgZ(10,"strong"),e._uU(11),e.qZA(),e._uU(12," c\u1ea7n x\xe1c th\u1ef1c email \u0111\u0103ng k\xfd \u0111\u1ec3 ho\xe0n t\u1ea5t vi\u1ec7c t\u1ea1o t\xe0i kho\u1ea3n. "),e.qZA(),e.TgZ(13,"span"),e._uU(14," Email x\xe1c th\u1ef1c t\xe0i kho\u1ea3n \u0111\xe3 g\u1eedi \u0111\u1ebfn "),e.TgZ(15,"strong"),e._uU(16),e.qZA(),e._uU(17," c\u1ee7a \u0111\u1ea1i l\xfd. Vui l\xf2ng th\xf4ng b\xe1o \u0111\u1ea1i l\xfd ho\xe0n t\u1ea5t s\u1edbm. "),e.qZA()()(),e.TgZ(18,"div",89)(19,"button",116),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.createNew())}),e._UZ(20,"cf-icon",117),e._uU(21," T\u1ea1o m\u1edbi "),e.qZA(),e.TgZ(22,"button",118),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.viewList())}),e._UZ(23,"cf-icon",119),e._uU(24," Xem danh s\xe1ch "),e.qZA()()()()()}if(2&n){const t=e.oxw();e.xp6(11),e.Oqu(t.userForm.controls.agentName.value),e.xp6(5),e.Oqu(t.userForm.controls.email.value)}}function Wt(n,a){1&n&&e._UZ(0,"cf-spinner")}let en=(()=>{class n{constructor(t,i,o,r,c,u,h,m,T,v,x,y){this.calendar=t,this._fb=i,this._roleService=o,this._router=r,this._toastService=c,this._route=u,this._titleService=h,this._userService=m,this._phoneDataService=T,this._bankDataService=v,this._permissionService=x,this.allRoles=[],this.allRolesAdvance=[],this.titleUps=[],this.titleDowns=[],this.enabledRole=[],this.enabledTitleUp=[],this.enabledTitleDown=[],this.editMode=!1,this.optionsAreaCode=[],this.belongSaleOption=[],this.referralChannelData=[{code:"DIRECT",name:"Tr\u1ef1c ti\u1ebfp"},{code:"LANDING_PAGE",name:"Landing Page"},{code:"SOCIAL_MEDIA",name:"M\u1ea1ng x\xe3 h\u1ed9i"},{code:"MARKETING",name:"Ch\u01b0\u01a1ng tr\xecnh Marketing"}],this.bankData=[],this.titleData=[],this.step="BASIC_INFO",this.userType="PERSONAL",this.roleOptions=[],this.listRoleSelected=[],this.listAdvanceRole=[],this.listDefaultRole=[],this.isLoading=!1,this.paymentTypeOption=[{value:"PAYMENT_NOW",text:"Chi\u1ebft kh\u1ea5u tr\u1ea3 ngay"},{value:"PAYMENT_LATER",text:"Chi\u1ebft kh\u1ea5u tr\u1ea3 sau"}],this.canCreateAgentUser_AGENT2=this._permissionService.hasPermission(g.or.CreateAgentUser_AGENT2),this.isExpand=!1,this.currentDate=t.getToday(),y.registerIcons([l.Rq_,l.Rcu,l.rks,l.toh,l.TM4,l.D7,l.Rcu,l.RxK]),this._router.routeReuseStrategy.shouldReuseRoute=()=>!1}ngOnInit(){this.optionsAreaCode=this._phoneDataService.optionsAreaCode,this.loadBelongSale(),this.userForm=this._fb.group({userName:["",[s.kI.required,s.kI.pattern("^[A-Za-z0-9-]+$"),s.kI.maxLength(6)],this.validateUserNameFromAPIDebounce.bind(this)],agentName:["",[s.kI.required,s.kI.minLength(2)]],representative:["",s.kI.required],avatar:[""],email:["",[s.kI.required,s.kI.email]],areaCode:["+84",s.kI.required],phone:["",[s.kI.required,s.kI.minLength(7),s.kI.maxLength(11)]],belongSale:[""],facebookContact:[""],referralChannel:[this.referralChannelData[0].code],note:[""],bankAccount:["",s.kI.required],nameOwnAccount:["",s.kI.required],bankName:["",s.kI.required],bankBranchName:["",s.kI.required],userType:["BUSINESS",s.kI.required],business:[!1,s.kI.required]}),this.canCreateAgentUser_AGENT2&&(this.userForm.addControl("maxNegative",this._fb.control(0,[s.kI.required])),this.userForm.addControl("discountPaymentType",this._fb.control("",[s.kI.required]))),this.roleForm=this._fb.group({titleId:["",s.kI.required],roleIds:[""]}),this.personalForm=this._fb.group({identifyId:["",[s.kI.required,s.kI.minLength(6),s.kI.maxLength(12)]],identifyDateProvide:["",s.kI.required],identifyPlaceProvide:["",s.kI.required],frontImageIdentify:["",s.kI.required],backImageIdentify:["",s.kI.required]}),this.businessForm=this._fb.group({companyCode:["",s.kI.required],companyName:["",s.kI.required],companyAddress:["",s.kI.required]}),this.bankData=this._bankDataService.getBankOption(),this.initTitleData()}initRoleAdvance(t){this.allRoles=t.data.map(i=>({name:i.name,id:i.id,actived:!1}))}loadRoleAdvance(t){var i;this.listRoleSelected=[];const o=this.titleData.find(r=>r.id===t.id);o&&(this.listDefaultRole=o.defaultPermission||[],this.listAdvanceRole=(null===(i=o.advanceRole)||void 0===i?void 0:i.map(r=>({id:r.id,name:r.name})))||[])}loadBelongSale(){this._userService.getBelongSale().subscribe(t=>{t.success&&(this.belongSaleOption=t.data.map(i=>({code:i.id,name:`${i.userName} - ${i.displayName} (${i.titleName})`})))})}initTitleData(){this._titleService.getAllAgentTitleForCreateUser().subscribe({next:t=>{t.data&&(this.titleData=t.data,this.roleOptions=t.data.map(i=>({id:i.id,name:i.name})))}})}validateUserNameFromAPIDebounce(t){return(0,se.H)(1500).pipe((0,O.w)(()=>this._userService.checkUsernameExist(t.value).pipe((0,le.U)(i=>i.data?{usernameDuplicated:!0}:null))))}bankCustomSearch(t,i){return!(!t.code.toLocaleLowerCase().includes(i.toLocaleLowerCase())&&!t.name.toLocaleLowerCase().includes(i.toLocaleLowerCase()))}uploadAvatar(t){this.avatarFile=t.target.files[0],this.getPreviewImage(t,"avatar")}uploadCCCDFont(t){this.cccdFontFile=t.target.files[0],this.getPreviewImage(t,"cccdFont"),this.personalForm.controls.frontImageIdentify.setValue(this.cccdFontFile.name)}uploadCCCDBack(t){this.cccdBackFile=t.target.files[0],this.getPreviewImage(t,"cccdBack"),this.personalForm.controls.backImageIdentify.setValue(this.cccdBackFile.name)}userTypeChange(t){this.userForm.controls.business.setValue("PERSONAL"===t)}getPreviewImage(t,i){if(t.target.files&&t.target.files[0]){const o=t.target.files[0],r=new FileReader;switch(i){case"avatar":r.onload=c=>this.previewAvatar=r.result;break;case"cccdFont":r.onload=c=>this.previewCCCDFont=r.result;break;case"cccdBack":r.onload=c=>this.previewCCCDBack=r.result}r.readAsDataURL(o)}}setStep(t){this.step=t}roleChange(t,i){i.actived=t}onToggleRole(t){this.listRoleSelected.includes(t)?this.listRoleSelected=this.listRoleSelected.filter(i=>i!==t):this.listRoleSelected.push(t)}createAccount(){"PERSONAL"===this.userType&&this.createPersonalAccount(),"BUSINESS"===this.userType&&this.createBusinessAccount()}createPersonalAccount(){var t,i,o,r,c,u;const h={agentName:this.userForm.controls.agentName.value,avatar:this.avatarFile?this.avatarFile.name:null,backImageIdentify:this.personalForm.controls.backImageIdentify.value,bankAccount:null===(t=this.userForm.controls.bankAccount.value)||void 0===t?void 0:t.trim(),bankBranchName:this.userForm.controls.bankBranchName.value,bankName:this.userForm.controls.bankName.value,belongSale:this.userForm.controls.belongSale.value,business:!1,companyAddress:"",companyCode:"",companyName:"",discountPaymentType:(null===(i=this.userForm.controls.discountPaymentType)||void 0===i?void 0:i.value)||"",email:null===(o=this.userForm.controls.email.value)||void 0===o?void 0:o.trim(),frontImageIdentify:this.personalForm.controls.frontImageIdentify.value,identifyDateProvide:this.personalForm.controls.identifyDateProvide.value?P(this.personalForm.controls.identifyDateProvide.value).format("DD/MM/YYYY"):"",identifyId:null===(r=this.personalForm.controls.identifyId.value)||void 0===r?void 0:r.trim(),identifyPlaceProvide:this.personalForm.controls.identifyPlaceProvide.value,maxNegative:(null===(c=this.userForm.controls.maxNegative)||void 0===c?void 0:c.value)||0,nameOwnAccount:this.userForm.controls.nameOwnAccount.value,note:this.userForm.controls.note.value,phone:null===(u=this.userForm.controls.phone.value)||void 0===u?void 0:u.trim(),phoneArea:this.userForm.controls.areaCode.value,facebookContact:this.userForm.controls.facebookContact.value,referralChannel:this.userForm.controls.referralChannel.value,representative:this.userForm.controls.representative.value,roleIds:this.listRoleSelected||[],titleId:this.roleForm.controls.titleId.value,userName:this.userForm.controls.userName.value};this.isLoading=!0,this._userService.getUrlUploadImage({username:this.userForm.controls.userName.value,avatarContentType:this.avatarFile?this.avatarFile.type:"",avatarExtension:this.getExtension(this.avatarFile?this.avatarFile.name:""),cccdFontContentType:this.cccdFontFile?this.cccdFontFile.type:"",cccdFontExtension:this.getExtension(this.cccdFontFile?this.cccdFontFile.name:""),cccdBackContentType:this.cccdBackFile?this.cccdBackFile.type:"",cccdBackExtension:this.getExtension(this.cccdBackFile?this.cccdBackFile.name:"")}).subscribe({next:m=>{this.isLoading=!0;const T=[this.uploadAvatarToS3(m.data.cccdFontUploadUrl,this.cccdFontFile.type,this.cccdFontFile),this.uploadAvatarToS3(m.data.cccdBackUploadUrl,this.cccdBackFile.type,this.cccdBackFile)];this.avatarFile&&T.push(this.uploadAvatarToS3(m.data.avatarUploadUrl,this.avatarFile.type,this.avatarFile)),(0,b.D)(T).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:v=>{this._userService.createAgentUser(h).subscribe({next:x=>{x.success?(this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"T\u1ea1o \u0111\u1ea1i l\xfd th\xe0nh c\xf4ng",sticky:!1}),this.step="SUCCESS"):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:x.objectError.errorDescription.vi,sticky:!0})},error:()=>{this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\xf3 l\u1ed7i x\u1ea3y ra",sticky:!0})}})}})}})}createBusinessAccount(){this.createBusinessUser()}createBusinessUser(){var t,i,o,r,c;const u={userName:this.userForm.controls.userName.value,agentName:this.userForm.controls.agentName.value,representative:this.userForm.controls.representative.value,avatar:this.avatarFile?this.avatarFile.name:"",email:null===(t=this.userForm.controls.email.value)||void 0===t?void 0:t.trim(),phone:null===(i=this.userForm.controls.phone.value)||void 0===i?void 0:i.trim(),phoneArea:this.userForm.controls.areaCode.value,belongSale:this.userForm.controls.belongSale.value,facebookContact:this.userForm.controls.facebookContact.value,referralChannel:this.userForm.controls.referralChannel.value,note:this.userForm.controls.note.value,bankAccount:null===(o=this.userForm.controls.bankAccount.value)||void 0===o?void 0:o.trim(),nameOwnAccount:this.userForm.controls.nameOwnAccount.value,bankName:this.userForm.controls.bankName.value,bankBranchName:this.userForm.controls.bankBranchName.value,titleId:this.roleForm.controls.titleId.value,roleIds:this.listRoleSelected||[],business:!0,identifyId:"",identifyDateProvide:"",identifyPlaceProvide:"",frontImageIdentify:"",backImageIdentify:"",companyCode:this.businessForm.controls.companyCode.value,companyName:this.businessForm.controls.companyName.value,companyAddress:this.businessForm.controls.companyAddress.value,discountPaymentType:(null===(r=this.userForm.controls.discountPaymentType)||void 0===r?void 0:r.value)||"",maxNegative:(null===(c=this.userForm.controls.maxNegative)||void 0===c?void 0:c.value)||0};this.isLoading=!0,this._userService.createAgentUser(u).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:h=>{h.success?(this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"T\u1ea1o \u0111\u1ea1i l\xfd th\xe0nh c\xf4ng",sticky:!1}),this.step="SUCCESS"):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:h.objectError.errorDescription.vi,sticky:!0})},error:()=>{this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\xf3 l\u1ed7i x\u1ea3y ra",sticky:!0})}})}getExtension(t){return"."+t.split(".").pop()}uploadAvatarToS3(t,i,o){return this._userService.uploadfileAWSS3(t,i,o)}createNew(){this._router.navigate(["admin/create-agent"])}viewList(){this._router.navigate(["admin/agent-manage"])}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(Q.jH),e.Y36(s.qu),e.Y36(R.Nj),e.Y36(f.F0),e.Y36(E.BX),e.Y36(f.gz),e.Y36(Z.yD),e.Y36(Z.KD),e.Y36($.l),e.Y36(ie.j),e.Y36(g.$A),e.Y36(l.KNP))},n.\u0275cmp=e.Xpm({type:n,selectors:[["create-agent-page"]],standalone:!0,features:[e.jDz],decls:21,vars:13,consts:[[1,"flex","justify-center","pt-[32px]","pb-1","px-[30px]","rounded-lg","md:hidden"],[1,"w-[1000px]","max-w-[1000px]","flex","gap-x-2"],[1,"text-body-md-short","text-neutral-gray-4"],["icon","chevron_right","size","small",1,"text-neutral-gray-4"],["class","flex justify-center py-4 px-[30px] rounded-lg md:hidden",4,"ngIf"],[1,"p-5","hidden","md:block","text-center"],[4,"ngIf"],[1,"flex","justify-center","py-4","px-[30px]","rounded-lg","md:hidden"],[1,"w-[1000px]","max-w-[1000px]","flex","flex-col","gap-y-8"],[1,""],[1,"flex","gap-x-[20px]","mb-4"],[1,"w-1","bg-[#fcb40a]"],[1,"text-heading-md"],[1,"p-6","bg-neutral-white","rounded-lg","shadow-cf-md","flex","flex-col","gap-y-4"],[1,"flex","gap-x-4"],[1,"flex","flex-col","grow","gap-y-2"],[1,"grow-[400]","!w-full",3,"status"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5",3,"CfRequired"],["cf-input","","size","medium","placeholder","Nh\u1eadp m\xe3 \u0111\u1ea1i l\xfd",3,"formControl"],["cfHint","",3,"hint",4,"ngIf"],["cf-input","","size","medium","placeholder","Nh\u1eadp t\xean \u0111\u1ea1i l\xfd",3,"formControl"],[1,"flex","items-end","pt-7"],[1,"h-full","w-[124px]","bg-no-repeat","bg-center","bg-cover","rounded","border","border-dashed","border-neutral-gray-2","flex","items-center","justify-center","P-6","cursor-pointer","overflow-hidden",3,"ngClass","click"],["class","text-express-sm text-center px-6 flex flex-col justify-center items-center gap-y-3",4,"ngIf"],["type","file","accept","image/*",1,"hidden",3,"change"],["fileUpload",""],["cf-input","","size","medium","placeholder","Nh\u1eadp h\u1ecd v\xe0 t\xean ng\u01b0\u1eddi \u0111\u1ea1i di\u1ec7n",3,"formControl"],[1,"flex","w-full","gap-x-4","mt-2"],[1,"grow-[433]",3,"status"],["cf-input","","size","medium","placeholder","Nh\u1eadp email",3,"formControl"],[1,"text-espressive-md","text-neutral-gray-5","mb-1.5","empty:!m-0"],["textField","name","valueField","code","size","small","placeholder","Nh\u1eadp m\xe3",1,"!w-full","!max-w-full",3,"status","data","formControl"],["cfSuffix","",1,"w-[65%]","px-3","text-body-md","flex","gap-x-2","items-center","border-l","border-neutral-gray-2"],["cf-input","","size","medium","autocomplete","off","placeholder","Nh\u1eadp s\u1ed1 \u0111i\u1ec7n tho\u1ea1i","CfNumberic","",3,"formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u",1,"!max-w-none","w-full",3,"status","data","allowSearch","formControl"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],[1,"!w-full",3,"status"],["cf-input","","placeholder","Ghi ch\xfa m\xf4 t\u1ea3 chi ti\u1ebft v\u1ec1 \u0111\u1ea1i l\xfd n\xe0y",3,"formControl"],[1,"mt-3"],[1,"border","border-dashed","border-neutral-gray-3","rounded"],[1,"flex","justify-between","items-center","gap-x-2","py-2.5","px-4",3,"click"],[1,"text-espressive-sm","text-black","flex-1","flex","items-center","gap-x-2"],["icon","document","size","small"],[1,"cursor-pointer"],["icon","remove","size","small",4,"ngIf"],["icon","plus","size","small",4,"ngIf"],["class","flex flex-col gap-y-2 border-t border-neutral-gray-1 py-2.5 px-4",4,"ngIf"],[1,"flex","flex-nowrap","gap-x-4"],[1,"!w-1/2",3,"status"],["cf-input","","size","medium","placeholder","Nh\u1eadp s\u1ed1 t\xe0i kho\u1ea3n ng\xe2n h\xe0ng","CfNumberic","",3,"formControl"],["cf-input","","size","medium","placeholder","Nh\u1eadp h\u1ecd t\xean ch\u1ee7 t\xe0i kho\u1ea3n",3,"formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn ng\xe2n h\xe0ng",1,"!w-1/2","!max-w-none",3,"customSearch","status","data","formControl","allowSearch"],["cf-input","","size","medium","placeholder","Nh\u1eadp t\xean chi nh\xe1nh ng\xe2n h\xe0ng",3,"formControl"],[1,"flex","justify-between"],["cf-button","","size","medium","type","secondary","class","bg-white",4,"ngIf"],["cf-button","","size","medium",3,"disabled","click"],["icon","chevron_right","size","small",1,"ml-2.5"],["cfHint","",3,"hint"],[1,"text-express-sm","text-center","px-6","flex","flex-col","justify-center","items-center","gap-y-3"],["icon","cloud_upload","size","medium"],["icon","remove","size","small"],["icon","plus","size","small"],[1,"flex","flex-col","gap-y-2","border-t","border-neutral-gray-1","py-2.5","px-4"],["cf-input","","size","medium","placeholder","Nh\u1eadp trang facebook c\u1ee7a \u0111\u1ea1i l\xfd",1,"truncate",3,"formControl"],[1,"flex","gap-x-2","w-full"],["textField","name","valueField","code","placeholder","Ch\u1ecdn k\xeanh gi\u1edbi thi\u1ec7u",1,"!max-w-none","w-full","bg-neutral-white",3,"status","data","allowSearch","formControl"],[1,"p-6","bg-neutral-white","rounded-lg","shadow-cf-md"],["textField","text","valueField","value","placeholder","Ch\u1ecdn lo\u1ea1i chi\u1ebft kh\u1ea5u nh\u1eadn",1,"!w-full","!max-w-none",3,"status","data","allowSearch","formControl"],[1,"w-full",3,"status"],["cfLabel","",1,"text-express-sm","text-black",3,"CfRequired"],["size","medium",3,"placeholder","negative","formControl"],["cf-button","","size","medium","type","secondary",1,"bg-white"],["icon","arrow_left","size","small",1,"mr-2.5"],[1,"w-[1000px]","max-w-[1000px]","flex","flex-col","gap-y-4"],[1,"flex","gap-x-[20px]"],[1,"p-6","bg-neutral-white","rounded","shadow-cf-md","flex","flex-col","gap-y-4"],[1,"flex","items-center","gap-x-8",3,"ngModel","ngModelChange","checkChange"],["size","medium",3,"value"],["class","flex flex-col gap-y-4",4,"ngIf"],[1,"flex","justify-between","gap-x-2"],["cf-button","","size","medium",1,"bg-white",3,"type","click"],["cf-button","","size","medium",3,"disabled","click",4,"ngIf"],[1,"flex","flex-col","gap-y-4"],["cf-input","","size","medium","placeholder","Nh\u1eadp s\u1ed1 CCCD/CMND","CfNumberic","",3,"formControl"],["cfLabel",""],["cfDatepicker","","type","text","size","medium","cf-input","","placeholder","Ch\u1ecdn ng\xe0y c\u1ea5p CCCD/CMND",1,"py-[7px]",3,"displayMonths","maxDate","formControl","input","dateSelect"],["dateFrom","cfDatepicker"],["cf-input","","size","medium","placeholder","Nh\u1eadp n\u01a1i c\u1ea5p CCCD/CMND",3,"formControl"],[1,"text-espressive-sm"],[1,"flex","gap-x-3"],[1,"h-[140px]","w-[140px]","bg-no-repeat","bg-center","bg-cover","rounded","border","border-neutral-gray-2","flex","items-center","justify-center","cursor-pointer",3,"click"],["fileUploadCCCDFont",""],["fileUploadCCCDBack",""],["cf-input","","size","medium","placeholder","Nh\u1eadp m\xe3 s\u1ed1 doanh nghi\u1ec7p",3,"formControl"],["cf-input","","size","medium","placeholder","Nh\u1eadp t\xean doanh nghi\u1ec7p",3,"formControl"],["cf-input","","size","medium","placeholder","Nh\u1eadp \u0111\u1ecba ch\u1ec9 doanh nghi\u1ec7p",3,"formControl"],[1,"p-6","bg-neutral-white","rounded","shadow-cf-md","flex","flex-col","gap-y-6"],["textField","name","valueField","id","placeholder","Ch\u1ecdn vai tr\xf2",1,"!w-full","!max-w-none",3,"status","data","allowSearch","formControl","selectedChange"],["class","w-full border-t border-neutral-gray-1",4,"ngIf"],["class","flex gap-x-8",4,"ngIf"],["cf-button","","size","medium",1,"!bg-white",3,"type","click"],["icon","add","size","small",1,"mr-2.5"],[1,"w-full","border-t","border-neutral-gray-1"],[1,"flex","gap-x-8"],[1,"flex","flex-col","gap-y-2","w-[260px]"],[1,"text-heading-sm"],[1,"text-body-lg","text-neutral-gray-4"],[1,"flex","flex-col","flex-1","gap-y-4"],[4,"ngFor","ngForOf"],[3,"disabled","checked"],[3,"checkedChange"],[1,"p-6","bg-neutral-white","rounded","shadow-cf-md","flex","flex-col","gap-y-6","justify-center","items-center"],["src","assets/images/wow-factor.svg",1,"w-32"],[1,"flex","flex-col","items-center","gap-y-4"],[1,"text-heading-md","text-neutral-black"],[1,"text-center","text-body-md-long"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["cfHeadIcon","","icon","plus","size","small",1,"mr-2"],["cf-button","","size","medium",3,"click"],["cfHeadIcon","","icon","document","size","small",1,"mr-2"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3,"Th\xf4ng tin c\u01a1 b\u1ea3n"),e.qZA(),e._UZ(4,"cf-icon",3),e.TgZ(5,"div",2),e._uU(6,"X\xe1c th\u1ef1c danh t\xednh"),e.qZA(),e._UZ(7,"cf-icon",3),e.TgZ(8,"div",2),e._uU(9,"Quy\u1ec1n h\u1ea1n "),e.qZA(),e._UZ(10,"cf-icon",3),e.TgZ(11,"div",2),e._uU(12,"Ho\xe0n th\xe0nh "),e.qZA()()(),e.YNc(13,Ft,107,67,"div",4),e.YNc(14,Rt,20,8,"div",4),e.YNc(15,Xt,22,11,"div",4),e.YNc(16,$t,25,2,"div",4),e.TgZ(17,"div",5),e._uU(18," Vi\u1ec7c t\u1ea1o \u0111\u1ea1i l\xfd ph\u1ee9c t\u1ea1p \u0111\xf2i h\u1ecfi \u0111\u1ed9 ch\xednh x\xe1c cao \u0111\u1ea1i l\xfd vui l\xf2ng thao t\xe1c tr\xean m\xe1y t\xednh\n"),e.qZA(),e._UZ(19,"cf-toast"),e.YNc(20,Wt,1,0,"cf-spinner",6)),2&t&&(e.xp6(2),e.ekj("text-neutral-gray-5","BASIC_INFO"===i.step),e.xp6(3),e.ekj("text-neutral-gray-5","IDENTITY"===i.step),e.xp6(3),e.ekj("text-neutral-gray-5","TITLE_ROLE"===i.step),e.xp6(3),e.ekj("text-neutral-gray-5","SUCCESS"===i.step),e.xp6(2),e.Q6J("ngIf","BASIC_INFO"===i.step),e.xp6(1),e.Q6J("ngIf","IDENTITY"===i.step),e.xp6(1),e.Q6J("ngIf","TITLE_ROLE"===i.step),e.xp6(1),e.Q6J("ngIf","SUCCESS"===i.step),e.xp6(4),e.Q6J("ngIf",i.isLoading))},dependencies:[_.ez,_.mk,_.sg,_.O5,s.u5,s.Fj,s.JJ,s.On,s.UX,s.oH,p.j$,p.ND,p.BN,p.v2,p.lt,C.N8,C.Xq,E.hj,I.q,Q.Cs,Y.o,Y.T,l.AxE,l.Sm8,V.C,G.I,D.OR,X.z],encapsulation:2}),n})();var ue=d(87683);function tn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\xean \u0111\u0103ng nh\u1eadp kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function nn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\xean \u0111\u0103ng nh\u1eadp \u0111\xe3 t\u1ed3n t\u1ea1i")}function on(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 6 k\xed t\u1ef1")}function an(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\xean \u0111\u0103ng nh\u1eadp ch\u1ec9 bao g\u1ed3m ch\u1eef v\xe0 s\u1ed1")}function rn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","H\u1ecd v\xe0 t\xean kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function cn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 2 k\xed t\u1ef1")}function sn(n,a){1&n&&(e.TgZ(0,"div",59),e._uU(1," Upload \u1ea3nh \u0111\u1ea1i di\u1ec7n "),e.qZA())}function ln(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","Email kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function un(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","\u0110\u1ecbnh d\u1ea1ng kh\xf4ng h\u1ee3p l\u1ec7")}function dn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","S\u1ed1 \u0111i\u1ec7n tho\u1ea1i kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function _n(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 7 ch\u1eef s\u1ed1")}function pn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 11 ch\u1eef s\u1ed1")}function gn(n,a){1&n&&(e.TgZ(0,"div",60),e._UZ(1,"cf-icon",61),e.TgZ(2,"span"),e._uU(3,"Th\xf4ng tin b\u1ed5 sung"),e.qZA()())}function hn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y sinh")}function mn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function fn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","S\u1ed1 CCCD/CMND kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function vn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 6 ch\u1eef s\u1ed1")}function Cn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 12 ch\u1eef s\u1ed1")}function xn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","Ng\xe0y c\u1ea5p CCCD/CMND kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function En(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","Ng\xe0y c\u1ea5p CCCD/CMND ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function yn(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","N\u01a1i c\u1ea5p CCCD/CMND kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function An(n,a){1&n&&(e.TgZ(0,"div",62),e._uU(1," M\u1eb7t tr\u01b0\u1edbc "),e.qZA())}function Tn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",63),e.NdJ("click",function(o){e.CHM(t),e.oxw();const r=e.MAs(95),c=e.oxw();return e.KtG(c.onDeleteCCCDFont(o,r))}),e._UZ(1,"cf-icon",64),e.qZA()}}function Dn(n,a){1&n&&(e.TgZ(0,"div",62),e._uU(1," M\u1eb7t sau "),e.qZA())}function Zn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",63),e.NdJ("click",function(o){e.CHM(t),e.oxw();const r=e.MAs(100),c=e.oxw();return e.KtG(c.onDeleteCCCDBack(o,r))}),e._UZ(1,"cf-icon",64),e.qZA()}}function Fn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",65),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.setStep("BASIC_INFO"))}),e._UZ(1,"cf-icon",66),e._uU(2," Quay l\u1ea1i "),e.qZA()}}const bn=function(n){return{"border border-dashed border-neutral-gray-2":n}};function kn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",5)(2,"div")(3,"div",6),e._UZ(4,"div",7),e.TgZ(5,"div",8),e._uU(6,"Th\xf4ng tin c\u01a1 b\u1ea3n"),e.qZA()(),e.TgZ(7,"div",9)(8,"div",10)(9,"div",11)(10,"cf-input-group",12)(11,"label",13),e._uU(12," T\xean \u0111\u0103ng nh\u1eadp "),e.qZA(),e._UZ(13,"input",14),e.YNc(14,tn,1,1,"cf-input-hint",15),e.YNc(15,nn,1,1,"cf-input-hint",15),e.YNc(16,on,1,1,"cf-input-hint",15),e.YNc(17,an,1,1,"cf-input-hint",15),e.qZA(),e.TgZ(18,"cf-input-group",12)(19,"label",13),e._uU(20," H\u1ecd v\xe0 t\xean "),e.qZA(),e._UZ(21,"input",16),e.YNc(22,rn,1,1,"cf-input-hint",15),e.YNc(23,cn,1,1,"cf-input-hint",15),e.qZA()(),e.TgZ(24,"div",17)(25,"div",18),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(28);return e.KtG(o.click())}),e.YNc(26,sn,2,0,"div",19),e.qZA(),e.TgZ(27,"input",20,21),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.uploadAvatar(o))}),e.qZA()()(),e.TgZ(29,"div",22)(30,"cf-input-group",23)(31,"label",13),e._uU(32," Email "),e.qZA(),e._UZ(33,"input",24),e.YNc(34,ln,1,1,"cf-input-hint",15),e.YNc(35,un,1,1,"cf-input-hint",15),e.qZA(),e.TgZ(36,"div")(37,"div",25)(38,"label",13),e._uU(39," S\u1ed1 \u0111i\u1ec7n tho\u1ea1i "),e.qZA()(),e.TgZ(40,"cf-select",26)(41,"div",27),e._UZ(42,"input",28),e.qZA(),e.YNc(43,dn,1,1,"cf-input-hint",15),e.YNc(44,_n,1,1,"cf-input-hint",15),e.YNc(45,pn,1,1,"cf-input-hint",15),e.qZA()()(),e.TgZ(46,"div",29)(47,"cf-collapse",30)(48,"cf-collapse-panel",31),e.YNc(49,gn,4,0,"ng-template",null,32,e.W1O),e.TgZ(51,"div",33)(52,"cf-input-group",34)(53,"label",35),e._uU(54,"Ng\xe0y sinh"),e.qZA(),e.TgZ(55,"input",36,37),e.NdJ("input",function(){e.CHM(t);const o=e.MAs(56);return e.KtG(o.close())})("dateSelect",function(){e.CHM(t);const o=e.MAs(56);return e.KtG(o.close())}),e.qZA(),e.YNc(57,hn,1,1,"cf-input-hint",15),e.YNc(58,mn,1,1,"cf-input-hint",15),e.qZA(),e.TgZ(59,"cf-select",38)(60,"label",39),e._uU(61," Gi\u1edbi t\xednh "),e.qZA()()()()()()()(),e.TgZ(62,"div")(63,"div",6),e._UZ(64,"div",7),e.TgZ(65,"div",8),e._uU(66,"X\xe1c th\u1ef1c danh t\xednh"),e.qZA()(),e.TgZ(67,"div",40)(68,"div",41)(69,"cf-input-group",34)(70,"label",13),e._uU(71," S\u1ed1 CCCD/CMND "),e.qZA(),e._UZ(72,"input",42),e.YNc(73,fn,1,1,"cf-input-hint",15),e.YNc(74,vn,1,1,"cf-input-hint",15),e.YNc(75,Cn,1,1,"cf-input-hint",15),e.qZA(),e.TgZ(76,"cf-input-group",34)(77,"label",43),e._uU(78,"Ng\xe0y c\u1ea5p CCCD/CMND"),e.qZA(),e.TgZ(79,"input",44,45),e.NdJ("input",function(){e.CHM(t);const o=e.MAs(80);return e.KtG(o.close())})("dateSelect",function(){e.CHM(t);const o=e.MAs(80);return e.KtG(o.close())}),e.qZA(),e.YNc(81,xn,1,1,"cf-input-hint",15),e.YNc(82,En,1,1,"cf-input-hint",15),e.qZA(),e.TgZ(83,"cf-input-group",34)(84,"label",13),e._uU(85," N\u01a1i c\u1ea5p CCCD/CMND "),e.qZA(),e._UZ(86,"input",46),e.YNc(87,yn,1,1,"cf-input-hint",15),e.qZA(),e.TgZ(88,"div",47),e._uU(89,"Upload \u1ea3nh ch\u1ee5p CCCD/CMND"),e.qZA(),e.TgZ(90,"div",48)(91,"div",49),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(95);return e.KtG(o.click())}),e.YNc(92,An,2,0,"div",50),e.YNc(93,Tn,2,0,"div",51),e.qZA(),e.TgZ(94,"input",20,52),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.uploadCCCDFont(o))}),e.qZA(),e.TgZ(96,"div",49),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(100);return e.KtG(o.click())}),e.YNc(97,Dn,2,0,"div",50),e.YNc(98,Zn,2,0,"div",51),e.qZA(),e.TgZ(99,"input",20,53),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.uploadCCCDBack(o))}),e.qZA()()()()(),e.TgZ(101,"div",54)(102,"div"),e.YNc(103,Fn,3,0,"button",55),e.qZA(),e.TgZ(104,"button",56),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setStep("TITLE_ROLE"))}),e._uU(105," Ti\u1ebfp t\u1ee5c "),e._UZ(106,"cf-icon",57),e.qZA()()()()}if(2&n){const t=e.MAs(50),i=e.oxw();e.xp6(10),e.Q6J("status",i.userForm.controls.userName.invalid&&(i.userForm.controls.userName.dirty||i.userForm.controls.userName.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",i.userForm.controls.userName),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.userName.errors?null:i.userForm.controls.userName.errors.required)&&(i.userForm.controls.userName.dirty||i.userForm.controls.userName.touched)),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.userName.errors?null:i.userForm.controls.userName.errors.usernameDuplicated)&&(i.userForm.controls.userName.dirty||i.userForm.controls.userName.touched)),e.xp6(1),e.Q6J("ngIf",i.userForm.controls.userName.hasError("maxlength")&&(i.userForm.controls.userName.touched||i.userForm.controls.userName.dirty)),e.xp6(1),e.Q6J("ngIf",!i.userForm.controls.userName.hasError("maxlength")&&i.userForm.controls.userName.hasError("pattern")&&(i.userForm.controls.userName.touched||i.userForm.controls.userName.dirty)),e.xp6(1),e.Q6J("status",i.userForm.controls.agentName.invalid&&(i.userForm.controls.agentName.dirty||i.userForm.controls.agentName.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",i.userForm.controls.agentName),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.agentName.errors?null:i.userForm.controls.agentName.errors.required)&&(i.userForm.controls.agentName.dirty||i.userForm.controls.agentName.touched)),e.xp6(1),e.Q6J("ngIf",i.userForm.controls.agentName.hasError("minlength")&&(i.userForm.controls.agentName.touched||i.userForm.controls.agentName.dirty)),e.xp6(2),e.Jzz("background-image: url(",i.previewAvatar,");"),e.Q6J("ngClass",e.VKq(73,bn,!i.previewAvatar)),e.xp6(1),e.Q6J("ngIf",!i.previewAvatar),e.xp6(4),e.Q6J("status",i.userForm.controls.email.invalid&&(i.userForm.controls.email.dirty||i.userForm.controls.email.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",i.userForm.controls.email),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.email.errors?null:i.userForm.controls.email.errors.required)&&(i.userForm.controls.email.dirty||i.userForm.controls.email.touched)),e.xp6(1),e.Q6J("ngIf",i.userForm.controls.email.hasError("email")&&(i.userForm.controls.email.touched||i.userForm.controls.email.dirty)),e.xp6(3),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",i.userForm.controls.phone.invalid&&(i.userForm.controls.phone.dirty||i.userForm.controls.phone.touched)?"error":"default")("data",i.optionsAreaCode)("formControl",i.userForm.controls.areaCode),e.xp6(2),e.Q6J("formControl",i.userForm.controls.phone),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.phone.errors?null:i.userForm.controls.phone.errors.required)&&(i.userForm.controls.phone.dirty||i.userForm.controls.phone.touched)),e.xp6(1),e.Q6J("ngIf",i.userForm.controls.phone.hasError("minlength")&&(i.userForm.controls.phone.touched||i.userForm.controls.phone.dirty)),e.xp6(1),e.Q6J("ngIf",i.userForm.controls.phone.hasError("maxlength")&&(i.userForm.controls.phone.touched||i.userForm.controls.phone.dirty)),e.xp6(3),e.Q6J("title",t)("active",!1),e.xp6(4),e.Q6J("status",i.userForm.controls.birthday.invalid&&(i.userForm.controls.birthday.dirty||i.userForm.controls.birthday.touched)?"error":"default"),e.xp6(3),e.Q6J("displayMonths",1)("maxDate",i.currentDate)("formControl",i.userForm.controls.birthday),e.xp6(2),e.Q6J("ngIf",(null==i.userForm.controls.birthday.errors?null:i.userForm.controls.birthday.errors.required)&&(i.userForm.controls.birthday.dirty||i.userForm.controls.birthday.touched)),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.birthday.errors||null==i.userForm.controls.birthday.errors.ngbDate?null:i.userForm.controls.birthday.errors.ngbDate.invalid)&&(i.userForm.controls.birthday.dirty||i.userForm.controls.birthday.touched)),e.xp6(1),e.Q6J("status",i.userForm.controls.gender.invalid&&(i.userForm.controls.gender.dirty||i.userForm.controls.gender.touched)?"error":"default")("data",i.genderData)("allowSearch",!1)("formControl",i.userForm.controls.gender)("allowSearch",!0),e.xp6(10),e.Q6J("status",i.userForm.controls.identifyId.invalid&&(i.userForm.controls.identifyId.dirty||i.userForm.controls.identifyId.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",i.userForm.controls.identifyId),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.identifyId.errors?null:i.userForm.controls.identifyId.errors.required)&&(i.userForm.controls.identifyId.dirty||i.userForm.controls.identifyId.touched)),e.xp6(1),e.Q6J("ngIf",i.userForm.controls.identifyId.hasError("minlength")&&(i.userForm.controls.identifyId.touched||i.userForm.controls.identifyId.dirty)),e.xp6(1),e.Q6J("ngIf",i.userForm.controls.identifyId.hasError("maxlength")&&(i.userForm.controls.identifyId.touched||i.userForm.controls.identifyId.dirty)),e.xp6(1),e.Q6J("status",i.userForm.controls.identifyDateProvide.invalid&&(i.userForm.controls.identifyDateProvide.dirty||i.userForm.controls.identifyDateProvide.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("displayMonths",1)("maxDate",i.currentDate)("formControl",i.userForm.controls.identifyDateProvide),e.xp6(2),e.Q6J("ngIf",(null==i.userForm.controls.identifyDateProvide.errors?null:i.userForm.controls.identifyDateProvide.errors.required)&&(i.userForm.controls.identifyDateProvide.dirty||i.userForm.controls.identifyDateProvide.touched)),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.identifyDateProvide.errors||null==i.userForm.controls.identifyDateProvide.errors.ngbDate?null:i.userForm.controls.identifyDateProvide.errors.ngbDate.invalid)&&(i.userForm.controls.identifyDateProvide.dirty||i.userForm.controls.identifyDateProvide.touched)),e.xp6(1),e.Q6J("status",i.userForm.controls.identifyPlaceProvide.invalid&&(i.userForm.controls.identifyPlaceProvide.dirty||i.userForm.controls.identifyPlaceProvide.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("formControl",i.userForm.controls.identifyPlaceProvide),e.xp6(1),e.Q6J("ngIf",(null==i.userForm.controls.identifyPlaceProvide.errors?null:i.userForm.controls.identifyPlaceProvide.errors.required)&&(i.userForm.controls.identifyPlaceProvide.dirty||i.userForm.controls.identifyPlaceProvide.touched)),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(3),e.Jzz("background-image: url(",i.previewCCCDFont,");"),e.xp6(1),e.Q6J("ngIf",!i.previewCCCDFont),e.xp6(1),e.Q6J("ngIf",i.previewCCCDFont),e.xp6(3),e.Jzz("background-image: url(",i.previewCCCDBack,");"),e.xp6(1),e.Q6J("ngIf",!i.previewCCCDBack),e.xp6(1),e.Q6J("ngIf",i.previewCCCDBack),e.xp6(5),e.Q6J("ngIf","BASIC_INFO"!==i.step),e.xp6(1),e.Q6J("disabled",i.userForm.invalid)}}function In(n,a){1&n&&e._UZ(0,"cf-input-hint",58),2&n&&e.Q6J("hint","Ch\u1ee9c danh kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Un(n,a){1&n&&e._UZ(0,"div",75)}function Nn(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",82),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("disabled",!0)("checked",!0),e.xp6(1),e.Oqu(t)}}function wn(n,a){if(1&n&&(e.TgZ(0,"div",76)(1,"div",77)(2,"div",78),e._uU(3," Quy\u1ec1n h\u1ea1n m\u1eb7c \u0111\u1ecbnh "),e.qZA(),e.TgZ(4,"div",79),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c c\u1ea5p cho role \u0111\xf3, kh\xf4ng \u0111\u01b0\u1ee3c ph\xe9p thay \u0111\u1ed5i. "),e.qZA()(),e.TgZ(6,"div",80),e.YNc(7,Nn,3,3,"ng-container",81),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(7),e.Q6J("ngForOf",t.listDefaultRole)}}function qn(n,a){1&n&&e._UZ(0,"div",75)}function Pn(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"cf-switch",83),e.NdJ("checkedChange",function(){const r=e.CHM(t).$implicit,c=e.oxw(3);return e.KtG(c.onToggleRole(r.id))}),e._uU(2),e.qZA(),e.BQk()}if(2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.name)}}function Jn(n,a){if(1&n&&(e.TgZ(0,"div",76)(1,"div",77)(2,"div",78),e._uU(3," Quy\u1ec1n h\u1ea1n n\xe2ng cao "),e.qZA(),e.TgZ(4,"div",79),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c ch\u1ec9 \u0111\u1ecbnh c\u1ea5p th\xeam cho \u0111\u1ea1i l\xfd n\u1ebfu mu\u1ed1n. "),e.qZA()(),e.TgZ(6,"div",80),e.YNc(7,Pn,3,1,"ng-container",81),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(7),e.Q6J("ngForOf",t.listAdvanceRole)}}function Sn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",67)(1,"div",68)(2,"div",6),e._UZ(3,"div",7),e.TgZ(4,"div",8),e._uU(5,"Quy\u1ec1n h\u1ea1n"),e.qZA()(),e.TgZ(6,"div",69)(7,"cf-select",70),e.NdJ("selectedChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.loadRoleAdvance(o))}),e.TgZ(8,"label",13),e._uU(9," Ch\u1ee9c danh "),e.qZA(),e.YNc(10,In,1,1,"cf-input-hint",15),e.qZA(),e.YNc(11,Un,1,0,"div",71),e.YNc(12,wn,8,1,"div",72),e.YNc(13,qn,1,0,"div",71),e.YNc(14,Jn,8,1,"div",72),e.qZA(),e.TgZ(15,"div",73)(16,"button",65),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setStep("BASIC_INFO"))}),e._UZ(17,"cf-icon",66),e._uU(18," Quay l\u1ea1i "),e.qZA(),e.TgZ(19,"button",56),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.createAccount())}),e._UZ(20,"cf-icon",74),e._uU(21," T\u1ea1o t\xe0i kho\u1ea3n "),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(7),e.Q6J("status",t.roleForm.controls.titleId.invalid&&(t.roleForm.controls.titleId.dirty||t.roleForm.controls.titleId.touched)?"error":"default")("data",t.roleOptions)("allowSearch",!1)("formControl",t.roleForm.controls.titleId)("allowSearch",!1),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("ngIf",t.roleForm.controls.titleId.hasError("required")&&(t.roleForm.controls.titleId.dirty||t.roleForm.controls.titleId.touched)),e.xp6(1),e.Q6J("ngIf",t.listDefaultRole.length),e.xp6(1),e.Q6J("ngIf",t.listDefaultRole.length),e.xp6(1),e.Q6J("ngIf",t.listAdvanceRole.length),e.xp6(1),e.Q6J("ngIf",t.listAdvanceRole.length),e.xp6(5),e.Q6J("disabled",t.roleForm.invalid)}}function Mn(n,a){1&n&&e._UZ(0,"cf-spinner")}let Qn=(()=>{class n{constructor(t,i,o,r,c,u,h,m,T,v,x){this.calendar=t,this._fb=i,this._roleService=o,this._router=r,this._toastService=c,this._route=u,this._titleService=h,this._userService=m,this._phoneDataService=T,this._bankDataService=v,this._iconRegister=x,this.allRole=[],this.listAdvanceRole=[],this.listDefaultRole=[],this.editMode=!1,this.optionsAreaCode=[],this.genderData=[{code:"male",name:"Nam"},{code:"female",name:"N\u1eef"}],this.titleData=[],this.step="BASIC_INFO",this.roleOptions=[],this.listRoleSelected=[],this.isLoading=!1,this.currentDate=t.getToday(),x.registerIcons([l.D7,l.rks,l.UNF,l.Rcu,l.toh])}ngOnInit(){this.optionsAreaCode=this._phoneDataService.optionsAreaCode,this.userForm=this._fb.group({userName:["",[s.kI.required,s.kI.pattern("^[A-Za-z0-9]+$"),s.kI.maxLength(6)],this.validateUserNameFromAPIDebounce.bind(this)],agentName:["",[s.kI.required,s.kI.minLength(2)]],avatar:[""],email:["",[s.kI.required,s.kI.email]],areaCode:["+84",s.kI.required],phone:["",[s.kI.required,s.kI.minLength(7),s.kI.maxLength(11)]],birthday:[null],gender:[""],identifyId:["",[s.kI.required,s.kI.minLength(6),s.kI.maxLength(12)]],identifyDateProvide:["",s.kI.required],identifyPlaceProvide:["",s.kI.required],frontImageIdentify:["",s.kI.required],backImageIdentify:["",s.kI.required]}),this.roleForm=this._fb.group({titleId:["",s.kI.required]}),this.initTitleData()}validateUserNameFromAPIDebounce(t){return(0,se.H)(1500).pipe((0,O.w)(()=>this._userService.checkUsernameExist(t.value).pipe((0,le.U)(i=>i.success&&!i.data?null:{usernameDuplicated:!0}))))}initTitleData(){this._titleService.getAllEmployeeTitleForCreateUser().subscribe({next:t=>{t.data&&(this.titleData=t.data,this.roleOptions=t.data.map(i=>({id:i.id,name:i.name})))}})}bankCustomSearch(t,i){return!(!t.code.toLocaleLowerCase().includes(i.toLocaleLowerCase())&&!t.name.toLocaleLowerCase().includes(i.toLocaleLowerCase()))}uploadAvatar(t){this.avatarFile=t.target.files[0],this.getPreviewImage(t,"avatar")}uploadCCCDFont(t){this.cccdFontFile=t.target.files[0],this.getPreviewImage(t,"cccdFont"),this.userForm.controls.frontImageIdentify.setValue(this.cccdFontFile.name)}uploadCCCDBack(t){this.cccdBackFile=t.target.files[0],this.getPreviewImage(t,"cccdBack"),this.userForm.controls.backImageIdentify.setValue(this.cccdBackFile.name)}onDeleteCCCDFont(t,i){t.preventDefault(),t.stopPropagation(),this.previewCCCDFont=null,this.userForm.controls.frontImageIdentify.setValue(null),i.value=""}onDeleteCCCDBack(t,i){t.preventDefault(),t.stopPropagation(),this.previewCCCDBack=null,this.userForm.controls.backImageIdentify.setValue(null),i.value=""}userTypeChange(t){this.userForm.controls.isBusiness.setValue("PERSONAL"!==t)}getPreviewImage(t,i){if(t.target.files&&t.target.files[0]){const o=t.target.files[0],r=new FileReader;switch(i){case"avatar":r.onload=c=>this.previewAvatar=r.result;break;case"cccdFont":r.onload=c=>this.previewCCCDFont=r.result;break;case"cccdBack":r.onload=c=>this.previewCCCDBack=r.result}r.readAsDataURL(o)}}setStep(t){"TITLE_ROLE"===t&&this.userForm.invalid||"TITLE_ROLE"===t&&"PENDING"===this.userForm.status?this.userForm.markAllAsTouched():this.step=t}roleChange(t,i){i.actived=t}initRoleAdvance(t){this.allRole=t.data.map(i=>({name:i.name,id:i.id,actived:!1}))}loadRoleAdvance(t){var i;this.listRoleSelected=[];const o=this.titleData.find(r=>r.id===t.id);o&&(this.listDefaultRole=o.defaultPermission||[],this.listAdvanceRole=(null===(i=o.advanceRole)||void 0===i?void 0:i.map(r=>({id:r.id,name:r.name})))||[])}createAccount(){this.createEmployeeAccount()}createEmployeeAccount(){const t={agentName:this.userForm.controls.agentName.value,avatar:this.avatarFile?this.avatarFile.name:"",frontImageIdentify:this.userForm.controls.frontImageIdentify.value,backImageIdentify:this.userForm.controls.backImageIdentify.value,birthday:this.userForm.controls.birthday.value?P(this.userForm.controls.birthday.value).format("DD/MM/YYYY"):"",email:this.userForm.controls.email.value,gender:this.userForm.controls.gender.value||"",identifyId:this.userForm.controls.identifyId.value,identifyDateProvide:this.userForm.controls.identifyDateProvide.value?P(this.userForm.controls.identifyDateProvide.value).format("DD/MM/YYYY"):"",identifyPlaceProvide:this.userForm.controls.identifyPlaceProvide.value,phone:this.userForm.controls.phone.value,phoneArea:this.userForm.controls.areaCode.value,roleIds:this.listRoleSelected||[],titleId:this.roleForm.controls.titleId.value,userName:this.userForm.controls.userName.value};this._userService.createEmployeeUser(t).subscribe({next:i=>{i.success?(this._toastService.add({severity:"success",summary:"T\u1ea1o t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",detail:"T\xe0i kho\u1ea3n nh\xe2n vi\xean \u0111\xe3 \u0111\u01b0\u1ee3c t\u1ea1o th\xe0nh c\xf4ng!",sticky:!1}),this._router.navigate(["admin/user-manage"])):this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 t\u1ea1o t\xe0i kho\u1ea3n nh\xe2n vi\xean. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!1})},error:i=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 t\u1ea1o t\xe0i kho\u1ea3n nh\xe2n vi\xean. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!1})}})}getExtension(t){return"."+t.split(".").pop()}uploadAvatarToS3(t,i,o){return this._userService.uploadfileAWSS3(t,i,o)}onToggleRole(t){this.listRoleSelected.includes(t)?this.listRoleSelected=this.listRoleSelected.filter(i=>i!==t):this.listRoleSelected.push(t)}checkInputNunber(t){const i=t.target.value;new RegExp("/^[0-9]*$/").test(i)||(t.target.value=i.replace(/[^0-9]*/g,""))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(Q.jH),e.Y36(s.qu),e.Y36(R.Nj),e.Y36(f.F0),e.Y36(E.BX),e.Y36(f.gz),e.Y36(Z.yD),e.Y36(Z.KD),e.Y36($.l),e.Y36(ie.j),e.Y36(l.KNP))},n.\u0275cmp=e.Xpm({type:n,selectors:[["create-user-page"]],standalone:!0,features:[e.jDz],decls:6,vars:3,consts:[["class","flex justify-center py-4 px-[30px] md:hidden",4,"ngIf"],["class","flex justify-center py-4 px-[30px] rounded-lg md:hidden",4,"ngIf"],[1,"p-5","hidden","md:block","text-center"],[4,"ngIf"],[1,"flex","justify-center","py-4","px-[30px]","md:hidden"],[1,"w-[1000px]","max-w-[1000px]","flex","flex-col","gap-y-8"],[1,"flex","gap-x-[20px]","mb-4"],[1,"w-1","bg-[#fcb40a]"],[1,"text-heading-md"],[1,"p-6","bg-neutral-white","rounded-lg","shadow-cf-md","flex","flex-col","gap-y-4"],[1,"flex","gap-x-4"],[1,"flex","flex-col","grow","gap-y-4"],[1,"!w-full",3,"status"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5",3,"CfRequired"],["cf-input","","size","medium","placeholder","Nh\u1eadp t\xean \u0111\u0103ng nh\u1eadp",3,"formControl"],["cfHint","",3,"hint",4,"ngIf"],["cf-input","","size","medium","placeholder","Nh\u1eadp h\u1ecd v\xe0 t\xean \u0111\u1ea7y \u0111\u1ee7",3,"formControl"],[1,"flex","items-end","pt-7"],[1,"h-full","w-[124px]","bg-no-repeat","bg-center","bg-cover","rounded-sm","flex","items-center","justify-center","P-6","cursor-pointer",3,"ngClass","click"],["class","text-express-sm text-center px-6",4,"ngIf"],["type","file","accept","image/*",1,"hidden",3,"change"],["fileUpload",""],[1,"flex","w-full","gap-x-4"],[1,"grow-[433]",3,"status"],["cf-input","","size","medium","placeholder","Nh\u1eadp email",3,"formControl"],[1,"text-espressive-md","text-neutral-gray-5","mb-1.5","empty:!m-0"],["textField","name","valueField","code","size","small","placeholder","Nh\u1eadp m\xe3",1,"!w-full","!max-w-full",3,"status","data","formControl"],["cfSuffix","",1,"w-[65%]","px-3","text-body-md","flex","gap-x-2","items-center","border-l","border-neutral-gray-2"],["cf-input","","size","medium","autocomplete","off","placeholder","Nh\u1eadp s\u1ed1 \u0111i\u1ec7n tho\u1ea1i","CfNumberic","",3,"formControl"],[1,""],[1,"w-full"],[1,"border","border-neutral-gray-1",3,"title","active"],["titleTemplate",""],[1,"flex","gap-y-2","gap-x-2"],[1,"grow-[400]","!w-full",3,"status"],["cfLabel",""],["cfDatepicker","","type","text","size","medium","cf-input","","placeholder","Ch\u1ecdn ng\xe0y sinh",1,"py-[7px]",3,"displayMonths","maxDate","formControl","input","dateSelect"],["birthdayForm","cfDatepicker"],["textField","name","valueField","code","placeholder","Ch\u1ecdn gi\u1edbi t\xednh",1,"!max-w-none","w-full",3,"status","data","allowSearch","formControl"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],[1,"p-4","bg-neutral-white","rounded-lg","shadow-cf-md"],[1,"flex","flex-col","gap-y-4"],["cf-input","","CfNumberic","","size","medium","placeholder","Nh\u1eadp s\u1ed1 CCCD/CMND",3,"formControl"],["cfLabel","",3,"CfRequired"],["cfDatepicker","","type","text","size","medium","cf-input","","placeholder","Ch\u1ecdn ng\xe0y c\u1ea5p CCCD/CMND",1,"py-[7px]",3,"displayMonths","maxDate","formControl","input","dateSelect"],["dateProvideForm","cfDatepicker"],["cf-input","","size","medium","placeholder","Nh\u1eadp n\u01a1i c\u1ea5p CCCD/CMND",3,"formControl"],[1,"text-espressive-sm",3,"CfRequired"],[1,"flex","gap-x-3"],[1,"relative","w-[140px]","h-[140px]","bg-no-repeat","bg-center","bg-cover","rounded-sm","border","border-dashed","border-neutral-gray-2","flex","items-center","justify-center","cursor-pointer",3,"click"],["class","text-express-sm",4,"ngIf"],["class","absolute w-[22px] h-[22px] rounded-full bg-neutral-gray-4 flex justify-center items-center z-10 -top-[11px] -right-[11px]",3,"click",4,"ngIf"],["fileUploadCCCDFont",""],["fileUploadCCCDBack",""],[1,"flex","justify-between"],["cf-button","","size","medium","type","secondary","class","bg-white",3,"click",4,"ngIf"],["cf-button","","size","medium",3,"disabled","click"],["icon","chevron_right","size","small",1,"ml-2.5"],["cfHint","",3,"hint"],[1,"text-express-sm","text-center","px-6"],[1,"text-body-md","flex","gap-x-2","items-center"],["icon","document","size","small"],[1,"text-express-sm"],[1,"absolute","w-[22px]","h-[22px]","rounded-full","bg-neutral-gray-4","flex","justify-center","items-center","z-10","-top-[11px]","-right-[11px]",3,"click"],["icon","close","size","small",1,"text-white"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["icon","arrow_left","size","small",1,"mr-2.5"],[1,"flex","justify-center","py-4","px-[30px]","rounded-lg","md:hidden"],[1,"w-[1000px]","max-w-[1000px]"],[1,"p-6","bg-neutral-white","rounded-lg","shadow-cf-md","flex","flex-col","gap-y-6"],["textField","name","valueField","id","placeholder","L\u1ef1a ch\u1ecdn ch\u1ee9c danh cho nh\xe2n vi\xean",1,"!w-full","!max-w-none",3,"status","data","allowSearch","formControl","selectedChange"],["class","w-full border-t border-neutral-gray-1",4,"ngIf"],["class","flex gap-x-8",4,"ngIf"],[1,"flex","justify-between","mt-8"],["icon","add","size","small",1,"mr-2.5"],[1,"w-full","border-t","border-neutral-gray-1"],[1,"flex","gap-x-8"],[1,"flex","flex-col","gap-y-2","w-[260px]"],[1,"text-heading-sm"],[1,"text-body-lg","text-neutral-gray-4"],[1,"flex","flex-col","flex-1","gap-y-4"],[4,"ngFor","ngForOf"],[3,"disabled","checked"],[3,"checkedChange"]],template:function(t,i){1&t&&(e.YNc(0,kn,107,75,"div",0),e.YNc(1,Sn,22,12,"div",1),e.TgZ(2,"div",2),e._uU(3," Vi\u1ec7c t\u1ea1o nh\xe2n vi\xean ph\u1ee9c t\u1ea1p \u0111\xf2i h\u1ecfi \u0111\u1ed9 ch\xednh x\xe1c cao \u0111\u1ea1i l\xfd vui l\xf2ng thao t\xe1c tr\xean m\xe1y t\xednh\n"),e.qZA(),e.YNc(4,Mn,1,0,"cf-spinner",3),e._UZ(5,"cf-toast")),2&t&&(e.Q6J("ngIf","BASIC_INFO"===i.step),e.xp6(1),e.Q6J("ngIf","TITLE_ROLE"===i.step),e.xp6(3),e.Q6J("ngIf",i.isLoading))},dependencies:[_.ez,_.mk,_.sg,_.O5,s.u5,s.Fj,s.JJ,s.UX,s.oH,p.j$,p.ND,p.BN,p.v2,C.N8,C.Xq,E.hj,I.q,ue.B,ue.K,Q.Cs,l.AxE,l.Sm8,G.I,V.C,D.OR,X.z],encapsulation:2}),n})();var de=d(76978);function Bn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",42)(1,"div",43),e._UZ(2,"div",44),e.TgZ(3,"cf-input-group",5),e._UZ(4,"cf-icon",6),e.TgZ(5,"input",45,8),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.searchText=o)}),e.qZA()(),e.TgZ(7,"cf-select",46),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.state=o)}),e.TgZ(8,"label",3)(9,"span"),e._uU(10,"Tr\u1ea1ng th\xe1i"),e.qZA()()(),e.TgZ(11,"cf-select",47),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.titleId=o)}),e.TgZ(12,"label",3)(13,"span"),e._uU(14,"Vai tr\xf2"),e.qZA()()()(),e.TgZ(15,"div")(16,"button",48),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onSearch())}),e._UZ(17,"cf-icon",49),e.TgZ(18,"div"),e._uU(19,"T\xecm ki\u1ebfm"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(5),e.Q6J("ngModel",t.filterData.searchText),e.xp6(2),e.Q6J("status","default")("data",t.statusOption)("allowSearch",!1)("ngModel",t.filterData.state),e.xp6(4),e.Q6J("status","default")("data",t.roleOptions)("allowSearch",!1)("ngModel",t.filterData.titleId)}}function Yn(n,a){if(1&n&&(e.TgZ(0,"cf-radio",54),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.code),e.xp6(1),e.Oqu(t.name)}}function On(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",50)(1,"cf-radio-group",51),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.state=o)}),e.YNc(2,Yn,2,2,"cf-radio",52),e.qZA(),e.TgZ(3,"button",53),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onSearch())}),e._uU(4,"X\xe1c nh\u1eadn"),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.filterData.state),e.xp6(1),e.Q6J("ngForOf",t.statusOption)}}function Rn(n,a){if(1&n&&(e.TgZ(0,"cf-radio",54),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.id),e.xp6(1),e.Oqu(t.name)}}function Ln(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",50)(1,"cf-radio-group",51),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.filterData.titleId=o)}),e.YNc(2,Rn,2,2,"cf-radio",52),e.qZA(),e.TgZ(3,"button",53),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onSearch())}),e._uU(4,"X\xe1c nh\u1eadn"),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.filterData.titleId),e.xp6(1),e.Q6J("ngForOf",t.roleOptions)}}function zn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",55),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.addAgent())}),e._UZ(1,"cf-icon",56),e._uU(2," T\u1ea1o \u0111\u1ea1i l\xfd "),e.qZA()}}function Kn(n,a){1&n&&(e.TgZ(0,"th",57),e._uU(1,"Ch\u1ee9c n\u0103ng"),e.qZA()),2&n&&e.Q6J("sticky","right")}function Hn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",68),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw();return e.KtG(r.edit(o.userId,o.color))}),e._uU(1,"Chi ti\u1ebft"),e.qZA()}}function jn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr",58)(1,"td",59),e._uU(2),e.qZA(),e.TgZ(3,"td",59),e._uU(4),e.qZA(),e.TgZ(5,"td",59)(6,"cf-label",60)(7,"div",61),e._uU(8),e.qZA()()(),e.TgZ(9,"td",62),e._uU(10),e.ALo(11,"replace"),e.ALo(12,"number"),e.qZA(),e.TgZ(13,"td",59),e._uU(14),e.qZA(),e.TgZ(15,"td",59),e._uU(16),e.qZA(),e.TgZ(17,"td",59),e._uU(18),e.ALo(19,"date"),e.qZA(),e.TgZ(20,"td",59),e._uU(21),e.qZA(),e.TgZ(22,"td",63)(23,"change-state-user",64),e.NdJ("valueChange",function(o){const c=e.CHM(t).$implicit,u=e.oxw();return e.KtG(u.stateChange(o,c))}),e.qZA()(),e.TgZ(24,"td",65)(25,"div",66),e.YNc(26,Hn,2,0,"div",67),e.qZA()()()}if(2&n){const t=a.$implicit,i=e.oxw();e.xp6(2),e.Oqu(t.userName),e.xp6(2),e.Oqu(t.displayName),e.xp6(2),e.Q6J("color",t.color)("type","inverted")("size","small")("mode","default"),e.xp6(2),e.hij(" ",t.title.name," "),e.xp6(2),e.hij(" ",e.Dn7(11,16,e.lcZ(12,20,t.balance||0),",",".")," \u0111 "),e.xp6(4),e.Oqu(t.email),e.xp6(2),e.Oqu(t.phone),e.xp6(2),e.Oqu(e.xi3(19,22,t.dateCreated,"dd/MM/yyyy")),e.xp6(3),e.Oqu(t.belongSale.name),e.xp6(2),e.Q6J("state",t.state)("canEditStatus",t.canEditStatus),e.xp6(1),e.Q6J("sticky","right"),e.xp6(2),e.Q6J("ngIf",i.canViewDetail)}}function Gn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",69),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.addAgent())}),e._UZ(1,"cf-icon",70),e._uU(2," T\u1ea1o \u0111\u1ea1i l\xfd "),e.qZA()}}function Vn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",72),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw();return e.KtG(r.edit(o.userId,o.color))}),e.TgZ(1,"div",73)(2,"div",74),e._uU(3,"M\xe3 \u0111\u1ecbnh danh"),e.qZA(),e.TgZ(4,"div",75),e._uU(5),e.qZA()(),e.TgZ(6,"div",73)(7,"div",74),e._uU(8,"Ng\xe0y t\u1ea1o"),e.qZA(),e.TgZ(9,"div",75),e._uU(10),e.ALo(11,"date"),e.qZA()(),e.TgZ(12,"div",73)(13,"div",74),e._uU(14,"Ch\u1ee9c danh"),e.qZA(),e.TgZ(15,"cf-label",60),e._uU(16),e.qZA()(),e.TgZ(17,"div",73)(18,"div",74),e._uU(19,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.TgZ(20,"div")(21,"change-state-user",64),e.NdJ("valueChange",function(o){e.CHM(t);const r=e.oxw().$implicit,c=e.oxw();return e.KtG(c.mobileStateChange(o,r))}),e.qZA()()()()}if(2&n){const t=e.oxw().$implicit;e.xp6(5),e.Oqu(t.userName),e.xp6(5),e.Oqu(e.xi3(11,9,t.dateCreated,"dd/MM/yyyy")),e.xp6(5),e.Q6J("color",t.color)("type","inverted")("size","small")("mode","default"),e.xp6(1),e.hij(" ",t.title.name," "),e.xp6(5),e.Q6J("state",t.state)("canEditStatus",t.canEditStatus)}}function Xn(n,a){if(1&n&&(e.ynx(0),e.YNc(1,Vn,22,12,"div",71),e.BQk()),2&n){const t=a.index,i=e.oxw();e.xp6(1),e.Q6J("ngIf",t<i.ticketInfiniteScrollCount)}}function $n(n,a){1&n&&e._UZ(0,"cf-spinner")}const Wn=function(){return{num:25}},ei=function(){return{num:50}},ti=function(){return{num:75}},ni=function(){return{num:100}},ii=function(n,a,t,i){return[n,a,t,i]};let oi=(()=>{class n{constructor(t,i,o,r,c,u,h,m,T){this._titleService=i,this._userService=o,this._router=r,this._permissionService=c,this._modal=u,this._toastService=h,this._bottomSheetService=m,this._mobileDetectService=T,this.statusChangeOption=[{name:"Ho\u1ea1t \u0111\u1ed9ng",code:"ACTIVE"},{name:"Ng\u1eebng ho\u1ea1t \u0111\u1ed9ng",code:"BLOCK"}],this.statusOption=[{name:"T\u1ea5t c\u1ea3",code:""},{name:"Ch\u01b0a x\xe1c th\u1ef1c",code:"INACTIVE"},{name:"Ho\u1ea1t \u0111\u1ed9ng",code:"ACTIVE"},{name:"Ng\u1eebng ho\u1ea1t \u0111\u1ed9ng",code:"BLOCK"}],this.listOfData=[],this.pageSize=25,this.currentPage=1,this.colorMap=[{key:"",color:"red"},{key:"",color:"yellow"},{key:"",color:"cyan"},{key:"",color:"blue"},{key:"",color:"purple"},{key:"",color:"orange"},{key:"",color:"green"}],this.filterData={searchText:"",state:"",titleId:""},this.roleOptions=[{id:"",name:"T\u1ea5t c\u1ea3"}],this.canDelete=this._permissionService.hasPermission(g.or.DeleteAgent),this.canViewDetail=this._permissionService.hasPermission(g.or.ViewAgentDetail),this.TICKET_INFINITE_SCROLL_DEFAULT=10,this.TICKET_INFINITE_OFSET_INCREASE=10,this.ticketInfiniteScrollCount=this.TICKET_INFINITE_SCROLL_DEFAULT,this.isLoading=!1,this.isCreateAgentButton=this._permissionService.hasPermission(g.or.CreateAgentUser),this.sortChange=(v,x)=>{let y=x.map(A=>A);for(let A=0;A<v.length;A++){const F=v[A];"name"===F.key&&(y=y.sort("ascend"===F.sort?(N,q)=>this.increaseAlphabetSort(N.name,q.name):(N,q)=>this.decreaseAlphabetSort(N.name,q.name)))}return y},this.searchChange=(v,x)=>x,this.increaseAlphabetSort=(v,x)=>v<x?-1:v>x?1:0,this.decreaseAlphabetSort=(v,x)=>v>x?-1:v<x?1:0,t.registerIcons([l.TM4,l.PcQ,l.whL,l.xgX,l.S7Q]),this.onSearch(),this.loadTitleData()}loadTitleData(){this._titleService.getAllAgentTitleForManage().subscribe({next:t=>{t.data&&(this.roleOptions=[...this.roleOptions,...t.data.map(i=>({id:i.id,name:i.name}))])}})}onSearch(){this._mobileDetectService.isMobile()&&this._bottomSheetService.dismiss();const t={searchText:this.filterData.searchText,state:this.filterData.state||null,titleId:this.filterData.titleId};this.isLoading=!0,this._userService.getAllAgentUser(t).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:i=>{this.listOfData=i.data.filter(o=>"DELETED"!==o.state).map(o=>{const r=this.colorMap.find(c=>c.key===o.title.id);if(r)return Object.assign(Object.assign({},o),{dateCreated:new Date(1e3*o.dateCreated),color:r.color,canEditStatus:this._permissionService.hasPermission(g.or.CanEditAgentStatus+"_"+o.title.code)&&[g.or.CanEditAgentStatus,g.or.CanEditAgentStatusForSale].some(c=>this._permissionService.hasPermission(c))});{const c=this.colorMap.find(u=>""===u.key);return c?(c.key=o.title.id,Object.assign(Object.assign({},o),{dateCreated:new Date(1e3*o.dateCreated),color:c.color,canEditStatus:this._permissionService.hasPermission(g.or.CanEditAgentStatus+"_"+o.title.code)&&[g.or.CanEditAgentStatus,g.or.CanEditAgentStatusForSale].some(u=>this._permissionService.hasPermission(u))})):Object.assign(Object.assign({},o),{dateCreated:new Date(1e3*o.dateCreated),color:"green",canEditStatus:this._permissionService.hasPermission(g.or.CanEditAgentStatus+"_"+o.title.code)&&[g.or.CanEditAgentStatus,g.or.CanEditAgentStatusForSale].some(u=>this._permissionService.hasPermission(u))})}})}})}checkChange(t){this.pageSize=parseInt(t)}addAgent(){this._router.navigate(["admin/create-agent"])}edit(t,i){this._router.navigate([`admin/agent-detail/${t}`],{state:{titleColor:i}})}delete(t){this._modal.open(D.V0,{title:"X\xf3a t\xe0i kho\u1ea3n",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a t\xe0i kho\u1ea3n n\xe0y? Vi\u1ec7c n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c, vui l\xf2ng ki\u1ec3m tra k\u0129 tr\u01b0\u1edbc khi thao t\xe1c."}).afterClosed$.subscribe({next:o=>{o.data&&this._userService.deleteAgentAccount(t).subscribe({next:r=>{r.success?(this.onSearch(),this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"X\xf3a t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",sticky:!1})):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"X\xf3a t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})}})}})}isUpdateStatus(t){return this._permissionService.hasPermission(g.or.CanEditAgentStatus+"_"+t)}stateChange(t,i){t!==i.state&&this._modal.open(D.V0,{title:"ACTIVE"===t?"M\u1edf l\u1ea1i t\xe0i kho\u1ea3n n\xe0y?":"V\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",body:"ACTIVE"===t?"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n cho ph\xe9p t\xe0i kho\u1ea3n n\xe0y ho\u1ea1t \u0111\u1ed9ng l\u1ea1i?":"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n v\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",hasIcon:!1,okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf",isSecondary:!0}).afterClosed$.subscribe({next:r=>{r.data&&(this.isLoading=!0,this._userService.updateAccountStatus({userId:i.userId,status:t}).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:c=>{"OK"===c.status&&c.data?(i.state=t,this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",sticky:!1})):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})},error:c=>{this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})}}))}})}revertStatus(t,i){i.state="ACTIVE"===t.code?"BLOCK":"ACTIVE"}openSearchBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"T\xecm ki\u1ebfm",containerFullHeigh:!0,rightButtonIcon:"",leftButtonIcon:"close",leftButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});i.containerInstance._leftButtonClick.subscribe(()=>i.dismiss())}openStatusBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"Tr\u1ea1ng th\xe1i",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:"",restoreFocus:!1});i.containerInstance._rightButtonClick.subscribe(()=>i.dismiss())}openTitleBts(t){const i=this._bottomSheetService.open(t,{headerTitle:"Vai tr\xf2",rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",leftButtonIcon:"",restoreFocus:!1});i.containerInstance._rightButtonClick.subscribe(()=>i.dismiss())}onScrollDown(){this.ticketInfiniteScrollCount+=this.TICKET_INFINITE_OFSET_INCREASE}userTrackByFn(t,i){return i.userId}mobileSelectClick(t){t.stopPropagation()}mobileStateChange(t,i){if(t===i.state)return;const o=this._bottomSheetService.open(D.Q4,{headerTitle:"ACTIVE"===t?"M\u1edf l\u1ea1i t\xe0i kho\u1ea3n n\xe0y?":"V\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",data:{body:"ACTIVE"===t?"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n cho ph\xe9p t\xe0i kho\u1ea3n n\xe0y ho\u1ea1t \u0111\u1ed9ng l\u1ea1i?":"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n v\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y?",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf",isSecondary:!0},rightButtonIcon:"close",rightButtonIconClass:"text-neutral-gray-4",restoreFocus:!1});o.containerInstance._rightButtonClick.subscribe(()=>o.dismiss()),o.afterDismissed().subscribe({next:r=>{r&&(this.isLoading=!0,this._userService.updateAccountStatus({userId:i.userId,status:t}).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:c=>{"OK"===c.status&&c.data?(i.state=t,this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",sticky:!1})):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})},error:c=>{this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})}}))}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(l.KNP),e.Y36(Z.yD),e.Y36(Z.KD),e.Y36(f.F0),e.Y36(g.$A),e.Y36(j.oE),e.Y36(E.BX),e.Y36(L.a2),e.Y36(ne.L))},n.\u0275cmp=e.Xpm({type:n,selectors:[["agent-manage-page"]],standalone:!0,features:[e.jDz],decls:81,vars:39,consts:[[1,"flex","flex-col","px-[30px]","py-4","gap-y-4","bg-neutral-white","md:pt-3","md:pb-0","md:px-4","md:gap-y-3","md:shadow-cf-sm","md:sticky","md:top-0"],[1,"flex","gap-x-4","md:hidden"],["textField","name","valueField","code","size","medium","placeholder","Ch\u1ecdn tr\u1ea1ng th\xe1i",1,"!max-w-none","!w-[252px]",3,"status","data","allowSearch","ngModel","ngModelChange"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],["textField","name","valueField","id","size","medium","placeholder","Ch\u1ecdn ch\u1ee9c danh",1,"!max-w-none","!w-[172px]",3,"status","data","allowSearch","ngModel","ngModelChange"],[1,"!w-full"],["cfHeadIcon","","icon","search","size","small"],["size","medium","cf-input","","placeholder","Nh\u1eadp th\xf4ng tin \u0111\u1ec3 t\xecm ki\u1ebfm t\xe0i kho\u1ea3n",3,"ngModel","ngModelChange"],["tableSearchInput",""],["cf-button","","type","secondary",1,"whitespace-nowrap","w-[168px]","flex","justify-center","gap-x-2",3,"click"],["icon","search","size","small",1,"text-[#616161]"],[1,"hidden","text-heading-sm","text-neutral-gray-6","md:block"],[1,"hidden","md:block"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm t\xe0i kho\u1ea3n",3,"ngModel","ngModelChange","focus"],[1,"gap-x-2","hidden","md:flex"],[1,"pb-3",3,"click"],[1,"gap-x-1.5","items-center","border","border-neutral-gray-3","rounded-full","px-4","py-[5px]","hidden","md:flex"],[1,"text-body-md","whitespace-nowrap"],["icon","down","size","small",1,"text-neutral-gray-5"],["searchBts",""],["statusBts",""],["titleBts",""],[1,"py-4","px-[30px]","rounded-lg","flex","justify-center","md:hidden"],[1,"bg-neutral-white","rounded-lg","shadow-cf-md","w-full"],[1,"p-4","flex","justify-between","items-center"],[1,"text-heading-sm"],["cf-button","","class","flex gap-x-2",3,"click",4,"ngIf"],[1,"",3,"fnSort","fnSearch","pageSizeList","listData","pageSize"],["managerTable",""],["cf-thead",""],["cf-th","",1,"whitespace-nowrap",3,"sortName"],["cf-th","",1,"whitespace-nowrap"],["cf-th","","class","whitespace-nowrap",3,"sticky",4,"ngIf"],["ngFor","",3,"ngForOf"],[1,"hidden","md:flex","p-4","flex-col"],[1,"w-full","flex","items-center","justify-between"],[1,"text-body-md","text-neutral-gray-6"],[1,"flex","gap-x-1.5","text-neutral-gray-6","items-center"],["cf-button","","class","gap-x-2",3,"click",4,"ngIf"],["infinite-scroll","",3,"infiniteScrollDistance","infiniteScrollThrottle","infiniteScrollContainer","scrollWindow","fromRoot","alwaysCallback","scrolled"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"p-4","w-full","flex","flex-col","justify-between"],[1,"flex","flex-col","gap-y-4"],[1,"w-full","border-b","border-b-neutral-gray-3"],["size","medium","cf-input","","placeholder","T\xecm ki\u1ebfm t\xe0i kho\u1ea3n",3,"ngModel","ngModelChange"],["textField","name","valueField","code","size","medium","placeholder","Ch\u1ecdn tr\u1ea1ng th\xe1i",1,"!max-w-none","w-full",3,"status","data","allowSearch","ngModel","ngModelChange"],["textField","name","valueField","id","size","medium","placeholder","Ch\u1ecdn ch\u1ee9c danh",1,"!max-w-none","w-full",3,"status","data","allowSearch","ngModel","ngModelChange"],["cf-button","",1,"w-full","justify-center","gap-x-2",3,"click"],["icon","search","size","small"],[1,"flex","flex-col","w-full","p-4","gap-y-6"],[1,"flex","flex-col","gap-y-4",3,"ngModel","ngModelChange"],["size","medium",3,"value",4,"ngFor","ngForOf"],["cf-button","",1,"w-full","justify-center",3,"click"],["size","medium",3,"value"],["cf-button","",1,"flex","gap-x-2",3,"click"],["icon","plus"],["cf-th","",1,"whitespace-nowrap",3,"sticky"],[1,"border-b","border-neutral-gray-1"],["cf-td","",1,"py-2","px-3","text-body-sm","whitespace-nowrap"],[3,"color","type","size","mode"],[1,"w-max"],["cf-td","",1,"py-2","px-3","text-body-sm","whitespace-nowrap","text-right"],["cf-td","",1,"py-2","px-3","text-body-sm"],[3,"state","canEditStatus","valueChange"],["cf-td","",1,"flex","py-3","px-3","gap-x-4","items-center",3,"sticky"],[1,"flex","gap-x-4","items-center"],["class","text-body-md text-secondary-3-4 cursor-pointer whitespace-nowrap",3,"click",4,"ngIf"],[1,"text-body-md","text-secondary-3-4","cursor-pointer","whitespace-nowrap",3,"click"],["cf-button","",1,"gap-x-2",3,"click"],["icon","plus","size","small"],["class","flex flex-col rounded-lg bg-white p-3 mt-3 gap-y-2",3,"click",4,"ngIf"],[1,"flex","flex-col","rounded-lg","bg-white","p-3","mt-3","gap-y-2",3,"click"],[1,"flex","justify-start","items-center"],[1,"text-body-sm","text-neutral-gray-4","w-[104px]"],[1,"text-express-md","text-neutral-gray-6"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"cf-select",2),e.NdJ("ngModelChange",function(c){return i.filterData.state=c}),e.TgZ(3,"label",3)(4,"span"),e._uU(5,"Tr\u1ea1ng th\xe1i"),e.qZA()()(),e.TgZ(6,"cf-select",4),e.NdJ("ngModelChange",function(c){return i.filterData.titleId=c}),e.TgZ(7,"label",3)(8,"span"),e._uU(9,"Vai tr\xf2"),e.qZA()()()(),e.TgZ(10,"div",1)(11,"cf-input-group",5),e._UZ(12,"cf-icon",6),e.TgZ(13,"input",7,8),e.NdJ("ngModelChange",function(c){return i.filterData.searchText=c}),e.qZA()(),e.TgZ(15,"button",9),e.NdJ("click",function(){return i.onSearch()}),e._UZ(16,"cf-icon",10),e._uU(17," T\xecm ki\u1ebfm "),e.qZA()(),e.TgZ(18,"div",11),e._uU(19,"Qu\u1ea3n l\xfd t\xe0i kho\u1ea3n \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(20,"div",12)(21,"cf-input-group",5),e._UZ(22,"cf-icon",6),e.TgZ(23,"input",13,8),e.NdJ("ngModelChange",function(c){return i.filterData.searchText=c})("focus",function(){e.CHM(o);const c=e.MAs(37);return e.KtG(i.openSearchBts(c))}),e.qZA()()(),e.TgZ(25,"div",14)(26,"div",15),e.NdJ("click",function(){e.CHM(o);const c=e.MAs(39);return e.KtG(i.openStatusBts(c))}),e.TgZ(27,"div",16)(28,"div",17),e._uU(29,"Tr\u1ea1ng th\xe1i"),e.qZA(),e._UZ(30,"cf-icon",18),e.qZA()(),e.TgZ(31,"div",15),e.NdJ("click",function(){e.CHM(o);const c=e.MAs(41);return e.KtG(i.openTitleBts(c))}),e.TgZ(32,"div",16)(33,"div",17),e._uU(34,"Vai tr\xf2"),e.qZA(),e._UZ(35,"cf-icon",18),e.qZA()()(),e.YNc(36,Bn,20,9,"ng-template",null,19,e.W1O),e.YNc(38,On,5,2,"ng-template",null,20,e.W1O),e.YNc(40,Ln,5,2,"ng-template",null,21,e.W1O),e.qZA(),e.TgZ(42,"div",22)(43,"div",23)(44,"div",24)(45,"div",25),e._uU(46,"Danh s\xe1ch \u0111\u1ea1i l\xfd"),e.qZA(),e.YNc(47,zn,3,0,"button",26),e.qZA(),e.TgZ(48,"cf-table",27,28)(50,"thead",29)(51,"th",30),e._uU(52,"M\xe3 \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(53,"th",31),e._uU(54,"T\xean \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(55,"th",31),e._uU(56,"Ch\u1ee9c danh"),e.qZA(),e.TgZ(57,"th",31),e._uU(58,"S\u1ed1 d\u01b0 c\xf4ng n\u1ee3"),e.qZA(),e.TgZ(59,"th",31),e._uU(60,"Email"),e.qZA(),e.TgZ(61,"th",31),e._uU(62,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i"),e.qZA(),e.TgZ(63,"th",31),e._uU(64,"Ng\xe0y t\u1ea1o"),e.qZA(),e.TgZ(65,"th",31),e._uU(66,"Gi\u1edbi thi\u1ec7u"),e.qZA(),e.TgZ(67,"th",31),e._uU(68,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.YNc(69,Kn,2,1,"th",32),e.qZA(),e.TgZ(70,"tbody"),e.YNc(71,jn,27,25,"ng-template",33),e.qZA()()()(),e.TgZ(72,"div",34)(73,"div",35)(74,"div",36),e._uU(75),e.qZA(),e.TgZ(76,"div",37),e.YNc(77,Gn,3,0,"button",38),e.qZA()(),e.TgZ(78,"div",39),e.NdJ("scrolled",function(){return i.onScrollDown()}),e.YNc(79,Xn,2,1,"ng-container",40),e.qZA()(),e.YNc(80,$n,1,0,"cf-spinner",41)}if(2&t){const o=e.MAs(49);e.xp6(2),e.Q6J("status","default")("data",i.statusOption)("allowSearch",!1)("ngModel",i.filterData.state),e.xp6(4),e.Q6J("status","default")("data",i.roleOptions)("allowSearch",!1)("ngModel",i.filterData.titleId),e.xp6(7),e.Q6J("ngModel",i.filterData.searchText),e.xp6(10),e.Q6J("ngModel",i.filterData.searchText),e.xp6(24),e.Q6J("ngIf",i.isCreateAgentButton),e.xp6(1),e.Q6J("fnSort",i.sortChange)("fnSearch",i.searchChange)("pageSizeList",e.l5B(34,ii,e.DdM(30,Wn),e.DdM(31,ei),e.DdM(32,ti),e.DdM(33,ni)))("listData",i.listOfData)("pageSize",i.pageSize),e.xp6(3),e.Q6J("sortName","name"),e.xp6(18),e.Q6J("ngIf",i.canViewDetail||i.canDelete),e.xp6(2),e.Q6J("ngForOf",o.partOfdata),e.xp6(4),e.hij("",i.listOfData.length," k\u1ebft qu\u1ea3"),e.xp6(2),e.Q6J("ngIf",i.isCreateAgentButton),e.xp6(1),e.Q6J("infiniteScrollDistance",1)("infiniteScrollThrottle",300)("infiniteScrollContainer",".main-scroll-bar")("scrollWindow",!1)("fromRoot",!0)("alwaysCallback",!0),e.xp6(1),e.Q6J("ngForOf",i.listOfData)("ngForTrackBy",i.userTrackByFn),e.xp6(1),e.Q6J("ngIf",i.isLoading)}},dependencies:[_.ez,_.sg,_.O5,_.JJ,_.uU,s.u5,s.Fj,s.JJ,s.On,s.UX,l.AxE,l.Sm8,C.N8,C.Xq,w.rC,w.E_,w.zs,w.qS,I.q,p.j$,p.ND,p.BN,z.b,L.DW,Y.T,Y.o,K.Rq,K.Ry,de.AS,D.OR,ce],encapsulation:2}),n})();function ai(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",18)(1,"button",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onUpdate())}),e._UZ(2,"cf-icon",25),e._uU(3," Ch\u1ec9nh s\u1eeda "),e.qZA(),e.TgZ(4,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onDelete())}),e._UZ(5,"cf-icon",26),e._uU(6," X\xf3a "),e.qZA()()}}function ri(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",18)(1,"button",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onSubmit())}),e._UZ(2,"cf-icon",27),e._uU(3," L\u01b0u "),e.qZA(),e.TgZ(4,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onCancel())}),e._UZ(5,"cf-icon",28),e._uU(6," H\u1ee7y "),e.qZA()()}}function ci(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",29)(1,"cf-icon",30),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(15);return e.KtG(o.click())}),e.qZA()()}}function si(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"cf-select",31),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.userDetailDisplay.state=o)}),e._UZ(1,"cf-icon",32),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("data",t.statusOption)("allowSearch",!1)("ngModel",t.userDetailDisplay.state)}}function li(n,a){1&n&&(e.TgZ(0,"div",35),e._UZ(1,"cf-icon",36),e._uU(2," Ho\u1ea1t \u0111\u1ed9ng "),e.qZA())}function ui(n,a){1&n&&(e.TgZ(0,"div",35),e._UZ(1,"cf-icon",37),e._uU(2," Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng "),e.qZA())}function di(n,a){1&n&&(e.TgZ(0,"div",35),e._UZ(1,"cf-icon",38),e._uU(2," Ch\u01b0a k\xedch ho\u1ea1t "),e.qZA())}function _i(n,a){if(1&n&&(e.TgZ(0,"div",33),e.YNc(1,li,3,0,"div",34),e.YNc(2,ui,3,0,"div",34),e.YNc(3,di,3,0,"div",34),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf","ACTIVE"===t.userDetailDisplay.state),e.xp6(1),e.Q6J("ngIf","BLOCK"===t.userDetailDisplay.state),e.xp6(1),e.Q6J("ngIf","INACTIVE"===t.userDetailDisplay.state)}}const W=function(n){return{"!bg-secondary-3-5 !border-none !text-neutral-white":n}};function pi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("BASIC_INFO"))}),e._UZ(1,"cf-icon",42),e._uU(2," Th\xf4ng tin "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,W,"BASIC_INFO"===t.viewMode))}}function gi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("TITLE_ROLE"))}),e._UZ(1,"cf-icon",43),e._uU(2," Quy\u1ec1n h\u1ea1n "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,W,"TITLE_ROLE"===t.viewMode))}}function hi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.viewCCCD())}),e._UZ(1,"cf-icon",55),e._uU(2," Xem \u1ea3nh ch\u1ee5p "),e.qZA()}}function mi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.viewCCCD())}),e._UZ(1,"cf-icon",56),e._uU(2," \u1ea8n \u1ea3nh ch\u1ee5p "),e.qZA()}}function fi(n,a){if(1&n&&e._UZ(0,"img",61),2&n){const t=e.oxw(5);e.Q6J("src",t.cccdFontSrc,e.LSH)}}function vi(n,a){if(1&n&&e._UZ(0,"img",61),2&n){const t=e.oxw(5);e.Q6J("src",t.cccdBackSrc,e.LSH)}}function Ci(n,a){if(1&n&&(e.TgZ(0,"div",57)(1,"div",58),e._uU(2,"\u1ea2nh ch\u1ee5p CCCD/CMND"),e.qZA(),e.TgZ(3,"div",59),e.YNc(4,fi,1,1,"img",60),e.YNc(5,vi,1,1,"img",60),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(4),e.Q6J("ngIf",t.cccdFontSrc),e.xp6(1),e.Q6J("ngIf",t.cccdBackSrc)}}function xi(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div")(2,"div",44),e._UZ(3,"div",45),e.TgZ(4,"div",16),e._uU(5,"Th\xf4ng tin c\u01a1 b\u1ea3n"),e.qZA()(),e.TgZ(6,"div",46)(7,"div",47)(8,"div",20),e._uU(9,"T\xean \u0111\u0103ng nh\u1eadp"),e.qZA(),e.TgZ(10,"div",48),e._uU(11),e.qZA()(),e.TgZ(12,"div",47)(13,"div",20),e._uU(14,"H\u1ecd v\xe0 t\xean"),e.qZA(),e.TgZ(15,"div",48),e._uU(16),e.qZA()(),e.TgZ(17,"div",47)(18,"div",20),e._uU(19,"Email"),e.qZA(),e.TgZ(20,"div",48),e._uU(21),e.qZA()(),e.TgZ(22,"div",47)(23,"div",20),e._uU(24,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i"),e.qZA(),e.TgZ(25,"div",48),e._uU(26),e.qZA()(),e.TgZ(27,"div",47)(28,"div",20),e._uU(29,"Ng\xe0y sinh"),e.qZA(),e.TgZ(30,"div",48),e._uU(31),e.qZA()(),e.TgZ(32,"div",47)(33,"div",20),e._uU(34,"Gi\u1edbi t\xednh"),e.qZA(),e.TgZ(35,"div",48),e._uU(36),e.qZA()(),e.TgZ(37,"div",47)(38,"div",20),e._uU(39,"Ng\xe0y \u0111\u0103ng k\xed"),e.qZA(),e.TgZ(40,"div",48),e._uU(41),e.qZA()()()(),e.TgZ(42,"div",49)(43,"div",44),e._UZ(44,"div",45),e.TgZ(45,"div",16),e._uU(46,"X\xe1c th\u1ef1c danh t\xednh"),e.qZA()(),e.TgZ(47,"div",46)(48,"div",47)(49,"div",20),e._uU(50,"S\u1ed1 CCCD/CMND"),e.qZA(),e.TgZ(51,"div",50),e._uU(52),e.qZA()(),e.TgZ(53,"div",47)(54,"div",20),e._uU(55,"Ng\xe0y c\u1ea5p"),e.qZA(),e.TgZ(56,"div",50),e._uU(57),e.qZA()(),e.TgZ(58,"div",47)(59,"div",20),e._uU(60,"N\u01a1i c\u1ea5p"),e.qZA(),e.TgZ(61,"div",50),e._uU(62),e.qZA()(),e.TgZ(63,"div",51),e.YNc(64,hi,3,0,"button",52),e.YNc(65,mi,3,0,"button",52),e.qZA(),e.YNc(66,Ci,6,2,"div",53),e.qZA()()()),2&n){const t=e.oxw(3);e.xp6(11),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.identify," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.displayName," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.email," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.phone," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.birthday," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.gender," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.dateCreated," "),e.xp6(11),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.identifyId," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.identifyDateProvide," "),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.identifyPlaceProvide," "),e.xp6(2),e.Q6J("ngIf",!t.identifyToggle),e.xp6(1),e.Q6J("ngIf",t.identifyToggle),e.xp6(1),e.Q6J("ngIf",t.identifyToggle)}}function Ei(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",71),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("checked",!0)("disabled",!0),e.xp6(1),e.Oqu(t)}}function yi(n,a){if(1&n&&(e.TgZ(0,"div",65)(1,"div",66)(2,"div",67),e._uU(3," Quy\u1ec1n h\u1ea1n m\u1eb7c \u0111\u1ecbnh "),e.qZA(),e.TgZ(4,"div",68),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c c\u1ea5p cho role \u0111\xf3, kh\xf4ng \u0111\u01b0\u1ee3c ph\xe9p thay \u0111\u1ed5i. "),e.qZA()(),e.TgZ(6,"div",69),e.YNc(7,Ei,3,3,"ng-container",70),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(7),e.Q6J("ngForOf",t.allRolesDefault)}}function Ai(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",71),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit,i=e.oxw(5);e.xp6(1),e.Q6J("checked",i.listRoleId.includes(t.id))("disabled",!0),e.xp6(1),e.Oqu(t.name)}}function Ti(n,a){if(1&n&&(e.TgZ(0,"div",65)(1,"div",66)(2,"div",67),e._uU(3," Quy\u1ec1n h\u1ea1n n\xe2ng cao "),e.qZA(),e.TgZ(4,"div",68),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c ch\u1ec9 \u0111\u1ecbnh c\u1ea5p th\xeam cho \u0111\u1ea1i l\xfd n\u1ebfu mu\u1ed1n. "),e.qZA()(),e.TgZ(6,"div",69),e.YNc(7,Ai,3,3,"ng-container",70),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(7),e.Q6J("ngForOf",t.allRolesAdvance)}}function Di(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div",62),e.YNc(2,yi,8,1,"div",63),e._UZ(3,"div",64),e.YNc(4,Ti,8,1,"div",63),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(2),e.Q6J("ngIf",t.allRolesDefault.length),e.xp6(2),e.Q6J("ngIf",t.allRolesAdvance.length)}}function Zi(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div",39),e.YNc(2,pi,3,3,"div",40),e.YNc(3,gi,3,3,"div",40),e.qZA(),e.YNc(4,xi,67,13,"div",1),e.YNc(5,Di,5,2,"div",1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("ngIf",t.isEditInfo),e.xp6(1),e.Q6J("ngIf",t.isEditPermission),e.xp6(1),e.Q6J("ngIf","BASIC_INFO"===t.viewMode),e.xp6(1),e.Q6J("ngIf","TITLE_ROLE"===t.viewMode)}}function Fi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("BASIC_INFO"))}),e._UZ(1,"cf-icon",42),e._uU(2," Th\xf4ng tin "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,W,"BASIC_INFO"===t.viewMode))}}function bi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",41),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("TITLE_ROLE"))}),e._UZ(1,"cf-icon",43),e._uU(2," Quy\u1ec1n h\u1ea1n "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,W,"TITLE_ROLE"===t.viewMode))}}function ki(n,a){if(1&n&&e._UZ(0,"cf-input-hint",99),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.displayName)}}function Ii(n,a){if(1&n&&e._UZ(0,"cf-input-hint",99),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.email)}}function Ui(n,a){1&n&&e._UZ(0,"cf-input-hint",99),2&n&&e.Q6J("hint","S\u1ed1 \u0111i\u1ec7n tho\u1ea1i kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function Ni(n,a){1&n&&e._UZ(0,"cf-input-hint",99),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 7 ch\u1eef s\u1ed1")}function wi(n,a){1&n&&e._UZ(0,"cf-input-hint",99),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 11 ch\u1eef s\u1ed1")}function qi(n,a){if(1&n&&e._UZ(0,"cf-input-hint",99),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.identifyId)}}function Pi(n,a){1&n&&e._UZ(0,"cf-input-hint",99),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 6 ch\u1eef s\u1ed1")}function Ji(n,a){1&n&&e._UZ(0,"cf-input-hint",99),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 12 ch\u1eef s\u1ed1")}function Si(n,a){if(1&n&&e._UZ(0,"cf-input-hint",99),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.identifyDateProvide)}}function Mi(n,a){if(1&n&&e._UZ(0,"cf-input-hint",99),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.identifyPlaceProvide)}}function Qi(n,a){1&n&&(e.TgZ(0,"div",100),e._UZ(1,"cf-icon",101),e._uU(2," M\u1eb7t tr\u01b0\u1edbc "),e.qZA())}function Bi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",102),e.NdJ("click",function(o){e.CHM(t);const r=e.oxw(4);return e.KtG(r.closeButtonCCCDFont(o))}),e._UZ(1,"cf-icon",103),e.qZA()}}function Yi(n,a){1&n&&(e.TgZ(0,"div",100),e._UZ(1,"cf-icon",101),e._uU(2," M\u1eb7t sau "),e.qZA())}function Oi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",102),e.NdJ("click",function(o){e.CHM(t);const r=e.oxw(4);return e.KtG(r.closeButtonCCCDBack(o))}),e._UZ(1,"cf-icon",103),e.qZA()}}function Ri(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"div",44),e._UZ(3,"div",45),e.TgZ(4,"div",16),e._uU(5,"Th\xf4ng tin c\u01a1 b\u1ea3n"),e.qZA()(),e.TgZ(6,"div",46)(7,"div",47)(8,"div",20),e._uU(9,"T\xean \u0111\u0103ng nh\u1eadp"),e.qZA(),e.TgZ(10,"div",48),e._uU(11),e.qZA()(),e.TgZ(12,"div",47)(13,"div",72),e._uU(14,"H\u1ecd v\xe0 t\xean"),e.qZA(),e.TgZ(15,"cf-input-group",73),e._UZ(16,"input",74),e.YNc(17,ki,1,1,"cf-input-hint",75),e.qZA()(),e.TgZ(18,"div",47)(19,"div",72),e._uU(20,"Email"),e.qZA(),e.TgZ(21,"cf-input-group",73),e._UZ(22,"input",76),e.YNc(23,Ii,1,1,"cf-input-hint",75),e.qZA()(),e.TgZ(24,"div")(25,"div",77)(26,"label",78),e._uU(27," S\u1ed1 \u0111i\u1ec7n tho\u1ea1i "),e.qZA()(),e.TgZ(28,"cf-select",79)(29,"div",80),e._UZ(30,"input",81),e.qZA(),e.YNc(31,Ui,1,1,"cf-input-hint",75),e.YNc(32,Ni,1,1,"cf-input-hint",75),e.YNc(33,wi,1,1,"cf-input-hint",75),e.qZA()(),e.TgZ(34,"div",47)(35,"div",20),e._uU(36,"Ng\xe0y sinh"),e.qZA(),e.TgZ(37,"cf-input-group",82)(38,"input",83,84),e.NdJ("input",function(){e.CHM(t);const o=e.MAs(39);return e.KtG(o.close())})("dateSelect",function(){e.CHM(t);const o=e.MAs(39);return e.KtG(o.close())}),e.qZA()()(),e.TgZ(40,"div",47)(41,"div",20),e._uU(42,"Gi\u1edbi t\xednh"),e.qZA(),e._UZ(43,"cf-select",85),e.qZA(),e.TgZ(44,"div",47)(45,"div",20),e._uU(46,"Ng\xe0y \u0111\u0103ng k\xed"),e.qZA(),e.TgZ(47,"div",48),e._uU(48),e.qZA()()()(),e.TgZ(49,"div",49)(50,"div",44),e._UZ(51,"div",45),e.TgZ(52,"div",16),e._uU(53,"X\xe1c th\u1ef1c danh t\xednh"),e.qZA()(),e.TgZ(54,"div",46)(55,"div",47)(56,"div",72),e._uU(57,"S\u1ed1 CCCD/CMND"),e.qZA(),e.TgZ(58,"cf-input-group",73),e._UZ(59,"input",86),e.YNc(60,qi,1,1,"cf-input-hint",75),e.YNc(61,Pi,1,1,"cf-input-hint",75),e.YNc(62,Ji,1,1,"cf-input-hint",75),e.qZA()(),e.TgZ(63,"div",47)(64,"div",72),e._uU(65,"Ng\xe0y c\u1ea5p"),e.qZA(),e.TgZ(66,"cf-input-group",73)(67,"input",87,88),e.NdJ("input",function(){e.CHM(t);const o=e.MAs(68);return e.KtG(o.close())})("dateSelect",function(){e.CHM(t);const o=e.MAs(68);return e.KtG(o.close())}),e.qZA(),e.YNc(69,Si,1,1,"cf-input-hint",75),e.qZA()(),e.TgZ(70,"div",89)(71,"div",72),e._uU(72,"N\u01a1i c\u1ea5p"),e.qZA(),e.TgZ(73,"cf-input-group",73),e._UZ(74,"input",90),e.YNc(75,Mi,1,1,"cf-input-hint",75),e.qZA()(),e.TgZ(76,"div",91),e._uU(77,"Upload \u1ea3nh ch\u1ee5p CCCD/CMND"),e.qZA(),e.TgZ(78,"div",92)(79,"div",93),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(83);return e.KtG(o.click())}),e.YNc(80,Qi,3,0,"div",94),e.YNc(81,Bi,2,0,"div",95),e.qZA(),e.TgZ(82,"input",96,97),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw(3);return e.KtG(r.uploadCCCDFont(o))}),e.qZA(),e.TgZ(84,"div",93),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(88);return e.KtG(o.click())}),e.YNc(85,Yi,3,0,"div",94),e.YNc(86,Oi,2,0,"div",95),e.qZA(),e.TgZ(87,"input",96,98),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw(3);return e.KtG(r.uploadCCCDBack(o))}),e.qZA()()()()()}if(2&n){const t=e.oxw(3);e.xp6(11),e.hij(" ",t.userDetailDisplay.identify," "),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.userForm.controls.displayName.invalid&&(t.userForm.controls.displayName.dirty||t.userForm.controls.displayName.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.userForm.controls.displayName),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.displayName.hasError("required")&&(t.userForm.controls.displayName.dirty||t.userForm.controls.displayName.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.userForm.controls.email.invalid&&(t.userForm.controls.email.dirty||t.userForm.controls.email.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.userForm.controls.email),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.email.hasError("required")&&(t.userForm.controls.email.dirty||t.userForm.controls.email.touched)),e.xp6(3),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.userForm.controls.phone.invalid&&(t.userForm.controls.phone.dirty||t.userForm.controls.phone.touched)?"error":"default")("data",t.optionsAreaCode)("formControl",t.userForm.controls.phoneArea),e.xp6(2),e.Q6J("formControl",t.userForm.controls.phone),e.xp6(1),e.Q6J("ngIf",(null==t.userForm.controls.phone.errors?null:t.userForm.controls.phone.errors.required)&&(t.userForm.controls.phone.dirty||t.userForm.controls.phone.touched)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.phone.hasError("minlength")&&(t.userForm.controls.phone.touched||t.userForm.controls.phone.dirty)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.phone.hasError("maxlength")&&(t.userForm.controls.phone.touched||t.userForm.controls.phone.dirty)),e.xp6(5),e.Q6J("secondaryCalendar","lunar")("displayMonths",1)("maxDate",t.currentDate)("formControl",t.userForm.controls.birthday),e.xp6(5),e.Q6J("data",t.optionsGender)("allowSearch",!1)("formControl",t.userForm.controls.gender),e.xp6(5),e.hij(" ",null==t.userDetailDisplay?null:t.userDetailDisplay.dateCreated," "),e.xp6(8),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.userForm.controls.identifyId.invalid&&(t.userForm.controls.identifyId.dirty||t.userForm.controls.identifyId.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.userForm.controls.identifyId),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.identifyId.hasError("required")&&(t.userForm.controls.identifyId.dirty||t.userForm.controls.identifyId.touched)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.identifyId.hasError("minlength")&&(t.userForm.controls.identifyId.touched||t.userForm.controls.identifyId.dirty)),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.identifyId.hasError("maxlength")&&(t.userForm.controls.identifyId.touched||t.userForm.controls.identifyId.dirty)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.userForm.controls.identifyDateProvide.invalid&&(t.userForm.controls.identifyDateProvide.dirty||t.userForm.controls.identifyDateProvide.touched)?"error":"default"),e.xp6(1),e.Q6J("secondaryCalendar","lunar")("displayMonths",1)("maxDate",t.currentDate)("formControl",t.userForm.controls.identifyDateProvide),e.xp6(2),e.Q6J("ngIf",t.userForm.controls.identifyDateProvide.hasError("required")&&(t.userForm.controls.identifyDateProvide.dirty||t.userForm.controls.identifyDateProvide.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.userForm.controls.identifyPlaceProvide.invalid&&(t.userForm.controls.identifyPlaceProvide.dirty||t.userForm.controls.identifyPlaceProvide.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.userForm.controls.identifyPlaceProvide),e.xp6(1),e.Q6J("ngIf",t.userForm.controls.identifyPlaceProvide.hasError("required")&&(t.userForm.controls.identifyPlaceProvide.dirty||t.userForm.controls.identifyPlaceProvide.touched)),e.xp6(4),e.Jzz("background-image: url(",t.previewCCCDFont,");"),e.ekj("w-[238px]",t.previewCCCDFont),e.xp6(1),e.Q6J("ngIf",!t.previewCCCDFont),e.xp6(1),e.Q6J("ngIf",t.previewCCCDFont),e.xp6(3),e.Jzz("background-image: url(",t.previewCCCDBack,");"),e.ekj("w-[238px]",t.previewCCCDBack),e.xp6(1),e.Q6J("ngIf",!t.previewCCCDBack),e.xp6(1),e.Q6J("ngIf",t.previewCCCDBack)}}function Li(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",71),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("checked",!0)("disabled",!0),e.xp6(1),e.Oqu(t)}}function zi(n,a){if(1&n&&(e.TgZ(0,"div",65)(1,"div",66)(2,"div",67),e._uU(3," Quy\u1ec1n h\u1ea1n m\u1eb7c \u0111\u1ecbnh "),e.qZA(),e.TgZ(4,"div",68),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c c\u1ea5p cho role \u0111\xf3, kh\xf4ng \u0111\u01b0\u1ee3c ph\xe9p thay \u0111\u1ed5i. "),e.qZA()(),e.TgZ(6,"div",69),e.YNc(7,Li,3,3,"ng-container",70),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(7),e.Q6J("ngForOf",t.allRolesDefault)}}function Ki(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"cf-switch",107),e.NdJ("checkedChange",function(){const r=e.CHM(t).$implicit,c=e.oxw(5);return e.KtG(c.onCheckRoleChange(r))}),e._uU(2),e.qZA(),e.BQk()}if(2&n){const t=a.$implicit,i=e.oxw(5);e.xp6(1),e.Q6J("checked",i.listRoleId.includes(t.id)),e.xp6(1),e.Oqu(t.name)}}function Hi(n,a){if(1&n&&(e.TgZ(0,"div",65)(1,"div",66)(2,"div",67),e._uU(3," Quy\u1ec1n h\u1ea1n n\xe2ng cao "),e.qZA(),e.TgZ(4,"div",68),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c ch\u1ec9 \u0111\u1ecbnh c\u1ea5p th\xeam cho \u0111\u1ea1i l\xfd n\u1ebfu mu\u1ed1n. "),e.qZA()(),e.TgZ(6,"div",69),e.YNc(7,Ki,3,2,"ng-container",70),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(7),e.Q6J("ngForOf",t.allRolesAdvance)}}const ji=function(){return[]};function Gi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",62)(2,"cf-select",104),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(3);return e.KtG(r.employeeDetail.titleId=o)})("selectedChange",function(o){e.CHM(t);const r=e.oxw(3);return e.KtG(r.getPermissionByRole(o))}),e.TgZ(3,"label",105)(4,"span",106),e._uU(5,"Ch\u1ee9c danh"),e.qZA()()(),e.YNc(6,zi,8,1,"div",63),e._UZ(7,"div",64),e.YNc(8,Hi,8,1,"div",63),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(2),e.Q6J("status","default")("data",t.roleOtions||e.DdM(8,ji))("ngModel",t.employeeDetail.titleId)("allowSearch",!1)("allowSearch",!0),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("ngIf",t.allRolesDefault.length),e.xp6(2),e.Q6J("ngIf",t.allRolesAdvance.length)}}function Vi(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div",39),e.YNc(2,Fi,3,3,"div",40),e.YNc(3,bi,3,3,"div",40),e.qZA(),e.YNc(4,Ri,89,56,"div",1),e.YNc(5,Gi,9,9,"div",1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("ngIf",t.isEditInfo),e.xp6(1),e.Q6J("ngIf",t.isEditPermission),e.xp6(1),e.Q6J("ngIf","BASIC_INFO"===t.viewMode),e.xp6(1),e.Q6J("ngIf","TITLE_ROLE"===t.viewMode)}}function Xi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div")(4,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onBackToList())}),e._UZ(5,"cf-icon",6),e._uU(6," Quay l\u1ea1i t\xecm ki\u1ebfm "),e.qZA()(),e.YNc(7,ai,7,0,"div",7),e.YNc(8,ri,7,0,"div",7),e.qZA(),e.TgZ(9,"div",8)(10,"div",9)(11,"div",10),e._UZ(12,"img",11),e.YNc(13,ci,2,0,"div",12),e.TgZ(14,"input",13,14),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.uploadAvatar(o))}),e.qZA()(),e.TgZ(16,"div",15)(17,"div",16),e._uU(18),e.qZA(),e.TgZ(19,"div",17),e._uU(20),e.qZA()()(),e.TgZ(21,"div",18)(22,"div",19)(23,"div",20),e._uU(24,"Ch\u1ee9c danh"),e.qZA(),e.TgZ(25,"cf-label",21),e._uU(26),e.qZA()(),e.TgZ(27,"div",19)(28,"div",20),e._uU(29,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.YNc(30,si,2,3,"cf-select",22),e.YNc(31,_i,4,3,"ng-template",null,23,e.W1O),e.qZA()()(),e.YNc(33,Zi,6,4,"div",1),e.YNc(34,Vi,6,4,"div",1),e.qZA()()}if(2&n){const t=e.MAs(32),i=e.oxw();e.xp6(7),e.Q6J("ngIf",!i.isEdit),e.xp6(1),e.Q6J("ngIf",i.isEdit),e.xp6(4),e.Q6J("src",i.previewAvatar||"https://cheapflighttest.s3.ap-southeast-1.amazonaws.com/avarta-default.jpg",e.LSH),e.xp6(1),e.Q6J("ngIf",i.isEdit),e.xp6(5),e.Oqu(i.userDetailDisplay.displayName),e.xp6(2),e.Oqu(i.userDetailDisplay.identify),e.xp6(5),e.Q6J("color",i.titleColor),e.xp6(1),e.Oqu(i.userDetailDisplay.titleName),e.xp6(4),e.Q6J("ngIf",i.isUpdateStatus(i.userDetailDisplay.titleCode))("ngIfElse",t),e.xp6(3),e.Q6J("ngIf",!i.isEdit),e.xp6(1),e.Q6J("ngIf",i.isEdit)}}function $i(n,a){1&n&&e._UZ(0,"cf-spinner")}let Wi=(()=>{class n{constructor(t,i,o,r,c,u,h,m,T,v){this.calendar=i,this._fb=o,this._modal=r,this.activedRoute=c,this._router=u,this._userService=h,this._toastService=m,this._permissionService=T,this._phoneDataService=v,this.viewMode="BASIC_INFO",this.isEdit=!1,this.identifyToggle=!1,this.isCccdFontDirty=!1,this.isCccdBackDirty=!1,this.isAvatarDirty=!1,this.roleOtions=[],this.allRolesDefault=[],this.allRolesAdvance=[],this.errorMessage={displayName:"H\u1ecd v\xe0 t\xean kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",email:"Email kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",phone:"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",emailFormat:"\u0110\u1ecbnh d\u1ea1ng kh\xf4ng h\u1ee3p l\u1ec7",birthday:"Ng\xe0y sinh kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",gender:"Gi\u1edbi t\xednh kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",identifyId:"CCCD/CMND kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",identifyDateProvide:"Ng\xe0y c\u1ea5p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",identifyPlaceProvide:"N\u01a1i c\u1ea5p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",minlength:"T\u1ed1i thi\u1ec3u 2 k\xed t\u1ef1",minlengthCCCD:"T\u1ed1i thi\u1ec3u 6 ch\u1eef s\u1ed1",maxlength:"T\u1ed1i \u0111a 11 ch\u1eef s\u1ed1"},this.optionsGender=[{name:"Nam",code:"MALE"},{name:"N\u1eef",code:"FEMALE"}],this.statusOption=[{code:"ACTIVE",name:"Ho\u1ea1t \u0111\u1ed9ng"},{code:"INACTIVE",name:"Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng"}],this.isLoading=!1,this.listRoleId=[],this.isEditInfo=this._permissionService.hasPermission(g.or.UpdateEmployeeInfo),this.isEditPermission=this._permissionService.hasPermission(g.or.UpdateEmployeePermission),this.optionsAreaCode=[],t.registerIcons([l.rks,l.Hge,l.B2I,l.KYu,l.kTb,l.oFb,l.HTW,l.P5K,l.bLw,l.MwJ,l.UNF,l.PcQ,l.whL,l.S7Q]),this.currentDate=i.getToday(),this.optionsAreaCode=this._phoneDataService.optionsAreaCode,this.userId=c.snapshot.params.id,this.titleColor=history.state.titleColor,this.isEditPermission&&(this.viewMode="TITLE_ROLE"),this.isEditInfo&&(this.viewMode="BASIC_INFO")}ngOnInit(){this.initUserForm(),this.loadEmployeeDetail()}initUserForm(){this.userForm=this._fb.group({avatar:[""],displayName:[null,s.kI.required],email:[null,[s.kI.required,s.kI.email]],phoneArea:[null,s.kI.required],phone:[null,[s.kI.required,s.kI.minLength(7),s.kI.maxLength(11)]],birthday:[null],gender:[null],identifyId:[null,[s.kI.required,s.kI.minLength(6),s.kI.maxLength(12)]],identifyDateProvide:[null,s.kI.required],identifyPlaceProvide:[null,s.kI.required],frontImageIdentify:["",s.kI.required],backImageIdentify:["",s.kI.required]})}loadEmployeeDetail(){const t={userID:this.userId};this.isLoading=!0,this._userService.getEmployeeDetail(t).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:i=>{var o,r,c;this.titleId=i.data.titleId,this.employeeDetail=i.data,this.employeeDetail.titlesCanChange.push({id:i.data.titleId,name:i.data.titleName,defaultPermissions:i.data.defaultPermission,advanceRoles:i.data.advanceRole}),this.userDetailDisplay={gender:i.data.getGender(),identifyId:i.data.identifyId,identifyDateProvide:i.data.identifyDateProvide?P(1e3*i.data.identifyDateProvide).format("DD/MM/YYYY"):"",identifyPlaceProvide:i.data.identifyPlaceProvide,birthday:i.data.birthday?P(1e3*i.data.birthday).format("DD/MM/YYYY"):"",dateCreated:i.data.dateCreated?P(1e3*i.data.dateCreated).format("DD/MM/YYYY"):"",displayName:i.data.displayName,identify:i.data.identify,titleName:i.data.titleName,titleCode:i.data.titleCode,state:i.data.state,email:i.data.email,phone:i.data.phone},this.allRolesDefault=(null===(o=i.data)||void 0===o?void 0:o.defaultPermission)||[],this.allRolesAdvance=(null===(r=i.data)||void 0===r?void 0:r.advanceRole)||[],this.listRoleId=i.data.roleIds||[],this.roleOtions=(null===(c=this.employeeDetail.titlesCanChange)||void 0===c?void 0:c.map(h=>({id:h.id,name:h.name})))||[],this.previewAvatar=i.data.avatarUrl;const u={avatar:i.data.avatar,frontImageIdentify:i.data.frontImageIdentify,backImageIdentify:i.data.backImageIdentify,displayName:i.data.displayName,email:i.data.email,phoneArea:i.data.phoneArea,phone:i.data.phone,birthday:i.data.birthday?new Date(1e3*i.data.birthday):null,gender:i.data.gender,identifyId:i.data.identifyId,identifyDateProvide:i.data.identifyDateProvide?new Date(1e3*i.data.identifyDateProvide):null,identifyPlaceProvide:i.data.identifyPlaceProvide};this.userForm.patchValue(u)},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 l\u1ea5y th\xf4ng tin nh\xe2n vi\xean. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})}onChangeMode(t){this.viewMode=t}onUpdate(){this.isEdit=!0,this.reloadIdentifyImage()}onDelete(){this._modal.open(D.V0,{title:"X\xe1c nh\u1eadn x\xf3a t\xe0i kho\u1ea3n",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a t\xe0i kho\u1ea3n n\xe0y? Vi\u1ec7c n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c, vui l\xf2ng ki\u1ec3m tra k\u0129 tr\u01b0\u1edbc khi thao t\xe1c.",okText:"X\xe1c nh\u1eadn",cancelText:"Hu\u1ef7 b\u1ecf",isSecondary:!0}).afterClosed$.subscribe({next:i=>{i.data&&this._userService.deleteEmployeeAccount(this.userId).subscribe({next:o=>{o.success?(this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"X\xf3a t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",sticky:!1}),this._router.navigate(["admin/user-manage"])):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"X\xf3a t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",sticky:!0})}})}})}onSubmit(){if(this.userForm.markAllAsTouched(),this.isEditInfo&&this.userForm.invalid)return;const t=this.userForm.value,i={avatar:t.avatar,birthday:t.birthday?P(t.birthday).format("DD/MM/YYYY"):"",identifyId:t.identifyId,identifyDateProvide:t.identifyDateProvide?P(t.identifyDateProvide).format("DD/MM/YYYY"):"",identifyPlaceProvide:t.identifyPlaceProvide,frontImageIdentify:t.frontImageIdentify,backImageIdentify:t.backImageIdentify,displayName:t.displayName,email:t.email,gender:t.gender||"",phone:t.phone,phoneArea:t.phoneArea,roleIds:this.listRoleId||[],titleId:this.titleId,userId:this.userId};let o=this._userService.updateEmployeeUserInfo(i);(this.isCccdFontDirty||this.isCccdBackDirty||this.isAvatarDirty)&&(o=this.createRequestUpdateEmployeeInfo(i));const r=this._userService.updateEmployeeUserPermission(i),c=[];this.isEditInfo&&c.push(o),this.isEditPermission&&c.push(r),this.isLoading=!0,(0,b.D)(c).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:u=>{this.isEdit=!1,this.loadEmployeeDetail()}})}createRequestUpdateEmployeeInfo(t){return this._userService.getUrlUploadImage({username:this.userDetailDisplay.identify,avatarContentType:this.avatarFile?this.avatarFile.type:"",avatarExtension:this.getExtension(this.avatarFile?this.avatarFile.name:""),cccdFontContentType:this.cccdFontFile?this.cccdFontFile.type:"",cccdFontExtension:this.getExtension(this.cccdFontFile?this.cccdFontFile.name:""),cccdBackContentType:this.cccdBackFile?this.cccdBackFile.type:"",cccdBackExtension:this.getExtension(this.cccdBackFile?this.cccdBackFile.name:"")}).pipe((0,O.w)(i=>{this.isLoading=!0;const o=[];return this.isCccdFontDirty&&o.push(this.uploadAvatarToS3(i.data.cccdFontUploadUrl,this.cccdFontFile.type,this.cccdFontFile)),this.isCccdBackDirty&&o.push(this.uploadAvatarToS3(i.data.cccdBackUploadUrl,this.cccdBackFile.type,this.cccdBackFile)),this.isAvatarDirty&&o.push(this.uploadAvatarToS3(i.data.avatarUploadUrl,this.avatarFile.type,this.avatarFile)),(0,b.D)(o).pipe((0,k.x)(()=>this.isLoading=!1),(0,O.w)(r=>this._userService.updateEmployeeUserInfo(t)))}))}getExtension(t){return"."+t.split(".").pop()}uploadAvatarToS3(t,i,o){return this._userService.uploadfileAWSS3(t,i,o)}onCancel(){this._modal.open(D.V0,{title:"H\u1ee7y b\u1ecf thay \u0111\u1ed5i",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n h\u1ee7y b\u1ecf thay \u0111\u1ed5i v\xe0 d\u1eebng vi\u1ec7c ch\u1ec9nh s\u1eeda? H\xe0nh \u0111\u1ed9ng n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c.",okText:"Kh\xf4ng, ti\u1ebfp t\u1ee5c",cancelText:"C\xf3, h\u1ee7y b\u1ecf"}).afterClosed$.subscribe({next:i=>{i.data||(this.isEdit=!1)}})}onCheckRoleChange(t){this.listRoleId.includes(t.id)?this.listRoleId=this.listRoleId.filter(i=>i!==t.id):this.listRoleId.push(t.id)}getPermissionByRole(t){var i;const o=this.employeeDetail.titlesCanChange.find(r=>r.id===t.code);o&&(this.listRoleId=[],this.titleId=o.id,this.allRolesAdvance=(null===(i=o.advanceRoles)||void 0===i?void 0:i.map(r=>({code:r.id,name:r.name})))||[],this.allRolesDefault=o.defaultPermissions||[])}isUpdateStatus(t){return this._permissionService.hasPermission(g.or.CanEditAccountStatus+"_"+t)}onBackToList(){this._router.navigate(["admin/user-manage"])}viewCCCD(){this.identifyToggle=!this.identifyToggle,this.identifyToggle&&this.reloadIdentifyImage()}reloadIdentifyImage(){this._userService.getIdentifyUrl(this.userId).subscribe({next:t=>{this.cccdFontSrc=t.data.cccdFontUploadUrl,this.previewCCCDFont=t.data.cccdFontUploadUrl,this.cccdBackSrc=t.data.cccdBackUploadUrl,this.previewCCCDBack=t.data.cccdBackUploadUrl}})}uploadAvatar(t){const o=t.target.files[0];o.type.match("image-*")?o&&(this.isAvatarDirty=!0,this.avatarFile=t.target.files[0],this.getPreviewImage(t,"avatar"),this.userForm.controls.avatar.setValue(this.avatarFile.name)):console.log("Ch\u1ec9 cho ph\xe9p ch\u1ecdn file \u1ea3nh")}uploadCCCDFont(t){this.isCccdFontDirty=!0,this.cccdFontFile=t.target.files[0],this.getPreviewImage(t,"cccdFont"),this.userForm.controls.frontImageIdentify.setValue(this.cccdFontFile.name)}uploadCCCDBack(t){this.isCccdBackDirty=!0,this.cccdBackFile=t.target.files[0],this.getPreviewImage(t,"cccdBack"),this.userForm.controls.backImageIdentify.setValue(this.cccdBackFile.name)}closeButtonCCCDFont(t){this.previewCCCDFont="",this.userForm.controls.frontImageIdentify.setValue(""),t.stopPropagation()}closeButtonCCCDBack(t){this.previewCCCDBack="",this.userForm.controls.backImageIdentify.setValue(""),t.stopPropagation()}getPreviewImage(t,i){if(t.target.files&&t.target.files[0]){const o=t.target.files[0],r=new FileReader;switch(i){case"avatar":r.onload=c=>this.previewAvatar=r.result;break;case"cccdFont":r.onload=c=>this.previewCCCDFont=r.result;break;case"cccdBack":r.onload=c=>this.previewCCCDBack=r.result}r.readAsDataURL(o)}}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(l.KNP),e.Y36(Q.jH),e.Y36(s.qu),e.Y36(j.oE),e.Y36(f.gz),e.Y36(f.F0),e.Y36(Z.KD),e.Y36(E.BX),e.Y36(g.$A),e.Y36($.l))},n.\u0275cmp=e.Xpm({type:n,selectors:[["user-detail-page"]],standalone:!0,features:[e.jDz],decls:3,vars:2,consts:[["class","py-8 flex justify-center",4,"ngIf"],[4,"ngIf"],[1,"py-8","flex","justify-center"],[1,"w-[764px]","max-w-[764]","flex","flex-col","gap-y-6"],[1,"flex","justify-between"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["icon","arrow_left","size","small",1,"mr-2.5"],["class","flex gap-x-3",4,"ngIf"],[1,"py-[20px]","px-6","flex","justify-between","bg-white","rounded"],[1,"flex","items-center","gap-x-[20px]"],[1,"w-[64px]","h-[64px]","overflow-hidden","relative"],["alt","",1,"object-cover","h-full","w-full","rounded-full",3,"src"],["class","absolute bottom-0 right-0 w-[28px] h-[28px] rounded-full bg-[#505050] opacity-[.85] flex justify-center items-center cursor-pointer",4,"ngIf"],["accept","image/*","name","ufile","type","file",1,"hidden",3,"change"],["inputFile",""],[1,"flex","flex-col"],[1,"text-heading-md"],[1,"text-body-lg"],[1,"flex","gap-x-3"],[1,"flex","flex-col","gap-y-2","justify-between","items-center"],[1,"text-express-sm"],["type","inverted",3,"color"],["class","!max-w-none !w-[186px]","textField","name","valueField","code","size","small",3,"data","allowSearch","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["contentTpl",""],["cf-button","","size","medium",3,"click"],["icon","edit_alt","size","small",1,"mr-2.5"],["icon","delete","size","small",1,"mr-2.5"],["icon","save","size","small",1,"mr-2.5"],["icon","circle_error","size","small",1,"mr-2.5"],[1,"absolute","bottom-0","right-0","w-[28px]","h-[28px]","rounded-full","bg-[#505050]","opacity-[.85]","flex","justify-center","items-center","cursor-pointer"],["icon","camera","size","small",1,"text-white",3,"click"],["textField","name","valueField","code","size","small",1,"!max-w-none","!w-[186px]",3,"data","allowSearch","ngModel","ngModelChange"],["cfHeadIcon","","icon","calendar","size","small"],[1,"rounded","py-1","px-3","border","border-neutral-gray-2"],["class","text-body-md flex items-center",4,"ngIf"],[1,"text-body-md","flex","items-center"],["icon","circle_check","size","small",1,"text-secondary-1-4","mr-2.5"],["icon","circle_remove","size","small",1,"mr-2.5"],["icon","circle_warning",1,"text-secondary-7-3","mr-2"],[1,"flex","gap-x-3","mb-4"],["class","flex items-center gap-x-2.5 py-1.5 px-4 text-heading-xs rounded-full cursor-pointer bg-white border border-neutral-gray-3",3,"ngClass","click",4,"ngIf"],[1,"flex","items-center","gap-x-2.5","py-1.5","px-4","text-heading-xs","rounded-full","cursor-pointer","bg-white","border","border-neutral-gray-3",3,"ngClass","click"],["icon","circle_information","size","small"],["icon","user","size","small"],[1,"flex","gap-x-[20px]","mb-4"],[1,"w-1","bg-[#fcb40a]"],[1,"grid","grid-cols-2","gap-4","bg-neutral-white","rounded","p-6"],[1,"flex","flex-col","gap-y-1.5"],[1,"w-full","h-10","py-2.5","px-3","text-body-md","rounded","border","border-neutral-gray-3","bg-neutral-gray-1"],[1,"mt-8"],[1,"w-full","h-10","py-2.5","px-3","text-body-md","border","border-neutral-gray-3","bg-neutral-gray-1"],[1,"mt-[22px]"],["cf-button","","size","medium","type","secondary",3,"click",4,"ngIf"],["class","col-start-1 col-end-3 ",4,"ngIf"],["cf-button","","size","medium","type","secondary",3,"click"],["icon","eye","size","small",1,"mr-2.5"],["icon","eye_off","size","small",1,"mr-2.5"],[1,"col-start-1","col-end-3"],[1,"text-express-sm","mb-4"],[1,"gap-x-4","flex","items-center"],["class","w-[238px] h-[140px] object-contain",3,"src",4,"ngIf"],[1,"w-[238px]","h-[140px]","object-contain",3,"src"],[1,"p-6","bg-neutral-white","rounded-lg","shadow-cf-md","flex","flex-col","gap-y-6"],["class","flex gap-x-8",4,"ngIf"],[1,"w-full","border-t","border-neutral-gray-1"],[1,"flex","gap-x-8"],[1,"flex","flex-col","gap-y-2","w-[260px]"],[1,"text-heading-sm"],[1,"text-body-lg","text-neutral-gray-4"],[1,"flex","flex-col","flex-1","gap-y-4"],[4,"ngFor","ngForOf"],[3,"checked","disabled"],[1,"text-express-sm",3,"CfRequired"],[1,"grow-[400]","!w-full",3,"status"],["cf-input","","size","medium","placeholder","Nh\u1eadp h\u1ecd v\xe0 t\xean",3,"formControl"],["cfHint","",3,"hint",4,"ngIf"],["cf-input","","size","medium","placeholder","Nh\u1eadp email",3,"formControl"],[1,"text-espressive-md","text-neutral-gray-5","mb-1.5","empty:!m-0"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5",3,"CfRequired"],["textField","name","valueField","code","size","small","placeholder","Nh\u1eadp m\xe3",1,"!w-full","!max-w-full",3,"status","data","formControl"],["cfSuffix","",1,"w-[65%]","px-3","text-body-md","flex","gap-x-2","items-center","border-l","border-neutral-gray-2"],["cf-input","","size","medium","autocomplete","off","placeholder","Nh\u1eadp s\u1ed1 \u0111i\u1ec7n tho\u1ea1i","CfNumberic","",3,"formControl"],[1,"grow-[400]","!w-full"],["cfDatepicker","","type","text","size","medium","cf-input","","placeholder","Nh\u1eadp ng\xe0y sinh",1,"py-[7px]",3,"secondaryCalendar","displayMonths","maxDate","formControl","input","dateSelect"],["birthdayForm","cfDatepicker"],["textField","name","valueField","code","placeholder","Ch\u1ecdn gi\u1edbi t\xednh",1,"!max-w-full",3,"data","allowSearch","formControl"],["cf-input","","size","medium","placeholder","Nh\u1eadp s\u1ed1 CCCD/CMND","CfNumberic","",3,"formControl"],["cfDatepicker","","type","text","size","medium","cf-input","","placeholder","Ch\u1ecdn ng\xe0y c\u1ea5p",1,"py-[7px]",3,"secondaryCalendar","displayMonths","maxDate","formControl","input","dateSelect"],["dateProvideForm","cfDatepicker"],[1,"flex","flex-col","gap-y-1.5","col-start-1","col-end-3"],["cf-input","","size","medium","placeholder","Nh\u1eadp n\u01a1i c\u1ea5p",3,"formControl"],[1,"text-espressive-sm"],[1,"flex","gap-x-3","col-start-1","col-end-3"],[1,"h-[140px]","w-[140px]","bg-no-repeat","bg-center","bg-cover","rounded","border","border-neutral-gray-2","flex","items-center","justify-center","cursor-pointer","relative",3,"click"],["class","text-express-sm text-center px-6 flex flex-col justify-center items-center gap-y-3",4,"ngIf"],["class","rounded-full bg-neutral-gray-4 absolute flex items-center justify-between right-0 top-0 p-1 translate-x-1/2 -translate-y-1/2",3,"click",4,"ngIf"],["type","file",1,"hidden",3,"change"],["fileUploadCCCDFont",""],["fileUploadCCCDBack",""],["cfHint","",3,"hint"],[1,"text-express-sm","text-center","px-6","flex","flex-col","justify-center","items-center","gap-y-3"],["icon","cloud_upload","size","medium"],[1,"rounded-full","bg-neutral-gray-4","absolute","flex","items-center","justify-between","right-0","top-0","p-1","translate-x-1/2","-translate-y-1/2",3,"click"],["icon","close","size","small",1,"text-neutral-white"],["textField","name","valueField","id","placeholder","Ch\u1ecdn vai tr\xf2",1,"!w-full","!max-w-none",3,"status","data","ngModel","allowSearch","ngModelChange","selectedChange"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],[3,"CfRequired"],[3,"checked","checkedChange"]],template:function(t,i){1&t&&(e.YNc(0,Xi,35,12,"div",0),e._UZ(1,"cf-toast"),e.YNc(2,$i,1,0,"cf-spinner",1)),2&t&&(e.Q6J("ngIf",i.userDetailDisplay),e.xp6(2),e.Q6J("ngIf",i.isLoading))},dependencies:[_.ez,_.mk,_.sg,_.O5,s.u5,s.Fj,s.JJ,s.On,s.UX,s.oH,l.AxE,l.Sm8,C.N8,C.Xq,G.I,p.j$,p.ND,p.BN,p.v2,V.C,Q.Cs,I.q,z.b,D.OR,E.hj,X.z],encapsulation:2}),n})();var eo=d(25614),to=d(23160);function no(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onUpdate())}),e._UZ(1,"cf-icon",37),e._uU(2," Ch\u1ec9nh s\u1eeda "),e.qZA()}}function io(n,a){if(1&n&&(e.TgZ(0,"div",28),e._uU(1),e.qZA()),2&n){const t=e.oxw(5);e.xp6(1),e.hij("G\u1eedi email k\xedch ho\u1ea1t (",t.verifyCount,")")}}function oo(n,a){1&n&&(e.TgZ(0,"div"),e._uU(1,"G\u1eedi email k\xedch ho\u1ea1t"),e.qZA())}function ao(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.resendEmailVerify())}),e._UZ(1,"cf-icon",41),e.YNc(2,io,2,1,"div",42),e.YNc(3,oo,2,0,"div",1),e.qZA()}if(2&n){const t=e.oxw(4);e.xp6(1),e.ekj("text-neutral-gray-4",t.verifyCount>0),e.xp6(1),e.Q6J("ngIf",t.verifyCount>0),e.xp6(1),e.Q6J("ngIf",0===t.verifyCount)}}function ro(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.onDepositSubAgent())}),e._UZ(1,"cf-icon",43),e._uU(2," N\u1ea1p ti\u1ec1n "),e.qZA()}}function co(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return o.isOpen=!1,e.KtG(o.onBanUser())}),e._UZ(1,"cf-icon",44),e._uU(2," V\xf4 hi\u1ec7u h\xf3a "),e.qZA()}}function so(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(4);return o.isOpen=!1,e.KtG(o.onActiveUser())}),e._UZ(1,"cf-icon",45),e._uU(2," M\u1edf ho\u1ea1t \u0111\u1ed9ng "),e.qZA()}}function lo(n,a){if(1&n&&(e.TgZ(0,"div",38),e.YNc(1,ao,4,4,"div",39),e.YNc(2,ro,3,0,"div",39),e.YNc(3,co,3,0,"div",39),e.YNc(4,so,3,0,"div",39),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf","INACTIVE"===t.agentDetailDisplay.state),e.xp6(1),e.Q6J("ngIf",t.isTopUpVirtualBalance),e.xp6(1),e.Q6J("ngIf","BLOCK"!==t.agentDetailDisplay.state),e.xp6(1),e.Q6J("ngIf","BLOCK"===t.agentDetailDisplay.state)}}function uo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",18),e.YNc(1,no,3,0,"button",29),e.TgZ(2,"div",30)(3,"div",31,32)(6,"button",33),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.isOpen=!0)}),e._UZ(7,"cf-icon",34),e.qZA()(),e.YNc(8,lo,5,4,"ng-template",35),e.NdJ("overlayOutsideClick",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.outsideClick())}),e.qZA()()}if(2&n){const t=e.MAs(5),i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.isEditInfo||i.isEditPermission),e.xp6(7),e.Q6J("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayOpen",i.isOpen)("cdkConnectedOverlayPositions",i.bottomCenter)}}function _o(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",49),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onSubmit())}),e._UZ(1,"cf-icon",50),e._uU(2," L\u01b0u "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("disabled",t.agentForm.invalid)}}function po(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onSubmit())}),e._UZ(1,"cf-icon",50),e._uU(2," L\u01b0u "),e.qZA()}}function go(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",18),e.YNc(1,_o,3,1,"button",46),e.YNc(2,po,3,0,"ng-template",null,47,e.W1O),e.TgZ(4,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onCancel())}),e._UZ(5,"cf-icon",48),e._uU(6," H\u1ee7y "),e.qZA()()}if(2&n){const t=e.MAs(3),i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.isEditInfo)("ngIfElse",t)}}function ho(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",51)(1,"cf-icon",52),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(16);return e.KtG(o.click())}),e.qZA()()}}function mo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"cf-select",53),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.agentDetailDisplay.state=o)}),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("data",t.statusOptions)("allowSearch",!1)("ngModel",t.agentDetailDisplay.state)}}function fo(n,a){1&n&&(e.TgZ(0,"div",56),e._UZ(1,"cf-icon",57),e._uU(2," Ho\u1ea1t \u0111\u1ed9ng "),e.qZA())}function vo(n,a){1&n&&(e.TgZ(0,"div",56),e._UZ(1,"cf-icon",58),e._uU(2," Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng "),e.qZA())}function Co(n,a){1&n&&(e.TgZ(0,"div",56),e._UZ(1,"cf-icon",59),e._uU(2," Ch\u01b0a k\xedch ho\u1ea1t "),e.qZA())}function xo(n,a){if(1&n&&(e.TgZ(0,"div",54),e.YNc(1,fo,3,0,"div",55),e.YNc(2,vo,3,0,"div",55),e.YNc(3,Co,3,0,"div",55),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf","ACTIVE"===t.agentDetailDisplay.state),e.xp6(1),e.Q6J("ngIf","BLOCK"===t.agentDetailDisplay.state),e.xp6(1),e.Q6J("ngIf","INACTIVE"===t.agentDetailDisplay.state)}}const ee=function(n){return{"!bg-secondary-3-5 !border-none !text-neutral-white":n}};function Eo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",63),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("BASIC_INFO"))}),e._UZ(1,"cf-icon",64),e._uU(2," Th\xf4ng tin "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ee,"BASIC_INFO"===t.viewMode))}}function yo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",63),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("TITLE_ROLE"))}),e._UZ(1,"cf-icon",65),e._uU(2," Quy\u1ec1n h\u1ea1n "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ee,"TITLE_ROLE"===t.viewMode))}}function Ao(n,a){1&n&&e._UZ(0,"cf-icon",86)}function To(n,a){1&n&&e._UZ(0,"cf-icon",87)}function Do(n,a){if(1&n&&(e.TgZ(0,"div",88)(1,"div",71)(2,"div",20),e._uU(3,"Facebook"),e.qZA(),e.TgZ(4,"div",89),e._uU(5),e.qZA()(),e.TgZ(6,"div",71)(7,"div",20),e._uU(8,"K\xeanh gi\u1edbi thi\u1ec7u"),e.qZA(),e.TgZ(9,"div",70),e._uU(10),e.qZA()()()),2&n){const t=e.oxw(4);e.xp6(5),e.hij(" ",t.agentDetailDisplay.facebookContact," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.referralChannelDisplay," ")}}function Zo(n,a){if(1&n&&(e.TgZ(0,"div",81)(1,"div",66),e._UZ(2,"div",67),e.TgZ(3,"div",16),e._uU(4,"Th\xf4ng tin c\xf4ng n\u1ee3"),e.qZA()(),e.TgZ(5,"div",82)(6,"div",25)(7,"div",20),e._uU(8,"Lo\u1ea1i chi\u1ebft kh\u1ea5u nh\u1eadn"),e.qZA(),e.TgZ(9,"div",70),e._uU(10),e.qZA()(),e.TgZ(11,"div",25)(12,"div",20),e._uU(13,"M\u1ee9c \xe2m qu\u1ef9 t\u1ed1i \u0111a"),e.qZA(),e.TgZ(14,"div",70),e._uU(15),e.ALo(16,"replace"),e.ALo(17,"number"),e.qZA()()()()),2&n){const t=e.oxw(4);e.xp6(10),e.hij(" ","PAYMENT_NOW"===t.agentDetailDisplay.discountPaymentType?"Chi\u1ebft kh\u1ea5u tr\u1ea3 ngay":"Chi\u1ebft kh\u1ea5u tr\u1ea3 sau"," "),e.xp6(5),e.hij(" ",e.Dn7(16,2,e.lcZ(17,6,t.agentDetailDisplay.maxNegative||0),",",".")," \u0111 ")}}function Fo(n,a){if(1&n&&(e.TgZ(0,"div",90)(1,"div",91)(2,"div",92)(3,"div",20),e._uU(4,"M\xe3 s\u1ed1 thu\u1ebf doanh nghi\u1ec7p"),e.qZA(),e.TgZ(5,"div",70),e._uU(6),e.qZA()(),e.TgZ(7,"div",92)(8,"div",20),e._uU(9,"T\xean doanh nghi\u1ec7p"),e.qZA(),e.TgZ(10,"div",70),e._uU(11),e.qZA()()(),e.TgZ(12,"div",25)(13,"div",20),e._uU(14,"\u0110\u1ecba ch\u1ec9"),e.qZA(),e.TgZ(15,"div",70),e._uU(16),e.qZA()()()),2&n){const t=e.oxw(4);e.xp6(6),e.hij(" ",t.agentDetailDisplay.companyCode," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.companyName," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.companyAddress," ")}}function bo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",97),e.NdJ("click",function(){e.CHM(t),e.oxw();const o=e.MAs(20),r=e.oxw(4);return e.KtG(r.openPopupCCCD(o))}),e._UZ(1,"cf-icon",98),e._uU(2," Xem \u1ea3nh ch\u1ee5p "),e.qZA()}}function ko(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",97),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(5);return e.KtG(o.viewCCCD())}),e._UZ(1,"cf-icon",99),e._uU(2," \u1ea8n \u1ea3nh ch\u1ee5p "),e.qZA()}}function Io(n,a){if(1&n&&e._UZ(0,"img",107),2&n){const t=e.oxw(6);e.Q6J("src",t.cccdFontSrc,e.LSH)}}function Uo(n,a){if(1&n&&e._UZ(0,"img",107),2&n){const t=e.oxw(6);e.Q6J("src",t.cccdBackSrc,e.LSH)}}function No(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",100)(1,"div",101)(2,"div",102)(3,"div",103),e._uU(4,"\u1ea2nh ch\u1ee5p CCCD/CMND"),e.qZA(),e.TgZ(5,"cf-icon",104),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(5);return e.KtG(o.closePopupCCCD())}),e.qZA()(),e.TgZ(6,"div",105),e.YNc(7,Io,1,1,"img",106),e.YNc(8,Uo,1,1,"img",106),e.qZA()()()}if(2&n){const t=e.oxw(5);e.xp6(7),e.Q6J("ngIf",t.cccdFontSrc),e.xp6(1),e.Q6J("ngIf",t.cccdBackSrc)}}function wo(n,a){if(1&n&&(e.TgZ(0,"div",82)(1,"div",25)(2,"div",20),e._uU(3,"S\u1ed1 CCCD/CMND"),e.qZA(),e.TgZ(4,"div",93),e._uU(5),e.qZA()(),e.TgZ(6,"div",25)(7,"div",20),e._uU(8,"Ng\xe0y c\u1ea5p"),e.qZA(),e.TgZ(9,"div",93),e._uU(10),e.qZA()(),e.TgZ(11,"div",25)(12,"div",20),e._uU(13,"N\u01a1i c\u1ea5p"),e.qZA(),e.TgZ(14,"div",93),e._uU(15),e.qZA()(),e.TgZ(16,"div",94),e.YNc(17,bo,3,0,"button",95),e.YNc(18,ko,3,0,"button",95),e.qZA(),e.YNc(19,No,9,2,"ng-template",null,96,e.W1O),e.qZA()),2&n){const t=e.oxw(4);e.xp6(5),e.hij(" ",t.agentDetailDisplay.identifyId," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.identifyDateProvide," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.identifyPlaceProvide," "),e.xp6(2),e.Q6J("ngIf",!t.identifyToggle),e.xp6(1),e.Q6J("ngIf",t.identifyToggle)}}function qo(n,a){if(1&n&&(e.TgZ(0,"div",90)(1,"div",92)(2,"div",20),e._uU(3,"Domain key"),e.qZA(),e.TgZ(4,"div",70),e._uU(5),e.qZA()()()),2&n){const t=e.oxw(5);e.xp6(5),e.hij(" ",t.agentDetailDisplay.domainKey," ")}}function Po(n,a){if(1&n&&(e.TgZ(0,"div",82)(1,"div",25)(2,"div",20),e._uU(3,"Domain key"),e.qZA(),e.TgZ(4,"div",93),e._uU(5),e.qZA()()()),2&n){const t=e.oxw(5);e.xp6(5),e.hij(" ",t.agentDetailDisplay.domainKey," ")}}function Jo(n,a){if(1&n&&(e.TgZ(0,"div",81)(1,"div",66),e._UZ(2,"div",67),e.TgZ(3,"div",16),e._uU(4,"C\u1ea5u h\xecnh b\xean th\u1ee9 3"),e.qZA()(),e.YNc(5,qo,6,1,"div",84),e.YNc(6,Po,6,1,"div",85),e.qZA()),2&n){const t=e.oxw(4);e.xp6(5),e.Q6J("ngIf",t.agentDetailDisplay.business),e.xp6(1),e.Q6J("ngIf",!t.agentDetailDisplay.business)}}function So(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"div",66),e._UZ(3,"div",67),e.TgZ(4,"div",16),e._uU(5,"Th\xf4ng tin c\u01a1 b\u1ea3n"),e.qZA()(),e.TgZ(6,"div",68)(7,"div",69)(8,"div",25)(9,"div",20),e._uU(10,"M\xe3 \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(11,"div",70),e._uU(12),e.qZA()(),e.TgZ(13,"div",25)(14,"div",20),e._uU(15,"T\xean \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(16,"div",70),e._uU(17),e.qZA()(),e.TgZ(18,"div",25)(19,"div",20),e._uU(20,"H\u1ecd v\xe0 t\xean ng\u01b0\u1eddi \u0111\u1ea1i di\u1ec7n"),e.qZA(),e.TgZ(21,"div",70),e._uU(22),e.qZA()(),e.TgZ(23,"div",25)(24,"div",20),e._uU(25,"Ng\xe0y \u0111\u0103ng k\xed"),e.qZA(),e.TgZ(26,"div",70),e._uU(27),e.qZA()(),e.TgZ(28,"div",25)(29,"div",20),e._uU(30,"Email"),e.qZA(),e.TgZ(31,"div",70),e._uU(32),e.qZA()(),e.TgZ(33,"div",25)(34,"div",20),e._uU(35,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i"),e.qZA(),e.TgZ(36,"div",70),e._uU(37),e.qZA()()(),e.TgZ(38,"div",71)(39,"div",20),e._uU(40,"Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u"),e.qZA(),e.TgZ(41,"div",70),e._uU(42),e.qZA()(),e.TgZ(43,"div",71)(44,"div",20),e._uU(45,"Ghi ch\xfa b\u1ed5 sung"),e.qZA(),e._UZ(46,"textarea",72),e.qZA(),e.TgZ(47,"div",73)(48,"div",74),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.isExpand=!o.isExpand)}),e.TgZ(49,"div",75),e._UZ(50,"cf-icon",76),e.TgZ(51,"span"),e._uU(52,"Th\xf4ng tin b\u1ed5 sung"),e.qZA()(),e.TgZ(53,"div",77),e.YNc(54,Ao,1,0,"cf-icon",78),e.YNc(55,To,1,0,"cf-icon",79),e.qZA()(),e.YNc(56,Do,11,2,"div",80),e.qZA()()(),e.TgZ(57,"div",81)(58,"div",66),e._UZ(59,"div",67),e.TgZ(60,"div",16),e._uU(61,"Th\xf4ng tin chuy\u1ec3n kho\u1ea3n"),e.qZA()(),e.TgZ(62,"div",82)(63,"div",25)(64,"div",20),e._uU(65,"S\u1ed1 t\xe0i kho\u1ea3n ng\xe2n h\xe0ng"),e.qZA(),e.TgZ(66,"div",70),e._uU(67),e.qZA()(),e.TgZ(68,"div",25)(69,"div",20),e._uU(70,"Thu\u1ed9c ng\xe2n h\xe0ng"),e.qZA(),e.TgZ(71,"div",83),e._uU(72),e.qZA()(),e.TgZ(73,"div",25)(74,"div",20),e._uU(75,"H\u1ecd v\xe0 t\xean ch\u1ee7 t\xe0i kho\u1ea3n"),e.qZA(),e.TgZ(76,"div",70),e._uU(77),e.qZA()(),e.TgZ(78,"div",25)(79,"div",20),e._uU(80,"T\xean chi nh\xe1nh ng\xe2n h\xe0ng"),e.qZA(),e.TgZ(81,"div",70),e._uU(82),e.qZA()()()(),e.YNc(83,Zo,18,8,"div",62),e.TgZ(84,"div",81)(85,"div",66),e._UZ(86,"div",67),e.TgZ(87,"div",16),e._uU(88,"X\xe1c th\u1ef1c danh t\xednh"),e.qZA()(),e.YNc(89,Fo,17,3,"div",84),e.YNc(90,wo,21,5,"div",85),e.qZA(),e.YNc(91,Jo,7,2,"div",62),e.qZA()}if(2&n){const t=e.oxw(3);e.xp6(12),e.hij(" ",t.agentDetailDisplay.identify," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.agentName," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.representative," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.dateCreated," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.email," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.phone," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.belongSale," "),e.xp6(4),e.Q6J("disabled",!0)("value",t.agentDetailDisplay.note),e.xp6(8),e.Q6J("ngIf",t.isExpand),e.xp6(1),e.Q6J("ngIf",!t.isExpand),e.xp6(1),e.Q6J("ngIf",t.isExpand),e.xp6(11),e.hij(" ",t.agentDetailDisplay.bankAccount," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.bankFullName," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.nameOwnAccount," "),e.xp6(5),e.hij(" ",t.agentDetailDisplay.bankBranchName," "),e.xp6(1),e.Q6J("ngIf",t.canCreateAgentUser_AGENT2),e.xp6(6),e.Q6J("ngIf",t.agentDetailDisplay.business),e.xp6(1),e.Q6J("ngIf",!t.agentDetailDisplay.business),e.xp6(1),e.Q6J("ngIf",t.isAgent1)}}function Mo(n,a){if(1&n&&(e.TgZ(0,"div",81)(1,"div",66),e._UZ(2,"div",67),e.TgZ(3,"div",16),e._uU(4,"Booker ID"),e.qZA()(),e.TgZ(5,"div",90)(6,"div",92)(7,"div",20),e._uU(8,"Booker ID VNA"),e.qZA(),e.TgZ(9,"div",70),e._uU(10),e.qZA()()()()),2&n){const t=e.oxw(3);e.xp6(10),e.hij(" ",t.agentDetailDisplay.bookerId," ")}}function Qo(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",116),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("checked",!0)("disabled",!0),e.xp6(1),e.Oqu(t)}}function Bo(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",116),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit,i=e.oxw(4);e.xp6(1),e.Q6J("checked",i.listRoleId.includes(t.id))("disabled",!0),e.xp6(1),e.Oqu(t.name)}}function Yo(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div",108)(2,"div",109)(3,"div",110)(4,"div",111),e._uU(5," Quy\u1ec1n h\u1ea1n m\u1eb7c \u0111\u1ecbnh "),e.qZA(),e.TgZ(6,"div",112),e._uU(7," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c c\u1ea5p cho role \u0111\xf3, kh\xf4ng \u0111\u01b0\u1ee3c ph\xe9p thay \u0111\u1ed5i. "),e.qZA()(),e.TgZ(8,"div",113),e.YNc(9,Qo,3,3,"ng-container",114),e.qZA()(),e._UZ(10,"div",115),e.TgZ(11,"div",109)(12,"div",110)(13,"div",111),e._uU(14," Quy\u1ec1n h\u1ea1n n\xe2ng cao "),e.qZA(),e.TgZ(15,"div",112),e._uU(16," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c ch\u1ec9 \u0111\u1ecbnh c\u1ea5p th\xeam cho \u0111\u1ea1i l\xfd n\u1ebfu mu\u1ed1n. "),e.qZA()(),e.TgZ(17,"div",113),e.YNc(18,Bo,3,3,"ng-container",114),e.qZA()()()()),2&n){const t=e.oxw(3);e.xp6(9),e.Q6J("ngForOf",t.allRolesDefault),e.xp6(9),e.Q6J("ngForOf",t.allRolesAdvance)}}function Oo(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div",60),e.YNc(2,Eo,3,3,"div",61),e.YNc(3,yo,3,3,"div",61),e.qZA(),e.YNc(4,So,92,20,"div",1),e.YNc(5,Mo,11,1,"div",62),e.YNc(6,Yo,19,2,"div",1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("ngIf",t.isEditInfo),e.xp6(1),e.Q6J("ngIf",t.isEditPermission),e.xp6(1),e.Q6J("ngIf","BASIC_INFO"===t.viewMode),e.xp6(1),e.Q6J("ngIf",t.isAgent1||t.isSaleLead),e.xp6(1),e.Q6J("ngIf","TITLE_ROLE"===t.viewMode)}}function Ro(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",63),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("BASIC_INFO"))}),e._UZ(1,"cf-icon",64),e._uU(2," Th\xf4ng tin "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ee,"BASIC_INFO"===t.viewMode))}}function Lo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",63),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.onChangeMode("TITLE_ROLE"))}),e._UZ(1,"cf-icon",65),e._uU(2," Quy\u1ec1n h\u1ea1n "),e.qZA()}if(2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ee,"TITLE_ROLE"===t.viewMode))}}function zo(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.agentName)}}function Ko(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.minlength)}}function Ho(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.representative)}}function jo(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.minlength)}}function Go(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.email)}}function Vo(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.emailFormat)}}function Xo(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","S\u1ed1 \u0111i\u1ec7n tho\u1ea1i kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function $o(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","T\u1ed1i thi\u1ec3u 7 ch\u1eef s\u1ed1")}function Wo(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 11 ch\u1eef s\u1ed1")}function ea(n,a){1&n&&e._UZ(0,"cf-icon",86)}function ta(n,a){1&n&&e._UZ(0,"cf-icon",87)}function na(n,a){if(1&n&&(e.TgZ(0,"div",88)(1,"cf-input-group",118)(2,"label",128),e._uU(3," Facebook "),e.qZA(),e._UZ(4,"input",133),e.qZA(),e.TgZ(5,"cf-select",134)(6,"label",128)(7,"span"),e._uU(8,"K\xeanh gi\u1edbi thi\u1ec7u"),e.qZA()()()()),2&n){const t=e.oxw(4);e.xp6(1),e.Q6J("status","default"),e.xp6(3),e.Q6J("formControl",t.agentForm.controls.facebookContact),e.xp6(1),e.Q6J("status",t.agentForm.controls.referralChannel.invalid&&(t.agentForm.controls.referralChannel.dirty||t.agentForm.controls.referralChannel.touched)?"error":"default")("data",t.referralChannelData)("allowSearch",!1)("formControl",t.agentForm.controls.referralChannel)("allowSearch",!0)}}function ia(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.bankAccount)}}function oa(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","Ng\xe2n h\xe0ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function aa(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.nameOwnAccount)}}function ra(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(4);e.Q6J("hint",t.errorMessage.bankBranchName)}}function ca(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","Ch\u1ecdn lo\u1ea1i chi\u1ebft kh\u1ea5u nh\u1eadn")}function sa(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","M\u1ee9c \xe2m qu\u1ef9 t\u1ed1i \u0111a kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng")}function la(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",81)(1,"div",66),e._UZ(2,"div",67),e.TgZ(3,"div",16),e._uU(4,"Th\xf4ng tin c\xf4ng n\u1ee3"),e.qZA()(),e.TgZ(5,"div",135)(6,"div",136)(7,"cf-select",137)(8,"label",122),e._uU(9," Lo\u1ea1i chi\u1ebft kh\u1ea5u nh\u1eadn "),e.qZA(),e.YNc(10,ca,1,1,"cf-input-hint",120),e.qZA(),e.TgZ(11,"cf-input-group",138)(12,"label",122),e._uU(13," M\u1ee9c \xe2m qu\u1ef9 t\u1ed1i \u0111a "),e.qZA(),e.TgZ(14,"cf-input-number",139),e.NdJ("ngModelChange",function(){e.CHM(t);const o=e.oxw(4);return e.KtG(o.checkDirtyNumber("maxNegative"))}),e.qZA(),e.YNc(15,sa,1,1,"cf-input-hint",120),e.qZA()()()()}if(2&n){const t=e.oxw(4);e.xp6(7),e.Q6J("status",t.agentForm.controls.discountPaymentType.invalid&&(t.agentForm.controls.discountPaymentType.dirty||t.agentForm.controls.discountPaymentType.touched)?"error":"default")("data",t.paymentTypeOption)("allowSearch",!1)("formControl",t.agentForm.controls.discountPaymentType),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("ngIf",t.agentForm.controls.discountPaymentType.hasError("required")&&t.agentForm.controls.discountPaymentType.touched),e.xp6(1),e.Q6J("status",t.agentForm.controls.maxNegative.invalid&&(t.agentForm.controls.maxNegative.dirty||t.agentForm.controls.maxNegative.touched)?"error":"default"),e.xp6(1),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("placeholder","Nh\u1eadp m\u1ee9c \xe2m qu\u1ef9 t\u1ed1i \u0111a")("negative",!1)("formControl",t.agentForm.controls.maxNegative),e.xp6(1),e.Q6J("ngIf",(null==t.agentForm.controls.maxNegative.errors?null:t.agentForm.controls.maxNegative.errors.required)&&(t.agentForm.controls.maxNegative.dirty||t.agentForm.controls.maxNegative.touched))}}function ua(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.companyCode)}}function da(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.companyName)}}function _a(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.minlength)}}function pa(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.companyAddress)}}function ga(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.minlength)}}function ha(n,a){if(1&n&&(e.TgZ(0,"div",90)(1,"div",91)(2,"div",92)(3,"div",117),e._uU(4,"M\xe3 s\u1ed1 thu\u1ebf doanh nghi\u1ec7p"),e.qZA(),e.TgZ(5,"cf-input-group",118),e._UZ(6,"input",119),e.YNc(7,ua,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(8,"div",92)(9,"div",117),e._uU(10,"T\xean doanh nghi\u1ec7p"),e.qZA(),e.TgZ(11,"cf-input-group",118),e._UZ(12,"input",119),e.YNc(13,da,1,1,"cf-input-hint",120),e.YNc(14,_a,1,1,"cf-input-hint",120),e.qZA()()(),e.TgZ(15,"div",25)(16,"div",117),e._uU(17,"\u0110\u1ecba ch\u1ec9"),e.qZA(),e.TgZ(18,"cf-input-group",118),e._UZ(19,"input",119),e.YNc(20,pa,1,1,"cf-input-hint",120),e.YNc(21,ga,1,1,"cf-input-hint",120),e.qZA()()()),2&n){const t=e.oxw(4);e.xp6(3),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.companyCode.invalid&&(t.agentForm.controls.companyCode.dirty||t.agentForm.controls.companyCode.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.companyCode),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.companyCode.hasError("required")&&(t.agentForm.controls.companyCode.dirty||t.agentForm.controls.companyCode.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.companyName.invalid&&(t.agentForm.controls.companyName.dirty||t.agentForm.controls.companyName.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.companyName),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.companyName.hasError("required")&&(t.agentForm.controls.companyName.dirty||t.agentForm.controls.companyName.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.companyName.hasError("minlength")&&(t.agentForm.controls.companyName.dirty||t.agentForm.controls.companyName.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.companyAddress.invalid&&(t.agentForm.controls.companyAddress.dirty||t.agentForm.controls.companyAddress.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.companyAddress),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.companyAddress.hasError("required")&&(t.agentForm.controls.companyAddress.dirty||t.agentForm.controls.companyAddress.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.companyAddress.hasError("minlength")&&(t.agentForm.controls.companyAddress.dirty||t.agentForm.controls.companyAddress.touched))}}function ma(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.cccd)}}function fa(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.minlengthCCCD)}}function va(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","T\u1ed1i \u0111a 12 ch\u1eef s\u1ed1")}function Ca(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","Ch\u01b0a ch\u1ecdn ng\xe0y c\u1ea5p CCCD/CMND")}function xa(n,a){1&n&&e._UZ(0,"cf-input-hint",132),2&n&&e.Q6J("hint","Ng\xe0y ph\u1ea3i theo \u0111\u1ecbnh d\u1ea1ng dd/MM/yyyy")}function Ea(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.identifyPlaceProvide)}}function ya(n,a){1&n&&(e.TgZ(0,"div",151),e._UZ(1,"cf-icon",152),e._uU(2," M\u1eb7t tr\u01b0\u1edbc "),e.qZA())}function Aa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",153),e.NdJ("click",function(o){e.CHM(t);const r=e.oxw(5);return e.KtG(r.closeButtonCCCDFont(o))}),e._UZ(1,"cf-icon",154),e.qZA()}}function Ta(n,a){1&n&&(e.TgZ(0,"div",151),e._UZ(1,"cf-icon",152),e._uU(2," M\u1eb7t sau "),e.qZA())}function Da(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",153),e.NdJ("click",function(o){e.CHM(t);const r=e.oxw(5);return e.KtG(r.closeButtonCCCDBack(o))}),e._UZ(1,"cf-icon",154),e.qZA()}}function Za(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",90)(1,"div",91)(2,"div",92)(3,"div",117),e._uU(4,"S\u1ed1 CCCD/CMND"),e.qZA(),e.TgZ(5,"cf-input-group",118),e._UZ(6,"input",140),e.YNc(7,ma,1,1,"cf-input-hint",120),e.YNc(8,fa,1,1,"cf-input-hint",120),e.YNc(9,va,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(10,"div",92)(11,"div",117),e._uU(12,"Ng\xe0y c\u1ea5p"),e.qZA(),e.TgZ(13,"cf-input-group",118)(14,"input",141,142),e.NdJ("input",function(){e.CHM(t);const o=e.MAs(15);return e.KtG(o.close())})("dateSelect",function(){e.CHM(t);const o=e.MAs(15);return e.KtG(o.close())}),e.qZA(),e.YNc(16,Ca,1,1,"cf-input-hint",120),e.YNc(17,xa,1,1,"cf-input-hint",120),e.qZA()()(),e.TgZ(18,"div",25)(19,"div",117),e._uU(20,"N\u01a1i c\u1ea5p"),e.qZA(),e.TgZ(21,"cf-input-group",118),e._UZ(22,"input",143),e.YNc(23,Ea,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(24,"div",144),e._uU(25,"Upload \u1ea3nh ch\u1ee5p CCCD/CMND"),e.qZA(),e.TgZ(26,"div",18)(27,"div",145),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(31);return e.KtG(o.click())}),e.YNc(28,ya,3,0,"div",146),e.YNc(29,Aa,2,0,"div",147),e.qZA(),e.TgZ(30,"input",148,149),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw(4);return e.KtG(r.uploadCCCDFont(o))}),e.qZA(),e.TgZ(32,"div",145),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(36);return e.KtG(o.click())}),e.YNc(33,Ta,3,0,"div",146),e.YNc(34,Da,2,0,"div",147),e.qZA(),e.TgZ(35,"input",148,150),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw(4);return e.KtG(r.uploadCCCDBack(o))}),e.qZA()()()}if(2&n){const t=e.oxw(4);e.xp6(3),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.identifyId.invalid&&(t.agentForm.controls.identifyId.dirty||t.agentForm.controls.identifyId.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.identifyId),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.identifyId.hasError("required")&&(t.agentForm.controls.identifyId.dirty||t.agentForm.controls.identifyId.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.identifyId.hasError("minlength")&&(t.agentForm.controls.identifyId.dirty||t.agentForm.controls.identifyId.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.identifyId.hasError("maxlength")&&(t.agentForm.controls.identifyId.dirty||t.agentForm.controls.identifyId.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.identifyDateProvide.invalid&&(t.agentForm.controls.identifyDateProvide.dirty||t.agentForm.controls.identifyDateProvide.touched)?"error":"default"),e.xp6(1),e.Q6J("displayMonths",1)("maxDate",t.currentDate)("formControl",t.agentForm.controls.identifyDateProvide),e.xp6(2),e.Q6J("ngIf",(null==t.agentForm.controls.identifyDateProvide.errors?null:t.agentForm.controls.identifyDateProvide.errors.required)&&(t.agentForm.controls.identifyDateProvide.dirty||t.agentForm.controls.identifyDateProvide.touched)),e.xp6(1),e.Q6J("ngIf",(null==t.agentForm.controls.identifyDateProvide.errors||null==t.agentForm.controls.identifyDateProvide.errors.ngbDate?null:t.agentForm.controls.identifyDateProvide.errors.ngbDate.invalid)&&(t.agentForm.controls.identifyDateProvide.dirty||t.agentForm.controls.identifyDateProvide.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.identifyPlaceProvide.invalid&&(t.agentForm.controls.identifyPlaceProvide.dirty||t.agentForm.controls.identifyPlaceProvide.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.identifyPlaceProvide),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.identifyPlaceProvide.hasError("required")&&(t.agentForm.controls.identifyPlaceProvide.dirty||t.agentForm.controls.identifyPlaceProvide.touched)),e.xp6(4),e.Jzz("background-image: url(",t.previewCCCDFont,");"),e.ekj("w-[238px]",t.previewCCCDFont),e.xp6(1),e.Q6J("ngIf",!t.previewCCCDFont),e.xp6(1),e.Q6J("ngIf",t.previewCCCDFont),e.xp6(3),e.Jzz("background-image: url(",t.previewCCCDBack,");"),e.ekj("w-[238px]",t.previewCCCDBack),e.xp6(1),e.Q6J("ngIf",!t.previewCCCDBack),e.xp6(1),e.Q6J("ngIf",t.previewCCCDBack)}}function Fa(n,a){if(1&n&&(e.TgZ(0,"div",90)(1,"div",92)(2,"div",20),e._uU(3,"Domain key"),e.qZA(),e.TgZ(4,"cf-input-group",155),e._UZ(5,"input",156),e.qZA()()()),2&n){const t=e.oxw(5);e.xp6(5),e.Q6J("formControl",t.agentForm.controls.domainKey)}}function ba(n,a){if(1&n&&(e.TgZ(0,"div",90)(1,"div",92)(2,"div",20),e._uU(3,"Domain key"),e.qZA(),e.TgZ(4,"cf-input-group",155),e._UZ(5,"input",156),e.qZA()()()),2&n){const t=e.oxw(5);e.xp6(5),e.Q6J("formControl",t.agentForm.controls.domainKey)}}function ka(n,a){if(1&n&&(e.TgZ(0,"div",81)(1,"div",66),e._UZ(2,"div",67),e.TgZ(3,"div",16),e._uU(4,"C\u1ea5u h\xecnh b\xean th\u1ee9 3"),e.qZA()(),e.YNc(5,Fa,6,1,"div",84),e.YNc(6,ba,6,1,"div",84),e.qZA()),2&n){const t=e.oxw(4);e.xp6(5),e.Q6J("ngIf",t.agentDetailDisplay.business),e.xp6(1),e.Q6J("ngIf",!t.agentDetailDisplay.business)}}function Ia(n,a){if(1&n&&e._UZ(0,"cf-input-hint",132),2&n){const t=e.oxw(5);e.Q6J("hint",t.errorMessage.maxlengthBookerID)}}function Ua(n,a){if(1&n&&(e.TgZ(0,"div",81)(1,"div",66),e._UZ(2,"div",67),e.TgZ(3,"div",16),e._uU(4,"Booker ID"),e.qZA()(),e.TgZ(5,"div",90)(6,"div",92)(7,"div",20),e._uU(8,"Booker ID VNA"),e.qZA(),e.TgZ(9,"cf-input-group",118),e._UZ(10,"input",157),e.YNc(11,Ia,1,1,"cf-input-hint",120),e.qZA()()()()),2&n){const t=e.oxw(4);e.xp6(9),e.Q6J("status",t.agentForm.controls.bookerId.invalid&&(t.agentForm.controls.bookerId.dirty||t.agentForm.controls.bookerId.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.bookerId),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.bookerId.hasError("maxlength")&&(t.agentForm.controls.bookerId.dirty||t.agentForm.controls.bookerId.touched))}}function Na(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div")(2,"div",66),e._UZ(3,"div",67),e.TgZ(4,"div",16),e._uU(5,"Th\xf4ng tin c\u01a1 b\u1ea3n"),e.qZA()(),e.TgZ(6,"div",68)(7,"div",69)(8,"div",25)(9,"div",20),e._uU(10,"M\xe3 \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(11,"div",70),e._uU(12),e.qZA()(),e.TgZ(13,"div",25)(14,"div",117),e._uU(15,"T\xean \u0111\u1ea1i l\xfd"),e.qZA(),e.TgZ(16,"cf-input-group",118),e._UZ(17,"input",119),e.YNc(18,zo,1,1,"cf-input-hint",120),e.YNc(19,Ko,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(20,"div",25)(21,"div",117),e._uU(22,"T\xean H\u1ecd v\xe0 t\xean ng\u01b0\u1eddi \u0111\u1ea1i di\u1ec7n"),e.qZA(),e.TgZ(23,"cf-input-group",118),e._UZ(24,"input",119),e.YNc(25,Ho,1,1,"cf-input-hint",120),e.YNc(26,jo,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(27,"div",25)(28,"div",20),e._uU(29,"Ng\xe0y \u0111\u0103ng k\xed"),e.qZA(),e.TgZ(30,"div",70),e._uU(31),e.qZA()(),e.TgZ(32,"div",25)(33,"div",117),e._uU(34,"Email"),e.qZA(),e.TgZ(35,"cf-input-group",118),e._UZ(36,"input",119),e.YNc(37,Go,1,1,"cf-input-hint",120),e.YNc(38,Vo,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(39,"div")(40,"div",121)(41,"label",122),e._uU(42," S\u1ed1 \u0111i\u1ec7n tho\u1ea1i "),e.qZA()(),e.TgZ(43,"cf-select",123)(44,"div",124),e._UZ(45,"input",125),e.qZA(),e.YNc(46,Xo,1,1,"cf-input-hint",120),e.YNc(47,$o,1,1,"cf-input-hint",120),e.YNc(48,Wo,1,1,"cf-input-hint",120),e.qZA()()(),e.TgZ(49,"div",126)(50,"cf-select",127)(51,"label",128)(52,"span"),e._uU(53,"Ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u"),e.qZA()()()(),e.TgZ(54,"div",71)(55,"div",20),e._uU(56,"Ghi ch\xfa b\u1ed5 sung"),e.qZA(),e._UZ(57,"textarea",129),e.qZA(),e.TgZ(58,"div",73)(59,"div",74),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.isExpand=!o.isExpand)}),e.TgZ(60,"div",75),e._UZ(61,"cf-icon",76),e.TgZ(62,"span"),e._uU(63,"Th\xf4ng tin b\u1ed5 sung"),e.qZA()(),e.TgZ(64,"div",77),e.YNc(65,ea,1,0,"cf-icon",78),e.YNc(66,ta,1,0,"cf-icon",79),e.qZA()(),e.YNc(67,na,9,7,"div",80),e.qZA()()(),e.TgZ(68,"div",81)(69,"div",66),e._UZ(70,"div",67),e.TgZ(71,"div",16),e._uU(72,"Th\xf4ng tin chuy\u1ec3n kho\u1ea3n"),e.qZA()(),e.TgZ(73,"div",82)(74,"div",25)(75,"div",117),e._uU(76,"S\u1ed1 t\xe0i kho\u1ea3n ng\xe2n h\xe0ng"),e.qZA(),e.TgZ(77,"cf-input-group",118),e._UZ(78,"input",130),e.YNc(79,ia,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(80,"div",25)(81,"div",117),e._uU(82,"Thu\u1ed9c ng\xe2n h\xe0ng"),e.qZA(),e.TgZ(83,"cf-select",131),e.YNc(84,oa,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(85,"div",25)(86,"div",117),e._uU(87,"H\u1ecd v\xe0 t\xean ch\u1ee7 t\xe0i kho\u1ea3n"),e.qZA(),e.TgZ(88,"cf-input-group",118),e._UZ(89,"input",119),e.YNc(90,aa,1,1,"cf-input-hint",120),e.qZA()(),e.TgZ(91,"div",25)(92,"div",117),e._uU(93,"T\xean chi nh\xe1nh ng\xe2n h\xe0ng"),e.qZA(),e.TgZ(94,"cf-input-group",118),e._UZ(95,"input",119),e.YNc(96,ra,1,1,"cf-input-hint",120),e.qZA()()()(),e.YNc(97,la,16,12,"div",62),e.TgZ(98,"div",81)(99,"div",66),e._UZ(100,"div",67),e.TgZ(101,"div",16),e._uU(102,"X\xe1c th\u1ef1c danh t\xednh"),e.qZA()(),e.YNc(103,ha,22,14,"div",84),e.YNc(104,Za,37,31,"div",84),e.qZA(),e.YNc(105,ka,7,2,"div",62),e.YNc(106,Ua,12,3,"div",62),e.qZA()}if(2&n){const t=e.oxw(3);e.xp6(12),e.hij(" ",t.agentDetailDisplay.identify," "),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.agentName.invalid&&(t.agentForm.controls.agentName.dirty||t.agentForm.controls.agentName.touched)?"error":"default")("status","default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.agentName),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.agentName.hasError("required")&&(t.agentForm.controls.agentName.dirty||t.agentForm.controls.agentName.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.agentName.hasError("minlength")&&(t.agentForm.controls.agentName.dirty||t.agentForm.controls.agentName.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.representative.invalid&&(t.agentForm.controls.representative.dirty||t.agentForm.controls.representative.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.representative),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.representative.hasError("required")&&(t.agentForm.controls.representative.dirty||t.agentForm.controls.representative.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.representative.hasError("minlength")&&(t.agentForm.controls.representative.dirty||t.agentForm.controls.representative.touched)),e.xp6(5),e.hij(" ",t.agentDetailDisplay.dateCreated," "),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.email.invalid&&(t.agentForm.controls.email.dirty||t.agentForm.controls.email.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.email),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.email.hasError("required")&&(t.agentForm.controls.email.dirty||t.agentForm.controls.email.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.email.hasError("email")&&(t.agentForm.controls.email.dirty||t.agentForm.controls.email.touched)),e.xp6(3),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.phone.invalid&&(t.agentForm.controls.phone.dirty||t.agentForm.controls.phone.touched)?"error":"default")("data",t.optionsAreaCode)("formControl",t.agentForm.controls.phoneArea),e.xp6(2),e.Q6J("formControl",t.agentForm.controls.phone),e.xp6(1),e.Q6J("ngIf",(null==t.agentForm.controls.phone.errors?null:t.agentForm.controls.phone.errors.required)&&(t.agentForm.controls.phone.dirty||t.agentForm.controls.phone.touched)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.phone.hasError("minlength")&&(t.agentForm.controls.phone.touched||t.agentForm.controls.phone.dirty)),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.phone.hasError("maxlength")&&(t.agentForm.controls.phone.touched||t.agentForm.controls.phone.dirty)),e.xp6(2),e.Q6J("status",t.agentForm.controls.belongSale.invalid&&(t.agentForm.controls.belongSale.dirty||t.agentForm.controls.belongSale.touched)?"error":"default")("data",t.belongSaleOption)("allowSearch",!1)("formControl",t.agentForm.controls.belongSale)("allowSearch",!0),e.xp6(7),e.Q6J("formControl",t.agentForm.controls.note),e.xp6(8),e.Q6J("ngIf",t.isExpand),e.xp6(1),e.Q6J("ngIf",!t.isExpand),e.xp6(1),e.Q6J("ngIf",t.isExpand),e.xp6(8),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.bankAccount.invalid&&(t.agentForm.controls.bankAccount.dirty||t.agentForm.controls.bankAccount.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.bankAccount),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.bankAccount.hasError("required")&&(t.agentForm.controls.bankAccount.dirty||t.agentForm.controls.bankAccount.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.bankName.invalid&&(t.agentForm.controls.bankName.dirty||t.agentForm.controls.bankName.touched)?"error":"default")("data",t.bankData)("formControl",t.agentForm.controls.bankName)("allowSearch",!0),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.bankName.hasError("required")&&t.agentForm.controls.bankName.touched),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.nameOwnAccount.invalid&&(t.agentForm.controls.nameOwnAccount.dirty||t.agentForm.controls.nameOwnAccount.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.nameOwnAccount),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.nameOwnAccount.hasError("required")&&(t.agentForm.controls.nameOwnAccount.dirty||t.agentForm.controls.nameOwnAccount.touched)),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("status",t.agentForm.controls.bankBranchName.invalid&&(t.agentForm.controls.bankBranchName.dirty||t.agentForm.controls.bankBranchName.touched)?"error":"default"),e.xp6(1),e.Q6J("formControl",t.agentForm.controls.bankBranchName),e.xp6(1),e.Q6J("ngIf",t.agentForm.controls.bankBranchName.hasError("required")&&(t.agentForm.controls.bankBranchName.dirty||t.agentForm.controls.bankBranchName.touched)),e.xp6(1),e.Q6J("ngIf",t.canCreateAgentUser_AGENT2),e.xp6(6),e.Q6J("ngIf",t.agentDetailDisplay.business),e.xp6(1),e.Q6J("ngIf",!t.agentDetailDisplay.business),e.xp6(1),e.Q6J("ngIf",t.isAgent1),e.xp6(1),e.Q6J("ngIf",t.isAgent1||t.isSaleLead)}}function wa(n,a){1&n&&e._UZ(0,"div",115)}function qa(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"cf-switch",116),e._uU(2),e.qZA(),e.BQk()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("checked",!0)("disabled",!0),e.xp6(1),e.Oqu(t)}}function Pa(n,a){if(1&n&&(e.TgZ(0,"div",109)(1,"div",110)(2,"div",111),e._uU(3," Quy\u1ec1n h\u1ea1n m\u1eb7c \u0111\u1ecbnh "),e.qZA(),e.TgZ(4,"div",112),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c c\u1ea5p cho role \u0111\xf3, kh\xf4ng \u0111\u01b0\u1ee3c ph\xe9p thay \u0111\u1ed5i. "),e.qZA()(),e.TgZ(6,"div",113),e.YNc(7,qa,3,3,"ng-container",114),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(7),e.Q6J("ngForOf",t.allRolesDefault)}}function Ja(n,a){1&n&&e._UZ(0,"div",115)}function Sa(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"cf-switch",162),e.NdJ("checkedChange",function(){const r=e.CHM(t).$implicit,c=e.oxw(5);return e.KtG(c.onCheckRoleChange(r))}),e._uU(2),e.qZA(),e.BQk()}if(2&n){const t=a.$implicit,i=e.oxw(5);e.xp6(1),e.Q6J("checked",i.listRoleId.includes(t.id)),e.xp6(1),e.Oqu(t.name)}}function Ma(n,a){if(1&n&&(e.TgZ(0,"div",109)(1,"div",110)(2,"div",111),e._uU(3," Quy\u1ec1n h\u1ea1n n\xe2ng cao "),e.qZA(),e.TgZ(4,"div",112),e._uU(5," L\xe0 nh\u1eefng quy\u1ec1n h\u1ea1n \u0111\u01b0\u1ee3c ch\u1ec9 \u0111\u1ecbnh c\u1ea5p th\xeam cho \u0111\u1ea1i l\xfd n\u1ebfu mu\u1ed1n. "),e.qZA()(),e.TgZ(6,"div",113),e.YNc(7,Sa,3,2,"ng-container",114),e.qZA()()),2&n){const t=e.oxw(4);e.xp6(7),e.Q6J("ngForOf",t.allRolesAdvance)}}const Qa=function(){return[]};function Ba(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",108)(2,"cf-select",158),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(3);return e.KtG(r.agentDetail.titleId=o)})("selectedChange",function(o){e.CHM(t);const r=e.oxw(3);return e.KtG(r.getPermissionByRole(o))}),e.TgZ(3,"label",128)(4,"span",159),e._uU(5,"Ch\u1ee9c danh"),e.qZA()()(),e.YNc(6,wa,1,0,"div",160),e.YNc(7,Pa,8,1,"div",161),e.YNc(8,Ja,1,0,"div",160),e.YNc(9,Ma,8,1,"div",161),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(2),e.Q6J("status","default")("data",t.roleOtions||e.DdM(10,Qa))("ngModel",t.agentDetail.titleId)("allowSearch",!1)("allowSearch",!0),e.xp6(2),e.Q6J("CfRequired",!0),e.xp6(2),e.Q6J("ngIf",t.allRolesDefault.length),e.xp6(1),e.Q6J("ngIf",t.allRolesDefault.length),e.xp6(1),e.Q6J("ngIf",t.allRolesAdvance.length),e.xp6(1),e.Q6J("ngIf",t.allRolesAdvance.length)}}function Ya(n,a){if(1&n&&(e.TgZ(0,"div")(1,"div",60),e.YNc(2,Ro,3,3,"div",61),e.YNc(3,Lo,3,3,"div",61),e.qZA(),e.YNc(4,Na,107,58,"div",1),e.YNc(5,Ba,10,11,"div",1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("ngIf",t.isEditInfo),e.xp6(1),e.Q6J("ngIf",t.isEditPermission),e.xp6(1),e.Q6J("ngIf","BASIC_INFO"===t.viewMode),e.xp6(1),e.Q6J("ngIf","TITLE_ROLE"===t.viewMode)}}function Oa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"div")(4,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onBackToList())}),e._UZ(5,"cf-icon",6),e._uU(6," Quay l\u1ea1i t\xecm ki\u1ebfm "),e.qZA()(),e.YNc(7,uo,9,4,"div",7),e.YNc(8,go,7,2,"div",7),e.qZA(),e.TgZ(9,"div",8)(10,"div",4)(11,"div",9)(12,"div",10),e._UZ(13,"img",11),e.YNc(14,ho,2,0,"div",12),e.TgZ(15,"input",13,14),e.NdJ("change",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.uploadAvatar(o))}),e.qZA()(),e.TgZ(17,"div",15)(18,"div",16),e._uU(19),e.qZA(),e.TgZ(20,"div",17),e._uU(21),e.qZA()()(),e.TgZ(22,"div",18)(23,"div",19)(24,"div",20),e._uU(25,"Ch\u1ee9c danh"),e.qZA(),e.TgZ(26,"cf-label",21),e._uU(27),e.qZA()(),e.TgZ(28,"div",19)(29,"div",20),e._uU(30,"Tr\u1ea1ng th\xe1i"),e.qZA(),e.YNc(31,mo,1,3,"cf-select",22),e.YNc(32,xo,4,3,"ng-template",null,23,e.W1O),e.qZA()()(),e.TgZ(34,"div",24)(35,"div",25)(36,"div",20),e._uU(37,"S\u1ed1 d\u01b0 c\xf4ng n\u1ee3"),e.qZA(),e.TgZ(38,"div",26),e._UZ(39,"span",27),e._uU(40),e.ALo(41,"replace"),e.ALo(42,"number"),e.TgZ(43,"span",28),e._uU(44,"\u0111"),e.qZA()()()()(),e.YNc(45,Oo,7,5,"div",1),e.YNc(46,Ya,6,4,"div",1),e.qZA()()}if(2&n){const t=e.MAs(33),i=e.oxw();e.xp6(7),e.Q6J("ngIf",!i.isEdit),e.xp6(1),e.Q6J("ngIf",i.isEdit),e.xp6(5),e.Q6J("src",i.previewAvatar||"https://cheapflighttest.s3.ap-southeast-1.amazonaws.com/avarta-default.jpg",e.LSH),e.xp6(1),e.Q6J("ngIf",i.isEdit),e.xp6(5),e.Oqu(i.agentDetailDisplay.agentName),e.xp6(2),e.Oqu(i.agentDetailDisplay.identify),e.xp6(5),e.Q6J("color",i.titleColor),e.xp6(1),e.Oqu(i.agentDetailDisplay.titleName),e.xp6(4),e.Q6J("ngIf",i.canEditStatus&&i.isEdit&&"INACTIVE"!==i.agentDetailDisplay.state)("ngIfElse",t),e.xp6(9),e.hij("",e.Dn7(41,13,e.lcZ(42,17,i.agentDetailDisplay.balance||0),",",".")," "),e.xp6(5),e.Q6J("ngIf",!i.isEdit),e.xp6(1),e.Q6J("ngIf",i.isEdit)}}function Ra(n,a){1&n&&e._UZ(0,"cf-spinner")}let La=(()=>{class n{constructor(t,i,o,r,c,u,h,m,T,v,x,y,A,F){this.calendar=t,this.activedRoute=o,this._modal=r,this._fb=c,this._userService=u,this._toastService=h,this._permissionService=m,this._route=T,this._phoneDataService=v,this._bankDataService=x,this._router=y,this._accountVerifyService=A,this._mobileDetectService=F,this.isEdit=!1,this.identifyToggle=!1,this.isCccdFontDirty=!1,this.isCccdBackDirty=!1,this.isAvatarDirty=!1,this.TIME_VERIFY_PREFIX="time_verify_",this.errorMessage={agentName:"T\xean \u0111\u1ea1i l\xfd kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",representative:"T\xean ng\u01b0\u1eddi \u0111\u1ea1i di\u1ec7n kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",email:"Email kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",emailFormat:"\u0110\u1ecbnh d\u1ea1ng kh\xf4ng h\u1ee3p l\u1ec7",phone:"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",dateCreated:"Ng\xe0y \u0111\u0103ng k\xed kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",bankAccount:"T\xe0i kho\u1ea3n ng\xe2n h\xe0ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",bankName:"T\xean ng\xe2n h\xe0ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",nameOwnAccount:"H\u1ecd v\xe0 t\xean ch\u1ee7 t\xe0i kho\u1ea3n kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",bankBranchName:"Chi nh\xe1nh ng\xe2n h\xe0ng kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",identifyId:"S\u1ed1 CCCD/CMND kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",identifyDateProvide:"Ng\xe0y c\u1ea5p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",identifyPlaceProvide:"N\u01a1i c\u1ea5p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",companyCode:"M\xe3 s\u1ed1 thu\u1ebf kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",companyName:"T\xean doanh nghi\u1ec7p kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",companyAddress:"\u0110\u1ecba ch\u1ec9 kh\xf4ng \u0111\u01b0\u1ee3c \u0111\u1ec3 tr\u1ed1ng",minlength:"T\u1ed1i thi\u1ec3u 2 k\xed t\u1ef1",minlengthCCCD:"T\u1ed1i thi\u1ec3u 6 ch\u1eef s\u1ed1",maxlengthBookerID:"T\u1ed1i \u0111a 20 k\xed t\u1ef1",maxlength:"T\u1ed1i \u0111a 11 ch\u1eef s\u1ed1"},this.viewMode="BASIC_INFO",this.allRolesAdvance=[],this.allRolesDefault=[],this.statusOptions=[{code:"ACTIVE",name:"Ho\u1ea1t \u0111\u1ed9ng"},{code:"BLOCK",name:"Ng\u01b0ng ho\u1ea1t \u0111\u1ed9ng"}],this.roleOtions=[],this.bankData=[],this.listRoleId=[],this.paymentTypeOption=[{value:"PAYMENT_NOW",text:"Chi\u1ebft kh\u1ea5u tr\u1ea3 ngay"},{value:"PAYMENT_LATER",text:"Chi\u1ebft kh\u1ea5u tr\u1ea3 sau"}],this.isEditInfo=this._permissionService.hasPermission(g.or.UpdateAgentInfo)||this._permissionService.hasPermission(g.or.UpdateAgentInfoForSale),this.isEditPermission=this._permissionService.hasPermission(g.or.UpdateAgentPermission)||this._permissionService.hasPermission(g.or.UpdateAgentPermissionForSale),this.canDetele=this._permissionService.hasPermission(g.or.DeleteAgent),this.canCreateAgentUser_AGENT2=this._permissionService.hasPermission(g.or.CreateAgentUser_AGENT2),this.isTopUpVirtualBalance=this._permissionService.hasPermission(g.or.CanTopUpVirtualBalance)&&!this._mobileDetectService.isMobile(),this.canEditStatus=this._permissionService.hasPermission(g.or.CanEditAgentStatus),this.isOpen=!1,this.bottomCenter=[{originX:"start",originY:"bottom",overlayX:"center",overlayY:"top",offsetX:0,offsetY:0}],this.optionsAreaCode=[],this.isLoading=!1,this.isExpand=!1,this.isAgent1=!1,this.isSaleLead=!1,this.belongSaleOption=[],this.referralChannelData=[{code:"DIRECT",name:"Tr\u1ef1c ti\u1ebfp"},{code:"LANDING_PAGE",name:"Landing Page"},{code:"SOCIAL_MEDIA",name:"M\u1ea1ng x\xe3 h\u1ed9i"},{code:"MARKETING",name:"Ch\u01b0\u01a1ng tr\xecnh Marketing"}],this.verifyCount=0,this.currentDate=t.getToday(),this.isAgent1=this._permissionService.isAgent1(),this.isSaleLead=this._permissionService.isSaleLead(),i.registerIcons([l.B2I,l.rks,l.PcQ,l.whL,l.Hge,l.P5K,l.KYu,l.Rq_,l.kTb,l.HTW,l.oFb,l.bLw,l.MwJ,l.UNF,l.BbA,l.hTA,l.$f3,l.S7Q,l.TM4,l.RxK,l.DcL,l.PcQ]),this.userId=o.snapshot.params.id,this.titleColor=history.state.titleColor,this.isEditPermission&&(this.viewMode="TITLE_ROLE"),this.isEditInfo&&(this.viewMode="BASIC_INFO")}ngOnInit(){this.optionsAreaCode=this._phoneDataService.optionsAreaCode,this.bankData=this._bankDataService.getBankOption(),this.initFormGroup(),this.loadBelongSale(),this.userId&&this.loadAgentDetail()}initFormGroup(){this.agentForm=this._fb.group({avatar:[""],agentName:["",[s.kI.required,s.kI.minLength(2)]],representative:["",[s.kI.required,s.kI.minLength(2)]],email:["",[s.kI.required,s.kI.email]],phone:["",[s.kI.required,s.kI.minLength(7),s.kI.maxLength(11)]],phoneArea:["",s.kI.required],bankAccount:["",s.kI.required],nameOwnAccount:["",s.kI.required],bankName:["",s.kI.required],bankBranchName:["",s.kI.required],belongSale:[""],facebookContact:[""],referralChannel:[""],note:[""],domainKey:[""],identifyId:["",[s.kI.required,s.kI.minLength(6),s.kI.maxLength(12)]],identifyDateProvide:["",s.kI.required],identifyPlaceProvide:["",s.kI.required],frontImageIdentify:["",s.kI.required],backImageIdentify:["",s.kI.required],companyCode:["",s.kI.required],companyName:["",[s.kI.required,s.kI.minLength(2)]],companyAddress:["",[s.kI.required,s.kI.minLength(2)]],bookerId:["",[s.kI.maxLength(20)]]}),this.canCreateAgentUser_AGENT2&&(this.agentForm.addControl("maxNegative",this._fb.control(0,[s.kI.required])),this.agentForm.addControl("discountPaymentType",this._fb.control("",[s.kI.required])))}loadAgentDetail(){const t={userID:this.userId};this.isLoading=!0,this._userService.getAgentDetail(t).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:i=>{var o,r,c,u,h,m,T,v,x,y;if(i.success){this.titleId=i.data.titleId,this.agentDetail=i.data,this.agentDetail.titlesCanChange.push({id:i.data.titleId,name:i.data.titleName,defaultPermissions:i.data.defaultPermission,advanceRoles:i.data.advanceRole}),this.agentDetailDisplay=Object.assign(Object.assign({},i.data),{bankFullName:this._bankDataService.getBankName(i.data.bankName),dateCreated:i.data.dateCreated?P(1e3*i.data.dateCreated).format("DD/MM/YYYY"):"",identifyDateProvide:i.data.identifyDateProvide?P(1e3*i.data.identifyDateProvide).format("DD/MM/YYYY"):"",belongSale:i.data.belongSaleInfo?`${null===(o=i.data.belongSaleInfo)||void 0===o?void 0:o.userName} - ${null===(r=i.data.belongSaleInfo)||void 0===r?void 0:r.displayName} (${null===(c=i.data.belongSaleInfo)||void 0===c?void 0:c.titleName})`:"",referralChannelDisplay:this.getReferralChannel(i.data.referralChannel)}),this.listRoleId=i.data.roleIds||[],this.previewAvatar=`${i.data.avatarUrl}?${(new Date).getTime()}`;const A={avatar:this.agentDetailDisplay.avatar,agentName:this.agentDetailDisplay.agentName,representative:this.agentDetailDisplay.representative,email:this.agentDetailDisplay.email,phone:null===(u=this.agentDetailDisplay.phone)||void 0===u?void 0:u.trim(),phoneArea:this.agentDetailDisplay.phoneArea,bankAccount:null===(h=this.agentDetailDisplay.bankAccount)||void 0===h?void 0:h.trim(),nameOwnAccount:this.agentDetailDisplay.nameOwnAccount,bankName:this.agentDetailDisplay.bankName,bankBranchName:this.agentDetailDisplay.bankBranchName,discountPaymentType:(null===(m=this.agentDetailDisplay)||void 0===m?void 0:m.discountPaymentType)||"",maxNegative:(null===(T=this.agentDetailDisplay)||void 0===T?void 0:T.maxNegative)||0,identifyId:null===(v=i.data.identifyId)||void 0===v?void 0:v.trim(),identifyDateProvide:i.data.identifyDateProvide?new Date(1e3*i.data.identifyDateProvide):null,identifyPlaceProvide:i.data.identifyPlaceProvide,frontImageIdentify:i.data.frontImageIdentify,backImageIdentify:i.data.backImageIdentify,companyCode:this.agentDetailDisplay.companyCode,companyName:this.agentDetailDisplay.companyName,companyAddress:this.agentDetailDisplay.companyAddress,referralChannel:this.referralChannelData[0].code,note:i.data.note,domainKey:i.data.domainKey||"",belongSale:(null===(x=i.data.belongSaleInfo)||void 0===x?void 0:x.userId)||"",facebookContact:i.data.facebookContact||"",bookerId:i.data.bookerId||""};this.agentForm.patchValue(A),this.allRolesAdvance=i.data.advanceRole||[],this.allRolesDefault=i.data.defaultPermission||[],this.isTopUpVirtualBalance=this.isTopUpVirtualBalance&&"ACTIVE"===i.data.state,this.roleOtions=(null===(y=this.agentDetail.titlesCanChange)||void 0===y?void 0:y.map(F=>({id:F.id,name:F.name})))||[],this.clearValidators(this.agentForm,this.agentDetailDisplay.business?["identifyId","identifyDateProvide","identifyPlaceProvide","frontImageIdentify","backImageIdentify"]:["companyCode","companyName","companyAddress"]),this.countDownVerifyAccount()}}})}loadBelongSale(){this._userService.getBelongSale().subscribe(t=>{"OK"===t.status&&(this.belongSaleOption=t.data.map(i=>({code:i.id,name:`${i.userName} - ${i.displayName} (${i.titleName})`})))})}getReferralChannel(t){switch(t){case"DIRECT":return"Tr\u1ef1c ti\u1ebfp";case"LANDING_PAGE":return"Landing Page";case"SOCIAL_MEDIA":return"M\u1ea1ng x\xe3 h\u1ed9i";case"MARKETING":return"Ch\u01b0\u01a1ng tr\xecnh Marketing";default:return""}}onBanUser(){this._modal.open(D.V0,{title:"V\xf4 hi\u1ec7u h\xf3a t\xe0i kho\u1ea3n n\xe0y?",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n v\xf4 hi\u1ec7u ho\xe1 t\xe0i kho\u1ea3n n\xe0y? <br>\n T\xe0i kho\u1ea3n s\u1ebd kh\xf4ng th\u1ec3 \u0111\u0103ng nh\u1eadp v\xe0 s\u1eed d\u1ee5ng h\u1ec7 th\u1ed1ng n\u1ebfu b\u1ecb v\xf4 hi\u1ec7u h\xf3a.",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf",isSecondary:!0}).afterClosed$.subscribe({next:i=>{i.data&&(this.isLoading=!0,this._userService.updateAccountStatus({userId:this.userId,status:"BLOCK"}).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:o=>{"OK"===o.status?(this._toastService.add({severity:"success",summary:"V\xf4 hi\u1ec7u h\xf3a th\xe0nh c\xf4ng",detail:"\u0110\u1ea1i l\xfd \u0111\xe3 b\u1ecb v\xf4 hi\u1ec7u h\xf3a v\xe0 kh\xf4ng th\u1ec3 \u0111\u0103ng nh\u1eadp s\u1eed d\u1ee5ng h\u1ec7 th\u1ed1ng.",sticky:!1}),this.loadAgentDetail()):this._toastService.add({severity:"success",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 v\xf4 hi\u1ec7u h\xf3a \u0111\u1ea1i l\xfd. Vui l\xf2ng th\u1eed l\u1ea1i.",sticky:!1})},error:()=>{this._toastService.add({severity:"success",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 v\xf4 hi\u1ec7u h\xf3a \u0111\u1ea1i l\xfd. Vui l\xf2ng th\u1eed l\u1ea1i.",sticky:!1})}}))}})}onActiveUser(){this._modal.open(D.V0,{title:"M\u1edf t\xe0i kho\u1ea3n n\xe0y?",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n cho ph\xe9p t\xe0i kho\u1ea3n n\xe0y ho\u1ea1t \u0111\u1ed9ng l\u1ea1i? <br>\n T\xe0i kho\u1ea3n s\u1ebd \u0111\u01b0\u1ee3c \u0111\u0103ng nh\u1eadp v\xe0 s\u1eed d\u1ee5ng h\u1ec7 th\u1ed1ng n\u1ebfu \u0111\u01b0\u1ee3c cho ph\xe9p ho\u1ea1t \u0111\u1ed9ng l\u1ea1i.",okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf",isSecondary:!0}).afterClosed$.subscribe({next:i=>{i.data&&(this.isLoading=!0,this._userService.updateAccountStatus({userId:this.userId,status:"ACTIVE"}).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:o=>{"OK"===o.status?(this._toastService.add({severity:"success",summary:"M\u1edf ho\u1ea1t \u0111\u1ed9ng th\xe0nh c\xf4ng",detail:"\u0110\u1ea1i l\xfd \u0111\xe3 \u0111\u01b0\u1ee3c cho ph\xe9p \u0111\u0103ng nh\u1eadp v\xe0 ho\u1ea1t \u0111\u1ed9ng tr\u1edf l\u1ea1i.",sticky:!1}),this.loadAgentDetail()):this._toastService.add({severity:"success",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 v\xf4 hi\u1ec7u h\xf3a \u0111\u1ea1i l\xfd. Vui l\xf2ng th\u1eed l\u1ea1i.",sticky:!1})},error:()=>{this._toastService.add({severity:"success",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 m\u1edf ho\u1ea1t \u0111\u1ed9ng \u0111\u1ea1i l\xfd. Vui l\xf2ng th\u1eed l\u1ea1i.",sticky:!1})}}))}})}onUpdate(){this.isEdit=!0,this.reloadIdentifyImage()}onDelete(){this._modal.open(D.V0,{title:"X\xf3a \u0111\u1ea1i l\xfd",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a t\xe0i kho\u1ea3n n\xe0y? Vi\u1ec7c n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c, vui l\xf2ng ki\u1ec3m tra k\u0129 tr\u01b0\u1edbc khi thao t\xe1c.",okText:"C\xf3, ti\u1ebfp t\u1ee5c",cancelText:"Kh\xf4ng, h\u1ee7y b\u1ecf"}).afterClosed$.subscribe({next:i=>{i.data&&this._userService.deleteAgentAccount(this.userId).subscribe({next:o=>{o.success?(this._toastService.add({severity:"success",summary:"Th\xe0nh c\xf4ng",detail:"X\xf3a \u0111\u1ea1i l\xfd th\xe0nh c\xf4ng",sticky:!1}),this._route.navigate(["admin/agent-manage"])):this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"X\xf3a \u0111\u1ea1i l\xfd kh\xf4ng th\xe0nh c\xf4ng",sticky:!0})},error:()=>{this._toastService.add({severity:"error",summary:"Th\u1ea5t b\u1ea1i",detail:"X\xf3a \u0111\u1ea1i l\xfd kh\xf4ng th\xe0nh c\xf4ng",sticky:!0})}})}})}checkDirtyNumber(t){const i=this.agentForm.value;this.agentForm.controls[t].setErrors(i[t]||0===i[t]?null:{required:!0})}onSubmit(){var t,i,o,r;if(this.canCreateAgentUser_AGENT2&&this.checkDirtyNumber("maxNegative"),this.agentForm.markAllAsTouched(),this.isEditInfo&&this.agentForm.invalid)return;const c=this.agentForm.value,u={avatar:c.avatar,agentId:this.userId,agentName:c.agentName,bankAccount:null===(t=c.bankAccount)||void 0===t?void 0:t.trim(),bankBranchName:c.bankBranchName,bankName:c.bankName,email:null===(i=c.email)||void 0===i?void 0:i.trim(),nameOwnAccount:c.nameOwnAccount,phone:null===(o=c.phone)||void 0===o?void 0:o.trim(),phoneArea:c.phoneArea,representative:c.representative,roleIds:this.listRoleId||[],titleId:this.titleId,identifyId:null===(r=c.identifyId)||void 0===r?void 0:r.trim(),identifyDateProvide:c.identifyDateProvide?P(c.identifyDateProvide).format("DD/MM/YYYY"):"",identifyPlaceProvide:c.identifyPlaceProvide,frontImageIdentify:c.frontImageIdentify,backImageIdentify:c.backImageIdentify,companyAddress:c.companyAddress,companyCode:c.companyCode,companyName:c.companyName,discountPaymentType:(null==c?void 0:c.discountPaymentType)||"NO_DISCOUNT",maxNegative:(null==c?void 0:c.maxNegative)||0,belongSale:(null==c?void 0:c.belongSale)||"",facebookContact:(null==c?void 0:c.facebookContact)||"",referralChannel:(null==c?void 0:c.referralChannel)||"",note:(null==c?void 0:c.note)||"",domainKey:(null==c?void 0:c.domainKey)||"",bookerId:(null==c?void 0:c.bookerId)||""};let h=this._userService.updateAgentUserInfo(u);(this.isCccdFontDirty||this.isCccdBackDirty||this.isAvatarDirty)&&(h=this.createRequestUpdateAgentInfo(u));const m=this._userService.updateAccountStatus({userId:this.userId,status:this.agentDetailDisplay.state}),T=this._userService.updateAgentUserPermisson(u),v=[];this.isEditInfo&&v.push(h),this.isEditPermission&&v.push(T),this.canEditStatus&&v.push(m),this.isLoading=!0,(0,b.D)(v).pipe((0,k.x)(()=>this.isLoading=!1)).subscribe({next:x=>{if(x.every(A=>"OK"===A.status))this.isEdit=!1,this._toastService.add({severity:"success",summary:"C\u1eadp nh\u1eadt th\xe0nh c\xf4ng",detail:"C\u1eadp nh\u1eadt th\xf4ng tin v\xe0 quy\u1ec1n h\u1ea1n nh\xe2n vi\xean th\xe0nh c\xf4ng!",sticky:!1}),this.loadAgentDetail();else{const A=x.filter(F=>"OK"!==F.status).filter((F,N,q)=>q.findIndex(B=>B.id===F.id)===N);null==A||A.forEach(F=>{var N,q;const B=(null===(q=null===(N=F.objectError)||void 0===N?void 0:N.errorDescription)||void 0===q?void 0:q.vi)||"Kh\xf4ng th\u1ec3 c\u1eadp nh\u1eadt th\xf4ng tin v\xe0 quy\u1ec1n h\u1ea1n nh\xe2n vi\xean. Vui l\xf2ng th\u1eed l\u1ea1i!";this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:B,sticky:!0})})}},error:()=>{this._toastService.add({severity:"error",summary:"C\xf3 l\u1ed7i x\u1ea3y ra",detail:"Kh\xf4ng th\u1ec3 c\u1eadp nh\u1eadt th\xf4ng tin v\xe0 quy\u1ec1n h\u1ea1n nh\xe2n vi\xean. Vui l\xf2ng th\u1eed l\u1ea1i!",sticky:!0})}})}createRequestUpdateAgentInfo(t){return this._userService.getUrlUploadImage({username:this.agentDetailDisplay.identify,avatarContentType:this.avatarFile?this.avatarFile.type:"",avatarExtension:this.getExtension(this.avatarFile?this.avatarFile.name:""),cccdFontContentType:this.cccdFontFile?this.cccdFontFile.type:"",cccdFontExtension:this.getExtension(this.cccdFontFile?this.cccdFontFile.name:""),cccdBackContentType:this.cccdBackFile?this.cccdBackFile.type:"",cccdBackExtension:this.getExtension(this.cccdBackFile?this.cccdBackFile.name:"")}).pipe((0,O.w)(i=>{this.isLoading=!0;const o=[];return this.isCccdFontDirty&&o.push(this.uploadAvatarToS3(i.data.cccdFontUploadUrl,this.cccdFontFile.type,this.cccdFontFile)),this.isCccdBackDirty&&o.push(this.uploadAvatarToS3(i.data.cccdBackUploadUrl,this.cccdBackFile.type,this.cccdBackFile)),this.isAvatarDirty&&o.push(this.uploadAvatarToS3(i.data.avatarUploadUrl,this.avatarFile.type,this.avatarFile)),(0,b.D)(o).pipe((0,k.x)(()=>this.isLoading=!1),(0,O.w)(r=>this._userService.updateAgentUserInfo(t)))}))}getExtension(t){return"."+t.split(".").pop()}uploadAvatarToS3(t,i,o){return this._userService.uploadfileAWSS3(t,i,o)}onCancel(){this._modal.open(D.V0,{title:"H\u1ee7y b\u1ecf thay \u0111\u1ed5i",body:"B\u1ea1n c\xf3 ch\u1eafc ch\u1eafn mu\u1ed1n h\u1ee7y b\u1ecf thay \u0111\u1ed5i v\xe0 d\u1eebng vi\u1ec7c ch\u1ec9nh s\u1eeda? H\xe0nh \u0111\u1ed9ng n\xe0y kh\xf4ng th\u1ec3 ho\xe0n t\xe1c.",okText:"Kh\xf4ng, ti\u1ebfp t\u1ee5c",cancelText:"C\xf3, h\u1ee7y b\u1ecf"}).afterClosed$.subscribe({next:i=>{i.data||(this.isEdit=!1)}})}onChangeMode(t){this.viewMode=t}clearValidators(t,i){i.forEach(o=>{const r=t.get(o);r.clearValidators(),r.updateValueAndValidity()})}onCheckRoleChange(t){this.listRoleId.includes(t.id)?this.listRoleId=this.listRoleId.filter(i=>i!==t.id):this.listRoleId.push(t.id)}getPermissionByRole(t){var i;const o=this.agentDetail.titlesCanChange.find(r=>r.id===t.code);o&&(this.listRoleId=[],this.titleId=o.id,this.allRolesAdvance=(null===(i=o.advanceRoles)||void 0===i?void 0:i.map(r=>({code:r.id,name:r.name})))||[],this.allRolesDefault=o.defaultPermissions||[])}isUpdateStatus(t){return this._permissionService.hasPermission(g.or.CanEditAccountStatus+"_"+t)}onBackToList(){this._route.navigate(["admin/agent-manage"])}viewCCCD(){this.identifyToggle=!this.identifyToggle,this.identifyToggle&&this.reloadIdentifyImage()}openPopupCCCD(t){this.viewCCCD(),this.identifyModal=this._modal.open(t,{}),this.identifyModal.afterClosed$.subscribe(()=>this.viewCCCD())}closePopupCCCD(){this.identifyModal.close()}reloadIdentifyImage(){this._userService.getIdentifyUrl(this.userId).subscribe({next:t=>{this.cccdFontSrc=t.data.cccdFontUploadUrl,this.previewCCCDFont=t.data.cccdFontUploadUrl,this.cccdBackSrc=t.data.cccdBackUploadUrl,this.previewCCCDBack=t.data.cccdBackUploadUrl}})}uploadAvatar(t){const o=t.target.files[0];o.type.match("image-*")?o&&(this.isAvatarDirty=!0,this.avatarFile=t.target.files[0],this.getPreviewImage(t,"avatar"),this.agentForm.controls.avatar.setValue(this.avatarFile.name)):console.log("Ch\u1ec9 cho ph\xe9p ch\u1ecdn file \u1ea3nh")}uploadCCCDFont(t){this.isCccdFontDirty=!0,this.cccdFontFile=t.target.files[0],this.getPreviewImage(t,"cccdFont"),this.agentForm.controls.frontImageIdentify.setValue(this.cccdFontFile.name)}uploadCCCDBack(t){this.isCccdBackDirty=!0,this.cccdBackFile=t.target.files[0],this.getPreviewImage(t,"cccdBack"),this.agentForm.controls.backImageIdentify.setValue(this.cccdBackFile.name)}closeButtonCCCDFont(t){this.previewCCCDFont="",this.agentForm.controls.frontImageIdentify.setValue(""),t.stopPropagation()}closeButtonCCCDBack(t){this.previewCCCDBack="",this.agentForm.controls.backImageIdentify.setValue(""),t.stopPropagation()}getPreviewImage(t,i){if(t.target.files&&t.target.files[0]){const o=t.target.files[0],r=new FileReader;switch(i){case"avatar":r.onload=c=>this.previewAvatar=r.result;break;case"cccdFont":r.onload=c=>this.previewCCCDFont=r.result;break;case"cccdBack":r.onload=c=>this.previewCCCDBack=r.result}r.readAsDataURL(o)}}outsideClick(){this.isOpen=!1}onDepositSubAgent(){sessionStorage.setItem("idSubAgentDeposit",JSON.stringify(this.userId)),this._router.navigate(["admin/deposit-balance-agent"])}resendEmailVerify(){this.verifyCount>0||this._modal.open(D.V0,{title:"G\u1eedi email k\xedch ho\u1ea1t",body:`<div>B\u1ea1n c\xf3 mu\u1ed1n g\u1eedi email x\xe1c th\u1ef1c t\xe0i kho\u1ea3n \u0111\u1ebfn email <strong>${this.agentDetail.email}</strong> c\u1ee7a \u0111\u1ea1i l\xfd?</div>\n <div>L\u01b0u \xfd: M\u1ed7i l\u1ea7n y\xeau c\u1ea7u g\u1eedi email s\u1ebd c\xe1ch nhau 5 ph\xfat.</div>`,okText:"X\xe1c nh\u1eadn",cancelText:"H\u1ee7y b\u1ecf"}).afterClosed$.subscribe({next:i=>{i.data&&this._accountVerifyService.agentResendEmailVerify(this.agentDetailDisplay.identify).subscribe({next:o=>{o.success?(this.processCountDown(1e3*o.data.resentCount),this._modal.open(D.z5,{title:"G\u1eedi email k\xedch ho\u1ea1t t\xe0i kho\u1ea3n th\xe0nh c\xf4ng",content:`\u0110\xe3 g\u1eedi email k\xedch ho\u1ea1t \u0111\u1ebfn <strong>${this.agentDetail.email}</strong>`,status:"success"})):this._modal.open(D.z5,{title:"G\u1eedi email k\xedch ho\u1ea1t t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",content:`C\xf3 l\u1ed7i ph\xe1t sinh trong qu\xe1 tr\xecnh g\u1eedi email \u0111\u1ebfn <strong>${this.agentDetail.email}</strong>. \n Vui l\xf2ng th\u1eed l\u1ea1i sau!`,status:"error"}),this.loadAgentDetail()},error:()=>{this._modal.open(D.z5,{title:"G\u1eedi email k\xedch ho\u1ea1t t\xe0i kho\u1ea3n th\u1ea5t b\u1ea1i",content:`C\xf3 l\u1ed7i ph\xe1t sinh trong qu\xe1 tr\xecnh g\u1eedi email \u0111\u1ebfn <strong>${this.agentDetail.email}</strong>. \n Vui l\xf2ng th\u1eed l\u1ea1i sau!`,status:"error"}),this.loadAgentDetail()}})}})}processCountDown(t){localStorage.setItem(`${this.TIME_VERIFY_PREFIX}${this.agentDetail.identify}`,`${+new Date+t}`),this.countDownVerifyAccount()}countDownVerifyAccount(){const t=localStorage.getItem(`${this.TIME_VERIFY_PREFIX}${this.agentDetail.identify}`);if(t&&+t-+new Date>0){const i=setInterval(()=>{const o=localStorage.getItem(`${this.TIME_VERIFY_PREFIX}${this.agentDetail.identify}`);if(o){const r=+o-+new Date;r>=0?this.verifyCount=Math.floor(r/1e3):clearInterval(i)}},100)}}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(Q.jH),e.Y36(l.KNP),e.Y36(f.gz),e.Y36(j.oE),e.Y36(s.qu),e.Y36(Z.KD),e.Y36(E.BX),e.Y36(g.$A),e.Y36(f.F0),e.Y36($.l),e.Y36(ie.j),e.Y36(f.F0),e.Y36(to.P),e.Y36(ne.L))},n.\u0275cmp=e.Xpm({type:n,selectors:[["agent-detail-page"]],standalone:!0,features:[e.jDz],decls:2,vars:2,consts:[["class","py-8 flex justify-center",4,"ngIf"],[4,"ngIf"],[1,"py-8","flex","justify-center"],[1,"w-[764px]","max-w-[764]","flex","flex-col","gap-y-6"],[1,"flex","justify-between"],["cf-button","","size","medium","type","secondary",1,"bg-white",3,"click"],["icon","arrow_left","size","small",1,"mr-2.5"],["class","flex gap-x-3",4,"ngIf"],[1,"py-[20px]","px-6","bg-white","rounded","flex","flex-col","gap-y-3"],[1,"flex","items-center","gap-x-[20px]"],[1,"w-[64px]","h-[64px]","overflow-hidden","relative"],["alt","",1,"object-cover","h-full","w-full","rounded-full",3,"src"],["class","absolute bottom-0 right-0 w-[28px] h-[28px] rounded-full bg-[#505050] opacity-[.85] flex justify-center items-center cursor-pointer",4,"ngIf"],["accept","image/*","name","ufile","type","file",1,"hidden",3,"change"],["inputFile",""],[1,"flex","flex-col"],[1,"text-heading-md"],[1,"text-body-lg"],[1,"flex","gap-x-3"],[1,"flex","flex-col","gap-y-2","justify-between","items-center"],[1,"text-express-sm"],["type","inverted",3,"color"],["class","!max-w-none !w-[186px]","textField","name","valueField","code","size","small",3,"data","allowSearch","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["contentTpl",""],[1,"flex","justify-between","border-t","border-neutral-gray-1","pt-3"],[1,"flex","flex-col","gap-y-1.5"],[1,"text-heading-lg"],[1,""],[1,"text-neutral-gray-4"],["cf-button","","size","medium",3,"click",4,"ngIf"],[1,"!w-9","!h-9"],["cdkOverlayOrigin",""],["trigger","","originOverlay","cdkOverlayOrigin"],["cf-button","","size","medium","type","secondary",1,"!w-9","!h-9","justify-center","bg-neutral-white",3,"click"],["icon","options_horizontal","size","small"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","overlayOutsideClick"],["cf-button","","size","medium",3,"click"],["icon","edit_alt","size","small",1,"mr-2.5"],[1,"shadow-cf-lg","bg-neutral-white","min-w-[120px]","flex","flex-col","rounded-md"],["class","flex items-center py-2 px-3 text-body-md-short text-neutral-gray-6 hover:bg-neutral-gray-1 hover:cursor-pointer",3,"click",4,"ngIf"],[1,"flex","items-center","py-2","px-3","text-body-md-short","text-neutral-gray-6","hover:bg-neutral-gray-1","hover:cursor-pointer",3,"click"],["icon","email","size","small",1,"mr-2.5"],["class","text-neutral-gray-4",4,"ngIf"],["icon","credit_card","size","small",1,"mr-2.5"],["icon","ban","size","small",1,"mr-2.5"],["icon","circle_check","size","small",1,"mr-2.5"],["cf-button","","size","medium",3,"disabled","click",4,"ngIf","ngIfElse"],["elseTempSaveBtn",""],["icon","circle_error","size","small",1,"mr-2.5"],["cf-button","","size","medium",3,"disabled","click"],["icon","save","size","small",1,"mr-2.5"],[1,"absolute","bottom-0","right-0","w-[28px]","h-[28px]","rounded-full","bg-[#505050]","opacity-[.85]","flex","justify-center","items-center","cursor-pointer"],["icon","camera","size","small",1,"text-white",3,"click"],["textField","name","valueField","code","size","small",1,"!max-w-none","!w-[186px]",3,"data","allowSearch","ngModel","ngModelChange"],[1,"rounded","py-1","px-3","border","border-neutral-gray-2"],["class","text-body-md flex items-center",4,"ngIf"],[1,"text-body-md","flex","items-center"],["icon","circle_check","size","small",1,"text-secondary-1-4","mr-2.5"],["icon","circle_remove","size","small",1,"mr-2.5"],["icon","circle_warning",1,"text-secondary-7-3","mr-2"],[1,"flex","gap-x-3","mb-4"],["class","flex items-center gap-x-2.5 py-1.5 px-4 text-heading-xs rounded-full cursor-pointer bg-white border border-neutral-gray-3",3,"ngClass","click",4,"ngIf"],["class","mt-8",4,"ngIf"],[1,"flex","items-center","gap-x-2.5","py-1.5","px-4","text-heading-xs","rounded-full","cursor-pointer","bg-white","border","border-neutral-gray-3",3,"ngClass","click"],["icon","circle_information","size","small"],["icon","user","size","small"],[1,"flex","gap-x-[20px]","mb-4"],[1,"w-1","bg-[#fcb40a]"],[1,"bg-neutral-white","rounded","p-6"],[1,"grid","grid-cols-2","gap-4"],[1,"w-full","h-10","py-2.5","px-3","text-body-md","text-neutral-gray-6","rounded","border","border-neutral-gray-3","bg-neutral-gray-1"],[1,"flex","flex-col","gap-y-1.5","mt-4"],[1,"border","border-neutral-gray-3","bg-neutral-gray-1","rounded","py-2.5","px-3","text-body-md",3,"disabled","value"],[1,"border","border-dashed","border-neutral-gray-3","rounded","mt-4"],[1,"flex","justify-between","items-center","gap-x-2","py-2.5","px-4",3,"click"],[1,"text-espressive-sm","text-black","flex-1","flex","items-center","gap-x-2"],["icon","document","size","small"],[1,"cursor-pointer"],["icon","remove","size","small",4,"ngIf"],["icon","plus","size","small",4,"ngIf"],["class","flex flex-col gap-y-2 border-t border-neutral-gray-1 py-2.5 px-4",4,"ngIf"],[1,"mt-8"],[1,"grid","grid-cols-2","gap-4","bg-neutral-white","rounded","p-6"],[1,"w-full","h-10","py-2.5","px-3","text-body-md","text-neutral-gray-6","rounded","border","border-neutral-gray-3","bg-neutral-gray-1","overflow-ellipsis","whitespace-nowrap","overflow-hidden"],["class","flex flex-col gap-4 bg-neutral-white rounded p-6",4,"ngIf"],["class","grid grid-cols-2 gap-4 bg-neutral-white rounded p-6",4,"ngIf"],["icon","remove","size","small"],["icon","plus","size","small"],[1,"flex","flex-col","gap-y-2","border-t","border-neutral-gray-1","py-2.5","px-4"],[1,"w-full","h-10","py-2.5","px-3","text-body-md","text-neutral-gray-6","rounded","border","border-neutral-gray-3","bg-neutral-gray-1","truncate"],[1,"flex","flex-col","gap-4","bg-neutral-white","rounded","p-6"],[1,"flex","justify-between","gap-4"],[1,"w-full","flex","flex-col","gap-y-1.5"],[1,"h-10","py-2.5","px-3","text-body-md","text-neutral-gray-6","rounded","border","border-neutral-gray-3","bg-neutral-gray-1"],[1,"mt-[22px]"],["cf-button","","size","medium","type","secondary",3,"click",4,"ngIf"],["cccdPopup",""],["cf-button","","size","medium","type","secondary",3,"click"],["icon","eye","size","small",1,"mr-2.5"],["icon","eye_off","size","small",1,"mr-2.5"],[1,"col-start-1","col-end-3"],[1,"flex","flex-col","rounded-lg","bg-neutral-white"],[1,"flex","justify-between","items-center","px-6","py-[13px]","border-b","border-b-neutral-gray-1"],[1,"text-heading-xs","text-neutral-black"],["size","medium","icon","close",1,"text-neutral-gray-4","cursor-pointer",3,"click"],[1,"flex","items-center","gap-x-4","p-6","md:flex-col","md:gap-2"],["class","w-[476px] h-[280px] object-contain",3,"src",4,"ngIf"],[1,"w-[476px]","h-[280px]","object-contain",3,"src"],[1,"p-6","bg-neutral-white","rounded","shadow-cf-md","flex","flex-col","gap-y-6"],[1,"flex","gap-x-8"],[1,"flex","flex-col","gap-y-2","w-[260px]"],[1,"text-heading-sm"],[1,"text-body-lg","text-neutral-gray-4"],[1,"flex","flex-col","flex-1","gap-y-4"],[4,"ngFor","ngForOf"],[1,"w-full","border-t","border-neutral-gray-1"],[3,"checked","disabled"],[1,"text-express-sm",3,"CfRequired"],[1,"grow-[400]","!w-full",3,"status"],["cf-input","","size","medium","placeholder","Nh\u1eadp",3,"formControl"],["cfHint","",3,"hint",4,"ngIf"],[1,"text-espressive-md","text-neutral-gray-5","mb-1.5","empty:!m-0"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5",3,"CfRequired"],["textField","name","valueField","code","size","small","placeholder","Nh\u1eadp m\xe3",1,"!w-full","!max-w-full",3,"status","data","formControl"],["cfSuffix","",1,"w-[65%]","px-3","text-body-md","flex","gap-x-2","items-center","border-l","border-neutral-gray-2"],["cf-input","","size","medium","autocomplete","off","placeholder","Nh\u1eadp s\u1ed1 \u0111i\u1ec7n tho\u1ea1i","CfNumberic","",3,"formControl"],[1,"mt-4"],["textField","name","valueField","code","placeholder","Ch\u1ecdn ng\u01b0\u1eddi gi\u1edbi thi\u1ec7u",1,"!max-w-none","w-full",3,"status","data","allowSearch","formControl"],["cfLabel","",1,"text-espressive-sm","text-black","mb-1.5"],["cf-input","","placeholder","Ghi ch\xfa m\xf4 t\u1ea3 chi ti\u1ebft v\u1ec1 \u0111\u1ea1i l\xfd n\xe0y",1,"border","border-neutral-gray-3","rounded","px-3","text-body-md","w-full","outline-none","placeholder-neutral-gray-4","py-2",3,"formControl"],["cf-input","","CfNumberic","","size","medium","placeholder","Nh\u1eadp",3,"formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn ng\xe2n h\xe0ng",1,"!w-full","!max-w-full",3,"status","data","formControl","allowSearch"],["cfHint","",3,"hint"],["cf-input","","size","medium","placeholder","Nh\u1eadp trang facebook c\u1ee7a \u0111\u1ea1i l\xfd",1,"truncate",3,"formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn k\xeanh gi\u1edbi thi\u1ec7u",1,"!max-w-none","w-full","bg-neutral-white",3,"status","data","allowSearch","formControl"],[1,"p-6","bg-neutral-white","rounded-lg","shadow-cf-md"],[1,"flex","flex-nowrap","gap-x-4"],["textField","text","valueField","value","placeholder","Ch\u1ecdn chi\u1ebft kh\u1ea5u",1,"!w-full","!max-w-none",3,"status","data","allowSearch","formControl"],[1,"!w-full",3,"status"],["size","medium",3,"placeholder","negative","formControl","ngModelChange"],["cf-input","","size","medium","placeholder","Nh\u1eadp s\u1ed1 CCCD/CMND","CfNumberic","",3,"formControl"],["cfDatepicker","","type","text","size","medium","cf-input","","placeholder","Ch\u1ecdn ng\xe0y c\u1ea5p CCCD/CMND",1,"py-[7px]",3,"displayMonths","maxDate","formControl","input","dateSelect"],["dateFrom","cfDatepicker"],["cf-input","","size","medium","placeholder","Nh\u1eadp n\u01a1i c\u1ea5p",3,"formControl"],[1,"text-espressive-sm"],[1,"h-[140px]","w-[140px]","bg-no-repeat","bg-center","bg-cover","rounded","border","border-neutral-gray-2","flex","items-center","justify-center","cursor-pointer","relative",3,"click"],["class","text-express-sm text-center px-6 flex flex-col justify-center items-center gap-y-3",4,"ngIf"],["class","rounded-full bg-neutral-gray-4 absolute flex items-center justify-between right-0 top-0 p-1 translate-x-1/2 -translate-y-1/2",3,"click",4,"ngIf"],["type","file",1,"hidden",3,"change"],["fileUploadCCCDFont",""],["fileUploadCCCDBack",""],[1,"text-express-sm","text-center","px-6","flex","flex-col","justify-center","items-center","gap-y-3"],["icon","cloud_upload","size","medium"],[1,"rounded-full","bg-neutral-gray-4","absolute","flex","items-center","justify-between","right-0","top-0","p-1","translate-x-1/2","-translate-y-1/2",3,"click"],["icon","close","size","small",1,"text-neutral-white"],[1,"grow-[400]","!w-full"],["cf-input","","size","medium","placeholder","Nh\u1eadp s\u1ed1 doamin key",3,"formControl"],["CfAlphanumeric","","cf-input","","size","medium","placeholder","BKVN077751",3,"formControl"],["textField","name","valueField","code","placeholder","Ch\u1ecdn vai tr\xf2",1,"!w-full","!max-w-none",3,"status","data","ngModel","allowSearch","ngModelChange","selectedChange"],[3,"CfRequired"],["class","w-full border-t border-neutral-gray-1",4,"ngIf"],["class","flex gap-x-8",4,"ngIf"],[3,"checked","checkedChange"]],template:function(t,i){1&t&&(e.YNc(0,Oa,47,19,"div",0),e.YNc(1,Ra,1,0,"cf-spinner",1)),2&t&&(e.Q6J("ngIf",i.agentDetailDisplay),e.xp6(1),e.Q6J("ngIf",i.isLoading))},dependencies:[_.ez,_.mk,_.sg,_.O5,_.JJ,s.u5,s.Fj,s.JJ,s.On,s.UX,s.oH,l.AxE,l.Sm8,C.N8,C.Xq,V.C,p.j$,p.ND,p.BN,p.v2,p.lt,Q.Cs,G.I,I.q,z.b,D.OR,de.AS,X.z,re.f,H.pI,H.xu,eo.j],encapsulation:2}),n})()},76331:(te,M,d)=>{d.d(M,{I:()=>R});var _=d(36895),s=d(94650),p=d(24006);function S(f,Z){if(1&f&&(s.ynx(0),s._uU(1),s.BQk()),2&f){const U=s.oxw(2);s.xp6(1),s.hij(" ",U.checkedChildren," ")}}function C(f,Z){if(1&f&&s._uU(0),2&f){const U=s.oxw(2);s.hij(" ",U.unCheckedChildren," ")}}function E(f,Z){if(1&f&&(s.ynx(0),s.YNc(1,S,2,1,"ng-container",2),s.YNc(2,C,1,1,"ng-template",null,3,s.W1O),s.BQk()),2&f){const U=s.MAs(3),J=s.oxw();s.xp6(1),s.Q6J("ngIf",J.checked)("ngIfElse",U)}}function b(f,Z){1&f&&(s.ynx(0),s.Hsn(1,0,["class","text-body-lg text-neutral-gray-6"]),s.BQk())}const I=function(f,Z){return{"checked !pl-2 !pr-[28px] !text-neutral-white":f,"opacity-50 pointer-events-none cursor-default":Z}},e=["*"];let R=(()=>{class f{constructor(){this.size="medium",this.disabled=!1,this.checked=!1,this.checkedChildren="",this.unCheckedChildren="",this.type="label",this.checkedChange=new s.vpe,this.color="#fcb40a",this.statusColor=""}ngOnChanges(U){(U.checked||U.color)&&this.statusColorChange()}onToggleSwitch(){this.disabled||(this.checked=!this.checked,this.checkedChange.emit(this.checked),this.statusColorChange())}statusColorChange(){this.statusColor=this.checked?this.color:"#ccc"}}return f.\u0275fac=function(U){return new(U||f)},f.\u0275cmp=s.Xpm({type:f,selectors:[["cf-switch"]],hostAttrs:[1,"flex","gap-x-3","items-center","inline-flex"],inputs:{size:"size",disabled:"disabled",checked:"checked",checkedChildren:"checkedChildren",unCheckedChildren:"unCheckedChildren",type:"type",color:"color"},outputs:{checkedChange:"checkedChange"},standalone:!0,features:[s.TTD,s.jDz],ngContentSelectors:e,decls:3,vars:8,consts:[["type","button","id","switch-toggle",1,"cursor-pointer","min-w-[44px]","h-[24px]","pl-[28px]","pr-2","text-express-md","text-neutral-gray-6","bg-[#ccc]","block","rounded-full","relative","after:bg-neutral-white",3,"ngClass","click"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["uncheckTemplate",""]],template:function(U,J){1&U&&(s.F$t(),s.TgZ(0,"button",0),s.NdJ("click",function(){return J.onToggleSwitch()}),s.YNc(1,E,4,2,"ng-container",1),s.qZA(),s.YNc(2,b,2,0,"ng-container",1)),2&U&&(s.Udp("background-color",J.statusColor),s.Q6J("ngClass",s.WLB(5,I,J.checked,J.disabled)),s.xp6(1),s.Q6J("ngIf","inside"===J.type),s.xp6(1),s.Q6J("ngIf","label"===J.type))},dependencies:[_.ez,_.mk,_.O5,p.u5],styles:['#switch-toggle[_ngcontent-%COMP%]:after{content:"";position:absolute;top:2px;left:3px;width:20px;height:20px;border-radius:20px;transition:.3s}#switch-toggle.checked[_ngcontent-%COMP%]:after{left:calc(100% - 5px);transform:translate(-90%)}#switch-toggle[_ngcontent-%COMP%]:active:after{width:20px}']}),f})()}}]);