-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1787.b757d4f487c4d2fe7d2a.js
1 lines (1 loc) · 97.3 KB
/
1787.b757d4f487c4d2fe7d2a.js
1
"use strict";(self.webpackChunkchekt_web_wcs=self.webpackChunkchekt_web_wcs||[]).push([[1787],{11822:(y,f,l)=>{l.d(f,{cN:()=>g,ku:()=>b,OP:()=>_});var c=l(88638);const g=(0,c.X$)("page",[(0,c.SB)("*",(0,c.oB)({opacity:1,transform:"translateX(0)"})),(0,c.eR)(":leave",[(0,c.jt)("0.1s 0.1s",(0,c.oB)({opacity:0}))]),(0,c.eR)(":enter",[(0,c.oB)({opacity:0,display:"none",position:"absolute",top:0,left:0,width:"100%"}),(0,c.jt)("0.1s 100ms",(0,c.oB)({position:"absolute",opacity:1,transform:"translateX(0)"}))])]),b=((0,c.X$)("dialog",[(0,c.SB)("*",(0,c.oB)({transform:"translateX(0)"})),(0,c.eR)(":enter",[(0,c.oB)({transform:"translateY(+50%)",opacity:.5}),(0,c.jt)("0.2s ease-in")]),(0,c.eR)(":leave",[(0,c.jt)("0.2s ease-out",(0,c.oB)({transform:"translateY(+50%)",opacity:.5}))])]),(0,c.X$)("background",[(0,c.SB)("*",(0,c.oB)({opacity:1})),(0,c.eR)(":enter",[(0,c.oB)({opacity:0}),(0,c.jt)("0.1s ease-in")]),(0,c.eR)(":leave",[(0,c.jt)("0.1s ease-out",(0,c.oB)({opacity:0}))])])),_=((0,c.X$)("subModal",[(0,c.eR)(":enter",[(0,c.oB)({transform:"translateX(+100%)"}),(0,c.jt)("0.2s ease-in")]),(0,c.eR)(":leave",[(0,c.jt)("0.2s ease-in",(0,c.oB)({transform:"translateX(-100%)"}))])]),(0,c.X$)("imgShow",[(0,c.SB)("*",(0,c.oB)({opacity:1})),(0,c.eR)(":enter",[(0,c.oB)({opacity:0}),(0,c.jt)("0.2s ease-in")]),(0,c.eR)(":leave",[(0,c.jt)("0.2s ease-out",(0,c.oB)({opacity:0}))])]))},51787:(y,f,l)=>{l.r(f),l.d(f,{PermissionGroupsModule:()=>An});var c=l(16274),g=l(93324),x=l(29535),b=l(11822),n=l(42741),_=l(35460),P=l(17611),u=l(61855),m=l(46243);function k(o,s){1&o&&n._UZ(0,"col",10)}function T(o,s){1&o&&n._UZ(0,"col",10)}function A(o,s){1&o&&(n.TgZ(0,"th",11),n._uU(1,"Users"),n.qZA())}function q(o,s){1&o&&n._UZ(0,"th")}function z(o,s){1&o&&(n.TgZ(0,"div",12),n.O4$(),n.TgZ(1,"svg",13),n._UZ(2,"circle",14),n.qZA(),n.qZA())}function R(o,s){1&o&&n._UZ(0,"col",10)}function U(o,s){1&o&&n._UZ(0,"col",10)}function J(o,s){1&o&&(n.TgZ(0,"tr",18),n.TgZ(1,"td",19),n._uU(2,"No Permission for Permission Groups"),n.qZA(),n.qZA())}function N(o,s){1&o&&(n.TgZ(0,"tr",18),n.TgZ(1,"td",19),n._uU(2,"No Permission Groups"),n.qZA(),n.qZA())}function I(o,s){if(1&o&&(n.ynx(0),n.YNc(1,J,3,0,"tr",17),n.YNc(2,N,3,0,"tr",17),n.BQk()),2&o){const t=n.oxw(3);n.xp6(1),n.Q6J("ngIf",!t.hasReadMemberPermission||!t.hasReadRolePermission),n.xp6(1),n.Q6J("ngIf",t.hasReadMemberPermission&&t.hasReadRolePermission)}}function D(o,s){if(1&o&&(n.TgZ(0,"td",11),n._uU(1),n.qZA()),2&o){const t=n.oxw().$implicit;n.xp6(1),n.Oqu(t.user_cnt)}}function S(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"td",11),n.TgZ(1,"i",22),n.NdJ("click",function(i){n.CHM(t);const r=n.oxw().$implicit,a=n.oxw(3);return i.stopPropagation(),a.openEditDialog(r)}),n._uU(2,"mode_edit"),n.qZA(),n.TgZ(3,"i",23),n.NdJ("click",function(i){n.CHM(t);const r=n.oxw().$implicit,a=n.oxw(3);return i.stopPropagation(),a.openDeleteDialog(r)}),n._uU(4,"delete_forever"),n.qZA(),n.qZA()}}function Y(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"tr",20),n.NdJ("click",function(){const r=n.CHM(t).$implicit;return n.oxw(3).gotoDetail(r)}),n.TgZ(1,"td"),n._uU(2),n.qZA(),n.TgZ(3,"td"),n._uU(4),n.qZA(),n.YNc(5,D,2,1,"td",6),n.YNc(6,S,5,0,"td",21),n.qZA()}if(2&o){const t=s.$implicit,e=n.oxw(3);n.xp6(2),n.Oqu(t.name),n.xp6(2),n.Oqu(t.description),n.xp6(1),n.Q6J("ngIf",!e.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!e.am_i_division_user)}}function E(o,s){if(1&o&&(n.TgZ(0,"div",15),n.TgZ(1,"table"),n.TgZ(2,"colgroup"),n._UZ(3,"col",3),n._UZ(4,"col",4),n.YNc(5,R,1,0,"col",5),n.YNc(6,U,1,0,"col",5),n.qZA(),n.TgZ(7,"tbody"),n.YNc(8,I,3,2,"ng-container",7),n.YNc(9,Y,7,4,"tr",16),n.qZA(),n.qZA(),n.qZA()),2&o){const t=n.oxw(2);n.xp6(5),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(2),n.Q6J("ngIf",!t.filteredGlobalRoles),n.xp6(1),n.Q6J("ngForOf",t.filteredGlobalRoles)}}function G(o,s){if(1&o&&(n.TgZ(0,"div",1),n.TgZ(1,"table",2),n.TgZ(2,"colgroup"),n._UZ(3,"col",3),n._UZ(4,"col",4),n.YNc(5,k,1,0,"col",5),n.YNc(6,T,1,0,"col",5),n.qZA(),n.TgZ(7,"thead"),n.TgZ(8,"th"),n._uU(9,"Name"),n.qZA(),n.TgZ(10,"th"),n._uU(11,"Descriptions"),n.qZA(),n.YNc(12,A,2,0,"th",6),n.YNc(13,q,1,0,"th",7),n.qZA(),n.qZA(),n.YNc(14,z,3,0,"div",8),n.YNc(15,E,10,4,"div",9),n.qZA()),2&o){const t=n.oxw();n.xp6(5),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(6),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(1),n.Q6J("ngIf",t.isLoading),n.xp6(1),n.Q6J("ngIf",!t.isLoading)}}function Q(o,s){1&o&&n._UZ(0,"col",10)}function $(o,s){1&o&&n._UZ(0,"col",10)}function F(o,s){1&o&&(n.TgZ(0,"th",11),n._uU(1,"Users"),n.qZA())}function j(o,s){1&o&&n._UZ(0,"th")}function L(o,s){1&o&&n._UZ(0,"col",10)}function B(o,s){1&o&&n._UZ(0,"col",10)}function H(o,s){1&o&&(n.TgZ(0,"tr",18),n.TgZ(1,"td",19),n._uU(2,"No Permission for Permission Groups"),n.qZA(),n.qZA())}function X(o,s){1&o&&(n.TgZ(0,"tr",18),n.TgZ(1,"td",19),n._uU(2,"No Permission Groups"),n.qZA(),n.qZA())}function W(o,s){if(1&o&&(n.TgZ(0,"td",11),n._uU(1),n.qZA()),2&o){const t=n.oxw().$implicit;n.xp6(1),n.Oqu(t.user_cnt)}}function K(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"td",11),n.TgZ(1,"i",22),n.NdJ("click",function(i){n.CHM(t);const r=n.oxw().$implicit,a=n.oxw(2);return i.stopPropagation(),a.openEditDialog(r)}),n._uU(2,"mode_edit"),n.qZA(),n.TgZ(3,"i",23),n.NdJ("click",function(i){n.CHM(t);const r=n.oxw().$implicit,a=n.oxw(2);return i.stopPropagation(),a.openDeleteDialog(r)}),n._uU(4,"delete_forever"),n.qZA(),n.qZA()}}function V(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"tr",20),n.NdJ("click",function(){const r=n.CHM(t).$implicit;return n.oxw(2).gotoDetail(r)}),n.TgZ(1,"td"),n._uU(2),n.qZA(),n.TgZ(3,"td"),n._uU(4),n.qZA(),n.YNc(5,W,2,1,"td",6),n.YNc(6,K,5,0,"td",21),n.qZA()}if(2&o){const t=s.$implicit,e=n.oxw(2);n.xp6(2),n.Oqu(t.name),n.xp6(2),n.Oqu(t.description),n.xp6(1),n.Q6J("ngIf",!e.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!e.am_i_division_user)}}function nn(o,s){if(1&o&&(n.TgZ(0,"div",1),n.TgZ(1,"table",2),n.TgZ(2,"colgroup"),n._UZ(3,"col",3),n._UZ(4,"col",4),n.YNc(5,Q,1,0,"col",5),n.YNc(6,$,1,0,"col",5),n.qZA(),n.TgZ(7,"thead"),n.TgZ(8,"th"),n._uU(9,"Name"),n.qZA(),n.TgZ(10,"th"),n._uU(11,"Descriptions"),n.qZA(),n.YNc(12,F,2,0,"th",6),n.YNc(13,j,1,0,"th",7),n.qZA(),n.qZA(),n.TgZ(14,"div",15),n.TgZ(15,"table"),n.TgZ(16,"colgroup"),n._UZ(17,"col",3),n._UZ(18,"col",4),n.YNc(19,L,1,0,"col",5),n.YNc(20,B,1,0,"col",5),n.qZA(),n.TgZ(21,"tbody"),n.YNc(22,H,3,0,"tr",17),n.YNc(23,X,3,0,"tr",17),n.YNc(24,V,7,4,"tr",16),n.qZA(),n.qZA(),n.qZA(),n.qZA()),2&o){const t=n.oxw();n.xp6(5),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(6),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(6),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(1),n.Q6J("ngIf",!t.am_i_division_user),n.xp6(2),n.Q6J("ngIf",!(t.isLoading||t.hasReadMemberPermission&&t.hasReadRolePermission)),n.xp6(1),n.Q6J("ngIf",!(null!=t.filteredDivisionRoles&&t.filteredDivisionRoles.length)&&t.hasReadMemberPermission&&t.hasReadRolePermission),n.xp6(1),n.Q6J("ngForOf",t.filteredDivisionRoles)}}let tn=(()=>{class o{constructor(t,e){this.helper=t,this.c_components=e,this.users=[],this.globalRoles=[],this.divisionRoles=[],this.filteredGlobalRoles=[],this.filteredDivisionRoles=[],this.hasReadMemberPermission=!1,this.hasUpdateMemberPermission=!1,this.hasDeleteMemberPermission=!1,this.hasReadRolePermission=!1,this.hasUpdateRolePermission=!1,this.hasDeleteRolePermission=!1}ngOnChanges(t){t.search_text&&t.search_text.currentValue!==t.search_text.previousValue&&this.on_search_text_change()}watch(){this.members$w=this.helper.dealer_member.members$w().subscribe(t=>this.on_users_change(t)),this.roles$w=this.helper.dealer_role.roles$w().subscribe(t=>this.on_roles_change(t))}unwatch(){var t,e;null===(t=this.members$w)||void 0===t||t.unsubscribe(),null===(e=this.roles$w)||void 0===e||e.unsubscribe()}ngOnInit(){return(0,u.mG)(this,void 0,void 0,function*(){this.watch(),this.checkPermission(),yield this.load_data()})}ngOnDestroy(){this.unwatch()}checkPermission(){this.hasReadMemberPermission=this.helper.permission.has("dealer_member_read"),this.hasUpdateMemberPermission=this.helper.permission.has("dealer_member_update"),this.hasDeleteMemberPermission=this.helper.permission.has("dealer_member_delete"),this.hasReadRolePermission=this.helper.permission.has("dealer_role_read"),this.hasUpdateRolePermission=this.helper.permission.has("dealer_role_update"),this.hasDeleteRolePermission=this.helper.permission.has("dealer_role_delete")}on_search_text_change(){"global"===this.tab?this.update_filtered_global_roles():this.update_filtered_division_roles()}on_users_change(t){!t||(this.users=t)}on_roles_change(t){var e,i;!t||(null==t||t.forEach(r=>{var a,d;r.users=null===(a=this.users)||void 0===a?void 0:a.filter(p=>p.role_id==r.role_id),r.user_cnt=null===(d=r.users)||void 0===d?void 0:d.length}),this.globalRoles=null!==(e=t.filter(r=>!r.is_division_role))&&void 0!==e?e:[],this.divisionRoles=null!==(i=t.filter(r=>r.is_division_role))&&void 0!==i?i:[],this.update_filtered_global_roles(),this.update_filtered_division_roles())}load_data(){return(0,u.mG)(this,void 0,void 0,function*(){yield this.helper.dealer_member.load_members(),yield this.helper.dealer_role.load_roles();const t=yield this.helper.me.get_me();this.am_i_division_user=!!t.is_division_user})}update_filtered_global_roles(){if(!(0,m.isString)(this.search_text))return this.filteredGlobalRoles=this.globalRoles;const t=this.search_text.toLowerCase();if(t.length<2)return this.filteredGlobalRoles=this.globalRoles;this.filteredGlobalRoles=this.globalRoles.filter(e=>[e.name,e.description].join("").toLowerCase().includes(t))}update_filtered_division_roles(){if(!(0,m.isString)(this.search_text))return this.filteredDivisionRoles=this.divisionRoles;const t=this.search_text.toLowerCase();if(t.length<2)return this.filteredDivisionRoles=this.divisionRoles;this.filteredDivisionRoles=this.divisionRoles.filter(e=>[e.name,e.description].join("").toLowerCase().includes(t))}gotoDetail(t){this.am_i_division_user||this.helper.router.navigate_to(`/settings/permission-groups/${null==t?void 0:t.role_id}`)}openEditDialog(t){this.hasUpdateMemberPermission?this.c_components.dialog.open("dealer_role",{role_id:null==t?void 0:t.role_id}):this.c_components.dialog.open("warning",{header:"You do not have permission to edit the permission.",contents:"\n <p>\n Please contact your administrator to change the permission.\n </p>\n ",isConfirm:!0,submit_btn:"OK",submit_class:["button-primary"],submit_func:()=>{}})}openDeleteDialog(t){if(t.user_cnt)return this.showWarningForPermissionDeletionWithIncludedUsers();this.c_components.dialog.open("warning",{header:"Delete a Role",contents:`\n <p>Are you sure that you want to Delete a Role <b>${null==t?void 0:t.name}</b></p>\n `,submit_btn:"Delete",submit_class:["button-danger"],isInput:"Please type in the name of Permission group",confirmInput:null==t?void 0:t.name,submit_func:()=>{this.deleteRole(null==t?void 0:t.role_id)}})}showWarningForPermissionDeletionWithIncludedUsers(){this.c_components.dialog.open("warning",{header:"You cannot delete the permission.",contents:"\n <p>\n There are users included in the permission.<br/>\n To delete the permission, please change it to a different permission.\n </p>\n ",isConfirm:!0,submit_btn:"OK",submit_class:["button-primary"],submit_func:()=>{}})}deleteRole(t){return(0,u.mG)(this,void 0,void 0,function*(){!(yield this.helper.dealer_role.delete_role(t))||setTimeout(()=>{this.openConfirmDialog("Delete a Role","Delete a Role - success","done","green",!0)},300)})}openConfirmDialog(t="",e="",i="done",r="green",a=!1){this.c_components.dialog.open("warning",{header:t,contents:`\n <p>${e}</b></p>\n `,submit_btn:"OK",submit_class:["button-primary"],icon:i,isConfirm:!0,color:r,submit_func:()=>{a&&this.load_data()}})}openErrorDialog(t,e){let i="failed.";t.error&&t.error.message&&(i=t.error.message),t._body&&(i=JSON.parse(t._body).message),setTimeout(()=>{this.openConfirmDialog(e,i,"warning","orange")},200)}}return o.\u0275fac=function(t){return new(t||o)(n.Y36(_.W),n.Y36(P.I))},o.\u0275cmp=n.Xpm({type:o,selectors:[["c_dtable_permission_groups_component"]],inputs:{search_text:"search_text",tab:"tab"},features:[n.TTD],decls:2,vars:2,consts:[["class","table-container",4,"ngIf"],[1,"table-container"],[1,"table-header"],["width","30%"],["width","50%"],["width","10%",4,"ngIf"],["style","text-align: right",4,"ngIf"],[4,"ngIf"],["class","loader absolute",4,"ngIf"],["class","table-body",4,"ngIf"],["width","10%"],[2,"text-align","right"],[1,"loader","absolute"],["viewBox","25 25 50 50",1,"circular"],["cx","50","cy","50","r","20","fill","none","stroke-width","4","stroke-miterlimit","10",1,"path"],[1,"table-body"],["class","has-child",3,"click",4,"ngFor","ngForOf"],["style","text-align: center; color: #999;",4,"ngIf"],[2,"text-align","center","color","#999"],["colspan","11"],[1,"has-child",3,"click"],["style","text-align:right",4,"ngIf"],[1,"material-icons","icon-primary",3,"click"],[1,"material-icons","icon-warning",3,"click"]],template:function(t,e){1&t&&(n.YNc(0,G,16,6,"div",0),n.YNc(1,nn,25,9,"div",0)),2&t&&(n.Q6J("ngIf","global"===e.tab),n.xp6(1),n.Q6J("ngIf","division"===e.tab))},directives:[c.O5,c.sg],styles:['table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:50%;width:35px;height:35px}table.table-header[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;overflow-y:hidden}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{min-height:31px;background-color:#f7fafc;border-bottom:solid 1px rgba(0,0,0,.1);border-top:solid 1px rgba(0,0,0,.1);box-sizing:border-box;padding:0 6px}.table-container[_ngcontent-%COMP%] .table-header.no-top-border[_ngcontent-%COMP%]{border-top:0}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}table.table-header-v2[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 30px);flex:1;overflow-y:overlay}.table-container[_ngcontent-%COMP%] .no-record[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:7px 0}.has-child[_ngcontent-%COMP%]{cursor:pointer}.has-child[_ngcontent-%COMP%]:hover{background:#f0f0f0}.table-container[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;align-items:center}.table-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.table-container[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px;color:#56657bde;text-transform:uppercase;text-align:left;font-size:13px;font-weight:normal}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px rgba(0,0,0,.1) solid}.table-container[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.table-container[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:14px;color:#000000de;padding:7px;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;max-width:1vw}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.ellipsis[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}',".icon-primary[_ngcontent-%COMP%]{font-size:23px;color:#2383e2!important}.icon-primary[_ngcontent-%COMP%]:hover{color:#7bf!important}.icon-warning[_ngcontent-%COMP%]{font-size:23px;color:#dc143c!important}.icon-warning[_ngcontent-%COMP%]:hover{color:#fc3f65!important}"]}),o})();function en(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"div",11),n.NdJ("click",function(){return n.CHM(t),n.oxw().openCreateDialog()}),n.TgZ(1,"div",12),n._uU(2,"Add"),n.qZA(),n.qZA()}}function on(o,s){1&o&&n._UZ(0,"div",22)}function rn(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"div",19),n.NdJ("click",function(){const r=n.CHM(t).$implicit;return n.oxw(2).moveToTab(r)}),n.TgZ(1,"div",20),n._uU(2),n.qZA(),n.YNc(3,on,1,0,"div",21),n.qZA()}if(2&o){const t=s.$implicit,e=n.oxw(2);n.ekj("btn-selected",e.tab==t),n.xp6(2),n.Oqu(t),n.xp6(1),n.Q6J("ngIf",e.tab==t)}}function sn(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"div",13),n.YNc(1,rn,4,4,"div",14),n.TgZ(2,"div",15),n.TgZ(3,"i",16),n._uU(4,"search"),n.qZA(),n.TgZ(5,"input",17),n.NdJ("ngModelChange",function(i){return n.CHM(t),n.oxw().search_text=i}),n.qZA(),n.qZA(),n._UZ(6,"div",18),n.qZA()}if(2&o){const t=n.oxw();n.xp6(1),n.Q6J("ngForOf",t.tabList),n.xp6(4),n.Q6J("ngModel",t.search_text)}}function cn(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"div",15),n.TgZ(1,"i",16),n._uU(2,"search"),n.qZA(),n.TgZ(3,"input",17),n.NdJ("ngModelChange",function(i){return n.CHM(t),n.oxw().search_text=i}),n.qZA(),n._UZ(4,"div",18),n.qZA()}if(2&o){const t=n.oxw();n.xp6(3),n.Q6J("ngModel",t.search_text)}}let an=(()=>{class o{constructor(t,e){this.helper=t,this.c_components=e,this.tabList=["global","division"],this.tab=this.tabList[0],this.search_text="",this.roles=[]}watch(){this.roles$w=this.helper.dealer_role.roles$w().subscribe(t=>this.roles=t),this.dealer_plan$w=this.helper.dealer_plan.dealer_plan$w().subscribe(t=>this.on_dealer_plan_change(t))}unwatch(){var t,e;null===(t=this.roles$w)||void 0===t||t.unsubscribe(),null===(e=this.dealer_plan$w)||void 0===e||e.unsubscribe()}ngOnInit(){this.watch(),this.checkPermission()}ngOnDestroy(){this.unwatch()}checkPermission(){this.hasCreateRolePermission=this.helper.permission.has("dealer_role_create")}on_dealer_plan_change(t){!t||(this.hasPremiumOrResellerPlan=(null==t?void 0:t.current_month_service_plan_type)>2)}moveToTab(t){this.tab=t,this.search_text=""}openCreateDialog(){this.c_components.dialog.open("dealer_role",null)}}return o.\u0275fac=function(t){return new(t||o)(n.Y36(_.W),n.Y36(P.I))},o.\u0275cmp=n.Xpm({type:o,selectors:[["app-permission-groups"]],decls:12,vars:6,consts:[[1,"widget-area"],[1,"widget",2,"max-height","fit-content"],[1,"header"],[1,"title"],[1,"btn-area"],["class","button button-white",3,"click",4,"ngIf"],[1,"widget-body"],["class","division-tab",4,"ngIf"],["class","search-container",4,"ngIf"],[1,"item"],[2,"height","calc(100% - 30px)",3,"search_text","tab"],[1,"button","button-white",3,"click"],[1,"btn-inner"],[1,"division-tab"],["class","btn",3,"btn-selected","click",4,"ngFor","ngForOf"],[1,"search-container"],[1,"material-icons",2,"padding","6px 10px"],["autocomplete","off","type","text","placeholder","Search...",3,"ngModel","ngModelChange"],[1,"space"],[1,"btn",3,"click"],[1,"tab-title"],["class","tab-selected-bar",4,"ngIf"],[1,"tab-selected-bar"]],template:function(t,e){1&t&&(n.TgZ(0,"div",0),n.TgZ(1,"div",1),n.TgZ(2,"div",2),n.TgZ(3,"div",3),n._uU(4),n.qZA(),n.TgZ(5,"div",4),n.YNc(6,en,3,0,"div",5),n.qZA(),n.qZA(),n.TgZ(7,"div",6),n.YNc(8,sn,7,2,"div",7),n.YNc(9,cn,5,1,"div",8),n.TgZ(10,"div",9),n._UZ(11,"c_dtable_permission_groups_component",10),n.qZA(),n.qZA(),n.qZA(),n.qZA()),2&t&&(n.xp6(4),n.hij("Permission Group List (",(null==e.roles?null:e.roles.length)||0,")"),n.xp6(2),n.Q6J("ngIf",e.hasCreateRolePermission),n.xp6(2),n.Q6J("ngIf",e.hasPremiumOrResellerPlan),n.xp6(1),n.Q6J("ngIf",!e.hasPremiumOrResellerPlan),n.xp6(2),n.Q6J("search_text",e.search_text)("tab",e.tab))},directives:[c.O5,tn,c.sg,g.Fj,g.JJ,g.On],styles:['.scroll-screen[_ngcontent-%COMP%]{flex:1;flex-direction:column;overflow-y:overlay;height:100%;position:relative;padding:7px;-webkit-user-select:none;user-select:none;display:flex;align-items:center}.row[_ngcontent-%COMP%]{flex-direction:row;display:flex;height:100%;overflow-y:overlay;transition:.5s}.col[_ngcontent-%COMP%]{flex-direction:column;display:flex;flex:1;height:100%}.customer-widget-area[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{min-width:300px}.customer-widget-area[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:only-child{min-width:600px}.customer-widget-area.deactivated[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{height:calc(100% - 43px)}.col[_ngcontent-%COMP%] .widget[_ngcontent-%COMP%]{min-width:300px}.sub-nav[_ngcontent-%COMP%]{position:relative;left:0px;transition:all ease-in-out .3s;min-width:250px;max-width:250px;flex:1;background:#fff;border-right:.5px solid #d7d7d7;display:flex;flex-direction:column;overflow-y:overlay;z-index:3}.sub-nav[_ngcontent-%COMP%]:focus{outline:none}.sub-nav[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;flex:initial;align-items:center}.sub-nav[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{overflow-y:overlay}.sub-nav[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{padding:6px 12px 6px 0;box-sizing:border-box;border:0;background-color:transparent;background-size:24px;background-position:4px 8px;background-repeat:no-repeat;flex:1}.sub-nav[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{margin-right:8px;color:#777;transition:.2s}.sub-nav[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{cursor:pointer;color:#000}.sub-nav[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{background-color:red;color:#fff;width:8px;height:14px;margin-left:8px;padding:2px 4px 2px 5px;border-radius:4px;font-size:12px}.sub-nav[_ngcontent-%COMP%] .plan-badge[_ngcontent-%COMP%]{background-color:red;width:6px;height:6px;margin-left:4px;border-radius:10px}.sub-nav[_ngcontent-%COMP%] .list-category[_ngcontent-%COMP%]{padding:24px 0 7px 20px;color:#2f96fb;font-size:14px;text-transform:uppercase}.sub-nav[_ngcontent-%COMP%] .list-category[_ngcontent-%COMP%]:first-child{padding:30px 0 7px 20px;color:#2f96fb;font-size:14px}.sub-nav[_ngcontent-%COMP%] .list-item[_ngcontent-%COMP%]{display:flex;align-items:center;color:#0009;cursor:pointer}.sub-nav[_ngcontent-%COMP%] .list-item[_ngcontent-%COMP%]:hover{background:rgba(0,0,0,.05)}.sub-nav[_ngcontent-%COMP%] .list-item[_ngcontent-%COMP%]:hover.settings{background:transparent}.sub-nav[_ngcontent-%COMP%] .list-item-selected[_ngcontent-%COMP%]{background:#dcf0fd!important;color:#000000de}.sub-nav[_ngcontent-%COMP%] .list-item-selected[_ngcontent-%COMP%]:after{background-color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .list-item-selected.settings[_ngcontent-%COMP%]{background:transparent!important;color:#000000de;font-weight:500;color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .menu-label[_ngcontent-%COMP%]{display:flex;font-size:14px;padding:7px 0 7px 15px}.sub-nav[_ngcontent-%COMP%] .menu-label.settings[_ngcontent-%COMP%]{padding-left:16px;width:100%;margin:0 4px;border-radius:4px}.sub-nav[_ngcontent-%COMP%] .menu-label.settings[_ngcontent-%COMP%]:hover{padding:8px 16px;background:#e8eaed}.sub-nav[_ngcontent-%COMP%] .menu-label.settings.selected-label[_ngcontent-%COMP%]{width:100%;margin:0 4px;padding:8px 12px;border-radius:4px;font-weight:500;color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .menu-label.settings.selected-label[_ngcontent-%COMP%]:hover{padding:8px 12px;background:#dcf0fd}.sub-nav[_ngcontent-%COMP%] .select-mark[_ngcontent-%COMP%]{background-color:#2f96fb}.sub-nav[_ngcontent-%COMP%] .select-mark.settings[_ngcontent-%COMP%]{background-color:#2383e2;width:4px;min-height:30px;height:30px;border-radius:4px}.component-body[_ngcontent-%COMP%]{position:relative;flex:5;height:100%;flex-direction:column;display:flex;transition:all ease-in-out .3s}.component-body-no-data[_ngcontent-%COMP%]{flex:5;height:100%;flex-direction:column;align-items:center;justify-content:center;display:flex}.tab[_ngcontent-%COMP%]{height:60px;color:#888;background:#f7f7fc;box-shadow:0 4px 2px -2px #888;display:flex;align-items:center;z-index:1}.tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;position:relative}.tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#2383e2;cursor:pointer}.tab[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#2383e2}.tab[_ngcontent-%COMP%] .icn-button[_ngcontent-%COMP%]{padding:0 16px}.tab[_ngcontent-%COMP%] .icn-button-active[_ngcontent-%COMP%]{color:#000}.tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:0 32px;text-transform:capitalize;font-size:14px}.tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;bottom:-2px;width:100%;height:4px;background:#2383e2}.plan-upgrade-badge[_ngcontent-%COMP%]{background:linear-gradient(90deg,#2A517E 17.88%,#1E88E5 69.03%);border-radius:10px;padding:2px 6px;margin-left:-8px;color:#fff;font-size:12px;font-weight:400;cursor:pointer}.customer-tab[_ngcontent-%COMP%]{color:#7a7a7a;background:#fff;border-bottom:1px solid rgba(0,0,0,.1);display:flex;align-items:center;z-index:1;font-weight:500;font-size:14px;flex-flow:wrap}.customer-tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center;height:50px;position:relative;cursor:pointer}.customer-tab[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#1e88e5;font-weight:500}.customer-tab[_ngcontent-%COMP%] .icn-button[_ngcontent-%COMP%]{padding:0 16px}.customer-tab[_ngcontent-%COMP%] .icn-button-active[_ngcontent-%COMP%]{color:#000}.customer-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:8px 20px;text-transform:capitalize;font-size:14px;font-weight:400}.customer-tab[_ngcontent-%COMP%] .tab-title.selected[_ngcontent-%COMP%]{font-weight:500}.customer-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]:hover{background:#e8eaed;border-radius:7px}.customer-tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;bottom:-2px;width:100%;height:3px;background:#2383e2}.setting-tab[_ngcontent-%COMP%]{height:41px;box-sizing:border-box;color:#7a7a7a;background:#fff;display:flex;flex-direction:row;align-items:center;z-index:1;font-size:14px;font-weight:500;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.1);background-color:#fbfbfa}.setting-tab[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;position:relative;cursor:pointer}.setting-tab[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#000}.setting-tab[_ngcontent-%COMP%] .button-selected-red[_ngcontent-%COMP%]{color:#f67474}.setting-tab[_ngcontent-%COMP%] .icn-button[_ngcontent-%COMP%]{padding:0 16px}.setting-tab[_ngcontent-%COMP%] .icn-button-active[_ngcontent-%COMP%]{color:#000}.setting-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:5px 20px;text-transform:capitalize;font-size:13px;font-weight:400;margin:0 1px}.setting-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]:hover{background:#e8eaed;border-radius:5px}.setting-tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;height:4px;background:#2383e2;border-radius:4px}.setting-tab[_ngcontent-%COMP%] .tab-selected-bar-red[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0;height:5px;background:#f67474}.btn-icon[_ngcontent-%COMP%]{color:#7c7c7c;background-color:#f1f1f1;cursor:pointer}.btn-icon[_ngcontent-%COMP%]:hover{color:#7c7c7c;background-color:#efeff6}.space[_ngcontent-%COMP%]{flex:1}.sub-component[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;width:100%;height:100%}.widget-area[_ngcontent-%COMP%]{flex-direction:row;display:flex;height:100%;flex:1;overflow-y:overlay;padding:20px 30px;flex-wrap:wrap;justify-content:center;box-sizing:border-box}.customer-widget-area[_ngcontent-%COMP%]{position:absolute;height:auto;bottom:0;top:0;left:0;right:0;flex-direction:row;display:flex;flex:1;overflow:initial;padding:14px;box-sizing:border-box;flex-wrap:wrap;justify-content:center}.customer-widget-area.deactivated[_ngcontent-%COMP%]{padding:0 7px 7px}.wcs-widget-area[_ngcontent-%COMP%]{position:absolute;height:auto;bottom:0;top:0;left:0;right:0;flex-direction:row;display:flex;flex:1;overflow-y:overlay;padding:12px;flex-wrap:wrap;align-items:center;grid-gap:12px;gap:12px}.wcs-widget-area[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{align-items:center}.setting-widget[_ngcontent-%COMP%]{height:calc(100% - 44px)}.setting-router[_ngcontent-%COMP%]{width:100%;flex:1;position:relative;overflow:auto;overflow-y:overlay}.container[_ngcontent-%COMP%]{width:calc(100% - 14px);height:100%;display:flex;flex-direction:column;align-items:center;padding:7px}.widget[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;max-width:1400px;min-width:300px;max-height:calc(100% - 15px);background:white;transition:.5s;border-radius:3px;border:1px solid rgba(0,0,0,.1);margin:0 5px 10px}.widget[_ngcontent-%COMP%]:last-child{margin:0 5px}.widget[_ngcontent-%COMP%]:only-child{min-width:600px}.widget[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;border-bottom:solid 1px rgba(0,0,0,.1)}.widget[_ngcontent-%COMP%] .widget-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:calc(100% - 108px);padding:20px}.widget[_ngcontent-%COMP%] .widget-body[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{padding-bottom:14px}.widget-item[_ngcontent-%COMP%]{flex:none;font-size:14px;color:#000000de}.widget-item[_ngcontent-%COMP%] .widget-body[_ngcontent-%COMP%]{padding:14px 30px}.widget[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{font-size:14px;color:#0009;margin-bottom:7px}.widget[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:200px;font-size:14px;color:#0009}.widget[_ngcontent-%COMP%] .item-row[_ngcontent-%COMP%]{display:flex;padding:7px 0}.widget[_ngcontent-%COMP%] .bottom-line[_ngcontent-%COMP%]{border-bottom:solid 1px rgba(0,0,0,.1)}.scroll-widget[_ngcontent-%COMP%]{max-height:initial}.item[_ngcontent-%COMP%] .w-1[_ngcontent-%COMP%]{width:10%}.item[_ngcontent-%COMP%] .w-2[_ngcontent-%COMP%]{width:20%}.item[_ngcontent-%COMP%] .w-3[_ngcontent-%COMP%]{width:30%}.item[_ngcontent-%COMP%] .w-4[_ngcontent-%COMP%]{width:40%}.item[_ngcontent-%COMP%] .w-5[_ngcontent-%COMP%]{width:50%}.item[_ngcontent-%COMP%] .fs-12[_ngcontent-%COMP%]{font-size:12px}.item[_ngcontent-%COMP%] .right-align[_ngcontent-%COMP%]{text-align:right}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]{display:flex;padding:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;font-size:14px}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:80%;box-sizing:border-box;padding:8px;font-size:14px;background-color:#f0f0f0;border:none;border-bottom:2px solid #f0f0f0;-webkit-appearance:none;-moz-appearance:none;transition:.2s}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #2383e2}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{position:absolute;left:12px;top:12px;color:#00000080}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;padding-left:32px}.item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer}.cell[_ngcontent-%COMP%]{padding-bottom:14px}.widget[_ngcontent-%COMP%] .widget-bottom[_ngcontent-%COMP%]{display:flex;padding-top:6px}.table-area[_ngcontent-%COMP%]{height:100%;overflow:overlay}.table-container[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;overflow-y:hidden}table.table-header[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{min-height:31px;background-color:#f7fafc;border-bottom:solid 1px rgba(0,0,0,.1);border-top:solid 1px rgba(0,0,0,.1);box-sizing:border-box}.table-container[_ngcontent-%COMP%] .table-header.no-top-border[_ngcontent-%COMP%]{border-top:0}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}.table-container[_ngcontent-%COMP%] .table-header-v2[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding:7px 7px 7px 20px}.table-container[_ngcontent-%COMP%] .table-body-v2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:7px 20px 7px 7px}table.table-header-v2[_ngcontent-%COMP%]:after{border-collapse:separate}.table-container[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 30px);flex:1;overflow-y:overlay}.table-container[_ngcontent-%COMP%] .no-record[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:7px 0}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;font-size:16px;padding:12px 20px;color:#000000de}.header[_ngcontent-%COMP%] .btn-area[_ngcontent-%COMP%]{padding:7px 16px}.header[_ngcontent-%COMP%] .button-selected[_ngcontent-%COMP%]{color:#000}.header[_ngcontent-%COMP%] .button-disable[_ngcontent-%COMP%]:hover{color:#aaa;cursor:default;pointer-events:none}.header[_ngcontent-%COMP%] .button-primary[_ngcontent-%COMP%]{color:#1e90ff}.header[_ngcontent-%COMP%] .button-primary[_ngcontent-%COMP%]:hover{color:#30b0ff}.widget[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{flex:1;padding:14px 16px;overflow-y:overlay}.body-center[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.body-center[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{text-align:center}.body-center[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px;color:#2383e2}.body-center[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{margin-bottom:14px;font-size:14px;color:#0009;text-align:center;line-height:1.5}.body-center[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:8px;font-size:18px;color:#000000de}.body[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14px;color:#777}.body[_ngcontent-%COMP%] > .contents[_ngcontent-%COMP%]{font-size:15px;color:#333;margin-top:4px;padding:4px 0;display:flex;min-height:24px;align-items:center}.body[_ngcontent-%COMP%] .editable[_ngcontent-%COMP%]{border-bottom:1px solid #fff;transition:.5s}.body[_ngcontent-%COMP%] .editable[_ngcontent-%COMP%]:hover{cursor:text;border-bottom:1px solid #ccc}.body[_ngcontent-%COMP%] .selectbox[_ngcontent-%COMP%]{color:#777;padding:16px;box-shadow:0 0 2px #888;transition:.2s;cursor:pointer;display:flex;flex-direction:row}.body[_ngcontent-%COMP%] .selectbox[_ngcontent-%COMP%]:hover{color:#333;box-shadow:0 0 6px #888}.widget[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{margin:12px;padding:12px 12px 12px 36px;box-sizing:border-box;border:0;border-bottom:2px solid #ddd;background-color:transparent;background-image:url(/assets/icons/ic_search_72pt.png);background-size:24px;background-position:4px 8px;background-repeat:no-repeat;flex:1;transition:.3s}.widget[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #777}.widget[_ngcontent-%COMP%] .filter-area[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;flex-direction:row-reverse}.tab[_ngcontent-%COMP%] .combo-box[_ngcontent-%COMP%]{display:flex}.filter-area[_ngcontent-%COMP%] .combo-box[_ngcontent-%COMP%]{color:#777;font-size:14px;padding:0 8px 0 0;text-align:right;position:relative;cursor:pointer}.header[_ngcontent-%COMP%] .combo-box[_ngcontent-%COMP%]{color:#777;font-size:14px;text-align:right;position:relative;cursor:pointer}.combo-box[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{transition:.2s}.combo-box[_ngcontent-%COMP%] > .button-active[_ngcontent-%COMP%]{color:#000}.combo-box[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{vertical-align:middle}.combo-box-contents[_ngcontent-%COMP%]{position:absolute;right:16px;z-index:101;text-align:left;box-sizing:border-box;background-color:#fff;transition:.2s;box-shadow:0 2px 4px #00000080;border:solid 1px #d9d9d9;border-radius:5px}.combo-box-contents[_ngcontent-%COMP%] .items[_ngcontent-%COMP%]{cursor:pointer;padding:8px;color:#333;font-size:12px}.combo-box-contents[_ngcontent-%COMP%] .items[_ngcontent-%COMP%]:hover{background:#eee}.list[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;border-bottom:1px solid rgba(0,0,0,.1);min-height:28px;transition:.1s;padding:10px 20px}.list.locked-list[_ngcontent-%COMP%]{background-color:#f7fafc}.list-group[_ngcontent-%COMP%]:hover{background-color:#fafcff}.list-bottom-clear[_ngcontent-%COMP%]{border-bottom:none}.list-bottom-line[_ngcontent-%COMP%]{border-bottom:1px solid #aaa}.widget[_ngcontent-%COMP%] .list[_ngcontent-%COMP%]:hover{background:#f5f5f5;cursor:pointer}.widget[_ngcontent-%COMP%] .list.locked-list[_ngcontent-%COMP%]:hover{background:#F7FAFC;cursor:initial}.list[_ngcontent-%COMP%] > .contents[_ngcontent-%COMP%]{padding:12px 0;font-size:14px;color:#333;flex:1}.list[_ngcontent-%COMP%] > .stat-contents[_ngcontent-%COMP%]{padding:12px 0;float:right;font-size:13px;color:#aaa}.list[_ngcontent-%COMP%] > .button-contents[_ngcontent-%COMP%]{padding:12px 0;float:right;font-size:13px}.list[_ngcontent-%COMP%] > .button-contents[_ngcontent-%COMP%]:hover{opacity:.8}.list[_ngcontent-%COMP%] > .icon[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 10px 0 6px;height:40px}.list[_ngcontent-%COMP%] .status-bar[_ngcontent-%COMP%]{width:8px;background:#aaa}.contents[_ngcontent-%COMP%] > .contents-small[_ngcontent-%COMP%]{margin-left:4px;font-size:11px;color:#555}.contents[_ngcontent-%COMP%] .sub-contents[_ngcontent-%COMP%]{font-size:12px;color:#0009;margin-top:6px}.widget[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{height:initial;align-items:center}.widget[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.widget[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:10px 7px;color:#56657bde;text-transform:uppercase;text-align:left;font-size:13px;font-weight:normal}.widget[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px rgba(0,0,0,.1) solid}.widget[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child{border-bottom:none}.widget[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:14px;color:#000000de;padding:7px}td[_ngcontent-%COMP%] .sub-contents[_ngcontent-%COMP%]{font-size:11px;color:#888;margin-top:4px}td[_ngcontent-%COMP%] .edit-btn[_ngcontent-%COMP%]{cursor:pointer;color:#1e90ff}td[_ngcontent-%COMP%] .delete-btn[_ngcontent-%COMP%]{cursor:pointer;color:#f1556c}table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{float:right;color:#bbb;transition:.2s;cursor:pointer}table[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#333}table[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:50%;width:35px;height:35px}.div-table-header[_ngcontent-%COMP%]{display:flex;height:30px;border-style:solid;border-width:1px;border-image-source:linear-gradient(to bottom,#dfdfdf,#bcbcbc);border-image-slice:1;border-collapse:separate;background-image:linear-gradient(to bottom,#f7f7f7,#ececed);font-size:14px;align-items:center}.div-table-header[_ngcontent-%COMP%] .div-table-head[_ngcontent-%COMP%]{padding:7px 16px}.face[_ngcontent-%COMP%]{border-radius:50%;width:28px;height:28px;display:inline-block;margin-right:8px;vertical-align:middle}.folding-list[_ngcontent-%COMP%]{cursor:pointer}.folding-list[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:8px}.folding-list[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]{color:#555;font-size:16px;padding:12px 0;border-bottom:1px solid #aaa;transition:.1s;height:54px}.folding-list[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]:hover{background:#f5f5f5}.folding-list[_ngcontent-%COMP%] .sub-list-title[_ngcontent-%COMP%]{margin-left:16px;padding:12px 0 4px;color:#777;font-size:12px;font-weight:bold;border-bottom:1px solid #ccc;display:flex}.folding-list[_ngcontent-%COMP%] .sub-list[_ngcontent-%COMP%]{margin-left:16px;padding:8px 0;color:#333;font-size:14px;border-bottom:1px solid #ccc;transition:.1s;display:flex}.folding-list[_ngcontent-%COMP%] .sub-list[_ngcontent-%COMP%]:hover{background:#f5f5f5}.folding-list[_ngcontent-%COMP%] .sub-list-selected[_ngcontent-%COMP%]{background:#f5f5f5}.empty-contents[_ngcontent-%COMP%]{font-size:16px;color:#bbb;font-weight:bold;text-transform:uppercase}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1;box-sizing:border-box;padding:4px;border:0;border-bottom:1px solid #ccc;background:rgba(0,0,0,0);transition:.2s}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none;border-bottom:1px solid #777}.body[_ngcontent-%COMP%] .hidden-input[_ngcontent-%COMP%]{padding:4px 0;border-bottom:1px solid #fff;background:rgba(0,0,0,0)}.body[_ngcontent-%COMP%] .hidden-input[_ngcontent-%COMP%]:hover{border-bottom:1px solid #777}.dropdown[_ngcontent-%COMP%]{font-size:14px;position:relative;flex:1}.dropdown-contents[_ngcontent-%COMP%]{position:absolute;width:100%;margin-top:8px;left:0px;z-index:100;text-align:left;box-sizing:border-box;background-color:#fff;box-shadow:0 1px 13px 1px #0003;transition:.2s}.dropdown-contents[_ngcontent-%COMP%] > .list-item[_ngcontent-%COMP%]{cursor:pointer;padding:8px;color:#333;font-size:14px;display:flex;align-items:center}.dropdown-contents[_ngcontent-%COMP%] > .list-item[_ngcontent-%COMP%]:hover{background:#eee}.dropdown[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;background:rgba(0,0,0,0)}.face[_ngcontent-%COMP%]{border-radius:50%;width:32px;height:32px;margin-right:8px}.no-face[_ngcontent-%COMP%]{border-radius:50%;width:38x;height:38px;min-width:38px;min-height:38px;background-color:#ccc;display:inline-block;margin-right:8px;vertical-align:middle;color:#fff;text-align:center;text-transform:uppercase}.calendar[_ngcontent-%COMP%]{width:100%}.contents[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{color:#777;transition:.2s;cursor:pointer}.contents[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]:hover{color:#333}.list[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{display:flex;width:32px;height:32px;justify-content:center;align-items:center;padding:5px;color:#777;transition:.2s;cursor:pointer;border-radius:21px}.list[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]:hover{color:#333;background:rgba(0,0,0,.05)}.btn-danger[_ngcontent-%COMP%]{color:#f1556d}.btn-danger[_ngcontent-%COMP%]:hover{color:#f47185}.svg-icon[_ngcontent-%COMP%]{font-size:24px;color:#000;width:1em;height:1em;position:relative}.svg-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:currentColor;width:100%;height:100%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.png-icon[_ngcontent-%COMP%]{width:36px;height:36px;position:relative}.png-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.child-item[_ngcontent-%COMP%]{padding-left:24px}.title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:4px}.widget[_ngcontent-%COMP%] .has-child[_ngcontent-%COMP%]:hover{background:#f5f5f5;cursor:pointer}.body[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{flex:1;background:white;box-sizing:border-box;margin-top:8px;padding:4px 0;border:0;border-bottom:1px solid #ccc;transition:.2s}.body[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-bottom:1px solid #777}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.absolute[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px);z-index:10}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.path.white[_ngcontent-%COMP%]{stroke:#fff}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.list-item[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{position:relative;background-color:#2383e2;border:none;font-size:14px;color:#fff;padding:8px 16px;margin-left:8px;text-align:center;transition-duration:.4s;text-decoration:none;overflow:hidden;cursor:pointer;outline:none}.list-item[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#fff}.content-list[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{position:relative;background-color:#2383e2;border:none;font-size:14px;color:#fff;padding:8px 16px;margin-left:8px;text-align:center;transition-duration:.4s;text-decoration:none;overflow:hidden;cursor:pointer;outline:none}.title-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin-top:28px}.title-row[_ngcontent-%COMP%] .list-title[_ngcontent-%COMP%]{flex:1;color:#777;padding-top:12px;justify-content:center}.title-row[_ngcontent-%COMP%] .tail[_ngcontent-%COMP%]{flex:1;text-align:right}.disabled[_ngcontent-%COMP%]{cursor:default;filter:contrast(60%) brightness(1.2);opacity:1;pointer-events:none;-webkit-user-select:none;user-select:none}.input-err[_ngcontent-%COMP%]{outline:none;background-color:#fbd0d6;box-shadow:0 0 0 2px #f1556c}.page-item[_ngcontent-%COMP%]{padding-bottom:14px!important}.unselectable[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.pager[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:14px;color:#0009}.pager[_ngcontent-%COMP%] .page-info[_ngcontent-%COMP%]{display:flex;align-items:center;min-width:80px;padding-left:16px}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 0 0 28px}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;color:#0009}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn[_ngcontent-%COMP%]:hover{color:#000000de}.pager[_ngcontent-%COMP%] .page-mover[_ngcontent-%COMP%] .page-btn.mover-disabled[_ngcontent-%COMP%]{cursor:initial;color:#0000004d}.pager[_ngcontent-%COMP%] .page-all[_ngcontent-%COMP%]{display:flex;align-items:center;padding-right:15px}.inner-input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:6px 8px;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:5px;font-size:14px;transition:.2s;text-indent:0px;font-weight:400}.top-noti[_ngcontent-%COMP%]{width:100%;min-height:36px;display:flex;flex-direction:row;justify-content:center;align-items:center;margin-bottom:7px;background-color:#fcf9e9;font-size:14px;color:#000000de;border-bottom:rgba(0,0,0,.1)}','.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}.permission-container[_ngcontent-%COMP%]{color:#aaa;text-transform:capitalize}.permission-container[_ngcontent-%COMP%] .permission-box[_ngcontent-%COMP%]{padding-left:24px}.permission-container[_ngcontent-%COMP%] .fold[_ngcontent-%COMP%]{height:0px}.permission-container[_ngcontent-%COMP%] .selected[_ngcontent-%COMP%]{color:#000}.permission-container[_ngcontent-%COMP%] .group-name[_ngcontent-%COMP%]{font-size:16px}.permission-container[_ngcontent-%COMP%] .permission-name[_ngcontent-%COMP%]{font-size:14px}.search-container[_ngcontent-%COMP%]{margin:4px 0}.transition[_ngcontent-%COMP%]{transition:.3s}.transition.rotate-reverse[_ngcontent-%COMP%]{transform:rotate(180deg)}.fold[_ngcontent-%COMP%]{display:none}.select-icon[_ngcontent-%COMP%]{vertical-align:middle;cursor:pointer;color:#2383e2}.icon[_ngcontent-%COMP%]{vertical-align:middle;cursor:pointer;color:#000}.btn[_ngcontent-%COMP%]{cursor:pointer;transition:.3s;border-radius:5px;font-family:Roboto;font-size:15px}.btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:18px}.btn.active[_ngcontent-%COMP%]{background:#2383e2;color:#fff;cursor:pointer}.btn.active[_ngcontent-%COMP%]:hover{background:#66b3ff}.btn.warning[_ngcontent-%COMP%]{background:red;color:#fff}.btn.warning[_ngcontent-%COMP%]:hover{background:#ff4d4d}.w-1[_ngcontent-%COMP%]{width:10%}.icon-btn[_ngcontent-%COMP%]{cursor:pointer;color:#878787;transition:.3s}.icon-btn[_ngcontent-%COMP%]:hover{color:#4d4c4c}.icon-btn.active[_ngcontent-%COMP%]{color:#2383e2}.icon-btn.active[_ngcontent-%COMP%]:hover{color:#66b3ff}.icon-btn.warning[_ngcontent-%COMP%]{color:red}.icon-btn.warning[_ngcontent-%COMP%]:hover{color:#ff4d4d}.icon-primary[_ngcontent-%COMP%]{font-size:23px;color:#2383e2!important}.icon-primary[_ngcontent-%COMP%]:hover{color:#7bf!important}.icon-warning[_ngcontent-%COMP%]{font-size:23px;color:#dc143c!important}.icon-warning[_ngcontent-%COMP%]:hover{color:#fc3f65!important}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:48px auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.loading[_ngcontent-%COMP%]{background-color:#eee}.flex[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.flex[_ngcontent-%COMP%] .w-1[_ngcontent-%COMP%]{flex:1}.flex[_ngcontent-%COMP%] .w-2[_ngcontent-%COMP%]{flex:2}.flex[_ngcontent-%COMP%] .w-3[_ngcontent-%COMP%]{flex:3}.flex[_ngcontent-%COMP%] .w-4[_ngcontent-%COMP%]{flex:4}.fs-22[_ngcontent-%COMP%]{font-size:22}.perm-warning[_ngcontent-%COMP%]{color:#cd3d64}.perm-tag[_ngcontent-%COMP%]{padding:4px 8px;border-radius:8px;margin:0 4px 4px 0;background:#f5925e;color:#fff;font-size:12px;cursor:pointer}.perm-tag[_ngcontent-%COMP%]:hover{background:#f7ae87;transition:all .2s}.perm-allow[_ngcontent-%COMP%]{color:#1ea675}.tooltip-content[_ngcontent-%COMP%]{position:relative}.tooltip-content[_ngcontent-%COMP%] .tooltip-icon[_ngcontent-%COMP%]{cursor:pointer;margin-left:7px;font-size:18px;color:#0009}.tooltip-content[_ngcontent-%COMP%]:hover .tooltip[_ngcontent-%COMP%]{visibility:visible;opacity:1}.tooltip-content[_ngcontent-%COMP%] .tooltip[_ngcontent-%COMP%]{min-width:200px;visibility:hidden;background-color:#0009;color:#fff;padding:10px;border-radius:6px;font-size:13px;position:absolute;z-index:1;top:25px;left:50%;margin-left:-38px;opacity:0;transition:opacity .3s}.tooltip-content[_ngcontent-%COMP%] .tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-10px;left:41px;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent rgba(0,0,0,.6) transparent}.division-tab[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;height:46px}.division-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;position:relative}.division-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{color:#2383e2;cursor:pointer}.division-tab[_ngcontent-%COMP%] .btn-selected[_ngcontent-%COMP%]{color:#2383e2;background:transparent}.division-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:0 32px;text-transform:uppercase;font-size:14px}.division-tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;bottom:0px;width:100%;height:4px;background:#2383e2}'],data:{animation:[b.cN]}}),o})();var h=l(72898),C=l(7611),M=l(83522),ln=l(55893),dn=l(56880),O=l(21929);function gn(o,s){if(1&o&&(n.TgZ(0,"div",23),n._uU(1),n.qZA()),2&o){const t=n.oxw();n.xp6(1),n.Oqu(t.modal.data.err)}}function pn(o,s){1&o&&(n.TgZ(0,"div",24),n.O4$(),n.TgZ(1,"svg",25),n._UZ(2,"circle",26),n.qZA(),n.qZA())}let _n=(()=>{class o{constructor(t,e){this.usersService=t,this.rolesService=e,this.onClose=new n.vpe,this.isLoading=!1,this.m_warning=new h.u,this.isEditMode=!1,this.selRole={}}ngOnInit(){this.usersService.getMe().subscribe(t=>{this.me=t})}ngOnChanges(t){t.active&&this.active&&(this.selRole={},this.isLoading=!1,this.modal.data.role?(this.selRole=this.modal.data.role,this.isEditMode=!0,this.setEditData()):this.isEditMode=!1)}setEditData(){this.modal.data.name=this.selRole.name,this.modal.data.description=this.selRole.description}closeModal(t=!1){setTimeout(()=>{this.onClose.next(t)},300),this.modal.close()}create(){const t=this.me.dealer_id,e={name:this.modal.data.name,description:this.modal.data.description};let i=this.isEditMode?"Edit":"Create";const r=`${i} a Role`,a=`${i} a Role ${name} - Success.`;this.isLoading=!0,this.isEditMode?this.rolesService.editRole(t,this.selRole.role_id,e).subscribe(p=>{this.isLoading=!1,this.confirmDialog(r,a)},p=>{this.errorDialog(p,r)}):this.rolesService.createRole(t,e).subscribe(d=>{this.isLoading=!1,this.confirmDialog(r,a)},d=>{this.errorDialog(d,r)})}confirmDialog(t="",e="",i="done",r="green"){this.m_warning.data={header:t,contents:`\n <p>${e}</b></p>\n `,submit_btn:"OK",submit_class:["button-primary"],icon:i,isConfirm:!0,color:r},this.m_warning.data.submit_func=()=>{"green"===r&&this.closeModal(!0)},this.m_warning.open()}errorDialog(t,e){let i="failed.";t.error&&t.error.message&&(i=t.error.message),t._body&&(i=JSON.parse(t._body).message),setTimeout(()=>{this.confirmDialog(e,i,"warning","orange")},200),this.isLoading=!1}}return o.\u0275fac=function(t){return new(t||o)(n.Y36(C.f),n.Y36(M.f))},o.\u0275cmp=n.Xpm({type:o,selectors:[["dealer-role-create"]],inputs:{modal:"modal",active:"active",role:"role"},outputs:{onClose:"onClose"},features:[n.TTD],decls:32,vars:11,consts:[[1,"disable-full-screen"],[1,"background",3,"click"],[1,"container-center"],[1,"modal"],[1,"modal-header"],[1,"modal-header-txt"],[2,"position","relative"],[1,"title-close"],[1,"material-icons",3,"click"],[1,"items-area"],[1,"item","row"],[1,"f-1","v-center"],[1,"f-2"],["autocomplete","off","type","text","placeholder","Name",3,"ngModel","ngModelChange"],[1,"f-1"],["placeholder","Description","rows","4",3,"ngModel","ngModelChange"],["class","contents warning",4,"ngIf"],[1,"tail-btn-area"],[1,"button","button-primary",3,"click"],[1,"btn-inner"],[1,"button",3,"click"],["class","loader absolute",4,"ngIf"],[3,"modal"],[1,"contents","warning"],[1,"loader","absolute"],["viewBox","25 25 50 50",1,"circular"],["cx","50","cy","50","r","20","fill","none","stroke-width","4","stroke-miterlimit","10",1,"path"]],template:function(t,e){1&t&&(n.TgZ(0,"div",0),n.TgZ(1,"div",1),n.NdJ("click",function(){return e.closeModal()}),n.qZA(),n.TgZ(2,"div",2),n.TgZ(3,"div",3),n.TgZ(4,"div",4),n.TgZ(5,"div",5),n._uU(6),n.qZA(),n.TgZ(7,"div",6),n.TgZ(8,"div",7),n.TgZ(9,"i",8),n.NdJ("click",function(){return e.closeModal()}),n._uU(10,"close"),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n.TgZ(11,"div",9),n.TgZ(12,"div",10),n.TgZ(13,"div",11),n._uU(14,"Name"),n.qZA(),n.TgZ(15,"div",12),n.TgZ(16,"input",13),n.NdJ("ngModelChange",function(r){return e.modal.data.name=r}),n.qZA(),n.qZA(),n.qZA(),n.TgZ(17,"div",10),n.TgZ(18,"div",14),n._uU(19,"Description"),n.qZA(),n.TgZ(20,"div",12),n.TgZ(21,"textarea",15),n.NdJ("ngModelChange",function(r){return e.modal.data.description=r}),n.qZA(),n.qZA(),n.qZA(),n.YNc(22,gn,2,1,"div",16),n.qZA(),n.TgZ(23,"div",17),n.TgZ(24,"div",18),n.NdJ("click",function(){return e.create()}),n.TgZ(25,"div",19),n._uU(26),n.qZA(),n.qZA(),n.TgZ(27,"div",20),n.NdJ("click",function(){return e.closeModal()}),n.TgZ(28,"div",19),n._uU(29,"Cancel"),n.qZA(),n.qZA(),n.qZA(),n.YNc(30,pn,3,0,"div",21),n.qZA(),n.qZA(),n.qZA(),n._UZ(31,"dealer-warning",22)),2&t&&(n.Udp("opacity",e.modal.is_active?100:0)("visibility",e.modal.is_active?"visible":"hidden"),n.xp6(6),n.hij("",e.isEditMode?"Edit":"Create"," a Role"),n.xp6(10),n.Q6J("ngModel",e.modal.data.name),n.xp6(5),n.Q6J("ngModel",e.modal.data.description),n.xp6(1),n.Q6J("ngIf",e.modal.data.err),n.xp6(4),n.Oqu(e.isEditMode?"Edit":"Create"),n.xp6(4),n.Q6J("ngIf",e.isLoading),n.xp6(1),n.Q6J("modal",e.m_warning))},directives:[g.Fj,g.JJ,g.On,c.O5,O.a],styles:['.disable-full-screen[_ngcontent-%COMP%]{top:0;left:0;width:100%;height:100%;position:fixed;visibility:hidden;opacity:0;transition:.2s;z-index:101}.disable-full-screen[_ngcontent-%COMP%] > .background[_ngcontent-%COMP%]{position:absolute;background-color:#00000080;top:0;left:0;width:100%;height:100%;z-index:1}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;bottom:0;left:0;right:0;background-color:#0000004d;z-index:1}.container-center[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}.body[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;height:48px;padding:0 16px}.body[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:inline-block;font-size:20px;color:#fff;text-transform:uppercase}.body[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:4px}.body[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{font-size:12px;color:#fffc;padding:8px 0 32px;line-height:.8}.body[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{flex:1}.body[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{float:right;margin-left:8px;color:#fffc;transition:.1s}.body[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#fff;cursor:pointer}.body[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:14px;color:#777;margin-top:28px}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:14px;flex:1 1 auto;box-sizing:border-box;padding:6px 0 4px;border:0;border-bottom:2px solid #ddd;background:rgba(0,0,0,0);transition:.2s}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 3px #1f8fff61;outline:none}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%] .err[_ngcontent-%COMP%]{outline:none;border-bottom:2px solid #D25074}.body[_ngcontent-%COMP%] input[_ngcontent-%COMP%] .err[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #D25074}.body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{font:400 14px Arial;resize:none;flex:1 1 auto;box-sizing:border-box;padding:6px 0 4px;border:0;border-bottom:2px solid #ddd;background:rgba(0,0,0,0);transition:.2s}.body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 3px #1f8fff61;outline:none}.body[_ngcontent-%COMP%] .hidden-input[_ngcontent-%COMP%]{border-bottom:2px solid #fff;background:rgba(0,0,0,0) #b87272}.body[_ngcontent-%COMP%] .hidden-input[_ngcontent-%COMP%]:hover{border-bottom:2px solid #777}.body[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%;min-height:24px;background:white;box-sizing:border-box;margin-top:8px;padding:4px 0;border:0;border-bottom:1px solid #ccc;transition:.2s}.body[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-bottom:1px solid #777}.body[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]{width:100%;min-height:24px;font-size:14px;color:#333;margin-top:12px;padding:4px 0;display:flex;align-items:center}.body[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{margin-right:8px}.body[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]{color:#777;transition:.2s;cursor:pointer}.body[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%] > .button[_ngcontent-%COMP%]:hover{color:#333}.body[_ngcontent-%COMP%] .contents-selectable[_ngcontent-%COMP%]{cursor:pointer}.body[_ngcontent-%COMP%] .contents-selectable[_ngcontent-%COMP%]:hover{background:#f0f0f0}.body[_ngcontent-%COMP%] > .editable[_ngcontent-%COMP%]{border-bottom:1px solid #fff;transition:.5s}.body[_ngcontent-%COMP%] > .editable[_ngcontent-%COMP%]:hover{cursor:text;border-bottom:1px solid #ccc}.body[_ngcontent-%COMP%] > .warning[_ngcontent-%COMP%]{color:#f55}.modal[_ngcontent-%COMP%]{width:100%;max-width:600px;background:white;box-shadow:0 4px 8px #777;z-index:2;border-radius:5px}.modal[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%]{display:flex;height:50px;justify-content:space-between;border-bottom:.5px solid rgba(0,0,0,.1)}.modal[_ngcontent-%COMP%] .modal-header[_ngcontent-%COMP%] .modal-header-txt[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:16px}.modal[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%]{display:flex;height:50px;justify-content:space-between;background-color:#f7fafc;border-radius:5px 5px 0 0}.modal[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:inline-block;font-size:20px;color:#fff;text-transform:uppercase}.modal[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:4px}.modal[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{font-size:12px;color:#fffc;padding:8px 0 32px;line-height:.8}.modal[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{flex:1}.modal[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{float:right;margin-left:8px;color:#fffc;transition:.1s}.modal[_ngcontent-%COMP%] > .header[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#fff;cursor:pointer}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%]{flex:1;display:block;overflow-y:overlay;padding:30px 20px 20px;border-bottom:.5px solid rgba(0,0,0,.1);background-color:#f8fafc;display:flex;flex-direction:column;font-size:14px}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#0009;font-size:12px}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:8px;background-color:#fff;border:1px solid #eeeeee;font-size:14px;transition:.2s;text-indent:0px;font-weight:400;resize:none}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{font-size:14px}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{outline:none;border:1px solid #2383e2}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{padding-bottom:20px}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:7px 10px;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:5px;font-size:14px;transition:.2s;text-indent:0px;font-weight:400}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 3px #1f8fff61;outline:none}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.err[_ngcontent-%COMP%]{outline:none;background-color:#fbd0d6;box-shadow:0 0 0 2px #d25074}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.err[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 2px #d25074}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.dark[_ngcontent-%COMP%]{background-color:#f5f5f5}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.dark[_ngcontent-%COMP%]:focus{background-color:#fff}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.disabled[_ngcontent-%COMP%]{background-color:#eee;opacity:1}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.err[_ngcontent-%COMP%]{outline:none;border:1px solid #D25074!important;background-color:#fff!important}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.correct[_ngcontent-%COMP%]{border:solid 1px #e0e0e0;background-color:#e5f2ff}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:#0000004d}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.input-err[_ngcontent-%COMP%]{outline:none;background-color:#fbd0d6;box-shadow:0 0 0 2px #f1556c}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] input.input-err[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 2px #f1556c}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item[_ngcontent-%COMP%] .site-search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-bottom:0;border:none;outline:none;background-color:transparent}.modal[_ngcontent-%COMP%] .items-area[_ngcontent-%COMP%] .item.pb-0[_ngcontent-%COMP%]{padding-bottom:0}.modal[_ngcontent-%COMP%] > .body[_ngcontent-%COMP%]{padding:16px 32px;display:flex;flex-direction:column;max-height:800px;overflow-y:overlay}.modal[_ngcontent-%COMP%] > .body-center[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;max-height:800px;overflow-y:overlay}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse;justify-content:center;padding:0 32px 30px}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .space[_ngcontent-%COMP%]{flex:1}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{padding:7px 14px;color:#888;font-size:14px;font-weight:500;transition:.2s;text-transform:capitalize;border-radius:5px}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]:hover{color:#000;cursor:pointer}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-primary[_ngcontent-%COMP%]{background:#2383e2;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-primary[_ngcontent-%COMP%]:hover{background:#2ea0ff;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-warning[_ngcontent-%COMP%]{background:orange;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-warning[_ngcontent-%COMP%]:hover{background:#ffb938;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-disable[_ngcontent-%COMP%]{background:#ddd;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-disable[_ngcontent-%COMP%]:hover{background:#ddd;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-danger[_ngcontent-%COMP%]{background:#f1556d;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-danger[_ngcontent-%COMP%]:hover{background:#f47185;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-normal[_ngcontent-%COMP%]{background:#d1d2d2;color:#fff}.modal[_ngcontent-%COMP%] > .tail[_ngcontent-%COMP%] .button-normal[_ngcontent-%COMP%]:hover{background:#b2b3b3;color:#fff}.dropdown[_ngcontent-%COMP%]{font-size:14px;position:relative;flex:1}.dropdown[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;background:rgba(0,0,0,0)}.dropdown-contents[_ngcontent-%COMP%]{position:absolute;width:100%;margin-top:8px;left:0px;z-index:100;text-align:left;box-sizing:border-box;background-color:#fff;box-shadow:0 1px 13px 1px #0003;transition:.2s}.dropdown-contents[_ngcontent-%COMP%] > .list-item[_ngcontent-%COMP%]{cursor:pointer;padding:8px;color:#333;font-size:14px;display:flex;align-items:center}.dropdown-contents[_ngcontent-%COMP%] > .list-item[_ngcontent-%COMP%]:hover{background:#eee}.face[_ngcontent-%COMP%]{border-radius:50%;width:32px;height:32px;margin-right:8px}.no-face[_ngcontent-%COMP%]{border-radius:50%;width:32px;height:32px;background-color:#ccc;display:inline-block;margin-right:8px;vertical-align:middle;color:#fff;text-align:center;text-transform:uppercase}.calendar[_ngcontent-%COMP%]{width:100%}.dropdown-background[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1}.disabled[_ngcontent-%COMP%]{opacity:.6;cursor:default;pointer-events:none}.inactive[_ngcontent-%COMP%]{pointer-events:none;filter:grayscale(.3);opacity:.8}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.title-close[_ngcontent-%COMP%]{position:absolute;display:flex;top:3px;right:6px;width:45px;height:45px;align-items:center;justify-content:center;font-size:14px;color:#0009;cursor:pointer;transition:.2s}.title-close[_ngcontent-%COMP%]:hover{background-color:#f7f7f7;border-radius:22px}.tail-btn-area[_ngcontent-%COMP%]{border-radius:5px;padding:12px 20px}.row[_ngcontent-%COMP%]{display:flex}.row.between[_ngcontent-%COMP%]{justify-content:space-between}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}table.table-header[_ngcontent-%COMP%]{min-height:31px;background-color:#f7fafc;border-bottom:solid 1px rgba(0,0,0,.1);border-top:solid 1px rgba(0,0,0,.1);box-sizing:border-box}table.table-header[_ngcontent-%COMP%]:after{border-collapse:separate}table[_ngcontent-%COMP%] .table-body[_ngcontent-%COMP%]{width:100%;flex:1;overflow-y:overlay;overflow-x:hidden}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:relative;padding:10px 7px;color:#000000de;text-transform:capitalize;text-align:left;font-size:12px;font-weight:normal;-webkit-user-select:none;user-select:none}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{padding:10px 7px 10px 20px}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child{padding:10px 20px 10px 7px}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:14px;color:#0009;border-bottom:1px rgba(0,0,0,.1) solid;padding:14px}.selectable[_ngcontent-%COMP%]{cursor:pointer}.selectable[_ngcontent-%COMP%]:hover{background:#f0f0f0}','.input[_ngcontent-%COMP%]{font-size:14px;flex:1 1 auto;box-sizing:border-box;padding:6px 0 4px;border:0;border-bottom:2px solid #ddd;background:rgba(0,0,0,0);transition:.2s}.input[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #2383e2}.iti-flag[_ngcontent-%COMP%]{background-image:url(/imgs/us.png)}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.iti-flag[_ngcontent-%COMP%]{background-image:url(/imgs/us.png)}}.form-control[_ngcontent-%COMP%]{border:none!important;width:50%}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:48px auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.loading[_ngcontent-%COMP%]{background-color:#eee}.modal-textarea[_ngcontent-%COMP%]{background-color:#efefef!important;border-top:1px solid #ddd!important;border-left:1px solid #ddd!important;border-right:1px solid #ddd!important;padding-left:4px!important}']}),o})();function mn(o,s){if(1&o&&(n.TgZ(0,"div"),n.TgZ(1,"span"),n._uU(2),n.qZA(),n.qZA()),2&o){const t=s.$implicit;n.xp6(2),n.hij("-",t.name,"")}}function fn(o,s){1&o&&(n.TgZ(0,"div"),n.TgZ(1,"span",42),n.TgZ(2,"b"),n._uU(3,"Allowed"),n.qZA(),n.qZA(),n.qZA())}function bn(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"div",47),n.NdJ("click",function(){const r=n.CHM(t).$implicit;return n.oxw(2).addMonitoringPermission(r)}),n.TgZ(1,"span"),n._uU(2),n.qZA(),n.qZA()}if(2&o){const t=s.$implicit;n.Q6J("title","Permission Group: "+t.groupName),n.xp6(2),n.Oqu(t.name)}}function xn(o,s){if(1&o&&(n.TgZ(0,"div",43),n.TgZ(1,"span",44),n.TgZ(2,"b"),n._uU(3,"Permissions Required"),n.qZA(),n.qZA(),n.TgZ(4,"div",45),n.YNc(5,bn,3,2,"div",46),n.qZA(),n.qZA()),2&o){const t=n.oxw();n.xp6(5),n.Q6J("ngForOf",t.unselMonitoringPerms)}}function un(o,s){if(1&o&&(n.TgZ(0,"option",48),n._uU(1),n.qZA()),2&o){const t=s.$implicit;n.Q6J("ngValue",t),n.xp6(1),n.Oqu(t.name)}}function hn(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"div",57),n.NdJ("click",function(){const r=n.CHM(t).$implicit,a=n.oxw().$implicit;return n.oxw().updatePermission(r,a)}),n.TgZ(1,"i",58),n._uU(2),n.qZA(),n.TgZ(3,"span",59),n._uU(4),n.qZA(),n.qZA()}if(2&o){const t=s.$implicit;n.ekj("selected",t.isSelect),n.xp6(2),n.Oqu(t.isSelect?"check_box":"check_box_outline_blank"),n.xp6(2),n.Oqu(t.name)}}function Pn(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"div",49),n.TgZ(1,"div",50),n.TgZ(2,"div",51),n.NdJ("click",function(){const r=n.CHM(t).$implicit;return r.isUnfold=!r.isUnfold}),n.TgZ(3,"i",52),n.NdJ("click",function(i){const a=n.CHM(t).$implicit,d=n.oxw();return i.stopPropagation(),d.changeGroup(a)}),n._uU(4),n.qZA(),n.TgZ(5,"span",53),n._uU(6),n.qZA(),n.TgZ(7,"i",54),n._uU(8,"arrow_drop_up"),n.qZA(),n.qZA(),n.TgZ(9,"div",55),n.YNc(10,hn,5,4,"div",56),n.qZA(),n.qZA(),n.qZA()}if(2&o){const t=s.$implicit,e=n.oxw();n.xp6(2),n.ekj("selected",t.isSelect),n.xp6(1),n.ekj("disabled",e.disablePermissionModificationForDivisionUser()),n.xp6(1),n.Oqu(t.isSelect?"check_box":"check_box_outline_blank"),n.xp6(2),n.lnq("",t.name," (",t.selectCount,"/",t.resources.length,")"),n.xp6(1),n.ekj("rotate-reverse",!t.isUnfold),n.xp6(2),n.ekj("fold",!t.isUnfold),n.xp6(1),n.Q6J("ngForOf",t.resources)}}function Cn(o,s){if(1&o&&(n.TgZ(0,"span"),n._uU(1),n.qZA()),2&o){const t=n.oxw();n.xp6(1),n.hij("(",t.sel_role.users.length,")")}}function Mn(o,s){1&o&&(n.TgZ(0,"div",10),n.TgZ(1,"div",12),n._uU(2,"No User"),n.qZA(),n.qZA())}function On(o,s){if(1&o){const t=n.EpF();n.TgZ(0,"img",64),n.NdJ("error",function(){return n.CHM(t),n.oxw().$implicit.provider_picture=null}),n.qZA()}if(2&o){const t=n.oxw().$implicit;n.Q6J("src",t.provider_picture,n.LSH)}}function vn(o,s){if(1&o&&(n.TgZ(0,"div",65),n.TgZ(1,"div",66),n._uU(2),n.qZA(),n.qZA()),2&o){const t=n.oxw().$implicit;n.xp6(2),n.Oqu(t.email?t.email.slice(0,1):t.firstname.slice(0,1))}}function wn(o,s){if(1&o&&(n.TgZ(0,"div",10),n.TgZ(1,"div",60),n.YNc(2,On,1,1,"img",61),n.YNc(3,vn,3,1,"div",62),n.qZA(),n.TgZ(4,"div",12),n._uU(5),n.qZA(),n.TgZ(6,"div",63),n._uU(7),n.qZA(),n.qZA()),2&o){const t=s.$implicit;n.xp6(2),n.Q6J("ngIf",t.provider_picture),n.xp6(1),n.Q6J("ngIf",!t.provider_picture),n.xp6(2),n.AsE("",t.firstname," ",t.lastname?t.lastname:"",""),n.xp6(2),n.Oqu(t.email?t.email:"(No Email)")}}const yn=x.Bz.forChild([{path:"",component:an},{path:":id",component:(()=>{class o{constructor(t,e,i,r,a,d){this.usersService=t,this.rolesService=e,this.permissionsService=i,this.commonService=r,this.helper=a,this.route=d,this.page="none",this.users=[],this.roles=[],this.role_o={},this.s_roles="idle",this.permissions=[],this.accesses=[],this.allPermissions=[],this.selPermissions=[],this.sel_role={},this.m_warning=new h.u,this.m_create=new h.u,this.prevPermissions=[],this.isChanged=!1,this.isLoading=!1,this.hasMemberPermission=!1,this.monitoringPerms=[],this.selMonitoringPerms=[],this.unselMonitoringPerms=[]}ngOnInit(){this.initData(),this.sub=this.route.params.subscribe(t=>{this.params=t,this.usersService.getMe().subscribe(e=>{this.me=e,this.fetchData()})})}initData(){this.sel_role={},this.sel_role.users=[],this.sel_role.user_cnt=0,this.monitoringPerms=[],this.selMonitoringPerms=[],this.unselMonitoringPerms=[]}fetchPermissions(){this.rolesService.getPermissions(this.me.dealer_id).subscribe(t=>{this.permissions=t},t=>{this.commonService.showErrorToast(t,"Request Permissions Info")})}fetchData(){this.s_roles="loading",this.sel_role=this.rolesService.selRoles,this.isLoading=!0,this.fetchRoles(),this.usersService.getUsers(this.me.dealer_id).subscribe(t=>{this.hasMemberPermission=!0,this.users=t,this.fetchAllPermissions()},t=>{this.commonService.showErrorToast(t,"Request Users Info"),this.isLoading=!1})}fetchAllPermissions(){this.permissionsService.getAllPermissions(this.me.dealer_id,"yes").subscribe(t=>{this.allPermissions=t,this.fetchRole()},t=>{this.commonService.showErrorToast(t,"Request All Permission Info"),this.isLoading=!1})}fetchRoles(){this.rolesService.getRoles(this.me.dealer_id).subscribe(t=>{this.roles=t,this.role_o=t[0]},t=>{this.commonService.showErrorToast(t,"Request User Roles Info")})}fetchRole(){this.rolesService.getRole(this.me.dealer_id,this.params.id).subscribe(t=>{let e=t[0];e.users=this.users.filter(i=>i.role_id==t[0].role_id),e.user_cnt=e.users.length,this.sel_role=e,this.s_roles="idle",this.selPermissions=[],this.rolesService.getRolePermissions(this.me.dealer_id,this.sel_role.role_id,"yes").subscribe(i=>{this.sel_role.permissions=i,this.prevPermissions=m.cloneDeep(i),this.checkSelPermissions(i),this.isLoading=!1})},t=>{this.commonService.showErrorToast(t,"Request User Role Info"),this.isLoading=!1})}parseMonitoringPermissions(){this.unselMonitoringPerms=this.monitoringPerms.filter(t=>!this.selMonitoringPerms.includes(t))}addMonitoringPermission(t){t.isSelect=!0,this.isChanged=!0;let e=!1;this.selPermissions.forEach(i=>{i.resources.forEach(r=>{r.isSelect&&(e=!0)}),t.groupId===i.group_id&&(i.isSelect=e)}),this.selMonitoringPerms.includes(t)||this.selMonitoringPerms.push(t),this.parseMonitoringPermissions(),this.selPermissions.forEach(i=>{i.selectCount=i.resources.filter(r=>r.isSelect).length})}checkSelPermissions(t){let e=m.cloneDeep(this.allPermissions),i=0,r=-1;e.forEach(a=>{1===a.group_id&&(r=i),i+=1}),r>=0&&e.splice(r,1),e.forEach(a=>{a.resources.forEach(p=>{const qn=p.permission_id;p.groupId=a.group_id,p.is_monitoring_permission&&this.monitoringPerms.push(p),t.forEach(w=>{w.resources.forEach(Z=>{const zn=Z.permission_id,Rn=Z.resource;p.groupName=w.name,(zn==qn||"all"===Rn)&&(p.isSelect=!0,a.isSelect=!0,p.is_monitoring_permission&&this.selMonitoringPerms.push(p))})})})}),this.unselMonitoringPerms=this.monitoringPerms.filter(a=>!this.selMonitoringPerms.includes(a)),e.forEach(a=>{a.selectCount=a.resources.filter(d=>d.isSelect).length}),this.selPermissions=e}disablePermissionModificationForDivisionUser(){return!!this.me.is_division_user}changeGroup(t){t.isSelect=!t.isSelect,this.isChanged=!0;let e=[];t.resources.forEach(i=>{if(i.isSelect=t.isSelect,e.push(i.permission_id),i.is_monitoring_permission)if(i.isSelect)this.selMonitoringPerms.includes(i)||this.selMonitoringPerms.push(i);else if(this.selMonitoringPerms.includes(i)){const r=this.selMonitoringPerms.indexOf(i);this.selMonitoringPerms.splice(r,1)}}),this.parseMonitoringPermissions(),this.selPermissions.forEach(i=>{i.selectCount=i.resources.filter(r=>r.isSelect).length})}updateDialog(){this.m_warning.data={header:"Update a Role Permissions",contents:"\n <p>Are you sure that you want to update a Role Permissions</p>\n ",submit_btn:"Update",submit_class:["button-primary"]},this.m_warning.data.submit_func=()=>{this.updatePermissions()},this.m_warning.open()}updatePermissions(){const t=this.me.dealer_id,e=this.sel_role.role_id;let i=[];this.selPermissions.forEach(a=>{a.resources.forEach(d=>{d.isSelect&&i.push(d.permission_id)})}),this.rolesService.setRolePermissions(t,e,{permission_ids:i}).subscribe(a=>{this.permissionsService.getPermissions(this.me.dealer_id,!0).subscribe(),setTimeout(()=>{this.prevPermissions=m.cloneDeep(this.selPermissions),this.confirmDialog("Update a Role Permissions","Update a Role Permissions - Success."),this.isChanged=!1},300)},a=>{this.errorDialog(a,"Update a Role Permissions")})}updatePermission(t,e){t.isSelect=!t.isSelect,this.isChanged=!0;let i=!1;if(e.resources.forEach(r=>{r.isSelect&&(i=!0)}),e.isSelect=i,t.is_monitoring_permission)if(t.isSelect)this.selMonitoringPerms.includes(t)||this.selMonitoringPerms.push(t);else if(this.selMonitoringPerms.includes(t)){const r=this.selMonitoringPerms.indexOf(t);this.selMonitoringPerms.splice(r,1)}this.parseMonitoringPermissions(),this.selPermissions.forEach(r=>{r.selectCount=r.resources.filter(a=>a.isSelect).length})}updateGroupPermissions(t){t.isSelect=!t.isSelect;let e=!1;t.resources.forEach(i=>{e=t.isSelect})}restorePermissions(){this.isChanged=!1,this.checkSelPermissions(this.prevPermissions)}setRole(){this.isChanged=!0,this.rolesService.getRolePermissions(this.me.dealer_id,this.role_o.role_id,"yes").subscribe(t=>{this.checkSelPermissions(t)},t=>{this.commonService.showErrorToast(t,"Request User Permissions Info")})}gotoList(){this.helper.router.navigate_to("settings/permission-groups")}editRole(){this.m_create.data.role=this.sel_role,this.m_create.open()}closeCreate(t){t&&this.fetchData()}confirmDialog(t="",e="",i="done",r="green"){this.m_warning.data={header:t,contents:`\n <p>${e}</b></p>\n `,submit_btn:"OK",submit_class:["button-primary"],icon:i,isConfirm:!0,color:r},this.m_warning.data.submit_func=()=>{},this.m_warning.open()}errorDialog(t,e){let i="failed.";t.error&&t.error.message&&(i=t.error.message),t._body&&(i=JSON.parse(t._body).message),setTimeout(()=>{this.confirmDialog(e,i,"warning","orange"),this.fetchData()},200),this.hasMemberPermission=403!==t.status}}return o.\u0275fac=function(t){return new(t||o)(n.Y36(C.f),n.Y36(M.f),n.Y36(ln.q),n.Y36(dn.v),n.Y36(_.W),n.Y36(x.gz))},o.\u0275cmp=n.Xpm({type:o,selectors:[["app-permission-group"]],decls:79,vars:17,consts:[[1,"screen"],[1,"container"],["id","40201",1,"widget"],[1,"header",2,"border-bottom","solid 0.5px #d7d7d7","padding","0px 8px"],["title","Back",1,"icon-btn",3,"click"],[1,"material-icons"],[1,"title"],[1,"material-icons","icon-primary",2,"cursor","pointer","padding-right","8px",3,"click"],[1,"body"],[1,"list",2,"overflow-y","initial"],[1,"list-item"],[1,"contents","w-3"],[1,"contents"],[1,"contents",2,"white-space","pre-wrap"],[1,"list-item",2,"min-height","44px"],[1,"contents","w-3",2,"overflow","initial"],[1,"row"],[1,"tooltip-content","v-center"],[1,"material-icons-outlined","tooltip-icon"],[1,"tooltip"],[4,"ngFor","ngForOf"],[1,"contents",2,"padding","0 0 0 8px"],[4,"ngIf"],["style","align-items: center;",4,"ngIf"],[1,"widget"],[1,"header",2,"border-bottom","solid 0.5px #d7d7d7","padding","10px 8px"],[2,"display","flex","padding","0px 80px 0px 0px","align-content","center"],[1,"contents","w-4","label",2,"padding-right","4px","display","flex","justify-content","center","align-items","center"],[1,"selectbox",2,"padding-left","4px",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"btn-area"],[1,"space"],[1,"button","button-primary",3,"click"],[1,"btn-inner"],[1,"body",2,"overflow-y","auto"],[1,"list"],["class","list-item has-child",4,"ngFor","ngForOf"],[1,"header"],["class","list-item",4,"ngIf"],["class","list-item",4,"ngFor","ngForOf"],[3,"modal"],[3,"modal","active","onClose"],[1,"perm-allow"],[2,"align-items","center"],[1,"perm-warning"],[1,"row",2,"flex-wrap","wrap"],["class","perm-tag",3,"title","click",4,"ngFor","ngForOf"],[1,"perm-tag",3,"title","click"],[3,"ngValue"],[1,"list-item","has-child"],[1,"permission-container"],[1,"contents",2,"display","flex","align-items","center",3,"click"],[1,"material-icons","select-icon",3,"click"],[1,"text","group-name"],[1,"material-icons","transition","icon"],[1,"permission-box"],["style","display: flex;align-items: center;",3,"selected","click",4,"ngFor","ngForOf"],[2,"display","flex","align-items","center",3,"click"],[1,"material-icons","select-icon","fs-22"],[1,"permission-name"],[1,"contents",2,"width","36px"],["class","face",3,"src","error",4,"ngIf"],["class","no-face",4,"ngIf"],[1,"contents","w-4","fs-12"],[1,"face",3,"src","error"],[1,"no-face"],[2,"padding-top","8px"]],template:function(t,e){1&t&&(n.TgZ(0,"div",0),n.TgZ(1,"div",1),n.TgZ(2,"div",2),n.TgZ(3,"div",3),n.TgZ(4,"div",4),n.NdJ("click",function(){return e.gotoList()}),n.TgZ(5,"i",5),n._uU(6,"arrow_back"),n.qZA(),n.qZA(),n.TgZ(7,"div",6),n._uU(8,"Information"),n.qZA(),n.TgZ(9,"i",7),n.NdJ("click",function(){return e.editRole()}),n._uU(10," edit"),n.qZA(),n.qZA(),n.TgZ(11,"div",8),n.TgZ(12,"div",9),n.TgZ(13,"div",10),n.TgZ(14,"div",11),n.TgZ(15,"b"),n._uU(16,"Name"),n.qZA(),n.qZA(),n.TgZ(17,"div",12),n._uU(18),n.qZA(),n.qZA(),n.TgZ(19,"div",10),n.TgZ(20,"div",11),n.TgZ(21,"b"),n._uU(22,"Description"),n.qZA(),n.qZA(),n.TgZ(23,"div",13),n._uU(24),n.qZA(),n.qZA(),n.TgZ(25,"div",14),n.TgZ(26,"div",15),n.TgZ(27,"div",16),n.TgZ(28,"span"),n.TgZ(29,"b"),n._uU(30,"Monitoring Portal Access"),n.qZA(),n.qZA(),n.TgZ(31,"div",17),n.TgZ(32,"i",18),n._uU(33,"info"),n.qZA(),n.TgZ(34,"span",19),n.TgZ(35,"span"),n._uU(36,"Required Permissions"),n.qZA(),n._UZ(37,"br"),n._UZ(38,"br"),n.YNc(39,mn,3,1,"div",20),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n.TgZ(40,"div",21),n.YNc(41,fn,4,0,"div",22),n.YNc(42,xn,6,1,"div",23),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n.TgZ(43,"div",24),n.TgZ(44,"div",25),n.TgZ(45,"div",6),n._uU(46,"Permissions"),n.qZA(),n.TgZ(47,"div",26),n.TgZ(48,"div",27),n._uU(49," Role Sample"),n.qZA(),n.TgZ(50,"select",28),n.NdJ("ngModelChange",function(r){return e.role_o=r}),n.YNc(51,un,2,2,"option",29),n.qZA(),n.TgZ(52,"div",30),n._UZ(53,"div",31),n.TgZ(54,"div",32),n.NdJ("click",function(){return e.setRole()}),n.TgZ(55,"div",33),n._uU(56,"Copy permissions from existing role"),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n.TgZ(57,"div",30),n.TgZ(58,"div",32),n.NdJ("click",function(){return e.restorePermissions()}),n.TgZ(59,"div",33),n._uU(60,"Restore"),n.qZA(),n.qZA(),n._UZ(61,"div",31),n.TgZ(62,"div",32),n.NdJ("click",function(){return e.updateDialog()}),n.TgZ(63,"div",33),n._uU(64,"Apply"),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n.TgZ(65,"div",34),n.TgZ(66,"div",35),n.YNc(67,Pn,11,13,"div",36),n.qZA(),n.qZA(),n.qZA(),n.TgZ(68,"div",24),n.TgZ(69,"div",37),n.TgZ(70,"div",6),n._uU(71,"Users "),n.YNc(72,Cn,2,1,"span",22),n.qZA(),n.qZA(),n.TgZ(73,"div",8),n.TgZ(74,"div",35),n.YNc(75,Mn,3,0,"div",38),n.YNc(76,wn,8,5,"div",39),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n.qZA(),n._UZ(77,"dealer-warning",40),n.TgZ(78,"dealer-role-create",41),n.NdJ("onClose",function(r){return e.closeCreate(r)}),n.qZA()),2&t&&(n.Q6J("@page",void 0),n.xp6(18),n.Oqu(e.sel_role.name),n.xp6(6),n.Oqu(e.sel_role.description),n.xp6(15),n.Q6J("ngForOf",e.monitoringPerms),n.xp6(2),n.Q6J("ngIf",0===e.unselMonitoringPerms.length&&!e.isLoading),n.xp6(1),n.Q6J("ngIf",0!==e.unselMonitoringPerms.length&&!e.isLoading),n.xp6(8),n.Q6J("ngModel",e.role_o),n.xp6(1),n.Q6J("ngForOf",e.roles),n.xp6(11),n.ekj("disabled",!e.isChanged),n.xp6(5),n.Q6J("ngForOf",e.selPermissions),n.xp6(5),n.Q6J("ngIf",e.sel_role.users),n.xp6(3),n.Q6J("ngIf",e.sel_role.users&&0==e.sel_role.users.length),n.xp6(1),n.Q6J("ngForOf",e.sel_role.users),n.xp6(1),n.Q6J("modal",e.m_warning),n.xp6(1),n.Q6J("modal",e.m_create)("active",e.m_create.is_active))},directives:[c.sg,c.O5,g.EJ,g.JJ,g.On,O.a,_n,g.YN,g.Kr],styles:['.screen[_ngcontent-%COMP%]{display:flex;flex-direction:row;overflow-y:overlay;height:100%;position:relative;-webkit-user-select:none;user-select:none}.scroll-screen[_ngcontent-%COMP%]{flex:1;flex-direction:column;overflow-y:overlay;height:100%;position:relative;-webkit-user-select:none;user-select:none;display:flex;align-items:center}.center-screen[_ngcontent-%COMP%]{flex:1;flex-direction:column;overflow-y:overlay;height:100%;position:relative;-webkit-user-select:none;user-select:none;display:flex;align-items:center;box-shadow:1px 5px 5px 1px #00000014;border-right:1px solid rgba(0,0,0,.08)}.side-btn-area[_ngcontent-%COMP%]{width:36px;height:100%;display:flex;flex-direction:column}.side-btn[_ngcontent-%COMP%]{padding:16px 4px;color:#888;cursor:pointer}.side-btn[_ngcontent-%COMP%]:hover{color:#000}.widget[_ngcontent-%COMP%]{background:#fff;min-width:98%;max-width:98%;width:98%;margin-top:16px;margin-bottom:16px}.widget[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.widget[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14px;padding:16px;flex:1}.widget[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{vertical-align:middle}.widget[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{padding:16px}.widget[_ngcontent-%COMP%] .table-header[_ngcontent-%COMP%]{margin-bottom:8px}.widget[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.widget[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{background:#f0f0f0}.widget[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:12px 8px;color:#999;text-transform:capitalize;text-align:left;font-size:12px}.widget[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.widget[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 8px;color:#555;font-size:14px}.widget[_ngcontent-%COMP%] .table-loading[_ngcontent-%COMP%]{padding:32px;text-align:center}.widget[_ngcontent-%COMP%] .table-loading[_ngcontent-%COMP%] .loading-image[_ngcontent-%COMP%]{width:48px;height:16px}.widget[_ngcontent-%COMP%] .has-child[_ngcontent-%COMP%]:hover{background:#fafafa;cursor:pointer}.flat-btn[_ngcontent-%COMP%]{color:#2383e2;cursor:pointer;text-transform:capitalize;font-size:14px;padding:16px 8px}.description[_ngcontent-%COMP%]{font-size:14px;padding:8px}.list[_ngcontent-%COMP%]{position:relative;max-height:500px;overflow-y:overlay}.list-item[_ngcontent-%COMP%]{width:100%;display:table}.list-header[_ngcontent-%COMP%]{margin-bottom:8px;color:#888;font-weight:700;text-transform:uppercase}.has-child[_ngcontent-%COMP%]{cursor:pointer}.has-child[_ngcontent-%COMP%]:hover{background:#f0f0f0}.list-item[_ngcontent-%COMP%] .contents[_ngcontent-%COMP%]{display:table-cell;padding:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;font-size:14px;position:relative}.list-itme[_ngcontent-%COMP%] .w-1[_ngcontent-%COMP%]{width:10%}.list-item[_ngcontent-%COMP%] .w-2[_ngcontent-%COMP%]{width:20%}.list-item[_ngcontent-%COMP%] .w-3[_ngcontent-%COMP%]{width:30%}.list-item[_ngcontent-%COMP%] .w-4[_ngcontent-%COMP%]{width:40%}.list-item[_ngcontent-%COMP%] .w-5[_ngcontent-%COMP%]{width:50%}.list-item[_ngcontent-%COMP%] .fs-12[_ngcontent-%COMP%]{font-size:12px}.list-item[_ngcontent-%COMP%] .right-align[_ngcontent-%COMP%]{text-align:right}.contents[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:80%;box-sizing:border-box;padding:8px;font-size:14px;background-color:#f0f0f0;border:none;border-bottom:2px solid #f0f0f0;-webkit-appearance:none;-moz-appearance:none;transition:.2s}.contents[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #2383e2}.contents[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:80%;box-sizing:border-box;padding:8px;font-size:14px;background-color:#f0f0f0;border:none;border-bottom:2px solid #f0f0f0;-webkit-appearance:none;-moz-appearance:none;transition:.2s}.contents[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-bottom:2px solid #2383e2}.contents[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{position:absolute;left:12px;top:12px;color:#00000080}.contents[_ngcontent-%COMP%] .search-box[_ngcontent-%COMP%]{width:100%;padding-left:32px}.contents[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{cursor:pointer}.face[_ngcontent-%COMP%]{border-radius:50%;width:28px;height:28px;display:inline-block;margin-right:8px;vertical-align:middle}.no-face[_ngcontent-%COMP%]{border-radius:50%;width:36px;height:36px;background-color:#ccc;display:inline-block;margin-right:8px;vertical-align:middle;color:#fff;text-align:center;text-transform:uppercase}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:48px auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.loading[_ngcontent-%COMP%]{background-color:#eee}.circular[_ngcontent-%COMP%]{animation:rotate 2s linear infinite;height:100%;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.path[_ngcontent-%COMP%]{stroke-dasharray:1,200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke:#0057e7;stroke-linecap:round}.disabled[_ngcontent-%COMP%]{opacity:.6;cursor:default;pointer-events:none;color:#888}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}','.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center}.permission-container[_ngcontent-%COMP%]{color:#aaa;text-transform:capitalize}.permission-container[_ngcontent-%COMP%] .permission-box[_ngcontent-%COMP%]{padding-left:24px}.permission-container[_ngcontent-%COMP%] .fold[_ngcontent-%COMP%]{height:0px}.permission-container[_ngcontent-%COMP%] .selected[_ngcontent-%COMP%]{color:#000}.permission-container[_ngcontent-%COMP%] .group-name[_ngcontent-%COMP%]{font-size:16px}.permission-container[_ngcontent-%COMP%] .permission-name[_ngcontent-%COMP%]{font-size:14px}.search-container[_ngcontent-%COMP%]{margin:4px 0}.transition[_ngcontent-%COMP%]{transition:.3s}.transition.rotate-reverse[_ngcontent-%COMP%]{transform:rotate(180deg)}.fold[_ngcontent-%COMP%]{display:none}.select-icon[_ngcontent-%COMP%]{vertical-align:middle;cursor:pointer;color:#2383e2}.icon[_ngcontent-%COMP%]{vertical-align:middle;cursor:pointer;color:#000}.btn[_ngcontent-%COMP%]{cursor:pointer;transition:.3s;border-radius:5px;font-family:Roboto;font-size:15px}.btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:18px}.btn.active[_ngcontent-%COMP%]{background:#2383e2;color:#fff;cursor:pointer}.btn.active[_ngcontent-%COMP%]:hover{background:#66b3ff}.btn.warning[_ngcontent-%COMP%]{background:red;color:#fff}.btn.warning[_ngcontent-%COMP%]:hover{background:#ff4d4d}.w-1[_ngcontent-%COMP%]{width:10%}.icon-btn[_ngcontent-%COMP%]{cursor:pointer;color:#878787;transition:.3s}.icon-btn[_ngcontent-%COMP%]:hover{color:#4d4c4c}.icon-btn.active[_ngcontent-%COMP%]{color:#2383e2}.icon-btn.active[_ngcontent-%COMP%]:hover{color:#66b3ff}.icon-btn.warning[_ngcontent-%COMP%]{color:red}.icon-btn.warning[_ngcontent-%COMP%]:hover{color:#ff4d4d}.icon-primary[_ngcontent-%COMP%]{font-size:23px;color:#2383e2!important}.icon-primary[_ngcontent-%COMP%]:hover{color:#7bf!important}.icon-warning[_ngcontent-%COMP%]{font-size:23px;color:#dc143c!important}.icon-warning[_ngcontent-%COMP%]:hover{color:#fc3f65!important}.loader[_ngcontent-%COMP%]{position:relative;margin:0 auto;width:50px}.loader.absolute[_ngcontent-%COMP%]{margin:48px auto;position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.loader[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:100%}.loading[_ngcontent-%COMP%]{background-color:#eee}.flex[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.flex[_ngcontent-%COMP%] .w-1[_ngcontent-%COMP%]{flex:1}.flex[_ngcontent-%COMP%] .w-2[_ngcontent-%COMP%]{flex:2}.flex[_ngcontent-%COMP%] .w-3[_ngcontent-%COMP%]{flex:3}.flex[_ngcontent-%COMP%] .w-4[_ngcontent-%COMP%]{flex:4}.fs-22[_ngcontent-%COMP%]{font-size:22}.perm-warning[_ngcontent-%COMP%]{color:#cd3d64}.perm-tag[_ngcontent-%COMP%]{padding:4px 8px;border-radius:8px;margin:0 4px 4px 0;background:#f5925e;color:#fff;font-size:12px;cursor:pointer}.perm-tag[_ngcontent-%COMP%]:hover{background:#f7ae87;transition:all .2s}.perm-allow[_ngcontent-%COMP%]{color:#1ea675}.tooltip-content[_ngcontent-%COMP%]{position:relative}.tooltip-content[_ngcontent-%COMP%] .tooltip-icon[_ngcontent-%COMP%]{cursor:pointer;margin-left:7px;font-size:18px;color:#0009}.tooltip-content[_ngcontent-%COMP%]:hover .tooltip[_ngcontent-%COMP%]{visibility:visible;opacity:1}.tooltip-content[_ngcontent-%COMP%] .tooltip[_ngcontent-%COMP%]{min-width:200px;visibility:hidden;background-color:#0009;color:#fff;padding:10px;border-radius:6px;font-size:13px;position:absolute;z-index:1;top:25px;left:50%;margin-left:-38px;opacity:0;transition:opacity .3s}.tooltip-content[_ngcontent-%COMP%] .tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-10px;left:41px;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent rgba(0,0,0,.6) transparent}.division-tab[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;height:46px}.division-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;position:relative}.division-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{color:#2383e2;cursor:pointer}.division-tab[_ngcontent-%COMP%] .btn-selected[_ngcontent-%COMP%]{color:#2383e2;background:transparent}.division-tab[_ngcontent-%COMP%] .tab-title[_ngcontent-%COMP%]{padding:0 32px;text-transform:uppercase;font-size:14px}.division-tab[_ngcontent-%COMP%] .tab-selected-bar[_ngcontent-%COMP%]{position:absolute;bottom:0px;width:100%;height:4px;background:#2383e2}'],data:{animation:[b.cN]}}),o})()}]);var v=l(56447);let kn=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=n.oAB({type:o}),o.\u0275inj=n.cJS({imports:[[c.ez,g.u5,v.q]]}),o})();var Tn=l(28774);let An=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=n.oAB({type:o}),o.\u0275inj=n.cJS({imports:[[c.ez,g.u5,yn,v.q,kn,Tn.U]]}),o})()}}]);